@things-factory/integration-sellercraft 4.3.671 → 4.3.673

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 (97) hide show
  1. package/dist-server/constants/index.js +19 -0
  2. package/dist-server/constants/index.js.map +1 -0
  3. package/dist-server/constants/order-status-mapping.js +31 -0
  4. package/dist-server/constants/order-status-mapping.js.map +1 -0
  5. package/dist-server/constants/platform.js +10 -0
  6. package/dist-server/constants/platform.js.map +1 -0
  7. package/dist-server/controllers/index.js +21 -0
  8. package/dist-server/controllers/index.js.map +1 -0
  9. package/dist-server/controllers/sellercraft/apis/add-inbound-order.js +47 -0
  10. package/dist-server/controllers/sellercraft/apis/add-inbound-order.js.map +1 -0
  11. package/dist-server/controllers/sellercraft/apis/echo.js +19 -0
  12. package/dist-server/controllers/sellercraft/apis/echo.js.map +1 -0
  13. package/dist-server/controllers/sellercraft/apis/fetch-order-document.js +22 -0
  14. package/dist-server/controllers/sellercraft/apis/fetch-order-document.js.map +1 -0
  15. package/dist-server/controllers/sellercraft/apis/index.js +25 -0
  16. package/dist-server/controllers/sellercraft/apis/index.js.map +1 -0
  17. package/dist-server/controllers/sellercraft/apis/initiate-order-document.js +21 -0
  18. package/dist-server/controllers/sellercraft/apis/initiate-order-document.js.map +1 -0
  19. package/dist-server/controllers/sellercraft/apis/initiate-order-shipment.js +34 -0
  20. package/dist-server/controllers/sellercraft/apis/initiate-order-shipment.js.map +1 -0
  21. package/dist-server/controllers/sellercraft/apis/pack-marketplace-order.js +47 -0
  22. package/dist-server/controllers/sellercraft/apis/pack-marketplace-order.js.map +1 -0
  23. package/dist-server/controllers/sellercraft/apis/update-marketplace-order.js +18 -0
  24. package/dist-server/controllers/sellercraft/apis/update-marketplace-order.js.map +1 -0
  25. package/dist-server/controllers/sellercraft/apis/update-product.js +24 -0
  26. package/dist-server/controllers/sellercraft/apis/update-product.js.map +1 -0
  27. package/dist-server/controllers/sellercraft/index.js +34 -0
  28. package/dist-server/controllers/sellercraft/index.js.map +1 -0
  29. package/dist-server/controllers/sellercraft/platform-action.js +33 -0
  30. package/dist-server/controllers/sellercraft/platform-action.js.map +1 -0
  31. package/dist-server/controllers/sellercraft/sellercraft.js +93 -0
  32. package/dist-server/controllers/sellercraft/sellercraft.js.map +1 -0
  33. package/dist-server/controllers/sellercraft-api/decorators.js +40 -0
  34. package/dist-server/controllers/sellercraft-api/decorators.js.map +1 -0
  35. package/dist-server/controllers/sellercraft-api/index.js +92 -0
  36. package/dist-server/controllers/sellercraft-api/index.js.map +1 -0
  37. package/dist-server/controllers/sellercraft-api/types.js +1 -0
  38. package/dist-server/controllers/sellercraft-api/types.js.map +1 -0
  39. package/dist-server/controllers/sellercraft-channel-integration/apis/echo.js +19 -0
  40. package/dist-server/controllers/sellercraft-channel-integration/apis/echo.js.map +1 -0
  41. package/dist-server/controllers/sellercraft-channel-integration/apis/index.js +23 -0
  42. package/dist-server/controllers/sellercraft-channel-integration/apis/index.js.map +1 -0
  43. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-categories.js +39 -0
  44. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-categories.js.map +1 -0
  45. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-category-attributes.js +48 -0
  46. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-category-attributes.js.map +1 -0
  47. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.js +49 -0
  48. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.js.map +1 -0
  49. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js +93 -0
  50. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js.map +1 -0
  51. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js +91 -0
  52. package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js.map +1 -0
  53. package/dist-server/controllers/sellercraft-channel-integration/index.js +34 -0
  54. package/dist-server/controllers/sellercraft-channel-integration/index.js.map +1 -0
  55. package/dist-server/controllers/sellercraft-channel-integration/platform-action.js +33 -0
  56. package/dist-server/controllers/sellercraft-channel-integration/platform-action.js.map +1 -0
  57. package/dist-server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.js +101 -0
  58. package/dist-server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.js.map +1 -0
  59. package/dist-server/controllers/sellercraft-channel-integration-api/decorators.js +32 -0
  60. package/dist-server/controllers/sellercraft-channel-integration-api/decorators.js.map +1 -0
  61. package/dist-server/controllers/sellercraft-channel-integration-api/index.js +78 -0
  62. package/dist-server/controllers/sellercraft-channel-integration-api/index.js.map +1 -0
  63. package/dist-server/controllers/sellercraft-channel-integration-api/types.js +1 -0
  64. package/dist-server/controllers/sellercraft-channel-integration-api/types.js.map +1 -0
  65. package/dist-server/index.js +23 -0
  66. package/dist-server/index.js.map +1 -0
  67. package/dist-server/middlewares/index.js +8 -0
  68. package/dist-server/middlewares/index.js.map +1 -0
  69. package/dist-server/migrations/index.js +12 -0
  70. package/dist-server/migrations/index.js.map +1 -0
  71. package/dist-server/routers/sellercraft-router.js +286 -0
  72. package/dist-server/routers/sellercraft-router.js.map +1 -0
  73. package/dist-server/routes.js +29 -0
  74. package/dist-server/routes.js.map +1 -0
  75. package/dist-server/service/index.js +36 -0
  76. package/dist-server/service/index.js.map +1 -0
  77. package/dist-server/service/marketplace-channel/index.js +9 -0
  78. package/dist-server/service/marketplace-channel/index.js.map +1 -0
  79. package/dist-server/service/marketplace-channel/marketplace-channel-order-mutation.js +402 -0
  80. package/dist-server/service/marketplace-channel/marketplace-channel-order-mutation.js.map +1 -0
  81. package/dist-server/service/marketplace-channel/marketplace-channel-product-mutation.js +255 -0
  82. package/dist-server/service/marketplace-channel/marketplace-channel-product-mutation.js.map +1 -0
  83. package/dist-server/service/marketplace-channel/marketplace-channel.js +93 -0
  84. package/dist-server/service/marketplace-channel/marketplace-channel.js.map +1 -0
  85. package/dist-server/service/sellercraft/index.js +9 -0
  86. package/dist-server/service/sellercraft/index.js.map +1 -0
  87. package/dist-server/service/sellercraft/sellercraft-mutation.js +120 -0
  88. package/dist-server/service/sellercraft/sellercraft-mutation.js.map +1 -0
  89. package/dist-server/service/sellercraft/sellercraft-query.js +84 -0
  90. package/dist-server/service/sellercraft/sellercraft-query.js.map +1 -0
  91. package/dist-server/service/sellercraft/sellercraft-type.js +89 -0
  92. package/dist-server/service/sellercraft/sellercraft-type.js.map +1 -0
  93. package/dist-server/service/sellercraft/sellercraft.js +116 -0
  94. package/dist-server/service/sellercraft/sellercraft.js.map +1 -0
  95. package/dist-server/utils/tokencraft-util.js +63 -0
  96. package/dist-server/utils/tokencraft-util.js.map +1 -0
  97. package/package.json +15 -15
