repzo 1.0.51 → 1.0.53

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.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import axios from "axios";
2
2
  import { v4 as uuid } from "uuid";
3
- class Repzo {
3
+ export default class Repzo {
4
4
  constructor(apiKey, options) {
5
5
  this.client = {
6
6
  _path: "/client",
@@ -1101,4 +1101,3 @@ Repzo.CommandLog = class {
1101
1101
  return this;
1102
1102
  }
1103
1103
  };
1104
- export default Repzo;
@@ -2838,6 +2838,7 @@ export declare namespace Service {
2838
2838
  product_barcode?: string;
2839
2839
  variant_sku?: string;
2840
2840
  variant_barcode?: string;
2841
+ _id: string;
2841
2842
  }
2842
2843
  export interface Schema {
2843
2844
  _id: string;
@@ -4047,6 +4048,7 @@ export declare namespace Service {
4047
4048
  export interface ProformaSchema {
4048
4049
  _id: string;
4049
4050
  items: Item.Schema[];
4051
+ return_items: Item.Schema[];
4050
4052
  integration_meta?: {
4051
4053
  [key: string]: any;
4052
4054
  };
@@ -4063,6 +4065,7 @@ export declare namespace Service {
4063
4065
  delivery_date?: string;
4064
4066
  currency: string;
4065
4067
  serial_number: SerialNumber;
4068
+ return_serial_number?: SerialNumber;
4066
4069
  geo_tag?: {
4067
4070
  type: "Point";
4068
4071
  coordinates: number[];
@@ -4155,6 +4158,7 @@ export declare namespace Service {
4155
4158
  }
4156
4159
  interface CreateBody {
4157
4160
  items: Item.Schema[];
4161
+ return_items?: Item.Schema[];
4158
4162
  integration_meta?: {
4159
4163
  [key: string]: any;
4160
4164
  };
@@ -4170,6 +4174,7 @@ export declare namespace Service {
4170
4174
  delivery_date?: string;
4171
4175
  currency?: string;
4172
4176
  serial_number?: SerialNumber;
4177
+ return_serial_number?: SerialNumber;
4173
4178
  geo_tag?: {
4174
4179
  type: "Point";
4175
4180
  coordinates: number[];
@@ -4255,6 +4260,7 @@ export declare namespace Service {
4255
4260
  interface UpdateBody {
4256
4261
  _id?: string;
4257
4262
  items?: Item.Schema[];
4263
+ return_items?: Item.Schema[];
4258
4264
  integration_meta?: {
4259
4265
  [key: string]: any;
4260
4266
  };
@@ -4271,6 +4277,7 @@ export declare namespace Service {
4271
4277
  delivery_date?: string;
4272
4278
  currency?: string;
4273
4279
  serial_number?: SerialNumber;
4280
+ return_serial_number?: SerialNumber;
4274
4281
  geo_tag?: {
4275
4282
  type: "Point";
4276
4283
  coordinates: number[];
@@ -4362,14 +4369,157 @@ export declare namespace Service {
4362
4369
  __v?: number;
4363
4370
  }
4364
4371
  type ProformaSchemaWithPopulatedKeys = ProformaSchema & {
4365
- items: (Item.Body & {
4366
- variant: Item.Item_Variant & {
4367
- variant_sku?: string;
4372
+ items: {
4373
+ variant: {
4374
+ product_name: string;
4375
+ variant_id: string | Pick<Variant.VariantSchema, "sku" | "_id" | "barcode">;
4376
+ product_id: string | Pick<Product.ProductSchema, "sku" | "_id" | "barcode">;
4377
+ variant_name: string;
4378
+ listed_price: number;
4379
+ variant_local_name?: string;
4380
+ variant_img?: string;
4381
+ product_local_name?: string;
4382
+ product_img?: string;
4368
4383
  product_sku?: string;
4384
+ product_barcode?: string;
4385
+ variant_sku?: string;
4369
4386
  variant_barcode?: string;
4387
+ };
4388
+ measureunit: {
4389
+ _id: string;
4390
+ name: string;
4391
+ factor: number;
4392
+ parent?: string;
4393
+ disabled?: boolean;
4394
+ company_namespace: string[];
4395
+ };
4396
+ tax: {
4397
+ name: string;
4398
+ rate: number;
4399
+ type: "inclusive" | "additive" | "N/A";
4400
+ disabled?: boolean;
4401
+ };
4402
+ promotions?: Promotion.Schema[];
4403
+ used_promotions?: {
4404
+ id: string;
4405
+ name: string;
4406
+ ref?: string;
4407
+ }[];
4408
+ general_promotions?: {
4409
+ id: string;
4410
+ name: string;
4411
+ ref?: string;
4412
+ }[];
4413
+ applicable_promotions?: {
4414
+ id: string;
4415
+ name: string;
4416
+ ref?: string;
4417
+ }[];
4418
+ modifiers_groups?: Item.ModifierGroup[];
4419
+ isAdditional?: boolean;
4420
+ qty: number;
4421
+ base_unit_qty?: number;
4422
+ overwritePrice?: number;
4423
+ price: number;
4424
+ discounted_price: number;
4425
+ tax_amount: number;
4426
+ tax_total: number;
4427
+ class: string;
4428
+ discount_value: number;
4429
+ gross_value?: number;
4430
+ line_total?: number;
4431
+ total_before_tax?: number;
4432
+ hidden_price?: number;
4433
+ modifiers_total?: number;
4434
+ modifiers_total_before_tax?: number;
4435
+ modifiers_tax_total?: number;
4436
+ tax_total_without_modifiers?: number;
4437
+ line_total_without_modifiers?: number;
4438
+ total_before_tax_without_modifiers?: number;
4439
+ deductionRatio?: number;
4440
+ deductedTax?: number;
4441
+ deduction?: number;
4442
+ deductionBeforeTax?: number;
4443
+ lineTotalAfterDeduction?: number;
4444
+ company_namespace?: string[];
4445
+ note?: string;
4446
+ }[];
4447
+ return_items: {
4448
+ variant: {
4449
+ product_name: string;
4450
+ variant_id: string | Pick<Variant.VariantSchema, "sku" | "_id" | "barcode">;
4451
+ product_id: string | Pick<Product.ProductSchema, "sku" | "_id" | "barcode">;
4452
+ variant_name: string;
4453
+ listed_price: number;
4454
+ variant_local_name?: string;
4455
+ variant_img?: string;
4456
+ product_local_name?: string;
4457
+ product_img?: string;
4458
+ product_sku?: string;
4370
4459
  product_barcode?: string;
4460
+ variant_sku?: string;
4461
+ variant_barcode?: string;
4371
4462
  };
4372
- })[];
4463
+ measureunit: {
4464
+ _id: string;
4465
+ name: string;
4466
+ factor: number;
4467
+ parent?: string;
4468
+ disabled?: boolean;
4469
+ company_namespace: string[];
4470
+ };
4471
+ tax: {
4472
+ name: string;
4473
+ rate: number;
4474
+ type: "inclusive" | "additive" | "N/A";
4475
+ disabled?: boolean;
4476
+ };
4477
+ promotions?: Promotion.Schema[];
4478
+ used_promotions?: {
4479
+ id: string;
4480
+ name: string;
4481
+ ref?: string;
4482
+ }[];
4483
+ general_promotions?: {
4484
+ id: string;
4485
+ name: string;
4486
+ ref?: string;
4487
+ }[];
4488
+ applicable_promotions?: {
4489
+ id: string;
4490
+ name: string;
4491
+ ref?: string;
4492
+ }[];
4493
+ modifiers_groups?: Item.ModifierGroup[];
4494
+ isAdditional?: boolean;
4495
+ qty: number;
4496
+ base_unit_qty?: number;
4497
+ overwritePrice?: number;
4498
+ price: number;
4499
+ discounted_price: number;
4500
+ tax_amount: number;
4501
+ tax_total: number;
4502
+ discount_value: number;
4503
+ gross_value?: number;
4504
+ line_total?: number;
4505
+ total_before_tax?: number;
4506
+ hidden_price?: number;
4507
+ modifiers_total?: number;
4508
+ modifiers_total_before_tax?: number;
4509
+ modifiers_tax_total?: number;
4510
+ tax_total_without_modifiers?: number;
4511
+ line_total_without_modifiers?: number;
4512
+ total_before_tax_without_modifiers?: number;
4513
+ deductionRatio?: number;
4514
+ deductedTax?: number;
4515
+ deduction?: number;
4516
+ deductionBeforeTax?: number;
4517
+ lineTotalAfterDeduction?: number;
4518
+ company_namespace?: string[];
4519
+ note?: string;
4520
+ class: string;
4521
+ return_reason?: string | ReturnReason.Schema;
4522
+ }[];
4373
4523
  client_id?: string | Client.ClientSchema;
4374
4524
  custom_status?: string | CustomStatus.CustomStatusSchema;
4375
4525
  cycle?: Cycle.Schema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
@@ -3128,6 +3128,7 @@ export namespace Service {
3128
3128
  product_barcode?: string;
3129
3129
  variant_sku?: string;
3130
3130
  variant_barcode?: string;
3131
+ _id: string;
3131
3132
  }
3132
3133
  export interface Schema {
3133
3134
  _id: string;
@@ -4390,6 +4391,7 @@ export namespace Service {
4390
4391
  export interface ProformaSchema {
4391
4392
  _id: string;
4392
4393
  items: Item.Schema[];
4394
+ return_items: Item.Schema[];
4393
4395
  integration_meta?: { [key: string]: any };
4394
4396
  external_serial_number?: string;
4395
4397
  processable?: boolean;
@@ -4404,6 +4406,7 @@ export namespace Service {
4404
4406
  delivery_date?: string;
4405
4407
  currency: string;
4406
4408
  serial_number: SerialNumber;
4409
+ return_serial_number?: SerialNumber;
4407
4410
  geo_tag?: {
4408
4411
  type: "Point";
4409
4412
  coordinates: number[];
@@ -4490,6 +4493,7 @@ export namespace Service {
4490
4493
  }
4491
4494
  interface CreateBody {
4492
4495
  items: Item.Schema[];
4496
+ return_items?: Item.Schema[];
4493
4497
  integration_meta?: { [key: string]: any };
4494
4498
  external_serial_number?: string;
4495
4499
  processable?: boolean;
@@ -4503,6 +4507,7 @@ export namespace Service {
4503
4507
  delivery_date?: string;
4504
4508
  currency?: string;
4505
4509
  serial_number?: SerialNumber;
4510
+ return_serial_number?: SerialNumber;
4506
4511
  geo_tag?: {
4507
4512
  type: "Point";
4508
4513
  coordinates: number[];
@@ -4582,6 +4587,7 @@ export namespace Service {
4582
4587
  interface UpdateBody {
4583
4588
  _id?: string;
4584
4589
  items?: Item.Schema[];
4590
+ return_items?: Item.Schema[];
4585
4591
  integration_meta?: { [key: string]: any };
4586
4592
  external_serial_number?: string;
4587
4593
  processable?: boolean;
@@ -4596,6 +4602,7 @@ export namespace Service {
4596
4602
  delivery_date?: string;
4597
4603
  currency?: string;
4598
4604
  serial_number?: SerialNumber;
4605
+ return_serial_number?: SerialNumber;
4599
4606
  geo_tag?: {
4600
4607
  type: "Point";
4601
4608
  coordinates: number[];
@@ -4682,14 +4689,141 @@ export namespace Service {
4682
4689
  }
4683
4690
 
4684
4691
  type ProformaSchemaWithPopulatedKeys = ProformaSchema & {
4685
- items: (Item.Body & {
4686
- variant: Item.Item_Variant & {
4687
- variant_sku?: string;
4692
+ items: {
4693
+ variant: {
4694
+ product_name: string;
4695
+ variant_id:
4696
+ | string
4697
+ | Pick<Variant.VariantSchema, "sku" | "_id" | "barcode">;
4698
+ product_id:
4699
+ | string
4700
+ | Pick<Product.ProductSchema, "sku" | "_id" | "barcode">;
4701
+ variant_name: string;
4702
+ listed_price: number;
4703
+ variant_local_name?: string;
4704
+ variant_img?: string;
4705
+ product_local_name?: string;
4706
+ product_img?: string;
4688
4707
  product_sku?: string;
4708
+ product_barcode?: string;
4709
+ variant_sku?: string;
4689
4710
  variant_barcode?: string;
4711
+ };
4712
+ measureunit: {
4713
+ _id: string;
4714
+ name: string;
4715
+ factor: number;
4716
+ parent?: string;
4717
+ disabled?: boolean;
4718
+ company_namespace: string[];
4719
+ };
4720
+ tax: {
4721
+ name: string;
4722
+ rate: number;
4723
+ type: "inclusive" | "additive" | "N/A";
4724
+ disabled?: boolean;
4725
+ };
4726
+ promotions?: Promotion.Schema[];
4727
+ used_promotions?: { id: string; name: string; ref?: string }[];
4728
+ general_promotions?: { id: string; name: string; ref?: string }[];
4729
+ applicable_promotions?: { id: string; name: string; ref?: string }[];
4730
+ modifiers_groups?: Item.ModifierGroup[];
4731
+ isAdditional?: boolean;
4732
+ qty: number;
4733
+ base_unit_qty?: number;
4734
+ overwritePrice?: number;
4735
+ price: number;
4736
+ discounted_price: number;
4737
+ tax_amount: number;
4738
+ tax_total: number;
4739
+ class: string;
4740
+ discount_value: number;
4741
+ gross_value?: number;
4742
+ line_total?: number;
4743
+ total_before_tax?: number;
4744
+ hidden_price?: number;
4745
+ modifiers_total?: number;
4746
+ modifiers_total_before_tax?: number;
4747
+ modifiers_tax_total?: number;
4748
+ tax_total_without_modifiers?: number;
4749
+ line_total_without_modifiers?: number;
4750
+ total_before_tax_without_modifiers?: number;
4751
+ deductionRatio?: number;
4752
+ deductedTax?: number;
4753
+ deduction?: number;
4754
+ deductionBeforeTax?: number;
4755
+ lineTotalAfterDeduction?: number;
4756
+ company_namespace?: string[];
4757
+ note?: string;
4758
+ }[];
4759
+ return_items: {
4760
+ variant: {
4761
+ product_name: string;
4762
+ variant_id:
4763
+ | string
4764
+ | Pick<Variant.VariantSchema, "sku" | "_id" | "barcode">;
4765
+ product_id:
4766
+ | string
4767
+ | Pick<Product.ProductSchema, "sku" | "_id" | "barcode">;
4768
+ variant_name: string;
4769
+ listed_price: number;
4770
+ variant_local_name?: string;
4771
+ variant_img?: string;
4772
+ product_local_name?: string;
4773
+ product_img?: string;
4774
+ product_sku?: string;
4690
4775
  product_barcode?: string;
4776
+ variant_sku?: string;
4777
+ variant_barcode?: string;
4691
4778
  };
4692
- })[];
4779
+ measureunit: {
4780
+ _id: string;
4781
+ name: string;
4782
+ factor: number;
4783
+ parent?: string;
4784
+ disabled?: boolean;
4785
+ company_namespace: string[];
4786
+ };
4787
+ tax: {
4788
+ name: string;
4789
+ rate: number;
4790
+ type: "inclusive" | "additive" | "N/A";
4791
+ disabled?: boolean;
4792
+ };
4793
+ promotions?: Promotion.Schema[];
4794
+ used_promotions?: { id: string; name: string; ref?: string }[];
4795
+ general_promotions?: { id: string; name: string; ref?: string }[];
4796
+ applicable_promotions?: { id: string; name: string; ref?: string }[];
4797
+ modifiers_groups?: Item.ModifierGroup[];
4798
+ isAdditional?: boolean;
4799
+ qty: number;
4800
+ base_unit_qty?: number;
4801
+ overwritePrice?: number;
4802
+ price: number;
4803
+ discounted_price: number;
4804
+ tax_amount: number;
4805
+ tax_total: number;
4806
+ discount_value: number;
4807
+ gross_value?: number;
4808
+ line_total?: number;
4809
+ total_before_tax?: number;
4810
+ hidden_price?: number;
4811
+ modifiers_total?: number;
4812
+ modifiers_total_before_tax?: number;
4813
+ modifiers_tax_total?: number;
4814
+ tax_total_without_modifiers?: number;
4815
+ line_total_without_modifiers?: number;
4816
+ total_before_tax_without_modifiers?: number;
4817
+ deductionRatio?: number;
4818
+ deductedTax?: number;
4819
+ deduction?: number;
4820
+ deductionBeforeTax?: number;
4821
+ lineTotalAfterDeduction?: number;
4822
+ company_namespace?: string[];
4823
+ note?: string;
4824
+ class: string;
4825
+ return_reason?: string | ReturnReason.Schema;
4826
+ }[];
4693
4827
  client_id?: string | Client.ClientSchema;
4694
4828
  custom_status?: string | CustomStatus.CustomStatusSchema;
4695
4829
  cycle?: Cycle.Schema;