repzo 1.0.141 → 1.0.142
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 +2 -3
- package/src/types/index.ts +14 -1
package/docs/api/proforma.md
CHANGED
|
@@ -6,219 +6,121 @@ OpenAPI specification for Repzo Proforma endpoints.
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
### Base URLs
|
|
11
10
|
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
- \*\*\*\*: `https://sv.api.repzo.me`
|
|
17
12
|
|
|
18
13
|
## Authentication
|
|
19
14
|
|
|
20
|
-
|
|
21
15
|
No authentication required.
|
|
22
16
|
|
|
23
|
-
|
|
24
17
|
## Endpoints
|
|
25
18
|
|
|
26
|
-
|
|
27
19
|
### `/proforma`
|
|
28
20
|
|
|
29
|
-
|
|
30
21
|
#### GET /proforma
|
|
31
22
|
|
|
32
23
|
**Summary:** Find proformas
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
25
|
##### Parameters
|
|
40
26
|
|
|
41
27
|
| Name | Location | Type | Required | Description |
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
| `params` | query | object | No | Query parameters for filtering proformas |
|
|
45
|
-
|
|
46
|
-
|
|
28
|
+
| ---- | -------- | ---- | -------- | ----------- |
|
|
47
29
|
|
|
48
30
|
|
|
31
|
+
| `params` | query | object | No | Query parameters for filtering proformas |
|
|
49
32
|
|
|
50
33
|
##### Responses
|
|
51
34
|
|
|
52
|
-
|
|
53
35
|
**200** - A list of proformas
|
|
54
36
|
|
|
55
|
-
|
|
56
|
-
|
|
57
37
|
Content-Type: `application/json`
|
|
58
38
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
39
|
---
|
|
64
40
|
|
|
65
|
-
|
|
66
41
|
#### POST /proforma
|
|
67
42
|
|
|
68
43
|
**Summary:** Create a proforma
|
|
69
44
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
45
|
##### Request Body
|
|
78
46
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
47
|
**Content Types:**
|
|
83
48
|
|
|
84
49
|
- `application/json`
|
|
85
50
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
51
|
##### Responses
|
|
90
52
|
|
|
91
|
-
|
|
92
53
|
**201** - Proforma created
|
|
93
54
|
|
|
94
|
-
|
|
95
|
-
|
|
96
55
|
Content-Type: `application/json`
|
|
97
56
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
57
|
---
|
|
103
58
|
|
|
104
|
-
|
|
105
|
-
|
|
106
59
|
### `/proforma/{id}`
|
|
107
60
|
|
|
108
|
-
|
|
109
61
|
#### GET /proforma/{id}
|
|
110
62
|
|
|
111
63
|
**Summary:** Get a proforma by ID
|
|
112
64
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
65
|
##### Parameters
|
|
119
66
|
|
|
120
67
|
| Name | Location | Type | Required | Description |
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
| `id` | path | string | Yes | No description |
|
|
124
|
-
|
|
125
|
-
|
|
68
|
+
| ---- | -------- | ---- | -------- | ----------- |
|
|
126
69
|
|
|
127
70
|
|
|
71
|
+
| `id` | path | string | Yes | No description |
|
|
128
72
|
|
|
129
73
|
##### Responses
|
|
130
74
|
|
|
131
|
-
|
|
132
75
|
**200** - Proforma details
|
|
133
76
|
|
|
134
|
-
|
|
135
|
-
|
|
136
77
|
Content-Type: `application/json`
|
|
137
78
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
79
|
---
|
|
143
80
|
|
|
144
|
-
|
|
145
81
|
#### PUT /proforma/{id}
|
|
146
82
|
|
|
147
83
|
**Summary:** Update a proforma
|
|
148
84
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
85
|
##### Parameters
|
|
155
86
|
|
|
156
87
|
| Name | Location | Type | Required | Description |
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
| `id` | path | string | Yes | No description |
|
|
160
|
-
|
|
88
|
+
| ---- | -------- | ---- | -------- | ----------- |
|
|
161
89
|
|
|
162
90
|
|
|
91
|
+
| `id` | path | string | Yes | No description |
|
|
163
92
|
|
|
164
93
|
##### Request Body
|
|
165
94
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
95
|
**Content Types:**
|
|
170
96
|
|
|
171
97
|
- `application/json`
|
|
172
98
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
99
|
##### Responses
|
|
177
100
|
|
|
178
|
-
|
|
179
101
|
**200** - Proforma updated
|
|
180
102
|
|
|
181
|
-
|
|
182
|
-
|
|
183
103
|
Content-Type: `application/json`
|
|
184
104
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
105
|
---
|
|
190
106
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
107
|
## Data Models
|
|
195
108
|
|
|
196
|
-
|
|
197
|
-
|
|
198
109
|
### ProformaFindResult
|
|
199
110
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
111
|
| Property | Type | Required | Description |
|
|
204
|
-
|
|
112
|
+
| -------- | ---- | -------- | ----------- |
|
|
113
|
+
|
|
205
114
|
|
|
206
115
|
| `data` | array | No | No description |
|
|
207
116
|
|
|
208
117
|
| `meta` | object | No | No description |
|
|
209
118
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
119
|
### ProformaCreateBody
|
|
216
120
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
121
|
| Property | Type | Required | Description |
|
|
221
|
-
|
|
122
|
+
| -------- | ---- | -------- | ----------- |
|
|
123
|
+
|
|
222
124
|
|
|
223
125
|
| `serial` | string | No | No description |
|
|
224
126
|
|
|
@@ -236,48 +138,27 @@ Content-Type: `application/json`
|
|
|
236
138
|
|
|
237
139
|
| `validUntil` | string | No | No description |
|
|
238
140
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
141
|
### ProformaCreateResult
|
|
245
142
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
143
|
| Property | Type | Required | Description |
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
| `data` | object | No | No description |
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
144
|
+
| -------- | ---- | -------- | ----------- |
|
|
256
145
|
|
|
257
146
|
|
|
147
|
+
| `data` | object | No | No description |
|
|
258
148
|
|
|
259
149
|
### ProformaGetResult
|
|
260
150
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
151
|
| Property | Type | Required | Description |
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
| `data` | object | No | No description |
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
152
|
+
| -------- | ---- | -------- | ----------- |
|
|
271
153
|
|
|
272
154
|
|
|
155
|
+
| `data` | object | No | No description |
|
|
273
156
|
|
|
274
157
|
### ProformaUpdateBody
|
|
275
158
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
159
|
| Property | Type | Required | Description |
|
|
280
|
-
|
|
160
|
+
| -------- | ---- | -------- | ----------- |
|
|
161
|
+
|
|
281
162
|
|
|
282
163
|
| `serial` | string | No | No description |
|
|
283
164
|
|
|
@@ -295,33 +176,19 @@ Content-Type: `application/json`
|
|
|
295
176
|
|
|
296
177
|
| `validUntil` | string | No | No description |
|
|
297
178
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
179
|
### ProformaUpdateResult
|
|
304
180
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
181
|
| Property | Type | Required | Description |
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
| `data` | object | No | No description |
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
182
|
+
| -------- | ---- | -------- | ----------- |
|
|
315
183
|
|
|
316
184
|
|
|
185
|
+
| `data` | object | No | No description |
|
|
317
186
|
|
|
318
187
|
### Proforma
|
|
319
188
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
189
|
| Property | Type | Required | Description |
|
|
324
|
-
|
|
190
|
+
| -------- | ---- | -------- | ----------- |
|
|
191
|
+
|
|
325
192
|
|
|
326
193
|
| `_id` | string | No | No description |
|
|
327
194
|
|
|
@@ -345,13 +212,6 @@ Content-Type: `application/json`
|
|
|
345
212
|
|
|
346
213
|
| `updatedAt` | string | No | No description |
|
|
347
214
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
215
|
## TypeScript Usage
|
|
356
216
|
|
|
357
|
-
See [proforma-examples.md](./proforma-examples.md) for detailed TypeScript usage examples.
|
|
217
|
+
See [proforma-examples.md](./proforma-examples.md) for detailed TypeScript usage examples.
|
|
@@ -11,23 +11,18 @@ 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
|
### Convert document to PDF
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
25
|
```typescript
|
|
30
|
-
|
|
31
26
|
// POST /quick-convert-to-pdf
|
|
32
27
|
|
|
33
28
|
const requestBody = {
|
|
@@ -36,23 +31,20 @@ const requestBody = {
|
|
|
36
31
|
};
|
|
37
32
|
|
|
38
33
|
const result = await fetch(`${baseURL}/quick-convert-to-pdf`, {
|
|
39
|
-
method:
|
|
34
|
+
method: "POST",
|
|
40
35
|
headers: {
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
Authorization: `Bearer ${apiKey}`,
|
|
37
|
+
"Content-Type": "application/json",
|
|
43
38
|
},
|
|
44
|
-
body: JSON.stringify(requestBody)
|
|
39
|
+
body: JSON.stringify(requestBody),
|
|
45
40
|
});
|
|
46
41
|
|
|
47
42
|
const data = await result.json();
|
|
48
43
|
console.log(data);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
44
|
```
|
|
53
45
|
|
|
54
|
-
|
|
55
46
|
**Expected Response:**
|
|
47
|
+
|
|
56
48
|
```json
|
|
57
49
|
{
|
|
58
50
|
"success": true,
|
|
@@ -62,27 +54,21 @@ console.log(data);
|
|
|
62
54
|
}
|
|
63
55
|
```
|
|
64
56
|
|
|
65
|
-
|
|
66
57
|
---
|
|
67
58
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
59
|
## Using with Repzo SDK Service Types
|
|
72
60
|
|
|
73
61
|
The Repzo SDK provides TypeScript interfaces for type safety:
|
|
74
62
|
|
|
75
63
|
```typescript
|
|
76
|
-
import { Service } from
|
|
64
|
+
import { Service } from "repzo";
|
|
77
65
|
|
|
78
66
|
// Example using SDK types
|
|
79
67
|
|
|
80
|
-
|
|
81
68
|
async function example() {
|
|
82
69
|
// Use the Service.Quickconverttopdf types for better type safety
|
|
83
70
|
// This provides intellisense and compile-time type checking
|
|
84
71
|
}
|
|
85
|
-
|
|
86
72
|
```
|
|
87
73
|
|
|
88
74
|
## Error Handling
|
|
@@ -90,11 +76,11 @@ async function example() {
|
|
|
90
76
|
```typescript
|
|
91
77
|
try {
|
|
92
78
|
const result = await fetch(`${baseURL}/endpoint`, {
|
|
93
|
-
method:
|
|
79
|
+
method: "GET",
|
|
94
80
|
headers: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
81
|
+
Authorization: `Bearer ${apiKey}`,
|
|
82
|
+
"Content-Type": "application/json",
|
|
83
|
+
},
|
|
98
84
|
});
|
|
99
85
|
|
|
100
86
|
if (!result.ok) {
|
|
@@ -102,14 +88,14 @@ try {
|
|
|
102
88
|
}
|
|
103
89
|
|
|
104
90
|
const data = await result.json();
|
|
105
|
-
|
|
91
|
+
|
|
106
92
|
if (!data.success) {
|
|
107
|
-
throw new Error(data.error ||
|
|
93
|
+
throw new Error(data.error || "API request failed");
|
|
108
94
|
}
|
|
109
|
-
|
|
95
|
+
|
|
110
96
|
return data.data;
|
|
111
97
|
} catch (error) {
|
|
112
|
-
console.error(
|
|
98
|
+
console.error("API request failed:", error);
|
|
113
99
|
throw error;
|
|
114
100
|
}
|
|
115
101
|
```
|
|
@@ -125,18 +111,21 @@ const params = {
|
|
|
125
111
|
// other filters...
|
|
126
112
|
};
|
|
127
113
|
|
|
128
|
-
const result = await fetch(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
114
|
+
const result = await fetch(
|
|
115
|
+
`${baseURL}/endpoint?${new URLSearchParams(params)}`,
|
|
116
|
+
{
|
|
117
|
+
method: "GET",
|
|
118
|
+
headers: {
|
|
119
|
+
Authorization: `Bearer ${apiKey}`,
|
|
120
|
+
"Content-Type": "application/json",
|
|
121
|
+
},
|
|
133
122
|
}
|
|
134
|
-
|
|
123
|
+
);
|
|
135
124
|
|
|
136
125
|
const data = await result.json();
|
|
137
126
|
|
|
138
127
|
// Access pagination info
|
|
139
|
-
console.log(
|
|
140
|
-
console.log(
|
|
141
|
-
console.log(
|
|
142
|
-
```
|
|
128
|
+
console.log("Total items:", data.paging.total);
|
|
129
|
+
console.log("Current page:", data.paging.page);
|
|
130
|
+
console.log("Total pages:", data.paging.pages);
|
|
131
|
+
```
|
|
@@ -6,81 +6,45 @@ OpenAPI specification for Repzo Quick Convert to PDF endpoints.
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
### Base URLs
|
|
11
10
|
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
- \*\*\*\*: `https://sv.api.repzo.me`
|
|
17
12
|
|
|
18
13
|
## Authentication
|
|
19
14
|
|
|
20
|
-
|
|
21
15
|
No authentication required.
|
|
22
16
|
|
|
23
|
-
|
|
24
17
|
## Endpoints
|
|
25
18
|
|
|
26
|
-
|
|
27
19
|
### `/quick-convert-to-pdf`
|
|
28
20
|
|
|
29
|
-
|
|
30
21
|
#### POST /quick-convert-to-pdf
|
|
31
22
|
|
|
32
23
|
**Summary:** Convert document to PDF
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
25
|
##### Request Body
|
|
42
26
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
27
|
**Content Types:**
|
|
47
28
|
|
|
48
29
|
- `application/json`
|
|
49
30
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
31
|
##### Responses
|
|
54
32
|
|
|
55
|
-
|
|
56
33
|
**200** - PDF conversion successful
|
|
57
34
|
|
|
58
|
-
|
|
59
|
-
|
|
60
35
|
Content-Type: `application/json`
|
|
61
36
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
37
|
---
|
|
67
38
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
39
|
## Data Models
|
|
72
40
|
|
|
73
|
-
|
|
74
|
-
|
|
75
41
|
### QuickConvertToPdfBody
|
|
76
42
|
|
|
77
|
-
|
|
78
43
|
Body for converting document to PDF
|
|
79
44
|
|
|
80
|
-
|
|
81
|
-
|
|
82
45
|
| Property | Type | Required | Description |
|
|
83
|
-
|
|
46
|
+
| -------- | ---- | -------- | ----------- |
|
|
47
|
+
|
|
84
48
|
|
|
85
49
|
| `documentType` | string | Yes | Type of document to convert |
|
|
86
50
|
|
|
@@ -92,20 +56,13 @@ Body for converting document to PDF
|
|
|
92
56
|
|
|
93
57
|
| `language` | string | No | Language for the PDF content |
|
|
94
58
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
59
|
### QuickConvertToPdfResult
|
|
101
60
|
|
|
102
|
-
|
|
103
61
|
Result of PDF conversion
|
|
104
62
|
|
|
105
|
-
|
|
106
|
-
|
|
107
63
|
| Property | Type | Required | Description |
|
|
108
|
-
|
|
64
|
+
| -------- | ---- | -------- | ----------- |
|
|
65
|
+
|
|
109
66
|
|
|
110
67
|
| `success` | boolean | No | Whether conversion was successful |
|
|
111
68
|
|
|
@@ -121,13 +78,6 @@ Result of PDF conversion
|
|
|
121
78
|
|
|
122
79
|
| `expiresAt` | string | No | When the PDF download link expires |
|
|
123
80
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
81
|
## TypeScript Usage
|
|
132
82
|
|
|
133
|
-
See [quick-convert-to-pdf-examples.md](./quick-convert-to-pdf-examples.md) for detailed TypeScript usage examples.
|
|
83
|
+
See [quick-convert-to-pdf-examples.md](./quick-convert-to-pdf-examples.md) for detailed TypeScript usage examples.
|