@pmcretail/mapper-library 0.0.28 → 0.0.30

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,25 @@
1
+ import { DELIVERY_METHODS, OrderDetails, TransactionDocument } from "./mapper-library.model";
2
+ export declare class WebReturnSalesforceMapperBuilderClass {
3
+ private orderDetails;
4
+ private webReturnObject;
5
+ constructor(orderDetails: OrderDetails);
6
+ webReturnCommonMapper(): this;
7
+ getDeliveryMethod(): "" | DELIVERY_METHODS.DELIVERY | DELIVERY_METHODS.SHIP_TO_STORE;
8
+ product(): this;
9
+ linePromotion(): this;
10
+ transactionPromotion(): this;
11
+ customer(): this;
12
+ externalTransactionDetails(): this;
13
+ basketSummary(): this;
14
+ deviceId(deviceId: any): this;
15
+ terminalId(terminalId: any): this;
16
+ orgCode(orgCode: any): this;
17
+ storeId(storeId: any): this;
18
+ storeNodeId(storeNodeId: string): this;
19
+ storeNodeStructure(storeNodeStructure: string): this;
20
+ docId(docId: any): this;
21
+ updateUserID(userID: string): this;
22
+ updateUserName(name: any): this;
23
+ build(): TransactionDocument;
24
+ getUTCDateTime(date: any): string;
25
+ }
@@ -3,7 +3,8 @@ export declare enum TRANSACTION_TYPE {
3
3
  REFUND = "REFUND",
4
4
  SALE_REFUND = "SALE_REFUND",
5
5
  SALE_EXCHANGE = "SALE_EXCHANGE",
6
- VOID = "VOID"
6
+ VOID = "VOID",
7
+ WEB_RETURNS = "WEB_RETURNS"
7
8
  }
