repzo 1.0.44 → 1.0.46
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 +19 -0
- package/lib/index.js +40 -0
- package/lib/types/index.d.ts +3 -1
- package/package.json +1 -1
- package/src/index.ts +55 -0
- package/src/types/index.ts +3 -1
package/lib/index.d.ts
CHANGED
|
@@ -271,6 +271,25 @@ export default class Repzo {
|
|
|
271
271
|
) => Promise<Service.Team.Update.Result>;
|
|
272
272
|
remove: (id: Service.Team.Remove.ID) => Promise<Service.Team.Remove.Result>;
|
|
273
273
|
};
|
|
274
|
+
returnReason: {
|
|
275
|
+
_path: string;
|
|
276
|
+
find: (
|
|
277
|
+
params?: Service.ReturnReason.Find.Params
|
|
278
|
+
) => Promise<Service.ReturnReason.Find.Result>;
|
|
279
|
+
get: (
|
|
280
|
+
id: Service.ReturnReason.Get.ID
|
|
281
|
+
) => Promise<Service.ReturnReason.Get.Result>;
|
|
282
|
+
create: (
|
|
283
|
+
body: Service.ReturnReason.Create.Body
|
|
284
|
+
) => Promise<Service.ReturnReason.Create.Result>;
|
|
285
|
+
update: (
|
|
286
|
+
id: Service.ReturnReason.Update.ID,
|
|
287
|
+
body: Service.ReturnReason.Update.Body
|
|
288
|
+
) => Promise<Service.ReturnReason.Update.Result>;
|
|
289
|
+
remove: (
|
|
290
|
+
id: Service.ReturnReason.Remove.ID
|
|
291
|
+
) => Promise<Service.ReturnReason.Remove.Result>;
|
|
292
|
+
};
|
|
274
293
|
rep: {
|
|
275
294
|
_path: string;
|
|
276
295
|
find: (
|
package/lib/index.js
CHANGED
|
@@ -551,6 +551,46 @@ export default class Repzo {
|
|
|
551
551
|
return res;
|
|
552
552
|
},
|
|
553
553
|
};
|
|
554
|
+
this.returnReason = {
|
|
555
|
+
_path: "/return-reason",
|
|
556
|
+
find: async (params) => {
|
|
557
|
+
let res = await this._fetch(
|
|
558
|
+
this.svAPIEndpoint,
|
|
559
|
+
this.returnReason._path,
|
|
560
|
+
params
|
|
561
|
+
);
|
|
562
|
+
return res;
|
|
563
|
+
},
|
|
564
|
+
get: async (id) => {
|
|
565
|
+
return await this._fetch(
|
|
566
|
+
this.svAPIEndpoint,
|
|
567
|
+
this.returnReason._path + `/${id}`
|
|
568
|
+
);
|
|
569
|
+
},
|
|
570
|
+
create: async (body) => {
|
|
571
|
+
let res = await this._create(
|
|
572
|
+
this.svAPIEndpoint,
|
|
573
|
+
this.returnReason._path,
|
|
574
|
+
body
|
|
575
|
+
);
|
|
576
|
+
return res;
|
|
577
|
+
},
|
|
578
|
+
update: async (id, body) => {
|
|
579
|
+
let res = await this._update(
|
|
580
|
+
this.svAPIEndpoint,
|
|
581
|
+
this.returnReason._path + `/${id}`,
|
|
582
|
+
body
|
|
583
|
+
);
|
|
584
|
+
return res;
|
|
585
|
+
},
|
|
586
|
+
remove: async (id) => {
|
|
587
|
+
let res = await this._delete(
|
|
588
|
+
this.svAPIEndpoint,
|
|
589
|
+
this.returnReason._path + `/${id}`
|
|
590
|
+
);
|
|
591
|
+
return res;
|
|
592
|
+
},
|
|
593
|
+
};
|
|
554
594
|
this.rep = {
|
|
555
595
|
_path: "/rep",
|
|
556
596
|
find: async (params) => {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -722,6 +722,7 @@ export declare namespace Service {
|
|
|
722
722
|
category: string | Category.CategorySchema;
|
|
723
723
|
sub_category?: string[] | SubCategory.SubCategorySchema[];
|
|
724
724
|
sv_tax?: string | Tax.TaxSchema | Pick<Tax.TaxSchema, "_id" | "name">;
|
|
725
|
+
tax?: string | Tax.TaxSchema;
|
|
725
726
|
sv_measureUnit?:
|
|
726
727
|
| string
|
|
727
728
|
| MeasureUnit.MeasureUnitSchema
|
|
@@ -1206,7 +1207,7 @@ export declare namespace Service {
|
|
|
1206
1207
|
}
|
|
1207
1208
|
}
|
|
1208
1209
|
namespace Tax {
|
|
1209
|
-
type TaxType = "inclusive" | "additive"
|
|
1210
|
+
type TaxType = "inclusive" | "additive";
|
|
1210
1211
|
export interface TaxSchema {
|
|
1211
1212
|
_id: string;
|
|
1212
1213
|
name: string;
|
|
@@ -2714,6 +2715,7 @@ export declare namespace Service {
|
|
|
2714
2715
|
name?: string[] | string;
|
|
2715
2716
|
local_name?: string[] | string;
|
|
2716
2717
|
disabled?: boolean;
|
|
2718
|
+
from_updatedAt?: number;
|
|
2717
2719
|
[key: string]: any;
|
|
2718
2720
|
};
|
|
2719
2721
|
interface Result extends DefaultPaginationResult {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -829,6 +829,61 @@ export default class Repzo {
|
|
|
829
829
|
},
|
|
830
830
|
};
|
|
831
831
|
|
|
832
|
+
returnReason = {
|
|
833
|
+
_path: "/return-reason",
|
|
834
|
+
find: async (
|
|
835
|
+
params?: Service.ReturnReason.Find.Params
|
|
836
|
+
): Promise<Service.ReturnReason.Find.Result> => {
|
|
837
|
+
let res: Service.ReturnReason.Find.Result = await this._fetch(
|
|
838
|
+
this.svAPIEndpoint,
|
|
839
|
+
this.returnReason._path,
|
|
840
|
+
params
|
|
841
|
+
);
|
|
842
|
+
return res;
|
|
843
|
+
},
|
|
844
|
+
|
|
845
|
+
get: async (
|
|
846
|
+
id: Service.ReturnReason.Get.ID
|
|
847
|
+
): Promise<Service.ReturnReason.Get.Result> => {
|
|
848
|
+
return await this._fetch(
|
|
849
|
+
this.svAPIEndpoint,
|
|
850
|
+
this.returnReason._path + `/${id}`
|
|
851
|
+
);
|
|
852
|
+
},
|
|
853
|
+
create: async (
|
|
854
|
+
body: Service.ReturnReason.Create.Body
|
|
855
|
+
): Promise<Service.ReturnReason.Create.Result> => {
|
|
856
|
+
let res = await this._create(
|
|
857
|
+
this.svAPIEndpoint,
|
|
858
|
+
this.returnReason._path,
|
|
859
|
+
body
|
|
860
|
+
);
|
|
861
|
+
return res;
|
|
862
|
+
},
|
|
863
|
+
|
|
864
|
+
update: async (
|
|
865
|
+
id: Service.ReturnReason.Update.ID,
|
|
866
|
+
body: Service.ReturnReason.Update.Body
|
|
867
|
+
): Promise<Service.ReturnReason.Update.Result> => {
|
|
868
|
+
let res: Service.ReturnReason.Update.Result = await this._update(
|
|
869
|
+
this.svAPIEndpoint,
|
|
870
|
+
this.returnReason._path + `/${id}`,
|
|
871
|
+
body
|
|
872
|
+
);
|
|
873
|
+
return res;
|
|
874
|
+
},
|
|
875
|
+
|
|
876
|
+
remove: async (
|
|
877
|
+
id: Service.ReturnReason.Remove.ID
|
|
878
|
+
): Promise<Service.ReturnReason.Remove.Result> => {
|
|
879
|
+
let res: Service.ReturnReason.Remove.Result = await this._delete(
|
|
880
|
+
this.svAPIEndpoint,
|
|
881
|
+
this.returnReason._path + `/${id}`
|
|
882
|
+
);
|
|
883
|
+
return res;
|
|
884
|
+
},
|
|
885
|
+
};
|
|
886
|
+
|
|
832
887
|
rep = {
|
|
833
888
|
_path: "/rep",
|
|
834
889
|
find: async (
|
package/src/types/index.ts
CHANGED
|
@@ -721,6 +721,7 @@ export namespace Service {
|
|
|
721
721
|
category: string | Category.CategorySchema;
|
|
722
722
|
sub_category?: string[] | SubCategory.SubCategorySchema[];
|
|
723
723
|
sv_tax?: string | Tax.TaxSchema | Pick<Tax.TaxSchema, "_id" | "name">;
|
|
724
|
+
tax?: string | Tax.TaxSchema;
|
|
724
725
|
sv_measureUnit?:
|
|
725
726
|
| string
|
|
726
727
|
| MeasureUnit.MeasureUnitSchema
|
|
@@ -1224,7 +1225,7 @@ export namespace Service {
|
|
|
1224
1225
|
}
|
|
1225
1226
|
|
|
1226
1227
|
export namespace Tax {
|
|
1227
|
-
type TaxType = "inclusive" | "additive"
|
|
1228
|
+
type TaxType = "inclusive" | "additive";
|
|
1228
1229
|
export interface TaxSchema {
|
|
1229
1230
|
_id: string;
|
|
1230
1231
|
name: string;
|
|
@@ -2758,6 +2759,7 @@ export namespace Service {
|
|
|
2758
2759
|
name?: string[] | string;
|
|
2759
2760
|
local_name?: string[] | string;
|
|
2760
2761
|
disabled?: boolean;
|
|
2762
|
+
from_updatedAt?: number;
|
|
2761
2763
|
[key: string]: any; // integration_meta.
|
|
2762
2764
|
};
|
|
2763
2765
|
export interface Result extends DefaultPaginationResult {
|