repzo 1.0.170 → 1.0.172

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
@@ -95,6 +95,7 @@ export declare const end_points: {
95
95
  readonly TIMELINE_TIME_LIST: "timeline-time-list";
96
96
  readonly WORKORDER_AGENDA: "workorder-agenda";
97
97
  readonly MODULE_CUSTOM_VALIDATOR: "module-custom-validator";
98
+ readonly NOTIFICATIONS_CENTER: "notifications-center";
98
99
  };
99
100
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
100
101
  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"];
@@ -201,6 +202,7 @@ export default class Repzo {
201
202
  readonly TIMELINE_TIME_LIST: "timeline-time-list";
202
203
  readonly WORKORDER_AGENDA: "workorder-agenda";
203
204
  readonly MODULE_CUSTOM_VALIDATOR: "module-custom-validator";
205
+ readonly NOTIFICATIONS_CENTER: "notifications-center";
204
206
  };
205
207
  private _fetch;
206
208
  private _create;
@@ -960,4 +962,11 @@ export default class Repzo {
960
962
  update: (id: Service.ModuleCustomValidator.Update.ID, body: Service.ModuleCustomValidator.Update.Body) => Promise<Service.ModuleCustomValidator.Update.Result>;
961
963
  remove: (id: Service.ModuleCustomValidator.Remove.ID, params: Service.ModuleCustomValidator.Remove.Params) => Promise<Service.ModuleCustomValidator.Remove.Result>;
962
964
  };
965
+ notificationsCenter: {
966
+ _path: "notifications-center";
967
+ find: (params?: Service.NotificationsCenter.Find.Params) => Promise<Service.NotificationsCenter.Find.Result>;
968
+ get: (id: Service.NotificationsCenter.Get.ID, params?: Service.NotificationsCenter.Get.Params) => Promise<Service.NotificationsCenter.Get.Result>;
969
+ create: (body: Service.NotificationsCenter.Create.Body) => Promise<Service.NotificationsCenter.Create.Result>;
970
+ update: (id: Service.NotificationsCenter.Update.ID, body: Service.NotificationsCenter.Update.Body) => Promise<Service.NotificationsCenter.Update.Result>;
971
+ };
963
972
  }
package/lib/index.js CHANGED
@@ -96,6 +96,7 @@ export const end_points = {
96
96
  TIMELINE_TIME_LIST: "timeline-time-list",
97
97
  WORKORDER_AGENDA: "workorder-agenda",
98
98
  MODULE_CUSTOM_VALIDATOR: "module-custom-validator",
99
+ NOTIFICATIONS_CENTER: "notifications-center",
99
100
  };
100
101
  export const availableService = [
101
102
  "client",
@@ -1965,6 +1966,24 @@ class Repzo {
1965
1966
  return res;
1966
1967
  },
1967
1968
  };
1969
+ this.notificationsCenter = {
1970
+ _path: Repzo._end_points.NOTIFICATIONS_CENTER,
1971
+ find: async (params) => {
1972
+ let res = await this._fetch(this.svAPIEndpoint, this.notificationsCenter._path, params);
1973
+ return res;
1974
+ },
1975
+ get: async (id, params) => {
1976
+ return await this._fetch(this.svAPIEndpoint, this.notificationsCenter._path + `/${id}`, params);
1977
+ },
1978
+ create: async (body) => {
1979
+ let res = await this._create(this.svAPIEndpoint, this.notificationsCenter._path, body);
1980
+ return res;
1981
+ },
1982
+ update: async (id, body) => {
1983
+ let res = await this._update(this.svAPIEndpoint, this.notificationsCenter._path + `/${id}`, body);
1984
+ return res;
1985
+ },
1986
+ };
1968
1987
  this.svAPIEndpoint =
1969
1988
  !options?.env || options?.env == "production"
1970
1989
  ? "https://sv.api.repzo.me"
@@ -2803,6 +2803,7 @@ export declare namespace Service {
2803
2803
  updatedAt: string;
2804
2804
  __v: number;
2805
2805
  }
2806
+ export type Data = TagSchema;
2806
2807
  export interface TagBody {
2807
2808
  tag?: string;
2808
2809
  type?: TagType;
@@ -15823,6 +15824,143 @@ export declare namespace Service {
15823
15824
  }
15824
15825
  export {};
15825
15826
  }
