repzo 1.0.199 → 1.0.201

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
@@ -106,6 +106,7 @@ export declare const end_points: {
106
106
  readonly REPORT_VIEW: "report-view";
107
107
  readonly REPORT_VIEW_DEFAULT: "report-view-default";
108
108
  readonly REPORT_VIEW_FAVORITE: "report-view-favorite";
109
+ readonly COPY_REPORT_VIEW: "copy-report-view";
109
110
  };
110
111
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
111
112
  export declare const availableService: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport"];
@@ -223,6 +224,7 @@ export default class Repzo {
223
224
  readonly REPORT_VIEW: "report-view";
224
225
  readonly REPORT_VIEW_DEFAULT: "report-view-default";
225
226
  readonly REPORT_VIEW_FAVORITE: "report-view-favorite";
227
+ readonly COPY_REPORT_VIEW: "copy-report-view";
226
228
  };
227
229
  private _fetch;
228
230
  private _create;
@@ -1060,4 +1062,8 @@ export default class Repzo {
1060
1062
  create: (body: Service.ReportViewDefault.Create.Body) => Promise<Service.ReportViewDefault.Create.Result>;
1061
1063
  remove: (id: Service.ReportViewDefault.Remove.ID, params: Service.ReportViewDefault.Remove.Params) => Promise<Service.ReportViewDefault.Remove.Result>;
1062
1064
  };
1065
+ copyReportView: {
1066
+ _path: "copy-report-view";
1067
+ update: (id: Service.CopyReportView.Update.ID, body: Service.CopyReportView.Update.Body) => Promise<Service.CopyReportView.Update.Result>;
1068
+ };
1063
1069
  }
package/lib/index.js CHANGED
@@ -107,6 +107,7 @@ export const end_points = {
107
107
  REPORT_VIEW: "report-view",
108
108
  REPORT_VIEW_DEFAULT: "report-view-default",
109
109
  REPORT_VIEW_FAVORITE: "report-view-favorite",
110
+ COPY_REPORT_VIEW: "copy-report-view",
110
111
  };
111
112
  export const availableService = [
112
113
  "client",
@@ -2180,6 +2181,13 @@ class Repzo {
2180
2181
  return res;
2181
2182
  },
2182
2183
  };
2184
+ this.copyReportView = {
2185
+ _path: Repzo._end_points.COPY_REPORT_VIEW,
2186
+ update: async (id, body) => {
2187
+ let res = await this._update(this.svAPIEndpoint, this.copyReportView._path + `/${id}`, body);
2188
+ return res;
2189
+ },
2190
+ };
2183
2191
  this.svAPIEndpoint =
2184
2192
  !options?.env || options?.env == "production"
2185
2193
  ? "https://sv.api.repzo.me"
@@ -16601,6 +16601,7 @@ export declare namespace Service {
16601
16601
  report_type: ReportType;
16602
16602
  company_namespace: string[];
16603
16603
  teams?: string[];
16604
+ copied_from?: StringId;
16604
16605
  createdAt?: Date;
16605
16606
  updatedAt?: Date;
16606
16607
  }
@@ -16688,7 +16689,6 @@ export declare namespace Service {
16688
16689
  }
16689
16690
  namespace Find {
16690
16691
  type Params = DefaultPaginationQueryParams & {
16691
- _id?: StringId | StringId[];
16692
16692
  name?: string | string[];
16693
16693
  disabled?: boolean;
16694
16694
  is_public?: boolean;
@@ -16697,15 +16697,37 @@ export declare namespace Service {
16697
16697
  mine_views?: boolean;
16698
16698
  teams?: StringId | StringId[];
16699
16699
  search?: string;
16700
+ mine_or_public_views?: boolean;
16701
+ populatedKeys?: ("teams" | "copied_from")[];
16702
+ with_favorite?: boolean;
16703
+ with_default?: boolean;
16700
16704
  };
16701
16705
  interface Result extends DefaultPaginationResult {
16702
- data: Data[];
16706
+ data: (Data & {
16707
+ is_favorite?: boolean;
16708
+ is_default?: boolean;
16709
+ teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
16710
+ copied_from_populated?: ReportView.Data;
16711
+ report_view_favorite_id?: StringId;
16712
+ report_view_default_id?: StringId;
16713
+ })[];
16703
16714
  }
16704
16715
  }
16705
16716
  namespace Get {
16706
16717
  type ID = StringId;
16707
- type Params = {};
16708
- type Result = Data;
16718
+ type Params = {
16719
+ populatedKeys?: ("teams" | "copied_from")[];
16720
+ with_favorite?: boolean;
16721
+ with_default?: boolean;
16722
+ };
16723
+ type Result = Data & {
16724
+ is_favorite?: boolean;
16725
+ is_default?: boolean;
16726
+ teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
16727
+ copied_from_populated?: ReportView.Data;
16728
+ report_view_favorite_id?: StringId;
16729
+ report_view_default_id?: StringId;
16730
+ };
16709
16731
  }
16710
16732
  namespace Create {
16711
16733
  type params = {
@@ -16826,6 +16848,15 @@ export declare namespace Service {
16826
16848
  };
16827
16849
  }
16828
16850
  }
16851
+ namespace CopyReportView {
16852
+ namespace Update {
16853
+ type ID = StringId;
16854
+ type Body = {};
16855
+ type Result = ReportView.Data & {
16856
+ copied_from: StringId;
16857
+ };
16858
+ }
16859
+ }
16829
16860
  }
