@deenruv/replicate-simple-bg-plugin 1.0.0

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 (66) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +54 -0
  3. package/dist/plugin-server/constants.d.ts +13 -0
  4. package/dist/plugin-server/constants.js +122 -0
  5. package/dist/plugin-server/entities/replicate-simple-bg.d.ts +11 -0
  6. package/dist/plugin-server/entities/replicate-simple-bg.js +49 -0
  7. package/dist/plugin-server/extensions/replicate-simple-bg.extension.d.ts +1 -0
  8. package/dist/plugin-server/extensions/replicate-simple-bg.extension.js +105 -0
  9. package/dist/plugin-server/graphql/generated-admin-types.d.ts +5807 -0
  10. package/dist/plugin-server/graphql/generated-admin-types.js +1030 -0
  11. package/dist/plugin-server/index.d.ts +5 -0
  12. package/dist/plugin-server/index.js +40 -0
  13. package/dist/plugin-server/resolvers/replicate-simple-bg-admin.resolver.d.ts +51 -0
  14. package/dist/plugin-server/resolvers/replicate-simple-bg-admin.resolver.js +105 -0
  15. package/dist/plugin-server/services/replicate-simple-bg.service.d.ts +45 -0
  16. package/dist/plugin-server/services/replicate-simple-bg.service.js +254 -0
  17. package/dist/plugin-server/types.d.ts +29 -0
  18. package/dist/plugin-server/types.js +2 -0
  19. package/dist/plugin-server/zeus/const.d.ts +6 -0
  20. package/dist/plugin-server/zeus/const.js +3714 -0
  21. package/dist/plugin-server/zeus/index.d.ts +18885 -0
  22. package/dist/plugin-server/zeus/index.js +1101 -0
  23. package/dist/plugin-server/zeus/typedDocumentNode.d.ts +3 -0
  24. package/dist/plugin-server/zeus/typedDocumentNode.js +13 -0
  25. package/dist/plugin-ui/components/FileUpload.d.ts +11 -0
  26. package/dist/plugin-ui/components/FileUpload.js +50 -0
  27. package/dist/plugin-ui/components/RoomStyleSelect.d.ts +7 -0
  28. package/dist/plugin-ui/components/RoomStyleSelect.js +19 -0
  29. package/dist/plugin-ui/components/RoomTypeSelect.d.ts +7 -0
  30. package/dist/plugin-ui/components/RoomTypeSelect.js +21 -0
  31. package/dist/plugin-ui/components/index.d.ts +1 -0
  32. package/dist/plugin-ui/components/index.js +1 -0
  33. package/dist/plugin-ui/constants.d.ts +1 -0
  34. package/dist/plugin-ui/constants.js +15 -0
  35. package/dist/plugin-ui/graphql/mutations.d.ts +22 -0
  36. package/dist/plugin-ui/graphql/mutations.js +21 -0
  37. package/dist/plugin-ui/graphql/queries.d.ts +87 -0
  38. package/dist/plugin-ui/graphql/queries.js +32 -0
  39. package/dist/plugin-ui/graphql/selectors.d.ts +43 -0
  40. package/dist/plugin-ui/graphql/selectors.js +38 -0
  41. package/dist/plugin-ui/index.d.ts +1 -0
  42. package/dist/plugin-ui/index.js +33 -0
  43. package/dist/plugin-ui/locales/en/index.d.ts +67 -0
  44. package/dist/plugin-ui/locales/en/index.js +2 -0
  45. package/dist/plugin-ui/locales/en/simpleBg.json +66 -0
  46. package/dist/plugin-ui/locales/pl/index.d.ts +67 -0
  47. package/dist/plugin-ui/locales/pl/index.js +2 -0
  48. package/dist/plugin-ui/locales/pl/simpleBg.json +66 -0
  49. package/dist/plugin-ui/pages/ReplicatePage.d.ts +2 -0
  50. package/dist/plugin-ui/pages/ReplicatePage.js +282 -0
  51. package/dist/plugin-ui/pages/ReplicateProductSidebar.d.ts +2 -0
  52. package/dist/plugin-ui/pages/ReplicateProductSidebar.js +186 -0
  53. package/dist/plugin-ui/translation-ns.d.ts +1 -0
  54. package/dist/plugin-ui/translation-ns.js +1 -0
  55. package/dist/plugin-ui/tsconfig.json +18 -0
  56. package/dist/plugin-ui/types.d.ts +35 -0
  57. package/dist/plugin-ui/types.js +15 -0
  58. package/dist/plugin-ui/zeus/const.d.ts +6 -0
  59. package/dist/plugin-ui/zeus/const.js +3711 -0
  60. package/dist/plugin-ui/zeus/index.d.ts +18885 -0
  61. package/dist/plugin-ui/zeus/index.js +1093 -0
  62. package/dist/plugin-ui/zeus/scalars.d.ts +18 -0
  63. package/dist/plugin-ui/zeus/scalars.js +25 -0
  64. package/dist/plugin-ui/zeus/typedDocumentNode.d.ts +3 -0
  65. package/dist/plugin-ui/zeus/typedDocumentNode.js +9 -0
  66. package/package.json +53 -0
