@proveanything/smartlinks 1.0.4 → 1.0.6

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.
Files changed (67) hide show
  1. package/dist/api/appConfiguration.d.ts +11 -0
  2. package/dist/api/appConfiguration.js +17 -0
  3. package/dist/api/asset.d.ts +9 -0
  4. package/dist/api/asset.js +40 -0
  5. package/dist/api/collection.d.ts +10 -0
  6. package/dist/api/collection.js +16 -0
  7. package/dist/api/index.d.ts +5 -0
  8. package/dist/api/index.js +7 -0
  9. package/dist/api/product.d.ts +18 -0
  10. package/dist/api/product.js +28 -0
  11. package/dist/api/proof.d.ts +11 -0
  12. package/dist/api/proof.js +17 -0
  13. package/dist/http.d.ts +18 -0
  14. package/dist/http.js +54 -0
  15. package/dist/index.d.ts +3 -113
  16. package/dist/index.js +5 -105
  17. package/dist/types/appConfiguration.d.ts +11 -0
  18. package/dist/types/appConfiguration.js +1 -0
  19. package/dist/types/asset.d.ts +8 -0
  20. package/dist/types/asset.js +1 -0
  21. package/dist/types/collection.d.ts +13 -0
  22. package/dist/types/collection.js +1 -0
  23. package/dist/types/error.d.ts +9 -0
  24. package/dist/types/error.js +1 -0
  25. package/dist/types/index.d.ts +6 -0
  26. package/dist/types/index.js +8 -0
  27. package/dist/types/product.d.ts +13 -0
  28. package/dist/types/product.js +1 -0
  29. package/dist/types/proof.d.ts +19 -0
  30. package/dist/types/proof.js +1 -0
  31. package/docs/assets/navigation.js +1 -1
  32. package/docs/assets/search.js +1 -1
  33. package/docs/documentation.json +1092 -279
  34. package/docs/functions/appConfiguration.get.html +1 -1
  35. package/docs/functions/asset.getAllForCollection.html +1 -0
  36. package/docs/functions/asset.getAllForProduct.html +1 -0
  37. package/docs/functions/asset.getAllForProof.html +1 -0
  38. package/docs/functions/asset.getForCollection.html +1 -0
  39. package/docs/functions/asset.getForProduct.html +1 -0
  40. package/docs/functions/asset.getForProof.html +1 -0
  41. package/docs/functions/collection.get.html +1 -1
  42. package/docs/functions/initializeApi.html +1 -1
  43. package/docs/functions/product.get.html +1 -1
  44. package/docs/functions/product.getAll.html +1 -1
  45. package/docs/functions/proof.get.html +1 -1
  46. package/docs/functions/request.html +1 -1
  47. package/docs/index.html +50 -29
  48. package/docs/interfaces/AppConfigurationResponse.html +4 -4
  49. package/docs/interfaces/AssetResponse.html +5 -0
  50. package/docs/interfaces/CollectionResponse.html +5 -5
  51. package/docs/interfaces/ErrorResponse.html +3 -3
  52. package/docs/interfaces/ProductResponse.html +5 -5
  53. package/docs/interfaces/ProofResponse.html +8 -8
  54. package/docs/modules/appConfiguration.html +1 -1
  55. package/docs/modules/asset.html +7 -0
  56. package/docs/modules/collection.html +1 -1
  57. package/docs/modules/product.html +1 -1
  58. package/docs/modules/proof.html +1 -1
  59. package/docs/modules.html +2 -0
  60. package/examples/browser-demo.html +20 -9
  61. package/examples/node-demo.ts +18 -10
  62. package/examples/react-demo.tsx +29 -15
  63. package/package.json +1 -1
  64. package/src/api/asset.ts +60 -0
  65. package/src/api/index.ts +1 -0
  66. package/src/types/asset.ts +9 -0
  67. package/src/types/index.ts +1 -0
