@wix/auto_sdk_loyalty_imports 1.0.7 → 1.0.9

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 (134) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +16 -0
  11. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js +23 -0
  12. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +1 -0
  13. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +46 -0
  14. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js +243 -0
  15. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +1 -0
  16. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +18 -0
  17. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js +142 -0
  18. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +1 -0
  19. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +77 -0
  20. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js +61 -0
  21. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +1 -0
  22. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts +473 -0
  23. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js +41 -0
  24. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +1 -0
  25. package/build/{internal/loyalty-imports-v1-loyalty-import-imports.universal-2D8oFVKm.d.mts → cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts} +170 -53
  26. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js +338 -0
  27. package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +16 -0
  39. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.js +16 -0
  40. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +1 -0
  41. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +46 -0
  42. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.js +234 -0
  43. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +1 -0
  44. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +18 -0
  45. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js +110 -0
  46. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +1 -0
  47. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +77 -0
  48. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.js +48 -0
  49. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +1 -0
  50. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts +473 -0
  51. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.types.js +38 -0
  52. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +1 -0
  53. package/build/{internal/loyalty-imports-v1-loyalty-import-imports.universal-2D8oFVKm.d.ts → es/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts} +170 -53
  54. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js +306 -0
  55. package/build/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +16 -0
  66. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js +23 -0
  67. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +1 -0
  68. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +46 -0
  69. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js +243 -0
  70. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +1 -0
  71. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +18 -0
  72. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js +142 -0
  73. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +1 -0
  74. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +77 -0
  75. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js +61 -0
  76. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +1 -0
  77. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts +473 -0
  78. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js +41 -0
  79. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +1 -0
  80. package/build/{loyalty-imports-v1-loyalty-import-imports.universal-2D8oFVKm.d.mts → internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts} +170 -53
  81. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js +338 -0
  82. package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +16 -0
  93. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.js +16 -0
  94. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +1 -0
  95. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +46 -0
  96. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.js +234 -0
  97. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +1 -0
  98. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +18 -0
  99. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js +110 -0
  100. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +1 -0
  101. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +77 -0
  102. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.js +48 -0
  103. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +1 -0
  104. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts +473 -0
  105. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.types.js +38 -0
  106. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +1 -0
  107. package/build/{loyalty-imports-v1-loyalty-import-imports.universal-2D8oFVKm.d.ts → internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts} +170 -53
  108. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js +306 -0
  109. package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +1 -0
  110. package/package.json +13 -14
  111. package/build/index.d.mts +0 -88
  112. package/build/index.d.ts +0 -88
  113. package/build/index.js +0 -536
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -502
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -88
  118. package/build/internal/index.d.ts +0 -88
  119. package/build/internal/index.js +0 -536
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -502
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.d.mts +0 -332
  124. package/build/internal/meta.d.ts +0 -332
  125. package/build/internal/meta.js +0 -348
  126. package/build/internal/meta.js.map +0 -1
  127. package/build/internal/meta.mjs +0 -316
  128. package/build/internal/meta.mjs.map +0 -1
  129. package/build/meta.d.mts +0 -332
  130. package/build/meta.d.ts +0 -332
  131. package/build/meta.js +0 -348
  132. package/build/meta.js.map +0 -1
  133. package/build/meta.mjs +0 -316
  134. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,77 @@
