repzo 1.0.141 → 1.0.143
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/docs/README.md +16 -315
- package/docs/api/activity-ai-sales-order-examples.md +63 -112
- package/docs/api/activity-ai-sales-order.md +15 -215
- package/docs/api/activity-feedback-examples.md +82 -136
- package/docs/api/activity-feedback-v2-examples.md +86 -138
- package/docs/api/activity-feedback-v2.md +19 -263
- package/docs/api/activity-feedback.md +19 -263
- package/docs/api/activity-storecheck-examples.md +62 -101
- package/docs/api/activity-storecheck.md +13 -186
- package/docs/api/adjust-account-examples.md +50 -78
- package/docs/api/adjust-account.md +12 -117
- package/docs/api/adjust-inventory-examples.md +50 -78
- package/docs/api/adjust-inventory.md +16 -121
- package/docs/api/approval-request-examples.md +58 -97
- package/docs/api/approval-request.md +26 -189
- package/docs/api/approvals-examples.md +58 -97
- package/docs/api/approvals.md +26 -189
- package/docs/api/asset-examples.md +53 -95
- package/docs/api/asset-part-examples.md +62 -101
- package/docs/api/asset-part-receival-examples.md +62 -101
- package/docs/api/asset-part-receival.md +13 -186
- package/docs/api/asset-part-transfer-examples.md +63 -112
- package/docs/api/asset-part-transfer.md +15 -215
- package/docs/api/asset-part-type-examples.md +62 -101
- package/docs/api/asset-part-type.md +13 -186
- package/docs/api/asset-part-unit-examples.md +62 -101
- package/docs/api/asset-part-unit.md +13 -186
- package/docs/api/asset-part.md +13 -186
- package/docs/api/asset-type-examples.md +58 -97
- package/docs/api/asset-type.md +26 -189
- package/docs/api/asset-unit-examples.md +80 -147
- package/docs/api/asset-unit.md +19 -306
- package/docs/api/asset.md +26 -189
- package/docs/api/banks-examples.md +53 -95
- package/docs/api/banks.md +26 -189
- package/docs/api/bankslists-examples.md +58 -97
- package/docs/api/bankslists.md +26 -189
- package/docs/api/brand-examples.md +58 -97
- package/docs/api/brand.md +18 -181
- package/docs/api/category-examples.md +58 -97
- package/docs/api/category.md +18 -181
- package/docs/api/checks-examples.md +45 -76
- package/docs/api/checks.md +12 -117
- package/docs/api/client-channel-examples.md +62 -101
- package/docs/api/client-channel.md +20 -207
- package/docs/api/client-contact-examples.md +62 -101
- package/docs/api/client-contact.md +25 -233
- package/docs/api/client-examples.md +53 -95
- package/docs/api/client-location-examples.md +71 -126
- package/docs/api/client-location.md +19 -275
- package/docs/api/client.md +18 -181
- package/docs/api/contract-examples.md +58 -97
- package/docs/api/contract-installment-examples.md +84 -148
- package/docs/api/contract-installment.md +21 -303
- package/docs/api/contract.md +26 -189
- package/docs/api/custom-list-examples.md +58 -97
- package/docs/api/custom-list-item-examples.md +58 -97
- package/docs/api/custom-list-item.md +26 -189
- package/docs/api/custom-list.md +26 -189
- package/docs/api/custom-status-examples.md +58 -97
- package/docs/api/custom-status.md +26 -189
- package/docs/api/day-examples.md +45 -76
- package/docs/api/day.md +12 -117
- package/docs/api/feedback-options-examples.md +90 -153
- package/docs/api/feedback-options.md +23 -307
- package/docs/api/fullinvoices-examples.md +51 -83
- package/docs/api/fullinvoices.md +22 -162
- package/docs/api/index.md +99 -705
- package/docs/api/integration-action-log-examples.md +62 -101
- package/docs/api/integration-action-log.md +13 -186
- package/docs/api/integration-app-examples.md +51 -83
- package/docs/api/integration-app.md +16 -156
- package/docs/api/integration-command-log-examples.md +62 -101
- package/docs/api/integration-command-log.md +13 -186
- package/docs/api/inventory-adjustment-reason-examples.md +58 -97
- package/docs/api/inventory-adjustment-reason.md +26 -189
- package/docs/api/inventory-examples.md +35 -45
- package/docs/api/inventory.md +8 -53
- package/docs/api/mail-unsubscribe-examples.md +69 -124
- package/docs/api/mail-unsubscribe.md +13 -251
- package/docs/api/measureunit-examples.md +58 -97
- package/docs/api/measureunit-family-examples.md +58 -97
- package/docs/api/measureunit-family.md +18 -188
- package/docs/api/measureunit.md +20 -190
- package/docs/api/media-examples.md +53 -95
- package/docs/api/media-storage-examples.md +58 -97
- package/docs/api/media-storage.md +18 -181
- package/docs/api/media.md +18 -181
- package/docs/api/msl-examples.md +53 -95
- package/docs/api/msl-products-examples.md +58 -97
- package/docs/api/msl-products.md +26 -189
- package/docs/api/msl.md +26 -189
- package/docs/api/ocr-invoice-job-examples.md +74 -132
- package/docs/api/ocr-invoice-job-group-examples.md +73 -121
- package/docs/api/ocr-invoice-job-group.md +15 -215
- package/docs/api/ocr-invoice-job-page-examples.md +63 -112
- package/docs/api/ocr-invoice-job-page.md +15 -215
- package/docs/api/ocr-invoice-job-template-examples.md +62 -101
- package/docs/api/ocr-invoice-job-template.md +13 -186
- package/docs/api/ocr-invoice-job.md +19 -253
- package/docs/api/patch-action-examples.md +63 -112
- package/docs/api/patch-action.md +15 -215
- package/docs/api/payment-terms-examples.md +58 -97
- package/docs/api/payment-terms.md +28 -198
- package/docs/api/payments-examples.md +51 -83
- package/docs/api/payments.md +22 -162
- package/docs/api/pricelist-examples.md +58 -97
- package/docs/api/pricelist-item-examples.md +58 -97
- package/docs/api/pricelist-item.md +24 -208
- package/docs/api/pricelist.md +18 -181
- package/docs/api/product-examples.md +58 -97
- package/docs/api/product-group-examples.md +58 -97
- package/docs/api/product-group.md +18 -181
- package/docs/api/product-modifiers-group-examples.md +70 -125
- package/docs/api/product-modifiers-group.md +19 -275
- package/docs/api/product.md +20 -190
- package/docs/api/proforma-examples.md +51 -83
- package/docs/api/proforma.md +22 -162
- package/docs/api/quick-convert-to-pdf-examples.md +30 -41
- package/docs/api/quick-convert-to-pdf.md +6 -56
- package/docs/api/receiving-material-examples.md +51 -83
- package/docs/api/receiving-material.md +16 -156
- package/docs/api/refund-examples.md +46 -81
- package/docs/api/refund.md +16 -156
- package/docs/api/rep-balance-summary-examples.md +36 -46
- package/docs/api/rep-balance-summary.md +6 -53
- package/docs/api/rep-examples.md +53 -95
- package/docs/api/rep.md +18 -181
- package/docs/api/return-asset-part-unit-examples.md +62 -101
- package/docs/api/return-asset-part-unit.md +13 -186
- package/docs/api/return-reason-examples.md +58 -97
- package/docs/api/return-reason.md +18 -181
- package/docs/api/route-examples.md +53 -95
- package/docs/api/route.md +18 -181
- package/docs/api/safe-invoice-serial-counter-examples.md +72 -127
- package/docs/api/safe-invoice-serial-counter.md +17 -266
- package/docs/api/settings-examples.md +47 -70
- package/docs/api/settings.md +18 -123
- package/docs/api/settlement-examples.md +50 -78
- package/docs/api/settlement.md +12 -117
- package/docs/api/speciality-examples.md +70 -125
- package/docs/api/speciality.md +17 -266
- package/docs/api/store-asset-part-unit-examples.md +62 -101
- package/docs/api/store-asset-part-unit.md +13 -186
- package/docs/api/storecheck-template-examples.md +58 -97
- package/docs/api/storecheck-template.md +18 -181
- package/docs/api/subcategory-examples.md +58 -97
- package/docs/api/subcategory.md +18 -181
- package/docs/api/supplier-examples.md +58 -97
- package/docs/api/supplier.md +26 -189
- package/docs/api/svix-integration-examples.md +62 -101
- package/docs/api/svix-integration.md +13 -186
- package/docs/api/tag-examples.md +53 -95
- package/docs/api/tag.md +18 -181
- package/docs/api/tax-examples.md +53 -95
- package/docs/api/tax.md +18 -181
- package/docs/api/team-examples.md +53 -95
- package/docs/api/team.md +18 -181
- package/docs/api/transfer-examples.md +51 -83
- package/docs/api/transfer.md +16 -156
- package/docs/api/update-integration-meta-examples.md +63 -112
- package/docs/api/update-integration-meta.md +15 -215
- package/docs/api/variant-examples.md +58 -97
- package/docs/api/variant.md +20 -183
- package/docs/api/visit-examples.md +46 -81
- package/docs/api/visit.md +22 -162
- package/docs/api/warehouse-examples.md +58 -97
- package/docs/api/warehouse.md +18 -181
- package/docs/api/workorder-category-examples.md +76 -141
- package/docs/api/workorder-category.md +19 -305
- package/docs/api/workorder-examples.md +58 -97
- package/docs/api/workorder-portal-examples.md +75 -132
- package/docs/api/workorder-portal-link-examples.md +70 -145
- package/docs/api/workorder-portal-link.md +23 -336
- package/docs/api/workorder-portal.md +19 -271
- package/docs/api/workorder-request-examples.md +58 -97
- package/docs/api/workorder-request.md +26 -189
- package/docs/api/workorder.md +26 -189
- package/docs/generated/index.html +1 -1
- package/docs/generated/repzo-api-complete.yaml +2585 -2585
- package/lib/index.d.ts +180 -0
- package/lib/index.js +90 -0
- package/lib/types/index.d.ts +13393 -14636
- package/package.json +3 -4
- package/src/types/index.ts +14 -1
|
@@ -11,60 +11,53 @@ npm install repzo
|
|
|
11
11
|
## Basic Setup
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { Service } from
|
|
14
|
+
import { Service } from "repzo";
|
|
15
15
|
|
|
16
16
|
// Initialize with your API key
|
|
17
|
-
const apiKey =
|
|
18
|
-
const baseURL =
|
|
17
|
+
const apiKey = "your-api-key";
|
|
18
|
+
const baseURL = "https://api.repzo.me/v1";
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## API Usage Examples
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
23
|
### Get all specialities
|
|
26
24
|
|
|
27
|
-
|
|
28
25
|
Retrieve a list of all specialities with optional filtering and pagination
|
|
29
26
|
|
|
30
|
-
|
|
31
27
|
```typescript
|
|
32
|
-
|
|
33
28
|
// GET /speciality
|
|
34
29
|
|
|
35
30
|
const params = {
|
|
36
|
-
|
|
37
31
|
page: 1, // Page number for pagination
|
|
38
32
|
|
|
39
33
|
per_page: 1, // Number of items per page
|
|
40
34
|
|
|
41
|
-
sort:
|
|
35
|
+
sort: "example-value", // Sort field
|
|
42
36
|
|
|
43
37
|
company_namespace: null, // Company namespace for filtering
|
|
44
38
|
|
|
45
39
|
disabled: true, // Filter by disabled status
|
|
46
40
|
|
|
47
41
|
_id: null, // Filter by ID
|
|
48
|
-
|
|
49
42
|
};
|
|
50
43
|
|
|
51
|
-
const result = await fetch(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
const result = await fetch(
|
|
45
|
+
`${baseURL}/speciality?${new URLSearchParams(params)}`,
|
|
46
|
+
{
|
|
47
|
+
method: "GET",
|
|
48
|
+
headers: {
|
|
49
|
+
Authorization: `Bearer ${apiKey}`,
|
|
50
|
+
"Content-Type": "application/json",
|
|
51
|
+
},
|
|
56
52
|
}
|
|
57
|
-
|
|
53
|
+
);
|
|
58
54
|
|
|
59
55
|
const data = await result.json();
|
|
60
56
|
console.log(data);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
57
|
```
|
|
65
58
|
|
|
66
|
-
|
|
67
59
|
**Expected Response:**
|
|
60
|
+
|
|
68
61
|
```json
|
|
69
62
|
{
|
|
70
63
|
"success": true,
|
|
@@ -74,18 +67,13 @@ console.log(data);
|
|
|
74
67
|
}
|
|
75
68
|
```
|
|
76
69
|
|
|
77
|
-
|
|
78
70
|
---
|
|
79
71
|
|
|
80
|
-
|
|
81
72
|
### Create a new speciality
|
|
82
73
|
|
|
83
|
-
|
|
84
74
|
Create a new speciality entry
|
|
85
75
|
|
|
86
|
-
|
|
87
76
|
```typescript
|
|
88
|
-
|
|
89
77
|
// POST /speciality
|
|
90
78
|
|
|
91
79
|
const requestBody = {
|
|
@@ -94,61 +82,48 @@ const requestBody = {
|
|
|
94
82
|
};
|
|
95
83
|
|
|
96
84
|
const result = await fetch(`${baseURL}/speciality`, {
|
|
97
|
-
method:
|
|
85
|
+
method: "POST",
|
|
98
86
|
headers: {
|
|
99
|
-
|
|
100
|
-
|
|
87
|
+
Authorization: `Bearer ${apiKey}`,
|
|
88
|
+
"Content-Type": "application/json",
|
|
101
89
|
},
|
|
102
|
-
body: JSON.stringify(requestBody)
|
|
90
|
+
body: JSON.stringify(requestBody),
|
|
103
91
|
});
|
|
104
92
|
|
|
105
93
|
const data = await result.json();
|
|
106
94
|
console.log(data);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
95
|
```
|
|
111
96
|
|
|
112
|
-
|
|
113
|
-
|
|
114
97
|
---
|
|
115
98
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
99
|
### Get speciality by ID
|
|
120
100
|
|
|
121
|
-
|
|
122
101
|
Retrieve a specific speciality by its ID
|
|
123
102
|
|
|
124
|
-
|
|
125
103
|
```typescript
|
|
126
|
-
|
|
127
104
|
// GET /speciality/{id}
|
|
128
105
|
|
|
129
106
|
const params = {
|
|
130
|
-
|
|
131
|
-
id: 'example-value', // Speciality ID
|
|
132
|
-
|
|
107
|
+
id: "example-value", // Speciality ID
|
|
133
108
|
};
|
|
134
109
|
|
|
135
|
-
const result = await fetch(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
110
|
+
const result = await fetch(
|
|
111
|
+
`${baseURL}/speciality/{id}?${new URLSearchParams(params)}`,
|
|
112
|
+
{
|
|
113
|
+
method: "GET",
|
|
114
|
+
headers: {
|
|
115
|
+
Authorization: `Bearer ${apiKey}`,
|
|
116
|
+
"Content-Type": "application/json",
|
|
117
|
+
},
|
|
140
118
|
}
|
|
141
|
-
|
|
119
|
+
);
|
|
142
120
|
|
|
143
121
|
const data = await result.json();
|
|
144
122
|
console.log(data);
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
123
|
```
|
|
149
124
|
|
|
150
|
-
|
|
151
125
|
**Expected Response:**
|
|
126
|
+
|
|
152
127
|
```json
|
|
153
128
|
{
|
|
154
129
|
"success": true,
|
|
@@ -158,47 +133,37 @@ console.log(data);
|
|
|
158
133
|
}
|
|
159
134
|
```
|
|
160
135
|
|
|
161
|
-
|
|
162
136
|
---
|
|
163
137
|
|
|
164
|
-
|
|
165
138
|
### Update speciality
|
|
166
139
|
|
|
167
|
-
|
|
168
140
|
Update an existing speciality
|
|
169
141
|
|
|
170
|
-
|
|
171
142
|
```typescript
|
|
172
|
-
|
|
173
143
|
// PATCH /speciality/{id}
|
|
174
144
|
|
|
175
|
-
const id =
|
|
176
|
-
const updatePath =
|
|
177
|
-
|
|
178
|
-
|
|
145
|
+
const id = "your-resource-id";
|
|
146
|
+
const updatePath = "/speciality/{id}".replace("{id}", id);
|
|
179
147
|
|
|
180
148
|
const updateData = {
|
|
181
149
|
// Add your update properties here
|
|
182
150
|
};
|
|
183
151
|
|
|
184
152
|
const result = await fetch(`${baseURL}${updatePath}`, {
|
|
185
|
-
method:
|
|
153
|
+
method: "PATCH",
|
|
186
154
|
headers: {
|
|
187
|
-
|
|
188
|
-
|
|
155
|
+
Authorization: `Bearer ${apiKey}`,
|
|
156
|
+
"Content-Type": "application/json",
|
|
189
157
|
},
|
|
190
|
-
body: JSON.stringify(updateData)
|
|
158
|
+
body: JSON.stringify(updateData),
|
|
191
159
|
});
|
|
192
160
|
|
|
193
161
|
const data = await result.json();
|
|
194
162
|
console.log(data);
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
163
|
```
|
|
199
164
|
|
|
200
|
-
|
|
201
165
|
**Expected Response:**
|
|
166
|
+
|
|
202
167
|
```json
|
|
203
168
|
{
|
|
204
169
|
"success": true,
|
|
@@ -208,39 +173,32 @@ console.log(data);
|
|
|
208
173
|
}
|
|
209
174
|
```
|
|
210
175
|
|
|
211
|
-
|
|
212
176
|
---
|
|
213
177
|
|
|
214
|
-
|
|
215
178
|
### Delete speciality
|
|
216
179
|
|
|
217
|
-
|
|
218
180
|
Delete a speciality by ID
|
|
219
181
|
|
|
220
|
-
|
|
221
182
|
```typescript
|
|
222
|
-
|
|
223
183
|
// DELETE /speciality/{id}
|
|
224
184
|
|
|
225
|
-
const id =
|
|
226
|
-
const deletePath =
|
|
185
|
+
const id = "your-resource-id";
|
|
186
|
+
const deletePath = "/speciality/{id}".replace("{id}", id);
|
|
227
187
|
|
|
228
188
|
const result = await fetch(`${baseURL}${deletePath}`, {
|
|
229
|
-
method:
|
|
189
|
+
method: "DELETE",
|
|
230
190
|
headers: {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
191
|
+
Authorization: `Bearer ${apiKey}`,
|
|
192
|
+
"Content-Type": "application/json",
|
|
193
|
+
},
|
|
234
194
|
});
|
|
235
195
|
|
|
236
196
|
const data = await result.json();
|
|
237
197
|
console.log(data);
|
|
238
|
-
|
|
239
|
-
|
|
240
198
|
```
|
|
241
199
|
|
|
242
|
-
|
|
243
200
|
**Expected Response:**
|
|
201
|
+
|
|
244
202
|
```json
|
|
245
203
|
{
|
|
246
204
|
"success": true,
|
|
@@ -250,20 +208,13 @@ console.log(data);
|
|
|
250
208
|
}
|
|
251
209
|
```
|
|
252
210
|
|
|
253
|
-
|
|
254
211
|
---
|
|
255
212
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
213
|
### Bulk delete specialities
|
|
260
214
|
|
|
261
|
-
|
|
262
215
|
Delete multiple specialities by their IDs
|
|
263
216
|
|
|
264
|
-
|
|
265
217
|
```typescript
|
|
266
|
-
|
|
267
218
|
// POST /speciality/remove
|
|
268
219
|
|
|
269
220
|
const requestBody = {
|
|
@@ -272,23 +223,20 @@ const requestBody = {
|
|
|
272
223
|
};
|
|
273
224
|
|
|
274
225
|
const result = await fetch(`${baseURL}/speciality/remove`, {
|
|
275
|
-
method:
|
|
226
|
+
method: "POST",
|
|
276
227
|
headers: {
|
|
277
|
-
|
|
278
|
-
|
|
228
|
+
Authorization: `Bearer ${apiKey}`,
|
|
229
|
+
"Content-Type": "application/json",
|
|
279
230
|
},
|
|
280
|
-
body: JSON.stringify(requestBody)
|
|
231
|
+
body: JSON.stringify(requestBody),
|
|
281
232
|
});
|
|
282
233
|
|
|
283
234
|
const data = await result.json();
|
|
284
235
|
console.log(data);
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
236
|
```
|
|
289
237
|
|
|
290
|
-
|
|
291
238
|
**Expected Response:**
|
|
239
|
+
|
|
292
240
|
```json
|
|
293
241
|
{
|
|
294
242
|
"success": true,
|
|
@@ -298,27 +246,21 @@ console.log(data);
|
|
|
298
246
|
}
|
|
299
247
|
```
|
|
300
248
|
|
|
301
|
-
|
|
302
249
|
---
|
|
303
250
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
251
|
## Using with Repzo SDK Service Types
|
|
308
252
|
|
|
309
253
|
The Repzo SDK provides TypeScript interfaces for type safety:
|
|
310
254
|
|
|
311
255
|
```typescript
|
|
312
|
-
import { Service } from
|
|
256
|
+
import { Service } from "repzo";
|
|
313
257
|
|
|
314
258
|
// Example using SDK types
|
|
315
259
|
|
|
316
|
-
|
|
317
260
|
async function example() {
|
|
318
261
|
// Use the Service.Speciality types for better type safety
|
|
319
262
|
// This provides intellisense and compile-time type checking
|
|
320
263
|
}
|
|
321
|
-
|
|
322
264
|
```
|
|
323
265
|
|
|
324
266
|
## Error Handling
|
|
@@ -326,11 +268,11 @@ async function example() {
|
|
|
326
268
|
```typescript
|
|
327
269
|
try {
|
|
328
270
|
const result = await fetch(`${baseURL}/endpoint`, {
|
|
329
|
-
method:
|
|
271
|
+
method: "GET",
|
|
330
272
|
headers: {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
}
|
|
273
|
+
Authorization: `Bearer ${apiKey}`,
|
|
274
|
+
"Content-Type": "application/json",
|
|
275
|
+
},
|
|
334
276
|
});
|
|
335
277
|
|
|
336
278
|
if (!result.ok) {
|
|
@@ -338,14 +280,14 @@ try {
|
|
|
338
280
|
}
|
|
339
281
|
|
|
340
282
|
const data = await result.json();
|
|
341
|
-
|
|
283
|
+
|
|
342
284
|
if (!data.success) {
|
|
343
|
-
throw new Error(data.error ||
|
|
285
|
+
throw new Error(data.error || "API request failed");
|
|
344
286
|
}
|
|
345
|
-
|
|
287
|
+
|
|
346
288
|
return data.data;
|
|
347
289
|
} catch (error) {
|
|
348
|
-
console.error(
|
|
290
|
+
console.error("API request failed:", error);
|
|
349
291
|
throw error;
|
|
350
292
|
}
|
|
351
293
|
```
|
|
@@ -361,18 +303,21 @@ const params = {
|
|
|
361
303
|
// other filters...
|
|
362
304
|
};
|
|
363
305
|
|
|
364
|
-
const result = await fetch(
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
306
|
+
const result = await fetch(
|
|
307
|
+
`${baseURL}/endpoint?${new URLSearchParams(params)}`,
|
|
308
|
+
{
|
|
309
|
+
method: "GET",
|
|
310
|
+
headers: {
|
|
311
|
+
Authorization: `Bearer ${apiKey}`,
|
|
312
|
+
"Content-Type": "application/json",
|
|
313
|
+
},
|
|
369
314
|
}
|
|
370
|
-
|
|
315
|
+
);
|
|
371
316
|
|
|
372
317
|
const data = await result.json();
|
|
373
318
|
|
|
374
319
|
// Access pagination info
|
|
375
|
-
console.log(
|
|
376
|
-
console.log(
|
|
377
|
-
console.log(
|
|
378
|
-
```
|
|
320
|
+
console.log("Total items:", data.paging.total);
|
|
321
|
+
console.log("Current page:", data.paging.page);
|
|
322
|
+
console.log("Total pages:", data.paging.pages);
|
|
323
|
+
```
|