repzo 1.0.221 → 1.0.222

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
@@ -113,6 +113,7 @@ export declare const end_points: {
113
113
  readonly CLM_SLIDE: "clm-slide";
114
114
  readonly CLM_FEEDBACK_ACTIVITY: "clm-feedback-activity";
115
115
  readonly CLM_FETCH: "clm-fetch";
116
+ readonly PROMOTIONS: "promotions";
116
117
  };
117
118
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
118
119
  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"];
@@ -237,6 +238,7 @@ export default class Repzo {
237
238
  readonly CLM_SLIDE: "clm-slide";
238
239
  readonly CLM_FEEDBACK_ACTIVITY: "clm-feedback-activity";
239
240
  readonly CLM_FETCH: "clm-fetch";
241
+ readonly PROMOTIONS: "promotions";
240
242
  };
241
243
  private _fetch;
242
244
  private _create;
@@ -1112,4 +1114,12 @@ export default class Repzo {
1112
1114
  _path: "clm-fetch";
1113
1115
  find: (params?: Service.CLMFetch.Find.Params) => Promise<Service.CLMFetch.Find.Result>;
1114
1116
  };
1117
+ promotions: {
1118
+ _path: "promotions";
1119
+ find: (params?: Service.Promotion.Find.Params) => Promise<Service.Promotion.Find.Result>;
1120
+ get: (id: Service.Promotion.Get.ID, params?: Service.Promotion.Get.Params) => Promise<Service.Promotion.Get.Result>;
1121
+ create: (body: Service.Promotion.Create.Body) => Promise<Service.Promotion.Create.Result>;
1122
+ update: (id: Service.Promotion.Update.ID, body: Service.Promotion.Update.Body) => Promise<Service.Promotion.Update.Result>;
1123
+ remove: (id: Service.Promotion.Update.ID, params: Service.Promotion.Remove.Params) => Promise<Service.Promotion.Remove.Result>;
1124
+ };
1115
1125
  }
package/lib/index.js CHANGED
@@ -114,6 +114,7 @@ export const end_points = {
114
114
  CLM_SLIDE: "clm-slide",
115
115
  CLM_FEEDBACK_ACTIVITY: "clm-feedback-activity",
116
116
  CLM_FETCH: "clm-fetch",
117
+ PROMOTIONS: "promotions",
117
118
  };
118
119
  export const availableService = [
119
120
  "client",
@@ -2286,6 +2287,28 @@ class Repzo {
2286
2287
  return res;
2287
2288
  },
2288
2289
  };
2290
+ this.promotions = {
2291
+ _path: Repzo._end_points.PROMOTIONS,
2292
+ find: async (params) => {
2293
+ let res = await this._fetch(this.svAPIEndpoint, this.promotions._path, params);
2294
+ return res;
2295
+ },
2296
+ get: async (id, params) => {
2297
+ return await this._fetch(this.svAPIEndpoint, this.promotions._path + `/${id}`, params);
2298
+ },
2299
+ create: async (body) => {
2300
+ let res = await this._create(this.svAPIEndpoint, this.promotions._path, body);
2301
+ return res;
2302
+ },
2303
+ update: async (id, body) => {
2304
+ let res = await this._update(this.svAPIEndpoint, this.promotions._path + `/${id}`, body);
2305
+ return res;
2306
+ },
2307
+ remove: async (id, params) => {
2308
+ let res = await this._delete(this.svAPIEndpoint, this.promotions._path + `/${id}`, params);
2309
+ return res;
2310
+ },
2311
+ };
2289
2312
  this.svAPIEndpoint =
2290
2313
  !options?.env || options?.env == "production"
2291
2314
  ? "https://sv.api.repzo.me"
@@ -3892,92 +3892,163 @@ export declare namespace Service {
3892
3892
  }
3893
3893
  }
