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
|
@@ -6,56 +6,39 @@ API for managing integration action logs
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
### Base URLs
|
|
11
10
|
|
|
12
11
|
- **Production server**: `https://sv.api.repzo.me`
|
|
13
12
|
|
|
14
13
|
- **Staging server**: `https://staging.sv.api.repzo.me`
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
15
|
### API Categories
|
|
20
16
|
|
|
21
17
|
- **Integration Action Log**: Operations related to integration action log management
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
25
19
|
## Authentication
|
|
26
20
|
|
|
27
|
-
|
|
28
21
|
This API uses the following authentication methods:
|
|
29
22
|
|
|
30
|
-
|
|
31
23
|
- **ApiKeyAuth**
|
|
32
24
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
25
|
## Endpoints
|
|
37
26
|
|
|
38
|
-
|
|
39
27
|
### `/integration-action-log`
|
|
40
28
|
|
|
41
|
-
|
|
42
29
|
#### GET /integration-action-log
|
|
43
30
|
|
|
44
31
|
**Summary:** Get all integration action log records
|
|
45
32
|
|
|
46
|
-
|
|
47
33
|
**Description:** Retrieve a list of all integration action log records with optional filtering and pagination
|
|
48
34
|
|
|
49
|
-
|
|
50
|
-
|
|
51
35
|
**Tags:** Integration Action Log
|
|
52
36
|
|
|
53
|
-
|
|
54
|
-
|
|
55
37
|
##### Parameters
|
|
56
38
|
|
|
57
39
|
| Name | Location | Type | Required | Description |
|
|
58
|
-
|
|
40
|
+
| ---- | -------- | ---- | -------- | ----------- |
|
|
41
|
+
|
|
59
42
|
|
|
60
43
|
| `limit` | query | integer | No | Maximum number of records to return |
|
|
61
44
|
|
|
@@ -69,297 +52,155 @@ This API uses the following authentication methods:
|
|
|
69
52
|
|
|
70
53
|
| `search` | query | string | No | Search term for text fields |
|
|
71
54
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
55
|
##### Responses
|
|
77
56
|
|
|
78
|
-
|
|
79
57
|
**200** - List of integration action log records retrieved successfully
|
|
80
58
|
|
|
81
|
-
|
|
82
|
-
|
|
83
59
|
Content-Type: `application/json`
|
|
84
60
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
61
|
**400** - Bad request
|
|
89
62
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
63
|
**401** - Unauthorized
|
|
94
64
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
65
|
**500** - Internal server error
|
|
99
66
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
67
|
---
|
|
105
68
|
|
|
106
|
-
|
|
107
69
|
#### POST /integration-action-log
|
|
108
70
|
|
|
109
71
|
**Summary:** Create a new integration action log record
|
|
110
72
|
|
|
111
|
-
|
|
112
73
|
**Description:** Create a new integration action log record with the provided data
|
|
113
74
|
|
|
114
|
-
|
|
115
|
-
|
|
116
75
|
**Tags:** Integration Action Log
|
|
117
76
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
77
|
##### Request Body
|
|
123
78
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
79
|
**Content Types:**
|
|
128
80
|
|
|
129
81
|
- `application/json`
|
|
130
82
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
83
|
##### Responses
|
|
135
84
|
|
|
136
|
-
|
|
137
85
|
**201** - Integration action log record created successfully
|
|
138
86
|
|
|
139
|
-
|
|
140
|
-
|
|
141
87
|
Content-Type: `application/json`
|
|
142
88
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
89
|
**400** - Bad request
|
|
147
90
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
91
|
**401** - Unauthorized
|
|
152
92
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
93
|
**500** - Internal server error
|
|
157
94
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
95
|
---
|
|
163
96
|
|
|
164
|
-
|
|
165
|
-
|
|
166
97
|
### `/integration-action-log/{id}`
|
|
167
98
|
|
|
168
|
-
|
|
169
99
|
#### GET /integration-action-log/{id}
|
|
170
100
|
|
|
171
101
|
**Summary:** Get integration action log record by ID
|
|
172
102
|
|
|
173
|
-
|
|
174
103
|
**Description:** Retrieve a specific integration action log record by its ID
|
|
175
104
|
|
|
176
|
-
|
|
177
|
-
|
|
178
105
|
**Tags:** Integration Action Log
|
|
179
106
|
|
|
180
|
-
|
|
181
|
-
|
|
182
107
|
##### Parameters
|
|
183
108
|
|
|
184
109
|
| Name | Location | Type | Required | Description |
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
| `id` | path | string | Yes | Integration action log record ID |
|
|
188
|
-
|
|
189
|
-
|
|
110
|
+
| ---- | -------- | ---- | -------- | ----------- |
|
|
190
111
|
|
|
191
112
|
|
|
113
|
+
| `id` | path | string | Yes | Integration action log record ID |
|
|
192
114
|
|
|
193
115
|
##### Responses
|
|
194
116
|
|
|
195
|
-
|
|
196
117
|
**200** - Integration action log record retrieved successfully
|
|
197
118
|
|
|
198
|
-
|
|
199
|
-
|
|
200
119
|
Content-Type: `application/json`
|
|
201
120
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
121
|
**404** - Integration action log record not found
|
|
206
122
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
123
|
**401** - Unauthorized
|
|
211
124
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
125
|
**500** - Internal server error
|
|
216
126
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
127
|
---
|
|
222
128
|
|
|
223
|
-
|
|
224
129
|
#### PUT /integration-action-log/{id}
|
|
225
130
|
|
|
226
131
|
**Summary:** Update integration action log record
|
|
227
132
|
|
|
228
|
-
|
|
229
133
|
**Description:** Update an existing integration action log record with new data
|
|
230
134
|
|
|
231
|
-
|
|
232
|
-
|
|
233
135
|
**Tags:** Integration Action Log
|
|
234
136
|
|
|
235
|
-
|
|
236
|
-
|
|
237
137
|
##### Parameters
|
|
238
138
|
|
|
239
139
|
| Name | Location | Type | Required | Description |
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
| `id` | path | string | Yes | Integration action log record ID |
|
|
243
|
-
|
|
140
|
+
| ---- | -------- | ---- | -------- | ----------- |
|
|
244
141
|
|
|
245
142
|
|
|
143
|
+
| `id` | path | string | Yes | Integration action log record ID |
|
|
246
144
|
|
|
247
145
|
##### Request Body
|
|
248
146
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
147
|
**Content Types:**
|
|
253
148
|
|
|
254
149
|
- `application/json`
|
|
255
150
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
151
|
##### Responses
|
|
260
152
|
|
|
261
|
-
|
|
262
153
|
**200** - Integration action log record updated successfully
|
|
263
154
|
|
|
264
|
-
|
|
265
|
-
|
|
266
155
|
Content-Type: `application/json`
|
|
267
156
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
157
|
**400** - Bad request
|
|
272
158
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
159
|
**404** - Integration action log record not found
|
|
277
160
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
161
|
**401** - Unauthorized
|
|
282
162
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
163
|
**500** - Internal server error
|
|
287
164
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
165
|
---
|
|
293
166
|
|
|
294
|
-
|
|
295
167
|
#### DELETE /integration-action-log/{id}
|
|
296
168
|
|
|
297
169
|
**Summary:** Delete integration action log record
|
|
298
170
|
|
|
299
|
-
|
|
300
171
|
**Description:** Delete an existing integration action log record
|
|
301
172
|
|
|
302
|
-
|
|
303
|
-
|
|
304
173
|
**Tags:** Integration Action Log
|
|
305
174
|
|
|
306
|
-
|
|
307
|
-
|
|
308
175
|
##### Parameters
|
|
309
176
|
|
|
310
177
|
| Name | Location | Type | Required | Description |
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
| `id` | path | string | Yes | Integration action log record ID |
|
|
314
|
-
|
|
315
|
-
|
|
178
|
+
| ---- | -------- | ---- | -------- | ----------- |
|
|
316
179
|
|
|
317
180
|
|
|
181
|
+
| `id` | path | string | Yes | Integration action log record ID |
|
|
318
182
|
|
|
319
183
|
##### Responses
|
|
320
184
|
|
|
321
|
-
|
|
322
185
|
**200** - Integration action log record deleted successfully
|
|
323
186
|
|
|
324
|
-
|
|
325
|
-
|
|
326
187
|
Content-Type: `application/json`
|
|
327
188
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
189
|
**404** - Integration action log record not found
|
|
332
190
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
191
|
**401** - Unauthorized
|
|
337
192
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
193
|
**500** - Internal server error
|
|
342
194
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
195
|
---
|
|
348
196
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
197
|
## Data Models
|
|
353
198
|
|
|
354
|
-
|
|
355
|
-
|
|
356
199
|
### IntegrationActionLog
|
|
357
200
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
201
|
| Property | Type | Required | Description |
|
|
362
|
-
|
|
202
|
+
| -------- | ---- | -------- | ----------- |
|
|
203
|
+
|
|
363
204
|
|
|
364
205
|
| `_id` | string | No | Unique identifier for the integration action log record |
|
|
365
206
|
|
|
@@ -389,18 +230,11 @@ Content-Type: `application/json`
|
|
|
389
230
|
|
|
390
231
|
| `updatedAt` | string | No | Record last update timestamp |
|
|
391
232
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
233
|
### IntegrationActionLogInput
|
|
398
234
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
235
|
| Property | Type | Required | Description |
|
|
403
|
-
|
|
236
|
+
| -------- | ---- | -------- | ----------- |
|
|
237
|
+
|
|
404
238
|
|
|
405
239
|
| `integrationId` | string | Yes | Integration identifier |
|
|
406
240
|
|
|
@@ -424,13 +258,6 @@ Content-Type: `application/json`
|
|
|
424
258
|
|
|
425
259
|
| `metadata` | object | No | Additional metadata |
|
|
426
260
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
261
|
## TypeScript Usage
|
|
435
262
|
|
|
436
|
-
See [integration-action-log-examples.md](./integration-action-log-examples.md) for detailed TypeScript usage examples.
|
|
263
|
+
See [integration-action-log-examples.md](./integration-action-log-examples.md) for detailed TypeScript usage examples.
|
|
@@ -11,48 +11,41 @@ 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
|
### Find integration apps
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
25
|
```typescript
|
|
30
|
-
|
|
31
26
|
// GET /integration-app
|
|
32
27
|
|
|
33
28
|
const params = {
|
|
34
|
-
|
|
35
29
|
params: null, // Query parameters for filtering integration apps
|
|
36
|
-
|
|
37
30
|
};
|
|
38
31
|
|
|
39
|
-
const result = await fetch(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
const result = await fetch(
|
|
33
|
+
`${baseURL}/integration-app?${new URLSearchParams(params)}`,
|
|
34
|
+
{
|
|
35
|
+
method: "GET",
|
|
36
|
+
headers: {
|
|
37
|
+
Authorization: `Bearer ${apiKey}`,
|
|
38
|
+
"Content-Type": "application/json",
|
|
39
|
+
},
|
|
44
40
|
}
|
|
45
|
-
|
|
41
|
+
);
|
|
46
42
|
|
|
47
43
|
const data = await result.json();
|
|
48
44
|
console.log(data);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
45
|
```
|
|
53
46
|
|
|
54
|
-
|
|
55
47
|
**Expected Response:**
|
|
48
|
+
|
|
56
49
|
```json
|
|
57
50
|
{
|
|
58
51
|
"success": true,
|
|
@@ -62,16 +55,11 @@ console.log(data);
|
|
|
62
55
|
}
|
|
63
56
|
```
|
|
64
57
|
|
|
65
|
-
|
|
66
58
|
---
|
|
67
59
|
|
|
68
|
-
|
|
69
60
|
### Create an integration app
|
|
70
61
|
|
|
71
|
-
|
|
72
|
-
|
|
73
62
|
```typescript
|
|
74
|
-
|
|
75
63
|
// POST /integration-app
|
|
76
64
|
|
|
77
65
|
const requestBody = {
|
|
@@ -80,59 +68,46 @@ const requestBody = {
|
|
|
80
68
|
};
|
|
81
69
|
|
|
82
70
|
const result = await fetch(`${baseURL}/integration-app`, {
|
|
83
|
-
method:
|
|
71
|
+
method: "POST",
|
|
84
72
|
headers: {
|
|
85
|
-
|
|
86
|
-
|
|
73
|
+
Authorization: `Bearer ${apiKey}`,
|
|
74
|
+
"Content-Type": "application/json",
|
|
87
75
|
},
|
|
88
|
-
body: JSON.stringify(requestBody)
|
|
76
|
+
body: JSON.stringify(requestBody),
|
|
89
77
|
});
|
|
90
78
|
|
|
91
79
|
const data = await result.json();
|
|
92
80
|
console.log(data);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
81
|
```
|
|
97
82
|
|
|
98
|
-
|
|
99
|
-
|
|
100
83
|
---
|
|
101
84
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
85
|
### Get an integration app by ID
|
|
106
86
|
|
|
107
|
-
|
|
108
|
-
|
|
109
87
|
```typescript
|
|
110
|
-
|
|
111
88
|
// GET /integration-app/{id}
|
|
112
89
|
|
|
113
90
|
const params = {
|
|
114
|
-
|
|
115
|
-
id: 'example-value', // No description
|
|
116
|
-
|
|
91
|
+
id: "example-value", // No description
|
|
117
92
|
};
|
|
118
93
|
|
|
119
|
-
const result = await fetch(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
94
|
+
const result = await fetch(
|
|
95
|
+
`${baseURL}/integration-app/{id}?${new URLSearchParams(params)}`,
|
|
96
|
+
{
|
|
97
|
+
method: "GET",
|
|
98
|
+
headers: {
|
|
99
|
+
Authorization: `Bearer ${apiKey}`,
|
|
100
|
+
"Content-Type": "application/json",
|
|
101
|
+
},
|
|
124
102
|
}
|
|
125
|
-
|
|
103
|
+
);
|
|
126
104
|
|
|
127
105
|
const data = await result.json();
|
|
128
106
|
console.log(data);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
107
|
```
|
|
133
108
|
|
|
134
|
-
|
|
135
109
|
**Expected Response:**
|
|
110
|
+
|
|
136
111
|
```json
|
|
137
112
|
{
|
|
138
113
|
"success": true,
|
|
@@ -142,20 +117,16 @@ console.log(data);
|
|
|
142
117
|
}
|
|
143
118
|
```
|
|
144
119
|
|
|
145
|
-
|
|
146
120
|
---
|
|
147
121
|
|
|
148
|
-
|
|
149
122
|
### Update an integration app
|
|
150
123
|
|
|
151
|
-
|
|
152
|
-
|
|
153
124
|
```typescript
|
|
154
125
|
|
|
155
126
|
```
|
|
156
127
|
|
|
157
|
-
|
|
158
128
|
**Expected Response:**
|
|
129
|
+
|
|
159
130
|
```json
|
|
160
131
|
{
|
|
161
132
|
"success": true,
|
|
@@ -165,27 +136,21 @@ console.log(data);
|
|
|
165
136
|
}
|
|
166
137
|
```
|
|
167
138
|
|
|
168
|
-
|
|
169
139
|
---
|
|
170
140
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
141
|
## Using with Repzo SDK Service Types
|
|
175
142
|
|
|
176
143
|
The Repzo SDK provides TypeScript interfaces for type safety:
|
|
177
144
|
|
|
178
145
|
```typescript
|
|
179
|
-
import { Service } from
|
|
146
|
+
import { Service } from "repzo";
|
|
180
147
|
|
|
181
148
|
// Example using SDK types
|
|
182
149
|
|
|
183
|
-
|
|
184
150
|
async function example() {
|
|
185
151
|
// Use the Service.Integrationapp types for better type safety
|
|
186
152
|
// This provides intellisense and compile-time type checking
|
|
187
153
|
}
|
|
188
|
-
|
|
189
154
|
```
|
|
190
155
|
|
|
191
156
|
## Error Handling
|
|
@@ -193,11 +158,11 @@ async function example() {
|
|
|
193
158
|
```typescript
|
|
194
159
|
try {
|
|
195
160
|
const result = await fetch(`${baseURL}/endpoint`, {
|
|
196
|
-
method:
|
|
161
|
+
method: "GET",
|
|
197
162
|
headers: {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
163
|
+
Authorization: `Bearer ${apiKey}`,
|
|
164
|
+
"Content-Type": "application/json",
|
|
165
|
+
},
|
|
201
166
|
});
|
|
202
167
|
|
|
203
168
|
if (!result.ok) {
|
|
@@ -205,14 +170,14 @@ try {
|
|
|
205
170
|
}
|
|
206
171
|
|
|
207
172
|
const data = await result.json();
|
|
208
|
-
|
|
173
|
+
|
|
209
174
|
if (!data.success) {
|
|
210
|
-
throw new Error(data.error ||
|
|
175
|
+
throw new Error(data.error || "API request failed");
|
|
211
176
|
}
|
|
212
|
-
|
|
177
|
+
|
|
213
178
|
return data.data;
|
|
214
179
|
} catch (error) {
|
|
215
|
-
console.error(
|
|
180
|
+
console.error("API request failed:", error);
|
|
216
181
|
throw error;
|
|
217
182
|
}
|
|
218
183
|
```
|
|
@@ -228,18 +193,21 @@ const params = {
|
|
|
228
193
|
// other filters...
|
|
229
194
|
};
|
|
230
195
|
|
|
231
|
-
const result = await fetch(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
196
|
+
const result = await fetch(
|
|
197
|
+
`${baseURL}/endpoint?${new URLSearchParams(params)}`,
|
|
198
|
+
{
|
|
199
|
+
method: "GET",
|
|
200
|
+
headers: {
|
|
201
|
+
Authorization: `Bearer ${apiKey}`,
|
|
202
|
+
"Content-Type": "application/json",
|
|
203
|
+
},
|
|
236
204
|
}
|
|
237
|
-
|
|
205
|
+
);
|
|
238
206
|
|
|
239
207
|
const data = await result.json();
|
|
240
208
|
|
|
241
209
|
// Access pagination info
|
|
242
|
-
console.log(
|
|
243
|
-
console.log(
|
|
244
|
-
console.log(
|
|
245
|
-
```
|
|
210
|
+
console.log("Total items:", data.paging.total);
|
|
211
|
+
console.log("Current page:", data.paging.page);
|
|
212
|
+
console.log("Total pages:", data.paging.pages);
|
|
213
|
+
```
|