15827
+ namespace NotificationsCenter {
15828
+ export type Command = "update-categories" | "update-clients" | "bulk-update-clients" | "update-inventory" | "update-measureunitFamilies" | "update-measureunits" | "update-pricelistItems" | "update-pricelists" | "update-products" | "update-rep" | "update-salesmsl" | "update-settings" | "update-tags" | "update-taxes" | "update-transfer" | "update-warehouses" | "update-jobCategories" | "update-plans" | "update-workorders" | "update-commentsThread" | "update-approval-request" | "update-variant-batch" | "update-asset-part-type" | "update-asset-part" | "update-asset-part-unit" | "update-custom-status" | "update-module-custom-validator" | "update-feedback-options";
15829
+ export interface Data {
15830
+ _id: StringId;
15831
+ command: Command;
15832
+ executed?: boolean;
15833
+ listed?: boolean;
15834
+ payload?: {
15835
+ endpoint?: string;
15836
+ message?: {
15837
+ ar?: string;
15838
+ en?: string;
15839
+ };
15840
+ photo?: string;
15841
+ media?: StringId[];
15842
+ type?: string;
15843
+ };
15844
+ read?: boolean;
15845
+ realmId?: StringId;
15846
+ time?: number;
15847
+ toast?: {
15848
+ ar?: string;
15849
+ en?: string;
15850
+ };
15851
+ teams?: StringId[];
15852
+ docs_ids?: StringId[];
15853
+ user?: AdminOrRep;
15854
+ visible?: boolean;
15855
+ meta?: {
15856
+ [key: string]: any;
15857
+ };
15858
+ company_namespace: string[];
15859
+ createdAt: Date;
15860
+ updatedAt: Date;
15861
+ }
15862
+ export type PopulatedDoc = Data & {
15863
+ cycle?: Cycle.Schema & {
15864
+ payload?: Data["payload"] & {
15865
+ media?: PopulatedMediaStorage[];
15866
+ };
15867
+ };
15868
+ };
15869
+ export interface CreateBody {
15870
+ command: Command;
15871
+ executed?: boolean;
15872
+ listed?: boolean;
15873
+ payload?: {
15874
+ endpoint?: string;
15875
+ message?: {
15876
+ ar?: string;
15877
+ en?: string;
15878
+ };
15879
+ photo?: string;
15880
+ media?: StringId[];
15881
+ type?: string;
15882
+ };
15883
+ read?: boolean;
15884
+ realmId?: StringId;
15885
+ time?: number;
15886
+ toast?: {
15887
+ ar?: string;
15888
+ en?: string;
15889
+ };
15890
+ teams?: StringId[];
15891
+ docs_ids?: StringId[];
15892
+ user?: AdminOrRep;
15893
+ visible?: boolean;
15894
+ meta?: {
15895
+ [key: string]: any;
15896
+ };
15897
+ company_namespace?: string[];
15898
+ }
15899
+ export interface UpdateBody {
15900
+ _id?: StringId;
15901
+ command?: Command;
15902
+ executed?: boolean;
15903
+ listed?: boolean;
15904
+ payload?: {
15905
+ endpoint?: string;
15906
+ message?: {
15907
+ ar?: string;
15908
+ en?: string;
15909
+ };
15910
+ photo?: string;
15911
+ media?: StringId[];
15912
+ type?: string;
15913
+ };
15914
+ read?: boolean;
15915
+ realmId?: StringId;
15916
+ time?: number;
15917
+ toast?: {
15918
+ ar?: string;
15919
+ en?: string;
15920
+ };
15921
+ teams?: StringId[];
15922
+ docs_ids?: StringId[];
15923
+ user?: AdminOrRep;
15924
+ visible?: boolean;
15925
+ meta?: {
15926
+ [key: string]: any;
15927
+ };
15928
+ company_namespace?: string[];
15929
+ createdAt?: Date;
15930
+ updatedAt?: Date;
15931
+ }
15932
+ type PopulatedKeys = "media";
15933
+ export namespace Find {
15934
+ type Params = DefaultPaginationQueryParams & {
15935
+ command?: Command | Command[];
15936
+ "user._id"?: StringId | StringId[];
15937
+ executed?: boolean;
15938
+ populatedKeys?: PopulatedKeys[];
15939
+ [key: string]: any;
15940
+ };
15941
+ interface Result extends DefaultPaginationResult {
15942
+ data: Data[] | PopulatedDoc[];
15943
+ }
15944
+ }
15945
+ export namespace Get {
15946
+ type ID = string;
15947
+ type Params = {
15948
+ populatedKeys?: PopulatedKeys[];
15949
+ [key: string]: any;
15950
+ };
15951
+ type Result = Data | PopulatedDoc;
15952
+ }
15953
+ export namespace Create {
15954
+ type Body = CreateBody;
15955
+ type Result = Data;
15956
+ }
15957
+ export namespace Update {
15958
+ type ID = string;
15959
+ type Body = UpdateBody;
15960
+ type Result = Data;
15961
+ }
15962
+ export {};
15963
+ }
15826
15964
  }