8
9
  export interface ItemDiscount {
9
10
  trnDiscountsPortion: number;
@@ -14,7 +15,8 @@ export interface ItemDiscount {
14
15
  export declare enum DELIVERY_METHODS {
15
16
  DELIVERY = 1,
16
17
  DROP_SHIP = 2,
17
- COLLECT_FROM_STORE = 3
18
+ COLLECT_FROM_STORE = 3,
19
+ SHIP_TO_STORE = 4
18
20
  }
19
21
  export interface ProductChange {
20
22
  itemLineId?: number;
@@ -282,7 +284,7 @@ export interface TransactionDocument {
282
284
  userName?: string;
283
285
  customer?: Customer;
284
286
  basket: any;
285
- basketSummary: any;
287
+ basketSummary: BasketSummary;
286
288
  baseCurrency: string;
287
289
  splitPayment?: boolean;
288
290
  isPaymentCompleted?: boolean;
@@ -304,6 +306,7 @@ export interface TransactionDocument {
304
306
  giftedReceipt?: boolean;
305
307
  currentTransactionDetails?: any;
306
308
  isChecked?: boolean;
309
+ externalTransactionDetails?: externalTransactionDetails[];
307
310
  }
308
311
  export interface APIResponse {
309
312
  internalId?: number;
@@ -320,12 +323,27 @@ export interface CurrentTransactionDetails {
320
323
  totalTaxSummary?: TotalTaxSummary[];
321
324
  }
322
325
  export interface BasketSummary {
323
- totalItems: number;
324
- saleTotal: number;
325
- VATTotal: number;
326
- discountTotal: number;
327
- basketTotal: number;
326
+ totalItems?: number;
327
+ saleTotal?: number;
328
+ VATTotal?: number;
329
+ discountTotal?: number;
330
+ basketTotal?: number;
331
+ refundTotal?: number;
332
+ shippingTotal?: number;
333
+ basketTotalWithShippingTotal?: number;
334
+ inStore?: BasketSummaryDetails;
335
+ webOrder?: BasketSummaryDetails;
336
+ cnc?: BasketSummaryDetails;
337
+ }
338
+ export interface BasketSummaryDetails {
339
+ totalItems?: number;
340
+ saleTotal?: number;
341
+ VATTotal?: number;
342
+ discountTotal?: number;
343
+ basketTotal?: number;
328
344
  refundTotal?: number;
345
+ shippingTotal?: number;
346
+ basketTotalWithShippingTotal?: number;
329
347
  }
330
348
  export interface TransactionDiscount {
331
349
  discountAmount: number;
@@ -409,13 +427,16 @@ export interface Customer {
409
427
  email: string;
410
428
  postCode: string;
411
429
  telephone?: string;
412
- billingAddress?: Address;
413
- shippingAddress?: Address;
430
+ billingAddress?: Address | Address[];
431
+ shippingAddress?: Address | Address[];
432
+ shipmentDetails?: ShipmentDetails[];
414
433
  addressDetail?: string;
415
434
  noCustomerSelected?: boolean;
416
435
  externalId?: string;
417
436
  }
418
437
  export interface Address {
438
+ id?: string;
439
+ countryCode?: string;
419
440
  address1?: string;
420
441
  address2?: string;
421
442
  address3?: string;
@@ -424,6 +445,10 @@ export interface Address {
424
445
  postCode?: string;
425
446
  country?: string;
426
447
  }
448
+ export interface ShipmentDetails {
449
+ id?: string;
450
+ deliveryGroup?: string;
451
+ }
427
452
  export interface PaymentDetails {
428
453
  cardNumber?: any;
429
454
  sqNo?: number;
@@ -471,4 +496,178 @@ export declare enum DISCOUNTTYPE {
471
496
  PERCENT = "Percent",
472
497
  AMOUNT = "AMOUNT"
473
498
  }
499
+ export interface TransactionInfo {
500
+ shippingId?: string;
501
+ externalShippingId?: string;
502
+ }
503
+ export interface externalTransactionDetails {
504
+ uniqueId?: string;
505
+ providerType?: string;
506
+ details?: TransactionInfo;
507
+ }
508
+ export declare enum INITIATING_MODULE {
509
+ EBASKET = "eBasket"
510
+ }
511
+ export interface pendingMethod {
512
+ _type?: string;
513
+ type?: string;
514
+ message?: string;
515
+ path?: string;
516
+ details?: ShipmentId;
517
+ }
518
+ export interface ShipmentId {
519
+ shipmentId?: string;
520
+ }
521
+ export interface CustomerAddress {
522
+ _type?: string;
523
+ email?: string;
524
+ address1?: string;
525
+ city?: string;
526
+ country_code?: string;
527
+ first_name?: string;
528
+ full_name?: string;
529
+ id?: string;
530
+ last_name?: string;
531
+ phone?: string;
532
+ salutation?: string;
533
+ c_area?: string;
534
+ c_email?: string;
535
+ c_phoneWhatsApp?: string;
536
+ c_strValue?: string;
537
+ postal_code?: string;
538
+ }
539
+ export interface CustomerInfo {
540
+ _type?: string;
541
+ customer_id?: string;
542
+ email?: string;
543
+ }
544
+ export interface GroupedTaxItem {
545
+ _type?: string;
546
+ tax_rate?: number;
547
+ tax_value?: number;
548
+ }
549
+ export interface additionalNotes {
550
+ _type?: string;
551
+ link?: string;
552
+ }
553
+ export interface ProductItem {
554
+ _type?: string;
555
+ adjusted_tax?: number;
556
+ base_price?: number;
557
+ bonus_product_line_item?: boolean;
558
+ gift?: boolean;
559
+ item_id?: string;
560
+ item_text?: string;
561
+ price?: number;
562
+ price_adjustments?: PriceAdjustment[];
563
+ price_after_item_discount?: number;
564
+ price_after_order_discount?: number;
565
+ product_id?: string;
566
+ product_name?: string;
567
+ quantity?: number;
568
+ shipment_id?: string;
569
+ tax?: number;
570
+ tax_basis?: number;
571
+ tax_class_id?: string;
572
+ tax_rate?: number;
573
+ }
574
+ export interface ShippingMethod {
575
+ _type?: string;
576
+ description?: string;
577
+ id?: string;
578
+ name?: string;
579
+ price?: number;
580
+ c_approachingThresholdMessage?: string;
581
+ c_estimatedArrivalTime?: string;
582
+ c_isEmail?: boolean;
583
+ c_storePickupEnabled?: boolean;
584
+ c_thresholdValue?: number;
585
+ }
586
+ export interface shipment {
587
+ _type?: string;
588
+ adjusted_merchandize_total_tax?: number;
589
+ adjusted_shipping_total_tax?: number;
590
+ gift?: boolean;
591
+ merchandize_total_tax?: number;
592
+ product_sub_total?: number;
593
+ product_total?: number;
594
+ shipment_id?: string;
595
+ shipment_total?: number;
596
+ shipping_address?: CustomerAddress;
597
+ shipping_method?: ShippingMethod;
598
+ shipping_status?: string;
599
+ shipping_total?: number;
600
+ shipping_total_tax?: number;
601
+ tax_total?: number;
602
+ c_fromStoreId?: string;
603
+ }
604
+ export interface ShippingItem {
605
+ _type?: string;
606
+ adjusted_tax?: number;
607
+ base_price?: number;
608
+ item_id?: string;
609
+ item_text?: string;
610
+ price?: number;
611
+ price_after_item_discount?: number;
612
+ shipment_id?: string;
613
+ tax?: number;
614
+ tax_basis?: number;
615
+ tax_class_id?: string;
616
+ tax_rate?: number;
617
+ }
618
+ export interface AppliedDiscount {
619
+ _type?: string;
620
+ amount?: number;
621
+ percentage?: number;
622
+ type?: string;
623
+ }
624
+ export interface PriceAdjustment {
625
+ _type?: string;
626
+ applied_discount?: AppliedDiscount;
627
+ coupon_code?: string;
628
+ creation_date?: string;
629
+ custom?: boolean;
630
+ item_text?: string;
631
+ last_modified?: string;
632
+ manual?: boolean;
633
+ price?: number;
634
+ price_adjustment_id?: string;
635
+ promotion_id?: string;
636
+ promotion_link?: string;
637
+ }
638
+ export interface OrderDetails {
639
+ _v?: string;
640
+ _type?: string;
641
+ _resource_state?: string;
642
+ _flash?: pendingMethod[];
643
+ adjusted_merchandize_total_tax?: number;
644
+ adjusted_shipping_total_tax?: number;
645
+ agent_basket?: boolean;
646
+ basket_id?: string;
647
+ billing_address?: CustomerAddress;
648
+ channel_type?: string;
649
+ creation_date?: string;
650
+ currency?: string;
651
+ customer_info?: CustomerInfo;
652
+ grouped_tax_items?: GroupedTaxItem[];
653
+ last_modified?: string;
654
+ merchandize_total_tax?: number;
655
+ notes?: additionalNotes;
656
+ order_price_adjustments?: PriceAdjustment[];
657
+ order_no?: string;
658
+ order_total?: number;
659
+ product_items?: ProductItem[];
660
+ product_sub_total?: number;
661
+ product_total?: number;
662
+ shipments?: shipment[];
663
+ shipping_items?: ShippingItem[];
664
+ shipping_total?: number;
665
+ shipping_total_tax?: number;
666
+ taxation?: string;
667
+ tax_rounded_at_group?: boolean;
668
+ tax_total?: number;
669
+ }
670
+ export declare enum PROVIDERS {
671
+ SALESFORCE = "Salesforce"
672
+ }
474
673
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmcretail/mapper-library",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^8.2.14",
6
6
  "@angular/core": "^8.2.14"
@@ -2,4 +2,4 @@
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
4
  export * from './public-api';
5
- export { TransactionDocument as ɵa } from './lib/mapper-library.model';
5
+ export { OrderDetails as ɵb, TransactionDocument as ɵa } from './lib/mapper-library.model';
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"MapperLibraryComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"lib-mapper-library","template":"\n <p>\n mapper-library works!\n </p>\n ","styles":[]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"MapperLibraryModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MapperLibraryComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"MapperLibraryComponent"}]}]}],"members":{}},"RJMapperBuilderClass":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"getPosbasketInfo":[{"__symbolic":"method"}],"getheaderInfo":[{"__symbolic":"method"}],"rjMapper":[{"__symbolic":"method"}],"getBasketDiscount":[{"__symbolic":"method"}],"getModifierItem":[{"__symbolic":"method"}],"getTrailerInfo":[{"__symbolic":"method"}],"getTenderInfo":[{"__symbolic":"method"}],"getNumber":[{"__symbolic":"method"}],"setLineNumberForProducts":[{"__symbolic":"method"}],"generateLineNumber":[{"__symbolic":"method"}],"initilizeItemCount":[{"__symbolic":"method"}],"build":[{"__symbolic":"method"}],"getDescription":[{"__symbolic":"method"}],"getMMGROUPID":[{"__symbolic":"method"}],"setDeviceInfo":[{"__symbolic":"method"}],"removeDecimal":[{"__symbolic":"method"}],"addDecimal":[{"__symbolic":"method"}],"setTransactionNumber":[{"__symbolic":"method"}],"setManifestVersion":[{"__symbolic":"method"}],"setDatabaseSchemaVersion":[{"__symbolic":"method"}],"setBasketType":[{"__symbolic":"method"}],"setTradingRegionID":[{"__symbolic":"method"}],"setCompanyID":[{"__symbolic":"method"}],"setTaxMethodID":[{"__symbolic":"method"}],"setMajorVersion":[{"__symbolic":"method"}],"setMinorVersion":[{"__symbolic":"method"}],"setXMLSchemaVersion":[{"__symbolic":"method"}],"setExternalState":[{"__symbolic":"method"}],"setCashierID":[{"__symbolic":"method"}],"setTerminalNumber":[{"__symbolic":"method"}],"setBasketLanguageID":[{"__symbolic":"method"}],"setBasketCountryID":[{"__symbolic":"method"}],"setBasketCurrencyID":[{"__symbolic":"method"}],"setBranchID":[{"__symbolic":"method"}],"setSalesPersonName":[{"__symbolic":"method"}],"generateId":[{"__symbolic":"method"}],"generateTimezoneoffset":[{"__symbolic":"method"}],"generateKeyword":[{"__symbolic":"method"}],"getState":[{"__symbolic":"method"}],"returnProduct":[{"__symbolic":"method"}],"addProduct":[{"__symbolic":"method"}],"getSaving":[{"__symbolic":"method"}],"getLineNumber":[{"__symbolic":"method"}],"getDiscountedValue":[{"__symbolic":"method"}],"getOriginalTax":[{"__symbolic":"method"}],"convertToString":[{"__symbolic":"method"}],"generateDynamicStockLookUp":[{"__symbolic":"method"}],"getDate":[{"__symbolic":"method"}],"getTransactionPromotion":[{"__symbolic":"method"}],"getQuantity":[{"__symbolic":"method"}]}},"WebReturnMapperBuilderClass":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[null]}],"WebReturnMapper":[{"__symbolic":"method"}],"deviceId":[{"__symbolic":"method"}],"terminalId":[{"__symbolic":"method"}],"orgCode":[{"__symbolic":"method"}],"storeId":[{"__symbolic":"method"}],"storeNodeId":[{"__symbolic":"method"}],"storeNodeStructure":[{"__symbolic":"method"}],"docId":[{"__symbolic":"method"}],"updateUserID":[{"__symbolic":"method"}],"updateUserName":[{"__symbolic":"method"}],"build":[{"__symbolic":"method"}],"getText":[{"__symbolic":"method"}],"getUTCDateTime":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"interface"}},"origins":{"MapperLibraryComponent":"./lib/mapper-library.component","MapperLibraryModule":"./lib/mapper-library.module","RJMapperBuilderClass":"./lib/RJ-mapper.class","WebReturnMapperBuilderClass":"./lib/WebReturn-mapper.class","ɵa":"./lib/mapper-library.model"},"importAs":"@pmcretail/mapper-library"}
1
+ {"__symbolic":"module","version":4,"metadata":{"MapperLibraryComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"lib-mapper-library","template":"\n <p>\n mapper-library works!\n </p>\n ","styles":[]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"MapperLibraryModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MapperLibraryComponent"}],"imports":[],"exports":[{"__symbolic":"reference","name":"MapperLibraryComponent"}]}]}],"members":{}},"RJMapperBuilderClass":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"}]}],"getPosbasketInfo":[{"__symbolic":"method"}],"getheaderInfo":[{"__symbolic":"method"}],"rjMapper":[{"__symbolic":"method"}],"getBasketDiscount":[{"__symbolic":"method"}],"getModifierItem":[{"__symbolic":"method"}],"getTrailerInfo":[{"__symbolic":"method"}],"getTenderInfo":[{"__symbolic":"method"}],"getNumber":[{"__symbolic":"method"}],"setLineNumberForProducts":[{"__symbolic":"method"}],"generateLineNumber":[{"__symbolic":"method"}],"initilizeItemCount":[{"__symbolic":"method"}],"build":[{"__symbolic":"method"}],"getDescription":[{"__symbolic":"method"}],"getMMGROUPID":[{"__symbolic":"method"}],"setDeviceInfo":[{"__symbolic":"method"}],"removeDecimal":[{"__symbolic":"method"}],"addDecimal":[{"__symbolic":"method"}],"setTransactionNumber":[{"__symbolic":"method"}],"setManifestVersion":[{"__symbolic":"method"}],"setDatabaseSchemaVersion":[{"__symbolic":"method"}],"setBasketType":[{"__symbolic":"method"}],"setTradingRegionID":[{"__symbolic":"method"}],"setCompanyID":[{"__symbolic":"method"}],"setTaxMethodID":[{"__symbolic":"method"}],"setMajorVersion":[{"__symbolic":"method"}],"setMinorVersion":[{"__symbolic":"method"}],"setXMLSchemaVersion":[{"__symbolic":"method"}],"setExternalState":[{"__symbolic":"method"}],"setCashierID":[{"__symbolic":"method"}],"setTerminalNumber":[{"__symbolic":"method"}],"setBasketLanguageID":[{"__symbolic":"method"}],"setBasketCountryID":[{"__symbolic":"method"}],"setBasketCurrencyID":[{"__symbolic":"method"}],"setBranchID":[{"__symbolic":"method"}],"setSalesPersonName":[{"__symbolic":"method"}],"generateId":[{"__symbolic":"method"}],"generateTimezoneoffset":[{"__symbolic":"method"}],"generateKeyword":[{"__symbolic":"method"}],"getState":[{"__symbolic":"method"}],"returnProduct":[{"__symbolic":"method"}],"addProduct":[{"__symbolic":"method"}],"getSaving":[{"__symbolic":"method"}],"getLineNumber":[{"__symbolic":"method"}],"getDiscountedValue":[{"__symbolic":"method"}],"getOriginalTax":[{"__symbolic":"method"}],"convertToString":[{"__symbolic":"method"}],"generateDynamicStockLookUp":[{"__symbolic":"method"}],"getDate":[{"__symbolic":"method"}],"getTransactionPromotion":[{"__symbolic":"method"}],"getQuantity":[{"__symbolic":"method"}]}},"WebReturnMapperBuilderClass":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[null]}],"WebReturnMapper":[{"__symbolic":"method"}],"deviceId":[{"__symbolic":"method"}],"terminalId":[{"__symbolic":"method"}],"orgCode":[{"__symbolic":"method"}],"storeId":[{"__symbolic":"method"}],"storeNodeId":[{"__symbolic":"method"}],"storeNodeStructure":[{"__symbolic":"method"}],"docId":[{"__symbolic":"method"}],"updateUserID":[{"__symbolic":"method"}],"updateUserName":[{"__symbolic":"method"}],"build":[{"__symbolic":"method"}],"getText":[{"__symbolic":"method"}],"getUTCDateTime":[{"__symbolic":"method"}]}},"WebReturnSalesforceMapperBuilderClass":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵb"}]}],"webReturnCommonMapper":[{"__symbolic":"method"}],"getDeliveryMethod":[{"__symbolic":"method"}],"product":[{"__symbolic":"method"}],"linePromotion":[{"__symbolic":"method"}],"transactionPromotion":[{"__symbolic":"method"}],"customer":[{"__symbolic":"method"}],"externalTransactionDetails":[{"__symbolic":"method"}],"basketSummary":[{"__symbolic":"method"}],"deviceId":[{"__symbolic":"method"}],"terminalId":[{"__symbolic":"method"}],"orgCode":[{"__symbolic":"method"}],"storeId":[{"__symbolic":"method"}],"storeNodeId":[{"__symbolic":"method"}],"storeNodeStructure":[{"__symbolic":"method"}],"docId":[{"__symbolic":"method"}],"updateUserID":[{"__symbolic":"method"}],"updateUserName":[{"__symbolic":"method"}],"build":[{"__symbolic":"method"}],"getUTCDateTime":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"interface"},"ɵb":{"__symbolic":"interface"}},"origins":{"MapperLibraryComponent":"./lib/mapper-library.component","MapperLibraryModule":"./lib/mapper-library.module","RJMapperBuilderClass":"./lib/RJ-mapper.class","WebReturnMapperBuilderClass":"./lib/WebReturn-mapper.class","WebReturnSalesforceMapperBuilderClass":"./lib/WebReturnSalesforceMapper.class","ɵa":"./lib/mapper-library.model","ɵb":"./lib/mapper-library.model"},"importAs":"@pmcretail/mapper-library"}
package/public-api.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './lib/mapper-library.component';
2
2
  export * from './lib/mapper-library.module';
3
3
  export * from './lib/RJ-mapper.class';
4
4
  export * from './lib/WebReturn-mapper.class';
5
+ export * from './lib/WebReturnSalesforceMapper.class';