repzo 1.0.283 → 1.0.285

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/changelog.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Release Notes
2
2
 
3
- ## [unreleased]()
3
+ ## [unreleased](<>)
4
4
 
5
5
  ### Added
6
6
 
package/lib/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export declare const end_points: {
11
11
  readonly MEASUREUNIT: "measureunits";
12
12
  readonly MEASUREUNIT_FAMILY: "measureunit-family";
13
13
  readonly MEDIA: "media";
14
+ readonly CYCLES: "cycles";
14
15
  readonly PRICELIST: "pricelists";
15
16
  readonly PRICELIST_ITEM: "pricelistsitems";
16
17
  readonly TEAM: "teams";
@@ -170,6 +171,7 @@ export default class Repzo {
170
171
  readonly MEASUREUNIT: "measureunits";
171
172
  readonly MEASUREUNIT_FAMILY: "measureunit-family";
172
173
  readonly MEDIA: "media";
174
+ readonly CYCLES: "cycles";
173
175
  readonly PRICELIST: "pricelists";
174
176
  readonly PRICELIST_ITEM: "pricelistsitems";
175
177
  readonly TEAM: "teams";
@@ -1200,6 +1202,11 @@ export default class Repzo {
1200
1202
  _path: "clm-fetch";
1201
1203
  find: (params?: Service.CLMFetch.Find.Params) => Promise<Service.CLMFetch.Find.Result>;
1202
1204
  };
1205
+ cycle: {
1206
+ _path: "cycles";
1207
+ find: (params?: Service.Cycle.Find.Params) => Promise<Service.Cycle.Find.Result>;
1208
+ get: (id: Service.Cycle.Get.ID, params?: Service.Cycle.Get.Params) => Promise<Service.Cycle.Get.Result>;
1209
+ };
1203
1210
  promotions: {
1204
1211
  _path: "promotions";
1205
1212
  find: (params?: Service.Promotion.Find.Params) => Promise<Service.Promotion.Find.Result>;
package/lib/index.js CHANGED
@@ -13,6 +13,7 @@ export const end_points = {
13
13
  MEASUREUNIT: "measureunits",
14
14
  MEASUREUNIT_FAMILY: "measureunit-family",
15
15
  MEDIA: "media",
16
+ CYCLES: "cycles",
16
17
  PRICELIST: "pricelists",
17
18
  PRICELIST_ITEM: "pricelistsitems",
18
19
  TEAM: "teams",
@@ -2389,6 +2390,16 @@ class Repzo {
2389
2390
  return res;
2390
2391
  },
2391
2392
  };
2393
+ this.cycle = {
2394
+ _path: Repzo._end_points.CYCLES,
2395
+ find: async (params) => {
2396
+ let res = await this._fetch(this.svAPIEndpoint, this.cycle._path, params);
2397
+ return res;
2398
+ },
2399
+ get: async (id, params) => {
2400
+ return await this._fetch(this.svAPIEndpoint, this.cycle._path + `/${id}`, params);
2401
+ },
2402
+ };
2392
2403
  this.promotions = {
2393
2404
  _path: Repzo._end_points.PROMOTIONS,
2394
2405
  find: async (params) => {
@@ -8513,10 +8513,7 @@ export declare namespace Service {
8513
8513
  status: CycleStatus;
8514
8514
  node?: AdminCreator | RepCreator | ClientCreator;
8515
8515
  creator?: AdminCreator | RepCreator | ClientCreator;
8516
- current_nodes: {
8517
- admin: string;
8518
- admin_name: string;
8519
- }[];
8516
+ current_nodes: (AdminCreator | RepCreator | ClientCreator)[];
8520
8517
  stage?: number;
8521
8518
  stageName?: string;
8522
8519
  company_namespace: string[];
@@ -8542,6 +8539,37 @@ export declare namespace Service {
8542
8539
  __v: number;
8543
8540
  }
8544
8541
  export type Data = Schema;
8542
+ export namespace Find {
8543
+ type Params = DefaultPaginationQueryParams & {
8544
+ sortBy?: {
8545
+ field: "_id";
8546
+ type: "asc" | "desc";
8547
+ }[];
8548
+ _id?: string | string[];
8549
+ document_id?: string | string[];
8550
+ document_type?: Schema["document_type"] | Schema["document_type"][];
8551
+ status?: CycleStatus | CycleStatus[];
8552
+ "creator._id"?: string | string[];
8553
+ disabled?: boolean;
8554
+ from_updatedAt?: number;
8555
+ to_updatedAt?: number;
8556
+ from_createdAt?: number;
8557
+ to_createdAt?: number;
8558
+ from__id?: string;
8559
+ to__id?: string;
8560
+ [key: string]: any;
8561
+ };
8562
+ interface Result extends DefaultPaginationResult {
8563
+ data: Schema[];
8564
+ }
8565
+ }
8566
+ export namespace Get {
8567
+ type ID = string;
8568
+ type Params = {
8569
+ [key: string]: any;
8570
+ };
8571
+ type Result = Schema;
8572
+ }
8545
8573
  export {};
8546
8574
  }
8547
8575
  namespace Transfer {
@@ -10987,6 +11015,7 @@ export declare namespace Service {
10987
11015
  _id: StringId;
10988
11016
  type: "invoice" | "proforma";
10989
11017
  processable?: boolean;
11018
+ product_source_msl?: "all_products" | "client" | "rep";
10990
11019
  failure_reasons: string[];
10991
11020
  external_serial_number?: string;
10992
11021
  qr_code_tlv?: string;
@@ -11196,6 +11225,7 @@ export declare namespace Service {
11196
11225
  processable?: boolean;
11197
11226
  failure_reasons: string[];
11198
11227
  external_serial_number?: string;
11228
+ product_source_msl?: "all_products" | "client" | "rep";
11199
11229
  skip_promos?: boolean;
11200
11230
  skipped_promotions: {
11201
11231
  _id: string;
@@ -16929,6 +16959,8 @@ export declare namespace Service {
16929
16959
  to_updatedAt?: number;
16930
16960
  from_createdAt?: number;
16931
16961
  to_createdAt?: number;
16962
+ from__id?: StringId;
16963
+ to__id?: StringId;
16932
16964
  with_counts?: boolean;
16933
16965
  with_cover?: boolean;
16934
16966
  };
@@ -17004,6 +17036,8 @@ export declare namespace Service {
17004
17036
  to_updatedAt?: number;
17005
17037
  from_createdAt?: number;
17006
17038
  to_createdAt?: number;
17039
+ from__id?: StringId;
17040
+ to__id?: StringId;
17007
17041
  };
17008
17042
  interface Result extends DefaultPaginationResult {
17009
17043
  data: PopulatedDoc[];
@@ -17085,6 +17119,8 @@ export declare namespace Service {
17085
17119
  to_updatedAt?: number;
17086
17120
  from_createdAt?: number;
17087
17121
  to_createdAt?: number;
17122
+ from__id?: StringId;
17123
+ to__id?: StringId;
17088
17124
  is_cover?: boolean;
17089
17125
  };
17090
17126
  interface Result extends DefaultPaginationResult {
@@ -17277,6 +17313,14 @@ export declare namespace Service {
17277
17313
  visit_id?: string | string[];
17278
17314
  visit?: StringId | StringId[];
17279
17315
  sync_id?: string | string[];
17316
+ from_updatedAt?: number;
17317
+ to_updatedAt?: number;
17318
+ from__id?: StringId;
17319
+ to__id?: StringId;
17320
+ sortBy?: {
17321
+ field: "_id";
17322
+ type: "asc" | "desc";
17323
+ }[];
17280
17324
  };
17281
17325
  interface Result extends DefaultPaginationResult {
17282
17326
  data: PopulatedDoc[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.283",
3
+ "version": "1.0.285",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -23,6 +23,7 @@ export const end_points = {
23
23
  MEASUREUNIT: "measureunits",
24
24
  MEASUREUNIT_FAMILY: "measureunit-family",
25
25
  MEDIA: "media",
26
+ CYCLES: "cycles",
26
27
  PRICELIST: "pricelists",
27
28
  PRICELIST_ITEM: "pricelistsitems",
28
29
  TEAM: "teams",
@@ -6007,6 +6008,30 @@ export default class Repzo {
6007
6008
  },
6008
6009
  };
6009
6010
 
6011
+ cycle = {
6012
+ _path: Repzo._end_points.CYCLES,
6013
+ find: async (
6014
+ params?: Service.Cycle.Find.Params,
6015
+ ): Promise<Service.Cycle.Find.Result> => {
6016
+ let res: Service.Cycle.Find.Result = await this._fetch(
6017
+ this.svAPIEndpoint,
6018
+ this.cycle._path,
6019
+ params,
6020
+ );
6021
+ return res;
6022
+ },
6023
+ get: async (
6024
+ id: Service.Cycle.Get.ID,
6025
+ params?: Service.Cycle.Get.Params,
6026
+ ): Promise<Service.Cycle.Get.Result> => {
6027
+ return await this._fetch(
6028
+ this.svAPIEndpoint,
6029
+ this.cycle._path + `/${id}`,
6030
+ params,
6031
+ );
6032
+ },
6033
+ };
6034
+
6010
6035
  promotions = {
6011
6036
  _path: Repzo._end_points.PROMOTIONS,
6012
6037
  find: async (
@@ -9097,7 +9097,7 @@ export namespace Service {
9097
9097
  status: CycleStatus;
9098
9098
  node?: AdminCreator | RepCreator | ClientCreator;
9099
9099
  creator?: AdminCreator | RepCreator | ClientCreator;
9100
- current_nodes: { admin: string; admin_name: string }[];
9100
+ current_nodes: (AdminCreator | RepCreator | ClientCreator)[];
9101
9101
  stage?: number;
9102
9102
  stageName?: string;
9103
9103
  company_namespace: string[];
@@ -9123,6 +9123,33 @@ export namespace Service {
9123
9123
  __v: number;
9124
9124
  }
9125
9125
  export type Data = Schema;
9126
+
9127
+ export namespace Find {
9128
+ export type Params = DefaultPaginationQueryParams & {
9129
+ sortBy?: { field: "_id"; type: "asc" | "desc" }[];
9130
+ _id?: string | string[];
9131
+ document_id?: string | string[];
9132
+ document_type?: Schema["document_type"] | Schema["document_type"][];
9133
+ status?: CycleStatus | CycleStatus[];
9134
+ "creator._id"?: string | string[];
9135
+ disabled?: boolean;
9136
+ from_updatedAt?: number;
9137
+ to_updatedAt?: number;
9138
+ from_createdAt?: number;
9139
+ to_createdAt?: number;
9140
+ from__id?: string;
9141
+ to__id?: string;
9142
+ [key: string]: any;
9143
+ };
9144
+ export interface Result extends DefaultPaginationResult {
9145
+ data: Schema[];
9146
+ }
9147
+ }
9148
+ export namespace Get {
9149
+ export type ID = string;
9150
+ export type Params = { [key: string]: any };
9151
+ export type Result = Schema;
9152
+ }
9126
9153
  }
9127
9154
 
9128
9155
  export namespace Transfer {
@@ -11609,6 +11636,7 @@ export namespace Service {
11609
11636
  _id: StringId;
11610
11637
  type: "invoice" | "proforma";
11611
11638
  processable?: boolean;
11639
+ product_source_msl?: "all_products" | "client" | "rep";
11612
11640
  failure_reasons: string[];
11613
11641
  external_serial_number?: string;
11614
11642
  qr_code_tlv?: string;
@@ -11792,6 +11820,7 @@ export namespace Service {
11792
11820
  processable?: boolean;
11793
11821
  failure_reasons: string[];
11794
11822
  external_serial_number?: string;
11823
+ product_source_msl?: "all_products" | "client" | "rep";
11795
11824
  skip_promos?: boolean;
11796
11825
  skipped_promotions: { _id: string; name: string; ref: string }[];
11797
11826
  client_id: StringId;
@@ -18773,6 +18802,8 @@ export namespace Service {
18773
18802
  to_updatedAt?: number;
18774
18803
  from_createdAt?: number;
18775
18804
  to_createdAt?: number;
18805
+ from__id?: StringId;
18806
+ to__id?: StringId;
18776
18807
  with_counts?: boolean;
18777
18808
  with_cover?: boolean;
18778
18809
  };
@@ -18851,6 +18882,8 @@ export namespace Service {
18851
18882
  to_updatedAt?: number;
18852
18883
  from_createdAt?: number;
18853
18884
  to_createdAt?: number;
18885
+ from__id?: StringId;
18886
+ to__id?: StringId;
18854
18887
  };
18855
18888
  export interface Result extends DefaultPaginationResult {
18856
18889
  data: PopulatedDoc[];
@@ -18933,6 +18966,8 @@ export namespace Service {
18933
18966
  to_updatedAt?: number;
18934
18967
  from_createdAt?: number;
18935
18968
  to_createdAt?: number;
18969
+ from__id?: StringId;
18970
+ to__id?: StringId;
18936
18971
  is_cover?: boolean;
18937
18972
  };
18938
18973
  export interface Result extends DefaultPaginationResult {
@@ -19143,6 +19178,11 @@ export namespace Service {
19143
19178
  visit_id?: string | string[];
19144
19179
  visit?: StringId | StringId[];
19145
19180
  sync_id?: string | string[];
19181
+ from_updatedAt?: number;
19182
+ to_updatedAt?: number;
19183
+ from__id?: StringId;
19184
+ to__id?: StringId;
19185
+ sortBy?: { field: "_id"; type: "asc" | "desc" }[];
19146
19186
  };
19147
19187
  export interface Result extends DefaultPaginationResult {
19148
19188
  data: PopulatedDoc[];