@proveanything/smartlinks 1.0.16 → 1.0.18

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