@proveanything/smartlinks 1.0.14 → 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.
Files changed (117) hide show
  1. package/README.md +7341 -230
  2. package/build-docs.ts +69 -0
  3. package/dist/api/appConfiguration.d.ts +20 -9
  4. package/dist/api/appConfiguration.js +85 -11
  5. package/dist/api/auth.d.ts +3 -4
  6. package/dist/api/claimSet.d.ts +14 -0
  7. package/dist/api/claimSet.js +24 -0
  8. package/dist/api/collection.d.ts +9 -1
  9. package/dist/api/collection.js +16 -2
  10. package/dist/api/form.d.ts +34 -0
  11. package/dist/api/form.js +58 -0
  12. package/dist/api/index.d.ts +2 -0
  13. package/dist/api/index.js +2 -0
  14. package/dist/build-docs.js +61 -0
  15. package/dist/http.d.ts +12 -3
  16. package/dist/http.js +29 -3
  17. package/dist/index.d.ts +4 -1
  18. package/dist/index.js +1 -1
  19. package/docs/README.md +7469 -0
  20. package/docs/assets/highlight.css +12 -33
  21. package/docs/assets/navigation.js +1 -1
  22. package/docs/assets/search.js +1 -1
  23. package/docs/documentation.json +4719 -1986
  24. package/docs/functions/appConfiguration.deleteConfig.html +1 -0
  25. package/docs/functions/appConfiguration.deleteDataItem.html +1 -0
  26. package/docs/functions/appConfiguration.getConfig.html +1 -0
  27. package/docs/functions/appConfiguration.getData.html +1 -0
  28. package/docs/functions/appConfiguration.getDataItem.html +1 -0
  29. package/docs/functions/appConfiguration.setConfig.html +1 -0
  30. package/docs/functions/appConfiguration.setDataItem.html +1 -0
  31. package/docs/functions/asset.getForCollection.html +1 -1
  32. package/docs/functions/asset.getForProduct.html +1 -1
  33. package/docs/functions/asset.getForProof.html +1 -1
  34. package/docs/functions/asset.listForCollection.html +1 -1
  35. package/docs/functions/asset.listForProduct.html +1 -1
  36. package/docs/functions/asset.listForProof.html +1 -1
  37. package/docs/functions/asset.uploadAsset.html +1 -1
  38. package/docs/functions/attestation.create.html +2 -2
  39. package/docs/functions/attestation.get.html +2 -2
  40. package/docs/functions/attestation.list.html +2 -2
  41. package/docs/functions/attestation.remove.html +1 -1
  42. package/docs/functions/attestation.update.html +2 -2
  43. package/docs/functions/auth.getAccount.html +2 -2
  44. package/docs/functions/auth.login.html +2 -2
  45. package/docs/functions/auth.logout.html +1 -1
  46. package/docs/functions/auth.verifyToken.html +2 -2
  47. package/docs/functions/claimSet.assignClaims.html +4 -0
  48. package/docs/functions/claimSet.updateClaimData.html +4 -0
  49. package/docs/functions/collection.get.html +3 -2
  50. package/docs/functions/collection.list.html +5 -0
  51. package/docs/functions/form.create.html +4 -0
  52. package/docs/functions/form.get.html +5 -0
  53. package/docs/functions/form.list.html +4 -0
  54. package/docs/functions/form.remove.html +4 -0
  55. package/docs/functions/form.update.html +5 -0
  56. package/docs/functions/initializeApi.html +2 -4
  57. package/docs/functions/product.get.html +1 -1
  58. package/docs/functions/product.list.html +1 -1
  59. package/docs/functions/proof.get.html +1 -1
  60. package/docs/functions/proof.list.html +1 -1
  61. package/docs/functions/request.html +1 -1
  62. package/docs/functions/sendCustomProxyMessage.html +5 -0
  63. package/docs/index.html +4 -112
  64. package/docs/interfaces/AppConfigurationResponse.html +4 -4
  65. package/docs/interfaces/AssetResponse.html +2 -2
  66. package/docs/interfaces/AttestationCreateRequest.html +4 -0
  67. package/docs/interfaces/AttestationResponse.html +7 -0
  68. package/docs/interfaces/AttestationUpdateRequest.html +3 -0
  69. package/docs/interfaces/CollectionResponse.html +5 -5
  70. package/docs/interfaces/ErrorResponse.html +3 -3
  71. package/docs/interfaces/ProductResponse.html +5 -5
  72. package/docs/interfaces/ProofResponse.html +8 -8
  73. package/docs/modules/appConfiguration.html +7 -1
  74. package/docs/modules/asset.html +1 -1
  75. package/docs/modules/attestation.html +1 -1
  76. package/docs/modules/auth.html +1 -1
  77. package/docs/modules/claimSet.html +3 -0
  78. package/docs/modules/collection.html +2 -1
  79. package/docs/modules/form.html +6 -0
  80. package/docs/modules/product.html +1 -1
  81. package/docs/modules/proof.html +1 -1
  82. package/docs/modules.html +10 -0
  83. package/docs/types/AccountInfoResponse.html +1 -0
  84. package/docs/types/AppConfigOptions.html +1 -0
  85. package/docs/types/LoginResponse.html +1 -0
  86. package/docs/types/VerifyTokenResponse.html +1 -0
  87. package/package.json +5 -2
  88. package/src/api/appConfiguration.ts +99 -17
  89. package/src/api/auth.ts +3 -3
  90. package/src/api/claimSet.ts +23 -0
  91. package/src/api/collection.ts +17 -3
  92. package/src/api/form.ts +57 -0
  93. package/src/api/index.ts +2 -0
  94. package/src/http.ts +32 -5
  95. package/src/index.ts +14 -1
  96. package/temp-docs/.nojekyll +1 -0
  97. package/temp-docs/README.md +7254 -0
  98. package/temp-docs/interfaces/AppConfigurationResponse.md +45 -0
  99. package/temp-docs/interfaces/AssetResponse.md +39 -0
  100. package/temp-docs/interfaces/AttestationCreateRequest.md +37 -0
  101. package/temp-docs/interfaces/AttestationResponse.md +70 -0
  102. package/temp-docs/interfaces/AttestationUpdateRequest.md +26 -0
  103. package/temp-docs/interfaces/CollectionResponse.md +58 -0
  104. package/temp-docs/interfaces/ErrorResponse.md +32 -0
  105. package/temp-docs/interfaces/ProductResponse.md +58 -0
  106. package/temp-docs/interfaces/ProofResponse.md +97 -0
  107. package/temp-docs/modules/appConfiguration.md +151 -0
  108. package/temp-docs/modules/asset.md +171 -0
  109. package/temp-docs/modules/attestation.md +134 -0
  110. package/temp-docs/modules/auth.md +88 -0
  111. package/temp-docs/modules/claimSet.md +52 -0
  112. package/temp-docs/modules/collection.md +63 -0
  113. package/temp-docs/modules/form.md +126 -0
  114. package/temp-docs/modules/product.md +63 -0
  115. package/temp-docs/modules/proof.md +57 -0
  116. package/temp-docs/modules.md +210 -0
  117. package/docs/functions/appConfiguration.get.html +0 -6
