@proveanything/smartlinks 1.0.14 → 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.
Files changed (63) hide show
  1. package/README.md +12 -150
  2. package/build-docs.ts +28 -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/build-docs.js +26 -0
  7. package/dist/http.d.ts +5 -3
  8. package/dist/http.js +5 -3
  9. package/dist/index.d.ts +3 -0
  10. package/docs/README.md +282 -0
  11. package/docs/assets/navigation.js +1 -1
  12. package/docs/assets/search.js +1 -1
  13. package/docs/documentation.json +3311 -1573
  14. package/docs/functions/appConfiguration.deleteConfig.html +1 -0
  15. package/docs/functions/appConfiguration.deleteDataItem.html +1 -0
  16. package/docs/functions/appConfiguration.getConfig.html +1 -0
  17. package/docs/functions/appConfiguration.getData.html +1 -0
  18. package/docs/functions/appConfiguration.getDataItem.html +1 -0
  19. package/docs/functions/appConfiguration.setConfig.html +1 -0
  20. package/docs/functions/appConfiguration.setDataItem.html +1 -0
  21. package/docs/functions/attestation.create.html +2 -2
  22. package/docs/functions/attestation.get.html +2 -2
  23. package/docs/functions/attestation.list.html +2 -2
  24. package/docs/functions/attestation.update.html +2 -2
  25. package/docs/functions/auth.getAccount.html +2 -2
  26. package/docs/functions/auth.login.html +2 -2
  27. package/docs/functions/auth.verifyToken.html +2 -2
  28. package/docs/functions/initializeApi.html +2 -4
  29. package/docs/functions/request.html +1 -1
  30. package/docs/interfaces/AttestationCreateRequest.html +4 -0
  31. package/docs/interfaces/AttestationResponse.html +7 -0
  32. package/docs/interfaces/AttestationUpdateRequest.html +3 -0
  33. package/docs/modules/appConfiguration.html +7 -1
  34. package/docs/modules.html +7 -0
  35. package/docs/types/AccountInfoResponse.html +1 -0
  36. package/docs/types/AppConfigOptions.html +1 -0
  37. package/docs/types/LoginResponse.html +1 -0
  38. package/docs/types/VerifyTokenResponse.html +1 -0
  39. package/package.json +5 -2
  40. package/src/api/appConfiguration.ts +99 -17
  41. package/src/api/auth.ts +3 -3
  42. package/src/http.ts +7 -5
  43. package/src/index.ts +13 -0
  44. package/temp-docs/.nojekyll +1 -0
  45. package/temp-docs/README.md +101 -0
  46. package/temp-docs/interfaces/AppConfigurationResponse.md +45 -0
  47. package/temp-docs/interfaces/AssetResponse.md +39 -0
  48. package/temp-docs/interfaces/AttestationCreateRequest.md +37 -0
  49. package/temp-docs/interfaces/AttestationResponse.md +70 -0
  50. package/temp-docs/interfaces/AttestationUpdateRequest.md +26 -0
  51. package/temp-docs/interfaces/CollectionResponse.md +58 -0
  52. package/temp-docs/interfaces/ErrorResponse.md +32 -0
  53. package/temp-docs/interfaces/ProductResponse.md +58 -0
  54. package/temp-docs/interfaces/ProofResponse.md +97 -0
  55. package/temp-docs/modules/appConfiguration.md +151 -0
  56. package/temp-docs/modules/asset.md +171 -0
  57. package/temp-docs/modules/attestation.md +134 -0
  58. package/temp-docs/modules/auth.md +88 -0
  59. package/temp-docs/modules/collection.md +33 -0
  60. package/temp-docs/modules/product.md +63 -0
  61. package/temp-docs/modules/proof.md +57 -0
  62. package/temp-docs/modules.md +176 -0
  63. package/docs/functions/appConfiguration.get.html +0 -6