@@ -0,0 +1,11 @@
1
+ import { AppConfigurationResponse } from "../types/appConfiguration";
2
+ export declare namespace appConfiguration {
3
+ /**
4
+ * Retrieves a single App Configuration by Collection ID and App ID.
5
+ * @param collectionId – Identifier of the parent collection
6
+ * @param appId – Identifier of the app configuration
7
+ * @returns Promise resolving to an AppConfigurationResponse object
8
+ * @throws ErrorResponse if the request fails
9
+ */
10
+ function get(collectionId: string, appId: string): Promise<AppConfigurationResponse>;
11
+ }
@@ -0,0 +1,17 @@
1
+ // src/api/appConfiguration.ts
2
+ import { request } from "../http";
3
+ export var appConfiguration;
4
+ (function (appConfiguration) {
5
+ /**
6
+ * Retrieves a single App Configuration by Collection ID and App ID.
7
+ * @param collectionId – Identifier of the parent collection
8
+ * @param appId – Identifier of the app configuration
9
+ * @returns Promise resolving to an AppConfigurationResponse object
10
+ * @throws ErrorResponse if the request fails
11
+ */
12
+ async function get(collectionId, appId) {
13
+ const path = `/public/collection/${encodeURIComponent(collectionId)}/app/${encodeURIComponent(appId)}`;
14
+ return request(path);
15
+ }
16
+ appConfiguration.get = get;
17
+ })(appConfiguration || (appConfiguration = {}));
@@ -0,0 +1,9 @@
1
+ import { AssetResponse } from "../types/asset";
2
+ export declare namespace asset {
3
+ function getForCollection(collectionId: string, assetId: string): Promise<AssetResponse>;
4
+ function getAllForCollection(collectionId: string): Promise<AssetResponse[]>;
5
+ function getForProduct(collectionId: string, productId: string, assetId: string): Promise<AssetResponse>;
6
+ function getAllForProduct(collectionId: string, productId: string): Promise<AssetResponse[]>;
7
+ function getForProof(collectionId: string, proofId: string, assetId: string): Promise<AssetResponse>;
8
+ function getAllForProof(collectionId: string, proofId: string, appId?: string): Promise<AssetResponse[]>;
9
+ }
@@ -0,0 +1,40 @@
1
+ import { request } from "../http";
2
+ export var asset;
3
+ (function (asset) {
4
+ // Collection-level
5
+ async function getForCollection(collectionId, assetId) {
6
+ const path = `/public/collection/${encodeURIComponent(collectionId)}/asset/${encodeURIComponent(assetId)}`;
7
+ return request(path);
8
+ }
9
+ asset.getForCollection = getForCollection;
10
+ async function getAllForCollection(collectionId) {
11
+ const path = `/public/collection/${encodeURIComponent(collectionId)}/asset`;
12
+ return request(path);
13
+ }
14
+ asset.getAllForCollection = getAllForCollection;
15
+ // Product-level
16
+ async function getForProduct(collectionId, productId, assetId) {
17
+ const path = `/public/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}/asset/${encodeURIComponent(assetId)}`;
18
+ return request(path);
19
+ }
20
+ asset.getForProduct = getForProduct;
21
+ async function getAllForProduct(collectionId, productId) {
22
+ const path = `/public/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}/asset`;
23
+ return request(path);
24
+ }
25
+ asset.getAllForProduct = getAllForProduct;
26
+ // Proof-level
27
+ async function getForProof(collectionId, proofId, assetId) {
28
+ const path = `/public/collection/${encodeURIComponent(collectionId)}/proof/${encodeURIComponent(proofId)}/asset/${encodeURIComponent(assetId)}`;
29
+ return request(path);
30
+ }
31
+ asset.getForProof = getForProof;
32
+ async function getAllForProof(collectionId, proofId, appId) {
33
+ let path = `/public/collection/${encodeURIComponent(collectionId)}/proof/${encodeURIComponent(proofId)}/asset`;
34
+ if (appId) {
35
+ path += `?appId=${encodeURIComponent(appId)}`;
36
+ }
37
+ return request(path);
38
+ }
39
+ asset.getAllForProof = getAllForProof;
40
+ })(asset || (asset = {}));
@@ -0,0 +1,10 @@
1
+ import { CollectionResponse } from "../types/collection";
2
+ export declare namespace collection {
3
+ /**
4
+ * Retrieves a single Collection by its ID.
5
+ * @param collectionId – Identifier of the collection
6
+ * @returns Promise resolving to a CollectionResponse object
7
+ * @throws ErrorResponse if the request fails
8
+ */
9
+ function get(collectionId: string): Promise<CollectionResponse>;
10
+ }
@@ -0,0 +1,16 @@
1
+ // src/api/collection.ts
2
+ import { request } from "../http";
3
+ export var collection;
4
+ (function (collection) {
5
+ /**
6
+ * Retrieves a single Collection by its ID.
7
+ * @param collectionId – Identifier of the collection
8
+ * @returns Promise resolving to a CollectionResponse object
9
+ * @throws ErrorResponse if the request fails
10
+ */
11
+ async function get(collectionId) {
12
+ const path = `/public/collection/${encodeURIComponent(collectionId)}`;
13
+ return request(path);
14
+ }
15
+ collection.get = get;
16
+ })(collection || (collection = {}));
@@ -0,0 +1,5 @@
1
+ export { collection } from "./collection";
2
+ export { product } from "./product";
3
+ export { proof } from "./proof";
4
+ export { appConfiguration } from "./appConfiguration";
5
+ export { asset } from "./asset";
@@ -0,0 +1,7 @@
1
+ // src/api/index.ts
2
+ // Re-export all resource namespaces so the consumer can import them in one line.
3
+ export { collection } from "./collection";
4
+ export { product } from "./product";
5
+ export { proof } from "./proof";
6
+ export { appConfiguration } from "./appConfiguration";
7
+ export { asset } from "./asset";
@@ -0,0 +1,18 @@
1
+ import { ProductResponse } from "../types/product";
2
+ export declare namespace product {
3
+ /**
4
+ * Retrieves a single Product Item by Collection ID and Product ID.
5
+ * @param collectionId – Identifier of the parent collection
6
+ * @param productId – Identifier of the product item
7
+ * @returns Promise resolving to a ProductResponse object
8
+ * @throws ErrorResponse if the request fails
9
+ */
10
+ function get(collectionId: string, productId: string): Promise<ProductResponse>;
11
+ /**
12
+ * Retrieves all Product Items for a Collection.
13
+ * @param collectionId – Identifier of the parent collection
14
+ * @returns Promise resolving to an array of ProductResponse objects
15
+ * @throws ErrorResponse if the request fails
16
+ */
17
+ function getAll(collectionId: string): Promise<ProductResponse[]>;
18
+ }
@@ -0,0 +1,28 @@
1
+ // src/api/product.ts
2
+ import { request } from "../http";
3
+ export var product;
4
+ (function (product) {
5
+ /**
6
+ * Retrieves a single Product Item by Collection ID and Product ID.
7
+ * @param collectionId – Identifier of the parent collection
8
+ * @param productId – Identifier of the product item
9
+ * @returns Promise resolving to a ProductResponse object
10
+ * @throws ErrorResponse if the request fails
11
+ */
12
+ async function get(collectionId, productId) {
13
+ const path = `/public/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}`;
14
+ return request(path);
15
+ }
16
+ product.get = get;
17
+ /**
18
+ * Retrieves all Product Items for a Collection.
19
+ * @param collectionId – Identifier of the parent collection
20
+ * @returns Promise resolving to an array of ProductResponse objects
21
+ * @throws ErrorResponse if the request fails
22
+ */
23
+ async function getAll(collectionId) {
24
+ const path = `/public/collection/${encodeURIComponent(collectionId)}/product`;
25
+ return request(path);
26
+ }
27
+ product.getAll = getAll;
28
+ })(product || (product = {}));
@@ -0,0 +1,11 @@
1
+ import { ProofResponse } from "../types/proof";
2
+ export declare namespace proof {
3
+ /**
4
+ * Retrieves a single Proof by Collection ID and Proof ID.
5
+ * @param collectionId – Identifier of the parent collection
6
+ * @param proofId – Identifier of the proof
7
+ * @returns Promise resolving to a ProofResponse object
8
+ * @throws ErrorResponse if the request fails
9
+ */
10
+ function get(collectionId: string, proofId: string): Promise<ProofResponse>;
11
+ }
@@ -0,0 +1,17 @@
1
+ // src/api/proof.ts
2
+ import { request } from "../http";
3
+ export var proof;
4
+ (function (proof) {
5
+ /**
6
+ * Retrieves a single Proof by Collection ID and Proof ID.
7
+ * @param collectionId – Identifier of the parent collection
8
+ * @param proofId – Identifier of the proof
9
+ * @returns Promise resolving to a ProofResponse object
10
+ * @throws ErrorResponse if the request fails
11
+ */
12
+ async function get(collectionId, proofId) {
13
+ const path = `/public/collection/${encodeURIComponent(collectionId)}/proof/${encodeURIComponent(proofId)}`;
14
+ return request(path);
15
+ }
16
+ proof.get = get;
17
+ })(proof || (proof = {}));
package/dist/http.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Call this once (e.g. at app startup) to configure baseURL/auth.
3
+ *
4
+ * @param options.baseURL - The root URL of the Smartlinks API (e.g. "https://smartlinks.app/api/v1")
5
+ * @param options.apiKey - (Optional) API key for X-API-Key header
6
+ * @param options.bearerToken - (Optional) Bearer token for AUTHORIZATION header
7
+ */
8
+ export declare function initializeApi(options: {
9
+ baseURL: string;
10
+ apiKey?: string;
11
+ bearerToken?: string;
12
+ }): void;
13
+ /**
14
+ * Internal helper that performs a GET request to \`\${baseURL}\${path}\`,
15
+ * injecting headers for apiKey or bearerToken if present.
16
+ * Returns the parsed JSON as T, or throws an Error.
17
+ */
18
+ export declare function request<T>(path: string): Promise<T>;
package/dist/http.js ADDED
@@ -0,0 +1,54 @@
1
+ // src/http.ts
2
+ // This module replaces the ApiClient constructor. It keeps baseURL, apiKey, bearerToken
3
+ // in module-scope variables, and provides a shared `request<T>(path)` helper that will
4
+ // be used by all namespaced files (collection.ts, product.ts, etc.).
5
+ let baseURL = null;
6
+ let apiKey = undefined;
7
+ let bearerToken = undefined;
8
+ /**
9
+ * Call this once (e.g. at app startup) to configure baseURL/auth.
10
+ *
11
+ * @param options.baseURL - The root URL of the Smartlinks API (e.g. "https://smartlinks.app/api/v1")
12
+ * @param options.apiKey - (Optional) API key for X-API-Key header
13
+ * @param options.bearerToken - (Optional) Bearer token for AUTHORIZATION header
14
+ */
15
+ export function initializeApi(options) {
16
+ baseURL = options.baseURL.replace(/\/+\$/, ""); // trim trailing slash
17
+ apiKey = options.apiKey;
18
+ bearerToken = options.bearerToken;
19
+ }
20
+ /**
21
+ * Internal helper that performs a GET request to \`\${baseURL}\${path}\`,
22
+ * injecting headers for apiKey or bearerToken if present.
23
+ * Returns the parsed JSON as T, or throws an Error.
24
+ */
25
+ export async function request(path) {
26
+ if (!baseURL) {
27
+ throw new Error("HTTP client is not initialized. Call initializeApi(...) first.");
28
+ }
29
+ const url = `${baseURL}${path}`;
30
+ const headers = {
31
+ "Content-Type": "application/json",
32
+ };
33
+ if (apiKey) {
34
+ headers["X-API-Key"] = apiKey;
35
+ }
36
+ if (bearerToken) {
37
+ headers["AUTHORIZATION"] = `Bearer ${bearerToken}`;
38
+ }
39
+ const response = await fetch(url, {
40
+ method: "GET",
41
+ headers,
42
+ });
43
+ if (!response.ok) {
44
+ // Try to parse ErrorResponse; if that fails, throw generic
45
+ try {
46
+ const errBody = (await response.json());
47
+ throw new Error(`Error ${errBody.code}: ${errBody.message}`);
48
+ }
49
+ catch (_a) {
50
+ throw new Error(`Request to ${url} failed with status ${response.status}`);
51
+ }
52
+ }
53
+ return (await response.json());
54
+ }
package/dist/index.d.ts CHANGED
@@ -1,113 +1,3 @@
1
- /**
2
- * Represents a Collection object.
3
- */
4
- export interface CollectionResponse {
5
- /** Unique identifier for the collection */
6
- id: string;
7
- /** Machine‐readable name of the collection */
8
- name: string;
9
- /** Human‐readable title of the collection */
10
- title: string;
11
- /** URL to the collection’s logo image */
12
- logoImage: string;
13
- }
14
- /**
15
- * Represents a Product Item object.
16
- */
17
- export interface ProductResponse {
18
- /** Unique identifier for the product */
19
- id: string;
20
- /** Name of the product */
21
- name: string;
22
- /** Detailed description of the product */
23
- description: string;
24
- /** URL to the product’s hero image */
25
- heroImage: string;
26
- }
27
- /**
28
- * Represents an App Configuration object.
29
- */
30
- export interface AppConfigurationResponse {
31
- /** Unique identifier for the app configuration */
32
- id: string;
33
- /** Name of the app configuration */
34
- name: string;
35
- /** Key‐value pairs representing configuration settings */
36
- settings?: Record<string, any>;
37
- }
38
- /**
39
- * Represents a standardized error response.
40
- */
41
- export interface ErrorResponse {
42
- /** Numeric error code */
43
- code: number;
44
- /** Human‐readable error message */
45
- message: string;
46
- }
47
- /**
48
- * ApiClient for the Smartlinks API.
49
- * Supports both browser (native fetch) and Node (using cross-fetch).
50
- */
51
- export declare class ApiClient {
52
- private baseURL;
53
- private apiKey?;
54
- private bearerToken?;
55
- /**
56
- * Creates an instance of ApiClient.
57
- * @param baseURL - The base URL of the Smartlinks API (e.g., https://smartlinks.app/api/v1)
58
- * @param apiKey - (Optional) API key for X-API-Key header
59
- * @param bearerToken - (Optional) Bearer token for AUTHORIZATION header
60
- *
61
- * @example
62
- * // With both API key and bearer token
63
- * const client = new ApiClient(
64
- * 'https://smartlinks.app/api/v1',
65
- * 'your-api-key',
66
- * 'your-bearer-token'
67
- * );
68
- *
69
- * // With only API key
70
- * const client = new ApiClient(
71
- * 'https://smartlinks.app/api/v1',
72
- * 'your-api-key'
73
- * );
74
- *
75
- * // With only bearer token
76
- * const client = new ApiClient(
77
- * 'https://smartlinks.app/api/v1',
78
- * undefined,
79
- * 'your-bearer-token'
80
- * );
81
- */
82
- constructor(baseURL: string, apiKey?: string, bearerToken?: string);
83
- /**
84
- * Retrieves a single Collection by its ID.
85
- * @param collectionId - Identifier of the collection
86
- * @returns Promise resolving to a CollectionResponse object
87
- * @throws ErrorResponse if the request fails
88
- */
89
- getCollection(collectionId: string): Promise<CollectionResponse>;
90
- /**
91
- * Retrieves a single Product Item by Collection ID and Product ID.
92
- * @param collectionId - Identifier of the parent collection
93
- * @param productId - Identifier of the product item
94
- * @returns Promise resolving to a ProductResponse object
95
- * @throws ErrorResponse if the request fails
96
- */
97
- getProductItem(collectionId: string, productId: string): Promise<ProductResponse>;
98
- /**
99
- * Retrieves a single App Configuration by Collection ID and App ID.
100
- * @param collectionId - Identifier of the parent collection
101
- * @param appId - Identifier of the app configuration
102
- * @returns Promise resolving to an AppConfigurationResponse object
103
- * @throws ErrorResponse if the request fails
104
- */
105
- getAppConfiguration(collectionId: string, appId: string): Promise<AppConfigurationResponse>;
106
- /**
107
- * Internal helper to perform a GET request and parse JSON.
108
- * @param path - The path (relative to baseURL) to request
109
- * @returns Promise resolving to the parsed JSON of type T
110
- * @throws Error if network error or a non-2xx response is returned
111
- */
112
- private request;
113
- }
1
+ export { initializeApi, request } from "./http";
2
+ export * from "./api";
3
+ export * from "./types";
package/dist/index.js CHANGED
@@ -1,105 +1,5 @@
1
- import fetch from 'cross-fetch';
2
- ///////////////////////////
3
- // ApiClient Class
4
- ///////////////////////////
5
- /**
6
- * ApiClient for the Smartlinks API.
7
- * Supports both browser (native fetch) and Node (using cross-fetch).
8
- */
9
- export class ApiClient {
10
- /**
11
- * Creates an instance of ApiClient.
12
- * @param baseURL - The base URL of the Smartlinks API (e.g., https://smartlinks.app/api/v1)
13
- * @param apiKey - (Optional) API key for X-API-Key header
14
- * @param bearerToken - (Optional) Bearer token for AUTHORIZATION header
15
- *
16
- * @example
17
- * // With both API key and bearer token
18
- * const client = new ApiClient(
19
- * 'https://smartlinks.app/api/v1',
20
- * 'your-api-key',
21
- * 'your-bearer-token'
22
- * );
23
- *
24
- * // With only API key
25
- * const client = new ApiClient(
26
- * 'https://smartlinks.app/api/v1',
27
- * 'your-api-key'
28
- * );
29
- *
30
- * // With only bearer token
31
- * const client = new ApiClient(
32
- * 'https://smartlinks.app/api/v1',
33
- * undefined,
34
- * 'your-bearer-token'
35
- * );
36
- */
37
- constructor(baseURL, apiKey, bearerToken) {
38
- this.baseURL = baseURL.replace(/\/+$/, ''); // Trim trailing slash
39
- this.apiKey = apiKey;
40
- this.bearerToken = bearerToken;
41
- }
42
- /**
43
- * Retrieves a single Collection by its ID.
44
- * @param collectionId - Identifier of the collection
45
- * @returns Promise resolving to a CollectionResponse object
46
- * @throws ErrorResponse if the request fails
47
- */
48
- async getCollection(collectionId) {
49
- const path = `/public/collection/${encodeURIComponent(collectionId)}`;
50
- return this.request(path);
51
- }
52
- /**
53
- * Retrieves a single Product Item by Collection ID and Product ID.
54
- * @param collectionId - Identifier of the parent collection
55
- * @param productId - Identifier of the product item
56
- * @returns Promise resolving to a ProductResponse object
57
- * @throws ErrorResponse if the request fails
58
- */
59
- async getProductItem(collectionId, productId) {
60
- const path = `/public/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}`;
61
- return this.request(path);
62
- }
63
- /**
64
- * Retrieves a single App Configuration by Collection ID and App ID.
65
- * @param collectionId - Identifier of the parent collection
66
- * @param appId - Identifier of the app configuration
67
- * @returns Promise resolving to an AppConfigurationResponse object
68
- * @throws ErrorResponse if the request fails
69
- */
70
- async getAppConfiguration(collectionId, appId) {
71
- const path = `/public/collection/${encodeURIComponent(collectionId)}/app/${encodeURIComponent(appId)}`;
72
- return this.request(path);
73
- }
74
- /**
75
- * Internal helper to perform a GET request and parse JSON.
76
- * @param path - The path (relative to baseURL) to request
77
- * @returns Promise resolving to the parsed JSON of type T
78
- * @throws Error if network error or a non-2xx response is returned
79
- */
80
- async request(path) {
81
- const url = `${this.baseURL}${path}`;
82
- const headers = {
83
- 'Content-Type': 'application/json',
84
- };
85
- if (this.apiKey) {
86
- headers['X-API-Key'] = this.apiKey;
87
- }
88
- if (this.bearerToken) {
89
- headers['AUTHORIZATION'] = `Bearer ${this.bearerToken}`;
90
- }
91
- const response = await fetch(url, { method: 'GET', headers });
92
- if (!response.ok) {
93
- // Attempt to parse error body; if it fails, throw generic
94
- let errorBody;
95
- try {
96
- errorBody = (await response.json());
97
- }
98
- catch (_a) {
99
- throw new Error(`Request failed with status ${response.status}`);
100
- }
101
- throw new Error(`Error ${errorBody.code}: ${errorBody.message}`);
102
- }
103
- return (await response.json());
104
- }
105
- }
1
+ // src/index.ts
2
+ // Top-level entrypoint of the npm package. Re-export initializeApi + all namespaces.
3
+ export { initializeApi, request } from "./http";
4
+ export * from "./api";
5
+ export * from "./types";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Represents an App Configuration object.
3
+ */
4
+ export interface AppConfigurationResponse {
5
+ /** Unique identifier for the app configuration */
6
+ id: string;
7
+ /** Name of the app configuration */
8
+ name: string;
9
+ /** Key-value pairs representing configuration settings */
10
+ settings?: Record<string, any>;
11
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Represents an Asset object.
3
+ */
4
+ export interface AssetResponse {
5
+ id: string;
6
+ name: string;
7
+ url: string;
8
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Represents a Collection object.
3
+ */
4
+ export interface CollectionResponse {
5
+ /** Unique identifier for the collection */
6
+ id: string;
7
+ /** Machine-readable name of the collection */
8
+ name: string;
9
+ /** Human-readable title of the collection */
10
+ title: string;
11
+ /** URL to the collection’s logo image */
12
+ logoImage: string;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Represents a standardized error response.
3
+ */
4
+ export interface ErrorResponse {
5
+ /** Numeric error code */
6
+ code: number;
7
+ /** Human-readable error message */
8
+ message: string;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from "./collection";
2
+ export * from "./product";
3
+ export * from "./proof";
4
+ export * from "./appConfiguration";
5
+ export * from "./error";
6
+ export * from "./asset";
@@ -0,0 +1,8 @@
1
+ // src/types/index.ts
2
+ // Re-export all type modules so consumers can import types directly
3
+ export * from "./collection";
4
+ export * from "./product";
5
+ export * from "./proof";
6
+ export * from "./appConfiguration";
7
+ export * from "./error";
8
+ export * from "./asset";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Represents a Product Item object.
3
+ */
4
+ export interface ProductResponse {
5
+ /** Unique identifier for the product */
6
+ id: string;
7
+ /** Name of the product */
8
+ name: string;
9
+ /** Detailed description of the product */
10
+ description: string;
11
+ /** URL to the product’s hero image */
12
+ heroImage: string;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Represents a Proof object.
3
+ */
4
+ export interface ProofResponse {
5
+ /** Unique identifier for the collection */
6
+ collectionId: string;
7
+ /** Creation timestamp */
8
+ createdAt: string;
9
+ /** Unique identifier for the proof */
10
+ id: string;
11
+ /** Unique identifier for the product */
12
+ productId: string;
13
+ /** Unique identifier for the token */
14
+ tokenId: string;
15
+ /** Unique identifier for the user */
16
+ userId: string;
17
+ /** Arbitrary key-value pairs for proof values */
18
+ values: Record<string, any>;
19
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACqWSP2sDMQzFv4tm00BJM9x2hO6la8hgfPKdqWK5tg9KQ757KE3vr2sPN+vppyfpna4Q8StCBdK5I1tt2t7LaNiCACdjBxVcuOkJw26peOrihUDAh7ENVHsBqjPUeLRQnQZsi3Ek6d6qn84Eq8U45x32t/NNDBzFRKjSxsbaFksTSsmM89z0Kq6dPApbbPwhUh7EtLkmKvTXRKU1WCeXYL1xBdbFI9aLCLxjcGwDjkRjI3otFYbdf+L5hOeXw2TAcXhoFr2W5aCv3rPP8maKHOrt91NZ2EJTwLEuwUZFDmWsiUaS+cbamdSHZ4JMTD1+9hiSIXmU1hG5A7A/4f2TBAAA"
1
+ window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACpWUQW+EIBSE/8s7m27SbPfgzWzac9PrpgeDDyVlgQVMmjb73xsbXRER8CrDx8xj8PILFr8tlFArdZaCsrbXtWVSQAGqth2UcJVNz9EcfMVTZ68cCvhiooHyWADpGG80CigvD2yLdibRXpBhZ4DVol3yTsf7572Y7Rnjkh6ehs+5RirO36Q+S86RLCM6xv6BAfHKXbFGv2vZ9CQceMkdlZlQSfOQksaB+el3RM/MnRs6K/FmXLcyJBB16g3ZCLevxQ4l1V/lj2hyokJD2Wdj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