repzo 1.0.247 → 1.0.249

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
@@ -124,6 +124,8 @@ export declare const end_points: {
124
124
  readonly PROMOTION_USAGE: "promotion-usage";
125
125
  readonly CART: "cart";
126
126
  readonly LATEST_SERIAL: "latest-serial";
127
+ readonly FORM_V2: "form-v2";
128
+ readonly ACTIVITY_FORM_V2_RESULT: "activity-form-v2-result";
127
129
  };
128
130
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
129
131
  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", "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"];
@@ -263,6 +265,8 @@ export default class Repzo {
263
265
  readonly PROMOTION_USAGE: "promotion-usage";
264
266
  readonly CART: "cart";
265
267
  readonly LATEST_SERIAL: "latest-serial";
268
+ readonly FORM_V2: "form-v2";
269
+ readonly ACTIVITY_FORM_V2_RESULT: "activity-form-v2-result";
266
270
  };
267
271
  private _retryRequest;
268
272
  private _fetch;
@@ -1214,4 +1218,19 @@ export default class Repzo {
1214
1218
  _path: "latest-serial";
1215
1219
  find: (params?: Service.LatestSerial.Find.Params) => Promise<Service.LatestSerial.Find.Result>;
1216
1220
  };
1221
+ formV2: {
1222
+ _path: "form-v2";
1223
+ find: (params?: Service.FormV2.Find.Params) => Promise<Service.FormV2.Find.Result>;
1224
+ get: (id: Service.FormV2.Get.ID, params?: Service.FormV2.Get.Params) => Promise<Service.FormV2.Get.Result>;
1225
+ create: (body: Service.FormV2.Create.Body) => Promise<Service.FormV2.Create.Result>;
1226
+ update: (id: Service.FormV2.Update.ID, body: Service.FormV2.Update.Body) => Promise<Service.FormV2.Update.Result>;
1227
+ remove: (id: Service.FormV2.Update.ID) => Promise<Service.FormV2.Remove.Result>;
1228
+ };
1229
+ activityFormV2Result: {
1230
+ _path: "activity-form-v2-result";
1231
+ find: (params?: Service.ActivityFormV2Result.Find.Params) => Promise<Service.ActivityFormV2Result.Find.Result>;
1232
+ get: (id: Service.ActivityFormV2Result.Get.ID, params?: Service.ActivityFormV2Result.Get.Params) => Promise<Service.ActivityFormV2Result.Get.Result>;
1233
+ create: (body: Service.ActivityFormV2Result.Create.Body) => Promise<Service.ActivityFormV2Result.Create.Result>;
1234
+ update: (id: Service.ActivityFormV2Result.Update.ID, body: Service.ActivityFormV2Result.Update.Body) => Promise<Service.ActivityFormV2Result.Update.Result>;
1235
+ };
1217
1236
  }
package/lib/index.js CHANGED
@@ -126,6 +126,8 @@ export const end_points = {
126
126
  PROMOTION_USAGE: "promotion-usage",
127
127
  CART: "cart",
128
128
  LATEST_SERIAL: "latest-serial",
129
+ FORM_V2: "form-v2",
130
+ ACTIVITY_FORM_V2_RESULT: "activity-form-v2-result",
129
131
  };
130
132
  export const availableService = [
131
133
  "client",
@@ -2492,6 +2494,46 @@ class Repzo {
2492
2494
  return res;
2493
2495
  },
2494
2496
  };
2497
+ this.formV2 = {
2498
+ _path: Repzo._end_points.FORM_V2,
2499
+ find: async (params) => {
2500
+ let res = await this._fetch(this.svAPIEndpoint, this.formV2._path, params);
2501
+ return res;
2502
+ },
2503
+ get: async (id, params) => {
2504
+ return await this._fetch(this.svAPIEndpoint, this.formV2._path + `/${id}`, params);
2505
+ },
2506
+ create: async (body) => {
2507
+ let res = await this._create(this.svAPIEndpoint, this.formV2._path, body);
2508
+ return res;
2509
+ },
2510
+ update: async (id, body) => {
2511
+ let res = await this._update(this.svAPIEndpoint, this.formV2._path + `/${id}`, body);
2512
+ return res;
2513
+ },
2514
+ remove: async (id) => {
2515
+ let res = await this._delete(this.svAPIEndpoint, this.formV2._path + `/${id}`);
2516
+ return res;
2517
+ },
2518
+ };
2519
+ this.activityFormV2Result = {
2520
+ _path: Repzo._end_points.ACTIVITY_FORM_V2_RESULT,
2521
+ find: async (params) => {
2522
+ let res = await this._fetch(this.svAPIEndpoint, this.activityFormV2Result._path, params);
2523
+ return res;
2524
+ },
2525
+ get: async (id, params) => {
2526
+ return await this._fetch(this.svAPIEndpoint, this.activityFormV2Result._path + `/${id}`, params);
2527
+ },
2528
+ create: async (body) => {
2529
+ let res = await this._create(this.svAPIEndpoint, this.activityFormV2Result._path, body);
2530
+ return res;
2531
+ },
2532
+ update: async (id, body) => {
2533
+ let res = await this._update(this.svAPIEndpoint, this.activityFormV2Result._path + `/${id}`, body);
2534
+ return res;
2535
+ },
2536
+ };
2495
2537
  this.svAPIEndpoint =
2496
2538
  !options?.env || options?.env == "production"
2497
2539
  ? "https://sv.api.repzo.me"