@wix/auto_sdk_loyalty_imports 1.0.3 → 1.0.5

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 +536 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +502 -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 +536 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +502 -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-2D8oFVKm.d.mts} +53 -191
  14. package/build/{cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts → internal/loyalty-imports-v1-loyalty-import-imports.universal-2D8oFVKm.d.ts} +53 -191
  15. package/build/{es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → internal/meta.d.mts} +50 -231
  16. package/build/internal/{es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.ts} +50 -231
  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-2D8oFVKm.d.mts} +53 -191
  22. package/build/{internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts → loyalty-imports-v1-loyalty-import-imports.universal-2D8oFVKm.d.ts} +53 -191
  23. package/build/{cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.mts} +50 -231
  24. package/build/{internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.ts} +50 -231
  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 -326
  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 -294
  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 -326
  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 -294
  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\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?: ImportStatus;\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\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?: ColumnName;\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\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?: SortOrder;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface 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 /**\n * Unique event ID.\n * Allows clients to ignore duplicate webhooks.\n */\n _id?: string;\n /**\n * Assumes actions are also always typed to an entity_type\n * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n */\n entityFqdn?: string;\n /**\n * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n * This is although the created/updated/deleted notion is duplication of the oneof types\n * 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 defining the order of updates to the underlying entity.\n * For example, given that some entity was updated at 16:00 and than again at 16:01,\n * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n * To do so, you will need to persist this number on your end, and compare the sequence number from the\n * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\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?: WebhookIdentityType;\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\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 /**\n * Unique event ID.\n * Allows clients to ignore duplicate webhooks.\n */\n _id?: string;\n /**\n * Assumes actions are also always typed to an entity_type\n * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction\n */\n entityFqdn?: string;\n /**\n * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\n * This is although the created/updated/deleted notion is duplication of the oneof types\n * 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 defining the order of updates to the underlying entity.\n * For example, given that some entity was updated at 16:00 and than again at 16:01,\n * it is guaranteed that the sequence number of the second update is strictly higher than the first.\n * As the consumer, you can use this value to ensure that you handle messages in the correct order.\n * To do so, you will need to persist this number on your end, and compare the sequence number from the\n * message against the one you have stored. Given that the stored number is higher, you should ignore the message.\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 | `fileMetadata.sampleDataRows.${number}.values`\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(data);\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 { BuildRESTFunction, MaybeContext } 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: ReturnType<\n typeof createEventModule<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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ACf;AACJ;AAeO,SAASC,4BACd,YACqC;AACrC,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAWO,SAASC,qBACd,YAC8B;AAC9B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAsBO,IAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA,CAAC,UACCC;AAAA,IACEC,gBAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAaC;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAgC;;;AG9KhC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAI3B,IAAMC,uBAGK,iCAAiBA,oBAAyB;AACrD,IAAMC,oBAGK,iCAAiBA,iBAAsB;AAClD,IAAMC,2BAGK,iCAAiBA,wBAA6B;AACzD,IAAMC,wBAGK,iCAAiBA,qBAA0B;AACtD,IAAMC,8BAGK,iCAAiBA,2BAAgC;AAC5D,IAAMC,uBAGK,iCAAiBA,oBAAyB;AAIrD,IAAMC,0BAET,kBAAkB,sBAA4B;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTTimestampToSDKTimestamp","transformPaths","payload","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"]}
@@ -3,7 +3,7 @@
3
3
  * You can use Loyalty Imports to import loyalty points from 3rd-party providers or update existing customer point balances.
4
4
  * This object tracks the entire import process from file upload to data processing.
5
5
  */
