repzo 1.0.124 → 1.0.125
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 +18 -0
- package/lib/index.js +35 -0
- package/lib/types/index.d.ts +59 -0
- package/package.json +1 -1
- package/src/index.ts +48 -0
- package/src/types/index.ts +61 -0
package/lib/index.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ export default class Repzo {
|
|
|
94
94
|
readonly ASSET_UNIT: "asset-unit";
|
|
95
95
|
readonly WORKORDER_PORTAL: "workorder-portal";
|
|
96
96
|
readonly APPROVAL: "approvals";
|
|
97
|
+
readonly ACTIVITY_FEEDBACK: "activity-feedback";
|
|
97
98
|
};
|
|
98
99
|
private _fetch;
|
|
99
100
|
private _create;
|
|
@@ -733,6 +734,23 @@ export default class Repzo {
|
|
|
733
734
|
body: Service.Visit.Update.Body
|
|
734
735
|
) => Promise<Service.Visit.Update.Result>;
|
|
735
736
|
};
|
|
737
|
+
activityFeedback: {
|
|
738
|
+
_path: "activity-feedback";
|
|
739
|
+
find: (
|
|
740
|
+
params?: Service.ActivityFeedback.Find.Params
|
|
741
|
+
) => Promise<Service.ActivityFeedback.Find.Result>;
|
|
742
|
+
get: (
|
|
743
|
+
id: Service.ActivityFeedback.Get.ID,
|
|
744
|
+
params?: Service.ActivityFeedback.Get.Params
|
|
745
|
+
) => Promise<Service.ActivityFeedback.Get.Result>;
|
|
746
|
+
create: (
|
|
747
|
+
body: Service.ActivityFeedback.Create.Body
|
|
748
|
+
) => Promise<Service.ActivityFeedback.Create.Result>;
|
|
749
|
+
update: (
|
|
750
|
+
id: Service.ActivityFeedback.Update.ID,
|
|
751
|
+
body: Service.ActivityFeedback.Update.Body
|
|
752
|
+
) => Promise<Service.ActivityFeedback.Update.Result>;
|
|
753
|
+
};
|
|
736
754
|
invoice: {
|
|
737
755
|
_path: "fullinvoices";
|
|
738
756
|
find: (
|
package/lib/index.js
CHANGED
|
@@ -83,6 +83,7 @@ export default class Repzo {
|
|
|
83
83
|
ASSET_UNIT: "asset-unit",
|
|
84
84
|
WORKORDER_PORTAL: "workorder-portal",
|
|
85
85
|
APPROVAL: "approvals",
|
|
86
|
+
ACTIVITY_FEEDBACK: "activity-feedback",
|
|
86
87
|
};
|
|
87
88
|
this.END_POINTS = this._end_points;
|
|
88
89
|
this.client = {
|
|
@@ -1423,6 +1424,40 @@ export default class Repzo {
|
|
|
1423
1424
|
return res;
|
|
1424
1425
|
},
|
|
1425
1426
|
};
|
|
1427
|
+
this.activityFeedback = {
|
|
1428
|
+
_path: this._end_points.ACTIVITY_FEEDBACK,
|
|
1429
|
+
find: async (params) => {
|
|
1430
|
+
let res = await this._fetch(
|
|
1431
|
+
this.svAPIEndpoint,
|
|
1432
|
+
this.activityFeedback._path,
|
|
1433
|
+
params
|
|
1434
|
+
);
|
|
1435
|
+
return res;
|
|
1436
|
+
},
|
|
1437
|
+
get: async (id, params) => {
|
|
1438
|
+
return await this._fetch(
|
|
1439
|
+
this.svAPIEndpoint,
|
|
1440
|
+
this.activityFeedback._path + `/${id}`,
|
|
1441
|
+
params
|
|
1442
|
+
);
|
|
1443
|
+
},
|
|
1444
|
+
create: async (body) => {
|
|
1445
|
+
let res = await this._create(
|
|
1446
|
+
this.svAPIEndpoint,
|
|
1447
|
+
this.activityFeedback._path,
|
|
1448
|
+
body
|
|
1449
|
+
);
|
|
1450
|
+
return res;
|
|
1451
|
+
},
|
|
1452
|
+
update: async (id, body) => {
|
|
1453
|
+
let res = await this._update(
|
|
1454
|
+
this.svAPIEndpoint,
|
|
1455
|
+
this.activityFeedback._path + `/${id}`,
|
|
1456
|
+
body
|
|
1457
|
+
);
|
|
1458
|
+
return res;
|
|
1459
|
+
},
|
|
1460
|
+
};
|
|
1426
1461
|
this.invoice = {
|
|
1427
1462
|
_path: this._end_points.INVOICE,
|
|
1428
1463
|
find: async (params) => {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -4852,6 +4852,65 @@ export declare namespace Service {
|
|
|
4852
4852
|
}
|
|
4853
4853
|
export {};
|
|
4854
4854
|
}
|
|
4855
|
+
namespace ActivityFeedback {
|
|
4856
|
+
interface ActivityFeedbackSchema {
|
|
4857
|
+
_id: string;
|
|
4858
|
+
route?: string;
|
|
4859
|
+
visit_id: string;
|
|
4860
|
+
visit_UUID: string;
|
|
4861
|
+
teams?: string[];
|
|
4862
|
+
company_namespace: string[];
|
|
4863
|
+
createdAt: Date;
|
|
4864
|
+
updatedAt: Date;
|
|
4865
|
+
}
|
|
4866
|
+
interface CreateBody {
|
|
4867
|
+
route?: string;
|
|
4868
|
+
visit_id: string;
|
|
4869
|
+
visit_UUID: string;
|
|
4870
|
+
teams?: string[];
|
|
4871
|
+
}
|
|
4872
|
+
interface UpdateBody {
|
|
4873
|
+
route?: string;
|
|
4874
|
+
visit_id?: string;
|
|
4875
|
+
visit_UUID?: string;
|
|
4876
|
+
teams?: string[];
|
|
4877
|
+
}
|
|
4878
|
+
namespace Find {
|
|
4879
|
+
type Params = DefaultPaginationQueryParams & {
|
|
4880
|
+
route?: string;
|
|
4881
|
+
teams?: string[];
|
|
4882
|
+
visit_id?: string;
|
|
4883
|
+
from_createdAt?: number;
|
|
4884
|
+
to_createdAt?: number;
|
|
4885
|
+
from__id?: string;
|
|
4886
|
+
to__id?: string;
|
|
4887
|
+
[key: string]: any;
|
|
4888
|
+
sortBy?: {
|
|
4889
|
+
field: "_id";
|
|
4890
|
+
type: "asc" | "desc";
|
|
4891
|
+
}[];
|
|
4892
|
+
};
|
|
4893
|
+
interface Result extends DefaultPaginationResult {
|
|
4894
|
+
data: ActivityFeedbackSchema[];
|
|
4895
|
+
absolute_total: number;
|
|
4896
|
+
page_total: number;
|
|
4897
|
+
}
|
|
4898
|
+
}
|
|
4899
|
+
namespace Create {
|
|
4900
|
+
type Body = CreateBody;
|
|
4901
|
+
type Result = ActivityFeedbackSchema;
|
|
4902
|
+
}
|
|
4903
|
+
namespace Get {
|
|
4904
|
+
type ID = string;
|
|
4905
|
+
interface Params {}
|
|
4906
|
+
type Result = ActivityFeedbackSchema;
|
|
4907
|
+
}
|
|
4908
|
+
namespace Update {
|
|
4909
|
+
type ID = string;
|
|
4910
|
+
type Body = UpdateBody;
|
|
4911
|
+
type Result = ActivityFeedbackSchema;
|
|
4912
|
+
}
|
|
4913
|
+
}
|
|
4855
4914
|
namespace Workorder {
|
|
4856
4915
|
export interface WorkorderSchema {
|
|
4857
4916
|
_id: StringId;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -118,6 +118,7 @@ export default class Repzo {
|
|
|
118
118
|
ASSET_UNIT: "asset-unit",
|
|
119
119
|
WORKORDER_PORTAL: "workorder-portal",
|
|
120
120
|
APPROVAL: "approvals",
|
|
121
|
+
ACTIVITY_FEEDBACK: "activity-feedback",
|
|
121
122
|
} as const;
|
|
122
123
|
public END_POINTS = this._end_points;
|
|
123
124
|
private async _fetch(baseUrl: string, path: string, params?: Params) {
|
|
@@ -2013,6 +2014,53 @@ export default class Repzo {
|
|
|
2013
2014
|
return res;
|
|
2014
2015
|
},
|
|
2015
2016
|
};
|
|
2017
|
+
|
|
2018
|
+
activityFeedback = {
|
|
2019
|
+
_path: this._end_points.ACTIVITY_FEEDBACK,
|
|
2020
|
+
find: async (
|
|
2021
|
+
params?: Service.ActivityFeedback.Find.Params
|
|
2022
|
+
): Promise<Service.ActivityFeedback.Find.Result> => {
|
|
2023
|
+
let res: Service.ActivityFeedback.Find.Result = await this._fetch(
|
|
2024
|
+
this.svAPIEndpoint,
|
|
2025
|
+
this.activityFeedback._path,
|
|
2026
|
+
params
|
|
2027
|
+
);
|
|
2028
|
+
return res;
|
|
2029
|
+
},
|
|
2030
|
+
get: async (
|
|
2031
|
+
id: Service.ActivityFeedback.Get.ID,
|
|
2032
|
+
params?: Service.ActivityFeedback.Get.Params
|
|
2033
|
+
): Promise<Service.ActivityFeedback.Get.Result> => {
|
|
2034
|
+
return await this._fetch(
|
|
2035
|
+
this.svAPIEndpoint,
|
|
2036
|
+
this.activityFeedback._path + `/${id}`,
|
|
2037
|
+
params
|
|
2038
|
+
);
|
|
2039
|
+
},
|
|
2040
|
+
create: async (
|
|
2041
|
+
body: Service.ActivityFeedback.Create.Body
|
|
2042
|
+
): Promise<Service.ActivityFeedback.Create.Result> => {
|
|
2043
|
+
let res = await this._create(
|
|
2044
|
+
this.svAPIEndpoint,
|
|
2045
|
+
this.activityFeedback._path,
|
|
2046
|
+
body
|
|
2047
|
+
);
|
|
2048
|
+
return res;
|
|
2049
|
+
},
|
|
2050
|
+
|
|
2051
|
+
update: async (
|
|
2052
|
+
id: Service.ActivityFeedback.Update.ID,
|
|
2053
|
+
body: Service.ActivityFeedback.Update.Body
|
|
2054
|
+
): Promise<Service.ActivityFeedback.Update.Result> => {
|
|
2055
|
+
let res: Service.ActivityFeedback.Update.Result = await this._update(
|
|
2056
|
+
this.svAPIEndpoint,
|
|
2057
|
+
this.activityFeedback._path + `/${id}`,
|
|
2058
|
+
body
|
|
2059
|
+
);
|
|
2060
|
+
return res;
|
|
2061
|
+
},
|
|
2062
|
+
};
|
|
2063
|
+
|
|
2016
2064
|
invoice = {
|
|
2017
2065
|
_path: this._end_points.INVOICE,
|
|
2018
2066
|
find: async (
|
package/src/types/index.ts
CHANGED
|
@@ -4889,6 +4889,67 @@ export namespace Service {
|
|
|
4889
4889
|
}
|
|
4890
4890
|
}
|
|
4891
4891
|
|
|
4892
|
+
export namespace ActivityFeedback {
|
|
4893
|
+
export interface ActivityFeedbackSchema {
|
|
4894
|
+
_id: string;
|
|
4895
|
+
route?: string;
|
|
4896
|
+
visit_id: string;
|
|
4897
|
+
visit_UUID: string;
|
|
4898
|
+
teams?: string[];
|
|
4899
|
+
company_namespace: string[];
|
|
4900
|
+
createdAt: Date;
|
|
4901
|
+
updatedAt: Date;
|
|
4902
|
+
}
|
|
4903
|
+
export interface CreateBody {
|
|
4904
|
+
route?: string;
|
|
4905
|
+
visit_id: string;
|
|
4906
|
+
visit_UUID: string;
|
|
4907
|
+
teams?: string[];
|
|
4908
|
+
}
|
|
4909
|
+
export interface UpdateBody {
|
|
4910
|
+
route?: string;
|
|
4911
|
+
visit_id?: string;
|
|
4912
|
+
visit_UUID?: string;
|
|
4913
|
+
teams?: string[];
|
|
4914
|
+
}
|
|
4915
|
+
|
|
4916
|
+
export namespace Find {
|
|
4917
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
4918
|
+
route?: string;
|
|
4919
|
+
teams?: string[];
|
|
4920
|
+
visit_id?: string;
|
|
4921
|
+
from_createdAt?: number;
|
|
4922
|
+
to_createdAt?: number;
|
|
4923
|
+
from__id?: string;
|
|
4924
|
+
to__id?: string;
|
|
4925
|
+
[key: string]: any; // integration_meta.
|
|
4926
|
+
sortBy?: {
|
|
4927
|
+
field: "_id";
|
|
4928
|
+
type: "asc" | "desc";
|
|
4929
|
+
}[];
|
|
4930
|
+
};
|
|
4931
|
+
export interface Result extends DefaultPaginationResult {
|
|
4932
|
+
data: ActivityFeedbackSchema[];
|
|
4933
|
+
absolute_total: number;
|
|
4934
|
+
page_total: number;
|
|
4935
|
+
}
|
|
4936
|
+
}
|
|
4937
|
+
|
|
4938
|
+
export namespace Create {
|
|
4939
|
+
export type Body = CreateBody;
|
|
4940
|
+
export type Result = ActivityFeedbackSchema;
|
|
4941
|
+
}
|
|
4942
|
+
export namespace Get {
|
|
4943
|
+
export type ID = string;
|
|
4944
|
+
export interface Params {}
|
|
4945
|
+
export type Result = ActivityFeedbackSchema;
|
|
4946
|
+
}
|
|
4947
|
+
export namespace Update {
|
|
4948
|
+
export type ID = string;
|
|
4949
|
+
export type Body = UpdateBody;
|
|
4950
|
+
export type Result = ActivityFeedbackSchema;
|
|
4951
|
+
}
|
|
4952
|
+
}
|
|
4892
4953
|
export namespace Workorder {
|
|
4893
4954
|
export interface WorkorderSchema {
|
|
4894
4955
|
_id: StringId;
|