@proveanything/smartlinks 1.0.38 → 1.0.40

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/API_SUMMARY.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.0.38 | Generated: 2025-10-04T11:16:35.687Z
3
+ Version: 1.0.40 | Generated: 2025-11-09T13:05:52.500Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -121,6 +121,21 @@ interface AttestationUpdateRequest {
121
121
  }
122
122
  ```
123
123
 
124
+ ### auth
125
+
126
+ **UserAccountRegistrationRequest** (type)
127
+ ```typescript
128
+ type UserAccountRegistrationRequest = {
129
+ name: string
130
+ email?: string
131
+ phone?: string
132
+ password?: string
133
+ sendAccountConfirmation?: boolean
134
+ collectionId?: string,
135
+ tokenType?: 'bearer' | 'firebase'
136
+ }
137
+ ```
138
+
124
139
  ### batch
125
140
 
126
141
  **BatchResponse** = `any`
@@ -129,6 +144,38 @@ interface AttestationUpdateRequest {
129
144
 
130
145
  **BatchUpdateRequest** = `any`
131
146
 
147
+ ### claimSet
148
+
149
+ **ClaimCodeRef** (interface)
150
+ ```typescript
151
+ interface ClaimCodeRef {
152
+ codeId: string
153
+ claimId: string
154
+ }
155
+ ```
156
+
157
+ **UpdateClaimDataRequest** (interface)
158
+ ```typescript
159
+ interface UpdateClaimDataRequest {
160
+ data: Record<string, any>
161
+ codes: ClaimCodeRef[]
162
+ }
163
+ ```
164
+
165
+ **AssignClaimsRequest** (interface)
166
+ ```typescript
167
+ interface AssignClaimsRequest {
168
+ id: string
169
+ collectionId: string
170
+ productId: string
171
+ batchId?: string
172
+ start?: number
173
+ end?: number
174
+ codeId?: string
175
+ data?: Record<string, any>
176
+ }
177
+ ```
178
+
132
179
  ### collection
133
180
 
134
181
  **CollectionResponse** (interface)
@@ -239,7 +286,7 @@ interface ProofResponse {
239
286
 
240
287
  **VariantUpdateRequest** = `any`
241
288
 
242
- ### ai
289
+ ### ai (api)
243
290
 
244
291
  **AIGenerateContentRequest** (interface)
245
292
  ```typescript
@@ -285,7 +332,11 @@ interface AISearchPhotosPhoto {
285
332
  }
