@wix/auto_sdk_loyalty_imports 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/build/index.d.mts +88 -0
  2. package/build/index.d.ts +88 -0
  3. package/build/index.js +539 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +505 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/internal/index.d.mts +88 -0
  8. package/build/internal/index.d.ts +88 -0
  9. package/build/internal/index.js +539 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +505 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/build/internal/{cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts → loyalty-imports-v1-loyalty-import-imports.universal-CPUezeMW.d.mts} +57 -174
  14. package/build/{cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts → internal/loyalty-imports-v1-loyalty-import-imports.universal-CPUezeMW.d.ts} +57 -174
  15. package/build/{es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → internal/meta.d.mts} +53 -188
  16. package/build/internal/{es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.ts} +53 -188
  17. package/build/internal/meta.js +348 -0
  18. package/build/internal/meta.js.map +1 -0
  19. package/build/internal/meta.mjs +316 -0
  20. package/build/internal/meta.mjs.map +1 -0
  21. package/build/{es/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts → loyalty-imports-v1-loyalty-import-imports.universal-CPUezeMW.d.mts} +57 -174
  22. package/build/{internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts → loyalty-imports-v1-loyalty-import-imports.universal-CPUezeMW.d.ts} +57 -174
  23. package/build/{cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.mts} +53 -188
  24. package/build/{internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.ts} +53 -188
  25. package/build/meta.js +348 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +316 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +0 -16
  40. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js +0 -23
  41. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +0 -1
  42. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +0 -46
  43. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js +0 -243
  44. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +0 -1
  45. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +0 -18
  46. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js +0 -142
  47. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +0 -1
  48. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +0 -77
  49. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js +0 -61
  50. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +0 -1
  51. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js +0 -41
  52. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +0 -1
  53. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js +0 -340
  54. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/package.json +0 -3
  65. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +0 -16
  66. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.js +0 -16
  67. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +0 -1
  68. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +0 -46
  69. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.js +0 -234
  70. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +0 -1
  71. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +0 -18
  72. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js +0 -110
  73. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +0 -1
  74. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +0 -77
  75. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.js +0 -48
  76. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +0 -1
  77. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.types.js +0 -38
  78. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +0 -1
  79. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js +0 -308
  80. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -1
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +0 -16
  91. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js +0 -23
  92. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +0 -1
  93. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +0 -46
  94. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js +0 -243
  95. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +0 -1
  96. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +0 -18
  97. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js +0 -142
  98. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +0 -1
  99. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +0 -77
  100. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js +0 -61
  101. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +0 -1
  102. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js +0 -41
  103. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +0 -1
  104. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js +0 -340
  105. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +0 -1
  106. package/build/internal/es/index.d.ts +0 -1
  107. package/build/internal/es/index.js +0 -2
  108. package/build/internal/es/index.js.map +0 -1
  109. package/build/internal/es/index.typings.d.ts +0 -1
  110. package/build/internal/es/index.typings.js +0 -2
  111. package/build/internal/es/index.typings.js.map +0 -1
  112. package/build/internal/es/meta.d.ts +0 -1
  113. package/build/internal/es/meta.js +0 -2
  114. package/build/internal/es/meta.js.map +0 -1
  115. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +0 -16
  116. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.js +0 -16
  117. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +0 -1
  118. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +0 -46
  119. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.js +0 -234
  120. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +0 -1
  121. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +0 -18
  122. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js +0 -110
  123. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +0 -1
  124. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +0 -77
  125. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.js +0 -48
  126. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +0 -1
  127. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.types.js +0 -38
  128. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +0 -1
  129. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js +0 -308
  130. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/loyalty-imports-v1-loyalty-import-imports.public.ts","../../src/loyalty-imports-v1-loyalty-import-imports.universal.ts","../../src/loyalty-imports-v1-loyalty-import-imports.http.ts","../../src/loyalty-imports-v1-loyalty-import-imports.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient } from '@wix/sdk-types';\nimport {\n CreateLoyaltyImportFileUrlResponse,\n CreateLoyaltyImportOptions,\n CreateLoyaltyImportResponse,\n ExecuteLoyaltyImportOptions,\n ExecuteLoyaltyImportResponse,\n GetErrorFileDownloadUrlResponse,\n LoyaltyImport,\n LoyaltyImportCreatedEnvelope,\n LoyaltyImportsQueryBuilder,\n createLoyaltyImport as universalCreateLoyaltyImport,\n createLoyaltyImportFileUrl as universalCreateLoyaltyImportFileUrl,\n executeLoyaltyImport as universalExecuteLoyaltyImport,\n getErrorFileDownloadUrl as universalGetErrorFileDownloadUrl,\n getLoyaltyImport as universalGetLoyaltyImport,\n queryLoyaltyImports as universalQueryLoyaltyImports,\n} from './loyalty-imports-v1-loyalty-import-imports.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/loyalty' };\n\nexport function createLoyaltyImport(\n httpClient: HttpClient\n): CreateLoyaltyImportSignature {\n return (fileUrl: string, options?: CreateLoyaltyImportOptions) =>\n universalCreateLoyaltyImport(\n fileUrl,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateLoyaltyImportSignature {\n /**\n * Creates an import object based on an uploaded file.\n *\n * Call this method after uploading your file to the URL obtained from `createLoyaltyImportFileUrl()`.\n * @param - URL of the file to import.\n */\n (\n fileUrl: string,\n options?: CreateLoyaltyImportOptions | undefined\n ): Promise<CreateLoyaltyImportResponse>;\n}\n\nexport function getLoyaltyImport(\n httpClient: HttpClient\n): GetLoyaltyImportSignature {\n return (loyaltyImportId: string) =>\n universalGetLoyaltyImport(\n loyaltyImportId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetLoyaltyImportSignature {\n /**\n * Retrieves a loyalty import.\n * @param - Loyalty import ID.\n * @returns Retrieved loyalty import.\n */\n (loyaltyImportId: string): Promise<LoyaltyImport>;\n}\n\nexport function getErrorFileDownloadUrl(\n httpClient: HttpClient\n): GetErrorFileDownloadUrlSignature {\n return (loyaltyImportId: string) =>\n universalGetErrorFileDownloadUrl(\n loyaltyImportId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetErrorFileDownloadUrlSignature {\n /**\n * Retrieves the download URL for the error file of a failed loyalty import.\n *\n * If an import fails, the `importResult.errorFileExists` field in the `LoyaltyImport` object is set to `true`.\n *\n * Use this method to get the URL of the error file, which contains details about which items couldn't be imported and why.\n * @param - Loyalty import ID.\n */\n (loyaltyImportId: string): Promise<GetErrorFileDownloadUrlResponse>;\n}\n\nexport function executeLoyaltyImport(\n httpClient: HttpClient\n): ExecuteLoyaltyImportSignature {\n return (loyaltyImportId: string, options?: ExecuteLoyaltyImportOptions) =>\n universalExecuteLoyaltyImport(\n loyaltyImportId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ExecuteLoyaltyImportSignature {\n /**\n * Starts the actual import process for a loyalty import.\n *\n * Call this method after the loyalty import object reaches the `PARSED` status.\n * @param - Loyalty import ID.\n */\n (\n loyaltyImportId: string,\n options?: ExecuteLoyaltyImportOptions | undefined\n ): Promise<ExecuteLoyaltyImportResponse>;\n}\n\nexport function createLoyaltyImportFileUrl(\n httpClient: HttpClient\n): CreateLoyaltyImportFileUrlSignature {\n return () =>\n universalCreateLoyaltyImportFileUrl(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateLoyaltyImportFileUrlSignature {\n /**\n * Creates a URL for uploading a loyalty import file.\n *\n * This method is the first step in the loyalty import process. It returns a file path and an upload URL, which you'll use in subsequent steps of the import process.\n */\n (): Promise<CreateLoyaltyImportFileUrlResponse>;\n}\n\nexport function queryLoyaltyImports(\n httpClient: HttpClient\n): QueryLoyaltyImportsSignature {\n return () =>\n universalQueryLoyaltyImports(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryLoyaltyImportsSignature {\n /**\n * Creates a query to retrieve a list of loyalty imports.\n *\n * The `queryLoyaltyImports()` function builds a query to retrieve a list of imports and returns a `LoyaltyImportsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `LoyaltyImportsQueryBuilder` functions onto the query. `LoyaltyImportsQueryBuilder` functions enable you to sort, filter, and control the results `queryLoyaltyImports()` returns.\n *\n * `queryLoyaltyImports()` runs with these `LoyaltyImportsQueryBuilder` defaults, which you can override:\n *\n * - `limit(50)`\n * - `descending(\"_createdDate\")`\n *\n * The functions that are chained to `queryLoyaltyImports()` are applied in the order they're called. For example, if you apply ascending('status') and then descending('_createdDate'), the results are sorted first by the status, and then, if there are multiple results with the same status, the items are sorted by the created date.\n */\n (): LoyaltyImportsQueryBuilder;\n}\n\nexport const onLoyaltyImportCreated = EventDefinition(\n 'wix.loyalty.imports.v1.loyalty_import_created',\n true,\n (event: LoyaltyImportCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<LoyaltyImportCreatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n ColumnName,\n CreateLoyaltyImportFileUrlRequest,\n CreateLoyaltyImportFileUrlResponse,\n CreateLoyaltyImportOptions,\n CreateLoyaltyImportRequest,\n CreateLoyaltyImportResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteLoyaltyImportRequest,\n DeleteLoyaltyImportResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExecuteLoyaltyImportOptions,\n ExecuteLoyaltyImportRequest,\n ExecuteLoyaltyImportResponse,\n FileHeader,\n FileMetadata,\n GetErrorFileDownloadUrlRequest,\n GetErrorFileDownloadUrlResponse,\n GetLoyaltyImportRequest,\n GetLoyaltyImportResponse,\n HeaderMapping,\n HeaderMappingInfo,\n IdentificationData,\n IdentificationDataIdOneOf,\n ImportFinished,\n ImportResult,\n ImportStatus,\n LoyaltyImport,\n LoyaltyImportCreatedEnvelope,\n LoyaltyImportsQueryBuilder,\n LoyaltyImportsQueryResult,\n MessageEnvelope,\n ParseResult,\n QueryLoyaltyImportsRequest,\n QueryLoyaltyImportsResponse,\n RestoreInfo,\n SampleDataRow,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n} from './loyalty-imports-v1-loyalty-import-imports.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixLoyaltyImportsV1LoyaltyImport from './loyalty-imports-v1-loyalty-import-imports.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * An Import object is a batch import of loyalty points for existing customers.\n * You can use Loyalty Imports to import loyalty points from 3rd-party providers or update existing customer point balances.\n * This object tracks the entire import process from file upload to data processing.\n */\nexport interface LoyaltyImport {\n /**\n * The ID of the import.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * ID of the asynchronous import job associated with this import.\n * @format GUID\n * @readonly\n */\n asyncImportJobId?: string | null;\n /**\n * Revision number, which increments by 1 each time the Loyalty Import is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the Loyalty Import.\n *\n * Ignored when creating a Loyalty Import.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the Loyalty Import was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the Loyalty Import was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Current status of the import process.\n * @readonly\n */\n status?: ImportStatusWithLiterals;\n /** Metadata of the uploaded file containing loyalty points data. */\n fileMetadata?: FileMetadata;\n /** Results of parsing the uploaded file, including the number of rows parsed and any parse errors. */\n parseResult?: ParseResult;\n /** Results of the import process, including success and failure counts. */\n importResult?: ImportResult;\n}\n\nexport enum ImportStatus {\n /** Status is unknown or not specified. */\n UNKNOWN = 'UNKNOWN',\n /** The import has been initiated but processing has not yet begun. */\n INITIATED = 'INITIATED',\n /** The system is currently parsing the import file. */\n PARSING = 'PARSING',\n /** The import file has been successfully parsed and is ready for importing. */\n PARSED = 'PARSED',\n /** The system is currently importing the parsed data. */\n IMPORTING = 'IMPORTING',\n /** The import process is complete. This status indicates the process finished, but doesn't guarantee all data imported successfully. */\n IMPORTED = 'IMPORTED',\n /** The import process has failed. */\n FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type ImportStatusWithLiterals =\n | ImportStatus\n | 'UNKNOWN'\n | 'INITIATED'\n | 'PARSING'\n | 'PARSED'\n | 'IMPORTING'\n | 'IMPORTED'\n | 'FAILED';\n\nexport interface FileMetadata {\n /**\n * Size of the uploaded file in bytes. Max: `10 MB`.\n * @max 104857600\n * @readonly\n */\n size?: number | null;\n /**\n * Name of the uploaded file.\n * @format GUID\n * @readonly\n */\n name?: string | null;\n /**\n * URL of the uploaded file.\n * @minLength 3\n * @maxLength 10000\n */\n url?: string;\n /** Column headings from the first row of the uploaded CSV file. */\n header?: FileHeader;\n /**\n * Mapping between loyalty data fields and the corresponding columns in the uploaded file.\n *\n * Must include mappings for both `EMAIL` and `POINTS` to be valid.\n */\n headerMappingInfo?: HeaderMappingInfo;\n /**\n * Up to 5 sample rows from the import file, providing a preview of the data to be imported.\n * @maxSize 5\n */\n sampleDataRows?: SampleDataRow[];\n}\n\nexport interface FileHeader {\n /**\n * Column headings from the first row of the uploaded file.\n * @maxSize 100\n * @maxLength 1000\n */\n values?: string[];\n}\n\nexport interface HeaderMappingInfo {\n /**\n * Mappings between required loyalty data fields and file columns.\n * Must contain exactly 2 mappings: one for `EMAIL` and one for `POINTS`.\n * @minSize 2\n * @maxSize 2\n */\n headerMappings?: HeaderMapping[];\n}\n\nexport interface HeaderMapping {\n /** The required loyalty data field that this mapping corresponds to. Must be either `EMAIL` or `POINTS`. */\n columnName?: ColumnNameWithLiterals;\n /**\n * The zero-based index of the column in the uploaded file that contains the data for this loyalty field.\n * For example, if the email addresses are in the second column of the CSV file, this value would be 1.\n */\n columnIndex?: number;\n}\n\nexport enum ColumnName {\n /** Column containing the customer's email address. */\n EMAIL = 'EMAIL',\n /** Column containing the customer's loyalty point balance to be imported or updated. */\n POINTS = 'POINTS',\n}\n\n/** @enumType */\nexport type ColumnNameWithLiterals = ColumnName | 'EMAIL' | 'POINTS';\n\nexport interface SampleDataRow {\n /**\n * Values in one sample data row. Each value corresponds to a column in the CSV file.\n * The number of values matches the number of columns in the file.\n * @maxSize 20\n * @maxLength 1000\n */\n values?: string[];\n}\n\nexport interface ParseResult {\n /**\n * Number of rows parsed from the uploaded import file.\n * @readonly\n */\n parsedRowCount?: number | null;\n /**\n * Reason code explaining why parsing failed, if applicable.\n * @readonly\n * @maxLength 1000\n */\n parseErrorReason?: string | null;\n}\n\nexport interface ImportResult {\n /** Whether an error file detailing import failures is available for download. The file includes row-by-row import status, error reasons, and original data. */\n errorFileExists?: boolean;\n /**\n * Number of rows successfully imported.\n * @readonly\n */\n successCount?: number | null;\n /**\n * Number of rows that failed to import due to errors.\n * @readonly\n */\n failureCount?: number | null;\n}\n\nexport interface CreateLoyaltyImportRequest {\n /** URL of the file to import. */\n fileUrl: string | null;\n /** Name of the file to import. */\n fileName?: string | null;\n /** Size of the file to import, in bytes. */\n fileSize?: number | null;\n}\n\nexport interface CreateLoyaltyImportResponse {\n /** Created loyalty import. */\n loyaltyImport?: LoyaltyImport;\n}\n\nexport interface GetLoyaltyImportRequest {\n /** Loyalty import ID. */\n loyaltyImportId: string;\n}\n\nexport interface GetLoyaltyImportResponse {\n /** Retrieved loyalty import. */\n loyaltyImport?: LoyaltyImport;\n}\n\nexport interface GetErrorFileDownloadUrlRequest {\n /** Loyalty import ID. */\n loyaltyImportId: string;\n}\n\nexport interface GetErrorFileDownloadUrlResponse {\n /** URL for downloading the error file. */\n url?: string | null;\n}\n\nexport interface ExecuteLoyaltyImportRequest {\n /** Loyalty import ID. */\n loyaltyImportId: string;\n /** Header mapping information for the import file. */\n headerMappingInfo?: HeaderMappingInfo;\n}\n\nexport interface ExecuteLoyaltyImportResponse {\n /** Executed loyalty import. */\n loyaltyImport?: LoyaltyImport;\n}\n\nexport interface CreateLoyaltyImportFileUrlRequest {}\n\nexport interface CreateLoyaltyImportFileUrlResponse {\n /** Path where the file will be stored. */\n filePath?: string | null;\n /** URL for uploading the loyalty import file. */\n uploadUrl?: string | null;\n}\n\nexport interface QueryLoyaltyImportsRequest {\n /**\n * Filter object.\n * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)\n * for more information.\n *\n * For a detailed list of supported filters, see\n * [Supported Filters](https://dev.wix.com/api/rest/wix-loyalty-program/loyalty-imports/supported-filters).\n */\n query: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryLoyaltyImportsResponse {\n /** List of loyalty imports matching the query. */\n loyaltyImports?: LoyaltyImport[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface DeleteLoyaltyImportRequest {\n /**\n * Loyalty import ID.\n * @format GUID\n */\n loyaltyImportId?: string;\n /**\n * Revision number, which increments by 1 each time the loyalty import is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the loyalty import.\n */\n revision?: string;\n}\n\nexport interface DeleteLoyaltyImportResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface ImportFinished {\n /** Completed loyalty import. */\n loyaltyImport?: LoyaltyImport;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface LoyaltyImportCreatedEnvelope {\n entity: LoyaltyImport;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a loyalty import is created.\n * @webhook\n * @eventType wix.loyalty.imports.v1.loyalty_import_created\n * @serviceIdentifier wix.loyalty.imports.v1.LoyaltyImports\n * @slug created\n */\nexport declare function onLoyaltyImportCreated(\n handler: (event: LoyaltyImportCreatedEnvelope) => void | Promise<void>\n): void;\n\ntype LoyaltyImportNonNullablePaths =\n | `status`\n | `fileMetadata.url`\n | `fileMetadata.header.values`\n | `fileMetadata.headerMappingInfo.headerMappings`\n | `fileMetadata.headerMappingInfo.headerMappings.${number}.columnName`\n | `fileMetadata.headerMappingInfo.headerMappings.${number}.columnIndex`\n | `fileMetadata.sampleDataRows`\n | `importResult.errorFileExists`;\n\n/**\n * Creates an import object based on an uploaded file.\n *\n * Call this method after uploading your file to the URL obtained from `createLoyaltyImportFileUrl()`.\n * @param fileUrl - URL of the file to import.\n * @public\n * @requiredField fileUrl\n * @permissionId LOYALTY.MANAGE_IMPORTS\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @applicableIdentity APP\n * @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImport\n */\nexport async function createLoyaltyImport(\n fileUrl: string,\n options?: CreateLoyaltyImportOptions\n): Promise<\n NonNullablePaths<\n CreateLoyaltyImportResponse,\n {\n [P in LoyaltyImportNonNullablePaths]: `loyaltyImport.${P}`;\n }[LoyaltyImportNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fileUrl: fileUrl,\n fileName: options?.fileName,\n fileSize: options?.fileSize,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyImportsV1LoyaltyImport.createLoyaltyImport(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fileUrl: '$[0]',\n fileName: '$[1].fileName',\n fileSize: '$[1].fileSize',\n },\n singleArgumentUnchanged: false,\n },\n ['fileUrl', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateLoyaltyImportOptions {\n /** Name of the file to import. */\n fileName?: string | null;\n /** Size of the file to import, in bytes. */\n fileSize?: number | null;\n}\n\n/**\n * Retrieves a loyalty import.\n * @param loyaltyImportId - Loyalty import ID.\n * @public\n * @requiredField loyaltyImportId\n * @permissionId LOYALTY.MANAGE_IMPORTS\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @applicableIdentity APP\n * @returns Retrieved loyalty import.\n * @fqn wix.loyalty.imports.v1.LoyaltyImports.GetLoyaltyImport\n */\nexport async function getLoyaltyImport(\n loyaltyImportId: string\n): Promise<NonNullablePaths<LoyaltyImport, LoyaltyImportNonNullablePaths>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n loyaltyImportId: loyaltyImportId,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyImportsV1LoyaltyImport.getLoyaltyImport(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.loyaltyImport!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { loyaltyImportId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['loyaltyImportId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves the download URL for the error file of a failed loyalty import.\n *\n * If an import fails, the `importResult.errorFileExists` field in the `LoyaltyImport` object is set to `true`.\n *\n * Use this method to get the URL of the error file, which contains details about which items couldn't be imported and why.\n * @param loyaltyImportId - Loyalty import ID.\n * @public\n * @requiredField loyaltyImportId\n * @permissionId LOYALTY.MANAGE_IMPORTS\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @applicableIdentity APP\n * @fqn wix.loyalty.imports.v1.LoyaltyImports.GetErrorFileDownloadUrl\n */\nexport async function getErrorFileDownloadUrl(\n loyaltyImportId: string\n): Promise<GetErrorFileDownloadUrlResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n loyaltyImportId: loyaltyImportId,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyImportsV1LoyaltyImport.getErrorFileDownloadUrl(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { loyaltyImportId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['loyaltyImportId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Starts the actual import process for a loyalty import.\n *\n * Call this method after the loyalty import object reaches the `PARSED` status.\n * @param loyaltyImportId - Loyalty import ID.\n * @public\n * @requiredField loyaltyImportId\n * @permissionId LOYALTY.MANAGE_IMPORTS\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @applicableIdentity APP\n * @fqn wix.loyalty.imports.v1.LoyaltyImports.ExecuteLoyaltyImport\n */\nexport async function executeLoyaltyImport(\n loyaltyImportId: string,\n options?: ExecuteLoyaltyImportOptions\n): Promise<\n NonNullablePaths<\n ExecuteLoyaltyImportResponse,\n {\n [P in LoyaltyImportNonNullablePaths]: `loyaltyImport.${P}`;\n }[LoyaltyImportNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n loyaltyImportId: loyaltyImportId,\n headerMappingInfo: options?.headerMappingInfo,\n });\n\n const reqOpts =\n ambassadorWixLoyaltyImportsV1LoyaltyImport.executeLoyaltyImport(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n loyaltyImportId: '$[0]',\n headerMappingInfo: '$[1].headerMappingInfo',\n },\n singleArgumentUnchanged: false,\n },\n ['loyaltyImportId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ExecuteLoyaltyImportOptions {\n /** Header mapping information for the import file. */\n headerMappingInfo?: HeaderMappingInfo;\n}\n\n/**\n * Creates a URL for uploading a loyalty import file.\n *\n * This method is the first step in the loyalty import process. It returns a file path and an upload URL, which you'll use in subsequent steps of the import process.\n * @public\n * @permissionId LOYALTY.MANAGE_IMPORTS\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @applicableIdentity APP\n * @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImportFileUrl\n */\nexport async function createLoyaltyImportFileUrl(): Promise<CreateLoyaltyImportFileUrlResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixLoyaltyImportsV1LoyaltyImport.createLoyaltyImportFileUrl(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a query to retrieve a list of loyalty imports.\n *\n * The `queryLoyaltyImports()` function builds a query to retrieve a list of imports and returns a `LoyaltyImportsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `LoyaltyImportsQueryBuilder` functions onto the query. `LoyaltyImportsQueryBuilder` functions enable you to sort, filter, and control the results `queryLoyaltyImports()` returns.\n *\n * `queryLoyaltyImports()` runs with these `LoyaltyImportsQueryBuilder` defaults, which you can override:\n *\n * - `limit(50)`\n * - `descending(\"_createdDate\")`\n *\n * The functions that are chained to `queryLoyaltyImports()` are applied in the order they're called. For example, if you apply ascending('status') and then descending('_createdDate'), the results are sorted first by the status, and then, if there are multiple results with the same status, the items are sorted by the created date.\n * @public\n * @permissionScope Manage Loyalty\n * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId LOYALTY.MANAGE_IMPORTS\n * @applicableIdentity APP\n * @fqn wix.loyalty.imports.v1.LoyaltyImports.QueryLoyaltyImports\n */\nexport function queryLoyaltyImports(): LoyaltyImportsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n LoyaltyImport,\n 'CURSOR',\n QueryLoyaltyImportsRequest,\n QueryLoyaltyImportsResponse\n >({\n func: async (payload: QueryLoyaltyImportsRequest) => {\n const reqOpts =\n ambassadorWixLoyaltyImportsV1LoyaltyImport.queryLoyaltyImports(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryLoyaltyImportsRequest['query']) => {\n const args = [query, {}] as [QueryLoyaltyImportsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryLoyaltyImportsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.loyaltyImports,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface LoyaltyImportsQueryResult extends QueryCursorResult {\n items: LoyaltyImport[];\n query: LoyaltyImportsQueryBuilder;\n next: () => Promise<LoyaltyImportsQueryResult>;\n prev: () => Promise<LoyaltyImportsQueryResult>;\n}\n\nexport interface LoyaltyImportsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName: '_createdDate' | '_updatedDate' | 'status',\n value: any\n ) => LoyaltyImportsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName: '_createdDate' | '_updatedDate' | 'status',\n value: any\n ) => LoyaltyImportsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => LoyaltyImportsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => LoyaltyImportsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => LoyaltyImportsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => LoyaltyImportsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName: '_createdDate' | '_updatedDate' | 'status',\n value: any[]\n ) => LoyaltyImportsQueryBuilder;\n in: (\n propertyName: '_createdDate' | '_updatedDate' | 'status',\n value: any\n ) => LoyaltyImportsQueryBuilder;\n exists: (\n propertyName: '_createdDate' | '_updatedDate' | 'status',\n value: boolean\n ) => LoyaltyImportsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate' | 'status'>\n ) => LoyaltyImportsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<'_createdDate' | '_updatedDate' | 'status'>\n ) => LoyaltyImportsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => LoyaltyImportsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => LoyaltyImportsQueryBuilder;\n find: () => Promise<LoyaltyImportsQueryResult>;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixLoyaltyImportsV1LoyaltyImportsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/loyalty-imports',\n destPath: '',\n },\n {\n srcPath: '/_api/loyalty-imports',\n destPath: '/api',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/loyalty-imports',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/loyalty-imports',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/loyalty-imports',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/loyalty-imports',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/loyalty-imports',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_loyalty_imports';\n\n/**\n * Creates an import object based on an uploaded file.\n *\n * Call this method after uploading your file to the URL obtained from `createLoyaltyImportFileUrl()`.\n */\nexport function createLoyaltyImport(\n payload: object\n): RequestOptionsFactory<any> {\n function __createLoyaltyImport({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.imports.v1.loyalty_import',\n method: 'POST' as any,\n methodFqn: 'wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImport',\n packageName: PACKAGE_NAME,\n url: resolveWixLoyaltyImportsV1LoyaltyImportsUrl({\n protoPath: '/v1/loyalty-imports',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyImport.createdDate' },\n { path: 'loyaltyImport.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createLoyaltyImport;\n}\n\n/** Retrieves a loyalty import. */\nexport function getLoyaltyImport(payload: object): RequestOptionsFactory<any> {\n function __getLoyaltyImport({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.imports.v1.loyalty_import',\n method: 'GET' as any,\n methodFqn: 'wix.loyalty.imports.v1.LoyaltyImports.GetLoyaltyImport',\n packageName: PACKAGE_NAME,\n url: resolveWixLoyaltyImportsV1LoyaltyImportsUrl({\n protoPath: '/v1/loyalty-imports',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyImport.createdDate' },\n { path: 'loyaltyImport.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLoyaltyImport;\n}\n\n/**\n * Retrieves the download URL for the error file of a failed loyalty import.\n *\n * If an import fails, the `importResult.errorFileExists` field in the `LoyaltyImport` object is set to `true`.\n *\n * Use this method to get the URL of the error file, which contains details about which items couldn't be imported and why.\n */\nexport function getErrorFileDownloadUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __getErrorFileDownloadUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.imports.v1.loyalty_import',\n method: 'GET' as any,\n methodFqn:\n 'wix.loyalty.imports.v1.LoyaltyImports.GetErrorFileDownloadUrl',\n packageName: PACKAGE_NAME,\n url: resolveWixLoyaltyImportsV1LoyaltyImportsUrl({\n protoPath: '/v1/loyalty-imports/error-file-download-url',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getErrorFileDownloadUrl;\n}\n\n/**\n * Starts the actual import process for a loyalty import.\n *\n * Call this method after the loyalty import object reaches the `PARSED` status.\n */\nexport function executeLoyaltyImport(\n payload: object\n): RequestOptionsFactory<any> {\n function __executeLoyaltyImport({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.imports.v1.loyalty_import',\n method: 'POST' as any,\n methodFqn: 'wix.loyalty.imports.v1.LoyaltyImports.ExecuteLoyaltyImport',\n packageName: PACKAGE_NAME,\n url: resolveWixLoyaltyImportsV1LoyaltyImportsUrl({\n protoPath: '/v1/loyalty-imports/execute',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyImport.createdDate' },\n { path: 'loyaltyImport.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __executeLoyaltyImport;\n}\n\n/**\n * Creates a URL for uploading a loyalty import file.\n *\n * This method is the first step in the loyalty import process. It returns a file path and an upload URL, which you'll use in subsequent steps of the import process.\n */\nexport function createLoyaltyImportFileUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __createLoyaltyImportFileUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.imports.v1.loyalty_import',\n method: 'POST' as any,\n methodFqn:\n 'wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImportFileUrl',\n packageName: PACKAGE_NAME,\n url: resolveWixLoyaltyImportsV1LoyaltyImportsUrl({\n protoPath: '/v1/loyalty-imports/wixmp-upload-url',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __createLoyaltyImportFileUrl;\n}\n\n/**\n * Creates a query to retrieve a list of loyalty imports.\n *\n * The `queryLoyaltyImports()` function builds a query to retrieve a list of imports and returns a `LoyaltyImportsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` function.\n *\n * You can refine the query by chaining `LoyaltyImportsQueryBuilder` functions onto the query. `LoyaltyImportsQueryBuilder` functions enable you to sort, filter, and control the results `queryLoyaltyImports()` returns.\n *\n * `queryLoyaltyImports()` runs with these `LoyaltyImportsQueryBuilder` defaults, which you can override:\n *\n * - `limit(50)`\n * - `descending(\"_createdDate\")`\n *\n * The functions that are chained to `queryLoyaltyImports()` are applied in the order they're called. For example, if you apply ascending('status') and then descending('_createdDate'), the results are sorted first by the status, and then, if there are multiple results with the same status, the items are sorted by the created date.\n */\nexport function queryLoyaltyImports(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryLoyaltyImports({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.loyalty.imports.v1.loyalty_import',\n method: 'POST' as any,\n methodFqn: 'wix.loyalty.imports.v1.LoyaltyImports.QueryLoyaltyImports',\n packageName: PACKAGE_NAME,\n url: resolveWixLoyaltyImportsV1LoyaltyImportsUrl({\n protoPath: '/v1/loyalty-imports/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'loyaltyImports.createdDate' },\n { path: 'loyaltyImports.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLoyaltyImports;\n}\n","import {\n createLoyaltyImport as publicCreateLoyaltyImport,\n getLoyaltyImport as publicGetLoyaltyImport,\n getErrorFileDownloadUrl as publicGetErrorFileDownloadUrl,\n executeLoyaltyImport as publicExecuteLoyaltyImport,\n createLoyaltyImportFileUrl as publicCreateLoyaltyImportFileUrl,\n queryLoyaltyImports as publicQueryLoyaltyImports,\n} from './loyalty-imports-v1-loyalty-import-imports.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onLoyaltyImportCreated as publicOnLoyaltyImportCreated } from './loyalty-imports-v1-loyalty-import-imports.public.js';\n\nexport const createLoyaltyImport: MaybeContext<\n BuildRESTFunction<typeof publicCreateLoyaltyImport> &\n typeof publicCreateLoyaltyImport\n> = /*#__PURE__*/ createRESTModule(publicCreateLoyaltyImport);\nexport const getLoyaltyImport: MaybeContext<\n BuildRESTFunction<typeof publicGetLoyaltyImport> &\n typeof publicGetLoyaltyImport\n> = /*#__PURE__*/ createRESTModule(publicGetLoyaltyImport);\nexport const getErrorFileDownloadUrl: MaybeContext<\n BuildRESTFunction<typeof publicGetErrorFileDownloadUrl> &\n typeof publicGetErrorFileDownloadUrl\n> = /*#__PURE__*/ createRESTModule(publicGetErrorFileDownloadUrl);\nexport const executeLoyaltyImport: MaybeContext<\n BuildRESTFunction<typeof publicExecuteLoyaltyImport> &\n typeof publicExecuteLoyaltyImport\n> = /*#__PURE__*/ createRESTModule(publicExecuteLoyaltyImport);\nexport const createLoyaltyImportFileUrl: MaybeContext<\n BuildRESTFunction<typeof publicCreateLoyaltyImportFileUrl> &\n typeof publicCreateLoyaltyImportFileUrl\n> = /*#__PURE__*/ createRESTModule(publicCreateLoyaltyImportFileUrl);\nexport const queryLoyaltyImports: MaybeContext<\n BuildRESTFunction<typeof publicQueryLoyaltyImports> &\n typeof publicQueryLoyaltyImports\n> = /*#__PURE__*/ createRESTModule(publicQueryLoyaltyImports);\n/**\n * Triggered when a loyalty import is created.\n */\nexport const onLoyaltyImportCreated: BuildEventDefinition<\n typeof publicOnLoyaltyImportCreated\n> = createEventModule(publicOnLoyaltyImportCreated);\n\nexport {\n ImportStatus,\n ColumnName,\n SortOrder,\n WebhookIdentityType,\n} from './loyalty-imports-v1-loyalty-import-imports.universal.js';\nexport {\n LoyaltyImport,\n FileMetadata,\n FileHeader,\n HeaderMappingInfo,\n HeaderMapping,\n SampleDataRow,\n ParseResult,\n ImportResult,\n CreateLoyaltyImportRequest,\n CreateLoyaltyImportResponse,\n GetLoyaltyImportRequest,\n GetLoyaltyImportResponse,\n GetErrorFileDownloadUrlRequest,\n GetErrorFileDownloadUrlResponse,\n ExecuteLoyaltyImportRequest,\n ExecuteLoyaltyImportResponse,\n CreateLoyaltyImportFileUrlRequest,\n CreateLoyaltyImportFileUrlResponse,\n QueryLoyaltyImportsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryLoyaltyImportsResponse,\n CursorPagingMetadata,\n Cursors,\n DeleteLoyaltyImportRequest,\n DeleteLoyaltyImportResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n ImportFinished,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n LoyaltyImportCreatedEnvelope,\n CreateLoyaltyImportOptions,\n ExecuteLoyaltyImportOptions,\n LoyaltyImportsQueryResult,\n LoyaltyImportsQueryBuilder,\n} from './loyalty-imports-v1-loyalty-import-imports.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAmC;;;ACH5C,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,4CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM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kB,sBAA4B;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTTimestampToSDKTimestamp","transformPaths","payload","transformPaths","ImportStatus","ColumnName","SortOrder","WebhookIdentityType","createLoyaltyImport","getLoyaltyImport","getErrorFileDownloadUrl","executeLoyaltyImport","createLoyaltyImportFileUrl","queryLoyaltyImports","createLoyaltyImport","getLoyaltyImport","getErrorFileDownloadUrl","executeLoyaltyImport","createLoyaltyImportFileUrl","queryLoyaltyImports","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","createLoyaltyImport","getLoyaltyImport","getErrorFileDownloadUrl","executeLoyaltyImport","createLoyaltyImportFileUrl","queryLoyaltyImports","onLoyaltyImportCreated"]}
@@ -1,10 +1,9 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
1
  /**
3
2
  * An Import object is a batch import of loyalty points for existing customers.
4
3
  * You can use Loyalty Imports to import loyalty points from 3rd-party providers or update existing customer point balances.
5
4
  * This object tracks the entire import process from file upload to data processing.
6
5
  */
7
- export interface LoyaltyImport {
6
+ interface LoyaltyImport {
8
7
  /**
9
8
  * The ID of the import.
10
9
  * @format GUID
@@ -47,7 +46,7 @@ export interface LoyaltyImport {
47
46
  /** Results of the import process, including success and failure counts. */
48
47
  importResult?: ImportResult;
49
48
  }
50
- export declare enum ImportStatus {
49
+ declare enum ImportStatus {
51
50
  /** Status is unknown or not specified. */
52
51
  UNKNOWN = "UNKNOWN",
53
52
  /** The import has been initiated but processing has not yet begun. */
@@ -64,8 +63,8 @@ export declare enum ImportStatus {
64
63
  FAILED = "FAILED"
65
64
  }
66
65
  /** @enumType */
67
- export type ImportStatusWithLiterals = ImportStatus | 'UNKNOWN' | 'INITIATED' | 'PARSING' | 'PARSED' | 'IMPORTING' | 'IMPORTED' | 'FAILED';
68
- export interface FileMetadata {
66
+ type ImportStatusWithLiterals = ImportStatus | 'UNKNOWN' | 'INITIATED' | 'PARSING' | 'PARSED' | 'IMPORTING' | 'IMPORTED' | 'FAILED';
67
+ interface FileMetadata {
69
68
  /**
70
69
  * Size of the uploaded file in bytes. Max: `10 MB`.
71
70
  * @max 104857600
@@ -98,7 +97,7 @@ export interface FileMetadata {
98
97
  */
99
98
  sampleDataRows?: SampleDataRow[];
100
99
  }
101
- export interface FileHeader {
100
+ interface FileHeader {
102
101
  /**
103
102
  * Column headings from the first row of the uploaded file.
104
103
  * @maxSize 100
@@ -106,7 +105,7 @@ export interface FileHeader {
106
105
  */
107
106
  values?: string[];
108
107
  }
109
- export interface HeaderMappingInfo {
108
+ interface HeaderMappingInfo {
110
109
  /**
111
110
  * Mappings between required loyalty data fields and file columns.
112
111
  * Must contain exactly 2 mappings: one for `EMAIL` and one for `POINTS`.
@@ -115,7 +114,7 @@ export interface HeaderMappingInfo {
115
114
  */
116
115
  headerMappings?: HeaderMapping[];
117
116
  }
118
- export interface HeaderMapping {
117
+ interface HeaderMapping {
119
118
  /** The required loyalty data field that this mapping corresponds to. Must be either `EMAIL` or `POINTS`. */
120
119
  columnName?: ColumnNameWithLiterals;
121
120
  /**
@@ -124,15 +123,15 @@ export interface HeaderMapping {
124
123
  */
125
124
  columnIndex?: number;
126
125
  }
127
- export declare enum ColumnName {
126
+ declare enum ColumnName {
128
127
  /** Column containing the customer's email address. */
129
128
  EMAIL = "EMAIL",
130
129
  /** Column containing the customer's loyalty point balance to be imported or updated. */
131
130
  POINTS = "POINTS"
132
131
  }
133
132
  /** @enumType */
134
- export type ColumnNameWithLiterals = ColumnName | 'EMAIL' | 'POINTS';
135
- export interface SampleDataRow {
133
+ type ColumnNameWithLiterals = ColumnName | 'EMAIL' | 'POINTS';
134
+ interface SampleDataRow {
136
135
  /**
137
136
  * Values in one sample data row. Each value corresponds to a column in the CSV file.
138
137
  * The number of values matches the number of columns in the file.
@@ -141,7 +140,7 @@ export interface SampleDataRow {
141
140
  */
142
141
  values?: string[];
143
142
  }
144
- export interface ParseResult {
143
+ interface ParseResult {
145
144
  /**
146
145
  * Number of rows parsed from the uploaded import file.
147
146
  * @readonly
@@ -154,7 +153,7 @@ export interface ParseResult {
154
153
  */
155
154
  parseErrorReason?: string | null;
156
155
  }
157
- export interface ImportResult {
156
+ interface ImportResult {
158
157
  /** Whether an error file detailing import failures is available for download. The file includes row-by-row import status, error reasons, and original data. */
159
158
  errorFileExists?: boolean;
160
159
  /**
@@ -168,7 +167,7 @@ export interface ImportResult {
168
167
  */
169
168
  failureCount?: number | null;
170
169
  }
171
- export interface CreateLoyaltyImportRequest {
170
+ interface CreateLoyaltyImportRequest {
172
171
  /** URL of the file to import. */
173
172
  fileUrl: string | null;
174
173
  /** Name of the file to import. */
@@ -176,45 +175,45 @@ export interface CreateLoyaltyImportRequest {
176
175
  /** Size of the file to import, in bytes. */
177
176
  fileSize?: number | null;
178
177
  }
179
- export interface CreateLoyaltyImportResponse {
178
+ interface CreateLoyaltyImportResponse {
180
179
  /** Created loyalty import. */
181
180
  loyaltyImport?: LoyaltyImport;
182
181
  }
183
- export interface GetLoyaltyImportRequest {
182
+ interface GetLoyaltyImportRequest {
184
183
  /** Loyalty import ID. */
185
184
  loyaltyImportId: string;
186
185
  }
187
- export interface GetLoyaltyImportResponse {
186
+ interface GetLoyaltyImportResponse {
188
187
  /** Retrieved loyalty import. */
189
188
  loyaltyImport?: LoyaltyImport;
190
189
  }
191
- export interface GetErrorFileDownloadUrlRequest {
190
+ interface GetErrorFileDownloadUrlRequest {
192
191
  /** Loyalty import ID. */
193
192
  loyaltyImportId: string;
194
193
  }
195
- export interface GetErrorFileDownloadUrlResponse {
194
+ interface GetErrorFileDownloadUrlResponse {
196
195
  /** URL for downloading the error file. */
197
196
  url?: string | null;
198
197
  }
199
- export interface ExecuteLoyaltyImportRequest {
198
+ interface ExecuteLoyaltyImportRequest {
200
199
  /** Loyalty import ID. */
201
200
  loyaltyImportId: string;
202
201
  /** Header mapping information for the import file. */
203
202
  headerMappingInfo?: HeaderMappingInfo;
204
203
  }
205
- export interface ExecuteLoyaltyImportResponse {
204
+ interface ExecuteLoyaltyImportResponse {
206
205
  /** Executed loyalty import. */
207
206
  loyaltyImport?: LoyaltyImport;
208
207
  }
209
- export interface CreateLoyaltyImportFileUrlRequest {
208
+ interface CreateLoyaltyImportFileUrlRequest {
210
209
  }
211
- export interface CreateLoyaltyImportFileUrlResponse {
210
+ interface CreateLoyaltyImportFileUrlResponse {
212
211
  /** Path where the file will be stored. */
213
212
  filePath?: string | null;
214
213
  /** URL for uploading the loyalty import file. */
215
214
  uploadUrl?: string | null;
216
215
  }
217
- export interface QueryLoyaltyImportsRequest {
216
+ interface QueryLoyaltyImportsRequest {
218
217
  /**
219
218
  * Filter object.
220
219
  * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
@@ -225,7 +224,7 @@ export interface QueryLoyaltyImportsRequest {
225
224
  */
226
225
  query: CursorQuery;
227
226
  }
228
- export interface CursorQuery extends CursorQueryPagingMethodOneOf {
227
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
229
228
  /**
230
229
  * Cursor paging options.
231
230
  *
@@ -247,7 +246,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
247
246
  sort?: Sorting[];
248
247
  }
249
248
  /** @oneof */
250
- export interface CursorQueryPagingMethodOneOf {
249
+ interface CursorQueryPagingMethodOneOf {
251
250
  /**
252
251
  * Cursor paging options.
253
252
  *
@@ -255,7 +254,7 @@ export interface CursorQueryPagingMethodOneOf {
255
254
  */
256
255
  cursorPaging?: CursorPaging;
257
256
  }
258
- export interface Sorting {
257
+ interface Sorting {
259
258
  /**
260
259
  * Name of the field to sort by.
261
260
  * @maxLength 512
@@ -264,13 +263,13 @@ export interface Sorting {
264
263
  /** Sort order. */
265
264
  order?: SortOrderWithLiterals;
266
265
  }
267
- export declare enum SortOrder {
266
+ declare enum SortOrder {
268
267
  ASC = "ASC",
269
268
  DESC = "DESC"
270
269
  }
271
270
  /** @enumType */
272
- export type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
273
- export interface CursorPaging {
271
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
272
+ interface CursorPaging {
274
273
  /**
275
274
  * Maximum number of items to return in the results.
276
275
  * @max 100
@@ -285,13 +284,13 @@ export interface CursorPaging {
285
284
  */
286
285
  cursor?: string | null;
287
286
  }
288
- export interface QueryLoyaltyImportsResponse {
287
+ interface QueryLoyaltyImportsResponse {
289
288
  /** List of loyalty imports matching the query. */
290
289
  loyaltyImports?: LoyaltyImport[];
291
290
  /** Paging metadata. */
292
291
  pagingMetadata?: CursorPagingMetadata;
293
292
  }
294
- export interface CursorPagingMetadata {
293
+ interface CursorPagingMetadata {
295
294
  /** Number of items returned in current page. */
296
295
  count?: number | null;
297
296
  /** Cursor strings that point to the next page, previous page, or both. */
@@ -304,7 +303,7 @@ export interface CursorPagingMetadata {
304
303
  */
305
304
  hasNext?: boolean | null;
306
305
  }
307
- export interface Cursors {
306
+ interface Cursors {
308
307
  /**
309
308
  * Cursor string pointing to the next page in the list of results.
310
309
  * @maxLength 16000
@@ -316,7 +315,7 @@ export interface Cursors {
316
315
  */
317
316
  prev?: string | null;
318
317
  }
319
- export interface DeleteLoyaltyImportRequest {
318
+ interface DeleteLoyaltyImportRequest {
320
319
  /**
321
320
  * Loyalty import ID.
322
321
  * @format GUID
@@ -328,9 +327,9 @@ export interface DeleteLoyaltyImportRequest {
328
327
  */
329
328
  revision?: string;
330
329
  }
331
- export interface DeleteLoyaltyImportResponse {
330
+ interface DeleteLoyaltyImportResponse {
332
331
  }
333
- export interface DomainEvent extends DomainEventBodyOneOf {
332
+ interface DomainEvent extends DomainEventBodyOneOf {
334
333
  createdEvent?: EntityCreatedEvent;
335
334
  updatedEvent?: EntityUpdatedEvent;
336
335
  deletedEvent?: EntityDeletedEvent;
@@ -365,19 +364,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
365
364
  entityEventSequence?: string | null;
366
365
  }
367
366
  /** @oneof */
368
- export interface DomainEventBodyOneOf {
367
+ interface DomainEventBodyOneOf {
369
368
  createdEvent?: EntityCreatedEvent;
370
369
  updatedEvent?: EntityUpdatedEvent;
371
370
  deletedEvent?: EntityDeletedEvent;
372
371
  actionEvent?: ActionEvent;
373
372
  }
374
- export interface EntityCreatedEvent {
373
+ interface EntityCreatedEvent {
375
374
  entity?: string;
376
375
  }
377
- export interface RestoreInfo {
376
+ interface RestoreInfo {
378
377
  deletedDate?: Date | null;
379
378
  }
380
- export interface EntityUpdatedEvent {
379
+ interface EntityUpdatedEvent {
381
380
  /**
382
381
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
383
382
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -385,20 +384,20 @@ export interface EntityUpdatedEvent {
385
384
  */
386
385
  currentEntity?: string;
387
386
  }
388
- export interface EntityDeletedEvent {
387
+ interface EntityDeletedEvent {
389
388
  /** Entity that was deleted. */
390
389
  deletedEntity?: string | null;
391
390
  }
392
- export interface ActionEvent {
391
+ interface ActionEvent {
393
392
  body?: string;
394
393
  }
395
- export interface Empty {
394
+ interface Empty {
396
395
  }
397
- export interface ImportFinished {
396
+ interface ImportFinished {
398
397
  /** Completed loyalty import. */
399
398
  loyaltyImport?: LoyaltyImport;
400
399
  }
401
- export interface MessageEnvelope {
400
+ interface MessageEnvelope {
402
401
  /**
403
402
  * App instance ID.
404
403
  * @format GUID
@@ -414,7 +413,7 @@ export interface MessageEnvelope {
414
413
  /** Stringify payload. */
415
414
  data?: string;
416
415
  }
417
- export interface IdentificationData extends IdentificationDataIdOneOf {
416
+ interface IdentificationData extends IdentificationDataIdOneOf {
418
417
  /**
419
418
  * ID of a site visitor that has not logged in to the site.
420
419
  * @format GUID
@@ -439,7 +438,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
439
438
  identityType?: WebhookIdentityTypeWithLiterals;
440
439
  }
441
440
  /** @oneof */
442
- export interface IdentificationDataIdOneOf {
441
+ interface IdentificationDataIdOneOf {
443
442
  /**
444
443
  * ID of a site visitor that has not logged in to the site.
445
444
  * @format GUID
@@ -461,7 +460,7 @@ export interface IdentificationDataIdOneOf {
461
460
  */
462
461
  appId?: string;
463
462
  }
464
- export declare enum WebhookIdentityType {
463
+ declare enum WebhookIdentityType {
465
464
  UNKNOWN = "UNKNOWN",
466
465
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
467
466
  MEMBER = "MEMBER",
@@ -469,8 +468,8 @@ export declare enum WebhookIdentityType {
469
468
  APP = "APP"
470
469
  }
471
470
  /** @enumType */
472
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
473
- export interface BaseEventMetadata {
471
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
472
+ interface BaseEventMetadata {
474
473
  /**
475
474
  * App instance ID.
476
475
  * @format GUID
@@ -484,7 +483,7 @@ export interface BaseEventMetadata {
484
483
  /** The identification type and identity data. */
485
484
  identity?: IdentificationData;
486
485
  }
487
- export interface EventMetadata extends BaseEventMetadata {
486
+ interface EventMetadata extends BaseEventMetadata {
488
487
  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
489
488
  _id?: string;
490
489
  /**
@@ -514,137 +513,20 @@ export interface EventMetadata extends BaseEventMetadata {
514
513
  */
515
514
  entityEventSequence?: string | null;
516
515
  }
517
- export interface LoyaltyImportCreatedEnvelope {
516
+ interface LoyaltyImportCreatedEnvelope {
518
517
  entity: LoyaltyImport;
519
518
  metadata: EventMetadata;
520
519
  }
521
- /**
522
- * Triggered when a loyalty import is created.
523
- * @webhook
524
- * @eventType wix.loyalty.imports.v1.loyalty_import_created
525
- * @serviceIdentifier wix.loyalty.imports.v1.LoyaltyImports
526
- * @slug created
527
- */
528
- export declare function onLoyaltyImportCreated(handler: (event: LoyaltyImportCreatedEnvelope) => void | Promise<void>): void;
529
- type LoyaltyImportNonNullablePaths = `status` | `fileMetadata.url` | `fileMetadata.header.values` | `fileMetadata.headerMappingInfo.headerMappings` | `fileMetadata.headerMappingInfo.headerMappings.${number}.columnName` | `fileMetadata.headerMappingInfo.headerMappings.${number}.columnIndex` | `fileMetadata.sampleDataRows` | `importResult.errorFileExists`;
530
- /**
531
- * Creates an import object based on an uploaded file.
532
- *
533
- * Call this method after uploading your file to the URL obtained from `createLoyaltyImportFileUrl()`.
534
- * @param fileUrl - URL of the file to import.
535
- * @public
536
- * @requiredField fileUrl
537
- * @permissionId LOYALTY.MANAGE_IMPORTS
538
- * @permissionScope Manage Loyalty
539
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
540
- * @permissionScope Manage Restaurants - all permissions
541
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
542
- * @applicableIdentity APP
543
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImport
544
- */
545
- export declare function createLoyaltyImport(fileUrl: string, options?: CreateLoyaltyImportOptions): Promise<NonNullablePaths<CreateLoyaltyImportResponse, {
546
- [P in LoyaltyImportNonNullablePaths]: `loyaltyImport.${P}`;
547
- }[LoyaltyImportNonNullablePaths]>>;
548
- export interface CreateLoyaltyImportOptions {
520
+ interface CreateLoyaltyImportOptions {
549
521
  /** Name of the file to import. */
550
522
  fileName?: string | null;
551
523
  /** Size of the file to import, in bytes. */
552
524
  fileSize?: number | null;
553
525
  }
554
- /**
555
- * Retrieves a loyalty import.
556
- * @param loyaltyImportId - Loyalty import ID.
557
- * @public
558
- * @requiredField loyaltyImportId
559
- * @permissionId LOYALTY.MANAGE_IMPORTS
560
- * @permissionScope Manage Loyalty
561
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
562
- * @permissionScope Manage Restaurants - all permissions
563
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
564
- * @applicableIdentity APP
565
- * @returns Retrieved loyalty import.
566
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.GetLoyaltyImport
567
- */
568
- export declare function getLoyaltyImport(loyaltyImportId: string): Promise<NonNullablePaths<LoyaltyImport, LoyaltyImportNonNullablePaths>>;
569
- /**
570
- * Retrieves the download URL for the error file of a failed loyalty import.
571
- *
572
- * If an import fails, the `importResult.errorFileExists` field in the `LoyaltyImport` object is set to `true`.
573
- *
574
- * Use this method to get the URL of the error file, which contains details about which items couldn't be imported and why.
575
- * @param loyaltyImportId - Loyalty import ID.
576
- * @public
577
- * @requiredField loyaltyImportId
578
- * @permissionId LOYALTY.MANAGE_IMPORTS
579
- * @permissionScope Manage Loyalty
580
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
581
- * @permissionScope Manage Restaurants - all permissions
582
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
583
- * @applicableIdentity APP
584
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.GetErrorFileDownloadUrl
585
- */
586
- export declare function getErrorFileDownloadUrl(loyaltyImportId: string): Promise<GetErrorFileDownloadUrlResponse>;
587
- /**
588
- * Starts the actual import process for a loyalty import.
589
- *
590
- * Call this method after the loyalty import object reaches the `PARSED` status.
591
- * @param loyaltyImportId - Loyalty import ID.
592
- * @public
593
- * @requiredField loyaltyImportId
594
- * @permissionId LOYALTY.MANAGE_IMPORTS
595
- * @permissionScope Manage Loyalty
596
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
597
- * @permissionScope Manage Restaurants - all permissions
598
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
599
- * @applicableIdentity APP
600
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.ExecuteLoyaltyImport
601
- */
602
- export declare function executeLoyaltyImport(loyaltyImportId: string, options?: ExecuteLoyaltyImportOptions): Promise<NonNullablePaths<ExecuteLoyaltyImportResponse, {
603
- [P in LoyaltyImportNonNullablePaths]: `loyaltyImport.${P}`;
604
- }[LoyaltyImportNonNullablePaths]>>;
605
- export interface ExecuteLoyaltyImportOptions {
526
+ interface ExecuteLoyaltyImportOptions {
606
527
  /** Header mapping information for the import file. */
607
528
  headerMappingInfo?: HeaderMappingInfo;
608
529
  }
609
- /**
610
- * Creates a URL for uploading a loyalty import file.
611
- *
612
- * This method is the first step in the loyalty import process. It returns a file path and an upload URL, which you'll use in subsequent steps of the import process.
613
- * @public
614
- * @permissionId LOYALTY.MANAGE_IMPORTS
615
- * @permissionScope Manage Loyalty
616
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
617
- * @permissionScope Manage Restaurants - all permissions
618
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
619
- * @applicableIdentity APP
620
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImportFileUrl
621
- */
622
- export declare function createLoyaltyImportFileUrl(): Promise<CreateLoyaltyImportFileUrlResponse>;
623
- /**
624
- * Creates a query to retrieve a list of loyalty imports.
625
- *
626
- * The `queryLoyaltyImports()` function builds a query to retrieve a list of imports and returns a `LoyaltyImportsQueryBuilder` object.
627
- *
628
- * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
629
- *
630
- * You can refine the query by chaining `LoyaltyImportsQueryBuilder` functions onto the query. `LoyaltyImportsQueryBuilder` functions enable you to sort, filter, and control the results `queryLoyaltyImports()` returns.
631
- *
632
- * `queryLoyaltyImports()` runs with these `LoyaltyImportsQueryBuilder` defaults, which you can override:
633
- *
634
- * - `limit(50)`
635
- * - `descending("_createdDate")`
636
- *
637
- * The functions that are chained to `queryLoyaltyImports()` are applied in the order they're called. For example, if you apply ascending('status') and then descending('_createdDate'), the results are sorted first by the status, and then, if there are multiple results with the same status, the items are sorted by the created date.
638
- * @public
639
- * @permissionScope Manage Loyalty
640
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
641
- * @permissionScope Manage Restaurants - all permissions
642
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
643
- * @permissionId LOYALTY.MANAGE_IMPORTS
644
- * @applicableIdentity APP
645
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.QueryLoyaltyImports
646
- */
647
- export declare function queryLoyaltyImports(): LoyaltyImportsQueryBuilder;
648
530
  interface QueryCursorResult {
649
531
  cursors: Cursors;
650
532
  hasNext: () => boolean;
@@ -652,13 +534,13 @@ interface QueryCursorResult {
652
534
  length: number;
653
535
  pageSize: number;
654
536
  }
655
- export interface LoyaltyImportsQueryResult extends QueryCursorResult {
537
+ interface LoyaltyImportsQueryResult extends QueryCursorResult {
656
538
  items: LoyaltyImport[];
657
539
  query: LoyaltyImportsQueryBuilder;
658
540
  next: () => Promise<LoyaltyImportsQueryResult>;
659
541
  prev: () => Promise<LoyaltyImportsQueryResult>;
660
542
  }
661
- export interface LoyaltyImportsQueryBuilder {
543
+ interface LoyaltyImportsQueryBuilder {
662
544
  /** @param propertyName - Property whose value is compared with `value`.
663
545
  * @param value - Value to compare against.
664
546
  */
@@ -699,4 +581,5 @@ export interface LoyaltyImportsQueryBuilder {
699
581
  skipTo: (cursor: string) => LoyaltyImportsQueryBuilder;
700
582
  find: () => Promise<LoyaltyImportsQueryResult>;
701
583
  }
702
- export {};
584
+
585
+ export { type EntityCreatedEvent as A, type EntityUpdatedEvent as B, type CreateLoyaltyImportOptions as C, type DeleteLoyaltyImportRequest as D, type ExecuteLoyaltyImportOptions as E, type FileMetadata as F, type GetErrorFileDownloadUrlResponse as G, type HeaderMappingInfo as H, ImportStatus as I, type EntityDeletedEvent as J, type ActionEvent as K, type LoyaltyImport as L, type Empty as M, type ImportFinished as N, type MessageEnvelope as O, type ParseResult as P, type QueryLoyaltyImportsRequest as Q, type RestoreInfo as R, SortOrder as S, type IdentificationData as T, type IdentificationDataIdOneOf as U, type BaseEventMetadata as V, WebhookIdentityType as W, type EventMetadata as X, type LoyaltyImportsQueryResult as Y, type CreateLoyaltyImportResponse as a, type ExecuteLoyaltyImportResponse as b, type CreateLoyaltyImportFileUrlResponse as c, type LoyaltyImportsQueryBuilder as d, type LoyaltyImportCreatedEnvelope as e, ColumnName as f, type FileHeader as g, type HeaderMapping as h, type SampleDataRow as i, type ImportResult as j, type CreateLoyaltyImportRequest as k, type GetLoyaltyImportRequest as l, type GetLoyaltyImportResponse as m, type GetErrorFileDownloadUrlRequest as n, type ExecuteLoyaltyImportRequest as o, type CreateLoyaltyImportFileUrlRequest as p, type CursorQuery as q, type CursorQueryPagingMethodOneOf as r, type Sorting as s, type CursorPaging as t, type QueryLoyaltyImportsResponse as u, type CursorPagingMetadata as v, type Cursors as w, type DeleteLoyaltyImportResponse as x, type DomainEvent as y, type DomainEventBodyOneOf as z };