16830
16861
  export type StringId = string;
16831
16862
  export type NameSpaces = string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.199",
3
+ "version": "1.0.201",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -117,6 +117,7 @@ export const end_points = {
117
117
  REPORT_VIEW: "report-view",
118
118
  REPORT_VIEW_DEFAULT: "report-view-default",
119
119
  REPORT_VIEW_FAVORITE: "report-view-favorite",
120
+ COPY_REPORT_VIEW: "copy-report-view",
120
121
  } as const;
121
122
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
122
123
 
@@ -5548,6 +5549,21 @@ export default class Repzo {
5548
5549
  return res;
5549
5550
  },
5550
5551
  };
5552
+
5553
+ copyReportView = {
5554
+ _path: Repzo._end_points.COPY_REPORT_VIEW,
5555
+ update: async (
5556
+ id: Service.CopyReportView.Update.ID,
5557
+ body: Service.CopyReportView.Update.Body,
5558
+ ): Promise<Service.CopyReportView.Update.Result> => {
5559
+ let res: Service.CopyReportView.Update.Result = await this._update(
5560
+ this.svAPIEndpoint,
5561
+ this.copyReportView._path + `/${id}`,
5562
+ body,
5563
+ );
5564
+ return res;
5565
+ },
5566
+ };
5551
5567
  }
5552
5568
 
5553
5569
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -18841,6 +18841,7 @@ export namespace Service {
18841
18841
  report_type: ReportType;
18842
18842
  company_namespace: string[];
18843
18843
  teams?: string[];
18844
+ copied_from?: StringId;
18844
18845
  createdAt?: Date;
18845
18846
  updatedAt?: Date;
18846
18847
  }
@@ -18931,7 +18932,6 @@ export namespace Service {
18931
18932
 
18932
18933
  export namespace Find {
18933
18934
  export type Params = DefaultPaginationQueryParams & {
18934
- _id?: StringId | StringId[];
18935
18935
  name?: string | string[];
18936
18936
  disabled?: boolean;
18937
18937
  is_public?: boolean;
@@ -18940,16 +18940,38 @@ export namespace Service {
18940
18940
  mine_views?: boolean;
18941
18941
  teams?: StringId | StringId[];
18942
18942
  search?: string;
18943
+ mine_or_public_views?: boolean;
18944
+ populatedKeys?: ("teams" | "copied_from")[];
18945
+ with_favorite?: boolean;
18946
+ with_default?: boolean;
18943
18947
  };
18944
18948
  export interface Result extends DefaultPaginationResult {
18945
- data: Data[];
18949
+ data: (Data & {
18950
+ is_favorite?: boolean;
18951
+ is_default?: boolean;
18952
+ teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
18953
+ copied_from_populated?: ReportView.Data;
18954
+ report_view_favorite_id?: StringId;
18955
+ report_view_default_id?: StringId;
18956
+ })[];
18946
18957
  }
18947
18958
  }
18948
18959
 
18949
18960
  export namespace Get {
18950
18961
  export type ID = StringId;
18951
- export type Params = {};
18952
- export type Result = Data;
18962
+ export type Params = {
18963
+ populatedKeys?: ("teams" | "copied_from")[];
18964
+ with_favorite?: boolean;
18965
+ with_default?: boolean;
18966
+ };
18967
+ export type Result = Data & {
18968
+ is_favorite?: boolean;
18969
+ is_default?: boolean;
18970
+ teams_populated: Pick<Team.TeamSchema, "name" | "_id">;
18971
+ copied_from_populated?: ReportView.Data;
18972
+ report_view_favorite_id?: StringId;
18973
+ report_view_default_id?: StringId;
18974
+ };
18953
18975
  }
18954
18976
 
18955
18977
  export namespace Create {
@@ -19077,6 +19099,14 @@ export namespace Service {
19077
19099
  };
19078
19100
  }
19079
19101
  }
19102
+
19103
+ export namespace CopyReportView {
19104
+ export namespace Update {
19105
+ export type ID = StringId;
19106
+ export type Body = {};
19107
+ export type Result = ReportView.Data & { copied_from: StringId };
19108
+ }
19109
+ }
19080
19110
  }
19081
19111
 
19082
19112
  export type StringId = string;