@proveanything/smartlinks 1.0.40 → 1.0.41

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.40 | Generated: 2025-11-09T13:05:52.500Z
3
+ Version: 1.0.41 | Generated: 2025-11-16T09:32:15.868Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -752,10 +752,12 @@ Look up a serial number by code for a product (admin only).
752
752
  **get**(collectionId: string,
753
753
  productId: string,
754
754
  proofId: string,
755
- admin?: boolean) → `Promise<ProofResponse>`
755
+ admin?: boolean,
756
+ include?: string[]) → `Promise<ProofResponse>`
756
757
  Retrieves a single Proof by Collection ID, Product ID, and Proof ID. Both public and admin endpoints now include productId in the path.
757
758
 
758
- **list**(collectionId: string) → `Promise<ProofResponse[]>`
759
+ **list**(collectionId: string,
760
+ include?: string[]) → `Promise<ProofResponse[]>`
759
761
  List all Proofs for a Collection.
760
762
 
761
763
  **create**(collectionId: string,
@@ -4,11 +4,11 @@ export declare namespace proof {
4
4
  * Retrieves a single Proof by Collection ID, Product ID, and Proof ID.
5
5
  * Both public and admin endpoints now include productId in the path.
6
6
  */
7
- function get(collectionId: string, productId: string, proofId: string, admin?: boolean): Promise<ProofResponse>;
7
+ function get(collectionId: string, productId: string, proofId: string, admin?: boolean, include?: string[]): Promise<ProofResponse>;
8
8
  /**
9
9
  * List all Proofs for a Collection.
10
10
  */
11
- function list(collectionId: string): Promise<ProofResponse[]>;
11
+ function list(collectionId: string, include?: string[]): Promise<ProofResponse[]>;
12
12
  /**
13
13
  * Create a proof for a product (admin only).
14
14
  * POST /admin/collection/:collectionId/product/:productId/proof
package/dist/api/proof.js CHANGED
@@ -6,17 +6,19 @@ export var proof;
6
6
  * Retrieves a single Proof by Collection ID, Product ID, and Proof ID.
7
7
  * Both public and admin endpoints now include productId in the path.
8
8
  */
9
- async function get(collectionId, productId, proofId, admin) {
9
+ async function get(collectionId, productId, proofId, admin, include) {
10
10
  const base = admin ? '/admin' : '/public';
11
- const path = `${base}/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}/proof/${encodeURIComponent(proofId)}`;
11
+ const qp = include && include.length ? `?include=${encodeURIComponent(include.join(','))}` : '';
12
+ const path = `${base}/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}/proof/${encodeURIComponent(proofId)}${qp}`;
12
13
  return request(path);
13
14
  }
14
15
  proof.get = get;
15
16
  /**
16
17
  * List all Proofs for a Collection.
17
18
  */
18
- async function list(collectionId) {
19
- const path = `/public/collection/${encodeURIComponent(collectionId)}/proof`;
19
+ async function list(collectionId, include) {
20
+ const qp = include && include.length ? `?include=${encodeURIComponent(include.join(','))}` : '';
21
+ const path = `/public/collection/${encodeURIComponent(collectionId)}/proof${qp}`;
20
22
  return request(path);
21
23
  }
22
24
  proof.list = list;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",