@proveanything/smartlinks 2.1.34 → 2.1.37
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/dist/api/containers.d.ts +2 -1
- package/dist/api/containers.js +2 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/shop.d.ts +106 -0
- package/dist/api/shop.js +171 -0
- package/dist/api/wallet.d.ts +17 -0
- package/dist/api/wallet.js +13 -0
- package/dist/docs/API_SUMMARY.md +397 -22
- package/dist/docs/auth-kit.md +6 -0
- package/dist/docs/overview.md +481 -480
- package/dist/docs/shop.md +176 -0
- package/dist/docs/wallet-passes.md +20 -0
- package/dist/openapi.yaml +668 -3
- package/dist/types/authKit.d.ts +5 -1
- package/dist/types/containers.d.ts +7 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/product.d.ts +5 -0
- package/dist/types/proof.d.ts +5 -0
- package/dist/types/shop.d.ts +377 -0
- package/dist/types/shop.js +5 -0
- package/dist/types/tags.d.ts +9 -2
- package/dist/types/wallet.d.ts +10 -0
- package/docs/API_SUMMARY.md +397 -22
- package/docs/auth-kit.md +6 -0
- package/docs/overview.md +481 -480
- package/docs/shop.md +176 -0
- package/docs/wallet-passes.md +20 -0
- package/openapi.yaml +668 -3
- package/package.json +1 -1
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.37 | Generated: 2026-11-21T13:39:32.434Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -166,6 +166,7 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
166
166
|
- **realtime** - Functions for realtime operations
|
|
167
167
|
- **research** - Functions for research operations
|
|
168
168
|
- **secrets** - Functions for secrets operations
|
|
169
|
+
- **shop** - Functions for shop operations
|
|
169
170
|
- **tagCodes** - Functions for tagCodes operations
|
|
170
171
|
- **tags** - Functions for tags operations
|
|
171
172
|
- **template** - Functions for template operations
|
|
@@ -5329,6 +5330,8 @@ interface AuthKitConfig {
|
|
|
5329
5330
|
afterSignInUrl?: string
|
|
5330
5331
|
allowedRedirectDomains?: string[]
|
|
5331
5332
|
texts?: Partial<Record<AuthKitTextKey, string>>
|
|
5333
|
+
textsLanguage?: string
|
|
5334
|
+
textsByLanguage?: Record<string, Partial<Record<AuthKitTextKey, string>>>
|
|
5332
5335
|
emailTemplates?: Partial<Record<AuthKitEmailKind, AuthKitEmailTemplate>>
|
|
5333
5336
|
emailBranding?: { logoUrl?: string; buttonColor?: string; footerHtml?: string }
|
|
5334
5337
|
secrets?: Record<string, { ref: string; hint?: string | null; collectionId?: string; setAt?: string }>
|
|
@@ -7922,6 +7925,7 @@ interface ContainerItem {
|
|
|
7922
7925
|
itemId: string
|
|
7923
7926
|
productId?: string
|
|
7924
7927
|
proofId?: string
|
|
7928
|
+
itemUid?: string | null
|
|
7925
7929
|
addedAt: string
|
|
7926
7930
|
removedAt?: string
|
|
7927
7931
|
metadata?: Record<string, any>
|
|
@@ -8060,12 +8064,13 @@ interface ListContainerItemsParams {
|
|
|
8060
8064
|
interface FindContainersForItemParams {
|
|
8061
8065
|
itemType: ContainerItemType
|
|
8062
8066
|
itemId: string
|
|
8067
|
+
productId?: string
|
|
8063
8068
|
}
|
|
8064
8069
|
```
|
|
8065
8070
|
|
|
8066
8071
|
**ContainerStatus** = `'active' | 'archived' | string`
|
|
8067
8072
|
|
|
8068
|
-
**ContainerItemType** = `'tag' | 'proof'
|
|
8073
|
+
**ContainerItemType** = `'tag' | 'proof'`
|
|
8069
8074
|
|
|
8070
8075
|
### crate
|
|
8071
8076
|
|
|
@@ -11289,6 +11294,7 @@ interface Proof {
|
|
|
11289
11294
|
collectionId: string
|
|
11290
11295
|
createdAt: string
|
|
11291
11296
|
id: string
|
|
11297
|
+
uid?: string | null
|
|
11292
11298
|
productId: string
|
|
11293
11299
|
tokenId: string
|
|
11294
11300
|
userId: string
|
|
@@ -11770,6 +11776,294 @@ interface SegmentRecipientsResponse {
|
|
|
11770
11776
|
|
|
11771
11777
|
**SegmentFilterRule** = ``
|
|
11772
11778
|
|
|
11779
|
+
### shop
|
|
11780
|
+
|
|
11781
|
+
**ShopPrice** (interface)
|
|
11782
|
+
```typescript
|
|
11783
|
+
interface ShopPrice {
|
|
11784
|
+
id: string
|
|
11785
|
+
collectionId: string
|
|
11786
|
+
productId: string
|
|
11787
|
+
variantId: string | null
|
|
11788
|
+
appId: string
|
|
11789
|
+
currency: string
|
|
11790
|
+
amount: number
|
|
11791
|
+
compareAtAmount: number | null
|
|
11792
|
+
delivery: ShopDelivery
|
|
11793
|
+
deliveryConfig: ShopDeliveryConfig | Record<string, never>
|
|
11794
|
+
trackStock: boolean
|
|
11795
|
+
active: boolean
|
|
11796
|
+
sort: number
|
|
11797
|
+
metadata: Record<string, any>
|
|
11798
|
+
createdAt: string
|
|
11799
|
+
updatedAt: string
|
|
11800
|
+
}
|
|
11801
|
+
```
|
|
11802
|
+
|
|
11803
|
+
**ShopPriceInput** (interface)
|
|
11804
|
+
```typescript
|
|
11805
|
+
interface ShopPriceInput {
|
|
11806
|
+
productId: string
|
|
11807
|
+
variantId?: string | null
|
|
11808
|
+
appId?: string
|
|
11809
|
+
currency?: string
|
|
11810
|
+
amount: number
|
|
11811
|
+
compareAtAmount?: number | null
|
|
11812
|
+
delivery?: ShopDelivery
|
|
11813
|
+
deliveryConfig?: ShopDeliveryConfig
|
|
11814
|
+
trackStock?: boolean
|
|
11815
|
+
active?: boolean
|
|
11816
|
+
sort?: number
|
|
11817
|
+
metadata?: Record<string, any>
|
|
11818
|
+
}
|
|
11819
|
+
```
|
|
11820
|
+
|
|
11821
|
+
**ShopPriceListParams** (interface)
|
|
11822
|
+
```typescript
|
|
11823
|
+
interface ShopPriceListParams {
|
|
11824
|
+
productId?: string
|
|
11825
|
+
currency?: string
|
|
11826
|
+
active?: boolean
|
|
11827
|
+
appId?: string
|
|
11828
|
+
limit?: number
|
|
11829
|
+
offset?: number
|
|
11830
|
+
}
|
|
11831
|
+
```
|
|
11832
|
+
|
|
11833
|
+
**ShopShippingRate** (interface)
|
|
11834
|
+
```typescript
|
|
11835
|
+
interface ShopShippingRate {
|
|
11836
|
+
id: string
|
|
11837
|
+
label: string
|
|
11838
|
+
amount: number
|
|
11839
|
+
days?: string
|
|
11840
|
+
}
|
|
11841
|
+
```
|
|
11842
|
+
|
|
11843
|
+
**ShopSettings** (interface)
|
|
11844
|
+
```typescript
|
|
11845
|
+
interface ShopSettings {
|
|
11846
|
+
currency: string
|
|
11847
|
+
appId: string
|
|
11848
|
+
seller: { name?: string; address?: string; email?: string; phone?: string; vatNumber?: string }
|
|
11849
|
+
vat: { registered: boolean; rate: number }
|
|
11850
|
+
shipping: {
|
|
11851
|
+
rates: ShopShippingRate[]
|
|
11852
|
+
freeOver: number | null
|
|
11853
|
+
collection: { label: string } | null
|
|
11854
|
+
}
|
|
11855
|
+
policies: { returns?: string; terms?: string; privacy?: string }
|
|
11856
|
+
stripe: { accountId: string | null }
|
|
11857
|
+
stockContainerId: string | null
|
|
11858
|
+
checkout: {
|
|
11859
|
+
successUrl: string | null
|
|
11860
|
+
cancelUrl: string | null
|
|
11861
|
+
expiresMinutes: number
|
|
11862
|
+
allowedHosts: string[]
|
|
11863
|
+
}
|
|
11864
|
+
digital: { euBuyers: boolean }
|
|
11865
|
+
interaction: { interactionId: string | null }
|
|
11866
|
+
}
|
|
11867
|
+
```
|
|
11868
|
+
|
|
11869
|
+
**ShopReadiness** (interface)
|
|
11870
|
+
```typescript
|
|
11871
|
+
interface ShopReadiness {
|
|
11872
|
+
ready: boolean
|
|
11873
|
+
missing: { key: string; text: string }[]
|
|
11874
|
+
}
|
|
11875
|
+
```
|
|
11876
|
+
|
|
11877
|
+
**ShopConnectStatus** (interface)
|
|
11878
|
+
```typescript
|
|
11879
|
+
interface ShopConnectStatus {
|
|
11880
|
+
connected: boolean
|
|
11881
|
+
chargesEnabled?: boolean
|
|
11882
|
+
detailsSubmitted?: boolean
|
|
11883
|
+
payoutsEnabled?: boolean
|
|
11884
|
+
id?: string
|
|
11885
|
+
}
|
|
11886
|
+
```
|
|
11887
|
+
|
|
11888
|
+
**ShopPublicConfig** (interface)
|
|
11889
|
+
```typescript
|
|
11890
|
+
interface ShopPublicConfig {
|
|
11891
|
+
currency: string
|
|
11892
|
+
seller: { name: string | null; address: string | null; email: string | null; vatNumber?: string }
|
|
11893
|
+
vat: { registered: boolean; rate: number }
|
|
11894
|
+
shipping: ShopSettings['shipping']
|
|
11895
|
+
policies: ShopSettings['policies']
|
|
11896
|
+
digital: { euBuyers: boolean }
|
|
11897
|
+
ready: boolean
|
|
11898
|
+
}
|
|
11899
|
+
```
|
|
11900
|
+
|
|
11901
|
+
**ShopProduct** (interface)
|
|
11902
|
+
```typescript
|
|
11903
|
+
interface ShopProduct {
|
|
11904
|
+
priceId: string
|
|
11905
|
+
productId: string
|
|
11906
|
+
variantId: string | null
|
|
11907
|
+
name: string
|
|
11908
|
+
description: string | null
|
|
11909
|
+
heroImage: any
|
|
11910
|
+
amount: number
|
|
11911
|
+
compareAtAmount: number | null
|
|
11912
|
+
currency: string
|
|
11913
|
+
delivery: ShopDelivery
|
|
11914
|
+
deliveryKind: ShopDigitalKind | null
|
|
11915
|
+
needsSignIn: boolean
|
|
11916
|
+
available: number | null
|
|
11917
|
+
inStock: boolean
|
|
11918
|
+
}
|
|
11919
|
+
```
|
|
11920
|
+
|
|
11921
|
+
**ShopCheckoutLine** (interface)
|
|
11922
|
+
```typescript
|
|
11923
|
+
interface ShopCheckoutLine {
|
|
11924
|
+
productId: string
|
|
11925
|
+
variantId?: string | null
|
|
11926
|
+
quantity?: number
|
|
11927
|
+
}
|
|
11928
|
+
```
|
|
11929
|
+
|
|
11930
|
+
**ShopCheckoutInput** (interface)
|
|
11931
|
+
```typescript
|
|
11932
|
+
interface ShopCheckoutInput {
|
|
11933
|
+
lines: ShopCheckoutLine[]
|
|
11934
|
+
shippingRateId?: string
|
|
11935
|
+
email?: string
|
|
11936
|
+
successUrl?: string
|
|
11937
|
+
cancelUrl?: string
|
|
11938
|
+
acceptances?: { digitalImmediate?: boolean }
|
|
11939
|
+
}
|
|
11940
|
+
```
|
|
11941
|
+
|
|
11942
|
+
**ShopCheckoutResult** (interface)
|
|
11943
|
+
```typescript
|
|
11944
|
+
interface ShopCheckoutResult {
|
|
11945
|
+
orderId: string
|
|
11946
|
+
checkoutUrl: string
|
|
11947
|
+
expiresAt: string
|
|
11948
|
+
total: number
|
|
11949
|
+
currency: string
|
|
11950
|
+
}
|
|
11951
|
+
```
|
|
11952
|
+
|
|
11953
|
+
**ShopOrderLine** (interface)
|
|
11954
|
+
```typescript
|
|
11955
|
+
interface ShopOrderLine {
|
|
11956
|
+
id: string
|
|
11957
|
+
productId: string
|
|
11958
|
+
variantId: string | null
|
|
11959
|
+
name: string | null
|
|
11960
|
+
quantity: number
|
|
11961
|
+
unitAmount: number | null
|
|
11962
|
+
lineTotal: number | null
|
|
11963
|
+
delivery: ShopDelivery | null
|
|
11964
|
+
deliveryKind: ShopDigitalKind | null
|
|
11965
|
+
quantityDone: number
|
|
11966
|
+
quantityRefunded: number
|
|
11967
|
+
priceId: string | null
|
|
11968
|
+
appId: string
|
|
11969
|
+
files?: string[]
|
|
11970
|
+
fee?: { bps: number; amount: number }
|
|
11971
|
+
}
|
|
11972
|
+
```
|
|
11973
|
+
|
|
11974
|
+
**ShopShipment** (interface)
|
|
11975
|
+
```typescript
|
|
11976
|
+
interface ShopShipment {
|
|
11977
|
+
id: string
|
|
11978
|
+
at: string
|
|
11979
|
+
lines: { itemId: string; quantity: number }[]
|
|
11980
|
+
carrier?: string
|
|
11981
|
+
trackingNumber?: string
|
|
11982
|
+
trackingUrl?: string
|
|
11983
|
+
}
|
|
11984
|
+
```
|
|
11985
|
+
|
|
11986
|
+
**ShopOrder** (interface)
|
|
11987
|
+
```typescript
|
|
11988
|
+
interface ShopOrder {
|
|
11989
|
+
id: string
|
|
11990
|
+
collectionId: string
|
|
11991
|
+
orderRef: string | null
|
|
11992
|
+
status: ShopOrderStatus
|
|
11993
|
+
source: 'shop'
|
|
11994
|
+
contactId: string | null
|
|
11995
|
+
currency: string
|
|
11996
|
+
subtotal: number | null
|
|
11997
|
+
shipping: number | null
|
|
11998
|
+
tax: number | null
|
|
11999
|
+
total: number | null
|
|
12000
|
+
refunded: number
|
|
12001
|
+
paidAt: string | null
|
|
12002
|
+
expiresAt: string | null
|
|
12003
|
+
createdAt: string
|
|
12004
|
+
updatedAt: string
|
|
12005
|
+
email: string | null
|
|
12006
|
+
shippingChoice: ShopShippingRate | null
|
|
12007
|
+
shippingAddress: Record<string, any> | null
|
|
12008
|
+
shipments: ShopShipment[]
|
|
12009
|
+
lines: ShopOrderLine[]
|
|
12010
|
+
}
|
|
12011
|
+
```
|
|
12012
|
+
|
|
12013
|
+
**ShopOrderListParams** (interface)
|
|
12014
|
+
```typescript
|
|
12015
|
+
interface ShopOrderListParams {
|
|
12016
|
+
status?: string
|
|
12017
|
+
contactId?: string
|
|
12018
|
+
includeExpired?: boolean
|
|
12019
|
+
limit?: number
|
|
12020
|
+
offset?: number
|
|
12021
|
+
}
|
|
12022
|
+
```
|
|
12023
|
+
|
|
12024
|
+
**ShopPage<T>** (interface)
|
|
12025
|
+
```typescript
|
|
12026
|
+
interface ShopPage<T> {
|
|
12027
|
+
items: T[]
|
|
12028
|
+
total: number
|
|
12029
|
+
limit: number
|
|
12030
|
+
offset: number
|
|
12031
|
+
}
|
|
12032
|
+
```
|
|
12033
|
+
|
|
12034
|
+
**ShopShipInput** (interface)
|
|
12035
|
+
```typescript
|
|
12036
|
+
interface ShopShipInput {
|
|
12037
|
+
lines?: { itemId: string; quantity?: number }[]
|
|
12038
|
+
carrier?: string
|
|
12039
|
+
trackingNumber?: string
|
|
12040
|
+
trackingUrl?: string
|
|
12041
|
+
}
|
|
12042
|
+
```
|
|
12043
|
+
|
|
12044
|
+
**ShopRefundInput** (interface)
|
|
12045
|
+
```typescript
|
|
12046
|
+
interface ShopRefundInput {
|
|
12047
|
+
lines?: { itemId: string; quantity?: number }[]
|
|
12048
|
+
shipping?: boolean
|
|
12049
|
+
amount?: number
|
|
12050
|
+
restock?: boolean
|
|
12051
|
+
reason?: string
|
|
12052
|
+
}
|
|
12053
|
+
```
|
|
12054
|
+
|
|
12055
|
+
**ShopDelivery** = `'physical' | 'digital'`
|
|
12056
|
+
|
|
12057
|
+
**ShopDigitalKind** = `'proof' | 'download' | 'access' | 'app'`
|
|
12058
|
+
|
|
12059
|
+
**ShopDeliveryConfig** = ``
|
|
12060
|
+
|
|
12061
|
+
**ShopPriceUpdate** = `Partial<Omit<ShopPriceInput, 'productId' | 'variantId' | 'currency'>>`
|
|
12062
|
+
|
|
12063
|
+
**ShopSettingsPatch** = `Partial<Omit<ShopSettings, 'stripe' | 'shipping' | 'checkout' | 'vat' | 'seller' | 'digital' | 'interaction'>> & {`
|
|
12064
|
+
|
|
12065
|
+
**ShopOrderStatus** = `'pending-payment' | 'paid' | 'fulfilled' | 'partly-refunded' | 'refunded' | 'expired'`
|
|
12066
|
+
|
|
11773
12067
|
### tags
|
|
11774
12068
|
|
|
11775
12069
|
**Tag** (interface)
|
|
@@ -11785,6 +12079,8 @@ interface Tag {
|
|
|
11785
12079
|
proofId: string | null // Proof / serial number
|
|
11786
12080
|
refType: string | null
|
|
11787
12081
|
refId: string | null
|
|
12082
|
+
containerId?: string | null
|
|
12083
|
+
itemUid?: string | null
|
|
11788
12084
|
metadata: Record<string, any>
|
|
11789
12085
|
createdAt: string // ISO 8601
|
|
11790
12086
|
updatedAt: string // ISO 8601
|
|
@@ -11820,6 +12116,7 @@ interface CreateTagRequest {
|
|
|
11820
12116
|
useSerialNumber?: boolean // Auto-generate a serial number as proofId
|
|
11821
12117
|
refType?: string // Must be paired with refId
|
|
11822
12118
|
refId?: string // Must be paired with refType
|
|
12119
|
+
containerId?: string // The label on this container (not with proofId)
|
|
11823
12120
|
metadata?: Record<string, any>
|
|
11824
12121
|
force?: boolean // Overwrite if tag already exists in this collection
|
|
11825
12122
|
}
|
|
@@ -11842,6 +12139,7 @@ interface UpdateTagRequest {
|
|
|
11842
12139
|
proofId?: string
|
|
11843
12140
|
refType?: string | null
|
|
11844
12141
|
refId?: string | null
|
|
12142
|
+
containerId?: string | null
|
|
11845
12143
|
metadata?: Record<string, any> // Merged with existing metadata
|
|
11846
12144
|
}
|
|
11847
12145
|
```
|
|
@@ -12370,6 +12668,15 @@ interface WalletPassContent {
|
|
|
12370
12668
|
}
|
|
12371
12669
|
```
|
|
12372
12670
|
|
|
12671
|
+
**WalletInWallet** (interface)
|
|
12672
|
+
```typescript
|
|
12673
|
+
interface WalletInWallet {
|
|
12674
|
+
saved: boolean
|
|
12675
|
+
savedAt?: string | null
|
|
12676
|
+
removedAt?: string
|
|
12677
|
+
}
|
|
12678
|
+
```
|
|
12679
|
+
|
|
12373
12680
|
**WalletPassLinks** (interface)
|
|
12374
12681
|
```typescript
|
|
12375
12682
|
interface WalletPassLinks {
|
|
@@ -12404,6 +12711,7 @@ interface WalletPass {
|
|
|
12404
12711
|
code: string
|
|
12405
12712
|
version: number
|
|
12406
12713
|
notice?: { header: string; body: string; at: string }
|
|
12714
|
+
inWallet?: { apple?: WalletInWallet; google?: WalletInWallet }
|
|
12407
12715
|
voidReason?: string | null
|
|
12408
12716
|
links?: WalletPassLinks
|
|
12409
12717
|
createdAt?: string
|
|
@@ -14283,58 +14591,58 @@ Admin: the contact that carries a sign-in, attaching the sign-in first to the co
|
|
|
14283
14591
|
|
|
14284
14592
|
### containers
|
|
14285
14593
|
|
|
14286
|
-
**create**(collectionId: string,
|
|
14594
|
+
**create**(collectionId: string,
|
|
14287
14595
|
data: CreateContainerInput) → `Promise<Container>`
|
|
14288
14596
|
Create a new container (admin). ```typescript const cask = await containers.create('coll_123', { containerType: 'cask', ref: 'CASK-0042', name: 'Cask 42 — Single Malt', metadata: { distilleryYear: 2019, capacity: 200 }, }) ```
|
|
14289
14597
|
|
|
14290
|
-
**list**(collectionId: string,
|
|
14598
|
+
**list**(collectionId: string,
|
|
14291
14599
|
params?: ListContainersParams) → `Promise<ListContainersResponse>`
|
|
14292
14600
|
List containers (admin). Supports filtering by type, status, ref, parent, and top-level flag. ```typescript // All active pallets const { containers: pallets } = await containers.list('coll_123', { containerType: 'pallet', status: 'active', limit: 50, }) // Top-level containers only const { containers: roots } = await containers.list('coll_123', { topLevel: true }) ```
|
|
14293
14601
|
|
|
14294
|
-
**findForItem**(collectionId: string,
|
|
14602
|
+
**findForItem**(collectionId: string,
|
|
14295
14603
|
params: FindContainersForItemParams) → `Promise<FindContainersForItemResponse>`
|
|
14296
|
-
Reverse lookup — find all containers currently holding a specific item (admin). ```typescript const { containers: holding } = await containers.findForItem('coll_123', { itemType: 'proof', itemId: '
|
|
14604
|
+
Reverse lookup — find all containers currently holding a specific item (admin). ```typescript const { containers: holding } = await containers.findForItem('coll_123', { itemType: 'proof', itemId: 'unit-0007', productId: 'drill', }) ```
|
|
14297
14605
|
|
|
14298
|
-
**get**(collectionId: string,
|
|
14299
|
-
containerId: string,
|
|
14606
|
+
**get**(collectionId: string,
|
|
14607
|
+
containerId: string,
|
|
14300
14608
|
params?: GetContainerParams) → `Promise<Container>`
|
|
14301
14609
|
Get a single container by ID (admin). Pass `?tree=true` to recursively embed children, and/or `?includeContents=true` to embed the current item list. ```typescript // Flat const cask = await containers.get('coll_123', 'cask-uuid') // Full tree with contents const tree = await containers.get('coll_123', 'warehouse-uuid', { tree: true, treeDepth: 3, includeContents: true, }) ```
|
|
14302
14610
|
|
|
14303
|
-
**update**(collectionId: string,
|
|
14304
|
-
containerId: string,
|
|
14611
|
+
**update**(collectionId: string,
|
|
14612
|
+
containerId: string,
|
|
14305
14613
|
data: UpdateContainerInput) → `Promise<Container>`
|
|
14306
14614
|
Partially update a container (admin). Only fields present in the request body are modified. Pass `parentContainerId: null` to promote a container to top-level. ```typescript const updated = await containers.update('coll_123', 'cask-uuid', { status: 'archived', metadata: { bottledAt: '2025-04-01' }, }) ```
|
|
14307
14615
|
|
|
14308
|
-
**remove**(collectionId: string,
|
|
14616
|
+
**remove**(collectionId: string,
|
|
14309
14617
|
containerId: string) → `Promise<`
|
|
14310
14618
|
Soft-delete a container (admin). Sets `deletedAt`; the record and its full item history remain queryable by admins. Public API responses automatically exclude deleted containers.
|
|
14311
14619
|
|
|
14312
|
-
**listItems**(collectionId: string,
|
|
14313
|
-
containerId: string,
|
|
14620
|
+
**listItems**(collectionId: string,
|
|
14621
|
+
containerId: string,
|
|
14314
14622
|
params?: ListContainerItemsParams) → `Promise<ContainerItemsResponse>`
|
|
14315
14623
|
List items currently (or historically) inside a container (admin). Pass `history: true` to include removed items and see the full membership log. ```typescript // Current contents const { items } = await containers.listItems('coll_123', 'cask-uuid') // Full history including removed items const { items: history } = await containers.listItems('coll_123', 'cask-uuid', { history: true }) ```
|
|
14316
14624
|
|
|
14317
|
-
**addItems**(collectionId: string,
|
|
14318
|
-
containerId: string,
|
|
14625
|
+
**addItems**(collectionId: string,
|
|
14626
|
+
containerId: string,
|
|
14319
14627
|
data: AddContainerItemsInput) → `Promise<AddContainerItemsResponse>`
|
|
14320
14628
|
Add one or more items to a container (admin). Each item requires `itemType` and `itemId`. Pass `productId` / `proofId` for denormalisation convenience. ```typescript const { items } = await containers.addItems('coll_123', 'pallet-uuid', { items: [ { itemType: 'tag', itemId: 'NFC-00AABBCC' }, { itemType: 'proof', itemId: 'proof-uuid', productId: 'product-id' }, ], }) ```
|
|
14321
14629
|
|
|
14322
|
-
**removeItems**(collectionId: string,
|
|
14323
|
-
containerId: string,
|
|
14630
|
+
**removeItems**(collectionId: string,
|
|
14631
|
+
containerId: string,
|
|
14324
14632
|
data: RemoveContainerItemsInput) → `Promise<RemoveContainerItemsResponse>`
|
|
14325
14633
|
Soft-remove items from a container (admin). Sets `removedAt` on the specified `ContainerItem` records. The records are retained in the history log and can be queried with `history: true`. ```typescript const result = await containers.removeItems('coll_123', 'pallet-uuid', { ids: ['container-item-uuid-1', 'container-item-uuid-2'], }) console.log(`Removed ${result.removedCount} items`) ```
|
|
14326
14634
|
|
|
14327
|
-
**publicList**(collectionId: string,
|
|
14635
|
+
**publicList**(collectionId: string,
|
|
14328
14636
|
params?: ListContainersParams) → `Promise<PublicListContainersResponse>`
|
|
14329
14637
|
List containers (public). Soft-deleted containers and containers with `metadata.publicListing === false` are excluded from results.
|
|
14330
14638
|
|
|
14331
|
-
**publicGet**(collectionId: string,
|
|
14332
|
-
containerId: string,
|
|
14639
|
+
**publicGet**(collectionId: string,
|
|
14640
|
+
containerId: string,
|
|
14333
14641
|
params?: GetContainerParams) → `Promise<Container>`
|
|
14334
14642
|
Get a single container (public). Soft-deleted containers return a 404. Same `?tree` and `?includeContents` options as the admin version.
|
|
14335
14643
|
|
|
14336
|
-
**publicListItems**(collectionId: string,
|
|
14337
|
-
containerId: string,
|
|
14644
|
+
**publicListItems**(collectionId: string,
|
|
14645
|
+
containerId: string,
|
|
14338
14646
|
params?: Pick<ListContainerItemsParams, 'limit' | 'offset'>) → `Promise<ContainerItemsResponse>`
|
|
14339
14647
|
List current contents of a container (public). Returns only items where `removedAt` is null. No `?history` option on the public side.
|
|
14340
14648
|
|
|
@@ -15471,6 +15779,70 @@ Append Responses items (input/output/tool) to a session — the manual-persisten
|
|
|
15471
15779
|
**clear**(collectionId: string, id: string) → `Promise<`
|
|
15472
15780
|
Archive (soft-delete) a session.
|
|
15473
15781
|
|
|
15782
|
+
### shop
|
|
15783
|
+
|
|
15784
|
+
**config**(collectionId: string) → `Promise<ShopPublicConfig>`
|
|
15785
|
+
What a shop front shows: currency, the seller's details (UK law: shown before paying), shipping rates, policies, and `ready` (false until the shop can take payments).
|
|
15786
|
+
|
|
15787
|
+
**products**(collectionId: string, params?: { productIds?: string[] }) → `Promise<`
|
|
15788
|
+
What is for sale, in the shop's currency, with stock (`inStock`, `available`) and whether the buyer must sign in first (`needsSignIn`: a proof or access goes to an account). ```typescript const { items } = await shop.products(collectionId) items.map((p) => `${p.name}: ${formatMoney(p.amount, p.currency)}${p.inStock ? '' : ' (sold out)'}`) ```
|
|
15789
|
+
|
|
15790
|
+
**checkout**(collectionId: string, input: ShopCheckoutInput) → `Promise<ShopCheckoutResult>`
|
|
15791
|
+
Start paying: the server prices the basket, holds the stock and returns Stripe's checkout page. Send the buyer to `checkoutUrl`. Signed-in buyers' orders are theirs (`shop.myOrders`). ```typescript const { checkoutUrl } = await shop.checkout(collectionId, { lines: [{ productId: 'soap', quantity: 2 }], shippingRateId: 'std', successUrl: `${location.origin}/thanks`, // ?session_id= is added cancelUrl: `${location.origin}/basket`, }) location.href = checkoutUrl ``` `DIGITAL_CONSENT_REQUIRED`, `INVALID_INPUT` (e.g. a return page on another site), `PAYMENT_UNAVAILABLE` (nothing was charged)
|
|
15792
|
+
|
|
15793
|
+
**orderBySession**(collectionId: string, sessionId: string) → `Promise<ShopBuyerOrder>`
|
|
15794
|
+
The thank-you page: the order a Stripe checkout paid for, from the `session_id` on the success URL. Its `status` is `pending-payment` for a moment while the payment is confirmed: check again shortly. `downloads` has links for bought files once it's paid.
|
|
15795
|
+
|
|
15796
|
+
**myOrders**(collectionId: string, params?: { limit?: number; offset?: number }) → `Promise<ShopPage<ShopBuyerOrder>>`
|
|
15797
|
+
The signed-in buyer's orders, newest first, with their download links. @throws `SIGN_IN_REQUIRED`
|
|
15798
|
+
|
|
15799
|
+
**formatMoney**(amount: number, currency: string, locale?: string) → `string`
|
|
15800
|
+
Format minor units as money for the person: `formatMoney(1299, 'GBP')` → "£12.99".
|
|
15801
|
+
|
|
15802
|
+
### shop.admin
|
|
15803
|
+
|
|
15804
|
+
**settings**(collectionId: string) → `Promise<ShopSettingsView>`
|
|
15805
|
+
The settings, what's still needed to take payments (`readiness`), and what SmartLinks takes (`fee`, read-only).
|
|
15806
|
+
|
|
15807
|
+
**updateSettings**(collectionId: string, patch: ShopSettingsPatch) → `Promise<ShopSettingsView>`
|
|
15808
|
+
Change settings: merged into what's stored; `shipping.rates` is replaced as a whole.
|
|
15809
|
+
|
|
15810
|
+
**connect**(collectionId: string, input: { returnUrl: string; refreshUrl: string }) → `Promise<`
|
|
15811
|
+
Connect the seller's Stripe account (a new one, set up on Stripe's own pages). Send the seller to `url`; Stripe brings them back to `returnUrl` (done or not: check `connectStatus`) or `refreshUrl` (the link ran out).
|
|
15812
|
+
|
|
15813
|
+
**connectStatus**(collectionId: string) → `Promise<ShopConnectStatus>`
|
|
15814
|
+
Whether Stripe is connected, and whether it can take payments and pay out yet.
|
|
15815
|
+
|
|
15816
|
+
**listPrices**(collectionId: string, params?: ShopPriceListParams) → `Promise<ShopPage<ShopPrice>>`
|
|
15817
|
+
Whether Stripe is connected, and whether it can take payments and pay out yet.
|
|
15818
|
+
|
|
15819
|
+
**setPrice**(collectionId: string, input: ShopPriceInput) → `Promise<ShopPrice>`
|
|
15820
|
+
Put a product (or variant) on sale, or change its price in that currency (one price per product per currency). @throws `INVALID_INPUT`, `APP_NOT_INSTALLED`
|
|
15821
|
+
|
|
15822
|
+
**updatePrice**(collectionId: string, priceId: string, changes: ShopPriceUpdate) → `Promise<ShopPrice>`
|
|
15823
|
+
Put a product (or variant) on sale, or change its price in that currency (one price per product per currency). @throws `INVALID_INPUT`, `APP_NOT_INSTALLED`
|
|
15824
|
+
|
|
15825
|
+
**removePrice**(collectionId: string, priceId: string) → `Promise<`
|
|
15826
|
+
Take it off sale for good (or set `active: false` to pause).
|
|
15827
|
+
|
|
15828
|
+
**listOrders**(collectionId: string, params?: ShopOrderListParams) → `Promise<ShopPage<ShopAdminOrder>>`
|
|
15829
|
+
Shop orders, newest first. Unpaid and expired checkouts are left out unless asked for.
|
|
15830
|
+
|
|
15831
|
+
**getOrder**(collectionId: string, orderId: string) → `Promise<ShopAdminOrder>`
|
|
15832
|
+
Shop orders, newest first. Unpaid and expired checkouts are left out unless asked for.
|
|
15833
|
+
|
|
15834
|
+
**ship**(collectionId: string, orderId: string, input: ShopShipInput = {}) → `Promise<ShopAdminOrder>`
|
|
15835
|
+
Send some or all of what's left, with tracking. The held stock leaves; the buyer's "shipped" email goes out if the shop has one. @throws `NOT_SHIPPABLE`, `NOTHING_TO_SHIP`
|
|
15836
|
+
|
|
15837
|
+
**refund**(collectionId: string, orderId: string, input: ShopRefundInput = {}) → `Promise<ShopAdminOrder>`
|
|
15838
|
+
Refund through Stripe: lines, shipping, a goodwill amount, or everything left. Unsent stock goes back; digital delivery is withdrawn. @throws `NOT_REFUNDABLE`, `NOTHING_TO_REFUND`
|
|
15839
|
+
|
|
15840
|
+
**markDelivered**(collectionId: string, orderId: string, itemId: string, input: { note?: string; reference?: string } = {}) → `Promise<ShopAdminOrder>`
|
|
15841
|
+
An app that delivers a line itself (`deliveryConfig.kind: 'app'`) says it's done.
|
|
15842
|
+
|
|
15843
|
+
**cancelCheckout**(collectionId: string, orderId: string) → `Promise<ShopAdminOrder>`
|
|
15844
|
+
Cancel a checkout that hasn't been paid (its stock is released). @throws `NOT_PENDING`
|
|
15845
|
+
|
|
15474
15846
|
### skills
|
|
15475
15847
|
|
|
15476
15848
|
**list**(collectionId: string) → `Promise<SkillsListResponse>`
|
|
@@ -15803,6 +16175,9 @@ Change what a pass shows; both wallets follow (admin).
|
|
|
15803
16175
|
**voidPass**(collectionId: string, passId: string, reason?: string) → `Promise<`
|
|
15804
16176
|
The pass no longer counts: shown as void on the phone (admin).
|
|
15805
16177
|
|
|
16178
|
+
**messageAll**(collectionId: string, ref: WalletPassRef, msg: { header?: string; body: string }) → `Promise<`
|
|
16179
|
+
The same lock-screen message on every active pass for one thing, e.g. everyone holding a ticket for an event (admin). ```typescript await wallet.messageAll('coll_123', { type: 'event', id: eventId }, { header: 'Doors open', body: 'Doors open at 7pm' }) ```
|
|
16180
|
+
|
|
15806
16181
|
**message**(collectionId: string, passId: string, msg: { header?: string; body: string }) → `Promise<`
|
|
15807
16182
|
A lock-screen message on the pass (admin).
|
|
15808
16183
|
|
package/dist/docs/auth-kit.md
CHANGED
|
@@ -101,6 +101,12 @@ show), `minimal`, `customCss`. `termsUrl`, `privacyUrl`, `supportEmail`. **Wordi
|
|
|
101
101
|
`continueWithPhone`, `continueWithWhatsApp`, `continueWithMagicLink`, `sendMagicLink`, `magicLinkSent`, `inviteOnlyNotice` (a key
|
|
102
102
|
left out keeps the built-in words).
|
|
103
103
|
|
|
104
|
+
**Languages.** The screens' own words come in English, Simplified Chinese, French, German, Dutch,
|
|
105
|
+
Spanish, Portuguese and Italian, and follow the page's `<html lang>` (or the `language` prop of
|
|
106
|
+
`SmartlinksAuthUI`); other languages show English. `texts` is shown only in the language it is written
|
|
107
|
+
in: `textsLanguage` (default `en`). For other languages give `textsByLanguage`, e.g.
|
|
108
|
+
`{ fr: { signInTitle: 'Connexion membres' }, de: { signInTitle: 'Mitglieder-Anmeldung' } }`.
|
|
109
|
+
|
|
104
110
|
**The account emails** — `emailTemplates.<kind>`: `{ subject, header, introText, buttonText,
|
|
105
111
|
footerText }` for `passwordReset`, `emailVerification`, `magicLink`, `memberInvite` (site member
|
|
106
112
|
invitations), `invite` / `addedToCollection` (staff), `mfaCode`, `providerLinked`. `emailBranding`:
|