@wix/auto_sdk_loyalty_earning-rules 1.0.40 → 1.0.42
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 +5 -5
- package/build/cjs/index.js +0 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +31 -8
- package/build/cjs/index.typings.js +0 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +21 -4
- package/build/cjs/meta.js +0 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +469 -0
- package/build/cjs/schemas.js +1001 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.d.mts +5 -5
- package/build/es/index.mjs +0 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +31 -8
- package/build/es/index.typings.mjs +0 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +21 -4
- package/build/es/meta.mjs +0 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +469 -0
- package/build/es/schemas.mjs +949 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +5 -5
- package/build/internal/cjs/index.js +0 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +31 -8
- package/build/internal/cjs/index.typings.js +0 -1
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +21 -4
- package/build/internal/cjs/meta.js +0 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +469 -0
- package/build/internal/cjs/schemas.js +1001 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.d.mts +5 -5
- package/build/internal/es/index.mjs +0 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +31 -8
- package/build/internal/es/index.typings.mjs +0 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +21 -4
- package/build/internal/es/meta.mjs +0 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +469 -0
- package/build/internal/es/schemas.mjs +949 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +12 -5
- package/schemas/package.json +3 -0
|
@@ -60,6 +60,12 @@ interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
|
60
60
|
* @readonly
|
|
61
61
|
*/
|
|
62
62
|
metadata?: Metadata;
|
|
63
|
+
/**
|
|
64
|
+
* Trigger filters parsed from automation configuration. Only present for automation-based rules with filters.
|
|
65
|
+
* @readonly
|
|
66
|
+
* @maxSize 100
|
|
67
|
+
*/
|
|
68
|
+
triggerFilters?: AutomationTriggerFilter[];
|
|
63
69
|
}
|
|
64
70
|
/** @oneof */
|
|
65
71
|
interface LoyaltyEarningRuleTypeOneOf {
|
|
@@ -161,6 +167,19 @@ declare enum LoyaltyEarningRuleTypeTagType {
|
|
|
161
167
|
}
|
|
162
168
|
/** @enumType */
|
|
163
169
|
type LoyaltyEarningRuleTypeTagTypeWithLiterals = LoyaltyEarningRuleTypeTagType | 'UNKNOWN_TYPE' | 'BIRTHDAY';
|
|
170
|
+
interface AutomationTriggerFilter {
|
|
171
|
+
/**
|
|
172
|
+
* Key identifying the field in the trigger payload (e.g., "service_id", "eventId", "programId").
|
|
173
|
+
* @maxLength 110
|
|
174
|
+
*/
|
|
175
|
+
fieldKey?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Parsed entity IDs that the filter matches against.
|
|
178
|
+
* @maxLength 256
|
|
179
|
+
* @maxSize 100
|
|
180
|
+
*/
|
|
181
|
+
values?: string[];
|
|
182
|
+
}
|
|
164
183
|
interface CacheInvalidated {
|
|
165
184
|
}
|
|
166
185
|
interface EarningRuleDisabled {
|
|
@@ -226,15 +245,13 @@ interface CreateCustomLoyaltyEarningRuleRequest {
|
|
|
226
245
|
earningRule?: CustomLoyaltyEarningRule;
|
|
227
246
|
}
|
|
228
247
|
declare enum Type {
|
|
229
|
-
/** Unknown type. This value is not used. */
|
|
230
|
-
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
231
248
|
/** Earning rule for social media. */
|
|
232
249
|
SOCIAL_MEDIA = "SOCIAL_MEDIA",
|
|
233
250
|
/** Earning rule for birthdays. */
|
|
234
251
|
BIRTHDAY = "BIRTHDAY"
|
|
235
252
|
}
|
|
236
253
|
/** @enumType */
|
|
237
|
-
type TypeWithLiterals = Type | '
|
|
254
|
+
type TypeWithLiterals = Type | 'SOCIAL_MEDIA' | 'BIRTHDAY';
|
|
238
255
|
/** Used in CreateCustomLoyaltyEarningRuleRequest */
|
|
239
256
|
interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
|
|
240
257
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
@@ -662,7 +679,7 @@ declare function onLoyaltyEarningRuleUpdated(handler: (event: LoyaltyEarningRule
|
|
|
662
679
|
* @returns Created earning rule.
|
|
663
680
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule
|
|
664
681
|
*/
|
|
665
|
-
declare function createLoyaltyEarningRule(earningRule: NonNullablePaths<LoyaltyEarningRule, `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`, 2>): Promise<NonNullablePaths<LoyaltyEarningRule, `fixedAmount.configs` | `fixedAmount.configs.${number}.points` | `conversionRate.configs` | `conversionRate.configs.${number}.moneyAmount` | `conversionRate.configs.${number}.points` | `sourceAppId` | `triggerAppId` | `triggerActivityType` | `title` | `status` | `metadata.canBeDeleted`, 5>>;
|
|
682
|
+
declare function createLoyaltyEarningRule(earningRule: NonNullablePaths<LoyaltyEarningRule, `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`, 2>): Promise<NonNullablePaths<LoyaltyEarningRule, `fixedAmount.configs` | `fixedAmount.configs.${number}.points` | `conversionRate.configs` | `conversionRate.configs.${number}.moneyAmount` | `conversionRate.configs.${number}.points` | `sourceAppId` | `triggerAppId` | `triggerActivityType` | `title` | `status` | `metadata.canBeDeleted` | `triggerFilters` | `triggerFilters.${number}.fieldKey`, 5>>;
|
|
666
683
|
/**
|
|
667
684
|
* Creates multiple non-automated earning rules.
|
|
668
685
|
*
|
|
@@ -692,7 +709,7 @@ declare function bulkCreateLoyaltyEarningRules(earningRules: NonNullablePaths<Lo
|
|
|
692
709
|
* @applicableIdentity APP
|
|
693
710
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule
|
|
694
711
|
*/
|
|
695
|
-
declare function createCustomLoyaltyEarningRule(type: TypeWithLiterals, options?: CreateCustomLoyaltyEarningRuleOptions): Promise<NonNullablePaths<CreateCustomLoyaltyEarningRuleResponse, `earningRule.fixedAmount.configs` | `earningRule.fixedAmount.configs.${number}.points` | `earningRule.conversionRate.configs` | `earningRule.conversionRate.configs.${number}.moneyAmount` | `earningRule.conversionRate.configs.${number}.points` | `earningRule.sourceAppId` | `earningRule.triggerAppId` | `earningRule.triggerActivityType` | `earningRule.title` | `earningRule.status` | `earningRule.metadata.canBeDeleted`, 6>>;
|
|
712
|
+
declare function createCustomLoyaltyEarningRule(type: TypeWithLiterals, options?: CreateCustomLoyaltyEarningRuleOptions): Promise<NonNullablePaths<CreateCustomLoyaltyEarningRuleResponse, `earningRule.fixedAmount.configs` | `earningRule.fixedAmount.configs.${number}.points` | `earningRule.conversionRate.configs` | `earningRule.conversionRate.configs.${number}.moneyAmount` | `earningRule.conversionRate.configs.${number}.points` | `earningRule.sourceAppId` | `earningRule.triggerAppId` | `earningRule.triggerActivityType` | `earningRule.title` | `earningRule.status` | `earningRule.metadata.canBeDeleted` | `earningRule.triggerFilters` | `earningRule.triggerFilters.${number}.fieldKey`, 6>>;
|
|
696
713
|
interface CreateCustomLoyaltyEarningRuleOptions {
|
|
697
714
|
/** Custom earning rule to create. */
|
|
698
715
|
earningRule?: CustomLoyaltyEarningRule;
|
|
@@ -709,7 +726,7 @@ interface CreateCustomLoyaltyEarningRuleOptions {
|
|
|
709
726
|
* @returns Retrieved earning rule.
|
|
710
727
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule
|
|
711
728
|
*/
|
|
712
|
-
declare function getLoyaltyEarningRule(_id: string): Promise<NonNullablePaths<LoyaltyEarningRule, `fixedAmount.configs` | `fixedAmount.configs.${number}.points` | `conversionRate.configs` | `conversionRate.configs.${number}.moneyAmount` | `conversionRate.configs.${number}.points` | `sourceAppId` | `triggerAppId` | `triggerActivityType` | `title` | `status` | `metadata.canBeDeleted`, 5>>;
|
|
729
|
+
declare function getLoyaltyEarningRule(_id: string): Promise<NonNullablePaths<LoyaltyEarningRule, `fixedAmount.configs` | `fixedAmount.configs.${number}.points` | `conversionRate.configs` | `conversionRate.configs.${number}.moneyAmount` | `conversionRate.configs.${number}.points` | `sourceAppId` | `triggerAppId` | `triggerActivityType` | `title` | `status` | `metadata.canBeDeleted` | `triggerFilters` | `triggerFilters.${number}.fieldKey`, 5>>;
|
|
713
730
|
/**
|
|
714
731
|
* Updates an earning rule.
|
|
715
732
|
*
|
|
@@ -725,7 +742,7 @@ declare function getLoyaltyEarningRule(_id: string): Promise<NonNullablePaths<Lo
|
|
|
725
742
|
* @applicableIdentity APP
|
|
726
743
|
* @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule
|
|
727
744
|
*/
|
|
728
|
-
declare function updateLoyaltyEarningRule(_id: string, earningRule: UpdateLoyaltyEarningRule): Promise<NonNullablePaths<UpdateLoyaltyEarningRuleResponse, `earningRule.fixedAmount.configs` | `earningRule.fixedAmount.configs.${number}.points` | `earningRule.conversionRate.configs` | `earningRule.conversionRate.configs.${number}.moneyAmount` | `earningRule.conversionRate.configs.${number}.points` | `earningRule.sourceAppId` | `earningRule.triggerAppId` | `earningRule.triggerActivityType` | `earningRule.title` | `earningRule.status` | `earningRule.metadata.canBeDeleted`, 6>>;
|
|
745
|
+
declare function updateLoyaltyEarningRule(_id: string, earningRule: UpdateLoyaltyEarningRule): Promise<NonNullablePaths<UpdateLoyaltyEarningRuleResponse, `earningRule.fixedAmount.configs` | `earningRule.fixedAmount.configs.${number}.points` | `earningRule.conversionRate.configs` | `earningRule.conversionRate.configs.${number}.moneyAmount` | `earningRule.conversionRate.configs.${number}.points` | `earningRule.sourceAppId` | `earningRule.triggerAppId` | `earningRule.triggerActivityType` | `earningRule.title` | `earningRule.status` | `earningRule.metadata.canBeDeleted` | `earningRule.triggerFilters` | `earningRule.triggerFilters.${number}.fieldKey`, 6>>;
|
|
729
746
|
interface UpdateLoyaltyEarningRule {
|
|
730
747
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
731
748
|
fixedAmount?: FixedAmount;
|
|
@@ -782,6 +799,12 @@ interface UpdateLoyaltyEarningRule {
|
|
|
782
799
|
* @readonly
|
|
783
800
|
*/
|
|
784
801
|
metadata?: Metadata;
|
|
802
|
+
/**
|
|
803
|
+
* Trigger filters parsed from automation configuration. Only present for automation-based rules with filters.
|
|
804
|
+
* @readonly
|
|
805
|
+
* @maxSize 100
|
|
806
|
+
*/
|
|
807
|
+
triggerFilters?: AutomationTriggerFilter[];
|
|
785
808
|
}
|
|
786
809
|
/**
|
|
787
810
|
* Deletes a non-automated earning rule.
|
|
@@ -842,4 +865,4 @@ interface ListEarningRulesOptions {
|
|
|
842
865
|
triggerActivityType?: string | null;
|
|
843
866
|
}
|
|
844
867
|
|
|
845
|
-
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AppInstallationInLoyaltySite, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateLoyaltyEarningRulesRequest, type BulkCreateLoyaltyEarningRulesResponse, type BulkLoyaltyEarningRuleResult, type CacheInvalidated, type ConversionRate, type ConversionRateConfig, type CreateCustomLoyaltyEarningRuleOptions, type CreateCustomLoyaltyEarningRuleRequest, type CreateCustomLoyaltyEarningRuleResponse, type CreateLoyaltyEarningRuleRequest, type CreateLoyaltyEarningRuleResponse, type CursorPaging, type Cursors, type CustomLoyaltyEarningRule, type CustomLoyaltyEarningRuleTypeOneOf, type DeleteAutomationEarningRuleRequest, type DeleteAutomationEarningRuleResponse, type DeleteLoyaltyEarningRuleOptions, type DeleteLoyaltyEarningRuleRequest, type DeleteLoyaltyEarningRuleResponse, type DomainEvent, type DomainEventBodyOneOf, type EarningRuleDisabled, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type FixedAmount, type FixedAmountConfig, type GetLoyaltyEarningRuleRequest, type GetLoyaltyEarningRuleResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateEarningRuleCacheRequest, type InvalidateEarningRuleCacheResponse, type ItemMetadata, type ListEarningRulesInTierRequest, type ListEarningRulesInTierResponse, type ListEarningRulesOptions, type ListEarningRulesRequest, type ListEarningRulesResponse, type LoyaltyEarningRule, type LoyaltyEarningRuleCreatedEnvelope, type LoyaltyEarningRuleDeletedEnvelope, type LoyaltyEarningRuleTypeOneOf, type LoyaltyEarningRuleTypeTag, LoyaltyEarningRuleTypeTagType, type LoyaltyEarningRuleTypeTagTypeWithLiterals, type LoyaltyEarningRuleUpdatedEnvelope, type MessageEnvelope, type Metadata, type PagingMetadataV2, type RestoreInfo, Status, type StatusWithLiterals, Type, type TypeWithLiterals, type UpdateLoyaltyEarningRule, type UpdateLoyaltyEarningRuleRequest, type UpdateLoyaltyEarningRuleResponse, V1Type, type V1TypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateLoyaltyEarningRules, createCustomLoyaltyEarningRule, createLoyaltyEarningRule, deleteAutomationEarningRule, deleteLoyaltyEarningRule, getLoyaltyEarningRule, listEarningRules, onLoyaltyEarningRuleCreated, onLoyaltyEarningRuleDeleted, onLoyaltyEarningRuleUpdated, updateLoyaltyEarningRule };
|
|
868
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AppInstallationInLoyaltySite, type ApplicationError, type AutomationTriggerFilter, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateLoyaltyEarningRulesRequest, type BulkCreateLoyaltyEarningRulesResponse, type BulkLoyaltyEarningRuleResult, type CacheInvalidated, type ConversionRate, type ConversionRateConfig, type CreateCustomLoyaltyEarningRuleOptions, type CreateCustomLoyaltyEarningRuleRequest, type CreateCustomLoyaltyEarningRuleResponse, type CreateLoyaltyEarningRuleRequest, type CreateLoyaltyEarningRuleResponse, type CursorPaging, type Cursors, type CustomLoyaltyEarningRule, type CustomLoyaltyEarningRuleTypeOneOf, type DeleteAutomationEarningRuleRequest, type DeleteAutomationEarningRuleResponse, type DeleteLoyaltyEarningRuleOptions, type DeleteLoyaltyEarningRuleRequest, type DeleteLoyaltyEarningRuleResponse, type DomainEvent, type DomainEventBodyOneOf, type EarningRuleDisabled, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type FixedAmount, type FixedAmountConfig, type GetLoyaltyEarningRuleRequest, type GetLoyaltyEarningRuleResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateEarningRuleCacheRequest, type InvalidateEarningRuleCacheResponse, type ItemMetadata, type ListEarningRulesInTierRequest, type ListEarningRulesInTierResponse, type ListEarningRulesOptions, type ListEarningRulesRequest, type ListEarningRulesResponse, type LoyaltyEarningRule, type LoyaltyEarningRuleCreatedEnvelope, type LoyaltyEarningRuleDeletedEnvelope, type LoyaltyEarningRuleTypeOneOf, type LoyaltyEarningRuleTypeTag, LoyaltyEarningRuleTypeTagType, type LoyaltyEarningRuleTypeTagTypeWithLiterals, type LoyaltyEarningRuleUpdatedEnvelope, type MessageEnvelope, type Metadata, type PagingMetadataV2, type RestoreInfo, Status, type StatusWithLiterals, Type, type TypeWithLiterals, type UpdateLoyaltyEarningRule, type UpdateLoyaltyEarningRuleRequest, type UpdateLoyaltyEarningRuleResponse, V1Type, type V1TypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateLoyaltyEarningRules, createCustomLoyaltyEarningRule, createLoyaltyEarningRule, deleteAutomationEarningRule, deleteLoyaltyEarningRule, getLoyaltyEarningRule, listEarningRules, onLoyaltyEarningRuleCreated, onLoyaltyEarningRuleDeleted, onLoyaltyEarningRuleUpdated, updateLoyaltyEarningRule };
|
|
@@ -381,7 +381,6 @@ var LoyaltyEarningRuleTypeTagType = /* @__PURE__ */ ((LoyaltyEarningRuleTypeTagT
|
|
|
381
381
|
return LoyaltyEarningRuleTypeTagType2;
|
|
382
382
|
})(LoyaltyEarningRuleTypeTagType || {});
|
|
383
383
|
var Type = /* @__PURE__ */ ((Type2) => {
|
|
384
|
-
Type2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
385
384
|
Type2["SOCIAL_MEDIA"] = "SOCIAL_MEDIA";
|
|
386
385
|
Type2["BIRTHDAY"] = "BIRTHDAY";
|
|
387
386
|
return Type2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.ts","../../src/loyalty-v1-loyalty-earning-rule-earning-rules.http.ts"],"sourcesContent":["export * from './src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixLoyaltyV1LoyaltyEarningRule from './loyalty-v1-loyalty-earning-rule-earning-rules.http.js';\n\n/**\n * A loyalty earning rule defines how customers earn points in a loyalty program.\n * You can create rules for different activities, such as making purchases.\n */\nexport interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {\n /** Fixed amount of points awarded for each qualifying activity. */\n fixedAmount?: FixedAmount;\n /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */\n conversionRate?: ConversionRate;\n /**\n * Loyalty earning rule ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.\n * @format GUID\n */\n sourceAppId?: string;\n /**\n * ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.\n * @minLength 1\n * @maxLength 80\n */\n triggerAppId?: string;\n /**\n * Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.\n * @minLength 1\n * @maxLength 80\n */\n triggerActivityType?: string;\n /**\n * Name of the earning rule.\n * @minLength 1\n * @maxLength 50\n */\n title?: string;\n /** Current status of the earning rule. */\n status?: StatusWithLiterals;\n /**\n * Revision number, incremented by 1 each time the earning rule is updated.\n * Pass the latest `revision` when updating to prevent conflicting changes.\n */\n revision?: string | null;\n /**\n * Date and time the earning rule was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the earning rule was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Additional metadata about the earning rule.\n * @readonly\n */\n metadata?: Metadata;\n}\n\n/** @oneof */\nexport interface LoyaltyEarningRuleTypeOneOf {\n /** Fixed amount of points awarded for each qualifying activity. */\n fixedAmount?: FixedAmount;\n /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */\n conversionRate?: ConversionRate;\n}\n\n/** Fixed amount type of earning rule. */\nexport interface FixedAmount {\n /**\n * Fixed amount configurations for each tier.\n * @maxSize 21\n */\n configs?: FixedAmountConfig[];\n}\n\nexport interface FixedAmountConfig {\n /**\n * Tier ID. If empty, the base tier is used. See the Tiers API for more information.\n * @format GUID\n * @readonly\n */\n tierId?: string | null;\n /** Number of points to award. */\n points?: number;\n}\n\n/**\n * Conversion rate type of earning rule.\n * Customers earn points based on the amount spent.\n * For example, for every $10 spent, a customer might earn 1 point.\n */\nexport interface ConversionRate {\n /**\n * Conversion rate configurations for each tier.\n *\n * Points are awarded proportionally to the amount spent.\n *\n * Formula: `(amount spent) / (money_amount * points)`.\n * @maxSize 21\n */\n configs?: ConversionRateConfig[];\n /**\n * 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.\n * For example, if set to \"priceSummary.totalAmount\", the rule uses the total order amount to calculate loyalty points to be awarded.\n * This field is only applicable for automated earning rules.\n */\n field?: string | null;\n}\n\nexport interface ConversionRateConfig {\n /**\n * Tier ID. If empty, the base tier is used. See the Tiers API for more information.\n * @format GUID\n * @readonly\n */\n tierId?: string | null;\n /**\n * The amount of money used as a reference for point calculation.\n * Points are awarded proportionally to the amount spent.\n *\n * For example, if set to 10, 1 point is awarded for every 10 units of currency spent (assuming `points` is set to 1).\n *\n * Formula for points is: `(amount spent) / (money_amount * points)`.\n */\n moneyAmount?: number;\n /**\n * Points given for the specified `money_amount`.\n * Works in conjunction with `money_amount` to define the earning rule.\n *\n * For example: If `money_amount` is 20 and `points` is 10:\n * - Spending 10 units of currency earns 5 points\n * - Spending 20 units of currency earns 10 points\n * - Spending 30 units of currency earns 15 points\n */\n points?: number;\n}\n\nexport enum Status {\n /** Status is unknown or not specified. */\n UNKNOWN = 'UNKNOWN',\n /** Earning rule is active and can assign points. */\n ACTIVE = 'ACTIVE',\n /** Earning rule is paused and can't assign points. */\n PAUSED = 'PAUSED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'UNKNOWN' | 'ACTIVE' | 'PAUSED';\n\nexport interface Metadata {\n /** Whether the earning rule can be deleted. */\n canBeDeleted?: boolean;\n /**\n * Information about the type of custom earning rule.\n * @internal\n */\n ruleTypeTag?: LoyaltyEarningRuleTypeTag;\n}\n\nexport interface LoyaltyEarningRuleTypeTag {\n /** Type of custom earning rule. */\n ruleType?: LoyaltyEarningRuleTypeTagTypeWithLiterals;\n}\n\nexport enum LoyaltyEarningRuleTypeTagType {\n /** Type is unknown or not specified. */\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Earning rule for a customer's birthday. */\n BIRTHDAY = 'BIRTHDAY',\n}\n\n/** @enumType */\nexport type LoyaltyEarningRuleTypeTagTypeWithLiterals =\n | LoyaltyEarningRuleTypeTagType\n | 'UNKNOWN_TYPE'\n | 'BIRTHDAY';\n\nexport interface CacheInvalidated {}\n\nexport interface EarningRuleDisabled {}\n\nexport interface CreateLoyaltyEarningRuleRequest {\n /** Earning rule to create. */\n earningRule: LoyaltyEarningRule;\n}\n\nexport interface CreateLoyaltyEarningRuleResponse {\n /** Created earning rule. */\n earningRule?: LoyaltyEarningRule;\n}\n\nexport interface BulkCreateLoyaltyEarningRulesRequest {\n /**\n * Earning rules to create.\n * @minSize 1\n * @maxSize 100\n */\n earningRules: LoyaltyEarningRule[];\n}\n\nexport interface BulkCreateLoyaltyEarningRulesResponse {\n /** Created earning rules. */\n results?: BulkLoyaltyEarningRuleResult[];\n /** Additional metadata for the created earning rules. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkLoyaltyEarningRuleResult {\n /** Additional metadata for the created earning rules. */\n itemMetadata?: ItemMetadata;\n /** Created earning rule. */\n item?: LoyaltyEarningRule;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface CreateCustomLoyaltyEarningRuleRequest {\n /** Type of the custom earning rule. */\n type: TypeWithLiterals;\n /** Custom earning rule to create. */\n earningRule?: CustomLoyaltyEarningRule;\n}\n\nexport enum Type {\n /** Unknown type. This value is not used. */\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Earning rule for social media. */\n SOCIAL_MEDIA = 'SOCIAL_MEDIA',\n /** Earning rule for birthdays. */\n BIRTHDAY = 'BIRTHDAY',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_TYPE'\n | 'SOCIAL_MEDIA'\n | 'BIRTHDAY';\n\n/** Used in CreateCustomLoyaltyEarningRuleRequest */\nexport interface CustomLoyaltyEarningRule\n extends CustomLoyaltyEarningRuleTypeOneOf {\n /** Fixed amount of points awarded for each qualifying activity. */\n fixedAmount?: FixedAmount;\n /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */\n conversionRate?: ConversionRate;\n /**\n * Name of the earning rule.\n * @minLength 1\n * @maxLength 50\n */\n title?: string;\n}\n\n/** @oneof */\nexport interface CustomLoyaltyEarningRuleTypeOneOf {\n /** Fixed amount of points awarded for each qualifying activity. */\n fixedAmount?: FixedAmount;\n /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */\n conversionRate?: ConversionRate;\n}\n\nexport interface CreateCustomLoyaltyEarningRuleResponse {\n /** Created earning rule. */\n earningRule?: LoyaltyEarningRule;\n}\n\nexport interface GetLoyaltyEarningRuleRequest {\n /**\n * ID of the earning rule to retrieve.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface GetLoyaltyEarningRuleResponse {\n /** Retrieved earning rule. */\n earningRule?: LoyaltyEarningRule;\n}\n\nexport interface UpdateLoyaltyEarningRuleRequest {\n /** Earning rule to update. */\n earningRule: LoyaltyEarningRule;\n}\n\nexport interface UpdateLoyaltyEarningRuleResponse {\n /** The updated earning rule. */\n earningRule?: LoyaltyEarningRule;\n}\n\nexport interface DeleteLoyaltyEarningRuleRequest {\n /**\n * ID of the earning rule to delete.\n * @format GUID\n */\n _id: string;\n /**\n * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.\n * Pass the latest `revision` when updating to prevent conflicting changes.\n */\n revision?: string;\n}\n\nexport interface DeleteLoyaltyEarningRuleResponse {}\n\nexport interface DeleteAutomationEarningRuleRequest {\n /**\n * ID of the earning rule to delete.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface DeleteAutomationEarningRuleResponse {}\n\nexport interface ListEarningRulesRequest {\n /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */\n triggerAppId?: string | null;\n /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */\n triggerActivityType?: string | null;\n}\n\nexport interface ListEarningRulesResponse {\n /** Retrieved earning rules. */\n earningRules?: LoyaltyEarningRule[];\n}\n\nexport interface ListEarningRulesInTierRequest {\n /**\n * ID of the tier for which the earning rules will be returned.\n * @format GUID\n */\n tierId?: string | null;\n /** Pagination options. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListEarningRulesInTierResponse {\n /** Retrieved earning rules. */\n earningRules?: LoyaltyEarningRule[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface InvalidateEarningRuleCacheRequest {}\n\nexport interface InvalidateEarningRuleCacheResponse {}\n\nexport interface AppInstallationInLoyaltySite {\n /** @format GUID */\n appDefId?: string;\n type?: V1TypeWithLiterals;\n}\n\nexport enum V1Type {\n UNSPECIFIED = 'UNSPECIFIED',\n INSTALLED = 'INSTALLED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type V1TypeWithLiterals =\n | V1Type\n | 'UNSPECIFIED'\n | 'INSTALLED'\n | 'DELETED';\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface LoyaltyEarningRuleCreatedEnvelope {\n entity: LoyaltyEarningRule;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an earning rule is created.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_EARNING_RULES\n * @webhook\n * @eventType wix.loyalty.v1.loyalty_earning_rule_created\n * @slug created\n */\nexport declare function onLoyaltyEarningRuleCreated(\n handler: (event: LoyaltyEarningRuleCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LoyaltyEarningRuleDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an earning rule is deleted.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_EARNING_RULES\n * @webhook\n * @eventType wix.loyalty.v1.loyalty_earning_rule_deleted\n * @slug deleted\n */\nexport declare function onLoyaltyEarningRuleDeleted(\n handler: (event: LoyaltyEarningRuleDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LoyaltyEarningRuleUpdatedEnvelope {\n entity: LoyaltyEarningRule;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an earning rule is updated.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_EARNING_RULES\n * @webhook\n * @eventType wix.loyalty.v1.loyalty_earning_rule_updated\n * @slug updated\n */\nexport declare function onLoyaltyEarningRuleUpdated(\n handler: (event: LoyaltyEarningRuleUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a non-automated earning rule.\n *\n * >**Note**: You can only create non-automated earning rules from a supported list.\n * For the supported list of services, see the Introduction.\n * @param earningRule - Earning rule to create.\n * @public\n * @requiredField earningRule\n * @requiredField earningRule.sourceAppId\n * @requiredField earningRule.status\n * @requiredField earningRule.title\n * @requiredField earningRule.triggerActivityType\n * @requiredField earningRule.triggerAppId\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @returns Created earning rule.\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule\n */\nexport async function createLoyaltyEarningRule(\n earningRule: NonNullablePaths<\n LoyaltyEarningRule,\n `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`,\n 2\n >\n): Promise<\n NonNullablePaths<\n LoyaltyEarningRule,\n | `fixedAmount.configs`\n | `fixedAmount.configs.${number}.points`\n | `conversionRate.configs`\n | `conversionRate.configs.${number}.moneyAmount`\n | `conversionRate.configs.${number}.points`\n | `sourceAppId`\n | `triggerAppId`\n | `triggerActivityType`\n | `title`\n | `status`\n | `metadata.canBeDeleted`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n earningRule: earningRule,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.createLoyaltyEarningRule(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.earningRule!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { earningRule: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['earningRule']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates multiple non-automated earning rules.\n *\n * >**Note**: You can only create non-automated earning rules from a supported list.\n * For the supported list of services, see the Introduction.\n * @param earningRules - Earning rules to create.\n * @public\n * @requiredField earningRules\n * @requiredField earningRules.sourceAppId\n * @requiredField earningRules.status\n * @requiredField earningRules.title\n * @requiredField earningRules.triggerActivityType\n * @requiredField earningRules.triggerAppId\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules\n */\nexport async function bulkCreateLoyaltyEarningRules(\n earningRules: NonNullablePaths<\n LoyaltyEarningRule,\n `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`,\n 2\n >[]\n): Promise<\n NonNullablePaths<\n BulkCreateLoyaltyEarningRulesResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.sourceAppId`\n | `results.${number}.item.triggerAppId`\n | `results.${number}.item.triggerActivityType`\n | `results.${number}.item.title`\n | `results.${number}.item.status`\n | `results.${number}.item.metadata.canBeDeleted`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n earningRules: earningRules,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.bulkCreateLoyaltyEarningRules(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { earningRules: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['earningRules']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a custom automated earning rule.\n *\n * To learn more about the automated rules, see the Introduction.\n * @param type - Type of the custom earning rule.\n * @public\n * @requiredField type\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule\n */\nexport async function createCustomLoyaltyEarningRule(\n type: TypeWithLiterals,\n options?: CreateCustomLoyaltyEarningRuleOptions\n): Promise<\n NonNullablePaths<\n CreateCustomLoyaltyEarningRuleResponse,\n | `earningRule.fixedAmount.configs`\n | `earningRule.fixedAmount.configs.${number}.points`\n | `earningRule.conversionRate.configs`\n | `earningRule.conversionRate.configs.${number}.moneyAmount`\n | `earningRule.conversionRate.configs.${number}.points`\n | `earningRule.sourceAppId`\n | `earningRule.triggerAppId`\n | `earningRule.triggerActivityType`\n | `earningRule.title`\n | `earningRule.status`\n | `earningRule.metadata.canBeDeleted`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n type: type,\n earningRule: options?.earningRule,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.createCustomLoyaltyEarningRule(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n type: '$[0]',\n earningRule: '$[1].earningRule',\n },\n singleArgumentUnchanged: false,\n },\n ['type', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateCustomLoyaltyEarningRuleOptions {\n /** Custom earning rule to create. */\n earningRule?: CustomLoyaltyEarningRule;\n}\n\n/**\n * Retrieves a specified non-automated earning rule.\n *\n * To retrieve both automated and non-automated earning rules, call List Earning Rules.\n * @param _id - ID of the earning rule to retrieve.\n * @public\n * @requiredField _id\n * @permissionId LOYALTY.READ_EARNING_RULES\n * @applicableIdentity APP\n * @returns Retrieved earning rule.\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule\n */\nexport async function getLoyaltyEarningRule(\n _id: string\n): Promise<\n NonNullablePaths<\n LoyaltyEarningRule,\n | `fixedAmount.configs`\n | `fixedAmount.configs.${number}.points`\n | `conversionRate.configs`\n | `conversionRate.configs.${number}.moneyAmount`\n | `conversionRate.configs.${number}.points`\n | `sourceAppId`\n | `triggerAppId`\n | `triggerActivityType`\n | `title`\n | `status`\n | `metadata.canBeDeleted`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.getLoyaltyEarningRule(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.earningRule!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates an earning rule.\n *\n * Supports partial updates.\n *\n * Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,\n * the current `revision` must be passed when updating the earning rule.\n * @param _id - Loyalty earning rule ID.\n * @public\n * @requiredField _id\n * @requiredField earningRule\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule\n */\nexport async function updateLoyaltyEarningRule(\n _id: string,\n earningRule: UpdateLoyaltyEarningRule\n): Promise<\n NonNullablePaths<\n UpdateLoyaltyEarningRuleResponse,\n | `earningRule.fixedAmount.configs`\n | `earningRule.fixedAmount.configs.${number}.points`\n | `earningRule.conversionRate.configs`\n | `earningRule.conversionRate.configs.${number}.moneyAmount`\n | `earningRule.conversionRate.configs.${number}.points`\n | `earningRule.sourceAppId`\n | `earningRule.triggerAppId`\n | `earningRule.triggerActivityType`\n | `earningRule.title`\n | `earningRule.status`\n | `earningRule.metadata.canBeDeleted`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n earningRule: { ...earningRule, id: _id },\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.updateLoyaltyEarningRule(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { earningRule: '$[1]' },\n explicitPathsToArguments: { 'earningRule.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'earningRule']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateLoyaltyEarningRule {\n /** Fixed amount of points awarded for each qualifying activity. */\n fixedAmount?: FixedAmount;\n /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */\n conversionRate?: ConversionRate;\n /**\n * Loyalty earning rule ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.\n * @format GUID\n */\n sourceAppId?: string;\n /**\n * ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.\n * @minLength 1\n * @maxLength 80\n */\n triggerAppId?: string;\n /**\n * Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.\n * @minLength 1\n * @maxLength 80\n */\n triggerActivityType?: string;\n /**\n * Name of the earning rule.\n * @minLength 1\n * @maxLength 50\n */\n title?: string;\n /** Current status of the earning rule. */\n status?: StatusWithLiterals;\n /**\n * Revision number, incremented by 1 each time the earning rule is updated.\n * Pass the latest `revision` when updating to prevent conflicting changes.\n */\n revision?: string | null;\n /**\n * Date and time the earning rule was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the earning rule was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Additional metadata about the earning rule.\n * @readonly\n */\n metadata?: Metadata;\n}\n\n/**\n * Deletes a non-automated earning rule.\n *\n * To delete an automated earning rule, call\n * Delete Automation Earning Rule.\n *\n * To update an earning rule's status instead of deleting it, call\n * Update Loyalty Earning Rule.\n * @param _id - ID of the earning rule to delete.\n * @public\n * @requiredField _id\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule\n */\nexport async function deleteLoyaltyEarningRule(\n _id: string,\n options?: DeleteLoyaltyEarningRuleOptions\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n revision: options?.revision,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.deleteLoyaltyEarningRule(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', revision: '$[1].revision' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteLoyaltyEarningRuleOptions {\n /**\n * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.\n * Pass the latest `revision` when updating to prevent conflicting changes.\n */\n revision?: string;\n}\n\n/**\n * Deletes a custom automated earning rule.\n * Pre-installed automated rules can only be paused, not deleted.\n *\n * To update an earning rule's status instead of deleting it, call\n * Update Loyalty Earning Rule.\n *\n * To delete a non-automated earning rule, call\n * Delete Loyalty Earning Rule.\n * @param _id - ID of the earning rule to delete.\n * @public\n * @requiredField _id\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule\n */\nexport async function deleteAutomationEarningRule(_id: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.deleteAutomationEarningRule(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of earning rules.\n *\n * Returns both automated and non-automated earning rules.\n *\n * You can filter the results by `triggerAppId` or `triggerActivityType`.\n * @public\n * @permissionId LOYALTY.READ_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules\n */\nexport async function listEarningRules(\n options?: ListEarningRulesOptions\n): Promise<\n NonNullablePaths<\n ListEarningRulesResponse,\n | `earningRules`\n | `earningRules.${number}.sourceAppId`\n | `earningRules.${number}.triggerAppId`\n | `earningRules.${number}.triggerActivityType`\n | `earningRules.${number}.title`\n | `earningRules.${number}.status`\n | `earningRules.${number}.metadata.canBeDeleted`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n triggerAppId: options?.triggerAppId,\n triggerActivityType: options?.triggerActivityType,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.listEarningRules(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n triggerAppId: '$[0].triggerAppId',\n triggerActivityType: '$[0].triggerActivityType',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListEarningRulesOptions {\n /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */\n triggerAppId?: string | null;\n /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */\n triggerActivityType?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_earning-rules';\n\n/**\n * Creates a non-automated earning rule.\n *\n * >**Note**: You can only create non-automated earning rules from a supported list.\n * For the supported list of services, see the Introduction.\n */\nexport function createLoyaltyEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __createLoyaltyEarningRule({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createLoyaltyEarningRule;\n}\n\n/**\n * Creates multiple non-automated earning rules.\n *\n * >**Note**: You can only create non-automated earning rules from a supported list.\n * For the supported list of services, see the Introduction.\n */\nexport function bulkCreateLoyaltyEarningRules(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateLoyaltyEarningRules({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'earningRules.createdDate' },\n { path: 'earningRules.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/bulk/earning-rules/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateLoyaltyEarningRules;\n}\n\n/**\n * Creates a custom automated earning rule.\n *\n * To learn more about the automated rules, see the Introduction.\n */\nexport function createCustomLoyaltyEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __createCustomLoyaltyEarningRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules/custom',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createCustomLoyaltyEarningRule;\n}\n\n/**\n * Retrieves a specified non-automated earning rule.\n *\n * To retrieve both automated and non-automated earning rules, call List Earning Rules.\n */\nexport function getLoyaltyEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __getLoyaltyEarningRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLoyaltyEarningRule;\n}\n\n/**\n * Updates an earning rule.\n *\n * Supports partial updates.\n *\n * Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,\n * the current `revision` must be passed when updating the earning rule.\n */\nexport function updateLoyaltyEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateLoyaltyEarningRule({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules/{earningRule.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateLoyaltyEarningRule;\n}\n\n/**\n * Deletes a non-automated earning rule.\n *\n * To delete an automated earning rule, call\n * Delete Automation Earning Rule.\n *\n * To update an earning rule's status instead of deleting it, call\n * Update Loyalty Earning Rule.\n */\nexport function deleteLoyaltyEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLoyaltyEarningRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLoyaltyEarningRule;\n}\n\n/**\n * Deletes a custom automated earning rule.\n * Pre-installed automated rules can only be paused, not deleted.\n *\n * To update an earning rule's status instead of deleting it, call\n * Update Loyalty Earning Rule.\n *\n * To delete a non-automated earning rule, call\n * Delete Loyalty Earning Rule.\n */\nexport function deleteAutomationEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteAutomationEarningRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/automation-earning-rules/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteAutomationEarningRule;\n}\n\n/**\n * Retrieves a list of earning rules.\n *\n * Returns both automated and non-automated earning rules.\n *\n * You can filter the results by `triggerAppId` or `triggerActivityType`.\n */\nexport function listEarningRules(payload: object): RequestOptionsFactory<any> {\n function __listEarningRules({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules/rules',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'earningRules.createdDate' },\n { path: 'earningRules.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listEarningRules;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uCAAAA;AAAA,EAAA,sCAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,2DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QAC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ltyEarningRule","deleteAutomationEarningRule","deleteLoyaltyEarningRule","getLoyaltyEarningRule","listEarningRules","updateLoyaltyEarningRule","import_timestamp","import_rest_modules","payload","Status","LoyaltyEarningRuleTypeTagType","Type","V1Type","WebhookIdentityType","createLoyaltyEarningRule","sdkTransformError","bulkCreateLoyaltyEarningRules","createCustomLoyaltyEarningRule","getLoyaltyEarningRule","updateLoyaltyEarningRule","deleteLoyaltyEarningRule","deleteAutomationEarningRule","listEarningRules"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.ts","../../src/loyalty-v1-loyalty-earning-rule-earning-rules.http.ts"],"sourcesContent":["export * from './src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixLoyaltyV1LoyaltyEarningRule from './loyalty-v1-loyalty-earning-rule-earning-rules.http.js';\n\n/**\n * A loyalty earning rule defines how customers earn points in a loyalty program.\n * You can create rules for different activities, such as making purchases.\n */\nexport interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {\n /** Fixed amount of points awarded for each qualifying activity. */\n fixedAmount?: FixedAmount;\n /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */\n conversionRate?: ConversionRate;\n /**\n * Loyalty earning rule ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.\n * @format GUID\n */\n sourceAppId?: string;\n /**\n * ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.\n * @minLength 1\n * @maxLength 80\n */\n triggerAppId?: string;\n /**\n * Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.\n * @minLength 1\n * @maxLength 80\n */\n triggerActivityType?: string;\n /**\n * Name of the earning rule.\n * @minLength 1\n * @maxLength 50\n */\n title?: string;\n /** Current status of the earning rule. */\n status?: StatusWithLiterals;\n /**\n * Revision number, incremented by 1 each time the earning rule is updated.\n * Pass the latest `revision` when updating to prevent conflicting changes.\n */\n revision?: string | null;\n /**\n * Date and time the earning rule was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the earning rule was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Additional metadata about the earning rule.\n * @readonly\n */\n metadata?: Metadata;\n /**\n * Trigger filters parsed from automation configuration. Only present for automation-based rules with filters.\n * @readonly\n * @maxSize 100\n */\n triggerFilters?: AutomationTriggerFilter[];\n}\n\n/** @oneof */\nexport interface LoyaltyEarningRuleTypeOneOf {\n /** Fixed amount of points awarded for each qualifying activity. */\n fixedAmount?: FixedAmount;\n /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */\n conversionRate?: ConversionRate;\n}\n\n/** Fixed amount type of earning rule. */\nexport interface FixedAmount {\n /**\n * Fixed amount configurations for each tier.\n * @maxSize 21\n */\n configs?: FixedAmountConfig[];\n}\n\nexport interface FixedAmountConfig {\n /**\n * Tier ID. If empty, the base tier is used. See the Tiers API for more information.\n * @format GUID\n * @readonly\n */\n tierId?: string | null;\n /** Number of points to award. */\n points?: number;\n}\n\n/**\n * Conversion rate type of earning rule.\n * Customers earn points based on the amount spent.\n * For example, for every $10 spent, a customer might earn 1 point.\n */\nexport interface ConversionRate {\n /**\n * Conversion rate configurations for each tier.\n *\n * Points are awarded proportionally to the amount spent.\n *\n * Formula: `(amount spent) / (money_amount * points)`.\n * @maxSize 21\n */\n configs?: ConversionRateConfig[];\n /**\n * 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.\n * For example, if set to \"priceSummary.totalAmount\", the rule uses the total order amount to calculate loyalty points to be awarded.\n * This field is only applicable for automated earning rules.\n */\n field?: string | null;\n}\n\nexport interface ConversionRateConfig {\n /**\n * Tier ID. If empty, the base tier is used. See the Tiers API for more information.\n * @format GUID\n * @readonly\n */\n tierId?: string | null;\n /**\n * The amount of money used as a reference for point calculation.\n * Points are awarded proportionally to the amount spent.\n *\n * For example, if set to 10, 1 point is awarded for every 10 units of currency spent (assuming `points` is set to 1).\n *\n * Formula for points is: `(amount spent) / (money_amount * points)`.\n */\n moneyAmount?: number;\n /**\n * Points given for the specified `money_amount`.\n * Works in conjunction with `money_amount` to define the earning rule.\n *\n * For example: If `money_amount` is 20 and `points` is 10:\n * - Spending 10 units of currency earns 5 points\n * - Spending 20 units of currency earns 10 points\n * - Spending 30 units of currency earns 15 points\n */\n points?: number;\n}\n\nexport enum Status {\n /** Status is unknown or not specified. */\n UNKNOWN = 'UNKNOWN',\n /** Earning rule is active and can assign points. */\n ACTIVE = 'ACTIVE',\n /** Earning rule is paused and can't assign points. */\n PAUSED = 'PAUSED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals = Status | 'UNKNOWN' | 'ACTIVE' | 'PAUSED';\n\nexport interface Metadata {\n /** Whether the earning rule can be deleted. */\n canBeDeleted?: boolean;\n /**\n * Information about the type of custom earning rule.\n * @internal\n */\n ruleTypeTag?: LoyaltyEarningRuleTypeTag;\n}\n\nexport interface LoyaltyEarningRuleTypeTag {\n /** Type of custom earning rule. */\n ruleType?: LoyaltyEarningRuleTypeTagTypeWithLiterals;\n}\n\nexport enum LoyaltyEarningRuleTypeTagType {\n /** Type is unknown or not specified. */\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Earning rule for a customer's birthday. */\n BIRTHDAY = 'BIRTHDAY',\n}\n\n/** @enumType */\nexport type LoyaltyEarningRuleTypeTagTypeWithLiterals =\n | LoyaltyEarningRuleTypeTagType\n | 'UNKNOWN_TYPE'\n | 'BIRTHDAY';\n\nexport interface AutomationTriggerFilter {\n /**\n * Key identifying the field in the trigger payload (e.g., \"service_id\", \"eventId\", \"programId\").\n * @maxLength 110\n */\n fieldKey?: string;\n /**\n * Parsed entity IDs that the filter matches against.\n * @maxLength 256\n * @maxSize 100\n */\n values?: string[];\n}\n\nexport interface CacheInvalidated {}\n\nexport interface EarningRuleDisabled {}\n\nexport interface CreateLoyaltyEarningRuleRequest {\n /** Earning rule to create. */\n earningRule: LoyaltyEarningRule;\n}\n\nexport interface CreateLoyaltyEarningRuleResponse {\n /** Created earning rule. */\n earningRule?: LoyaltyEarningRule;\n}\n\nexport interface BulkCreateLoyaltyEarningRulesRequest {\n /**\n * Earning rules to create.\n * @minSize 1\n * @maxSize 100\n */\n earningRules: LoyaltyEarningRule[];\n}\n\nexport interface BulkCreateLoyaltyEarningRulesResponse {\n /** Created earning rules. */\n results?: BulkLoyaltyEarningRuleResult[];\n /** Additional metadata for the created earning rules. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkLoyaltyEarningRuleResult {\n /** Additional metadata for the created earning rules. */\n itemMetadata?: ItemMetadata;\n /** Created earning rule. */\n item?: LoyaltyEarningRule;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface CreateCustomLoyaltyEarningRuleRequest {\n /** Type of the custom earning rule. */\n type: TypeWithLiterals;\n /** Custom earning rule to create. */\n earningRule?: CustomLoyaltyEarningRule;\n}\n\nexport enum Type {\n /** Earning rule for social media. */\n SOCIAL_MEDIA = 'SOCIAL_MEDIA',\n /** Earning rule for birthdays. */\n BIRTHDAY = 'BIRTHDAY',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'SOCIAL_MEDIA' | 'BIRTHDAY';\n\n/** Used in CreateCustomLoyaltyEarningRuleRequest */\nexport interface CustomLoyaltyEarningRule\n extends CustomLoyaltyEarningRuleTypeOneOf {\n /** Fixed amount of points awarded for each qualifying activity. */\n fixedAmount?: FixedAmount;\n /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */\n conversionRate?: ConversionRate;\n /**\n * Name of the earning rule.\n * @minLength 1\n * @maxLength 50\n */\n title?: string;\n}\n\n/** @oneof */\nexport interface CustomLoyaltyEarningRuleTypeOneOf {\n /** Fixed amount of points awarded for each qualifying activity. */\n fixedAmount?: FixedAmount;\n /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */\n conversionRate?: ConversionRate;\n}\n\nexport interface CreateCustomLoyaltyEarningRuleResponse {\n /** Created earning rule. */\n earningRule?: LoyaltyEarningRule;\n}\n\nexport interface GetLoyaltyEarningRuleRequest {\n /**\n * ID of the earning rule to retrieve.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface GetLoyaltyEarningRuleResponse {\n /** Retrieved earning rule. */\n earningRule?: LoyaltyEarningRule;\n}\n\nexport interface UpdateLoyaltyEarningRuleRequest {\n /** Earning rule to update. */\n earningRule: LoyaltyEarningRule;\n}\n\nexport interface UpdateLoyaltyEarningRuleResponse {\n /** The updated earning rule. */\n earningRule?: LoyaltyEarningRule;\n}\n\nexport interface DeleteLoyaltyEarningRuleRequest {\n /**\n * ID of the earning rule to delete.\n * @format GUID\n */\n _id: string;\n /**\n * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.\n * Pass the latest `revision` when updating to prevent conflicting changes.\n */\n revision?: string;\n}\n\nexport interface DeleteLoyaltyEarningRuleResponse {}\n\nexport interface DeleteAutomationEarningRuleRequest {\n /**\n * ID of the earning rule to delete.\n * @format GUID\n */\n _id: string;\n}\n\nexport interface DeleteAutomationEarningRuleResponse {}\n\nexport interface ListEarningRulesRequest {\n /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */\n triggerAppId?: string | null;\n /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */\n triggerActivityType?: string | null;\n}\n\nexport interface ListEarningRulesResponse {\n /** Retrieved earning rules. */\n earningRules?: LoyaltyEarningRule[];\n}\n\nexport interface ListEarningRulesInTierRequest {\n /**\n * ID of the tier for which the earning rules will be returned.\n * @format GUID\n */\n tierId?: string | null;\n /** Pagination options. */\n paging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface ListEarningRulesInTierResponse {\n /** Retrieved earning rules. */\n earningRules?: LoyaltyEarningRule[];\n /** Details on the paged set of results returned. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface InvalidateEarningRuleCacheRequest {}\n\nexport interface InvalidateEarningRuleCacheResponse {}\n\nexport interface AppInstallationInLoyaltySite {\n /** @format GUID */\n appDefId?: string;\n type?: V1TypeWithLiterals;\n}\n\nexport enum V1Type {\n UNSPECIFIED = 'UNSPECIFIED',\n INSTALLED = 'INSTALLED',\n DELETED = 'DELETED',\n}\n\n/** @enumType */\nexport type V1TypeWithLiterals =\n | V1Type\n | 'UNSPECIFIED'\n | 'INSTALLED'\n | 'DELETED';\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface LoyaltyEarningRuleCreatedEnvelope {\n entity: LoyaltyEarningRule;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an earning rule is created.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_EARNING_RULES\n * @webhook\n * @eventType wix.loyalty.v1.loyalty_earning_rule_created\n * @slug created\n */\nexport declare function onLoyaltyEarningRuleCreated(\n handler: (event: LoyaltyEarningRuleCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LoyaltyEarningRuleDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an earning rule is deleted.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_EARNING_RULES\n * @webhook\n * @eventType wix.loyalty.v1.loyalty_earning_rule_deleted\n * @slug deleted\n */\nexport declare function onLoyaltyEarningRuleDeleted(\n handler: (event: LoyaltyEarningRuleDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LoyaltyEarningRuleUpdatedEnvelope {\n entity: LoyaltyEarningRule;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an earning rule is updated.\n * @permissionScope Read Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.READ_EARNING_RULES\n * @webhook\n * @eventType wix.loyalty.v1.loyalty_earning_rule_updated\n * @slug updated\n */\nexport declare function onLoyaltyEarningRuleUpdated(\n handler: (event: LoyaltyEarningRuleUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a non-automated earning rule.\n *\n * >**Note**: You can only create non-automated earning rules from a supported list.\n * For the supported list of services, see the Introduction.\n * @param earningRule - Earning rule to create.\n * @public\n * @requiredField earningRule\n * @requiredField earningRule.sourceAppId\n * @requiredField earningRule.status\n * @requiredField earningRule.title\n * @requiredField earningRule.triggerActivityType\n * @requiredField earningRule.triggerAppId\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @returns Created earning rule.\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule\n */\nexport async function createLoyaltyEarningRule(\n earningRule: NonNullablePaths<\n LoyaltyEarningRule,\n `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`,\n 2\n >\n): Promise<\n NonNullablePaths<\n LoyaltyEarningRule,\n | `fixedAmount.configs`\n | `fixedAmount.configs.${number}.points`\n | `conversionRate.configs`\n | `conversionRate.configs.${number}.moneyAmount`\n | `conversionRate.configs.${number}.points`\n | `sourceAppId`\n | `triggerAppId`\n | `triggerActivityType`\n | `title`\n | `status`\n | `metadata.canBeDeleted`\n | `triggerFilters`\n | `triggerFilters.${number}.fieldKey`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n earningRule: earningRule,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.createLoyaltyEarningRule(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.earningRule!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { earningRule: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['earningRule']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates multiple non-automated earning rules.\n *\n * >**Note**: You can only create non-automated earning rules from a supported list.\n * For the supported list of services, see the Introduction.\n * @param earningRules - Earning rules to create.\n * @public\n * @requiredField earningRules\n * @requiredField earningRules.sourceAppId\n * @requiredField earningRules.status\n * @requiredField earningRules.title\n * @requiredField earningRules.triggerActivityType\n * @requiredField earningRules.triggerAppId\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules\n */\nexport async function bulkCreateLoyaltyEarningRules(\n earningRules: NonNullablePaths<\n LoyaltyEarningRule,\n `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`,\n 2\n >[]\n): Promise<\n NonNullablePaths<\n BulkCreateLoyaltyEarningRulesResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.sourceAppId`\n | `results.${number}.item.triggerAppId`\n | `results.${number}.item.triggerActivityType`\n | `results.${number}.item.title`\n | `results.${number}.item.status`\n | `results.${number}.item.metadata.canBeDeleted`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n earningRules: earningRules,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.bulkCreateLoyaltyEarningRules(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { earningRules: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['earningRules']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a custom automated earning rule.\n *\n * To learn more about the automated rules, see the Introduction.\n * @param type - Type of the custom earning rule.\n * @public\n * @requiredField type\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule\n */\nexport async function createCustomLoyaltyEarningRule(\n type: TypeWithLiterals,\n options?: CreateCustomLoyaltyEarningRuleOptions\n): Promise<\n NonNullablePaths<\n CreateCustomLoyaltyEarningRuleResponse,\n | `earningRule.fixedAmount.configs`\n | `earningRule.fixedAmount.configs.${number}.points`\n | `earningRule.conversionRate.configs`\n | `earningRule.conversionRate.configs.${number}.moneyAmount`\n | `earningRule.conversionRate.configs.${number}.points`\n | `earningRule.sourceAppId`\n | `earningRule.triggerAppId`\n | `earningRule.triggerActivityType`\n | `earningRule.title`\n | `earningRule.status`\n | `earningRule.metadata.canBeDeleted`\n | `earningRule.triggerFilters`\n | `earningRule.triggerFilters.${number}.fieldKey`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n type: type,\n earningRule: options?.earningRule,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.createCustomLoyaltyEarningRule(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n type: '$[0]',\n earningRule: '$[1].earningRule',\n },\n singleArgumentUnchanged: false,\n },\n ['type', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateCustomLoyaltyEarningRuleOptions {\n /** Custom earning rule to create. */\n earningRule?: CustomLoyaltyEarningRule;\n}\n\n/**\n * Retrieves a specified non-automated earning rule.\n *\n * To retrieve both automated and non-automated earning rules, call List Earning Rules.\n * @param _id - ID of the earning rule to retrieve.\n * @public\n * @requiredField _id\n * @permissionId LOYALTY.READ_EARNING_RULES\n * @applicableIdentity APP\n * @returns Retrieved earning rule.\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule\n */\nexport async function getLoyaltyEarningRule(\n _id: string\n): Promise<\n NonNullablePaths<\n LoyaltyEarningRule,\n | `fixedAmount.configs`\n | `fixedAmount.configs.${number}.points`\n | `conversionRate.configs`\n | `conversionRate.configs.${number}.moneyAmount`\n | `conversionRate.configs.${number}.points`\n | `sourceAppId`\n | `triggerAppId`\n | `triggerActivityType`\n | `title`\n | `status`\n | `metadata.canBeDeleted`\n | `triggerFilters`\n | `triggerFilters.${number}.fieldKey`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.getLoyaltyEarningRule(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.earningRule!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates an earning rule.\n *\n * Supports partial updates.\n *\n * Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,\n * the current `revision` must be passed when updating the earning rule.\n * @param _id - Loyalty earning rule ID.\n * @public\n * @requiredField _id\n * @requiredField earningRule\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule\n */\nexport async function updateLoyaltyEarningRule(\n _id: string,\n earningRule: UpdateLoyaltyEarningRule\n): Promise<\n NonNullablePaths<\n UpdateLoyaltyEarningRuleResponse,\n | `earningRule.fixedAmount.configs`\n | `earningRule.fixedAmount.configs.${number}.points`\n | `earningRule.conversionRate.configs`\n | `earningRule.conversionRate.configs.${number}.moneyAmount`\n | `earningRule.conversionRate.configs.${number}.points`\n | `earningRule.sourceAppId`\n | `earningRule.triggerAppId`\n | `earningRule.triggerActivityType`\n | `earningRule.title`\n | `earningRule.status`\n | `earningRule.metadata.canBeDeleted`\n | `earningRule.triggerFilters`\n | `earningRule.triggerFilters.${number}.fieldKey`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n earningRule: { ...earningRule, id: _id },\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.updateLoyaltyEarningRule(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { earningRule: '$[1]' },\n explicitPathsToArguments: { 'earningRule.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'earningRule']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateLoyaltyEarningRule {\n /** Fixed amount of points awarded for each qualifying activity. */\n fixedAmount?: FixedAmount;\n /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */\n conversionRate?: ConversionRate;\n /**\n * Loyalty earning rule ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.\n * @format GUID\n */\n sourceAppId?: string;\n /**\n * ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.\n * @minLength 1\n * @maxLength 80\n */\n triggerAppId?: string;\n /**\n * Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.\n * @minLength 1\n * @maxLength 80\n */\n triggerActivityType?: string;\n /**\n * Name of the earning rule.\n * @minLength 1\n * @maxLength 50\n */\n title?: string;\n /** Current status of the earning rule. */\n status?: StatusWithLiterals;\n /**\n * Revision number, incremented by 1 each time the earning rule is updated.\n * Pass the latest `revision` when updating to prevent conflicting changes.\n */\n revision?: string | null;\n /**\n * Date and time the earning rule was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the earning rule was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Additional metadata about the earning rule.\n * @readonly\n */\n metadata?: Metadata;\n /**\n * Trigger filters parsed from automation configuration. Only present for automation-based rules with filters.\n * @readonly\n * @maxSize 100\n */\n triggerFilters?: AutomationTriggerFilter[];\n}\n\n/**\n * Deletes a non-automated earning rule.\n *\n * To delete an automated earning rule, call\n * Delete Automation Earning Rule.\n *\n * To update an earning rule's status instead of deleting it, call\n * Update Loyalty Earning Rule.\n * @param _id - ID of the earning rule to delete.\n * @public\n * @requiredField _id\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule\n */\nexport async function deleteLoyaltyEarningRule(\n _id: string,\n options?: DeleteLoyaltyEarningRuleOptions\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n id: _id,\n revision: options?.revision,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.deleteLoyaltyEarningRule(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]', revision: '$[1].revision' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteLoyaltyEarningRuleOptions {\n /**\n * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.\n * Pass the latest `revision` when updating to prevent conflicting changes.\n */\n revision?: string;\n}\n\n/**\n * Deletes a custom automated earning rule.\n * Pre-installed automated rules can only be paused, not deleted.\n *\n * To update an earning rule's status instead of deleting it, call\n * Update Loyalty Earning Rule.\n *\n * To delete a non-automated earning rule, call\n * Delete Loyalty Earning Rule.\n * @param _id - ID of the earning rule to delete.\n * @public\n * @requiredField _id\n * @permissionId LOYALTY.MANAGE_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule\n */\nexport async function deleteAutomationEarningRule(_id: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.deleteAutomationEarningRule(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { id: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of earning rules.\n *\n * Returns both automated and non-automated earning rules.\n *\n * You can filter the results by `triggerAppId` or `triggerActivityType`.\n * @public\n * @permissionId LOYALTY.READ_EARNING_RULES\n * @applicableIdentity APP\n * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules\n */\nexport async function listEarningRules(\n options?: ListEarningRulesOptions\n): Promise<\n NonNullablePaths<\n ListEarningRulesResponse,\n | `earningRules`\n | `earningRules.${number}.sourceAppId`\n | `earningRules.${number}.triggerAppId`\n | `earningRules.${number}.triggerActivityType`\n | `earningRules.${number}.title`\n | `earningRules.${number}.status`\n | `earningRules.${number}.metadata.canBeDeleted`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n triggerAppId: options?.triggerAppId,\n triggerActivityType: options?.triggerActivityType,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.listEarningRules(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n triggerAppId: '$[0].triggerAppId',\n triggerActivityType: '$[0].triggerActivityType',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListEarningRulesOptions {\n /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */\n triggerAppId?: string | null;\n /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */\n triggerActivityType?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n '*.pub.wix-code.com': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/loyalty-earning-rules',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/loyalty-earning-rules',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_earning-rules';\n\n/**\n * Creates a non-automated earning rule.\n *\n * >**Note**: You can only create non-automated earning rules from a supported list.\n * For the supported list of services, see the Introduction.\n */\nexport function createLoyaltyEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __createLoyaltyEarningRule({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createLoyaltyEarningRule;\n}\n\n/**\n * Creates multiple non-automated earning rules.\n *\n * >**Note**: You can only create non-automated earning rules from a supported list.\n * For the supported list of services, see the Introduction.\n */\nexport function bulkCreateLoyaltyEarningRules(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCreateLoyaltyEarningRules({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'earningRules.createdDate' },\n { path: 'earningRules.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/bulk/earning-rules/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateLoyaltyEarningRules;\n}\n\n/**\n * Creates a custom automated earning rule.\n *\n * To learn more about the automated rules, see the Introduction.\n */\nexport function createCustomLoyaltyEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __createCustomLoyaltyEarningRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules/custom',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createCustomLoyaltyEarningRule;\n}\n\n/**\n * Retrieves a specified non-automated earning rule.\n *\n * To retrieve both automated and non-automated earning rules, call List Earning Rules.\n */\nexport function getLoyaltyEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __getLoyaltyEarningRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLoyaltyEarningRule;\n}\n\n/**\n * Updates an earning rule.\n *\n * Supports partial updates.\n *\n * Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,\n * the current `revision` must be passed when updating the earning rule.\n */\nexport function updateLoyaltyEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateLoyaltyEarningRule({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules/{earningRule.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'earningRule.createdDate' },\n { path: 'earningRule.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateLoyaltyEarningRule;\n}\n\n/**\n * Deletes a non-automated earning rule.\n *\n * To delete an automated earning rule, call\n * Delete Automation Earning Rule.\n *\n * To update an earning rule's status instead of deleting it, call\n * Update Loyalty Earning Rule.\n */\nexport function deleteLoyaltyEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLoyaltyEarningRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLoyaltyEarningRule;\n}\n\n/**\n * Deletes a custom automated earning rule.\n * Pre-installed automated rules can only be paused, not deleted.\n *\n * To update an earning rule's status instead of deleting it, call\n * Update Loyalty Earning Rule.\n *\n * To delete a non-automated earning rule, call\n * Delete Loyalty Earning Rule.\n */\nexport function deleteAutomationEarningRule(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteAutomationEarningRule({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'DELETE' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/automation-earning-rules/{id}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteAutomationEarningRule;\n}\n\n/**\n * Retrieves a list of earning rules.\n *\n * Returns both automated and non-automated earning rules.\n *\n * You can filter the results by `triggerAppId` or `triggerActivityType`.\n */\nexport function listEarningRules(payload: object): RequestOptionsFactory<any> {\n function __listEarningRules({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.v1.loyalty_earning_rule',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressLoyaltyEarningruleLoyaltyEarningRulesUrl({\n protoPath: '/v1/earning-rules/rules',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'earningRules.createdDate' },\n { path: 'earningRules.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listEarningRules;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uCAAAA;AAAA,EAAA,sCAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,2DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAA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iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["bulkCreateLoyaltyEarningRules","createCustomLoyaltyEarningRule","createLoyaltyEarningRule","deleteAutomationEarningRule","deleteLoyaltyEarningRule","getLoyaltyEarningRule","listEarningRules","updateLoyaltyEarningRule","import_timestamp","import_rest_modules","payload","Status","LoyaltyEarningRuleTypeTagType","Type","V1Type","WebhookIdentityType","createLoyaltyEarningRule","sdkTransformError","bulkCreateLoyaltyEarningRules","createCustomLoyaltyEarningRule","getLoyaltyEarningRule","updateLoyaltyEarningRule","deleteLoyaltyEarningRule","deleteAutomationEarningRule","listEarningRules"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -61,6 +61,12 @@ interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
|
|
|
61
61
|
* @readonly
|
|
62
62
|
*/
|
|
63
63
|
metadata?: Metadata;
|
|
64
|
+
/**
|
|
65
|
+
* Trigger filters parsed from automation configuration. Only present for automation-based rules with filters.
|
|
66
|
+
* @readonly
|
|
67
|
+
* @maxSize 100
|
|
68
|
+
*/
|
|
69
|
+
triggerFilters?: AutomationTriggerFilter[];
|
|
64
70
|
}
|
|
65
71
|
/** @oneof */
|
|
66
72
|
interface LoyaltyEarningRuleTypeOneOf {
|
|
@@ -162,6 +168,19 @@ declare enum LoyaltyEarningRuleTypeTagType {
|
|
|
162
168
|
}
|
|
163
169
|
/** @enumType */
|
|
164
170
|
type LoyaltyEarningRuleTypeTagTypeWithLiterals = LoyaltyEarningRuleTypeTagType | 'UNKNOWN_TYPE' | 'BIRTHDAY';
|
|
171
|
+
interface AutomationTriggerFilter {
|
|
172
|
+
/**
|
|
173
|
+
* Key identifying the field in the trigger payload (e.g., "service_id", "eventId", "programId").
|
|
174
|
+
* @maxLength 110
|
|
175
|
+
*/
|
|
176
|
+
fieldKey?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Parsed entity IDs that the filter matches against.
|
|
179
|
+
* @maxLength 256
|
|
180
|
+
* @maxSize 100
|
|
181
|
+
*/
|
|
182
|
+
values?: string[];
|
|
183
|
+
}
|
|
165
184
|
interface CacheInvalidated {
|
|
166
185
|
}
|
|
167
186
|
interface EarningRuleDisabled {
|
|
@@ -227,15 +246,13 @@ interface CreateCustomLoyaltyEarningRuleRequest {
|
|
|
227
246
|
earningRule?: CustomLoyaltyEarningRule;
|
|
228
247
|
}
|
|
229
248
|
declare enum Type {
|
|
230
|
-
/** Unknown type. This value is not used. */
|
|
231
|
-
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
232
249
|
/** Earning rule for social media. */
|
|
233
250
|
SOCIAL_MEDIA = "SOCIAL_MEDIA",
|
|
234
251
|
/** Earning rule for birthdays. */
|
|
235
252
|
BIRTHDAY = "BIRTHDAY"
|
|
236
253
|
}
|
|
237
254
|
/** @enumType */
|
|
238
|
-
type TypeWithLiterals = Type | '
|
|
255
|
+
type TypeWithLiterals = Type | 'SOCIAL_MEDIA' | 'BIRTHDAY';
|
|
239
256
|
/** Used in CreateCustomLoyaltyEarningRuleRequest */
|
|
240
257
|
interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
|
|
241
258
|
/** Fixed amount of points awarded for each qualifying activity. */
|
|
@@ -567,4 +584,4 @@ declare function deleteAutomationEarningRule(): __PublicMethodMetaInfo<'DELETE',
|
|
|
567
584
|
}, DeleteAutomationEarningRuleRequest$1, DeleteAutomationEarningRuleRequest, DeleteAutomationEarningRuleResponse$1, DeleteAutomationEarningRuleResponse>;
|
|
568
585
|
declare function listEarningRules(): __PublicMethodMetaInfo<'GET', {}, ListEarningRulesRequest$1, ListEarningRulesRequest, ListEarningRulesResponse$1, ListEarningRulesResponse>;
|
|
569
586
|
|
|
570
|
-
export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type AppInstallationInLoyaltySite as AppInstallationInLoyaltySiteOriginal, type ApplicationError as ApplicationErrorOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCreateLoyaltyEarningRulesRequest as BulkCreateLoyaltyEarningRulesRequestOriginal, type BulkCreateLoyaltyEarningRulesResponse as BulkCreateLoyaltyEarningRulesResponseOriginal, type BulkLoyaltyEarningRuleResult as BulkLoyaltyEarningRuleResultOriginal, type CacheInvalidated as CacheInvalidatedOriginal, type ConversionRateConfig as ConversionRateConfigOriginal, type ConversionRate as ConversionRateOriginal, type CreateCustomLoyaltyEarningRuleRequest as CreateCustomLoyaltyEarningRuleRequestOriginal, type CreateCustomLoyaltyEarningRuleResponse as CreateCustomLoyaltyEarningRuleResponseOriginal, type CreateLoyaltyEarningRuleRequest as CreateLoyaltyEarningRuleRequestOriginal, type CreateLoyaltyEarningRuleResponse as CreateLoyaltyEarningRuleResponseOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type CustomLoyaltyEarningRule as CustomLoyaltyEarningRuleOriginal, type CustomLoyaltyEarningRuleTypeOneOf as CustomLoyaltyEarningRuleTypeOneOfOriginal, type DeleteAutomationEarningRuleRequest as DeleteAutomationEarningRuleRequestOriginal, type DeleteAutomationEarningRuleResponse as DeleteAutomationEarningRuleResponseOriginal, type DeleteLoyaltyEarningRuleRequest as DeleteLoyaltyEarningRuleRequestOriginal, type DeleteLoyaltyEarningRuleResponse as DeleteLoyaltyEarningRuleResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EarningRuleDisabled as EarningRuleDisabledOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type FixedAmountConfig as FixedAmountConfigOriginal, type FixedAmount as FixedAmountOriginal, type GetLoyaltyEarningRuleRequest as GetLoyaltyEarningRuleRequestOriginal, type GetLoyaltyEarningRuleResponse as GetLoyaltyEarningRuleResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type InvalidateEarningRuleCacheRequest as InvalidateEarningRuleCacheRequestOriginal, type InvalidateEarningRuleCacheResponse as InvalidateEarningRuleCacheResponseOriginal, type ItemMetadata as ItemMetadataOriginal, type ListEarningRulesInTierRequest as ListEarningRulesInTierRequestOriginal, type ListEarningRulesInTierResponse as ListEarningRulesInTierResponseOriginal, type ListEarningRulesRequest as ListEarningRulesRequestOriginal, type ListEarningRulesResponse as ListEarningRulesResponseOriginal, type LoyaltyEarningRule as LoyaltyEarningRuleOriginal, type LoyaltyEarningRuleTypeOneOf as LoyaltyEarningRuleTypeOneOfOriginal, type LoyaltyEarningRuleTypeTag as LoyaltyEarningRuleTypeTagOriginal, LoyaltyEarningRuleTypeTagType as LoyaltyEarningRuleTypeTagTypeOriginal, type LoyaltyEarningRuleTypeTagTypeWithLiterals as LoyaltyEarningRuleTypeTagTypeWithLiteralsOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Metadata as MetadataOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type RestoreInfo as RestoreInfoOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, type UpdateLoyaltyEarningRuleRequest as UpdateLoyaltyEarningRuleRequestOriginal, type UpdateLoyaltyEarningRuleResponse as UpdateLoyaltyEarningRuleResponseOriginal, V1Type as V1TypeOriginal, type V1TypeWithLiterals as V1TypeWithLiteralsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkCreateLoyaltyEarningRules, createCustomLoyaltyEarningRule, createLoyaltyEarningRule, deleteAutomationEarningRule, deleteLoyaltyEarningRule, getLoyaltyEarningRule, listEarningRules, updateLoyaltyEarningRule };
|
|
587
|
+
export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type AppInstallationInLoyaltySite as AppInstallationInLoyaltySiteOriginal, type ApplicationError as ApplicationErrorOriginal, type AutomationTriggerFilter as AutomationTriggerFilterOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkCreateLoyaltyEarningRulesRequest as BulkCreateLoyaltyEarningRulesRequestOriginal, type BulkCreateLoyaltyEarningRulesResponse as BulkCreateLoyaltyEarningRulesResponseOriginal, type BulkLoyaltyEarningRuleResult as BulkLoyaltyEarningRuleResultOriginal, type CacheInvalidated as CacheInvalidatedOriginal, type ConversionRateConfig as ConversionRateConfigOriginal, type ConversionRate as ConversionRateOriginal, type CreateCustomLoyaltyEarningRuleRequest as CreateCustomLoyaltyEarningRuleRequestOriginal, type CreateCustomLoyaltyEarningRuleResponse as CreateCustomLoyaltyEarningRuleResponseOriginal, type CreateLoyaltyEarningRuleRequest as CreateLoyaltyEarningRuleRequestOriginal, type CreateLoyaltyEarningRuleResponse as CreateLoyaltyEarningRuleResponseOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type CustomLoyaltyEarningRule as CustomLoyaltyEarningRuleOriginal, type CustomLoyaltyEarningRuleTypeOneOf as CustomLoyaltyEarningRuleTypeOneOfOriginal, type DeleteAutomationEarningRuleRequest as DeleteAutomationEarningRuleRequestOriginal, type DeleteAutomationEarningRuleResponse as DeleteAutomationEarningRuleResponseOriginal, type DeleteLoyaltyEarningRuleRequest as DeleteLoyaltyEarningRuleRequestOriginal, type DeleteLoyaltyEarningRuleResponse as DeleteLoyaltyEarningRuleResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EarningRuleDisabled as EarningRuleDisabledOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type FixedAmountConfig as FixedAmountConfigOriginal, type FixedAmount as FixedAmountOriginal, type GetLoyaltyEarningRuleRequest as GetLoyaltyEarningRuleRequestOriginal, type GetLoyaltyEarningRuleResponse as GetLoyaltyEarningRuleResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type InvalidateEarningRuleCacheRequest as InvalidateEarningRuleCacheRequestOriginal, type InvalidateEarningRuleCacheResponse as InvalidateEarningRuleCacheResponseOriginal, type ItemMetadata as ItemMetadataOriginal, type ListEarningRulesInTierRequest as ListEarningRulesInTierRequestOriginal, type ListEarningRulesInTierResponse as ListEarningRulesInTierResponseOriginal, type ListEarningRulesRequest as ListEarningRulesRequestOriginal, type ListEarningRulesResponse as ListEarningRulesResponseOriginal, type LoyaltyEarningRule as LoyaltyEarningRuleOriginal, type LoyaltyEarningRuleTypeOneOf as LoyaltyEarningRuleTypeOneOfOriginal, type LoyaltyEarningRuleTypeTag as LoyaltyEarningRuleTypeTagOriginal, LoyaltyEarningRuleTypeTagType as LoyaltyEarningRuleTypeTagTypeOriginal, type LoyaltyEarningRuleTypeTagTypeWithLiterals as LoyaltyEarningRuleTypeTagTypeWithLiteralsOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Metadata as MetadataOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type RestoreInfo as RestoreInfoOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, type UpdateLoyaltyEarningRuleRequest as UpdateLoyaltyEarningRuleRequestOriginal, type UpdateLoyaltyEarningRuleResponse as UpdateLoyaltyEarningRuleResponseOriginal, V1Type as V1TypeOriginal, type V1TypeWithLiterals as V1TypeWithLiteralsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, bulkCreateLoyaltyEarningRules, createCustomLoyaltyEarningRule, createLoyaltyEarningRule, deleteAutomationEarningRule, deleteLoyaltyEarningRule, getLoyaltyEarningRule, listEarningRules, updateLoyaltyEarningRule };
|
package/build/cjs/meta.js
CHANGED
|
@@ -377,7 +377,6 @@ var LoyaltyEarningRuleTypeTagType = /* @__PURE__ */ ((LoyaltyEarningRuleTypeTagT
|
|
|
377
377
|
return LoyaltyEarningRuleTypeTagType2;
|
|
378
378
|
})(LoyaltyEarningRuleTypeTagType || {});
|
|
379
379
|
var Type = /* @__PURE__ */ ((Type2) => {
|
|
380
|
-
Type2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
381
380
|
Type2["SOCIAL_MEDIA"] = "SOCIAL_MEDIA";
|
|
382
381
|
Type2["BIRTHDAY"] = "BIRTHDAY";
|
|
383
382
|
return Type2;
|