15827
15965
  export type StringId = string;
15828
15966
  export type NameSpaces = string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.170",
3
+ "version": "1.0.172",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -106,6 +106,7 @@ export const end_points = {
106
106
  TIMELINE_TIME_LIST: "timeline-time-list",
107
107
  WORKORDER_AGENDA: "workorder-agenda",
108
108
  MODULE_CUSTOM_VALIDATOR: "module-custom-validator",
109
+ NOTIFICATIONS_CENTER: "notifications-center",
109
110
  } as const;
110
111
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
111
112
 
@@ -5012,6 +5013,51 @@ export default class Repzo {
5012
5013
  return res;
5013
5014
  },
5014
5015
  };
5016
+
5017
+ notificationsCenter = {
5018
+ _path: Repzo._end_points.NOTIFICATIONS_CENTER,
5019
+ find: async (
5020
+ params?: Service.NotificationsCenter.Find.Params,
5021
+ ): Promise<Service.NotificationsCenter.Find.Result> => {
5022
+ let res: Service.NotificationsCenter.Find.Result = await this._fetch(
5023
+ this.svAPIEndpoint,
5024
+ this.notificationsCenter._path,
5025
+ params,
5026
+ );
5027
+ return res;
5028
+ },
5029
+ get: async (
5030
+ id: Service.NotificationsCenter.Get.ID,
5031
+ params?: Service.NotificationsCenter.Get.Params,
5032
+ ): Promise<Service.NotificationsCenter.Get.Result> => {
5033
+ return await this._fetch(
5034
+ this.svAPIEndpoint,
5035
+ this.notificationsCenter._path + `/${id}`,
5036
+ params,
5037
+ );
5038
+ },
5039
+ create: async (
5040
+ body: Service.NotificationsCenter.Create.Body,
5041
+ ): Promise<Service.NotificationsCenter.Create.Result> => {
5042
+ let res = await this._create(
5043
+ this.svAPIEndpoint,
5044
+ this.notificationsCenter._path,
5045
+ body,
5046
+ );
5047
+ return res;
5048
+ },
5049
+ update: async (
5050
+ id: Service.NotificationsCenter.Update.ID,
5051
+ body: Service.NotificationsCenter.Update.Body,
5052
+ ): Promise<Service.NotificationsCenter.Update.Result> => {
5053
+ let res: Service.NotificationsCenter.Update.Result = await this._update(
5054
+ this.svAPIEndpoint,
5055
+ this.notificationsCenter._path + `/${id}`,
5056
+ body,
5057
+ );
5058
+ return res;
5059
+ },
5060
+ };
5015
5061
  }
5016
5062
 
5017
5063
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -3225,6 +3225,7 @@ export namespace Service {
3225
3225
  updatedAt: string;
3226
3226
  __v: number;
3227
3227
  }
3228
+ export type Data = TagSchema;
3228
3229
  export interface TagBody {
3229
3230
  tag?: string;
3230
3231
  type?: TagType;
@@ -17852,6 +17853,147 @@ export namespace Service {
17852
17853
  export type Result = Data;
17853
17854
  }
17854
17855
  }