286
333
  ```
287
334
 
288
- **AppConfigOptions** = `{
335
+ ### appConfiguration (api)
336
+
337
+ **AppConfigOptions** (type)
338
+ ```typescript
339
+ type AppConfigOptions = {
289
340
  appId: string
290
341
  collectionId?: string
291
342
  productId?: string
@@ -297,27 +348,36 @@ interface AISearchPhotosPhoto {
297
348
  admin?: boolean
298
349
  config?: any
299
350
  data?: any
300
- }`
351
+ }
352
+ ```
301
353
 
302
- ### auth
354
+ ### auth (api)
303
355
 
304
- **LoginResponse** = `{
356
+ **LoginResponse** (type)
357
+ ```typescript
358
+ type LoginResponse = {
305
359
  id: string
306
360
  name: string
307
361
  email: string
308
362
  bearerToken: string
309
363
  account: Record<string, any>
310
- }`
364
+ }
365
+ ```
311
366
 
312
- **VerifyTokenResponse** = `{
367
+ **VerifyTokenResponse** (type)
368
+ ```typescript
369
+ type VerifyTokenResponse = {
313
370
  valid: boolean
314
371
  id?: string
315
372
  name?: string
316
373
  email?: string
317
374
  account?: Record<string, any>
318
- }`
375
+ }
376
+ ```
319
377
 
320
- **AccountInfoResponse** = `{
378
+ **AccountInfoResponse** (type)
379
+ ```typescript
380
+ type AccountInfoResponse = {
321
381
  accessType: string;
322
382
  analyticsCode: string;
323
383
  analyticsId: string;
@@ -349,7 +409,8 @@ interface AISearchPhotosPhoto {
349
409
  whitelabel: {
350
410
  [key: string]: any;
351
411
  }
352
- }`
412
+ }
413
+ ```
353
414
 
354
415
  ## API Functions
355
416
 
@@ -376,27 +437,6 @@ Create or warm a cache for AI (admin)
376
437
  **postChat**(collectionId: string, params: any, admin: boolean = true) → `Promise<any>`
377
438
  Post a chat message to the AI (admin or public)
378
439
 
379
- **generateContent**(collectionId: string,
380
- params: AIGenerateContentRequest,
381
- admin: boolean = true) → `Promise<any>`
382
- Generate text/content via AI (admin)
383
-
384
- **generateImage**(collectionId: string, params: AIGenerateImageRequest) → `Promise<any>`
385
- Generate an image via AI (admin)
386
-
387
- **searchPhotos**(collectionId: string,
388
- params: AISearchPhotosRequest) → `Promise<AISearchPhotosPhoto[]>`
389
- Search stock photos or similar via AI (admin)
390
-
391
- **uploadFile**(collectionId: string, params: any) → `Promise<any>`
392
- Upload a file for AI usage (admin). Pass FormData for binary uploads.
393
-
394
- **createCache**(collectionId: string, params: any) → `Promise<any>`
395
- Create or warm a cache for AI (admin)
396
-
397
- **postChat**(collectionId: string, params: any, admin: boolean = true) → `Promise<any>`
398
- Post a chat message to the AI (admin or public)
399
-
400
440
  ### appConfiguration
401
441
 
402
442
  **getConfig**(opts: AppConfigOptions) → `Promise<any>`
@@ -413,20 +453,6 @@ Post a chat message to the AI (admin or public)
413
453
 
414
454
  **deleteDataItem**(opts: AppConfigOptions) → `Promise<void>`
415
455
 
416
- **getConfig**(opts: AppConfigOptions) → `Promise<any>`
417
-
418
- **setConfig**(opts: AppConfigOptions) → `Promise<any>`
419
-
420
- **deleteConfig**(opts: AppConfigOptions) → `Promise<void>`
421
-
422
- **getData**(opts: AppConfigOptions) → `Promise<any[]>`
423
-
424
- **getDataItem**(opts: AppConfigOptions) → `Promise<any>`
425
-
426
- **setDataItem**(opts: AppConfigOptions) → `Promise<any>`
427
-
428
- **deleteDataItem**(opts: AppConfigOptions) → `Promise<void>`
429
-
430
456
  ### appRecord
431
457
 
432
458
  **get**(collectionId: string, appId: string) → `Promise<any>`
@@ -437,14 +463,6 @@ Post a chat message to the AI (admin or public)
437
463
 
438
464
  **remove**(collectionId: string, appId: string) → `Promise<void>`
439
465
 
440
- **get**(collectionId: string, appId: string) → `Promise<any>`
441
-
442
- **create**(collectionId: string, appId: string, data: any) → `Promise<any>`
443
-
444
- **update**(collectionId: string, appId: string, data: any) → `Promise<any>`
445
-
446
- **remove**(collectionId: string, appId: string) → `Promise<void>`
447
-
448
466
  ### asset
449
467
 
450
468
  **getForCollection**(collectionId: string,
@@ -477,36 +495,6 @@ Post a chat message to the AI (admin or public)
477
495
  onProgress?: (percent: number) → `void`
478
496
  Uploads an asset file to a proof, with optional extraData as JSON. Supports progress reporting via onProgress callback (browser only).
479
497
 
480
- **getForCollection**(collectionId: string,
481
- assetId: string) → `Promise<AssetResponse>`
482
-
483
- **listForCollection**(collectionId: string) → `Promise<AssetResponse[]>`
484
-
485
- **getForProduct**(collectionId: string,
486
- productId: string,
487
- assetId: string) → `Promise<AssetResponse>`
488
-
489
- **listForProduct**(collectionId: string,
490
- productId: string) → `Promise<AssetResponse[]>`
491
-
492
- **getForProof**(collectionId: string,
493
- productId: string,
494
- proofId: string,
495
- assetId: string) → `Promise<AssetResponse>`
496
-
497
- **listForProof**(collectionId: string,
498
- productId: string,
499
- proofId: string,
500
- appId?: string) → `Promise<AssetResponse[]>`
501
-
502
- **uploadAsset**(collectionId: string,
503
- productId: string,
504
- proofId: string,
505
- file: File,
506
- extraData?: Record<string, any>,
507
- onProgress?: (percent: number) → `void`
508
- Uploads an asset file to a proof, with optional extraData as JSON. Supports progress reporting via onProgress callback (browser only).
509
-
510
498
  ### attestation
511
499
 
512
500
  **list**(collectionId: string,
@@ -539,36 +527,6 @@ Update an attestation.
539
527
  attestationId: string) → `Promise<void>`
540
528
  Delete an attestation.
541
529
 
542
- **list**(collectionId: string,
543
- productId: string,
544
- proofId: string) → `Promise<AttestationResponse[]>`
545
- List all attestations for a proof.
546
-
547
- **get**(collectionId: string,
548
- productId: string,
549
- proofId: string,
550
- attestationId: string) → `Promise<AttestationResponse>`
551
- Get a single attestation by ID.
552
-
553
- **create**(collectionId: string,
554
- productId: string,
555
- proofId: string,
556
- data: AttestationCreateRequest) → `Promise<AttestationResponse>`
557
- Create a new attestation for a proof.
558
-
559
- **update**(collectionId: string,
560
- productId: string,
561
- proofId: string,
562
- attestationId: string,
563
- data: AttestationUpdateRequest) → `Promise<AttestationResponse>`
564
- Update an attestation.
565
-
566
- **remove**(collectionId: string,
567
- productId: string,
568
- proofId: string,
569
- attestationId: string) → `Promise<void>`
570
- Delete an attestation.
571
-
572
530
  ### auth
573
531
 
574
532
  **login**(email: string, password: string) → `Promise<LoginResponse>`
@@ -586,31 +544,8 @@ Requests an admin JWT for the current user and a specific collection Returns JWT
586
544
  **requestPublicJWT**(collectionId: string, productId: string, proofId: string) → `Promise<string>`
587
545
  Requests a JWT for the current user and a specific collection/product/proof Validates if the user has access to the resource, and returns a JWT
588
546
 
589
- **getUserToken**(opts?: {
590
- email?: string
591
- collectionId?: string
592
- userId?: string
593
- expiry?: string
594
- }) → `Promise<`
595
- Admin: Get a user bearer token (impersonation/automation). POST /admin/auth/userToken All fields are optional; at least one identifier should be provided.
596
-
597
- **getAccount**() → `Promise<AccountInfoResponse>`
598
- Gets current account information for the logged in user. Returns user, owner, account, and location objects.
599
-
600
- **login**(email: string, password: string) → `Promise<LoginResponse>`
601
- Login with email and password. Sets the bearerToken for subsequent API calls.
602
-
603
- **logout**() → `void`
604
- Logout (clears bearerToken for future API calls).
605
-
606
- **verifyToken**(token?: string) → `Promise<VerifyTokenResponse>`
607
- Verifies the current bearerToken (or a provided token). Returns user/account info if valid.
608
-
609
- **requestAdminJWT**(collectionId: string) → `Promise<string>`
610
- Requests an admin JWT for the current user and a specific collection Returns JWT if valid.
611
-
612
- **requestPublicJWT**(collectionId: string, productId: string, proofId: string) → `Promise<string>`
613
- Requests a JWT for the current user and a specific collection/product/proof Validates if the user has access to the resource, and returns a JWT
547
+ **registerUser**(user: UserAccountRegistrationRequest) → `Promise<LoginResponse>`
548
+ Tries to register a new user account. Can return a bearer token, or a Firebase token
614
549
 
615
550
  **getUserToken**(opts?: {
616
551
  email?: string
@@ -668,49 +603,6 @@ Get serial numbers for a batch (admin only).
668
603
  codeId: string) → `Promise<any>`
669
604
  Look up a serial number by code for a batch (admin only).
670
605
 
671
- **get**(collectionId: string,
672
- productId: string,
673
- batchId: string) → `Promise<BatchResponse>`
674
- Get a single batch by ID for a collection and product (admin only).
675
-
676
- **list**(collectionId: string,
677
- productId: string) → `Promise<BatchResponse[]>`
678
- List all batches for a collection and product (admin only).
679
-
680
- **create**(collectionId: string,
681
- productId: string,
682
- data: BatchCreateRequest) → `Promise<BatchResponse>`
683
- Create a new batch for a collection and product (admin only).
684
-
685
- **update**(collectionId: string,
686
- productId: string,
687
- batchId: string,
688
- data: BatchUpdateRequest) → `Promise<BatchResponse>`
689
- Update a batch for a collection and product (admin only).
690
-
691
- **remove**(collectionId: string,
692
- productId: string,
693
- batchId: string) → `Promise<void>`
694
- Delete a batch for a collection and product (admin only).
695
-
696
- **getPublic**(collectionId: string,
697
- productId: string,
698
- batchId: string) → `Promise<BatchResponse>`
699
- Get a single batch by ID for a collection and product (public endpoint).
700
-
701
- **getSN**(collectionId: string,
702
- productId: string,
703
- batchId: string,
704
- startIndex: number = 0,
705
- count: number = 10) → `Promise<any>`
706
- Get serial numbers for a batch (admin only).
707
-
708
- **lookupSN**(collectionId: string,
709
- productId: string,
710
- batchId: string,
711
- codeId: string) → `Promise<any>`
712
- Look up a serial number by code for a batch (admin only).
713
-
714
606
  ### claimSet
715
607
 
716
608
  **getAllForCollection**(collectionId: string) → `Promise<any[]>`
@@ -743,46 +635,10 @@ Update a claim set for a collection.
743
635
  **makeClaim**(collectionId: string, params: any) → `Promise<any>`
744
636
  Make a claim for a claim set.
745
637
 
746
- **assignClaims**(collectionId: string, data: any) → `Promise<any>`
747
- Assign claims to a claim set.
638
+ **assignClaims**(collectionId: string, data: AssignClaimsRequest) → `Promise<any>`
639
+ Assign claims to a claim set. { id: string, // claim set id (required) collectionId: string,// required productId: string, // required batchId?: string, // optional start?: number, // optional bulk range start end?: number, // optional bulk range end codeId?: string, // optional single code data?: { [k: string]: any } // optional claim key/values }
748
640
 
749
- **updateClaimData**(collectionId: string, data: any) → `Promise<any>`
750
- Update claim data for a collection.
751
-
752
- **getAllForCollection**(collectionId: string) → `Promise<any[]>`
753
- Get all claim sets for a collection.
754
-
755
- **getForCollection**(collectionId: string, claimSetId: string) → `Promise<any>`
756
- Get a specific claim set for a collection.
757
-
758
- **getAllTags**(collectionId: string, claimSetId: string) → `Promise<any[]>`
759
- Get all tags for a claim set.
760
-
761
- **getReport**(collectionId: string, claimSetId: string) → `Promise<any>`
762
- Get a report for a claim set.
763
-
764
- **getAssignedTags**(collectionId: string, claimSetId: string) → `Promise<any>`
765
- Get assigned tags for a claim set.
766
-
767
- **getTagSummary**(collectionId: string) → `Promise<any>`
768
- Get tag summary for a collection.
769
-
770
- **tagQuery**(collectionId: string, data: any) → `Promise<any>`
771
- Perform a tag query for a collection.
772
-
773
- **createForCollection**(collectionId: string, params: any) → `Promise<any>`
774
- Create a new claim set for a collection.
775
-
776
- **updateForCollection**(collectionId: string, params: any) → `Promise<any>`
777
- Update a claim set for a collection.
778
-
779
- **makeClaim**(collectionId: string, params: any) → `Promise<any>`
780
- Make a claim for a claim set.
781
-
782
- **assignClaims**(collectionId: string, data: any) → `Promise<any>`
783
- Assign claims to a claim set.
784
-
785
- **updateClaimData**(collectionId: string, data: any) → `Promise<any>`
641
+ **updateClaimData**(collectionId: string, data: UpdateClaimDataRequest) → `Promise<any>`
786
642
  Update claim data for a collection.
787
643
 
788
644
  ### collection
@@ -793,34 +649,11 @@ Retrieves a single Collection by its ID.
793
649
  **list**(admin?: boolean) → `Promise<CollectionResponse[]>`
794
650
  Retrieves all Collections.
795
651
 
796
- **create**(data: any) → `Promise<CollectionResponse>`
797
- Create a new collection (admin only).
798
-
799
- **update**(collectionId: string, data: any) → `Promise<CollectionResponse>`
800
- Update a collection (admin only).
652
+ **getShortId**(shortId: string) → `Promise<CollectionResponse>`
653
+ Retrieve a collection by its shortId (public endpoint).
801
654
 
802
- **remove**(collectionId: string) → `Promise<void>`
803
- Delete a collection (admin only).
804
-
805
- **getSN**(collectionId: string,
806
- startIndex: number = 0,
807
- count: number = 10) → `Promise<any>`
808
- Get serial numbers for a collection (admin only).
809
-
810
- **lookupSN**(collectionId: string,
811
- codeId: string) → `Promise<any>`
812
- Look up a serial number by code for a collection (admin only).
813
-
814
- **assignSN**(collectionId: string,
815
- codeId: string,
816
- value: any) → `Promise<any>`
817
- Assign a value to a serial number for a collection (admin only).
818
-
819
- **get**(collectionId: string, admin?: boolean) → `Promise<CollectionResponse>`
820
- Retrieves a single Collection by its ID.
821
-
822
- **list**(admin?: boolean) → `Promise<CollectionResponse[]>`
823
- Retrieves all Collections.
655
+ **getSettings**(collectionId: string, settingGroup: string) → `Promise<any>`
656
+ Retrieve a specific settings group for a collection (public endpoint).
824
657
 
825
658
  **create**(data: any) → `Promise<CollectionResponse>`
826
659
  Create a new collection (admin only).
@@ -862,21 +695,6 @@ Update a crate for a collection (admin only).
862
695
  **remove**(collectionId: string, crateId: string) → `Promise<void>`
863
696
  Delete a crate for a collection (admin only).
864
697
 
865
- **get**(collectionId: string, crateId: string) → `Promise<any>`
866
- Get a single crate by ID for a collection (admin only).
867
-
868
- **list**(collectionId: string) → `Promise<any[]>`
869
- List all crates for a collection (admin only).
870
-
871
- **create**(collectionId: string, data: any) → `Promise<any>`
872
- Create a new crate for a collection (admin only).
873
-
874
- **update**(collectionId: string, crateId: string, data: any) → `Promise<any>`
875
- Update a crate for a collection (admin only).
876
-
877
- **remove**(collectionId: string, crateId: string) → `Promise<void>`
878
- Delete a crate for a collection (admin only).
879
-
880
698
  ### form
881
699
 
882
700
  **get**(collectionId: string, formId: string, admin?: boolean) → `Promise<any>`
@@ -894,21 +712,6 @@ Update a form for a collection (admin only).
894
712
  **remove**(collectionId: string, formId: string) → `Promise<void>`
895
713
  Delete a form for a collection (admin only).
896
714
 
897
- **get**(collectionId: string, formId: string, admin?: boolean) → `Promise<any>`
898
- Get a single form by ID for a collection.
899
-
900
- **list**(collectionId: string, admin?: boolean) → `Promise<any[]>`
901
- List all forms for a collection.
902
-
903
- **create**(collectionId: string, data: any) → `Promise<any>`
904
- Create a new form for a collection (admin only).
905
-
906
- **update**(collectionId: string, formId: string, data: any) → `Promise<any>`
907
- Update a form for a collection (admin only).
908
-
909
- **remove**(collectionId: string, formId: string) → `Promise<void>`
910
- Delete a form for a collection (admin only).
911
-
912
715
  ### product
913
716
 
914
717
  **get**(collectionId: string,
@@ -944,39 +747,6 @@ Get serial numbers for a product (admin only).
944
747
  codeId: string) → `Promise<any>`
945
748
  Look up a serial number by code for a product (admin only).
946
749
 
947
- **get**(collectionId: string,
948
- productId: string,
949
- admin?: boolean) → `Promise<ProductResponse>`
950
- Retrieves a single Product Item by Collection ID and Product ID.
951
-
952
- **list**(collectionId: string,
953
- admin?: boolean) → `Promise<ProductResponse[]>`
954
- List all Product Items for a Collection.
955
-
956
- **create**(collectionId: string,
957
- data: ProductCreateRequest) → `Promise<ProductResponse>`
958
- Create a new product for a collection (admin only). The `data` payload follows the same shape as ProductResponse minus `id` and `collectionId`.
959
-
960
- **update**(collectionId: string,
961
- productId: string,
962
- data: ProductUpdateRequest) → `Promise<ProductResponse>`
963
- Update a product for a collection (admin only). The `data` payload is a partial of ProductResponse minus `id` and `collectionId`.
964
-
965
- **remove**(collectionId: string,
966
- productId: string) → `Promise<void>`
967
- Delete a product for a collection (admin only).
968
-
969
- **getSN**(collectionId: string,
970
- productId: string,
971
- startIndex: number = 0,
972
- count: number = 10) → `Promise<any>`
973
- Get serial numbers for a product (admin only).
974
-
975
- **lookupSN**(collectionId: string,
976
- productId: string,
977
- codeId: string) → `Promise<any>`
978
- Look up a serial number by code for a product (admin only).
979
-
980
750
  ### proof
981
751
 
982
752
  **get**(collectionId: string,
@@ -999,48 +769,11 @@ Create a proof for a product (admin only). POST /admin/collection/:collectionId/
999
769
  values: any) → `Promise<ProofResponse>`
1000
770
  Update a proof for a product (admin only). PUT /admin/collection/:collectionId/product/:productId/proof/:proofId
1001
771
 
1002
- **remove**(collectionId: string,
1003
- productId: string,
1004
- proofId: string) → `Promise<void>`
1005
- Delete a proof for a product (admin only). DELETE /admin/collection/:collectionId/product/:productId/proof/:proofId
1006
-
1007
- **getByUser**(collectionId: string,
1008
- userId: string) → `Promise<ProofResponse[]>`
1009
- Get proofs for a user in a collection (admin only). GET /admin/collection/:collectionId/proof/findByUser/:userId
1010
-
1011
- **getByProduct**(collectionId: string,
1012
- productId: string) → `Promise<ProofResponse[]>`
1013
- Get proofs for a product (admin only). GET /admin/collection/:collectionId/product/:productId/proof
1014
-
1015
- **findByProduct**(collectionId: string,
1016
- productId: string,
1017
- query: any) → `Promise<ProofResponse[]>`
1018
- Find proofs for a product (admin only). POST /admin/collection/:collectionId/product/:productId/proof/find
1019
-
1020
- **getByBatch**(collectionId: string,
1021
- productId: string,
1022
- batchId: string) → `Promise<ProofResponse[]>`
1023
- Get proofs for a batch (admin only). GET /admin/collection/:collectionId/product/:productId/batch/:batchId/proof
1024
-
1025
- **get**(collectionId: string,
1026
- productId: string,
1027
- proofId: string,
1028
- admin?: boolean) → `Promise<ProofResponse>`
1029
- Retrieves a single Proof by Collection ID, Product ID, and Proof ID. Both public and admin endpoints now include productId in the path.
1030
-
1031
- **list**(collectionId: string) → `Promise<ProofResponse[]>`
1032
- List all Proofs for a Collection.
1033
-
1034
- **create**(collectionId: string,
1035
- productId: string,
1036
- values: any) → `Promise<ProofResponse>`
1037
- Create a proof for a product (admin only). POST /admin/collection/:collectionId/product/:productId/proof
1038
-
1039
- **update**(collectionId: string,
772
+ **claim**(collectionId: string,
1040
773
  productId: string,
1041
774
  proofId: string,
1042
775
  values: any) → `Promise<ProofResponse>`
1043
- Update a proof for a product (admin only). PUT /admin/collection/:collectionId/product/:productId/proof/:proofId
776
+ Claim a proof for a product. PUT /public/collection/:collectionId/product/:productId/proof/:proofId
1044
777
 
1045
778
  **remove**(collectionId: string,
1046
779
  productId: string,
@@ -1110,46 +843,3 @@ Get serial numbers for a variant (admin only).
1110
843
  codeId: string) → `Promise<any>`
1111
844
  Look up a serial number by code for a variant (admin only).
1112
845
 
1113
- **get**(collectionId: string,
1114
- productId: string,
1115
- variantId: string) → `Promise<VariantResponse>`
1116
- Get a single variant by ID for a collection and product (admin only).
1117
-
1118
- **list**(collectionId: string,
1119
- productId: string) → `Promise<VariantResponse[]>`
1120
- List all variants for a collection and product (admin only).
1121
-
1122
- **create**(collectionId: string,
1123
- productId: string,
1124
- data: VariantCreateRequest) → `Promise<VariantResponse>`
1125
- Create a new variant for a collection and product (admin only).
1126
-
1127
- **update**(collectionId: string,
1128
- productId: string,
1129
- variantId: string,
1130
- data: VariantUpdateRequest) → `Promise<VariantResponse>`
1131
- Update a variant for a collection and product (admin only).
1132
-
1133
- **remove**(collectionId: string,
1134
- productId: string,
1135
- variantId: string) → `Promise<void>`
1136
- Delete a variant for a collection and product (admin only).
1137
-
1138
- **getPublic**(collectionId: string,
1139
- productId: string,
1140
- variantId: string) → `Promise<VariantResponse>`
1141
- Get a single variant by ID for a collection and product (public endpoint).
1142
-
1143
- **getSN**(collectionId: string,
1144
- productId: string,
1145
- variantId: string,
1146
- startIndex: number = 0,
1147
- count: number = 10) → `Promise<any>`
1148
- Get serial numbers for a variant (admin only).
1149
-
1150
- **lookupSN**(collectionId: string,
1151
- productId: string,
1152
- variantId: string,
1153
- codeId: string) → `Promise<any>`
1154
- Look up a serial number by code for a variant (admin only).
1155
-