@wix/auto_sdk_loyalty_earning-rules 1.0.6 → 1.0.8
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/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +28 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +35 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +48 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +353 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +28 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +180 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +93 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +93 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +1 -0
- package/build/{loyalty-v1-loyalty-earning-rule-earning-rules.universal-ByA9SEhi.d.mts → cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts} +65 -202
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +37 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +839 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +400 -0
- package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +28 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +28 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +1 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +48 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +342 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +1 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +28 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +146 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +1 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +93 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +78 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +1 -0
- package/build/{loyalty-v1-loyalty-earning-rule-earning-rules.universal-ByA9SEhi.d.ts → es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts} +65 -202
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +34 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +839 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +366 -0
- package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +28 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +35 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +48 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +353 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +28 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +180 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +93 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +93 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +1 -0
- package/build/internal/{loyalty-v1-loyalty-earning-rule-earning-rules.universal-DOjaPKYu.d.mts → cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts} +65 -207
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +37 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +844 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +400 -0
- package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.d.ts +28 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js +28 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.context.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.d.ts +48 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js +342 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.http.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.d.ts +28 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js +146 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.d.ts +93 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js +78 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map +1 -0
- package/build/internal/{loyalty-v1-loyalty-earning-rule-earning-rules.universal-DOjaPKYu.d.ts → es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts} +65 -207
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js +34 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +844 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js +366 -0
- package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -112
- package/build/index.d.ts +0 -112
- package/build/index.js +0 -732
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -694
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -112
- package/build/internal/index.d.ts +0 -112
- package/build/internal/index.js +0 -732
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -694
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -322
- package/build/internal/meta.d.ts +0 -322
- package/build/internal/meta.js +0 -500
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -466
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -322
- package/build/meta.d.ts +0 -322
- package/build/meta.js +0 -500
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -466
- package/build/meta.mjs.map +0 -1
package/build/internal/meta.d.ts
DELETED
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
import { k as CreateLoyaltyEarningRuleRequest$1, l as CreateLoyaltyEarningRuleResponse$1, m as BulkCreateLoyaltyEarningRulesRequest$1, B as BulkCreateLoyaltyEarningRulesResponse$1, p as CreateCustomLoyaltyEarningRuleRequest$1, a as CreateCustomLoyaltyEarningRuleResponse$1, G as GetLoyaltyEarningRuleRequest$1, s as GetLoyaltyEarningRuleResponse$1, t as UpdateLoyaltyEarningRuleRequest$1, b as UpdateLoyaltyEarningRuleResponse$1, u as DeleteLoyaltyEarningRuleRequest$1, v as DeleteLoyaltyEarningRuleResponse$1, w as DeleteAutomationEarningRuleRequest$1, x as DeleteAutomationEarningRuleResponse$1, y as ListEarningRulesRequest$1, d as ListEarningRulesResponse$1 } from './loyalty-v1-loyalty-earning-rule-earning-rules.universal-DOjaPKYu.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A loyalty earning rule defines how customers earn points in a loyalty program.
|
|
5
|
-
* You can create rules for different activities, such as making purchases.
|
|
6
|
-
*/
|
|
7
|
-
interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
8
|
-
/** Fixed amount of points awarded for each qualifying activity. */
|
|
9
|
-
fixedAmount?: FixedAmount;
|
|
10
|
-
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
11
|
-
conversionRate?: ConversionRate;
|
|
12
|
-
/**
|
|
13
|
-
* Loyalty earning rule ID.
|
|
14
|
-
* @format GUID
|
|
15
|
-
* @readonly
|
|
16
|
-
*/
|
|
17
|
-
id?: string | null;
|
|
18
|
-
/**
|
|
19
|
-
* ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
|
|
20
|
-
* @format GUID
|
|
21
|
-
*/
|
|
22
|
-
sourceAppId?: string;
|
|
23
|
-
/**
|
|
24
|
-
* ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
|
|
25
|
-
* @minLength 1
|
|
26
|
-
* @maxLength 80
|
|
27
|
-
*/
|
|
28
|
-
triggerAppId?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
|
|
31
|
-
* @minLength 1
|
|
32
|
-
* @maxLength 80
|
|
33
|
-
*/
|
|
34
|
-
triggerActivityType?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Name of the earning rule.
|
|
37
|
-
* @minLength 1
|
|
38
|
-
* @maxLength 50
|
|
39
|
-
*/
|
|
40
|
-
title?: string;
|
|
41
|
-
/** Current status of the earning rule. */
|
|
42
|
-
status?: Status;
|
|
43
|
-
/**
|
|
44
|
-
* Revision number, incremented by 1 each time the earning rule is updated.
|
|
45
|
-
* Pass the latest revision when updating to prevent conflicting changes.
|
|
46
|
-
*/
|
|
47
|
-
revision?: string | null;
|
|
48
|
-
/**
|
|
49
|
-
* Date and time the earning rule was created.
|
|
50
|
-
* @readonly
|
|
51
|
-
*/
|
|
52
|
-
createdDate?: Date | null;
|
|
53
|
-
/**
|
|
54
|
-
* Date and time the earning rule was last updated.
|
|
55
|
-
* @readonly
|
|
56
|
-
*/
|
|
57
|
-
updatedDate?: Date | null;
|
|
58
|
-
/**
|
|
59
|
-
* Additional metadata about the earning rule.
|
|
60
|
-
* @readonly
|
|
61
|
-
*/
|
|
62
|
-
metadata?: Metadata;
|
|
63
|
-
}
|
|
64
|
-
/** @oneof */
|
|
65
|
-
interface LoyaltyEarningRuleTypeOneOf {
|
|
66
|
-
/** Fixed amount of points awarded for each qualifying activity. */
|
|
67
|
-
fixedAmount?: FixedAmount;
|
|
68
|
-
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
69
|
-
conversionRate?: ConversionRate;
|
|
70
|
-
}
|
|
71
|
-
/** Fixed amount type of earning rule. */
|
|
72
|
-
interface FixedAmount {
|
|
73
|
-
/**
|
|
74
|
-
* Fixed amount configurations for each tier.
|
|
75
|
-
* @maxSize 21
|
|
76
|
-
*/
|
|
77
|
-
configs?: FixedAmountConfig[];
|
|
78
|
-
}
|
|
79
|
-
interface FixedAmountConfig {
|
|
80
|
-
/**
|
|
81
|
-
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction#terminology) is used.
|
|
82
|
-
* @format GUID
|
|
83
|
-
* @readonly
|
|
84
|
-
*/
|
|
85
|
-
tierId?: string | null;
|
|
86
|
-
/** Number of points to award. */
|
|
87
|
-
points?: number;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Conversion rate type of earning rule.
|
|
91
|
-
* Customers earn points based on the amount spent.
|
|
92
|
-
* For example, for every $10 spent, a customer might earn 1 point.
|
|
93
|
-
*/
|
|
94
|
-
interface ConversionRate {
|
|
95
|
-
/**
|
|
96
|
-
* Conversion rate configurations for each tier.
|
|
97
|
-
*
|
|
98
|
-
* Points are awarded proportionally to the amount spent.
|
|
99
|
-
*
|
|
100
|
-
* Formula: `(amount spent) / (money_amount * points)`.
|
|
101
|
-
* @maxSize 21
|
|
102
|
-
*/
|
|
103
|
-
configs?: ConversionRateConfig[];
|
|
104
|
-
/**
|
|
105
|
-
* Specifies which field in the Wix automations trigger payload [REST](https://dev.wix.com/docs/rest/business-management/automations/introduction#how-do-automations-work)|[SDK](https://dev.wix.com/docs/sdk/backend-modules/automations/triggered-events/reporting-and-canceling-events) to use for calculating points in conversion rate rules.
|
|
106
|
-
* For example, if set to "priceSummary.totalAmount", the rule uses the total order amount to calculate loyalty points to be awarded.
|
|
107
|
-
* This field is only applicable for automated earning rules.
|
|
108
|
-
*/
|
|
109
|
-
field?: string | null;
|
|
110
|
-
}
|
|
111
|
-
interface ConversionRateConfig {
|
|
112
|
-
/**
|
|
113
|
-
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction) is used.
|
|
114
|
-
* @format GUID
|
|
115
|
-
* @readonly
|
|
116
|
-
*/
|
|
117
|
-
tierId?: string | null;
|
|
118
|
-
/**
|
|
119
|
-
* The amount of money used as a reference for point calculation.
|
|
120
|
-
* Points are awarded proportionally to the amount spent.
|
|
121
|
-
*
|
|
122
|
-
* For example, if set to 10, 1 point is awarded for every 10 units of currency spent (assuming `points` is set to 1).
|
|
123
|
-
*
|
|
124
|
-
* Formula for points is: `(amount spent) / (money_amount * points)`.
|
|
125
|
-
*/
|
|
126
|
-
moneyAmount?: number;
|
|
127
|
-
/**
|
|
128
|
-
* Points given for the specified `money_amount`.
|
|
129
|
-
* Works in conjunction with `money_amount` to define the earning rule.
|
|
130
|
-
*
|
|
131
|
-
* For example: If `money_amount` is 20 and `points` is 10:
|
|
132
|
-
* - Spending 10 units of currency earns 5 points
|
|
133
|
-
* - Spending 20 units of currency earns 10 points
|
|
134
|
-
* - Spending 30 units of currency earns 15 points
|
|
135
|
-
*/
|
|
136
|
-
points?: number;
|
|
137
|
-
}
|
|
138
|
-
declare enum Status {
|
|
139
|
-
/** Status is unknown or not specified. */
|
|
140
|
-
UNKNOWN = "UNKNOWN",
|
|
141
|
-
/** Earning rule is active and can assign points. */
|
|
142
|
-
ACTIVE = "ACTIVE",
|
|
143
|
-
/** Earning rule is paused and can't assign points. */
|
|
144
|
-
PAUSED = "PAUSED"
|
|
145
|
-
}
|
|
146
|
-
interface Metadata {
|
|
147
|
-
/** Whether the earning rule can be deleted. */
|
|
148
|
-
canBeDeleted?: boolean;
|
|
149
|
-
}
|
|
150
|
-
interface CreateLoyaltyEarningRuleRequest {
|
|
151
|
-
/** Earning rule to create. */
|
|
152
|
-
earningRule: LoyaltyEarningRule;
|
|
153
|
-
}
|
|
154
|
-
interface CreateLoyaltyEarningRuleResponse {
|
|
155
|
-
/** Created earning rule. */
|
|
156
|
-
earningRule?: LoyaltyEarningRule;
|
|
157
|
-
}
|
|
158
|
-
interface BulkCreateLoyaltyEarningRulesRequest {
|
|
159
|
-
/**
|
|
160
|
-
* Earning rules to create.
|
|
161
|
-
* @minSize 1
|
|
162
|
-
* @maxSize 100
|
|
163
|
-
*/
|
|
164
|
-
earningRules: LoyaltyEarningRule[];
|
|
165
|
-
}
|
|
166
|
-
interface BulkCreateLoyaltyEarningRulesResponse {
|
|
167
|
-
/** Created earning rules. */
|
|
168
|
-
results?: BulkLoyaltyEarningRuleResult[];
|
|
169
|
-
/** Additional metadata for the created earning rules. */
|
|
170
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
171
|
-
}
|
|
172
|
-
interface BulkLoyaltyEarningRuleResult {
|
|
173
|
-
/** Additional metadata for the created earning rules. */
|
|
174
|
-
itemMetadata?: ItemMetadata;
|
|
175
|
-
/** Created earning rule. */
|
|
176
|
-
item?: LoyaltyEarningRule;
|
|
177
|
-
}
|
|
178
|
-
interface ItemMetadata {
|
|
179
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
180
|
-
id?: string | null;
|
|
181
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
182
|
-
originalIndex?: number;
|
|
183
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
184
|
-
success?: boolean;
|
|
185
|
-
/** Details about the error in case of failure. */
|
|
186
|
-
error?: ApplicationError;
|
|
187
|
-
}
|
|
188
|
-
interface ApplicationError {
|
|
189
|
-
/** Error code. */
|
|
190
|
-
code?: string;
|
|
191
|
-
/** Description of the error. */
|
|
192
|
-
description?: string;
|
|
193
|
-
/** Data related to the error. */
|
|
194
|
-
data?: Record<string, any> | null;
|
|
195
|
-
}
|
|
196
|
-
interface BulkActionMetadata {
|
|
197
|
-
/** Number of items that were successfully processed. */
|
|
198
|
-
totalSuccesses?: number;
|
|
199
|
-
/** Number of items that couldn't be processed. */
|
|
200
|
-
totalFailures?: number;
|
|
201
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
202
|
-
undetailedFailures?: number;
|
|
203
|
-
}
|
|
204
|
-
interface CreateCustomLoyaltyEarningRuleRequest {
|
|
205
|
-
/** Type of the custom earning rule. */
|
|
206
|
-
type: Type;
|
|
207
|
-
/** Custom earning rule to create. */
|
|
208
|
-
earningRule?: CustomLoyaltyEarningRule;
|
|
209
|
-
}
|
|
210
|
-
declare enum Type {
|
|
211
|
-
/** Unknown type. This value is not used. */
|
|
212
|
-
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
213
|
-
/** Earning rule for social media. */
|
|
214
|
-
SOCIAL_MEDIA = "SOCIAL_MEDIA",
|
|
215
|
-
/** Earning rule for birthdays. */
|
|
216
|
-
BIRTHDAY = "BIRTHDAY"
|
|
217
|
-
}
|
|
218
|
-
/** Used in CreateCustomLoyaltyEarningRuleRequest */
|
|
219
|
-
interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
|
|
220
|
-
/** Fixed amount of points awarded for each qualifying activity. */
|
|
221
|
-
fixedAmount?: FixedAmount;
|
|
222
|
-
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
223
|
-
conversionRate?: ConversionRate;
|
|
224
|
-
/**
|
|
225
|
-
* Name of the earning rule.
|
|
226
|
-
* @minLength 1
|
|
227
|
-
* @maxLength 50
|
|
228
|
-
*/
|
|
229
|
-
title?: string;
|
|
230
|
-
}
|
|
231
|
-
/** @oneof */
|
|
232
|
-
interface CustomLoyaltyEarningRuleTypeOneOf {
|
|
233
|
-
/** Fixed amount of points awarded for each qualifying activity. */
|
|
234
|
-
fixedAmount?: FixedAmount;
|
|
235
|
-
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
236
|
-
conversionRate?: ConversionRate;
|
|
237
|
-
}
|
|
238
|
-
interface CreateCustomLoyaltyEarningRuleResponse {
|
|
239
|
-
/** Created earning rule. */
|
|
240
|
-
earningRule?: LoyaltyEarningRule;
|
|
241
|
-
}
|
|
242
|
-
interface GetLoyaltyEarningRuleRequest {
|
|
243
|
-
/**
|
|
244
|
-
* ID of the earning rule to retrieve.
|
|
245
|
-
* @format GUID
|
|
246
|
-
*/
|
|
247
|
-
id: string;
|
|
248
|
-
}
|
|
249
|
-
interface GetLoyaltyEarningRuleResponse {
|
|
250
|
-
/** Retrieved earning rule. */
|
|
251
|
-
earningRule?: LoyaltyEarningRule;
|
|
252
|
-
}
|
|
253
|
-
interface UpdateLoyaltyEarningRuleRequest {
|
|
254
|
-
/** Earning rule to update. */
|
|
255
|
-
earningRule: LoyaltyEarningRule;
|
|
256
|
-
}
|
|
257
|
-
interface UpdateLoyaltyEarningRuleResponse {
|
|
258
|
-
/** The updated earning rule. */
|
|
259
|
-
earningRule?: LoyaltyEarningRule;
|
|
260
|
-
}
|
|
261
|
-
interface DeleteLoyaltyEarningRuleRequest {
|
|
262
|
-
/**
|
|
263
|
-
* ID of the earning rule to delete.
|
|
264
|
-
* @format GUID
|
|
265
|
-
*/
|
|
266
|
-
id: string;
|
|
267
|
-
/**
|
|
268
|
-
* Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
|
|
269
|
-
* Pass the latest revision when updating to prevent conflicting changes.
|
|
270
|
-
*/
|
|
271
|
-
revision?: string;
|
|
272
|
-
}
|
|
273
|
-
interface DeleteLoyaltyEarningRuleResponse {
|
|
274
|
-
}
|
|
275
|
-
interface DeleteAutomationEarningRuleRequest {
|
|
276
|
-
/**
|
|
277
|
-
* ID of the earning rule to delete.
|
|
278
|
-
* @format GUID
|
|
279
|
-
*/
|
|
280
|
-
id: string;
|
|
281
|
-
}
|
|
282
|
-
interface DeleteAutomationEarningRuleResponse {
|
|
283
|
-
}
|
|
284
|
-
interface ListEarningRulesRequest {
|
|
285
|
-
/** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
|
|
286
|
-
triggerAppId?: string | null;
|
|
287
|
-
/** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
|
|
288
|
-
triggerActivityType?: string | null;
|
|
289
|
-
}
|
|
290
|
-
interface ListEarningRulesResponse {
|
|
291
|
-
/** Retrieved earning rules. */
|
|
292
|
-
earningRules?: LoyaltyEarningRule[];
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
296
|
-
getUrl: (context: any) => string;
|
|
297
|
-
httpMethod: K;
|
|
298
|
-
path: string;
|
|
299
|
-
pathParams: M;
|
|
300
|
-
__requestType: T;
|
|
301
|
-
__originalRequestType: S;
|
|
302
|
-
__responseType: Q;
|
|
303
|
-
__originalResponseType: R;
|
|
304
|
-
};
|
|
305
|
-
declare function createLoyaltyEarningRule(): __PublicMethodMetaInfo<'POST', {}, CreateLoyaltyEarningRuleRequest$1, CreateLoyaltyEarningRuleRequest, CreateLoyaltyEarningRuleResponse$1, CreateLoyaltyEarningRuleResponse>;
|
|
306
|
-
declare function bulkCreateLoyaltyEarningRules(): __PublicMethodMetaInfo<'POST', {}, BulkCreateLoyaltyEarningRulesRequest$1, BulkCreateLoyaltyEarningRulesRequest, BulkCreateLoyaltyEarningRulesResponse$1, BulkCreateLoyaltyEarningRulesResponse>;
|
|
307
|
-
declare function createCustomLoyaltyEarningRule(): __PublicMethodMetaInfo<'POST', {}, CreateCustomLoyaltyEarningRuleRequest$1, CreateCustomLoyaltyEarningRuleRequest, CreateCustomLoyaltyEarningRuleResponse$1, CreateCustomLoyaltyEarningRuleResponse>;
|
|
308
|
-
declare function getLoyaltyEarningRule(): __PublicMethodMetaInfo<'GET', {
|
|
309
|
-
id: string;
|
|
310
|
-
}, GetLoyaltyEarningRuleRequest$1, GetLoyaltyEarningRuleRequest, GetLoyaltyEarningRuleResponse$1, GetLoyaltyEarningRuleResponse>;
|
|
311
|
-
declare function updateLoyaltyEarningRule(): __PublicMethodMetaInfo<'PUT', {
|
|
312
|
-
earningRuleId: string;
|
|
313
|
-
}, UpdateLoyaltyEarningRuleRequest$1, UpdateLoyaltyEarningRuleRequest, UpdateLoyaltyEarningRuleResponse$1, UpdateLoyaltyEarningRuleResponse>;
|
|
314
|
-
declare function deleteLoyaltyEarningRule(): __PublicMethodMetaInfo<'DELETE', {
|
|
315
|
-
id: string;
|
|
316
|
-
}, DeleteLoyaltyEarningRuleRequest$1, DeleteLoyaltyEarningRuleRequest, DeleteLoyaltyEarningRuleResponse$1, DeleteLoyaltyEarningRuleResponse>;
|
|
317
|
-
declare function deleteAutomationEarningRule(): __PublicMethodMetaInfo<'DELETE', {
|
|
318
|
-
id: string;
|
|
319
|
-
}, DeleteAutomationEarningRuleRequest$1, DeleteAutomationEarningRuleRequest, DeleteAutomationEarningRuleResponse$1, DeleteAutomationEarningRuleResponse>;
|
|
320
|
-
declare function listEarningRules(): __PublicMethodMetaInfo<'GET', {}, ListEarningRulesRequest$1, ListEarningRulesRequest, ListEarningRulesResponse$1, ListEarningRulesResponse>;
|
|
321
|
-
|
|
322
|
-
export { type __PublicMethodMetaInfo, bulkCreateLoyaltyEarningRules, createCustomLoyaltyEarningRule, createLoyaltyEarningRule, deleteAutomationEarningRule, deleteLoyaltyEarningRule, getLoyaltyEarningRule, listEarningRules, updateLoyaltyEarningRule };
|