@@ -0,0 +1,171 @@
1
+ ## Table of contents
2
+
3
+ ### Functions
4
+
5
+ - [getForCollection](asset.md#getforcollection)
6
+ - [getForProduct](asset.md#getforproduct)
7
+ - [getForProof](asset.md#getforproof)
8
+ - [listForCollection](asset.md#listforcollection)
9
+ - [listForProduct](asset.md#listforproduct)
10
+ - [listForProof](asset.md#listforproof)
11
+ - [uploadAsset](asset.md#uploadasset)
12
+
13
+ ## Functions
14
+
15
+ ### getForCollection
16
+
17
+ ▸ **getForCollection**(`collectionId`, `assetId`): `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)\>
18
+
19
+ #### Parameters
20
+
21
+ | Name | Type |
22
+ | :------ | :------ |
23
+ | `collectionId` | `string` |
24
+ | `assetId` | `string` |
25
+
26
+ #### Returns
27
+
28
+ `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)\>
29
+
30
+ #### Defined in
31
+
32
+ [api/asset.ts:6](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/asset.ts#L6)
33
+
34
+ ___
35
+
36
+ ### getForProduct
37
+
38
+ ▸ **getForProduct**(`collectionId`, `productId`, `assetId`): `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)\>
39
+
40
+ #### Parameters
41
+
42
+ | Name | Type |
43
+ | :------ | :------ |
44
+ | `collectionId` | `string` |
45
+ | `productId` | `string` |
46
+ | `assetId` | `string` |
47
+
48
+ #### Returns
49
+
50
+ `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)\>
51
+
52
+ #### Defined in
53
+
54
+ [api/asset.ts:22](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/asset.ts#L22)
55
+
56
+ ___
57
+
58
+ ### getForProof
59
+
60
+ ▸ **getForProof**(`collectionId`, `productId`, `proofId`, `assetId`): `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)\>
61
+
62
+ #### Parameters
63
+
64
+ | Name | Type |
65
+ | :------ | :------ |
66
+ | `collectionId` | `string` |
67
+ | `productId` | `string` |
68
+ | `proofId` | `string` |
69
+ | `assetId` | `string` |
70
+
71
+ #### Returns
72
+
73
+ `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)\>
74
+
75
+ #### Defined in
76
+
77
+ [api/asset.ts:40](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/asset.ts#L40)
78
+
79
+ ___
80
+
81
+ ### listForCollection
82
+
83
+ ▸ **listForCollection**(`collectionId`): `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)[]\>
84
+
85
+ #### Parameters
86
+
87
+ | Name | Type |
88
+ | :------ | :------ |
89
+ | `collectionId` | `string` |
90
+
91
+ #### Returns
92
+
93
+ `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)[]\>
94
+
95
+ #### Defined in
96
+
97
+ [api/asset.ts:14](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/asset.ts#L14)
98
+
99
+ ___
100
+
101
+ ### listForProduct
102
+
103
+ ▸ **listForProduct**(`collectionId`, `productId`): `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)[]\>
104
+
105
+ #### Parameters
106
+
107
+ | Name | Type |
108
+ | :------ | :------ |
109
+ | `collectionId` | `string` |
110
+ | `productId` | `string` |
111
+
112
+ #### Returns
113
+
114
+ `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)[]\>
115
+
116
+ #### Defined in
117
+
118
+ [api/asset.ts:31](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/asset.ts#L31)
119
+
120
+ ___
121
+
122
+ ### listForProof
123
+
124
+ ▸ **listForProof**(`collectionId`, `productId`, `proofId`, `appId?`): `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)[]\>
125
+
126
+ #### Parameters
127
+
128
+ | Name | Type |
129
+ | :------ | :------ |
130
+ | `collectionId` | `string` |
131
+ | `productId` | `string` |
132
+ | `proofId` | `string` |
133
+ | `appId?` | `string` |
134
+
135
+ #### Returns
136
+
137
+ `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)[]\>
138
+
139
+ #### Defined in
140
+
141
+ [api/asset.ts:50](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/asset.ts#L50)
142
+
143
+ ___
144
+
145
+ ### uploadAsset
146
+
147
+ ▸ **uploadAsset**(`collectionId`, `productId`, `proofId`, `file`, `extraData?`, `onProgress?`): `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)\>
148
+
149
+ Uploads an asset file to a proof, with optional extraData as JSON.
150
+ Supports progress reporting via onProgress callback (browser only).
151
+
152
+ #### Parameters
153
+
154
+ | Name | Type | Description |
155
+ | :------ | :------ | :------ |
156
+ | `collectionId` | `string` | The collection ID |
157
+ | `productId` | `string` | The product ID |
158
+ | `proofId` | `string` | The proof ID |
159
+ | `file` | `File` | The file to upload |
160
+ | `extraData?` | `Record`\<`string`, `any`\> | Arbitrary extra data to include (will be stringified as JSON) |
161
+ | `onProgress?` | (`percent`: `number`) => `void` | Optional callback for upload progress (0-100) |
162
+
163
+ #### Returns
164
+
165
+ `Promise`\<[`AssetResponse`](../interfaces/AssetResponse.md)\>
166
+
167
+ Promise resolving to an AssetResponse object
168
+
169
+ #### Defined in
170
+
171
+ [api/asset.ts:74](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/asset.ts#L74)
@@ -0,0 +1,134 @@
1
+ ## Table of contents
2
+
3
+ ### Functions
4
+
5
+ - [create](attestation.md#create)
6
+ - [get](attestation.md#get)
7
+ - [list](attestation.md#list)
8
+ - [remove](attestation.md#remove)
9
+ - [update](attestation.md#update)
10
+
11
+ ## Functions
12
+
13
+ ### create
14
+
15
+ ▸ **create**(`collectionId`, `productId`, `proofId`, `data`): `Promise`\<[`AttestationResponse`](../interfaces/AttestationResponse.md)\>
16
+
17
+ Create a new attestation for a proof.
18
+
19
+ #### Parameters
20
+
21
+ | Name | Type |
22
+ | :------ | :------ |
23
+ | `collectionId` | `string` |
24
+ | `productId` | `string` |
25
+ | `proofId` | `string` |
26
+ | `data` | [`AttestationCreateRequest`](../interfaces/AttestationCreateRequest.md) |
27
+
28
+ #### Returns
29
+
30
+ `Promise`\<[`AttestationResponse`](../interfaces/AttestationResponse.md)\>
31
+
32
+ #### Defined in
33
+
34
+ [api/attestation.ts:33](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/attestation.ts#L33)
35
+
36
+ ___
37
+
38
+ ### get
39
+
40
+ ▸ **get**(`collectionId`, `productId`, `proofId`, `attestationId`): `Promise`\<[`AttestationResponse`](../interfaces/AttestationResponse.md)\>
41
+
42
+ Get a single attestation by ID.
43
+
44
+ #### Parameters
45
+
46
+ | Name | Type |
47
+ | :------ | :------ |
48
+ | `collectionId` | `string` |
49
+ | `productId` | `string` |
50
+ | `proofId` | `string` |
51
+ | `attestationId` | `string` |
52
+
53
+ #### Returns
54
+
55
+ `Promise`\<[`AttestationResponse`](../interfaces/AttestationResponse.md)\>
56
+
57
+ #### Defined in
58
+
59
+ [api/attestation.ts:20](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/attestation.ts#L20)
60
+
61
+ ___
62
+
63
+ ### list
64
+
65
+ ▸ **list**(`collectionId`, `productId`, `proofId`): `Promise`\<[`AttestationResponse`](../interfaces/AttestationResponse.md)[]\>
66
+
67
+ List all attestations for a proof.
68
+
69
+ #### Parameters
70
+
71
+ | Name | Type |
72
+ | :------ | :------ |
73
+ | `collectionId` | `string` |
74
+ | `productId` | `string` |
75
+ | `proofId` | `string` |
76
+
77
+ #### Returns
78
+
79
+ `Promise`\<[`AttestationResponse`](../interfaces/AttestationResponse.md)[]\>
80
+
81
+ #### Defined in
82
+
83
+ [api/attestation.ts:8](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/attestation.ts#L8)
84
+
85
+ ___
86
+
87
+ ### remove
88
+
89
+ ▸ **remove**(`collectionId`, `productId`, `proofId`, `attestationId`): `Promise`\<`void`\>
90
+
91
+ Delete an attestation.
92
+
93
+ #### Parameters
94
+
95
+ | Name | Type |
96
+ | :------ | :------ |
97
+ | `collectionId` | `string` |
98
+ | `productId` | `string` |
99
+ | `proofId` | `string` |
100
+ | `attestationId` | `string` |
101
+
102
+ #### Returns
103
+
104
+ `Promise`\<`void`\>
105
+
106
+ #### Defined in
107
+
108
+ [api/attestation.ts:60](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/attestation.ts#L60)
109
+
110
+ ___
111
+
112
+ ### update
113
+
114
+ ▸ **update**(`collectionId`, `productId`, `proofId`, `attestationId`, `data`): `Promise`\<[`AttestationResponse`](../interfaces/AttestationResponse.md)\>
115
+
116
+ Update an attestation.
117
+
118
+ #### Parameters
119
+
120
+ | Name | Type |
121
+ | :------ | :------ |
122
+ | `collectionId` | `string` |
123
+ | `productId` | `string` |
124
+ | `proofId` | `string` |
125
+ | `attestationId` | `string` |
126
+ | `data` | [`AttestationUpdateRequest`](../interfaces/AttestationUpdateRequest.md) |
127
+
128
+ #### Returns
129
+
130
+ `Promise`\<[`AttestationResponse`](../interfaces/AttestationResponse.md)\>
131
+
132
+ #### Defined in
133
+
134
+ [api/attestation.ts:46](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/attestation.ts#L46)
@@ -0,0 +1,88 @@
1
+ ## Table of contents
2
+
3
+ ### Functions
4
+
5
+ - [getAccount](auth.md#getaccount)
6
+ - [login](auth.md#login)
7
+ - [logout](auth.md#logout)
8
+ - [verifyToken](auth.md#verifytoken)
9
+
10
+ ## Functions
11
+
12
+ ### getAccount
13
+
14
+ ▸ **getAccount**(): `Promise`\<[`AccountInfoResponse`](../modules.md#accountinforesponse)\>
15
+
16
+ Gets current account information for the logged in user.
17
+ Returns user, owner, account, and location objects.
18
+
19
+ #### Returns
20
+
21
+ `Promise`\<[`AccountInfoResponse`](../modules.md#accountinforesponse)\>
22
+
23
+ #### Defined in
24
+
25
+ [api/auth.ts:65](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/auth.ts#L65)
26
+
27
+ ___
28
+
29
+ ### login
30
+
31
+ ▸ **login**(`email`, `password`): `Promise`\<[`LoginResponse`](../modules.md#loginresponse)\>
32
+
33
+ Login with email and password.
34
+ Sets the bearerToken for subsequent API calls.
35
+
36
+ #### Parameters
37
+
38
+ | Name | Type |
39
+ | :------ | :------ |
40
+ | `email` | `string` |
41
+ | `password` | `string` |
42
+
43
+ #### Returns
44
+
45
+ `Promise`\<[`LoginResponse`](../modules.md#loginresponse)\>
46
+
47
+ #### Defined in
48
+
49
+ [api/auth.ts:31](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/auth.ts#L31)
50
+
51
+ ___
52
+
53
+ ### logout
54
+
55
+ ▸ **logout**(): `void`
56
+
57
+ Logout (clears bearerToken for future API calls).
58
+
59
+ #### Returns
60
+
61
+ `void`
62
+
63
+ #### Defined in
64
+
65
+ [api/auth.ts:40](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/auth.ts#L40)
66
+
67
+ ___
68
+
69
+ ### verifyToken
70
+
71
+ ▸ **verifyToken**(`token?`): `Promise`\<[`VerifyTokenResponse`](../modules.md#verifytokenresponse)\>
72
+
73
+ Verifies the current bearerToken (or a provided token).
74
+ Returns user/account info if valid.
75
+
76
+ #### Parameters
77
+
78
+ | Name | Type |
79
+ | :------ | :------ |
80
+ | `token?` | `string` |
81
+
82
+ #### Returns
83
+
84
+ `Promise`\<[`VerifyTokenResponse`](../modules.md#verifytokenresponse)\>
85
+
86
+ #### Defined in
87
+
88
+ [api/auth.ts:48](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/auth.ts#L48)
@@ -0,0 +1,52 @@
1
+ ## Table of contents
2
+
3
+ ### Functions
4
+
5
+ - [assignClaims](claimSet.md#assignclaims)
6
+ - [updateClaimData](claimSet.md#updateclaimdata)
7
+
8
+ ## Functions
9
+
10
+ ### assignClaims
11
+
12
+ ▸ **assignClaims**(`collectionId`, `data`): `Promise`\<`any`\>
13
+
14
+ Assign claims to a claim set.
15
+
16
+ #### Parameters
17
+
18
+ | Name | Type | Description |
19
+ | :------ | :------ | :------ |
20
+ | `collectionId` | `string` | – The collection identifier |
21
+ | `data` | `any` | – The claims data to assign |
22
+
23
+ #### Returns
24
+
25
+ `Promise`\<`any`\>
26
+
27
+ #### Defined in
28
+
29
+ api/claimSet.ts:9
30
+
31
+ ___
32
+
33
+ ### updateClaimData
34
+
35
+ ▸ **updateClaimData**(`collectionId`, `data`): `Promise`\<`any`\>
36
+
37
+ Update claim data for a collection.
38
+
39
+ #### Parameters
40
+
41
+ | Name | Type | Description |
42
+ | :------ | :------ | :------ |
43
+ | `collectionId` | `string` | – The collection identifier |
44
+ | `data` | `any` | – The claim data to update |
45
+
46
+ #### Returns
47
+
48
+ `Promise`\<`any`\>
49
+
50
+ #### Defined in
51
+
52
+ api/claimSet.ts:19
@@ -0,0 +1,63 @@
1
+ ## Table of contents
2
+
3
+ ### Functions
4
+
5
+ - [get](collection.md#get)
6
+ - [list](collection.md#list)
7
+
8
+ ## Functions
9
+
10
+ ### get
11
+
12
+ ▸ **get**(`collectionId`, `admin?`): `Promise`\<[`CollectionResponse`](../interfaces/CollectionResponse.md)\>
13
+
14
+ Retrieves a single Collection by its ID.
15
+
16
+ #### Parameters
17
+
18
+ | Name | Type | Description |
19
+ | :------ | :------ | :------ |
20
+ | `collectionId` | `string` | – Identifier of the collection |
21
+ | `admin?` | `boolean` | – If true, fetches from the admin endpoint |
22
+
23
+ #### Returns
24
+
25
+ `Promise`\<[`CollectionResponse`](../interfaces/CollectionResponse.md)\>
26
+
27
+ Promise resolving to a CollectionResponse object
28
+
29
+ **`Throws`**
30
+
31
+ ErrorResponse if the request fails
32
+
33
+ #### Defined in
34
+
35
+ [api/collection.ts:13](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/collection.ts#L13)
36
+
37
+ ___
38
+
39
+ ### list
40
+
41
+ ▸ **list**(`admin?`): `Promise`\<[`CollectionResponse`](../interfaces/CollectionResponse.md)[]\>
42
+
43
+ Retrieves all Collections.
44
+
45
+ #### Parameters
46
+
47
+ | Name | Type | Description |
48
+ | :------ | :------ | :------ |
49
+ | `admin?` | `boolean` | – If true, fetches from the admin endpoint |
50
+
51
+ #### Returns
52
+
53
+ `Promise`\<[`CollectionResponse`](../interfaces/CollectionResponse.md)[]\>
54
+
55
+ Promise resolving to an array of CollectionResponse objects
56
+
57
+ **`Throws`**
58
+
59
+ ErrorResponse if the request fails
60
+
61
+ #### Defined in
62
+
63
+ [api/collection.ts:25](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/collection.ts#L25)
@@ -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
@@ -0,0 +1,63 @@
1
+ ## Table of contents
2
+
3
+ ### Functions
4
+
5
+ - [get](product.md#get)
6
+ - [list](product.md#list)
7
+
8
+ ## Functions
9
+
10
+ ### get
11
+
12
+ ▸ **get**(`collectionId`, `productId`): `Promise`\<[`ProductResponse`](../interfaces/ProductResponse.md)\>
13
+
14
+ Retrieves a single Product Item by Collection ID and Product ID.
15
+
16
+ #### Parameters
17
+
18
+ | Name | Type | Description |
19
+ | :------ | :------ | :------ |
20
+ | `collectionId` | `string` | – Identifier of the parent collection |
21
+ | `productId` | `string` | – Identifier of the product item |
22
+
23
+ #### Returns
24
+
25
+ `Promise`\<[`ProductResponse`](../interfaces/ProductResponse.md)\>
26
+
27
+ Promise resolving to a ProductResponse object
28
+
29
+ **`Throws`**
30
+
31
+ ErrorResponse if the request fails
32
+
33
+ #### Defined in
34
+
35
+ [api/product.ts:13](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/product.ts#L13)
36
+
37
+ ___
38
+
39
+ ### list
40
+
41
+ ▸ **list**(`collectionId`): `Promise`\<[`ProductResponse`](../interfaces/ProductResponse.md)[]\>
42
+
43
+ List all Product Items for a Collection.
44
+
45
+ #### Parameters
46
+
47
+ | Name | Type | Description |
48
+ | :------ | :------ | :------ |
49
+ | `collectionId` | `string` | – Identifier of the parent collection |
50
+
51
+ #### Returns
52
+
53
+ `Promise`\<[`ProductResponse`](../interfaces/ProductResponse.md)[]\>
54
+
55
+ Promise resolving to an array of ProductResponse objects
56
+
57
+ **`Throws`**
58
+
59
+ ErrorResponse if the request fails
60
+
61
+ #### Defined in
62
+
63
+ [api/product.ts:29](https://github.com/Prove-Anything/smartlinks/blob/2322afa091763cbb81ba4db4b90e49b576099120/src/api/product.ts#L29)