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
package/docs/api/supplier.md
CHANGED
|
@@ -6,255 +6,141 @@ OpenAPI specification for Repzo Supplier 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
|
### `/supplier`
|
|
28
20
|
|
|
29
|
-
|
|
30
21
|
#### GET /supplier
|
|
31
22
|
|
|
32
23
|
**Summary:** Find suppliers
|
|
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 suppliers |
|
|
45
|
-
|
|
46
|
-
|
|
28
|
+
| ---- | -------- | ---- | -------- | ----------- |
|
|
47
29
|
|
|
48
30
|
|
|
31
|
+
| `params` | query | object | No | Query parameters for filtering suppliers |
|
|
49
32
|
|
|
50
33
|
##### Responses
|
|
51
34
|
|
|
52
|
-
|
|
53
35
|
**200** - A list of suppliers
|
|
54
36
|
|
|
55
|
-
|
|
56
|
-
|
|
57
37
|
Content-Type: `application/json`
|
|
58
38
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
39
|
---
|
|
64
40
|
|
|
65
|
-
|
|
66
41
|
#### POST /supplier
|
|
67
42
|
|
|
68
43
|
**Summary:** Create a supplier
|
|
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** - Supplier 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
|
### `/supplier/{id}`
|
|
107
60
|
|
|
108
|
-
|
|
109
61
|
#### GET /supplier/{id}
|
|
110
62
|
|
|
111
63
|
**Summary:** Get a supplier 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** - Supplier 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 /supplier/{id}
|
|
146
82
|
|
|
147
83
|
**Summary:** Update a supplier
|
|
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** - Supplier updated
|
|
180
102
|
|
|
181
|
-
|
|
182
|
-
|
|
183
103
|
Content-Type: `application/json`
|
|
184
104
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
105
|
---
|
|
190
106
|
|
|
191
|
-
|
|
192
107
|
#### DELETE /supplier/{id}
|
|
193
108
|
|
|
194
109
|
**Summary:** Remove a supplier
|
|
195
110
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
111
|
##### Parameters
|
|
202
112
|
|
|
203
113
|
| Name | Location | Type | Required | Description |
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
| `id` | path | string | Yes | No description |
|
|
207
|
-
|
|
208
|
-
|
|
114
|
+
| ---- | -------- | ---- | -------- | ----------- |
|
|
209
115
|
|
|
210
116
|
|
|
117
|
+
| `id` | path | string | Yes | No description |
|
|
211
118
|
|
|
212
119
|
##### Responses
|
|
213
120
|
|
|
214
|
-
|
|
215
121
|
**200** - Supplier removed
|
|
216
122
|
|
|
217
|
-
|
|
218
|
-
|
|
219
123
|
Content-Type: `application/json`
|
|
220
124
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
125
|
---
|
|
226
126
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
127
|
## Data Models
|
|
231
128
|
|
|
232
|
-
|
|
233
|
-
|
|
234
129
|
### SupplierFindResult
|
|
235
130
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
131
|
| Property | Type | Required | Description |
|
|
240
|
-
|
|
132
|
+
| -------- | ---- | -------- | ----------- |
|
|
133
|
+
|
|
241
134
|
|
|
242
135
|
| `data` | array | No | No description |
|
|
243
136
|
|
|
244
137
|
| `meta` | object | No | No description |
|
|
245
138
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
139
|
### SupplierCreateBody
|
|
252
140
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
141
|
| Property | Type | Required | Description |
|
|
257
|
-
|
|
142
|
+
| -------- | ---- | -------- | ----------- |
|
|
143
|
+
|
|
258
144
|
|
|
259
145
|
| `name` | string | No | No description |
|
|
260
146
|
|
|
@@ -268,48 +154,27 @@ Content-Type: `application/json`
|
|
|
268
154
|
|
|
269
155
|
| `disabled` | boolean | No | No description |
|
|
270
156
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
157
|
### SupplierCreateResult
|
|
277
158
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
159
|
| Property | Type | Required | Description |
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
| `data` | object | No | No description |
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
160
|
+
| -------- | ---- | -------- | ----------- |
|
|
288
161
|
|
|
289
162
|
|
|
163
|
+
| `data` | object | No | No description |
|
|
290
164
|
|
|
291
165
|
### SupplierGetResult
|
|
292
166
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
167
|
| Property | Type | Required | Description |
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
| `data` | object | No | No description |
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
168
|
+
| -------- | ---- | -------- | ----------- |
|
|
303
169
|
|
|
304
170
|
|
|
171
|
+
| `data` | object | No | No description |
|
|
305
172
|
|
|
306
173
|
### SupplierUpdateBody
|
|
307
174
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
175
|
| Property | Type | Required | Description |
|
|
312
|
-
|
|
176
|
+
| -------- | ---- | -------- | ----------- |
|
|
177
|
+
|
|
313
178
|
|
|
314
179
|
| `name` | string | No | No description |
|
|
315
180
|
|
|
@@ -323,48 +188,27 @@ Content-Type: `application/json`
|
|
|
323
188
|
|
|
324
189
|
| `disabled` | boolean | No | No description |
|
|
325
190
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
191
|
### SupplierUpdateResult
|
|
332
192
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
193
|
| Property | Type | Required | Description |
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
| `data` | object | No | No description |
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
194
|
+
| -------- | ---- | -------- | ----------- |
|
|
343
195
|
|
|
344
196
|
|
|
197
|
+
| `data` | object | No | No description |
|
|
345
198
|
|
|
346
199
|
### SupplierRemoveResult
|
|
347
200
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
201
|
| Property | Type | Required | Description |
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
| `success` | boolean | No | No description |
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
202
|
+
| -------- | ---- | -------- | ----------- |
|
|
358
203
|
|
|
359
204
|
|
|
205
|
+
| `success` | boolean | No | No description |
|
|
360
206
|
|
|
361
207
|
### Supplier
|
|
362
208
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
209
|
| Property | Type | Required | Description |
|
|
367
|
-
|
|
210
|
+
| -------- | ---- | -------- | ----------- |
|
|
211
|
+
|
|
368
212
|
|
|
369
213
|
| `_id` | string | No | No description |
|
|
370
214
|
|
|
@@ -384,13 +228,6 @@ Content-Type: `application/json`
|
|
|
384
228
|
|
|
385
229
|
| `updatedAt` | string | No | No description |
|
|
386
230
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
231
|
## TypeScript Usage
|
|
395
232
|
|
|
396
|
-
See [supplier-examples.md](./supplier-examples.md) for detailed TypeScript usage examples.
|
|
233
|
+
See [supplier-examples.md](./supplier-examples.md) for detailed TypeScript usage examples.
|
|
@@ -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 Svix integration records
|
|
26
24
|
|
|
27
|
-
|
|
28
25
|
Retrieve a list of all Svix integration records with optional filtering and pagination
|
|
29
26
|
|
|
30
|
-
|
|
31
27
|
```typescript
|
|
32
|
-
|
|
33
28
|
// GET /svix-integration
|
|
34
29
|
|
|
35
30
|
const params = {
|
|
36
|
-
|
|
37
31
|
limit: 1, // Maximum number of records to return
|
|
38
32
|
|
|
39
33
|
offset: 1, // Number of records to skip for pagination
|
|
40
34
|
|
|
41
|
-
sort:
|
|
42
|
-
|
|
43
|
-
order: 'example-value', // Sort order (asc or desc)
|
|
35
|
+
sort: "example-value", // Field to sort by
|
|
44
36
|
|
|
45
|
-
|
|
37
|
+
order: "example-value", // Sort order (asc or desc)
|
|
46
38
|
|
|
47
|
-
|
|
39
|
+
filter: "example-value", // Filter conditions in JSON format
|
|
48
40
|
|
|
41
|
+
search: "example-value", // Search term for text fields
|
|
49
42
|
};
|
|
50
43
|
|
|
51
|
-
const result = await fetch(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
const result = await fetch(
|
|
45
|
+
`${baseURL}/svix-integration?${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 Svix integration
|
|
82
73
|
|
|
83
|
-
|
|
84
74
|
Create a new Svix integration with the provided data
|
|
85
75
|
|
|
86
|
-
|
|
87
76
|
```typescript
|
|
88
|
-
|
|
89
77
|
// POST /svix-integration
|
|
90
78
|
|
|
91
79
|
const requestBody = {
|
|
@@ -94,61 +82,48 @@ const requestBody = {
|
|
|
94
82
|
};
|
|
95
83
|
|
|
96
84
|
const result = await fetch(`${baseURL}/svix-integration`, {
|
|
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 Svix integration by ID
|
|
120
100
|
|
|
121
|
-
|
|
122
101
|
Retrieve a specific Svix integration by its ID
|
|
123
102
|
|
|
124
|
-
|
|
125
103
|
```typescript
|
|
126
|
-
|
|
127
104
|
// GET /svix-integration/{id}
|
|
128
105
|
|
|
129
106
|
const params = {
|
|
130
|
-
|
|
131
|
-
id: 'example-value', // Svix integration ID
|
|
132
|
-
|
|
107
|
+
id: "example-value", // Svix integration ID
|
|
133
108
|
};
|
|
134
109
|
|
|
135
|
-
const result = await fetch(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
110
|
+
const result = await fetch(
|
|
111
|
+
`${baseURL}/svix-integration/{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,22 +133,18 @@ console.log(data);
|
|
|
158
133
|
}
|
|
159
134
|
```
|
|
160
135
|
|
|
161
|
-
|
|
162
136
|
---
|
|
163
137
|
|
|
164
|
-
|
|
165
138
|
### Update Svix integration
|
|
166
139
|
|
|
167
|
-
|
|
168
140
|
Update an existing Svix integration with new data
|
|
169
141
|
|
|
170
|
-
|
|
171
142
|
```typescript
|
|
172
143
|
|
|
173
144
|
```
|
|
174
145
|
|
|
175
|
-
|
|
176
146
|
**Expected Response:**
|
|
147
|
+
|
|
177
148
|
```json
|
|
178
149
|
{
|
|
179
150
|
"success": true,
|
|
@@ -183,39 +154,32 @@ Update an existing Svix integration with new data
|
|
|
183
154
|
}
|
|
184
155
|
```
|
|
185
156
|
|
|
186
|
-
|
|
187
157
|
---
|
|
188
158
|
|
|
189
|
-
|
|
190
159
|
### Delete Svix integration
|
|
191
160
|
|
|
192
|
-
|
|
193
161
|
Delete an existing Svix integration
|
|
194
162
|
|
|
195
|
-
|
|
196
163
|
```typescript
|
|
197
|
-
|
|
198
164
|
// DELETE /svix-integration/{id}
|
|
199
165
|
|
|
200
|
-
const id =
|
|
201
|
-
const deletePath =
|
|
166
|
+
const id = "your-resource-id";
|
|
167
|
+
const deletePath = "/svix-integration/{id}".replace("{id}", id);
|
|
202
168
|
|
|
203
169
|
const result = await fetch(`${baseURL}${deletePath}`, {
|
|
204
|
-
method:
|
|
170
|
+
method: "DELETE",
|
|
205
171
|
headers: {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
172
|
+
Authorization: `Bearer ${apiKey}`,
|
|
173
|
+
"Content-Type": "application/json",
|
|
174
|
+
},
|
|
209
175
|
});
|
|
210
176
|
|
|
211
177
|
const data = await result.json();
|
|
212
178
|
console.log(data);
|
|
213
|
-
|
|
214
|
-
|
|
215
179
|
```
|
|
216
180
|
|
|
217
|
-
|
|
218
181
|
**Expected Response:**
|
|
182
|
+
|
|
219
183
|
```json
|
|
220
184
|
{
|
|
221
185
|
"success": true,
|
|
@@ -225,27 +189,21 @@ console.log(data);
|
|
|
225
189
|
}
|
|
226
190
|
```
|
|
227
191
|
|
|
228
|
-
|
|
229
192
|
---
|
|
230
193
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
194
|
## Using with Repzo SDK Service Types
|
|
235
195
|
|
|
236
196
|
The Repzo SDK provides TypeScript interfaces for type safety:
|
|
237
197
|
|
|
238
198
|
```typescript
|
|
239
|
-
import { Service } from
|
|
199
|
+
import { Service } from "repzo";
|
|
240
200
|
|
|
241
201
|
// Example using SDK types
|
|
242
202
|
|
|
243
|
-
|
|
244
203
|
async function example() {
|
|
245
204
|
// Use the Service.Svixintegration types for better type safety
|
|
246
205
|
// This provides intellisense and compile-time type checking
|
|
247
206
|
}
|
|
248
|
-
|
|
249
207
|
```
|
|
250
208
|
|
|
251
209
|
## Error Handling
|
|
@@ -253,11 +211,11 @@ async function example() {
|
|
|
253
211
|
```typescript
|
|
254
212
|
try {
|
|
255
213
|
const result = await fetch(`${baseURL}/endpoint`, {
|
|
256
|
-
method:
|
|
214
|
+
method: "GET",
|
|
257
215
|
headers: {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
216
|
+
Authorization: `Bearer ${apiKey}`,
|
|
217
|
+
"Content-Type": "application/json",
|
|
218
|
+
},
|
|
261
219
|
});
|
|
262
220
|
|
|
263
221
|
if (!result.ok) {
|
|
@@ -265,14 +223,14 @@ try {
|
|
|
265
223
|
}
|
|
266
224
|
|
|
267
225
|
const data = await result.json();
|
|
268
|
-
|
|
226
|
+
|
|
269
227
|
if (!data.success) {
|
|
270
|
-
throw new Error(data.error ||
|
|
228
|
+
throw new Error(data.error || "API request failed");
|
|
271
229
|
}
|
|
272
|
-
|
|
230
|
+
|
|
273
231
|
return data.data;
|
|
274
232
|
} catch (error) {
|
|
275
|
-
console.error(
|
|
233
|
+
console.error("API request failed:", error);
|
|
276
234
|
throw error;
|
|
277
235
|
}
|
|
278
236
|
```
|
|
@@ -288,18 +246,21 @@ const params = {
|
|
|
288
246
|
// other filters...
|
|
289
247
|
};
|
|
290
248
|
|
|
291
|
-
const result = await fetch(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
249
|
+
const result = await fetch(
|
|
250
|
+
`${baseURL}/endpoint?${new URLSearchParams(params)}`,
|
|
251
|
+
{
|
|
252
|
+
method: "GET",
|
|
253
|
+
headers: {
|
|
254
|
+
Authorization: `Bearer ${apiKey}`,
|
|
255
|
+
"Content-Type": "application/json",
|
|
256
|
+
},
|
|
296
257
|
}
|
|
297
|
-
|
|
258
|
+
);
|
|
298
259
|
|
|
299
260
|
const data = await result.json();
|
|
300
261
|
|
|
301
262
|
// Access pagination info
|
|
302
|
-
console.log(
|
|
303
|
-
console.log(
|
|
304
|
-
console.log(
|
|
305
|
-
```
|
|
263
|
+
console.log("Total items:", data.paging.total);
|
|
264
|
+
console.log("Current page:", data.paging.page);
|
|
265
|
+
console.log("Total pages:", data.paging.pages);
|
|
266
|
+
```
|