@proveanything/smartlinks 1.0.13 → 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/api/auth.js +2 -2
- 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 +3380 -1454
- 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/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 -1
- package/docs/functions/asset.listForProduct.html +1 -1
- package/docs/functions/asset.listForProof.html +1 -1
- package/docs/functions/asset.uploadAsset.html +1 -1
- 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.remove.html +1 -1
- package/docs/functions/attestation.update.html +2 -2
- package/docs/functions/auth.getAccount.html +3 -0
- package/docs/functions/auth.login.html +2 -2
- package/docs/functions/auth.logout.html +1 -1
- package/docs/functions/auth.verifyToken.html +3 -0
- package/docs/functions/collection.get.html +1 -1
- package/docs/functions/initializeApi.html +2 -4
- package/docs/functions/product.get.html +1 -1
- package/docs/functions/product.list.html +1 -1
- package/docs/functions/proof.get.html +1 -1
- package/docs/functions/proof.list.html +1 -1
- package/docs/functions/request.html +1 -1
- package/docs/interfaces/AppConfigurationResponse.html +4 -4
- package/docs/interfaces/AssetResponse.html +2 -2
- package/docs/interfaces/AttestationCreateRequest.html +4 -0
- package/docs/interfaces/AttestationResponse.html +7 -0
- package/docs/interfaces/AttestationUpdateRequest.html +3 -0
- 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 +7 -1
- package/docs/modules/asset.html +1 -1
- package/docs/modules/attestation.html +1 -1
- package/docs/modules/auth.html +3 -1
- package/docs/modules/collection.html +1 -1
- package/docs/modules/product.html +1 -1
- package/docs/modules/proof.html +1 -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 +5 -5
- 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
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
## Table of contents
|
|
2
|
+
|
|
3
|
+
### Namespaces
|
|
4
|
+
|
|
5
|
+
- [appConfiguration](modules/appConfiguration.md)
|
|
6
|
+
- [asset](modules/asset.md)
|
|
7
|
+
- [attestation](modules/attestation.md)
|
|
8
|
+
- [auth](modules/auth.md)
|
|
9
|
+
- [collection](modules/collection.md)
|
|
10
|
+
- [product](modules/product.md)
|
|
11
|
+
- [proof](modules/proof.md)
|
|
12
|
+
|
|
13
|
+
### Interfaces
|
|
14
|
+
|
|
15
|
+
- [AppConfigurationResponse](interfaces/AppConfigurationResponse.md)
|
|
16
|
+
- [AssetResponse](interfaces/AssetResponse.md)
|
|
17
|
+
- [AttestationCreateRequest](interfaces/AttestationCreateRequest.md)
|
|
18
|
+
- [AttestationResponse](interfaces/AttestationResponse.md)
|
|
19
|
+
- [AttestationUpdateRequest](interfaces/AttestationUpdateRequest.md)
|
|
20
|
+
- [CollectionResponse](interfaces/CollectionResponse.md)
|
|
21
|
+
- [ErrorResponse](interfaces/ErrorResponse.md)
|
|
22
|
+
- [ProductResponse](interfaces/ProductResponse.md)
|
|
23
|
+
- [ProofResponse](interfaces/ProofResponse.md)
|
|
24
|
+
|
|
25
|
+
### Type Aliases
|
|
26
|
+
|
|
27
|
+
- [AccountInfoResponse](modules.md#accountinforesponse)
|
|
28
|
+
- [AppConfigOptions](modules.md#appconfigoptions)
|
|
29
|
+
- [LoginResponse](modules.md#loginresponse)
|
|
30
|
+
- [VerifyTokenResponse](modules.md#verifytokenresponse)
|
|
31
|
+
|
|
32
|
+
### Functions
|
|
33
|
+
|
|
34
|
+
- [initializeApi](modules.md#initializeapi)
|
|
35
|
+
- [request](modules.md#request)
|
|
36
|
+
|
|
37
|
+
## Type Aliases
|
|
38
|
+
|
|
39
|
+
### AccountInfoResponse
|
|
40
|
+
|
|
41
|
+
Ƭ **AccountInfoResponse**: `Object`
|
|
42
|
+
|
|
43
|
+
#### Type declaration
|
|
44
|
+
|
|
45
|
+
| Name | Type |
|
|
46
|
+
| :------ | :------ |
|
|
47
|
+
| `account` | `Record`\<`string`, `any`\> |
|
|
48
|
+
| `location` | `Record`\<`string`, `any`\> |
|
|
49
|
+
| `owner` | `Record`\<`string`, `any`\> |
|
|
50
|
+
| `user` | `Record`\<`string`, `any`\> |
|
|
51
|
+
|
|
52
|
+
#### Defined in
|
|
53
|
+
|
|
54
|
+
[api/auth.ts:19](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/auth.ts#L19)
|
|
55
|
+
|
|
56
|
+
___
|
|
57
|
+
|
|
58
|
+
### AppConfigOptions
|
|
59
|
+
|
|
60
|
+
Ƭ **AppConfigOptions**: `Object`
|
|
61
|
+
|
|
62
|
+
#### Type declaration
|
|
63
|
+
|
|
64
|
+
| Name | Type |
|
|
65
|
+
| :------ | :------ |
|
|
66
|
+
| `admin?` | `boolean` |
|
|
67
|
+
| `appId` | `string` |
|
|
68
|
+
| `batchId?` | `string` |
|
|
69
|
+
| `collectionId?` | `string` |
|
|
70
|
+
| `config?` | `any` |
|
|
71
|
+
| `data?` | `any` |
|
|
72
|
+
| `itemId?` | `string` |
|
|
73
|
+
| `productId?` | `string` |
|
|
74
|
+
| `user?` | `boolean` |
|
|
75
|
+
| `userData?` | `boolean` |
|
|
76
|
+
| `variantId?` | `string` |
|
|
77
|
+
|
|
78
|
+
#### Defined in
|
|
79
|
+
|
|
80
|
+
[api/appConfiguration.ts:4](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/appConfiguration.ts#L4)
|
|
81
|
+
|
|
82
|
+
___
|
|
83
|
+
|
|
84
|
+
### LoginResponse
|
|
85
|
+
|
|
86
|
+
Ƭ **LoginResponse**: `Object`
|
|
87
|
+
|
|
88
|
+
#### Type declaration
|
|
89
|
+
|
|
90
|
+
| Name | Type |
|
|
91
|
+
| :------ | :------ |
|
|
92
|
+
| `account` | `Record`\<`string`, `any`\> |
|
|
93
|
+
| `bearerToken` | `string` |
|
|
94
|
+
| `email` | `string` |
|
|
95
|
+
| `id` | `string` |
|
|
96
|
+
| `name` | `string` |
|
|
97
|
+
|
|
98
|
+
#### Defined in
|
|
99
|
+
|
|
100
|
+
[api/auth.ts:3](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/auth.ts#L3)
|
|
101
|
+
|
|
102
|
+
___
|
|
103
|
+
|
|
104
|
+
### VerifyTokenResponse
|
|
105
|
+
|
|
106
|
+
Ƭ **VerifyTokenResponse**: `Object`
|
|
107
|
+
|
|
108
|
+
#### Type declaration
|
|
109
|
+
|
|
110
|
+
| Name | Type |
|
|
111
|
+
| :------ | :------ |
|
|
112
|
+
| `account?` | `Record`\<`string`, `any`\> |
|
|
113
|
+
| `email?` | `string` |
|
|
114
|
+
| `id?` | `string` |
|
|
115
|
+
| `name?` | `string` |
|
|
116
|
+
| `valid` | `boolean` |
|
|
117
|
+
|
|
118
|
+
#### Defined in
|
|
119
|
+
|
|
120
|
+
[api/auth.ts:11](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/auth.ts#L11)
|
|
121
|
+
|
|
122
|
+
## Functions
|
|
123
|
+
|
|
124
|
+
### initializeApi
|
|
125
|
+
|
|
126
|
+
▸ **initializeApi**(`options`): `void`
|
|
127
|
+
|
|
128
|
+
Call this once (e.g. at app startup) to configure baseURL/auth.
|
|
129
|
+
|
|
130
|
+
#### Parameters
|
|
131
|
+
|
|
132
|
+
| Name | Type | Description |
|
|
133
|
+
| :------ | :------ | :------ |
|
|
134
|
+
| `options` | `Object` | Configuration options |
|
|
135
|
+
| `options.apiKey?` | `string` | - |
|
|
136
|
+
| `options.baseURL` | `string` | - |
|
|
137
|
+
| `options.bearerToken?` | `string` | - |
|
|
138
|
+
| `options.proxyMode?` | `boolean` | - |
|
|
139
|
+
|
|
140
|
+
#### Returns
|
|
141
|
+
|
|
142
|
+
`void`
|
|
143
|
+
|
|
144
|
+
#### Defined in
|
|
145
|
+
|
|
146
|
+
[http.ts:20](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/http.ts#L20)
|
|
147
|
+
|
|
148
|
+
___
|
|
149
|
+
|
|
150
|
+
### request
|
|
151
|
+
|
|
152
|
+
▸ **request**\<`T`\>(`path`): `Promise`\<`T`\>
|
|
153
|
+
|
|
154
|
+
Internal helper that performs a GET request to `\${baseURL}\${path}`,
|
|
155
|
+
injecting headers for apiKey or bearerToken if present.
|
|
156
|
+
Returns the parsed JSON as T, or throws an Error.
|
|
157
|
+
|
|
158
|
+
#### Type parameters
|
|
159
|
+
|
|
160
|
+
| Name |
|
|
161
|
+
| :------ |
|
|
162
|
+
| `T` |
|
|
163
|
+
|
|
164
|
+
#### Parameters
|
|
165
|
+
|
|
166
|
+
| Name | Type |
|
|
167
|
+
| :------ | :------ |
|
|
168
|
+
| `path` | `string` |
|
|
169
|
+
|
|
170
|
+
#### Returns
|
|
171
|
+
|
|
172
|
+
`Promise`\<`T`\>
|
|
173
|
+
|
|
174
|
+
#### Defined in
|
|
175
|
+
|
|
176
|
+
[http.ts:96](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/http.ts#L96)
|
|
@@ -1,6 +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>get | @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/appConfiguration.html">appConfiguration</a></li><li><a href="appConfiguration.get.html">get</a></li></ul><h1>Function get</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="get" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">collectionId</span>, <span class="tsd-kind-parameter">appId</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/AppConfigurationResponse.html" class="tsd-signature-type tsd-kind-interface">AppConfigurationResponse</a><span class="tsd-signature-symbol">></span><a href="#get" 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-comment tsd-typography"><p>Retrieves a single App Configuration by Collection ID and App ID.</p>
|
|
2
|
-
</div><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><div class="tsd-comment tsd-typography"><p>– Identifier of the parent collection</p>
|
|
3
|
-
</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">appId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>– Identifier of the app configuration</p>
|
|
4
|
-
</div><div class="tsd-comment tsd-typography"></div></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/AppConfigurationResponse.html" class="tsd-signature-type tsd-kind-interface">AppConfigurationResponse</a><span class="tsd-signature-symbol">></span></h4><p>Promise resolving to an AppConfigurationResponse object</p>
|
|
5
|
-
<div class="tsd-comment tsd-typography"><h4>Throws</h4><p>ErrorResponse if the request fails</p>
|
|
6
|
-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/Prove-Anything/smartlinks/blob/0d6eafe653ce3bf1805419336959a85b5439616c/src/api/appConfiguration.ts#L13">api/appConfiguration.ts:13</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>
|