repzo 1.0.123 → 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 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) => {
@@ -115,6 +115,10 @@ interface FormPopulated {
115
115
  _id: StringId;
116
116
  local_name?: string;
117
117
  }
118
+ interface RetailExecutionTemplatePopulated {
119
+ _id: StringId;
120
+ name: string;
121
+ }
118
122
  interface VisitMeta {
119
123
  geo_fence_setting_visit_start: boolean;
120
124
  geo_fence_setting_visit_end: boolean;
@@ -514,6 +518,8 @@ export declare namespace Service {
514
518
  enable_payment_terms_grace_period_days?: boolean;
515
519
  is_simplified?: boolean;
516
520
  last_login_time?: number;
521
+ assigned_forms_v2_templates?: string[];
522
+ retail_execution_templates?: string[];
517
523
  createdAt: string;
518
524
  updatedAt: string;
519
525
  __v: number;
@@ -585,6 +591,8 @@ export declare namespace Service {
585
591
  enable_payment_terms_grace_period_days?: boolean;
586
592
  is_simplified?: boolean;
587
593
  last_login_time?: number;
594
+ assigned_forms_v2_templates?: string[];
595
+ retail_execution_templates?: string[];
588
596
  }
589
597
  export type PopulatedKeys =
590
598
  | "tags"
@@ -601,7 +609,9 @@ export declare namespace Service {
601
609
  | "assigned_product_groups"
602
610
  | "speciality"
603
611
  | "teams"
604
- | "contacts";
612
+ | "contacts"
613
+ | "retail_execution_templates"
614
+ | "assigned_forms_v2_templates";
605
615
  type ClientSchemaWithPopulatedKeys = ClientSchema & {
606
616
  assigned_products?:
607
617
  | string[]
@@ -621,6 +631,10 @@ export declare namespace Service {
621
631
  | string
622
632
  | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
623
633
  channel?: string | Channel.ChannelSchema;
634
+ assigned_forms_v2_templates?: string[] | FormPopulated[];
635
+ retail_execution_templates?:
636
+ | string[]
637
+ | RetailExecutionTemplatePopulated[];
624
638
  };
625
639
  export namespace Find {
626
640
  type Params = DefaultPaginationQueryParams & {
@@ -4838,6 +4852,65 @@ export declare namespace Service {
4838
4852
  }
4839
4853
  export {};
4840
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
+ }
4841
4914
  namespace Workorder {
4842
4915
  export interface WorkorderSchema {
4843
4916
  _id: StringId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.123",
3
+ "version": "1.0.125",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
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 (
@@ -118,6 +118,10 @@ interface FormPopulated {
118
118
  _id: StringId;
119
119
  local_name?: string;
120
120
  }
121
+ interface RetailExecutionTemplatePopulated {
122
+ _id: StringId;
123
+ name: string;
124
+ }
121
125
  interface VisitMeta {
122
126
  geo_fence_setting_visit_start: boolean;
123
127
  geo_fence_setting_visit_end: boolean;
@@ -518,6 +522,8 @@ export namespace Service {
518
522
  enable_payment_terms_grace_period_days?: boolean;
519
523
  is_simplified?: boolean;
520
524
  last_login_time?: number;
525
+ assigned_forms_v2_templates?: string[];
526
+ retail_execution_templates?: string[];
521
527
  createdAt: string;
522
528
  updatedAt: string;
523
529
  __v: number;
@@ -585,6 +591,8 @@ export namespace Service {
585
591
  enable_payment_terms_grace_period_days?: boolean;
586
592
  is_simplified?: boolean;
587
593
  last_login_time?: number;
594
+ assigned_forms_v2_templates?: string[];
595
+ retail_execution_templates?: string[];
588
596
  }
589
597
  export type PopulatedKeys =
590
598
  | "tags"
@@ -601,7 +609,9 @@ export namespace Service {
601
609
  | "assigned_product_groups"
602
610
  | "speciality"
603
611
  | "teams"
604
- | "contacts";
612
+ | "contacts"
613
+ | "retail_execution_templates"
614
+ | "assigned_forms_v2_templates";
605
615
 
606
616
  type ClientSchemaWithPopulatedKeys = ClientSchema & {
607
617
  assigned_products?:
@@ -622,6 +632,10 @@ export namespace Service {
622
632
  | string
623
633
  | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
624
634
  channel?: string | Channel.ChannelSchema;
635
+ assigned_forms_v2_templates?: string[] | FormPopulated[];
636
+ retail_execution_templates?:
637
+ | string[]
638
+ | RetailExecutionTemplatePopulated[];
625
639
  };
626
640
 
627
641
  export namespace Find {
@@ -4875,6 +4889,67 @@ export namespace Service {
4875
4889
  }
4876
4890
  }
4877
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
+ }
4878
4953
  export namespace Workorder {
4879
4954
  export interface WorkorderSchema {
4880
4955
  _id: StringId;