repzo 1.0.283 → 1.0.284
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 +7 -0
- package/lib/index.js +11 -0
- package/lib/types/index.d.ts +46 -4
- package/package.json +1 -1
- package/src/index.ts +25 -0
- package/src/types/index.ts +39 -1
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) => {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -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 {
|
|
@@ -16929,6 +16957,8 @@ export declare namespace Service {
|
|
|
16929
16957
|
to_updatedAt?: number;
|
|
16930
16958
|
from_createdAt?: number;
|
|
16931
16959
|
to_createdAt?: number;
|
|
16960
|
+
from__id?: StringId;
|
|
16961
|
+
to__id?: StringId;
|
|
16932
16962
|
with_counts?: boolean;
|
|
16933
16963
|
with_cover?: boolean;
|
|
16934
16964
|
};
|
|
@@ -17004,6 +17034,8 @@ export declare namespace Service {
|
|
|
17004
17034
|
to_updatedAt?: number;
|
|
17005
17035
|
from_createdAt?: number;
|
|
17006
17036
|
to_createdAt?: number;
|
|
17037
|
+
from__id?: StringId;
|
|
17038
|
+
to__id?: StringId;
|
|
17007
17039
|
};
|
|
17008
17040
|
interface Result extends DefaultPaginationResult {
|
|
17009
17041
|
data: PopulatedDoc[];
|
|
@@ -17085,6 +17117,8 @@ export declare namespace Service {
|
|
|
17085
17117
|
to_updatedAt?: number;
|
|
17086
17118
|
from_createdAt?: number;
|
|
17087
17119
|
to_createdAt?: number;
|
|
17120
|
+
from__id?: StringId;
|
|
17121
|
+
to__id?: StringId;
|
|
17088
17122
|
is_cover?: boolean;
|
|
17089
17123
|
};
|
|
17090
17124
|
interface Result extends DefaultPaginationResult {
|
|
@@ -17277,6 +17311,14 @@ export declare namespace Service {
|
|
|
17277
17311
|
visit_id?: string | string[];
|
|
17278
17312
|
visit?: StringId | StringId[];
|
|
17279
17313
|
sync_id?: string | string[];
|
|
17314
|
+
from_updatedAt?: number;
|
|
17315
|
+
to_updatedAt?: number;
|
|
17316
|
+
from__id?: StringId;
|
|
17317
|
+
to__id?: StringId;
|
|
17318
|
+
sortBy?: {
|
|
17319
|
+
field: "_id";
|
|
17320
|
+
type: "asc" | "desc";
|
|
17321
|
+
}[];
|
|
17280
17322
|
};
|
|
17281
17323
|
interface Result extends DefaultPaginationResult {
|
|
17282
17324
|
data: PopulatedDoc[];
|
package/package.json
CHANGED
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 (
|
package/src/types/index.ts
CHANGED
|
@@ -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:
|
|
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 {
|
|
@@ -18773,6 +18800,8 @@ export namespace Service {
|
|
|
18773
18800
|
to_updatedAt?: number;
|
|
18774
18801
|
from_createdAt?: number;
|
|
18775
18802
|
to_createdAt?: number;
|
|
18803
|
+
from__id?: StringId;
|
|
18804
|
+
to__id?: StringId;
|
|
18776
18805
|
with_counts?: boolean;
|
|
18777
18806
|
with_cover?: boolean;
|
|
18778
18807
|
};
|
|
@@ -18851,6 +18880,8 @@ export namespace Service {
|
|
|
18851
18880
|
to_updatedAt?: number;
|
|
18852
18881
|
from_createdAt?: number;
|
|
18853
18882
|
to_createdAt?: number;
|
|
18883
|
+
from__id?: StringId;
|
|
18884
|
+
to__id?: StringId;
|
|
18854
18885
|
};
|
|
18855
18886
|
export interface Result extends DefaultPaginationResult {
|
|
18856
18887
|
data: PopulatedDoc[];
|
|
@@ -18933,6 +18964,8 @@ export namespace Service {
|
|
|
18933
18964
|
to_updatedAt?: number;
|
|
18934
18965
|
from_createdAt?: number;
|
|
18935
18966
|
to_createdAt?: number;
|
|
18967
|
+
from__id?: StringId;
|
|
18968
|
+
to__id?: StringId;
|
|
18936
18969
|
is_cover?: boolean;
|
|
18937
18970
|
};
|
|
18938
18971
|
export interface Result extends DefaultPaginationResult {
|
|
@@ -19143,6 +19176,11 @@ export namespace Service {
|
|
|
19143
19176
|
visit_id?: string | string[];
|
|
19144
19177
|
visit?: StringId | StringId[];
|
|
19145
19178
|
sync_id?: string | string[];
|
|
19179
|
+
from_updatedAt?: number;
|
|
19180
|
+
to_updatedAt?: number;
|
|
19181
|
+
from__id?: StringId;
|
|
19182
|
+
to__id?: StringId;
|
|
19183
|
+
sortBy?: { field: "_id"; type: "asc" | "desc" }[];
|
|
19146
19184
|
};
|
|
19147
19185
|
export interface Result extends DefaultPaginationResult {
|
|
19148
19186
|
data: PopulatedDoc[];
|