@proveanything/smartlinks 1.0.14 → 1.0.16
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/README.md +12 -150
- package/build-docs.ts +28 -0
- package/dist/api/appConfiguration.d.ts +20 -9
- package/dist/api/appConfiguration.js +85 -11
- package/dist/api/auth.d.ts +3 -4
- package/dist/build-docs.js +26 -0
- package/dist/http.d.ts +5 -3
- package/dist/http.js +5 -3
- package/dist/index.d.ts +3 -0
- package/docs/README.md +282 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/documentation.json +3311 -1573
- package/docs/functions/appConfiguration.deleteConfig.html +1 -0
- package/docs/functions/appConfiguration.deleteDataItem.html +1 -0
- package/docs/functions/appConfiguration.getConfig.html +1 -0
- package/docs/functions/appConfiguration.getData.html +1 -0
- package/docs/functions/appConfiguration.getDataItem.html +1 -0
- package/docs/functions/appConfiguration.setConfig.html +1 -0
- package/docs/functions/appConfiguration.setDataItem.html +1 -0
- package/docs/functions/attestation.create.html +2 -2
- package/docs/functions/attestation.get.html +2 -2
- package/docs/functions/attestation.list.html +2 -2
- package/docs/functions/attestation.update.html +2 -2
- package/docs/functions/auth.getAccount.html +2 -2
- package/docs/functions/auth.login.html +2 -2
- package/docs/functions/auth.verifyToken.html +2 -2
- package/docs/functions/initializeApi.html +2 -4
- package/docs/functions/request.html +1 -1
- package/docs/interfaces/AttestationCreateRequest.html +4 -0
- package/docs/interfaces/AttestationResponse.html +7 -0
- package/docs/interfaces/AttestationUpdateRequest.html +3 -0
- package/docs/modules/appConfiguration.html +7 -1
- package/docs/modules.html +7 -0
- package/docs/types/AccountInfoResponse.html +1 -0
- package/docs/types/AppConfigOptions.html +1 -0
- package/docs/types/LoginResponse.html +1 -0
- package/docs/types/VerifyTokenResponse.html +1 -0
- package/package.json +5 -2
- package/src/api/appConfiguration.ts +99 -17
- package/src/api/auth.ts +3 -3
- package/src/http.ts +7 -5
- package/src/index.ts +13 -0
- package/temp-docs/.nojekyll +1 -0
- package/temp-docs/README.md +101 -0
- package/temp-docs/interfaces/AppConfigurationResponse.md +45 -0
- package/temp-docs/interfaces/AssetResponse.md +39 -0
- package/temp-docs/interfaces/AttestationCreateRequest.md +37 -0
- package/temp-docs/interfaces/AttestationResponse.md +70 -0
- package/temp-docs/interfaces/AttestationUpdateRequest.md +26 -0
- package/temp-docs/interfaces/CollectionResponse.md +58 -0
- package/temp-docs/interfaces/ErrorResponse.md +32 -0
- package/temp-docs/interfaces/ProductResponse.md +58 -0
- package/temp-docs/interfaces/ProofResponse.md +97 -0
- package/temp-docs/modules/appConfiguration.md +151 -0
- package/temp-docs/modules/asset.md +171 -0
- package/temp-docs/modules/attestation.md +134 -0
- package/temp-docs/modules/auth.md +88 -0
- package/temp-docs/modules/collection.md +33 -0
- package/temp-docs/modules/product.md +63 -0
- package/temp-docs/modules/proof.md +57 -0
- package/temp-docs/modules.md +176 -0
- package/docs/functions/appConfiguration.get.html +0 -6
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proveanything/smartlinks",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
-
"docs": "typedoc --out docs src/index.ts --json docs/documentation.json"
|
|
9
|
+
"docs": "typedoc --out docs src/index.ts --json docs/documentation.json",
|
|
10
|
+
"build:docs": "tsc build-docs.ts --outDir dist && node dist/build-docs.js"
|
|
10
11
|
},
|
|
11
12
|
"author": "Glenn Shoosmith",
|
|
12
13
|
"license": "MIT",
|
|
@@ -17,7 +18,9 @@
|
|
|
17
18
|
"cross-fetch": "^3.1.5"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
21
|
+
"ts-node": "^10.9.1",
|
|
20
22
|
"typedoc": "^0.25.13",
|
|
23
|
+
"typedoc-plugin-markdown": "^3.17.1",
|
|
21
24
|
"typescript": "^4.9.0"
|
|
22
25
|
},
|
|
23
26
|
"repository": {
|
|
@@ -1,22 +1,104 @@
|
|
|
1
1
|
// src/api/appConfiguration.ts
|
|
2
|
-
import { request } from "../http"
|
|
3
|
-
|
|
2
|
+
import { request, post, del } from "../http"
|
|
3
|
+
|
|
4
|
+
export type AppConfigOptions = {
|
|
5
|
+
appId: string
|
|
6
|
+
collectionId?: string
|
|
7
|
+
productId?: string
|
|
8
|
+
variantId?: string
|
|
9
|
+
batchId?: string
|
|
10
|
+
itemId?: string
|
|
11
|
+
user?: boolean
|
|
12
|
+
userData?: boolean
|
|
13
|
+
admin?: boolean
|
|
14
|
+
config?: any
|
|
15
|
+
data?: any
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function buildAppPath(opts: AppConfigOptions, type: "config" | "data" | "dataItem"): string {
|
|
19
|
+
if (opts.user) {
|
|
20
|
+
// /public/auth/app/:appId
|
|
21
|
+
let path = `/public/auth/app/${encodeURIComponent(opts.appId)}`
|
|
22
|
+
if (type === "data") path += "/data"
|
|
23
|
+
if (type === "dataItem" && opts.itemId) path += `/data/${encodeURIComponent(opts.itemId)}`
|
|
24
|
+
return path
|
|
25
|
+
}
|
|
26
|
+
if (opts.userData) {
|
|
27
|
+
// /public/auth/app/:appId/data or /public/auth/app/:appId/data/:itemId
|
|
28
|
+
let path = `/public/auth/app/${encodeURIComponent(opts.appId)}/data`
|
|
29
|
+
if (type === "dataItem" && opts.itemId) path += `/${encodeURIComponent(opts.itemId)}`
|
|
30
|
+
return path
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const base = opts.admin ? "admin" : "public"
|
|
34
|
+
let path = `/${base}`
|
|
35
|
+
|
|
36
|
+
if (opts.collectionId) {
|
|
37
|
+
path += `/collection/${encodeURIComponent(opts.collectionId)}`
|
|
38
|
+
if (opts.productId) {
|
|
39
|
+
path += `/product/${encodeURIComponent(opts.productId)}`
|
|
40
|
+
if (opts.variantId) {
|
|
41
|
+
path += `/variant/${encodeURIComponent(opts.variantId)}`
|
|
42
|
+
} else if (opts.batchId) {
|
|
43
|
+
path += `/batch/${encodeURIComponent(opts.batchId)}`
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
path += `/app/${encodeURIComponent(opts.appId)}`
|
|
49
|
+
|
|
50
|
+
if (type === "data" || type === "dataItem") {
|
|
51
|
+
path += "/data"
|
|
52
|
+
if (type === "dataItem" && opts.itemId) {
|
|
53
|
+
path += `/${encodeURIComponent(opts.itemId)}`
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return path
|
|
58
|
+
}
|
|
4
59
|
|
|
5
60
|
export namespace appConfiguration {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export async function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
61
|
+
// Get config (app, collection, product, variant, batch, user)
|
|
62
|
+
export async function getConfig(opts: AppConfigOptions): Promise<any> {
|
|
63
|
+
const path = buildAppPath(opts, "config")
|
|
64
|
+
return request<any>(path)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Set config (app, collection, product, variant, batch, user)
|
|
68
|
+
export async function setConfig(opts: AppConfigOptions): Promise<any> {
|
|
69
|
+
const path = buildAppPath(opts, "config")
|
|
70
|
+
return post<any>(path, opts.config)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Delete config (user only)
|
|
74
|
+
export async function deleteConfig(opts: AppConfigOptions): Promise<void> {
|
|
75
|
+
const path = buildAppPath(opts, "config")
|
|
76
|
+
return del<void>(path)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Get all data items (app, collection, product, variant, batch, userData)
|
|
80
|
+
export async function getData(opts: AppConfigOptions): Promise<any[]> {
|
|
81
|
+
const path = buildAppPath(opts, "data")
|
|
82
|
+
return request<any[]>(path)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Get a single data item (app, collection, product, variant, batch, userData)
|
|
86
|
+
export async function getDataItem(opts: AppConfigOptions): Promise<any> {
|
|
87
|
+
if (!opts.itemId) throw new Error("itemId is required for getDataItem")
|
|
88
|
+
const path = buildAppPath(opts, "dataItem")
|
|
89
|
+
return request<any>(path)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Set a data item (app, collection, product, variant, batch, userData)
|
|
93
|
+
export async function setDataItem(opts: AppConfigOptions): Promise<any> {
|
|
94
|
+
const path = buildAppPath(opts, "data")
|
|
95
|
+
return post<any>(path, opts.data)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Delete a data item (app, collection, product, variant, batch, userData)
|
|
99
|
+
export async function deleteDataItem(opts: AppConfigOptions): Promise<void> {
|
|
100
|
+
if (!opts.itemId) throw new Error("itemId is required for deleteDataItem")
|
|
101
|
+
const path = buildAppPath(opts, "dataItem")
|
|
102
|
+
return del<void>(path)
|
|
21
103
|
}
|
|
22
104
|
}
|
package/src/api/auth.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { post, request, setBearerToken, getApiHeaders } from "../http"
|
|
2
2
|
|
|
3
|
-
type LoginResponse = {
|
|
3
|
+
export type LoginResponse = {
|
|
4
4
|
id: string
|
|
5
5
|
name: string
|
|
6
6
|
email: string
|
|
@@ -8,7 +8,7 @@ type LoginResponse = {
|
|
|
8
8
|
account: Record<string, any>
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
type VerifyTokenResponse = {
|
|
11
|
+
export type VerifyTokenResponse = {
|
|
12
12
|
valid: boolean
|
|
13
13
|
id?: string
|
|
14
14
|
name?: string
|
|
@@ -16,7 +16,7 @@ type VerifyTokenResponse = {
|
|
|
16
16
|
account?: Record<string, any>
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
type AccountInfoResponse = {
|
|
19
|
+
export type AccountInfoResponse = {
|
|
20
20
|
user: Record<string, any>
|
|
21
21
|
owner: Record<string, any>
|
|
22
22
|
account: Record<string, any>
|
package/src/http.ts
CHANGED
|
@@ -9,11 +9,13 @@ let bearerToken: string | undefined = undefined
|
|
|
9
9
|
let proxyMode: boolean = false
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Call this once (e.g. at app startup) to configure baseURL/auth.
|
|
13
|
-
*
|
|
14
|
-
* @param options
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
12
|
+
* Call this once (e.g. at app startup) to configure baseURL/auth.
|
|
13
|
+
*
|
|
14
|
+
* @param options - Configuration options
|
|
15
|
+
* @property {string} options.baseURL - The root URL of the Smartlinks API (e.g. "https://smartlinks.app/api/v1")
|
|
16
|
+
* @property {string} [options.apiKey] - (Optional) API key for X-API-Key header
|
|
17
|
+
* @property {string} [options.bearerToken] - (Optional) Bearer token for AUTHORIZATION header
|
|
18
|
+
* @property {boolean} [options.proxyMode] - (Optional) Tells the API that it is running in an iframe via parent proxy
|
|
17
19
|
*/
|
|
18
20
|
export function initializeApi(options: {
|
|
19
21
|
baseURL: string
|
package/src/index.ts
CHANGED
|
@@ -4,3 +4,16 @@
|
|
|
4
4
|
export { initializeApi, request } from "./http"
|
|
5
5
|
export * from "./api"
|
|
6
6
|
export * from "./types"
|
|
7
|
+
|
|
8
|
+
// Explicitly re-export types for documentation
|
|
9
|
+
export type {
|
|
10
|
+
LoginResponse,
|
|
11
|
+
VerifyTokenResponse,
|
|
12
|
+
AccountInfoResponse,
|
|
13
|
+
} from "./api/auth"
|
|
14
|
+
export type {
|
|
15
|
+
AttestationResponse,
|
|
16
|
+
AttestationCreateRequest,
|
|
17
|
+
AttestationUpdateRequest,
|
|
18
|
+
} from "./types/attestation"
|
|
19
|
+
export type { AppConfigOptions } from "./api/appConfiguration"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# @proveanything/smartlinks
|
|
2
|
+
|
|
3
|
+
An official JavaScript/TypeScript client SDK for the Smartlinks API. This package provides simple, namespaced functions to fetch Collection, Product, Proof, and App Configuration data in both browser and Node.js environments.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @proveanything/smartlinks
|
|
9
|
+
# or
|
|
10
|
+
yarn add @proveanything/smartlinks
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quickstart
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import {
|
|
17
|
+
initializeApi,
|
|
18
|
+
collection,
|
|
19
|
+
product,
|
|
20
|
+
proof,
|
|
21
|
+
appConfiguration,
|
|
22
|
+
} from "@proveanything/smartlinks";
|
|
23
|
+
|
|
24
|
+
async function main() {
|
|
25
|
+
// Initialize once (provide base URL and optional API key, bearer token, or proxyMode)
|
|
26
|
+
initializeApi({
|
|
27
|
+
baseURL: "https://smartlinks.app/api/v1",
|
|
28
|
+
apiKey: "YOUR_API_KEY_HERE", // optional
|
|
29
|
+
bearerToken: "YOUR_BEARER_TOKEN", // optional
|
|
30
|
+
proxyMode: false // optional, set true if running in iframe via parent proxy
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
// Fetch a collection by ID
|
|
35
|
+
const coll = await collection.get("abc123");
|
|
36
|
+
console.log("Collection:", coll);
|
|
37
|
+
|
|
38
|
+
// Fetch a product item by collection ID & product ID
|
|
39
|
+
const prod = await product.get("abc123", "prod789");
|
|
40
|
+
console.log("Product Item:", prod);
|
|
41
|
+
|
|
42
|
+
// Fetch a proof by collection ID & proof ID
|
|
43
|
+
const prf = await proof.get("abc123", "proof456");
|
|
44
|
+
console.log("Proof:", prf);
|
|
45
|
+
|
|
46
|
+
// Fetch an app configuration by collection ID & app ID
|
|
47
|
+
const cfg = await appConfiguration.get("abc123", "app789");
|
|
48
|
+
console.log("App Configuration:", cfg);
|
|
49
|
+
} catch (err) {
|
|
50
|
+
console.error("Error fetching data:", err);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
main();
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## API Reference
|
|
58
|
+
|
|
59
|
+
### Initialization
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
initializeApi(options: { baseURL: string; apiKey?: string; bearerToken?: string; proxyMode?: boolean }): void
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- **Parameters:**
|
|
66
|
+
- `baseURL` (`string`, required): The root URL of the Smartlinks API, e.g. `https://smartlinks.app/api/v1`.
|
|
67
|
+
- `apiKey` (`string`, optional): Your API key for the `X-API-Key` header.
|
|
68
|
+
- `bearerToken` (`string`, optional): Your Bearer token for the `Authorization` header.
|
|
69
|
+
- `proxyMode` (`boolean`, optional): Set to `true` if running in an iframe and using a parent proxy for requests.
|
|
70
|
+
|
|
71
|
+
All subsequent calls to the API functions will use these settings.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### Namespaced Modules
|
|
76
|
+
|
|
77
|
+
Each namespace provides a `get` method for fetching data:
|
|
78
|
+
|
|
79
|
+
- **collection.get(collectionId: string): Promise<Collection>**
|
|
80
|
+
- **product.get(collectionId: string, productId: string): Promise<Product>**
|
|
81
|
+
- **proof.get(collectionId: string, proofId: string): Promise<Proof>**
|
|
82
|
+
- **appConfiguration.get(collectionId: string, appId: string): Promise<AppConfiguration>**
|
|
83
|
+
|
|
84
|
+
All methods return a Promise resolving to the corresponding object, or throw an `Error` on failure.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Changelog
|
|
89
|
+
|
|
90
|
+
### 1.0.0
|
|
91
|
+
|
|
92
|
+
- Initial release:
|
|
93
|
+
- `initializeApi` function to configure baseURL and auth.
|
|
94
|
+
- Namespaced modules:
|
|
95
|
+
- `collection.get(collectionId)`
|
|
96
|
+
- `product.get(collectionId, productId)`
|
|
97
|
+
- `proof.get(collectionId, proofId)`
|
|
98
|
+
- `appConfiguration.get(collectionId, appId)`
|
|
99
|
+
- Full TypeScript typings and JSDoc.
|
|
100
|
+
- Browser/Node fetch support via `cross-fetch`.
|
|
101
|
+
- Error handling via thrown `Error` objects.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
Represents an App Configuration object.
|
|
2
|
+
|
|
3
|
+
## Table of contents
|
|
4
|
+
|
|
5
|
+
### Properties
|
|
6
|
+
|
|
7
|
+
- [id](AppConfigurationResponse.md#id)
|
|
8
|
+
- [name](AppConfigurationResponse.md#name)
|
|
9
|
+
- [settings](AppConfigurationResponse.md#settings)
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### id
|
|
14
|
+
|
|
15
|
+
• **id**: `string`
|
|
16
|
+
|
|
17
|
+
Unique identifier for the app configuration
|
|
18
|
+
|
|
19
|
+
#### Defined in
|
|
20
|
+
|
|
21
|
+
[types/appConfiguration.ts:7](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/appConfiguration.ts#L7)
|
|
22
|
+
|
|
23
|
+
___
|
|
24
|
+
|
|
25
|
+
### name
|
|
26
|
+
|
|
27
|
+
• **name**: `string`
|
|
28
|
+
|
|
29
|
+
Name of the app configuration
|
|
30
|
+
|
|
31
|
+
#### Defined in
|
|
32
|
+
|
|
33
|
+
[types/appConfiguration.ts:9](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/appConfiguration.ts#L9)
|
|
34
|
+
|
|
35
|
+
___
|
|
36
|
+
|
|
37
|
+
### settings
|
|
38
|
+
|
|
39
|
+
• `Optional` **settings**: `Record`\<`string`, `any`\>
|
|
40
|
+
|
|
41
|
+
Key-value pairs representing configuration settings
|
|
42
|
+
|
|
43
|
+
#### Defined in
|
|
44
|
+
|
|
45
|
+
[types/appConfiguration.ts:11](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/appConfiguration.ts#L11)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Represents an Asset object.
|
|
2
|
+
|
|
3
|
+
## Table of contents
|
|
4
|
+
|
|
5
|
+
### Properties
|
|
6
|
+
|
|
7
|
+
- [id](AssetResponse.md#id)
|
|
8
|
+
- [name](AssetResponse.md#name)
|
|
9
|
+
- [url](AssetResponse.md#url)
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### id
|
|
14
|
+
|
|
15
|
+
• **id**: `string`
|
|
16
|
+
|
|
17
|
+
#### Defined in
|
|
18
|
+
|
|
19
|
+
[types/asset.ts:5](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/asset.ts#L5)
|
|
20
|
+
|
|
21
|
+
___
|
|
22
|
+
|
|
23
|
+
### name
|
|
24
|
+
|
|
25
|
+
• **name**: `string`
|
|
26
|
+
|
|
27
|
+
#### Defined in
|
|
28
|
+
|
|
29
|
+
[types/asset.ts:6](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/asset.ts#L6)
|
|
30
|
+
|
|
31
|
+
___
|
|
32
|
+
|
|
33
|
+
### url
|
|
34
|
+
|
|
35
|
+
• **url**: `string`
|
|
36
|
+
|
|
37
|
+
#### Defined in
|
|
38
|
+
|
|
39
|
+
[types/asset.ts:7](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/asset.ts#L7)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
## Table of contents
|
|
2
|
+
|
|
3
|
+
### Properties
|
|
4
|
+
|
|
5
|
+
- [private](AttestationCreateRequest.md#private)
|
|
6
|
+
- [proof](AttestationCreateRequest.md#proof)
|
|
7
|
+
- [public](AttestationCreateRequest.md#public)
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### private
|
|
12
|
+
|
|
13
|
+
• **private**: `Record`\<`string`, `any`\>
|
|
14
|
+
|
|
15
|
+
#### Defined in
|
|
16
|
+
|
|
17
|
+
[types/attestation.ts:12](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L12)
|
|
18
|
+
|
|
19
|
+
___
|
|
20
|
+
|
|
21
|
+
### proof
|
|
22
|
+
|
|
23
|
+
• **proof**: `Record`\<`string`, `any`\>
|
|
24
|
+
|
|
25
|
+
#### Defined in
|
|
26
|
+
|
|
27
|
+
[types/attestation.ts:13](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L13)
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### public
|
|
32
|
+
|
|
33
|
+
• **public**: `Record`\<`string`, `any`\>
|
|
34
|
+
|
|
35
|
+
#### Defined in
|
|
36
|
+
|
|
37
|
+
[types/attestation.ts:11](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L11)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
## Table of contents
|
|
2
|
+
|
|
3
|
+
### Properties
|
|
4
|
+
|
|
5
|
+
- [createdAt](AttestationResponse.md#createdat)
|
|
6
|
+
- [id](AttestationResponse.md#id)
|
|
7
|
+
- [private](AttestationResponse.md#private)
|
|
8
|
+
- [proof](AttestationResponse.md#proof)
|
|
9
|
+
- [public](AttestationResponse.md#public)
|
|
10
|
+
- [updatedAt](AttestationResponse.md#updatedat)
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### createdAt
|
|
15
|
+
|
|
16
|
+
• **createdAt**: `string`
|
|
17
|
+
|
|
18
|
+
#### Defined in
|
|
19
|
+
|
|
20
|
+
[types/attestation.ts:3](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L3)
|
|
21
|
+
|
|
22
|
+
___
|
|
23
|
+
|
|
24
|
+
### id
|
|
25
|
+
|
|
26
|
+
• **id**: `string`
|
|
27
|
+
|
|
28
|
+
#### Defined in
|
|
29
|
+
|
|
30
|
+
[types/attestation.ts:2](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L2)
|
|
31
|
+
|
|
32
|
+
___
|
|
33
|
+
|
|
34
|
+
### private
|
|
35
|
+
|
|
36
|
+
• **private**: `Record`\<`string`, `any`\>
|
|
37
|
+
|
|
38
|
+
#### Defined in
|
|
39
|
+
|
|
40
|
+
[types/attestation.ts:6](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L6)
|
|
41
|
+
|
|
42
|
+
___
|
|
43
|
+
|
|
44
|
+
### proof
|
|
45
|
+
|
|
46
|
+
• **proof**: `Record`\<`string`, `any`\>
|
|
47
|
+
|
|
48
|
+
#### Defined in
|
|
49
|
+
|
|
50
|
+
[types/attestation.ts:7](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L7)
|
|
51
|
+
|
|
52
|
+
___
|
|
53
|
+
|
|
54
|
+
### public
|
|
55
|
+
|
|
56
|
+
• **public**: `Record`\<`string`, `any`\>
|
|
57
|
+
|
|
58
|
+
#### Defined in
|
|
59
|
+
|
|
60
|
+
[types/attestation.ts:5](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L5)
|
|
61
|
+
|
|
62
|
+
___
|
|
63
|
+
|
|
64
|
+
### updatedAt
|
|
65
|
+
|
|
66
|
+
• **updatedAt**: `string`
|
|
67
|
+
|
|
68
|
+
#### Defined in
|
|
69
|
+
|
|
70
|
+
[types/attestation.ts:4](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L4)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## Table of contents
|
|
2
|
+
|
|
3
|
+
### Properties
|
|
4
|
+
|
|
5
|
+
- [data](AttestationUpdateRequest.md#data)
|
|
6
|
+
- [type](AttestationUpdateRequest.md#type)
|
|
7
|
+
|
|
8
|
+
## Properties
|
|
9
|
+
|
|
10
|
+
### data
|
|
11
|
+
|
|
12
|
+
• `Optional` **data**: `Record`\<`string`, `any`\>
|
|
13
|
+
|
|
14
|
+
#### Defined in
|
|
15
|
+
|
|
16
|
+
[types/attestation.ts:18](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L18)
|
|
17
|
+
|
|
18
|
+
___
|
|
19
|
+
|
|
20
|
+
### type
|
|
21
|
+
|
|
22
|
+
• `Optional` **type**: `string`
|
|
23
|
+
|
|
24
|
+
#### Defined in
|
|
25
|
+
|
|
26
|
+
[types/attestation.ts:17](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/attestation.ts#L17)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Represents a Collection object.
|
|
2
|
+
|
|
3
|
+
## Table of contents
|
|
4
|
+
|
|
5
|
+
### Properties
|
|
6
|
+
|
|
7
|
+
- [id](CollectionResponse.md#id)
|
|
8
|
+
- [logoImage](CollectionResponse.md#logoimage)
|
|
9
|
+
- [name](CollectionResponse.md#name)
|
|
10
|
+
- [title](CollectionResponse.md#title)
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### id
|
|
15
|
+
|
|
16
|
+
• **id**: `string`
|
|
17
|
+
|
|
18
|
+
Unique identifier for the collection
|
|
19
|
+
|
|
20
|
+
#### Defined in
|
|
21
|
+
|
|
22
|
+
[types/collection.ts:7](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/collection.ts#L7)
|
|
23
|
+
|
|
24
|
+
___
|
|
25
|
+
|
|
26
|
+
### logoImage
|
|
27
|
+
|
|
28
|
+
• **logoImage**: `string`
|
|
29
|
+
|
|
30
|
+
URL to the collection’s logo image
|
|
31
|
+
|
|
32
|
+
#### Defined in
|
|
33
|
+
|
|
34
|
+
[types/collection.ts:13](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/collection.ts#L13)
|
|
35
|
+
|
|
36
|
+
___
|
|
37
|
+
|
|
38
|
+
### name
|
|
39
|
+
|
|
40
|
+
• **name**: `string`
|
|
41
|
+
|
|
42
|
+
Machine-readable name of the collection
|
|
43
|
+
|
|
44
|
+
#### Defined in
|
|
45
|
+
|
|
46
|
+
[types/collection.ts:9](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/collection.ts#L9)
|
|
47
|
+
|
|
48
|
+
___
|
|
49
|
+
|
|
50
|
+
### title
|
|
51
|
+
|
|
52
|
+
• **title**: `string`
|
|
53
|
+
|
|
54
|
+
Human-readable title of the collection
|
|
55
|
+
|
|
56
|
+
#### Defined in
|
|
57
|
+
|
|
58
|
+
[types/collection.ts:11](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/collection.ts#L11)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Represents a standardized error response.
|
|
2
|
+
|
|
3
|
+
## Table of contents
|
|
4
|
+
|
|
5
|
+
### Properties
|
|
6
|
+
|
|
7
|
+
- [code](ErrorResponse.md#code)
|
|
8
|
+
- [message](ErrorResponse.md#message)
|
|
9
|
+
|
|
10
|
+
## Properties
|
|
11
|
+
|
|
12
|
+
### code
|
|
13
|
+
|
|
14
|
+
• **code**: `number`
|
|
15
|
+
|
|
16
|
+
Numeric error code
|
|
17
|
+
|
|
18
|
+
#### Defined in
|
|
19
|
+
|
|
20
|
+
[types/error.ts:7](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/error.ts#L7)
|
|
21
|
+
|
|
22
|
+
___
|
|
23
|
+
|
|
24
|
+
### message
|
|
25
|
+
|
|
26
|
+
• **message**: `string`
|
|
27
|
+
|
|
28
|
+
Human-readable error message
|
|
29
|
+
|
|
30
|
+
#### Defined in
|
|
31
|
+
|
|
32
|
+
[types/error.ts:9](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/error.ts#L9)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Represents a Product Item object.
|
|
2
|
+
|
|
3
|
+
## Table of contents
|
|
4
|
+
|
|
5
|
+
### Properties
|
|
6
|
+
|
|
7
|
+
- [description](ProductResponse.md#description)
|
|
8
|
+
- [heroImage](ProductResponse.md#heroimage)
|
|
9
|
+
- [id](ProductResponse.md#id)
|
|
10
|
+
- [name](ProductResponse.md#name)
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### description
|
|
15
|
+
|
|
16
|
+
• **description**: `string`
|
|
17
|
+
|
|
18
|
+
Detailed description of the product
|
|
19
|
+
|
|
20
|
+
#### Defined in
|
|
21
|
+
|
|
22
|
+
[types/product.ts:11](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/product.ts#L11)
|
|
23
|
+
|
|
24
|
+
___
|
|
25
|
+
|
|
26
|
+
### heroImage
|
|
27
|
+
|
|
28
|
+
• **heroImage**: `string`
|
|
29
|
+
|
|
30
|
+
URL to the product’s hero image
|
|
31
|
+
|
|
32
|
+
#### Defined in
|
|
33
|
+
|
|
34
|
+
[types/product.ts:13](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/product.ts#L13)
|
|
35
|
+
|
|
36
|
+
___
|
|
37
|
+
|
|
38
|
+
### id
|
|
39
|
+
|
|
40
|
+
• **id**: `string`
|
|
41
|
+
|
|
42
|
+
Unique identifier for the product
|
|
43
|
+
|
|
44
|
+
#### Defined in
|
|
45
|
+
|
|
46
|
+
[types/product.ts:7](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/product.ts#L7)
|
|
47
|
+
|
|
48
|
+
___
|
|
49
|
+
|
|
50
|
+
### name
|
|
51
|
+
|
|
52
|
+
• **name**: `string`
|
|
53
|
+
|
|
54
|
+
Name of the product
|
|
55
|
+
|
|
56
|
+
#### Defined in
|
|
57
|
+
|
|
58
|
+
[types/product.ts:9](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/product.ts#L9)
|