@proveanything/smartlinks 3.0.0-alpha.1 → 3.0.0-alpha.3
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 -741
- package/dist/README.md +573 -573
- package/dist/adminCardsView.js +55 -55
- package/dist/api/analytics.d.ts +5 -4
- package/dist/api/analytics.js +5 -4
- package/dist/api/appConfiguration.d.ts +23 -18
- package/dist/api/appConfiguration.js +24 -18
- package/dist/api/appObjects.d.ts +54 -10
- package/dist/api/appObjects.js +75 -40
- package/dist/api/asset.d.ts +28 -22
- package/dist/api/asset.js +45 -56
- package/dist/api/attestation.d.ts +11 -3
- package/dist/api/attestation.js +12 -3
- package/dist/api/attestations.d.ts +12 -8
- package/dist/api/attestations.js +18 -21
- package/dist/api/authKit.d.ts +15 -10
- package/dist/api/authKit.js +17 -11
- package/dist/api/batch.d.ts +36 -25
- package/dist/api/batch.js +46 -39
- package/dist/api/bookings.d.ts +67 -11
- package/dist/api/bookings.js +82 -15
- package/dist/api/broadcasts.js +3 -17
- package/dist/api/claimSet.d.ts +26 -12
- package/dist/api/claimSet.js +32 -24
- package/dist/api/collection.d.ts +15 -10
- package/dist/api/collection.js +17 -11
- package/dist/api/comms.d.ts +12 -6
- package/dist/api/comms.js +12 -6
- package/dist/api/conditions.d.ts +7 -6
- package/dist/api/conditions.js +8 -6
- package/dist/api/contact.d.ts +6 -2
- package/dist/api/contact.js +25 -60
- package/dist/api/containers.d.ts +14 -10
- package/dist/api/containers.js +19 -14
- package/dist/api/crate.js +7 -9
- package/dist/api/dpp.d.ts +20 -13
- package/dist/api/dpp.js +23 -15
- package/dist/api/facets.d.ts +38 -13
- package/dist/api/facets.js +40 -15
- package/dist/api/files.d.ts +5 -2
- package/dist/api/files.js +7 -4
- package/dist/api/form.d.ts +8 -5
- package/dist/api/form.js +9 -5
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/integrations.d.ts +29 -17
- package/dist/api/integrations.js +32 -25
- package/dist/api/interactions.d.ts +11 -6
- package/dist/api/interactions.js +14 -23
- package/dist/api/jobs.d.ts +16 -6
- package/dist/api/jobs.js +30 -20
- package/dist/api/journeys.js +2 -14
- package/dist/api/journeysAnalytics.d.ts +8 -5
- package/dist/api/journeysAnalytics.js +8 -5
- package/dist/api/knowledge.d.ts +20 -14
- package/dist/api/knowledge.js +22 -15
- package/dist/api/location.d.ts +6 -3
- package/dist/api/location.js +8 -22
- package/dist/api/lots.d.ts +9 -5
- package/dist/api/lots.js +22 -26
- package/dist/api/loyalty.d.ts +25 -16
- package/dist/api/loyalty.js +33 -32
- package/dist/api/nfc.d.ts +3 -1
- package/dist/api/nfc.js +3 -1
- package/dist/api/order.d.ts +45 -39
- package/dist/api/order.js +48 -65
- package/dist/api/partner.d.ts +17 -14
- package/dist/api/partner.js +21 -22
- package/dist/api/payments.d.ts +60 -0
- package/dist/api/payments.js +94 -0
- package/dist/api/products.d.ts +35 -12
- package/dist/api/products.js +36 -13
- package/dist/api/proof.d.ts +41 -19
- package/dist/api/proof.js +44 -23
- package/dist/api/realtime.d.ts +3 -0
- package/dist/api/realtime.js +10 -2
- package/dist/api/segments.js +3 -15
- package/dist/api/serviceAccounts.d.ts +8 -5
- package/dist/api/serviceAccounts.js +9 -6
- package/dist/api/shop.d.ts +7 -5
- package/dist/api/shop.js +13 -19
- package/dist/api/subscriptions.d.ts +12 -10
- package/dist/api/subscriptions.js +17 -25
- package/dist/api/tags.d.ts +23 -20
- package/dist/api/tags.js +40 -52
- package/dist/api/template.d.ts +16 -11
- package/dist/api/template.js +19 -13
- package/dist/api/translations.js +2 -12
- package/dist/api/userGroups.d.ts +26 -16
- package/dist/api/userGroups.js +43 -30
- package/dist/api/variant.d.ts +10 -7
- package/dist/api/variant.js +11 -7
- package/dist/api/wallet.d.ts +14 -11
- package/dist/api/wallet.js +15 -12
- package/dist/baseline.css +194 -194
- package/dist/dataChanged.d.ts +74 -0
- package/dist/dataChanged.js +162 -0
- package/dist/docs/API_SUMMARY.md +1443 -1409
- package/dist/docs/admin-cards.md +189 -189
- 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 +1 -1
- package/dist/docs/api-versions.md +85 -85
- 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 +4 -4
- package/dist/docs/app-records-pattern.md +388 -388
- package/dist/docs/appConfig.md +550 -550
- package/dist/docs/assistant-apps.md +172 -172
- package/dist/docs/assistant-context.md +119 -119
- package/dist/docs/attestations.md +8 -8
- package/dist/docs/bookings.md +105 -8
- package/dist/docs/caching.md +32 -3
- package/dist/docs/comms.md +689 -689
- package/dist/docs/connectors.md +340 -340
- package/dist/docs/contact-search.md +2 -3
- package/dist/docs/css-baseline.md +133 -133
- package/dist/docs/customer-guide.md +70 -70
- package/dist/docs/data-changed.md +91 -0
- 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/files.md +69 -69
- package/dist/docs/host-dependency-contract.md +252 -252
- package/dist/docs/iframe-responder.md +11 -0
- package/dist/docs/integrations.md +322 -322
- package/dist/docs/interactions.md +544 -544
- package/dist/docs/item-context.md +181 -181
- package/dist/docs/knowledge.md +105 -105
- package/dist/docs/lists.md +157 -114
- package/dist/docs/lots.md +112 -112
- package/dist/docs/loyalty.md +348 -348
- package/dist/docs/members.md +183 -183
- package/dist/docs/memberships.md +150 -150
- package/dist/docs/mobile-admin-container.md +693 -693
- package/dist/docs/operations.md +281 -281
- package/dist/docs/overview.md +487 -485
- package/dist/docs/payments.md +94 -0
- 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 +149 -139
- package/dist/docs/records-admin-pattern.md +304 -304
- package/dist/docs/service-accounts.md +64 -64
- package/dist/docs/standard-query.md +196 -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/upgrading-to-3.md +550 -430
- package/dist/docs/wallet-passes.md +107 -107
- package/dist/docs/websites.md +123 -123
- package/dist/http.d.ts +6 -3
- package/dist/http.js +48 -19
- package/dist/iframeResponder.d.ts +7 -0
- package/dist/iframeResponder.js +10 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/list.d.ts +12 -0
- package/dist/list.js +59 -0
- package/dist/openapi.yaml +722 -660
- package/dist/testing/bookingsMemory.d.ts +29 -1
- package/dist/testing/bookingsMemory.js +89 -1
- package/dist/testing/index.js +4 -1
- package/dist/theme-boot.js +82 -82
- package/dist/theme.css +75 -75
- package/dist/types/analytics.d.ts +7 -3
- package/dist/types/appManifest.d.ts +26 -4
- package/dist/types/appObjects.d.ts +27 -12
- package/dist/types/appOptions.d.ts +2 -2
- package/dist/types/asset.d.ts +5 -6
- package/dist/types/attestations.d.ts +7 -9
- package/dist/types/batch.d.ts +5 -5
- package/dist/types/bookings.d.ts +109 -6
- package/dist/types/comms.d.ts +9 -5
- package/dist/types/contact.d.ts +7 -4
- package/dist/types/containers.d.ts +2 -1
- package/dist/types/facets.d.ts +14 -2
- package/dist/types/files.d.ts +3 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/integrations.d.ts +2 -1
- package/dist/types/interaction.d.ts +15 -7
- package/dist/types/jobs.d.ts +1 -1
- package/dist/types/journeysAnalytics.d.ts +3 -2
- package/dist/types/knowledge.d.ts +6 -3
- package/dist/types/knowledge.js +0 -1
- package/dist/types/list.d.ts +30 -2
- package/dist/types/location.d.ts +7 -2
- package/dist/types/location.js +0 -1
- package/dist/types/lots.d.ts +5 -2
- package/dist/types/lots.js +0 -6
- package/dist/types/order.d.ts +22 -20
- package/dist/types/payments.d.ts +101 -0
- package/dist/types/payments.js +5 -0
- package/dist/types/product.d.ts +28 -11
- package/dist/types/proof.d.ts +7 -8
- package/dist/types/realtime.d.ts +5 -1
- package/dist/types/tags.d.ts +5 -3
- package/dist/types/userGroups.d.ts +3 -3
- package/dist/types/userGroups.js +0 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/API_SUMMARY.md +1443 -1409
- package/docs/admin-cards.md +189 -189
- 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 +1 -1
- package/docs/api-versions.md +85 -85
- 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 +4 -4
- package/docs/app-records-pattern.md +388 -388
- package/docs/appConfig.md +550 -550
- package/docs/assistant-apps.md +172 -172
- package/docs/assistant-context.md +119 -119
- package/docs/attestations.md +8 -8
- package/docs/bookings.md +105 -8
- package/docs/caching.md +32 -3
- package/docs/comms.md +689 -689
- package/docs/connectors.md +340 -340
- package/docs/contact-search.md +2 -3
- package/docs/css-baseline.md +133 -133
- package/docs/customer-guide.md +70 -70
- package/docs/data-changed.md +91 -0
- package/docs/deploying-apps.md +340 -340
- package/docs/dpp.md +115 -115
- package/docs/entitlements.md +90 -90
- package/docs/files.md +69 -69
- package/docs/host-dependency-contract.md +252 -252
- package/docs/iframe-responder.md +11 -0
- package/docs/integrations.md +322 -322
- package/docs/interactions.md +544 -544
- package/docs/item-context.md +181 -181
- package/docs/knowledge.md +105 -105
- package/docs/lists.md +157 -114
- package/docs/lots.md +112 -112
- package/docs/loyalty.md +348 -348
- package/docs/members.md +183 -183
- package/docs/memberships.md +150 -150
- package/docs/mobile-admin-container.md +693 -693
- package/docs/operations.md +281 -281
- package/docs/overview.md +487 -485
- package/docs/payments.md +94 -0
- 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 +149 -139
- package/docs/service-accounts.md +64 -64
- package/docs/standard-query.md +196 -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/upgrading-to-3.md +550 -430
- package/docs/wallet-passes.md +107 -107
- package/docs/websites.md +123 -123
- package/openapi.yaml +722 -660
- package/package.json +91 -91
- 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 +708 -512
- package/scripts/publish.mjs +272 -272
- package/scripts/register-release.mjs +91 -91
- package/scripts/upgrade.mjs +79 -56
- package/upgrade/3.json +2731 -2213
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ListResult, ListOptions } from './list.js';
|
|
1
|
+
import type { ListResult, ListOptions, OrderBy, DateRange } from './list.js';
|
|
2
2
|
/**
|
|
3
3
|
* Visibility levels for app objects
|
|
4
4
|
*/
|
|
@@ -104,15 +104,17 @@ export interface AggregateResponse {
|
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Common query parameters for list endpoints. Paging is `limit` and `cursor` (from {@link ListOptions}):
|
|
107
|
-
* pass the previous page's `nextCursor` as `cursor` to get the next page.
|
|
107
|
+
* pass the previous page's `nextCursor` as `cursor` to get the next page. Each list adds its own
|
|
108
|
+
* `orderBy` (the fields it sorts by). A date field takes a range: `createdAt: { gte, lte }`.
|
|
108
109
|
*/
|
|
109
110
|
export interface ListQueryParams extends ListOptions {
|
|
110
|
-
sort?: string;
|
|
111
111
|
includeDeleted?: boolean;
|
|
112
112
|
status?: string;
|
|
113
113
|
productId?: string;
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
/** Created on or after `gte`, on or before `lte`. */
|
|
115
|
+
createdAt?: DateRange;
|
|
116
|
+
/** Last changed on or after `gte`, on or before `lte`. */
|
|
117
|
+
updatedAt?: DateRange;
|
|
116
118
|
}
|
|
117
119
|
/**
|
|
118
120
|
* App Case object
|
|
@@ -210,7 +212,10 @@ export interface CaseListQueryParams extends ListQueryParams {
|
|
|
210
212
|
proofId?: string;
|
|
211
213
|
contactId?: string;
|
|
212
214
|
assignedTo?: string;
|
|
213
|
-
|
|
215
|
+
/** Closed on or after `gte`, on or before `lte`. */
|
|
216
|
+
closedAt?: DateRange;
|
|
217
|
+
/** Sort keys, most important first: `[{ priority: 'desc' }, { createdAt: 'asc' }]`. */
|
|
218
|
+
orderBy?: OrderBy<'createdAt' | 'updatedAt' | 'closedAt' | 'priority' | 'status' | 'category' | 'ref' | 'customId' | 'sourceSystem'>;
|
|
214
219
|
}
|
|
215
220
|
/**
|
|
216
221
|
* Reply entry in a thread
|
|
@@ -319,6 +324,8 @@ export interface ThreadListQueryParams extends ListQueryParams {
|
|
|
319
324
|
productId?: string;
|
|
320
325
|
tag?: string;
|
|
321
326
|
contactId?: string;
|
|
327
|
+
/** Sort keys, most important first: `[{ lastReplyAt: 'desc' }]`. */
|
|
328
|
+
orderBy?: OrderBy<'createdAt' | 'updatedAt' | 'lastReplyAt' | 'replyCount' | 'status'>;
|
|
322
329
|
}
|
|
323
330
|
/**
|
|
324
331
|
* A single clause in a FacetRule. Tests one facet key against one or more values (OR semantics).
|
|
@@ -452,7 +459,7 @@ export interface MatchEntry extends AppRecord {
|
|
|
452
459
|
}
|
|
453
460
|
/**
|
|
454
461
|
* Response from the match endpoint: `items` are the matched records, most specific first; `count` is
|
|
455
|
-
* how many matched.
|
|
462
|
+
* how many matched. When you gave a `limit` and there are more, `nextCursor` carries on from there.
|
|
456
463
|
*/
|
|
457
464
|
export interface MatchResult extends ListResult<MatchEntry> {
|
|
458
465
|
/** Strategy used for this result */
|
|
@@ -501,6 +508,8 @@ export interface MatchRecordsInput {
|
|
|
501
508
|
recordType?: string;
|
|
502
509
|
/** Maximum records to return. Default 100, max 1000. */
|
|
503
510
|
limit?: number;
|
|
511
|
+
/** A `nextCursor` from the previous answer: carries on from where that one stopped. */
|
|
512
|
+
cursor?: string;
|
|
504
513
|
/** Include records whose startsAt is in the future. Default false. */
|
|
505
514
|
includeScheduled?: boolean;
|
|
506
515
|
/** Include records whose expiresAt is in the past. Default false. */
|
|
@@ -655,8 +664,12 @@ export interface RecordListQueryParams extends ListQueryParams {
|
|
|
655
664
|
authorId?: string;
|
|
656
665
|
parentType?: string;
|
|
657
666
|
parentId?: string;
|
|
658
|
-
|
|
659
|
-
|
|
667
|
+
/** Starts on or after `gte`, on or before `lte`. */
|
|
668
|
+
startsAt?: DateRange;
|
|
669
|
+
/** Expires on or after `gte`, on or before `lte`. */
|
|
670
|
+
expiresAt?: DateRange;
|
|
671
|
+
/** Sort keys, most important first: `[{ updatedAt: 'desc' }]`. */
|
|
672
|
+
orderBy?: OrderBy<'createdAt' | 'updatedAt' | 'startsAt' | 'expiresAt' | 'status' | 'recordType' | 'ref' | 'customId' | 'sourceSystem' | 'scopeType' | 'scopeId' | 'specificity' | 'label'>;
|
|
660
673
|
/** Include records where startsAt is in the future. Default false. */
|
|
661
674
|
includeScheduled?: boolean;
|
|
662
675
|
/** Include records where expiresAt is in the past. Default false. */
|
|
@@ -692,8 +705,10 @@ export interface ResolveAllParams {
|
|
|
692
705
|
recordType?: string;
|
|
693
706
|
/** Only return records belonging to these tiers. */
|
|
694
707
|
tiers?: Array<'proof' | 'batch' | 'variant' | 'product' | 'rule' | 'facet' | 'collection'>;
|
|
695
|
-
/**
|
|
708
|
+
/** The most to return. Default 500; at most 1000 in one answer (carry on with `cursor`). */
|
|
696
709
|
limit?: number;
|
|
710
|
+
/** A `nextCursor` from the previous answer: carries on from where that one stopped. */
|
|
711
|
+
cursor?: string;
|
|
697
712
|
/** Point-in-time for scheduling evaluation (ISO 8601). Defaults to now. */
|
|
698
713
|
at?: string;
|
|
699
714
|
/** Include records whose startsAt is in the future. Default false. */
|
|
@@ -703,8 +718,8 @@ export interface ResolveAllParams {
|
|
|
703
718
|
}
|
|
704
719
|
/**
|
|
705
720
|
* Response from the resolve-all endpoint: `items` are every applicable record sorted by precedence
|
|
706
|
-
* (most specific first), each at most once; `count` is how many were returned.
|
|
707
|
-
* `nextCursor`
|
|
721
|
+
* (most specific first), each at most once; `count` is how many were returned. When you gave a `limit`
|
|
722
|
+
* and there are more, `nextCursor` carries on from there.
|
|
708
723
|
*/
|
|
709
724
|
export interface ResolveAllResult extends ListResult<ResolveAllEntry> {
|
|
710
725
|
/** The context echoed back from the request (for verification). */
|
|
@@ -27,8 +27,8 @@ export type AppOptionsResponse =
|
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
29
|
* What `app.options.get` returns: the standard list shape plus the picker's `version` and `mode`.
|
|
30
|
-
* `count` is how many entries there are in all, where the server reports it.
|
|
31
|
-
* `nextCursor` is
|
|
30
|
+
* `count` is how many entries there are in all, where the server reports it. Entries come 50 at a time
|
|
31
|
+
* unless you give a `limit`; `nextCursor` is `null` on the last page.
|
|
32
32
|
*/
|
|
33
33
|
export type AppOptionsList =
|
|
34
34
|
/** `all`: every entry. `search`: the type is too large to send whole; these match `q`. */
|
package/dist/types/asset.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ListOptions } from './list.js';
|
|
1
|
+
import type { ListOptions, OrderBy } from './list.js';
|
|
2
2
|
/**
|
|
3
3
|
* Slim reference to an asset embedded inside product and collection documents.
|
|
4
4
|
* Use `asset.get()` with the `id` to retrieve the full `Asset` record.
|
|
@@ -177,7 +177,8 @@ export interface UploadFromUrlOptions {
|
|
|
177
177
|
/** Optional: Upload via admin route instead of public */
|
|
178
178
|
admin?: boolean;
|
|
179
179
|
}
|
|
180
|
-
|
|
180
|
+
/** `asset.list` options: the scope, an optional app, and paging (`limit`, 50 unless you say, and `cursor`). */
|
|
181
|
+
export interface ListAssetsOptions extends ListOptions {
|
|
181
182
|
scope: {
|
|
182
183
|
type: 'collection';
|
|
183
184
|
collectionId: string;
|
|
@@ -193,8 +194,6 @@ export interface ListAssetsOptions {
|
|
|
193
194
|
};
|
|
194
195
|
/** Filter by app ID */
|
|
195
196
|
appId?: string;
|
|
196
|
-
/** How many to return. These lists are not paged: there is no cursor, and `nextCursor` is always `null`. */
|
|
197
|
-
limit?: number;
|
|
198
197
|
}
|
|
199
198
|
export interface GetAssetOptions {
|
|
200
199
|
assetId: string;
|
|
@@ -236,8 +235,8 @@ export interface AdminListAssetsOptions extends ListOptions {
|
|
|
236
235
|
assetType?: 'Image' | 'Video' | 'Audio' | 'Document';
|
|
237
236
|
/** Comma-separated label filter (any match) */
|
|
238
237
|
labels?: string;
|
|
239
|
-
sort
|
|
240
|
-
|
|
238
|
+
/** What to sort by: `[{ name: 'asc' }]`. */
|
|
239
|
+
orderBy?: OrderBy<'createdAt' | 'name' | 'size' | 'assetType'>;
|
|
241
240
|
/**
|
|
242
241
|
* Also list files that are normally left out: `temporary` (not kept yet) and `derived` (text, Markdown or fields
|
|
243
242
|
* extracted from another file). Lists show only what people put there unless asked.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @see docs/attestations.md
|
|
10
10
|
*/
|
|
11
|
-
import type { ListResult, ListOptions } from './list.js';
|
|
11
|
+
import type { ListResult, ListOptions, DateRange } from './list.js';
|
|
12
12
|
/** Types of entities that can be the subject of an attestation. */
|
|
13
13
|
export type AttestationSubjectType = 'container' | 'proof' | 'product' | 'tag' | 'serial' | 'order_item' | string;
|
|
14
14
|
/**
|
|
@@ -245,10 +245,8 @@ export interface ListAttestationsParams extends ListOptions {
|
|
|
245
245
|
* public caller can never use it to widen access.
|
|
246
246
|
*/
|
|
247
247
|
moderationStatus?: AttestationModerationStatus;
|
|
248
|
-
/**
|
|
249
|
-
|
|
250
|
-
/** ISO 8601 upper bound (inclusive) */
|
|
251
|
-
recordedBefore?: string;
|
|
248
|
+
/** Recorded on or after `gte`, on or before `lte` (both inclusive). */
|
|
249
|
+
recordedAt?: DateRange;
|
|
252
250
|
}
|
|
253
251
|
export interface AttestationSummaryParams {
|
|
254
252
|
/** Required */
|
|
@@ -261,8 +259,8 @@ export interface AttestationSummaryParams {
|
|
|
261
259
|
valueField?: string;
|
|
262
260
|
/** Default `'day'` */
|
|
263
261
|
groupBy?: AttestationGroupBy;
|
|
264
|
-
|
|
265
|
-
|
|
262
|
+
/** When it was recorded: `{ gte, lte }`, the same as on the list. */
|
|
263
|
+
recordedAt?: DateRange;
|
|
266
264
|
/** Max number of buckets; default 200 */
|
|
267
265
|
limit?: number;
|
|
268
266
|
}
|
|
@@ -288,8 +286,8 @@ export interface AttestationTreeSummaryParams {
|
|
|
288
286
|
valueField?: string;
|
|
289
287
|
/** Default `'day'` */
|
|
290
288
|
groupBy?: AttestationGroupBy;
|
|
291
|
-
|
|
292
|
-
|
|
289
|
+
/** When it was recorded: `{ gte, lte }`, the same as on the list. */
|
|
290
|
+
recordedAt?: DateRange;
|
|
293
291
|
/** Max number of buckets; default 200 */
|
|
294
292
|
limit?: number;
|
|
295
293
|
/** Include container items in BFS traversal; default `true` */
|
package/dist/types/batch.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ListOptions } from './list.js';
|
|
1
2
|
/**
|
|
2
3
|
* Represents a Batch object. Dates are **ISO 8601 strings**.
|
|
3
4
|
*/
|
|
@@ -36,13 +37,12 @@ export interface BatchUpdateRequest {
|
|
|
36
37
|
[key: string]: any;
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
|
-
* Options for `batch.searchInCollection`.
|
|
40
|
-
*
|
|
40
|
+
* Options for `batch.searchInCollection`. `limit` is how many it returns (100 unless you say); when
|
|
41
|
+
* there are more, pass the answer's `nextCursor` back as `cursor`.
|
|
41
42
|
*/
|
|
42
|
-
export interface SearchBatchesRequest {
|
|
43
|
-
|
|
43
|
+
export interface SearchBatchesRequest extends ListOptions {
|
|
44
|
+
q?: string;
|
|
44
45
|
productId?: string;
|
|
45
|
-
limit?: number;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Tag/code assigned to a batch.
|
package/dist/types/bookings.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ListResult, ListOptions } from './list.js';
|
|
1
|
+
import type { ListResult, ListOptions, OrderBy } from './list.js';
|
|
2
2
|
export type BookingStatus = 'held' | 'pending' | 'confirmed' | 'completed' | 'cancelled' | 'no_show' | 'waitlisted';
|
|
3
3
|
export type BookingVisibility = 'public' | 'owner' | 'admin';
|
|
4
4
|
/** A claim on a resource's time: seats on a slot (`capacity`) or exclusive time (`exclusive`). */
|
|
@@ -58,6 +58,8 @@ export interface Booking {
|
|
|
58
58
|
* Returned ONCE — store it to let the guest view / cancel / move / confirm their booking.
|
|
59
59
|
*/
|
|
60
60
|
editToken?: string;
|
|
61
|
+
/** A paid booking's payment (read-only; absent when the booking has none). See "Paid bookings". */
|
|
62
|
+
payment?: BookingPayment;
|
|
61
63
|
}
|
|
62
64
|
export interface BookingSlot {
|
|
63
65
|
id: string;
|
|
@@ -192,8 +194,12 @@ export interface BookingListQueryParams {
|
|
|
192
194
|
limit?: number;
|
|
193
195
|
offset?: number;
|
|
194
196
|
}
|
|
195
|
-
/**
|
|
196
|
-
|
|
197
|
+
/**
|
|
198
|
+
* `bookings.list` / `bookings.mine` options: the filters, plus `limit`, `cursor` and `orderBy`
|
|
199
|
+
* (earliest start first unless you say: `[{ startsAt: 'asc' }]`).
|
|
200
|
+
*/
|
|
201
|
+
export interface BookingListOptions extends Omit<BookingListQueryParams, 'offset' | 'sort'>, ListOptions {
|
|
202
|
+
orderBy?: OrderBy<'startsAt' | 'endsAt' | 'createdAt' | 'updatedAt' | 'status' | 'ref' | 'customId' | 'sourceSystem'>;
|
|
197
203
|
}
|
|
198
204
|
export interface CreateSlotInput {
|
|
199
205
|
startsAt: string | Date;
|
|
@@ -235,8 +241,9 @@ export interface SlotListQueryParams {
|
|
|
235
241
|
limit?: number;
|
|
236
242
|
offset?: number;
|
|
237
243
|
}
|
|
238
|
-
/** `bookings.slots.list` options: the filters, plus `limit` and `
|
|
239
|
-
export interface SlotListOptions extends Omit<SlotListQueryParams, 'offset'>, ListOptions {
|
|
244
|
+
/** `bookings.slots.list` options: the filters, plus `limit`, `cursor` and `orderBy` (`[{ startsAt: 'asc' }]`). */
|
|
245
|
+
export interface SlotListOptions extends Omit<SlotListQueryParams, 'offset' | 'sort'>, ListOptions {
|
|
246
|
+
orderBy?: OrderBy<'startsAt' | 'endsAt' | 'createdAt' | 'updatedAt' | 'status' | 'capacity' | 'ref' | 'customId'>;
|
|
240
247
|
}
|
|
241
248
|
export interface CreateBlockInput {
|
|
242
249
|
resourceType: string;
|
|
@@ -325,7 +332,7 @@ export type SlotList = ListResult<BookingSlot>;
|
|
|
325
332
|
/** What `bookings.blocks.list` returns. */
|
|
326
333
|
export type BlockList = ListResult<BookingAllocation>;
|
|
327
334
|
/** Error codes a booking call can fail with (HTTP 409 unless noted). */
|
|
328
|
-
export type BookingErrorCode = 'SLOT_FULL' | 'SLOT_CLOSED' | 'RESOURCE_TAKEN' | 'PER_CONTACT_LIMIT' | 'QUANTITY_LIMIT' | 'HOLD_EXPIRED' | 'INVALID_STATE' | 'SLOT_OVERBOOKED' | 'SLOT_HAS_BOOKINGS' | 'TOO_SOON' | 'TOO_FAR_AHEAD' | 'IN_THE_PAST' | 'DURATION_NOT_ALLOWED' | 'OUTSIDE_SCHEDULE' | 'NO_SCHEDULE' | 'SCHEDULE_INVALID' | 'CUTOFF_PASSED' | 'FORBIDDEN' | 'NOT_FOUND' | 'BAD_REQUEST';
|
|
335
|
+
export type BookingErrorCode = 'SLOT_FULL' | 'SLOT_CLOSED' | 'RESOURCE_TAKEN' | 'PER_CONTACT_LIMIT' | 'QUANTITY_LIMIT' | 'HOLD_EXPIRED' | 'INVALID_STATE' | 'SLOT_OVERBOOKED' | 'SLOT_HAS_BOOKINGS' | 'TOO_SOON' | 'TOO_FAR_AHEAD' | 'IN_THE_PAST' | 'DURATION_NOT_ALLOWED' | 'OUTSIDE_SCHEDULE' | 'NO_SCHEDULE' | 'SCHEDULE_INVALID' | 'CUTOFF_PASSED' | 'FORBIDDEN' | 'NOT_FOUND' | 'BAD_REQUEST' | 'PAYMENT_REQUIRED' | 'PAYMENTS_NOT_READY' | 'PRICE_MISMATCH' | 'NOT_PAID' | 'PRICE_NOT_FOUND' | 'PAYMENT_REFUSED' | 'PAYMENTS_NOT_CONFIGURED';
|
|
329
336
|
export interface ScheduleHours {
|
|
330
337
|
/** 'HH:MM' (24h) */
|
|
331
338
|
start: string;
|
|
@@ -350,3 +357,99 @@ export interface StandardSchedule {
|
|
|
350
357
|
/** Dated exceptions; the last matching one wins over `weekly`. */
|
|
351
358
|
overrides?: ScheduleOverride[];
|
|
352
359
|
}
|
|
360
|
+
/** One priced line of a paid booking. Amounts are minor units (pence, cents). */
|
|
361
|
+
export interface BookingPaymentLine {
|
|
362
|
+
priceId: string;
|
|
363
|
+
label: string;
|
|
364
|
+
unitAmount: number;
|
|
365
|
+
quantity: number;
|
|
366
|
+
}
|
|
367
|
+
/** A booking's payment, as every booking response shows it (built from the server's own record). */
|
|
368
|
+
export interface BookingPayment {
|
|
369
|
+
status: 'awaiting' | 'paid' | 'partially_refunded' | 'refunded' | 'waived';
|
|
370
|
+
total: number;
|
|
371
|
+
currency: string;
|
|
372
|
+
refunded: number;
|
|
373
|
+
lines: BookingPaymentLine[];
|
|
374
|
+
paidAt?: string;
|
|
375
|
+
/** An approved request: pay by then, or the place goes back. */
|
|
376
|
+
payBy?: string;
|
|
377
|
+
/** An approved request waiting for its payment. */
|
|
378
|
+
requested?: boolean;
|
|
379
|
+
/** The pay link of an approved request (the booker and staff only). */
|
|
380
|
+
link?: string;
|
|
381
|
+
}
|
|
382
|
+
/** A price, in a slot's `data.prices` (ticket types) or the app's `bookingPayments.prices` (services). */
|
|
383
|
+
export interface BookingPrice {
|
|
384
|
+
id: string;
|
|
385
|
+
label: string;
|
|
386
|
+
/** Minor units (pence). 0 = free. */
|
|
387
|
+
amount: number;
|
|
388
|
+
/** Appointments: the booked length must be this. */
|
|
389
|
+
durationMinutes?: number;
|
|
390
|
+
/** Appointments: only these resources (staff, rooms) offer it; empty = all. */
|
|
391
|
+
resourceIds?: string[];
|
|
392
|
+
}
|
|
393
|
+
/** The app's `bookingPayments` config (sites/{collectionId}/apps/{appId}), written by admins only. */
|
|
394
|
+
export interface BookingPaymentsConfig {
|
|
395
|
+
/** Close the free way in: a plain create of a priced booking fails with PAYMENT_REQUIRED. */
|
|
396
|
+
required?: boolean;
|
|
397
|
+
currency?: string;
|
|
398
|
+
/** Appointments' price list (slots carry their own `data.prices`). */
|
|
399
|
+
prices?: BookingPrice[];
|
|
400
|
+
/** How long the person has on Stripe's page, 30–120 (default 30). The place is held 10 minutes longer. */
|
|
401
|
+
sessionMinutes?: number;
|
|
402
|
+
/** The booker cancelling a paid booking: 'full' refund (default) or 'none'. */
|
|
403
|
+
ownerCancelRefund?: 'full' | 'none';
|
|
404
|
+
/** Requests: hours to pay once approved, 1–168 (default 48). */
|
|
405
|
+
payWithinHours?: number;
|
|
406
|
+
/** Where Stripe sends the person back; `{CHECKOUT_SESSION_ID}` (or `session_id` added) for bySession. */
|
|
407
|
+
successUrl?: string;
|
|
408
|
+
cancelUrl?: string;
|
|
409
|
+
/** Other hosts a page may pass as successUrl / cancelUrl. */
|
|
410
|
+
allowedHosts?: string[];
|
|
411
|
+
}
|
|
412
|
+
export interface BookingPriceLine {
|
|
413
|
+
priceId: string;
|
|
414
|
+
quantity?: number;
|
|
415
|
+
}
|
|
416
|
+
export interface BookingCheckoutInput extends CreateBookingInput {
|
|
417
|
+
/** Ticket types on a slot: the quantities add up to the places taken. */
|
|
418
|
+
lines?: BookingPriceLine[];
|
|
419
|
+
/** An appointment's service (from the price list), or a slot's only ticket type. */
|
|
420
|
+
priceId?: string;
|
|
421
|
+
/** For Stripe's receipt. */
|
|
422
|
+
email?: string;
|
|
423
|
+
/** Default: the app's bookingPayments.successUrl / cancelUrl. Must be on the business's own hosts. */
|
|
424
|
+
successUrl?: string;
|
|
425
|
+
cancelUrl?: string;
|
|
426
|
+
/** A guest's details (as for create): gives them a contact for the confirmation email. */
|
|
427
|
+
customer?: {
|
|
428
|
+
email?: string;
|
|
429
|
+
phone?: string;
|
|
430
|
+
name?: string;
|
|
431
|
+
[k: string]: any;
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
export interface BookingCheckoutResult {
|
|
435
|
+
booking: Booking;
|
|
436
|
+
/** Anonymous guests, once (as for create). */
|
|
437
|
+
editToken?: string;
|
|
438
|
+
/** Go here to pay. null for a free booking, or a request (pay link once approved). */
|
|
439
|
+
checkoutUrl: string | null;
|
|
440
|
+
expiresAt: string | null;
|
|
441
|
+
/** Minor units; 0 when free. */
|
|
442
|
+
total: number;
|
|
443
|
+
currency: string | null;
|
|
444
|
+
/** A request waiting for approval: "we'll email you a link to pay once it's confirmed". */
|
|
445
|
+
request?: boolean;
|
|
446
|
+
}
|
|
447
|
+
export interface BookingPayLinkResult {
|
|
448
|
+
checkoutUrl?: string;
|
|
449
|
+
done?: 'paid' | 'closed';
|
|
450
|
+
url?: string | null;
|
|
451
|
+
}
|
|
452
|
+
export type BookingRefundResult = Booking & {
|
|
453
|
+
refunded: number;
|
|
454
|
+
refundPending: boolean;
|
|
455
|
+
};
|
package/dist/types/comms.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IdField } from './common.js';
|
|
2
2
|
import type { BroadcastChannel } from './broadcasts.js';
|
|
3
|
-
import type { ListResult } from './list.js';
|
|
3
|
+
import type { ListResult, ListOptions } from './list.js';
|
|
4
4
|
/**
|
|
5
5
|
* Target subject for notifications (product, collection, etc.)
|
|
6
6
|
*/
|
|
@@ -23,25 +23,25 @@ export interface CommunicationEvent {
|
|
|
23
23
|
templateId?: string | null;
|
|
24
24
|
[k: string]: any;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
/** `comms.queryByUser` options: who, the time window (`from` / `to`), plus `limit` and `cursor`. */
|
|
27
|
+
export interface CommsQueryByUser extends ListOptions {
|
|
27
28
|
userId?: string;
|
|
28
29
|
contactId?: string;
|
|
29
30
|
from?: string;
|
|
30
31
|
to?: string;
|
|
31
|
-
limit?: number;
|
|
32
32
|
}
|
|
33
33
|
export type RecipientId = string;
|
|
34
34
|
export interface RecipientWithOutcome {
|
|
35
35
|
id: string;
|
|
36
36
|
outcome: string;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
/** `comms.queryRecipientIds` options: the source, the time window (`from` / `to`), plus `limit` and `cursor`. */
|
|
39
|
+
export interface CommsRecipientIdsQuery extends ListOptions {
|
|
39
40
|
broadcastId?: string;
|
|
40
41
|
journeyId?: string;
|
|
41
42
|
idField?: IdField;
|
|
42
43
|
from?: string;
|
|
43
44
|
to?: string;
|
|
44
|
-
limit?: number;
|
|
45
45
|
}
|
|
46
46
|
/** Who a broadcast or journey reached that did NOT then do an interaction. */
|
|
47
47
|
export interface CommsRecipientsWithoutInteractionQuery {
|
|
@@ -54,6 +54,8 @@ export interface CommsRecipientsWithoutInteractionQuery {
|
|
|
54
54
|
from?: string;
|
|
55
55
|
to?: string;
|
|
56
56
|
limit?: number;
|
|
57
|
+
/** A `nextCursor` from the previous page. */
|
|
58
|
+
cursor?: string;
|
|
57
59
|
}
|
|
58
60
|
/** Who a broadcast or journey reached that then did an interaction. */
|
|
59
61
|
export interface CommsRecipientsWithInteractionQuery {
|
|
@@ -68,6 +70,8 @@ export interface CommsRecipientsWithInteractionQuery {
|
|
|
68
70
|
from?: string;
|
|
69
71
|
to?: string;
|
|
70
72
|
limit?: number;
|
|
73
|
+
/** A `nextCursor` from the previous page. */
|
|
74
|
+
cursor?: string;
|
|
71
75
|
}
|
|
72
76
|
export interface LogCommunicationEventBody {
|
|
73
77
|
broadcastId?: string;
|
package/dist/types/contact.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ListResult, ListOptions } from "./list.js";
|
|
1
|
+
import type { ListResult, ListOptions, DateRange } from "./list.js";
|
|
2
2
|
export type ContactCustomFields = Record<string, any>;
|
|
3
3
|
export interface Contact {
|
|
4
4
|
contactId: string;
|
|
@@ -83,7 +83,10 @@ export interface ContactLinkLoginResponse {
|
|
|
83
83
|
}
|
|
84
84
|
/** `error` codes `contact.merge` can refuse with. */
|
|
85
85
|
export type ContactMergeErrorCode = "INVALID_CONTACT" | "SAME_CONTACT" | "NOT_FOUND" | "KEEP_DELETED" | "LOGIN_CONFLICT" | "LOYALTY_CONFLICT";
|
|
86
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* `contact.search` options: the collection, the filters, plus `limit` and `cursor`. Free text is `q`;
|
|
88
|
+
* the creation date is a range, `createdAt: { gte, lte }`.
|
|
89
|
+
*/
|
|
87
90
|
export interface ContactSearchParams extends ListOptions {
|
|
88
91
|
collectionId: string;
|
|
89
92
|
q?: string;
|
|
@@ -96,8 +99,8 @@ export interface ContactSearchParams extends ListOptions {
|
|
|
96
99
|
tagsAll?: string | string[];
|
|
97
100
|
source?: string;
|
|
98
101
|
locale?: string;
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
/** When the contact was created: on or after `gte`, on or before `lte`. */
|
|
103
|
+
createdAt?: DateRange;
|
|
101
104
|
externalIdKey?: string;
|
|
102
105
|
externalIdValue?: string;
|
|
103
106
|
customFieldKey?: string;
|
|
@@ -180,7 +180,8 @@ export interface ListContainerItemsParams extends ListOptions {
|
|
|
180
180
|
/** When `true`, include removed items (full membership log); default `false` */
|
|
181
181
|
history?: boolean;
|
|
182
182
|
}
|
|
183
|
-
|
|
183
|
+
/** `containers.findForItem` options: the item to look for, plus `limit` (default 50) and `cursor`. */
|
|
184
|
+
export interface FindContainersForItemParams extends ListOptions {
|
|
184
185
|
/** Required */
|
|
185
186
|
itemType: ContainerItemType;
|
|
186
187
|
/** Required: a tag's id, or an item's proof id (or its uid, `itm_…`) */
|
package/dist/types/facets.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JsonValue, ProductQueryRequest } from "./product.js";
|
|
2
|
-
import type { ListResult } from "./list.js";
|
|
2
|
+
import type { ListResult, ListOptions, DateRange } from "./list.js";
|
|
3
3
|
export interface FacetDefinition {
|
|
4
4
|
id?: string;
|
|
5
5
|
orgId?: string;
|
|
@@ -81,11 +81,22 @@ export interface FacetValueResponse {
|
|
|
81
81
|
facet: FacetDefinition;
|
|
82
82
|
item: FacetValue;
|
|
83
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Body for `facets.query` / `facets.publicQuery`: which facets to count, and which products to count
|
|
86
|
+
* them over (`q`, `createdAt`, `updatedAt` and the filters in `query`, as in `products.query`). The answer
|
|
87
|
+
* is always complete, so there is no `limit` or `cursor`.
|
|
88
|
+
*/
|
|
84
89
|
export interface FacetQueryRequest {
|
|
85
90
|
facetKeys?: string[];
|
|
86
91
|
includeEmpty?: boolean;
|
|
87
92
|
includeDeleted?: boolean;
|
|
88
93
|
namespace?: string | null;
|
|
94
|
+
/** Search text: count only products that match it. */
|
|
95
|
+
q?: string;
|
|
96
|
+
/** Count only products created in this range. */
|
|
97
|
+
createdAt?: DateRange;
|
|
98
|
+
/** Count only products last updated in this range. */
|
|
99
|
+
updatedAt?: DateRange;
|
|
89
100
|
query?: ProductQueryRequest["query"] & {
|
|
90
101
|
facetEquals?: Record<string, JsonValue | JsonValue[]>;
|
|
91
102
|
};
|
|
@@ -125,7 +136,8 @@ export interface FacetGetParams {
|
|
|
125
136
|
includeValues?: boolean;
|
|
126
137
|
includeDeleted?: boolean;
|
|
127
138
|
}
|
|
128
|
-
|
|
139
|
+
/** `facets.listValues` options: `includeDeleted`, plus `limit` (default 50) and `cursor`. */
|
|
140
|
+
export interface FacetValueListParams extends ListOptions {
|
|
129
141
|
includeDeleted?: boolean;
|
|
130
142
|
}
|
|
131
143
|
export interface FacetValueGetParams {
|
package/dist/types/files.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Asset } from "./asset.js";
|
|
2
|
+
import type { ListOptions } from "./list.js";
|
|
2
3
|
/**
|
|
3
4
|
* A file: an asset that's temporary, fetched from an address, extracted from another file, or made by something.
|
|
4
5
|
* Files are private until kept, and stay out of asset lists (pickers, the Hub, the portal) unless kept.
|
|
@@ -33,13 +34,13 @@ export interface FetchedFile extends FileRecord {
|
|
|
33
34
|
/** True when the source answered "not changed" (the same file is returned). */
|
|
34
35
|
unchanged?: boolean;
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
+
/** `files.list` options: the filters, plus `limit` and `cursor`. */
|
|
38
|
+
export interface ListFilesQuery extends ListOptions {
|
|
37
39
|
origin?: "upload" | "fetched" | "derived" | "generated";
|
|
38
40
|
retention?: "temporary" | "permanent";
|
|
39
41
|
appId?: string;
|
|
40
42
|
/** The results extracted from one file. */
|
|
41
43
|
derivedFromId?: string;
|
|
42
|
-
limit?: number;
|
|
43
44
|
}
|
|
44
45
|
export interface ExtractFileRequest {
|
|
45
46
|
variant: FileExtractVariant;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export * from "./appManifest.js";
|
|
|
45
45
|
export * from "./appObjects.js";
|
|
46
46
|
export * from "./bookings.js";
|
|
47
47
|
export * from "./shop.js";
|
|
48
|
+
export * from "./payments.js";
|
|
48
49
|
export * from "./subscriptions.js";
|
|
49
50
|
export * from "./loyalty.js";
|
|
50
51
|
export * from "./translations.js";
|
package/dist/types/index.js
CHANGED
|
@@ -47,6 +47,7 @@ export * from "./appManifest.js";
|
|
|
47
47
|
export * from "./appObjects.js";
|
|
48
48
|
export * from "./bookings.js";
|
|
49
49
|
export * from "./shop.js";
|
|
50
|
+
export * from "./payments.js";
|
|
50
51
|
export * from "./subscriptions.js";
|
|
51
52
|
export * from "./loyalty.js";
|
|
52
53
|
export * from "./translations.js";
|
|
@@ -266,7 +266,8 @@ export interface CreateFlowInput {
|
|
|
266
266
|
export type UpdateFlowInput = Partial<Omit<CreateFlowInput, 'direction'>> & {
|
|
267
267
|
status?: FlowStatus;
|
|
268
268
|
};
|
|
269
|
-
|
|
269
|
+
/** `integrations.listFlows` options: the filters, plus `limit` and `cursor`. */
|
|
270
|
+
export interface ListFlowsQuery extends ListOptions {
|
|
270
271
|
direction?: FlowDirection;
|
|
271
272
|
status?: FlowStatus;
|
|
272
273
|
appId?: string;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { IdField } from './common.js';
|
|
2
|
-
import type { ListOptions } from './list.js';
|
|
3
|
-
|
|
2
|
+
import type { ListOptions, OrderBy } from './list.js';
|
|
3
|
+
/**
|
|
4
|
+
* Options for interactions.query(): the filters, the time window (`from` / `to`), plus `limit` and
|
|
5
|
+
* `cursor` to page the list.
|
|
6
|
+
*/
|
|
7
|
+
export interface AdminInteractionsQueryRequest extends ListOptions {
|
|
4
8
|
userId?: string;
|
|
5
9
|
contactId?: string;
|
|
6
10
|
appId?: string;
|
|
@@ -11,11 +15,12 @@ export interface AdminInteractionsQueryRequest {
|
|
|
11
15
|
outcome?: string | null;
|
|
12
16
|
from?: string;
|
|
13
17
|
to?: string;
|
|
14
|
-
limit?: number;
|
|
15
18
|
includeDeleted?: boolean;
|
|
16
19
|
latestPerEventId?: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
/** Sort by the event's time: `[{ timestamp: 'asc' }]` or `[{ timestamp: 'desc' }]`. */
|
|
21
|
+
orderBy?: OrderBy<'timestamp'>;
|
|
22
|
+
/** Bring each event's interaction type along: `['interaction']`. */
|
|
23
|
+
expand?: Array<'interaction'>;
|
|
19
24
|
}
|
|
20
25
|
export interface AdminInteractionsCountsByOutcomeRequest {
|
|
21
26
|
appId?: string;
|
|
@@ -69,12 +74,15 @@ export interface PublicInteractionsCountsByOutcomeRequest {
|
|
|
69
74
|
to?: string;
|
|
70
75
|
limit?: number;
|
|
71
76
|
}
|
|
72
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Options for interactions.publicMyInteractions(): the filters, the time window (`from` / `to`), plus
|
|
79
|
+
* `limit` and `cursor` to page the list.
|
|
80
|
+
*/
|
|
81
|
+
export interface PublicInteractionsByUserRequest extends ListOptions {
|
|
73
82
|
appId?: string;
|
|
74
83
|
interactionId?: string;
|
|
75
84
|
from?: string;
|
|
76
85
|
to?: string;
|
|
77
|
-
limit?: number;
|
|
78
86
|
}
|
|
79
87
|
export interface InteractionEventRow {
|
|
80
88
|
orgId: string;
|
package/dist/types/jobs.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface Job {
|
|
|
14
14
|
queueName: string | null;
|
|
15
15
|
status: JobStatus;
|
|
16
16
|
}
|
|
17
|
-
/** Options for jobs.
|
|
17
|
+
/** Options for jobs.list(): `limit` and `cursor` page the list. */
|
|
18
18
|
export interface ListJobsQuery extends ListOptions {
|
|
19
19
|
state?: JobStatus;
|
|
20
20
|
task?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IdField } from './common.js';
|
|
2
|
+
import type { ListOptions } from './list.js';
|
|
2
3
|
export interface JourneyStatsRequest {
|
|
3
4
|
idField?: IdField;
|
|
4
5
|
from?: string;
|
|
@@ -24,14 +25,14 @@ export interface JourneyStatsResponse {
|
|
|
24
25
|
pending: number;
|
|
25
26
|
}>;
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
/** `journeysAnalytics.recipients` options: the filters, the time window (`from` / `to`), plus `limit` and `cursor`. */
|
|
29
|
+
export interface JourneyStepRecipientsRequest extends ListOptions {
|
|
28
30
|
status?: 'entered' | 'completed' | 'pending';
|
|
29
31
|
idField?: IdField;
|
|
30
32
|
interactionId?: string;
|
|
31
33
|
outcome?: string;
|
|
32
34
|
from?: string;
|
|
33
35
|
to?: string;
|
|
34
|
-
limit?: number;
|
|
35
36
|
}
|
|
36
37
|
export interface JourneyFunnelReportRequest {
|
|
37
38
|
idField?: IdField;
|