@proveanything/smartlinks 2.2.0 → 3.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +741 -754
- package/dist/README.md +573 -573
- package/dist/adminCardsView.js +55 -55
- package/dist/api/adminCards.d.ts +8 -0
- package/dist/api/adminCards.js +9 -1
- package/dist/api/ai.d.ts +22 -11
- package/dist/api/ai.js +18 -14
- package/dist/api/analytics.d.ts +13 -0
- package/dist/api/analytics.js +13 -0
- package/dist/api/appConfiguration.d.ts +17 -14
- package/dist/api/appConfiguration.js +14 -12
- package/dist/api/appObjects.d.ts +80 -16
- package/dist/api/appObjects.js +74 -11
- package/dist/api/asset.d.ts +55 -19
- package/dist/api/asset.js +52 -32
- package/dist/api/attestation.d.ts +3 -2
- package/dist/api/attestation.js +1 -1
- package/dist/api/attestations.d.ts +22 -7
- package/dist/api/attestations.js +22 -7
- package/dist/api/authKit.d.ts +22 -5
- package/dist/api/authKit.js +21 -4
- package/dist/api/batch.d.ts +23 -16
- package/dist/api/batch.js +19 -13
- package/dist/api/bookings.d.ts +45 -9
- package/dist/api/bookings.js +39 -3
- package/dist/api/broadcasts.d.ts +26 -6
- package/dist/api/broadcasts.js +22 -2
- package/dist/api/claimSet.d.ts +48 -13
- package/dist/api/claimSet.js +43 -7
- package/dist/api/collection.d.ts +20 -6
- package/dist/api/collection.js +19 -8
- package/dist/api/comms.d.ts +43 -12
- package/dist/api/comms.js +43 -13
- package/dist/api/conditions.d.ts +12 -2
- package/dist/api/conditions.js +10 -1
- package/dist/api/config.d.ts +15 -2
- package/dist/api/config.js +12 -0
- package/dist/api/contact.d.ts +34 -13
- package/dist/api/contact.js +35 -10
- package/dist/api/containers.d.ts +41 -23
- package/dist/api/containers.js +37 -21
- package/dist/api/crate.d.ts +9 -8
- package/dist/api/crate.js +8 -8
- package/dist/api/dpp.d.ts +58 -10
- package/dist/api/dpp.js +57 -15
- package/dist/api/facets.d.ts +71 -0
- package/dist/api/facets.js +71 -0
- package/dist/api/files.d.ts +11 -5
- package/dist/api/files.js +9 -1
- package/dist/api/form.d.ts +9 -2
- package/dist/api/form.js +7 -1
- package/dist/api/index.d.ts +0 -1
- package/dist/api/index.js +0 -1
- package/dist/api/integrations.d.ts +82 -27
- package/dist/api/integrations.js +63 -7
- package/dist/api/interactions.d.ts +42 -6
- package/dist/api/interactions.js +41 -5
- package/dist/api/jobs.d.ts +9 -2
- package/dist/api/jobs.js +6 -0
- package/dist/api/journeys.d.ts +13 -2
- package/dist/api/journeys.js +10 -1
- package/dist/api/journeysAnalytics.d.ts +12 -3
- package/dist/api/journeysAnalytics.js +9 -1
- package/dist/api/knowledge.d.ts +43 -10
- package/dist/api/knowledge.js +37 -5
- package/dist/api/location.d.ts +10 -3
- package/dist/api/location.js +7 -1
- package/dist/api/lots.d.ts +40 -13
- package/dist/api/lots.js +38 -8
- package/dist/api/loyalty.d.ts +70 -12
- package/dist/api/loyalty.js +60 -3
- package/dist/api/nfc.d.ts +8 -2
- package/dist/api/nfc.js +6 -1
- package/dist/api/order.d.ts +51 -160
- package/dist/api/order.js +46 -208
- package/dist/api/partner.d.ts +41 -8
- package/dist/api/partner.js +36 -4
- package/dist/api/products.d.ts +41 -8
- package/dist/api/products.js +33 -4
- package/dist/api/proof.d.ts +50 -13
- package/dist/api/proof.js +43 -7
- package/dist/api/realtime.d.ts +1 -11
- package/dist/api/realtime.js +1 -22
- package/dist/api/secrets.d.ts +25 -5
- package/dist/api/secrets.js +21 -2
- package/dist/api/segments.d.ts +26 -6
- package/dist/api/segments.js +22 -2
- package/dist/api/serviceAccounts.d.ts +8 -1
- package/dist/api/serviceAccounts.js +8 -1
- package/dist/api/shop.d.ts +41 -13
- package/dist/api/shop.js +35 -4
- package/dist/api/subscriptions.d.ts +47 -12
- package/dist/api/subscriptions.js +40 -4
- package/dist/api/tags.d.ts +40 -19
- package/dist/api/tags.js +38 -18
- package/dist/api/template.d.ts +31 -3
- package/dist/api/template.js +27 -0
- package/dist/api/translations.d.ts +17 -2
- package/dist/api/translations.js +14 -0
- package/dist/api/userGroups.d.ts +35 -9
- package/dist/api/userGroups.js +30 -5
- package/dist/api/variant.d.ts +11 -3
- package/dist/api/variant.js +9 -2
- package/dist/api/wallet.d.ts +23 -10
- package/dist/api/wallet.js +20 -2
- package/dist/apiVersion.d.ts +1 -1
- package/dist/apiVersion.js +1 -1
- package/dist/baseline.css +194 -194
- package/dist/docs/API_SUMMARY.md +1389 -2298
- package/dist/docs/PRODUCT_FACETS_SDK.md +10 -15
- package/dist/docs/admin-cards.md +189 -189
- package/dist/docs/admin-lists-and-pickers.md +1 -1
- package/dist/docs/agent-tools.md +156 -156
- package/dist/docs/ai-tools-and-skills.md +180 -180
- package/dist/docs/ai.md +1721 -1721
- package/dist/docs/analytics.md +3 -2
- package/dist/docs/api-versions.md +85 -76
- package/dist/docs/app-data-storage.md +277 -277
- package/dist/docs/app-docs.md +73 -73
- package/dist/docs/app-manifest.md +852 -852
- package/dist/docs/app-objects.md +38 -50
- package/dist/docs/app-records-pattern.md +388 -388
- package/dist/docs/appConfig.md +550 -550
- package/dist/docs/assets.md +17 -3
- package/dist/docs/assistant-apps.md +172 -172
- package/dist/docs/assistant-context.md +119 -119
- package/dist/docs/attestations.md +5 -4
- package/dist/docs/auth-kit.md +1 -1
- package/dist/docs/bookings.md +442 -442
- package/dist/docs/comms.md +689 -686
- package/dist/docs/connectors.md +340 -340
- package/dist/docs/contact-search.md +4 -3
- package/dist/docs/container-tracking.md +7 -7
- package/dist/docs/css-baseline.md +133 -133
- package/dist/docs/customer-guide.md +70 -70
- package/dist/docs/deploying-apps.md +340 -340
- package/dist/docs/dpp.md +115 -115
- package/dist/docs/entitlements.md +90 -90
- package/dist/docs/executor.md +1 -1
- package/dist/docs/files.md +69 -69
- package/dist/docs/forms.md +1 -1
- package/dist/docs/headless-providers.md +3 -3
- package/dist/docs/host-dependency-contract.md +252 -210
- package/dist/docs/i18n.md +9 -9
- package/dist/docs/integrations.md +322 -322
- package/dist/docs/interactions.md +544 -545
- package/dist/docs/item-context.md +181 -181
- package/dist/docs/knowledge.md +105 -102
- package/dist/docs/lists.md +114 -0
- package/dist/docs/lots.md +112 -111
- package/dist/docs/loyalty.md +348 -352
- package/dist/docs/members.md +183 -183
- package/dist/docs/memberships.md +150 -149
- package/dist/docs/mobile-admin-container.md +693 -693
- package/dist/docs/operations.md +281 -281
- package/dist/docs/overview.md +485 -485
- package/dist/docs/proof-claiming-methods.md +6 -6
- package/dist/docs/proof-comms-triggers.md +142 -142
- package/dist/docs/proof-ownership-transfer.md +155 -155
- package/dist/docs/proof-product-data-scoping.md +462 -462
- package/dist/docs/proof-share-grants.md +305 -305
- package/dist/docs/realtime.md +139 -138
- package/dist/docs/records-admin-pattern.md +304 -304
- package/dist/docs/server-functions.md +2 -2
- package/dist/docs/service-accounts.md +64 -64
- package/dist/docs/shop.md +4 -2
- package/dist/docs/site-seo.md +2 -1
- package/dist/docs/standard-query.md +187 -187
- package/dist/docs/tag-codes.md +97 -97
- package/dist/docs/tag-ranges.md +106 -106
- package/dist/docs/theme-tokens.md +252 -252
- package/dist/docs/translations.md +6 -1
- package/dist/docs/upgrading-to-3.md +430 -0
- package/dist/docs/user-groups.md +4 -4
- package/dist/docs/utils.md +1 -1
- package/dist/docs/wallet-passes.md +107 -107
- package/dist/docs/websites.md +123 -123
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +2 -2
- package/dist/http.d.ts +15 -2
- package/dist/http.js +60 -2
- package/dist/index.d.ts +7 -8
- package/dist/index.js +2 -0
- package/dist/list.d.ts +24 -0
- package/dist/list.js +80 -0
- package/dist/mobile-admin/types.d.ts +0 -16
- package/dist/openapi.yaml +290 -2723
- package/dist/shared-dependencies.d.ts +3 -3
- package/dist/shared-dependencies.js +13 -5
- package/dist/site.d.ts +1 -7
- package/dist/site.js +1 -14
- package/dist/theme-boot.js +82 -82
- package/dist/theme.css +75 -75
- package/dist/types/adminCards.d.ts +6 -3
- package/dist/types/ai.d.ts +0 -6
- package/dist/types/analytics.d.ts +5 -8
- package/dist/types/appManifest.d.ts +4 -5
- package/dist/types/appObjects.d.ts +14 -18
- package/dist/types/appObjects.js +0 -1
- package/dist/types/appOptions.d.ts +18 -0
- package/dist/types/asset.d.ts +3 -22
- package/dist/types/attestations.d.ts +7 -10
- package/dist/types/batch.d.ts +6 -14
- package/dist/types/bookings.d.ts +22 -4
- package/dist/types/broadcasts.d.ts +5 -13
- package/dist/types/broadcasts.js +0 -1
- package/dist/types/claimSet.d.ts +0 -5
- package/dist/types/comms.d.ts +11 -9
- package/dist/types/contact.d.ts +5 -29
- package/dist/types/contact.js +0 -13
- package/dist/types/containers.d.ts +15 -26
- package/dist/types/crate.d.ts +4 -12
- package/dist/types/dpp.d.ts +3 -3
- package/dist/types/dpp.js +0 -1
- package/dist/types/error.d.ts +8 -5
- package/dist/types/error.js +12 -5
- package/dist/types/facets.d.ts +15 -15
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/integrations.d.ts +3 -28
- package/dist/types/interaction.d.ts +3 -9
- package/dist/types/jobs.d.ts +3 -8
- package/dist/types/jobs.js +0 -1
- package/dist/types/journeys.d.ts +3 -8
- package/dist/types/journeys.js +0 -1
- package/dist/types/journeysAnalytics.d.ts +0 -1
- package/dist/types/list.d.ts +24 -0
- package/dist/types/list.js +2 -0
- package/dist/types/location.d.ts +0 -4
- package/dist/types/lots.d.ts +0 -9
- package/dist/types/loyalty.d.ts +0 -9
- package/dist/types/order.d.ts +7 -134
- package/dist/types/product.d.ts +11 -24
- package/dist/types/proof.d.ts +16 -0
- package/dist/types/realtime.d.ts +0 -29
- package/dist/types/segments.d.ts +5 -13
- package/dist/types/segments.js +0 -1
- package/dist/types/serviceAccounts.d.ts +3 -2
- package/dist/types/serviceAccounts.js +0 -1
- package/dist/types/shop.d.ts +5 -12
- package/dist/types/shop.js +0 -4
- package/dist/types/subscriptions.d.ts +18 -0
- package/dist/types/subscriptions.js +0 -8
- package/dist/types/tags.d.ts +6 -16
- package/dist/types/tags.js +0 -7
- package/dist/types/translations.d.ts +3 -9
- package/dist/types/variant.d.ts +0 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/API_SUMMARY.md +1389 -2298
- package/docs/PRODUCT_FACETS_SDK.md +10 -15
- package/docs/admin-cards.md +189 -189
- package/docs/admin-lists-and-pickers.md +1 -1
- package/docs/agent-tools.md +156 -156
- package/docs/ai-tools-and-skills.md +180 -180
- package/docs/ai.md +1721 -1721
- package/docs/analytics.md +3 -2
- package/docs/api-versions.md +85 -76
- package/docs/app-data-storage.md +277 -277
- package/docs/app-docs.md +73 -73
- package/docs/app-manifest.md +852 -852
- package/docs/app-objects.md +38 -50
- package/docs/app-records-pattern.md +388 -388
- package/docs/appConfig.md +550 -550
- package/docs/assets.md +17 -3
- package/docs/assistant-apps.md +172 -172
- package/docs/assistant-context.md +119 -119
- package/docs/attestations.md +5 -4
- package/docs/auth-kit.md +1 -1
- package/docs/bookings.md +442 -442
- package/docs/comms.md +689 -686
- package/docs/connectors.md +340 -340
- package/docs/contact-search.md +4 -3
- package/docs/container-tracking.md +7 -7
- package/docs/css-baseline.md +133 -133
- package/docs/customer-guide.md +70 -70
- package/docs/deploying-apps.md +340 -340
- package/docs/dpp.md +115 -115
- package/docs/entitlements.md +90 -90
- package/docs/executor.md +1 -1
- package/docs/files.md +69 -69
- package/docs/forms.md +1 -1
- package/docs/headless-providers.md +3 -3
- package/docs/host-dependency-contract.md +252 -210
- package/docs/i18n.md +9 -9
- package/docs/integrations.md +322 -322
- package/docs/interactions.md +544 -545
- package/docs/item-context.md +181 -181
- package/docs/knowledge.md +105 -102
- package/docs/lists.md +114 -0
- package/docs/lots.md +112 -111
- package/docs/loyalty.md +348 -352
- package/docs/members.md +183 -183
- package/docs/memberships.md +150 -149
- package/docs/mobile-admin-container.md +693 -693
- package/docs/operations.md +281 -281
- package/docs/overview.md +485 -485
- package/docs/proof-claiming-methods.md +6 -6
- package/docs/proof-comms-triggers.md +142 -142
- package/docs/proof-ownership-transfer.md +155 -155
- package/docs/proof-product-data-scoping.md +462 -462
- package/docs/proof-share-grants.md +305 -305
- package/docs/realtime.md +139 -138
- package/docs/server-functions.md +2 -2
- package/docs/service-accounts.md +64 -64
- package/docs/shop.md +4 -2
- package/docs/site-seo.md +2 -1
- package/docs/standard-query.md +187 -187
- package/docs/tag-codes.md +97 -97
- package/docs/tag-ranges.md +106 -106
- package/docs/theme-lookbook.v1.json +120 -120
- package/docs/theme-tokens.md +252 -252
- package/docs/translations.md +6 -1
- package/docs/upgrading-to-3.md +430 -0
- package/docs/user-groups.md +4 -4
- package/docs/utils.md +1 -1
- package/docs/wallet-passes.md +107 -107
- package/docs/websites.md +123 -123
- package/openapi.yaml +290 -2723
- package/package.json +91 -87
- package/scripts/headless-check.mjs +87 -87
- package/scripts/lib/bare-imports.mjs +57 -57
- package/scripts/lib/keyed-app-data.mjs +21 -21
- package/scripts/lib/upgrade.mjs +512 -0
- package/scripts/publish.mjs +272 -272
- package/scripts/register-release.mjs +91 -91
- package/scripts/upgrade.mjs +56 -0
- package/upgrade/3.json +2213 -0
package/dist/api/claimSet.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import { ClaimSetScope, ClaimSetRange, CreateClaimSetRangeRequest, UpdateClaimSetRangeRequest,
|
|
1
|
+
import { ClaimSetScope, ClaimSetRange, CreateClaimSetRangeRequest, UpdateClaimSetRangeRequest, ClaimSetRangeTag, ClaimSetRangeNextTag, ImportClaimSetRangeUidsRequest, ImportClaimSetRangeUidsResponse, AssignClaimSetRangeRequest, AddClaimSetRangeMemberRequest, AddClaimSetRangeMemberResponse, CloseClaimSetRangeResponse, AssignClaimSetRangeResponse, ClaimSetRangeFile, UpdateClaimDataRequest, AssignClaimsRequest, CreateClaimSetTagRequest, CreateClaimSetTagResponse, CreateClaimSetRequest, ImportClaimSetTagsRequest, ImportClaimSetTagsResponse } from "../types/index.js";
|
|
2
|
+
import type { ListResult, ListOptions } from "../types/list.js";
|
|
2
3
|
export declare namespace claimSet {
|
|
3
4
|
/**
|
|
4
|
-
* Get all claim sets.
|
|
5
|
+
* Get all claim sets. Returns `{ items, nextCursor }`: the claim sets are in `items`. The list is not
|
|
6
|
+
* paged, so `nextCursor` is always `null`.
|
|
5
7
|
* When collectionId is provided, returns claim sets for that collection.
|
|
6
8
|
* When omitted, returns all claim sets owned by the authenticated user.
|
|
7
9
|
* @param collectionId – Optional collection identifier
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const { items } = await claimSet.getAll('coll_123')
|
|
14
|
+
* ```
|
|
8
15
|
*/
|
|
9
|
-
function getAll(collectionId?: string): Promise<any
|
|
16
|
+
function getAll(collectionId?: string): Promise<ListResult<any>>;
|
|
10
17
|
/**
|
|
11
18
|
* Get a specific claim set by ID.
|
|
12
19
|
* @param claimSetId – The claim set identifier
|
|
@@ -35,17 +42,27 @@ export declare namespace claimSet {
|
|
|
35
42
|
*/
|
|
36
43
|
function remove(claimSetId: string, collectionId?: string): Promise<any>;
|
|
37
44
|
/**
|
|
38
|
-
* Get all tags for a claim set (including data).
|
|
45
|
+
* Get all tags for a claim set (including data). This is not one of the SDK 3 lists: the answer is the
|
|
46
|
+
* claim set itself with its tags inside. Without a collectionId (your own claim set) they are in `tags`;
|
|
47
|
+
* with one they are in `codes` (the tag ids), or in `codeMap` (id → key) for a secure set.
|
|
39
48
|
* @param claimSetId – The claim set identifier
|
|
40
49
|
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
41
50
|
*/
|
|
42
51
|
function getAllTags(claimSetId: string, collectionId?: string): Promise<any>;
|
|
43
52
|
/**
|
|
44
|
-
* Get assigned tags for a claim set — tags soft-assigned to a collection or product.
|
|
53
|
+
* Get assigned tags for a claim set — tags soft-assigned to a collection or product. Returns
|
|
54
|
+
* `{ items, nextCursor }` with the claim set's own fields (`id`, `name`, …) beside them: the tags are
|
|
55
|
+
* in `items`. The list is not paged, so `nextCursor` is always `null`.
|
|
45
56
|
* @param claimSetId – The claim set identifier
|
|
46
57
|
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* const { items, name } = await claimSet.getAssignedTags('12', 'coll_123')
|
|
62
|
+
* console.log(`${items.length} tags of ${name} are assigned`)
|
|
63
|
+
* ```
|
|
47
64
|
*/
|
|
48
|
-
function getAssignedTags(claimSetId: string, collectionId?: string): Promise<any
|
|
65
|
+
function getAssignedTags(claimSetId: string, collectionId?: string): Promise<ListResult<any> & Record<string, any>>;
|
|
49
66
|
/**
|
|
50
67
|
* Create a single tag inside a claim set.
|
|
51
68
|
* @param claimSetId – The claim set identifier
|
|
@@ -96,8 +113,16 @@ export declare namespace claimSet {
|
|
|
96
113
|
*/
|
|
97
114
|
function updateClaimData(collectionId: string, data: UpdateClaimDataRequest): Promise<any>;
|
|
98
115
|
namespace ranges {
|
|
99
|
-
/**
|
|
100
|
-
|
|
116
|
+
/**
|
|
117
|
+
* The ranges in a set, lowest index first. Returns `{ items, nextCursor }`: the ranges are in `items`.
|
|
118
|
+
* The list is not paged, so `nextCursor` is always `null`.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* const { items: ranges } = await claimSet.ranges.list({ collectionId: 'coll_123' }, '12')
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
function list(scope: ClaimSetScope, claimSetId: string): Promise<ListResult<ClaimSetRange>>;
|
|
101
126
|
/** Reserve the set's next indexes and mint a code (and, for NTAG 424, a key) for each. */
|
|
102
127
|
function create(scope: ClaimSetScope, claimSetId: string, params: CreateClaimSetRangeRequest): Promise<ClaimSetRange>;
|
|
103
128
|
/** One range, with its counts refreshed. */
|
|
@@ -114,12 +139,22 @@ export declare namespace claimSet {
|
|
|
114
139
|
function removeMember(scope: ClaimSetScope, claimSetId: string, groupId: string, code: string): Promise<{
|
|
115
140
|
range: ClaimSetRange;
|
|
116
141
|
}>;
|
|
117
|
-
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
142
|
+
/**
|
|
143
|
+
* The range's tags in index order, a page at a time (200 unless you give a `limit`, at most 1000).
|
|
144
|
+
* Returns `{ items, nextCursor }`: pass `nextCursor` back as `cursor` for the next page; `null` means
|
|
145
|
+
* that was the last one. `keys: true` includes each tag's key (owners and admins only).
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* let page = await claimSet.ranges.tags(scope, '12', rangeId, { limit: 500 })
|
|
150
|
+
* while (page.nextCursor) {
|
|
151
|
+
* page = await claimSet.ranges.tags(scope, '12', rangeId, { limit: 500, cursor: page.nextCursor })
|
|
152
|
+
* }
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
function tags(scope: ClaimSetScope, claimSetId: string, rangeId: string, options?: ListOptions & {
|
|
121
156
|
keys?: boolean;
|
|
122
|
-
}): Promise<
|
|
157
|
+
}): Promise<ListResult<ClaimSetRangeTag>>;
|
|
123
158
|
/** The next tag to program on a phone (lowest index without a chip), with its URL and key. */
|
|
124
159
|
function next(scope: ClaimSetScope, claimSetId: string, rangeId: string): Promise<ClaimSetRangeNextTag>;
|
|
125
160
|
/** Record the chip a phone just programmed with this code. */
|
package/dist/api/claimSet.js
CHANGED
|
@@ -19,10 +19,16 @@ function rangesBase(scope, claimSetId) {
|
|
|
19
19
|
export var claimSet;
|
|
20
20
|
(function (claimSet) {
|
|
21
21
|
/**
|
|
22
|
-
* Get all claim sets.
|
|
22
|
+
* Get all claim sets. Returns `{ items, nextCursor }`: the claim sets are in `items`. The list is not
|
|
23
|
+
* paged, so `nextCursor` is always `null`.
|
|
23
24
|
* When collectionId is provided, returns claim sets for that collection.
|
|
24
25
|
* When omitted, returns all claim sets owned by the authenticated user.
|
|
25
26
|
* @param collectionId – Optional collection identifier
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const { items } = await claimSet.getAll('coll_123')
|
|
31
|
+
* ```
|
|
26
32
|
*/
|
|
27
33
|
async function getAll(collectionId) {
|
|
28
34
|
return request(base(collectionId));
|
|
@@ -68,7 +74,9 @@ export var claimSet;
|
|
|
68
74
|
}
|
|
69
75
|
claimSet.remove = remove;
|
|
70
76
|
/**
|
|
71
|
-
* Get all tags for a claim set (including data).
|
|
77
|
+
* Get all tags for a claim set (including data). This is not one of the SDK 3 lists: the answer is the
|
|
78
|
+
* claim set itself with its tags inside. Without a collectionId (your own claim set) they are in `tags`;
|
|
79
|
+
* with one they are in `codes` (the tag ids), or in `codeMap` (id → key) for a secure set.
|
|
72
80
|
* @param claimSetId – The claim set identifier
|
|
73
81
|
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
74
82
|
*/
|
|
@@ -77,9 +85,17 @@ export var claimSet;
|
|
|
77
85
|
}
|
|
78
86
|
claimSet.getAllTags = getAllTags;
|
|
79
87
|
/**
|
|
80
|
-
* Get assigned tags for a claim set — tags soft-assigned to a collection or product.
|
|
88
|
+
* Get assigned tags for a claim set — tags soft-assigned to a collection or product. Returns
|
|
89
|
+
* `{ items, nextCursor }` with the claim set's own fields (`id`, `name`, …) beside them: the tags are
|
|
90
|
+
* in `items`. The list is not paged, so `nextCursor` is always `null`.
|
|
81
91
|
* @param claimSetId – The claim set identifier
|
|
82
92
|
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* const { items, name } = await claimSet.getAssignedTags('12', 'coll_123')
|
|
97
|
+
* console.log(`${items.length} tags of ${name} are assigned`)
|
|
98
|
+
* ```
|
|
83
99
|
*/
|
|
84
100
|
async function getAssignedTags(claimSetId, collectionId) {
|
|
85
101
|
return request(`${base(collectionId)}/${encodeURIComponent(claimSetId)}/assignedTags`);
|
|
@@ -165,7 +181,15 @@ export var claimSet;
|
|
|
165
181
|
// export, import and program; assigners assign. Responses are never cached (they carry keys).
|
|
166
182
|
let ranges;
|
|
167
183
|
(function (ranges) {
|
|
168
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* The ranges in a set, lowest index first. Returns `{ items, nextCursor }`: the ranges are in `items`.
|
|
186
|
+
* The list is not paged, so `nextCursor` is always `null`.
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```typescript
|
|
190
|
+
* const { items: ranges } = await claimSet.ranges.list({ collectionId: 'coll_123' }, '12')
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
169
193
|
async function list(scope, claimSetId) {
|
|
170
194
|
return request(rangesBase(scope, claimSetId));
|
|
171
195
|
}
|
|
@@ -205,13 +229,25 @@ export var claimSet;
|
|
|
205
229
|
return del(`${rangesBase(scope, claimSetId)}/${encodeURIComponent(groupId)}/members/${encodeURIComponent(code)}`);
|
|
206
230
|
}
|
|
207
231
|
ranges.removeMember = removeMember;
|
|
208
|
-
/**
|
|
232
|
+
/**
|
|
233
|
+
* The range's tags in index order, a page at a time (200 unless you give a `limit`, at most 1000).
|
|
234
|
+
* Returns `{ items, nextCursor }`: pass `nextCursor` back as `cursor` for the next page; `null` means
|
|
235
|
+
* that was the last one. `keys: true` includes each tag's key (owners and admins only).
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* ```typescript
|
|
239
|
+
* let page = await claimSet.ranges.tags(scope, '12', rangeId, { limit: 500 })
|
|
240
|
+
* while (page.nextCursor) {
|
|
241
|
+
* page = await claimSet.ranges.tags(scope, '12', rangeId, { limit: 500, cursor: page.nextCursor })
|
|
242
|
+
* }
|
|
243
|
+
* ```
|
|
244
|
+
*/
|
|
209
245
|
async function tags(scope, claimSetId, rangeId, options = {}) {
|
|
210
246
|
const q = new URLSearchParams();
|
|
211
|
-
if (options.from !== undefined)
|
|
212
|
-
q.set('from', String(options.from));
|
|
213
247
|
if (options.limit !== undefined)
|
|
214
248
|
q.set('limit', String(options.limit));
|
|
249
|
+
if (options.cursor)
|
|
250
|
+
q.set('cursor', options.cursor);
|
|
215
251
|
if (options.keys)
|
|
216
252
|
q.set('keys', '1');
|
|
217
253
|
const qs = q.toString();
|
package/dist/api/collection.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CollectionResponse, CollectionCreateRequest, CollectionUpdateRequest, AppsConfigResponse, DomainTarget, HubAvailabilityResponse, CollectionUser, CollectionAccessLevel, InviteUserInput, CollectionReadiness } from "../types/collection.js";
|
|
2
|
+
import type { ListResult } from "../types/list.js";
|
|
2
3
|
export declare namespace collection {
|
|
3
4
|
/**
|
|
4
5
|
* What the collection's installed apps need and whether it's there (sign-in, customers, products,
|
|
@@ -16,12 +17,18 @@ export declare namespace collection {
|
|
|
16
17
|
*/
|
|
17
18
|
function get(collectionId: string, admin?: boolean): Promise<CollectionResponse>;
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* @returns Promise resolving to
|
|
20
|
+
* The collections the signed-in user can work on (admin). All of them come back in one answer:
|
|
21
|
+
* `nextCursor` is always null. There is no public list of collections: read one with `collection.get`.
|
|
22
|
+
* @returns Promise resolving to `{ items, nextCursor }`, where `items` are CollectionResponse objects
|
|
22
23
|
* @throws ErrorResponse if the request fails
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const { items } = await collection.list()
|
|
28
|
+
* items.forEach(c => console.log(c.id, c.title))
|
|
29
|
+
* ```
|
|
23
30
|
*/
|
|
24
|
-
function list(
|
|
31
|
+
function list(): Promise<ListResult<CollectionResponse>>;
|
|
25
32
|
/**
|
|
26
33
|
* Retrieve a collection by its shortId (public endpoint).
|
|
27
34
|
* @param shortId – The short identifier of the collection
|
|
@@ -190,11 +197,18 @@ export declare namespace collection {
|
|
|
190
197
|
/**
|
|
191
198
|
* List the users with access to a collection, each with their access level (admin only). Access is
|
|
192
199
|
* stored in the collection's `roles` map (userId → level); this resolves each to name/email.
|
|
200
|
+
* All of them come back in one answer: `nextCursor` is always null.
|
|
193
201
|
* GET /admin/collection/:collectionId/getUsers
|
|
194
202
|
* @param collectionId - Identifier of the collection
|
|
195
|
-
* @returns Promise resolving to the collection's users
|
|
203
|
+
* @returns Promise resolving to `{ items, nextCursor }`, where `items` are the collection's users
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```typescript
|
|
207
|
+
* const { items: users } = await collection.getUsers('coll_123')
|
|
208
|
+
* users.forEach(u => console.log(u.email, u.access))
|
|
209
|
+
* ```
|
|
196
210
|
*/
|
|
197
|
-
function getUsers(collectionId: string): Promise<CollectionUser
|
|
211
|
+
function getUsers(collectionId: string): Promise<ListResult<CollectionUser>>;
|
|
198
212
|
/**
|
|
199
213
|
* Grant, change, or remove a user's access level on a collection (admin only). Pass `null` or
|
|
200
214
|
* `'None'` to remove access. The server enforces privilege-escalation rules — you cannot grant an
|
package/dist/api/collection.js
CHANGED
|
@@ -26,15 +26,19 @@ export var collection;
|
|
|
26
26
|
}
|
|
27
27
|
collection.get = get;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @returns Promise resolving to
|
|
29
|
+
* The collections the signed-in user can work on (admin). All of them come back in one answer:
|
|
30
|
+
* `nextCursor` is always null. There is no public list of collections: read one with `collection.get`.
|
|
31
|
+
* @returns Promise resolving to `{ items, nextCursor }`, where `items` are CollectionResponse objects
|
|
32
32
|
* @throws ErrorResponse if the request fails
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const { items } = await collection.list()
|
|
37
|
+
* items.forEach(c => console.log(c.id, c.title))
|
|
38
|
+
* ```
|
|
33
39
|
*/
|
|
34
|
-
async function list(
|
|
35
|
-
|
|
36
|
-
const path = `${base}`;
|
|
37
|
-
return request(path);
|
|
40
|
+
async function list() {
|
|
41
|
+
return request('/admin/collection');
|
|
38
42
|
}
|
|
39
43
|
collection.list = list;
|
|
40
44
|
/**
|
|
@@ -278,9 +282,16 @@ export var collection;
|
|
|
278
282
|
/**
|
|
279
283
|
* List the users with access to a collection, each with their access level (admin only). Access is
|
|
280
284
|
* stored in the collection's `roles` map (userId → level); this resolves each to name/email.
|
|
285
|
+
* All of them come back in one answer: `nextCursor` is always null.
|
|
281
286
|
* GET /admin/collection/:collectionId/getUsers
|
|
282
287
|
* @param collectionId - Identifier of the collection
|
|
283
|
-
* @returns Promise resolving to the collection's users
|
|
288
|
+
* @returns Promise resolving to `{ items, nextCursor }`, where `items` are the collection's users
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
* ```typescript
|
|
292
|
+
* const { items: users } = await collection.getUsers('coll_123')
|
|
293
|
+
* users.forEach(u => console.log(u.email, u.access))
|
|
294
|
+
* ```
|
|
284
295
|
*/
|
|
285
296
|
async function getUsers(collectionId) {
|
|
286
297
|
return request(`/admin/collection/${encodeURIComponent(collectionId)}/getUsers`);
|
package/dist/api/comms.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CommunicationEvent, CommsQueryByUser, CommsRecipientIdsQuery,
|
|
1
|
+
import type { CommunicationEvent, CommsQueryByUser, CommsRecipientIdsQuery, CommsRecipientsWithoutInteractionQuery, CommsRecipientsWithInteractionQuery, RecipientId, RecipientWithOutcome, LogCommunicationEventBody, LogBulkCommunicationEventsBody, AppendResult, AppendBulkResult, TransactionalSendRequest, TransactionalSendResult } from "../types/comms.js";
|
|
2
|
+
import type { ListResult } from "../types/list.js";
|
|
2
3
|
/**
|
|
3
4
|
* Communications namespace for sending notifications and managing user communications.
|
|
4
5
|
*
|
|
@@ -77,8 +78,14 @@ export declare namespace comms {
|
|
|
77
78
|
*/
|
|
78
79
|
function checkSubscription(collectionId: string, query: import("../types/comms.js").CommsSubscriptionCheckQuery): Promise<import("../types/comms.js").CommsSubscriptionCheckResponse>;
|
|
79
80
|
/**
|
|
80
|
-
* Public: List registered contact methods.
|
|
81
|
+
* Public: List registered contact methods. All of them come back in one answer: `nextCursor` is
|
|
82
|
+
* always null.
|
|
81
83
|
* GET /public/collection/:collectionId/comm/methods
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const { items: methods } = await comms.listMethods(collectionId, { type: 'email' })
|
|
88
|
+
* ```
|
|
82
89
|
*/
|
|
83
90
|
function listMethods(collectionId: string, query: import("../types/comms.js").CommsListMethodsQuery): Promise<import("../types/comms.js").CommsListMethodsResponse>;
|
|
84
91
|
/**
|
|
@@ -97,25 +104,49 @@ export declare namespace comms {
|
|
|
97
104
|
*/
|
|
98
105
|
function resolveSubscriptions(collectionId: string, body: import("../types/comms.js").SubscriptionsResolveRequest): Promise<import("../types/comms.js").SubscriptionsResolveResponse>;
|
|
99
106
|
/**
|
|
100
|
-
* Analytics: Query communication events by user or contact.
|
|
107
|
+
* Analytics: Query communication events by user or contact. The events come back in one answer
|
|
108
|
+
* (`nextCursor` is always null); `limit` is the most it returns.
|
|
101
109
|
* POST /admin/collection/:collectionId/comm/query/by-user
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* const { items: events } = await comms.queryByUser(collectionId, { contactId, from: '2026-01-01', limit: 200 })
|
|
114
|
+
* ```
|
|
102
115
|
*/
|
|
103
|
-
function queryByUser(collectionId: string, body?: CommsQueryByUser): Promise<CommunicationEvent
|
|
116
|
+
function queryByUser(collectionId: string, body?: CommsQueryByUser): Promise<ListResult<CommunicationEvent>>;
|
|
104
117
|
/**
|
|
105
|
-
* Analytics: Recipient IDs for a communication source.
|
|
118
|
+
* Analytics: Recipient IDs for a communication source. The ids come back in one answer
|
|
119
|
+
* (`nextCursor` is always null); `limit` is the most it returns.
|
|
106
120
|
* POST /admin/collection/:collectionId/comm/query/recipient-ids
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```typescript
|
|
124
|
+
* const { items: ids } = await comms.queryRecipientIds(collectionId, { broadcastId, idField: 'contactId' })
|
|
125
|
+
* ```
|
|
107
126
|
*/
|
|
108
|
-
function queryRecipientIds(collectionId: string, body: CommsRecipientIdsQuery): Promise<RecipientId
|
|
127
|
+
function queryRecipientIds(collectionId: string, body: CommsRecipientIdsQuery): Promise<ListResult<RecipientId>>;
|
|
109
128
|
/**
|
|
110
|
-
* Analytics:
|
|
111
|
-
*
|
|
129
|
+
* Analytics: the recipients of a broadcast or journey who did NOT then do an interaction. The ids come
|
|
130
|
+
* back in one answer (`nextCursor` is always null); `limit` is the most it returns.
|
|
131
|
+
* POST /admin/collection/:collectionId/comm/query/recipients/without-interaction
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```typescript
|
|
135
|
+
* const { items: ids } = await comms.queryRecipientsWithoutInteraction(collectionId, { broadcastId, interactionId: 'survey-done' })
|
|
136
|
+
* ```
|
|
112
137
|
*/
|
|
113
|
-
function
|
|
138
|
+
function queryRecipientsWithoutInteraction(collectionId: string, body: CommsRecipientsWithoutInteractionQuery): Promise<ListResult<RecipientId>>;
|
|
114
139
|
/**
|
|
115
|
-
* Analytics:
|
|
116
|
-
*
|
|
140
|
+
* Analytics: the recipients of a broadcast or journey who then did an interaction. With
|
|
141
|
+
* `includeOutcome: true` each item is `{ id, outcome }` instead of an id. One answer, no pages.
|
|
142
|
+
* POST /admin/collection/:collectionId/comm/query/recipients/with-interaction
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```typescript
|
|
146
|
+
* const { items } = await comms.queryRecipientsWithInteraction(collectionId, { broadcastId, interactionId: 'survey-done', includeOutcome: true })
|
|
147
|
+
* ```
|
|
117
148
|
*/
|
|
118
|
-
function
|
|
149
|
+
function queryRecipientsWithInteraction(collectionId: string, body: CommsRecipientsWithInteractionQuery): Promise<ListResult<RecipientId | RecipientWithOutcome>>;
|
|
119
150
|
/**
|
|
120
151
|
* Send a single transactional message to one contact using a template.
|
|
121
152
|
* No broadcast record is created. The send is logged to the contact's
|
package/dist/api/comms.js
CHANGED
|
@@ -141,8 +141,14 @@ export var comms;
|
|
|
141
141
|
}
|
|
142
142
|
comms.checkSubscription = checkSubscription;
|
|
143
143
|
/**
|
|
144
|
-
* Public: List registered contact methods.
|
|
144
|
+
* Public: List registered contact methods. All of them come back in one answer: `nextCursor` is
|
|
145
|
+
* always null.
|
|
145
146
|
* GET /public/collection/:collectionId/comm/methods
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```typescript
|
|
150
|
+
* const { items: methods } = await comms.listMethods(collectionId, { type: 'email' })
|
|
151
|
+
* ```
|
|
146
152
|
*/
|
|
147
153
|
async function listMethods(collectionId, query) {
|
|
148
154
|
const params = new URLSearchParams();
|
|
@@ -183,8 +189,14 @@ export var comms;
|
|
|
183
189
|
}
|
|
184
190
|
comms.resolveSubscriptions = resolveSubscriptions;
|
|
185
191
|
/**
|
|
186
|
-
* Analytics: Query communication events by user or contact.
|
|
192
|
+
* Analytics: Query communication events by user or contact. The events come back in one answer
|
|
193
|
+
* (`nextCursor` is always null); `limit` is the most it returns.
|
|
187
194
|
* POST /admin/collection/:collectionId/comm/query/by-user
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* ```typescript
|
|
198
|
+
* const { items: events } = await comms.queryByUser(collectionId, { contactId, from: '2026-01-01', limit: 200 })
|
|
199
|
+
* ```
|
|
188
200
|
*/
|
|
189
201
|
async function queryByUser(collectionId, body = {}) {
|
|
190
202
|
const path = `/admin/collection/${encodeURIComponent(collectionId)}/comm/query/by-user`;
|
|
@@ -192,8 +204,14 @@ export var comms;
|
|
|
192
204
|
}
|
|
193
205
|
comms.queryByUser = queryByUser;
|
|
194
206
|
/**
|
|
195
|
-
* Analytics: Recipient IDs for a communication source.
|
|
207
|
+
* Analytics: Recipient IDs for a communication source. The ids come back in one answer
|
|
208
|
+
* (`nextCursor` is always null); `limit` is the most it returns.
|
|
196
209
|
* POST /admin/collection/:collectionId/comm/query/recipient-ids
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* ```typescript
|
|
213
|
+
* const { items: ids } = await comms.queryRecipientIds(collectionId, { broadcastId, idField: 'contactId' })
|
|
214
|
+
* ```
|
|
197
215
|
*/
|
|
198
216
|
async function queryRecipientIds(collectionId, body) {
|
|
199
217
|
const path = `/admin/collection/${encodeURIComponent(collectionId)}/comm/query/recipient-ids`;
|
|
@@ -201,23 +219,35 @@ export var comms;
|
|
|
201
219
|
}
|
|
202
220
|
comms.queryRecipientIds = queryRecipientIds;
|
|
203
221
|
/**
|
|
204
|
-
* Analytics:
|
|
205
|
-
*
|
|
222
|
+
* Analytics: the recipients of a broadcast or journey who did NOT then do an interaction. The ids come
|
|
223
|
+
* back in one answer (`nextCursor` is always null); `limit` is the most it returns.
|
|
224
|
+
* POST /admin/collection/:collectionId/comm/query/recipients/without-interaction
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* ```typescript
|
|
228
|
+
* const { items: ids } = await comms.queryRecipientsWithoutInteraction(collectionId, { broadcastId, interactionId: 'survey-done' })
|
|
229
|
+
* ```
|
|
206
230
|
*/
|
|
207
|
-
async function
|
|
208
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/comm/query/recipients/without-
|
|
231
|
+
async function queryRecipientsWithoutInteraction(collectionId, body) {
|
|
232
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/comm/query/recipients/without-interaction`;
|
|
209
233
|
return post(path, body);
|
|
210
234
|
}
|
|
211
|
-
comms.
|
|
235
|
+
comms.queryRecipientsWithoutInteraction = queryRecipientsWithoutInteraction;
|
|
212
236
|
/**
|
|
213
|
-
* Analytics:
|
|
214
|
-
*
|
|
237
|
+
* Analytics: the recipients of a broadcast or journey who then did an interaction. With
|
|
238
|
+
* `includeOutcome: true` each item is `{ id, outcome }` instead of an id. One answer, no pages.
|
|
239
|
+
* POST /admin/collection/:collectionId/comm/query/recipients/with-interaction
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```typescript
|
|
243
|
+
* const { items } = await comms.queryRecipientsWithInteraction(collectionId, { broadcastId, interactionId: 'survey-done', includeOutcome: true })
|
|
244
|
+
* ```
|
|
215
245
|
*/
|
|
216
|
-
async function
|
|
217
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/comm/query/recipients/with-
|
|
246
|
+
async function queryRecipientsWithInteraction(collectionId, body) {
|
|
247
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/comm/query/recipients/with-interaction`;
|
|
218
248
|
return post(path, body);
|
|
219
249
|
}
|
|
220
|
-
comms.
|
|
250
|
+
comms.queryRecipientsWithInteraction = queryRecipientsWithInteraction;
|
|
221
251
|
/**
|
|
222
252
|
* Send a single transactional message to one contact using a template.
|
|
223
253
|
* No broadcast record is created. The send is logged to the contact's
|
package/dist/api/conditions.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ConditionSet } from "../utils/conditions.js";
|
|
2
|
+
import type { ListResult } from "../types/list.js";
|
|
2
3
|
/** A saved condition: a named rule set pages, Hub blocks and apps refer to by id. */
|
|
3
4
|
export interface SavedCondition extends ConditionSet {
|
|
4
5
|
id: string;
|
|
@@ -20,8 +21,17 @@ export type SaveConditionRequest = Omit<SavedCondition, "id" | "deleted">;
|
|
|
20
21
|
* - Admins create and change them (`create`, `update`, `remove`).
|
|
21
22
|
*/
|
|
22
23
|
export declare namespace conditions {
|
|
23
|
-
/**
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Every saved condition in the collection (removed ones left out). All of them come back in one
|
|
26
|
+
* answer: `nextCursor` is always null.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const { items } = await conditions.list('coll_123')
|
|
31
|
+
* items.map(c => c.title) // ["UK only", "In the stadium"]
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
function list(collectionId: string, admin?: boolean): Promise<ListResult<SavedCondition>>;
|
|
25
35
|
/**
|
|
26
36
|
* One saved condition. Public reads 404 for a removed one; an admin read returns it with `deleted: true`.
|
|
27
37
|
*
|
package/dist/api/conditions.js
CHANGED
|
@@ -11,7 +11,16 @@ export var conditions;
|
|
|
11
11
|
(function (conditions) {
|
|
12
12
|
const pub = (collectionId) => `/public/collection/${encodeURIComponent(collectionId)}/condition`;
|
|
13
13
|
const adm = (collectionId) => `/admin/collection/${encodeURIComponent(collectionId)}/condition`;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Every saved condition in the collection (removed ones left out). All of them come back in one
|
|
16
|
+
* answer: `nextCursor` is always null.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const { items } = await conditions.list('coll_123')
|
|
21
|
+
* items.map(c => c.title) // ["UK only", "In the stadium"]
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
15
24
|
async function list(collectionId, admin = false) {
|
|
16
25
|
return request(admin ? adm(collectionId) : pub(collectionId));
|
|
17
26
|
}
|
package/dist/api/config.d.ts
CHANGED
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
import type { FieldDefinition, ProofTypeDefinition } from "../types/config.js";
|
|
2
|
+
import type { ListResult } from "../types/list.js";
|
|
2
3
|
export declare namespace config {
|
|
3
4
|
/**
|
|
4
5
|
* Returns the full platform field catalog.
|
|
5
6
|
* Fields are used as building blocks for proof type templates — they define
|
|
6
7
|
* the input widgets shown when creating or editing products and proof items.
|
|
8
|
+
* All of them come back in one answer: `nextCursor` is always null.
|
|
7
9
|
*
|
|
8
10
|
* **Endpoint:** `GET /api/v1/public/config/fields`
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const { items: fields } = await config.getFields()
|
|
15
|
+
* ```
|
|
9
16
|
*/
|
|
10
|
-
function getFields(): Promise<FieldDefinition
|
|
17
|
+
function getFields(): Promise<ListResult<FieldDefinition>>;
|
|
11
18
|
/**
|
|
12
19
|
* Returns all proof type definitions.
|
|
13
20
|
* Proof types are templates that specify which fields to show, which apps are
|
|
14
21
|
* pre-installed, and how the portal behaves for a given product category.
|
|
22
|
+
* All of them come back in one answer: `nextCursor` is always null.
|
|
15
23
|
*
|
|
16
24
|
* **Endpoint:** `GET /api/v1/public/config/proofTypes`
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const { items: proofTypes } = await config.getProofTypes()
|
|
29
|
+
* ```
|
|
17
30
|
*/
|
|
18
|
-
function getProofTypes(): Promise<ProofTypeDefinition
|
|
31
|
+
function getProofTypes(): Promise<ListResult<ProofTypeDefinition>>;
|
|
19
32
|
}
|
package/dist/api/config.js
CHANGED
|
@@ -6,8 +6,14 @@ export var config;
|
|
|
6
6
|
* Returns the full platform field catalog.
|
|
7
7
|
* Fields are used as building blocks for proof type templates — they define
|
|
8
8
|
* the input widgets shown when creating or editing products and proof items.
|
|
9
|
+
* All of them come back in one answer: `nextCursor` is always null.
|
|
9
10
|
*
|
|
10
11
|
* **Endpoint:** `GET /api/v1/public/config/fields`
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const { items: fields } = await config.getFields()
|
|
16
|
+
* ```
|
|
11
17
|
*/
|
|
12
18
|
async function getFields() {
|
|
13
19
|
return request("/public/config/fields");
|
|
@@ -17,8 +23,14 @@ export var config;
|
|
|
17
23
|
* Returns all proof type definitions.
|
|
18
24
|
* Proof types are templates that specify which fields to show, which apps are
|
|
19
25
|
* pre-installed, and how the portal behaves for a given product category.
|
|
26
|
+
* All of them come back in one answer: `nextCursor` is always null.
|
|
20
27
|
*
|
|
21
28
|
* **Endpoint:** `GET /api/v1/public/config/proofTypes`
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const { items: proofTypes } = await config.getProofTypes()
|
|
33
|
+
* ```
|
|
22
34
|
*/
|
|
23
35
|
async function getProofTypes() {
|
|
24
36
|
return request("/public/config/proofTypes");
|