@proveanything/smartlinks 1.0.2 → 1.0.3
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 +6 -6
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/documentation.json +970 -448
- package/docs/functions/appConfiguration.get.html +6 -0
- package/docs/functions/collection.get.html +5 -0
- package/docs/functions/initializeApi.html +5 -0
- package/docs/functions/product.get.html +6 -0
- package/docs/functions/product.getAll.html +5 -0
- package/docs/functions/proof.get.html +6 -0
- package/docs/functions/request.html +4 -0
- package/docs/index.html +6 -6
- package/docs/interfaces/AppConfigurationResponse.html +4 -4
- 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 +16 -0
- package/docs/modules/appConfiguration.html +2 -0
- package/docs/modules/collection.html +2 -0
- package/docs/modules/product.html +3 -0
- package/docs/modules/proof.html +2 -0
- package/docs/modules.html +7 -1
- package/package.json +1 -1
- package/src/api/appConfiguration.ts +22 -0
- package/src/api/collection.ts +16 -0
- package/src/api/index.ts +6 -0
- package/src/api/product.ts +35 -0
- package/src/api/proof.ts +22 -0
- package/src/http.ts +64 -0
- package/src/index.ts +5 -170
- package/src/types/appConfiguration.ts +12 -0
- package/src/types/collection.ts +14 -0
- package/src/types/error.ts +10 -0
- package/src/types/index.ts +8 -0
- package/src/types/product.ts +14 -0
- package/src/types/proof.ts +20 -0
- package/docs/classes/ApiClient.html +0 -35
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# @smartlinks
|
|
1
|
+
# @proveanything/smartlinks
|
|
2
2
|
|
|
3
3
|
An official JavaScript/TypeScript client SDK for the Smartlinks API. This package provides a simple wrapper around the Smartlinks REST endpoints, allowing you to fetch Collection, Product, and App Configuration data in both browser and Node.js environments.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @smartlinks
|
|
8
|
+
npm install @proveanything/smartlinks
|
|
9
9
|
# or
|
|
10
|
-
yarn add @smartlinks
|
|
10
|
+
yarn add @proveanything/smartlinks
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Quickstart
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
|
-
import { ApiClient, CollectionResponse, ProductResponse } from "@smartlinks
|
|
16
|
+
import { ApiClient, CollectionResponse, ProductResponse } from "@proveanything/smartlinks";
|
|
17
17
|
|
|
18
18
|
async function main() {
|
|
19
19
|
// Instantiate the client (no apiKey needed for public endpoints, but shown here for reference)
|
|
@@ -136,7 +136,7 @@ Fetches a single app configuration within a collection.
|
|
|
136
136
|
All endpoints require a Bearer token passed in the `AUTHORIZATION` header. When instantiating `ApiClient`, optionally supply your token:
|
|
137
137
|
|
|
138
138
|
```ts
|
|
139
|
-
import { ApiClient } from "@smartlinks
|
|
139
|
+
import { ApiClient } from "@proveanything/smartlinks";
|
|
140
140
|
|
|
141
141
|
const apiKey = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...";
|
|
142
142
|
const client = new ApiClient("https://smartlinks.app/api/v1", apiKey);
|
|
@@ -149,7 +149,7 @@ If `apiKey` is omitted, requests will be sent without an `Authorization` header,
|
|
|
149
149
|
All methods throw an `Error` when the server responds with a non-2xx status. The thrown error message includes the numeric error code and message from the API. Example:
|
|
150
150
|
|
|
151
151
|
```ts
|
|
152
|
-
import { ApiClient } from "@smartlinks
|
|
152
|
+
import { ApiClient } from "@proveanything/smartlinks";
|
|
153
153
|
|
|
154
154
|
async function fetchData() {
|
|
155
155
|
const client = new ApiClient("https://smartlinks.app/api/v1", "INVALID_KEY");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.navigationData = "data:application/octet-stream;base64,
|
|
1
|
+
window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACqWSP2sDMQzFv4tm00BJM9x2hO6la8hgfPKdqWK5tg9KQ757KE3vr2sPN+vppyfpna4Q8StCBdK5I1tt2t7LaNiCACdjBxVcuOkJw26peOrihUDAh7ENVHsBqjPUeLRQnQZsi3Ek6d6qn84Eq8U45x32t/NNDBzFRKjSxsbaFksTSsmM89z0Kq6dPApbbPwhUh7EtLkmKvTXRKU1WCeXYL1xBdbFI9aLCLxjcGwDjkRjI3otFYbdf+L5hOeXw2TAcXhoFr2W5aCv3rPP8maKHOrt91NZ2EJTwLEuwUZFDmWsiUaS+cbamdSHZ4JMTD1+9hiSIXmU1hG5A7A/4f2TBAAA"
|
package/docs/assets/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
window.searchData = "data:application/octet-stream;base64,
|
|
1
|
+
window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACqVZTY+jOBD9L+4rSsflfN9aozn0bbWHvaBohRIng4ZABkjvaqP+7ysDwVV0FYHhhLqpV69c79nGzl3l2T+F2oV39TNOj2q3WgQqjS5W7VScxmUcJfF/9u0aq0Dd8kTt1OmWHso4S4tX8n72o7wkKlCHJCoKW6idUp8BkzS3v262KJl0zZveRD7PIUsSWyHbVJfseEts8epfDS3qbLmCUJ6z5eoK1DXKbVrScrhqr3l2vB3KL6U2/59W5yPJ0yIfVUi535KkP/1bkoxlID3ITlwHstPk8WenQaPPTmxl0fX6LUtP8fmWR6yjugHT6v2S7WnpXwr0bLBctXTfWhP+aYtrlha2ZY/T0uan6GCL169RvcPRc0BLwnFExpcqmh8RU6pAWT1GkDbxU2nLuExG8T4AU4mT7Jy9X6LzKHIM+o0CsIn+qKdwn4M6IVPtw6Xr8063wpHGYel6XTOQ8GiLQx5fyQryjJdiJtH/sLlsHJYcI8ZSdyyTnZ4YxgcMt4vfVN8l43TSvnQg4qhQvRJ5bqPSHt/KocwofgKtOEW6fP0T5DlRs1UP7iyOn0BbZj/tcDl99ATKW2HzwYxt8ATCjyi52WIgYRs8jhDPv7fO50HfVJRipy7ivXn7zCoWP3JZ7y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