@proveanything/smartlinks 1.0.7 → 1.0.9
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/debug.log +6 -0
- package/dist/api/asset.d.ts +3 -3
- package/dist/api/asset.js +6 -6
- package/dist/api/attestation.d.ts +23 -0
- package/dist/api/attestation.js +44 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/product.d.ts +2 -2
- package/dist/api/product.js +3 -3
- package/dist/api/proof.d.ts +4 -0
- package/dist/api/proof.js +8 -0
- package/dist/http.d.ts +19 -0
- package/dist/http.js +109 -0
- package/dist/types/attestation.d.ts +16 -0
- package/dist/types/attestation.js +1 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/documentation.json +1223 -445
- package/docs/functions/appConfiguration.get.html +1 -1
- package/docs/functions/asset.getForCollection.html +1 -1
- package/docs/functions/asset.getForProduct.html +1 -1
- package/docs/functions/asset.getForProof.html +1 -1
- package/docs/functions/asset.listForCollection.html +1 -0
- package/docs/functions/asset.listForProduct.html +1 -0
- package/docs/functions/asset.listForProof.html +1 -0
- package/docs/functions/asset.uploadAsset.html +1 -1
- package/docs/functions/attestation.create.html +2 -0
- package/docs/functions/attestation.get.html +2 -0
- package/docs/functions/attestation.list.html +2 -0
- package/docs/functions/attestation.remove.html +2 -0
- package/docs/functions/attestation.update.html +2 -0
- package/docs/functions/collection.get.html +1 -1
- package/docs/functions/initializeApi.html +1 -1
- package/docs/functions/product.get.html +1 -1
- package/docs/functions/{product.getAll.html → product.list.html} +2 -2
- package/docs/functions/proof.get.html +1 -1
- package/docs/functions/proof.list.html +2 -0
- package/docs/functions/request.html +1 -1
- package/docs/interfaces/AppConfigurationResponse.html +4 -4
- package/docs/interfaces/AssetResponse.html +2 -2
- package/docs/interfaces/CollectionResponse.html +5 -5
- package/docs/interfaces/ErrorResponse.html +3 -3
- package/docs/interfaces/ProductResponse.html +5 -5
- package/docs/interfaces/ProofResponse.html +8 -8
- package/docs/modules/appConfiguration.html +1 -1
- package/docs/modules/asset.html +4 -4
- package/docs/modules/attestation.html +6 -0
- package/docs/modules/collection.html +1 -1
- package/docs/modules/product.html +2 -2
- package/docs/modules/proof.html +2 -1
- package/docs/modules.html +1 -0
- package/package.json +1 -1
- package/src/api/asset.ts +3 -3
- package/src/api/attestation.ts +69 -0
- package/src/api/index.ts +1 -0
- package/src/api/product.ts +2 -2
- package/src/api/proof.ts +10 -0
- package/src/http.ts +136 -0
- package/src/types/attestation.ts +18 -0
- package/docs/functions/asset.getAllForCollection.html +0 -1
- package/docs/functions/asset.getAllForProduct.html +0 -1
- package/docs/functions/asset.getAllForProof.html +0 -1
package/src/api/asset.ts
CHANGED
|
@@ -11,7 +11,7 @@ export namespace asset {
|
|
|
11
11
|
return request<AssetResponse>(path)
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export async function
|
|
14
|
+
export async function listForCollection(
|
|
15
15
|
collectionId: string
|
|
16
16
|
): Promise<AssetResponse[]> {
|
|
17
17
|
const path = `/public/collection/${encodeURIComponent(collectionId)}/asset`
|
|
@@ -28,7 +28,7 @@ export namespace asset {
|
|
|
28
28
|
return request<AssetResponse>(path)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export async function
|
|
31
|
+
export async function listForProduct(
|
|
32
32
|
collectionId: string,
|
|
33
33
|
productId: string
|
|
34
34
|
): Promise<AssetResponse[]> {
|
|
@@ -47,7 +47,7 @@ export namespace asset {
|
|
|
47
47
|
return request<AssetResponse>(path)
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export async function
|
|
50
|
+
export async function listForProof(
|
|
51
51
|
collectionId: string,
|
|
52
52
|
productId: string,
|
|
53
53
|
proofId: string,
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { request, post, put, del } from "../http"
|
|
2
|
+
import type { AttestationResponse, AttestationCreateRequest, AttestationUpdateRequest } from "../types/attestation"
|
|
3
|
+
|
|
4
|
+
export namespace attestation {
|
|
5
|
+
/**
|
|
6
|
+
* List all attestations for a proof.
|
|
7
|
+
*/
|
|
8
|
+
export async function list(
|
|
9
|
+
collectionId: string,
|
|
10
|
+
productId: string,
|
|
11
|
+
proofId: string
|
|
12
|
+
): Promise<AttestationResponse[]> {
|
|
13
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}/proof/${encodeURIComponent(proofId)}/attestation`
|
|
14
|
+
return request<AttestationResponse[]>(path)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Get a single attestation by ID.
|
|
19
|
+
*/
|
|
20
|
+
export async function get(
|
|
21
|
+
collectionId: string,
|
|
22
|
+
productId: string,
|
|
23
|
+
proofId: string,
|
|
24
|
+
attestationId: string
|
|
25
|
+
): Promise<AttestationResponse> {
|
|
26
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}/proof/${encodeURIComponent(proofId)}/attestation/${encodeURIComponent(attestationId)}`
|
|
27
|
+
return request<AttestationResponse>(path)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Create a new attestation for a proof.
|
|
32
|
+
*/
|
|
33
|
+
export async function create(
|
|
34
|
+
collectionId: string,
|
|
35
|
+
productId: string,
|
|
36
|
+
proofId: string,
|
|
37
|
+
data: AttestationCreateRequest
|
|
38
|
+
): Promise<AttestationResponse> {
|
|
39
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}/proof/${encodeURIComponent(proofId)}/attestation`
|
|
40
|
+
return post<AttestationResponse>(path, data)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Update an attestation.
|
|
45
|
+
*/
|
|
46
|
+
export async function update(
|
|
47
|
+
collectionId: string,
|
|
48
|
+
productId: string,
|
|
49
|
+
proofId: string,
|
|
50
|
+
attestationId: string,
|
|
51
|
+
data: AttestationUpdateRequest
|
|
52
|
+
): Promise<AttestationResponse> {
|
|
53
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}/proof/${encodeURIComponent(proofId)}/attestation/${encodeURIComponent(attestationId)}`
|
|
54
|
+
return put<AttestationResponse>(path, data)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Delete an attestation.
|
|
59
|
+
*/
|
|
60
|
+
export async function remove(
|
|
61
|
+
collectionId: string,
|
|
62
|
+
productId: string,
|
|
63
|
+
proofId: string,
|
|
64
|
+
attestationId: string
|
|
65
|
+
): Promise<void> {
|
|
66
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/product/${encodeURIComponent(productId)}/proof/${encodeURIComponent(proofId)}/attestation/${encodeURIComponent(attestationId)}`
|
|
67
|
+
return del<void>(path)
|
|
68
|
+
}
|
|
69
|
+
}
|
package/src/api/index.ts
CHANGED
package/src/api/product.ts
CHANGED
|
@@ -21,12 +21,12 @@ export namespace product {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* List all Product Items for a Collection.
|
|
25
25
|
* @param collectionId – Identifier of the parent collection
|
|
26
26
|
* @returns Promise resolving to an array of ProductResponse objects
|
|
27
27
|
* @throws ErrorResponse if the request fails
|
|
28
28
|
*/
|
|
29
|
-
export async function
|
|
29
|
+
export async function list(
|
|
30
30
|
collectionId: string
|
|
31
31
|
): Promise<ProductResponse[]> {
|
|
32
32
|
const path = `/public/collection/${encodeURIComponent(collectionId)}/product`
|
package/src/api/proof.ts
CHANGED
|
@@ -19,4 +19,14 @@ export namespace proof {
|
|
|
19
19
|
)}/proof/${encodeURIComponent(proofId)}`
|
|
20
20
|
return request<ProofResponse>(path)
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* List all Proofs for a Collection.
|
|
25
|
+
*/
|
|
26
|
+
export async function list(
|
|
27
|
+
collectionId: string
|
|
28
|
+
): Promise<ProofResponse[]> {
|
|
29
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/proof`
|
|
30
|
+
return request<ProofResponse[]>(path)
|
|
31
|
+
}
|
|
22
32
|
}
|
package/src/http.ts
CHANGED
|
@@ -107,6 +107,142 @@ export async function post<T>(
|
|
|
107
107
|
return (await response.json()) as T
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Internal helper that performs a PUT request to `${baseURL}${path}`,
|
|
112
|
+
* injecting headers for apiKey or bearerToken if present.
|
|
113
|
+
* If body is FormData, Content-Type is not set.
|
|
114
|
+
* Returns the parsed JSON as T, or throws an Error.
|
|
115
|
+
*/
|
|
116
|
+
export async function put<T>(
|
|
117
|
+
path: string,
|
|
118
|
+
body: any,
|
|
119
|
+
extraHeaders?: Record<string, string>
|
|
120
|
+
): Promise<T> {
|
|
121
|
+
if (!baseURL) {
|
|
122
|
+
throw new Error("HTTP client is not initialized. Call initializeApi(...) first.")
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const url = `${baseURL}${path}`
|
|
126
|
+
const headers: Record<string, string> = extraHeaders ? { ...extraHeaders } : {}
|
|
127
|
+
|
|
128
|
+
if (apiKey) headers["X-API-Key"] = apiKey
|
|
129
|
+
if (bearerToken) headers["AUTHORIZATION"] = `Bearer ${bearerToken}`
|
|
130
|
+
|
|
131
|
+
// Only set Content-Type for non-FormData bodies
|
|
132
|
+
if (!(body instanceof FormData)) {
|
|
133
|
+
headers["Content-Type"] = "application/json"
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const response = await fetch(url, {
|
|
137
|
+
method: "PUT",
|
|
138
|
+
headers,
|
|
139
|
+
body: body instanceof FormData ? body : JSON.stringify(body),
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
if (!response.ok) {
|
|
143
|
+
try {
|
|
144
|
+
const errBody = (await response.json()) as import("./types/error").ErrorResponse
|
|
145
|
+
throw new Error(`Error ${errBody.code}: ${errBody.message}`)
|
|
146
|
+
} catch {
|
|
147
|
+
throw new Error(`Request to ${url} failed with status ${response.status}`)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return (await response.json()) as T
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Internal helper that performs a request to `${baseURL}${path}` with custom options,
|
|
156
|
+
* injecting headers for apiKey or bearerToken if present.
|
|
157
|
+
* Returns the parsed JSON as T, or throws an Error.
|
|
158
|
+
*/
|
|
159
|
+
export async function requestWithOptions<T>(
|
|
160
|
+
path: string,
|
|
161
|
+
options: RequestInit
|
|
162
|
+
): Promise<T> {
|
|
163
|
+
if (!baseURL) {
|
|
164
|
+
throw new Error("HTTP client is not initialized. Call initializeApi(...) first.")
|
|
165
|
+
}
|
|
166
|
+
const url = `${baseURL}${path}`
|
|
167
|
+
|
|
168
|
+
// Safely merge headers, converting Headers/init to Record<string, string>
|
|
169
|
+
let extraHeaders: Record<string, string> = {}
|
|
170
|
+
if (options.headers) {
|
|
171
|
+
if (options.headers instanceof Headers) {
|
|
172
|
+
options.headers.forEach((value, key) => {
|
|
173
|
+
extraHeaders[key] = value
|
|
174
|
+
})
|
|
175
|
+
} else if (Array.isArray(options.headers)) {
|
|
176
|
+
for (const [key, value] of options.headers) {
|
|
177
|
+
extraHeaders[key] = value
|
|
178
|
+
}
|
|
179
|
+
} else {
|
|
180
|
+
extraHeaders = { ...(options.headers as Record<string, string>) }
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const headers: Record<string, string> = {
|
|
185
|
+
"Content-Type": "application/json",
|
|
186
|
+
...(apiKey ? { "X-API-Key": apiKey } : {}),
|
|
187
|
+
...(bearerToken ? { "AUTHORIZATION": `Bearer ${bearerToken}` } : {}),
|
|
188
|
+
...extraHeaders,
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const response = await fetch(url, {
|
|
192
|
+
...options,
|
|
193
|
+
headers,
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
if (!response.ok) {
|
|
197
|
+
try {
|
|
198
|
+
const errBody = (await response.json()) as import("./types/error").ErrorResponse
|
|
199
|
+
throw new Error(`Error ${errBody.code}: ${errBody.message}`)
|
|
200
|
+
} catch {
|
|
201
|
+
throw new Error(`Request to ${url} failed with status ${response.status}`)
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return (await response.json()) as T
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Internal helper that performs a DELETE request to `${baseURL}${path}`,
|
|
210
|
+
* injecting headers for apiKey or bearerToken if present.
|
|
211
|
+
* Returns the parsed JSON as T, or throws an Error.
|
|
212
|
+
*/
|
|
213
|
+
export async function del<T>(
|
|
214
|
+
path: string,
|
|
215
|
+
extraHeaders?: Record<string, string>
|
|
216
|
+
): Promise<T> {
|
|
217
|
+
if (!baseURL) {
|
|
218
|
+
throw new Error("HTTP client is not initialized. Call initializeApi(...) first.")
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const url = `${baseURL}${path}`
|
|
222
|
+
const headers: Record<string, string> = extraHeaders ? { ...extraHeaders } : {}
|
|
223
|
+
|
|
224
|
+
if (apiKey) headers["X-API-Key"] = apiKey
|
|
225
|
+
if (bearerToken) headers["AUTHORIZATION"] = `Bearer ${bearerToken}`
|
|
226
|
+
|
|
227
|
+
const response = await fetch(url, {
|
|
228
|
+
method: "DELETE",
|
|
229
|
+
headers,
|
|
230
|
+
})
|
|
231
|
+
|
|
232
|
+
if (!response.ok) {
|
|
233
|
+
try {
|
|
234
|
+
const errBody = (await response.json()) as import("./types/error").ErrorResponse
|
|
235
|
+
throw new Error(`Error ${errBody.code}: ${errBody.message}`)
|
|
236
|
+
} catch {
|
|
237
|
+
throw new Error(`Request to ${url} failed with status ${response.status}`)
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// If the response is empty, just return undefined
|
|
242
|
+
if (response.status === 204) return undefined as T
|
|
243
|
+
return (await response.json()) as T
|
|
244
|
+
}
|
|
245
|
+
|
|
110
246
|
/**
|
|
111
247
|
* Returns the common headers used for API requests, including apiKey and bearerToken if set.
|
|
112
248
|
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface AttestationResponse {
|
|
2
|
+
id: string
|
|
3
|
+
proofId: string
|
|
4
|
+
createdAt: string
|
|
5
|
+
updatedAt: string
|
|
6
|
+
type: string
|
|
7
|
+
data: Record<string, any>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface AttestationCreateRequest {
|
|
11
|
+
type: string
|
|
12
|
+
data: Record<string, any>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface AttestationUpdateRequest {
|
|
16
|
+
type?: string
|
|
17
|
+
data?: Record<string, any>
|
|
18
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>getAllForCollection | @proveanything/smartlinks</title><meta name="description" content="Documentation for @proveanything/smartlinks"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@proveanything/smartlinks</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@proveanything/smartlinks</a></li><li><a href="../modules/asset.html">asset</a></li><li><a href="asset.getAllForCollection.html">getAllForCollection</a></li></ul><h1>Function getAllForCollection</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="getAllForCollection" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>All<wbr/>For<wbr/>Collection</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">collectionId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/AssetResponse.html" class="tsd-signature-type tsd-kind-interface">AssetResponse</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#getAllForCollection" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">collectionId</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/AssetResponse.html" class="tsd-signature-type tsd-kind-interface">AssetResponse</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Prove-Anything/smartlinks/blob/4a4aa523c93fa66ecc60b57bab64267bc2383b71/src/api/asset.ts#L14">api/asset.ts:14</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@proveanything/smartlinks</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>getAllForProduct | @proveanything/smartlinks</title><meta name="description" content="Documentation for @proveanything/smartlinks"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@proveanything/smartlinks</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@proveanything/smartlinks</a></li><li><a href="../modules/asset.html">asset</a></li><li><a href="asset.getAllForProduct.html">getAllForProduct</a></li></ul><h1>Function getAllForProduct</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="getAllForProduct" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>All<wbr/>For<wbr/>Product</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">collectionId</span>, <span class="tsd-kind-parameter">productId</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/AssetResponse.html" class="tsd-signature-type tsd-kind-interface">AssetResponse</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#getAllForProduct" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">collectionId</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">productId</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/AssetResponse.html" class="tsd-signature-type tsd-kind-interface">AssetResponse</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Prove-Anything/smartlinks/blob/4a4aa523c93fa66ecc60b57bab64267bc2383b71/src/api/asset.ts#L31">api/asset.ts:31</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@proveanything/smartlinks</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>getAllForProof | @proveanything/smartlinks</title><meta name="description" content="Documentation for @proveanything/smartlinks"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@proveanything/smartlinks</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@proveanything/smartlinks</a></li><li><a href="../modules/asset.html">asset</a></li><li><a href="asset.getAllForProof.html">getAllForProof</a></li></ul><h1>Function getAllForProof</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="getAllForProof" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>All<wbr/>For<wbr/>Proof</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">collectionId</span>, <span class="tsd-kind-parameter">productId</span>, <span class="tsd-kind-parameter">proofId</span>, <span class="tsd-kind-parameter">appId</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/AssetResponse.html" class="tsd-signature-type tsd-kind-interface">AssetResponse</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><a href="#getAllForProof" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">collectionId</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">productId</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">proofId</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">appId</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/AssetResponse.html" class="tsd-signature-type tsd-kind-interface">AssetResponse</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Prove-Anything/smartlinks/blob/4a4aa523c93fa66ecc60b57bab64267bc2383b71/src/api/asset.ts#L50">api/asset.ts:50</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@proveanything/smartlinks</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|