repzo 1.0.246 → 1.0.248
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 +42 -0
- package/lib/types/index.d.ts +390 -236
- package/lib/types/index.js +44 -44
- package/package.json +1 -1
- package/src/index.ts +97 -0
- package/src/types/index.ts +525 -346
package/lib/types/index.js
CHANGED
|
@@ -1,49 +1,5 @@
|
|
|
1
1
|
export var Service;
|
|
2
2
|
(function (Service) {
|
|
3
|
-
let FormV2;
|
|
4
|
-
(function (FormV2) {
|
|
5
|
-
FormV2.fieldType_enums = [
|
|
6
|
-
"Text", // Long Text
|
|
7
|
-
"String", // Short Text
|
|
8
|
-
"Phone", // phone
|
|
9
|
-
"Email", // email
|
|
10
|
-
"Date", // Date
|
|
11
|
-
// "Boolean", // No need any more in this form
|
|
12
|
-
"Number", // Number
|
|
13
|
-
"List", // List => custom List with ref or template (Allow multi, not only for media)
|
|
14
|
-
"Separator", // Separator
|
|
15
|
-
"Heading", // Heading
|
|
16
|
-
"Media", // Media + phone + Image
|
|
17
|
-
"Signature", // signature
|
|
18
|
-
"DateTime", // timestamp
|
|
19
|
-
"YesNo", // Yes/No/NA (with disable N/A option )
|
|
20
|
-
"ProductBarcodeScan", // String
|
|
21
|
-
"BarcodeScan", // String
|
|
22
|
-
"GeoPoint", // { coordinates: [0, 0], type: "Point" }
|
|
23
|
-
];
|
|
24
|
-
})(FormV2 = Service.FormV2 || (Service.FormV2 = {}));
|
|
25
|
-
let ActivityFormV2Result;
|
|
26
|
-
(function (ActivityFormV2Result) {
|
|
27
|
-
ActivityFormV2Result.fieldType_enums = [
|
|
28
|
-
"Text", // Long Text
|
|
29
|
-
"String", // Short Text
|
|
30
|
-
"Phone", // phone
|
|
31
|
-
"Email", // email
|
|
32
|
-
"Date", // Date
|
|
33
|
-
// "Boolean", // No need any more in this form
|
|
34
|
-
"Number", // Number
|
|
35
|
-
"List", // List => custom List with ref or template (Allow multi, not only for media)
|
|
36
|
-
"Separator", // Separator
|
|
37
|
-
"Heading", // Heading
|
|
38
|
-
"Media", // Media + phone + Image
|
|
39
|
-
"Signature", // signature
|
|
40
|
-
"DateTime", // timestamp
|
|
41
|
-
"YesNo", // Yes/No/NA (with disable N/A option )
|
|
42
|
-
"ProductBarcodeScan", // String
|
|
43
|
-
"BarcodeScan", // String
|
|
44
|
-
"GeoPoint", // { coordinates: [0, 0], type: "Point" }
|
|
45
|
-
];
|
|
46
|
-
})(ActivityFormV2Result = Service.ActivityFormV2Result || (Service.ActivityFormV2Result = {}));
|
|
47
3
|
let TimelineTimeList;
|
|
48
4
|
(function (TimelineTimeList) {
|
|
49
5
|
TimelineTimeList.activity_types = [
|
|
@@ -122,4 +78,48 @@ export var Service;
|
|
|
122
78
|
SalesAnalyticsReport.sortBy_field_options = ["_id", "time"];
|
|
123
79
|
SalesAnalyticsReport.sortBy_type_options = ["asc", "desc"];
|
|
124
80
|
})(SalesAnalyticsReport = Service.SalesAnalyticsReport || (Service.SalesAnalyticsReport = {}));
|
|
81
|
+
let FormV2;
|
|
82
|
+
(function (FormV2) {
|
|
83
|
+
FormV2.fieldType_enums = [
|
|
84
|
+
"Text", // Long Text
|
|
85
|
+
"String", // Short Text
|
|
86
|
+
"Phone", // phone
|
|
87
|
+
"Email", // email
|
|
88
|
+
"Date", // Date
|
|
89
|
+
// "Boolean", // No need any more in this form
|
|
90
|
+
"Number", // Number
|
|
91
|
+
"List", // List => custom List with ref or template (Allow multi, not only for media)
|
|
92
|
+
"Separator", // Separator
|
|
93
|
+
"Heading", // Heading
|
|
94
|
+
"Media", // Media + phone + Image
|
|
95
|
+
"Signature", // signature
|
|
96
|
+
"DateTime", // timestamp
|
|
97
|
+
"YesNo", // Yes/No/NA (with disable N/A option )
|
|
98
|
+
"ProductBarcodeScan", // String
|
|
99
|
+
"BarcodeScan", // String
|
|
100
|
+
"GeoPoint", // { coordinates: [0, 0], type: "Point" }
|
|
101
|
+
];
|
|
102
|
+
})(FormV2 = Service.FormV2 || (Service.FormV2 = {}));
|
|
103
|
+
let ActivityFormV2Result;
|
|
104
|
+
(function (ActivityFormV2Result) {
|
|
105
|
+
ActivityFormV2Result.fieldType_enums = [
|
|
106
|
+
"Text", // Long Text
|
|
107
|
+
"String", // Short Text
|
|
108
|
+
"Phone", // phone
|
|
109
|
+
"Email", // email
|
|
110
|
+
"Date", // Date
|
|
111
|
+
// "Boolean", // No need any more in this form
|
|
112
|
+
"Number", // Number
|
|
113
|
+
"List", // List => custom List with ref or template (Allow multi, not only for media)
|
|
114
|
+
"Separator", // Separator
|
|
115
|
+
"Heading", // Heading
|
|
116
|
+
"Media", // Media + phone + Image
|
|
117
|
+
"Signature", // signature
|
|
118
|
+
"DateTime", // timestamp
|
|
119
|
+
"YesNo", // Yes/No/NA (with disable N/A option )
|
|
120
|
+
"ProductBarcodeScan", // String
|
|
121
|
+
"BarcodeScan", // String
|
|
122
|
+
"GeoPoint", // { coordinates: [0, 0], type: "Point" }
|
|
123
|
+
];
|
|
124
|
+
})(ActivityFormV2Result = Service.ActivityFormV2Result || (Service.ActivityFormV2Result = {}));
|
|
125
125
|
})(Service || (Service = {}));
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -136,6 +136,8 @@ export const end_points = {
|
|
|
136
136
|
PROMOTION_USAGE: "promotion-usage",
|
|
137
137
|
CART: "cart",
|
|
138
138
|
LATEST_SERIAL: "latest-serial",
|
|
139
|
+
FORM_V2: "form-v2",
|
|
140
|
+
ACTIVITY_FORM_V2_RESULT: "activity-form-v2-result",
|
|
139
141
|
} as const;
|
|
140
142
|
export type EndPoints = (typeof end_points)[keyof typeof end_points];
|
|
141
143
|
|
|
@@ -6289,6 +6291,101 @@ export default class Repzo {
|
|
|
6289
6291
|
return res;
|
|
6290
6292
|
},
|
|
6291
6293
|
};
|
|
6294
|
+
|
|
6295
|
+
formV2 = {
|
|
6296
|
+
_path: Repzo._end_points.FORM_V2,
|
|
6297
|
+
find: async (
|
|
6298
|
+
params?: Service.FormV2.Find.Params,
|
|
6299
|
+
): Promise<Service.FormV2.Find.Result> => {
|
|
6300
|
+
let res: Service.FormV2.Find.Result = await this._fetch(
|
|
6301
|
+
this.svAPIEndpoint,
|
|
6302
|
+
this.formV2._path,
|
|
6303
|
+
params,
|
|
6304
|
+
);
|
|
6305
|
+
return res;
|
|
6306
|
+
},
|
|
6307
|
+
get: async (
|
|
6308
|
+
id: Service.FormV2.Get.ID,
|
|
6309
|
+
params?: Service.FormV2.Get.Params,
|
|
6310
|
+
): Promise<Service.FormV2.Get.Result> => {
|
|
6311
|
+
return await this._fetch(
|
|
6312
|
+
this.svAPIEndpoint,
|
|
6313
|
+
this.formV2._path + `/${id}`,
|
|
6314
|
+
params,
|
|
6315
|
+
);
|
|
6316
|
+
},
|
|
6317
|
+
create: async (
|
|
6318
|
+
body: Service.FormV2.Create.Body,
|
|
6319
|
+
): Promise<Service.FormV2.Create.Result> => {
|
|
6320
|
+
let res = await this._create(this.svAPIEndpoint, this.formV2._path, body);
|
|
6321
|
+
return res;
|
|
6322
|
+
},
|
|
6323
|
+
update: async (
|
|
6324
|
+
id: Service.FormV2.Update.ID,
|
|
6325
|
+
body: Service.FormV2.Update.Body,
|
|
6326
|
+
): Promise<Service.FormV2.Update.Result> => {
|
|
6327
|
+
let res: Service.FormV2.Update.Result = await this._update(
|
|
6328
|
+
this.svAPIEndpoint,
|
|
6329
|
+
this.formV2._path + `/${id}`,
|
|
6330
|
+
body,
|
|
6331
|
+
);
|
|
6332
|
+
return res;
|
|
6333
|
+
},
|
|
6334
|
+
remove: async (
|
|
6335
|
+
id: Service.FormV2.Update.ID,
|
|
6336
|
+
): Promise<Service.FormV2.Remove.Result> => {
|
|
6337
|
+
let res: Service.FormV2.Remove.Result = await this._delete(
|
|
6338
|
+
this.svAPIEndpoint,
|
|
6339
|
+
this.formV2._path + `/${id}`,
|
|
6340
|
+
);
|
|
6341
|
+
return res;
|
|
6342
|
+
},
|
|
6343
|
+
};
|
|
6344
|
+
|
|
6345
|
+
activityFormV2Result = {
|
|
6346
|
+
_path: Repzo._end_points.ACTIVITY_FORM_V2_RESULT,
|
|
6347
|
+
find: async (
|
|
6348
|
+
params?: Service.ActivityFormV2Result.Find.Params,
|
|
6349
|
+
): Promise<Service.ActivityFormV2Result.Find.Result> => {
|
|
6350
|
+
let res: Service.ActivityFormV2Result.Find.Result = await this._fetch(
|
|
6351
|
+
this.svAPIEndpoint,
|
|
6352
|
+
this.activityFormV2Result._path,
|
|
6353
|
+
params,
|
|
6354
|
+
);
|
|
6355
|
+
return res;
|
|
6356
|
+
},
|
|
6357
|
+
get: async (
|
|
6358
|
+
id: Service.ActivityFormV2Result.Get.ID,
|
|
6359
|
+
params?: Service.ActivityFormV2Result.Get.Params,
|
|
6360
|
+
): Promise<Service.ActivityFormV2Result.Get.Result> => {
|
|
6361
|
+
return await this._fetch(
|
|
6362
|
+
this.svAPIEndpoint,
|
|
6363
|
+
this.activityFormV2Result._path + `/${id}`,
|
|
6364
|
+
params,
|
|
6365
|
+
);
|
|
6366
|
+
},
|
|
6367
|
+
create: async (
|
|
6368
|
+
body: Service.ActivityFormV2Result.Create.Body,
|
|
6369
|
+
): Promise<Service.ActivityFormV2Result.Create.Result> => {
|
|
6370
|
+
let res = await this._create(
|
|
6371
|
+
this.svAPIEndpoint,
|
|
6372
|
+
this.activityFormV2Result._path,
|
|
6373
|
+
body,
|
|
6374
|
+
);
|
|
6375
|
+
return res;
|
|
6376
|
+
},
|
|
6377
|
+
update: async (
|
|
6378
|
+
id: Service.ActivityFormV2Result.Update.ID,
|
|
6379
|
+
body: Service.ActivityFormV2Result.Update.Body,
|
|
6380
|
+
): Promise<Service.ActivityFormV2Result.Update.Result> => {
|
|
6381
|
+
let res: Service.ActivityFormV2Result.Update.Result = await this._update(
|
|
6382
|
+
this.svAPIEndpoint,
|
|
6383
|
+
this.activityFormV2Result._path + `/${id}`,
|
|
6384
|
+
body,
|
|
6385
|
+
);
|
|
6386
|
+
return res;
|
|
6387
|
+
},
|
|
6388
|
+
};
|
|
6292
6389
|
}
|
|
6293
6390
|
|
|
6294
6391
|
function normalizeParams(params: Params): { [key: string]: any } {
|