repzo 1.0.24 → 1.0.25

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/lib/index.d.ts CHANGED
@@ -1,626 +1,321 @@
1
- import {
2
- Params,
3
- Data,
4
- Service,
5
- Options,
6
- Headers,
7
- StringId,
8
- NameSpaces,
9
- } from "./types/index";
1
+ import { Params, Data, Service, Options, Headers, StringId, NameSpaces } from "./types/index";
10
2
  export default class Repzo {
11
- private svAPIEndpoint;
12
- headers: Headers;
13
- constructor(apiKey: string, options?: Options);
14
- private _fetch;
15
- private _create;
16
- private _update;
17
- private _delete;
18
- client: {
19
- _path: string;
20
- find: (
21
- params?: Service.Client.Find.Params
22
- ) => Promise<Service.Client.Find.Result>;
23
- get: (
24
- id: Service.Client.Get.ID,
25
- params?: Service.Client.Get.Params
26
- ) => Promise<Service.Client.Get.Result>;
27
- create: (
28
- body: Service.Client.Create.Body
29
- ) => Promise<Service.Client.Create.Result>;
30
- update: (
31
- id: Service.Client.Update.ID,
32
- body: Service.Client.Update.Body
33
- ) => Promise<Service.Client.Update.Result>;
34
- remove: (
35
- id: Service.Client.Remove.ID
36
- ) => Promise<Service.Client.Remove.Result>;
37
- };
38
- product: {
39
- _path: string;
40
- find: (
41
- params?: Service.Product.Find.Params
42
- ) => Promise<Service.Product.Find.Result>;
43
- get: (
44
- id: Service.Product.Get.ID,
45
- params?: Service.Product.Get.Params
46
- ) => Promise<Service.Product.Get.Result>;
47
- create: (
48
- body: Service.Product.Create.Body
49
- ) => Promise<Service.Product.Create.Result>;
50
- update: (
51
- id: Service.Product.Update.ID,
52
- body: Service.Product.Update.Body
53
- ) => Promise<Service.Product.Update.Result>;
54
- remove: (
55
- id: Service.Product.Remove.ID
56
- ) => Promise<Service.Product.Remove.Result>;
57
- };
58
- variant: {
59
- _path: string;
60
- find: (
61
- params?: Service.Variant.Find.Params
62
- ) => Promise<Service.Variant.Find.Result>;
63
- get: (
64
- id: Service.Variant.Get.ID,
65
- params?: Service.Variant.Get.Params
66
- ) => Promise<Service.Variant.Get.Result>;
67
- create: (
68
- body: Service.Variant.Create.Body
69
- ) => Promise<Service.Variant.Create.Result>;
70
- update: (
71
- id: Service.Variant.Update.ID,
72
- body: Service.Variant.Update.Body
73
- ) => Promise<Service.Variant.Update.Result>;
74
- remove: (
75
- id: Service.Variant.Remove.ID
76
- ) => Promise<Service.Variant.Remove.Result>;
77
- };
78
- category: {
79
- _path: string;
80
- find: (
81
- params?: Service.Category.Find.Params
82
- ) => Promise<Service.Category.Find.Result>;
83
- get: (id: Service.Category.Get.ID) => Promise<Service.Category.Get.Result>;
84
- create: (
85
- body: Service.Category.Create.Body
86
- ) => Promise<Service.Category.Create.Result>;
87
- update: (
88
- id: Service.Category.Update.ID,
89
- body: Service.Category.Update.Body
90
- ) => Promise<Service.Category.Update.Result>;
91
- remove: (
92
- id: Service.Category.Remove.ID
93
- ) => Promise<Service.Category.Remove.Result>;
94
- };
95
- sub_category: {
96
- _path: string;
97
- find: (
98
- params?: Service.SubCategory.Find.Params
99
- ) => Promise<Service.SubCategory.Find.Result>;
100
- get: (
101
- id: Service.SubCategory.Get.ID,
102
- params?: Service.SubCategory.Get.Params
103
- ) => Promise<Service.SubCategory.Get.Result>;
104
- create: (
105
- body: Service.SubCategory.Create.Body
106
- ) => Promise<Service.SubCategory.Create.Result>;
107
- update: (
108
- id: Service.SubCategory.Update.ID,
109
- body: Service.SubCategory.Update.Body
110
- ) => Promise<Service.SubCategory.Update.Result>;
111
- remove: (
112
- id: Service.SubCategory.Remove.ID
113
- ) => Promise<Service.SubCategory.Remove.Result>;
114
- };
115
- brand: {
116
- _path: string;
117
- find: (
118
- params?: Service.Brand.Find.Params
119
- ) => Promise<Service.Brand.Find.Result>;
120
- get: (id: Service.Brand.Get.ID) => Promise<Service.Brand.Get.Result>;
121
- create: (
122
- body: Service.Brand.Create.Body
123
- ) => Promise<Service.Brand.Create.Result>;
124
- update: (
125
- id: Service.Brand.Update.ID,
126
- body: Service.Brand.Update.Body
127
- ) => Promise<Service.Brand.Update.Result>;
128
- remove: (
129
- id: Service.Brand.Remove.ID
130
- ) => Promise<Service.Brand.Remove.Result>;
131
- };
132
- product_group: {
133
- _path: string;
134
- find: (
135
- params?: Service.ProductGroup.Find.Params
136
- ) => Promise<Service.ProductGroup.Find.Result>;
137
- get: (
138
- id: Service.ProductGroup.Get.ID
139
- ) => Promise<Service.ProductGroup.Get.Result>;
140
- create: (
141
- body: Service.ProductGroup.Create.Body
142
- ) => Promise<Service.ProductGroup.Create.Result>;
143
- update: (
144
- id: Service.ProductGroup.Update.ID,
145
- body: Service.ProductGroup.Update.Body
146
- ) => Promise<Service.ProductGroup.Update.Result>;
147
- remove: (
148
- id: Service.ProductGroup.Remove.ID
149
- ) => Promise<Service.ProductGroup.Remove.Result>;
150
- };
151
- tax: {
152
- _path: string;
153
- find: (
154
- params?: Service.Tax.Find.Params
155
- ) => Promise<Service.Tax.Find.Result>;
156
- get: (id: Service.Tax.Get.ID) => Promise<Service.Tax.Get.Result>;
157
- create: (
158
- body: Service.Tax.Create.Body
159
- ) => Promise<Service.Tax.Create.Result>;
160
- update: (
161
- id: Service.Tax.Update.ID,
162
- body: Service.Tax.Update.Body
163
- ) => Promise<Service.Tax.Update.Result>;
164
- remove: (id: Service.Tax.Remove.ID) => Promise<Service.Tax.Remove.Result>;
165
- };
166
- measureunit: {
167
- _path: string;
168
- find: (
169
- params?: Service.MeasureUnit.Find.Params
170
- ) => Promise<Service.MeasureUnit.Find.Result>;
171
- get: (
172
- id: Service.MeasureUnit.Get.ID
173
- ) => Promise<Service.MeasureUnit.Get.Result>;
174
- create: (
175
- body: Service.MeasureUnit.Create.Body
176
- ) => Promise<Service.MeasureUnit.Create.Result>;
177
- update: (
178
- id: Service.MeasureUnit.Update.ID,
179
- body: Service.MeasureUnit.Update.Body
180
- ) => Promise<Service.MeasureUnit.Update.Result>;
181
- remove: (
182
- id: Service.MeasureUnit.Remove.ID
183
- ) => Promise<Service.MeasureUnit.Remove.Result>;
184
- };
185
- measureunitFamily: {
186
- _path: string;
187
- find: (
188
- params?: Service.MeasureUnitFamily.Find.Params
189
- ) => Promise<Service.MeasureUnitFamily.Find.Result>;
190
- get: (
191
- id: Service.MeasureUnitFamily.Get.ID
192
- ) => Promise<Service.MeasureUnitFamily.Get.Result>;
193
- create: (
194
- body: Service.MeasureUnitFamily.Create.Body
195
- ) => Promise<Service.MeasureUnitFamily.Create.Result>;
196
- update: (
197
- id: Service.MeasureUnitFamily.Update.ID,
198
- body: Service.MeasureUnitFamily.Update.Body
199
- ) => Promise<Service.MeasureUnitFamily.Update.Result>;
200
- remove: (
201
- id: Service.MeasureUnitFamily.Remove.ID
202
- ) => Promise<Service.MeasureUnitFamily.Remove.Result>;
203
- };
204
- media: {
205
- _path: string;
206
- find: (
207
- params?: Service.Media.Find.Params
208
- ) => Promise<Service.Media.Find.Result>;
209
- get: (id: Service.Media.Get.ID) => Promise<Service.Media.Get.Result>;
210
- create: (
211
- body: Service.Media.Create.Body
212
- ) => Promise<Service.Media.Create.Result>;
213
- update: (
214
- id: Service.Media.Update.ID,
215
- body: Service.Media.Update.Body
216
- ) => Promise<Service.Media.Update.Result>;
217
- remove: (
218
- id: Service.Media.Remove.ID
219
- ) => Promise<Service.Media.Remove.Result>;
220
- };
221
- priceList: {
222
- _path: string;
223
- find: (
224
- params?: Service.PriceList.Find.Params
225
- ) => Promise<Service.PriceList.Find.Result>;
226
- get: (
227
- id: Service.PriceList.Get.ID
228
- ) => Promise<Service.PriceList.Get.Result>;
229
- create: (
230
- body: Service.PriceList.Create.Body
231
- ) => Promise<Service.PriceList.Create.Result>;
232
- update: (
233
- id: Service.PriceList.Update.ID,
234
- body: Service.PriceList.Update.Body
235
- ) => Promise<Service.PriceList.Update.Result>;
236
- remove: (
237
- id: Service.PriceList.Remove.ID
238
- ) => Promise<Service.PriceList.Remove.Result>;
239
- };
240
- priceListItem: {
241
- _path: string;
242
- find: (
243
- params?: Service.PriceListItem.Find.Params
244
- ) => Promise<Service.PriceListItem.Find.Result>;
245
- get: (
246
- id: Service.PriceListItem.Get.ID
247
- ) => Promise<Service.PriceListItem.Get.Result>;
248
- create: (
249
- body: Service.PriceListItem.Create.Body
250
- ) => Promise<Service.PriceListItem.Create.Result>;
251
- update: (
252
- id: Service.PriceListItem.Update.ID,
253
- body: Service.PriceListItem.Update.Body
254
- ) => Promise<Service.PriceListItem.Update.Result>;
255
- remove: (
256
- id: Service.PriceListItem.Remove.ID
257
- ) => Promise<Service.PriceListItem.Remove.Result>;
258
- };
259
- team: {
260
- _path: string;
261
- find: (
262
- params?: Service.Team.Find.Params
263
- ) => Promise<Service.Team.Find.Result>;
264
- get: (id: Service.Team.Get.ID) => Promise<Service.Team.Get.Result>;
265
- create: (
266
- body: Service.Team.Create.Body
267
- ) => Promise<Service.Team.Create.Result>;
268
- update: (
269
- id: Service.Team.Update.ID,
270
- body: Service.Team.Update.Body
271
- ) => Promise<Service.Team.Update.Result>;
272
- remove: (id: Service.Team.Remove.ID) => Promise<Service.Team.Remove.Result>;
273
- };
274
- rep: {
275
- _path: string;
276
- find: (
277
- params?: Service.Rep.Find.Params
278
- ) => Promise<Service.Rep.Find.Result>;
279
- get: (
280
- id: Service.Rep.Get.ID,
281
- params?: Service.Client.Get.Params
282
- ) => Promise<Service.Rep.Get.Result>;
283
- create: (
284
- body: Service.Rep.Create.Body
285
- ) => Promise<Service.Rep.Create.Result>;
286
- update: (
287
- id: Service.Rep.Update.ID,
288
- body: Service.Rep.Update.Body
289
- ) => Promise<Service.Rep.Update.Result>;
290
- remove: (id: Service.Rep.Remove.ID) => Promise<Service.Rep.Remove.Result>;
291
- };
292
- tag: {
293
- _path: string;
294
- find: (
295
- params?: Service.Tag.Find.Params
296
- ) => Promise<Service.Tag.Find.Result>;
297
- get: (id: Service.Tag.Get.ID) => Promise<Service.Tag.Get.Result>;
298
- create: (
299
- body: Service.Tag.Create.Body
300
- ) => Promise<Service.Tag.Create.Result>;
301
- update: (
302
- id: Service.Tag.Update.ID,
303
- body: Service.Tag.Update.Body
304
- ) => Promise<Service.Tag.Update.Result>;
305
- remove: (id: Service.Tag.Remove.ID) => Promise<Service.Tag.Remove.Result>;
306
- };
307
- warehouse: {
308
- _path: string;
309
- find: (
310
- params?: Service.Warehouse.Find.Params
311
- ) => Promise<Service.Warehouse.Find.Result>;
312
- get: (
313
- id: Service.Warehouse.Get.ID
314
- ) => Promise<Service.Warehouse.Get.Result>;
315
- create: (
316
- body: Service.Warehouse.Create.Body
317
- ) => Promise<Service.Warehouse.Create.Result>;
318
- update: (
319
- id: Service.Warehouse.Update.ID,
320
- body: Service.Warehouse.Update.Body
321
- ) => Promise<Service.Warehouse.Update.Result>;
322
- remove: (
323
- id: Service.Warehouse.Remove.ID
324
- ) => Promise<Service.Warehouse.Remove.Result>;
325
- };
326
- channel: {
327
- _path: string;
328
- find: (
329
- params?: Service.Channel.Find.Params
330
- ) => Promise<Service.Channel.Find.Result>;
331
- get: (id: Service.Channel.Get.ID) => Promise<Service.Channel.Get.Result>;
332
- create: (
333
- body: Service.Channel.Create.Body
334
- ) => Promise<Service.Channel.Create.Result>;
335
- update: (
336
- id: Service.Channel.Update.ID,
337
- body: Service.Channel.Update.Body
338
- ) => Promise<Service.Channel.Update.Result>;
339
- remove: (
340
- id: Service.Channel.Remove.ID
341
- ) => Promise<Service.Channel.Remove.Result>;
342
- };
343
- paymentTerm: {
344
- _path: string;
345
- find: (
346
- params?: Service.PaymentTerm.Find.Params
347
- ) => Promise<Service.PaymentTerm.Find.Result>;
348
- get: (
349
- id: Service.PaymentTerm.Get.ID
350
- ) => Promise<Service.PaymentTerm.Get.Result>;
351
- create: (
352
- body: Service.PaymentTerm.Create.Body
353
- ) => Promise<Service.PaymentTerm.Create.Result>;
354
- update: (
355
- id: Service.PaymentTerm.Update.ID,
356
- body: Service.PaymentTerm.Update.Body
357
- ) => Promise<Service.PaymentTerm.Update.Result>;
358
- remove: (
359
- id: Service.PaymentTerm.Remove.ID
360
- ) => Promise<Service.PaymentTerm.Remove.Result>;
361
- };
362
- bank: {
363
- _path: string;
364
- find: (
365
- params?: Service.Bank.Find.Params
366
- ) => Promise<Service.Bank.Find.Result>;
367
- get: (id: Service.Bank.Get.ID) => Promise<Service.Bank.Get.Result>;
368
- create: (
369
- body: Service.Bank.Create.Body
370
- ) => Promise<Service.Bank.Create.Result>;
371
- update: (
372
- id: Service.Bank.Update.ID,
373
- body: Service.Bank.Update.Body
374
- ) => Promise<Service.Bank.Update.Result>;
375
- };
376
- bank_list: {
377
- _path: string;
378
- find: (
379
- params?: Service.BankList.Find.Params
380
- ) => Promise<Service.BankList.Find.Result>;
381
- get: (id: Service.BankList.Get.ID) => Promise<Service.BankList.Get.Result>;
382
- create: (
383
- body: Service.BankList.Create.Body
384
- ) => Promise<Service.BankList.Create.Result>;
385
- update: (
386
- id: Service.BankList.Update.ID,
387
- body: Service.BankList.Update.Body
388
- ) => Promise<Service.BankList.Update.Result>;
389
- };
390
- customStatus: {
391
- _path: string;
392
- find: (
393
- params?: Service.CustomStatus.Find.Params
394
- ) => Promise<Service.CustomStatus.Find.Result>;
395
- get: (
396
- id: Service.CustomStatus.Get.ID
397
- ) => Promise<Service.CustomStatus.Get.Result>;
398
- create: (
399
- body: Service.CustomStatus.Create.Body
400
- ) => Promise<Service.CustomStatus.Create.Result>;
401
- update: (
402
- id: Service.CustomStatus.Update.ID,
403
- body: Service.CustomStatus.Update.Body
404
- ) => Promise<Service.CustomStatus.Update.Result>;
405
- remove: (
406
- id: Service.CustomStatus.Remove.ID
407
- ) => Promise<Service.CustomStatus.Remove.Result>;
408
- };
409
- invoice: {
410
- _path: string;
411
- find: (
412
- params?: Service.FullInvoice.Find.Params
413
- ) => Promise<Service.FullInvoice.Find.Result>;
414
- get: (
415
- id: Service.FullInvoice.Get.ID,
416
- params?: Service.FullInvoice.Get.Params
417
- ) => Promise<Service.FullInvoice.Get.Result>;
418
- create: (
419
- body: Service.FullInvoice.Create.Body
420
- ) => Promise<Service.FullInvoice.Create.Result>;
421
- update: (
422
- id: Service.FullInvoice.Update.ID,
423
- body: Service.FullInvoice.Update.Body
424
- ) => Promise<Service.FullInvoice.Update.Result>;
425
- };
426
- proforma: {
427
- _path: string;
428
- find: (
429
- params?: Service.Proforma.Find.Params
430
- ) => Promise<Service.Proforma.Find.Result>;
431
- get: (
432
- id: Service.Proforma.Get.ID,
433
- params?: Service.Proforma.Get.Params
434
- ) => Promise<Service.Proforma.Get.Result>;
435
- create: (
436
- body: Service.Proforma.Create.Body
437
- ) => Promise<Service.Proforma.Create.Result>;
438
- update: (
439
- id: Service.Proforma.Update.ID,
440
- body: Service.Proforma.Update.Body
441
- ) => Promise<Service.Proforma.Update.Result>;
442
- };
443
- payment: {
444
- _path: string;
445
- find: (
446
- params?: Service.Payment.Find.Params
447
- ) => Promise<Service.Payment.Find.Result>;
448
- get: (
449
- id: Service.Payment.Get.ID,
450
- params?: Service.Payment.Get.Params
451
- ) => Promise<Service.Payment.Get.Result>;
452
- create: (
453
- body: Service.Payment.Create.Body
454
- ) => Promise<Service.Payment.Create.Result>;
455
- update: (
456
- id: Service.Payment.Update.ID,
457
- body: Service.Payment.Update.Body
458
- ) => Promise<Service.Payment.Update.Result>;
459
- };
460
- refund: {
461
- _path: string;
462
- find: (
463
- params?: Service.Refund.Find.Params
464
- ) => Promise<Service.Refund.Find.Result>;
465
- get: (
466
- id: Service.Refund.Get.ID,
467
- params?: Service.Refund.Get.Params
468
- ) => Promise<Service.Refund.Get.Result>;
469
- create: (
470
- body: Service.Refund.Create.Body
471
- ) => Promise<Service.Refund.Create.Result>;
472
- update: (
473
- id: Service.Refund.Update.ID,
474
- body: Service.Refund.Update.Body
475
- ) => Promise<Service.Refund.Update.Result>;
476
- };
477
- transfer: {
478
- _path: string;
479
- find: (
480
- params?: Service.Transfer.Find.Params
481
- ) => Promise<Service.Transfer.Find.Result>;
482
- get: (
483
- id: Service.Transfer.Get.ID,
484
- params?: Service.Transfer.Get.Params
485
- ) => Promise<Service.Transfer.Get.Result>;
486
- create: (
487
- body: Service.Transfer.Create.Body
488
- ) => Promise<Service.Transfer.Create.Result>;
489
- update: (
490
- id: Service.Transfer.Update.ID,
491
- body: Service.Transfer.Update.Body
492
- ) => Promise<Service.Transfer.Update.Result>;
493
- };
494
- adjustInventory: {
495
- _path: string;
496
- find: (
497
- params?: Service.AdjustInventory.Find.Params
498
- ) => Promise<Service.AdjustInventory.Find.Result>;
499
- get: (
500
- id: Service.AdjustInventory.Get.ID,
501
- params?: Service.AdjustInventory.Get.Params
502
- ) => Promise<Service.AdjustInventory.Get.Result>;
503
- create: (
504
- body: Service.AdjustInventory.Create.Body
505
- ) => Promise<Service.AdjustInventory.Create.Result>;
506
- };
507
- inventory: {
508
- _path: string;
509
- find: (
510
- params?: Service.Inventory.Find.Params
511
- ) => Promise<Service.Inventory.Find.Result>;
512
- };
513
- integrationApp: {
514
- _path: string;
515
- find: (
516
- params?: Service.App.Find.Params
517
- ) => Promise<Service.App.Find.Result>;
518
- get: (
519
- id: Service.App.Get.ID,
520
- params?: Service.App.Find.Params
521
- ) => Promise<Service.App.Get.Result>;
522
- create: (
523
- body: Service.App.Create.Body
524
- ) => Promise<Service.App.Create.Result>;
525
- update: (
526
- id: Service.App.Update.ID,
527
- body: Service.App.Update.Body
528
- ) => Promise<Service.App.Update.Result>;
529
- };
530
- joinActionsWebHook: {
531
- _path: string;
532
- update: (
533
- id: null,
534
- body: Service.JoinActionsWeHook.Data
535
- ) => Promise<Service.JoinActionsWeHook.Result>;
536
- };
537
- static ActionLogs: {
538
- new (superThis: Repzo, sync_id: string): {
539
- _path: string;
540
- available_app_name: string;
541
- available_app_id: StringId;
542
- app_id: StringId;
543
- action: string;
544
- status: Service.ActionLogs.Status;
545
- error?: any;
546
- start_time: number;
547
- end_time?: number | undefined;
548
- total_time?: number | undefined;
549
- company_namespace?: NameSpaces | undefined;
550
- body?: any;
551
- meta?: any;
552
- message: string;
553
- details: Service.ActionLogs.Detail[];
554
- sync_id: string;
555
- isOld: boolean;
556
- superThis: Repzo;
557
- load(sync_id: string): Promise<any>;
558
- setStatus(status: Service.ActionLogs.Status, error?: any): any;
559
- setBody(body: any): any;
560
- setMeta(meta: any): any;
561
- commit(): Promise<any>;
562
- addDetail(detail: string, meta?: any): any;
563
- };
564
- };
565
- static CommandLog: {
566
- new (
567
- superThis: Repzo,
568
- app: Service.App.Schema_with_populated_AvailableApp,
569
- command: string,
570
- trigger?: string
571
- ): {
572
- _path: string;
573
- available_app_name: string;
574
- available_app_id: StringId;
575
- app_id: StringId;
576
- command: string;
577
- status: Service.CommandLog.Status;
578
- error?: any;
579
- start_time: number;
580
- end_time?: number | undefined;
581
- total_time?: number | undefined;
582
- company_namespace: NameSpaces;
583
- body?: any;
584
- meta?: any;
585
- message: string;
586
- details: Service.CommandLog.Detail[];
587
- sync_id: string;
588
- isOld: boolean;
589
- priority?: number | undefined;
590
- isPrioritized: boolean;
591
- retries: number;
592
- queuedAt?: Date | undefined;
593
- failedAt?: Date | undefined;
594
- succeededAt?: Date | undefined;
595
- skippedAt?: Date | undefined;
596
- receivedAt?: Date | undefined;
597
- processedAt?: Date | undefined;
598
- onGoing: boolean;
599
- trigger?: string | undefined;
600
- superThis: Repzo;
601
- load(sync_id?: string, retries?: number): Promise<any>;
602
- setStatus(status: Service.CommandLog.Status, error?: any): any;
603
- setBody(body: any): any;
604
- setMeta(meta: any): any;
605
- commit(): Promise<any>;
606
- addDetail(detail: string, meta?: any): any;
607
- };
608
- };
609
- patchAction: {
610
- _path: string;
611
- create: (
612
- body: Service.PatchAction.Create.Body,
613
- params?: Service.PatchAction.Create.Params
614
- ) => Promise<Service.PatchAction.Create.Result>;
615
- update: (
616
- body: Service.PatchAction.Update.Body
617
- ) => Promise<Service.PatchAction.Update.Result>;
618
- };
619
- updateIntegrationMeta: {
620
- _path: string;
621
- create: (
622
- body: Service.UpdateIntegrationMeta.Create.Body,
623
- params?: Service.UpdateIntegrationMeta.Create.Params
624
- ) => Promise<Service.UpdateIntegrationMeta.Create.Result>;
625
- };
3
+ private svAPIEndpoint;
4
+ headers: Headers;
5
+ constructor(apiKey: string, options?: Options);
6
+ private _fetch;
7
+ private _create;
8
+ private _update;
9
+ private _delete;
10
+ client: {
11
+ _path: string;
12
+ find: (params?: Service.Client.Find.Params) => Promise<Service.Client.Find.Result>;
13
+ get: (id: Service.Client.Get.ID, params?: Service.Client.Get.Params) => Promise<Service.Client.Get.Result>;
14
+ create: (body: Service.Client.Create.Body) => Promise<Service.Client.Create.Result>;
15
+ update: (id: Service.Client.Update.ID, body: Service.Client.Update.Body) => Promise<Service.Client.Update.Result>;
16
+ remove: (id: Service.Client.Remove.ID) => Promise<Service.Client.Remove.Result>;
17
+ };
18
+ product: {
19
+ _path: string;
20
+ find: (params?: Service.Product.Find.Params) => Promise<Service.Product.Find.Result>;
21
+ get: (id: Service.Product.Get.ID, params?: Service.Product.Get.Params) => Promise<Service.Product.Get.Result>;
22
+ create: (body: Service.Product.Create.Body) => Promise<Service.Product.Create.Result>;
23
+ update: (id: Service.Product.Update.ID, body: Service.Product.Update.Body) => Promise<Service.Product.Update.Result>;
24
+ remove: (id: Service.Product.Remove.ID) => Promise<Service.Product.Remove.Result>;
25
+ };
26
+ variant: {
27
+ _path: string;
28
+ find: (params?: Service.Variant.Find.Params) => Promise<Service.Variant.Find.Result>;
29
+ get: (id: Service.Variant.Get.ID, params?: Service.Variant.Get.Params) => Promise<Service.Variant.Get.Result>;
30
+ create: (body: Service.Variant.Create.Body) => Promise<Service.Variant.Create.Result>;
31
+ update: (id: Service.Variant.Update.ID, body: Service.Variant.Update.Body) => Promise<Service.Variant.Update.Result>;
32
+ remove: (id: Service.Variant.Remove.ID) => Promise<Service.Variant.Remove.Result>;
33
+ };
34
+ category: {
35
+ _path: string;
36
+ find: (params?: Service.Category.Find.Params) => Promise<Service.Category.Find.Result>;
37
+ get: (id: Service.Category.Get.ID) => Promise<Service.Category.Get.Result>;
38
+ create: (body: Service.Category.Create.Body) => Promise<Service.Category.Create.Result>;
39
+ update: (id: Service.Category.Update.ID, body: Service.Category.Update.Body) => Promise<Service.Category.Update.Result>;
40
+ remove: (id: Service.Category.Remove.ID) => Promise<Service.Category.Remove.Result>;
41
+ };
42
+ sub_category: {
43
+ _path: string;
44
+ find: (params?: Service.SubCategory.Find.Params) => Promise<Service.SubCategory.Find.Result>;
45
+ get: (id: Service.SubCategory.Get.ID, params?: Service.SubCategory.Get.Params) => Promise<Service.SubCategory.Get.Result>;
46
+ create: (body: Service.SubCategory.Create.Body) => Promise<Service.SubCategory.Create.Result>;
47
+ update: (id: Service.SubCategory.Update.ID, body: Service.SubCategory.Update.Body) => Promise<Service.SubCategory.Update.Result>;
48
+ remove: (id: Service.SubCategory.Remove.ID) => Promise<Service.SubCategory.Remove.Result>;
49
+ };
50
+ brand: {
51
+ _path: string;
52
+ find: (params?: Service.Brand.Find.Params) => Promise<Service.Brand.Find.Result>;
53
+ get: (id: Service.Brand.Get.ID) => Promise<Service.Brand.Get.Result>;
54
+ create: (body: Service.Brand.Create.Body) => Promise<Service.Brand.Create.Result>;
55
+ update: (id: Service.Brand.Update.ID, body: Service.Brand.Update.Body) => Promise<Service.Brand.Update.Result>;
56
+ remove: (id: Service.Brand.Remove.ID) => Promise<Service.Brand.Remove.Result>;
57
+ };
58
+ product_group: {
59
+ _path: string;
60
+ find: (params?: Service.ProductGroup.Find.Params) => Promise<Service.ProductGroup.Find.Result>;
61
+ get: (id: Service.ProductGroup.Get.ID) => Promise<Service.ProductGroup.Get.Result>;
62
+ create: (body: Service.ProductGroup.Create.Body) => Promise<Service.ProductGroup.Create.Result>;
63
+ update: (id: Service.ProductGroup.Update.ID, body: Service.ProductGroup.Update.Body) => Promise<Service.ProductGroup.Update.Result>;
64
+ remove: (id: Service.ProductGroup.Remove.ID) => Promise<Service.ProductGroup.Remove.Result>;
65
+ };
66
+ tax: {
67
+ _path: string;
68
+ find: (params?: Service.Tax.Find.Params) => Promise<Service.Tax.Find.Result>;
69
+ get: (id: Service.Tax.Get.ID) => Promise<Service.Tax.Get.Result>;
70
+ create: (body: Service.Tax.Create.Body) => Promise<Service.Tax.Create.Result>;
71
+ update: (id: Service.Tax.Update.ID, body: Service.Tax.Update.Body) => Promise<Service.Tax.Update.Result>;
72
+ remove: (id: Service.Tax.Remove.ID) => Promise<Service.Tax.Remove.Result>;
73
+ };
74
+ measureunit: {
75
+ _path: string;
76
+ find: (params?: Service.MeasureUnit.Find.Params) => Promise<Service.MeasureUnit.Find.Result>;
77
+ get: (id: Service.MeasureUnit.Get.ID) => Promise<Service.MeasureUnit.Get.Result>;
78
+ create: (body: Service.MeasureUnit.Create.Body) => Promise<Service.MeasureUnit.Create.Result>;
79
+ update: (id: Service.MeasureUnit.Update.ID, body: Service.MeasureUnit.Update.Body) => Promise<Service.MeasureUnit.Update.Result>;
80
+ remove: (id: Service.MeasureUnit.Remove.ID) => Promise<Service.MeasureUnit.Remove.Result>;
81
+ };
82
+ measureunitFamily: {
83
+ _path: string;
84
+ find: (params?: Service.MeasureUnitFamily.Find.Params) => Promise<Service.MeasureUnitFamily.Find.Result>;
85
+ get: (id: Service.MeasureUnitFamily.Get.ID) => Promise<Service.MeasureUnitFamily.Get.Result>;
86
+ create: (body: Service.MeasureUnitFamily.Create.Body) => Promise<Service.MeasureUnitFamily.Create.Result>;
87
+ update: (id: Service.MeasureUnitFamily.Update.ID, body: Service.MeasureUnitFamily.Update.Body) => Promise<Service.MeasureUnitFamily.Update.Result>;
88
+ remove: (id: Service.MeasureUnitFamily.Remove.ID) => Promise<Service.MeasureUnitFamily.Remove.Result>;
89
+ };
90
+ media: {
91
+ _path: string;
92
+ find: (params?: Service.Media.Find.Params) => Promise<Service.Media.Find.Result>;
93
+ get: (id: Service.Media.Get.ID) => Promise<Service.Media.Get.Result>;
94
+ create: (body: Service.Media.Create.Body) => Promise<Service.Media.Create.Result>;
95
+ update: (id: Service.Media.Update.ID, body: Service.Media.Update.Body) => Promise<Service.Media.Update.Result>;
96
+ remove: (id: Service.Media.Remove.ID) => Promise<Service.Media.Remove.Result>;
97
+ };
98
+ priceList: {
99
+ _path: string;
100
+ find: (params?: Service.PriceList.Find.Params) => Promise<Service.PriceList.Find.Result>;
101
+ get: (id: Service.PriceList.Get.ID) => Promise<Service.PriceList.Get.Result>;
102
+ create: (body: Service.PriceList.Create.Body) => Promise<Service.PriceList.Create.Result>;
103
+ update: (id: Service.PriceList.Update.ID, body: Service.PriceList.Update.Body) => Promise<Service.PriceList.Update.Result>;
104
+ remove: (id: Service.PriceList.Remove.ID) => Promise<Service.PriceList.Remove.Result>;
105
+ };
106
+ priceListItem: {
107
+ _path: string;
108
+ find: (params?: Service.PriceListItem.Find.Params) => Promise<Service.PriceListItem.Find.Result>;
109
+ get: (id: Service.PriceListItem.Get.ID) => Promise<Service.PriceListItem.Get.Result>;
110
+ create: (body: Service.PriceListItem.Create.Body) => Promise<Service.PriceListItem.Create.Result>;
111
+ update: (id: Service.PriceListItem.Update.ID, body: Service.PriceListItem.Update.Body) => Promise<Service.PriceListItem.Update.Result>;
112
+ remove: (id: Service.PriceListItem.Remove.ID) => Promise<Service.PriceListItem.Remove.Result>;
113
+ };
114
+ team: {
115
+ _path: string;
116
+ find: (params?: Service.Team.Find.Params) => Promise<Service.Team.Find.Result>;
117
+ get: (id: Service.Team.Get.ID) => Promise<Service.Team.Get.Result>;
118
+ create: (body: Service.Team.Create.Body) => Promise<Service.Team.Create.Result>;
119
+ update: (id: Service.Team.Update.ID, body: Service.Team.Update.Body) => Promise<Service.Team.Update.Result>;
120
+ remove: (id: Service.Team.Remove.ID) => Promise<Service.Team.Remove.Result>;
121
+ };
122
+ rep: {
123
+ _path: string;
124
+ find: (params?: Service.Rep.Find.Params) => Promise<Service.Rep.Find.Result>;
125
+ get: (id: Service.Rep.Get.ID, params?: Service.Client.Get.Params) => Promise<Service.Rep.Get.Result>;
126
+ create: (body: Service.Rep.Create.Body) => Promise<Service.Rep.Create.Result>;
127
+ update: (id: Service.Rep.Update.ID, body: Service.Rep.Update.Body) => Promise<Service.Rep.Update.Result>;
128
+ remove: (id: Service.Rep.Remove.ID) => Promise<Service.Rep.Remove.Result>;
129
+ };
130
+ tag: {
131
+ _path: string;
132
+ find: (params?: Service.Tag.Find.Params) => Promise<Service.Tag.Find.Result>;
133
+ get: (id: Service.Tag.Get.ID) => Promise<Service.Tag.Get.Result>;
134
+ create: (body: Service.Tag.Create.Body) => Promise<Service.Tag.Create.Result>;
135
+ update: (id: Service.Tag.Update.ID, body: Service.Tag.Update.Body) => Promise<Service.Tag.Update.Result>;
136
+ remove: (id: Service.Tag.Remove.ID) => Promise<Service.Tag.Remove.Result>;
137
+ };
138
+ warehouse: {
139
+ _path: string;
140
+ find: (params?: Service.Warehouse.Find.Params) => Promise<Service.Warehouse.Find.Result>;
141
+ get: (id: Service.Warehouse.Get.ID) => Promise<Service.Warehouse.Get.Result>;
142
+ create: (body: Service.Warehouse.Create.Body) => Promise<Service.Warehouse.Create.Result>;
143
+ update: (id: Service.Warehouse.Update.ID, body: Service.Warehouse.Update.Body) => Promise<Service.Warehouse.Update.Result>;
144
+ remove: (id: Service.Warehouse.Remove.ID) => Promise<Service.Warehouse.Remove.Result>;
145
+ };
146
+ channel: {
147
+ _path: string;
148
+ find: (params?: Service.Channel.Find.Params) => Promise<Service.Channel.Find.Result>;
149
+ get: (id: Service.Channel.Get.ID) => Promise<Service.Channel.Get.Result>;
150
+ create: (body: Service.Channel.Create.Body) => Promise<Service.Channel.Create.Result>;
151
+ update: (id: Service.Channel.Update.ID, body: Service.Channel.Update.Body) => Promise<Service.Channel.Update.Result>;
152
+ remove: (id: Service.Channel.Remove.ID) => Promise<Service.Channel.Remove.Result>;
153
+ };
154
+ paymentTerm: {
155
+ _path: string;
156
+ find: (params?: Service.PaymentTerm.Find.Params) => Promise<Service.PaymentTerm.Find.Result>;
157
+ get: (id: Service.PaymentTerm.Get.ID) => Promise<Service.PaymentTerm.Get.Result>;
158
+ create: (body: Service.PaymentTerm.Create.Body) => Promise<Service.PaymentTerm.Create.Result>;
159
+ update: (id: Service.PaymentTerm.Update.ID, body: Service.PaymentTerm.Update.Body) => Promise<Service.PaymentTerm.Update.Result>;
160
+ remove: (id: Service.PaymentTerm.Remove.ID) => Promise<Service.PaymentTerm.Remove.Result>;
161
+ };
162
+ bank: {
163
+ _path: string;
164
+ find: (params?: Service.Bank.Find.Params) => Promise<Service.Bank.Find.Result>;
165
+ get: (id: Service.Bank.Get.ID) => Promise<Service.Bank.Get.Result>;
166
+ create: (body: Service.Bank.Create.Body) => Promise<Service.Bank.Create.Result>;
167
+ update: (id: Service.Bank.Update.ID, body: Service.Bank.Update.Body) => Promise<Service.Bank.Update.Result>;
168
+ };
169
+ bank_list: {
170
+ _path: string;
171
+ find: (params?: Service.BankList.Find.Params) => Promise<Service.BankList.Find.Result>;
172
+ get: (id: Service.BankList.Get.ID) => Promise<Service.BankList.Get.Result>;
173
+ create: (body: Service.BankList.Create.Body) => Promise<Service.BankList.Create.Result>;
174
+ update: (id: Service.BankList.Update.ID, body: Service.BankList.Update.Body) => Promise<Service.BankList.Update.Result>;
175
+ };
176
+ customStatus: {
177
+ _path: string;
178
+ find: (params?: Service.CustomStatus.Find.Params) => Promise<Service.CustomStatus.Find.Result>;
179
+ get: (id: Service.CustomStatus.Get.ID) => Promise<Service.CustomStatus.Get.Result>;
180
+ create: (body: Service.CustomStatus.Create.Body) => Promise<Service.CustomStatus.Create.Result>;
181
+ update: (id: Service.CustomStatus.Update.ID, body: Service.CustomStatus.Update.Body) => Promise<Service.CustomStatus.Update.Result>;
182
+ remove: (id: Service.CustomStatus.Remove.ID) => Promise<Service.CustomStatus.Remove.Result>;
183
+ };
184
+ workorder: {
185
+ _path: string;
186
+ find: (params?: Service.Workorder.Find.Params) => Promise<Service.Workorder.Find.Result>;
187
+ get: (id: Service.Workorder.Get.ID, params?: Service.Workorder.Get.Params) => Promise<Service.Workorder.Get.Result>;
188
+ };
189
+ invoice: {
190
+ _path: string;
191
+ find: (params?: Service.FullInvoice.Find.Params) => Promise<Service.FullInvoice.Find.Result>;
192
+ get: (id: Service.FullInvoice.Get.ID, params?: Service.FullInvoice.Get.Params) => Promise<Service.FullInvoice.Get.Result>;
193
+ create: (body: Service.FullInvoice.Create.Body) => Promise<Service.FullInvoice.Create.Result>;
194
+ update: (id: Service.FullInvoice.Update.ID, body: Service.FullInvoice.Update.Body) => Promise<Service.FullInvoice.Update.Result>;
195
+ };
196
+ proforma: {
197
+ _path: string;
198
+ find: (params?: Service.Proforma.Find.Params) => Promise<Service.Proforma.Find.Result>;
199
+ get: (id: Service.Proforma.Get.ID, params?: Service.Proforma.Get.Params) => Promise<Service.Proforma.Get.Result>;
200
+ create: (body: Service.Proforma.Create.Body) => Promise<Service.Proforma.Create.Result>;
201
+ update: (id: Service.Proforma.Update.ID, body: Service.Proforma.Update.Body) => Promise<Service.Proforma.Update.Result>;
202
+ };
203
+ payment: {
204
+ _path: string;
205
+ find: (params?: Service.Payment.Find.Params) => Promise<Service.Payment.Find.Result>;
206
+ get: (id: Service.Payment.Get.ID, params?: Service.Payment.Get.Params) => Promise<Service.Payment.Get.Result>;
207
+ create: (body: Service.Payment.Create.Body) => Promise<Service.Payment.Create.Result>;
208
+ update: (id: Service.Payment.Update.ID, body: Service.Payment.Update.Body) => Promise<Service.Payment.Update.Result>;
209
+ };
210
+ refund: {
211
+ _path: string;
212
+ find: (params?: Service.Refund.Find.Params) => Promise<Service.Refund.Find.Result>;
213
+ get: (id: Service.Refund.Get.ID, params?: Service.Refund.Get.Params) => Promise<Service.Refund.Get.Result>;
214
+ create: (body: Service.Refund.Create.Body) => Promise<Service.Refund.Create.Result>;
215
+ update: (id: Service.Refund.Update.ID, body: Service.Refund.Update.Body) => Promise<Service.Refund.Update.Result>;
216
+ };
217
+ transfer: {
218
+ _path: string;
219
+ find: (params?: Service.Transfer.Find.Params) => Promise<Service.Transfer.Find.Result>;
220
+ get: (id: Service.Transfer.Get.ID, params?: Service.Transfer.Get.Params) => Promise<Service.Transfer.Get.Result>;
221
+ create: (body: Service.Transfer.Create.Body) => Promise<Service.Transfer.Create.Result>;
222
+ update: (id: Service.Transfer.Update.ID, body: Service.Transfer.Update.Body) => Promise<Service.Transfer.Update.Result>;
223
+ };
224
+ adjustInventory: {
225
+ _path: string;
226
+ find: (params?: Service.AdjustInventory.Find.Params) => Promise<Service.AdjustInventory.Find.Result>;
227
+ get: (id: Service.AdjustInventory.Get.ID, params?: Service.AdjustInventory.Get.Params) => Promise<Service.AdjustInventory.Get.Result>;
228
+ create: (body: Service.AdjustInventory.Create.Body) => Promise<Service.AdjustInventory.Create.Result>;
229
+ };
230
+ inventory: {
231
+ _path: string;
232
+ find: (params?: Service.Inventory.Find.Params) => Promise<Service.Inventory.Find.Result>;
233
+ };
234
+ integrationApp: {
235
+ _path: string;
236
+ find: (params?: Service.App.Find.Params) => Promise<Service.App.Find.Result>;
237
+ get: (id: Service.App.Get.ID, params?: Service.App.Find.Params) => Promise<Service.App.Get.Result>;
238
+ create: (body: Service.App.Create.Body) => Promise<Service.App.Create.Result>;
239
+ update: (id: Service.App.Update.ID, body: Service.App.Update.Body) => Promise<Service.App.Update.Result>;
240
+ };
241
+ joinActionsWebHook: {
242
+ _path: string;
243
+ update: (id: null, body: Service.JoinActionsWeHook.Data) => Promise<Service.JoinActionsWeHook.Result>;
244
+ };
245
+ static ActionLogs: {
246
+ new (superThis: Repzo, sync_id: string): {
247
+ _path: string;
248
+ available_app_name: string;
249
+ available_app_id: StringId;
250
+ app_id: StringId;
251
+ action: string;
252
+ status: Service.ActionLogs.Status;
253
+ error?: any;
254
+ start_time: number;
255
+ end_time?: number | undefined;
256
+ total_time?: number | undefined;
257
+ company_namespace?: NameSpaces | undefined;
258
+ body?: any;
259
+ meta?: any;
260
+ message: string;
261
+ details: Service.ActionLogs.Detail[];
262
+ sync_id: string;
263
+ isOld: boolean;
264
+ superThis: Repzo;
265
+ load(sync_id: string): Promise<any>;
266
+ setStatus(status: Service.ActionLogs.Status, error?: any): any;
267
+ setBody(body: any): any;
268
+ setMeta(meta: any): any;
269
+ commit(): Promise<any>;
270
+ addDetail(detail: string, meta?: any): any;
271
+ };
272
+ };
273
+ static CommandLog: {
274
+ new (superThis: Repzo, app: Service.App.Schema_with_populated_AvailableApp, command: string, trigger?: string): {
275
+ _path: string;
276
+ available_app_name: string;
277
+ available_app_id: StringId;
278
+ app_id: StringId;
279
+ command: string;
280
+ status: Service.CommandLog.Status;
281
+ error?: any;
282
+ start_time: number;
283
+ end_time?: number | undefined;
284
+ total_time?: number | undefined;
285
+ company_namespace: NameSpaces;
286
+ body?: any;
287
+ meta?: any;
288
+ message: string;
289
+ details: Service.CommandLog.Detail[];
290
+ sync_id: string;
291
+ isOld: boolean;
292
+ priority?: number | undefined;
293
+ isPrioritized: boolean;
294
+ retries: number;
295
+ queuedAt?: Date | undefined;
296
+ failedAt?: Date | undefined;
297
+ succeededAt?: Date | undefined;
298
+ skippedAt?: Date | undefined;
299
+ receivedAt?: Date | undefined;
300
+ processedAt?: Date | undefined;
301
+ onGoing: boolean;
302
+ trigger?: string | undefined;
303
+ superThis: Repzo;
304
+ load(sync_id?: string, retries?: number): Promise<any>;
305
+ setStatus(status: Service.CommandLog.Status, error?: any): any;
306
+ setBody(body: any): any;
307
+ setMeta(meta: any): any;
308
+ commit(): Promise<any>;
309
+ addDetail(detail: string, meta?: any): any;
310
+ };
311
+ };
312
+ patchAction: {
313
+ _path: string;
314
+ create: (body: Service.PatchAction.Create.Body, params?: Service.PatchAction.Create.Params) => Promise<Service.PatchAction.Create.Result>;
315
+ update: (body: Service.PatchAction.Update.Body) => Promise<Service.PatchAction.Update.Result>;
316
+ };
317
+ updateIntegrationMeta: {
318
+ _path: string;
319
+ create: (body: Service.UpdateIntegrationMeta.Create.Body, params?: Service.UpdateIntegrationMeta.Create.Params) => Promise<Service.UpdateIntegrationMeta.Create.Result>;
320
+ };
626
321
  }