repzo 1.0.282 → 1.0.284

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/src/index.ts CHANGED
@@ -23,6 +23,7 @@ export const end_points = {
23
23
  MEASUREUNIT: "measureunits",
24
24
  MEASUREUNIT_FAMILY: "measureunit-family",
25
25
  MEDIA: "media",
26
+ CYCLES: "cycles",
26
27
  PRICELIST: "pricelists",
27
28
  PRICELIST_ITEM: "pricelistsitems",
28
29
  TEAM: "teams",
@@ -154,6 +155,8 @@ export const end_points = {
154
155
  CALENDAR: "calendar",
155
156
  LINE_TARGET: "line-target",
156
157
  BULK_IMPORT: "bulk-import",
158
+ DELIVERY_NOTE: "delivery-note",
159
+ RESERVATION: "reservation",
157
160
  } as const;
158
161
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
159
162
 
@@ -6005,6 +6008,30 @@ export default class Repzo {
6005
6008
  },
6006
6009
  };
6007
6010
 
6011
+ cycle = {
6012
+ _path: Repzo._end_points.CYCLES,
6013
+ find: async (
6014
+ params?: Service.Cycle.Find.Params,
6015
+ ): Promise<Service.Cycle.Find.Result> => {
6016
+ let res: Service.Cycle.Find.Result = await this._fetch(
6017
+ this.svAPIEndpoint,
6018
+ this.cycle._path,
6019
+ params,
6020
+ );
6021
+ return res;
6022
+ },
6023
+ get: async (
6024
+ id: Service.Cycle.Get.ID,
6025
+ params?: Service.Cycle.Get.Params,
6026
+ ): Promise<Service.Cycle.Get.Result> => {
6027
+ return await this._fetch(
6028
+ this.svAPIEndpoint,
6029
+ this.cycle._path + `/${id}`,
6030
+ params,
6031
+ );
6032
+ },
6033
+ };
6034
+
6008
6035
  promotions = {
6009
6036
  _path: Repzo._end_points.PROMOTIONS,
6010
6037
  find: async (
@@ -7273,6 +7300,96 @@ export default class Repzo {
7273
7300
  return res;
7274
7301
  },
7275
7302
  };
7303
+
7304
+ deliveryNote = {
7305
+ _path: Repzo._end_points.DELIVERY_NOTE,
7306
+ find: async (
7307
+ params?: Service.DeliveryNote.Find.Params,
7308
+ ): Promise<Service.DeliveryNote.Find.Result> => {
7309
+ let res: Service.DeliveryNote.Find.Result = await this._fetch(
7310
+ this.svAPIEndpoint,
7311
+ this.deliveryNote._path,
7312
+ params,
7313
+ );
7314
+ return res;
7315
+ },
7316
+ get: async (
7317
+ id: Service.DeliveryNote.Get.ID,
7318
+ params?: Service.DeliveryNote.Get.Params,
7319
+ ): Promise<Service.DeliveryNote.Get.Result> => {
7320
+ return await this._fetch(
7321
+ this.svAPIEndpoint,
7322
+ this.deliveryNote._path + `/${id}`,
7323
+ params,
7324
+ );
7325
+ },
7326
+ create: async (
7327
+ body: Service.DeliveryNote.Create.Body,
7328
+ ): Promise<Service.DeliveryNote.Create.Result> => {
7329
+ let res = await this._create(
7330
+ this.svAPIEndpoint,
7331
+ this.deliveryNote._path,
7332
+ body,
7333
+ );
7334
+ return res;
7335
+ },
7336
+ update: async (
7337
+ id: Service.DeliveryNote.Update.ID,
7338
+ body: Service.DeliveryNote.Update.Body,
7339
+ ): Promise<Service.DeliveryNote.Update.Result> => {
7340
+ let res: Service.DeliveryNote.Update.Result = await this._update(
7341
+ this.svAPIEndpoint,
7342
+ this.deliveryNote._path + `/${id}`,
7343
+ body,
7344
+ );
7345
+ return res;
7346
+ },
7347
+ };
7348
+
7349
+ reservation = {
7350
+ _path: Repzo._end_points.RESERVATION,
7351
+ find: async (
7352
+ params?: Service.Reservation.Find.Params,
7353
+ ): Promise<Service.Reservation.Find.Result> => {
7354
+ let res: Service.Reservation.Find.Result = await this._fetch(
7355
+ this.svAPIEndpoint,
7356
+ this.reservation._path,
7357
+ params,
7358
+ );
7359
+ return res;
7360
+ },
7361
+ get: async (
7362
+ id: Service.Reservation.Get.ID,
7363
+ params?: Service.Reservation.Get.Params,
7364
+ ): Promise<Service.Reservation.Get.Result> => {
7365
+ return await this._fetch(
7366
+ this.svAPIEndpoint,
7367
+ this.reservation._path + `/${id}`,
7368
+ params,
7369
+ );
7370
+ },
7371
+ create: async (
7372
+ body: Service.Reservation.Create.Body,
7373
+ ): Promise<Service.Reservation.Create.Result> => {
7374
+ let res = await this._create(
7375
+ this.svAPIEndpoint,
7376
+ this.reservation._path,
7377
+ body,
7378
+ );
7379
+ return res;
7380
+ },
7381
+ update: async (
7382
+ id: Service.Reservation.Update.ID,
7383
+ body: Service.Reservation.Update.Body,
7384
+ ): Promise<Service.Reservation.Update.Result> => {
7385
+ let res: Service.Reservation.Update.Result = await this._update(
7386
+ this.svAPIEndpoint,
7387
+ this.reservation._path + `/${id}`,
7388
+ body,
7389
+ );
7390
+ return res;
7391
+ },
7392
+ };
7276
7393
  }
7277
7394
 
7278
7395
  function normalizeParams(params: Params): { [key: string]: any } {