repzo 1.0.241 → 1.0.242

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
@@ -122,6 +122,7 @@ export declare const end_points: {
122
122
  readonly AUTHENTICATE: "authenticate";
123
123
  readonly OPTIONAL_BUSINESS_APP_SERVICE: "optional-business-app-service";
124
124
  readonly PROMOTION_USAGE: "promotion-usage";
125
+ readonly CART: "cart";
125
126
  };
126
127
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
127
128
  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"];
@@ -259,6 +260,7 @@ export default class Repzo {
259
260
  readonly AUTHENTICATE: "authenticate";
260
261
  readonly OPTIONAL_BUSINESS_APP_SERVICE: "optional-business-app-service";
261
262
  readonly PROMOTION_USAGE: "promotion-usage";
263
+ readonly CART: "cart";
262
264
  };
263
265
  private _retryRequest;
264
266
  private _fetch;
@@ -1199,4 +1201,11 @@ export default class Repzo {
1199
1201
  _path: "promotion-usage";
1200
1202
  find: (params?: Service.PromotionUsage.Find.Params) => Promise<Service.PromotionUsage.Find.Result>;
1201
1203
  };
1204
+ cart: {
1205
+ _path: "cart";
1206
+ find: (params?: Service.Cart.Find.Params) => Promise<Service.Cart.Find.Result>;
1207
+ get: (id: Service.Cart.Get.ID, params?: Service.Cart.Get.Params) => Promise<Service.Cart.Get.Result>;
1208
+ create: (body: Service.Cart.Create.Body) => Promise<Service.Cart.Create.Result>;
1209
+ remove: (id: Service.Cart.Remove.ID, params?: Service.Cart.Get.Params) => Promise<Service.Cart.Remove.Result>;
1210
+ };
1202
1211
  }
package/lib/index.js CHANGED
@@ -124,6 +124,7 @@ export const end_points = {
124
124
  AUTHENTICATE: "authenticate",
125
125
  OPTIONAL_BUSINESS_APP_SERVICE: "optional-business-app-service",
126
126
  PROMOTION_USAGE: "promotion-usage",
127
+ CART: "cart",
127
128
  };
128
129
  export const availableService = [
129
130
  "client",
@@ -2465,6 +2466,24 @@ class Repzo {
2465
2466
  return res;
2466
2467
  },
2467
2468
  };
2469
+ this.cart = {
2470
+ _path: Repzo._end_points.CART,
2471
+ find: async (params) => {
2472
+ let res = await this._fetch(this.svAPIEndpoint, this.cart._path, params);
2473
+ return res;
2474
+ },
2475
+ get: async (id, params) => {
2476
+ return await this._fetch(this.svAPIEndpoint, this.cart._path + `/${id}`, params);
2477
+ },
2478
+ create: async (body) => {
2479
+ let res = await this._create(this.svAPIEndpoint, this.cart._path, body);
2480
+ return res;
2481
+ },
2482
+ remove: async (id, params) => {
2483
+ let res = await this._delete(this.svAPIEndpoint, this.cart._path + id ? `/${id}` : "", params);
2484
+ return res;
2485
+ },
2486
+ };
2468
2487
  this.svAPIEndpoint =
2469
2488
  !options?.env || options?.env == "production"
2470
2489
  ? "https://sv.api.repzo.me"
@@ -11131,8 +11131,12 @@ export declare namespace Service {
11131
11131
  }
