@proveanything/smartlinks 1.1.3 → 1.1.4
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 +19 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/qr.d.ts +15 -0
- package/dist/api/qr.js +22 -0
- package/dist/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/qr.d.ts +14 -0
- package/dist/types/qr.js +2 -0
- package/package.json +1 -1
package/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.4 | Generated: 2025-12-21T18:19:46.355Z
|
|
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. GET /public/lookupShortCode/:shortId/:code
|
|
1964
|
+
|
|
1947
1965
|
### segments
|
|
1948
1966
|
|
|
1949
1967
|
**create**(collectionId: string,
|
package/dist/api/index.d.ts
CHANGED
|
@@ -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
package/dist/api/qr.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
* GET /public/lookupShortCode/:shortId/:code
|
|
9
|
+
*
|
|
10
|
+
* @param shortId - The short code identifier namespace
|
|
11
|
+
* @param code - The actual code to look up
|
|
12
|
+
* @returns Mapping with optional `collectionId`, `productId`, `proofId` and the `code`
|
|
13
|
+
*/
|
|
14
|
+
function lookupShortCode(shortId: string, code: string): Promise<QrShortCodeLookupResponse>;
|
|
15
|
+
}
|
package/dist/api/qr.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
* GET /public/lookupShortCode/:shortId/:code
|
|
12
|
+
*
|
|
13
|
+
* @param shortId - The short code identifier namespace
|
|
14
|
+
* @param code - The actual code to look up
|
|
15
|
+
* @returns Mapping with optional `collectionId`, `productId`, `proofId` and the `code`
|
|
16
|
+
*/
|
|
17
|
+
async function lookupShortCode(shortId, code) {
|
|
18
|
+
const path = `/public/lookupShortCode/${encodeURIComponent(shortId)}/${encodeURIComponent(code)}`;
|
|
19
|
+
return request(path);
|
|
20
|
+
}
|
|
21
|
+
qr.lookupShortCode = lookupShortCode;
|
|
22
|
+
})(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";
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -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
|
+
}
|
package/dist/types/qr.js
ADDED