@@ -0,0 +1,255 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.MarketplaceChannelProductMutation = void 0;
16
+ const type_graphql_1 = require("type-graphql");
17
+ const typeorm_1 = require("typeorm");
18
+ const env_1 = require("@things-factory/env");
19
+ const integration_marketplace_1 = require("@things-factory/integration-marketplace");
20
+ const sellercraft_channel_integration_api_1 = require("../../controllers/sellercraft-channel-integration-api");
21
+ const marketplace_channel_1 = require("./marketplace-channel");
22
+ const tokencraft_util_1 = require("../../utils/tokencraft-util");
23
+ let MarketplaceChannelProductMutation = class MarketplaceChannelProductMutation {
24
+ async syncAllMarketplaceChannelProducts(context, fromUpdatedDate, toUpdatedDate, productBatchSize, channelId, shopId, airflow) {
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
26
+ const sellercraftChannelIntegrationConfig = env_1.config.get('sellercraftChannelIntegrationConfig', {});
27
+ let channels = await (0, typeorm_1.getRepository)(marketplace_channel_1.MarketplaceChannel).find({ where: { isActive: true } });
28
+ let errors = [];
29
+ if (channelId) {
30
+ channels = channels.filter(channel => channel.channelId == channelId);
31
+ }
32
+ for (var i = 0; i < channels.length; i++) {
33
+ try {
34
+ let shops = await (0, tokencraft_util_1.getShops)(channels[i].channelId);
35
+ if (shopId) {
36
+ shops = shops.filter(shop => shop.channel_shop_id == shopId);
37
+ }
38
+ for (var j = 0; j < shops.length; j++) {
39
+ try {
40
+ var store = {
41
+ accessKey: ((_b = (_a = shops[j]) === null || _a === void 0 ? void 0 : _a.credential) === null || _b === void 0 ? void 0 : _b.consumer_key) || '',
42
+ accessSecret: ((_d = (_c = shops[j]) === null || _c === void 0 ? void 0 : _c.credential) === null || _d === void 0 ? void 0 : _d.consumer_secret) || '',
43
+ storeURL: ((_f = (_e = shops[j]) === null || _e === void 0 ? void 0 : _e.credential) === null || _f === void 0 ? void 0 : _f.store_url) || '',
44
+ platform: channels[i].name,
45
+ accessToken: (_h = (_g = shops[j]) === null || _g === void 0 ? void 0 : _g.credential) === null || _h === void 0 ? void 0 : _h.access_token,
46
+ channelShopId: (_j = shops[j]) === null || _j === void 0 ? void 0 : _j.channel_shop_id,
47
+ storeId: ((_l = (_k = shops[j]) === null || _k === void 0 ? void 0 : _k.credential) === null || _l === void 0 ? void 0 : _l.store_url) || ''
48
+ };
49
+ let countryCode = shops[j].country_code;
50
+ let channelCode = shops[j].org_prefix;
51
+ let organisationId = shops[j].account_id;
52
+ let channelShopId = shops[j].channel_shop_id;
53
+ var sellercraftStore = Object.assign(Object.assign({}, store), { platform: 'sellercraftChannelIntegration' });
54
+ const productResult = [];
55
+ let totalPages = 1;
56
+ let limit = 50;
57
+ let parentLinks = [];
58
+ let cursor;
59
+ for (let page = 0; page < totalPages; page++) {
60
+ const { results, total, parentLinkList, page_info: nextCursor } = await integration_marketplace_1.StoreAPI.getStoreProducts(store, {
61
+ pagination: { page, limit },
62
+ pageInfo: cursor,
63
+ fromUpdatedDate,
64
+ toUpdatedDate
65
+ });
66
+ totalPages = Math.ceil(total / limit);
67
+ productResult.push(...results);
68
+ if (store.platform == 'magento')
69
+ parentLinks.push(...parentLinkList);
70
+ cursor = nextCursor;
71
+ }
72
+ const categoryResult = [];
73
+ let totalPagesCategory = 1;
74
+ let limitCategory = 100;
75
+ if (store.platform != 'shopify') {
76
+ for (let page = 0; page < totalPagesCategory; page++) {
77
+ const { results, total } = await integration_marketplace_1.StoreAPI.getStoreProductCategories(store, {
78
+ pagination: { page: store.platform == 'woocommerce' ? page + 1 : page, limitCategory }
79
+ });
80
+ totalPagesCategory = Math.ceil(total / limitCategory);
81
+ categoryResult.push(...results);
82
+ }
83
+ }
84
+ else {
85
+ categoryResult.push({ id: 1, name: 'default', isActive: true });
86
+ }
87
+ let mappedProducts = productResult.map(item => {
88
+ var _a;
89
+ let { categoryId, itemId: productId, name, brand, isVerified, images, sellercraftAttributes, variations } = item;
90
+ variations = variations.map(variation => {
91
+ let { variationSku, variationId, name, isEnabled: isEnabled, isSellable: isSellable, sellercraftAttributes, stockLocked, qty: stockReported, costPrice: fullPrice, sellPrice: priceDiscounted, length, width, height, weight, extraMetadata } = variation;
92
+ return {
93
+ variationSku,
94
+ variationId,
95
+ name,
96
+ isEnabled,
97
+ isSellable,
98
+ attributes: sellercraftAttributes || [],
99
+ stockLocked,
100
+ stockReported,
101
+ fullPrice: parseFloat(fullPrice) || 0,
102
+ priceDiscounted: parseFloat(priceDiscounted) || 0,
103
+ inventoryProducts: [
104
+ {
105
+ qty: 1,
106
+ name: `${name} - ${variationSku}`,
107
+ sku: variationSku,
108
+ productVersions: [
109
+ {
110
+ label: 'Default',
111
+ packageLengthMM: length,
112
+ packageWidthMM: width,
113
+ packageHeightMM: height,
114
+ packageWeightGram: weight,
115
+ qty: stockReported
116
+ }
117
+ ]
118
+ }
119
+ ],
120
+ extraMetadata
121
+ };
122
+ });
123
+ images = images === null || images === void 0 ? void 0 : images.map(image => {
124
+ return {
125
+ url: image
126
+ };
127
+ });
128
+ return {
129
+ organisationId,
130
+ channelShopId: channelShopId,
131
+ channelCode: channels[i].channelCode,
132
+ channelCountry: shops[j].country_code,
133
+ categoryId: store.platform == 'shopify' ? 1 : categoryId,
134
+ productId: ((_a = parentLinks.find(e => e.children.includes(productId))) === null || _a === void 0 ? void 0 : _a.id) || productId,
135
+ name,
136
+ brand,
137
+ isVerified,
138
+ images,
139
+ attributes: sellercraftAttributes || [],
140
+ variations
141
+ };
142
+ });
143
+ let mappedCategories = categoryResult.map(category => {
144
+ let { id: categoryId, name: categoryName, parent, isActive } = category;
145
+ return {
146
+ categoryId,
147
+ categoryName,
148
+ parent,
149
+ isActive: isActive || true,
150
+ channelCode,
151
+ countryCode,
152
+ childrenCategories: []
153
+ };
154
+ });
155
+ if (store.platform == 'magento') {
156
+ let newList = [];
157
+ for (let np of mappedProducts) {
158
+ if (np.productId == np.variations[0].variationId) {
159
+ let vars = mappedProducts
160
+ .filter(e => e.productId == np.productId)
161
+ .map(e => {
162
+ return e.variations[0];
163
+ });
164
+ np.variations = vars;
165
+ if (np.variations.length > 1) {
166
+ np.variations = np.variations.filter(v => v.variationId != np.productId);
167
+ }
168
+ newList.push(np);
169
+ }
170
+ }
171
+ mappedProducts = newList;
172
+ }
173
+ try {
174
+ let filterList = [];
175
+ mappedCategories = mappedCategories.map(category => {
176
+ if (mappedCategories.filter(e => e.parent == category.categoryId).length > 0) {
177
+ category.childrenCategories = mappedCategories.filter(e => e.parent == category.categoryId);
178
+ filterList.push(...mappedCategories.filter(e => e.parent == category.categoryId));
179
+ }
180
+ return category;
181
+ });
182
+ mappedCategories = mappedCategories
183
+ .map(mc => {
184
+ if (filterList.indexOf(mc) == -1) {
185
+ return mc;
186
+ }
187
+ })
188
+ .filter(e => e);
189
+ await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelCategories(sellercraftStore, {
190
+ categories: mappedCategories
191
+ });
192
+ }
193
+ catch (e) {
194
+ errors.push({
195
+ name: 'Category Ingestion Error',
196
+ msg: JSON.stringify(e) || {}
197
+ });
198
+ }
199
+ let bs = parseInt(productBatchSize) || mappedProducts.length;
200
+ if (mappedProducts.length > 0) {
201
+ while (mappedProducts.length > 0) {
202
+ let spliceResult = mappedProducts.splice(0, mappedProducts.length >= bs ? bs : mappedProducts.length);
203
+ try {
204
+ await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelProduct(sellercraftStore, {
205
+ products: spliceResult
206
+ });
207
+ }
208
+ catch (e) {
209
+ errors.push({
210
+ name: 'Product Ingestion Error',
211
+ msg: JSON.stringify(e) || {}
212
+ });
213
+ }
214
+ }
215
+ }
216
+ }
217
+ catch (e) {
218
+ errors.push({
219
+ name: 'Product Processing / Mapping Error',
220
+ msg: JSON.stringify(e) || {}
221
+ });
222
+ }
223
+ }
224
+ }
225
+ catch (e) {
226
+ errors.push({
227
+ name: 'Store Error',
228
+ msg: JSON.stringify(e) || {}
229
+ });
230
+ }
231
+ }
232
+ if (errors.length > 1 && airflow) {
233
+ throw errors;
234
+ }
235
+ return true;
236
+ }
237
+ };
238
+ __decorate([
239
+ (0, type_graphql_1.Mutation)(returns => Boolean),
240
+ __param(0, (0, type_graphql_1.Ctx)()),
241
+ __param(1, (0, type_graphql_1.Arg)('fromUpdatedDate', { nullable: true })),
242
+ __param(2, (0, type_graphql_1.Arg)('toUpdatedDate', { nullable: true })),
243
+ __param(3, (0, type_graphql_1.Arg)('productBatchSize', { nullable: true })),
244
+ __param(4, (0, type_graphql_1.Arg)('channelId', { nullable: true })),
245
+ __param(5, (0, type_graphql_1.Arg)('shopId', { nullable: true })),
246
+ __param(6, (0, type_graphql_1.Arg)('airflow', { nullable: true })),
247
+ __metadata("design:type", Function),
248
+ __metadata("design:paramtypes", [Object, String, String, String, String, String, Boolean]),
249
+ __metadata("design:returntype", Promise)
250
+ ], MarketplaceChannelProductMutation.prototype, "syncAllMarketplaceChannelProducts", null);
251
+ MarketplaceChannelProductMutation = __decorate([
252
+ (0, type_graphql_1.Resolver)()
253
+ ], MarketplaceChannelProductMutation);
254
+ exports.MarketplaceChannelProductMutation = MarketplaceChannelProductMutation;
255
+ //# sourceMappingURL=marketplace-channel-product-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketplace-channel-product-mutation.js","sourceRoot":"","sources":["../../../server/service/marketplace-channel/marketplace-channel-product-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2D;AAC3D,qCAAuC;AAEvC,6CAA4C;AAC5C,qFAAkE;AAElE,+GAAwG;AACxG,+DAA0D;AAC1D,iEAAsD;AAG/C,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAEtC,AAAN,KAAK,CAAC,iCAAiC,CAC9B,OAAY,EACyB,eAAwB,EAC1B,aAAsB,EACnB,gBAAyB,EAChC,SAAkB,EACrB,MAAe,EACd,OAAiB;;QAErD,MAAM,mCAAmC,GAAG,YAAM,CAAC,GAAG,CAAC,qCAAqC,EAAE,EAAE,CAAC,CAAA;QAEjG,IAAI,QAAQ,GAAyB,MAAM,IAAA,uBAAa,EAAC,wCAAkB,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;QAChH,IAAI,MAAM,GAAQ,EAAE,CAAA;QAEpB,IAAI,SAAS,EAAE;YACb,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,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EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1C,WAAA,IAAA,kBAAG,EAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IACxC,WAAA,IAAA,kBAAG,EAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAC3C,WAAA,IAAA,kBAAG,EAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IACpC,WAAA,IAAA,kBAAG,EAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IACjC,WAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;;;;0FAoQpC;AA7QU,iCAAiC;IAD7C,IAAA,uBAAQ,GAAE;GACE,iCAAiC,CA8Q7C;AA9QY,8EAAiC"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var _a, _b, _c;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.MarketplaceChannel = void 0;
14
+ const type_graphql_1 = require("type-graphql");
15
+ const typeorm_1 = require("typeorm");
16
+ const auth_base_1 = require("@things-factory/auth-base");
17
+ const shell_1 = require("@things-factory/shell");
18
+ let MarketplaceChannel = class MarketplaceChannel {
19
+ };
20
+ __decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
22
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
23
+ __metadata("design:type", String)
24
+ ], MarketplaceChannel.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
27
+ (0, type_graphql_1.Field)({ nullable: true }),
28
+ __metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
29
+ ], MarketplaceChannel.prototype, "domain", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.RelationId)((marketplaceChannel) => marketplaceChannel.domain),
32
+ __metadata("design:type", String)
33
+ ], MarketplaceChannel.prototype, "domainId", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)(),
36
+ (0, type_graphql_1.Field)(),
37
+ __metadata("design:type", String)
38
+ ], MarketplaceChannel.prototype, "name", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)(),
41
+ (0, type_graphql_1.Field)(),
42
+ __metadata("design:type", String)
43
+ ], MarketplaceChannel.prototype, "channelCode", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)(),
46
+ (0, type_graphql_1.Field)(),
47
+ __metadata("design:type", String)
48
+ ], MarketplaceChannel.prototype, "channelId", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ nullable: true }),
51
+ (0, type_graphql_1.Field)({ nullable: true }),
52
+ __metadata("design:type", String)
53
+ ], MarketplaceChannel.prototype, "countryCode", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({ default: true }),
56
+ (0, type_graphql_1.Field)(),
57
+ __metadata("design:type", Boolean)
58
+ ], MarketplaceChannel.prototype, "isActive", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.CreateDateColumn)(),
61
+ (0, type_graphql_1.Field)({ nullable: true }),
62
+ __metadata("design:type", Date)
63
+ ], MarketplaceChannel.prototype, "createdAt", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.UpdateDateColumn)(),
66
+ (0, type_graphql_1.Field)({ nullable: true }),
67
+ __metadata("design:type", Date)
68
+ ], MarketplaceChannel.prototype, "updatedAt", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
71
+ (0, type_graphql_1.Field)({ nullable: true }),
72
+ __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
73
+ ], MarketplaceChannel.prototype, "creator", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.RelationId)((marketplaceChannel) => marketplaceChannel.creator),
76
+ __metadata("design:type", String)
77
+ ], MarketplaceChannel.prototype, "creatorId", void 0);
78
+ __decorate([
79
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
80
+ (0, type_graphql_1.Field)({ nullable: true }),
81
+ __metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
82
+ ], MarketplaceChannel.prototype, "updater", void 0);
83
+ __decorate([
84
+ (0, typeorm_1.RelationId)((marketplaceChannel) => marketplaceChannel.updater),
85
+ __metadata("design:type", String)
86
+ ], MarketplaceChannel.prototype, "updaterId", void 0);
87
+ MarketplaceChannel = __decorate([
88
+ (0, typeorm_1.Entity)(),
89
+ (0, typeorm_1.Index)('ix_marketplace_channel_0 ', (marketplaceChannel) => [marketplaceChannel.domain, marketplaceChannel.name], { unique: true }),
90
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for Marketplace Channel' })
91
+ ], MarketplaceChannel);
92
+ exports.MarketplaceChannel = MarketplaceChannel;
93
+ //# sourceMappingURL=marketplace-channel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketplace-channel.js","sourceRoot":"","sources":["../../../server/service/marketplace-channel/marketplace-channel.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,+CAAoD;AACpD,qCASgB;AA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AC;IAC3C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDAChB,gBAAI,oBAAJ,gBAAI;mDAAA;AAEd;IAAC,IAAA,oBAAU,EAAC,CAAC,kBAAsC,EAAE,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC;;qDACjE;AAElB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDAChB,gBAAI,oBAAJ,gBAAI;mDAAA;AAEd;IAAC,IAAA,oBAAU,EAAC,CAAC,kBAAsC,EAAE,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC;;qDACjE;AApDP,kBAAkB;IAH9B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,2BAA2B,EAAE,CAAC,kBAAsC,EAAE,EAAE,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACtJ,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;GACjD,kBAAkB,CAqD9B;AArDY,gDAAkB"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const sellercraft_1 = require("./sellercraft");
5
+ const sellercraft_query_1 = require("./sellercraft-query");
6
+ const sellercraft_mutation_1 = require("./sellercraft-mutation");
7
+ exports.entities = [sellercraft_1.Sellercraft];
8
+ exports.resolvers = [sellercraft_query_1.SellercraftQuery, sellercraft_mutation_1.SellercraftMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/sellercraft/index.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAC3C,2DAAsD;AACtD,iEAA4D;AAE/C,QAAA,QAAQ,GAAG,CAAC,yBAAW,CAAC,CAAA;AACxB,QAAA,SAAS,GAAG,CAAC,oCAAgB,EAAE,0CAAmB,CAAC,CAAA"}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.SellercraftMutation = void 0;
16
+ const type_graphql_1 = require("type-graphql");
17
+ const typeorm_1 = require("typeorm");
18
+ const uuid_1 = require("uuid");
19
+ const sellercraft_1 = require("./sellercraft");
20
+ const sellercraft_type_1 = require("./sellercraft-type");
21
+ let SellercraftMutation = class SellercraftMutation {
22
+ async createSellercraft(sellercraft, context) {
23
+ const { domain, user, tx } = context.state;
24
+ return await tx.getRepository(sellercraft_1.Sellercraft).save(Object.assign(Object.assign({}, sellercraft), { name: (0, uuid_1.v4)(), domain, creator: user, updater: user }));
25
+ }
26
+ async updateSellercraft(id, patch, context) {
27
+ const { user, tx } = context.state;
28
+ const repository = tx.getRepository(sellercraft_1.Sellercraft);
29
+ const sellercraft = await repository.findOne(id);
30
+ return await repository.save(Object.assign(Object.assign(Object.assign({}, sellercraft), patch), { updater: user }));
31
+ }
32
+ async updateMultipleSellercraft(patches, context) {
33
+ const { domain, user, tx } = context.state;
34
+ let results = [];
35
+ const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
36
+ const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
37
+ const sellercraftRepo = tx.getRepository(sellercraft_1.Sellercraft);
38
+ if (_createRecords.length > 0) {
39
+ for (let i = 0; i < _createRecords.length; i++) {
40
+ const newRecord = _createRecords[i];
41
+ const result = await sellercraftRepo.save(Object.assign(Object.assign({}, newRecord), { domain, name: (0, uuid_1.v4)(), status: sellercraft_1.SellercraftStatus.ACTIVE, platform: sellercraft_1.SellercraftPlatform.SELLERCRAFT, creator: user, updater: user }));
42
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
43
+ }
44
+ }
45
+ if (_updateRecords.length > 0) {
46
+ for (let i = 0; i < _updateRecords.length; i++) {
47
+ const newRecord = _updateRecords[i];
48
+ const sellercraft = await sellercraftRepo.findOne(newRecord.id);
49
+ const result = await sellercraftRepo.save(Object.assign(Object.assign(Object.assign({}, sellercraft), newRecord), { updater: user }));
50
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
51
+ }
52
+ }
53
+ return results;
54
+ }
55
+ async deleteSellercraft(id, context) {
56
+ const { domain, tx } = context.state;
57
+ await tx.getRepository(sellercraft_1.Sellercraft).delete({ domain, id });
58
+ return true;
59
+ }
60
+ async deleteSellercrafts(ids, context) {
61
+ const { domain, tx, user } = context.state;
62
+ let sellercrafts = await tx.getRepository(sellercraft_1.Sellercraft).find({ where: { domain, id: (0, typeorm_1.In)(ids) } });
63
+ sellercrafts = sellercrafts.map((sellercraft) => {
64
+ return Object.assign(Object.assign({}, sellercraft), { status: sellercraft_1.SellercraftStatus.TERMINATED, updater: user });
65
+ });
66
+ await tx.getRepository(sellercraft_1.Sellercraft).save(sellercrafts);
67
+ return true;
68
+ }
69
+ };
70
+ __decorate([
71
+ (0, type_graphql_1.Directive)('@transaction'),
72
+ (0, type_graphql_1.Mutation)(returns => sellercraft_1.Sellercraft, { description: 'To create new Sellercraft' }),
73
+ __param(0, (0, type_graphql_1.Arg)('sellercraft')),
74
+ __param(1, (0, type_graphql_1.Ctx)()),
75
+ __metadata("design:type", Function),
76
+ __metadata("design:paramtypes", [sellercraft_type_1.NewSellercraft, Object]),
77
+ __metadata("design:returntype", Promise)
78
+ ], SellercraftMutation.prototype, "createSellercraft", null);
79
+ __decorate([
80
+ (0, type_graphql_1.Directive)('@transaction'),
81
+ (0, type_graphql_1.Mutation)(returns => sellercraft_1.Sellercraft, { description: 'To modify Sellercraft information' }),
82
+ __param(0, (0, type_graphql_1.Arg)('id')),
83
+ __param(1, (0, type_graphql_1.Arg)('patch')),
84
+ __param(2, (0, type_graphql_1.Ctx)()),
85
+ __metadata("design:type", Function),
86
+ __metadata("design:paramtypes", [String, sellercraft_type_1.SellercraftPatch, Object]),
87
+ __metadata("design:returntype", Promise)
88
+ ], SellercraftMutation.prototype, "updateSellercraft", null);
89
+ __decorate([
90
+ (0, type_graphql_1.Directive)('@transaction'),
91
+ (0, type_graphql_1.Mutation)(returns => [sellercraft_1.Sellercraft], { description: "To modify multiple Sellercrafts' information" }),
92
+ __param(0, (0, type_graphql_1.Arg)('patches', type => [sellercraft_type_1.SellercraftPatch])),
93
+ __param(1, (0, type_graphql_1.Ctx)()),
94
+ __metadata("design:type", Function),
95
+ __metadata("design:paramtypes", [Array, Object]),
96
+ __metadata("design:returntype", Promise)
97
+ ], SellercraftMutation.prototype, "updateMultipleSellercraft", null);
98
+ __decorate([
99
+ (0, type_graphql_1.Directive)('@transaction'),
100
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete Sellercraft' }),
101
+ __param(0, (0, type_graphql_1.Arg)('id')),
102
+ __param(1, (0, type_graphql_1.Ctx)()),
103
+ __metadata("design:type", Function),
104
+ __metadata("design:paramtypes", [String, Object]),
105
+ __metadata("design:returntype", Promise)
106
+ ], SellercraftMutation.prototype, "deleteSellercraft", null);
107
+ __decorate([
108
+ (0, type_graphql_1.Directive)('@transaction'),
109
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple sellercrafts' }),
110
+ __param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
111
+ __param(1, (0, type_graphql_1.Ctx)()),
112
+ __metadata("design:type", Function),
113
+ __metadata("design:paramtypes", [Array, Object]),
114
+ __metadata("design:returntype", Promise)
115
+ ], SellercraftMutation.prototype, "deleteSellercrafts", null);
116
+ SellercraftMutation = __decorate([
117
+ (0, type_graphql_1.Resolver)(sellercraft_1.Sellercraft)
118
+ ], SellercraftMutation);
119
+ exports.SellercraftMutation = SellercraftMutation;
120
+ //# sourceMappingURL=sellercraft-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sellercraft-mutation.js","sourceRoot":"","sources":["../../../server/service/sellercraft/sellercraft-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,+BAAmC;AAEnC,+CAAmF;AACnF,yDAAqE;AAG9D,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAGxB,AAAN,KAAK,CAAC,iBAAiB,CAAqB,WAA2B,EAAS,OAAY;QAC1F,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,yBAAW,CAAC,CAAC,IAAI,iCAC1C,WAAW,KACd,IAAI,EAAE,IAAA,SAAM,GAAE,EACd,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,iBAAiB,CACV,EAAU,EACP,KAAuB,EAC9B,OAAY;QAEnB,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,M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,OAAO,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;IAC9C,WAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;4DAKpD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IACvD,WAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;6DAc3E;AA5GU,mBAAmB;IAD/B,IAAA,uBAAQ,EAAC,yBAAW,CAAC;GACT,mBAAmB,CA6G/B;AA7GY,kDAAmB"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var _a;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.SellercraftQuery = void 0;
17
+ const type_graphql_1 = require("type-graphql");
18
+ const typeorm_1 = require("typeorm");
19
+ const auth_base_1 = require("@things-factory/auth-base");
20
+ const shell_1 = require("@things-factory/shell");
21
+ const sellercraft_1 = require("./sellercraft");
22
+ const sellercraft_type_1 = require("./sellercraft-type");
23
+ let SellercraftQuery = class SellercraftQuery {
24
+ async sellercraft(id, context) {
25
+ return await (0, typeorm_1.getRepository)(sellercraft_1.Sellercraft).findOne(id);
26
+ }
27
+ async sellercrafts(params, context) {
28
+ const { domain } = context.state;
29
+ const convertedParams = (0, shell_1.convertListParams)(params, domain.id);
30
+ const [items, total] = await (0, typeorm_1.getRepository)(sellercraft_1.Sellercraft).findAndCount(convertedParams);
31
+ return { items, total };
32
+ }
33
+ async domain(sellercraft) {
34
+ return await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(sellercraft.domainId);
35
+ }
36
+ async updater(sellercraft) {
37
+ return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(sellercraft.updaterId);
38
+ }
39
+ async creator(sellercraft) {
40
+ return await (0, typeorm_1.getRepository)(auth_base_1.User).findOne(sellercraft.creatorId);
41
+ }
42
+ };
43
+ __decorate([
44
+ (0, type_graphql_1.Query)(returns => sellercraft_1.Sellercraft, { description: 'To fetch a Sellercraft' }),
45
+ __param(0, (0, type_graphql_1.Arg)('id')),
46
+ __param(1, (0, type_graphql_1.Ctx)()),
47
+ __metadata("design:type", Function),
48
+ __metadata("design:paramtypes", [String, Object]),
49
+ __metadata("design:returntype", Promise)
50
+ ], SellercraftQuery.prototype, "sellercraft", null);
51
+ __decorate([
52
+ (0, type_graphql_1.Query)(returns => sellercraft_type_1.SellercraftList, { description: 'To fetch multiple Sellercrafts' }),
53
+ __param(0, (0, type_graphql_1.Args)()),
54
+ __param(1, (0, type_graphql_1.Ctx)()),
55
+ __metadata("design:type", Function),
56
+ __metadata("design:paramtypes", [typeof (_a = typeof shell_1.ListParam !== "undefined" && shell_1.ListParam) === "function" ? _a : Object, Object]),
57
+ __metadata("design:returntype", Promise)
58
+ ], SellercraftQuery.prototype, "sellercrafts", null);
59
+ __decorate([
60
+ (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
61
+ __param(0, (0, type_graphql_1.Root)()),
62
+ __metadata("design:type", Function),
63
+ __metadata("design:paramtypes", [sellercraft_1.Sellercraft]),
64
+ __metadata("design:returntype", Promise)
65
+ ], SellercraftQuery.prototype, "domain", null);
66
+ __decorate([
67
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
68
+ __param(0, (0, type_graphql_1.Root)()),
69
+ __metadata("design:type", Function),
70
+ __metadata("design:paramtypes", [sellercraft_1.Sellercraft]),
71
+ __metadata("design:returntype", Promise)
72
+ ], SellercraftQuery.prototype, "updater", null);
73
+ __decorate([
74
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
75
+ __param(0, (0, type_graphql_1.Root)()),
76
+ __metadata("design:type", Function),
77
+ __metadata("design:paramtypes", [sellercraft_1.Sellercraft]),
78
+ __metadata("design:returntype", Promise)
79
+ ], SellercraftQuery.prototype, "creator", null);
80
+ SellercraftQuery = __decorate([
81
+ (0, type_graphql_1.Resolver)(sellercraft_1.Sellercraft)
82
+ ], SellercraftQuery);
83
+ exports.SellercraftQuery = SellercraftQuery;
84
+ //# sourceMappingURL=sellercraft-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sellercraft-query.js","sourceRoot":"","sources":["../../../server/service/sellercraft/sellercraft-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAAmF;AACnF,qCAAuC;AAEvC,yDAAgD;AAChD,iDAA4E;AAE5E,+CAA2C;AAC3C,yDAAoD;AAG7C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAErB,AAAN,KAAK,CAAC,WAAW,CAAY,EAAU,EAAS,OAAY;QAC1D,OAAO,MAAM,IAAA,uBAAa,EAAC,yBAAW,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IACrD,CAAC;IAGK,AAAN,KAAK,CAAC,YAAY,CAAS,MAAiB,EAAS,OAAY;QAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,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