@arascreative/erp-client 3.1.0 → 3.3.0
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/dist/generated/api.d.ts +306 -0
- package/dist/generated/api.d.ts.map +1 -1
- package/dist/generated/api.js +133 -0
- package/dist/generated/zod.d.ts +630 -0
- package/dist/generated/zod.d.ts.map +1 -1
- package/dist/generated/zod.js +110 -1
- package/package.json +2 -1
package/dist/generated/zod.js
CHANGED
|
@@ -370,7 +370,8 @@ export const listStockItemsResponse = zod.object({
|
|
|
370
370
|
"isActive": zod.boolean(),
|
|
371
371
|
"onHandQty": zod.number(),
|
|
372
372
|
"reservedQty": zod.number(),
|
|
373
|
-
"availableQty": zod.number()
|
|
373
|
+
"availableQty": zod.number(),
|
|
374
|
+
"imageUrl": zod.string().nullable()
|
|
374
375
|
})),
|
|
375
376
|
"page": zod.number(),
|
|
376
377
|
"pageSize": zod.number(),
|
|
@@ -396,6 +397,114 @@ export const createBatchBody = zod.object({
|
|
|
396
397
|
"receivedBy": zod.string().nullish(),
|
|
397
398
|
"recordedBy": zod.string().nullish()
|
|
398
399
|
});
|
|
400
|
+
/**
|
|
401
|
+
* Product setup contract covering catalog, shipping, payments, and assignment. Not implemented yet.
|
|
402
|
+
* @summary Create a product
|
|
403
|
+
*/
|
|
404
|
+
export const createProductBody = zod.object({
|
|
405
|
+
"requestedStatus": zod.string(),
|
|
406
|
+
"catalog": zod.object({
|
|
407
|
+
"categoryId": zod.string(),
|
|
408
|
+
"name": zod.string(),
|
|
409
|
+
"slug": zod.string(),
|
|
410
|
+
"classification": zod.string(),
|
|
411
|
+
"variants": zod.array(zod.object({
|
|
412
|
+
"code": zod.string(),
|
|
413
|
+
"attributes": zod.array(zod.object({
|
|
414
|
+
"name": zod.string(),
|
|
415
|
+
"value": zod.string()
|
|
416
|
+
})),
|
|
417
|
+
"sources": zod.array(zod.object({
|
|
418
|
+
"warehouseId": zod.string(),
|
|
419
|
+
"masterItemId": zod.string(),
|
|
420
|
+
"quantityPerUnit": zod.number()
|
|
421
|
+
})),
|
|
422
|
+
"weight": zod.object({
|
|
423
|
+
"value": zod.number(),
|
|
424
|
+
"unit": zod.string()
|
|
425
|
+
}).nullish(),
|
|
426
|
+
"pricing": zod.object({
|
|
427
|
+
"baseAmount": zod.number(),
|
|
428
|
+
"baseCurrency": zod.string(),
|
|
429
|
+
"sale": zod.object({
|
|
430
|
+
"amount": zod.number(),
|
|
431
|
+
"currency": zod.string(),
|
|
432
|
+
"startAt": zod.string(),
|
|
433
|
+
"endAt": zod.string()
|
|
434
|
+
}).nullish(),
|
|
435
|
+
"wholesale": zod.array(zod.object({
|
|
436
|
+
"minQty": zod.number(),
|
|
437
|
+
"amount": zod.number(),
|
|
438
|
+
"currency": zod.string()
|
|
439
|
+
}))
|
|
440
|
+
})
|
|
441
|
+
})),
|
|
442
|
+
"images": zod.array(zod.object({
|
|
443
|
+
"fileId": zod.string(),
|
|
444
|
+
"sortOrder": zod.number()
|
|
445
|
+
}))
|
|
446
|
+
}),
|
|
447
|
+
"shipping": zod.object({
|
|
448
|
+
"mode": zod.string(),
|
|
449
|
+
"flatAmount": zod.number(),
|
|
450
|
+
"useStoreDefaults": zod.boolean(),
|
|
451
|
+
"services": zod.array(zod.object({
|
|
452
|
+
"code": zod.string(),
|
|
453
|
+
"enabled": zod.boolean(),
|
|
454
|
+
"couriers": zod.array(zod.string())
|
|
455
|
+
})),
|
|
456
|
+
"extraFee": zod.number(),
|
|
457
|
+
"discount": zod.union([zod.unknown(), zod.null()]).optional(),
|
|
458
|
+
"display": zod.object({
|
|
459
|
+
"mergeExtraFee": zod.boolean(),
|
|
460
|
+
"showOriginalPrice": zod.boolean(),
|
|
461
|
+
"hideCouriers": zod.boolean(),
|
|
462
|
+
"hideOrigin": zod.boolean()
|
|
463
|
+
}),
|
|
464
|
+
"coverageCheck": zod.object({
|
|
465
|
+
"enabled": zod.boolean(),
|
|
466
|
+
"onUncovered": zod.string()
|
|
467
|
+
})
|
|
468
|
+
}),
|
|
469
|
+
"payments": zod.object({
|
|
470
|
+
"useStoreDefaults": zod.boolean(),
|
|
471
|
+
"methods": zod.array(zod.unknown()),
|
|
472
|
+
"tax": zod.object({
|
|
473
|
+
"enabled": zod.boolean(),
|
|
474
|
+
"ratePercent": zod.number(),
|
|
475
|
+
"priceIncludesTax": zod.boolean()
|
|
476
|
+
})
|
|
477
|
+
}),
|
|
478
|
+
"assignment": zod.object({
|
|
479
|
+
"distribution": zod.string(),
|
|
480
|
+
"members": zod.array(zod.object({
|
|
481
|
+
"userId": zod.string(),
|
|
482
|
+
"value": zod.number()
|
|
483
|
+
}))
|
|
484
|
+
})
|
|
485
|
+
});
|
|
486
|
+
/**
|
|
487
|
+
* @summary List supported couriers and their services
|
|
488
|
+
*/
|
|
489
|
+
export const listCouriersResponseItem = zod.object({
|
|
490
|
+
"code": zod.string(),
|
|
491
|
+
"name": zod.string(),
|
|
492
|
+
"services": zod.array(zod.string())
|
|
493
|
+
});
|
|
494
|
+
export const listCouriersResponse = zod.array(listCouriersResponseItem);
|
|
495
|
+
/**
|
|
496
|
+
* @summary List supported bank codes and names
|
|
497
|
+
*/
|
|
498
|
+
export const listBankCodesResponseItem = zod.object({
|
|
499
|
+
"code": zod.string(),
|
|
500
|
+
"name": zod.string().nullable()
|
|
501
|
+
});
|
|
502
|
+
export const listBankCodesResponse = zod.array(listBankCodesResponseItem);
|
|
503
|
+
/**
|
|
504
|
+
* @summary List supported payment channel codes
|
|
505
|
+
*/
|
|
506
|
+
export const listPaymentChannelsResponseItem = zod.string();
|
|
507
|
+
export const listPaymentChannelsResponse = zod.array(listPaymentChannelsResponseItem);
|
|
399
508
|
/**
|
|
400
509
|
* @summary Health check
|
|
401
510
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arascreative/erp-client",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"vitest": "latest",
|
|
53
53
|
"zod": "^3.24.2"
|
|
54
54
|
},
|
|
55
|
+
"dependencies": {},
|
|
55
56
|
"scripts": {
|
|
56
57
|
"codegen": "orval",
|
|
57
58
|
"build": "tsc -b",
|