1
+ import { EventDefinition, HttpClient } from '@wix/sdk-types';
2
+ import { CreateLoyaltyImportFileUrlResponse, CreateLoyaltyImportOptions, CreateLoyaltyImportResponse, ExecuteLoyaltyImportOptions, ExecuteLoyaltyImportResponse, GetErrorFileDownloadUrlResponse, LoyaltyImport, LoyaltyImportCreatedEnvelope, LoyaltyImportsQueryBuilder } from './loyalty-imports-v1-loyalty-import-imports.universal.js';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function createLoyaltyImport(httpClient: HttpClient): CreateLoyaltyImportSignature;
7
+ interface CreateLoyaltyImportSignature {
8
+ /**
9
+ * Creates an import object based on an uploaded file.
10
+ *
11
+ * Call this method after uploading your file to the URL obtained from `createLoyaltyImportFileUrl()`.
12
+ * @param - URL of the file to import.
13
+ */
14
+ (fileUrl: string, options?: CreateLoyaltyImportOptions | undefined): Promise<CreateLoyaltyImportResponse>;
15
+ }
16
+ export declare function getLoyaltyImport(httpClient: HttpClient): GetLoyaltyImportSignature;
17
+ interface GetLoyaltyImportSignature {
18
+ /**
19
+ * Retrieves a loyalty import.
20
+ * @param - Loyalty import ID.
21
+ * @returns Retrieved loyalty import.
22
+ */
23
+ (loyaltyImportId: string): Promise<LoyaltyImport>;
24
+ }
25
+ export declare function getErrorFileDownloadUrl(httpClient: HttpClient): GetErrorFileDownloadUrlSignature;
26
+ interface GetErrorFileDownloadUrlSignature {
27
+ /**
28
+ * Retrieves the download URL for the error file of a failed loyalty import.
29
+ *
30
+ * If an import fails, the `importResult.errorFileExists` field in the `LoyaltyImport` object is set to `true`.
31
+ *
32
+ * Use this method to get the URL of the error file, which contains details about which items couldn't be imported and why.
33
+ * @param - Loyalty import ID.
34
+ */
35
+ (loyaltyImportId: string): Promise<GetErrorFileDownloadUrlResponse>;
36
+ }
37
+ export declare function executeLoyaltyImport(httpClient: HttpClient): ExecuteLoyaltyImportSignature;
38
+ interface ExecuteLoyaltyImportSignature {
39
+ /**
40
+ * Starts the actual import process for a loyalty import.
41
+ *
42
+ * Call this method after the loyalty import object reaches the `PARSED` status.
43
+ * @param - Loyalty import ID.
44
+ */
45
+ (loyaltyImportId: string, options?: ExecuteLoyaltyImportOptions | undefined): Promise<ExecuteLoyaltyImportResponse>;
46
+ }
47
+ export declare function createLoyaltyImportFileUrl(httpClient: HttpClient): CreateLoyaltyImportFileUrlSignature;
48
+ interface CreateLoyaltyImportFileUrlSignature {
49
+ /**
50
+ * Creates a URL for uploading a loyalty import file.
51
+ *
52
+ * 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.
53
+ */
54
+ (): Promise<CreateLoyaltyImportFileUrlResponse>;
55
+ }
56
+ export declare function queryLoyaltyImports(httpClient: HttpClient): QueryLoyaltyImportsSignature;
57
+ interface QueryLoyaltyImportsSignature {
58
+ /**
59
+ * Creates a query to retrieve a list of loyalty imports.
60
+ *
61
+ * The `queryLoyaltyImports()` function builds a query to retrieve a list of imports and returns a `LoyaltyImportsQueryBuilder` object.
62
+ *
63
+ * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
64
+ *
65
+ * 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.
66
+ *
67
+ * `queryLoyaltyImports()` runs with these `LoyaltyImportsQueryBuilder` defaults, which you can override:
68
+ *
69
+ * - `limit(50)`
70
+ * - `descending("_createdDate")`
71
+ *
72
+ * 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.
73
+ */
74
+ (): LoyaltyImportsQueryBuilder;
75
+ }
76
+ export declare const onLoyaltyImportCreated: EventDefinition<LoyaltyImportCreatedEnvelope, "wix.loyalty.imports.v1.loyalty_import_created">;
77
+ export { ActionEvent, BaseEventMetadata, ColumnName, CreateLoyaltyImportFileUrlRequest, CreateLoyaltyImportFileUrlResponse, CreateLoyaltyImportOptions, CreateLoyaltyImportRequest, CreateLoyaltyImportResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteLoyaltyImportRequest, DeleteLoyaltyImportResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExecuteLoyaltyImportOptions, ExecuteLoyaltyImportRequest, ExecuteLoyaltyImportResponse, FileHeader, FileMetadata, GetErrorFileDownloadUrlRequest, GetErrorFileDownloadUrlResponse, GetLoyaltyImportRequest, GetLoyaltyImportResponse, HeaderMapping, HeaderMappingInfo, IdentificationData, IdentificationDataIdOneOf, ImportFinished, ImportResult, ImportStatus, LoyaltyImport, LoyaltyImportCreatedEnvelope, LoyaltyImportsQueryBuilder, LoyaltyImportsQueryResult, MessageEnvelope, ParseResult, QueryLoyaltyImportsRequest, QueryLoyaltyImportsResponse, RestoreInfo, SampleDataRow, SortOrder, Sorting, WebhookIdentityType, } from './loyalty-imports-v1-loyalty-import-imports.universal.js';
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookIdentityType = exports.SortOrder = exports.ImportStatus = exports.ColumnName = exports.onLoyaltyImportCreated = exports.queryLoyaltyImports = exports.createLoyaltyImportFileUrl = exports.executeLoyaltyImport = exports.getErrorFileDownloadUrl = exports.getLoyaltyImport = exports.createLoyaltyImport = exports.__metadata = void 0;
4
+ const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
5
+ const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
6
+ const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
7
+ const sdk_types_1 = require("@wix/sdk-types");
8
+ const loyalty_imports_v1_loyalty_import_imports_universal_js_1 = require("./loyalty-imports-v1-loyalty-import-imports.universal.js");
9
+ exports.__metadata = { PACKAGE_NAME: '@wix/loyalty' };
10
+ function createLoyaltyImport(httpClient) {
11
+ return (fileUrl, options) => (0, loyalty_imports_v1_loyalty_import_imports_universal_js_1.createLoyaltyImport)(fileUrl, options,
12
+ // @ts-ignore
13
+ { httpClient });
14
+ }
15
+ exports.createLoyaltyImport = createLoyaltyImport;
16
+ function getLoyaltyImport(httpClient) {
17
+ return (loyaltyImportId) => (0, loyalty_imports_v1_loyalty_import_imports_universal_js_1.getLoyaltyImport)(loyaltyImportId,
18
+ // @ts-ignore
19
+ { httpClient });
20
+ }
21
+ exports.getLoyaltyImport = getLoyaltyImport;
22
+ function getErrorFileDownloadUrl(httpClient) {
23
+ return (loyaltyImportId) => (0, loyalty_imports_v1_loyalty_import_imports_universal_js_1.getErrorFileDownloadUrl)(loyaltyImportId,
24
+ // @ts-ignore
25
+ { httpClient });
26
+ }
27
+ exports.getErrorFileDownloadUrl = getErrorFileDownloadUrl;
28
+ function executeLoyaltyImport(httpClient) {
29
+ return (loyaltyImportId, options) => (0, loyalty_imports_v1_loyalty_import_imports_universal_js_1.executeLoyaltyImport)(loyaltyImportId, options,
30
+ // @ts-ignore
31
+ { httpClient });
32
+ }
33
+ exports.executeLoyaltyImport = executeLoyaltyImport;
34
+ function createLoyaltyImportFileUrl(httpClient) {
35
+ return () => (0, loyalty_imports_v1_loyalty_import_imports_universal_js_1.createLoyaltyImportFileUrl)(
36
+ // @ts-ignore
37
+ { httpClient });
38
+ }
39
+ exports.createLoyaltyImportFileUrl = createLoyaltyImportFileUrl;
40
+ function queryLoyaltyImports(httpClient) {
41
+ return () => (0, loyalty_imports_v1_loyalty_import_imports_universal_js_1.queryLoyaltyImports)(
42
+ // @ts-ignore
43
+ { httpClient });
44
+ }
45
+ exports.queryLoyaltyImports = queryLoyaltyImports;
46
+ exports.onLoyaltyImportCreated = (0, sdk_types_1.EventDefinition)('wix.loyalty.imports.v1.loyalty_import_created', true, (event) => (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(event, [
47
+ {
48
+ transformFn: timestamp_1.transformRESTTimestampToSDKTimestamp,
49
+ paths: [
50
+ { path: 'entity.createdDate' },
51
+ { path: 'entity.updatedDate' },
52
+ { path: 'metadata.eventTime' },
53
+ ],
54
+ },
55
+ ])))();
56
+ var loyalty_imports_v1_loyalty_import_imports_universal_js_2 = require("./loyalty-imports-v1-loyalty-import-imports.universal.js");
57
+ Object.defineProperty(exports, "ColumnName", { enumerable: true, get: function () { return loyalty_imports_v1_loyalty_import_imports_universal_js_2.ColumnName; } });
58
+ Object.defineProperty(exports, "ImportStatus", { enumerable: true, get: function () { return loyalty_imports_v1_loyalty_import_imports_universal_js_2.ImportStatus; } });
59
+ Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return loyalty_imports_v1_loyalty_import_imports_universal_js_2.SortOrder; } });
60
+ Object.defineProperty(exports, "WebhookIdentityType", { enumerable: true, get: function () { return loyalty_imports_v1_loyalty_import_imports_universal_js_2.WebhookIdentityType; } });
61
+ //# sourceMappingURL=loyalty-imports-v1-loyalty-import-imports.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loyalty-imports-v1-loyalty-import-imports.public.js","sourceRoot":"","sources":["../../../src/loyalty-imports-v1-loyalty-import-imports.public.ts"],"names":[],"mappings":";;;AAAA,oFAAkG;AAClG,0EAAkG;AAClG,sFAAkF;AAClF,8CAA6D;AAC7D,qIAgBkE;AAErD,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE3D,SAAgB,mBAAmB,CACjC,UAAsB;IAEtB,OAAO,CAAC,OAAe,EAAE,OAAoC,EAAE,EAAE,CAC/D,IAAA,4EAA4B,EAC1B,OAAO,EACP,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAVD,kDAUC;AAeD,SAAgB,gBAAgB,CAC9B,UAAsB;IAEtB,OAAO,CAAC,eAAuB,EAAE,EAAE,CACjC,IAAA,yEAAyB,EACvB,eAAe;IACf,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,4CASC;AAWD,SAAgB,uBAAuB,CACrC,UAAsB;IAEtB,OAAO,CAAC,eAAuB,EAAE,EAAE,CACjC,IAAA,gFAAgC,EAC9B,eAAe;IACf,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,0DASC;AAcD,SAAgB,oBAAoB,CAClC,UAAsB;IAEtB,OAAO,CAAC,eAAuB,EAAE,OAAqC,EAAE,EAAE,CACxE,IAAA,6EAA6B,EAC3B,eAAe,EACf,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAVD,oDAUC;AAeD,SAAgB,0BAA0B,CACxC,UAAsB;IAEtB,OAAO,GAAG,EAAE,CACV,IAAA,mFAAmC;IACjC,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,gEAQC;AAWD,SAAgB,mBAAmB,CACjC,UAAsB;IAEtB,OAAO,GAAG,EAAE,CACV,IAAA,4EAA4B;IAC1B,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,kDAQC;AAsBY,QAAA,sBAAsB,GAAG,IAAA,2BAAe,EACnD,+CAA+C,EAC/C,IAAI,EACJ,CAAC,KAAmC,EAAE,EAAE,CACtC,IAAA,gEAAuC,EACrC,IAAA,gCAAc,EAAC,KAAK,EAAE;IACpB;QACE,WAAW,EAAE,gDAAoC;QACjD,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,oBAAoB,EAAE;YAC9B,EAAE,IAAI,EAAE,oBAAoB,EAAE;YAC9B,EAAE,IAAI,EAAE,oBAAoB,EAAE;SAC/B;KACF;CACF,CAAC,CACH,CACJ,EAAgC,CAAC;AAElC,mIAoDkE;AAjDhE,oJAAA,UAAU,OAAA;AAmCV,sJAAA,YAAY,OAAA;AAWZ,mJAAA,SAAS,OAAA;AAET,6JAAA,mBAAmB,OAAA"}
@@ -0,0 +1,473 @@
1
+ /**
2
+ * An Import object is a batch import of loyalty points for existing customers.
3
+ * You can use Loyalty Imports to import loyalty points from 3rd-party providers or update existing customer point balances.
4
+ * This object tracks the entire import process from file upload to data processing.
5
+ */
6
+ export interface LoyaltyImport {
7
+ /**
8
+ * The ID of the import.
9
+ * @format GUID
10
+ * @readonly
11
+ */
12
+ id?: string | null;
13
+ /**
14
+ * ID of the asynchronous import job associated with this import.
15
+ * @format GUID
16
+ * @readonly
17
+ */
18
+ asyncImportJobId?: string | null;
19
+ /**
20
+ * Revision number, which increments by 1 each time the Loyalty Import is updated.
21
+ * To prevent conflicting changes, the current revision must be passed when updating the Loyalty Import.
22
+ *
23
+ * Ignored when creating a Loyalty Import.
24
+ * @readonly
25
+ */
26
+ revision?: string | null;
27
+ /**
28
+ * Date and time the Loyalty Import was created.
29
+ * @readonly
30
+ */
31
+ createdDate?: Date | null;
32
+ /**
33
+ * Date and time the Loyalty Import was last updated.
34
+ * @readonly
35
+ */
36
+ updatedDate?: Date | null;
37
+ /**
38
+ * Current status of the import process.
39
+ * @readonly
40
+ */
41
+ status?: ImportStatus;
42
+ /** Metadata of the uploaded file containing loyalty points data. */
43
+ fileMetadata?: FileMetadata;
44
+ /** Results of parsing the uploaded file, including the number of rows parsed and any parse errors. */
45
+ parseResult?: ParseResult;
46
+ /** Results of the import process, including success and failure counts. */
47
+ importResult?: ImportResult;
48
+ }
49
+ export declare enum ImportStatus {
50
+ /** Status is unknown or not specified. */
51
+ UNKNOWN = "UNKNOWN",
52
+ /** The import has been initiated but processing has not yet begun. */
53
+ INITIATED = "INITIATED",
54
+ /** The system is currently parsing the import file. */
55
+ PARSING = "PARSING",
56
+ /** The import file has been successfully parsed and is ready for importing. */
57
+ PARSED = "PARSED",
58
+ /** The system is currently importing the parsed data. */
59
+ IMPORTING = "IMPORTING",
60
+ /** The import process is complete. This status indicates the process finished, but doesn't guarantee all data imported successfully. */
61
+ IMPORTED = "IMPORTED",
62
+ /** The import process has failed. */
63
+ FAILED = "FAILED"
64
+ }
65
+ export interface FileMetadata {
66
+ /**
67
+ * Size of the uploaded file in bytes. Max: `10 MB`.
68
+ * @max 104857600
69
+ * @readonly
70
+ */
71
+ size?: number | null;
72
+ /**
73
+ * Name of the uploaded file.
74
+ * @format GUID
75
+ * @readonly
76
+ */
77
+ name?: string | null;
78
+ /**
79
+ * URL of the uploaded file.
80
+ * @minLength 3
81
+ * @maxLength 10000
82
+ */
83
+ url?: string;
84
+ /** Column headings from the first row of the uploaded CSV file. */
85
+ header?: FileHeader;
86
+ /**
87
+ * Mapping between loyalty data fields and the corresponding columns in the uploaded file.
88
+ *
89
+ * Must include mappings for both `EMAIL` and `POINTS` to be valid.
90
+ */
91
+ headerMappingInfo?: HeaderMappingInfo;
92
+ /**
93
+ * Up to 5 sample rows from the import file, providing a preview of the data to be imported.
94
+ * @maxSize 5
95
+ */
96
+ sampleDataRows?: SampleDataRow[];
97
+ }
98
+ export interface FileHeader {
99
+ /**
100
+ * Column headings from the first row of the uploaded file.
101
+ * @maxSize 100
102
+ * @maxLength 1000
103
+ */
104
+ values?: string[];
105
+ }
106
+ export interface HeaderMappingInfo {
107
+ /**
108
+ * Mappings between required loyalty data fields and file columns.
109
+ * Must contain exactly 2 mappings: one for `EMAIL` and one for `POINTS`.
110
+ * @minSize 2
111
+ * @maxSize 2
112
+ */
113
+ headerMappings?: HeaderMapping[];
114
+ }
115
+ export interface HeaderMapping {
116
+ /** The required loyalty data field that this mapping corresponds to. Must be either `EMAIL` or `POINTS`. */
117
+ columnName?: ColumnName;
118
+ /**
119
+ * The zero-based index of the column in the uploaded file that contains the data for this loyalty field.
120
+ * For example, if the email addresses are in the second column of the CSV file, this value would be 1.
121
+ */
122
+ columnIndex?: number;
123
+ }
124
+ export declare enum ColumnName {
125
+ /** Column containing the customer's email address. */
126
+ EMAIL = "EMAIL",
127
+ /** Column containing the customer's loyalty point balance to be imported or updated. */
128
+ POINTS = "POINTS"
129
+ }
130
+ export interface SampleDataRow {
131
+ /**
132
+ * Values in one sample data row. Each value corresponds to a column in the CSV file.
133
+ * The number of values matches the number of columns in the file.
134
+ * @maxSize 20
135
+ * @maxLength 1000
136
+ */
137
+ values?: string[];
138
+ }
139
+ export interface ParseResult {
140
+ /**
141
+ * Number of rows parsed from the uploaded import file.
142
+ * @readonly
143
+ */
144
+ parsedRowCount?: number | null;
145
+ /**
146
+ * Reason code explaining why parsing failed, if applicable.
147
+ * @readonly
148
+ * @maxLength 1000
149
+ */
150
+ parseErrorReason?: string | null;
151
+ }
152
+ export interface ImportResult {
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
+ errorFileExists?: boolean;
155
+ /**
156
+ * Number of rows successfully imported.
157
+ * @readonly
158
+ */
159
+ successCount?: number | null;
160
+ /**
161
+ * Number of rows that failed to import due to errors.
162
+ * @readonly
163
+ */
164
+ failureCount?: number | null;
165
+ }
166
+ export interface CreateLoyaltyImportRequest {
167
+ /** URL of the file to import. */
168
+ fileUrl: string | null;
169
+ /** Name of the file to import. */
170
+ fileName?: string | null;
171
+ /** Size of the file to import, in bytes. */
172
+ fileSize?: number | null;
173
+ }
174
+ export interface CreateLoyaltyImportResponse {
175
+ /** Created loyalty import. */
176
+ loyaltyImport?: LoyaltyImport;
177
+ }
178
+ export interface GetLoyaltyImportRequest {
179
+ /** Loyalty import ID. */
180
+ loyaltyImportId: string;
181
+ }
182
+ export interface GetLoyaltyImportResponse {
183
+ /** Retrieved loyalty import. */
184
+ loyaltyImport?: LoyaltyImport;
185
+ }
186
+ export interface GetErrorFileDownloadUrlRequest {
187
+ /** Loyalty import ID. */
188
+ loyaltyImportId: string;
189
+ }
190
+ export interface GetErrorFileDownloadUrlResponse {
191
+ /** URL for downloading the error file. */
192
+ url?: string | null;
193
+ }
194
+ export interface ExecuteLoyaltyImportRequest {
195
+ /** Loyalty import ID. */
196
+ loyaltyImportId: string;
197
+ /** Header mapping information for the import file. */
198
+ headerMappingInfo?: HeaderMappingInfo;
199
+ }
200
+ export interface ExecuteLoyaltyImportResponse {
201
+ /** Executed loyalty import. */
202
+ loyaltyImport?: LoyaltyImport;
203
+ }
204
+ export interface CreateLoyaltyImportFileUrlRequest {
205
+ }
206
+ export interface CreateLoyaltyImportFileUrlResponse {
207
+ /** Path where the file will be stored. */
208
+ filePath?: string | null;
209
+ /** URL for uploading the loyalty import file. */
210
+ uploadUrl?: string | null;
211
+ }
212
+ export interface QueryLoyaltyImportsRequest {
213
+ /**
214
+ * Filter object.
215
+ * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
216
+ * for more information.
217
+ *
218
+ * For a detailed list of supported filters, see
219
+ * [Supported Filters](https://dev.wix.com/api/rest/wix-loyalty-program/loyalty-imports/supported-filters).
220
+ */
221
+ query: CursorQuery;
222
+ }
223
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
224
+ /**
225
+ * Cursor paging options.
226
+ *
227
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
228
+ */
229
+ cursorPaging?: CursorPaging;
230
+ /**
231
+ * Filter object.
232
+ *
233
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
234
+ */
235
+ filter?: Record<string, any> | null;
236
+ /**
237
+ * Sort object.
238
+ *
239
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
240
+ * @maxSize 5
241
+ */
242
+ sort?: Sorting[];
243
+ }
244
+ /** @oneof */
245
+ export interface CursorQueryPagingMethodOneOf {
246
+ /**
247
+ * Cursor paging options.
248
+ *
249
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
250
+ */
251
+ cursorPaging?: CursorPaging;
252
+ }
253
+ export interface Sorting {
254
+ /**
255
+ * Name of the field to sort by.
256
+ * @maxLength 512
257
+ */
258
+ fieldName?: string;
259
+ /** Sort order. */
260
+ order?: SortOrder;
261
+ }
262
+ export declare enum SortOrder {
263
+ ASC = "ASC",
264
+ DESC = "DESC"
265
+ }
266
+ export interface CursorPaging {
267
+ /**
268
+ * Maximum number of items to return in the results.
269
+ * @max 100
270
+ */
271
+ limit?: number | null;
272
+ /**
273
+ * Pointer to the next or previous page in the list of results.
274
+ *
275
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
276
+ * Not relevant for the first request.
277
+ * @maxLength 16000
278
+ */
279
+ cursor?: string | null;
280
+ }
281
+ export interface QueryLoyaltyImportsResponse {
282
+ /** List of loyalty imports matching the query. */
283
+ loyaltyImports?: LoyaltyImport[];
284
+ /** Paging metadata. */
285
+ pagingMetadata?: CursorPagingMetadata;
286
+ }
287
+ export interface CursorPagingMetadata {
288
+ /** Number of items returned in current page. */
289
+ count?: number | null;
290
+ /** Cursor strings that point to the next page, previous page, or both. */
291
+ cursors?: Cursors;
292
+ /**
293
+ * Whether there are more pages to retrieve following the current page.
294
+ *
295
+ * + `true`: Another page of results can be retrieved.
296
+ * + `false`: This is the last page.
297
+ */
298
+ hasNext?: boolean | null;
299
+ }
300
+ export interface Cursors {
301
+ /**
302
+ * Cursor string pointing to the next page in the list of results.
303
+ * @maxLength 16000
304
+ */
305
+ next?: string | null;
306
+ /**
307
+ * Cursor pointing to the previous page in the list of results.
308
+ * @maxLength 16000
309
+ */
310
+ prev?: string | null;
311
+ }
312
+ export interface DeleteLoyaltyImportRequest {
313
+ /**
314
+ * Loyalty import ID.
315
+ * @format GUID
316
+ */
317
+ loyaltyImportId?: string;
318
+ /**
319
+ * Revision number, which increments by 1 each time the loyalty import is updated.
320
+ * To prevent conflicting changes, the current revision must be passed when updating the loyalty import.
321
+ */
322
+ revision?: string;
323
+ }
324
+ export interface DeleteLoyaltyImportResponse {
325
+ }
326
+ export interface DomainEvent extends DomainEventBodyOneOf {
327
+ createdEvent?: EntityCreatedEvent;
328
+ updatedEvent?: EntityUpdatedEvent;
329
+ deletedEvent?: EntityDeletedEvent;
330
+ actionEvent?: ActionEvent;
331
+ /**
332
+ * Unique event ID.
333
+ * Allows clients to ignore duplicate webhooks.
334
+ */
335
+ id?: string;
336
+ /**
337
+ * Assumes actions are also always typed to an entity_type
338
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
339
+ */
340
+ entityFqdn?: string;
341
+ /**
342
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
343
+ * This is although the created/updated/deleted notion is duplication of the oneof types
344
+ * Example: created/updated/deleted/started/completed/email_opened
345
+ */
346
+ slug?: string;
347
+ /** ID of the entity associated with the event. */
348
+ entityId?: string;
349
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
350
+ eventTime?: Date | null;
351
+ /**
352
+ * Whether the event was triggered as a result of a privacy regulation application
353
+ * (for example, GDPR).
354
+ */
355
+ triggeredByAnonymizeRequest?: boolean | null;
356
+ /** If present, indicates the action that triggered the event. */
357
+ originatedFrom?: string | null;
358
+ /**
359
+ * A sequence number defining the order of updates to the underlying entity.
360
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
361
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
362
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
363
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
364
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
365
+ */
366
+ entityEventSequence?: string | null;
367
+ }
368
+ /** @oneof */
369
+ export interface DomainEventBodyOneOf {
370
+ createdEvent?: EntityCreatedEvent;
371
+ updatedEvent?: EntityUpdatedEvent;
372
+ deletedEvent?: EntityDeletedEvent;
373
+ actionEvent?: ActionEvent;
374
+ }
375
+ export interface EntityCreatedEvent {
376
+ entityAsJson?: string;
377
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
378
+ restoreInfo?: RestoreInfo;
379
+ }
380
+ export interface RestoreInfo {
381
+ deletedDate?: Date | null;
382
+ }
383
+ export interface EntityUpdatedEvent {
384
+ /**
385
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
386
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
387
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
388
+ */
389
+ currentEntityAsJson?: string;
390
+ }
391
+ export interface EntityDeletedEvent {
392
+ /** Entity that was deleted */
393
+ deletedEntityAsJson?: string | null;
394
+ }
395
+ export interface ActionEvent {
396
+ bodyAsJson?: string;
397
+ }
398
+ export interface Empty {
399
+ }
400
+ export interface ImportFinished {
401
+ /** Completed loyalty import. */
402
+ loyaltyImport?: LoyaltyImport;
403
+ }
404
+ export interface MessageEnvelope {
405
+ /**
406
+ * App instance ID.
407
+ * @format GUID
408
+ */
409
+ instanceId?: string | null;
410
+ /**
411
+ * Event type.
412
+ * @maxLength 150
413
+ */
414
+ eventType?: string;
415
+ /** The identification type and identity data. */
416
+ identity?: IdentificationData;
417
+ /** Stringify payload. */
418
+ data?: string;
419
+ }
420
+ export interface IdentificationData extends IdentificationDataIdOneOf {
421
+ /**
422
+ * ID of a site visitor that has not logged in to the site.
423
+ * @format GUID
424
+ */
425
+ anonymousVisitorId?: string;
426
+ /**
427
+ * ID of a site visitor that has logged in to the site.
428
+ * @format GUID
429
+ */
430
+ memberId?: string;
431
+ /**
432
+ * ID of a Wix user (site owner, contributor, etc.).
433
+ * @format GUID
434
+ */
435
+ wixUserId?: string;
436
+ /**
437
+ * ID of an app.
438
+ * @format GUID
439
+ */
440
+ appId?: string;
441
+ /** @readonly */
442
+ identityType?: WebhookIdentityType;
443
+ }
444
+ /** @oneof */
445
+ export interface IdentificationDataIdOneOf {
446
+ /**
447
+ * ID of a site visitor that has not logged in to the site.
448
+ * @format GUID
449
+ */
450
+ anonymousVisitorId?: string;
451
+ /**
452
+ * ID of a site visitor that has logged in to the site.
453
+ * @format GUID
454
+ */
455
+ memberId?: string;
456
+ /**
457
+ * ID of a Wix user (site owner, contributor, etc.).
458
+ * @format GUID
459
+ */
460
+ wixUserId?: string;
461
+ /**
462
+ * ID of an app.
463
+ * @format GUID
464
+ */
465
+ appId?: string;
466
+ }
467
+ export declare enum WebhookIdentityType {
468
+ UNKNOWN = "UNKNOWN",
469
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
470
+ MEMBER = "MEMBER",
471
+ WIX_USER = "WIX_USER",
472
+ APP = "APP"
473
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookIdentityType = exports.SortOrder = exports.ColumnName = exports.ImportStatus = void 0;
4
+ var ImportStatus;
5
+ (function (ImportStatus) {
6
+ /** Status is unknown or not specified. */
7
+ ImportStatus["UNKNOWN"] = "UNKNOWN";
8
+ /** The import has been initiated but processing has not yet begun. */
9
+ ImportStatus["INITIATED"] = "INITIATED";
10
+ /** The system is currently parsing the import file. */
11
+ ImportStatus["PARSING"] = "PARSING";
12
+ /** The import file has been successfully parsed and is ready for importing. */
13
+ ImportStatus["PARSED"] = "PARSED";
14
+ /** The system is currently importing the parsed data. */
15
+ ImportStatus["IMPORTING"] = "IMPORTING";
16
+ /** The import process is complete. This status indicates the process finished, but doesn't guarantee all data imported successfully. */
17
+ ImportStatus["IMPORTED"] = "IMPORTED";
18
+ /** The import process has failed. */
19
+ ImportStatus["FAILED"] = "FAILED";
20
+ })(ImportStatus || (exports.ImportStatus = ImportStatus = {}));
21
+ var ColumnName;
22
+ (function (ColumnName) {
23
+ /** Column containing the customer's email address. */
24
+ ColumnName["EMAIL"] = "EMAIL";
25
+ /** Column containing the customer's loyalty point balance to be imported or updated. */
26
+ ColumnName["POINTS"] = "POINTS";
27
+ })(ColumnName || (exports.ColumnName = ColumnName = {}));
28
+ var SortOrder;
29
+ (function (SortOrder) {
30
+ SortOrder["ASC"] = "ASC";
31
+ SortOrder["DESC"] = "DESC";
32
+ })(SortOrder || (exports.SortOrder = SortOrder = {}));
33
+ var WebhookIdentityType;
34
+ (function (WebhookIdentityType) {
35
+ WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
36
+ WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
37
+ WebhookIdentityType["MEMBER"] = "MEMBER";
38
+ WebhookIdentityType["WIX_USER"] = "WIX_USER";
39
+ WebhookIdentityType["APP"] = "APP";
40
+ })(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
41
+ //# sourceMappingURL=loyalty-imports-v1-loyalty-import-imports.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loyalty-imports-v1-loyalty-import-imports.types.js","sourceRoot":"","sources":["../../../src/loyalty-imports-v1-loyalty-import-imports.types.ts"],"names":[],"mappings":";;;AAiDA,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,0CAA0C;IAC1C,mCAAmB,CAAA;IACnB,sEAAsE;IACtE,uCAAuB,CAAA;IACvB,uDAAuD;IACvD,mCAAmB,CAAA;IACnB,+EAA+E;IAC/E,iCAAiB,CAAA;IACjB,yDAAyD;IACzD,uCAAuB,CAAA;IACvB,wIAAwI;IACxI,qCAAqB,CAAA;IACrB,qCAAqC;IACrC,iCAAiB,CAAA;AACnB,CAAC,EAfW,YAAY,4BAAZ,YAAY,QAevB;AAiED,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,sDAAsD;IACtD,6BAAe,CAAA;IACf,wFAAwF;IACxF,+BAAiB,CAAA;AACnB,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAsJD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AA2ND,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}