@@ -0,0 +1,1101 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.PredictionSimpleBgStatus = exports.MetricType = exports.MetricInterval = exports.OrderType = exports.LanguageCode = exports.HistoryEntryType = exports.CurrencyCode = exports.LogicalOperator = exports.ErrorCode = exports.SortOrder = exports.Permission = exports.DeletionResult = exports.AdjustmentType = exports.GlobalFlag = exports.AssetType = exports.StockMovementType = exports.JobState = exports.$ = exports.GRAPHQL_TYPE_SEPARATOR = exports.START_VAR_NAME = exports.resolverFor = exports.InternalArgsBuilt = exports.ResolveFromPath = exports.purifyGraphQLKey = exports.PrepareScalarPaths = exports.GraphQLError = exports.SEPARATOR = exports.traverseResponse = exports.decodeScalarsInResponse = exports.fields = exports.ZeusScalars = exports.Gql = exports.TypeFromSelector = exports.Selector = exports.ZeusSelect = exports.Zeus = exports.Subscription = exports.SubscriptionThunder = exports.Chain = exports.Thunder = exports.InternalsBuildQuery = exports.apiFetch = exports.apiSubscription = exports.HEADERS = exports.HOST = void 0;
5
+ const const_js_1 = require("./const.js");
6
+ exports.HOST = "http://localhost:3000/admin-api";
7
+ exports.HEADERS = {};
8
+ const apiSubscription = (options) => (query) => {
9
+ var _a, _b, _c;
10
+ try {
11
+ const queryString = options[0] + '?query=' + encodeURIComponent(query);
12
+ const wsString = queryString.replace('http', 'ws');
13
+ const host = (options.length > 1 && ((_b = (_a = options[1]) === null || _a === void 0 ? void 0 : _a.websocket) === null || _b === void 0 ? void 0 : _b[0])) || wsString;
14
+ const webSocketOptions = ((_c = options[1]) === null || _c === void 0 ? void 0 : _c.websocket) || [host];
15
+ const ws = new WebSocket(...webSocketOptions);
16
+ return {
17
+ ws,
18
+ on: (e) => {
19
+ ws.onmessage = (event) => {
20
+ if (event.data) {
21
+ const parsed = JSON.parse(event.data);
22
+ const data = parsed.data;
23
+ return e(data);
24
+ }
25
+ };
26
+ },
27
+ off: (e) => {
28
+ ws.onclose = e;
29
+ },
30
+ error: (e) => {
31
+ ws.onerror = e;
32
+ },
33
+ open: (e) => {
34
+ ws.onopen = e;
35
+ },
36
+ };
37
+ }
38
+ catch (_d) {
39
+ throw new Error('No websockets implemented');
40
+ }
41
+ };
42
+ exports.apiSubscription = apiSubscription;
43
+ const handleFetchResponse = (response) => {
44
+ if (!response.ok) {
45
+ return new Promise((_, reject) => {
46
+ response
47
+ .text()
48
+ .then((text) => {
49
+ try {
50
+ reject(JSON.parse(text));
51
+ }
52
+ catch (err) {
53
+ reject(text);
54
+ }
55
+ })
56
+ .catch(reject);
57
+ });
58
+ }
59
+ return response.json();
60
+ };
61
+ const apiFetch = (options) => (query, variables = {}) => {
62
+ const fetchOptions = options[1] || {};
63
+ if (fetchOptions.method && fetchOptions.method === 'GET') {
64
+ return fetch(`${options[0]}?query=${encodeURIComponent(query)}`, fetchOptions)
65
+ .then(handleFetchResponse)
66
+ .then((response) => {
67
+ if (response.errors) {
68
+ throw new GraphQLError(response);
69
+ }
70
+ return response.data;
71
+ });
72
+ }
73
+ return fetch(`${options[0]}`, Object.assign({ body: JSON.stringify({ query, variables }), method: 'POST', headers: {
74
+ 'Content-Type': 'application/json',
75
+ } }, fetchOptions))
76
+ .then(handleFetchResponse)
77
+ .then((response) => {
78
+ if (response.errors) {
79
+ throw new GraphQLError(response);
80
+ }
81
+ return response.data;
82
+ });
83
+ };
84
+ exports.apiFetch = apiFetch;
85
+ const InternalsBuildQuery = ({ ops, props, returns, options, scalars, }) => {
86
+ const ibb = (k, o, p = '', root = true, vars = []) => {
87
+ var _a;
88
+ const keyForPath = (0, exports.purifyGraphQLKey)(k);
89
+ const newPath = [p, keyForPath].join(exports.SEPARATOR);
90
+ if (!o) {
91
+ return '';
92
+ }
93
+ if (typeof o === 'boolean' || typeof o === 'number') {
94
+ return k;
95
+ }
96
+ if (typeof o === 'string') {
97
+ return `${k} ${o}`;
98
+ }
99
+ if (Array.isArray(o)) {
100
+ const args = (0, exports.InternalArgsBuilt)({
101
+ props,
102
+ returns,
103
+ ops,
104
+ scalars,
105
+ vars,
106
+ })(o[0], newPath);
107
+ return `${ibb(args ? `${k}(${args})` : k, o[1], p, false, vars)}`;
108
+ }
109
+ if (k === '__alias') {
110
+ return Object.entries(o)
111
+ .map(([alias, objectUnderAlias]) => {
112
+ if (typeof objectUnderAlias !== 'object' || Array.isArray(objectUnderAlias)) {
113
+ throw new Error('Invalid alias it should be __alias:{ YOUR_ALIAS_NAME: { OPERATION_NAME: { ...selectors }}}');
114
+ }
115
+ const operationName = Object.keys(objectUnderAlias)[0];
116
+ const operation = objectUnderAlias[operationName];
117
+ return ibb(`${alias}:${operationName}`, operation, p, false, vars);
118
+ })
119
+ .join('\n');
120
+ }
121
+ const hasOperationName = root && (options === null || options === void 0 ? void 0 : options.operationName) ? ' ' + options.operationName : '';
122
+ const keyForDirectives = (_a = o.__directives) !== null && _a !== void 0 ? _a : '';
123
+ const query = `{${Object.entries(o)
124
+ .filter(([k]) => k !== '__directives')
125
+ .map((e) => ibb(...e, [p, `field<>${keyForPath}`].join(exports.SEPARATOR), false, vars))
126
+ .join('\n')}}`;
127
+ if (!root) {
128
+ return `${k} ${keyForDirectives}${hasOperationName} ${query}`;
129
+ }
130
+ const varsString = vars.map((v) => `${v.name}: ${v.graphQLType}`).join(', ');
131
+ return `${k} ${keyForDirectives}${hasOperationName}${varsString ? `(${varsString})` : ''} ${query}`;
132
+ };
133
+ return ibb;
134
+ };
135
+ exports.InternalsBuildQuery = InternalsBuildQuery;
136
+ const Thunder = (fn, thunderGraphQLOptions) => (operation, graphqlOptions) => (o, ops) => {
137
+ const options = Object.assign(Object.assign({}, thunderGraphQLOptions), graphqlOptions);
138
+ return fn((0, exports.Zeus)(operation, o, {
139
+ operationOptions: ops,
140
+ scalars: options === null || options === void 0 ? void 0 : options.scalars,
141
+ }), ops === null || ops === void 0 ? void 0 : ops.variables).then((data) => {
142
+ if (options === null || options === void 0 ? void 0 : options.scalars) {
143
+ return (0, exports.decodeScalarsInResponse)({
144
+ response: data,
145
+ initialOp: operation,
146
+ initialZeusQuery: o,
147
+ returns: const_js_1.ReturnTypes,
148
+ scalars: options.scalars,
149
+ ops: const_js_1.Ops,
150
+ });
151
+ }
152
+ return data;
153
+ });
154
+ };
155
+ exports.Thunder = Thunder;
156
+ const Chain = (...options) => (0, exports.Thunder)((0, exports.apiFetch)(options));
157
+ exports.Chain = Chain;
158
+ const SubscriptionThunder = (fn, thunderGraphQLOptions) => (operation, graphqlOptions) => (o, ops) => {
159
+ const options = Object.assign(Object.assign({}, thunderGraphQLOptions), graphqlOptions);
160
+ const returnedFunction = fn((0, exports.Zeus)(operation, o, {
161
+ operationOptions: ops,
162
+ scalars: options === null || options === void 0 ? void 0 : options.scalars,
163
+ }));
164
+ if ((returnedFunction === null || returnedFunction === void 0 ? void 0 : returnedFunction.on) && (options === null || options === void 0 ? void 0 : options.scalars)) {
165
+ const wrapped = returnedFunction.on;
166
+ returnedFunction.on = (fnToCall) => wrapped((data) => {
167
+ if (options === null || options === void 0 ? void 0 : options.scalars) {
168
+ return fnToCall((0, exports.decodeScalarsInResponse)({
169
+ response: data,
170
+ initialOp: operation,
171
+ initialZeusQuery: o,
172
+ returns: const_js_1.ReturnTypes,
173
+ scalars: options.scalars,
174
+ ops: const_js_1.Ops,
175
+ }));
176
+ }
177
+ return fnToCall(data);
178
+ });
179
+ }
180
+ return returnedFunction;
181
+ };
182
+ exports.SubscriptionThunder = SubscriptionThunder;
183
+ const Subscription = (...options) => (0, exports.SubscriptionThunder)((0, exports.apiSubscription)(options));
184
+ exports.Subscription = Subscription;
185
+ const Zeus = (operation, o, ops) => (0, exports.InternalsBuildQuery)({
186
+ props: const_js_1.AllTypesProps,
187
+ returns: const_js_1.ReturnTypes,
188
+ ops: const_js_1.Ops,
189
+ options: ops === null || ops === void 0 ? void 0 : ops.operationOptions,
190
+ scalars: ops === null || ops === void 0 ? void 0 : ops.scalars,
191
+ })(operation, o);
192
+ exports.Zeus = Zeus;
193
+ const ZeusSelect = () => ((t) => t);
194
+ exports.ZeusSelect = ZeusSelect;
195
+ const Selector = (key) => key && (0, exports.ZeusSelect)();
196
+ exports.Selector = Selector;
197
+ const TypeFromSelector = (key) => key && (0, exports.ZeusSelect)();
198
+ exports.TypeFromSelector = TypeFromSelector;
199
+ exports.Gql = (0, exports.Chain)(exports.HOST, {
200
+ headers: Object.assign({ 'Content-Type': 'application/json' }, exports.HEADERS),
201
+ });
202
+ exports.ZeusScalars = (0, exports.ZeusSelect)();
203
+ const fields = (k) => {
204
+ const t = const_js_1.ReturnTypes[k];
205
+ const fnType = k in const_js_1.AllTypesProps ? const_js_1.AllTypesProps[k] : undefined;
206
+ const hasFnTypes = typeof fnType === 'object' ? fnType : undefined;
207
+ const o = Object.fromEntries(Object.entries(t)
208
+ .filter(([k, value]) => {
209
+ const isFunctionType = hasFnTypes && k in hasFnTypes && !!hasFnTypes[k];
210
+ if (isFunctionType)
211
+ return false;
212
+ const isReturnType = const_js_1.ReturnTypes[value];
213
+ if (!isReturnType)
214
+ return true;
215
+ if (typeof isReturnType !== 'string')
216
+ return false;
217
+ if (isReturnType.startsWith('scalar.')) {
218
+ return true;
219
+ }
220
+ return false;
221
+ })
222
+ .map(([key]) => [key, true]));
223
+ return o;
224
+ };
225
+ exports.fields = fields;
226
+ const decodeScalarsInResponse = ({ response, scalars, returns, ops, initialZeusQuery, initialOp, }) => {
227
+ if (!scalars) {
228
+ return response;
229
+ }
230
+ const builder = (0, exports.PrepareScalarPaths)({
231
+ ops,
232
+ returns,
233
+ });
234
+ const scalarPaths = builder(initialOp, ops[initialOp], initialZeusQuery);
235
+ if (scalarPaths) {
236
+ const r = (0, exports.traverseResponse)({ scalarPaths, resolvers: scalars })(initialOp, response, [ops[initialOp]]);
237
+ return r;
238
+ }
239
+ return response;
240
+ };
241
+ exports.decodeScalarsInResponse = decodeScalarsInResponse;
242
+ const traverseResponse = ({ resolvers, scalarPaths, }) => {
243
+ const ibb = (k, o, p = []) => {
244
+ var _a;
245
+ if (Array.isArray(o)) {
246
+ return o.map((eachO) => ibb(k, eachO, p));
247
+ }
248
+ if (o == null) {
249
+ return o;
250
+ }
251
+ const scalarPathString = p.join(exports.SEPARATOR);
252
+ const currentScalarString = scalarPaths[scalarPathString];
253
+ if (currentScalarString) {
254
+ const currentDecoder = (_a = resolvers[currentScalarString.split('.')[1]]) === null || _a === void 0 ? void 0 : _a.decode;
255
+ if (currentDecoder) {
256
+ return currentDecoder(o);
257
+ }
258
+ }
259
+ if (typeof o === 'boolean' || typeof o === 'number' || typeof o === 'string' || !o) {
260
+ return o;
261
+ }
262
+ const entries = Object.entries(o).map(([k, v]) => [k, ibb(k, v, [...p, (0, exports.purifyGraphQLKey)(k)])]);
263
+ const objectFromEntries = entries.reduce((a, [k, v]) => {
264
+ a[k] = v;
265
+ return a;
266
+ }, {});
267
+ return objectFromEntries;
268
+ };
269
+ return ibb;
270
+ };
271
+ exports.traverseResponse = traverseResponse;
272
+ exports.SEPARATOR = '|';
273
+ class GraphQLError extends Error {
274
+ constructor(response) {
275
+ super('');
276
+ this.response = response;
277
+ console.error(response);
278
+ }
279
+ toString() {
280
+ return 'GraphQL Response Error';
281
+ }
282
+ }
283
+ exports.GraphQLError = GraphQLError;
284
+ const ExtractScalar = (mappedParts, returns) => {
285
+ if (mappedParts.length === 0) {
286
+ return;
287
+ }
288
+ const oKey = mappedParts[0];
289
+ const returnP1 = returns[oKey];
290
+ if (typeof returnP1 === 'object') {
291
+ const returnP2 = returnP1[mappedParts[1]];
292
+ if (returnP2) {
293
+ return ExtractScalar([returnP2, ...mappedParts.slice(2)], returns);
294
+ }
295
+ return undefined;
296
+ }
297
+ return returnP1;
298
+ };
299
+ const PrepareScalarPaths = ({ ops, returns }) => {
300
+ const ibb = (k, originalKey, o, p = [], pOriginals = [], root = true) => {
301
+ if (!o) {
302
+ return;
303
+ }
304
+ if (typeof o === 'boolean' || typeof o === 'number' || typeof o === 'string') {
305
+ const extractionArray = [...pOriginals, originalKey];
306
+ const isScalar = ExtractScalar(extractionArray, returns);
307
+ if (isScalar === null || isScalar === void 0 ? void 0 : isScalar.startsWith('scalar')) {
308
+ const partOfTree = {
309
+ [[...p, k].join(exports.SEPARATOR)]: isScalar,
310
+ };
311
+ return partOfTree;
312
+ }
313
+ return {};
314
+ }
315
+ if (Array.isArray(o)) {
316
+ return ibb(k, k, o[1], p, pOriginals, false);
317
+ }
318
+ if (k === '__alias') {
319
+ return Object.entries(o)
320
+ .map(([alias, objectUnderAlias]) => {
321
+ if (typeof objectUnderAlias !== 'object' || Array.isArray(objectUnderAlias)) {
322
+ throw new Error('Invalid alias it should be __alias:{ YOUR_ALIAS_NAME: { OPERATION_NAME: { ...selectors }}}');
323
+ }
324
+ const operationName = Object.keys(objectUnderAlias)[0];
325
+ const operation = objectUnderAlias[operationName];
326
+ return ibb(alias, operationName, operation, p, pOriginals, false);
327
+ })
328
+ .reduce((a, b) => (Object.assign(Object.assign({}, a), b)));
329
+ }
330
+ const keyName = root ? ops[k] : k;
331
+ return Object.entries(o)
332
+ .filter(([k]) => k !== '__directives')
333
+ .map(([k, v]) => {
334
+ // Inline fragments shouldn't be added to the path as they aren't a field
335
+ const isInlineFragment = originalKey.match(/^...\s*on/) != null;
336
+ return ibb(k, k, v, isInlineFragment ? p : [...p, (0, exports.purifyGraphQLKey)(keyName || k)], isInlineFragment ? pOriginals : [...pOriginals, (0, exports.purifyGraphQLKey)(originalKey)], false);
337
+ })
338
+ .reduce((a, b) => (Object.assign(Object.assign({}, a), b)));
339
+ };
340
+ return ibb;
341
+ };
342
+ exports.PrepareScalarPaths = PrepareScalarPaths;
343
+ const purifyGraphQLKey = (k) => k.replace(/\([^)]*\)/g, '').replace(/^[^:]*\:/g, '');
344
+ exports.purifyGraphQLKey = purifyGraphQLKey;
345
+ const mapPart = (p) => {
346
+ const [isArg, isField] = p.split('<>');
347
+ if (isField) {
348
+ return {
349
+ v: isField,
350
+ __type: 'field',
351
+ };
352
+ }
353
+ return {
354
+ v: isArg,
355
+ __type: 'arg',
356
+ };
357
+ };
358
+ const ResolveFromPath = (props, returns, ops) => {
359
+ const ResolvePropsType = (mappedParts) => {
360
+ const oKey = ops[mappedParts[0].v];
361
+ const propsP1 = oKey ? props[oKey] : props[mappedParts[0].v];
362
+ if (propsP1 === 'enum' && mappedParts.length === 1) {
363
+ return 'enum';
364
+ }
365
+ if (typeof propsP1 === 'string' && propsP1.startsWith('scalar.') && mappedParts.length === 1) {
366
+ return propsP1;
367
+ }
368
+ if (typeof propsP1 === 'object') {
369
+ if (mappedParts.length < 2) {
370
+ return 'not';
371
+ }
372
+ const propsP2 = propsP1[mappedParts[1].v];
373
+ if (typeof propsP2 === 'string') {
374
+ return rpp(`${propsP2}${exports.SEPARATOR}${mappedParts
375
+ .slice(2)
376
+ .map((mp) => mp.v)
377
+ .join(exports.SEPARATOR)}`);
378
+ }
379
+ if (typeof propsP2 === 'object') {
380
+ if (mappedParts.length < 3) {
381
+ return 'not';
382
+ }
383
+ const propsP3 = propsP2[mappedParts[2].v];
384
+ if (propsP3 && mappedParts[2].__type === 'arg') {
385
+ return rpp(`${propsP3}${exports.SEPARATOR}${mappedParts
386
+ .slice(3)
387
+ .map((mp) => mp.v)
388
+ .join(exports.SEPARATOR)}`);
389
+ }
390
+ }
391
+ }
392
+ };
393
+ const ResolveReturnType = (mappedParts) => {
394
+ if (mappedParts.length === 0) {
395
+ return 'not';
396
+ }
397
+ const oKey = ops[mappedParts[0].v];
398
+ const returnP1 = oKey ? returns[oKey] : returns[mappedParts[0].v];
399
+ if (typeof returnP1 === 'object') {
400
+ if (mappedParts.length < 2)
401
+ return 'not';
402
+ const returnP2 = returnP1[mappedParts[1].v];
403
+ if (returnP2) {
404
+ return rpp(`${returnP2}${exports.SEPARATOR}${mappedParts
405
+ .slice(2)
406
+ .map((mp) => mp.v)
407
+ .join(exports.SEPARATOR)}`);
408
+ }
409
+ }
410
+ };
411
+ const rpp = (path) => {
412
+ const parts = path.split(exports.SEPARATOR).filter((l) => l.length > 0);
413
+ const mappedParts = parts.map(mapPart);
414
+ const propsP1 = ResolvePropsType(mappedParts);
415
+ if (propsP1) {
416
+ return propsP1;
417
+ }
418
+ const returnP1 = ResolveReturnType(mappedParts);
419
+ if (returnP1) {
420
+ return returnP1;
421
+ }
422
+ return 'not';
423
+ };
424
+ return rpp;
425
+ };
426
+ exports.ResolveFromPath = ResolveFromPath;
427
+ const InternalArgsBuilt = ({ props, ops, returns, scalars, vars, }) => {
428
+ const arb = (a, p = '', root = true) => {
429
+ var _a, _b;
430
+ if (typeof a === 'string') {
431
+ if (a.startsWith(exports.START_VAR_NAME)) {
432
+ const [varName, graphQLType] = a.replace(exports.START_VAR_NAME, '$').split(exports.GRAPHQL_TYPE_SEPARATOR);
433
+ const v = vars.find((v) => v.name === varName);
434
+ if (!v) {
435
+ vars.push({
436
+ name: varName,
437
+ graphQLType,
438
+ });
439
+ }
440
+ else {
441
+ if (v.graphQLType !== graphQLType) {
442
+ throw new Error(`Invalid variable exists with two different GraphQL Types, "${v.graphQLType}" and ${graphQLType}`);
443
+ }
444
+ }
445
+ return varName;
446
+ }
447
+ }
448
+ const checkType = (0, exports.ResolveFromPath)(props, returns, ops)(p);
449
+ if (checkType.startsWith('scalar.')) {
450
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
451
+ const [_, ...splittedScalar] = checkType.split('.');
452
+ const scalarKey = splittedScalar.join('.');
453
+ return ((_b = (_a = scalars === null || scalars === void 0 ? void 0 : scalars[scalarKey]) === null || _a === void 0 ? void 0 : _a.encode) === null || _b === void 0 ? void 0 : _b.call(_a, a)) || JSON.stringify(a);
454
+ }
455
+ if (Array.isArray(a)) {
456
+ return `[${a.map((arr) => arb(arr, p, false)).join(', ')}]`;
457
+ }
458
+ if (typeof a === 'string') {
459
+ if (checkType === 'enum') {
460
+ return a;
461
+ }
462
+ return `${JSON.stringify(a)}`;
463
+ }
464
+ if (typeof a === 'object') {
465
+ if (a === null) {
466
+ return `null`;
467
+ }
468
+ const returnedObjectString = Object.entries(a)
469
+ .filter(([, v]) => typeof v !== 'undefined')
470
+ .map(([k, v]) => `${k}: ${arb(v, [p, k].join(exports.SEPARATOR), false)}`)
471
+ .join(',\n');
472
+ if (!root) {
473
+ return `{${returnedObjectString}}`;
474
+ }
475
+ return returnedObjectString;
476
+ }
477
+ return `${a}`;
478
+ };
479
+ return arb;
480
+ };
481
+ exports.InternalArgsBuilt = InternalArgsBuilt;
482
+ const resolverFor = (type, field, fn) => fn;
483
+ exports.resolverFor = resolverFor;
484
+ exports.START_VAR_NAME = `$ZEUS_VAR`;
485
+ exports.GRAPHQL_TYPE_SEPARATOR = `__$GRAPHQL__`;
486
+ const $ = (name, graphqlType) => {
487
+ return (exports.START_VAR_NAME + name + exports.GRAPHQL_TYPE_SEPARATOR + graphqlType);
488
+ };
489
+ exports.$ = $;
490
+ /** @description
491
+ The state of a Job in the JobQueue
492
+
493
+ @docsCategory common */
494
+ var JobState;
495
+ (function (JobState) {
496
+ JobState["PENDING"] = "PENDING";
497
+ JobState["RUNNING"] = "RUNNING";
498
+ JobState["COMPLETED"] = "COMPLETED";
499
+ JobState["RETRYING"] = "RETRYING";
500
+ JobState["FAILED"] = "FAILED";
501
+ JobState["CANCELLED"] = "CANCELLED";
502
+ })(JobState || (exports.JobState = JobState = {}));
503
+ var StockMovementType;
504
+ (function (StockMovementType) {
505
+ StockMovementType["ADJUSTMENT"] = "ADJUSTMENT";
506
+ StockMovementType["ALLOCATION"] = "ALLOCATION";
507
+ StockMovementType["RELEASE"] = "RELEASE";
508
+ StockMovementType["SALE"] = "SALE";
509
+ StockMovementType["CANCELLATION"] = "CANCELLATION";
510
+ StockMovementType["RETURN"] = "RETURN";
511
+ })(StockMovementType || (exports.StockMovementType = StockMovementType = {}));
512
+ var AssetType;
513
+ (function (AssetType) {
514
+ AssetType["IMAGE"] = "IMAGE";
515
+ AssetType["VIDEO"] = "VIDEO";
516
+ AssetType["BINARY"] = "BINARY";
517
+ })(AssetType || (exports.AssetType = AssetType = {}));
518
+ var GlobalFlag;
519
+ (function (GlobalFlag) {
520
+ GlobalFlag["TRUE"] = "TRUE";
521
+ GlobalFlag["FALSE"] = "FALSE";
522
+ GlobalFlag["INHERIT"] = "INHERIT";
523
+ })(GlobalFlag || (exports.GlobalFlag = GlobalFlag = {}));
524
+ var AdjustmentType;
525
+ (function (AdjustmentType) {
526
+ AdjustmentType["PROMOTION"] = "PROMOTION";
527
+ AdjustmentType["DISTRIBUTED_ORDER_PROMOTION"] = "DISTRIBUTED_ORDER_PROMOTION";
528
+ AdjustmentType["OTHER"] = "OTHER";
529
+ })(AdjustmentType || (exports.AdjustmentType = AdjustmentType = {}));
530
+ var DeletionResult;
531
+ (function (DeletionResult) {
532
+ DeletionResult["DELETED"] = "DELETED";
533
+ DeletionResult["NOT_DELETED"] = "NOT_DELETED";
534
+ })(DeletionResult || (exports.DeletionResult = DeletionResult = {}));
535
+ /** @description
536
+ Permissions for administrators and customers. Used to control access to
537
+ GraphQL resolvers via the {@link Allow} decorator.
538
+
539
+ ## Understanding Permission.Owner
540
+
541
+ `Permission.Owner` is a special permission which is used in some Deenruv resolvers to indicate that that resolver should only
542
+ be accessible to the "owner" of that resource.
543
+
544
+ For example, the Shop API `activeCustomer` query resolver should only return the Customer object for the "owner" of that Customer, i.e.
545
+ based on the activeUserId of the current session. As a result, the resolver code looks like this:
546
+
547
+ @example
548
+ ```TypeScript
549
+ \@Query()
550
+ \@Allow(Permission.Owner)
551
+ async activeCustomer(\@Ctx() ctx: RequestContext): Promise<Customer | undefined> {
552
+ const userId = ctx.activeUserId;
553
+ if (userId) {
554
+ return this.customerService.findOneByUserId(ctx, userId);
555
+ }
556
+ }
557
+ ```
558
+
559
+ Here we can see that the "ownership" must be enforced by custom logic inside the resolver. Since "ownership" cannot be defined generally
560
+ nor statically encoded at build-time, any resolvers using `Permission.Owner` **must** include logic to enforce that only the owner
561
+ of the resource has access. If not, then it is the equivalent of using `Permission.Public`.
562
+
563
+
564
+ @docsCategory common */
565
+ var Permission;
566
+ (function (Permission) {
567
+ Permission["Authenticated"] = "Authenticated";
568
+ Permission["SuperAdmin"] = "SuperAdmin";
569
+ Permission["Owner"] = "Owner";
570
+ Permission["Public"] = "Public";
571
+ Permission["UpdateGlobalSettings"] = "UpdateGlobalSettings";
572
+ Permission["CreateCatalog"] = "CreateCatalog";
573
+ Permission["ReadCatalog"] = "ReadCatalog";
574
+ Permission["UpdateCatalog"] = "UpdateCatalog";
575
+ Permission["DeleteCatalog"] = "DeleteCatalog";
576
+ Permission["CreateSettings"] = "CreateSettings";
577
+ Permission["ReadSettings"] = "ReadSettings";
578
+ Permission["UpdateSettings"] = "UpdateSettings";
579
+ Permission["DeleteSettings"] = "DeleteSettings";
580
+ Permission["CreateAdministrator"] = "CreateAdministrator";
581
+ Permission["ReadAdministrator"] = "ReadAdministrator";
582
+ Permission["UpdateAdministrator"] = "UpdateAdministrator";
583
+ Permission["DeleteAdministrator"] = "DeleteAdministrator";
584
+ Permission["CreateAsset"] = "CreateAsset";
585
+ Permission["ReadAsset"] = "ReadAsset";
586
+ Permission["UpdateAsset"] = "UpdateAsset";
587
+ Permission["DeleteAsset"] = "DeleteAsset";
588
+ Permission["CreateChannel"] = "CreateChannel";
589
+ Permission["ReadChannel"] = "ReadChannel";
590
+ Permission["UpdateChannel"] = "UpdateChannel";
591
+ Permission["DeleteChannel"] = "DeleteChannel";
592
+ Permission["CreateCollection"] = "CreateCollection";
593
+ Permission["ReadCollection"] = "ReadCollection";
594
+ Permission["UpdateCollection"] = "UpdateCollection";
595
+ Permission["DeleteCollection"] = "DeleteCollection";
596
+ Permission["CreateCountry"] = "CreateCountry";
597
+ Permission["ReadCountry"] = "ReadCountry";
598
+ Permission["UpdateCountry"] = "UpdateCountry";
599
+ Permission["DeleteCountry"] = "DeleteCountry";
600
+ Permission["CreateCustomer"] = "CreateCustomer";
601
+ Permission["ReadCustomer"] = "ReadCustomer";
602
+ Permission["UpdateCustomer"] = "UpdateCustomer";
603
+ Permission["DeleteCustomer"] = "DeleteCustomer";
604
+ Permission["CreateCustomerGroup"] = "CreateCustomerGroup";
605
+ Permission["ReadCustomerGroup"] = "ReadCustomerGroup";
606
+ Permission["UpdateCustomerGroup"] = "UpdateCustomerGroup";
607
+ Permission["DeleteCustomerGroup"] = "DeleteCustomerGroup";
608
+ Permission["CreateFacet"] = "CreateFacet";
609
+ Permission["ReadFacet"] = "ReadFacet";
610
+ Permission["UpdateFacet"] = "UpdateFacet";
611
+ Permission["DeleteFacet"] = "DeleteFacet";
612
+ Permission["CreateOrder"] = "CreateOrder";
613
+ Permission["ReadOrder"] = "ReadOrder";
614
+ Permission["UpdateOrder"] = "UpdateOrder";
615
+ Permission["DeleteOrder"] = "DeleteOrder";
616
+ Permission["CreatePaymentMethod"] = "CreatePaymentMethod";
617
+ Permission["ReadPaymentMethod"] = "ReadPaymentMethod";
618
+ Permission["UpdatePaymentMethod"] = "UpdatePaymentMethod";
619
+ Permission["DeletePaymentMethod"] = "DeletePaymentMethod";
620
+ Permission["CreateProduct"] = "CreateProduct";
621
+ Permission["ReadProduct"] = "ReadProduct";
622
+ Permission["UpdateProduct"] = "UpdateProduct";
623
+ Permission["DeleteProduct"] = "DeleteProduct";
624
+ Permission["CreatePromotion"] = "CreatePromotion";
625
+ Permission["ReadPromotion"] = "ReadPromotion";
626
+ Permission["UpdatePromotion"] = "UpdatePromotion";
627
+ Permission["DeletePromotion"] = "DeletePromotion";
628
+ Permission["CreateShippingMethod"] = "CreateShippingMethod";
629
+ Permission["ReadShippingMethod"] = "ReadShippingMethod";
630
+ Permission["UpdateShippingMethod"] = "UpdateShippingMethod";
631
+ Permission["DeleteShippingMethod"] = "DeleteShippingMethod";
632
+ Permission["CreateTag"] = "CreateTag";
633
+ Permission["ReadTag"] = "ReadTag";
634
+ Permission["UpdateTag"] = "UpdateTag";
635
+ Permission["DeleteTag"] = "DeleteTag";
636
+ Permission["CreateTaxCategory"] = "CreateTaxCategory";
637
+ Permission["ReadTaxCategory"] = "ReadTaxCategory";
638
+ Permission["UpdateTaxCategory"] = "UpdateTaxCategory";
639
+ Permission["DeleteTaxCategory"] = "DeleteTaxCategory";
640
+ Permission["CreateTaxRate"] = "CreateTaxRate";
641
+ Permission["ReadTaxRate"] = "ReadTaxRate";
642
+ Permission["UpdateTaxRate"] = "UpdateTaxRate";
643
+ Permission["DeleteTaxRate"] = "DeleteTaxRate";
644
+ Permission["CreateSeller"] = "CreateSeller";
645
+ Permission["ReadSeller"] = "ReadSeller";
646
+ Permission["UpdateSeller"] = "UpdateSeller";
647
+ Permission["DeleteSeller"] = "DeleteSeller";
648
+ Permission["CreateStockLocation"] = "CreateStockLocation";
649
+ Permission["ReadStockLocation"] = "ReadStockLocation";
650
+ Permission["UpdateStockLocation"] = "UpdateStockLocation";
651
+ Permission["DeleteStockLocation"] = "DeleteStockLocation";
652
+ Permission["CreateSystem"] = "CreateSystem";
653
+ Permission["ReadSystem"] = "ReadSystem";
654
+ Permission["UpdateSystem"] = "UpdateSystem";
655
+ Permission["DeleteSystem"] = "DeleteSystem";
656
+ Permission["CreateZone"] = "CreateZone";
657
+ Permission["ReadZone"] = "ReadZone";
658
+ Permission["UpdateZone"] = "UpdateZone";
659
+ Permission["DeleteZone"] = "DeleteZone";
660
+ })(Permission || (exports.Permission = Permission = {}));
661
+ var SortOrder;
662
+ (function (SortOrder) {
663
+ SortOrder["ASC"] = "ASC";
664
+ SortOrder["DESC"] = "DESC";
665
+ })(SortOrder || (exports.SortOrder = SortOrder = {}));
666
+ var ErrorCode;
667
+ (function (ErrorCode) {
668
+ ErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
669
+ ErrorCode["MIME_TYPE_ERROR"] = "MIME_TYPE_ERROR";
670
+ ErrorCode["LANGUAGE_NOT_AVAILABLE_ERROR"] = "LANGUAGE_NOT_AVAILABLE_ERROR";
671
+ ErrorCode["DUPLICATE_ENTITY_ERROR"] = "DUPLICATE_ENTITY_ERROR";
672
+ ErrorCode["FACET_IN_USE_ERROR"] = "FACET_IN_USE_ERROR";
673
+ ErrorCode["CHANNEL_DEFAULT_LANGUAGE_ERROR"] = "CHANNEL_DEFAULT_LANGUAGE_ERROR";
674
+ ErrorCode["SETTLE_PAYMENT_ERROR"] = "SETTLE_PAYMENT_ERROR";
675
+ ErrorCode["CANCEL_PAYMENT_ERROR"] = "CANCEL_PAYMENT_ERROR";
676
+ ErrorCode["EMPTY_ORDER_LINE_SELECTION_ERROR"] = "EMPTY_ORDER_LINE_SELECTION_ERROR";
677
+ ErrorCode["ITEMS_ALREADY_FULFILLED_ERROR"] = "ITEMS_ALREADY_FULFILLED_ERROR";
678
+ ErrorCode["INVALID_FULFILLMENT_HANDLER_ERROR"] = "INVALID_FULFILLMENT_HANDLER_ERROR";
679
+ ErrorCode["CREATE_FULFILLMENT_ERROR"] = "CREATE_FULFILLMENT_ERROR";
680
+ ErrorCode["INSUFFICIENT_STOCK_ON_HAND_ERROR"] = "INSUFFICIENT_STOCK_ON_HAND_ERROR";
681
+ ErrorCode["MULTIPLE_ORDER_ERROR"] = "MULTIPLE_ORDER_ERROR";
682
+ ErrorCode["CANCEL_ACTIVE_ORDER_ERROR"] = "CANCEL_ACTIVE_ORDER_ERROR";
683
+ ErrorCode["PAYMENT_ORDER_MISMATCH_ERROR"] = "PAYMENT_ORDER_MISMATCH_ERROR";
684
+ ErrorCode["REFUND_ORDER_STATE_ERROR"] = "REFUND_ORDER_STATE_ERROR";
685
+ ErrorCode["NOTHING_TO_REFUND_ERROR"] = "NOTHING_TO_REFUND_ERROR";
686
+ ErrorCode["ALREADY_REFUNDED_ERROR"] = "ALREADY_REFUNDED_ERROR";
687
+ ErrorCode["QUANTITY_TOO_GREAT_ERROR"] = "QUANTITY_TOO_GREAT_ERROR";
688
+ ErrorCode["REFUND_AMOUNT_ERROR"] = "REFUND_AMOUNT_ERROR";
689
+ ErrorCode["REFUND_STATE_TRANSITION_ERROR"] = "REFUND_STATE_TRANSITION_ERROR";
690
+ ErrorCode["PAYMENT_STATE_TRANSITION_ERROR"] = "PAYMENT_STATE_TRANSITION_ERROR";
691
+ ErrorCode["FULFILLMENT_STATE_TRANSITION_ERROR"] = "FULFILLMENT_STATE_TRANSITION_ERROR";
692
+ ErrorCode["ORDER_MODIFICATION_STATE_ERROR"] = "ORDER_MODIFICATION_STATE_ERROR";
693
+ ErrorCode["NO_CHANGES_SPECIFIED_ERROR"] = "NO_CHANGES_SPECIFIED_ERROR";
694
+ ErrorCode["PAYMENT_METHOD_MISSING_ERROR"] = "PAYMENT_METHOD_MISSING_ERROR";
695
+ ErrorCode["REFUND_PAYMENT_ID_MISSING_ERROR"] = "REFUND_PAYMENT_ID_MISSING_ERROR";
696
+ ErrorCode["MANUAL_PAYMENT_STATE_ERROR"] = "MANUAL_PAYMENT_STATE_ERROR";
697
+ ErrorCode["PRODUCT_OPTION_IN_USE_ERROR"] = "PRODUCT_OPTION_IN_USE_ERROR";
698
+ ErrorCode["MISSING_CONDITIONS_ERROR"] = "MISSING_CONDITIONS_ERROR";
699
+ ErrorCode["NATIVE_AUTH_STRATEGY_ERROR"] = "NATIVE_AUTH_STRATEGY_ERROR";
700
+ ErrorCode["INVALID_CREDENTIALS_ERROR"] = "INVALID_CREDENTIALS_ERROR";
701
+ ErrorCode["ORDER_STATE_TRANSITION_ERROR"] = "ORDER_STATE_TRANSITION_ERROR";
702
+ ErrorCode["EMAIL_ADDRESS_CONFLICT_ERROR"] = "EMAIL_ADDRESS_CONFLICT_ERROR";
703
+ ErrorCode["GUEST_CHECKOUT_ERROR"] = "GUEST_CHECKOUT_ERROR";
704
+ ErrorCode["ORDER_LIMIT_ERROR"] = "ORDER_LIMIT_ERROR";
705
+ ErrorCode["NEGATIVE_QUANTITY_ERROR"] = "NEGATIVE_QUANTITY_ERROR";
706
+ ErrorCode["INSUFFICIENT_STOCK_ERROR"] = "INSUFFICIENT_STOCK_ERROR";
707
+ ErrorCode["COUPON_CODE_INVALID_ERROR"] = "COUPON_CODE_INVALID_ERROR";
708
+ ErrorCode["COUPON_CODE_EXPIRED_ERROR"] = "COUPON_CODE_EXPIRED_ERROR";
709
+ ErrorCode["COUPON_CODE_LIMIT_ERROR"] = "COUPON_CODE_LIMIT_ERROR";
710
+ ErrorCode["ORDER_MODIFICATION_ERROR"] = "ORDER_MODIFICATION_ERROR";
711
+ ErrorCode["INELIGIBLE_SHIPPING_METHOD_ERROR"] = "INELIGIBLE_SHIPPING_METHOD_ERROR";
712
+ ErrorCode["NO_ACTIVE_ORDER_ERROR"] = "NO_ACTIVE_ORDER_ERROR";
713
+ ErrorCode["ORDER_MIDDLEWARE_ERROR"] = "ORDER_MIDDLEWARE_ERROR";
714
+ })(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
715
+ var LogicalOperator;
716
+ (function (LogicalOperator) {
717
+ LogicalOperator["AND"] = "AND";
718
+ LogicalOperator["OR"] = "OR";
719
+ })(LogicalOperator || (exports.LogicalOperator = LogicalOperator = {}));
720
+ /** @description
721
+ ISO 4217 currency code
722
+
723
+ @docsCategory common */
724
+ var CurrencyCode;
725
+ (function (CurrencyCode) {
726
+ CurrencyCode["AED"] = "AED";
727
+ CurrencyCode["AFN"] = "AFN";
728
+ CurrencyCode["ALL"] = "ALL";
729
+ CurrencyCode["AMD"] = "AMD";
730
+ CurrencyCode["ANG"] = "ANG";
731
+ CurrencyCode["AOA"] = "AOA";
732
+ CurrencyCode["ARS"] = "ARS";
733
+ CurrencyCode["AUD"] = "AUD";
734
+ CurrencyCode["AWG"] = "AWG";
735
+ CurrencyCode["AZN"] = "AZN";
736
+ CurrencyCode["BAM"] = "BAM";
737
+ CurrencyCode["BBD"] = "BBD";
738
+ CurrencyCode["BDT"] = "BDT";
739
+ CurrencyCode["BGN"] = "BGN";
740
+ CurrencyCode["BHD"] = "BHD";
741
+ CurrencyCode["BIF"] = "BIF";
742
+ CurrencyCode["BMD"] = "BMD";
743
+ CurrencyCode["BND"] = "BND";
744
+ CurrencyCode["BOB"] = "BOB";
745
+ CurrencyCode["BRL"] = "BRL";
746
+ CurrencyCode["BSD"] = "BSD";
747
+ CurrencyCode["BTN"] = "BTN";
748
+ CurrencyCode["BWP"] = "BWP";
749
+ CurrencyCode["BYN"] = "BYN";
750
+ CurrencyCode["BZD"] = "BZD";
751
+ CurrencyCode["CAD"] = "CAD";
752
+ CurrencyCode["CDF"] = "CDF";
753
+ CurrencyCode["CHF"] = "CHF";
754
+ CurrencyCode["CLP"] = "CLP";
755
+ CurrencyCode["CNY"] = "CNY";
756
+ CurrencyCode["COP"] = "COP";
757
+ CurrencyCode["CRC"] = "CRC";
758
+ CurrencyCode["CUC"] = "CUC";
759
+ CurrencyCode["CUP"] = "CUP";
760
+ CurrencyCode["CVE"] = "CVE";
761
+ CurrencyCode["CZK"] = "CZK";
762
+ CurrencyCode["DJF"] = "DJF";
763
+ CurrencyCode["DKK"] = "DKK";
764
+ CurrencyCode["DOP"] = "DOP";
765
+ CurrencyCode["DZD"] = "DZD";
766
+ CurrencyCode["EGP"] = "EGP";
767
+ CurrencyCode["ERN"] = "ERN";
768
+ CurrencyCode["ETB"] = "ETB";
769
+ CurrencyCode["EUR"] = "EUR";
770
+ CurrencyCode["FJD"] = "FJD";
771
+ CurrencyCode["FKP"] = "FKP";
772
+ CurrencyCode["GBP"] = "GBP";
773
+ CurrencyCode["GEL"] = "GEL";
774
+ CurrencyCode["GHS"] = "GHS";
775
+ CurrencyCode["GIP"] = "GIP";
776
+ CurrencyCode["GMD"] = "GMD";
777
+ CurrencyCode["GNF"] = "GNF";
778
+ CurrencyCode["GTQ"] = "GTQ";
779
+ CurrencyCode["GYD"] = "GYD";
780
+ CurrencyCode["HKD"] = "HKD";
781
+ CurrencyCode["HNL"] = "HNL";
782
+ CurrencyCode["HRK"] = "HRK";
783
+ CurrencyCode["HTG"] = "HTG";
784
+ CurrencyCode["HUF"] = "HUF";
785
+ CurrencyCode["IDR"] = "IDR";
786
+ CurrencyCode["ILS"] = "ILS";
787
+ CurrencyCode["INR"] = "INR";
788
+ CurrencyCode["IQD"] = "IQD";
789
+ CurrencyCode["IRR"] = "IRR";
790
+ CurrencyCode["ISK"] = "ISK";
791
+ CurrencyCode["JMD"] = "JMD";
792
+ CurrencyCode["JOD"] = "JOD";
793
+ CurrencyCode["JPY"] = "JPY";
794
+ CurrencyCode["KES"] = "KES";
795
+ CurrencyCode["KGS"] = "KGS";
796
+ CurrencyCode["KHR"] = "KHR";
797
+ CurrencyCode["KMF"] = "KMF";
798
+ CurrencyCode["KPW"] = "KPW";
799
+ CurrencyCode["KRW"] = "KRW";
800
+ CurrencyCode["KWD"] = "KWD";
801
+ CurrencyCode["KYD"] = "KYD";
802
+ CurrencyCode["KZT"] = "KZT";
803
+ CurrencyCode["LAK"] = "LAK";
804
+ CurrencyCode["LBP"] = "LBP";
805
+ CurrencyCode["LKR"] = "LKR";
806
+ CurrencyCode["LRD"] = "LRD";
807
+ CurrencyCode["LSL"] = "LSL";
808
+ CurrencyCode["LYD"] = "LYD";
809
+ CurrencyCode["MAD"] = "MAD";
810
+ CurrencyCode["MDL"] = "MDL";
811
+ CurrencyCode["MGA"] = "MGA";
812
+ CurrencyCode["MKD"] = "MKD";
813
+ CurrencyCode["MMK"] = "MMK";
814
+ CurrencyCode["MNT"] = "MNT";
815
+ CurrencyCode["MOP"] = "MOP";
816
+ CurrencyCode["MRU"] = "MRU";
817
+ CurrencyCode["MUR"] = "MUR";
818
+ CurrencyCode["MVR"] = "MVR";
819
+ CurrencyCode["MWK"] = "MWK";
820
+ CurrencyCode["MXN"] = "MXN";
821
+ CurrencyCode["MYR"] = "MYR";
822
+ CurrencyCode["MZN"] = "MZN";
823
+ CurrencyCode["NAD"] = "NAD";
824
+ CurrencyCode["NGN"] = "NGN";
825
+ CurrencyCode["NIO"] = "NIO";
826
+ CurrencyCode["NOK"] = "NOK";
827
+ CurrencyCode["NPR"] = "NPR";
828
+ CurrencyCode["NZD"] = "NZD";
829
+ CurrencyCode["OMR"] = "OMR";
830
+ CurrencyCode["PAB"] = "PAB";
831
+ CurrencyCode["PEN"] = "PEN";
832
+ CurrencyCode["PGK"] = "PGK";
833
+ CurrencyCode["PHP"] = "PHP";
834
+ CurrencyCode["PKR"] = "PKR";
835
+ CurrencyCode["PLN"] = "PLN";
836
+ CurrencyCode["PYG"] = "PYG";
837
+ CurrencyCode["QAR"] = "QAR";
838
+ CurrencyCode["RON"] = "RON";
839
+ CurrencyCode["RSD"] = "RSD";
840
+ CurrencyCode["RUB"] = "RUB";
841
+ CurrencyCode["RWF"] = "RWF";
842
+ CurrencyCode["SAR"] = "SAR";
843
+ CurrencyCode["SBD"] = "SBD";
844
+ CurrencyCode["SCR"] = "SCR";
845
+ CurrencyCode["SDG"] = "SDG";
846
+ CurrencyCode["SEK"] = "SEK";
847
+ CurrencyCode["SGD"] = "SGD";
848
+ CurrencyCode["SHP"] = "SHP";
849
+ CurrencyCode["SLL"] = "SLL";
850
+ CurrencyCode["SOS"] = "SOS";
851
+ CurrencyCode["SRD"] = "SRD";
852
+ CurrencyCode["SSP"] = "SSP";
853
+ CurrencyCode["STN"] = "STN";
854
+ CurrencyCode["SVC"] = "SVC";
855
+ CurrencyCode["SYP"] = "SYP";
856
+ CurrencyCode["SZL"] = "SZL";
857
+ CurrencyCode["THB"] = "THB";
858
+ CurrencyCode["TJS"] = "TJS";
859
+ CurrencyCode["TMT"] = "TMT";
860
+ CurrencyCode["TND"] = "TND";
861
+ CurrencyCode["TOP"] = "TOP";
862
+ CurrencyCode["TRY"] = "TRY";
863
+ CurrencyCode["TTD"] = "TTD";
864
+ CurrencyCode["TWD"] = "TWD";
865
+ CurrencyCode["TZS"] = "TZS";
866
+ CurrencyCode["UAH"] = "UAH";
867
+ CurrencyCode["UGX"] = "UGX";
868
+ CurrencyCode["USD"] = "USD";
869
+ CurrencyCode["UYU"] = "UYU";
870
+ CurrencyCode["UZS"] = "UZS";
871
+ CurrencyCode["VES"] = "VES";
872
+ CurrencyCode["VND"] = "VND";
873
+ CurrencyCode["VUV"] = "VUV";
874
+ CurrencyCode["WST"] = "WST";
875
+ CurrencyCode["XAF"] = "XAF";
876
+ CurrencyCode["XCD"] = "XCD";
877
+ CurrencyCode["XOF"] = "XOF";
878
+ CurrencyCode["XPF"] = "XPF";
879
+ CurrencyCode["YER"] = "YER";
880
+ CurrencyCode["ZAR"] = "ZAR";
881
+ CurrencyCode["ZMW"] = "ZMW";
882
+ CurrencyCode["ZWL"] = "ZWL";
883
+ })(CurrencyCode || (exports.CurrencyCode = CurrencyCode = {}));
884
+ var HistoryEntryType;
885
+ (function (HistoryEntryType) {
886
+ HistoryEntryType["CUSTOMER_REGISTERED"] = "CUSTOMER_REGISTERED";
887
+ HistoryEntryType["CUSTOMER_VERIFIED"] = "CUSTOMER_VERIFIED";
888
+ HistoryEntryType["CUSTOMER_DETAIL_UPDATED"] = "CUSTOMER_DETAIL_UPDATED";
889
+ HistoryEntryType["CUSTOMER_ADDED_TO_GROUP"] = "CUSTOMER_ADDED_TO_GROUP";
890
+ HistoryEntryType["CUSTOMER_REMOVED_FROM_GROUP"] = "CUSTOMER_REMOVED_FROM_GROUP";
891
+ HistoryEntryType["CUSTOMER_ADDRESS_CREATED"] = "CUSTOMER_ADDRESS_CREATED";
892
+ HistoryEntryType["CUSTOMER_ADDRESS_UPDATED"] = "CUSTOMER_ADDRESS_UPDATED";
893
+ HistoryEntryType["CUSTOMER_ADDRESS_DELETED"] = "CUSTOMER_ADDRESS_DELETED";
894
+ HistoryEntryType["CUSTOMER_PASSWORD_UPDATED"] = "CUSTOMER_PASSWORD_UPDATED";
895
+ HistoryEntryType["CUSTOMER_PASSWORD_RESET_REQUESTED"] = "CUSTOMER_PASSWORD_RESET_REQUESTED";
896
+ HistoryEntryType["CUSTOMER_PASSWORD_RESET_VERIFIED"] = "CUSTOMER_PASSWORD_RESET_VERIFIED";
897
+ HistoryEntryType["CUSTOMER_EMAIL_UPDATE_REQUESTED"] = "CUSTOMER_EMAIL_UPDATE_REQUESTED";
898
+ HistoryEntryType["CUSTOMER_EMAIL_UPDATE_VERIFIED"] = "CUSTOMER_EMAIL_UPDATE_VERIFIED";
899
+ HistoryEntryType["CUSTOMER_NOTE"] = "CUSTOMER_NOTE";
900
+ HistoryEntryType["ORDER_STATE_TRANSITION"] = "ORDER_STATE_TRANSITION";
901
+ HistoryEntryType["ORDER_PAYMENT_TRANSITION"] = "ORDER_PAYMENT_TRANSITION";
902
+ HistoryEntryType["ORDER_FULFILLMENT"] = "ORDER_FULFILLMENT";
903
+ HistoryEntryType["ORDER_CANCELLATION"] = "ORDER_CANCELLATION";
904
+ HistoryEntryType["ORDER_REFUND_TRANSITION"] = "ORDER_REFUND_TRANSITION";
905
+ HistoryEntryType["ORDER_FULFILLMENT_TRANSITION"] = "ORDER_FULFILLMENT_TRANSITION";
906
+ HistoryEntryType["ORDER_NOTE"] = "ORDER_NOTE";
907
+ HistoryEntryType["ORDER_COUPON_APPLIED"] = "ORDER_COUPON_APPLIED";
908
+ HistoryEntryType["ORDER_COUPON_REMOVED"] = "ORDER_COUPON_REMOVED";
909
+ HistoryEntryType["ORDER_MODIFIED"] = "ORDER_MODIFIED";
910
+ HistoryEntryType["ORDER_CUSTOMER_UPDATED"] = "ORDER_CUSTOMER_UPDATED";
911
+ })(HistoryEntryType || (exports.HistoryEntryType = HistoryEntryType = {}));
912
+ /** @description
913
+ Languages in the form of a ISO 639-1 language code with optional
914
+ region or script modifier (e.g. de_AT). The selection available is based
915
+ on the [Unicode CLDR summary list](https://unicode-org.github.io/cldr-staging/charts/37/summary/root.html)
916
+ and includes the major spoken languages of the world and any widely-used variants.
917
+
918
+ @docsCategory common */
919
+ var LanguageCode;
920
+ (function (LanguageCode) {
921
+ LanguageCode["af"] = "af";
922
+ LanguageCode["ak"] = "ak";
923
+ LanguageCode["sq"] = "sq";
924
+ LanguageCode["am"] = "am";
925
+ LanguageCode["ar"] = "ar";
926
+ LanguageCode["hy"] = "hy";
927
+ LanguageCode["as"] = "as";
928
+ LanguageCode["az"] = "az";
929
+ LanguageCode["bm"] = "bm";
930
+ LanguageCode["bn"] = "bn";
931
+ LanguageCode["eu"] = "eu";
932
+ LanguageCode["be"] = "be";
933
+ LanguageCode["bs"] = "bs";
934
+ LanguageCode["br"] = "br";
935
+ LanguageCode["bg"] = "bg";
936
+ LanguageCode["my"] = "my";
937
+ LanguageCode["ca"] = "ca";
938
+ LanguageCode["ce"] = "ce";
939
+ LanguageCode["zh"] = "zh";
940
+ LanguageCode["zh_Hans"] = "zh_Hans";
941
+ LanguageCode["zh_Hant"] = "zh_Hant";
942
+ LanguageCode["cu"] = "cu";
943
+ LanguageCode["kw"] = "kw";
944
+ LanguageCode["co"] = "co";
945
+ LanguageCode["hr"] = "hr";
946
+ LanguageCode["cs"] = "cs";
947
+ LanguageCode["da"] = "da";
948
+ LanguageCode["nl"] = "nl";
949
+ LanguageCode["nl_BE"] = "nl_BE";
950
+ LanguageCode["dz"] = "dz";
951
+ LanguageCode["en"] = "en";
952
+ LanguageCode["en_AU"] = "en_AU";
953
+ LanguageCode["en_CA"] = "en_CA";
954
+ LanguageCode["en_GB"] = "en_GB";
955
+ LanguageCode["en_US"] = "en_US";
956
+ LanguageCode["eo"] = "eo";
957
+ LanguageCode["et"] = "et";
958
+ LanguageCode["ee"] = "ee";
959
+ LanguageCode["fo"] = "fo";
960
+ LanguageCode["fi"] = "fi";
961
+ LanguageCode["fr"] = "fr";
962
+ LanguageCode["fr_CA"] = "fr_CA";
963
+ LanguageCode["fr_CH"] = "fr_CH";
964
+ LanguageCode["ff"] = "ff";
965
+ LanguageCode["gl"] = "gl";
966
+ LanguageCode["lg"] = "lg";
967
+ LanguageCode["ka"] = "ka";
968
+ LanguageCode["de"] = "de";
969
+ LanguageCode["de_AT"] = "de_AT";
970
+ LanguageCode["de_CH"] = "de_CH";
971
+ LanguageCode["el"] = "el";
972
+ LanguageCode["gu"] = "gu";
973
+ LanguageCode["ht"] = "ht";
974
+ LanguageCode["ha"] = "ha";
975
+ LanguageCode["he"] = "he";
976
+ LanguageCode["hi"] = "hi";
977
+ LanguageCode["hu"] = "hu";
978
+ LanguageCode["is"] = "is";
979
+ LanguageCode["ig"] = "ig";
980
+ LanguageCode["id"] = "id";
981
+ LanguageCode["ia"] = "ia";
982
+ LanguageCode["ga"] = "ga";
983
+ LanguageCode["it"] = "it";
984
+ LanguageCode["ja"] = "ja";
985
+ LanguageCode["jv"] = "jv";
986
+ LanguageCode["kl"] = "kl";
987
+ LanguageCode["kn"] = "kn";
988
+ LanguageCode["ks"] = "ks";
989
+ LanguageCode["kk"] = "kk";
990
+ LanguageCode["km"] = "km";
991
+ LanguageCode["ki"] = "ki";
992
+ LanguageCode["rw"] = "rw";
993
+ LanguageCode["ko"] = "ko";
994
+ LanguageCode["ku"] = "ku";
995
+ LanguageCode["ky"] = "ky";
996
+ LanguageCode["lo"] = "lo";
997
+ LanguageCode["la"] = "la";
998
+ LanguageCode["lv"] = "lv";
999
+ LanguageCode["ln"] = "ln";
1000
+ LanguageCode["lt"] = "lt";
1001
+ LanguageCode["lu"] = "lu";
1002
+ LanguageCode["lb"] = "lb";
1003
+ LanguageCode["mk"] = "mk";
1004
+ LanguageCode["mg"] = "mg";
1005
+ LanguageCode["ms"] = "ms";
1006
+ LanguageCode["ml"] = "ml";
1007
+ LanguageCode["mt"] = "mt";
1008
+ LanguageCode["gv"] = "gv";
1009
+ LanguageCode["mi"] = "mi";
1010
+ LanguageCode["mr"] = "mr";
1011
+ LanguageCode["mn"] = "mn";
1012
+ LanguageCode["ne"] = "ne";
1013
+ LanguageCode["nd"] = "nd";
1014
+ LanguageCode["se"] = "se";
1015
+ LanguageCode["nb"] = "nb";
1016
+ LanguageCode["nn"] = "nn";
1017
+ LanguageCode["ny"] = "ny";
1018
+ LanguageCode["or"] = "or";
1019
+ LanguageCode["om"] = "om";
1020
+ LanguageCode["os"] = "os";
1021
+ LanguageCode["ps"] = "ps";
1022
+ LanguageCode["fa"] = "fa";
1023
+ LanguageCode["fa_AF"] = "fa_AF";
1024
+ LanguageCode["pl"] = "pl";
1025
+ LanguageCode["pt"] = "pt";
1026
+ LanguageCode["pt_BR"] = "pt_BR";
1027
+ LanguageCode["pt_PT"] = "pt_PT";
1028
+ LanguageCode["pa"] = "pa";
1029
+ LanguageCode["qu"] = "qu";
1030
+ LanguageCode["ro"] = "ro";
1031
+ LanguageCode["ro_MD"] = "ro_MD";
1032
+ LanguageCode["rm"] = "rm";
1033
+ LanguageCode["rn"] = "rn";
1034
+ LanguageCode["ru"] = "ru";
1035
+ LanguageCode["sm"] = "sm";
1036
+ LanguageCode["sg"] = "sg";
1037
+ LanguageCode["sa"] = "sa";
1038
+ LanguageCode["gd"] = "gd";
1039
+ LanguageCode["sr"] = "sr";
1040
+ LanguageCode["sn"] = "sn";
1041
+ LanguageCode["ii"] = "ii";
1042
+ LanguageCode["sd"] = "sd";
1043
+ LanguageCode["si"] = "si";
1044
+ LanguageCode["sk"] = "sk";
1045
+ LanguageCode["sl"] = "sl";
1046
+ LanguageCode["so"] = "so";
1047
+ LanguageCode["st"] = "st";
1048
+ LanguageCode["es"] = "es";
1049
+ LanguageCode["es_ES"] = "es_ES";
1050
+ LanguageCode["es_MX"] = "es_MX";
1051
+ LanguageCode["su"] = "su";
1052
+ LanguageCode["sw"] = "sw";
1053
+ LanguageCode["sw_CD"] = "sw_CD";
1054
+ LanguageCode["sv"] = "sv";
1055
+ LanguageCode["tg"] = "tg";
1056
+ LanguageCode["ta"] = "ta";
1057
+ LanguageCode["tt"] = "tt";
1058
+ LanguageCode["te"] = "te";
1059
+ LanguageCode["th"] = "th";
1060
+ LanguageCode["bo"] = "bo";
1061
+ LanguageCode["ti"] = "ti";
1062
+ LanguageCode["to"] = "to";
1063
+ LanguageCode["tr"] = "tr";
1064
+ LanguageCode["tk"] = "tk";
1065
+ LanguageCode["uk"] = "uk";
1066
+ LanguageCode["ur"] = "ur";
1067
+ LanguageCode["ug"] = "ug";
1068
+ LanguageCode["uz"] = "uz";
1069
+ LanguageCode["vi"] = "vi";
1070
+ LanguageCode["vo"] = "vo";
1071
+ LanguageCode["cy"] = "cy";
1072
+ LanguageCode["fy"] = "fy";
1073
+ LanguageCode["wo"] = "wo";
1074
+ LanguageCode["xh"] = "xh";
1075
+ LanguageCode["yi"] = "yi";
1076
+ LanguageCode["yo"] = "yo";
1077
+ LanguageCode["zu"] = "zu";
1078
+ })(LanguageCode || (exports.LanguageCode = LanguageCode = {}));
1079
+ var OrderType;
1080
+ (function (OrderType) {
1081
+ OrderType["Regular"] = "Regular";
1082
+ OrderType["Seller"] = "Seller";
1083
+ OrderType["Aggregate"] = "Aggregate";
1084
+ })(OrderType || (exports.OrderType = OrderType = {}));
1085
+ var MetricInterval;
1086
+ (function (MetricInterval) {
1087
+ MetricInterval["Daily"] = "Daily";
1088
+ })(MetricInterval || (exports.MetricInterval = MetricInterval = {}));
1089
+ var MetricType;
1090
+ (function (MetricType) {
1091
+ MetricType["OrderCount"] = "OrderCount";
1092
+ MetricType["OrderTotal"] = "OrderTotal";
1093
+ MetricType["AverageOrderValue"] = "AverageOrderValue";
1094
+ })(MetricType || (exports.MetricType = MetricType = {}));
1095
+ var PredictionSimpleBgStatus;
1096
+ (function (PredictionSimpleBgStatus) {
1097
+ PredictionSimpleBgStatus["starting"] = "starting";
1098
+ PredictionSimpleBgStatus["preprocessing"] = "preprocessing";
1099
+ PredictionSimpleBgStatus["succeeded"] = "succeeded";
1100
+ PredictionSimpleBgStatus["failed"] = "failed";
1101
+ })(PredictionSimpleBgStatus || (exports.PredictionSimpleBgStatus = PredictionSimpleBgStatus = {}));