6
- export interface LoyaltyImport {
6
+ interface LoyaltyImport {
7
7
  /**
8
8
  * The ID of the import.
9
9
  * @format GUID
@@ -46,7 +46,7 @@ export interface LoyaltyImport {
46
46
  /** Results of the import process, including success and failure counts. */
47
47
  importResult?: ImportResult;
48
48
  }
49
- export declare enum ImportStatus {
49
+ declare enum ImportStatus {
50
50
  /** Status is unknown or not specified. */
51
51
  UNKNOWN = "UNKNOWN",
52
52
  /** The import has been initiated but processing has not yet begun. */
@@ -62,7 +62,7 @@ export declare enum ImportStatus {
62
62
  /** The import process has failed. */
63
63
  FAILED = "FAILED"
64
64
  }
65
- export interface FileMetadata {
65
+ interface FileMetadata {
66
66
  /**
67
67
  * Size of the uploaded file in bytes. Max: `10 MB`.
68
68
  * @max 104857600
@@ -95,7 +95,7 @@ export interface FileMetadata {
95
95
  */
96
96
  sampleDataRows?: SampleDataRow[];
97
97
  }
98
- export interface FileHeader {
98
+ interface FileHeader {
99
99
  /**
100
100
  * Column headings from the first row of the uploaded file.
101
101
  * @maxSize 100
@@ -103,7 +103,7 @@ export interface FileHeader {
103
103
  */
104
104
  values?: string[];
105
105
  }
106
- export interface HeaderMappingInfo {
106
+ interface HeaderMappingInfo {
107
107
  /**
108
108
  * Mappings between required loyalty data fields and file columns.
109
109
  * Must contain exactly 2 mappings: one for `EMAIL` and one for `POINTS`.
@@ -112,7 +112,7 @@ export interface HeaderMappingInfo {
112
112
  */
113
113
  headerMappings?: HeaderMapping[];
114
114
  }
115
- export interface HeaderMapping {
115
+ interface HeaderMapping {
116
116
  /** The required loyalty data field that this mapping corresponds to. Must be either `EMAIL` or `POINTS`. */
117
117
  columnName?: ColumnName;
118
118
  /**
@@ -121,13 +121,13 @@ export interface HeaderMapping {
121
121
  */
122
122
  columnIndex?: number;
123
123
  }
124
- export declare enum ColumnName {
124
+ declare enum ColumnName {
125
125
  /** Column containing the customer's email address. */
126
126
  EMAIL = "EMAIL",
127
127
  /** Column containing the customer's loyalty point balance to be imported or updated. */
128
128
  POINTS = "POINTS"
129
129
  }
130
- export interface SampleDataRow {
130
+ interface SampleDataRow {
131
131
  /**
132
132
  * Values in one sample data row. Each value corresponds to a column in the CSV file.
133
133
  * The number of values matches the number of columns in the file.
@@ -136,7 +136,7 @@ export interface SampleDataRow {
136
136
  */
137
137
  values?: string[];
138
138
  }
139
- export interface ParseResult {
139
+ interface ParseResult {
140
140
  /**
141
141
  * Number of rows parsed from the uploaded import file.
142
142
  * @readonly
@@ -149,7 +149,7 @@ export interface ParseResult {
149
149
  */
150
150
  parseErrorReason?: string | null;
151
151
  }
152
- export interface ImportResult {
152
+ interface ImportResult {
153
153
  /** Whether an error file detailing import failures is available for download. The file includes row-by-row import status, error reasons, and original data. */
154
154
  errorFileExists?: boolean;
155
155
  /**
@@ -163,7 +163,7 @@ export interface ImportResult {
163
163
  */
164
164
  failureCount?: number | null;
165
165
  }
166
- export interface CreateLoyaltyImportRequest {
166
+ interface CreateLoyaltyImportRequest {
167
167
  /** URL of the file to import. */
168
168
  fileUrl: string | null;
169
169
  /** Name of the file to import. */
@@ -171,45 +171,45 @@ export interface CreateLoyaltyImportRequest {
171
171
  /** Size of the file to import, in bytes. */
172
172
  fileSize?: number | null;
173
173
  }
174
- export interface CreateLoyaltyImportResponse {
174
+ interface CreateLoyaltyImportResponse {
175
175
  /** Created loyalty import. */
176
176
  loyaltyImport?: LoyaltyImport;
177
177
  }
178
- export interface GetLoyaltyImportRequest {
178
+ interface GetLoyaltyImportRequest {
179
179
  /** Loyalty import ID. */
180
180
  loyaltyImportId: string;
181
181
  }
182
- export interface GetLoyaltyImportResponse {
182
+ interface GetLoyaltyImportResponse {
183
183
  /** Retrieved loyalty import. */
184
184
  loyaltyImport?: LoyaltyImport;
185
185
  }
186
- export interface GetErrorFileDownloadUrlRequest {
186
+ interface GetErrorFileDownloadUrlRequest {
187
187
  /** Loyalty import ID. */
188
188
  loyaltyImportId: string;
189
189
  }
190
- export interface GetErrorFileDownloadUrlResponse {
190
+ interface GetErrorFileDownloadUrlResponse {
191
191
  /** URL for downloading the error file. */
192
192
  url?: string | null;
193
193
  }
194
- export interface ExecuteLoyaltyImportRequest {
194
+ interface ExecuteLoyaltyImportRequest {
195
195
  /** Loyalty import ID. */
196
196
  loyaltyImportId: string;
197
197
  /** Header mapping information for the import file. */
198
198
  headerMappingInfo?: HeaderMappingInfo;
199
199
  }
200
- export interface ExecuteLoyaltyImportResponse {
200
+ interface ExecuteLoyaltyImportResponse {
201
201
  /** Executed loyalty import. */
202
202
  loyaltyImport?: LoyaltyImport;
203
203
  }
204
- export interface CreateLoyaltyImportFileUrlRequest {
204
+ interface CreateLoyaltyImportFileUrlRequest {
205
205
  }
206
- export interface CreateLoyaltyImportFileUrlResponse {
206
+ interface CreateLoyaltyImportFileUrlResponse {
207
207
  /** Path where the file will be stored. */
208
208
  filePath?: string | null;
209
209
  /** URL for uploading the loyalty import file. */
210
210
  uploadUrl?: string | null;
211
211
  }
212
- export interface QueryLoyaltyImportsRequest {
212
+ interface QueryLoyaltyImportsRequest {
213
213
  /**
214
214
  * Filter object.
215
215
  * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
@@ -220,7 +220,7 @@ export interface QueryLoyaltyImportsRequest {
220
220
  */
221
221
  query: CursorQuery;
222
222
  }
223
- export interface CursorQuery extends CursorQueryPagingMethodOneOf {
223
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
224
224
  /**
225
225
  * Cursor paging options.
226
226
  *
@@ -242,7 +242,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
242
242
  sort?: Sorting[];
243
243
  }
244
244
  /** @oneof */
245
- export interface CursorQueryPagingMethodOneOf {
245
+ interface CursorQueryPagingMethodOneOf {
246
246
  /**
247
247
  * Cursor paging options.
248
248
  *
@@ -250,7 +250,7 @@ export interface CursorQueryPagingMethodOneOf {
250
250
  */
251
251
  cursorPaging?: CursorPaging;
252
252
  }
253
- export interface Sorting {
253
+ interface Sorting {
254
254
  /**
255
255
  * Name of the field to sort by.
256
256
  * @maxLength 512
@@ -259,11 +259,11 @@ export interface Sorting {
259
259
  /** Sort order. */
260
260
  order?: SortOrder;
261
261
  }
262
- export declare enum SortOrder {
262
+ declare enum SortOrder {
263
263
  ASC = "ASC",
264
264
  DESC = "DESC"
265
265
  }
266
- export interface CursorPaging {
266
+ interface CursorPaging {
267
267
  /**
268
268
  * Maximum number of items to return in the results.
269
269
  * @max 100
@@ -278,13 +278,13 @@ export interface CursorPaging {
278
278
  */
279
279
  cursor?: string | null;
280
280
  }
281
- export interface QueryLoyaltyImportsResponse {
281
+ interface QueryLoyaltyImportsResponse {
282
282
  /** List of loyalty imports matching the query. */
283
283
  loyaltyImports?: LoyaltyImport[];
284
284
  /** Paging metadata. */
285
285
  pagingMetadata?: CursorPagingMetadata;
286
286
  }
287
- export interface CursorPagingMetadata {
287
+ interface CursorPagingMetadata {
288
288
  /** Number of items returned in current page. */
289
289
  count?: number | null;
290
290
  /** Cursor strings that point to the next page, previous page, or both. */
@@ -297,7 +297,7 @@ export interface CursorPagingMetadata {
297
297
  */
298
298
  hasNext?: boolean | null;
299
299
  }
300
- export interface Cursors {
300
+ interface Cursors {
301
301
  /**
302
302
  * Cursor string pointing to the next page in the list of results.
303
303
  * @maxLength 16000
@@ -309,7 +309,7 @@ export interface Cursors {
309
309
  */
310
310
  prev?: string | null;
311
311
  }
312
- export interface DeleteLoyaltyImportRequest {
312
+ interface DeleteLoyaltyImportRequest {
313
313
  /**
314
314
  * Loyalty import ID.
315
315
  * @format GUID
@@ -321,9 +321,9 @@ export interface DeleteLoyaltyImportRequest {
321
321
  */
322
322
  revision?: string;
323
323
  }
324
- export interface DeleteLoyaltyImportResponse {
324
+ interface DeleteLoyaltyImportResponse {
325
325
  }
326
- export interface DomainEvent extends DomainEventBodyOneOf {
326
+ interface DomainEvent extends DomainEventBodyOneOf {
327
327
  createdEvent?: EntityCreatedEvent;
328
328
  updatedEvent?: EntityUpdatedEvent;
329
329
  deletedEvent?: EntityDeletedEvent;
@@ -366,19 +366,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
366
366
  entityEventSequence?: string | null;
367
367
  }
368
368
  /** @oneof */
369
- export interface DomainEventBodyOneOf {
369
+ interface DomainEventBodyOneOf {
370
370
  createdEvent?: EntityCreatedEvent;
371
371
  updatedEvent?: EntityUpdatedEvent;
372
372
  deletedEvent?: EntityDeletedEvent;
373
373
  actionEvent?: ActionEvent;
374
374
  }
375
- export interface EntityCreatedEvent {
375
+ interface EntityCreatedEvent {
376
376
  entity?: string;
377
377
  }
378
- export interface RestoreInfo {
378
+ interface RestoreInfo {
379
379
  deletedDate?: Date | null;
380
380
  }
381
- export interface EntityUpdatedEvent {
381
+ interface EntityUpdatedEvent {
382
382
  /**
383
383
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
384
384
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -386,20 +386,20 @@ export interface EntityUpdatedEvent {
386
386
  */
387
387
  currentEntity?: string;
388
388
  }
389
- export interface EntityDeletedEvent {
389
+ interface EntityDeletedEvent {
390
390
  /** Entity that was deleted */
391
391
  deletedEntity?: string | null;
392
392
  }
393
- export interface ActionEvent {
393
+ interface ActionEvent {
394
394
  body?: string;
395
395
  }
396
- export interface Empty {
396
+ interface Empty {
397
397
  }
398
- export interface ImportFinished {
398
+ interface ImportFinished {
399
399
  /** Completed loyalty import. */
400
400
  loyaltyImport?: LoyaltyImport;
401
401
  }
402
- export interface MessageEnvelope {
402
+ interface MessageEnvelope {
403
403
  /**
404
404
  * App instance ID.
405
405
  * @format GUID
@@ -415,7 +415,7 @@ export interface MessageEnvelope {
415
415
  /** Stringify payload. */
416
416
  data?: string;
417
417
  }
418
- export interface IdentificationData extends IdentificationDataIdOneOf {
418
+ interface IdentificationData extends IdentificationDataIdOneOf {
419
419
  /**
420
420
  * ID of a site visitor that has not logged in to the site.
421
421
  * @format GUID
@@ -440,7 +440,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
440
440
  identityType?: WebhookIdentityType;
441
441
  }
442
442
  /** @oneof */
443
- export interface IdentificationDataIdOneOf {
443
+ interface IdentificationDataIdOneOf {
444
444
  /**
445
445
  * ID of a site visitor that has not logged in to the site.
446
446
  * @format GUID
@@ -462,53 +462,14 @@ export interface IdentificationDataIdOneOf {
462
462
  */
463
463
  appId?: string;
464
464
  }
465
- export declare enum WebhookIdentityType {
465
+ declare enum WebhookIdentityType {
466
466
  UNKNOWN = "UNKNOWN",
467
467
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
468
468
  MEMBER = "MEMBER",
469
469
  WIX_USER = "WIX_USER",
470
470
  APP = "APP"
471
471
  }
472
- interface FileHeaderNonNullableFields {
473
- values: string[];
474
- }
475
- interface HeaderMappingNonNullableFields {
476
- columnName: ColumnName;
477
- columnIndex: number;
478
- }
479
- interface HeaderMappingInfoNonNullableFields {
480
- headerMappings: HeaderMappingNonNullableFields[];
481
- }
482
- interface SampleDataRowNonNullableFields {
483
- values: string[];
484
- }
485
- interface FileMetadataNonNullableFields {
486
- url: string;
487
- header?: FileHeaderNonNullableFields;
488
- headerMappingInfo?: HeaderMappingInfoNonNullableFields;
489
- sampleDataRows: SampleDataRowNonNullableFields[];
490
- }
491
- interface ImportResultNonNullableFields {
492
- errorFileExists: boolean;
493
- }
494
- export interface LoyaltyImportNonNullableFields {
495
- status: ImportStatus;
496
- fileMetadata?: FileMetadataNonNullableFields;
497
- importResult?: ImportResultNonNullableFields;
498
- }
499
- export interface CreateLoyaltyImportResponseNonNullableFields {
500
- loyaltyImport?: LoyaltyImportNonNullableFields;
501
- }
502
- export interface GetLoyaltyImportResponseNonNullableFields {
503
- loyaltyImport?: LoyaltyImportNonNullableFields;
504
- }
505
- export interface ExecuteLoyaltyImportResponseNonNullableFields {
506
- loyaltyImport?: LoyaltyImportNonNullableFields;
507
- }
508
- export interface QueryLoyaltyImportsResponseNonNullableFields {
509
- loyaltyImports: LoyaltyImportNonNullableFields[];
510
- }
511
- export interface BaseEventMetadata {
472
+ interface BaseEventMetadata {
512
473
  /**
513
474
  * App instance ID.
514
475
  * @format GUID
@@ -522,7 +483,7 @@ export interface BaseEventMetadata {
522
483
  /** The identification type and identity data. */
523
484
  identity?: IdentificationData;
524
485
  }
525
- export interface EventMetadata extends BaseEventMetadata {
486
+ interface EventMetadata extends BaseEventMetadata {
526
487
  /**
527
488
  * Unique event ID.
528
489
  * Allows clients to ignore duplicate webhooks.
@@ -560,120 +521,20 @@ export interface EventMetadata extends BaseEventMetadata {
560
521
  */
561
522
  entityEventSequence?: string | null;
562
523
  }
563
- export interface LoyaltyImportCreatedEnvelope {
524
+ interface LoyaltyImportCreatedEnvelope {
564
525
  entity: LoyaltyImport;
565
526
  metadata: EventMetadata;
566
527
  }
567
- /**
568
- * Triggered when a loyalty import is created.
569
- * @webhook
570
- * @eventType wix.loyalty.imports.v1.loyalty_import_created
571
- * @serviceIdentifier wix.loyalty.imports.v1.LoyaltyImports
572
- * @slug created
573
- */
574
- export declare function onLoyaltyImportCreated(handler: (event: LoyaltyImportCreatedEnvelope) => void | Promise<void>): void;
575
- /**
576
- * Creates an import object based on an uploaded file.
577
- *
578
- * Call this method after uploading your file to the URL obtained from `createLoyaltyImportFileUrl()`.
579
- * @param fileUrl - URL of the file to import.
580
- * @public
581
- * @requiredField fileUrl
582
- * @permissionId LOYALTY.MANAGE_IMPORTS
583
- * @permissionScope Manage Loyalty
584
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
585
- * @applicableIdentity APP
586
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImport
587
- */
588
- export declare function createLoyaltyImport(fileUrl: string | null, options?: CreateLoyaltyImportOptions): Promise<CreateLoyaltyImportResponse & CreateLoyaltyImportResponseNonNullableFields>;
589
- export interface CreateLoyaltyImportOptions {
528
+ interface CreateLoyaltyImportOptions {
590
529
  /** Name of the file to import. */
591
530
  fileName?: string | null;
592
531
  /** Size of the file to import, in bytes. */
593
532
  fileSize?: number | null;
594
533
  }
595
- /**
596
- * Retrieves a loyalty import.
597
- * @param loyaltyImportId - Loyalty import ID.
598
- * @public
599
- * @requiredField loyaltyImportId
600
- * @permissionId LOYALTY.MANAGE_IMPORTS
601
- * @permissionScope Manage Loyalty
602
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
603
- * @applicableIdentity APP
604
- * @returns Retrieved loyalty import.
605
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.GetLoyaltyImport
606
- */
607
- export declare function getLoyaltyImport(loyaltyImportId: string): Promise<LoyaltyImport & LoyaltyImportNonNullableFields>;
608
- /**
609
- * Retrieves the download URL for the error file of a failed loyalty import.
610
- *
611
- * If an import fails, the `importResult.errorFileExists` field in the `LoyaltyImport` object is set to `true`.
612
- *
613
- * Use this method to get the URL of the error file, which contains details about which items couldn't be imported and why.
614
- * @param loyaltyImportId - Loyalty import ID.
615
- * @public
616
- * @requiredField loyaltyImportId
617
- * @permissionId LOYALTY.MANAGE_IMPORTS
618
- * @permissionScope Manage Loyalty
619
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
620
- * @applicableIdentity APP
621
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.GetErrorFileDownloadUrl
622
- */
623
- export declare function getErrorFileDownloadUrl(loyaltyImportId: string): Promise<GetErrorFileDownloadUrlResponse>;
624
- /**
625
- * Starts the actual import process for a loyalty import.
626
- *
627
- * Call this method after the loyalty import object reaches the `PARSED` status.
628
- * @param loyaltyImportId - Loyalty import ID.
629
- * @public
630
- * @requiredField loyaltyImportId
631
- * @permissionId LOYALTY.MANAGE_IMPORTS
632
- * @permissionScope Manage Loyalty
633
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
634
- * @applicableIdentity APP
635
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.ExecuteLoyaltyImport
636
- */
637
- export declare function executeLoyaltyImport(loyaltyImportId: string, options?: ExecuteLoyaltyImportOptions): Promise<ExecuteLoyaltyImportResponse & ExecuteLoyaltyImportResponseNonNullableFields>;
638
- export interface ExecuteLoyaltyImportOptions {
534
+ interface ExecuteLoyaltyImportOptions {
639
535
  /** Header mapping information for the import file. */
640
536
  headerMappingInfo?: HeaderMappingInfo;
641
537
  }
642
- /**
643
- * Creates a URL for uploading a loyalty import file.
644
- *
645
- * 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.
646
- * @public
647
- * @permissionId LOYALTY.MANAGE_IMPORTS
648
- * @permissionScope Manage Loyalty
649
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
650
- * @applicableIdentity APP
651
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImportFileUrl
652
- */
653
- export declare function createLoyaltyImportFileUrl(): Promise<CreateLoyaltyImportFileUrlResponse>;
654
- /**
655
- * Creates a query to retrieve a list of loyalty imports.
656
- *
657
- * The `queryLoyaltyImports()` function builds a query to retrieve a list of imports and returns a `LoyaltyImportsQueryBuilder` object.
658
- *
659
- * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
660
- *
661
- * 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.
662
- *
663
- * `queryLoyaltyImports()` runs with these `LoyaltyImportsQueryBuilder` defaults, which you can override:
664
- *
665
- * - `limit(50)`
666
- * - `descending("_createdDate")`
667
- *
668
- * 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.
669
- * @public
670
- * @permissionScope Manage Loyalty
671
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
672
- * @permissionId LOYALTY.MANAGE_IMPORTS
673
- * @applicableIdentity APP
674
- * @fqn wix.loyalty.imports.v1.LoyaltyImports.QueryLoyaltyImports
675
- */
676
- export declare function queryLoyaltyImports(): LoyaltyImportsQueryBuilder;
677
538
  interface QueryCursorResult {
678
539
  cursors: Cursors;
679
540
  hasNext: () => boolean;
@@ -681,13 +542,13 @@ interface QueryCursorResult {
681
542
  length: number;
682
543
  pageSize: number;
683
544
  }
684
- export interface LoyaltyImportsQueryResult extends QueryCursorResult {
545
+ interface LoyaltyImportsQueryResult extends QueryCursorResult {
685
546
  items: LoyaltyImport[];
686
547
  query: LoyaltyImportsQueryBuilder;
687
548
  next: () => Promise<LoyaltyImportsQueryResult>;
688
549
  prev: () => Promise<LoyaltyImportsQueryResult>;
689
550
  }
690
- export interface LoyaltyImportsQueryBuilder {
551
+ interface LoyaltyImportsQueryBuilder {
691
552
  /** @param propertyName - Property whose value is compared with `value`.
692
553
  * @param value - Value to compare against.
693
554
  */
@@ -728,4 +589,5 @@ export interface LoyaltyImportsQueryBuilder {
728
589
  skipTo: (cursor: string) => LoyaltyImportsQueryBuilder;
729
590
  find: () => Promise<LoyaltyImportsQueryResult>;
730
591
  }
731
- export {};
592
+
593
+ export { type EntityUpdatedEvent as A, type EntityDeletedEvent 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 ActionEvent as J, type Empty as K, type LoyaltyImport as L, type ImportFinished as M, type MessageEnvelope as N, type IdentificationData as O, type ParseResult as P, type QueryLoyaltyImportsRequest as Q, type RestoreInfo as R, SortOrder as S, type IdentificationDataIdOneOf as T, type BaseEventMetadata as U, type EventMetadata as V, WebhookIdentityType as W, type LoyaltyImportCreatedEnvelope as X, type LoyaltyImportsQueryResult as Y, type CreateLoyaltyImportResponse as a, type ExecuteLoyaltyImportResponse as b, type CreateLoyaltyImportFileUrlResponse as c, type LoyaltyImportsQueryBuilder as d, ColumnName as e, type FileHeader as f, type HeaderMapping as g, type SampleDataRow as h, type ImportResult as i, type CreateLoyaltyImportRequest as j, type GetLoyaltyImportRequest as k, type GetLoyaltyImportResponse as l, type GetErrorFileDownloadUrlRequest as m, type ExecuteLoyaltyImportRequest as n, type CreateLoyaltyImportFileUrlRequest as o, type CursorQuery as p, type CursorQueryPagingMethodOneOf as q, type Sorting as r, type CursorPaging as s, type QueryLoyaltyImportsResponse as t, type CursorPagingMetadata as u, type Cursors as v, type DeleteLoyaltyImportResponse as w, type DomainEvent as x, type DomainEventBodyOneOf as y, type EntityCreatedEvent as z };