Skip to content

core

core

DomoEverywhere dataclass

DomoEverywhere(
    auth: DomoAuth,
    publications: list[DomoPublication] = None,
    subscriptions: list[DomoSubscription] = None,
    invitations: list[dict[str, Any]] = None,
)

Bases: DomoManager

Instance-wide Domo Everywhere access: publications, subscriptions, invites.

A Manager of publications: get returns this instance's publications.

accept_invite_by_id async

accept_invite_by_id(
    subscription_id: str,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> Any

Accept a subscription invitation.

Parameters:

Name Type Description Default
subscription_id str

ID of the subscription invitation.

required
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
Any

The response payload on HTTP 200, otherwise None.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
async def accept_invite_by_id(
    self,
    subscription_id: str,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> Any:
    """Accept a subscription invitation.

    Args:
        subscription_id: ID of the subscription invitation.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The response payload on HTTP 200, otherwise None.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    res = await publish_routes.accept_invite_by_id(
        auth=self.auth,
        subscription_id=subscription_id,
        context=context,
    )

    if res.status == 200:
        return res.response
    return None

count_subscription_invites async

count_subscription_invites(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Count subscription invites (/subscriptions/invites/counts).

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
async def count_subscription_invites(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Count subscription invites (``/subscriptions/invites/counts``).

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    return await publish_routes.count_subscription_invites(
        auth=self.auth,
        context=context,
    )

count_subscription_summaries async

count_subscription_summaries(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Count subscription summaries (/subscriptions/summaries/counts).

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
async def count_subscription_summaries(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Count subscription summaries (``/subscriptions/summaries/counts``).

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    return await publish_routes.count_subscription_summaries(
        auth=self.auth,
        context=context,
    )

get async

get(
    search_term: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> list[DomoPublication] | ResponseGetData

Get this instance's publications (same as get_publications).

get lists publications, not subscriptions or invites: a publication is the entity this instance owns and shares out, and it is the first list the class caches. Subscriptions and invites keep their own get_subscriptions / get_subscription_invitations methods.

Parameters:

Name Type Description Default
search_term str | None

Optional text to filter publications by.

None
return_raw bool

If True, return the raw search response.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
list[DomoPublication] | ResponseGetData

The publications (also stored on publications), or the raw

list[DomoPublication] | ResponseGetData

response when return_raw is True.

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
async def get(
    self,
    search_term: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> list[DomoPublication] | rgd.ResponseGetData:
    """Get this instance's publications (same as ``get_publications``).

    ``get`` lists publications, not subscriptions or invites: a publication
    is the entity this instance owns and shares out, and it is the first
    list the class caches. Subscriptions and invites keep their own
    ``get_subscriptions`` / ``get_subscription_invitations`` methods.

    Args:
        search_term: Optional text to filter publications by.
        return_raw: If True, return the raw search response.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The publications (also stored on ``publications``), or the raw
        response when ``return_raw`` is True.
    """
    return await self.get_publications(
        search_term=search_term,
        return_raw=return_raw,
        context=context,
        **context_kwargs,
    )

get_all_publications_status async

get_all_publications_status(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get the status of all publications.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishStatus_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
async def get_all_publications_status(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the status of all publications.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishStatus_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_all_publications_status(
        auth=self.auth,
        context=context,
    )

get_page_associations async

get_page_associations(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get the page associations for the publisher.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
async def get_page_associations(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the page associations for the publisher.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_page_associations(
        auth=self.auth,
        timeout=timeout,
        context=context,
    )

get_publication_status async

get_publication_status(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get the publication status.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishStatus_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
async def get_publication_status(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the publication status.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishStatus_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_status(
        auth=self.auth,
        context=context,
    )

get_publication_summary_counts async

get_publication_summary_counts(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get the publication summary counts.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishStatus_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
async def get_publication_summary_counts(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the publication summary counts.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishStatus_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_summary_counts(
        auth=self.auth,
        context=context,
    )

get_publications async

get_publications(
    search_term: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> list[DomoPublication] | ResponseGetData

Get this instance's publications.

Parameters:

Name Type Description Default
search_term str | None

Optional text to filter publications by.

None
return_raw bool

If True, return the raw search response.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
list[DomoPublication] | ResponseGetData

The publications (also stored on publications), or the raw

list[DomoPublication] | ResponseGetData

response when return_raw is True.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
async def get_publications(
    self,
    search_term: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> list[DomoPublication] | rgd.ResponseGetData:
    """Get this instance's publications.

    Args:
        search_term: Optional text to filter publications by.
        return_raw: If True, return the raw search response.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The publications (also stored on ``publications``), or the raw
        response when ``return_raw`` is True.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    res = await publish_routes.search_publications(
        auth=self.auth,
        search_term=search_term,
        context=context,
    )

    if return_raw:
        return res

    self.publications = await dmce.gather_with_concurrency(
        n=60,
        *[  # noqa: B026
            DomoPublication.get_by_id(
                publication_id=obj.get("id"), auth=self.auth, context=context
            )
            for obj in res.response
        ],
    )
    return self.publications

get_publications_status async

get_publications_status(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get the publications status.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishStatus_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
async def get_publications_status(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the publications status.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishStatus_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publications_status(
        auth=self.auth,
        context=context,
    )

get_subscription_invitations async

get_subscription_invitations(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this instance's pending subscription invitations.

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response (its payload is also stored on invitations).

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
async def get_subscription_invitations(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this instance's pending subscription invitations.

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response (its payload is also stored on ``invitations``).
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    res = await publish_routes.get_subscription_invitations(
        auth=self.auth,
        context=context,
    )

    self.invitations = res.response

    return res

get_subscription_invite_counts async

get_subscription_invite_counts(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Count subscription invites (/subscription/invites/counts).

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
async def get_subscription_invite_counts(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Count subscription invites (``/subscription/invites/counts``).

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    return await publish_routes.get_subscription_invite_counts(
        auth=self.auth,
        context=context,
    )

get_subscription_status async

get_subscription_status(
    package_publication_id: str,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get subscription status for a package publication.

Parameters:

Name Type Description Default
package_publication_id str

Package publication ID.

required
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
async def get_subscription_status(
    self,
    package_publication_id: str,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get subscription status for a package publication.

    Args:
        package_publication_id: Package publication ID.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    return await publish_routes.get_subscription_status(
        auth=self.auth,
        package_publication_id=package_publication_id,
        context=context,
    )

get_subscription_summaries_by_pub_id async

get_subscription_summaries_by_pub_id(
    pub_id: str,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get the subscription summaries of one publication.

Parameters:

Name Type Description Default
pub_id str

Publication ID.

required
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
async def get_subscription_summaries_by_pub_id(
    self,
    pub_id: str,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the subscription summaries of one publication.

    Args:
        pub_id: Publication ID.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    return await publish_routes.get_subscription_summaries_by_pub_id(
        auth=self.auth,
        pub_id=pub_id,
        context=context,
    )

get_subscription_summary_counts async

get_subscription_summary_counts(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Count subscription summaries (/subscription/summaries/counts).

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
async def get_subscription_summary_counts(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Count subscription summaries (``/subscription/summaries/counts``).

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    return await publish_routes.get_subscription_summary_counts(
        auth=self.auth,
        context=context,
    )

get_subscriptions async

get_subscriptions(
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> list[DomoSubscription] | ResponseGetData

Get this instance's subscription summaries.

Parameters:

Name Type Description Default
return_raw bool

If True, return the raw summaries response.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
list[DomoSubscription] | ResponseGetData

The subscriptions (also stored on subscriptions), or the raw

list[DomoSubscription] | ResponseGetData

response when return_raw is True.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
async def get_subscriptions(
    self,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> list[DomoSubscription] | rgd.ResponseGetData:
    """Get this instance's subscription summaries.

    Args:
        return_raw: If True, return the raw summaries response.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The subscriptions (also stored on ``subscriptions``), or the raw
        response when ``return_raw`` is True.
    """

    self.subscriptions = []

    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    res = await publish_routes.get_subscription_summaries(
        auth=self.auth,
        context=context,
    )

    if return_raw:
        return res

    for sub in res.response:
        domo_sub = DomoSubscription.from_dict(auth=self.auth, obj=sub)

        if sub in self.subscriptions:
            continue
        self.subscriptions.append(domo_sub)

    return self.subscriptions

list_all_subscriptions async

list_all_subscriptions(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

List every subscription on this instance.

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
async def list_all_subscriptions(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """List every subscription on this instance.

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    return await publish_routes.list_all_subscriptions(
        auth=self.auth,
        context=context,
    )

list_public_subscription_invites async

list_public_subscription_invites(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

List public subscription invites.

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
async def list_public_subscription_invites(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """List public subscription invites.

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    return await publish_routes.list_public_subscription_invites(
        auth=self.auth,
        context=context,
    )

list_subscription_invites async

list_subscription_invites(
    limit: int | None = None,
    offset: int | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

List subscription invites.

Parameters:

Name Type Description Default
limit int | None

Optional page size.

None
offset int | None

Optional page offset.

None
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
async def list_subscription_invites(
    self,
    limit: int | None = None,
    offset: int | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """List subscription invites.

    Args:
        limit: Optional page size.
        offset: Optional page offset.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    return await publish_routes.list_subscription_invites(
        auth=self.auth,
        limit=limit,
        offset=offset,
        context=context,
    )

list_subscription_summaries async

list_subscription_summaries(
    limit: int | None = None,
    offset: int | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

List subscription summaries.

Parameters:

Name Type Description Default
limit int | None

Optional page size.

None
offset int | None

Optional page offset.

None
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
async def list_subscription_summaries(
    self,
    limit: int | None = None,
    offset: int | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """List subscription summaries.

    Args:
        limit: Optional page size.
        offset: Optional page offset.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    return await publish_routes.list_subscription_summaries(
        auth=self.auth,
        limit=limit,
        offset=offset,
        context=context,
    )

search_publications async

search_publications(
    search_term: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> list[DomoPublication] | ResponseGetData

Search this instance's publications (alias of get_publications).

Parameters:

Name Type Description Default
search_term str | None

Optional text to filter publications by.

None
return_raw bool

If True, return the raw search response.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
list[DomoPublication] | ResponseGetData

The publications, or the raw response when return_raw is True.

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
async def search_publications(
    self,
    search_term: str | None = None,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> list[DomoPublication] | rgd.ResponseGetData:
    """Search this instance's publications (alias of ``get_publications``).

    Args:
        search_term: Optional text to filter publications by.
        return_raw: If True, return the raw search response.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The publications, or the raw response when ``return_raw`` is True.
    """
    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    res = await self.get_publications(
        search_term=search_term,
        return_raw=return_raw,
        context=context,
    )

    return res  # noqa: RET504

DomoPublication dataclass

DomoPublication(
    auth: DomoAuth,
    id: str,
    raw: dict,
    name: str = None,
    description: str = None,
    is_v2: bool = None,
    created_dt: datetime = None,
    updated_dt: datetime = None,
    subscriptions: list[DomoSubscription] = None,
    content: list[DomoPublication_Content] = None,
)

Bases: DomoEntity_w_Lineage

A Domo Everywhere publication: content a publisher sends to subscribers.

display_url property

display_url: str

URL of this publication's details page in the Domo admin UI.

create_publication async classmethod

create_publication(
    auth: DomoAuth,
    name: str,
    content_ls: list[DomoPublication_Content],
    subscription_ls: list[DomoSubscription],
    unique_id: str | None = None,
    description: str | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> DomoPublication

Create a publication.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session (the publisher).

required
name str

Publication name.

required
content_ls list[DomoPublication_Content]

Content to publish.

required
subscription_ls list[DomoSubscription]

Subscribers to publish to.

required
unique_id str | None

Optional publication ID; a UUID is generated if omitted.

None
description str | None

Optional description.

None
debug_api bool

Enable API debug logging.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
DomoPublication

The created publication.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
@classmethod
async def create_publication(
    cls,
    auth: DomoAuth,
    name: str,
    content_ls: list[DomoPublication_Content],
    subscription_ls: list[DomoSubscription],
    unique_id: str | None = None,
    description: str | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> DomoPublication:
    """Create a publication.

    Args:
        auth: Authenticated Domo session (the publisher).
        name: Publication name.
        content_ls: Content to publish.
        subscription_ls: Subscribers to publish to.
        unique_id: Optional publication ID; a UUID is generated if omitted.
        description: Optional description.
        debug_api: Enable API debug logging.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The created publication.
    """
    if not isinstance(subscription_ls, list):
        subscription_ls = [subscription_ls]

    domain_ls = []
    content_json_ls = []
    for sub in subscription_ls:
        domain_ls.append(sub.subscriber_domain)
    for content_item in content_ls:
        content_json_ls.append(content_item.to_api_json())

    unique_id = unique_id or str(uuid.uuid4())

    body = publish_routes.generate_publish_body(
        url=f"{auth.domo_instance}.domo.com",
        sub_domain_ls=domain_ls,
        content_ls=content_json_ls,
        name=name,
        unique_id=unique_id,
        description=description or "",
        is_new=True,
    )

    context = RouteContext.build_context(
        context=context,
        debug_api=debug_api,
        **context_kwargs,
    )

    res = await publish_routes.create_publish_job(
        auth=auth,
        body=body,
        context=context,
    )

    return cls.from_dict(auth=auth, obj=res.response)

from_dict classmethod

from_dict(
    auth: DomoAuth, obj: dict[str, Any]
) -> DomoPublication

Build a publication from an API payload.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
obj dict[str, Any]

The publication payload.

required

Returns:

Type Description
DomoPublication

The publication entity, with subscriptions and content populated.

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
@classmethod
def from_dict(cls, auth: DomoAuth, obj: dict[str, Any]) -> DomoPublication:
    """Build a publication from an API payload.

    Args:
        auth: Authenticated Domo session.
        obj: The publication payload.

    Returns:
        The publication entity, with subscriptions and content populated.
    """
    domo_pub = cls(
        id=obj["id"],
        name=obj["name"],
        description=obj["description"],
        created_dt=(
            dt.datetime.fromtimestamp(obj["created"] / 1000)
            if obj["created"]
            else None
        ),
        updated_dt=(
            dt.datetime.fromtimestamp(obj.get("content").get("updated") / 1000)
            if obj.get("content").get("updated")
            else None
        ),
        is_v2=obj["isV2"],
        auth=auth,
        raw=obj,
    )

    if (
        obj.get("subscriptionAuthorizations")
        and len(obj.get("subscriptionAuthorizations")) > 0
    ):
        domo_pub._generate_subscriptions(
            subscription_authorizations_ls=obj["subscriptionAuthorizations"],
            auth=auth,
        )

    if obj.get("children") and len(obj.get("children")) > 0:
        domo_pub._generate_content(obj["children"])

    return domo_pub

get_app_collections async

get_app_collections(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's Domo App collections.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
async def get_app_collections(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's Domo App collections.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_app_collections(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_app_templates async

get_app_templates(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's Domo App templates.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
async def get_app_templates(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's Domo App templates.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_app_templates(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_beastmode_templates async

get_beastmode_templates(
    data_source_id: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's Beast Mode templates of a data source.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
data_source_id str

ID of the data source.

required
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
async def get_beastmode_templates(
    self,
    data_source_id: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's Beast Mode templates of a data source.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        data_source_id: ID of the data source.
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_beastmode_templates(
        auth=self.auth,
        publication_id=self.id,
        data_source_id=data_source_id,
        timeout=timeout,
        context=context,
    )

get_by_id async classmethod

get_by_id(
    publication_id: str,
    auth: DomoAuth,
    return_raw: bool = False,
    timeout: int = 10,
    debug_api: bool = False,
    debug_num_stacks_to_drop: int = 2,
    session: AsyncClient | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> DomoPublication | ResponseGetData

Get a publication by ID.

Parameters:

Name Type Description Default
publication_id str

Publication ID.

required
auth DomoAuth

Authenticated Domo session.

required
return_raw bool

If True, return the raw response instead of an entity.

False
timeout int

Request timeout in seconds.

10
debug_api bool

Enable API debug logging.

False
debug_num_stacks_to_drop int

Stack frames to drop in debug output.

2
session AsyncClient | None

Optional shared HTTP client.

None
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
DomoPublication | ResponseGetData

The publication, or the raw response when return_raw is True.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
@classmethod
async def get_by_id(
    cls,
    publication_id: str,
    auth: DomoAuth,
    return_raw: bool = False,
    timeout: int = 10,
    debug_api: bool = False,
    debug_num_stacks_to_drop: int = 2,
    session: httpx.AsyncClient | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> DomoPublication | rgd.ResponseGetData:
    """Get a publication by ID.

    Args:
        publication_id: Publication ID.
        auth: Authenticated Domo session.
        return_raw: If True, return the raw response instead of an entity.
        timeout: Request timeout in seconds.
        debug_api: Enable API debug logging.
        debug_num_stacks_to_drop: Stack frames to drop in debug output.
        session: Optional shared HTTP client.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The publication, or the raw response when ``return_raw`` is True.
    """
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=debug_num_stacks_to_drop,
        **context_kwargs,
    )

    res = await publish_routes.get_publication_by_id(
        auth=auth,
        publication_id=publication_id,
        timeout=timeout,
        context=context,
    )

    if return_raw:
        return res

    return cls.from_dict(auth=auth, obj=res.response)

get_card_calc_dspub_map async

get_card_calc_dspub_map(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's card calculation to data source publication map.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
async def get_card_calc_dspub_map(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's card calculation to data source publication map.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_card_calc_dspub_map(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_card_union async

get_card_union(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's card union.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
async def get_card_union(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's card union.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_card_union(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_card_union_v2 async

get_card_union_v2(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's card union (v2 path).

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
async def get_card_union_v2(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's card union (v2 path).

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_card_union_v2(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_chart_color_palettes async

get_chart_color_palettes(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's chart color palettes.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
async def get_chart_color_palettes(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's chart color palettes.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_chart_color_palettes(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_content_details async

get_content_details(
    subscriber_domain: str,
    debug_api: bool = False,
    debug_num_stacks_to_drop: int = 2,
    session: AsyncClient | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Map this publication's content to the subscriber's copies.

Sets subscriber_content_id and subscriber_insance on each content item.

Parameters:

Name Type Description Default
subscriber_domain str

Subscriber instance domain; .domo.com is appended if missing.

required
debug_api bool

Enable API debug logging.

False
debug_num_stacks_to_drop int

Stack frames to drop in debug output.

2
session AsyncClient | None

Optional shared HTTP client.

None
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The content-details response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
async def get_content_details(
    self,
    subscriber_domain: str,  # must include .domo.com
    debug_api: bool = False,
    debug_num_stacks_to_drop: int = 2,
    session: httpx.AsyncClient | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Map this publication's content to the subscriber's copies.

    Sets ``subscriber_content_id`` and ``subscriber_insance`` on each content item.

    Args:
        subscriber_domain: Subscriber instance domain; ``.domo.com`` is appended if missing.
        debug_api: Enable API debug logging.
        debug_num_stacks_to_drop: Stack frames to drop in debug output.
        session: Optional shared HTTP client.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The content-details response.
    """
    if not subscriber_domain.lower().endswith(".domo.com"):
        subscriber_domain = f"{subscriber_domain}.domo.com"

    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=debug_num_stacks_to_drop,
        **context_kwargs,
    )

    res = await publish_routes.get_subscriber_content_details(
        auth=self.auth,
        publication_id=self.id,
        subscriber_instance=subscriber_domain,
        context=context,
    )

    publication_content = self.content

    for content in publication_content:
        subscriber_obj = next(
            (
                subscriber_obj
                for subscriber_obj in res.response
                if subscriber_obj["publisherObjectId"] == content.entity_id
                and subscriber_obj["contentType"] == content.entity_type
            ),
            None,
        )
        if subscriber_obj is not None:
            content.subscriber_content_id = subscriber_obj["subscriberObjectId"]
            content.subscriber_insance = subscriber_obj["subscriberDomain"]

    self.content = publication_content

    return res

get_custom_map async

get_custom_map(
    custom_map_name: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's custom map.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
custom_map_name str

Name of the custom map.

required
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
async def get_custom_map(
    self,
    custom_map_name: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's custom map.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        custom_map_name: Name of the custom map.
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_custom_map(
        auth=self.auth,
        publication_id=self.id,
        custom_map_name=custom_map_name,
        timeout=timeout,
        context=context,
    )

get_custom_roles async

get_custom_roles(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's custom roles.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
async def get_custom_roles(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's custom roles.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_custom_roles(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_datasource async

get_datasource(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's data source info.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
async def get_datasource(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's data source info.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_datasource(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_doc_preview_file async

get_doc_preview_file(
    data_file_id: str,
    revision_id: str,
    image_type: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's doc card preview file.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
data_file_id str

ID of the doc card's data file.

required
revision_id str

Revision of the data file.

required
image_type str

Preview image type.

required
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
async def get_doc_preview_file(
    self,
    data_file_id: str,
    revision_id: str,
    image_type: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's doc card preview file.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        data_file_id: ID of the doc card's data file.
        revision_id: Revision of the data file.
        image_type: Preview image type.
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_doc_preview_file(
        auth=self.auth,
        publication_id=self.id,
        data_file_id=data_file_id,
        revision_id=revision_id,
        image_type=image_type,
        timeout=timeout,
        context=context,
    )

get_doc_preview_metadata async

get_doc_preview_metadata(
    data_file_id: str,
    revision_id: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's doc card preview metadata.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
data_file_id str

ID of the doc card's data file.

required
revision_id str

Revision of the data file.

required
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
async def get_doc_preview_metadata(
    self,
    data_file_id: str,
    revision_id: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's doc card preview metadata.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        data_file_id: ID of the doc card's data file.
        revision_id: Revision of the data file.
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_doc_preview_metadata(
        auth=self.auth,
        publication_id=self.id,
        data_file_id=data_file_id,
        revision_id=revision_id,
        timeout=timeout,
        context=context,
    )

get_email_configs async

get_email_configs(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's email configuration.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
async def get_email_configs(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's email configuration.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_email_configs(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_embed_content async

get_embed_content(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's embed content details.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
async def get_embed_content(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's embed content details.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_embed_content(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_entity_by_id async classmethod

get_entity_by_id(
    entity_id: str, **kwargs: Any
) -> DomoPublication | ResponseGetData

Get a publication by ID (generic entity entry point).

Parameters:

Name Type Description Default
entity_id str

Publication ID.

required
**kwargs Any

Forwarded to get_by_id.

{}

Returns:

Type Description
DomoPublication | ResponseGetData

The publication, or the raw response when return_raw is True.

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
386
387
388
389
390
391
392
393
394
395
396
397
398
399
@classmethod
async def get_entity_by_id(
    cls, entity_id: str, **kwargs: Any
) -> DomoPublication | rgd.ResponseGetData:
    """Get a publication by ID (generic entity entry point).

    Args:
        entity_id: Publication ID.
        **kwargs: Forwarded to ``get_by_id``.

    Returns:
        The publication, or the raw response when ``return_raw`` is True.
    """
    return await cls.get_by_id(publication_id=entity_id, **kwargs)

get_file async

get_file(
    data_file_id: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's data file.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
data_file_id str

ID of the data file.

required
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
async def get_file(
    self,
    data_file_id: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's data file.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        data_file_id: ID of the data file.
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_file(
        auth=self.auth,
        publication_id=self.id,
        data_file_id=data_file_id,
        timeout=timeout,
        context=context,
    )

get_file_details async

get_file_details(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's file details.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
async def get_file_details(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's file details.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_file_details(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_filter_view async

get_filter_view(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's filter view.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
async def get_filter_view(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's filter view.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_filter_view(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_form_definition async

get_form_definition(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's form definition.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
async def get_form_definition(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's form definition.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_form_definition(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_history async

get_history(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's history.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishStatus_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
async def get_history(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's history.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishStatus_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_history(
        auth=self.auth,
        publication_id=self.id,
        context=context,
    )

get_orchestration_entity async

get_orchestration_entity(
    entity_type: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's content orchestration entity.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
entity_type str

Content entity type to orchestrate.

required
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
async def get_orchestration_entity(
    self,
    entity_type: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's content orchestration entity.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        entity_type: Content entity type to orchestrate.
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_orchestration_entity(
        auth=self.auth,
        publication_id=self.id,
        entity_type=entity_type,
        timeout=timeout,
        context=context,
    )

get_org_templates async

get_org_templates(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's org templates.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
async def get_org_templates(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's org templates.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_org_templates(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_page async

get_page(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's page (with layout).

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
async def get_page(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's page (with layout).

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_page(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_page_embed async

get_page_embed(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's page embed details.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
async def get_page_embed(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's page embed details.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_page_embed(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_page_navigations async

get_page_navigations(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's page navigations.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
async def get_page_navigations(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's page navigations.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_page_navigations(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_publisher_entity_for_subscriber async

get_publisher_entity_for_subscriber(
    subscriber_entity: Any,
    subscriber_domain: str,
    *,
    include_indirect: bool = True,
    context: RouteContext | None = None,
    **context_kwargs,
) -> Any

Get publisher entity with automatic direct/indirect resolution.

Handles: - Direct publication (entity in publication content) - Indirect publication (cards on published pages) - Multi-page publications - App Studio caveats

Parameters:

Name Type Description Default
subscriber_entity Any

Subscriber-side entity

required
subscriber_domain str

Subscriber instance domain

required
include_indirect bool

Enable indirect resolution (cards on pages)

True
context RouteContext | None

Route context

None
**context_kwargs

Additional context args

{}

Returns:

Type Description
Any

Publisher entity or None if not found

Raises:

Type Description
NotImplementedError

If App Studio indirect resolution attempted

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
async def get_publisher_entity_for_subscriber(  # noqa: C901
    self,
    subscriber_entity: Any,  # DomoEntity_w_Lineage
    subscriber_domain: str,
    *,
    include_indirect: bool = True,
    context: RouteContext | None = None,
    **context_kwargs,
) -> Any:  # DomoCard, DomoDataset, DomoPage
    """Get publisher entity with automatic direct/indirect resolution.

    Handles:
    - Direct publication (entity in publication content)
    - Indirect publication (cards on published pages)
    - Multi-page publications
    - App Studio caveats

    Args:
        subscriber_entity: Subscriber-side entity
        subscriber_domain: Subscriber instance domain
        include_indirect: Enable indirect resolution (cards on pages)
        context: Route context
        **context_kwargs: Additional context args

    Returns:
        Publisher entity or None if not found

    Raises:
        NotImplementedError: If App Studio indirect resolution attempted
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    # Check cache first
    cache_key = f"{subscriber_entity.entity_type}:{subscriber_entity.id}"
    cache = self.raw.setdefault("_indirect_resolution_cache", {})

    if cache_key in cache:
        return cache[cache_key]

    # Get content mapping
    res = await self.get_content_details(
        subscriber_domain=subscriber_domain,
        context=context,
    )

    # Try direct match (normalize dataset content type aliases)
    normalized_entity_type = (subscriber_entity.entity_type or "").upper()
    acceptable_content_types = {normalized_entity_type}
    # entity_type is now consistently "DATA_SOURCE" (not "DATASET"),
    # but the API may return either value, so accept both aliases
    if normalized_entity_type in ("DATA_SOURCE", "DATASET"):
        acceptable_content_types.update({"DATA_SOURCE", "DATASET"})

    direct_match = next(
        (
            row
            for row in res.response
            if str(row["subscriberObjectId"]) == str(subscriber_entity.id)
            and (row.get("contentType") or "").upper() in acceptable_content_types
        ),
        None,
    )

    if direct_match:
        # Direct publication - simple case
        publisher_obj_id = direct_match["publisherObjectId"]

        publisher_entity = await subscriber_entity.get_entity_by_id(
            entity_id=publisher_obj_id, auth=self.auth
        )

        cache[cache_key] = publisher_entity
        return publisher_entity

    # No direct match - try indirect resolution if enabled
    if not include_indirect:
        return None

    if subscriber_entity.entity_type != "CARD":
        # Only cards can be indirectly published (via pages)
        return None

    # Find PAGE entries in publication
    page_contents = [c for c in self.content if c.entity_type == "PAGE"]

    if not page_contents:
        # Check for App Studio content
        app_contents = [
            c for c in self.content if c.entity_type in {"APP", "APP_STUDIO_APP"}
        ]
        if app_contents:
            # TODO(#XXX): Implement App Studio card resolution
            raise NotImplementedError(
                f"Indirect publication resolution for App Studio cards is not yet supported.\n"
                f"Card: {subscriber_entity.id}\n"
                f"App Studio content: {[f'{c.entity_type}:{c.entity_id}' for c in app_contents]}\n"
                f"See GitHub issue for tracking."
            )
        return None

    # Prefer mapping by subscriber page IDs when resolving cards
    from ..DomoPage import DomoPage

    subscriber_page_ids: list[str] = []
    if subscriber_entity.Lineage:
        try:
            dependents = await subscriber_entity.Lineage._get_immediate_dependents(
                context=context
            )
            for link in dependents:
                if link.type != "PAGE":
                    continue
                if link.entity is None:
                    link.entity = await link.get_entity(context=context)
                if link.entity:
                    subscriber_page_ids.append(str(link.entity.id))
        except dmde.DomoError:
            subscriber_page_ids = []

    # If we know subscriber pages, narrow to matching published pages
    page_mappings = []
    if subscriber_page_ids:
        page_mappings = [
            row
            for row in res.response
            if row.get("contentType") == "PAGE"
            and str(row.get("subscriberObjectId")) in subscriber_page_ids
        ]

    if page_mappings:
        for row in page_mappings:
            publisher_page = await DomoPage.get_by_id(
                auth=self.auth,
                page_id=row.get("publisherObjectId"),
                context=context,
            )

            publisher_cards = await publisher_page.Layout.get_cards(context=context)

            if not publisher_cards:
                continue

            # Store cards on page for graph building (enables Page→Card edges)
            if publisher_page.Layout:
                publisher_page.Layout.cards = publisher_cards

            # Store page entity in content for graph building
            page_content_match = next(
                (
                    c
                    for c in page_contents
                    if str(c.entity_id) == str(row.get("publisherObjectId"))
                ),
                None,
            )
            if page_content_match:
                page_content_match.entity = publisher_page

            # Match by title (reliable for cards)
            matching_card = next(
                (c for c in publisher_cards if c.title == subscriber_entity.title),
                None,
            )

            if matching_card:
                cache[cache_key] = matching_card
                return matching_card

            # Fallback: single-card page heuristic
            if len(publisher_cards) == 1:
                cache[cache_key] = publisher_cards[0]
                return publisher_cards[0]

    # Fallback: Search each published page for the card (legacy heuristic)
    for page_content in page_contents:
        publisher_page = await DomoPage.get_by_id(
            auth=self.auth,
            page_id=page_content.entity_id,
            context=context,
        )

        publisher_cards = await publisher_page.Layout.get_cards(context=context)

        if not publisher_cards:
            continue

        # Store cards on page for graph building (enables Page→Card edges)
        if publisher_page.Layout:
            publisher_page.Layout.cards = publisher_cards

        # Store page entity in content for graph building
        page_content.entity = publisher_page

        # Match by title (reliable for cards)
        matching_card = next(
            (c for c in publisher_cards if c.title == subscriber_entity.title),
            None,
        )

        if matching_card:
            cache[cache_key] = matching_card
            return matching_card

        # Fallback: single-card page heuristic
        if len(publisher_cards) == 1:
            cache[cache_key] = publisher_cards[0]
            return publisher_cards[0]

    # No matching card found
    return None

get_shared_beastmode_map async

get_shared_beastmode_map(
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's data source shared Beast Mode map.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishContent_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
async def get_shared_beastmode_map(
    self,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's data source shared Beast Mode map.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishContent_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_shared_beastmode_map(
        auth=self.auth,
        publication_id=self.id,
        timeout=timeout,
        context=context,
    )

get_status async

get_status(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's status.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_PublishStatus_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
async def get_status(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's status.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_PublishStatus_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_publication_status_by_id(
        auth=self.auth,
        pub_id=self.id,
        context=context,
    )

get_variable_definition async

get_variable_definition(
    content_type: str,
    content_id: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this publication's variable definition of a piece of content.

The response body is returned untouched (its shape has not been verified against a live instance).

Parameters:

Name Type Description Default
content_type str

Type of the publication content.

required
content_id str

ID of the publication content.

required
timeout int

Request timeout in seconds.

10
context RouteContext | None

Optional route context.

None
**context_kwargs Any

Extra context settings (for example debug_api).

{}

Returns:

Type Description
ResponseGetData

The route response.

Raises:

Type Description
GET_Publish_Error

If Domo returns a non-2xx response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
async def get_variable_definition(
    self,
    content_type: str,
    content_id: str,
    timeout: int = 10,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this publication's variable definition of a piece of content.

    The response body is returned untouched (its shape has not been
    verified against a live instance).

    Args:
        content_type: Type of the publication content.
        content_id: ID of the publication content.
        timeout: Request timeout in seconds.
        context: Optional route context.
        **context_kwargs: Extra context settings (for example ``debug_api``).

    Returns:
        The route response.

    Raises:
        GET_Publish_Error: If Domo returns a non-2xx response.
    """
    context = _build_route_context(self, context, context_kwargs)

    return await publish_routes.get_variable_definition(
        auth=self.auth,
        publication_id=self.id,
        content_type=content_type,
        content_id=content_id,
        timeout=timeout,
        context=context,
    )

revoke_subscription_auth async

revoke_subscription_auth(
    auth: DomoAuth = None,
    subscription_id: str | None = None,
    subscription: DomoSubscription | None = None,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> None

Revoke a subscription's authorization (not yet supported).

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session; defaults to this publication's.

None
subscription_id str | None

Subscription ID; defaults to subscription.id.

None
subscription DomoSubscription | None

Subscription to revoke.

None
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Raises:

Type Description
NotImplementedError

Always; no revoke route exists yet.

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
async def revoke_subscription_auth(
    self,
    auth: DomoAuth = None,
    subscription_id: str | None = None,
    subscription: DomoSubscription | None = None,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> None:
    """Revoke a subscription's authorization (not yet supported).

    Args:
        auth: Authenticated Domo session; defaults to this publication's.
        subscription_id: Subscription ID; defaults to ``subscription.id``.
        subscription: Subscription to revoke.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Raises:
        NotImplementedError: Always; no revoke route exists yet.
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    # Note: This function may not have a direct route implementation
    # It would need to be implemented based on the available API endpoints
    auth = auth or self.auth
    subscription_id = subscription_id or subscription.id

    # This is a placeholder implementation - would need actual API route
    raise NotImplementedError("revoke_subscription_auth route not yet implemented")

update_publication async

update_publication(
    content_ls: list[DomoPublication_Content] | None = None,
    description: str | None = None,
    name: str | None = None,
    subscription_ls: list[DomoSubscription] | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Update this publication.

Parameters:

Name Type Description Default
content_ls list[DomoPublication_Content] | None

New content list.

None
description str | None

New description; keeps the current one if omitted.

None
name str | None

New name; keeps the current one if omitted.

None
subscription_ls list[DomoSubscription] | None

New subscriber list.

None
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The update response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
async def update_publication(
    self,
    content_ls: list[DomoPublication_Content] | None = None,
    description: str | None = None,
    name: str | None = None,
    subscription_ls: list[DomoSubscription] | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Update this publication.

    Args:
        content_ls: New content list.
        description: New description; keeps the current one if omitted.
        name: New name; keeps the current one if omitted.
        subscription_ls: New subscriber list.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The update response.
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    # Use the actual available route
    if not isinstance(subscription_ls, list) and subscription_ls:
        subscription_ls = [subscription_ls]

    domain_ls = []
    content_json_ls = []

    if subscription_ls:
        for sub in subscription_ls:
            domain_ls.append(sub.subscriber_domain)

    if content_ls:
        for content_item in content_ls:
            content_json_ls.append(content_item.to_api_json())

    body = publish_routes.generate_publish_body(
        url=f"{self.auth.domo_instance}.domo.com",
        sub_domain_ls=domain_ls,
        content_ls=content_json_ls,
        name=name or self.name,
        unique_id=self.id,
        description=description or self.description,
        is_new=False,
    )

    context = RouteContext.build_context(context=context, **context_kwargs)

    res = await publish_routes.update_publish_job(
        auth=self.auth,
        publication_id=self.id,
        body=body,
        context=context,
    )

    return res  # noqa: RET504

DomoPublication_Content dataclass

DomoPublication_Content(
    auth: DomoAuth,
    content_id: str,
    entity_type: str,
    entity_id: str,
    entity_domain: str,
    is_v2: bool,
    is_direct_content: bool,
    created_dt: datetime,
    updated_dt: datetime = None,
    subscriber_content_id: str = None,
    subscriber_insance: str = None,
    entity: Any = None,
    parent: Any = None,
)

A piece of publisher content (card, dataset, page, data app) in a publication.

from_dict classmethod

from_dict(
    auth: DomoAuth, obj: dict[str, Any], parent: Any = None
) -> DomoPublication_Content

Build publication content from a publication children entry.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
obj dict[str, Any]

One entry of the publication's children list.

required
parent Any

The owning publication, if known.

None

Returns:

Type Description
DomoPublication_Content

The publication content entity.

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
@classmethod
def from_dict(
    cls, auth: DomoAuth, obj: dict[str, Any], parent: Any = None
) -> DomoPublication_Content:
    """Build publication content from a publication ``children`` entry.

    Args:
        auth: Authenticated Domo session.
        obj: One entry of the publication's ``children`` list.
        parent: The owning publication, if known.

    Returns:
        The publication content entity.
    """
    entity_type = obj.get("content").get("type")
    return cls(
        auth=auth,
        content_id=obj["id"],
        entity_id=obj.get("content").get("domoObjectId"),
        entity_domain=obj.get("content").get("domain"),
        is_v2=obj.get("isV2"),
        created_dt=(
            dt.datetime.fromtimestamp(obj["created"] / 1000)
            if obj["created"]
            else None
        ),
        updated_dt=(
            dt.datetime.fromtimestamp(obj.get("content").get("updated") / 1000)
            if obj.get("content").get("updated")
            else None
        ),
        is_direct_content=obj.get("useDirectContent"),
        parent=parent,
        entity_type=entity_type,
        entity=DomoPublication_Content_Enum[entity_type].value,
    )

get_entity async

get_entity(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> Any

Get the entity behind this publication content.

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
Any

The publisher-side entity (card, dataset, page, or data app).

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
async def get_entity(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> Any:
    """Get the entity behind this publication content.

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The publisher-side entity (card, dataset, page, or data app).
    """
    if not self.entity:
        self.entity = DomoPublication_Content_Enum[self.entity_type].value

    base_context = RouteContext.build_context(
        parent_class=self.__class__.__name__,
        **context_kwargs,
    )
    context = RouteContext.build_context(context=context or base_context)

    self.entity = await self.entity.get_entity_by_id(
        auth=self.auth,
        entity_id=self.entity_id,
        context=context,
    )

    return self.entity

to_api_json

to_api_json() -> dict[str, Any]

Serialize this content for a publish create/update request body.

Returns:

Type Description
dict[str, Any]

The content descriptor expected by the publish API.

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
207
208
209
210
211
212
213
214
215
216
217
218
def to_api_json(self) -> dict[str, Any]:
    """Serialize this content for a publish create/update request body.

    Returns:
        The content descriptor expected by the publish API.
    """
    return {
        "domain": self.entity_domain,
        "domoObjectId": self.entity_id,
        "customerId": self.entity_domain,
        "type": self.entity_type,
    }

DomoPublication_Content_Enum

Bases: DomoEnumMixin, Enum

Maps a publication content type name to the entity class that models it.

DomoPublication_UnexpectedContentType

DomoPublication_UnexpectedContentType(
    cls_instance: Any, content_type: str
)

Bases: ClassError

Raised when a publication holds a content type the library does not model.

Build the error for an unexpected content type.

Parameters:

Name Type Description Default
cls_instance Any

The publication that holds the content.

required
content_type str

The unrecognized content type name.

required
Source code in src/crew_dcs/classes/DomoEverywhere/core.py
224
225
226
227
228
229
230
231
232
233
234
def __init__(self, cls_instance: Any, content_type: str) -> None:
    """Build the error for an unexpected content type.

    Args:
        cls_instance: The publication that holds the content.
        content_type: The unrecognized content type name.
    """
    super().__init__(
        cls_instance=cls_instance,
        message=f"DomoPublication_Instantiation: Unexpected content type {content_type}",
    )

DomoSubscription dataclass

DomoSubscription(
    auth: DomoAuth,
    id: str,
    raw: dict,
    publication_id: str,
    subscriber_domain: str,
    publisher_domain: str,
    parent_publication: DomoPublication = None,
    created_dt: datetime | None = None,
    _name: str | None = None,
)

Bases: DomoEntity_w_Lineage

A subscription: an instance that a publication is sent to.

display_url property

display_url: str

URL of the subscriptions page in the Domo admin UI.

name property

name: str

Get subscription name.

Priority: 1. Name from API response (if available) 2. Parent publication name (no extra API call if already loaded) 3. Fallback to "Subscription"

from_dict classmethod

from_dict(
    auth: DomoAuth,
    obj: dict[str, Any],
    parent_publication: Any = None,
) -> DomoSubscription

Build a subscription from an API payload.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
obj dict[str, Any]

The subscription payload.

required
parent_publication Any

The owning publication, if known.

None

Returns:

Type Description
DomoSubscription

The subscription entity.

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
@classmethod
def from_dict(
    cls, auth: DomoAuth, obj: dict[str, Any], parent_publication: Any = None
) -> DomoSubscription:
    """Build a subscription from an API payload.

    Args:
        auth: Authenticated Domo session.
        obj: The subscription payload.
        parent_publication: The owning publication, if known.

    Returns:
        The subscription entity.
    """
    return cls(
        auth=auth,
        id=obj.get("id") or obj.get("subscriptionId"),
        publication_id=obj["publicationId"],
        subscriber_domain=obj.get("domain") or obj.get("subscriberDomain"),
        publisher_domain=obj.get("publisherDomain"),
        created_dt=(
            (dt.datetime.fromtimestamp(obj.get("created") / 1000))
            if obj.get("created")
            else None
        ),
        _name=obj.get("name"),  # Extract name from API if available
        raw=obj,
        parent_publication=parent_publication,
    )

get_by_id async classmethod

get_by_id(
    auth: DomoAuth,
    subscription_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> DomoSubscription | ResponseGetData

Get a subscription by ID.

Parameters:

Name Type Description Default
auth DomoAuth

Authenticated Domo session.

required
subscription_id str

Subscription ID.

required
return_raw bool

If True, return the raw response instead of an entity.

False
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
DomoSubscription | ResponseGetData

The subscription, or the raw response when return_raw is True.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
@classmethod
async def get_by_id(
    cls,
    auth: DomoAuth,
    subscription_id: str,
    return_raw: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> DomoSubscription | rgd.ResponseGetData:
    """Get a subscription by ID.

    Args:
        auth: Authenticated Domo session.
        subscription_id: Subscription ID.
        return_raw: If True, return the raw response instead of an entity.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The subscription, or the raw response when ``return_raw`` is True.
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    res = await publish_routes.get_subscription_by_id(
        auth=auth,
        subscription_id=subscription_id,
        context=context,
    )

    if return_raw:
        return res

    return cls.from_dict(auth=auth, obj=res.response)

get_content_details async

get_content_details(
    parent_auth: DomoAuth | None = None,
    parent_auth_retrieval_fn: Callable | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> list[DomoPublication_Content]

Map the parent publication's content to this subscriber's copies.

Parameters:

Name Type Description Default
parent_auth DomoAuth | None

Auth for the publisher instance.

None
parent_auth_retrieval_fn Callable | None

Callable returning publisher auth given the publisher domain; used when parent_auth is omitted.

None
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
list[DomoPublication_Content]

The publication content, updated with subscriber-side IDs.

Raises:

Type Description
DomoSubscription_NoParent

If the parent publication cannot be retrieved.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
async def get_content_details(
    self,
    parent_auth: DomoAuth | None = None,
    parent_auth_retrieval_fn: Callable | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> list[DomoPublication_Content]:
    """Map the parent publication's content to this subscriber's copies.

    Args:
        parent_auth: Auth for the publisher instance.
        parent_auth_retrieval_fn: Callable returning publisher auth given the
            publisher domain; used when ``parent_auth`` is omitted.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The publication content, updated with subscriber-side IDs.

    Raises:
        DomoSubscription_NoParent: If the parent publication cannot be retrieved.
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    if not self.parent_publication:
        await self.get_parent_publication(
            parent_auth=parent_auth,
            parent_auth_retrieval_fn=parent_auth_retrieval_fn,
            context=context,
        )

    if not self.parent_publication:
        raise DomoSubscription_NoParent(self)

    publication_content = self.parent_publication.content

    res = await publish_routes.get_subscriber_content_details(
        auth=self.parent_publication.auth,
        publication_id=self.publication_id,
        subscriber_instance=self.subscriber_domain,
        context=context,
    )

    for content in publication_content:
        subscriber_obj = next(
            (
                subscriber_obj
                for subscriber_obj in res.response
                if subscriber_obj["publisherObjectId"] == content.entity_id
                and subscriber_obj["contentType"] == content.entity_type
            ),
            None,
        )
        if subscriber_obj is not None:
            content.subscriber_content_id = subscriber_obj["subscriberObjectId"]
            content.subscriber_insance = subscriber_obj["subscriberDomain"]

    # Return the updated publication content
    return publication_content

get_entity_by_id async classmethod

get_entity_by_id(
    entity_id: str, auth: DomoAuth, **kwargs: Any
) -> DomoSubscription | ResponseGetData

Get a subscription by ID (generic entity entry point).

Parameters:

Name Type Description Default
entity_id str

Subscription ID.

required
auth DomoAuth

Authenticated Domo session.

required
**kwargs Any

Forwarded to get_by_id.

{}

Returns:

Type Description
DomoSubscription | ResponseGetData

The subscription, or the raw response when return_raw is True.

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
@classmethod
async def get_entity_by_id(
    cls, entity_id: str, auth: DomoAuth, **kwargs: Any
) -> DomoSubscription | rgd.ResponseGetData:
    """Get a subscription by ID (generic entity entry point).

    Args:
        entity_id: Subscription ID.
        auth: Authenticated Domo session.
        **kwargs: Forwarded to ``get_by_id``.

    Returns:
        The subscription, or the raw response when ``return_raw`` is True.
    """
    return await cls.get_by_id(subscription_id=entity_id, auth=auth, **kwargs)

get_parent_publication async

get_parent_publication(
    parent_auth: DomoAuth | None = None,
    parent_auth_retrieval_fn: Callable | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> DomoPublication

Get the publication this subscription belongs to.

Parameters:

Name Type Description Default
parent_auth DomoAuth | None

Auth for the publisher instance.

None
parent_auth_retrieval_fn Callable | None

Callable returning publisher auth given the publisher domain (sync or async); used when parent_auth is omitted.

None
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
DomoPublication

The parent publication (also stored on parent_publication).

Raises:

Type Description
DomoSubscription_NoParentAuth

If no publisher auth can be resolved.

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
async def get_parent_publication(
    self,
    parent_auth: DomoAuth | None = None,
    parent_auth_retrieval_fn: Callable | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> DomoPublication:
    """Get the publication this subscription belongs to.

    Args:
        parent_auth: Auth for the publisher instance.
        parent_auth_retrieval_fn: Callable returning publisher auth given the
            publisher domain (sync or async); used when ``parent_auth`` is omitted.
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The parent publication (also stored on ``parent_publication``).

    Raises:
        DomoSubscription_NoParentAuth: If no publisher auth can be resolved.
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    if not parent_auth and parent_auth_retrieval_fn:
        auth_or_coro = parent_auth_retrieval_fn(self.publisher_domain)
        if inspect.isawaitable(auth_or_coro):
            parent_auth = await auth_or_coro  # type: ignore[assignment]
        else:
            parent_auth = auth_or_coro

    if not parent_auth:
        raise DomoSubscription_NoParentAuth(self)

    self.parent_publication = await DomoPublication.get_by_id(
        publication_id=self.publication_id,
        auth=parent_auth,
        context=context,
    )

    return self.parent_publication

get_share async

get_share(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this subscription's share.

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
async def get_share(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this subscription's share.

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    return await publish_routes.get_subscription_share(
        auth=self.auth,
        subscription_id=self.id,
        context=context,
    )

get_share_groups async

get_share_groups(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get the groups this subscription is shared with.

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
async def get_share_groups(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get the groups this subscription is shared with.

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    return await publish_routes.get_subscription_share_groups(
        auth=self.auth,
        subscription_id=self.id,
        context=context,
    )

get_with_share async

get_with_share(
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> ResponseGetData

Get this subscription together with its share.

Parameters:

Name Type Description Default
context RouteContext | None

Optional pre-built route context.

None
**context_kwargs Any

Extra context overrides.

{}

Returns:

Type Description
ResponseGetData

The API response.

Calls route

Source code in src/crew_dcs/classes/DomoEverywhere/core.py
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
async def get_with_share(
    self,
    *,
    context: RouteContext | None = None,
    **context_kwargs: Any,
) -> rgd.ResponseGetData:
    """Get this subscription together with its share.

    Args:
        context: Optional pre-built route context.
        **context_kwargs: Extra context overrides.

    Returns:
        The API response.
    """
    context = RouteContext.build_context(context=context, **context_kwargs)

    return await publish_routes.get_subscription_with_share(
        auth=self.auth,
        subscription_id=self.id,
        context=context,
    )

DomoSubscription_NoParent

DomoSubscription_NoParent(cls_instance: Any)

Bases: ClassError

Raised when a subscription's parent publication cannot be retrieved.

Build the error for a subscription with no retrievable parent.

Parameters:

Name Type Description Default
cls_instance Any

The subscription whose parent publication is missing.

required
Source code in src/crew_dcs/classes/DomoEverywhere/core.py
81
82
83
84
85
86
87
88
89
90
91
def __init__(self, cls_instance: Any) -> None:
    """Build the error for a subscription with no retrievable parent.

    Args:
        cls_instance: The subscription whose parent publication is missing.
    """
    super().__init__(
        cls_instance=cls_instance,
        entity_id="subscription_id",
        message="unable to retrieve parent publication",
    )

DomoSubscription_NoParentAuth

DomoSubscription_NoParentAuth(cls_instance: Any)

Bases: ClassError

Raised when a subscription has no parent-instance auth to reach its publication.

Build the error for a subscription that lacks parent auth.

Parameters:

Name Type Description Default
cls_instance Any

The subscription that needs parent auth.

required
Source code in src/crew_dcs/classes/DomoEverywhere/core.py
65
66
67
68
69
70
71
72
73
74
75
def __init__(self, cls_instance: Any) -> None:
    """Build the error for a subscription that lacks parent auth.

    Args:
        cls_instance: The subscription that needs parent auth.
    """
    super().__init__(
        cls_instance=cls_instance,
        entity_id="subscription_id",
        message="must pass parent_auth or parent_auth_retrieval_fn which returns an instance of auth given self",
    )