@proveanything/smartlinks 1.1.3 → 1.1.5

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.1.3 | Generated: 2025-12-19T16:03:17.326Z
3
+ Version: 1.1.5 | Generated: 2025-12-22T12:25:20.811Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -39,6 +39,7 @@ The Smartlinks SDK is organized into the following namespaces:
39
39
  - **nfc** - Claim and validate NFC tags; perform tag lookups.
40
40
  - **proof** - Create, update, claim, and list product proofs (digital certificates).
41
41
  - **claimSet** - Manage claim sets and tag assignments; queries, reports, and updates.
42
+ - **qr** - Lookup short codes to resolve collection/product/proof context.
42
43
 
43
44
  — AI & Utilities —
44
45
  - **ai** - Generate content and images, search photos, chat, upload files, and cache.
@@ -1126,6 +1127,18 @@ interface ProofCreateRequest {
1126
1127
 
1127
1128
  **ProofClaimRequest** = `Record<string, any>`
1128
1129
 
1130
+ ### qr
1131
+
1132
+ **QrShortCodeLookupResponse** (interface)
1133
+ ```typescript
1134
+ interface QrShortCodeLookupResponse {
1135
+ collectionId?: string
1136
+ productId?: string
1137
+ proofId?: string
1138
+ code: string
1139
+ }
1140
+ ```
1141
+
1129
1142
  ### segments
1130
1143
 
1131
1144
  **SegmentRecord** (interface)
@@ -1944,6 +1957,11 @@ Find proofs for a product (admin only). POST /admin/collection/:collectionId/pro
1944
1957
  batchId: string) → `Promise<ProofResponse[]>`
1945
1958
  Get proofs for a batch (admin only). GET /admin/collection/:collectionId/product/:productId/batch/:batchId/proof
1946
1959
 
1960
+ ### qr
1961
+
1962
+ **lookupShortCode**(shortId: string, code: string) → `Promise<QrShortCodeLookupResponse>`
1963
+ Resolve a short code to related resource identifiers.
1964
+
1947
1965
  ### segments
1948
1966
 
1949
1967
  **create**(collectionId: string,
@@ -20,4 +20,5 @@ export { actions } from "./actions";
20
20
  export { broadcasts } from "./broadcasts";
21
21
  export { segments } from "./segments";
22
22
  export { journeys } from "./journeys";
23
+ export { qr } from "./qr";
23
24
  export type { AIGenerateContentRequest, AIGenerateImageRequest, AISearchPhotosRequest, AISearchPhotosPhoto } from "./ai";
package/dist/api/index.js CHANGED
@@ -22,3 +22,4 @@ export { actions } from "./actions";
22
22
  export { broadcasts } from "./broadcasts";
23
23
  export { segments } from "./segments";
24
24
  export { journeys } from "./journeys";
25
+ export { qr } from "./qr";
@@ -0,0 +1,14 @@
1
+ import type { QrShortCodeLookupResponse } from "../types/qr";
2
+ /**
3
+ * QR namespace for public short code lookups.
4
+ */
5
+ export declare namespace qr {
6
+ /**
7
+ * Resolve a short code to related resource identifiers.
8
+ *
9
+ * @param shortId - The short code identifier namespace
10
+ * @param code - The actual code to look up
11
+ * @returns Mapping with optional `collectionId`, `productId`, `proofId` and the `code`
12
+ */
13
+ function lookupShortCode(shortId: string, code: string): Promise<QrShortCodeLookupResponse>;
14
+ }
package/dist/api/qr.js ADDED
@@ -0,0 +1,21 @@
1
+ // src/api/qr.ts
2
+ // QR / Short code lookup API
3
+ import { request } from "../http";
4
+ /**
5
+ * QR namespace for public short code lookups.
6
+ */
7
+ export var qr;
8
+ (function (qr) {
9
+ /**
10
+ * Resolve a short code to related resource identifiers.
11
+ *
12
+ * @param shortId - The short code identifier namespace
13
+ * @param code - The actual code to look up
14
+ * @returns Mapping with optional `collectionId`, `productId`, `proofId` and the `code`
15
+ */
16
+ async function lookupShortCode(shortId, code) {
17
+ const path = `/public/qr/lookupShortCode/${encodeURIComponent(shortId)}/${encodeURIComponent(code)}`;
18
+ return request(path);
19
+ }
20
+ qr.lookupShortCode = lookupShortCode;
21
+ })(qr || (qr = {}));
package/dist/index.d.ts CHANGED
@@ -12,3 +12,4 @@ export type { AppConfigOptions } from "./api/appConfiguration";
12
12
  export type { ProductCreateRequest, ProductUpdateRequest, Product, } from "./types/product";
13
13
  export type { Collection, CollectionResponse, CollectionCreateRequest, CollectionUpdateRequest, } from "./types/collection";
14
14
  export type { Proof, ProofResponse, ProofCreateRequest, ProofUpdateRequest, ProofClaimRequest, } from "./types/proof";
15
+ export type { QrShortCodeLookupResponse, } from "./types/qr";
@@ -16,3 +16,4 @@ export * from "./broadcasts";
16
16
  export * from "./segments";
17
17
  export * from "./common";
18
18
  export * from "./journeys";
19
+ export * from "./qr";
@@ -18,3 +18,4 @@ export * from "./broadcasts";
18
18
  export * from "./segments";
19
19
  export * from "./common";
20
20
  export * from "./journeys";
21
+ export * from "./qr";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Response for public short code lookup.
3
+ * Resolves the short code to related resource identifiers.
4
+ */
5
+ export interface QrShortCodeLookupResponse {
6
+ /** The collection ID, if applicable */
7
+ collectionId?: string;
8
+ /** The product ID, if applicable */
9
+ productId?: string;
10
+ /** The proof ID, if applicable */
11
+ proofId?: string;
12
+ /** The resolved code string */
13
+ code: string;
14
+ }
@@ -0,0 +1,2 @@
1
+ // src/types/qr.ts
2
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",