From bc8acf23717f999be33e02647ce60a00a8554a71 Mon Sep 17 00:00:00 2001 From: LoyaltyLion CI Date: Sun, 7 Jun 2026 19:31:23 +0000 Subject: [PATCH] chore: update generated files from PR #11481 --- src/types/api.ts | 179 ++++++++++++++++++++++++++++++++++++------- src/types/schemas.ts | 93 ++++++++++++++++++++-- 2 files changed, 237 insertions(+), 35 deletions(-) diff --git a/src/types/api.ts b/src/types/api.ts index fe7e2cf..a0335d8 100644 --- a/src/types/api.ts +++ b/src/types/api.ts @@ -348,7 +348,7 @@ export interface components { */ currency: string; /** @description `ISO 639-1` code indicating the language used for any text in this response */ - language: unknown; + language: string; program: { /** * @description The name of the program @@ -456,7 +456,7 @@ export interface components { /** @description The referee incentive for the program, included only if one is enabled. This is a description of the incentive and does not include an actual voucher code, which is available through the referee incentive endpoint instead */ referee_incentive?: components["schemas"]["RefereeIncentiveCartDiscount"] | components["schemas"]["RefereeIncentiveFreeShipping"]; /** @description Ordered list of rules that belong to this site. Each rule will have one or more variants that indicate its configuration and if it is enabled per tier. Rules have a `kind` property, and some kinds of rules will have `properties` that are specific to that rule kind */ - rules: (components["schemas"]["RuleBirthday"] | components["schemas"]["RuleCollectionPurchase"] | components["schemas"]["RuleNewsletterSignup"] | components["schemas"]["RulePageview"] | components["schemas"]["RuleProductPurchase"] | components["schemas"]["RulePurchase"] | components["schemas"]["RuleJoinProgram"] | components["schemas"]["RuleReview"] | components["schemas"]["RuleCustom"] | components["schemas"]["RuleFacebookLike"] | components["schemas"]["RuleTwitterFollow"] | components["schemas"]["RuleInstagramFollow"] | components["schemas"]["RuleInstagramMention"] | components["schemas"]["RuleInstagramPostHashtag"] | components["schemas"]["RuleTiktokFollow"] | components["schemas"]["RuleTiktokPostHashtag"] | components["schemas"]["RuleReferral"] | components["schemas"]["RuleClickthrough"] | components["schemas"]["RuleRetailPurchase"])[]; + rules: (components["schemas"]["RuleBirthday"] | components["schemas"]["RuleLoyaltyPassInstall"] | components["schemas"]["RuleCollectionPurchase"] | components["schemas"]["RuleNewsletterSignup"] | components["schemas"]["RulePageview"] | components["schemas"]["RuleProductPurchase"] | components["schemas"]["RulePurchase"] | components["schemas"]["RuleJoinProgram"] | components["schemas"]["RuleReview"] | components["schemas"]["RuleCustom"] | components["schemas"]["RuleFacebookLike"] | components["schemas"]["RuleTwitterFollow"] | components["schemas"]["RuleInstagramFollow"] | components["schemas"]["RuleInstagramMention"] | components["schemas"]["RuleInstagramPostHashtag"] | components["schemas"]["RuleTiktokFollow"] | components["schemas"]["RuleTiktokPostHashtag"] | components["schemas"]["RuleReferral"] | components["schemas"]["RuleClickthrough"] | components["schemas"]["RuleRetailPurchase"])[]; /** @description Ordered list of rewards that belong to this site. Each reward will have one or more variants that indicate its configuration and if it is enabled per tier. Rewards have a `kind` property, and some kinds of rewards will have `properties` that are specific to that reward kind */ rewards: (components["schemas"]["RewardGiftCard"] | components["schemas"]["RewardCartDiscountVoucher"] | components["schemas"]["RewardCartVariableDiscountVoucher"] | components["schemas"]["RewardFreeShippingVoucher"] | components["schemas"]["RewardProductDiscountVoucher"] | components["schemas"]["RewardCollectionDiscountVoucher"] | components["schemas"]["RewardProductCart"] | components["schemas"]["RewardActiveSubscriptionDiscountVoucher"] | components["schemas"]["RewardActiveSubscriptionProduct"] | components["schemas"]["RewardCustom"])[]; }; @@ -759,6 +759,41 @@ export interface components { title: string; }; }; + /** Loyalty pass install */ + RuleLoyaltyPassInstall: { + id: number; + /** @description A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer */ + limit: { + /** @description The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week */ + count: number; + /** @description The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times */ + interval: ("day" | "week" | "month" | "year") | null; + } | null; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + kind: "loyalty_pass_install"; + /** @description A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier */ + variants: { + /** @description The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled */ + tier_id: number | null; + /** + * @description Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend' + * @example Make a purchase + */ + title: string; + /** @description Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers */ + enabled: boolean; + /** @description The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher) */ + result: components["schemas"]["RuleResultPoints"] | components["schemas"]["RuleResultReward"]; + /** + * @description Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher' + * @example 5 points per $1 + */ + result_short_text: string; + }[]; + }; /** Collection purchase */ RuleCollectionPurchase: { id: number; @@ -2460,7 +2495,7 @@ export interface components { * * - instead of `variants`, each rule will have a `variant` property, which represents the applicable variant for this customer based on their tier. If there is no applicable enabled variant, the rule will not be included in this list, e.g. if it's disabled for the customer's current tier * - each rule will have a `context` property, which includes information about this customer's interaction with the rule, such as the number of times they have completed it, and if any limit is in effect */ - available_rules: (components["schemas"]["CustomerAvailableRuleBirthday"] | components["schemas"]["CustomerAvailableRuleCollectionPurchase"] | components["schemas"]["CustomerAvailableRuleNewsletterSignup"] | components["schemas"]["CustomerAvailableRulePageview"] | components["schemas"]["CustomerAvailableRuleProductPurchase"] | components["schemas"]["CustomerAvailableRulePurchase"] | components["schemas"]["CustomerAvailableRuleJoinProgram"] | components["schemas"]["CustomerAvailableRuleReview"] | components["schemas"]["CustomerAvailableRuleCustom"] | components["schemas"]["CustomerAvailableRuleFacebookLike"] | components["schemas"]["CustomerAvailableRuleTwitterFollow"] | components["schemas"]["CustomerAvailableRuleInstagramFollow"] | components["schemas"]["CustomerAvailableRuleInstagramMention"] | components["schemas"]["CustomerAvailableRuleInstagramPostHashtag"] | components["schemas"]["CustomerAvailableRuleTiktokFollow"] | components["schemas"]["CustomerAvailableRuleTiktokPostHashtag"] | components["schemas"]["CustomerAvailableRuleReferral"] | components["schemas"]["CustomerAvailableRuleClickthrough"] | components["schemas"]["CustomerAvailableRuleRetailPurchase"])[]; + available_rules: (components["schemas"]["CustomerAvailableRuleBirthday"] | components["schemas"]["CustomerAvailableRuleLoyaltyPassInstall"] | components["schemas"]["CustomerAvailableRuleCollectionPurchase"] | components["schemas"]["CustomerAvailableRuleNewsletterSignup"] | components["schemas"]["CustomerAvailableRulePageview"] | components["schemas"]["CustomerAvailableRuleProductPurchase"] | components["schemas"]["CustomerAvailableRulePurchase"] | components["schemas"]["CustomerAvailableRuleJoinProgram"] | components["schemas"]["CustomerAvailableRuleReview"] | components["schemas"]["CustomerAvailableRuleCustom"] | components["schemas"]["CustomerAvailableRuleFacebookLike"] | components["schemas"]["CustomerAvailableRuleTwitterFollow"] | components["schemas"]["CustomerAvailableRuleInstagramFollow"] | components["schemas"]["CustomerAvailableRuleInstagramMention"] | components["schemas"]["CustomerAvailableRuleInstagramPostHashtag"] | components["schemas"]["CustomerAvailableRuleTiktokFollow"] | components["schemas"]["CustomerAvailableRuleTiktokPostHashtag"] | components["schemas"]["CustomerAvailableRuleReferral"] | components["schemas"]["CustomerAvailableRuleClickthrough"] | components["schemas"]["CustomerAvailableRuleRetailPurchase"])[]; /** @description A list of the most recent actions that have occurred for this customer, such as earning points, redeeming rewards, and joining tiers. This list is sorted by date with the most recent actions at the beginning. * * History actions are not the same as _transactions_. A single action may cover multiple transactions. For example, if points are added and then later voided, it will be represented by a single action whose state will initially be `approved`, and then later change to `void`. This keeps the customer's history concise whilst still showing the key information. */ @@ -3718,6 +3753,50 @@ export interface components { */ resets_at_relative_to_now: string; }; + /** Loyalty pass install */ + CustomerAvailableRuleLoyaltyPassInstall: { + id: number; + /** @description A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer */ + limit: { + /** @description The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week */ + count: number; + /** @description The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times */ + interval: ("day" | "week" | "month" | "year") | null; + } | null; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + kind: "loyalty_pass_install"; + /** @description The rule variant that is applicable to this customer and their tier */ + variant: { + /** @description The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled */ + tier_id: number | null; + /** + * @description Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend' + * @example Make a purchase + */ + title: string; + /** @description Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers */ + enabled: boolean; + /** @description The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher) */ + result: components["schemas"]["RuleResultPoints"] | components["schemas"]["RuleResultReward"]; + /** + * @description Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher' + * @example 5 points per $1 + */ + result_short_text: string; + }; + /** @description Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect */ + context: { + /** @description `ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer */ + last_completed_at: string | null; + /** @description The number of times this rule has been completed by the customer in total */ + completion_count: number; + /** @description An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect */ + completion_limit: components["schemas"]["RuleContextCompletionLimitNoLimit"] | components["schemas"]["RuleContextCompletionLimitLimitNotReached"] | components["schemas"]["RuleContextCompletionLimitLimitReachedForever"] | components["schemas"]["RuleContextCompletionLimitLimitReachedUntilReset"]; + }; + }; /** Collection purchase */ CustomerAvailableRuleCollectionPurchase: { id: number; @@ -4568,7 +4647,7 @@ export interface components { /** @description The ID of the rule whose completion earned the points. If this does not match a `rule` in the current Site Configuration, it means the associated rule has been deleted */ id: number; /** @enum {string} */ - kind: "birthday" | "collection_purchase" | "newsletter_signup" | "pageview" | "product_purchase" | "purchase" | "join_program" | "review" | "custom" | "facebook_like" | "twitter_follow" | "instagram_follow" | "instagram_mention" | "instagram_post_hashtag" | "tiktok_follow" | "tiktok_post_hashtag" | "referral" | "clickthrough" | "retail_purchase"; + kind: "birthday" | "loyalty_pass_install" | "collection_purchase" | "newsletter_signup" | "pageview" | "product_purchase" | "purchase" | "join_program" | "review" | "custom" | "facebook_like" | "twitter_follow" | "instagram_follow" | "instagram_mention" | "instagram_post_hashtag" | "tiktok_follow" | "tiktok_post_hashtag" | "referral" | "clickthrough" | "retail_purchase"; }; /** @description If the state of this action is `pending`, this will be an `ISO 8601` timestamp representing the date at which the points will become approved, unless they are declined in the meantime */ points_will_approve_at: string | null; @@ -4662,7 +4741,9 @@ export interface components { /** @description The ID of the rule whose completion resulted in the reward. If this does not match a `rule` in the current Site Configuration, it means the associated rule has been deleted */ id: number; /** @enum {string} */ - kind: "birthday" | "collection_purchase" | "newsletter_signup" | "pageview" | "product_purchase" | "purchase" | "join_program" | "review" | "custom" | "facebook_like" | "twitter_follow" | "instagram_follow" | "instagram_mention" | "instagram_post_hashtag" | "tiktok_follow" | "tiktok_post_hashtag" | "referral" | "clickthrough" | "retail_purchase"; + kind: "birthday" | "loyalty_pass_install" | "collection_purchase" | "newsletter_signup" | "pageview" | "product_purchase" | "purchase" | "join_program" | "review" | "custom" | "facebook_like" | "twitter_follow" | "instagram_follow" | "instagram_mention" | "instagram_post_hashtag" | "tiktok_follow" | "tiktok_post_hashtag" | "referral" | "clickthrough" | "retail_purchase"; + /** @description Localized display title for the rule (the merchant-configured title for the shopper-facing locale, falling back to the default title for the rule kind). Useful for surfacing the rule context alongside the reward — e.g. "Refer a friend — $5 voucher". */ + title: string; } | null; /** * @description The state of the reward received from the rule. @@ -5358,7 +5439,7 @@ export interface components { */ currency: string; /** @description `ISO 639-1` code indicating the language used for any text in this response */ - language: unknown; + language: string; /** @description The customer matched by `merchant_id`. The customer's `state` property indicates if the customer is a member of the program (`enrolled`), not a member (`guest`), or has been blocked from the program (`blocked`) */ customer: components["schemas"]["CustomerEnrolled"] | components["schemas"]["CustomerGuest"] | components["schemas"]["CustomerBlocked"]; /** @description The complete program configuration. This is the same configuration that is returned by the [Get Configuration](/headless-api/2025-06/configuration/get-configuration) endpoint */ @@ -5553,7 +5634,7 @@ export interface components { */ currency: string; /** @description `ISO 639-1` code indicating the language used for any text in this response */ - language: unknown; + language: string; /** @description The customer matched by `merchant_id`. The customer's `state` property indicates if the customer is a member of the program (`enrolled`), not a member (`guest`), or has been blocked from the program (`blocked`) */ customer: components["schemas"]["CustomerEnrolled"] | components["schemas"]["CustomerGuest"] | components["schemas"]["CustomerBlocked"]; /** @description The complete program configuration. This is the same configuration that is returned by the [Get Configuration](/headless-api/2025-06/configuration/get-configuration) endpoint */ @@ -8664,7 +8745,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -8764,7 +8847,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -8858,7 +8943,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -8953,7 +9040,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -9065,7 +9154,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -9172,7 +9263,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -9278,7 +9371,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -9384,7 +9479,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -9490,7 +9587,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -9596,7 +9695,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -9702,7 +9803,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -9808,7 +9911,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -9914,7 +10019,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -10020,7 +10127,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -10126,7 +10235,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -10232,7 +10343,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -10338,7 +10451,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -10444,7 +10559,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -10550,7 +10667,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -10656,7 +10775,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { @@ -10762,7 +10883,9 @@ export interface operations { /** @description The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header */ channel?: components["schemas"]["SupportedChannel"]; /** @description The language to use for the request. If not provided, the site's default language will be used */ - language?: unknown; + language?: string; + /** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */ + country?: string; }; header?: never; path: { diff --git a/src/types/schemas.ts b/src/types/schemas.ts index 94a6fd8..73ee102 100644 --- a/src/types/schemas.ts +++ b/src/types/schemas.ts @@ -1409,6 +1409,49 @@ export interface CustomerAvailableRuleJoinProgram { completion_limit: RuleContextCompletionLimitNoLimit | RuleContextCompletionLimitLimitNotReached | RuleContextCompletionLimitLimitReachedForever | RuleContextCompletionLimitLimitReachedUntilReset; }; } +export interface CustomerAvailableRuleLoyaltyPassInstall { + id: number; + /** @description A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer */ + limit: { + /** @description The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week */ + count: number; + /** @description The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times */ + interval: ("day" | "week" | "month" | "year") | null; + } | null; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + kind: "loyalty_pass_install"; + /** @description The rule variant that is applicable to this customer and their tier */ + variant: { + /** @description The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled */ + tier_id: number | null; + /** + * @description Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend' + * @example Make a purchase + */ + title: string; + /** @description Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers */ + enabled: boolean; + /** @description The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher) */ + result: RuleResultPoints | RuleResultReward; + /** + * @description Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher' + * @example 5 points per $1 + */ + result_short_text: string; + }; + /** @description Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect */ + context: { + /** @description `ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer */ + last_completed_at: string | null; + /** @description The number of times this rule has been completed by the customer in total */ + completion_count: number; + /** @description An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect */ + completion_limit: RuleContextCompletionLimitNoLimit | RuleContextCompletionLimitLimitNotReached | RuleContextCompletionLimitLimitReachedForever | RuleContextCompletionLimitLimitReachedUntilReset; + }; +} export interface CustomerAvailableRuleNewsletterSignup { id: number; /** @description A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer */ @@ -2255,7 +2298,7 @@ export interface CustomerEnrolled { * * - instead of `variants`, each rule will have a `variant` property, which represents the applicable variant for this customer based on their tier. If there is no applicable enabled variant, the rule will not be included in this list, e.g. if it's disabled for the customer's current tier * - each rule will have a `context` property, which includes information about this customer's interaction with the rule, such as the number of times they have completed it, and if any limit is in effect */ - available_rules: (CustomerAvailableRuleBirthday | CustomerAvailableRuleCollectionPurchase | CustomerAvailableRuleNewsletterSignup | CustomerAvailableRulePageview | CustomerAvailableRuleProductPurchase | CustomerAvailableRulePurchase | CustomerAvailableRuleJoinProgram | CustomerAvailableRuleReview | CustomerAvailableRuleCustom | CustomerAvailableRuleFacebookLike | CustomerAvailableRuleTwitterFollow | CustomerAvailableRuleInstagramFollow | CustomerAvailableRuleInstagramMention | CustomerAvailableRuleInstagramPostHashtag | CustomerAvailableRuleTiktokFollow | CustomerAvailableRuleTiktokPostHashtag | CustomerAvailableRuleReferral | CustomerAvailableRuleClickthrough | CustomerAvailableRuleRetailPurchase)[]; + available_rules: (CustomerAvailableRuleBirthday | CustomerAvailableRuleLoyaltyPassInstall | CustomerAvailableRuleCollectionPurchase | CustomerAvailableRuleNewsletterSignup | CustomerAvailableRulePageview | CustomerAvailableRuleProductPurchase | CustomerAvailableRulePurchase | CustomerAvailableRuleJoinProgram | CustomerAvailableRuleReview | CustomerAvailableRuleCustom | CustomerAvailableRuleFacebookLike | CustomerAvailableRuleTwitterFollow | CustomerAvailableRuleInstagramFollow | CustomerAvailableRuleInstagramMention | CustomerAvailableRuleInstagramPostHashtag | CustomerAvailableRuleTiktokFollow | CustomerAvailableRuleTiktokPostHashtag | CustomerAvailableRuleReferral | CustomerAvailableRuleClickthrough | CustomerAvailableRuleRetailPurchase)[]; /** @description A list of the most recent actions that have occurred for this customer, such as earning points, redeeming rewards, and joining tiers. This list is sorted by date with the most recent actions at the beginning. * * History actions are not the same as _transactions_. A single action may cover multiple transactions. For example, if points are added and then later voided, it will be represented by a single action whose state will initially be `approved`, and then later change to `void`. This keeps the customer's history concise whilst still showing the key information. */ @@ -2376,7 +2419,7 @@ export interface CustomerHistoryActionEarnedPointsFromRule { /** @description The ID of the rule whose completion earned the points. If this does not match a `rule` in the current Site Configuration, it means the associated rule has been deleted */ id: number; /** @enum {string} */ - kind: "birthday" | "collection_purchase" | "newsletter_signup" | "pageview" | "product_purchase" | "purchase" | "join_program" | "review" | "custom" | "facebook_like" | "twitter_follow" | "instagram_follow" | "instagram_mention" | "instagram_post_hashtag" | "tiktok_follow" | "tiktok_post_hashtag" | "referral" | "clickthrough" | "retail_purchase"; + kind: "birthday" | "loyalty_pass_install" | "collection_purchase" | "newsletter_signup" | "pageview" | "product_purchase" | "purchase" | "join_program" | "review" | "custom" | "facebook_like" | "twitter_follow" | "instagram_follow" | "instagram_mention" | "instagram_post_hashtag" | "tiktok_follow" | "tiktok_post_hashtag" | "referral" | "clickthrough" | "retail_purchase"; }; /** @description If the state of this action is `pending`, this will be an `ISO 8601` timestamp representing the date at which the points will become approved, unless they are declined in the meantime */ points_will_approve_at: string | null; @@ -2529,7 +2572,9 @@ export interface CustomerHistoryActionReceivedReward { /** @description The ID of the rule whose completion resulted in the reward. If this does not match a `rule` in the current Site Configuration, it means the associated rule has been deleted */ id: number; /** @enum {string} */ - kind: "birthday" | "collection_purchase" | "newsletter_signup" | "pageview" | "product_purchase" | "purchase" | "join_program" | "review" | "custom" | "facebook_like" | "twitter_follow" | "instagram_follow" | "instagram_mention" | "instagram_post_hashtag" | "tiktok_follow" | "tiktok_post_hashtag" | "referral" | "clickthrough" | "retail_purchase"; + kind: "birthday" | "loyalty_pass_install" | "collection_purchase" | "newsletter_signup" | "pageview" | "product_purchase" | "purchase" | "join_program" | "review" | "custom" | "facebook_like" | "twitter_follow" | "instagram_follow" | "instagram_mention" | "instagram_post_hashtag" | "tiktok_follow" | "tiktok_post_hashtag" | "referral" | "clickthrough" | "retail_purchase"; + /** @description Localized display title for the rule (the merchant-configured title for the shopper-facing locale, falling back to the default title for the rule kind). Useful for surfacing the rule context alongside the reward — e.g. "Refer a friend — $5 voucher". */ + title: string; } | null; /** * @description The state of the reward received from the rule. @@ -2618,7 +2663,7 @@ export interface CustomersGetCustomerResponseBody { */ currency: string; /** @description `ISO 639-1` code indicating the language used for any text in this response */ - language: unknown; + language: string; /** @description The customer matched by `merchant_id`. The customer's `state` property indicates if the customer is a member of the program (`enrolled`), not a member (`guest`), or has been blocked from the program (`blocked`) */ customer: CustomerEnrolled | CustomerGuest | CustomerBlocked; /** @description The complete program configuration. This is the same configuration that is returned by the [Get Configuration](/headless-api/2025-06/configuration/get-configuration) endpoint */ @@ -2657,7 +2702,7 @@ export interface CustomersInitializeSessionResponseBody { */ currency: string; /** @description `ISO 639-1` code indicating the language used for any text in this response */ - language: unknown; + language: string; /** @description The customer matched by `merchant_id`. The customer's `state` property indicates if the customer is a member of the program (`enrolled`), not a member (`guest`), or has been blocked from the program (`blocked`) */ customer: CustomerEnrolled | CustomerGuest | CustomerBlocked; /** @description The complete program configuration. This is the same configuration that is returned by the [Get Configuration](/headless-api/2025-06/configuration/get-configuration) endpoint */ @@ -4855,6 +4900,40 @@ export interface RuleJoinProgram { result_short_text: string; }[]; } +export interface RuleLoyaltyPassInstall { + id: number; + /** @description A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer */ + limit: { + /** @description The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week */ + count: number; + /** @description The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times */ + interval: ("day" | "week" | "month" | "year") | null; + } | null; + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + kind: "loyalty_pass_install"; + /** @description A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier */ + variants: { + /** @description The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled */ + tier_id: number | null; + /** + * @description Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend' + * @example Make a purchase + */ + title: string; + /** @description Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers */ + enabled: boolean; + /** @description The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher) */ + result: RuleResultPoints | RuleResultReward; + /** + * @description Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher' + * @example 5 points per $1 + */ + result_short_text: string; + }[]; +} export interface RuleNewsletterSignup { id: number; /** @description A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer */ @@ -5347,7 +5426,7 @@ export interface SiteConfiguration { */ currency: string; /** @description `ISO 639-1` code indicating the language used for any text in this response */ - language: unknown; + language: string; program: { /** * @description The name of the program @@ -5455,7 +5534,7 @@ export interface SiteConfiguration { /** @description The referee incentive for the program, included only if one is enabled. This is a description of the incentive and does not include an actual voucher code, which is available through the referee incentive endpoint instead */ referee_incentive?: RefereeIncentiveCartDiscount | RefereeIncentiveFreeShipping; /** @description Ordered list of rules that belong to this site. Each rule will have one or more variants that indicate its configuration and if it is enabled per tier. Rules have a `kind` property, and some kinds of rules will have `properties` that are specific to that rule kind */ - rules: (RuleBirthday | RuleCollectionPurchase | RuleNewsletterSignup | RulePageview | RuleProductPurchase | RulePurchase | RuleJoinProgram | RuleReview | RuleCustom | RuleFacebookLike | RuleTwitterFollow | RuleInstagramFollow | RuleInstagramMention | RuleInstagramPostHashtag | RuleTiktokFollow | RuleTiktokPostHashtag | RuleReferral | RuleClickthrough | RuleRetailPurchase)[]; + rules: (RuleBirthday | RuleLoyaltyPassInstall | RuleCollectionPurchase | RuleNewsletterSignup | RulePageview | RuleProductPurchase | RulePurchase | RuleJoinProgram | RuleReview | RuleCustom | RuleFacebookLike | RuleTwitterFollow | RuleInstagramFollow | RuleInstagramMention | RuleInstagramPostHashtag | RuleTiktokFollow | RuleTiktokPostHashtag | RuleReferral | RuleClickthrough | RuleRetailPurchase)[]; /** @description Ordered list of rewards that belong to this site. Each reward will have one or more variants that indicate its configuration and if it is enabled per tier. Rewards have a `kind` property, and some kinds of rewards will have `properties` that are specific to that reward kind */ rewards: (RewardGiftCard | RewardCartDiscountVoucher | RewardCartVariableDiscountVoucher | RewardFreeShippingVoucher | RewardProductDiscountVoucher | RewardCollectionDiscountVoucher | RewardProductCart | RewardActiveSubscriptionDiscountVoucher | RewardActiveSubscriptionProduct | RewardCustom)[]; }