17856
+
17857
+ export namespace NotificationsCenter {
17858
+ export type Command =
17859
+ | "update-categories"
17860
+ | "update-clients"
17861
+ | "bulk-update-clients"
17862
+ | "update-inventory"
17863
+ | "update-measureunitFamilies"
17864
+ | "update-measureunits"
17865
+ | "update-pricelistItems"
17866
+ | "update-pricelists"
17867
+ | "update-products"
17868
+ | "update-rep"
17869
+ | "update-salesmsl"
17870
+ | "update-settings"
17871
+ | "update-tags"
17872
+ | "update-taxes"
17873
+ | "update-transfer"
17874
+ | "update-warehouses"
17875
+ | "update-jobCategories"
17876
+ | "update-plans"
17877
+ | "update-workorders"
17878
+ | "update-commentsThread"
17879
+ | "update-approval-request"
17880
+ | "update-variant-batch"
17881
+ | "update-asset-part-type"
17882
+ | "update-asset-part"
17883
+ | "update-asset-part-unit"
17884
+ | "update-custom-status"
17885
+ | "update-module-custom-validator"
17886
+ | "update-feedback-options";
17887
+ export interface Data {
17888
+ _id: StringId;
17889
+ command: Command;
17890
+ executed?: boolean;
17891
+ listed?: boolean;
17892
+ payload?: {
17893
+ endpoint?: string;
17894
+ message?: { ar?: string; en?: string };
17895
+ photo?: string;
17896
+ media?: StringId[];
17897
+ type?: string;
17898
+ };
17899
+ read?: boolean;
17900
+ realmId?: StringId;
17901
+ time?: number;
17902
+ toast?: { ar?: string; en?: string };
17903
+ teams?: StringId[];
17904
+ docs_ids?: StringId[];
17905
+ user?: AdminOrRep;
17906
+ visible?: boolean;
17907
+ meta?: { [key: string]: any };
17908
+ company_namespace: string[];
17909
+ createdAt: Date;
17910
+ updatedAt: Date;
17911
+ }
17912
+ export type PopulatedDoc = Data & {
17913
+ cycle?: Cycle.Schema & {
17914
+ payload?: Data["payload"] & { media?: PopulatedMediaStorage[] };
17915
+ };
17916
+ };
17917
+ export interface CreateBody {
17918
+ command: Command;
17919
+ executed?: boolean;
17920
+ listed?: boolean;
17921
+ payload?: {
17922
+ endpoint?: string;
17923
+ message?: { ar?: string; en?: string };
17924
+ photo?: string;
17925
+ media?: StringId[];
17926
+ type?: string;
17927
+ };
17928
+ read?: boolean;
17929
+ realmId?: StringId;
17930
+ time?: number;
17931
+ toast?: { ar?: string; en?: string };
17932
+ teams?: StringId[];
17933
+ docs_ids?: StringId[];
17934
+ user?: AdminOrRep;
17935
+ visible?: boolean;
17936
+ meta?: { [key: string]: any };
17937
+ company_namespace?: string[];
17938
+ }
17939
+ export interface UpdateBody {
17940
+ _id?: StringId;
17941
+ command?: Command;
17942
+ executed?: boolean;
17943
+ listed?: boolean;
17944
+ payload?: {
17945
+ endpoint?: string;
17946
+ message?: { ar?: string; en?: string };
17947
+ photo?: string;
17948
+ media?: StringId[];
17949
+ type?: string;
17950
+ };
17951
+ read?: boolean;
17952
+ realmId?: StringId;
17953
+ time?: number;
17954
+ toast?: { ar?: string; en?: string };
17955
+ teams?: StringId[];
17956
+ docs_ids?: StringId[];
17957
+ user?: AdminOrRep;
17958
+ visible?: boolean;
17959
+ meta?: { [key: string]: any };
17960
+ company_namespace?: string[];
17961
+ createdAt?: Date;
17962
+ updatedAt?: Date;
17963
+ }
17964
+
17965
+ type PopulatedKeys = "media";
17966
+
17967
+ export namespace Find {
17968
+ export type Params = DefaultPaginationQueryParams & {
17969
+ command?: Command | Command[];
17970
+ "user._id"?: StringId | StringId[];
17971
+ executed?: boolean;
17972
+ populatedKeys?: PopulatedKeys[];
17973
+ [key: string]: any; // integration_meta.
17974
+ };
17975
+ export interface Result extends DefaultPaginationResult {
17976
+ data: Data[] | PopulatedDoc[];
17977
+ }
17978
+ }
17979
+ export namespace Get {
17980
+ export type ID = string;
17981
+ export type Params = {
17982
+ populatedKeys?: PopulatedKeys[];
17983
+ [key: string]: any;
17984
+ };
17985
+ export type Result = Data | PopulatedDoc;
17986
+ }
17987
+ export namespace Create {
17988
+ export type Body = CreateBody;
17989
+ export type Result = Data;
17990
+ }
17991
+ export namespace Update {
17992
+ export type ID = string;
17993
+ export type Body = UpdateBody;
17994
+ export type Result = Data;
17995
+ }
17996
+ }
17855
17997
  }
17856
17998
 
17857
17999
  export type StringId = string;