import { a0 as CreateAccountRequest$1, C as CreateAccountResponse$1, a1 as EarnPointsRequest$1, a as EarnPointsResponse$1, a6 as AdjustPointsRequest$1, b as AdjustPointsResponse$1, ag as GetAccountRequest$1, ah as GetAccountResponse$1, ai as QueryLoyaltyAccountsRequest$1, an as QueryLoyaltyAccountsResponse$1, at as GetProgramTotalsRequest$1, G as GetProgramTotalsResponse$1, av as GetCurrentMemberAccountRequest$1, c as GetCurrentMemberAccountResponse$1, aw as GetAccountBySecondaryIdRequest$1, e as GetAccountBySecondaryIdResponse$1, ay as ListAccountsRequest$1, g as ListAccountsResponse$1, aA as SearchAccountsRequest$1, S as SearchAccountsResponse$1, bi as CountAccountsRequest$1, j as CountAccountsResponse$1, bj as BulkAdjustPointsRequest$1, k as BulkAdjustPointsResponse$1 } from './loyalty-v1-account-accounts.universal-5fyrt13l.js'; import '@wix/sdk-types'; /** * A loyalty account stores a customer's loyalty points balance. A site's customers can earn points to their account * and redeem those points for rewards. */ interface LoyaltyAccount { /** * Account ID. * @format GUID * @readonly */ id?: string; /** * Account owner's contact ID. See the Contacts API to learn more about a site's contacts. * @format GUID * @readonly */ contactId?: string; /** * Member ID of the account owner. See the Members API to learn more about a site's members. * @format GUID * @readonly */ memberId?: string | null; /** * Details of the account's point totals. * @readonly */ points?: Points; /** * Whether the account has enough points in `points.balance` to redeem for a reward. * @readonly */ rewardAvailable?: boolean; /** * Date and time the account was created. * @readonly */ createdDate?: Date | null; /** * Date and time the account was last updated. * @readonly */ updatedDate?: Date | null; /** * Date and time of the account's last activity. * @readonly */ lastActivityDate?: Date | null; /** * Revision number, which increments by 1 each time the loyalty account is updated. * * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty account. * * Ignored when creating an account. */ revision?: string; /** * Tier information. * * See the Tiers API for more information. * @readonly */ tier?: Tier; /** * Contact information. * @readonly */ contact?: Contact; /** * Points expiration information. * @readonly */ pointsExpiration?: PointsExpiration; } /** Loyalty points information. */ interface Points { /** * Current points balance. * * Equal to the sum of `earned` and `adjusted` points, minus `redeemed` points. * @readonly */ balance?: number; /** * Total earned points. * @readonly */ earned?: number; /** * Total adjusted points. * @readonly */ adjusted?: number; /** * Total redeemed points. * @readonly */ redeemed?: number; /** * Total expired points. * @readonly */ expired?: number; } /** * Tier information. * * See the Tiers API for more information. */ interface Tier { /** * Tier ID. * * This field will not be returned if the account belongs to the base tier. * @format GUID * @readonly */ id?: string | null; /** * Date and time the tier information was last recalculated. * @readonly */ updatedDate?: Date | null; /** * Points earned and adjusted over the tier's current rolling window. * @readonly */ points?: number; } /** Loyalty account's contact information. */ interface Contact { /** * Contact ID. * @format GUID * @readonly */ id?: string | null; /** * Contact's first and last name. * @readonly */ name?: string | null; /** * Contact's profile picture. * @readonly */ picture?: Image; /** * Contact's email address. * @readonly * @format EMAIL */ email?: string | null; /** * Contact's first and last name. If no name is provided, uses contact's email. * @readonly */ displayName?: string | null; } interface Image { /** WixMedia image ID. */ id?: string; /** Image URL. */ url?: string; /** * Original image height. * @readonly */ height?: number; /** * Original image width. * @readonly */ width?: number; } interface PointsExpiration { /** * Date and time at which points are expiring. * @readonly */ expirationDate?: Date | null; /** * Amount of points that are going to expire at that date. * @readonly */ expiringPointsAmount?: number; } interface RewardAvailabilityUpdated { /** True if rewards is available. */ rewardAvailable?: boolean; /** Source of this change. */ updateTrigger?: UpdateTriggerWithLiterals; } declare enum UpdateTrigger { /** Undefined trigger. */ UNDEFINED = "UNDEFINED", /** Reward was updated. */ REWARD_UPDATED = "REWARD_UPDATED", /** Balance was updated. */ BALANCE_UPDATED = "BALANCE_UPDATED", /** Tiers were recalculated. */ TIERS_RECALCULATED = "TIERS_RECALCULATED" } /** @enumType */ type UpdateTriggerWithLiterals = UpdateTrigger | 'UNDEFINED' | 'REWARD_UPDATED' | 'BALANCE_UPDATED' | 'TIERS_RECALCULATED'; interface CreateAccountRequest { /** * Contact ID for a site's contact. See the Contacts API for more information. * @format GUID */ contactId: string; } interface CreateAccountResponse { /** Created loyalty account. */ account?: LoyaltyAccount; } interface EarnPointsRequest extends EarnPointsRequestActivityDetailsOneOf { /** Followed social media details. */ followedSocialMedia?: FollowedSocialMedia; /** * Loyalty account ID. * @format GUID */ accountId: string; /** * Amount of points to earn. Must be a positive, whole number. * * Min: `1` * * Max: `9999999` * @min 1 * @max 9999999 */ amount?: number; /** * Description of how the points were earned. * * Max: 100 characters * @minLength 1 * @maxLength 100 */ description?: string; /** * ID of the app that initiated the transaction. * * If points were earned manually, then the `appId` is the Loyalty app's * `wixAppId` of `553c79f3-5625-4f38-b14b-ef7c0d1e87df`. If points were earned in an automatic event, * then the `appId` is from that automation's `sourceAppId`. * @minLength 1 * @maxLength 100 */ appId: string; /** * Unique string identifier generated by the app. Wix uses this identifier to recognize subsequent retries of the same request. * * Please use `GUID` format. * @minLength 1 * @maxLength 256 */ idempotencyKey: string; /** * Activity type. * * If points were earned through automation it should be set to the trigger key. * @maxLength 100 */ activityType?: string | null; /** * Order ID which was source of this transaction. * @maxLength 512 */ orderId?: string | null; /** * Whether the points amount was adjusted by an earn points limit provider. * @readonly */ limitApplied?: boolean; } /** @oneof */ interface EarnPointsRequestActivityDetailsOneOf { /** Followed social media details. */ followedSocialMedia?: FollowedSocialMedia; } interface FollowedSocialMedia { /** * Social media channel. * Example: `FACEBOOK`, `INSTAGRAM`. * @maxLength 32 */ channel?: string; } interface EarnPointsResponse { /** Updated loyalty account. */ account?: LoyaltyAccount; /** * Transaction ID associated with the points earned. * @format GUID * @readonly */ transactionId?: string; } interface PointsUpdated { /** Updated account. */ account?: LoyaltyAccount; } interface FirstTransaction { /** Updated account. */ account?: LoyaltyAccount; } interface AdjustPointsRequest extends AdjustPointsRequestTypeOneOf { /** * Sets the account's point balance to this amount. Must be a positive, whole number or zero. * * The net difference between this new balance and the previous balance will be reflected in the `adjusted` field of the customer's account. * * Min: `0` * * Max: `999999999` * @max 999999999 */ balance?: number; /** * Adjusts the account's point balance by this amount. Must be a whole number with a maximum of 7 digits. * The amount can be negative, but cannot be `0`. * * Min: `-9999999` * * Max: `9999999` * @min -9999999 * @max 9999999 */ amount?: number; /** * Loyalty account ID. * @format GUID */ accountId: string; /** * Description to explain the reason for the points adjustment. * @minLength 1 * @maxLength 100 */ description?: string | null; /** * Each time the loyalty account is updated, `revision` increments by 1. * * The current `revision` must be passed when adjusting points in the loyalty account. This * ensures you're working with the latest version of the loyalty account and prevents unintended overwrites. * @min 1 */ revision?: string; } /** @oneof */ interface AdjustPointsRequestTypeOneOf { /** * Sets the account's point balance to this amount. Must be a positive, whole number or zero. * * The net difference between this new balance and the previous balance will be reflected in the `adjusted` field of the customer's account. * * Min: `0` * * Max: `999999999` * @max 999999999 */ balance?: number; /** * Adjusts the account's point balance by this amount. Must be a whole number with a maximum of 7 digits. * The amount can be negative, but cannot be `0`. * * Min: `-9999999` * * Max: `9999999` * @min -9999999 * @max 9999999 */ amount?: number; } interface AdjustPointsResponse { /** Loyalty account. */ account?: LoyaltyAccount; /** * Transaction ID associated with the points adjustment. * @format GUID * @readonly */ transactionId?: string; } interface DeductPointsRequest { /** * Loyalty account ID. * @format GUID */ accountId?: string; /** * Amount of points to deduct. Must be a positive, whole number. * * Min: `1` * * Max: `9999999` * @min 1 * @max 9999999 */ amount?: number; /** * If true, the deduction will be reverted in case of failure in subsequent operations. * Points equal to the "amount" value will be given to the account instead of being taken away. */ revertDeduction?: boolean; } interface DeductPointsResponse { /** Updated loyalty account. */ account?: LoyaltyAccount; } interface RedeemPointsRequest { /** * Loyalty account ID. * @format GUID */ accountId?: string; /** * Reward ID. See the Rewards API for more details. * @format GUID */ rewardId?: string; /** * Number of times the given reward will be redeemed. Must be a positive whole number. * @min 1 */ count?: number; /** * Revision number, which increments by 1 each time points are redeemed. * To prevent conflicting changes, the existing `revision` must be used when redeeming points. * @min 1 */ revision?: string; /** * ID of the entity that is being redeemed. * For example, the `orderId` for an order discount or the `couponId` for a coupon reward. * @format GUID */ referenceEntityId?: string | null; } interface RedeemPointsResponse { /** Loyalty account. */ account?: LoyaltyAccount; /** * Transaction ID associated with the redemption. * @format GUID * @readonly */ transactionId?: string; } interface RedeemDeterminedAmountOfPointsRequest { /** * Loyalty account ID. * @format GUID */ accountId?: string; /** * Reward ID. See the Rewards API for more details. * @format GUID */ rewardId?: string; /** * Number of points to be redeemed off the account. * @min 1 */ points?: number; /** * Revision number, which increments by 1 each time points are redeemed. * To prevent conflicting changes, the existing `revision` must be used when redeeming points. * @min 1 */ revision?: string; /** * ID of the entity that is being redeemed. * For example, the `orderId` for an order discount or the `couponId` for a coupon reward. * @format GUID */ referenceEntityId?: string | null; } interface RedeemDeterminedAmountOfPointsResponse { /** Loyalty account. */ account?: LoyaltyAccount; /** * Transaction ID associated with the redemption. * @format GUID * @readonly */ transactionId?: string; } interface RefundTransactionRequest { /** * Transaction ID associated with the refund. * @format GUID * @readonly */ transactionId?: string; } interface RefundTransactionResponse { } interface GetAccountRequest { /** * ID of the account to retrieve. * @format GUID */ id: string; } interface GetAccountResponse { /** Retrieved loyalty account. */ account?: LoyaltyAccount; } interface QueryLoyaltyAccountsRequest { /** * Filter object. * See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language) for more information. */ query: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryLoyaltyAccountsResponse { /** Retrieved loyalty accounts. */ loyaltyAccounts?: LoyaltyAccount[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface ListUserAccountsRequest { /** * Number of items to load. Minimum `1`, maximum `50`. * @min 1 * @max 50 */ limit?: number | null; } interface ListUserAccountsResponse { /** Loyalty accounts. */ accounts?: LoyaltyAccountForMetaSite[]; } interface LoyaltyAccountForMetaSite { /** Loyalty account. */ account?: LoyaltyAccount; /** * Metasite ID. * @format GUID */ metaSiteId?: string; } interface GetProgramTotalsRequest { } interface GetProgramTotalsResponse { /** Point totals for the entire program. */ points?: Points; /** Tier total for the entire program. */ tierTotals?: TierTotal[]; } interface TierTotal { /** * Tier ID. If no Tier ID is provided, the ID is `null`. * See the base tier in the Tiers API for more information. * @format GUID * @readonly */ id?: string | null; /** Total number of loyalty account that belong to a particular tier. */ numberOfAccounts?: number; } interface GetCurrentMemberAccountRequest { } interface GetCurrentMemberAccountResponse { /** Loyalty account. */ account?: LoyaltyAccount; } interface GetAccountBySecondaryIdRequest extends GetAccountBySecondaryIdRequestIdOneOf { /** * Account owner's contact ID. See the Contacts API for more information. * @maxLength 50 */ contactId?: string; /** * Account owner's member ID. See the Members API for more information. * @maxLength 50 */ memberId?: string; } /** @oneof */ interface GetAccountBySecondaryIdRequestIdOneOf { /** * Account owner's contact ID. See the Contacts API for more information. * @maxLength 50 */ contactId?: string; /** * Account owner's member ID. See the Members API for more information. * @maxLength 50 */ memberId?: string; } interface GetAccountBySecondaryIdResponse { /** Loyalty account. */ account?: LoyaltyAccount; } /** Options to use when retrieving a list of loyalty accounts. */ interface ListAccountsRequest { /** * List of contact IDs. * @format GUID * @maxSize 50 */ contactIds?: string[]; /** Pagination options. */ cursorPaging?: CursorPaging; } interface ListAccountsResponse { /** Retrieved loyalty accounts. */ accounts?: LoyaltyAccount[]; /** Details on the paged set of results returned. */ pagingMetadata?: PagingMetadataV2; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } /** Options to use when search for loyalty accounts. */ interface SearchAccountsRequest { /** Search options. */ search?: CursorSearch; } interface CursorSearch extends CursorSearchPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * List of sort objects. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). * @maxSize 10 */ sort?: Sorting[]; /** * Logical groupings of data into facets, with summaries for each facet. For example, use aggregations to allow site visitors to narrow down their search results by selecting specific categories. * @maxSize 10 */ aggregations?: Aggregation[]; /** Free text to match in searchable fields. */ search?: SearchDetails; /** * Time zone to adjust date-time-based filters and aggregations, in ISO 8601 (including offsets) or IANA time zone database (including time zone IDs) format. * Applies to all relevant filters and aggregations, unless overridden by providing timestamps including time zone. For example, "2023-12-20T10:52:34.795Z". * @maxLength 50 */ timeZone?: string | null; } /** @oneof */ interface CursorSearchPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } interface Aggregation extends AggregationKindOneOf { /** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of products for each price listed in the store. */ value?: ValueAggregation; /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */ range?: RangeAggregation; /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */ scalar?: ScalarAggregation; /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */ dateHistogram?: DateHistogramAggregation; /** A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`. */ nested?: NestedAggregation; /** * Aggregation name, returned in `aggregations.results.name`. * @maxLength 100 */ name?: string | null; /** Type of aggregation to perform. Must align with the corresponding aggregation field. */ type?: AggregationTypeWithLiterals; /** * Field to aggregate by. Use dot notation to specify a JSON path. For example, `order.address.streetName`. * @maxLength 200 */ fieldPath?: string; /** * Deprecated. Use `nested` instead. * @deprecated Deprecated. Use `nested` instead. * @replacedBy kind.nested * @targetRemovalDate 2024-03-30 */ groupBy?: GroupByAggregation; } /** @oneof */ interface AggregationKindOneOf { /** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of products for each price listed in the store. */ value?: ValueAggregation; /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */ range?: RangeAggregation; /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */ scalar?: ScalarAggregation; /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */ dateHistogram?: DateHistogramAggregation; /** A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`. */ nested?: NestedAggregation; } interface RangeBucket { /** Inclusive lower bound of the range. Required if `to` is not provided. */ from?: number | null; /** Exclusive upper bound of the range. Required if `from` is not provided. */ to?: number | null; } declare enum SortType { /** Number of matches in the results. */ COUNT = "COUNT", /** Alphabetically by the field value. */ VALUE = "VALUE" } /** @enumType */ type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE'; declare enum SortDirection { /** Descending order. */ DESC = "DESC", /** Ascending order. */ ASC = "ASC" } /** @enumType */ type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC'; declare enum MissingValues { /** Exclude missing values from the aggregation results. */ EXCLUDE = "EXCLUDE", /** Include missing values in the aggregation results. */ INCLUDE = "INCLUDE" } /** @enumType */ type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE'; interface IncludeMissingValuesOptions { /** * Specify a custom name for the bucket containing the missing values. Defaults are `"N/A"` for strings, `0` for integers, and `false` for booleans. * @maxLength 20 */ addToBucket?: string; } declare enum ScalarType { /** Total number of distinct values. */ COUNT_DISTINCT = "COUNT_DISTINCT", /** Minimum value. */ MIN = "MIN", /** Maximum value. */ MAX = "MAX" } /** @enumType */ type ScalarTypeWithLiterals = ScalarType | 'COUNT_DISTINCT' | 'MIN' | 'MAX'; interface ValueAggregation extends ValueAggregationOptionsOneOf { /** Options for including missing values in results. */ includeOptions?: IncludeMissingValuesOptions; /** Sort type. */ sortType?: SortTypeWithLiterals; /** Sort direction. */ sortDirection?: SortDirectionWithLiterals; /** * Number of aggregation results to return. * Min: `1` * Max: `250` * Default: `10` */ limit?: number | null; /** * Whether to include or exclude missing values in the aggregation results. * Default: `EXCLUDE`. */ missingValues?: MissingValuesWithLiterals; } /** @oneof */ interface ValueAggregationOptionsOneOf { /** Options for including missing values in results. */ includeOptions?: IncludeMissingValuesOptions; } declare enum NestedAggregationType { /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */ VALUE = "VALUE", /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */ RANGE = "RANGE", /** Calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */ SCALAR = "SCALAR", /** Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). */ DATE_HISTOGRAM = "DATE_HISTOGRAM" } /** @enumType */ type NestedAggregationTypeWithLiterals = NestedAggregationType | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM'; interface RangeAggregation { /** * List of range buckets. During aggregation each entity is placed in the first bucket its value falls into, based on the provided range bounds. * @maxSize 50 */ buckets?: RangeBucket[]; } interface ScalarAggregation { /** Operator type for the scalar aggregation. */ type?: ScalarTypeWithLiterals; } interface DateHistogramAggregation { /** Interval for date histogram aggregation. */ interval?: DateHistogramAggregationIntervalWithLiterals; } declare enum DateHistogramAggregationInterval { YEAR = "YEAR", MONTH = "MONTH", WEEK = "WEEK", DAY = "DAY", HOUR = "HOUR", MINUTE = "MINUTE", SECOND = "SECOND" } /** @enumType */ type DateHistogramAggregationIntervalWithLiterals = DateHistogramAggregationInterval | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND'; interface NestedAggregationItem extends NestedAggregationItemKindOneOf { /** A value aggregation calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of orders for each order status. */ value?: ValueAggregation; /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */ range?: RangeAggregation; /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */ scalar?: ScalarAggregation; /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). For example, use a date histogram to determine how many reservations have been made at a restaurant each week. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */ dateHistogram?: DateHistogramAggregation; /** * Unique, caller-defined aggregation name, returned in `aggregations.results`. * @maxLength 100 */ name?: string | null; /** Type of aggregation to perform. The matching aggregation field must be passed. */ type?: NestedAggregationTypeWithLiterals; /** * Field to aggregate by. Use dot notation to specify a JSON path. For example, `order.address.streetName`. * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface NestedAggregationItemKindOneOf { /** A value aggregation calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number (count) of orders for each order status. */ value?: ValueAggregation; /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */ range?: RangeAggregation; /** A scalar aggregation calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */ scalar?: ScalarAggregation; /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). For example, use a date histogram to determine how many reservations have been made at a restaurant each week. If ranges overlap, a record that fits more than one range will only be counted in the first range that matches the criteria. */ dateHistogram?: DateHistogramAggregation; } declare enum AggregationType { /** Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. */ VALUE = "VALUE", /** Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. */ RANGE = "RANGE", /** Calculates a single numerical value from a dataset, summarizing the dataset into one key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. */ SCALAR = "SCALAR", /** Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). */ DATE_HISTOGRAM = "DATE_HISTOGRAM", /** Flattened list of aggregations, where each aggregation is nested within previous one. */ NESTED = "NESTED" } /** @enumType */ type AggregationTypeWithLiterals = AggregationType | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED'; /** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one. */ interface NestedAggregation { /** * Flattened list of aggregations, where each aggregation is nested within previous one. * @minSize 2 * @maxSize 3 */ nestedAggregations?: NestedAggregationItem[]; } interface GroupByAggregation extends GroupByAggregationKindOneOf { /** Value aggregation configuration. */ value?: ValueAggregation; /** * Unique, caller-defined aggregation name, returned in `aggregations.results`. * @maxLength 100 */ name?: string | null; /** * Field to aggregate by. * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface GroupByAggregationKindOneOf { /** Value aggregation configuration. */ value?: ValueAggregation; } interface SearchDetails { /** Search mode. Defines the search logic for combining multiple terms in the `expression`. */ mode?: ModeWithLiterals; /** * Search term or expression. * @maxLength 100 */ expression?: string | null; /** * Fields to search in. If the array is empty, all searchable fields are searched. Use dot notation to specify a JSON path. For example, `order.address.streetName`. * @maxLength 200 * @maxSize 20 */ fields?: string[]; /** Whether to enable the search function to use an algorithm to automatically find results that are close to the search expression, such as typos and declensions. */ fuzzy?: boolean; } declare enum Mode { /** At least one of the search terms must be present. */ OR = "OR", /** All search terms must be present. */ AND = "AND" } /** @enumType */ type ModeWithLiterals = Mode | 'OR' | 'AND'; /** Accounts found through provided search capabilities, along with paging and aggregation data of the results. */ interface SearchAccountsResponse { /** Found accounts. */ accounts?: LoyaltyAccount[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; /** Aggregation data */ aggregationData?: AggregationData; } interface AggregationData { /** * List of the aggregated data results. * @maxSize 10000 */ results?: AggregationResults[]; } interface ValueAggregationResult { /** * Value of the field. * @maxLength 100 */ value?: string; /** Number of entities with this value. */ count?: number; } interface RangeAggregationResult { /** Inclusive lower bound of the range. */ from?: number | null; /** Exclusive upper bound of the range. */ to?: number | null; /** Total number of entities in this range. */ count?: number; } interface NestedAggregationResults extends NestedAggregationResultsResultOneOf { /** Value aggregation results. */ values?: ValueResults; /** Range aggregation results. */ ranges?: RangeResults; /** Scalar aggregation results. */ scalar?: AggregationResultsScalarResult; /** * Unique, caller-defined aggregation name, identifiable by the requested aggregation `name`. * @maxLength 100 */ name?: string; /** Aggregation type. */ type?: AggregationTypeWithLiterals; /** * Field which the data was aggregated by. * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface NestedAggregationResultsResultOneOf { /** Value aggregation results. */ values?: ValueResults; /** Range aggregation results. */ ranges?: RangeResults; /** Scalar aggregation results. */ scalar?: AggregationResultsScalarResult; } interface ValueResults { /** * List of value aggregations. * @maxSize 250 */ results?: ValueAggregationResult[]; } interface RangeResults { /** * List of ranges returned in the same order as requested. * @maxSize 50 */ results?: RangeAggregationResult[]; } interface AggregationResultsScalarResult { /** Type of scalar aggregation. */ type?: ScalarTypeWithLiterals; /** Value of the scalar aggregation. */ value?: number; } interface NestedValueAggregationResult { /** * Value of the field. * @maxLength 1000 */ value?: string; /** Nested aggregations. */ nestedResults?: NestedAggregationResults; } interface ValueResult { /** * Value of the field. * @maxLength 1000 */ value?: string; /** Number of entities with this value. */ count?: number | null; } interface RangeResult { /** Inclusive lower bound of the range. */ from?: number | null; /** Exclusive upper bound of the range. */ to?: number | null; /** Number of entities in this range. */ count?: number | null; } interface ScalarResult { /** Value of the scalar aggregation. */ value?: number; } interface ScalarDateResult { /** * Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * @maxLength 100 */ value?: string; } interface NestedResultValue extends NestedResultValueResultOneOf { /** Value aggregation result. */ value?: ValueResult; /** Range aggregation result. */ range?: RangeResult; /** Scalar aggregation result. */ scalar?: ScalarResult; /** Date histogram aggregation result. */ dateHistogram?: ValueResult; /** Scalar date aggregation result. */ scalarDate?: ScalarDateResult; } /** @oneof */ interface NestedResultValueResultOneOf { /** Value aggregation result. */ value?: ValueResult; /** Range aggregation result. */ range?: RangeResult; /** Scalar aggregation result. */ scalar?: ScalarResult; /** Date histogram aggregation result. */ dateHistogram?: ValueResult; /** Scalar date aggregation result. */ scalarDate?: ScalarDateResult; } interface Results { /** List of nested aggregations. */ results?: Record; } interface DateHistogramResult { /** * Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * @maxLength 100 */ value?: string; /** Number of entities in the bucket. */ count?: number; } interface GroupByValueResults { /** * List of value aggregations. * @maxSize 1000 */ results?: NestedValueAggregationResult[]; } interface DateHistogramResults { /** * List of date histogram aggregations. * @maxSize 200 */ results?: DateHistogramResult[]; } /** Results of `NESTED` aggregation type in a flattened array, identifiable by the requested aggregation `name`. */ interface NestedResults { /** * List of nested aggregations. * @maxSize 1000 */ results?: Results[]; } interface AggregationResultsScalarDateResult { /** Type of scalar date aggregation. Possible values: `MIN`, `MAX`. */ type?: ScalarTypeWithLiterals; /** * Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * @maxLength 100 */ value?: string; } interface AggregationResults extends AggregationResultsResultOneOf { /** Value aggregation results. */ values?: ValueResults; /** Range aggregation results. */ ranges?: RangeResults; /** Scalar aggregation results. */ scalar?: AggregationResultsScalarResult; /** Group by value aggregation results. */ groupedByValue?: GroupByValueResults; /** Date histogram aggregation results. */ dateHistogram?: DateHistogramResults; /** Nested aggregation results. */ nested?: NestedResults; /** Date aggregation results. */ scalarDate?: AggregationResultsScalarDateResult; /** * Aggregation name, returned in `aggregations.results.name`. * @maxLength 100 */ name?: string; /** Aggregation type. Must align with the corresponding aggregation field. */ type?: AggregationTypeWithLiterals; /** * Field to aggregate by. Use dot notation to specify a JSON path. For example, `order.address.streetName`. * @maxLength 200 */ fieldPath?: string; } /** @oneof */ interface AggregationResultsResultOneOf { /** Value aggregation results. */ values?: ValueResults; /** Range aggregation results. */ ranges?: RangeResults; /** Scalar aggregation results. */ scalar?: AggregationResultsScalarResult; /** Group by value aggregation results. */ groupedByValue?: GroupByValueResults; /** Date histogram aggregation results. */ dateHistogram?: DateHistogramResults; /** Nested aggregation results. */ nested?: NestedResults; /** Date aggregation results. */ scalarDate?: AggregationResultsScalarDateResult; } interface ExportAccountsRequest { query?: QueryV2; } interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and offset the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). */ sort?: Sorting[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ interface QueryV2PagingMethodOneOf { /** Paging options to limit and offset the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface ExportAccountsResponse { accounts?: LoyaltyAccount[]; pagingMetadata?: CursorPagingMetadata; } /** Options to use when retrieving amount of loyalty accounts. */ interface CountAccountsRequest { /** Filter object. */ filter?: Record | null; /** Free text to match in searchable fields. */ search?: SearchDetails; } /** Amount of accounts found for the given search query */ interface CountAccountsResponse { count?: number; } interface BulkAdjustPointsRequest extends BulkAdjustPointsRequestTypeOneOf { /** @max 999999999 */ balance?: number; /** * @min -9999999 * @max 9999999 */ amount?: number; search?: CursorSearch; } /** @oneof */ interface BulkAdjustPointsRequestTypeOneOf { /** @max 999999999 */ balance?: number; /** * @min -9999999 * @max 9999999 */ amount?: number; } interface BulkAdjustPointsResponse { /** * ID of the job. * * Use this ID to call [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) * to retrieve the job details and metadata. * @format GUID * @readonly */ asyncJobId?: string | null; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface Empty { } interface TiersRollingUpdate { } interface TiersProgramSettingsChanged { /** Settings for the tiers program. */ programSettings?: TiersProgramSettings; } /** Tiers program settings apply globally to all tiers in the program. A site can only have 1 set of program settings. */ interface TiersProgramSettings extends TiersProgramSettingsPeriodOneOf { /** * **Required.** * Period of time used to calculate loyalty points for tier assignment. * * The loyalty points accumulated during this period determine if the account meets a tier's required point threshold. */ rollingWindow?: RollingWindow; /** Tiers program status. */ status?: StatusWithLiterals; /** * Revision number, which increments by 1 each time the loyalty tiers settings are updated. * * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty tiers settings. * @immutable */ revision?: string | null; /** * Date and time the loyalty tiers program was created. * @readonly */ createdDate?: Date | null; /** * Date and time the loyalty tiers program was last updated. * @readonly */ updatedDate?: Date | null; /** * Information about the base loyalty tier. * * The base tier is the default tier for any account that's unassigned for not meeting * the required points threshold of any other tier. */ baseTierDefinition?: TierDefinition; } /** @oneof */ interface TiersProgramSettingsPeriodOneOf { /** * **Required.** * Period of time used to calculate loyalty points for tier assignment. * * The loyalty points accumulated during this period determine if the account meets a tier's required point threshold. */ rollingWindow?: RollingWindow; } declare enum Status { /** Unknown status. */ UNKNOWN = "UNKNOWN", /** Tiers are disabled. */ DISABLED = "DISABLED", /** Tiers are enabled but not yet active. */ DRAFT = "DRAFT", /** Tiers are active. */ ACTIVE = "ACTIVE", /** Tiers are paused. */ PAUSED = "PAUSED" } /** @enumType */ type StatusWithLiterals = Status | 'UNKNOWN' | 'DISABLED' | 'DRAFT' | 'ACTIVE' | 'PAUSED'; /** Information about the tier. */ interface TierDefinition { /** Details about the tier icon. */ icon?: CommonImage; /** * Tier name. * @minLength 1 * @maxLength 50 */ name?: string | null; /** * Tier description. * @maxLength 70 */ description?: string | null; } interface CommonImage { /** WixMedia image ID. */ id?: string; /** Image URL. */ url?: string; /** * Original image height. * @readonly */ height?: number; /** * Original image width. * @readonly */ width?: number; /** Image alt text. */ altText?: string | null; /** * Image filename. * @readonly */ filename?: string | null; } interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } /** * **Required.** Period of time used to calculate loyalty points for tier assignment. * * The loyalty points accumulated during this period determine if the account meets a tier's required point threshold. */ interface RollingWindow { /** * Number of months to use for the rolling window period. * * Min: `12` * * Max: `36` * @min 1 * @max 36 */ durationInMonths?: number; } interface SubscriptionEvent extends SubscriptionEventEventOneOf { /** Triggered when a subscription is created. */ created?: SubscriptionCreated; /** * Triggered when a subscription is assigned to a Wix site, including the initial * assignment of a floating subscription or a re-assignement from a different site. */ assigned?: SubscriptionAssigned; /** Triggered when a subscription is canceled. */ cancelled?: SubscriptionCancelled; /** Triggered when the subscription's auto renew is turned on. */ autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn; /** Triggered when the subscription's auto renew is turned off. */ autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff; /** * Triggered when a subscription is unassigned from a Wix site and becomes * floating. */ unassigned?: SubscriptionUnassigned; /** * Triggered when a subscription is transferred from one Wix account to another. * A transfer includes cancelling the original subscription and creating a new * subscription for the target account. The event returns both the original * and the new subscription. */ transferred?: SubscriptionTransferred; /** Triggered when a recurring charge succeeds for a subscription. */ recurringChargeSucceeded?: RecurringChargeSucceeded; /** * Triggered when a subscription was updated including when its product has been * up- or downgraded or the billing cycle is changed. */ contractSwitched?: ContractSwitched; /** * Triggered when a subscription gets close to the end of its billing cycle. * The exact number of days is defined in the billing system. */ nearEndOfPeriod?: SubscriptionNearEndOfPeriod; /** * Triggered when a subscription is updated and the change doesn't happen * immediately but at the end of the current billing cycle. */ pendingChange?: SubscriptionPendingChange; /** Triggered when a recurring charge attempt fails for a subscription. */ recurringChargeAttemptFailed?: RecurringChargeAttemptFailed; /** * ID of the subscription's event. * @format GUID */ eventId?: string | null; /** * Date and time of the event in * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) * `YYYY-MM-DDThh:mm:ss.sssZ` format. */ eventDate?: Date | null; } /** @oneof */ interface SubscriptionEventEventOneOf { /** Triggered when a subscription is created. */ created?: SubscriptionCreated; /** * Triggered when a subscription is assigned to a Wix site, including the initial * assignment of a floating subscription or a re-assignement from a different site. */ assigned?: SubscriptionAssigned; /** Triggered when a subscription is canceled. */ cancelled?: SubscriptionCancelled; /** Triggered when the subscription's auto renew is turned on. */ autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn; /** Triggered when the subscription's auto renew is turned off. */ autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff; /** * Triggered when a subscription is unassigned from a Wix site and becomes * floating. */ unassigned?: SubscriptionUnassigned; /** * Triggered when a subscription is transferred from one Wix account to another. * A transfer includes cancelling the original subscription and creating a new * subscription for the target account. The event returns both the original * and the new subscription. */ transferred?: SubscriptionTransferred; /** Triggered when a recurring charge succeeds for a subscription. */ recurringChargeSucceeded?: RecurringChargeSucceeded; /** * Triggered when a subscription was updated including when its product has been * up- or downgraded or the billing cycle is changed. */ contractSwitched?: ContractSwitched; /** * Triggered when a subscription gets close to the end of its billing cycle. * The exact number of days is defined in the billing system. */ nearEndOfPeriod?: SubscriptionNearEndOfPeriod; /** * Triggered when a subscription is updated and the change doesn't happen * immediately but at the end of the current billing cycle. */ pendingChange?: SubscriptionPendingChange; /** Triggered when a recurring charge attempt fails for a subscription. */ recurringChargeAttemptFailed?: RecurringChargeAttemptFailed; } /** Triggered when a subscription is created. */ interface SubscriptionCreated { /** Created subscription. */ subscription?: Subscription; /** Metadata for the `created` event. */ metadata?: Record; /** * Subscription reactivation data. * A subscription can be reactivated for example if it was incorrectly canceled because of fraud and then reactivated * by the billing system */ reactivationData?: ReactivationData; } /** * A subscription holds information about a Premium product that a Wix account * owner has purchased including details about the billing. */ interface Subscription { /** * ID of the subscription. * @format GUID */ id?: string; /** * ID of the Wix account that purchased the subscription. * @format GUID */ userId?: string; /** * ID of the [product](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/products/product-object) * for which the subscription was purchased. * @format GUID */ productId?: string; /** * Date and time the subscription was created in * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) * `YYYY-MM-DDThh:mm:ss.sssZ` format. */ createdAt?: Date | null; /** * Date and time the subscription was last updated in * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) * `YYYY-MM-DDThh:mm:ss.sssZ` format. */ updatedAt?: Date | null; /** * ID of the metasite that the subscription is assigned to. * Available only when the subscription is assigned to a Wix site. * Subscriptions for account level products can't be assigned to a Wix site. * @format GUID */ metaSiteId?: string | null; /** Information about the system that manages the subscription's billing. */ billingReference?: BillingReference; /** Information about the billing cycle of the subscription. */ cycle?: Cycle; /** * Subscription status. * * + `UNKNOWN`: Default status. * + `AUTO_RENEW_ON`: Subscription is active and automatically renews at the end of the current billing cycle. * + `AUTO_RENEW_OFF`: Subscription is active but expires at the end of the current billing cycle. * + `MANUAL_RECURRING`: Subscription is active and renews at the end of the current billing cycle, in case the customer takes an action related to the payment. * + `CANCELLED`: Subscription isn't active because it has been canceled. * + `TRANSFERRED`: Subscription isn't active because it has been transferred to a different account. A different active subscription was created for the target account. */ status?: SubscriptionStatusWithLiterals; /** * Date and time the subscription was last transferred from one Wix account to * another in * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) * `YYYY-MM-DDThh:mm:ss.sssZ` format. */ transferredAt?: Date | null; /** * ID of the [product type](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/product-types/product-type-object) * that the product, for which the subscription was purchased, belongs to. * @format GUID */ productTypeId?: string; /** Version number, which increments by 1 each time the subscription is updated. */ version?: number; /** * Whether the subscription is active. Includes the statuses * `"AUTO_RENEW_ON"`, `"AUTO_RENEW_OFF"`, and `"MANUAL_RECURRING"`. */ active?: boolean; /** * Date and time the subscription was originally created in * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) * `YYYY-MM-DDThh:mm:ss.sssZ` format. * Differs from `createdAt` in case the subscription was originally created for a different Wix account and has been transferred. */ originalCreationDate?: Date | null; /** Custom metadata about the subscription. */ metadata?: Record; /** * 2-letter country code in * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) * format. */ countryCode?: string | null; /** * Seats of the product that the subscription was purchased for. * Will be Null for products that don't support seats. * @min 1 * @max 500 */ seats?: number | null; } interface BillingReference { /** * Name of the billing system that manages the subscription. * * + `"UNKNOWN"`: Default value. * + `"SBS"`: [Wix Billing](https://github.com/wix-p/premium-billing/tree/master/sbs). * + `"LICENSER"`: * + `"BASS"`: [Billing and Subscriptions System](https://dev.wix.com/docs/rest/internal-only/premium/subscriptions-by-billing-by-wix/introduction). * + `"RESELLER"`: [External Reseller](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction). */ providerName?: ProviderNameWithLiterals; /** Current provider reference ID. */ providerReferenceId?: string | null; /** Previous provider reference IDs. Used for when a subscription is extended, specifically for domains. */ previousProviderReferenceIds?: string[]; } declare enum ProviderName { UNKNOWN = "UNKNOWN", SBS = "SBS", LICENSER = "LICENSER", BASS = "BASS", RESELLER = "RESELLER", RECURRING_INVOICES = "RECURRING_INVOICES" } /** @enumType */ type ProviderNameWithLiterals = ProviderName | 'UNKNOWN' | 'SBS' | 'LICENSER' | 'BASS' | 'RESELLER' | 'RECURRING_INVOICES'; interface Cycle extends CycleCycleSelectorOneOf { /** repetitive interval */ interval?: Interval; /** one time */ oneTime?: OneTime; } /** @oneof */ interface CycleCycleSelectorOneOf { /** repetitive interval */ interval?: Interval; /** one time */ oneTime?: OneTime; } interface Interval { /** interval unit of measure */ unit?: IntervalUnitWithLiterals; /** number of interval */ count?: number; } declare enum IntervalUnit { /** unknown interval unit */ UNKNOWN = "UNKNOWN", /** day */ DAY = "DAY", /** week */ WEEK = "WEEK", /** month */ MONTH = "MONTH", /** year */ YEAR = "YEAR" } /** @enumType */ type IntervalUnitWithLiterals = IntervalUnit | 'UNKNOWN' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR'; interface OneTime { } declare enum SubscriptionStatus { UNKNOWN = "UNKNOWN", AUTO_RENEW_ON = "AUTO_RENEW_ON", AUTO_RENEW_OFF = "AUTO_RENEW_OFF", MANUAL_RECURRING = "MANUAL_RECURRING", CANCELLED = "CANCELLED", TRANSFERRED = "TRANSFERRED" } /** @enumType */ type SubscriptionStatusWithLiterals = SubscriptionStatus | 'UNKNOWN' | 'AUTO_RENEW_ON' | 'AUTO_RENEW_OFF' | 'MANUAL_RECURRING' | 'CANCELLED' | 'TRANSFERRED'; /** Triggered when a subscription is reactivated. */ interface ReactivationData { reactivationReason?: ReactivationReasonEnumWithLiterals; /** * In the event of reactivation after chargeback dispute, the subscription may be extended according to the * number of days it was inactive during the time of resolving the dispute */ newEndOfPeriod?: Date | null; /** The original end date, before the inactive period. */ oldEndOfPeriod?: Date | null; /** The difference in days between the new new_end_of_period and old_end_of_period */ differenceInDays?: number | null; } /** Reason for subscription reactivation */ declare enum ReactivationReasonEnum { UNKNOWN = "UNKNOWN", /** * Subscription was reactivated due to billing status change from CANCELED to ACTIVE, for example if it was incorrectly * canceled because of suspicion of fraud */ BILLING_STATUS_CHANGE = "BILLING_STATUS_CHANGE", /** Subscription was reactivated after a chargeback dispute */ REACTIVATED_AFTER_CHARGEBACK = "REACTIVATED_AFTER_CHARGEBACK" } /** @enumType */ type ReactivationReasonEnumWithLiterals = ReactivationReasonEnum | 'UNKNOWN' | 'BILLING_STATUS_CHANGE' | 'REACTIVATED_AFTER_CHARGEBACK'; /** * Triggered when a subscription is assigned to a Wix site, including the initial * assignment of a floating subscription or a re-assignement from a different site. */ interface SubscriptionAssigned { /** Assigned subscription. */ subscription?: Subscription; /** * ID of the metasite that the subscription has been assigned to before the update. * @format GUID */ previousMetaSiteId?: string | null; } /** Triggered when a subscription is canceled. */ interface SubscriptionCancelled { /** Canceled subscription. */ subscription?: Subscription; /** Details about the cancellation including who canceled the subscription and why. */ cancellationDetails?: CancellationDetails; /** * Whether the subscription is canceled immediately or expires at the end of the current billing cycle. * * Default: `false` */ immediateCancel?: boolean; /** Whether the subscription was canceled during the free trial period. */ canceledInFreeTrial?: boolean; /** The type of refund applied to the cancellation. */ refundType?: RefundTypeWithLiterals; } /** Information about the cancellation flow including who canceled the subscription and why it was canceled. */ interface CancellationDetails { /** * Cancellation code. * * Values supported for cancellations on behalf of the billing system: `-1`, `-2`, `-3`, `-4`, `-5`, `-6`, `-7`, `-8`. * For cancellations on behalf of the site owner or the service provider `cancellationCode` * is taken from the request of * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline). * * + `-1`: The subscription has been cancelled by the billing system but none of the listed cancellation reasons applies. * + `-2`: There were payment problems. * + `-3`: There was a chargeback. * + `-4`: Customer support has canceled the subscription and issued a refund. * + `-5`: The site owner has changed their existing subscription. * + `-6`: The subscription has been transferred to a different Wix account. * + `-7`: The subscription has been canceled because the site owner hasn't manually authenticated the recurring payment during the subscription's grace period. For example, site owners must manually confirm recurring payments within 40 days when paying with boleto. * + `-8`: The Wix account that the subscription belonged to has been deleted. */ cancellationCode?: number | null; /** * Cancellation reason. For cancellations on behalf of the site owner or the service provider `cancellationReason` * is taken from the request of * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline). * For cancellations on behalf of the billing system `cancellationReason` is `null` or an empty string. */ cancellationReason?: string | null; /** * Initiator of the cancellation. For `"USER_REQUESTED"` and `"APP_MANAGED"`, * `cancellationCode` and `cancellationReason` are taken from the request of * [Cancel Immediately](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately) * or [Cancel Immediately Offline](https://dev.wix.com/docs/rest/account-level/premium/premium-subscriptions-manager/subscription-v1/cancel-immediately-offline). * For `"PASSIVE"`, cancellations `cancellationCode` is automatically calculated and `cancellationReason` * is `null` or an empty string. * * + `"UNKNOWN`: Default value. * + `"USER_REQUESTED"`: The Wix account owner has canceled the subscription. * + `"APP_MANAGED"`: The service provider has canceled the subscription. * + `"PASSIVE"`: The billing system has canceled the subscription. For example, in case of payment failure or fraud. */ initiator?: InitiatorWithLiterals; } declare enum Initiator { UNKNOWN = "UNKNOWN", USER_REQUESTED = "USER_REQUESTED", APP_MANAGED = "APP_MANAGED", PASSIVE = "PASSIVE" } /** @enumType */ type InitiatorWithLiterals = Initiator | 'UNKNOWN' | 'USER_REQUESTED' | 'APP_MANAGED' | 'PASSIVE'; declare enum RefundType { UNKNOWN = "UNKNOWN", NO_REFUND = "NO_REFUND", FULL_REFUND = "FULL_REFUND", PRORATED_REFUND = "PRORATED_REFUND" } /** @enumType */ type RefundTypeWithLiterals = RefundType | 'UNKNOWN' | 'NO_REFUND' | 'FULL_REFUND' | 'PRORATED_REFUND'; /** Triggered when the subscription's auto renew is turned on. */ interface SubscriptionAutoRenewTurnedOn { /** Subscription for which auto renew is turned on. */ subscription?: Subscription; /** * Supported values: `USER`, `APP`. * * Information about who turned auto renew on. * + `"USER"`: The site owner who purchased the subscription has turned auto renew on. * + `"APP"`: The service provider has turned auto renew on. */ initiator?: string | null; } /** Triggered when the subscription's auto renew is turned off. */ interface SubscriptionAutoRenewTurnedOff { /** Subscription for which auto renew is turned off. */ subscription?: Subscription; /** Details about the cancellation including who canceled the subscription and why. */ cancellationDetails?: CancellationDetails; /** * Whether the subscription is immediately canceled or expires at the end of the current billing cycle. * * Default: `false` */ immediateCancel?: boolean; } /** * Triggered when a subscription is unassigned from a Wix site and becomes * floating. */ interface SubscriptionUnassigned { /** Unassigned subscription. */ subscription?: Subscription; /** * ID of the metasite that the subscription has been assigned to before the event. * @format GUID */ previousMetaSiteId?: string; /** * Reason why the subscription is unassigned. * * + `"UNKNOWN"`: Default value. * + `"USER_REQUESTED"`: The Wix account owner has unassigned the subscription. * + `"REPLACED_BY_ANOTHER_SUBSCRIPTION"`: A different subscription that replaces this subscription is assigned to the site. */ unassignReason?: UnassignReasonWithLiterals; } declare enum UnassignReason { UNKNOWN = "UNKNOWN", USER_REQUESTED = "USER_REQUESTED", REPLACED_BY_ANOTHER_SUBSCRIPTION = "REPLACED_BY_ANOTHER_SUBSCRIPTION" } /** @enumType */ type UnassignReasonWithLiterals = UnassignReason | 'UNKNOWN' | 'USER_REQUESTED' | 'REPLACED_BY_ANOTHER_SUBSCRIPTION'; /** * Triggered when a subscription is transferred from one Wix account to another. * A transfer includes cancelling the original subscription and creating a new * subscription for the target account. The event returns both the original * and the new subscription. */ interface SubscriptionTransferred { /** Original subscription that was canceled for the transfer. */ originSubscription?: Subscription; /** Newly created subscription for the target account. */ targetSubscription?: Subscription; } /** Triggered when a recurring charge succeeds for a subscription. */ interface RecurringChargeSucceeded { /** Subscription for which the recurring charge has succeeded. */ subscription?: Subscription; /** Indication that there was a successful charge at the end of the free trial period */ freeTrialPeriodEnd?: boolean; } /** * Triggered when a subscription was updated including when its product has been * up- or downgraded or the billing cycle is changed. */ interface ContractSwitched { /** Updated subscription. */ subscription?: Subscription; /** Billing cycle before the update. */ previousCycle?: Cycle; /** * ID of the product belonging to the subscription before the update. * @format GUID */ previousProductId?: string; /** * ID of the product type that the subscription's original product belonged to before the update. * @format GUID */ previousProductTypeId?: string; /** * Update type. __Note__: Doesn't include information about a product adjustment. * For that purpose, see `productAdjustment`. * * + `"NOT_APPLICABLE"`: Default value. * + `"ADDITIONAL_QUANTITY"`: An increased usage quota is added to the subscription. For example, a second mailbox is added to a subscription that previously included a single mailbox. * + `"CREDIT_UNUSED_PERIOD"`: The subscription is upgraded and the new price is less than the regular price. The new price applies to every billing cycle, not just the first cycle. * + `"REFUND_PRICE_DIFF"`: Not implemented. * + `"ADJUST_PERIOD_END"`: Not implemented. * + `"DOWNGRADE_GRACE_PERIOD"`: For downgrades during the grace period. In this situation, the site owner hasn’t paid yet and must immediately pay for the downgraded subscription. * + `"FULL_AMOUNT_PERIOD"`: For upgrades in which the site owner retains unused benefits. For example, site owners upgrading a Facebook Ads subscription retain their unused FB Ads credit. The unused credit is added to the new credit. * + `"END_OF_PERIOD"`: The subscription's billing current cycle is extended because of a downgrade. * + `"PENDING_CHANGES"`: The subscription's billing is updated, but the change doesn't apply immediately. Instead, the update becomes effective at the end of current billing cycle. * + `"DOWNGRADE_RENEWAL"`: The subscription is downgraded because of a declined payment. This prevents subscriptions from churning. */ contractSwitchType?: ContractSwitchTypeWithLiterals; /** * ID of the metasite the subscription has been assigned to previously. * Available only in case the subscription is assigned to a different site. * @format GUID */ previousMetaSiteId?: string | null; /** * Update reason. * * + `"PRICE_INCREASE"`: The subscription's price has been increased. * + `"EXTERNAL_PROVIDER_TRIGGER"`: Any reason other than a price increase. */ contractSwitchReason?: ContractSwitchReasonWithLiterals; /** Information about the price update. Available only for updates with a price increase. */ productPriceIncreaseData?: ProductPriceIncreaseData; /** * Information about a product adjustment. For example, a downgrade. * __Note__: This isn't the same as `contractSwitchType`. * * + `NOT_APPLICABLE`: There is no information about whether the product has been up- or downgraded. * + `DOWNGRADE`: The product has been downgraded. */ productAdjustment?: ProductAdjustmentWithLiterals; /** * Number of seats before the contract switch. * @min 1 * @max 500 */ previousSeats?: number | null; } /** Copied from SBS */ declare enum ContractSwitchType { NOT_APPLICABLE = "NOT_APPLICABLE", ADDITIONAL_QUANTITY = "ADDITIONAL_QUANTITY", CREDIT_UNUSED_PERIOD = "CREDIT_UNUSED_PERIOD", REFUND_PRICE_DIFF = "REFUND_PRICE_DIFF", ADJUST_PERIOD_END = "ADJUST_PERIOD_END", DOWNGRADE_GRACE_PERIOD = "DOWNGRADE_GRACE_PERIOD", FULL_AMOUNT_PERIOD = "FULL_AMOUNT_PERIOD", END_OF_PERIOD = "END_OF_PERIOD", PENDING_CHANGES = "PENDING_CHANGES", DOWNGRADE_RENEWAL = "DOWNGRADE_RENEWAL", FIXED_BILLING_DATE_PRORATION = "FIXED_BILLING_DATE_PRORATION", IMMEDIATE_SWITCH = "IMMEDIATE_SWITCH" } /** @enumType */ type ContractSwitchTypeWithLiterals = ContractSwitchType | 'NOT_APPLICABLE' | 'ADDITIONAL_QUANTITY' | 'CREDIT_UNUSED_PERIOD' | 'REFUND_PRICE_DIFF' | 'ADJUST_PERIOD_END' | 'DOWNGRADE_GRACE_PERIOD' | 'FULL_AMOUNT_PERIOD' | 'END_OF_PERIOD' | 'PENDING_CHANGES' | 'DOWNGRADE_RENEWAL' | 'FIXED_BILLING_DATE_PRORATION' | 'IMMEDIATE_SWITCH'; declare enum ContractSwitchReason { EXTERNAL_PROVIDER_TRIGGER = "EXTERNAL_PROVIDER_TRIGGER", PRICE_INCREASE = "PRICE_INCREASE" } /** @enumType */ type ContractSwitchReasonWithLiterals = ContractSwitchReason | 'EXTERNAL_PROVIDER_TRIGGER' | 'PRICE_INCREASE'; /** Triggered when a subscription's price is increased. */ interface ProductPriceIncreaseData { /** * Price of the subscription before the update. * @format DECIMAL_VALUE */ previousPrice?: string | null; /** A value that is used in order to select the correct email template to send the user regarding the price increase. */ emailTemplateSelector?: string | null; /** Used to differentiate between migration segments. Does not have to be unique per segment. */ segmentName?: string | null; /** Used to determine how the price increase was triggered. */ priceIncreaseTrigger?: PriceIncreaseTriggerWithLiterals; } /** Reason for Price Increase Trigger */ declare enum PriceIncreaseTrigger { NEAR_RENEWAL = "NEAR_RENEWAL", RECURRING_SUCCESS = "RECURRING_SUCCESS", MANUAL = "MANUAL" } /** @enumType */ type PriceIncreaseTriggerWithLiterals = PriceIncreaseTrigger | 'NEAR_RENEWAL' | 'RECURRING_SUCCESS' | 'MANUAL'; /** Triggered when a subscription's product is adusted. */ declare enum ProductAdjustment { /** flag to show that the ContractSwitchedEvent is not applicable / needed */ NOT_APPLICABLE = "NOT_APPLICABLE", /** flag to show that the ContractSwitchedEvent is a Downgrade */ DOWNGRADE = "DOWNGRADE" } /** @enumType */ type ProductAdjustmentWithLiterals = ProductAdjustment | 'NOT_APPLICABLE' | 'DOWNGRADE'; /** * Triggered when a subscription gets close to the end of its billing cycle. * The exact number of days is defined in the billing system. */ interface SubscriptionNearEndOfPeriod { /** Subscription that got close to the end of its billing cycle. */ subscription?: Subscription; /** Whether the subscription is within the free trial period. */ inFreeTrial?: boolean; } /** * Triggered when a subscription is updated and the change doesn't happen * immediately but at the end of the current billing cycle. */ interface SubscriptionPendingChange { /** Subscription for which a pending update is triggered. */ subscription?: Subscription; } /** Triggered when a recurring charge attempt failed for a subscription. */ interface RecurringChargeAttemptFailed { /** Subscription for which the recurring charge attempt has failed. */ subscription?: Subscription; } interface ContactSyncRequest { /** @format GUID */ contactIds?: string[]; /** @format GUID */ contactId?: string | null; } interface BulkUpsertAccountsRequest { /** * List of contactIds + points to either insert as new loyalty accounts, or update if contacts already exist as loyalty accounts * @minSize 1 * @maxSize 100 */ accounts?: AccountToUpsert[]; /** * If true, the upserted accounts are returned in response * @deprecated If true, the upserted accounts are returned in response * @targetRemovalDate 2024-02-01 */ returnAccounts?: boolean; /** Description of the action */ description?: string | null; } interface AccountToUpsert { /** @format GUID */ contactId?: string; /** @max 9999999 */ pointsBalance?: number; } interface BulkUpsertAccountsResponse { /** Loyalty accounts that were created or updated */ result?: BulkAccountResult[]; /** Numbers of successes and failures */ metadata?: BulkActionMetadata; } interface BulkAccountResult { /** The created/updated account is returned if specified so in request message. */ account?: LoyaltyAccount; /** LoyaltyAccount metadata. */ metadata?: ItemMetadata; } interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createAccount(): __PublicMethodMetaInfo<'POST', {}, CreateAccountRequest$1, CreateAccountRequest, CreateAccountResponse$1, CreateAccountResponse>; declare function earnPoints(): __PublicMethodMetaInfo<'POST', { accountId: string; }, EarnPointsRequest$1, EarnPointsRequest, EarnPointsResponse$1, EarnPointsResponse>; declare function adjustPoints(): __PublicMethodMetaInfo<'POST', { accountId: string; }, AdjustPointsRequest$1, AdjustPointsRequest, AdjustPointsResponse$1, AdjustPointsResponse>; declare function getAccount(): __PublicMethodMetaInfo<'GET', { id: string; }, GetAccountRequest$1, GetAccountRequest, GetAccountResponse$1, GetAccountResponse>; declare function queryLoyaltyAccounts(): __PublicMethodMetaInfo<'POST', {}, QueryLoyaltyAccountsRequest$1, QueryLoyaltyAccountsRequest, QueryLoyaltyAccountsResponse$1, QueryLoyaltyAccountsResponse>; declare function getProgramTotals(): __PublicMethodMetaInfo<'GET', {}, GetProgramTotalsRequest$1, GetProgramTotalsRequest, GetProgramTotalsResponse$1, GetProgramTotalsResponse>; declare function getCurrentMemberAccount(): __PublicMethodMetaInfo<'GET', {}, GetCurrentMemberAccountRequest$1, GetCurrentMemberAccountRequest, GetCurrentMemberAccountResponse$1, GetCurrentMemberAccountResponse>; declare function getAccountBySecondaryId(): __PublicMethodMetaInfo<'GET', {}, GetAccountBySecondaryIdRequest$1, GetAccountBySecondaryIdRequest, GetAccountBySecondaryIdResponse$1, GetAccountBySecondaryIdResponse>; declare function listAccounts(): __PublicMethodMetaInfo<'GET', {}, ListAccountsRequest$1, ListAccountsRequest, ListAccountsResponse$1, ListAccountsResponse>; declare function searchAccounts(): __PublicMethodMetaInfo<'POST', {}, SearchAccountsRequest$1, SearchAccountsRequest, SearchAccountsResponse$1, SearchAccountsResponse>; declare function countAccounts(): __PublicMethodMetaInfo<'POST', {}, CountAccountsRequest$1, CountAccountsRequest, CountAccountsResponse$1, CountAccountsResponse>; declare function bulkAdjustPoints(): __PublicMethodMetaInfo<'POST', {}, BulkAdjustPointsRequest$1, BulkAdjustPointsRequest, BulkAdjustPointsResponse$1, BulkAdjustPointsResponse>; export { type AccountInfo as AccountInfoOriginal, type AccountToUpsert as AccountToUpsertOriginal, type ActionEvent as ActionEventOriginal, type AdjustPointsRequest as AdjustPointsRequestOriginal, type AdjustPointsRequestTypeOneOf as AdjustPointsRequestTypeOneOfOriginal, type AdjustPointsResponse as AdjustPointsResponseOriginal, type AggregationData as AggregationDataOriginal, type AggregationKindOneOf as AggregationKindOneOfOriginal, type Aggregation as AggregationOriginal, type AggregationResults as AggregationResultsOriginal, type AggregationResultsResultOneOf as AggregationResultsResultOneOfOriginal, type AggregationResultsScalarDateResult as AggregationResultsScalarDateResultOriginal, type AggregationResultsScalarResult as AggregationResultsScalarResultOriginal, AggregationType as AggregationTypeOriginal, type AggregationTypeWithLiterals as AggregationTypeWithLiteralsOriginal, type ApplicationError as ApplicationErrorOriginal, type BillingReference as BillingReferenceOriginal, type BulkAccountResult as BulkAccountResultOriginal, type BulkActionMetadata as BulkActionMetadataOriginal, type BulkAdjustPointsRequest as BulkAdjustPointsRequestOriginal, type BulkAdjustPointsRequestTypeOneOf as BulkAdjustPointsRequestTypeOneOfOriginal, type BulkAdjustPointsResponse as BulkAdjustPointsResponseOriginal, type BulkUpsertAccountsRequest as BulkUpsertAccountsRequestOriginal, type BulkUpsertAccountsResponse as BulkUpsertAccountsResponseOriginal, type CancellationDetails as CancellationDetailsOriginal, type CommonImage as CommonImageOriginal, type Contact as ContactOriginal, type ContactSyncRequest as ContactSyncRequestOriginal, ContractSwitchReason as ContractSwitchReasonOriginal, type ContractSwitchReasonWithLiterals as ContractSwitchReasonWithLiteralsOriginal, ContractSwitchType as ContractSwitchTypeOriginal, type ContractSwitchTypeWithLiterals as ContractSwitchTypeWithLiteralsOriginal, type ContractSwitched as ContractSwitchedOriginal, type CountAccountsRequest as CountAccountsRequestOriginal, type CountAccountsResponse as CountAccountsResponseOriginal, type CreateAccountRequest as CreateAccountRequestOriginal, type CreateAccountResponse as CreateAccountResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type CursorSearch as CursorSearchOriginal, type CursorSearchPagingMethodOneOf as CursorSearchPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type CycleCycleSelectorOneOf as CycleCycleSelectorOneOfOriginal, type Cycle as CycleOriginal, DateHistogramAggregationInterval as DateHistogramAggregationIntervalOriginal, type DateHistogramAggregationIntervalWithLiterals as DateHistogramAggregationIntervalWithLiteralsOriginal, type DateHistogramAggregation as DateHistogramAggregationOriginal, type DateHistogramResult as DateHistogramResultOriginal, type DateHistogramResults as DateHistogramResultsOriginal, type DeductPointsRequest as DeductPointsRequestOriginal, type DeductPointsResponse as DeductPointsResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EarnPointsRequestActivityDetailsOneOf as EarnPointsRequestActivityDetailsOneOfOriginal, type EarnPointsRequest as EarnPointsRequestOriginal, type EarnPointsResponse as EarnPointsResponseOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExportAccountsRequest as ExportAccountsRequestOriginal, type ExportAccountsResponse as ExportAccountsResponseOriginal, type FirstTransaction as FirstTransactionOriginal, type FocalPoint as FocalPointOriginal, type FollowedSocialMedia as FollowedSocialMediaOriginal, type GetAccountBySecondaryIdRequestIdOneOf as GetAccountBySecondaryIdRequestIdOneOfOriginal, type GetAccountBySecondaryIdRequest as GetAccountBySecondaryIdRequestOriginal, type GetAccountBySecondaryIdResponse as GetAccountBySecondaryIdResponseOriginal, type GetAccountRequest as GetAccountRequestOriginal, type GetAccountResponse as GetAccountResponseOriginal, type GetCurrentMemberAccountRequest as GetCurrentMemberAccountRequestOriginal, type GetCurrentMemberAccountResponse as GetCurrentMemberAccountResponseOriginal, type GetProgramTotalsRequest as GetProgramTotalsRequestOriginal, type GetProgramTotalsResponse as GetProgramTotalsResponseOriginal, type GroupByAggregationKindOneOf as GroupByAggregationKindOneOfOriginal, type GroupByAggregation as GroupByAggregationOriginal, type GroupByValueResults as GroupByValueResultsOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type Image as ImageOriginal, type IncludeMissingValuesOptions as IncludeMissingValuesOptionsOriginal, Initiator as InitiatorOriginal, type InitiatorWithLiterals as InitiatorWithLiteralsOriginal, type Interval as IntervalOriginal, IntervalUnit as IntervalUnitOriginal, type IntervalUnitWithLiterals as IntervalUnitWithLiteralsOriginal, type ItemMetadata as ItemMetadataOriginal, type ListAccountsRequest as ListAccountsRequestOriginal, type ListAccountsResponse as ListAccountsResponseOriginal, type ListUserAccountsRequest as ListUserAccountsRequestOriginal, type ListUserAccountsResponse as ListUserAccountsResponseOriginal, type LoyaltyAccountForMetaSite as LoyaltyAccountForMetaSiteOriginal, type LoyaltyAccount as LoyaltyAccountOriginal, type MessageEnvelope as MessageEnvelopeOriginal, MissingValues as MissingValuesOriginal, type MissingValuesWithLiterals as MissingValuesWithLiteralsOriginal, Mode as ModeOriginal, type ModeWithLiterals as ModeWithLiteralsOriginal, type NestedAggregationItemKindOneOf as NestedAggregationItemKindOneOfOriginal, type NestedAggregationItem as NestedAggregationItemOriginal, type NestedAggregation as NestedAggregationOriginal, type NestedAggregationResults as NestedAggregationResultsOriginal, type NestedAggregationResultsResultOneOf as NestedAggregationResultsResultOneOfOriginal, NestedAggregationType as NestedAggregationTypeOriginal, type NestedAggregationTypeWithLiterals as NestedAggregationTypeWithLiteralsOriginal, type NestedResultValue as NestedResultValueOriginal, type NestedResultValueResultOneOf as NestedResultValueResultOneOfOriginal, type NestedResults as NestedResultsOriginal, type NestedValueAggregationResult as NestedValueAggregationResultOriginal, type OneTime as OneTimeOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type PointsExpiration as PointsExpirationOriginal, type Points as PointsOriginal, type PointsUpdated as PointsUpdatedOriginal, PriceIncreaseTrigger as PriceIncreaseTriggerOriginal, type PriceIncreaseTriggerWithLiterals as PriceIncreaseTriggerWithLiteralsOriginal, ProductAdjustment as ProductAdjustmentOriginal, type ProductAdjustmentWithLiterals as ProductAdjustmentWithLiteralsOriginal, type ProductPriceIncreaseData as ProductPriceIncreaseDataOriginal, ProviderName as ProviderNameOriginal, type ProviderNameWithLiterals as ProviderNameWithLiteralsOriginal, type QueryLoyaltyAccountsRequest as QueryLoyaltyAccountsRequestOriginal, type QueryLoyaltyAccountsResponse as QueryLoyaltyAccountsResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, type RangeAggregation as RangeAggregationOriginal, type RangeAggregationResult as RangeAggregationResultOriginal, type RangeBucket as RangeBucketOriginal, type RangeResult as RangeResultOriginal, type RangeResults as RangeResultsOriginal, type ReactivationData as ReactivationDataOriginal, ReactivationReasonEnum as ReactivationReasonEnumOriginal, type ReactivationReasonEnumWithLiterals as ReactivationReasonEnumWithLiteralsOriginal, type RecurringChargeAttemptFailed as RecurringChargeAttemptFailedOriginal, type RecurringChargeSucceeded as RecurringChargeSucceededOriginal, type RedeemDeterminedAmountOfPointsRequest as RedeemDeterminedAmountOfPointsRequestOriginal, type RedeemDeterminedAmountOfPointsResponse as RedeemDeterminedAmountOfPointsResponseOriginal, type RedeemPointsRequest as RedeemPointsRequestOriginal, type RedeemPointsResponse as RedeemPointsResponseOriginal, type RefundTransactionRequest as RefundTransactionRequestOriginal, type RefundTransactionResponse as RefundTransactionResponseOriginal, RefundType as RefundTypeOriginal, type RefundTypeWithLiterals as RefundTypeWithLiteralsOriginal, type RestoreInfo as RestoreInfoOriginal, type Results as ResultsOriginal, type RewardAvailabilityUpdated as RewardAvailabilityUpdatedOriginal, type RollingWindow as RollingWindowOriginal, type ScalarAggregation as ScalarAggregationOriginal, type ScalarDateResult as ScalarDateResultOriginal, type ScalarResult as ScalarResultOriginal, ScalarType as ScalarTypeOriginal, type ScalarTypeWithLiterals as ScalarTypeWithLiteralsOriginal, type SearchAccountsRequest as SearchAccountsRequestOriginal, type SearchAccountsResponse as SearchAccountsResponseOriginal, type SearchDetails as SearchDetailsOriginal, SortDirection as SortDirectionOriginal, type SortDirectionWithLiterals as SortDirectionWithLiteralsOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, SortType as SortTypeOriginal, type SortTypeWithLiterals as SortTypeWithLiteralsOriginal, type Sorting as SortingOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type SubscriptionAssigned as SubscriptionAssignedOriginal, type SubscriptionAutoRenewTurnedOff as SubscriptionAutoRenewTurnedOffOriginal, type SubscriptionAutoRenewTurnedOn as SubscriptionAutoRenewTurnedOnOriginal, type SubscriptionCancelled as SubscriptionCancelledOriginal, type SubscriptionCreated as SubscriptionCreatedOriginal, type SubscriptionEventEventOneOf as SubscriptionEventEventOneOfOriginal, type SubscriptionEvent as SubscriptionEventOriginal, type SubscriptionNearEndOfPeriod as SubscriptionNearEndOfPeriodOriginal, type Subscription as SubscriptionOriginal, type SubscriptionPendingChange as SubscriptionPendingChangeOriginal, SubscriptionStatus as SubscriptionStatusOriginal, type SubscriptionStatusWithLiterals as SubscriptionStatusWithLiteralsOriginal, type SubscriptionTransferred as SubscriptionTransferredOriginal, type SubscriptionUnassigned as SubscriptionUnassignedOriginal, type TierDefinition as TierDefinitionOriginal, type Tier as TierOriginal, type TierTotal as TierTotalOriginal, type TiersProgramSettingsChanged as TiersProgramSettingsChangedOriginal, type TiersProgramSettings as TiersProgramSettingsOriginal, type TiersProgramSettingsPeriodOneOf as TiersProgramSettingsPeriodOneOfOriginal, type TiersRollingUpdate as TiersRollingUpdateOriginal, UnassignReason as UnassignReasonOriginal, type UnassignReasonWithLiterals as UnassignReasonWithLiteralsOriginal, UpdateTrigger as UpdateTriggerOriginal, type UpdateTriggerWithLiterals as UpdateTriggerWithLiteralsOriginal, type ValueAggregationOptionsOneOf as ValueAggregationOptionsOneOfOriginal, type ValueAggregation as ValueAggregationOriginal, type ValueAggregationResult as ValueAggregationResultOriginal, type ValueResult as ValueResultOriginal, type ValueResults as ValueResultsOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, adjustPoints, bulkAdjustPoints, countAccounts, createAccount, earnPoints, getAccount, getAccountBySecondaryId, getCurrentMemberAccount, getProgramTotals, listAccounts, queryLoyaltyAccounts, searchAccounts };