@proveanything/smartlinks 1.0.32 → 1.0.34
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 +78 -12
- package/README.md +2553 -1834
- package/dist/api/product.d.ts +7 -5
- package/dist/api/product.js +4 -2
- package/dist/api/proof.d.ts +33 -6
- package/dist/api/proof.js +61 -8
- package/dist/index.d.ts +1 -0
- package/dist/types/product.d.ts +2 -0
- package/package.json +1 -1
package/API_SUMMARY.md
CHANGED
|
@@ -207,6 +207,10 @@ interface ProductResponse {
|
|
|
207
207
|
}
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
+
**ProductCreateRequest** = `Omit<ProductResponse, 'id' | 'collectionId'>`
|
|
211
|
+
|
|
212
|
+
**ProductUpdateRequest** = `Partial<Omit<ProductResponse, 'id' | 'collectionId'>>`
|
|
213
|
+
|
|
210
214
|
### proof
|
|
211
215
|
|
|
212
216
|
**ProofResponse** (interface)
|
|
@@ -806,13 +810,13 @@ Retrieves a single Product Item by Collection ID and Product ID.
|
|
|
806
810
|
List all Product Items for a Collection.
|
|
807
811
|
|
|
808
812
|
**create**(collectionId: string,
|
|
809
|
-
data:
|
|
810
|
-
Create a new product for a collection (admin only).
|
|
813
|
+
data: ProductCreateRequest) → `Promise<ProductResponse>`
|
|
814
|
+
Create a new product for a collection (admin only). The `data` payload follows the same shape as ProductResponse minus `id` and `collectionId`.
|
|
811
815
|
|
|
812
816
|
**update**(collectionId: string,
|
|
813
817
|
productId: string,
|
|
814
|
-
data:
|
|
815
|
-
Update a product for a collection (admin only).
|
|
818
|
+
data: ProductUpdateRequest) → `Promise<ProductResponse>`
|
|
819
|
+
Update a product for a collection (admin only). The `data` payload is a partial of ProductResponse minus `id` and `collectionId`.
|
|
816
820
|
|
|
817
821
|
**remove**(collectionId: string,
|
|
818
822
|
productId: string) → `Promise<void>`
|
|
@@ -839,13 +843,13 @@ Retrieves a single Product Item by Collection ID and Product ID.
|
|
|
839
843
|
List all Product Items for a Collection.
|
|
840
844
|
|
|
841
845
|
**create**(collectionId: string,
|
|
842
|
-
data:
|
|
843
|
-
Create a new product for a collection (admin only).
|
|
846
|
+
data: ProductCreateRequest) → `Promise<ProductResponse>`
|
|
847
|
+
Create a new product for a collection (admin only). The `data` payload follows the same shape as ProductResponse minus `id` and `collectionId`.
|
|
844
848
|
|
|
845
849
|
**update**(collectionId: string,
|
|
846
850
|
productId: string,
|
|
847
|
-
data:
|
|
848
|
-
Update a product for a collection (admin only).
|
|
851
|
+
data: ProductUpdateRequest) → `Promise<ProductResponse>`
|
|
852
|
+
Update a product for a collection (admin only). The `data` payload is a partial of ProductResponse minus `id` and `collectionId`.
|
|
849
853
|
|
|
850
854
|
**remove**(collectionId: string,
|
|
851
855
|
productId: string) → `Promise<void>`
|
|
@@ -865,19 +869,81 @@ Look up a serial number by code for a product (admin only).
|
|
|
865
869
|
### proof
|
|
866
870
|
|
|
867
871
|
**get**(collectionId: string,
|
|
868
|
-
|
|
869
|
-
|
|
872
|
+
productId: string,
|
|
873
|
+
proofId: string,
|
|
874
|
+
admin?: boolean) → `Promise<ProofResponse>`
|
|
875
|
+
Retrieves a single Proof by Collection ID, Product ID, and Proof ID. Both public and admin endpoints now include productId in the path.
|
|
870
876
|
|
|
871
877
|
**list**(collectionId: string) → `Promise<ProofResponse[]>`
|
|
872
878
|
List all Proofs for a Collection.
|
|
873
879
|
|
|
880
|
+
**create**(collectionId: string,
|
|
881
|
+
productId: string,
|
|
882
|
+
values: any) → `Promise<ProofResponse>`
|
|
883
|
+
Create a proof for a product (admin only). POST /admin/collection/:collectionId/product/:productId/proof
|
|
884
|
+
|
|
885
|
+
**update**(collectionId: string,
|
|
886
|
+
productId: string,
|
|
887
|
+
proofId: string,
|
|
888
|
+
values: any) → `Promise<ProofResponse>`
|
|
889
|
+
Update a proof for a product (admin only). PUT /admin/collection/:collectionId/product/:productId/proof/:proofId
|
|
890
|
+
|
|
891
|
+
**getByUser**(collectionId: string,
|
|
892
|
+
userId: string) → `Promise<ProofResponse[]>`
|
|
893
|
+
Get proofs for a user in a collection (admin only). GET /admin/collection/:collectionId/proof/findByUser/:userId
|
|
894
|
+
|
|
895
|
+
**getByProduct**(collectionId: string,
|
|
896
|
+
productId: string) → `Promise<ProofResponse[]>`
|
|
897
|
+
Get proofs for a product (admin only). GET /admin/collection/:collectionId/product/:productId/proof
|
|
898
|
+
|
|
899
|
+
**findByProduct**(collectionId: string,
|
|
900
|
+
productId: string,
|
|
901
|
+
query: any) → `Promise<ProofResponse[]>`
|
|
902
|
+
Find proofs for a product (admin only). POST /admin/collection/:collectionId/product/:productId/proof/find
|
|
903
|
+
|
|
904
|
+
**getByBatch**(collectionId: string,
|
|
905
|
+
productId: string,
|
|
906
|
+
batchId: string) → `Promise<ProofResponse[]>`
|
|
907
|
+
Get proofs for a batch (admin only). GET /admin/collection/:collectionId/product/:productId/batch/:batchId/proof
|
|
908
|
+
|
|
874
909
|
**get**(collectionId: string,
|
|
875
|
-
|
|
876
|
-
|
|
910
|
+
productId: string,
|
|
911
|
+
proofId: string,
|
|
912
|
+
admin?: boolean) → `Promise<ProofResponse>`
|
|
913
|
+
Retrieves a single Proof by Collection ID, Product ID, and Proof ID. Both public and admin endpoints now include productId in the path.
|
|
877
914
|
|
|
878
915
|
**list**(collectionId: string) → `Promise<ProofResponse[]>`
|
|
879
916
|
List all Proofs for a Collection.
|
|
880
917
|
|
|
918
|
+
**create**(collectionId: string,
|
|
919
|
+
productId: string,
|
|
920
|
+
values: any) → `Promise<ProofResponse>`
|
|
921
|
+
Create a proof for a product (admin only). POST /admin/collection/:collectionId/product/:productId/proof
|
|
922
|
+
|
|
923
|
+
**update**(collectionId: string,
|
|
924
|
+
productId: string,
|
|
925
|
+
proofId: string,
|
|
926
|
+
values: any) → `Promise<ProofResponse>`
|
|
927
|
+
Update a proof for a product (admin only). PUT /admin/collection/:collectionId/product/:productId/proof/:proofId
|
|
928
|
+
|
|
929
|
+
**getByUser**(collectionId: string,
|
|
930
|
+
userId: string) → `Promise<ProofResponse[]>`
|
|
931
|
+
Get proofs for a user in a collection (admin only). GET /admin/collection/:collectionId/proof/findByUser/:userId
|
|
932
|
+
|
|
933
|
+
**getByProduct**(collectionId: string,
|
|
934
|
+
productId: string) → `Promise<ProofResponse[]>`
|
|
935
|
+
Get proofs for a product (admin only). GET /admin/collection/:collectionId/product/:productId/proof
|
|
936
|
+
|
|
937
|
+
**findByProduct**(collectionId: string,
|
|
938
|
+
productId: string,
|
|
939
|
+
query: any) → `Promise<ProofResponse[]>`
|
|
940
|
+
Find proofs for a product (admin only). POST /admin/collection/:collectionId/product/:productId/proof/find
|
|
941
|
+
|
|
942
|
+
**getByBatch**(collectionId: string,
|
|
943
|
+
productId: string,
|
|
944
|
+
batchId: string) → `Promise<ProofResponse[]>`
|
|
945
|
+
Get proofs for a batch (admin only). GET /admin/collection/:collectionId/product/:productId/batch/:batchId/proof
|
|
946
|
+
|
|
881
947
|
### variant
|
|
882
948
|
|
|
883
949
|
**get**(collectionId: string,
|