import { CreateLoyaltyImportRequest as CreateLoyaltyImportRequest$1, CreateLoyaltyImportResponse as CreateLoyaltyImportResponse$1, GetLoyaltyImportRequest as GetLoyaltyImportRequest$1, GetLoyaltyImportResponse as GetLoyaltyImportResponse$1, GetErrorFileDownloadUrlRequest as GetErrorFileDownloadUrlRequest$1, GetErrorFileDownloadUrlResponse as GetErrorFileDownloadUrlResponse$1, ExecuteLoyaltyImportRequest as ExecuteLoyaltyImportRequest$1, ExecuteLoyaltyImportResponse as ExecuteLoyaltyImportResponse$1, CreateLoyaltyImportFileUrlRequest as CreateLoyaltyImportFileUrlRequest$1, CreateLoyaltyImportFileUrlResponse as CreateLoyaltyImportFileUrlResponse$1, QueryLoyaltyImportsRequest as QueryLoyaltyImportsRequest$1, QueryLoyaltyImportsResponse as QueryLoyaltyImportsResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** * An Import object is a batch import of loyalty points for existing customers. * You can use Loyalty Imports to import loyalty points from 3rd-party providers or update existing customer point balances. * This object tracks the entire import process from file upload to data processing. */ interface LoyaltyImport { /** * The ID of the import. * @format GUID * @readonly */ id?: string | null; /** * ID of the asynchronous import job associated with this import. * @format GUID * @readonly */ asyncImportJobId?: string | null; /** * Revision number, which increments by 1 each time the loyalty import is updated. * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty import. * * Ignored when creating a loyalty import. * @readonly */ revision?: string | null; /** * Date and time the loyalty import was created. * @readonly */ createdDate?: Date | null; /** * Date and time the loyalty import was last updated. * @readonly */ updatedDate?: Date | null; /** * Current status of the import process. * @readonly */ status?: ImportStatusWithLiterals; /** Metadata of the uploaded file containing loyalty points data. */ fileMetadata?: FileMetadata; /** Results of parsing the uploaded file, including the number of rows parsed and any parse errors. */ parseResult?: ParseResult; /** Results of the import process, including success and failure counts. */ importResult?: ImportResult; } declare enum ImportStatus { /** Status is unknown or not specified. */ UNKNOWN = "UNKNOWN", /** The import has initiated but processing hasn't started yet. */ INITIATED = "INITIATED", /** The system is currently parsing the import file. */ PARSING = "PARSING", /** The import file has been successfully parsed and is ready to import. */ PARSED = "PARSED", /** The system is currently importing the parsed data. */ IMPORTING = "IMPORTING", /** The import process is complete. This status indicates the process finished, but doesn't guarantee all data imported successfully. */ IMPORTED = "IMPORTED", /** The import process has failed. */ FAILED = "FAILED" } /** @enumType */ type ImportStatusWithLiterals = ImportStatus | 'UNKNOWN' | 'INITIATED' | 'PARSING' | 'PARSED' | 'IMPORTING' | 'IMPORTED' | 'FAILED'; interface FileMetadata { /** * Size of the uploaded file in bytes. Max: `10 MB`. * @max 104857600 * @readonly */ size?: number | null; /** * Name of the uploaded file. * @format GUID * @readonly */ name?: string | null; /** * URL of the uploaded file. * @minLength 3 * @maxLength 10000 */ url?: string; /** Column headings from the first row of the uploaded CSV file. */ header?: FileHeader; /** * Mapping between loyalty data fields and the corresponding columns in the uploaded file. * * Must include mappings for both `EMAIL` and `POINTS` to be valid. */ headerMappingInfo?: HeaderMappingInfo; /** * Up to 5 sample rows from the import file, providing a preview of the data to be imported. * @maxSize 5 */ sampleDataRows?: SampleDataRow[]; } interface FileHeader { /** * Column headings from the first row of the uploaded file. * @maxSize 100 * @maxLength 1000 */ values?: string[]; } interface HeaderMappingInfo { /** * Mappings between required loyalty data fields and file columns. * Must contain exactly 2 mappings: one for `"EMAIL"` and one for `"POINTS"`. * @minSize 2 * @maxSize 2 */ headerMappings?: HeaderMapping[]; } interface HeaderMapping { /** The required loyalty data field that this mapping corresponds to. Must be either `"EMAIL"` or `"POINTS"`. */ columnName?: ColumnNameWithLiterals; /** * The zero-based index of the column in the uploaded file that contains the data for this loyalty field. * For example, if the email addresses are in the second column of the CSV file, this value would be `1`. */ columnIndex?: number; } declare enum ColumnName { /** Column containing the customer's email address. */ EMAIL = "EMAIL", /** Column containing the customer's loyalty point balance to be imported or updated. */ POINTS = "POINTS" } /** @enumType */ type ColumnNameWithLiterals = ColumnName | 'EMAIL' | 'POINTS'; interface SampleDataRow { /** * Values in one sample data row. Each value corresponds to a column in the CSV file. * The number of values matches the number of columns in the file. * @maxSize 20 * @maxLength 1000 */ values?: string[]; } interface ParseResult { /** * Number of rows parsed from the uploaded import file. * @readonly */ parsedRowCount?: number | null; /** * Reason code explaining why parsing failed, if applicable. * @readonly * @maxLength 1000 */ parseErrorReason?: string | null; } interface ImportResult { /** Whether an error file detailing import failures is available for download. The file includes row-by-row import status, error reasons, and original data. */ errorFileExists?: boolean; /** * Number of rows successfully imported. * @readonly */ successCount?: number | null; /** * Number of rows that failed to import due to errors. * @readonly */ failureCount?: number | null; } interface CreateLoyaltyImportRequest { /** URL of the file to import. */ fileUrl: string | null; /** Name of the file to import. */ fileName?: string | null; /** Size of the file to import, in bytes. */ fileSize?: number | null; } interface CreateLoyaltyImportResponse { /** Created loyalty import. */ loyaltyImport?: LoyaltyImport; } interface GetLoyaltyImportRequest { /** Loyalty import ID. */ loyaltyImportId: string; } interface GetLoyaltyImportResponse { /** Retrieved loyalty import. */ loyaltyImport?: LoyaltyImport; } interface GetErrorFileDownloadUrlRequest { /** Loyalty import ID. */ loyaltyImportId: string; } interface GetErrorFileDownloadUrlResponse { /** URL for downloading the error file. */ url?: string | null; } interface ExecuteLoyaltyImportRequest { /** Loyalty import ID. */ loyaltyImportId: string; /** Header mapping information for the import file. */ headerMappingInfo?: HeaderMappingInfo; } interface ExecuteLoyaltyImportResponse { /** Executed loyalty import. */ loyaltyImport?: LoyaltyImport; } interface CreateLoyaltyImportFileUrlRequest { } interface CreateLoyaltyImportFileUrlResponse { /** Path where the file will be stored. */ filePath?: string | null; /** URL for uploading the loyalty import file. */ uploadUrl?: string | null; } interface QueryLoyaltyImportsRequest { /** * 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; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal * @maxSize 10 */ selectItemsBy?: Record[] | null; /** * Origin point for geo-distance sorting on a GEO field * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). */ origin?: AddressLocation; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } 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 QueryLoyaltyImportsResponse { /** List of loyalty imports matching the query. */ loyaltyImports?: LoyaltyImport[]; /** 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; /** * Total number of items matching the filter. * Available only on the first page of *Search* results, not included in *Query* or *List* results. * If the Search results span multiple pages, the value of `total` will exceed the number of items returned on the first page. * @internal */ total?: number | 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 DeleteLoyaltyImportRequest { /** * Loyalty import ID. * @format GUID */ loyaltyImportId?: string; /** * Revision number, which increments by 1 each time the loyalty import is updated. * To prevent conflicting changes, the current `revision` must be passed when updating the loyalty import. */ revision?: string; } interface DeleteLoyaltyImportResponse { } 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 * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; /** * Optional domain-specific metadata defined by the API owner, encoded as JSON. * @internal */ additionalMetadataAsJson?: string | null; } 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; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * Map of fully qualified field paths to their previous values for fields that changed. * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format) * @internal */ modifiedFields?: Record; /** * Optional domain-specific metadata defined by the API owner, encoded as JSON. * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted. */ deletedEntityAsJson?: string | null; /** * Optional domain-specific metadata defined by the API owner, encoded as JSON. * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface Empty { } interface ImportFinished { /** Completed loyalty import. */ loyaltyImport?: LoyaltyImport; } 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 createLoyaltyImport(): __PublicMethodMetaInfo<'POST', {}, CreateLoyaltyImportRequest$1, CreateLoyaltyImportRequest, CreateLoyaltyImportResponse$1, CreateLoyaltyImportResponse>; declare function getLoyaltyImport(): __PublicMethodMetaInfo<'GET', {}, GetLoyaltyImportRequest$1, GetLoyaltyImportRequest, GetLoyaltyImportResponse$1, GetLoyaltyImportResponse>; declare function getErrorFileDownloadUrl(): __PublicMethodMetaInfo<'GET', {}, GetErrorFileDownloadUrlRequest$1, GetErrorFileDownloadUrlRequest, GetErrorFileDownloadUrlResponse$1, GetErrorFileDownloadUrlResponse>; declare function executeLoyaltyImport(): __PublicMethodMetaInfo<'POST', {}, ExecuteLoyaltyImportRequest$1, ExecuteLoyaltyImportRequest, ExecuteLoyaltyImportResponse$1, ExecuteLoyaltyImportResponse>; declare function createLoyaltyImportFileUrl(): __PublicMethodMetaInfo<'POST', {}, CreateLoyaltyImportFileUrlRequest$1, CreateLoyaltyImportFileUrlRequest, CreateLoyaltyImportFileUrlResponse$1, CreateLoyaltyImportFileUrlResponse>; declare function queryLoyaltyImports(): __PublicMethodMetaInfo<'POST', {}, QueryLoyaltyImportsRequest$1, QueryLoyaltyImportsRequest, QueryLoyaltyImportsResponse$1, QueryLoyaltyImportsResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type AddressLocation as AddressLocationOriginal, ColumnName as ColumnNameOriginal, type ColumnNameWithLiterals as ColumnNameWithLiteralsOriginal, type CreateLoyaltyImportFileUrlRequest as CreateLoyaltyImportFileUrlRequestOriginal, type CreateLoyaltyImportFileUrlResponse as CreateLoyaltyImportFileUrlResponseOriginal, type CreateLoyaltyImportRequest as CreateLoyaltyImportRequestOriginal, type CreateLoyaltyImportResponse as CreateLoyaltyImportResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteLoyaltyImportRequest as DeleteLoyaltyImportRequestOriginal, type DeleteLoyaltyImportResponse as DeleteLoyaltyImportResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExecuteLoyaltyImportRequest as ExecuteLoyaltyImportRequestOriginal, type ExecuteLoyaltyImportResponse as ExecuteLoyaltyImportResponseOriginal, type FileHeader as FileHeaderOriginal, type FileMetadata as FileMetadataOriginal, type GetErrorFileDownloadUrlRequest as GetErrorFileDownloadUrlRequestOriginal, type GetErrorFileDownloadUrlResponse as GetErrorFileDownloadUrlResponseOriginal, type GetLoyaltyImportRequest as GetLoyaltyImportRequestOriginal, type GetLoyaltyImportResponse as GetLoyaltyImportResponseOriginal, type HeaderMappingInfo as HeaderMappingInfoOriginal, type HeaderMapping as HeaderMappingOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ImportFinished as ImportFinishedOriginal, type ImportResult as ImportResultOriginal, ImportStatus as ImportStatusOriginal, type ImportStatusWithLiterals as ImportStatusWithLiteralsOriginal, type LoyaltyImport as LoyaltyImportOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type ParseResult as ParseResultOriginal, type QueryLoyaltyImportsRequest as QueryLoyaltyImportsRequestOriginal, type QueryLoyaltyImportsResponse as QueryLoyaltyImportsResponseOriginal, type RestoreInfo as RestoreInfoOriginal, type SampleDataRow as SampleDataRowOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createLoyaltyImport, createLoyaltyImportFileUrl, executeLoyaltyImport, getErrorFileDownloadUrl, getLoyaltyImport, queryLoyaltyImports };