@wix/auto_sdk_loyalty_earning-rules 1.0.33 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +5 -5
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +5 -5
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +5 -5
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +5 -5
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +5 -5
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +5 -5
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +5 -5
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +5 -5
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/loyalty-v1-loyalty-earning-rule-earning-rules.http.ts","../../src/loyalty-v1-loyalty-earning-rule-earning-rules.types.ts","../../src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.ts"],"sourcesContent":["export * from './src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js';\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","/**\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\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 entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: 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}\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 AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\n}\n","import * as ambassadorWixLoyaltyV1LoyaltyEarningRule from './loyalty-v1-loyalty-earning-rule-earning-rules.http.js';\nimport * as ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes from './loyalty-v1-loyalty-earning-rule-earning-rules.types.js';\nimport * as ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes from './loyalty-v1-loyalty-earning-rule-earning-rules.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createLoyaltyEarningRule(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.CreateLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.CreateLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.CreateLoyaltyEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.CreateLoyaltyEarningRuleResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.createLoyaltyEarningRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/earning-rules',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkCreateLoyaltyEarningRules(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.BulkCreateLoyaltyEarningRulesRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.BulkCreateLoyaltyEarningRulesRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.BulkCreateLoyaltyEarningRulesResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.BulkCreateLoyaltyEarningRulesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.bulkCreateLoyaltyEarningRules(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/earning-rules/create',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createCustomLoyaltyEarningRule(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.CreateCustomLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.CreateCustomLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.CreateCustomLoyaltyEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.CreateCustomLoyaltyEarningRuleResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.createCustomLoyaltyEarningRule(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/earning-rules/custom',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getLoyaltyEarningRule(): __PublicMethodMetaInfo<\n 'GET',\n { id: string },\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.GetLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.GetLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.GetLoyaltyEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.GetLoyaltyEarningRuleResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.getLoyaltyEarningRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/earning-rules/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateLoyaltyEarningRule(): __PublicMethodMetaInfo<\n 'PUT',\n { earningRuleId: string },\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.UpdateLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.UpdateLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.UpdateLoyaltyEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.UpdateLoyaltyEarningRuleResponse\n> {\n const payload = { earningRule: { id: ':earningRuleId' } } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.updateLoyaltyEarningRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PUT',\n path: '/v1/earning-rules/{earningRule.id}',\n pathParams: { earningRuleId: 'earningRuleId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteLoyaltyEarningRule(): __PublicMethodMetaInfo<\n 'DELETE',\n { id: string },\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.DeleteLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.DeleteLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.DeleteLoyaltyEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.DeleteLoyaltyEarningRuleResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.deleteLoyaltyEarningRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/earning-rules/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteAutomationEarningRule(): __PublicMethodMetaInfo<\n 'DELETE',\n { id: string },\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.DeleteAutomationEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.DeleteAutomationEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.DeleteAutomationEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.DeleteAutomationEarningRuleResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.deleteAutomationEarningRule(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/automation-earning-rules/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function listEarningRules(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.ListEarningRulesRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.ListEarningRulesRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.ListEarningRulesResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.ListEarningRulesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.listEarningRules(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/earning-rules/rules',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n LoyaltyEarningRule as LoyaltyEarningRuleOriginal,\n LoyaltyEarningRuleTypeOneOf as LoyaltyEarningRuleTypeOneOfOriginal,\n FixedAmount as FixedAmountOriginal,\n FixedAmountConfig as FixedAmountConfigOriginal,\n ConversionRate as ConversionRateOriginal,\n ConversionRateConfig as ConversionRateConfigOriginal,\n Status as StatusOriginal,\n StatusWithLiterals as StatusWithLiteralsOriginal,\n Metadata as MetadataOriginal,\n LoyaltyEarningRuleTypeTag as LoyaltyEarningRuleTypeTagOriginal,\n LoyaltyEarningRuleTypeTagType as LoyaltyEarningRuleTypeTagTypeOriginal,\n LoyaltyEarningRuleTypeTagTypeWithLiterals as LoyaltyEarningRuleTypeTagTypeWithLiteralsOriginal,\n CacheInvalidated as CacheInvalidatedOriginal,\n EarningRuleDisabled as EarningRuleDisabledOriginal,\n CreateLoyaltyEarningRuleRequest as CreateLoyaltyEarningRuleRequestOriginal,\n CreateLoyaltyEarningRuleResponse as CreateLoyaltyEarningRuleResponseOriginal,\n BulkCreateLoyaltyEarningRulesRequest as BulkCreateLoyaltyEarningRulesRequestOriginal,\n BulkCreateLoyaltyEarningRulesResponse as BulkCreateLoyaltyEarningRulesResponseOriginal,\n BulkLoyaltyEarningRuleResult as BulkLoyaltyEarningRuleResultOriginal,\n ItemMetadata as ItemMetadataOriginal,\n ApplicationError as ApplicationErrorOriginal,\n BulkActionMetadata as BulkActionMetadataOriginal,\n CreateCustomLoyaltyEarningRuleRequest as CreateCustomLoyaltyEarningRuleRequestOriginal,\n Type as TypeOriginal,\n TypeWithLiterals as TypeWithLiteralsOriginal,\n CustomLoyaltyEarningRule as CustomLoyaltyEarningRuleOriginal,\n CustomLoyaltyEarningRuleTypeOneOf as CustomLoyaltyEarningRuleTypeOneOfOriginal,\n CreateCustomLoyaltyEarningRuleResponse as CreateCustomLoyaltyEarningRuleResponseOriginal,\n GetLoyaltyEarningRuleRequest as GetLoyaltyEarningRuleRequestOriginal,\n GetLoyaltyEarningRuleResponse as GetLoyaltyEarningRuleResponseOriginal,\n UpdateLoyaltyEarningRuleRequest as UpdateLoyaltyEarningRuleRequestOriginal,\n UpdateLoyaltyEarningRuleResponse as UpdateLoyaltyEarningRuleResponseOriginal,\n DeleteLoyaltyEarningRuleRequest as DeleteLoyaltyEarningRuleRequestOriginal,\n DeleteLoyaltyEarningRuleResponse as DeleteLoyaltyEarningRuleResponseOriginal,\n DeleteAutomationEarningRuleRequest as DeleteAutomationEarningRuleRequestOriginal,\n DeleteAutomationEarningRuleResponse as DeleteAutomationEarningRuleResponseOriginal,\n ListEarningRulesRequest as ListEarningRulesRequestOriginal,\n ListEarningRulesResponse as ListEarningRulesResponseOriginal,\n ListEarningRulesInTierRequest as ListEarningRulesInTierRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n ListEarningRulesInTierResponse as ListEarningRulesInTierResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n InvalidateEarningRuleCacheRequest as InvalidateEarningRuleCacheRequestOriginal,\n InvalidateEarningRuleCacheResponse as InvalidateEarningRuleCacheResponseOriginal,\n AppInstallationInLoyaltySite as AppInstallationInLoyaltySiteOriginal,\n V1Type as V1TypeOriginal,\n V1TypeWithLiterals as V1TypeWithLiteralsOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountDetails as AccountDetailsOriginal,\n} from './loyalty-v1-loyalty-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ningRules","createCustomLoyaltyEarningRule","createLoyaltyEarningRule","deleteAutomationEarningRule","deleteLoyaltyEarningRule","getLoyaltyEarningRule","listEarningRules","updateLoyaltyEarningRule","import_timestamp","import_rest_modules","payload","Status","LoyaltyEarningRuleTypeTagType","Type","V1Type","WebhookIdentityType","createLoyaltyEarningRule","bulkCreateLoyaltyEarningRules","createCustomLoyaltyEarningRule","getLoyaltyEarningRule","updateLoyaltyEarningRule","deleteLoyaltyEarningRule","deleteAutomationEarningRule","listEarningRules"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/loyalty-v1-loyalty-earning-rule-earning-rules.http.ts","../../src/loyalty-v1-loyalty-earning-rule-earning-rules.types.ts","../../src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.ts"],"sourcesContent":["export * from './src/loyalty-v1-loyalty-earning-rule-earning-rules.meta.js';\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","/**\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\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 entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: 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}\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","import * as ambassadorWixLoyaltyV1LoyaltyEarningRule from './loyalty-v1-loyalty-earning-rule-earning-rules.http.js';\nimport * as ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes from './loyalty-v1-loyalty-earning-rule-earning-rules.types.js';\nimport * as ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes from './loyalty-v1-loyalty-earning-rule-earning-rules.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createLoyaltyEarningRule(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.CreateLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.CreateLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.CreateLoyaltyEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.CreateLoyaltyEarningRuleResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.createLoyaltyEarningRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/earning-rules',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function bulkCreateLoyaltyEarningRules(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.BulkCreateLoyaltyEarningRulesRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.BulkCreateLoyaltyEarningRulesRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.BulkCreateLoyaltyEarningRulesResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.BulkCreateLoyaltyEarningRulesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.bulkCreateLoyaltyEarningRules(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/bulk/earning-rules/create',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createCustomLoyaltyEarningRule(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.CreateCustomLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.CreateCustomLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.CreateCustomLoyaltyEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.CreateCustomLoyaltyEarningRuleResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.createCustomLoyaltyEarningRule(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/earning-rules/custom',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getLoyaltyEarningRule(): __PublicMethodMetaInfo<\n 'GET',\n { id: string },\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.GetLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.GetLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.GetLoyaltyEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.GetLoyaltyEarningRuleResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.getLoyaltyEarningRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/earning-rules/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateLoyaltyEarningRule(): __PublicMethodMetaInfo<\n 'PUT',\n { earningRuleId: string },\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.UpdateLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.UpdateLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.UpdateLoyaltyEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.UpdateLoyaltyEarningRuleResponse\n> {\n const payload = { earningRule: { id: ':earningRuleId' } } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.updateLoyaltyEarningRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PUT',\n path: '/v1/earning-rules/{earningRule.id}',\n pathParams: { earningRuleId: 'earningRuleId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteLoyaltyEarningRule(): __PublicMethodMetaInfo<\n 'DELETE',\n { id: string },\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.DeleteLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.DeleteLoyaltyEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.DeleteLoyaltyEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.DeleteLoyaltyEarningRuleResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.deleteLoyaltyEarningRule(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/earning-rules/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteAutomationEarningRule(): __PublicMethodMetaInfo<\n 'DELETE',\n { id: string },\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.DeleteAutomationEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.DeleteAutomationEarningRuleRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.DeleteAutomationEarningRuleResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.DeleteAutomationEarningRuleResponse\n> {\n const payload = { id: ':id' } as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.deleteAutomationEarningRule(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/automation-earning-rules/{id}',\n pathParams: { id: 'id' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function listEarningRules(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.ListEarningRulesRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.ListEarningRulesRequest,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleUniversalTypes.ListEarningRulesResponse,\n ambassadorWixLoyaltyV1LoyaltyEarningRuleTypes.ListEarningRulesResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixLoyaltyV1LoyaltyEarningRule.listEarningRules(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/earning-rules/rules',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n LoyaltyEarningRule as LoyaltyEarningRuleOriginal,\n LoyaltyEarningRuleTypeOneOf as LoyaltyEarningRuleTypeOneOfOriginal,\n FixedAmount as FixedAmountOriginal,\n FixedAmountConfig as FixedAmountConfigOriginal,\n ConversionRate as ConversionRateOriginal,\n ConversionRateConfig as ConversionRateConfigOriginal,\n Status as StatusOriginal,\n StatusWithLiterals as StatusWithLiteralsOriginal,\n Metadata as MetadataOriginal,\n LoyaltyEarningRuleTypeTag as LoyaltyEarningRuleTypeTagOriginal,\n LoyaltyEarningRuleTypeTagType as LoyaltyEarningRuleTypeTagTypeOriginal,\n LoyaltyEarningRuleTypeTagTypeWithLiterals as LoyaltyEarningRuleTypeTagTypeWithLiteralsOriginal,\n CacheInvalidated as CacheInvalidatedOriginal,\n EarningRuleDisabled as EarningRuleDisabledOriginal,\n CreateLoyaltyEarningRuleRequest as CreateLoyaltyEarningRuleRequestOriginal,\n CreateLoyaltyEarningRuleResponse as CreateLoyaltyEarningRuleResponseOriginal,\n BulkCreateLoyaltyEarningRulesRequest as BulkCreateLoyaltyEarningRulesRequestOriginal,\n BulkCreateLoyaltyEarningRulesResponse as BulkCreateLoyaltyEarningRulesResponseOriginal,\n BulkLoyaltyEarningRuleResult as BulkLoyaltyEarningRuleResultOriginal,\n ItemMetadata as ItemMetadataOriginal,\n ApplicationError as ApplicationErrorOriginal,\n BulkActionMetadata as BulkActionMetadataOriginal,\n CreateCustomLoyaltyEarningRuleRequest as CreateCustomLoyaltyEarningRuleRequestOriginal,\n Type as TypeOriginal,\n TypeWithLiterals as TypeWithLiteralsOriginal,\n CustomLoyaltyEarningRule as CustomLoyaltyEarningRuleOriginal,\n CustomLoyaltyEarningRuleTypeOneOf as CustomLoyaltyEarningRuleTypeOneOfOriginal,\n CreateCustomLoyaltyEarningRuleResponse as CreateCustomLoyaltyEarningRuleResponseOriginal,\n GetLoyaltyEarningRuleRequest as GetLoyaltyEarningRuleRequestOriginal,\n GetLoyaltyEarningRuleResponse as GetLoyaltyEarningRuleResponseOriginal,\n UpdateLoyaltyEarningRuleRequest as UpdateLoyaltyEarningRuleRequestOriginal,\n UpdateLoyaltyEarningRuleResponse as UpdateLoyaltyEarningRuleResponseOriginal,\n DeleteLoyaltyEarningRuleRequest as DeleteLoyaltyEarningRuleRequestOriginal,\n DeleteLoyaltyEarningRuleResponse as DeleteLoyaltyEarningRuleResponseOriginal,\n DeleteAutomationEarningRuleRequest as DeleteAutomationEarningRuleRequestOriginal,\n DeleteAutomationEarningRuleResponse as DeleteAutomationEarningRuleResponseOriginal,\n ListEarningRulesRequest as ListEarningRulesRequestOriginal,\n ListEarningRulesResponse as ListEarningRulesResponseOriginal,\n ListEarningRulesInTierRequest as ListEarningRulesInTierRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n ListEarningRulesInTierResponse as ListEarningRulesInTierResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n InvalidateEarningRuleCacheRequest as InvalidateEarningRuleCacheRequestOriginal,\n InvalidateEarningRuleCacheResponse as InvalidateEarningRuleCacheResponseOriginal,\n AppInstallationInLoyaltySite as AppInstallationInLoyaltySiteOriginal,\n V1Type as V1TypeOriginal,\n V1TypeWithLiterals as V1TypeWithLiteralsOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n} from './loyalty-v1-loyalty-earning-rule-earning-rules.types.js';\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,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,MAC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AEO,SAASC,+BAOd;AACA,QAAM,UAAU,EAAE,IAAI,MAAM;AAE5B,QAAM,oBACqC;AAAA,IACvC;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,IAAI,KAAK;AAAA,IACvB,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,oBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,iBAAiB,OAAO;AAEnE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["bulkCreateLoyaltyEarningRules","createCustomLoyaltyEarningRule","createLoyaltyEarningRule","deleteAutomationEarningRule","deleteLoyaltyEarningRule","getLoyaltyEarningRule","listEarningRules","updateLoyaltyEarningRule","import_timestamp","import_rest_modules","payload","Status","LoyaltyEarningRuleTypeTagType","Type","V1Type","WebhookIdentityType","createLoyaltyEarningRule","bulkCreateLoyaltyEarningRules","createCustomLoyaltyEarningRule","getLoyaltyEarningRule","updateLoyaltyEarningRule","deleteLoyaltyEarningRule","deleteAutomationEarningRule","listEarningRules"]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
2
|
import { LoyaltyEarningRule, BulkCreateLoyaltyEarningRulesResponse, TypeWithLiterals, CreateCustomLoyaltyEarningRuleOptions, CreateCustomLoyaltyEarningRuleResponse, UpdateLoyaltyEarningRule, UpdateLoyaltyEarningRuleResponse, DeleteLoyaltyEarningRuleOptions, ListEarningRulesOptions, ListEarningRulesResponse, LoyaltyEarningRuleCreatedEnvelope, LoyaltyEarningRuleDeletedEnvelope, LoyaltyEarningRuleUpdatedEnvelope } from './index.typings.mjs';
|
|
3
|
-
export {
|
|
3
|
+
export { AccountInfo, ActionEvent, AppInstallationInLoyaltySite, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateLoyaltyEarningRulesRequest, BulkLoyaltyEarningRuleResult, CacheInvalidated, ConversionRate, ConversionRateConfig, CreateCustomLoyaltyEarningRuleRequest, CreateLoyaltyEarningRuleRequest, CreateLoyaltyEarningRuleResponse, CursorPaging, Cursors, CustomLoyaltyEarningRule, CustomLoyaltyEarningRuleTypeOneOf, DeleteAutomationEarningRuleRequest, DeleteAutomationEarningRuleResponse, DeleteLoyaltyEarningRuleRequest, DeleteLoyaltyEarningRuleResponse, DomainEvent, DomainEventBodyOneOf, EarningRuleDisabled, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, FixedAmount, FixedAmountConfig, GetLoyaltyEarningRuleRequest, GetLoyaltyEarningRuleResponse, IdentificationData, IdentificationDataIdOneOf, InvalidateEarningRuleCacheRequest, InvalidateEarningRuleCacheResponse, ItemMetadata, ListEarningRulesInTierRequest, ListEarningRulesInTierResponse, ListEarningRulesRequest, LoyaltyEarningRuleTypeOneOf, LoyaltyEarningRuleTypeTag, LoyaltyEarningRuleTypeTagType, LoyaltyEarningRuleTypeTagTypeWithLiterals, MessageEnvelope, Metadata, PagingMetadataV2, RestoreInfo, Status, StatusWithLiterals, Type, UpdateLoyaltyEarningRuleRequest, V1Type, V1TypeWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createLoyaltyEarningRule$1(httpClient: HttpClient): CreateLoyaltyEarningRuleSignature;
|
|
6
6
|
interface CreateLoyaltyEarningRuleSignature {
|