@epcc-sdk/rule-promotions 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Elastic Path Software Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,244 @@
1
+ # @epcc-sdk/rule-promotions SDK
2
+
3
+ Below you’ll find instructions on how to install, set up, and use the client, along with a list of available operations.
4
+
5
+ ## Features
6
+
7
+ - type-safe response data and errors
8
+ - response data validation and transformation
9
+ - access to the original request and response
10
+ - granular request and response customization options
11
+ - minimal learning curve thanks to extending the underlying technology
12
+
13
+ ---
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @epcc-sdk/rule-promotions
19
+ # or
20
+ pnpm install @epcc-sdk/rule-promotions
21
+ # or
22
+ yarn add @epcc-sdk/rule-promotions
23
+ ```
24
+
25
+ ---
26
+
27
+ ## Client Usage
28
+
29
+
30
+ Clients are responsible for sending the actual HTTP requests.
31
+
32
+ The Fetch client is built as a thin wrapper on top of Fetch API, extending its functionality. If you're already familiar with Fetch, configuring your client will feel like working directly with Fetch API.
33
+
34
+ You can configure the client in two ways:
35
+
36
+ - Configuring the internal `client` instance directly
37
+ - Using the `createClient` function
38
+
39
+ **When using the operation function to make requests, by default the global client will be used unless another is provided.**
40
+
41
+
42
+ ### 1. Configure the internal `client` instance directly
43
+
44
+ This is the simpler approach. You can call the setConfig() method at the beginning of your application or anytime you need to update the client configuration. You can pass any Fetch API configuration option to setConfig(), and even your own Fetch implementation.
45
+
46
+ ```ts
47
+ import { client } from "@epcc-sdk/rule-promotions";
48
+
49
+ client.setConfig({
50
+ // set default base url for requests
51
+ baseUrl: 'https://euwest.api.elasticpath.com',
52
+
53
+ // set default headers for requests
54
+ headers: {
55
+ Authorization: 'Bearer YOUR_AUTH_TOKEN',
56
+ },
57
+ });
58
+ ```
59
+
60
+ The disadvantage of this approach is that your code may call the client instance before it's configured for the first time. Depending on your use case, you might need to use the second approach.
61
+
62
+ ### 2. Using the `createClient` function
63
+
64
+ This is useful when you want to use a different instance of the client for different parts of your application or when you want to use different configurations for different parts of your application.
65
+
66
+ ```ts
67
+ import { createClient } from "@epcc-sdk/rule-promotions";
68
+
69
+ // Create the client with your API base URL.
70
+ const client = createClient({
71
+ // set default base url for requests
72
+ baseUrl: "https://euwest.api.elasticpath.com",
73
+ /**
74
+ * Set default headers only for requests made by this client.
75
+ */
76
+ headers: {
77
+ "Custom-Header": 'My Value',
78
+ },
79
+ });
80
+ ```
81
+
82
+ You can also pass this instance to any SDK function through the client option. This will override the default instance from `import { client } from "@epcc-sdk/rule-promotions>".
83
+
84
+ ```ts
85
+ const response = await getRulePromotions({
86
+ client: myClient,
87
+ });
88
+ ```
89
+
90
+ ### Direct configuration
91
+
92
+ Alternatively, you can pass the client configuration options to each SDK function. This is useful if you don't want to create a client instance for one-off use cases.
93
+
94
+ ```ts
95
+ const response = await getRulePromotions({
96
+ baseUrl: 'https://example.com', // <-- override default configuration
97
+ });
98
+ ```
99
+
100
+ ## Interceptors (Middleware)
101
+
102
+ Interceptors (middleware) can be used to modify requests before they're sent or responses before they're returned to your application. They can be added with use and removed with eject. Below is an example request interceptor
103
+
104
+ ```ts
105
+ import { client } from "@epcc-sdk/rule-promotions";
106
+
107
+ // Supports async functions
108
+ client.interceptors.request.use(async (request) => {
109
+ // do something
110
+ return request;
111
+ });
112
+
113
+ client.interceptors.request.eject((request) => {
114
+ // do something
115
+ return request;
116
+ });
117
+
118
+ ```
119
+
120
+ and an example response interceptor
121
+
122
+ ```ts
123
+ import { client } from "@epcc-sdk/rule-promotions";
124
+
125
+ client.interceptors.response.use((response) => {
126
+ // do something
127
+ return response;
128
+ });
129
+
130
+ client.interceptors.response.eject((response) => {
131
+ // do something
132
+ return response;
133
+ });
134
+ ```
135
+
136
+ > **_Tip:_** To eject, you must provide a reference to the function that was passed to use().
137
+
138
+ ## Authentication
139
+
140
+ We are working to provide helpers to handle auth easier for you but for now using an interceptor is the easiest method.
141
+
142
+ ```ts
143
+ import { client } from "@epcc-sdk/rule-promotions";
144
+
145
+ client.interceptors.request.use((request, options) => {
146
+ request.headers.set('Authorization', 'Bearer MY_TOKEN');
147
+ return request;
148
+ });
149
+ ```
150
+
151
+ ## Build URL
152
+
153
+ If you need to access the compiled URL, you can use the buildUrl() method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint.
154
+
155
+ ```ts
156
+ type FooData = {
157
+ path: {
158
+ fooId: number;
159
+ };
160
+ query?: {
161
+ bar?: string;
162
+ };
163
+ url: '/foo/{fooId}';
164
+ };
165
+
166
+ const url = client.buildUrl<FooData>({
167
+ path: {
168
+ fooId: 1,
169
+ },
170
+ query: {
171
+ bar: 'baz',
172
+ },
173
+ url: '/foo/{fooId}',
174
+ });
175
+ console.log(url); // prints '/foo/1?bar=baz'
176
+ ```
177
+
178
+
179
+ ---
180
+
181
+
182
+
183
+
184
+
185
+ ## Operation Usage
186
+ The following examples demonstrate how to use the operation function to make requests.
187
+
188
+ ```ts
189
+ import { getRulePromotions } from "@epcc-sdk/rule-promotions";
190
+
191
+ const product = await getRulePromotions({
192
+ // client: localClient, // optional if you have a client instance you want to use otherwise the global client will be used
193
+ path: {
194
+ ...
195
+ },
196
+ query: {
197
+ ...
198
+ },
199
+ });
200
+ ```
201
+
202
+ ---
203
+
204
+
205
+
206
+ ## Available Operations
207
+
208
+
209
+
210
+ - **`getRulePromotions`** (`GET /v2/rule-promotions`)
211
+
212
+ - **`createRulePromotion`** (`POST /v2/rule-promotions`)
213
+
214
+ - **`deleteRulePromotion`** (`DELETE /v2/rule-promotions/{promotionID}`)
215
+
216
+ - **`getRulePromotionById`** (`GET /v2/rule-promotions/{promotionID}`)
217
+
218
+ - **`updateRulePromotion`** (`PUT /v2/rule-promotions/{promotionID}`)
219
+
220
+ - **`deleteRulePromotionCodes`** (`DELETE /v2/rule-promotions/{promotionID}/codes`)
221
+
222
+ - **`getRulePromotionCodes`** (`GET /v2/rule-promotions/{promotionID}/codes`)
223
+
224
+ - **`createRulePromotionCodes`** (`POST /v2/rule-promotions/{promotionID}/codes`)
225
+
226
+ - **`deleteSingleRulePromotionCode`** (`DELETE /v2/rule-promotions/{promotionID}/codes/{codeID}`)
227
+
228
+ - **`getV2RulePromotionsByUuidJobs`** (`GET /v2/rule-promotions/{uuid}/jobs`)
229
+
230
+ - **`postV2RulePromotionsByUuidJobs`** (`POST /v2/rule-promotions/{uuid}/jobs`)
231
+
232
+ - **`getV2RulePromotionsByUuidJobsByJobUuidFile`** (`GET /v2/rule-promotions/{uuid}/jobs/{job-uuid}/file`)
233
+
234
+ - **`postV2RulePromotionsByUuidJobsByJobUuidCancel`** (`POST /v2/rule-promotions/{uuid}/jobs/{job-uuid}/cancel`)
235
+
236
+ - **`anonymizeRulePromotionUsages`** (`POST /v2/rule-promotions/usages/anonymize`)
237
+
238
+ - **`getRulePromotionUsages`** (`GET /v2/rule-promotions/{promotionID}/usages`)
239
+
240
+ - **`getRulePromotionCodeUsages`** (`GET /v2/rule-promotions/{promotionID}/codes/{code}/usages`)
241
+
242
+
243
+
244
+ ---
@@ -0,0 +1,2 @@
1
+ export * from "./types.gen";
2
+ export * from "./sdk.gen";
@@ -0,0 +1,3 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export * from "./types.gen";
3
+ export * from "./sdk.gen";
@@ -0,0 +1,263 @@
1
+ import { type Options } from "@hey-api/client-fetch";
2
+ import type { GetRulePromotionsData, CreateRulePromotionData, DeleteRulePromotionData, GetRulePromotionByIdData, UpdateRulePromotionData, DeleteRulePromotionCodesData, GetRulePromotionCodesData, CreateRulePromotionCodesData, CreateRulePromotionCodesError, DeleteSingleRulePromotionCodeData, GetV2RulePromotionsByUuidJobsData, PostV2RulePromotionsByUuidJobsData, GetV2RulePromotionsByUuidJobsByJobUuidFileData, PostV2RulePromotionsByUuidJobsByJobUuidCancelData, AnonymizeRulePromotionUsagesData, GetRulePromotionUsagesData, GetRulePromotionCodeUsagesData } from "./types.gen";
3
+ export declare const client: import("@hey-api/client-fetch").Client<Request, Response, unknown, import("@hey-api/client-fetch").RequestOptions<boolean, string>>;
4
+ /**
5
+ * Get Rule Promotions
6
+ * Retrieves a list of rule-based promotions, including information such as discount type, eligibility criteria,
7
+ * and configuration details. This endpoint supports filtering to refine results based on specific promotion attributes.
8
+ *
9
+ * Use query parameters to filter promotions by:
10
+ * - **Code** – Retrieve a specific promotion by its code.
11
+ * - **Promotion name** – Search for promotions by name.
12
+ * - **Activation status** – Filter by whether a promotion is active or not.
13
+ * - **Stackability** – Identify promotions that can or cannot be combined with others.
14
+ * - **Start and end dates** – Retrieve promotions based on their validity periods.
15
+ *
16
+ */
17
+ export declare const getRulePromotions: <ThrowOnError extends boolean = false>(options: Options<GetRulePromotionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").RulePromotionResponse[], unknown, ThrowOnError>;
18
+ /**
19
+ * Create a Rule Promotion
20
+ * Creates a new rule-based promotion, allowing flexible discount strategies based on cart or item conditions.
21
+ * Promotions can apply fixed or percentage-based discounts, apply automatically or via codes, and have eligibility rules
22
+ * based on product attributes, cart total, SKU conditions, custom attributes, and more.
23
+ *
24
+ * This endpoint supports a variety of promotion types, such as:
25
+ * - **Cart-wide discounts**
26
+ * - **Item-specific discounts**
27
+ * - **Shipping discounts**
28
+ * - **Combinations thereof**
29
+ *
30
+ * :::note
31
+ *
32
+ * The minimum item discount amount is zero, both for amounts and percentages
33
+ *
34
+ * :::
35
+ *
36
+ * Please refer to the **OpenAPI examples** section on this page for detailed request payloads illustrating different
37
+ * promotion structures, including cart discounts, item discounts, and rule-based conditions.
38
+ *
39
+ */
40
+ export declare const createRulePromotion: <ThrowOnError extends boolean = false>(options: Options<CreateRulePromotionData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").RulePromotionResponse, unknown, ThrowOnError>;
41
+ /**
42
+ * Delete a Rule Promotion
43
+ * Deletes an existing Rule Promotion identified by its promotion ID.
44
+ *
45
+ * - This action **permanently removes** the promotion and cannot be undone.
46
+ * - If the promotion is active, please ensure that its removal does not impact ongoing campaigns.
47
+ *
48
+ * A successful request returns a `204 No Content` response, indicating that the promotion has been deleted.
49
+ *
50
+ */
51
+ export declare const deleteRulePromotion: <ThrowOnError extends boolean = false>(options: Options<DeleteRulePromotionData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, unknown, ThrowOnError>;
52
+ /**
53
+ * Get a Rule Promotion by ID
54
+ * Retrieves a single Rule Promotion by the promotion ID. Responses include promotion specifications such as discount type, eligibility criteria, and configuration details.
55
+ *
56
+ */
57
+ export declare const getRulePromotionById: <ThrowOnError extends boolean = false>(options: Options<GetRulePromotionByIdData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").RulePromotionResponse, unknown, ThrowOnError>;
58
+ /**
59
+ * Update a Rule Promotion
60
+ * Updates an existing Rule Promotion specified by its promotion ID. This includes both **semantic and syntactic validation** to ensure correctness. For example, the start date must be earlier than the end date.
61
+ *
62
+ * Editable fields include:
63
+ * - `name`
64
+ * - `description`
65
+ * - `enabled`
66
+ * - `start`
67
+ * - `end`
68
+ * - `automatic`
69
+ * - `stackable`
70
+ * - `override_stacking`
71
+ * - `rule_set`
72
+ *
73
+ * Please refer to the **OpenAPI examples** section on this page for sample update requests.
74
+ *
75
+ */
76
+ export declare const updateRulePromotion: <ThrowOnError extends boolean = false>(options: Options<UpdateRulePromotionData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").RulePromotionResponse, unknown, ThrowOnError>;
77
+ /**
78
+ * Delete Rule Promotion Codes
79
+ * Deletes one or more promotion codes from a specific rule promotion.
80
+ *
81
+ * - Supports **bulk deletion**, allowing multiple codes to be removed in a single request.
82
+ * - Removes promotion codes permanently, making them unavailable for future use.
83
+ * - If a code has already been redeemed, it will be removed from the system but may still reflect in historical transactions.
84
+ *
85
+ * A successful request returns a `204 No Content` response, indicating the specified promotion codes have been deleted.
86
+ *
87
+ */
88
+ export declare const deleteRulePromotionCodes: <ThrowOnError extends boolean = false>(options: Options<DeleteRulePromotionCodesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, unknown, ThrowOnError>;
89
+ /**
90
+ * Get Rule Promotion Codes
91
+ * Retrieves the list of promotion codes associated with a specific Rule Promotion.
92
+ *
93
+ * - Returns all codes generated for the given promotion ID, including details on usage limits and redemption status.
94
+ * - Supports both automatically generated and manually created promotion codes.
95
+ * - Can be used to verify whether a promotion code is still valid or has reached its usage limit.
96
+ *
97
+ */
98
+ export declare const getRulePromotionCodes: <ThrowOnError extends boolean = false>(options: Options<GetRulePromotionCodesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").GetPromotionCodesResponse, unknown, ThrowOnError>;
99
+ /**
100
+ * Create Rule Promotion Codes
101
+ * Creates new promotion codes for a specific rule promotion, allowing customers to redeem discounts based on predefined conditions.
102
+ *
103
+ * - Supports bulk creation of multiple promotion codes in a single request.
104
+ * - Each code can have individual usage limits.
105
+ * - Can optionally assign codes to specific users to enforce targeted promotions.
106
+ * - The promotion codes are case-insensitive.
107
+ *
108
+ * :::note
109
+ *
110
+ * Regarding first time shopper limitations:
111
+ * - Orders without payment transactions do not count as completed purchases.
112
+ * - Canceling or refunding an order does not reinstate first-time shopper status.
113
+ * - A first-time shopper coupon code cannot have limited uses or be assigned to specific users, meaning the code cannot be restricted by the number of times it can be used or tied to a specific customer ID.
114
+ *
115
+ * :::
116
+ *
117
+ * A successful request returns a `201 Created` response with details of the generated promotion codes.
118
+ *
119
+ * ### Duplicate Codes
120
+ * Duplicate promotion codes **are supported across different promotions** in the store, regardless of their statuses and validity dates. However, **duplicate codes cannot be created within the same promotion**.
121
+ * This means that shoppers can apply a single coupon code to trigger multiple promotions if those promotions share common coupon codes.
122
+ *
123
+ * Codes that share the same name can serve different purposes. For example, one code may have `per_application` with a limited number of uses, while another identical code can have `per_checkout` with unlimited use.
124
+ *
125
+ * **Duplicate Code Handling:**
126
+ * - If a duplicate code is detected **within the same promotion**, the request will return a `422 Duplicate code` error.
127
+ * - When creating duplicate codes, a message appears with the successful response indicating the duplication.
128
+ *
129
+ *
130
+ * Please refer to the **OpenAPI examples** section on this page for sample request structures.
131
+ *
132
+ */
133
+ export declare const createRulePromotionCodes: <ThrowOnError extends boolean = false>(options: Options<CreateRulePromotionCodesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").CreatePromotionCodesResponse, CreateRulePromotionCodesError, ThrowOnError>;
134
+ /**
135
+ * Delete A Single Rule Promotion Code
136
+ * Deletes a single promotion code from a specific rule promotion.
137
+ *
138
+ * - Permanently removes the specified promotion code, making it unavailable for future use.
139
+ * - Can be used to **revoke a specific code** without affecting other codes under the same promotion.
140
+ * - If the code has already been redeemed, it will still be removed from the system but may still reflect in historical transactions.
141
+ *
142
+ * A successful request returns a `204 No Content` response, indicating the specified promotion code has been deleted.
143
+ *
144
+ */
145
+ export declare const deleteSingleRulePromotionCode: <ThrowOnError extends boolean = false>(options: Options<DeleteSingleRulePromotionCodeData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<void, unknown, ThrowOnError>;
146
+ /**
147
+ * Get Rule Promotion Jobs
148
+ * Retrieves a list of jobs associated with a specific rule promotion. Each job represents an asynchronous operation such as promotion code generation or export.
149
+ *
150
+ * The response includes details such as:
151
+ * - **Job type** (`code_generate` or `code_export`)
152
+ * - **Job status** (`pending`, `processing`, `completed`, `failed`, `cancelling`, or `cancelled`)
153
+ * - **Parameters used** (such as number of codes generated)
154
+ * - **Results** (such as number of codes successfully generated or deleted)
155
+ *
156
+ * ### Filtering
157
+ * You can filter jobs by:
158
+ * - **Job Type** (`eq(job_type, code_export)`)
159
+ * - **Status** (`eq(status, complete)`)
160
+ *
161
+ */
162
+ export declare const getV2RulePromotionsByUuidJobs: <ThrowOnError extends boolean = false>(options: Options<GetV2RulePromotionsByUuidJobsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
163
+ data?: Array<import("./types.gen").PromotionJob>;
164
+ }, unknown, ThrowOnError>;
165
+ /**
166
+ * Create a Rule Promotion Job
167
+ * Creates an asynchronous job for a specific Rule Promotion. Jobs are used to generate or export promotion codes in bulk.
168
+ *
169
+ * The following job types are supported:
170
+ * - **`code_generate`**: Generates a batch of unique promotion codes.
171
+ * - **`code_export`**: Exports all existing promotion codes as a downloadable CSV file.
172
+ *
173
+ * Job processing occurs asynchronously. The job request is queued, and its status must be checked separately.
174
+ *
175
+ * ### Job Processing Status
176
+ * Jobs can have the following statuses:
177
+ * - `pending`: Job is in the queue, waiting to be processed.
178
+ * - `processing`: Job is actively being processed.
179
+ * - `completed`: Job completed successfully.
180
+ * - `failed`: Job encountered an error and did not complete.
181
+ * - `cancelling`: Cancellation in progress (for long-running jobs).
182
+ * - `cancelled`: Job was successfully cancelled.
183
+ *
184
+ * Please refer to the **OpenAPI examples** section on this page for sample job creation requests.
185
+ *
186
+ */
187
+ export declare const postV2RulePromotionsByUuidJobs: <ThrowOnError extends boolean = false>(options: Options<PostV2RulePromotionsByUuidJobsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
188
+ data?: import("./types.gen").PromotionJob;
189
+ }, {
190
+ errors?: Array<{
191
+ status?: string;
192
+ title?: string;
193
+ detail?: string;
194
+ }>;
195
+ }, ThrowOnError>;
196
+ /**
197
+ * Get Rule Promotion Code Exported File
198
+ * Retrieves the exported promotion codes for a rule promotion job in a CSV format.
199
+ *
200
+ * - The file contains the generated codes along with relevant metadata.
201
+ * - This endpoint is applicable only for jobs of type `code_export`.
202
+ * - The job must be in a `completed` state before the file can be retrieved.
203
+ *
204
+ */
205
+ export declare const getV2RulePromotionsByUuidJobsByJobUuidFile: <ThrowOnError extends boolean = false>(options: Options<GetV2RulePromotionsByUuidJobsByJobUuidFileData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
206
+ href?: string;
207
+ }, unknown, ThrowOnError>;
208
+ /**
209
+ * Cancel a Rule Promotion Job
210
+ * Cancels an asynchronous job for a rule promotion if its status is `pending` or `processing`.
211
+ *
212
+ * - Only jobs that have not yet completed can be canceled.
213
+ * - Once canceled, no further processing occurs, and partially completed results may be deleted.
214
+ *
215
+ */
216
+ export declare const postV2RulePromotionsByUuidJobsByJobUuidCancel: <ThrowOnError extends boolean = false>(options: Options<PostV2RulePromotionsByUuidJobsByJobUuidCancelData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<unknown, {
217
+ errors?: Array<{
218
+ status?: string;
219
+ title?: string;
220
+ detail?: string;
221
+ }>;
222
+ }, ThrowOnError>;
223
+ /**
224
+ * Anonymize Rule Promotion Usages
225
+ * Anonymizes user-related data in Rule Promotion usage records.
226
+ * This operation is typically used for GDPR compliance or privacy-related requests.
227
+ *
228
+ * - This process replaces identifiable user data with anonymized placeholders.
229
+ * - Affects all recorded promotion usages where customer data is stored.
230
+ * - Does not impact historical transaction records or applied discounts.
231
+ *
232
+ * A successful request returns a `200 OK` response with the anonymized usage records.
233
+ *
234
+ */
235
+ export declare const anonymizeRulePromotionUsages: <ThrowOnError extends boolean = false>(options: Options<AnonymizeRulePromotionUsagesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
236
+ data?: Array<import("./types.gen").RulePromotionUsage>;
237
+ }, import("./types.gen").ResponseError, ThrowOnError>;
238
+ /**
239
+ * Get Rule Promotion Usages
240
+ * Retrieves a list of usage records for a specific Rule Promotion.
241
+ *
242
+ * - Provides details about when and how a promotion was used.
243
+ * - Can be filtered and paginated to refine results.
244
+ * - Useful for analyzing promotion effectiveness and customer engagement.
245
+ *
246
+ */
247
+ export declare const getRulePromotionUsages: <ThrowOnError extends boolean = false>(options: Options<GetRulePromotionUsagesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
248
+ data?: Array<import("./types.gen").RulePromotionUsage>;
249
+ meta?: import("./types.gen").ResponsePaginationMeta;
250
+ }, import("./types.gen").ResponseError, ThrowOnError>;
251
+ /**
252
+ * Get Rule Promotion Code Usages
253
+ * Retrieves a list of usage records for a specific Rule Promotion code.
254
+ *
255
+ * - Provides insights into how many times a specific code was used.
256
+ * - Can be filtered and paginated to refine results.
257
+ * - Useful for tracking the performance of individual promotion codes.
258
+ *
259
+ */
260
+ export declare const getRulePromotionCodeUsages: <ThrowOnError extends boolean = false>(options: Options<GetRulePromotionCodeUsagesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<{
261
+ data?: Array<import("./types.gen").RulePromotionUsage>;
262
+ meta?: import("./types.gen").ResponsePaginationMeta;
263
+ }, import("./types.gen").ResponseError, ThrowOnError>;