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,38 +11,32 @@ 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 client contacts
|
|
26
24
|
|
|
27
|
-
|
|
28
25
|
Retrieve a list of all client contacts with optional filtering and pagination
|
|
29
26
|
|
|
30
|
-
|
|
31
27
|
```typescript
|
|
32
|
-
|
|
33
28
|
// GET /client-contact
|
|
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
|
_id: null, // Filter by contact ID(s)
|
|
44
38
|
|
|
45
|
-
search:
|
|
39
|
+
search: "example-value", // Search text for contact name
|
|
46
40
|
|
|
47
41
|
name: null, // Filter by contact name(s)
|
|
48
42
|
|
|
@@ -50,31 +44,30 @@ const params = {
|
|
|
50
44
|
|
|
51
45
|
to_updatedAt: 1, // Filter contacts updated before this timestamp
|
|
52
46
|
|
|
53
|
-
from__id:
|
|
47
|
+
from__id: "example-value", // Filter contacts with ID greater than this value
|
|
54
48
|
|
|
55
|
-
to__id:
|
|
49
|
+
to__id: "example-value", // Filter contacts with ID less than this value
|
|
56
50
|
|
|
57
51
|
sortBy: null, // Advanced sorting options
|
|
58
|
-
|
|
59
52
|
};
|
|
60
53
|
|
|
61
|
-
const result = await fetch(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
const result = await fetch(
|
|
55
|
+
`${baseURL}/client-contact?${new URLSearchParams(params)}`,
|
|
56
|
+
{
|
|
57
|
+
method: "GET",
|
|
58
|
+
headers: {
|
|
59
|
+
Authorization: `Bearer ${apiKey}`,
|
|
60
|
+
"Content-Type": "application/json",
|
|
61
|
+
},
|
|
66
62
|
}
|
|
67
|
-
|
|
63
|
+
);
|
|
68
64
|
|
|
69
65
|
const data = await result.json();
|
|
70
66
|
console.log(data);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
67
|
```
|
|
75
68
|
|
|
76
|
-
|
|
77
69
|
**Expected Response:**
|
|
70
|
+
|
|
78
71
|
```json
|
|
79
72
|
{
|
|
80
73
|
"success": true,
|
|
@@ -84,18 +77,13 @@ console.log(data);
|
|
|
84
77
|
}
|
|
85
78
|
```
|
|
86
79
|
|
|
87
|
-
|
|
88
80
|
---
|
|
89
81
|
|
|
90
|
-
|
|
91
82
|
### Create a new client contact
|
|
92
83
|
|
|
93
|
-
|
|
94
84
|
Create a new client contact
|
|
95
85
|
|
|
96
|
-
|
|
97
86
|
```typescript
|
|
98
|
-
|
|
99
87
|
// POST /client-contact
|
|
100
88
|
|
|
101
89
|
const requestBody = {
|
|
@@ -104,61 +92,48 @@ const requestBody = {
|
|
|
104
92
|
};
|
|
105
93
|
|
|
106
94
|
const result = await fetch(`${baseURL}/client-contact`, {
|
|
107
|
-
method:
|
|
95
|
+
method: "POST",
|
|
108
96
|
headers: {
|
|
109
|
-
|
|
110
|
-
|
|
97
|
+
Authorization: `Bearer ${apiKey}`,
|
|
98
|
+
"Content-Type": "application/json",
|
|
111
99
|
},
|
|
112
|
-
body: JSON.stringify(requestBody)
|
|
100
|
+
body: JSON.stringify(requestBody),
|
|
113
101
|
});
|
|
114
102
|
|
|
115
103
|
const data = await result.json();
|
|
116
104
|
console.log(data);
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
105
|
```
|
|
121
106
|
|
|
122
|
-
|
|
123
|
-
|
|
124
107
|
---
|
|
125
108
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
109
|
### Get a specific client contact
|
|
130
110
|
|
|
131
|
-
|
|
132
111
|
Retrieve a specific client contact by ID
|
|
133
112
|
|
|
134
|
-
|
|
135
113
|
```typescript
|
|
136
|
-
|
|
137
114
|
// GET /client-contact/{id}
|
|
138
115
|
|
|
139
116
|
const params = {
|
|
140
|
-
|
|
141
|
-
id: 'example-value', // Client contact ID
|
|
142
|
-
|
|
117
|
+
id: "example-value", // Client contact ID
|
|
143
118
|
};
|
|
144
119
|
|
|
145
|
-
const result = await fetch(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
120
|
+
const result = await fetch(
|
|
121
|
+
`${baseURL}/client-contact/{id}?${new URLSearchParams(params)}`,
|
|
122
|
+
{
|
|
123
|
+
method: "GET",
|
|
124
|
+
headers: {
|
|
125
|
+
Authorization: `Bearer ${apiKey}`,
|
|
126
|
+
"Content-Type": "application/json",
|
|
127
|
+
},
|
|
150
128
|
}
|
|
151
|
-
|
|
129
|
+
);
|
|
152
130
|
|
|
153
131
|
const data = await result.json();
|
|
154
132
|
console.log(data);
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
133
|
```
|
|
159
134
|
|
|
160
|
-
|
|
161
135
|
**Expected Response:**
|
|
136
|
+
|
|
162
137
|
```json
|
|
163
138
|
{
|
|
164
139
|
"success": true,
|
|
@@ -168,22 +143,18 @@ console.log(data);
|
|
|
168
143
|
}
|
|
169
144
|
```
|
|
170
145
|
|
|
171
|
-
|
|
172
146
|
---
|
|
173
147
|
|
|
174
|
-
|
|
175
148
|
### Update a client contact
|
|
176
149
|
|
|
177
|
-
|
|
178
150
|
Update an existing client contact
|
|
179
151
|
|
|
180
|
-
|
|
181
152
|
```typescript
|
|
182
153
|
|
|
183
154
|
```
|
|
184
155
|
|
|
185
|
-
|
|
186
156
|
**Expected Response:**
|
|
157
|
+
|
|
187
158
|
```json
|
|
188
159
|
{
|
|
189
160
|
"success": true,
|
|
@@ -193,39 +164,32 @@ Update an existing client contact
|
|
|
193
164
|
}
|
|
194
165
|
```
|
|
195
166
|
|
|
196
|
-
|
|
197
167
|
---
|
|
198
168
|
|
|
199
|
-
|
|
200
169
|
### Delete a client contact
|
|
201
170
|
|
|
202
|
-
|
|
203
171
|
Delete an existing client contact
|
|
204
172
|
|
|
205
|
-
|
|
206
173
|
```typescript
|
|
207
|
-
|
|
208
174
|
// DELETE /client-contact/{id}
|
|
209
175
|
|
|
210
|
-
const id =
|
|
211
|
-
const deletePath =
|
|
176
|
+
const id = "your-resource-id";
|
|
177
|
+
const deletePath = "/client-contact/{id}".replace("{id}", id);
|
|
212
178
|
|
|
213
179
|
const result = await fetch(`${baseURL}${deletePath}`, {
|
|
214
|
-
method:
|
|
180
|
+
method: "DELETE",
|
|
215
181
|
headers: {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
182
|
+
Authorization: `Bearer ${apiKey}`,
|
|
183
|
+
"Content-Type": "application/json",
|
|
184
|
+
},
|
|
219
185
|
});
|
|
220
186
|
|
|
221
187
|
const data = await result.json();
|
|
222
188
|
console.log(data);
|
|
223
|
-
|
|
224
|
-
|
|
225
189
|
```
|
|
226
190
|
|
|
227
|
-
|
|
228
191
|
**Expected Response:**
|
|
192
|
+
|
|
229
193
|
```json
|
|
230
194
|
{
|
|
231
195
|
"success": true,
|
|
@@ -235,27 +199,21 @@ console.log(data);
|
|
|
235
199
|
}
|
|
236
200
|
```
|
|
237
201
|
|
|
238
|
-
|
|
239
202
|
---
|
|
240
203
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
204
|
## Using with Repzo SDK Service Types
|
|
245
205
|
|
|
246
206
|
The Repzo SDK provides TypeScript interfaces for type safety:
|
|
247
207
|
|
|
248
208
|
```typescript
|
|
249
|
-
import { Service } from
|
|
209
|
+
import { Service } from "repzo";
|
|
250
210
|
|
|
251
211
|
// Example using SDK types
|
|
252
212
|
|
|
253
|
-
|
|
254
213
|
async function example() {
|
|
255
214
|
// Use the Service.Clientcontact types for better type safety
|
|
256
215
|
// This provides intellisense and compile-time type checking
|
|
257
216
|
}
|
|
258
|
-
|
|
259
217
|
```
|
|
260
218
|
|
|
261
219
|
## Error Handling
|
|
@@ -263,11 +221,11 @@ async function example() {
|
|
|
263
221
|
```typescript
|
|
264
222
|
try {
|
|
265
223
|
const result = await fetch(`${baseURL}/endpoint`, {
|
|
266
|
-
method:
|
|
224
|
+
method: "GET",
|
|
267
225
|
headers: {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
226
|
+
Authorization: `Bearer ${apiKey}`,
|
|
227
|
+
"Content-Type": "application/json",
|
|
228
|
+
},
|
|
271
229
|
});
|
|
272
230
|
|
|
273
231
|
if (!result.ok) {
|
|
@@ -275,14 +233,14 @@ try {
|
|
|
275
233
|
}
|
|
276
234
|
|
|
277
235
|
const data = await result.json();
|
|
278
|
-
|
|
236
|
+
|
|
279
237
|
if (!data.success) {
|
|
280
|
-
throw new Error(data.error ||
|
|
238
|
+
throw new Error(data.error || "API request failed");
|
|
281
239
|
}
|
|
282
|
-
|
|
240
|
+
|
|
283
241
|
return data.data;
|
|
284
242
|
} catch (error) {
|
|
285
|
-
console.error(
|
|
243
|
+
console.error("API request failed:", error);
|
|
286
244
|
throw error;
|
|
287
245
|
}
|
|
288
246
|
```
|
|
@@ -298,18 +256,21 @@ const params = {
|
|
|
298
256
|
// other filters...
|
|
299
257
|
};
|
|
300
258
|
|
|
301
|
-
const result = await fetch(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
259
|
+
const result = await fetch(
|
|
260
|
+
`${baseURL}/endpoint?${new URLSearchParams(params)}`,
|
|
261
|
+
{
|
|
262
|
+
method: "GET",
|
|
263
|
+
headers: {
|
|
264
|
+
Authorization: `Bearer ${apiKey}`,
|
|
265
|
+
"Content-Type": "application/json",
|
|
266
|
+
},
|
|
306
267
|
}
|
|
307
|
-
|
|
268
|
+
);
|
|
308
269
|
|
|
309
270
|
const data = await result.json();
|
|
310
271
|
|
|
311
272
|
// Access pagination info
|
|
312
|
-
console.log(
|
|
313
|
-
console.log(
|
|
314
|
-
console.log(
|
|
315
|
-
```
|
|
273
|
+
console.log("Total items:", data.paging.total);
|
|
274
|
+
console.log("Current page:", data.paging.page);
|
|
275
|
+
console.log("Total pages:", data.paging.pages);
|
|
276
|
+
```
|