3894
3894
  namespace Promotion {
3895
- interface CompoundSchema {
3895
+ interface CartFilter {
3896
+ filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "cart_total" | "items_count" | "client" | "tag" | "channel" | "distinct_variants_count" | "distinct_products_count" | "promotion" | "cart_type" | "invoice_payment_type" | "creator_id";
3897
+ value: string[];
3898
+ operator: "lte" | "lt" | "gte" | "gt" | "eq";
3899
+ reject_if_pass: {
3900
+ type: Boolean;
3901
+ default: false;
3902
+ };
3903
+ limit_type: "count" | "price_amount";
3904
+ limit_value: number;
3905
+ variants?: string[];
3906
+ }
3907
+ interface ItemFilter {
3908
+ filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "any";
3909
+ value: string[];
3910
+ limit_type: "count" | "price_amount";
3911
+ limit_value: number;
3912
+ variants?: string[];
3913
+ }
3914
+ interface CartAdjustment {
3915
+ adjustment_type: "discount_amount" | "discount_ratio" | "shipping_fixed_price" | "shipping_discount_amount" | "shipping_discount_ratio" | "tax_exempt";
3916
+ value: any;
3917
+ }
3918
+ interface LineFilter {
3919
+ filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "line_total" | "base_unit_qty" | "promotion";
3920
+ value: string[];
3921
+ operator: "lte" | "lt" | "gte" | "gt" | "eq";
3922
+ reject_if_pass: boolean;
3923
+ limit_type: "count" | "price_amount";
3924
+ limit_value: number;
3925
+ variants?: string[];
3926
+ }
3927
+ interface LineAdjustment {
3928
+ adjustment_type: "discount_amount" | "discount_ratio" | "fixed_price";
3929
+ value: number;
3930
+ }
3931
+ interface GetItem {
3932
+ filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "gift";
3933
+ value: string[];
3934
+ limit_type: "count";
3935
+ limit_value: number;
3936
+ discount_ratio: number;
3937
+ variants?: string[];
3938
+ }
3939
+ interface Compound {
3940
+ type: "compound";
3896
3941
  manual_allocation?: boolean;
3897
3942
  appliedCount: number;
3898
3943
  sorting: "cheapest" | "expensive";
3899
3944
  enforcement_mode: "all_in_inventory" | "all" | "gift_in_inventory" | "gift";
3900
- calculate_hidden_price?: boolean;
3945
+ calculate_hidden_price: boolean;
3901
3946
  usage_limit?: number;
3902
3947
  usage_limit_per_rep?: number;
3903
3948
  usage_limit_per_client?: number;
3904
3949
  cart_filters_operator: "and" | "or";
3905
- cart_filters: {
3906
- _id: string;
3907
- filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "cart_total" | "items_count" | "client" | "tag" | "channel" | "distinct_variants_count" | "distinct_products_count" | "promotion";
3908
- value: string[];
3909
- operator: "lte" | "lt" | "gte" | "gt" | "eq";
3910
- reject_if_pass?: boolean;
3911
- limit_type: "count" | "price_amount";
3912
- limit_value: number;
3913
- }[];
3950
+ cart_filters: CartFilter[];
3914
3951
  items_filters_operator: "and" | "or";
3915
- items_filters: {
3916
- _id: string;
3917
- filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "any";
3918
- value: string[];
3919
- limit_type: "count" | "price_amount";
3920
- limit_value: number;
3921
- }[];
3952
+ items_filters: ItemFilter[];
3922
3953
  get_items_operator: "and" | "or";
3923
- get_items: {
3924
- _id: string;
3925
- filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "gift";
3926
- value: string[];
3927
- limit_type: "count";
3928
- limit_value: number;
3929
- discount_ratio: number;
3930
- }[];
3931
- cart_adjustments: {
3932
- adjustment_type: "discount_amount" | "discount_ratio" | "shipping_fixed_price" | "shipping_discount_amount" | "shipping_discount_ratio" | "tax_exempt";
3933
- value: boolean | number;
3934
- }[];
3935
- line_filters: {
3936
- _id: string;
3937
- filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "line_total" | "base_unit_qty" | "promotion";
3938
- value: string[];
3939
- operator: "lte" | "lt" | "gte" | "gt" | "eq";
3940
- reject_if_pass?: boolean;
3941
- limit_type: "count" | "price_amount";
3942
- limit_value: number;
3943
- }[];
3944
- line_adjustments: {
3945
- adjustment_type: "discount_amount" | "discount_ratio" | "fixed_price";
3946
- value: number;
3947
- }[];
3954
+ get_items: GetItem[];
3955
+ cart_adjustments: CartAdjustment[];
3956
+ line_filters: LineFilter[];
3957
+ line_adjustments: LineAdjustment[];
3948
3958
  line_filters_operator: "and" | "or";
3949
- is_bulk: {
3950
- type: boolean;
3951
- default: false;
3952
- };
3959
+ is_bulk?: boolean;
3953
3960
  rounding: "round" | "floor" | "ceil";
3954
3961
  bulk_over_provide?: boolean;
3955
3962
  bulk_limit_type?: "count" | "price_amount" | "ratio";
3956
3963
  bulk_data: {
3957
- _id: string;
3958
3964
  from_limit_value: number;
3959
3965
  to_limit_value?: number;
3960
3966
  get_limit_value: number;
3961
3967
  }[];
3962
3968
  }
3963
- export interface Schema {
3969
+ export interface Data {
3964
3970
  _id: string;
3965
3971
  type: "compound";
3966
3972
  from: number;
3967
3973
  to: number;
3974
+ status: "published" | "unpublished";
3968
3975
  priority?: number;
3969
3976
  name: string;
3970
3977
  description?: string;
3971
3978
  duration?: number;
3972
3979
  startsAt?: string;
3973
- disabled?: boolean;
3974
- details: CompoundSchema;
3980
+ disabled: boolean;
3981
+ promotions_groups?: string[];
3982
+ details: Compound;
3975
3983
  copied_from?: string;
3976
3984
  ref?: string;
3977
3985
  company_namespace: string[];
3978
- createdAt: string;
3979
- updatedAt: string;
3980
- __v: number;
3986
+ createdAt: Date;
3987
+ updatedAt: Date;
3988
+ }
3989
+ interface CreateBody {
3990
+ type: "compound";
3991
+ from?: number;
3992
+ to?: number;
3993
+ priority?: number;
3994
+ name: string;
3995
+ description?: string;
3996
+ duration?: number;
3997
+ startsAt?: string;
3998
+ disabled: boolean;
3999
+ promotions_groups?: string[];
4000
+ details: Compound;
4001
+ copied_from?: string;
4002
+ ref?: string;
4003
+ company_namespace?: string[];
4004
+ }
4005
+ export type Schema = Data;
4006
+ export namespace Find {
4007
+ type Params = DefaultPaginationQueryParams & {
4008
+ _id?: StringId | StringId[];
4009
+ name?: string | string[];
4010
+ ref?: string | string[];
4011
+ from_updatedAt?: number;
4012
+ to_updatedAt?: number;
4013
+ asset_types?: StringId | StringId[];
4014
+ location?: StringId | StringId[];
4015
+ from_createdAt?: number;
4016
+ to_createdAt?: number;
4017
+ search?: string;
4018
+ from__id?: StringId | StringId[];
4019
+ to__id?: StringId | StringId[];
4020
+ disabled?: boolean;
4021
+ from?: number;
4022
+ to?: number;
4023
+ from_from?: number;
4024
+ to_from?: number;
4025
+ from_to?: number;
4026
+ to_to?: number;
4027
+ promotions_groups?: StringId | StringId[];
4028
+ status?: Data["status"] | Data["status"][];
4029
+ };
4030
+ interface Result extends DefaultPaginationResult {
4031
+ data: Data[];
4032
+ }
4033
+ }
4034
+ export namespace Get {
4035
+ type ID = string;
4036
+ type Params = {};
4037
+ type Result = Data;
4038
+ }
4039
+ export namespace Create {
4040
+ type Body = CreateBody;
4041
+ type Result = Data;
4042
+ }
4043
+ export namespace Update {
4044
+ type ID = StringId;
4045
+ type Body = Partial<Data>;
4046
+ type Result = Data;
4047
+ }
4048
+ export namespace Remove {
4049
+ type ID = string;
4050
+ type Params = {};
4051
+ type Result = Data;
3981
4052
  }
3982
4053
  export {};
3983
4054
  }
@@ -15576,7 +15647,7 @@ export declare namespace Service {
15576
15647
  export {};
15577
15648
  }
15578
15649
  namespace NotificationsCenter {
15579
- 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" | "update-customfields" | "update-speciality" | "update-clm-presentation" | "update-clm-sequence" | "update-clm-slide";
15650
+ 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" | "update-customfields" | "update-speciality" | "update-clm-presentation" | "update-clm-sequence" | "update-clm-slide" | "update-promotions";
15580
15651
  export interface Data {
15581
15652
  _id: StringId;
15582
15653
  command: Command;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.221",
3
+ "version": "1.0.222",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -124,6 +124,7 @@ export const end_points = {
124
124
  CLM_SLIDE: "clm-slide",
125
125
  CLM_FEEDBACK_ACTIVITY: "clm-feedback-activity",
126
126
  CLM_FETCH: "clm-fetch",
127
+ PROMOTIONS: "promotions",
127
128
  } as const;
128
129
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
129
130
 
@@ -5785,6 +5786,62 @@ export default class Repzo {
5785
5786
  return res;
5786
5787
  },
5787
5788
  };
5789
+
5790
+ promotions = {
5791
+ _path: Repzo._end_points.PROMOTIONS,
5792
+ find: async (
5793
+ params?: Service.Promotion.Find.Params,
5794
+ ): Promise<Service.Promotion.Find.Result> => {
5795
+ let res: Service.Promotion.Find.Result = await this._fetch(
5796
+ this.svAPIEndpoint,
5797
+ this.promotions._path,
5798
+ params,
5799
+ );
5800
+ return res;
5801
+ },
5802
+ get: async (
5803
+ id: Service.Promotion.Get.ID,
5804
+ params?: Service.Promotion.Get.Params,
5805
+ ): Promise<Service.Promotion.Get.Result> => {
5806
+ return await this._fetch(
5807
+ this.svAPIEndpoint,
5808
+ this.promotions._path + `/${id}`,
5809
+ params,
5810
+ );
5811
+ },
5812
+ create: async (
5813
+ body: Service.Promotion.Create.Body,
5814
+ ): Promise<Service.Promotion.Create.Result> => {
5815
+ let res = await this._create(
5816
+ this.svAPIEndpoint,
5817
+ this.promotions._path,
5818
+ body,
5819
+ );
5820
+ return res;
5821
+ },
5822
+ update: async (
5823
+ id: Service.Promotion.Update.ID,
5824
+ body: Service.Promotion.Update.Body,
5825
+ ): Promise<Service.Promotion.Update.Result> => {
5826
+ let res: Service.Promotion.Update.Result = await this._update(
5827
+ this.svAPIEndpoint,
5828
+ this.promotions._path + `/${id}`,
5829
+ body,
5830
+ );
5831
+ return res;
5832
+ },
5833
+ remove: async (
5834
+ id: Service.Promotion.Update.ID,
5835
+ params: Service.Promotion.Remove.Params,
5836
+ ): Promise<Service.Promotion.Remove.Result> => {
5837
+ let res: Service.Promotion.Remove.Result = await this._delete(
5838
+ this.svAPIEndpoint,
5839
+ this.promotions._path + `/${id}`,
5840
+ params,
5841
+ );
5842
+ return res;
5843
+ },
5844
+ };
5788
5845
  }
5789
5846
 
5790
5847
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -4398,7 +4398,96 @@ export namespace Service {
4398
4398
  }
4399
4399
 
4400
4400
  export namespace Promotion {
4401
- interface CompoundSchema {
4401
+ interface CartFilter {
4402
+ filter_type:
4403
+ | "product"
4404
+ | "category"
4405
+ | "sub_category"
4406
+ | "product_group"
4407
+ | "brand"
4408
+ | "variant"
4409
+ | "cart_total"
4410
+ | "items_count"
4411
+ | "client"
4412
+ | "tag"
4413
+ | "channel"
4414
+ | "distinct_variants_count"
4415
+ | "distinct_products_count"
4416
+ | "promotion"
4417
+ | "cart_type"
4418
+ | "invoice_payment_type"
4419
+ | "creator_id";
4420
+ value: string[];
4421
+ operator: "lte" | "lt" | "gte" | "gt" | "eq";
4422
+ reject_if_pass: { type: Boolean; default: false };
4423
+ limit_type: "count" | "price_amount";
4424
+ limit_value: number;
4425
+ variants?: string[];
4426
+ }
4427
+ interface ItemFilter {
4428
+ filter_type:
4429
+ | "product"
4430
+ | "category"
4431
+ | "sub_category"
4432
+ | "product_group"
4433
+ | "brand"
4434
+ | "variant"
4435
+ | "any";
4436
+ value: string[];
4437
+ limit_type: "count" | "price_amount";
4438
+ limit_value: number;
4439
+ variants?: string[];
4440
+ }
4441
+ interface CartAdjustment {
4442
+ adjustment_type:
4443
+ | "discount_amount"
4444
+ | "discount_ratio"
4445
+ | "shipping_fixed_price"
4446
+ | "shipping_discount_amount"
4447
+ | "shipping_discount_ratio"
4448
+ | "tax_exempt";
4449
+ value: any;
4450
+ }
4451
+ interface LineFilter {
4452
+ filter_type:
4453
+ | "product"
4454
+ | "category"
4455
+ | "sub_category"
4456
+ | "product_group"
4457
+ | "brand"
4458
+ | "variant"
4459
+ | "line_total"
4460
+ | "base_unit_qty"
4461
+ | "promotion";
4462
+ value: string[];
4463
+ operator: "lte" | "lt" | "gte" | "gt" | "eq";
4464
+ reject_if_pass: boolean;
4465
+ limit_type: "count" | "price_amount";
4466
+ limit_value: number;
4467
+ variants?: string[];
4468
+ }
4469
+ interface LineAdjustment {
4470
+ adjustment_type: "discount_amount" | "discount_ratio" | "fixed_price";
4471
+ value: number;
4472
+ }
4473
+ interface GetItem {
4474
+ filter_type:
4475
+ | "product"
4476
+ | "category"
4477
+ | "sub_category"
4478
+ | "product_group"
4479
+ | "brand"
4480
+ | "variant"
4481
+ | "gift";
4482
+ value: string[];
4483
+ limit_type: "count";
4484
+ limit_value: number;
4485
+ discount_ratio: number;
4486
+ variants?: string[];
4487
+ }
4488
+
4489
+ interface Compound {
4490
+ type: "compound";
4402
4491
  manual_allocation?: boolean;
4403
4492
  appliedCount: number;
4404
4493
  sorting: "cheapest" | "expensive";
@@ -4407,127 +4496,116 @@ export namespace Service {
4407
4496
  | "all"
4408
4497
  | "gift_in_inventory"
4409
4498
  | "gift";
4410
- calculate_hidden_price?: boolean;
4499
+ calculate_hidden_price: boolean;
4411
4500
  usage_limit?: number;
4412
4501
  usage_limit_per_rep?: number;
4413
4502
  usage_limit_per_client?: number;
4414
4503
  cart_filters_operator: "and" | "or";
4415
- cart_filters: {
4416
- _id: string;
4417
- filter_type:
4418
- | "product"
4419
- | "category"
4420
- | "sub_category"
4421
- | "product_group"
4422
- | "brand"
4423
- | "variant"
4424
- | "cart_total"
4425
- | "items_count"
4426
- | "client"
4427
- | "tag"
4428
- | "channel"
4429
- | "distinct_variants_count"
4430
- | "distinct_products_count"
4431
- | "promotion";
4432
- value: string[];
4433
- operator: "lte" | "lt" | "gte" | "gt" | "eq";
4434
- reject_if_pass?: boolean;
4435
- limit_type: "count" | "price_amount";
4436
- limit_value: number;
4437
- }[];
4504
+ cart_filters: CartFilter[];
4438
4505
  items_filters_operator: "and" | "or";
4439
- items_filters: {
4440
- _id: string;
4441
- filter_type:
4442
- | "product"
4443
- | "category"
4444
- | "sub_category"
4445
- | "product_group"
4446
- | "brand"
4447
- | "variant"
4448
- | "any";
4449
- value: string[];
4450
- limit_type: "count" | "price_amount";
4451
- limit_value: number;
4452
- }[];
4506
+ items_filters: ItemFilter[];
4453
4507
  get_items_operator: "and" | "or";
4454
- get_items: {
4455
- _id: string;
4456
- filter_type:
4457
- | "product"
4458
- | "category"
4459
- | "sub_category"
4460
- | "product_group"
4461
- | "brand"
4462
- | "variant"
4463
- | "gift";
4464
- value: string[];
4465
- limit_type: "count";
4466
- limit_value: number;
4467
- discount_ratio: number;
4468
- }[];
4469
- cart_adjustments: {
4470
- adjustment_type:
4471
- | "discount_amount"
4472
- | "discount_ratio"
4473
- | "shipping_fixed_price"
4474
- | "shipping_discount_amount"
4475
- | "shipping_discount_ratio"
4476
- | "tax_exempt";
4477
- value: boolean | number;
4478
- }[];
4479
- line_filters: {
4480
- _id: string;
4481
- filter_type:
4482
- | "product"
4483
- | "category"
4484
- | "sub_category"
4485
- | "product_group"
4486
- | "brand"
4487
- | "variant"
4488
- | "line_total"
4489
- | "base_unit_qty"
4490
- | "promotion";
4491
- value: string[];
4492
- operator: "lte" | "lt" | "gte" | "gt" | "eq";
4493
- reject_if_pass?: boolean;
4494
- limit_type: "count" | "price_amount";
4495
- limit_value: number;
4496
- }[];
4497
- line_adjustments: {
4498
- adjustment_type: "discount_amount" | "discount_ratio" | "fixed_price";
4499
- value: number;
4500
- }[];
4508
+ get_items: GetItem[];
4509
+ cart_adjustments: CartAdjustment[];
4510
+ line_filters: LineFilter[];
4511
+ line_adjustments: LineAdjustment[];
4501
4512
  line_filters_operator: "and" | "or";
4502
- is_bulk: { type: boolean; default: false };
4513
+ is_bulk?: boolean;
4503
4514
  rounding: "round" | "floor" | "ceil";
4504
4515
  bulk_over_provide?: boolean;
4505
4516
  bulk_limit_type?: "count" | "price_amount" | "ratio";
4506
4517
  bulk_data: {
4507
- _id: string;
4508
4518
  from_limit_value: number;
4509
4519
  to_limit_value?: number;
4510
4520
  get_limit_value: number;
4511
4521
  }[];
4512
4522
  }
4513
- export interface Schema {
4523
+
4524
+ export interface Data {
4514
4525
  _id: string;
4515
4526
  type: "compound";
4516
4527
  from: number;
4517
4528
  to: number;
4529
+ status: "published" | "unpublished";
4518
4530
  priority?: number;
4519
4531
  name: string;
4520
4532
  description?: string;
4521
4533
  duration?: number;
4522
4534
  startsAt?: string;
4523
- disabled?: boolean;
4524
- details: CompoundSchema;
4535
+ disabled: boolean;
4536
+ promotions_groups?: string[];
4537
+ details: Compound;
4525
4538
  copied_from?: string;
4526
4539
  ref?: string;
4527
4540
  company_namespace: string[];
4528
- createdAt: string;
4529
- updatedAt: string;
4530
- __v: number;
4541
+ createdAt: Date;
4542
+ updatedAt: Date;
4543
+ }
4544
+
4545
+ interface CreateBody {
4546
+ type: "compound";
4547
+ from?: number;
4548
+ to?: number;
4549
+ priority?: number;
4550
+ name: string;
4551
+ description?: string;
4552
+ duration?: number;
4553
+ startsAt?: string;
4554
+ disabled: boolean;
4555
+ promotions_groups?: string[];
4556
+ details: Compound;
4557
+ copied_from?: string;
4558
+ ref?: string;
4559
+ company_namespace?: string[];
4560
+ }
4561
+ export type Schema = Data;
4562
+
4563
+ export namespace Find {
4564
+ export type Params = DefaultPaginationQueryParams & {
4565
+ _id?: StringId | StringId[];
4566
+ name?: string | string[];
4567
+ ref?: string | string[];
4568
+ from_updatedAt?: number;
4569
+ to_updatedAt?: number;
4570
+ asset_types?: StringId | StringId[];
4571
+ location?: StringId | StringId[];
4572
+ from_createdAt?: number;
4573
+ to_createdAt?: number;
4574
+ search?: string;
4575
+ from__id?: StringId | StringId[];
4576
+ to__id?: StringId | StringId[];
4577
+ disabled?: boolean;
4578
+ from?: number;
4579
+ to?: number;
4580
+ from_from?: number;
4581
+ to_from?: number;
4582
+ from_to?: number;
4583
+ to_to?: number;
4584
+ promotions_groups?: StringId | StringId[];
4585
+ status?: Data["status"] | Data["status"][];
4586
+ };
4587
+ export interface Result extends DefaultPaginationResult {
4588
+ data: Data[];
4589
+ }
4590
+ }
4591
+ export namespace Get {
4592
+ export type ID = string;
4593
+ export type Params = {};
4594
+ export type Result = Data;
4595
+ }
4596
+ export namespace Create {
4597
+ export type Body = CreateBody;
4598
+ export type Result = Data;
4599
+ }
4600
+ export namespace Update {
4601
+ export type ID = StringId;
4602
+ export type Body = Partial<Data>;
4603
+ export type Result = Data;
4604
+ }
4605
+ export namespace Remove {
4606
+ export type ID = string;
4607
+ export type Params = {};
4608
+ export type Result = Data;
4531
4609
  }
4532
4610
  }
4533
4611
 
@@ -17438,7 +17516,8 @@ export namespace Service {
17438
17516
  | "update-speciality"
17439
17517
  | "update-clm-presentation"
17440
17518
  | "update-clm-sequence"
17441
- | "update-clm-slide";
17519
+ | "update-clm-slide"
17520
+ | "update-promotions";
17442
17521
 
17443
17522
  export interface Data {
17444
17523
  _id: StringId;