11132
11132
  namespace Find {
11133
11133
  type Params = DefaultPaginationQueryParams & {
11134
- client_id?: string;
11135
- type?: string;
11134
+ _id?: StringId | StringId[];
11135
+ client_id?: StringId | StringId[];
11136
+ "creator._id"?: StringId | StringId[];
11137
+ type?: Data["type"] | Data["type"][];
11138
+ "implemented_by._id"?: StringId | StringId[];
11139
+ sync_id?: string | string[];
11136
11140
  };
11137
11141
  interface Result extends DefaultPaginationResult {
11138
11142
  data: Data[];
@@ -11140,12 +11144,27 @@ export declare namespace Service {
11140
11144
  }
11141
11145
  namespace Get {
11142
11146
  type ID = string;
11147
+ type Params = {
11148
+ [key: string]: any;
11149
+ };
11143
11150
  type Result = Data;
11144
11151
  }
11145
11152
  namespace Create {
11146
11153
  type Body = CreateBody;
11147
11154
  type Result = Data;
11148
11155
  }
11156
+ namespace Remove {
11157
+ type ID = string;
11158
+ type Params = {
11159
+ _id?: StringId | StringId[];
11160
+ client_id?: StringId | StringId[];
11161
+ "creator._id"?: StringId | StringId[];
11162
+ type?: Data["type"] | Data["type"][];
11163
+ };
11164
+ type Result = {
11165
+ success: boolean;
11166
+ };
11167
+ }
11149
11168
  }
11150
11169
  namespace OcrInvoiceJobTemplate {
11151
11170
  interface ProductMatchStage {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.241",
3
+ "version": "1.0.242",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -134,6 +134,7 @@ export const end_points = {
134
134
  AUTHENTICATE: "authenticate",
135
135
  OPTIONAL_BUSINESS_APP_SERVICE: "optional-business-app-service",
136
136
  PROMOTION_USAGE: "promotion-usage",
137
+ CART: "cart",
137
138
  } as const;
138
139
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
139
140
 
@@ -6232,6 +6233,47 @@ export default class Repzo {
6232
6233
  return res;
6233
6234
  },
6234
6235
  };
6236
+
6237
+ cart = {
6238
+ _path: Repzo._end_points.CART,
6239
+ find: async (
6240
+ params?: Service.Cart.Find.Params,
6241
+ ): Promise<Service.Cart.Find.Result> => {
6242
+ let res: Service.Cart.Find.Result = await this._fetch(
6243
+ this.svAPIEndpoint,
6244
+ this.cart._path,
6245
+ params,
6246
+ );
6247
+ return res;
6248
+ },
6249
+ get: async (
6250
+ id: Service.Cart.Get.ID,
6251
+ params?: Service.Cart.Get.Params,
6252
+ ): Promise<Service.Cart.Get.Result> => {
6253
+ return await this._fetch(
6254
+ this.svAPIEndpoint,
6255
+ this.cart._path + `/${id}`,
6256
+ params,
6257
+ );
6258
+ },
6259
+ create: async (
6260
+ body: Service.Cart.Create.Body,
6261
+ ): Promise<Service.Cart.Create.Result> => {
6262
+ let res = await this._create(this.svAPIEndpoint, this.cart._path, body);
6263
+ return res;
6264
+ },
6265
+ remove: async (
6266
+ id: Service.Cart.Remove.ID,
6267
+ params?: Service.Cart.Get.Params,
6268
+ ): Promise<Service.Cart.Remove.Result> => {
6269
+ let res: Service.Cart.Remove.Result = await this._delete(
6270
+ this.svAPIEndpoint,
6271
+ this.cart._path + id ? `/${id}` : "",
6272
+ params,
6273
+ );
6274
+ return res;
6275
+ },
6276
+ };
6235
6277
  }
6236
6278
 
6237
6279
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -11740,10 +11740,15 @@ export namespace Service {
11740
11740
  total_return_items_qty?: number;
11741
11741
  cart?: { [key: string]: any };
11742
11742
  }
11743
+
11743
11744
  export namespace Find {
11744
11745
  export type Params = DefaultPaginationQueryParams & {
11745
- client_id?: string;
11746
- type?: string;
11746
+ _id?: StringId | StringId[];
11747
+ client_id?: StringId | StringId[];
11748
+ "creator._id"?: StringId | StringId[];
11749
+ type?: Data["type"] | Data["type"][];
11750
+ "implemented_by._id"?: StringId | StringId[];
11751
+ sync_id?: string | string[];
11747
11752
  };
11748
11753
  export interface Result extends DefaultPaginationResult {
11749
11754
  data: Data[];
@@ -11751,12 +11756,23 @@ export namespace Service {
11751
11756
  }
11752
11757
  export namespace Get {
11753
11758
  export type ID = string;
11759
+ export type Params = { [key: string]: any };
11754
11760
  export type Result = Data;
11755
11761
  }
11756
11762
  export namespace Create {
11757
11763
  export type Body = CreateBody;
11758
11764
  export type Result = Data;
11759
11765
  }
11766
+ export namespace Remove {
11767
+ export type ID = string;
11768
+ export type Params = {
11769
+ _id?: StringId | StringId[];
11770
+ client_id?: StringId | StringId[];
11771
+ "creator._id"?: StringId | StringId[];
11772
+ type?: Data["type"] | Data["type"][];
11773
+ };
11774
+ export type Result = { success: boolean };
11775
+ }
11760
11776
  }
11761
11777
 
11762
11778
  export namespace OcrInvoiceJobTemplate {