repzo 1.0.274 → 1.0.276

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
@@ -136,9 +136,10 @@ export declare const end_points: {
136
136
  readonly ADMIN: "admin";
137
137
  readonly JOB_CATEGORY: "job-category";
138
138
  readonly JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze";
139
+ readonly VISIT_REASON: "visit-reason";
139
140
  };
140
141
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
141
- 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", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "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", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField"];
142
+ 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", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "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", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason"];
142
143
  export type AvailableService = (typeof availableService)[number];
143
144
  export default class Repzo {
144
145
  private svAPIEndpoint;
@@ -287,6 +288,7 @@ export default class Repzo {
287
288
  readonly ADMIN: "admin";
288
289
  readonly JOB_CATEGORY: "job-category";
289
290
  readonly JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze";
291
+ readonly VISIT_REASON: "visit-reason";
290
292
  };
291
293
  private _retryRequest;
292
294
  private _fetch;
@@ -294,7 +296,7 @@ export default class Repzo {
294
296
  private _update;
295
297
  private _patch;
296
298
  private _delete;
297
- available_services: 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", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "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", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField"];
299
+ available_services: 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", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "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", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason"];
298
300
  generateUUID: ({ prefix, suffix, length, }: {
299
301
  prefix?: string;
300
302
  suffix?: string;
@@ -1334,4 +1336,12 @@ export default class Repzo {
1334
1336
  _path: "job-category-autoskip-analyze";
1335
1337
  create: (body: Service.JobCategoryAutoSkipAnalyze.Create.Body) => Promise<Service.JobCategoryAutoSkipAnalyze.Create.Result>;
1336
1338
  };
1339
+ visitReason: {
1340
+ _path: "visit-reason";
1341
+ find: (params?: Service.VisitReason.Find.Params) => Promise<Service.VisitReason.Find.Result>;
1342
+ get: (id: Service.VisitReason.Get.ID) => Promise<Service.VisitReason.Get.Result>;
1343
+ create: (body: Service.VisitReason.Create.Body) => Promise<Service.VisitReason.Create.Result>;
1344
+ update: (id: Service.VisitReason.Update.ID, body: Service.VisitReason.Update.Body) => Promise<Service.VisitReason.Update.Result>;
1345
+ remove: (id: Service.VisitReason.Remove.ID) => Promise<Service.VisitReason.Remove.Result>;
1346
+ };
1337
1347
  }
package/lib/index.js CHANGED
@@ -138,6 +138,7 @@ export const end_points = {
138
138
  ADMIN: "admin",
139
139
  JOB_CATEGORY: "job-category",
140
140
  JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze",
141
+ VISIT_REASON: "visit-reason",
141
142
  };
142
143
  export const availableService = [
143
144
  "client",
@@ -235,6 +236,7 @@ export const availableService = [
235
236
  "clmSlide",
236
237
  "clmFetch",
237
238
  "pdfMergeField",
239
+ "visitReason",
238
240
  ];
239
241
  class Repzo {
240
242
  constructor(apiKey, options) {
@@ -2770,6 +2772,28 @@ class Repzo {
2770
2772
  return res;
2771
2773
  },
2772
2774
  };
2775
+ this.visitReason = {
2776
+ _path: Repzo._end_points.VISIT_REASON,
2777
+ find: async (params) => {
2778
+ let res = await this._fetch(this.svAPIEndpoint, this.visitReason._path, params);
2779
+ return res;
2780
+ },
2781
+ get: async (id) => {
2782
+ return await this._fetch(this.svAPIEndpoint, this.visitReason._path + `/${id}`);
2783
+ },
2784
+ create: async (body) => {
2785
+ let res = await this._create(this.svAPIEndpoint, this.visitReason._path, body);
2786
+ return res;
2787
+ },
2788
+ update: async (id, body) => {
2789
+ let res = await this._update(this.svAPIEndpoint, this.visitReason._path + `/${id}`, body);
2790
+ return res;
2791
+ },
2792
+ remove: async (id) => {
2793
+ let res = await this._delete(this.svAPIEndpoint, this.visitReason._path + `/${id}`);
2794
+ return res;
2795
+ },
2796
+ };
2773
2797
  this.svAPIEndpoint =
2774
2798
  !options?.env || options?.env == "production"
2775
2799
  ? "https://sv.api.repzo.me"
@@ -2000,6 +2000,7 @@ export declare namespace Service {
2000
2000
  previous_result_activated: boolean;
2001
2001
  presets_activated: boolean;
2002
2002
  apply_preset_to_all_sources: boolean;
2003
+ intersect_in_product_group_level: boolean;
2003
2004
  createdAt?: string;
2004
2005
  updatedAt?: string;
2005
2006
  __v?: number;
@@ -2017,6 +2018,7 @@ export declare namespace Service {
2017
2018
  previous_result_activated: boolean;
2018
2019
  presets_activated: boolean;
2019
2020
  apply_preset_to_all_sources: boolean;
2021
+ intersect_in_product_group_level?: boolean;
2020
2022
  }
2021
2023
  export interface UpdateBody {
2022
2024
  _id?: string;
@@ -2032,6 +2034,7 @@ export declare namespace Service {
2032
2034
  previous_result_activated?: boolean;
2033
2035
  presets_activated?: boolean;
2034
2036
  apply_preset_to_all_sources: boolean;
2037
+ intersect_in_product_group_level?: boolean;
2035
2038
  }
2036
2039
  export namespace Find {
2037
2040
  type Params = DefaultPaginationQueryParams & {
@@ -19040,6 +19043,55 @@ export declare namespace Service {
19040
19043
  }
19041
19044
  export {};
19042
19045
  }
19046
+ namespace VisitReason {
19047
+ interface Data {
19048
+ _id: StringId;
19049
+ company_namespace: string[];
19050
+ name: string;
19051
+ disabled: boolean;
19052
+ createdAt: string;
19053
+ updatedAt: string;
19054
+ __v?: number;
19055
+ }
19056
+ interface CreateBody {
19057
+ company_namespace?: string[];
19058
+ name: string;
19059
+ disabled?: boolean;
19060
+ }
19061
+ type UpdateBody = Partial<CreateBody>;
19062
+ namespace Find {
19063
+ type Params = DefaultPaginationQueryParams & {
19064
+ _id?: StringId | StringId[];
19065
+ search?: string;
19066
+ name?: string | string[];
19067
+ disabled?: boolean;
19068
+ from_updatedAt?: number;
19069
+ to_updatedAt?: number;
19070
+ from_createdAt?: number;
19071
+ to_createdAt?: number;
19072
+ };
19073
+ interface Result extends DefaultPaginationResult {
19074
+ data: Data[];
19075
+ }
19076
+ }
19077
+ namespace Get {
19078
+ type ID = StringId;
19079
+ type Result = Data;
19080
+ }
19081
+ namespace Create {
19082
+ type Body = CreateBody;
19083
+ type Result = Data;
19084
+ }
19085
+ namespace Update {
19086
+ type ID = StringId;
19087
+ type Body = UpdateBody;
19088
+ type Result = Data;
19089
+ }
19090
+ namespace Remove {
19091
+ type ID = StringId;
19092
+ type Result = Data;
19093
+ }
19094
+ }
19043
19095
  }
19044
19096
  export type StringId = string;
19045
19097
  export type NameSpaces = string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.274",
3
+ "version": "1.0.276",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -51,12 +51,12 @@
51
51
  "homepage": "https://github.com/Repzo/repzo-ts#readme",
52
52
  "dependencies": {
53
53
  "@babel/parser": "^7.14.7",
54
- "@types/axios": "^0.9.36",
55
54
  "uuid": "^8.3.2"
56
55
  },
57
56
  "devDependencies": {
58
57
  "@apidevtools/swagger-parser": "^12.0.0",
59
58
  "@redocly/openapi-cli": "^0.12.16",
59
+ "@types/axios": "^0.9.36",
60
60
  "@types/node": "^24.10.0",
61
61
  "@types/uuid": "^8.3.4",
62
62
  "axios": "^0.26.1",
package/src/index.ts CHANGED
@@ -148,6 +148,7 @@ export const end_points = {
148
148
  ADMIN: "admin",
149
149
  JOB_CATEGORY: "job-category",
150
150
  JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze",
151
+ VISIT_REASON: "visit-reason",
151
152
  } as const;
152
153
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
153
154
 
@@ -247,6 +248,7 @@ export const availableService = [
247
248
  "clmSlide",
248
249
  "clmFetch",
249
250
  "pdfMergeField",
251
+ "visitReason",
250
252
  ] as const;
251
253
  export type AvailableService = (typeof availableService)[number];
252
254
 
@@ -6951,6 +6953,58 @@ export default class Repzo {
6951
6953
  return res;
6952
6954
  },
6953
6955
  };
6956
+
6957
+ visitReason = {
6958
+ _path: Repzo._end_points.VISIT_REASON,
6959
+ find: async (
6960
+ params?: Service.VisitReason.Find.Params,
6961
+ ): Promise<Service.VisitReason.Find.Result> => {
6962
+ let res: Service.VisitReason.Find.Result = await this._fetch(
6963
+ this.svAPIEndpoint,
6964
+ this.visitReason._path,
6965
+ params,
6966
+ );
6967
+ return res;
6968
+ },
6969
+ get: async (
6970
+ id: Service.VisitReason.Get.ID,
6971
+ ): Promise<Service.VisitReason.Get.Result> => {
6972
+ return await this._fetch(
6973
+ this.svAPIEndpoint,
6974
+ this.visitReason._path + `/${id}`,
6975
+ );
6976
+ },
6977
+ create: async (
6978
+ body: Service.VisitReason.Create.Body,
6979
+ ): Promise<Service.VisitReason.Create.Result> => {
6980
+ let res = await this._create(
6981
+ this.svAPIEndpoint,
6982
+ this.visitReason._path,
6983
+ body,
6984
+ );
6985
+ return res;
6986
+ },
6987
+ update: async (
6988
+ id: Service.VisitReason.Update.ID,
6989
+ body: Service.VisitReason.Update.Body,
6990
+ ): Promise<Service.VisitReason.Update.Result> => {
6991
+ let res: Service.VisitReason.Update.Result = await this._update(
6992
+ this.svAPIEndpoint,
6993
+ this.visitReason._path + `/${id}`,
6994
+ body,
6995
+ );
6996
+ return res;
6997
+ },
6998
+ remove: async (
6999
+ id: Service.VisitReason.Remove.ID,
7000
+ ): Promise<Service.VisitReason.Remove.Result> => {
7001
+ let res: Service.VisitReason.Remove.Result = await this._delete(
7002
+ this.svAPIEndpoint,
7003
+ this.visitReason._path + `/${id}`,
7004
+ );
7005
+ return res;
7006
+ },
7007
+ };
6954
7008
  }
6955
7009
 
6956
7010
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -2433,6 +2433,7 @@ export namespace Service {
2433
2433
  previous_result_activated: boolean;
2434
2434
  presets_activated: boolean;
2435
2435
  apply_preset_to_all_sources: boolean;
2436
+ intersect_in_product_group_level: boolean;
2436
2437
  createdAt?: string;
2437
2438
  updatedAt?: string;
2438
2439
  __v?: number;
@@ -2450,6 +2451,7 @@ export namespace Service {
2450
2451
  previous_result_activated: boolean;
2451
2452
  presets_activated: boolean;
2452
2453
  apply_preset_to_all_sources: boolean;
2454
+ intersect_in_product_group_level?: boolean;
2453
2455
  }
2454
2456
  export interface UpdateBody {
2455
2457
  _id?: string;
@@ -2465,6 +2467,7 @@ export namespace Service {
2465
2467
  previous_result_activated?: boolean;
2466
2468
  presets_activated?: boolean;
2467
2469
  apply_preset_to_all_sources: boolean;
2470
+ intersect_in_product_group_level?: boolean;
2468
2471
  }
2469
2472
  export namespace Find {
2470
2473
  export type Params = DefaultPaginationQueryParams & {
@@ -21414,6 +21417,57 @@ export namespace Service {
21414
21417
  export type Result = Data;
21415
21418
  }
21416
21419
  }
21420
+
21421
+ export namespace VisitReason {
21422
+ export interface Data {
21423
+ _id: StringId;
21424
+ company_namespace: string[];
21425
+ name: string;
21426
+ disabled: boolean;
21427
+ createdAt: string;
21428
+ updatedAt: string;
21429
+ __v?: number;
21430
+ }
21431
+ export interface CreateBody {
21432
+ company_namespace?: string[];
21433
+ name: string;
21434
+ disabled?: boolean;
21435
+ }
21436
+ export type UpdateBody = Partial<CreateBody>;
21437
+
21438
+ export namespace Find {
21439
+ export type Params = DefaultPaginationQueryParams & {
21440
+ _id?: StringId | StringId[];
21441
+ search?: string;
21442
+ name?: string | string[];
21443
+ disabled?: boolean;
21444
+ from_updatedAt?: number;
21445
+ to_updatedAt?: number;
21446
+ from_createdAt?: number;
21447
+ to_createdAt?: number;
21448
+ };
21449
+ export interface Result extends DefaultPaginationResult {
21450
+ data: Data[];
21451
+ }
21452
+ }
21453
+ export namespace Get {
21454
+ export type ID = StringId;
21455
+ export type Result = Data;
21456
+ }
21457
+ export namespace Create {
21458
+ export type Body = CreateBody;
21459
+ export type Result = Data;
21460
+ }
21461
+ export namespace Update {
21462
+ export type ID = StringId;
21463
+ export type Body = UpdateBody;
21464
+ export type Result = Data;
21465
+ }
21466
+ export namespace Remove {
21467
+ export type ID = StringId;
21468
+ export type Result = Data;
21469
+ }
21470
+ }
21417
21471
  }
21418
21472
 
21419
21473
  export type StringId = string;