@@ -0,0 +1,97 @@
1
+ Represents a Proof object.
2
+
3
+ ## Table of contents
4
+
5
+ ### Properties
6
+
7
+ - [collectionId](ProofResponse.md#collectionid)
8
+ - [createdAt](ProofResponse.md#createdat)
9
+ - [id](ProofResponse.md#id)
10
+ - [productId](ProofResponse.md#productid)
11
+ - [tokenId](ProofResponse.md#tokenid)
12
+ - [userId](ProofResponse.md#userid)
13
+ - [values](ProofResponse.md#values)
14
+
15
+ ## Properties
16
+
17
+ ### collectionId
18
+
19
+ • **collectionId**: `string`
20
+
21
+ Unique identifier for the collection
22
+
23
+ #### Defined in
24
+
25
+ [types/proof.ts:7](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/proof.ts#L7)
26
+
27
+ ___
28
+
29
+ ### createdAt
30
+
31
+ • **createdAt**: `string`
32
+
33
+ Creation timestamp
34
+
35
+ #### Defined in
36
+
37
+ [types/proof.ts:9](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/proof.ts#L9)
38
+
39
+ ___
40
+
41
+ ### id
42
+
43
+ • **id**: `string`
44
+
45
+ Unique identifier for the proof
46
+
47
+ #### Defined in
48
+
49
+ [types/proof.ts:11](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/proof.ts#L11)
50
+
51
+ ___
52
+
53
+ ### productId
54
+
55
+ • **productId**: `string`
56
+
57
+ Unique identifier for the product
58
+
59
+ #### Defined in
60
+
61
+ [types/proof.ts:13](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/proof.ts#L13)
62
+
63
+ ___
64
+
65
+ ### tokenId
66
+
67
+ • **tokenId**: `string`
68
+
69
+ Unique identifier for the token
70
+
71
+ #### Defined in
72
+
73
+ [types/proof.ts:15](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/proof.ts#L15)
74
+
75
+ ___
76
+
77
+ ### userId
78
+
79
+ • **userId**: `string`
80
+
81
+ Unique identifier for the user
82
+
83
+ #### Defined in
84
+
85
+ [types/proof.ts:17](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/proof.ts#L17)
86
+
87
+ ___
88
+
89
+ ### values
90
+
91
+ • **values**: `Record`\<`string`, `any`\>
92
+
93
+ Arbitrary key-value pairs for proof values
94
+
95
+ #### Defined in
96
+
97
+ [types/proof.ts:19](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/types/proof.ts#L19)
@@ -0,0 +1,151 @@
1
+ ## Table of contents
2
+
3
+ ### Functions
4
+
5
+ - [deleteConfig](appConfiguration.md#deleteconfig)
6
+ - [deleteDataItem](appConfiguration.md#deletedataitem)
7
+ - [getConfig](appConfiguration.md#getconfig)
8
+ - [getData](appConfiguration.md#getdata)
9
+ - [getDataItem](appConfiguration.md#getdataitem)
10
+ - [setConfig](appConfiguration.md#setconfig)
11
+ - [setDataItem](appConfiguration.md#setdataitem)
12
+
13
+ ## Functions
14
+
15
+ ### deleteConfig
16
+
17
+ ▸ **deleteConfig**(`opts`): `Promise`\<`void`\>
18
+
19
+ #### Parameters
20
+
21
+ | Name | Type |
22
+ | :------ | :------ |
23
+ | `opts` | [`AppConfigOptions`](../modules.md#appconfigoptions) |
24
+
25
+ #### Returns
26
+
27
+ `Promise`\<`void`\>
28
+
29
+ #### Defined in
30
+
31
+ [api/appConfiguration.ts:74](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/appConfiguration.ts#L74)
32
+
33
+ ___
34
+
35
+ ### deleteDataItem
36
+
37
+ ▸ **deleteDataItem**(`opts`): `Promise`\<`void`\>
38
+
39
+ #### Parameters
40
+
41
+ | Name | Type |
42
+ | :------ | :------ |
43
+ | `opts` | [`AppConfigOptions`](../modules.md#appconfigoptions) |
44
+
45
+ #### Returns
46
+
47
+ `Promise`\<`void`\>
48
+
49
+ #### Defined in
50
+
51
+ [api/appConfiguration.ts:99](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/appConfiguration.ts#L99)
52
+
53
+ ___
54
+
55
+ ### getConfig
56
+
57
+ ▸ **getConfig**(`opts`): `Promise`\<`any`\>
58
+
59
+ #### Parameters
60
+
61
+ | Name | Type |
62
+ | :------ | :------ |
63
+ | `opts` | [`AppConfigOptions`](../modules.md#appconfigoptions) |
64
+
65
+ #### Returns
66
+
67
+ `Promise`\<`any`\>
68
+
69
+ #### Defined in
70
+
71
+ [api/appConfiguration.ts:62](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/appConfiguration.ts#L62)
72
+
73
+ ___
74
+
75
+ ### getData
76
+
77
+ ▸ **getData**(`opts`): `Promise`\<`any`[]\>
78
+
79
+ #### Parameters
80
+
81
+ | Name | Type |
82
+ | :------ | :------ |
83
+ | `opts` | [`AppConfigOptions`](../modules.md#appconfigoptions) |
84
+
85
+ #### Returns
86
+
87
+ `Promise`\<`any`[]\>
88
+
89
+ #### Defined in
90
+
91
+ [api/appConfiguration.ts:80](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/appConfiguration.ts#L80)
92
+
93
+ ___
94
+
95
+ ### getDataItem
96
+
97
+ ▸ **getDataItem**(`opts`): `Promise`\<`any`\>
98
+
99
+ #### Parameters
100
+
101
+ | Name | Type |
102
+ | :------ | :------ |
103
+ | `opts` | [`AppConfigOptions`](../modules.md#appconfigoptions) |
104
+
105
+ #### Returns
106
+
107
+ `Promise`\<`any`\>
108
+
109
+ #### Defined in
110
+
111
+ [api/appConfiguration.ts:86](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/appConfiguration.ts#L86)
112
+
113
+ ___
114
+
115
+ ### setConfig
116
+
117
+ ▸ **setConfig**(`opts`): `Promise`\<`any`\>
118
+
119
+ #### Parameters
120
+
121
+ | Name | Type |
122
+ | :------ | :------ |
123
+ | `opts` | [`AppConfigOptions`](../modules.md#appconfigoptions) |
124
+
125
+ #### Returns
126
+
127
+ `Promise`\<`any`\>
128
+
129
+ #### Defined in
130
+
131
+ [api/appConfiguration.ts:68](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/appConfiguration.ts#L68)
132
+
133
+ ___
134
+
135
+ ### setDataItem
136
+
137
+ ▸ **setDataItem**(`opts`): `Promise`\<`any`\>
138
+
139
+ #### Parameters
140
+
141
+ | Name | Type |
142
+ | :------ | :------ |
143
+ | `opts` | [`AppConfigOptions`](../modules.md#appconfigoptions) |
144
+
145
+ #### Returns
146
+
147
+ `Promise`\<`any`\>
148
+
149
+ #### Defined in
150
+
151
+ [api/appConfiguration.ts:93](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/appConfiguration.ts#L93)
@@ -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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/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/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/auth.ts#L48)
@@ -0,0 +1,33 @@
1
+ ## Table of contents
2
+
3
+ ### Functions
4
+
5
+ - [get](collection.md#get)
6
+
7
+ ## Functions
8
+
9
+ ### get
10
+
11
+ ▸ **get**(`collectionId`): `Promise`\<[`CollectionResponse`](../interfaces/CollectionResponse.md)\>
12
+
13
+ Retrieves a single Collection by its ID.
14
+
15
+ #### Parameters
16
+
17
+ | Name | Type | Description |
18
+ | :------ | :------ | :------ |
19
+ | `collectionId` | `string` | – Identifier of the collection |
20
+
21
+ #### Returns
22
+
23
+ `Promise`\<[`CollectionResponse`](../interfaces/CollectionResponse.md)\>
24
+
25
+ Promise resolving to a CollectionResponse object
26
+
27
+ **`Throws`**
28
+
29
+ ErrorResponse if the request fails
30
+
31
+ #### Defined in
32
+
33
+ [api/collection.ts:12](https://github.com/Prove-Anything/smartlinks/blob/54a929dabe2ef3c5f4a5a559c656ea584231138a/src/api/collection.ts#L12)