@proveanything/smartlinks 1.0.16 → 1.0.17
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 +7342 -93
- package/build-docs.ts +41 -0
- package/dist/api/claimSet.d.ts +14 -0
- package/dist/api/claimSet.js +24 -0
- package/dist/api/collection.d.ts +9 -1
- package/dist/api/collection.js +16 -2
- package/dist/api/form.d.ts +34 -0
- package/dist/api/form.js +58 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/build-docs.js +35 -0
- package/dist/http.d.ts +7 -0
- package/dist/http.js +24 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/README.md +7276 -89
- package/docs/assets/highlight.css +12 -33
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/documentation.json +2002 -1007
- package/docs/functions/appConfiguration.deleteConfig.html +1 -1
- package/docs/functions/appConfiguration.deleteDataItem.html +1 -1
- package/docs/functions/appConfiguration.getConfig.html +1 -1
- package/docs/functions/appConfiguration.getData.html +1 -1
- package/docs/functions/appConfiguration.getDataItem.html +1 -1
- package/docs/functions/appConfiguration.setConfig.html +1 -1
- package/docs/functions/appConfiguration.setDataItem.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 -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 +1 -1
- package/docs/functions/attestation.get.html +1 -1
- package/docs/functions/attestation.list.html +1 -1
- package/docs/functions/attestation.remove.html +1 -1
- package/docs/functions/attestation.update.html +1 -1
- package/docs/functions/auth.getAccount.html +1 -1
- package/docs/functions/auth.login.html +1 -1
- package/docs/functions/auth.logout.html +1 -1
- package/docs/functions/auth.verifyToken.html +1 -1
- package/docs/functions/claimSet.assignClaims.html +4 -0
- package/docs/functions/claimSet.updateClaimData.html +4 -0
- package/docs/functions/collection.get.html +3 -2
- package/docs/functions/collection.list.html +5 -0
- package/docs/functions/form.create.html +4 -0
- package/docs/functions/form.get.html +5 -0
- package/docs/functions/form.list.html +4 -0
- package/docs/functions/form.remove.html +4 -0
- package/docs/functions/form.update.html +5 -0
- package/docs/functions/initializeApi.html +1 -1
- 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/functions/sendCustomProxyMessage.html +5 -0
- package/docs/index.html +4 -112
- package/docs/interfaces/AppConfigurationResponse.html +4 -4
- package/docs/interfaces/AssetResponse.html +2 -2
- package/docs/interfaces/AttestationCreateRequest.html +2 -2
- package/docs/interfaces/AttestationResponse.html +2 -2
- package/docs/interfaces/AttestationUpdateRequest.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 +1 -1
- package/docs/modules/attestation.html +1 -1
- package/docs/modules/auth.html +1 -1
- package/docs/modules/claimSet.html +3 -0
- package/docs/modules/collection.html +2 -1
- package/docs/modules/form.html +6 -0
- package/docs/modules/product.html +1 -1
- package/docs/modules/proof.html +1 -1
- package/docs/modules.html +3 -0
- package/docs/types/AccountInfoResponse.html +1 -1
- package/docs/types/AppConfigOptions.html +1 -1
- package/docs/types/LoginResponse.html +1 -1
- package/docs/types/VerifyTokenResponse.html +1 -1
- package/package.json +1 -1
- package/src/api/claimSet.ts +23 -0
- package/src/api/collection.ts +17 -3
- package/src/api/form.ts +57 -0
- package/src/api/index.ts +2 -0
- package/src/http.ts +25 -0
- package/src/index.ts +1 -1
- package/temp-docs/README.md +7246 -93
- package/temp-docs/interfaces/AppConfigurationResponse.md +3 -3
- package/temp-docs/interfaces/AssetResponse.md +3 -3
- package/temp-docs/interfaces/AttestationCreateRequest.md +3 -3
- package/temp-docs/interfaces/AttestationResponse.md +6 -6
- package/temp-docs/interfaces/AttestationUpdateRequest.md +2 -2
- package/temp-docs/interfaces/CollectionResponse.md +4 -4
- package/temp-docs/interfaces/ErrorResponse.md +2 -2
- package/temp-docs/interfaces/ProductResponse.md +4 -4
- package/temp-docs/interfaces/ProofResponse.md +7 -7
- package/temp-docs/modules/appConfiguration.md +7 -7
- package/temp-docs/modules/asset.md +7 -7
- package/temp-docs/modules/attestation.md +5 -5
- package/temp-docs/modules/auth.md +4 -4
- package/temp-docs/modules/claimSet.md +52 -0
- package/temp-docs/modules/collection.md +32 -2
- package/temp-docs/modules/form.md +126 -0
- package/temp-docs/modules/product.md +2 -2
- package/temp-docs/modules/proof.md +2 -2
- package/temp-docs/modules.md +40 -6
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
## Table of contents
|
|
2
|
+
|
|
3
|
+
### Functions
|
|
4
|
+
|
|
5
|
+
- [create](form.md#create)
|
|
6
|
+
- [get](form.md#get)
|
|
7
|
+
- [list](form.md#list)
|
|
8
|
+
- [remove](form.md#remove)
|
|
9
|
+
- [update](form.md#update)
|
|
10
|
+
|
|
11
|
+
## Functions
|
|
12
|
+
|
|
13
|
+
### create
|
|
14
|
+
|
|
15
|
+
▸ **create**(`collectionId`, `data`): `Promise`\<`any`\>
|
|
16
|
+
|
|
17
|
+
Create a new form for a collection (admin only).
|
|
18
|
+
|
|
19
|
+
#### Parameters
|
|
20
|
+
|
|
21
|
+
| Name | Type | Description |
|
|
22
|
+
| :------ | :------ | :------ |
|
|
23
|
+
| `collectionId` | `string` | – The collection identifier |
|
|
24
|
+
| `data` | `any` | – The form data |
|
|
25
|
+
|
|
26
|
+
#### Returns
|
|
27
|
+
|
|
28
|
+
`Promise`\<`any`\>
|
|
29
|
+
|
|
30
|
+
#### Defined in
|
|
31
|
+
|
|
32
|
+
api/form.ts:32
|
|
33
|
+
|
|
34
|
+
___
|
|
35
|
+
|
|
36
|
+
### get
|
|
37
|
+
|
|
38
|
+
▸ **get**(`collectionId`, `formId`, `admin?`): `Promise`\<`any`\>
|
|
39
|
+
|
|
40
|
+
Get a single form by ID for a collection.
|
|
41
|
+
|
|
42
|
+
#### Parameters
|
|
43
|
+
|
|
44
|
+
| Name | Type | Description |
|
|
45
|
+
| :------ | :------ | :------ |
|
|
46
|
+
| `collectionId` | `string` | – The collection identifier |
|
|
47
|
+
| `formId` | `string` | – The form identifier |
|
|
48
|
+
| `admin?` | `boolean` | – If true, use admin endpoint; otherwise, use public |
|
|
49
|
+
|
|
50
|
+
#### Returns
|
|
51
|
+
|
|
52
|
+
`Promise`\<`any`\>
|
|
53
|
+
|
|
54
|
+
#### Defined in
|
|
55
|
+
|
|
56
|
+
api/form.ts:10
|
|
57
|
+
|
|
58
|
+
___
|
|
59
|
+
|
|
60
|
+
### list
|
|
61
|
+
|
|
62
|
+
▸ **list**(`collectionId`, `admin?`): `Promise`\<`any`[]\>
|
|
63
|
+
|
|
64
|
+
List all forms for a collection.
|
|
65
|
+
|
|
66
|
+
#### Parameters
|
|
67
|
+
|
|
68
|
+
| Name | Type | Description |
|
|
69
|
+
| :------ | :------ | :------ |
|
|
70
|
+
| `collectionId` | `string` | – The collection identifier |
|
|
71
|
+
| `admin?` | `boolean` | – If true, use admin endpoint; otherwise, use public |
|
|
72
|
+
|
|
73
|
+
#### Returns
|
|
74
|
+
|
|
75
|
+
`Promise`\<`any`[]\>
|
|
76
|
+
|
|
77
|
+
#### Defined in
|
|
78
|
+
|
|
79
|
+
api/form.ts:21
|
|
80
|
+
|
|
81
|
+
___
|
|
82
|
+
|
|
83
|
+
### remove
|
|
84
|
+
|
|
85
|
+
▸ **remove**(`collectionId`, `formId`): `Promise`\<`void`\>
|
|
86
|
+
|
|
87
|
+
Delete a form for a collection (admin only).
|
|
88
|
+
|
|
89
|
+
#### Parameters
|
|
90
|
+
|
|
91
|
+
| Name | Type | Description |
|
|
92
|
+
| :------ | :------ | :------ |
|
|
93
|
+
| `collectionId` | `string` | – The collection identifier |
|
|
94
|
+
| `formId` | `string` | – The form identifier |
|
|
95
|
+
|
|
96
|
+
#### Returns
|
|
97
|
+
|
|
98
|
+
`Promise`\<`void`\>
|
|
99
|
+
|
|
100
|
+
#### Defined in
|
|
101
|
+
|
|
102
|
+
api/form.ts:53
|
|
103
|
+
|
|
104
|
+
___
|
|
105
|
+
|
|
106
|
+
### update
|
|
107
|
+
|
|
108
|
+
▸ **update**(`collectionId`, `formId`, `data`): `Promise`\<`any`\>
|
|
109
|
+
|
|
110
|
+
Update a form for a collection (admin only).
|
|
111
|
+
|
|
112
|
+
#### Parameters
|
|
113
|
+
|
|
114
|
+
| Name | Type | Description |
|
|
115
|
+
| :------ | :------ | :------ |
|
|
116
|
+
| `collectionId` | `string` | – The collection identifier |
|
|
117
|
+
| `formId` | `string` | – The form identifier |
|
|
118
|
+
| `data` | `any` | – The form data |
|
|
119
|
+
|
|
120
|
+
#### Returns
|
|
121
|
+
|
|
122
|
+
`Promise`\<`any`\>
|
|
123
|
+
|
|
124
|
+
#### Defined in
|
|
125
|
+
|
|
126
|
+
api/form.ts:43
|
|
@@ -32,7 +32,7 @@ ErrorResponse if the request fails
|
|
|
32
32
|
|
|
33
33
|
#### Defined in
|
|
34
34
|
|
|
35
|
-
[api/product.ts:13](https://github.com/Prove-Anything/smartlinks/blob/
|
|
35
|
+
[api/product.ts:13](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/product.ts#L13)
|
|
36
36
|
|
|
37
37
|
___
|
|
38
38
|
|
|
@@ -60,4 +60,4 @@ ErrorResponse if the request fails
|
|
|
60
60
|
|
|
61
61
|
#### Defined in
|
|
62
62
|
|
|
63
|
-
[api/product.ts:29](https://github.com/Prove-Anything/smartlinks/blob/
|
|
63
|
+
[api/product.ts:29](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/product.ts#L29)
|
|
@@ -32,7 +32,7 @@ ErrorResponse if the request fails
|
|
|
32
32
|
|
|
33
33
|
#### Defined in
|
|
34
34
|
|
|
35
|
-
[api/proof.ts:13](https://github.com/Prove-Anything/smartlinks/blob/
|
|
35
|
+
[api/proof.ts:13](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/proof.ts#L13)
|
|
36
36
|
|
|
37
37
|
___
|
|
38
38
|
|
|
@@ -54,4 +54,4 @@ List all Proofs for a Collection.
|
|
|
54
54
|
|
|
55
55
|
#### Defined in
|
|
56
56
|
|
|
57
|
-
[api/proof.ts:26](https://github.com/Prove-Anything/smartlinks/blob/
|
|
57
|
+
[api/proof.ts:26](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/proof.ts#L26)
|
package/temp-docs/modules.md
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
- [asset](modules/asset.md)
|
|
7
7
|
- [attestation](modules/attestation.md)
|
|
8
8
|
- [auth](modules/auth.md)
|
|
9
|
+
- [claimSet](modules/claimSet.md)
|
|
9
10
|
- [collection](modules/collection.md)
|
|
11
|
+
- [form](modules/form.md)
|
|
10
12
|
- [product](modules/product.md)
|
|
11
13
|
- [proof](modules/proof.md)
|
|
12
14
|
|
|
@@ -33,6 +35,7 @@
|
|
|
33
35
|
|
|
34
36
|
- [initializeApi](modules.md#initializeapi)
|
|
35
37
|
- [request](modules.md#request)
|
|
38
|
+
- [sendCustomProxyMessage](modules.md#sendcustomproxymessage)
|
|
36
39
|
|
|
37
40
|
## Type Aliases
|
|
38
41
|
|
|
@@ -51,7 +54,7 @@
|
|
|
51
54
|
|
|
52
55
|
#### Defined in
|
|
53
56
|
|
|
54
|
-
[api/auth.ts:19](https://github.com/Prove-Anything/smartlinks/blob/
|
|
57
|
+
[api/auth.ts:19](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/auth.ts#L19)
|
|
55
58
|
|
|
56
59
|
___
|
|
57
60
|
|
|
@@ -77,7 +80,7 @@ ___
|
|
|
77
80
|
|
|
78
81
|
#### Defined in
|
|
79
82
|
|
|
80
|
-
[api/appConfiguration.ts:4](https://github.com/Prove-Anything/smartlinks/blob/
|
|
83
|
+
[api/appConfiguration.ts:4](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/appConfiguration.ts#L4)
|
|
81
84
|
|
|
82
85
|
___
|
|
83
86
|
|
|
@@ -97,7 +100,7 @@ ___
|
|
|
97
100
|
|
|
98
101
|
#### Defined in
|
|
99
102
|
|
|
100
|
-
[api/auth.ts:3](https://github.com/Prove-Anything/smartlinks/blob/
|
|
103
|
+
[api/auth.ts:3](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/auth.ts#L3)
|
|
101
104
|
|
|
102
105
|
___
|
|
103
106
|
|
|
@@ -117,7 +120,7 @@ ___
|
|
|
117
120
|
|
|
118
121
|
#### Defined in
|
|
119
122
|
|
|
120
|
-
[api/auth.ts:11](https://github.com/Prove-Anything/smartlinks/blob/
|
|
123
|
+
[api/auth.ts:11](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/auth.ts#L11)
|
|
121
124
|
|
|
122
125
|
## Functions
|
|
123
126
|
|
|
@@ -143,7 +146,7 @@ Call this once (e.g. at app startup) to configure baseURL/auth.
|
|
|
143
146
|
|
|
144
147
|
#### Defined in
|
|
145
148
|
|
|
146
|
-
[http.ts:20](https://github.com/Prove-Anything/smartlinks/blob/
|
|
149
|
+
[http.ts:20](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/http.ts#L20)
|
|
147
150
|
|
|
148
151
|
___
|
|
149
152
|
|
|
@@ -173,4 +176,35 @@ Returns the parsed JSON as T, or throws an Error.
|
|
|
173
176
|
|
|
174
177
|
#### Defined in
|
|
175
178
|
|
|
176
|
-
[http.ts:96](https://github.com/Prove-Anything/smartlinks/blob/
|
|
179
|
+
[http.ts:96](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/http.ts#L96)
|
|
180
|
+
|
|
181
|
+
___
|
|
182
|
+
|
|
183
|
+
### sendCustomProxyMessage
|
|
184
|
+
|
|
185
|
+
▸ **sendCustomProxyMessage**\<`T`\>(`request`, `params`): `Promise`\<`T`\>
|
|
186
|
+
|
|
187
|
+
Sends a custom proxy message in proxyMode and waits for a matching reply.
|
|
188
|
+
|
|
189
|
+
#### Type parameters
|
|
190
|
+
|
|
191
|
+
| Name | Type |
|
|
192
|
+
| :------ | :------ |
|
|
193
|
+
| `T` | `any` |
|
|
194
|
+
|
|
195
|
+
#### Parameters
|
|
196
|
+
|
|
197
|
+
| Name | Type | Description |
|
|
198
|
+
| :------ | :------ | :------ |
|
|
199
|
+
| `request` | `string` | The request type string |
|
|
200
|
+
| `params` | `any` | The parameters object |
|
|
201
|
+
|
|
202
|
+
#### Returns
|
|
203
|
+
|
|
204
|
+
`Promise`\<`T`\>
|
|
205
|
+
|
|
206
|
+
The data from the proxy response
|
|
207
|
+
|
|
208
|
+
#### Defined in
|
|
209
|
+
|
|
210
|
+
[http.ts:346](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/http.ts#L346)
|