@pmcretail/mapper-library 0.0.1

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.
@@ -0,0 +1,473 @@
1
+ export declare enum TRANSACTION_TYPE {
2
+ SALE = "SALE",
3
+ REFUND = "REFUND",
4
+ SALE_REFUND = "SALE_REFUND",
5
+ SALE_EXCHANGE = "SALE_EXCHANGE",
6
+ VOID = "VOID"
7
+ }
8
+ export interface ItemDiscount {
9
+ trnDiscountsPortion: number;
10
+ trnPromotionsPortion: number;
11
+ refundPortion: number;
12
+ currentRefundPortion?: number;
13
+ }
14
+ export declare enum DELIVERY_METHODS {
15
+ DELIVERY = 1,
16
+ DROP_SHIP = 2,
17
+ COLLECT_FROM_STORE = 3
18
+ }
19
+ export interface ProductChange {
20
+ itemLineId?: number;
21
+ SKU: string;
22
+ quantity: number;
23
+ selectedPrice?: number;
24
+ lineDiscount?: LineDiscount;
25
+ linePromotions?: LinePromotions;
26
+ exchange?: Exchange;
27
+ refundedQuantity?: number;
28
+ refundPromotionalQuantity?: number;
29
+ refunded?: boolean;
30
+ refundedTotal?: number;
31
+ refundedReason?: string;
32
+ refundedReasonDescription?: string;
33
+ isChecked?: boolean;
34
+ sealed?: boolean;
35
+ isLastExchanged?: boolean;
36
+ }
37
+ /**
38
+ * Product
39
+ */
40
+ export interface Product extends ProductChange {
41
+ itemLineId?: number;
42
+ status: number;
43
+ subGroup: number;
44
+ brand: string;
45
+ currency: string;
46
+ category: string;
47
+ countryofOrigin: string;
48
+ productId: string;
49
+ productType: number;
50
+ name?: string;
51
+ imageUrls: [string];
52
+ isImageFailToLoad?: boolean;
53
+ size: string;
54
+ type: string;
55
+ season: number;
56
+ productGroup: number;
57
+ styleCode: string;
58
+ nodeStructure: NodeStructure[];
59
+ barcode: string;
60
+ price: Price[];
61
+ colour: string;
62
+ description: string;
63
+ totalLinePrice: number;
64
+ total: number;
65
+ addedInBasket?: boolean;
66
+ selectedVAT?: number;
67
+ selectedVATCode?: string;
68
+ selectedRRPPrice?: number;
69
+ lineDiscount?: LineDiscount;
70
+ exchange?: Exchange;
71
+ refundPromotionalQuantity?: number;
72
+ exchangeReason?: string;
73
+ exchangeQuantity?: number;
74
+ itemDiscounts: ItemDiscount;
75
+ giftCardNumberIssued?: string;
76
+ giftCardAmount?: number;
77
+ giftCardRecipientEmail?: string;
78
+ giftCardExpiryDate?: string;
79
+ giftCardRecipientName?: string;
80
+ giftCard?: boolean;
81
+ discountable: boolean;
82
+ excludePromotion: boolean;
83
+ categories: Categories[];
84
+ descriptions: Descriptions[];
85
+ barcodes: string[];
86
+ externalId: string;
87
+ createdDate: string;
88
+ updatedDate: string;
89
+ createdBy: string;
90
+ updatedBy: string;
91
+ attributes: CoreAttribute[];
92
+ id: string;
93
+ long_description: string;
94
+ isWebOrder?: boolean;
95
+ fullfilmentId: string;
96
+ fullfilmentLocationName?: string;
97
+ deliveryMethod?: string;
98
+ deliveryGroup?: string;
99
+ selectedInventory?: InventoryInfo;
100
+ leadTime?: leadTime;
101
+ }
102
+ export interface leadTime {
103
+ type: string;
104
+ value: string;
105
+ }
106
+ export interface Exchange {
107
+ exchangeId: number;
108
+ lineItemId: number;
109
+ reason: string;
110
+ quantity: number;
111
+ newItems: Product[];
112
+ }
113
+ export interface Categories {
114
+ id: string;
115
+ parentId: string;
116
+ name: string;
117
+ categoryId: string;
118
+ status: boolean;
119
+ }
120
+ export interface Descriptions {
121
+ name: string;
122
+ countryCode: string;
123
+ value: string;
124
+ }
125
+ export interface CoreAttribute {
126
+ name: string;
127
+ value: string;
128
+ searchable: boolean;
129
+ countryCode: string;
130
+ }
131
+ /**
132
+ * Basket
133
+ */
134
+ export interface Basket {
135
+ subsidiaryId?: string;
136
+ products: Product[];
137
+ transactionDiscount: any[];
138
+ quantity: number;
139
+ total: number;
140
+ saleTotal: number;
141
+ discountTotal?: number;
142
+ transactionId?: string;
143
+ offlineTransactionId?: string;
144
+ baseCurrency: string;
145
+ basketTotal?: number;
146
+ refundTotal?: number;
147
+ transactionPromotion?: TransactionPromotion[];
148
+ customer?: any;
149
+ exchange?: Exchange[];
150
+ inStoreFlag?: boolean;
151
+ }
152
+ /**
153
+ * Price
154
+ */
155
+ export interface Price {
156
+ VAT: number;
157
+ VATCode: string;
158
+ salesPrice: number;
159
+ currencyCode: string;
160
+ RRPPrice: number;
161
+ }
162
+ /**
163
+ * Node structure
164
+ */
165
+ interface NodeStructure {
166
+ status: boolean;
167
+ name: string;
168
+ nodeType: string;
169
+ isOverride: boolean;
170
+ nodeId: string;
171
+ parentId: string;
172
+ }
173
+ /**
174
+ * Line Discount
175
+ */
176
+ export interface LineDiscount {
177
+ itemLineId: string;
178
+ discountAmount: number;
179
+ discountType: string;
180
+ name?: string;
181
+ unitPrice: number;
182
+ discountedLinePrice?: number;
183
+ priceManagerOverride?: UserOverride;
184
+ priceOverrideReasonCode?: string;
185
+ priceOverrideReasonName?: string;
186
+ priceOverrideAmount?: number;
187
+ percentageDiscountManagerOverride?: UserOverride;
188
+ percentageDiscountReasonCode?: string;
189
+ percentageDiscountReasonName?: string;
190
+ percentageDiscountValue?: number;
191
+ }
192
+ /**
193
+ * User Override
194
+ */
195
+ export interface UserOverride {
196
+ userId: string;
197
+ automaticApprove: string;
198
+ originalUserId: string;
199
+ }
200
+ /**
201
+ * line Promotions
202
+ */
203
+ export interface LinePromotions {
204
+ trigger: Trigger[];
205
+ itemLineId: number;
206
+ promotionId: string;
207
+ displayText: string;
208
+ promotionType: string;
209
+ promotionAmount: number;
210
+ name: string;
211
+ promotionInfo: string;
212
+ promotionLinePrice: number;
213
+ refunded?: boolean;
214
+ }
215
+ /**
216
+ * trigger
217
+ */
218
+ export interface Trigger {
219
+ itemLineId: string;
220
+ quantity?: number;
221
+ totalQuantity?: number;
222
+ }
223
+ /**
224
+ * Transaction Promotion
225
+ */
226
+ export interface TransactionPromotion {
227
+ displayText: string;
228
+ name: string;
229
+ promotionAmount: number;
230
+ promotionId: string;
231
+ promotionInfo: string;
232
+ promotionType: string;
233
+ itemLineIds: number[];
234
+ }
235
+ export interface RefundProductChange {
236
+ itemLineId?: number;
237
+ refundedQuantity?: number;
238
+ refundedPromotionalQuantity?: number;
239
+ refundTotal?: number;
240
+ refundedReason?: string;
241
+ refundedReasonDescription?: string;
242
+ refundWithPromotion: boolean;
243
+ isLastExchanged?: boolean;
244
+ }
245
+ export interface InventoryInfo {
246
+ storeName: string;
247
+ storeId: string;
248
+ quantityAvailable: number;
249
+ quantityRequired: number;
250
+ }
251
+ export interface InventoryRequestInfo extends InventoryInfo {
252
+ requestedQuantity: number;
253
+ requestedAction: DELIVERY_METHODS;
254
+ }
255
+ export interface DeliveryInfo {
256
+ groups: DeliveryGroupInfo[];
257
+ }
258
+ export interface DeliveryGroupInfo {
259
+ groupNumber: number;
260
+ items: Product[];
261
+ estimate?: Estimate;
262
+ }
263
+ export interface Estimate {
264
+ type: string;
265
+ value: string;
266
+ }
267
+ export interface TransactionDocument {
268
+ transactionId?: string;
269
+ subsidiaryId?: string;
270
+ offlineTransactionId?: string;
271
+ transactionRef?: string;
272
+ dateTime?: string;
273
+ orgCode: string;
274
+ storeId: string;
275
+ storeNodeId: string;
276
+ storeNodeStructure: string;
277
+ deviceId: string;
278
+ terminalId: string;
279
+ initiatingModule: string;
280
+ export: boolean;
281
+ userId?: string;
282
+ userName?: string;
283
+ customer?: Customer;
284
+ basket: any;
285
+ basketSummary: any;
286
+ baseCurrency: string;
287
+ splitPayment?: boolean;
288
+ isPaymentCompleted?: boolean;
289
+ paymentDetails?: any;
290
+ type?: string;
291
+ operationStatus?: string;
292
+ createdAt?: string;
293
+ updatedAt?: string;
294
+ transCompletedAt?: string;
295
+ id?: string;
296
+ saleTotal?: number;
297
+ reasonCode?: string;
298
+ reasonDescription?: string;
299
+ override?: UserOverride;
300
+ originalTransId?: string;
301
+ originalExternalId?: string;
302
+ apiResponse?: APIResponse;
303
+ unreferencedRefund?: boolean;
304
+ giftedReceipt?: boolean;
305
+ currentTransactionDetails?: any;
306
+ isChecked?: boolean;
307
+ }
308
+ export interface APIResponse {
309
+ internalId?: number;
310
+ tranid?: string;
311
+ }
312
+ export interface CurrentTransactionDetails {
313
+ products: Product[];
314
+ lineDiscount?: LineDiscount[];
315
+ linePromotion?: LinePromotions[];
316
+ transactionPromotion?: TransactionPromotion[];
317
+ transactionDiscount?: TransactionDiscount[];
318
+ basketSummary?: BasketSummary;
319
+ taxBreakdown?: TaxBreakdown;
320
+ totalTaxSummary?: TotalTaxSummary[];
321
+ }
322
+ export interface BasketSummary {
323
+ totalItems: number;
324
+ saleTotal: number;
325
+ VATTotal: number;
326
+ discountTotal: number;
327
+ basketTotal: number;
328
+ refundTotal?: number;
329
+ }
330
+ export interface TransactionDiscount {
331
+ discountAmount: number;
332
+ discountType: String;
333
+ reasonCode: string;
334
+ override?: UserOverride;
335
+ itemLineIds?: number[];
336
+ }
337
+ export interface TBasket {
338
+ products: TProduct[];
339
+ lineDiscount: LineDiscount[];
340
+ exchange: Exchange[];
341
+ linePromotion: LinePromotions[];
342
+ transactionPromotion?: TransactionPromotion[];
343
+ transactionDiscount?: TransactionDiscount[];
344
+ taxBreakdown?: TaxBreakdown;
345
+ totalTaxSummary?: TotalTaxSummary[];
346
+ }
347
+ export interface TExchange {
348
+ exchangeId?: number;
349
+ lineItemId?: number;
350
+ reason?: string;
351
+ quantity?: number;
352
+ newItems?: TNewItems[];
353
+ }
354
+ export interface TNewItems {
355
+ lineItemId: number;
356
+ Quantity: number;
357
+ }
358
+ export interface TProduct {
359
+ itemLineId: string;
360
+ SKU: string;
361
+ description: string;
362
+ imageUrls: [string];
363
+ price: number;
364
+ taxCode?: string;
365
+ taxPercent?: string;
366
+ quantity: number;
367
+ refundedQuantity?: number;
368
+ refundedPromotionalQuantity?: number;
369
+ refunded?: boolean;
370
+ refundedTotal?: number;
371
+ refundedReason?: string;
372
+ refundedReasonDescription?: string;
373
+ selectedRRPPrice?: number;
374
+ totalLinePrice: number;
375
+ barCode?: string;
376
+ barcodes?: string[];
377
+ flagged?: boolean;
378
+ exchange?: Exchange;
379
+ excludePromotion: boolean;
380
+ discountable?: boolean;
381
+ itemDiscounts?: ItemDiscounts;
382
+ isLastExchanged?: boolean;
383
+ fullfilmentId: string;
384
+ fullfilmentLocationName: string;
385
+ deliveryMethod?: string;
386
+ deliveryGroup?: string;
387
+ giftCardNumberIssued?: string;
388
+ giftCardAmount?: number;
389
+ giftCardRecipientEmail?: string;
390
+ giftCardExpiryDate?: string;
391
+ giftCardRecipientName?: string;
392
+ giftCard?: boolean;
393
+ currency?: string;
394
+ isWebOrder?: boolean;
395
+ leadTime?: leadTime;
396
+ lineDiscount?: any;
397
+ }
398
+ export interface ItemDiscounts {
399
+ trnDiscountsPortion: number;
400
+ trnPromotionsPortion: number;
401
+ refundPortion: number;
402
+ }
403
+ export interface Customer {
404
+ id: string;
405
+ title?: string;
406
+ firstName: string;
407
+ lastName: string;
408
+ email: string;
409
+ postCode: string;
410
+ telephone?: string;
411
+ billingAddress?: Address;
412
+ shippingAddress?: Address;
413
+ addressDetail?: string;
414
+ noCustomerSelected?: boolean;
415
+ externalId?: string;
416
+ }
417
+ export interface Address {
418
+ address1?: string;
419
+ address2?: string;
420
+ address3?: string;
421
+ city?: string;
422
+ county?: string;
423
+ postCode?: string;
424
+ country?: string;
425
+ }
426
+ export interface PaymentDetails {
427
+ cardNumber?: any;
428
+ sqNo?: number;
429
+ result?: string;
430
+ currency: string;
431
+ amount: string;
432
+ authcode?: string;
433
+ pan?: string;
434
+ cardType?: string;
435
+ transactionDate?: string;
436
+ mid?: string;
437
+ tid?: string;
438
+ cvm?: string;
439
+ hostReferenceId?: string;
440
+ aid?: string;
441
+ receiptNo?: string;
442
+ expirydate?: string;
443
+ transactionReference: string;
444
+ applicationVersion?: string;
445
+ entryMethod?: string;
446
+ transactionType: string;
447
+ totalamount: string;
448
+ paymentType?: string;
449
+ }
450
+ export interface TaxBreakdown {
451
+ taxLines: TaxLine[];
452
+ totalTaxableAmount: number;
453
+ }
454
+ export interface TotalTaxSummary {
455
+ VATCode: string;
456
+ VAT: number;
457
+ PreTaxSum: number;
458
+ TaxSum: number;
459
+ TXrateSum: number;
460
+ }
461
+ export interface TaxLine {
462
+ itemLineId: number;
463
+ taxableAmount: number;
464
+ taxLineTotal: number;
465
+ VAT: number;
466
+ VATCode: string;
467
+ PreTax: number;
468
+ }
469
+ export declare enum DISCOUNTTYPE {
470
+ PERCENT = "Percent",
471
+ AMOUNT = "AMOUNT"
472
+ }
473
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./mapper-library.component";
3
+ export declare class MapperLibraryModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapperLibraryModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MapperLibraryModule, [typeof i1.MapperLibraryComponent], never, [typeof i1.MapperLibraryComponent]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<MapperLibraryModule>;
7
+ }
@@ -0,0 +1,9 @@
1
+ import { TransactionDocument } from './mapper-library.model';
2
+ import * as i0 from "@angular/core";
3
+ export declare class MapperLibraryService {
4
+ constructor();
5
+ saleDoc(transactionDoc: TransactionDocument): string;
6
+ refundDoc(transactionDoc: TransactionDocument): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapperLibraryService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<MapperLibraryService>;
9
+ }
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class NumberUtilService {
3
+ private cp;
4
+ constructor(cp: any);
5
+ trimTo2Decimal(no: any): any;
6
+ trimTo2Decimal2(no: number): number;
7
+ getFlooredFixed(v: any, d: any): string;
8
+ AppendWithCurrencySymbol(numValue: any, currencyCode: string): string;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<NumberUtilService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<NumberUtilService>;
11
+ }
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@pmcretail/mapper-library",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^13.3.0",
6
+ "@angular/core": "^13.3.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "module": "fesm2015/pmcretail-mapper-library.mjs",
12
+ "es2020": "fesm2020/pmcretail-mapper-library.mjs",
13
+ "esm2020": "esm2020/pmcretail-mapper-library.mjs",
14
+ "fesm2020": "fesm2020/pmcretail-mapper-library.mjs",
15
+ "fesm2015": "fesm2015/pmcretail-mapper-library.mjs",
16
+ "typings": "pmcretail-mapper-library.d.ts",
17
+ "exports": {
18
+ "./package.json": {
19
+ "default": "./package.json"
20
+ },
21
+ ".": {
22
+ "types": "./pmcretail-mapper-library.d.ts",
23
+ "esm2020": "./esm2020/pmcretail-mapper-library.mjs",
24
+ "es2020": "./fesm2020/pmcretail-mapper-library.mjs",
25
+ "es2015": "./fesm2015/pmcretail-mapper-library.mjs",
26
+ "node": "./fesm2015/pmcretail-mapper-library.mjs",
27
+ "default": "./fesm2020/pmcretail-mapper-library.mjs"
28
+ }
29
+ },
30
+ "sideEffects": false
31
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@pmcretail/mapper-library" />
5
+ export * from './public-api';
@@ -0,0 +1,4 @@
1
+ export * from './lib/mapper-library.service';
2
+ export * from './lib/mapper-library.component';
3
+ export * from './lib/mapper-library.module';
4
+ export * from './lib/RJ-mapper.class';