@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
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';
|
|
2
|
+
import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
3
|
+
import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
|
|
4
|
+
import { EventDefinition } from '@wix/sdk-types';
|
|
5
|
+
import { bulkCreateLoyaltyEarningRules as universalBulkCreateLoyaltyEarningRules, createCustomLoyaltyEarningRule as universalCreateCustomLoyaltyEarningRule, createLoyaltyEarningRule as universalCreateLoyaltyEarningRule, deleteAutomationEarningRule as universalDeleteAutomationEarningRule, deleteLoyaltyEarningRule as universalDeleteLoyaltyEarningRule, getLoyaltyEarningRule as universalGetLoyaltyEarningRule, listEarningRules as universalListEarningRules, updateLoyaltyEarningRule as universalUpdateLoyaltyEarningRule, } from './loyalty-v1-loyalty-earning-rule-earning-rules.universal.js';
|
|
6
|
+
export const __metadata = { PACKAGE_NAME: '@wix/loyalty' };
|
|
7
|
+
export function createLoyaltyEarningRule(httpClient) {
|
|
8
|
+
return (earningRule) => universalCreateLoyaltyEarningRule(earningRule,
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
{ httpClient });
|
|
11
|
+
}
|
|
12
|
+
export function bulkCreateLoyaltyEarningRules(httpClient) {
|
|
13
|
+
return (earningRules) => universalBulkCreateLoyaltyEarningRules(earningRules,
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
{ httpClient });
|
|
16
|
+
}
|
|
17
|
+
export function createCustomLoyaltyEarningRule(httpClient) {
|
|
18
|
+
return (type, options) => universalCreateCustomLoyaltyEarningRule(type, options,
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
{ httpClient });
|
|
21
|
+
}
|
|
22
|
+
export function getLoyaltyEarningRule(httpClient) {
|
|
23
|
+
return (_id) => universalGetLoyaltyEarningRule(_id,
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
{ httpClient });
|
|
26
|
+
}
|
|
27
|
+
export function updateLoyaltyEarningRule(httpClient) {
|
|
28
|
+
return (_id, earningRule) => universalUpdateLoyaltyEarningRule(_id, earningRule,
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
{ httpClient });
|
|
31
|
+
}
|
|
32
|
+
export function deleteLoyaltyEarningRule(httpClient) {
|
|
33
|
+
return (_id, options) => universalDeleteLoyaltyEarningRule(_id, options,
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
{ httpClient });
|
|
36
|
+
}
|
|
37
|
+
export function deleteAutomationEarningRule(httpClient) {
|
|
38
|
+
return (_id) => universalDeleteAutomationEarningRule(_id,
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
{ httpClient });
|
|
41
|
+
}
|
|
42
|
+
export function listEarningRules(httpClient) {
|
|
43
|
+
return (options) => universalListEarningRules(options,
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
{ httpClient });
|
|
46
|
+
}
|
|
47
|
+
export const onLoyaltyEarningRuleCreated = EventDefinition('wix.loyalty.v1.loyalty_earning_rule_created', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
|
48
|
+
{
|
|
49
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
50
|
+
paths: [
|
|
51
|
+
{ path: 'entity.createdDate' },
|
|
52
|
+
{ path: 'entity.updatedDate' },
|
|
53
|
+
{ path: 'metadata.eventTime' },
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
])))();
|
|
57
|
+
export const onLoyaltyEarningRuleDeleted = EventDefinition('wix.loyalty.v1.loyalty_earning_rule_deleted', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
|
58
|
+
{
|
|
59
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
60
|
+
paths: [
|
|
61
|
+
{ path: 'undefined.createdDate' },
|
|
62
|
+
{ path: 'undefined.updatedDate' },
|
|
63
|
+
{ path: 'metadata.eventTime' },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
])))();
|
|
67
|
+
export const onLoyaltyEarningRuleUpdated = EventDefinition('wix.loyalty.v1.loyalty_earning_rule_updated', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
|
68
|
+
{
|
|
69
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
70
|
+
paths: [
|
|
71
|
+
{ path: 'entity.createdDate' },
|
|
72
|
+
{ path: 'entity.updatedDate' },
|
|
73
|
+
{ path: 'metadata.eventTime' },
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
])))();
|
|
77
|
+
export { LoyaltyEarningRuleTypeTagType, Status, Type, WebhookIdentityType, } from './loyalty-v1-loyalty-earning-rule-earning-rules.universal.js';
|
|
78
|
+
//# sourceMappingURL=loyalty-v1-loyalty-earning-rule-earning-rules.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loyalty-v1-loyalty-earning-rule-earning-rules.public.js","sourceRoot":"","sources":["../../../../src/loyalty-v1-loyalty-earning-rule-earning-rules.public.ts"],"names":[],"mappings":"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"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* A loyalty earning rule defines how customers earn points in a loyalty program.
|
|
3
3
|
* You can create rules for different activities, such as making purchases.
|
|
4
4
|
*/
|
|
5
|
-
interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
5
|
+
export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
6
6
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
7
7
|
fixedAmount?: FixedAmount;
|
|
8
8
|
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
@@ -12,7 +12,7 @@ interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
|
12
12
|
* @format GUID
|
|
13
13
|
* @readonly
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
id?: string | null;
|
|
16
16
|
/**
|
|
17
17
|
* ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
|
|
18
18
|
* @format GUID
|
|
@@ -47,12 +47,12 @@ interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
|
47
47
|
* Date and time the earning rule was created.
|
|
48
48
|
* @readonly
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
createdDate?: Date | null;
|
|
51
51
|
/**
|
|
52
52
|
* Date and time the earning rule was last updated.
|
|
53
53
|
* @readonly
|
|
54
54
|
*/
|
|
55
|
-
|
|
55
|
+
updatedDate?: Date | null;
|
|
56
56
|
/**
|
|
57
57
|
* Additional metadata about the earning rule.
|
|
58
58
|
* @readonly
|
|
@@ -60,21 +60,21 @@ interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
|
60
60
|
metadata?: Metadata;
|
|
61
61
|
}
|
|
62
62
|
/** @oneof */
|
|
63
|
-
interface LoyaltyEarningRuleTypeOneOf {
|
|
63
|
+
export interface LoyaltyEarningRuleTypeOneOf {
|
|
64
64
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
65
65
|
fixedAmount?: FixedAmount;
|
|
66
66
|
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
67
67
|
conversionRate?: ConversionRate;
|
|
68
68
|
}
|
|
69
69
|
/** Fixed amount type of earning rule. */
|
|
70
|
-
interface FixedAmount {
|
|
70
|
+
export interface FixedAmount {
|
|
71
71
|
/**
|
|
72
72
|
* Fixed amount configurations for each tier.
|
|
73
73
|
* @maxSize 21
|
|
74
74
|
*/
|
|
75
75
|
configs?: FixedAmountConfig[];
|
|
76
76
|
}
|
|
77
|
-
interface FixedAmountConfig {
|
|
77
|
+
export interface FixedAmountConfig {
|
|
78
78
|
/**
|
|
79
79
|
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction#terminology) is used.
|
|
80
80
|
* @format GUID
|
|
@@ -89,7 +89,7 @@ interface FixedAmountConfig {
|
|
|
89
89
|
* Customers earn points based on the amount spent.
|
|
90
90
|
* For example, for every $10 spent, a customer might earn 1 point.
|
|
91
91
|
*/
|
|
92
|
-
interface ConversionRate {
|
|
92
|
+
export interface ConversionRate {
|
|
93
93
|
/**
|
|
94
94
|
* Conversion rate configurations for each tier.
|
|
95
95
|
*
|
|
@@ -106,7 +106,7 @@ interface ConversionRate {
|
|
|
106
106
|
*/
|
|
107
107
|
field?: string | null;
|
|
108
108
|
}
|
|
109
|
-
interface ConversionRateConfig {
|
|
109
|
+
export interface ConversionRateConfig {
|
|
110
110
|
/**
|
|
111
111
|
* Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction) is used.
|
|
112
112
|
* @format GUID
|
|
@@ -133,7 +133,7 @@ interface ConversionRateConfig {
|
|
|
133
133
|
*/
|
|
134
134
|
points?: number;
|
|
135
135
|
}
|
|
136
|
-
declare enum Status {
|
|
136
|
+
export declare enum Status {
|
|
137
137
|
/** Status is unknown or not specified. */
|
|
138
138
|
UNKNOWN = "UNKNOWN",
|
|
139
139
|
/** Earning rule is active and can assign points. */
|
|
@@ -141,36 +141,31 @@ declare enum Status {
|
|
|
141
141
|
/** Earning rule is paused and can't assign points. */
|
|
142
142
|
PAUSED = "PAUSED"
|
|
143
143
|
}
|
|
144
|
-
interface Metadata {
|
|
144
|
+
export interface Metadata {
|
|
145
145
|
/** Whether the earning rule can be deleted. */
|
|
146
146
|
canBeDeleted?: boolean;
|
|
147
|
-
/**
|
|
148
|
-
* Information about the type of custom earning rule.
|
|
149
|
-
* @internal
|
|
150
|
-
*/
|
|
151
|
-
ruleTypeTag?: LoyaltyEarningRuleTypeTag;
|
|
152
147
|
}
|
|
153
|
-
interface LoyaltyEarningRuleTypeTag {
|
|
148
|
+
export interface LoyaltyEarningRuleTypeTag {
|
|
154
149
|
/** Type of custom earning rule. */
|
|
155
150
|
ruleType?: LoyaltyEarningRuleTypeTagType;
|
|
156
151
|
}
|
|
157
|
-
declare enum LoyaltyEarningRuleTypeTagType {
|
|
152
|
+
export declare enum LoyaltyEarningRuleTypeTagType {
|
|
158
153
|
/** Type is unknown or not specified. */
|
|
159
154
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
160
155
|
/** Earning rule for a customer's birthday. */
|
|
161
156
|
BIRTHDAY = "BIRTHDAY"
|
|
162
157
|
}
|
|
163
|
-
interface EarningRuleDisabled {
|
|
158
|
+
export interface EarningRuleDisabled {
|
|
164
159
|
}
|
|
165
|
-
interface CreateLoyaltyEarningRuleRequest {
|
|
160
|
+
export interface CreateLoyaltyEarningRuleRequest {
|
|
166
161
|
/** Earning rule to create. */
|
|
167
162
|
earningRule: LoyaltyEarningRule;
|
|
168
163
|
}
|
|
169
|
-
interface CreateLoyaltyEarningRuleResponse {
|
|
164
|
+
export interface CreateLoyaltyEarningRuleResponse {
|
|
170
165
|
/** Created earning rule. */
|
|
171
166
|
earningRule?: LoyaltyEarningRule;
|
|
172
167
|
}
|
|
173
|
-
interface BulkCreateLoyaltyEarningRulesRequest {
|
|
168
|
+
export interface BulkCreateLoyaltyEarningRulesRequest {
|
|
174
169
|
/**
|
|
175
170
|
* Earning rules to create.
|
|
176
171
|
* @minSize 1
|
|
@@ -178,21 +173,21 @@ interface BulkCreateLoyaltyEarningRulesRequest {
|
|
|
178
173
|
*/
|
|
179
174
|
earningRules: LoyaltyEarningRule[];
|
|
180
175
|
}
|
|
181
|
-
interface BulkCreateLoyaltyEarningRulesResponse {
|
|
176
|
+
export interface BulkCreateLoyaltyEarningRulesResponse {
|
|
182
177
|
/** Created earning rules. */
|
|
183
178
|
results?: BulkLoyaltyEarningRuleResult[];
|
|
184
179
|
/** Additional metadata for the created earning rules. */
|
|
185
180
|
bulkActionMetadata?: BulkActionMetadata;
|
|
186
181
|
}
|
|
187
|
-
interface BulkLoyaltyEarningRuleResult {
|
|
182
|
+
export interface BulkLoyaltyEarningRuleResult {
|
|
188
183
|
/** Additional metadata for the created earning rules. */
|
|
189
184
|
itemMetadata?: ItemMetadata;
|
|
190
185
|
/** Created earning rule. */
|
|
191
186
|
item?: LoyaltyEarningRule;
|
|
192
187
|
}
|
|
193
|
-
interface ItemMetadata {
|
|
188
|
+
export interface ItemMetadata {
|
|
194
189
|
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
195
|
-
|
|
190
|
+
id?: string | null;
|
|
196
191
|
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
197
192
|
originalIndex?: number;
|
|
198
193
|
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
@@ -200,7 +195,7 @@ interface ItemMetadata {
|
|
|
200
195
|
/** Details about the error in case of failure. */
|
|
201
196
|
error?: ApplicationError;
|
|
202
197
|
}
|
|
203
|
-
interface ApplicationError {
|
|
198
|
+
export interface ApplicationError {
|
|
204
199
|
/** Error code. */
|
|
205
200
|
code?: string;
|
|
206
201
|
/** Description of the error. */
|
|
@@ -208,7 +203,7 @@ interface ApplicationError {
|
|
|
208
203
|
/** Data related to the error. */
|
|
209
204
|
data?: Record<string, any> | null;
|
|
210
205
|
}
|
|
211
|
-
interface BulkActionMetadata {
|
|
206
|
+
export interface BulkActionMetadata {
|
|
212
207
|
/** Number of items that were successfully processed. */
|
|
213
208
|
totalSuccesses?: number;
|
|
214
209
|
/** Number of items that couldn't be processed. */
|
|
@@ -216,13 +211,13 @@ interface BulkActionMetadata {
|
|
|
216
211
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
217
212
|
undetailedFailures?: number;
|
|
218
213
|
}
|
|
219
|
-
interface CreateCustomLoyaltyEarningRuleRequest {
|
|
214
|
+
export interface CreateCustomLoyaltyEarningRuleRequest {
|
|
220
215
|
/** Type of the custom earning rule. */
|
|
221
216
|
type: Type;
|
|
222
217
|
/** Custom earning rule to create. */
|
|
223
218
|
earningRule?: CustomLoyaltyEarningRule;
|
|
224
219
|
}
|
|
225
|
-
declare enum Type {
|
|
220
|
+
export declare enum Type {
|
|
226
221
|
/** Unknown type. This value is not used. */
|
|
227
222
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
228
223
|
/** Earning rule for social media. */
|
|
@@ -231,7 +226,7 @@ declare enum Type {
|
|
|
231
226
|
BIRTHDAY = "BIRTHDAY"
|
|
232
227
|
}
|
|
233
228
|
/** Used in CreateCustomLoyaltyEarningRuleRequest */
|
|
234
|
-
interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
|
|
229
|
+
export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
|
|
235
230
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
236
231
|
fixedAmount?: FixedAmount;
|
|
237
232
|
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
@@ -244,69 +239,69 @@ interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
|
|
|
244
239
|
title?: string;
|
|
245
240
|
}
|
|
246
241
|
/** @oneof */
|
|
247
|
-
interface CustomLoyaltyEarningRuleTypeOneOf {
|
|
242
|
+
export interface CustomLoyaltyEarningRuleTypeOneOf {
|
|
248
243
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
249
244
|
fixedAmount?: FixedAmount;
|
|
250
245
|
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
251
246
|
conversionRate?: ConversionRate;
|
|
252
247
|
}
|
|
253
|
-
interface CreateCustomLoyaltyEarningRuleResponse {
|
|
248
|
+
export interface CreateCustomLoyaltyEarningRuleResponse {
|
|
254
249
|
/** Created earning rule. */
|
|
255
250
|
earningRule?: LoyaltyEarningRule;
|
|
256
251
|
}
|
|
257
|
-
interface GetLoyaltyEarningRuleRequest {
|
|
252
|
+
export interface GetLoyaltyEarningRuleRequest {
|
|
258
253
|
/**
|
|
259
254
|
* ID of the earning rule to retrieve.
|
|
260
255
|
* @format GUID
|
|
261
256
|
*/
|
|
262
|
-
|
|
257
|
+
id: string;
|
|
263
258
|
}
|
|
264
|
-
interface GetLoyaltyEarningRuleResponse {
|
|
259
|
+
export interface GetLoyaltyEarningRuleResponse {
|
|
265
260
|
/** Retrieved earning rule. */
|
|
266
261
|
earningRule?: LoyaltyEarningRule;
|
|
267
262
|
}
|
|
268
|
-
interface UpdateLoyaltyEarningRuleRequest {
|
|
263
|
+
export interface UpdateLoyaltyEarningRuleRequest {
|
|
269
264
|
/** Earning rule to update. */
|
|
270
265
|
earningRule: LoyaltyEarningRule;
|
|
271
266
|
}
|
|
272
|
-
interface UpdateLoyaltyEarningRuleResponse {
|
|
267
|
+
export interface UpdateLoyaltyEarningRuleResponse {
|
|
273
268
|
/** The updated earning rule. */
|
|
274
269
|
earningRule?: LoyaltyEarningRule;
|
|
275
270
|
}
|
|
276
|
-
interface DeleteLoyaltyEarningRuleRequest {
|
|
271
|
+
export interface DeleteLoyaltyEarningRuleRequest {
|
|
277
272
|
/**
|
|
278
273
|
* ID of the earning rule to delete.
|
|
279
274
|
* @format GUID
|
|
280
275
|
*/
|
|
281
|
-
|
|
276
|
+
id: string;
|
|
282
277
|
/**
|
|
283
278
|
* Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
|
|
284
279
|
* Pass the latest revision when updating to prevent conflicting changes.
|
|
285
280
|
*/
|
|
286
281
|
revision?: string;
|
|
287
282
|
}
|
|
288
|
-
interface DeleteLoyaltyEarningRuleResponse {
|
|
283
|
+
export interface DeleteLoyaltyEarningRuleResponse {
|
|
289
284
|
}
|
|
290
|
-
interface DeleteAutomationEarningRuleRequest {
|
|
285
|
+
export interface DeleteAutomationEarningRuleRequest {
|
|
291
286
|
/**
|
|
292
287
|
* ID of the earning rule to delete.
|
|
293
288
|
* @format GUID
|
|
294
289
|
*/
|
|
295
|
-
|
|
290
|
+
id: string;
|
|
296
291
|
}
|
|
297
|
-
interface DeleteAutomationEarningRuleResponse {
|
|
292
|
+
export interface DeleteAutomationEarningRuleResponse {
|
|
298
293
|
}
|
|
299
|
-
interface ListEarningRulesRequest {
|
|
294
|
+
export interface ListEarningRulesRequest {
|
|
300
295
|
/** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
|
|
301
296
|
triggerAppId?: string | null;
|
|
302
297
|
/** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
|
|
303
298
|
triggerActivityType?: string | null;
|
|
304
299
|
}
|
|
305
|
-
interface ListEarningRulesResponse {
|
|
300
|
+
export interface ListEarningRulesResponse {
|
|
306
301
|
/** Retrieved earning rules. */
|
|
307
302
|
earningRules?: LoyaltyEarningRule[];
|
|
308
303
|
}
|
|
309
|
-
interface ListEarningRulesInTierRequest {
|
|
304
|
+
export interface ListEarningRulesInTierRequest {
|
|
310
305
|
/**
|
|
311
306
|
* ID of the tier for which the earning rules will be returned.
|
|
312
307
|
* @format GUID
|
|
@@ -315,7 +310,7 @@ interface ListEarningRulesInTierRequest {
|
|
|
315
310
|
/** Pagination options. */
|
|
316
311
|
paging?: CursorPaging;
|
|
317
312
|
}
|
|
318
|
-
interface CursorPaging {
|
|
313
|
+
export interface CursorPaging {
|
|
319
314
|
/**
|
|
320
315
|
* Maximum number of items to return in the results.
|
|
321
316
|
* @max 100
|
|
@@ -330,13 +325,13 @@ interface CursorPaging {
|
|
|
330
325
|
*/
|
|
331
326
|
cursor?: string | null;
|
|
332
327
|
}
|
|
333
|
-
interface ListEarningRulesInTierResponse {
|
|
328
|
+
export interface ListEarningRulesInTierResponse {
|
|
334
329
|
/** Retrieved earning rules. */
|
|
335
330
|
earningRules?: LoyaltyEarningRule[];
|
|
336
331
|
/** Details on the paged set of results returned. */
|
|
337
332
|
pagingMetadata?: PagingMetadataV2;
|
|
338
333
|
}
|
|
339
|
-
interface PagingMetadataV2 {
|
|
334
|
+
export interface PagingMetadataV2 {
|
|
340
335
|
/** Number of items returned in the response. */
|
|
341
336
|
count?: number | null;
|
|
342
337
|
/** Offset that was requested. */
|
|
@@ -348,7 +343,7 @@ interface PagingMetadataV2 {
|
|
|
348
343
|
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
349
344
|
cursors?: Cursors;
|
|
350
345
|
}
|
|
351
|
-
interface Cursors {
|
|
346
|
+
export interface Cursors {
|
|
352
347
|
/**
|
|
353
348
|
* Cursor string pointing to the next page in the list of results.
|
|
354
349
|
* @maxLength 16000
|
|
@@ -360,7 +355,7 @@ interface Cursors {
|
|
|
360
355
|
*/
|
|
361
356
|
prev?: string | null;
|
|
362
357
|
}
|
|
363
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
358
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
364
359
|
createdEvent?: EntityCreatedEvent;
|
|
365
360
|
updatedEvent?: EntityUpdatedEvent;
|
|
366
361
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -369,7 +364,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
369
364
|
* Unique event ID.
|
|
370
365
|
* Allows clients to ignore duplicate webhooks.
|
|
371
366
|
*/
|
|
372
|
-
|
|
367
|
+
id?: string;
|
|
373
368
|
/**
|
|
374
369
|
* Assumes actions are also always typed to an entity_type
|
|
375
370
|
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
@@ -403,36 +398,38 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
403
398
|
entityEventSequence?: string | null;
|
|
404
399
|
}
|
|
405
400
|
/** @oneof */
|
|
406
|
-
interface DomainEventBodyOneOf {
|
|
401
|
+
export interface DomainEventBodyOneOf {
|
|
407
402
|
createdEvent?: EntityCreatedEvent;
|
|
408
403
|
updatedEvent?: EntityUpdatedEvent;
|
|
409
404
|
deletedEvent?: EntityDeletedEvent;
|
|
410
405
|
actionEvent?: ActionEvent;
|
|
411
406
|
}
|
|
412
|
-
interface EntityCreatedEvent {
|
|
413
|
-
|
|
407
|
+
export interface EntityCreatedEvent {
|
|
408
|
+
entityAsJson?: string;
|
|
409
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
410
|
+
restoreInfo?: RestoreInfo;
|
|
414
411
|
}
|
|
415
|
-
interface RestoreInfo {
|
|
412
|
+
export interface RestoreInfo {
|
|
416
413
|
deletedDate?: Date | null;
|
|
417
414
|
}
|
|
418
|
-
interface EntityUpdatedEvent {
|
|
415
|
+
export interface EntityUpdatedEvent {
|
|
419
416
|
/**
|
|
420
417
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
421
418
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
422
419
|
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
423
420
|
*/
|
|
424
|
-
|
|
421
|
+
currentEntityAsJson?: string;
|
|
425
422
|
}
|
|
426
|
-
interface EntityDeletedEvent {
|
|
423
|
+
export interface EntityDeletedEvent {
|
|
427
424
|
/** Entity that was deleted */
|
|
428
|
-
|
|
425
|
+
deletedEntityAsJson?: string | null;
|
|
429
426
|
}
|
|
430
|
-
interface ActionEvent {
|
|
431
|
-
|
|
427
|
+
export interface ActionEvent {
|
|
428
|
+
bodyAsJson?: string;
|
|
432
429
|
}
|
|
433
|
-
interface Empty {
|
|
430
|
+
export interface Empty {
|
|
434
431
|
}
|
|
435
|
-
interface MessageEnvelope {
|
|
432
|
+
export interface MessageEnvelope {
|
|
436
433
|
/**
|
|
437
434
|
* App instance ID.
|
|
438
435
|
* @format GUID
|
|
@@ -448,7 +445,7 @@ interface MessageEnvelope {
|
|
|
448
445
|
/** Stringify payload. */
|
|
449
446
|
data?: string;
|
|
450
447
|
}
|
|
451
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
448
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
452
449
|
/**
|
|
453
450
|
* ID of a site visitor that has not logged in to the site.
|
|
454
451
|
* @format GUID
|
|
@@ -473,7 +470,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
473
470
|
identityType?: WebhookIdentityType;
|
|
474
471
|
}
|
|
475
472
|
/** @oneof */
|
|
476
|
-
interface IdentificationDataIdOneOf {
|
|
473
|
+
export interface IdentificationDataIdOneOf {
|
|
477
474
|
/**
|
|
478
475
|
* ID of a site visitor that has not logged in to the site.
|
|
479
476
|
* @format GUID
|
|
@@ -495,149 +492,10 @@ interface IdentificationDataIdOneOf {
|
|
|
495
492
|
*/
|
|
496
493
|
appId?: string;
|
|
497
494
|
}
|
|
498
|
-
declare enum WebhookIdentityType {
|
|
495
|
+
export declare enum WebhookIdentityType {
|
|
499
496
|
UNKNOWN = "UNKNOWN",
|
|
500
497
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
501
498
|
MEMBER = "MEMBER",
|
|
502
499
|
WIX_USER = "WIX_USER",
|
|
503
500
|
APP = "APP"
|
|
504
501
|
}
|
|
505
|
-
interface BaseEventMetadata {
|
|
506
|
-
/**
|
|
507
|
-
* App instance ID.
|
|
508
|
-
* @format GUID
|
|
509
|
-
*/
|
|
510
|
-
instanceId?: string | null;
|
|
511
|
-
/**
|
|
512
|
-
* Event type.
|
|
513
|
-
* @maxLength 150
|
|
514
|
-
*/
|
|
515
|
-
eventType?: string;
|
|
516
|
-
/** The identification type and identity data. */
|
|
517
|
-
identity?: IdentificationData;
|
|
518
|
-
}
|
|
519
|
-
interface EventMetadata extends BaseEventMetadata {
|
|
520
|
-
/**
|
|
521
|
-
* Unique event ID.
|
|
522
|
-
* Allows clients to ignore duplicate webhooks.
|
|
523
|
-
*/
|
|
524
|
-
_id?: string;
|
|
525
|
-
/**
|
|
526
|
-
* Assumes actions are also always typed to an entity_type
|
|
527
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
528
|
-
*/
|
|
529
|
-
entityFqdn?: string;
|
|
530
|
-
/**
|
|
531
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
532
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
533
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
534
|
-
*/
|
|
535
|
-
slug?: string;
|
|
536
|
-
/** ID of the entity associated with the event. */
|
|
537
|
-
entityId?: string;
|
|
538
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
539
|
-
eventTime?: Date | null;
|
|
540
|
-
/**
|
|
541
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
542
|
-
* (for example, GDPR).
|
|
543
|
-
*/
|
|
544
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
545
|
-
/** If present, indicates the action that triggered the event. */
|
|
546
|
-
originatedFrom?: string | null;
|
|
547
|
-
/**
|
|
548
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
549
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
550
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
551
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
552
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
553
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
554
|
-
*/
|
|
555
|
-
entityEventSequence?: string | null;
|
|
556
|
-
}
|
|
557
|
-
interface LoyaltyEarningRuleCreatedEnvelope {
|
|
558
|
-
entity: LoyaltyEarningRule;
|
|
559
|
-
metadata: EventMetadata;
|
|
560
|
-
}
|
|
561
|
-
interface LoyaltyEarningRuleDeletedEnvelope {
|
|
562
|
-
metadata: EventMetadata;
|
|
563
|
-
}
|
|
564
|
-
interface LoyaltyEarningRuleUpdatedEnvelope {
|
|
565
|
-
entity: LoyaltyEarningRule;
|
|
566
|
-
metadata: EventMetadata;
|
|
567
|
-
}
|
|
568
|
-
interface CreateCustomLoyaltyEarningRuleOptions {
|
|
569
|
-
/** Custom earning rule to create. */
|
|
570
|
-
earningRule?: CustomLoyaltyEarningRule;
|
|
571
|
-
}
|
|
572
|
-
interface UpdateLoyaltyEarningRule {
|
|
573
|
-
/** Fixed amount of points awarded for each qualifying activity. */
|
|
574
|
-
fixedAmount?: FixedAmount;
|
|
575
|
-
/** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
|
|
576
|
-
conversionRate?: ConversionRate;
|
|
577
|
-
/**
|
|
578
|
-
* Loyalty earning rule ID.
|
|
579
|
-
* @format GUID
|
|
580
|
-
* @readonly
|
|
581
|
-
*/
|
|
582
|
-
_id?: string | null;
|
|
583
|
-
/**
|
|
584
|
-
* ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
|
|
585
|
-
* @format GUID
|
|
586
|
-
*/
|
|
587
|
-
sourceAppId?: string;
|
|
588
|
-
/**
|
|
589
|
-
* ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
|
|
590
|
-
* @minLength 1
|
|
591
|
-
* @maxLength 80
|
|
592
|
-
*/
|
|
593
|
-
triggerAppId?: string;
|
|
594
|
-
/**
|
|
595
|
-
* Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
|
|
596
|
-
* @minLength 1
|
|
597
|
-
* @maxLength 80
|
|
598
|
-
*/
|
|
599
|
-
triggerActivityType?: string;
|
|
600
|
-
/**
|
|
601
|
-
* Name of the earning rule.
|
|
602
|
-
* @minLength 1
|
|
603
|
-
* @maxLength 50
|
|
604
|
-
*/
|
|
605
|
-
title?: string;
|
|
606
|
-
/** Current status of the earning rule. */
|
|
607
|
-
status?: Status;
|
|
608
|
-
/**
|
|
609
|
-
* Revision number, incremented by 1 each time the earning rule is updated.
|
|
610
|
-
* Pass the latest revision when updating to prevent conflicting changes.
|
|
611
|
-
*/
|
|
612
|
-
revision?: string | null;
|
|
613
|
-
/**
|
|
614
|
-
* Date and time the earning rule was created.
|
|
615
|
-
* @readonly
|
|
616
|
-
*/
|
|
617
|
-
_createdDate?: Date | null;
|
|
618
|
-
/**
|
|
619
|
-
* Date and time the earning rule was last updated.
|
|
620
|
-
* @readonly
|
|
621
|
-
*/
|
|
622
|
-
_updatedDate?: Date | null;
|
|
623
|
-
/**
|
|
624
|
-
* Additional metadata about the earning rule.
|
|
625
|
-
* @readonly
|
|
626
|
-
*/
|
|
627
|
-
metadata?: Metadata;
|
|
628
|
-
}
|
|
629
|
-
interface DeleteLoyaltyEarningRuleOptions {
|
|
630
|
-
/**
|
|
631
|
-
* Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
|
|
632
|
-
* Pass the latest revision when updating to prevent conflicting changes.
|
|
633
|
-
*/
|
|
634
|
-
revision?: string;
|
|
635
|
-
}
|
|
636
|
-
interface ListEarningRulesOptions {
|
|
637
|
-
/** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
|
|
638
|
-
triggerAppId?: string | null;
|
|
639
|
-
/** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
|
|
640
|
-
triggerActivityType?: string | null;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
export { type IdentificationData as $, type ApplicationError as A, type BulkCreateLoyaltyEarningRulesResponse as B, type CreateCustomLoyaltyEarningRuleOptions as C, type DeleteLoyaltyEarningRuleOptions as D, type EarningRuleDisabled as E, type FixedAmount as F, type GetLoyaltyEarningRuleRequest as G, type CursorPaging as H, type ItemMetadata as I, type ListEarningRulesInTierResponse as J, type Cursors as K, type LoyaltyEarningRule as L, type Metadata as M, type DomainEvent as N, type DomainEventBodyOneOf as O, type PagingMetadataV2 as P, type EntityCreatedEvent as Q, type RestoreInfo as R, Status as S, Type as T, type UpdateLoyaltyEarningRule as U, type EntityUpdatedEvent as V, WebhookIdentityType as W, type EntityDeletedEvent as X, type ActionEvent as Y, type Empty as Z, type MessageEnvelope as _, type CreateCustomLoyaltyEarningRuleResponse as a, type IdentificationDataIdOneOf as a0, type BaseEventMetadata as a1, type EventMetadata as a2, type LoyaltyEarningRuleCreatedEnvelope as a3, type LoyaltyEarningRuleDeletedEnvelope as a4, type LoyaltyEarningRuleUpdatedEnvelope as a5, type UpdateLoyaltyEarningRuleResponse as b, type ListEarningRulesOptions as c, type ListEarningRulesResponse as d, LoyaltyEarningRuleTypeTagType as e, type LoyaltyEarningRuleTypeOneOf as f, type FixedAmountConfig as g, type ConversionRate as h, type ConversionRateConfig as i, type LoyaltyEarningRuleTypeTag as j, type CreateLoyaltyEarningRuleRequest as k, type CreateLoyaltyEarningRuleResponse as l, type BulkCreateLoyaltyEarningRulesRequest as m, type BulkLoyaltyEarningRuleResult as n, type BulkActionMetadata as o, type CreateCustomLoyaltyEarningRuleRequest as p, type CustomLoyaltyEarningRule as q, type CustomLoyaltyEarningRuleTypeOneOf as r, type GetLoyaltyEarningRuleResponse as s, type UpdateLoyaltyEarningRuleRequest as t, type DeleteLoyaltyEarningRuleRequest as u, type DeleteLoyaltyEarningRuleResponse as v, type DeleteAutomationEarningRuleRequest as w, type DeleteAutomationEarningRuleResponse as x, type ListEarningRulesRequest as y, type ListEarningRulesInTierRequest as z };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export var Status;
|
|
2
|
+
(function (Status) {
|
|
3
|
+
/** Status is unknown or not specified. */
|
|
4
|
+
Status["UNKNOWN"] = "UNKNOWN";
|
|
5
|
+
/** Earning rule is active and can assign points. */
|
|
6
|
+
Status["ACTIVE"] = "ACTIVE";
|
|
7
|
+
/** Earning rule is paused and can't assign points. */
|
|
8
|
+
Status["PAUSED"] = "PAUSED";
|
|
9
|
+
})(Status || (Status = {}));
|
|
10
|
+
export var LoyaltyEarningRuleTypeTagType;
|
|
11
|
+
(function (LoyaltyEarningRuleTypeTagType) {
|
|
12
|
+
/** Type is unknown or not specified. */
|
|
13
|
+
LoyaltyEarningRuleTypeTagType["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
14
|
+
/** Earning rule for a customer's birthday. */
|
|
15
|
+
LoyaltyEarningRuleTypeTagType["BIRTHDAY"] = "BIRTHDAY";
|
|
16
|
+
})(LoyaltyEarningRuleTypeTagType || (LoyaltyEarningRuleTypeTagType = {}));
|
|
17
|
+
export var Type;
|
|
18
|
+
(function (Type) {
|
|
19
|
+
/** Unknown type. This value is not used. */
|
|
20
|
+
Type["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
21
|
+
/** Earning rule for social media. */
|
|
22
|
+
Type["SOCIAL_MEDIA"] = "SOCIAL_MEDIA";
|
|
23
|
+
/** Earning rule for birthdays. */
|
|
24
|
+
Type["BIRTHDAY"] = "BIRTHDAY";
|
|
25
|
+
})(Type || (Type = {}));
|
|
26
|
+
export var WebhookIdentityType;
|
|
27
|
+
(function (WebhookIdentityType) {
|
|
28
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
29
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
30
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
31
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
32
|
+
WebhookIdentityType["APP"] = "APP";
|
|
33
|
+
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
34
|
+
//# sourceMappingURL=loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loyalty-v1-loyalty-earning-rule-earning-rules.types.js","sourceRoot":"","sources":["../../../../src/loyalty-v1-loyalty-earning-rule-earning-rules.types.ts"],"names":[],"mappings":"AA6IA,MAAM,CAAN,IAAY,MAOX;AAPD,WAAY,MAAM;IAChB,0CAA0C;IAC1C,6BAAmB,CAAA;IACnB,oDAAoD;IACpD,2BAAiB,CAAA;IACjB,sDAAsD;IACtD,2BAAiB,CAAA;AACnB,CAAC,EAPW,MAAM,KAAN,MAAM,QAOjB;AAYD,MAAM,CAAN,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACvC,wCAAwC;IACxC,8DAA6B,CAAA;IAC7B,8CAA8C;IAC9C,sDAAqB,CAAA;AACvB,CAAC,EALW,6BAA6B,KAA7B,6BAA6B,QAKxC;AAyED,MAAM,CAAN,IAAY,IAOX;AAPD,WAAY,IAAI;IACd,4CAA4C;IAC5C,qCAA6B,CAAA;IAC7B,qCAAqC;IACrC,qCAA6B,CAAA;IAC7B,kCAAkC;IAClC,6BAAqB,CAAA;AACvB,CAAC,EAPW,IAAI,KAAJ,IAAI,QAOf;AAwSD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|