@vini-wine/admin-core-models 1.1.52 → 1.1.54

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.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import { CurrencyCodeEnum, UploadVisibilityTypeEnum, CountryEnum, ContactPointTypeEnum, SupplierStatusEnum, OrganisationStatusEnum, ImageVariationEnum, ImageTypeEnum, IntegrationExactCountryCodeEnum, IntegrationExactStatusEnum, RoleEnum, PermissionEnum, PlanEnum, TimezoneEnum, UserOrganisationStatusEnum, GenderEnum, LocaleEnum, UserStatusEnum, DateTimeFormatEnum, B2bMarketPriceUploadStatusEnum, ContactRequestStatusEnum, ContactRequestTypeEnum, CurrencyRateSourceEnum, CustomerStatusEnum, OfferAlertFilterCriteriaFieldEnum, FilterOperatorEnum, UploadStatusEnum, UploadTypeEnum, InboundEmailParsedStatusEnum, MimeTypeEnum, VintageRatingEnum, VintageScoreAuthorEnum, PackageEnum, OfferRequestStatusEnum, OfferRequestOptionEnum, OfferRequestOptionStatusEnum, OfferRequestTimelineActionEnum, OrderStatusEnum, OrderItemTypeEnum, NotificationTypeEnum, NotificationChannelEnum, OfferAlertTimelineActionEnum, OrganisationUserInvitationStatusEnum, PlanFeatureEnum, UserOrganisationClaimStatusEnum, VintageScoreUploadStatusEnum } from '@vini-wine/core-enums';
2
- export { DocumentTypeEnum } from '@vini-wine/core-enums';
3
- import { PriceDto, B2bMarketPriceDto, VatTaxDto, SupplierDto, OrganisationDto, CountryDto, UploadDto, RegionDto, WineTypeDto, WineryDto, WineDto, VintageDto, VintageProductDto, SellerDto, OfferDto } from '@vini-wine/core-dtos';
1
+ import { CurrencyCodeEnum, UploadVisibilityTypeEnum, CountryEnum, ContactPointTypeEnum, SupplierStatusEnum, OrganisationStatusEnum, ImageVariationEnum, ImageTypeEnum, IntegrationExactCountryCodeEnum, IntegrationExactStatusEnum, RoleEnum, PermissionEnum, PlanEnum, TimezoneEnum, UserOrganisationStatusEnum, GenderEnum, LocaleEnum, UserStatusEnum, DateTimeFormatEnum, B2bMarketPriceUploadStatusEnum, ContactRequestStatusEnum, ContactRequestTypeEnum, CurrencyRateSourceEnum, CustomerStatusEnum, VintageRatingEnum, VintageScoreAuthorEnum, UploadStatusEnum, UploadTypeEnum, PackageEnum, OfferRequestStatusEnum, OfferRequestOptionEnum, OfferRequestOptionStatusEnum, OfferRequestTimelineActionEnum, OrderItemTypeEnum, OrderStatusEnum, DocumentTypeEnum, MimeTypeEnum, OfferAlertFilterCriteriaFieldEnum, FilterOperatorEnum, InboundEmailParsedStatusEnum, NotificationTypeEnum, NotificationChannelEnum, OfferAlertTimelineActionEnum, OrganisationUserInvitationStatusEnum, PlanFeatureEnum, UserOrganisationClaimStatusEnum, VintageScoreUploadStatusEnum } from '@vini-wine/core-enums';
2
+ import { PriceDto, B2bMarketPriceDto, VatTaxDto, SupplierDto, OrganisationDto, CountryDto, SellerDto, RegionDto, WineTypeDto, WineryDto, WineDto, VintageDto, VintageProductDto, UploadDto, OfferDto } from '@vini-wine/core-dtos';
4
3
 
5
4
  interface PriceModel {
6
5
  priceMicros: number;
@@ -279,86 +278,10 @@ interface CustomerModel extends UUID {
279
278
  primarySalesContactPoint?: ContactPointModel | null;
280
279
  }
281
280
 
282
- interface FilterCriteriaModel {
283
- field: OfferAlertFilterCriteriaFieldEnum;
284
- operator: FilterOperatorEnum;
285
- value: string | number | null;
286
- }
287
-
288
- interface UploadVisibilityTypeModel {
289
- upload?: UploadModel;
290
- id: UploadVisibilityTypeEnum;
291
- }
292
-
293
- interface UploadModel extends UUID {
294
- status: {
295
- id: UploadStatusEnum;
296
- statusUpdatedAt: Date;
297
- };
298
- type: {
299
- id: UploadTypeEnum;
300
- };
301
- name: string;
302
- validFrom: Date;
303
- validUntil: Date;
304
- numItems: number;
305
- createdAt: Date;
306
- organisation: OrganisationModel;
307
- organisationSupplier: SupplierModel;
308
- createdUser?: UserAccountModel;
309
- visibilityTypes?: UploadVisibilityTypeModel[];
310
- importFileHeaders?: ImportFileHeaderModel[];
311
- statusUpdatedBy?: UserAccountModel | null;
312
- }
313
- declare const createUploadDtoFromAdminUploadModel: (upload: UploadModel) => UploadDto;
314
-
315
- interface ImportFileHeaderModel {
316
- upload?: UploadModel;
317
- mappedHeader: string;
318
- value: string;
319
- }
320
-
321
- interface ImportResolvedFileHeaderValueModel {
322
- field: string;
323
- fieldValue: string;
324
- resolvedValue: string;
325
- }
326
-
327
- interface InboundEmailParsedModel extends UUID {
328
- status: {
329
- id: InboundEmailParsedStatusEnum;
330
- };
331
- uploadType: {
332
- id: UploadTypeEnum | null;
333
- };
334
- fromEmailAddress: string | null;
335
- toEmailAddress: string | null;
336
- subject: string | null;
337
- attachmentCount: number;
338
- createdAt: Date;
281
+ interface SellerModel {
339
282
  organisation?: OrganisationModel;
340
- inboundEmail?: InboundEmailModel;
341
- contentText?: string | null;
342
- contentHtml?: string | null;
343
- }
344
-
345
- interface InboundEmailFileModel extends UUID {
346
- name: string;
347
- mime: {
348
- id: MimeTypeEnum;
349
- };
350
- size: number;
351
- createdAt: Date;
352
- inboundEmail?: InboundEmailModel;
353
- }
354
-
355
- interface InboundEmailModel {
356
- id: number;
357
- messageId: string;
358
- createdAt: Date;
359
- inboundEmailParsed?: InboundEmailParsedModel | null;
360
- files?: InboundEmailFileModel[];
361
283
  }
284
+ declare const createSellerDtoFromAdminSellerModel: (seller: SellerModel) => SellerDto;
362
285
 
363
286
  interface RegionModel extends UUID {
364
287
  country: CountryModel;
@@ -427,16 +350,38 @@ interface VintageProductModel extends UUID {
427
350
  }
428
351
  declare const createVintageProductDtoFromAdminVintageProductModel: (vintageProduct: VintageProductModel) => VintageProductDto;
429
352
 
430
- interface IntegrationExactItemModel extends UUID {
431
- integrationExact?: IntegrationExactModel;
432
- vintageProduct?: VintageProductModel;
433
- vintageProducts?: VintageProductModel[];
353
+ interface UploadVisibilityTypeModel {
354
+ upload?: UploadModel;
355
+ id: UploadVisibilityTypeEnum;
434
356
  }
435
357
 
436
- interface SellerModel {
437
- organisation?: OrganisationModel;
358
+ interface ImportFileHeaderModel {
359
+ upload?: UploadModel;
360
+ mappedHeader: string;
361
+ value: string;
438
362
  }
439
- declare const createSellerDtoFromAdminSellerModel: (seller: SellerModel) => SellerDto;
363
+
364
+ interface UploadModel extends UUID {
365
+ status: {
366
+ id: UploadStatusEnum;
367
+ statusUpdatedAt: Date;
368
+ };
369
+ type: {
370
+ id: UploadTypeEnum;
371
+ };
372
+ name: string;
373
+ validFrom: Date;
374
+ validUntil: Date;
375
+ numItems: number;
376
+ createdAt: Date;
377
+ organisation: OrganisationModel;
378
+ organisationSupplier: SupplierModel;
379
+ createdUser?: UserAccountModel;
380
+ visibilityTypes?: UploadVisibilityTypeModel[];
381
+ importFileHeaders?: ImportFileHeaderModel[];
382
+ statusUpdatedBy?: UserAccountModel | null;
383
+ }
384
+ declare const createUploadDtoFromAdminUploadModel: (upload: UploadModel) => UploadDto;
440
385
 
441
386
  interface OfferModel extends UUID {
442
387
  price: PriceModel | null;
@@ -494,6 +439,31 @@ interface OfferRequestModel extends UUID {
494
439
  options?: OfferRequestOptionModel[];
495
440
  }
496
441
 
442
+ interface OrderItemPurchaseModel {
443
+ supplier?: SupplierModel | null;
444
+ price?: PriceModel | null;
445
+ }
446
+
447
+ interface OrderItemModel extends UUID {
448
+ type: {
449
+ id: OrderItemTypeEnum;
450
+ };
451
+ description: string;
452
+ quantity: number;
453
+ createdAt: Date;
454
+ updatedAt: Date;
455
+ invoiceReceived: boolean;
456
+ goodsShipped: boolean;
457
+ invoiceSent: boolean;
458
+ invoiceReceivedAt: Date | null;
459
+ goodsShippedAt: Date | null;
460
+ invoiceSentAt: Date | null;
461
+ amountFC: PriceModel;
462
+ order?: OrderModel;
463
+ vintageProducts?: VintageProductModel[];
464
+ purchase?: OrderItemPurchaseModel;
465
+ }
466
+
497
467
  interface OrderModel extends UUID {
498
468
  currency: CurrencyCodeEnum;
499
469
  status: {
@@ -511,31 +481,75 @@ interface OrderModel extends UUID {
511
481
  amountFCExclVatMicros?: number;
512
482
  purchaseOrders?: OrderModel[];
513
483
  salesOrders?: OrderModel[];
484
+ proFormaDocument?: DocumentModel | null;
485
+ invoiceDocument?: DocumentModel | null;
514
486
  }
515
487
 
516
- interface OrderItemPurchaseModel {
517
- supplier?: SupplierModel | null;
518
- price?: PriceModel | null;
488
+ interface DocumentModel extends UUID {
489
+ type: {
490
+ id: DocumentTypeEnum;
491
+ };
492
+ mime: {
493
+ id: MimeTypeEnum;
494
+ };
495
+ size: number;
496
+ createdAt: Date;
497
+ organisation?: OrganisationModel | null;
498
+ order?: OrderModel | null;
519
499
  }
520
500
 
521
- interface OrderItemModel extends UUID {
522
- type: {
523
- id: OrderItemTypeEnum;
501
+ interface FilterCriteriaModel {
502
+ field: OfferAlertFilterCriteriaFieldEnum;
503
+ operator: FilterOperatorEnum;
504
+ value: string | number | null;
505
+ }
506
+
507
+ interface ImportResolvedFileHeaderValueModel {
508
+ field: string;
509
+ fieldValue: string;
510
+ resolvedValue: string;
511
+ }
512
+
513
+ interface InboundEmailParsedModel extends UUID {
514
+ status: {
515
+ id: InboundEmailParsedStatusEnum;
524
516
  };
525
- description: string;
526
- quantity: number;
517
+ uploadType: {
518
+ id: UploadTypeEnum | null;
519
+ };
520
+ fromEmailAddress: string | null;
521
+ toEmailAddress: string | null;
522
+ subject: string | null;
523
+ attachmentCount: number;
527
524
  createdAt: Date;
528
- updatedAt: Date;
529
- invoiceReceived: boolean;
530
- goodsShipped: boolean;
531
- invoiceSent: boolean;
532
- invoiceReceivedAt: Date | null;
533
- goodsShippedAt: Date | null;
534
- invoiceSentAt: Date | null;
535
- amountFC: PriceModel;
536
- order?: OrderModel;
525
+ organisation?: OrganisationModel;
526
+ inboundEmail?: InboundEmailModel;
527
+ contentText?: string | null;
528
+ contentHtml?: string | null;
529
+ }
530
+
531
+ interface InboundEmailFileModel extends UUID {
532
+ name: string;
533
+ mime: {
534
+ id: MimeTypeEnum;
535
+ };
536
+ size: number;
537
+ createdAt: Date;
538
+ inboundEmail?: InboundEmailModel;
539
+ }
540
+
541
+ interface InboundEmailModel {
542
+ id: number;
543
+ messageId: string;
544
+ createdAt: Date;
545
+ inboundEmailParsed?: InboundEmailParsedModel | null;
546
+ files?: InboundEmailFileModel[];
547
+ }
548
+
549
+ interface IntegrationExactItemModel extends UUID {
550
+ integrationExact?: IntegrationExactModel;
551
+ vintageProduct?: VintageProductModel;
537
552
  vintageProducts?: VintageProductModel[];
538
- purchase?: OrderItemPurchaseModel;
539
553
  }
540
554
 
541
555
  interface IntegrationExactSalesOrderLineModel extends UUID {
@@ -689,4 +703,4 @@ interface VintageScoreUploadModel extends UUID {
689
703
  uploadedBy: UserAccountModel;
690
704
  }
691
705
 
692
- export { type B2bMarketPriceModel, type B2bMarketPriceUploadModel, type ContactPointModel, type ContactRequestModel, type ContactTypeModel, type CountryModel, type CurrencyRateModel, type CustomerModel, type FilterCriteriaModel, type GenderModel, type ImageImageTypeCropPropertyModel, type ImageModel, type ImageTypeModel, type ImageVariationModel, type ImportFileHeaderModel, type ImportResolvedFileHeaderValueModel, type InboundEmailFileModel, type InboundEmailModel, type InboundEmailParsedModel, type IntegrationExactItemModel, type IntegrationExactModel, type IntegrationExactSalesOrderLineModel, type IntegrationExactSalesOrderModel, type IntegrationExactWebhookLogModel, type MarginMarketModel, type MarginOrganisationModel, type NotificationChannelModel, type NotificationModel, type NotificationTypeModel, type OfferAlertModel, type OfferAlertTimelineModel, type OfferModel, type OfferRequestModel, type OfferRequestOptionModel, type OfferRequestStatusModel, type OfferRequestTimelineModel, type OrderItemModel, type OrderItemPurchaseModel, type OrderModel, type OrganisationModel, type OrganisationUserInvitationModel, type OrganisationUserInvitationStatusModel, type PermissionModel, type PersonModel, type PlanAlertModel, type PlanDataRetentionModel, type PlanModel, type PlanUploadModel, type PlanUploadServiceModel, type PlanUserOrganisationModel, type PostalAddressModel, type PriceModel, type PricingPlanFeatureModel, type PricingPlanModel, type RegionModel, type RoleModel, type SellerModel, type SupplierModel, type TelephoneModel, type UploadModel, type UploadVisibilityTypeModel, type UserAccountModel, type UserOrganisationClaimRequestModel, type UserOrganisationModel, type UserOrganisationStatusModel, type UserStatusModel, type VatTaxModel, type VintageModel, type VintageProductModel, type VintageRatingModel, type VintageScoreAuthorModel, type VintageScoreModel, type VintageScoreUploadModel, type WineModel, type WineTypeModel, type WineryModel, createB2BMarketPriceDtoFromAdminB2BMarketPriceModel, createCountryDtoFromAdminCountryModel, createOfferDtoFromAdminOfferModel, createOrganisationDtoFromAdminOrganisationModel, createPriceDtoFromAdminPriceModel, createRegionDtoFromAdminRegionModel, createSellerDtoFromAdminSellerModel, createSupplierDtoFromAdminSupplierModel, createUploadDtoFromAdminUploadModel, createVatTaxDtoFromAdminVatTaxModel, createVintageDtoFromAdminVintageModel, createVintageProductDtoFromAdminVintageProductModel, createWineDtoFromAdminWineModel, createWineTypeDtoFromAdminWineTypeModel, createWineryDtoFromAdminWineryModel };
706
+ export { type B2bMarketPriceModel, type B2bMarketPriceUploadModel, type ContactPointModel, type ContactRequestModel, type ContactTypeModel, type CountryModel, type CurrencyRateModel, type CustomerModel, type DocumentModel, type FilterCriteriaModel, type GenderModel, type ImageImageTypeCropPropertyModel, type ImageModel, type ImageTypeModel, type ImageVariationModel, type ImportFileHeaderModel, type ImportResolvedFileHeaderValueModel, type InboundEmailFileModel, type InboundEmailModel, type InboundEmailParsedModel, type IntegrationExactItemModel, type IntegrationExactModel, type IntegrationExactSalesOrderLineModel, type IntegrationExactSalesOrderModel, type IntegrationExactWebhookLogModel, type MarginMarketModel, type MarginOrganisationModel, type NotificationChannelModel, type NotificationModel, type NotificationTypeModel, type OfferAlertModel, type OfferAlertTimelineModel, type OfferModel, type OfferRequestModel, type OfferRequestOptionModel, type OfferRequestStatusModel, type OfferRequestTimelineModel, type OrderItemModel, type OrderItemPurchaseModel, type OrderModel, type OrganisationModel, type OrganisationUserInvitationModel, type OrganisationUserInvitationStatusModel, type PermissionModel, type PersonModel, type PlanAlertModel, type PlanDataRetentionModel, type PlanModel, type PlanUploadModel, type PlanUploadServiceModel, type PlanUserOrganisationModel, type PostalAddressModel, type PriceModel, type PricingPlanFeatureModel, type PricingPlanModel, type RegionModel, type RoleModel, type SellerModel, type SupplierModel, type TelephoneModel, type UploadModel, type UploadVisibilityTypeModel, type UserAccountModel, type UserOrganisationClaimRequestModel, type UserOrganisationModel, type UserOrganisationStatusModel, type UserStatusModel, type VatTaxModel, type VintageModel, type VintageProductModel, type VintageRatingModel, type VintageScoreAuthorModel, type VintageScoreModel, type VintageScoreUploadModel, type WineModel, type WineTypeModel, type WineryModel, createB2BMarketPriceDtoFromAdminB2BMarketPriceModel, createCountryDtoFromAdminCountryModel, createOfferDtoFromAdminOfferModel, createOrganisationDtoFromAdminOrganisationModel, createPriceDtoFromAdminPriceModel, createRegionDtoFromAdminRegionModel, createSellerDtoFromAdminSellerModel, createSupplierDtoFromAdminSupplierModel, createUploadDtoFromAdminUploadModel, createVatTaxDtoFromAdminVatTaxModel, createVintageDtoFromAdminVintageModel, createVintageProductDtoFromAdminVintageProductModel, createWineDtoFromAdminWineModel, createWineTypeDtoFromAdminWineTypeModel, createWineryDtoFromAdminWineryModel };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { CurrencyCodeEnum, UploadVisibilityTypeEnum, CountryEnum, ContactPointTypeEnum, SupplierStatusEnum, OrganisationStatusEnum, ImageVariationEnum, ImageTypeEnum, IntegrationExactCountryCodeEnum, IntegrationExactStatusEnum, RoleEnum, PermissionEnum, PlanEnum, TimezoneEnum, UserOrganisationStatusEnum, GenderEnum, LocaleEnum, UserStatusEnum, DateTimeFormatEnum, B2bMarketPriceUploadStatusEnum, ContactRequestStatusEnum, ContactRequestTypeEnum, CurrencyRateSourceEnum, CustomerStatusEnum, OfferAlertFilterCriteriaFieldEnum, FilterOperatorEnum, UploadStatusEnum, UploadTypeEnum, InboundEmailParsedStatusEnum, MimeTypeEnum, VintageRatingEnum, VintageScoreAuthorEnum, PackageEnum, OfferRequestStatusEnum, OfferRequestOptionEnum, OfferRequestOptionStatusEnum, OfferRequestTimelineActionEnum, OrderStatusEnum, OrderItemTypeEnum, NotificationTypeEnum, NotificationChannelEnum, OfferAlertTimelineActionEnum, OrganisationUserInvitationStatusEnum, PlanFeatureEnum, UserOrganisationClaimStatusEnum, VintageScoreUploadStatusEnum } from '@vini-wine/core-enums';
2
- export { DocumentTypeEnum } from '@vini-wine/core-enums';
3
- import { PriceDto, B2bMarketPriceDto, VatTaxDto, SupplierDto, OrganisationDto, CountryDto, UploadDto, RegionDto, WineTypeDto, WineryDto, WineDto, VintageDto, VintageProductDto, SellerDto, OfferDto } from '@vini-wine/core-dtos';
1
+ import { CurrencyCodeEnum, UploadVisibilityTypeEnum, CountryEnum, ContactPointTypeEnum, SupplierStatusEnum, OrganisationStatusEnum, ImageVariationEnum, ImageTypeEnum, IntegrationExactCountryCodeEnum, IntegrationExactStatusEnum, RoleEnum, PermissionEnum, PlanEnum, TimezoneEnum, UserOrganisationStatusEnum, GenderEnum, LocaleEnum, UserStatusEnum, DateTimeFormatEnum, B2bMarketPriceUploadStatusEnum, ContactRequestStatusEnum, ContactRequestTypeEnum, CurrencyRateSourceEnum, CustomerStatusEnum, VintageRatingEnum, VintageScoreAuthorEnum, UploadStatusEnum, UploadTypeEnum, PackageEnum, OfferRequestStatusEnum, OfferRequestOptionEnum, OfferRequestOptionStatusEnum, OfferRequestTimelineActionEnum, OrderItemTypeEnum, OrderStatusEnum, DocumentTypeEnum, MimeTypeEnum, OfferAlertFilterCriteriaFieldEnum, FilterOperatorEnum, InboundEmailParsedStatusEnum, NotificationTypeEnum, NotificationChannelEnum, OfferAlertTimelineActionEnum, OrganisationUserInvitationStatusEnum, PlanFeatureEnum, UserOrganisationClaimStatusEnum, VintageScoreUploadStatusEnum } from '@vini-wine/core-enums';
2
+ import { PriceDto, B2bMarketPriceDto, VatTaxDto, SupplierDto, OrganisationDto, CountryDto, SellerDto, RegionDto, WineTypeDto, WineryDto, WineDto, VintageDto, VintageProductDto, UploadDto, OfferDto } from '@vini-wine/core-dtos';
4
3
 
5
4
  interface PriceModel {
6
5
  priceMicros: number;
@@ -279,86 +278,10 @@ interface CustomerModel extends UUID {
279
278
  primarySalesContactPoint?: ContactPointModel | null;
280
279
  }
281
280
 
282
- interface FilterCriteriaModel {
283
- field: OfferAlertFilterCriteriaFieldEnum;
284
- operator: FilterOperatorEnum;
285
- value: string | number | null;
286
- }
287
-
288
- interface UploadVisibilityTypeModel {
289
- upload?: UploadModel;
290
- id: UploadVisibilityTypeEnum;
291
- }
292
-
293
- interface UploadModel extends UUID {
294
- status: {
295
- id: UploadStatusEnum;
296
- statusUpdatedAt: Date;
297
- };
298
- type: {
299
- id: UploadTypeEnum;
300
- };
301
- name: string;
302
- validFrom: Date;
303
- validUntil: Date;
304
- numItems: number;
305
- createdAt: Date;
306
- organisation: OrganisationModel;
307
- organisationSupplier: SupplierModel;
308
- createdUser?: UserAccountModel;
309
- visibilityTypes?: UploadVisibilityTypeModel[];
310
- importFileHeaders?: ImportFileHeaderModel[];
311
- statusUpdatedBy?: UserAccountModel | null;
312
- }
313
- declare const createUploadDtoFromAdminUploadModel: (upload: UploadModel) => UploadDto;
314
-
315
- interface ImportFileHeaderModel {
316
- upload?: UploadModel;
317
- mappedHeader: string;
318
- value: string;
319
- }
320
-
321
- interface ImportResolvedFileHeaderValueModel {
322
- field: string;
323
- fieldValue: string;
324
- resolvedValue: string;
325
- }
326
-
327
- interface InboundEmailParsedModel extends UUID {
328
- status: {
329
- id: InboundEmailParsedStatusEnum;
330
- };
331
- uploadType: {
332
- id: UploadTypeEnum | null;
333
- };
334
- fromEmailAddress: string | null;
335
- toEmailAddress: string | null;
336
- subject: string | null;
337
- attachmentCount: number;
338
- createdAt: Date;
281
+ interface SellerModel {
339
282
  organisation?: OrganisationModel;
340
- inboundEmail?: InboundEmailModel;
341
- contentText?: string | null;
342
- contentHtml?: string | null;
343
- }
344
-
345
- interface InboundEmailFileModel extends UUID {
346
- name: string;
347
- mime: {
348
- id: MimeTypeEnum;
349
- };
350
- size: number;
351
- createdAt: Date;
352
- inboundEmail?: InboundEmailModel;
353
- }
354
-
355
- interface InboundEmailModel {
356
- id: number;
357
- messageId: string;
358
- createdAt: Date;
359
- inboundEmailParsed?: InboundEmailParsedModel | null;
360
- files?: InboundEmailFileModel[];
361
283
  }
284
+ declare const createSellerDtoFromAdminSellerModel: (seller: SellerModel) => SellerDto;
362
285
 
363
286
  interface RegionModel extends UUID {
364
287
  country: CountryModel;
@@ -427,16 +350,38 @@ interface VintageProductModel extends UUID {
427
350
  }
428
351
  declare const createVintageProductDtoFromAdminVintageProductModel: (vintageProduct: VintageProductModel) => VintageProductDto;
429
352
 
430
- interface IntegrationExactItemModel extends UUID {
431
- integrationExact?: IntegrationExactModel;
432
- vintageProduct?: VintageProductModel;
433
- vintageProducts?: VintageProductModel[];
353
+ interface UploadVisibilityTypeModel {
354
+ upload?: UploadModel;
355
+ id: UploadVisibilityTypeEnum;
434
356
  }
435
357
 
436
- interface SellerModel {
437
- organisation?: OrganisationModel;
358
+ interface ImportFileHeaderModel {
359
+ upload?: UploadModel;
360
+ mappedHeader: string;
361
+ value: string;
438
362
  }
439
- declare const createSellerDtoFromAdminSellerModel: (seller: SellerModel) => SellerDto;
363
+
364
+ interface UploadModel extends UUID {
365
+ status: {
366
+ id: UploadStatusEnum;
367
+ statusUpdatedAt: Date;
368
+ };
369
+ type: {
370
+ id: UploadTypeEnum;
371
+ };
372
+ name: string;
373
+ validFrom: Date;
374
+ validUntil: Date;
375
+ numItems: number;
376
+ createdAt: Date;
377
+ organisation: OrganisationModel;
378
+ organisationSupplier: SupplierModel;
379
+ createdUser?: UserAccountModel;
380
+ visibilityTypes?: UploadVisibilityTypeModel[];
381
+ importFileHeaders?: ImportFileHeaderModel[];
382
+ statusUpdatedBy?: UserAccountModel | null;
383
+ }
384
+ declare const createUploadDtoFromAdminUploadModel: (upload: UploadModel) => UploadDto;
440
385
 
441
386
  interface OfferModel extends UUID {
442
387
  price: PriceModel | null;
@@ -494,6 +439,31 @@ interface OfferRequestModel extends UUID {
494
439
  options?: OfferRequestOptionModel[];
495
440
  }
496
441
 
442
+ interface OrderItemPurchaseModel {
443
+ supplier?: SupplierModel | null;
444
+ price?: PriceModel | null;
445
+ }
446
+
447
+ interface OrderItemModel extends UUID {
448
+ type: {
449
+ id: OrderItemTypeEnum;
450
+ };
451
+ description: string;
452
+ quantity: number;
453
+ createdAt: Date;
454
+ updatedAt: Date;
455
+ invoiceReceived: boolean;
456
+ goodsShipped: boolean;
457
+ invoiceSent: boolean;
458
+ invoiceReceivedAt: Date | null;
459
+ goodsShippedAt: Date | null;
460
+ invoiceSentAt: Date | null;
461
+ amountFC: PriceModel;
462
+ order?: OrderModel;
463
+ vintageProducts?: VintageProductModel[];
464
+ purchase?: OrderItemPurchaseModel;
465
+ }
466
+
497
467
  interface OrderModel extends UUID {
498
468
  currency: CurrencyCodeEnum;
499
469
  status: {
@@ -511,31 +481,75 @@ interface OrderModel extends UUID {
511
481
  amountFCExclVatMicros?: number;
512
482
  purchaseOrders?: OrderModel[];
513
483
  salesOrders?: OrderModel[];
484
+ proFormaDocument?: DocumentModel | null;
485
+ invoiceDocument?: DocumentModel | null;
514
486
  }
515
487
 
516
- interface OrderItemPurchaseModel {
517
- supplier?: SupplierModel | null;
518
- price?: PriceModel | null;
488
+ interface DocumentModel extends UUID {
489
+ type: {
490
+ id: DocumentTypeEnum;
491
+ };
492
+ mime: {
493
+ id: MimeTypeEnum;
494
+ };
495
+ size: number;
496
+ createdAt: Date;
497
+ organisation?: OrganisationModel | null;
498
+ order?: OrderModel | null;
519
499
  }
520
500
 
521
- interface OrderItemModel extends UUID {
522
- type: {
523
- id: OrderItemTypeEnum;
501
+ interface FilterCriteriaModel {
502
+ field: OfferAlertFilterCriteriaFieldEnum;
503
+ operator: FilterOperatorEnum;
504
+ value: string | number | null;
505
+ }
506
+
507
+ interface ImportResolvedFileHeaderValueModel {
508
+ field: string;
509
+ fieldValue: string;
510
+ resolvedValue: string;
511
+ }
512
+
513
+ interface InboundEmailParsedModel extends UUID {
514
+ status: {
515
+ id: InboundEmailParsedStatusEnum;
524
516
  };
525
- description: string;
526
- quantity: number;
517
+ uploadType: {
518
+ id: UploadTypeEnum | null;
519
+ };
520
+ fromEmailAddress: string | null;
521
+ toEmailAddress: string | null;
522
+ subject: string | null;
523
+ attachmentCount: number;
527
524
  createdAt: Date;
528
- updatedAt: Date;
529
- invoiceReceived: boolean;
530
- goodsShipped: boolean;
531
- invoiceSent: boolean;
532
- invoiceReceivedAt: Date | null;
533
- goodsShippedAt: Date | null;
534
- invoiceSentAt: Date | null;
535
- amountFC: PriceModel;
536
- order?: OrderModel;
525
+ organisation?: OrganisationModel;
526
+ inboundEmail?: InboundEmailModel;
527
+ contentText?: string | null;
528
+ contentHtml?: string | null;
529
+ }
530
+
531
+ interface InboundEmailFileModel extends UUID {
532
+ name: string;
533
+ mime: {
534
+ id: MimeTypeEnum;
535
+ };
536
+ size: number;
537
+ createdAt: Date;
538
+ inboundEmail?: InboundEmailModel;
539
+ }
540
+
541
+ interface InboundEmailModel {
542
+ id: number;
543
+ messageId: string;
544
+ createdAt: Date;
545
+ inboundEmailParsed?: InboundEmailParsedModel | null;
546
+ files?: InboundEmailFileModel[];
547
+ }
548
+
549
+ interface IntegrationExactItemModel extends UUID {
550
+ integrationExact?: IntegrationExactModel;
551
+ vintageProduct?: VintageProductModel;
537
552
  vintageProducts?: VintageProductModel[];
538
- purchase?: OrderItemPurchaseModel;
539
553
  }
540
554
 
541
555
  interface IntegrationExactSalesOrderLineModel extends UUID {
@@ -689,4 +703,4 @@ interface VintageScoreUploadModel extends UUID {
689
703
  uploadedBy: UserAccountModel;
690
704
  }
691
705
 
692
- export { type B2bMarketPriceModel, type B2bMarketPriceUploadModel, type ContactPointModel, type ContactRequestModel, type ContactTypeModel, type CountryModel, type CurrencyRateModel, type CustomerModel, type FilterCriteriaModel, type GenderModel, type ImageImageTypeCropPropertyModel, type ImageModel, type ImageTypeModel, type ImageVariationModel, type ImportFileHeaderModel, type ImportResolvedFileHeaderValueModel, type InboundEmailFileModel, type InboundEmailModel, type InboundEmailParsedModel, type IntegrationExactItemModel, type IntegrationExactModel, type IntegrationExactSalesOrderLineModel, type IntegrationExactSalesOrderModel, type IntegrationExactWebhookLogModel, type MarginMarketModel, type MarginOrganisationModel, type NotificationChannelModel, type NotificationModel, type NotificationTypeModel, type OfferAlertModel, type OfferAlertTimelineModel, type OfferModel, type OfferRequestModel, type OfferRequestOptionModel, type OfferRequestStatusModel, type OfferRequestTimelineModel, type OrderItemModel, type OrderItemPurchaseModel, type OrderModel, type OrganisationModel, type OrganisationUserInvitationModel, type OrganisationUserInvitationStatusModel, type PermissionModel, type PersonModel, type PlanAlertModel, type PlanDataRetentionModel, type PlanModel, type PlanUploadModel, type PlanUploadServiceModel, type PlanUserOrganisationModel, type PostalAddressModel, type PriceModel, type PricingPlanFeatureModel, type PricingPlanModel, type RegionModel, type RoleModel, type SellerModel, type SupplierModel, type TelephoneModel, type UploadModel, type UploadVisibilityTypeModel, type UserAccountModel, type UserOrganisationClaimRequestModel, type UserOrganisationModel, type UserOrganisationStatusModel, type UserStatusModel, type VatTaxModel, type VintageModel, type VintageProductModel, type VintageRatingModel, type VintageScoreAuthorModel, type VintageScoreModel, type VintageScoreUploadModel, type WineModel, type WineTypeModel, type WineryModel, createB2BMarketPriceDtoFromAdminB2BMarketPriceModel, createCountryDtoFromAdminCountryModel, createOfferDtoFromAdminOfferModel, createOrganisationDtoFromAdminOrganisationModel, createPriceDtoFromAdminPriceModel, createRegionDtoFromAdminRegionModel, createSellerDtoFromAdminSellerModel, createSupplierDtoFromAdminSupplierModel, createUploadDtoFromAdminUploadModel, createVatTaxDtoFromAdminVatTaxModel, createVintageDtoFromAdminVintageModel, createVintageProductDtoFromAdminVintageProductModel, createWineDtoFromAdminWineModel, createWineTypeDtoFromAdminWineTypeModel, createWineryDtoFromAdminWineryModel };
706
+ export { type B2bMarketPriceModel, type B2bMarketPriceUploadModel, type ContactPointModel, type ContactRequestModel, type ContactTypeModel, type CountryModel, type CurrencyRateModel, type CustomerModel, type DocumentModel, type FilterCriteriaModel, type GenderModel, type ImageImageTypeCropPropertyModel, type ImageModel, type ImageTypeModel, type ImageVariationModel, type ImportFileHeaderModel, type ImportResolvedFileHeaderValueModel, type InboundEmailFileModel, type InboundEmailModel, type InboundEmailParsedModel, type IntegrationExactItemModel, type IntegrationExactModel, type IntegrationExactSalesOrderLineModel, type IntegrationExactSalesOrderModel, type IntegrationExactWebhookLogModel, type MarginMarketModel, type MarginOrganisationModel, type NotificationChannelModel, type NotificationModel, type NotificationTypeModel, type OfferAlertModel, type OfferAlertTimelineModel, type OfferModel, type OfferRequestModel, type OfferRequestOptionModel, type OfferRequestStatusModel, type OfferRequestTimelineModel, type OrderItemModel, type OrderItemPurchaseModel, type OrderModel, type OrganisationModel, type OrganisationUserInvitationModel, type OrganisationUserInvitationStatusModel, type PermissionModel, type PersonModel, type PlanAlertModel, type PlanDataRetentionModel, type PlanModel, type PlanUploadModel, type PlanUploadServiceModel, type PlanUserOrganisationModel, type PostalAddressModel, type PriceModel, type PricingPlanFeatureModel, type PricingPlanModel, type RegionModel, type RoleModel, type SellerModel, type SupplierModel, type TelephoneModel, type UploadModel, type UploadVisibilityTypeModel, type UserAccountModel, type UserOrganisationClaimRequestModel, type UserOrganisationModel, type UserOrganisationStatusModel, type UserStatusModel, type VatTaxModel, type VintageModel, type VintageProductModel, type VintageRatingModel, type VintageScoreAuthorModel, type VintageScoreModel, type VintageScoreUploadModel, type WineModel, type WineTypeModel, type WineryModel, createB2BMarketPriceDtoFromAdminB2BMarketPriceModel, createCountryDtoFromAdminCountryModel, createOfferDtoFromAdminOfferModel, createOrganisationDtoFromAdminOrganisationModel, createPriceDtoFromAdminPriceModel, createRegionDtoFromAdminRegionModel, createSellerDtoFromAdminSellerModel, createSupplierDtoFromAdminSupplierModel, createUploadDtoFromAdminUploadModel, createVatTaxDtoFromAdminVatTaxModel, createVintageDtoFromAdminVintageModel, createVintageProductDtoFromAdminVintageProductModel, createWineDtoFromAdminWineModel, createWineTypeDtoFromAdminWineTypeModel, createWineryDtoFromAdminWineryModel };
package/dist/index.js CHANGED
@@ -20,7 +20,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
- DocumentTypeEnum: () => import_core_enums.DocumentTypeEnum,
24
23
  createB2BMarketPriceDtoFromAdminB2BMarketPriceModel: () => createB2BMarketPriceDtoFromAdminB2BMarketPriceModel,
25
24
  createCountryDtoFromAdminCountryModel: () => createCountryDtoFromAdminCountryModel,
26
25
  createOfferDtoFromAdminOfferModel: () => createOfferDtoFromAdminOfferModel,
@@ -65,9 +64,6 @@ var createCountryDtoFromAdminCountryModel = (country) => {
65
64
  };
66
65
  };
67
66
 
68
- // src/index.ts
69
- var import_core_enums = require("@vini-wine/core-enums");
70
-
71
67
  // src/models/vatTax.ts
72
68
  var createVatTaxDtoFromAdminVatTaxModel = (vatTax) => {
73
69
  return {
@@ -200,7 +196,6 @@ var createOfferDtoFromAdminOfferModel = (offer) => {
200
196
  };
201
197
  // Annotate the CommonJS export names for ESM import in node:
202
198
  0 && (module.exports = {
203
- DocumentTypeEnum,
204
199
  createB2BMarketPriceDtoFromAdminB2BMarketPriceModel,
205
200
  createCountryDtoFromAdminCountryModel,
206
201
  createOfferDtoFromAdminOfferModel,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/models/price.ts","../src/models/b2bMarketPrice.ts","../src/models/country.ts","../src/models/vatTax.ts","../src/models/organisation.ts","../src/models/supplier.ts","../src/models/seller.ts","../src/models/region.ts","../src/models/wineType.ts","../src/models/winery.ts","../src/models/wine.ts","../src/models/vintage.ts","../src/models/vintageProduct.ts","../src/models/upload.ts","../src/models/offer.ts"],"sourcesContent":["import { B2bMarketPriceModel } from \"./models/b2bMarketPrice\";\nimport { B2bMarketPriceUploadModel } from \"./models/b2bMarketPriceUpload\";\nimport { ContactPointModel } from \"./models/contactPoint\";\nimport { ContactRequestModel } from \"./models/contactRequest\";\nimport { ContactTypeModel } from \"./models/contactType\";\nimport { CountryModel } from \"./models/country\";\nimport { CurrencyRateModel } from \"./models/currencyRate\";\nimport { CustomerModel } from \"./models/customer\";\nimport { DocumentTypeEnum } from \"@vini-wine/core-enums\";\nimport { FilterCriteriaModel } from \"./models/filterCriteria\";\nimport { GenderModel } from \"./models/gender\";\nimport { ImageModel } from \"./models/image\";\nimport { ImageImageTypeCropPropertyModel } from \"./models/imageImageTypeCropProperty\";\nimport { ImageTypeModel } from \"./models/imageType\";\nimport { ImageVariationModel } from \"./models/imageVariation\";\nimport { ImportFileHeaderModel } from \"./models/importFileHeader\";\nimport { ImportResolvedFileHeaderValueModel } from \"./models/importResolvedFileHeaderValue\";\nimport { InboundEmailModel } from \"./models/inboundEmail\";\nimport { InboundEmailFileModel } from \"./models/inboundEmailFile\";\nimport { InboundEmailParsedModel } from \"./models/inboundEmailParsed\";\nimport { IntegrationExactModel } from \"./models/integrationExact\";\nimport { IntegrationExactItemModel } from \"./models/integrationExactItem\";\nimport { IntegrationExactSalesOrderModel } from \"./models/integrationExactSalesOrder\";\nimport { IntegrationExactSalesOrderLineModel } from \"./models/integrationExactSalesOrderLine\";\nimport { IntegrationExactWebhookLogModel } from \"./models/integrationExactWebhookLog\";\nimport { MarginMarketModel } from \"./models/marginMarket\";\nimport { MarginOrganisationModel } from \"./models/marginOrganisation\";\nimport { NotificationModel } from \"./models/notification\";\nimport { NotificationChannelModel } from \"./models/notificationChannel\";\nimport { NotificationTypeModel } from \"./models/notificationType\";\nimport { OfferModel } from \"./models/offer\";\nimport { OfferAlertModel } from \"./models/offerAlert\";\nimport { OfferAlertTimelineModel } from \"./models/offerAlertTimeline\";\nimport { OfferRequestModel } from \"./models/offerRequest\";\nimport { OfferRequestOptionModel } from \"./models/offerRequestOption\";\nimport { OfferRequestStatusModel } from \"./models/offerRequestStatus\";\nimport { OfferRequestTimelineModel } from \"./models/offerRequestTimeline\";\nimport { OrderModel } from \"./models/order\";\nimport { OrderItemModel } from \"./models/orderItem\";\nimport { OrderItemPurchaseModel } from \"./models/orderItemPurchase\";\nimport { OrganisationModel } from \"./models/organisation\";\nimport { OrganisationUserInvitationStatusModel } from \"./models/organisationUserInvitationStatus\";\nimport { PermissionModel } from \"./models/permission\";\nimport { PersonModel } from \"./models/person\";\nimport { PlanModel } from \"./models/plan\";\nimport { PlanAlertModel } from \"./models/planAlert\";\nimport { PlanDataRetentionModel } from \"./models/planDataRetention\";\nimport { PlanUploadModel } from \"./models/planUpload\";\nimport { PlanUploadServiceModel } from \"./models/planUploadService\";\nimport { PlanUserOrganisationModel } from \"./models/planUserOrganisation\";\nimport { PostalAddressModel } from \"./models/postalAddress\";\nimport { PriceModel } from \"./models/price\";\nimport { PricingPlanModel } from \"./models/pricingPlan\";\nimport { PricingPlanFeatureModel } from \"./models/pricingPlanFeature\";\nimport { RegionModel } from \"./models/region\";\nimport { RoleModel } from \"./models/role\";\nimport { SellerModel } from \"./models/seller\";\nimport { SupplierModel } from \"./models/supplier\";\nimport { TelephoneModel } from \"./models/telephone\";\nimport { UploadModel } from \"./models/upload\";\nimport { UploadVisibilityTypeModel } from \"./models/uploadVisibilityType\";\nimport { UserAccountModel } from \"./models/userAccount\";\nimport { OrganisationUserInvitationModel } from \"./models/organisationUserInvitation\";\nimport { UserOrganisationModel } from \"./models/userOrganisation\";\nimport { UserOrganisationClaimRequestModel } from \"./models/userOrganisationClaimRequest\";\nimport { UserOrganisationStatusModel } from \"./models/userOrganisationStatus\";\nimport { UserStatusModel } from \"./models/userStatus\";\nimport { VatTaxModel } from \"./models/vatTax\";\nimport { VintageModel } from \"./models/vintage\";\nimport { VintageProductModel } from \"./models/vintageProduct\";\nimport { VintageRatingModel } from \"./models/vintageRating\";\nimport { VintageScoreModel } from \"./models/vintageScore\";\nimport { VintageScoreAuthorModel } from \"./models/vintageScoreAuthor\";\nimport { VintageScoreUploadModel } from \"./models/vintageScoreUpload\";\nimport { WineModel } from \"./models/wine\";\nimport { WineryModel } from \"./models/winery\";\nimport { WineTypeModel } from \"./models/wineType\";\n\n// transformers from models to dto\nimport { createB2BMarketPriceDtoFromAdminB2BMarketPriceModel } from \"./models/b2bMarketPrice\";\nimport { createCountryDtoFromAdminCountryModel } from \"./models/country\";\nimport { createOfferDtoFromAdminOfferModel } from \"./models/offer\";\nimport { createOrganisationDtoFromAdminOrganisationModel } from \"./models/organisation\";\nimport { createPriceDtoFromAdminPriceModel } from \"./models/price\";\nimport { createRegionDtoFromAdminRegionModel } from \"./models/region\";\nimport { createSellerDtoFromAdminSellerModel } from \"./models/seller\";\nimport { createSupplierDtoFromAdminSupplierModel } from \"./models/supplier\";\nimport { createUploadDtoFromAdminUploadModel } from \"./models/upload\";\nimport { createVatTaxDtoFromAdminVatTaxModel } from \"./models/vatTax\";\nimport { createVintageDtoFromAdminVintageModel } from \"./models/vintage\";\nimport { createVintageProductDtoFromAdminVintageProductModel } from \"./models/vintageProduct\";\nimport { createWineDtoFromAdminWineModel } from \"./models/wine\";\nimport { createWineryDtoFromAdminWineryModel } from \"./models/winery\";\nimport { createWineTypeDtoFromAdminWineTypeModel } from \"./models/wineType\";\n\nexport {\n B2bMarketPriceModel,\n B2bMarketPriceUploadModel,\n ContactPointModel,\n ContactRequestModel,\n ContactTypeModel,\n CountryModel,\n CurrencyRateModel,\n CustomerModel,\n DocumentTypeEnum,\n FilterCriteriaModel,\n GenderModel,\n ImageModel,\n ImageTypeModel,\n ImageImageTypeCropPropertyModel,\n ImageVariationModel,\n ImportFileHeaderModel,\n ImportResolvedFileHeaderValueModel,\n InboundEmailModel,\n InboundEmailFileModel,\n InboundEmailParsedModel,\n IntegrationExactModel,\n IntegrationExactItemModel,\n IntegrationExactSalesOrderModel,\n IntegrationExactSalesOrderLineModel,\n IntegrationExactWebhookLogModel,\n MarginMarketModel,\n MarginOrganisationModel,\n NotificationModel,\n NotificationChannelModel,\n NotificationTypeModel,\n OfferModel,\n OfferAlertModel,\n OfferAlertTimelineModel,\n OfferRequestModel,\n OfferRequestOptionModel,\n OfferRequestStatusModel,\n OfferRequestTimelineModel,\n OrderModel,\n OrderItemModel,\n OrderItemPurchaseModel,\n OrganisationModel,\n OrganisationUserInvitationStatusModel,\n PermissionModel,\n PersonModel,\n PlanModel,\n PlanAlertModel,\n PlanDataRetentionModel,\n PlanUploadModel,\n PlanUploadServiceModel,\n PlanUserOrganisationModel,\n PostalAddressModel,\n PriceModel,\n PricingPlanModel,\n PricingPlanFeatureModel,\n RegionModel,\n RoleModel,\n SellerModel,\n SupplierModel,\n TelephoneModel,\n UploadModel,\n UploadVisibilityTypeModel,\n UserAccountModel,\n OrganisationUserInvitationModel,\n UserOrganisationModel,\n UserOrganisationClaimRequestModel,\n UserOrganisationStatusModel,\n UserStatusModel,\n VatTaxModel,\n VintageModel,\n VintageProductModel,\n VintageRatingModel,\n VintageScoreModel,\n VintageScoreAuthorModel,\n VintageScoreUploadModel,\n WineModel,\n WineryModel,\n WineTypeModel,\n\n // transformers from models to dto\n createB2BMarketPriceDtoFromAdminB2BMarketPriceModel,\n createCountryDtoFromAdminCountryModel,\n createOfferDtoFromAdminOfferModel,\n createOrganisationDtoFromAdminOrganisationModel,\n createPriceDtoFromAdminPriceModel,\n createRegionDtoFromAdminRegionModel,\n createSellerDtoFromAdminSellerModel,\n createSupplierDtoFromAdminSupplierModel,\n createUploadDtoFromAdminUploadModel,\n createVatTaxDtoFromAdminVatTaxModel,\n createVintageDtoFromAdminVintageModel,\n createVintageProductDtoFromAdminVintageProductModel,\n createWineDtoFromAdminWineModel,\n createWineryDtoFromAdminWineryModel,\n createWineTypeDtoFromAdminWineTypeModel,\n};\n","import {\n CurrencyCodeEnum,\n UploadVisibilityTypeEnum,\n} from \"@vini-wine/core-enums\";\nimport { PriceDto } from \"@vini-wine/core-dtos\";\n\nexport interface PriceModel {\n // transform\n priceMicros: number;\n currency: CurrencyCodeEnum;\n visibility: { id: UploadVisibilityTypeEnum };\n}\n\nexport const createPriceDtoFromAdminPriceModel = (\n price: PriceModel,\n): PriceDto => {\n return {\n priceMicros: price.priceMicros,\n currency: price.currency,\n visibility: {\n id: price.visibility ? price.visibility.id : null,\n },\n };\n};\n","import { createPriceDtoFromAdminPriceModel, PriceModel } from \"./price\";\nimport { B2bMarketPriceDto } from \"@vini-wine/core-dtos\";\n\nexport interface B2bMarketPriceModel {\n // default includes\n price: PriceModel | null;\n\n // transform\n updatedAt: Date;\n}\n\nexport const createB2BMarketPriceDtoFromAdminB2BMarketPriceModel = (\n b2bMarketPrice: B2bMarketPriceModel,\n): B2bMarketPriceDto => {\n return {\n price: b2bMarketPrice.price\n ? createPriceDtoFromAdminPriceModel(b2bMarketPrice.price)\n : null,\n updatedAt: b2bMarketPrice.updatedAt,\n };\n};\n","import { CountryEnum } from \"@vini-wine/core-enums\";\nimport { CountryDto } from \"@vini-wine/core-dtos\";\n\nexport interface CountryModel {\n // transform\n codeAlpha2: CountryEnum;\n codeAlpha3: string;\n codeUn: string;\n}\n\nexport const createCountryDtoFromAdminCountryModel = (\n country: CountryModel,\n): CountryDto => {\n return {\n codeAlpha2: country.codeAlpha2,\n };\n};\n","import { CountryEnum } from \"@vini-wine/core-enums\";\nimport { VatTaxDto } from \"@vini-wine/core-dtos\";\n\nexport interface VatTaxModel {\n countryCode: CountryEnum;\n value: string;\n}\n\nexport const createVatTaxDtoFromAdminVatTaxModel = (\n vatTax: VatTaxModel,\n): VatTaxDto => {\n return {\n countryCode: vatTax.countryCode,\n value: vatTax.value,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { PostalAddressModel } from \"./postalAddress\";\nimport { createVatTaxDtoFromAdminVatTaxModel, VatTaxModel } from \"./vatTax\";\nimport { SupplierModel } from \"./supplier\";\nimport { OrganisationStatusModel } from \"./organisationStatus\";\nimport { UserAccountModel } from \"./userAccount\";\nimport { ImageModel } from \"./image\";\nimport { UserOrganisationModel } from \"./userOrganisation\";\nimport { TimezoneEnum } from \"@vini-wine/core-enums\";\nimport { OrganisationDto } from \"@vini-wine/core-dtos\";\nimport { IntegrationExactModel } from \"./integrationExact\";\nimport { PermissionModel } from \"./permission\";\nimport { PlanModel } from \"./plan\";\n\nexport interface OrganisationModel extends UUID {\n // available includes\n suppliers?: Partial<SupplierModel>[];\n billingPostalAddress?: PostalAddressModel;\n defaultShippingPostalAddress?: PostalAddressModel | null;\n organisationOwner?: Partial<UserAccountModel>;\n registeredBy?: Partial<UserAccountModel>;\n userOrganisations?: UserOrganisationModel[];\n avatar?: ImageModel | null;\n integrationExact?: IntegrationExactModel | null;\n permissions?: PermissionModel[];\n plan?: PlanModel;\n\n // transform\n name: string;\n legalName: string;\n vatTax: VatTaxModel;\n createdAt: Date;\n defaultTimezone: TimezoneEnum;\n status: OrganisationStatusModel;\n}\n\nexport const createOrganisationDtoFromAdminOrganisationModel = (\n organisation: OrganisationModel,\n): OrganisationDto => {\n return {\n defaultTimezone: organisation.defaultTimezone,\n legalName: organisation.legalName,\n name: organisation.name,\n uuid: organisation.uuid,\n vatTax: createVatTaxDtoFromAdminVatTaxModel(organisation.vatTax),\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport {\n createOrganisationDtoFromAdminOrganisationModel,\n OrganisationModel,\n} from \"./organisation\";\nimport { ContactPointModel } from \"./contactPoint\";\nimport { SupplierDto } from \"@vini-wine/core-dtos\";\nimport { SupplierStatusEnum } from \"@vini-wine/core-enums\";\n\nexport interface SupplierModel extends UUID {\n // transform\n isCustomer: boolean;\n name: string;\n createdAt: Date;\n status: {\n id: SupplierStatusEnum;\n };\n\n // available includes\n supplierOrganisation?: OrganisationModel;\n organisation?: OrganisationModel;\n primaryLogisticsContactPoint?: ContactPointModel | null;\n primarySalesContactPoint?: ContactPointModel | null;\n}\n\nexport const createSupplierDtoFromAdminSupplierModel = (\n supplier: SupplierModel,\n): SupplierDto => {\n return {\n name: supplier.name,\n uuid: supplier.uuid,\n supplierOrganisation: supplier.supplierOrganisation\n ? createOrganisationDtoFromAdminOrganisationModel(\n supplier.supplierOrganisation,\n )\n : undefined,\n };\n};\n","import {\n createOrganisationDtoFromAdminOrganisationModel,\n OrganisationModel,\n} from \"./organisation\";\nimport { SellerDto } from \"@vini-wine/core-dtos\";\n\nexport interface SellerModel {\n // available includes\n organisation?: OrganisationModel;\n}\n\nexport const createSellerDtoFromAdminSellerModel = (\n seller: SellerModel,\n): SellerDto => {\n return {\n uuid: seller.organisation ? seller.organisation.uuid : \"Not found\",\n name: seller.organisation?.name,\n organisation: seller.organisation\n ? createOrganisationDtoFromAdminOrganisationModel(seller.organisation)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { CountryModel, createCountryDtoFromAdminCountryModel } from \"./country\";\nimport { ImageModel } from \"./image\";\nimport { RegionDto } from \"@vini-wine/core-dtos\";\n\nexport interface RegionModel extends UUID {\n // default includes\n country: CountryModel;\n\n // available includes\n mappedItems?: any;\n parentRegion?: RegionModel | null;\n subRegions?: RegionModel[];\n images?: ImageModel[];\n\n // transform\n name: string;\n}\n\nexport const createRegionDtoFromAdminRegionModel = (\n region: RegionModel,\n): RegionDto => {\n return {\n uuid: region.uuid,\n name: region.name,\n country: createCountryDtoFromAdminCountryModel(region.country),\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { WineTypeDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineTypeModel extends UUID {\n // available includes\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineTypeDtoFromAdminWineTypeModel = (\n wineType: WineTypeModel,\n): WineTypeDto => {\n return {\n uuid: wineType.uuid,\n name: wineType.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { WineryDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineryModel extends UUID {\n // available includes\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineryDtoFromAdminWineryModel = (\n winery: WineryModel,\n): WineryDto => {\n return {\n uuid: winery.uuid,\n name: winery.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\n\nimport { createRegionDtoFromAdminRegionModel, RegionModel } from \"./region\";\nimport {\n createWineTypeDtoFromAdminWineTypeModel,\n WineTypeModel,\n} from \"./wineType\";\nimport { createWineryDtoFromAdminWineryModel, WineryModel } from \"./winery\";\nimport { WineDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineModel extends UUID {\n // available includes\n region?: RegionModel;\n wineType?: WineTypeModel;\n winery?: WineryModel;\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineDtoFromAdminWineModel = (wine: WineModel): WineDto => {\n return {\n uuid: wine.uuid,\n name: wine.name,\n wineType: wine.wineType\n ? createWineTypeDtoFromAdminWineTypeModel(wine.wineType)\n : undefined,\n region: wine.region\n ? createRegionDtoFromAdminRegionModel(wine.region)\n : undefined,\n winery: wine.winery\n ? createWineryDtoFromAdminWineryModel(wine.winery)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { createWineDtoFromAdminWineModel, WineModel } from \"./wine\";\nimport { VintageRatingModel } from \"./vintageRating\";\nimport { VintageScoreModel } from \"./vintageScore\";\nimport { ImageModel } from \"./image\";\nimport { VintageDto } from \"@vini-wine/core-dtos\";\n\nexport interface VintageModel extends UUID {\n // transform\n year: number;\n\n // default includes\n bottleImage: ImageModel | null;\n\n // available includes\n wine?: WineModel;\n mappedExternal1Rating?: VintageRatingModel | null;\n scores?: VintageScoreModel[];\n labelImage?: ImageModel | null;\n}\n\nexport const createVintageDtoFromAdminVintageModel = (\n vintage: VintageModel,\n): VintageDto => {\n return {\n uuid: vintage.uuid,\n year: vintage.year,\n wine: vintage.wine\n ? createWineDtoFromAdminWineModel(vintage.wine)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { createVintageDtoFromAdminVintageModel, VintageModel } from \"./vintage\";\nimport {\n B2bMarketPriceModel,\n createB2BMarketPriceDtoFromAdminB2BMarketPriceModel,\n} from \"./b2bMarketPrice\";\nimport { VintageProductDto } from \"@vini-wine/core-dtos\";\n\nexport interface VintageProductModel extends UUID {\n // transform\n milliliters: number;\n\n // available includes\n vintage?: VintageModel;\n b2bMarketPrice?: B2bMarketPriceModel | null;\n}\n\nexport const createVintageProductDtoFromAdminVintageProductModel = (\n vintageProduct: VintageProductModel,\n): VintageProductDto => {\n return {\n uuid: vintageProduct.uuid,\n milliliters: vintageProduct.milliliters,\n vintage: vintageProduct.vintage\n ? createVintageDtoFromAdminVintageModel(vintageProduct.vintage)\n : undefined,\n b2bMarketPrice: vintageProduct.b2bMarketPrice\n ? createB2BMarketPriceDtoFromAdminB2BMarketPriceModel(\n vintageProduct.b2bMarketPrice,\n )\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { UploadStatusEnum, UploadTypeEnum } from \"@vini-wine/core-enums\";\nimport { OrganisationModel } from \"./organisation\";\nimport { SupplierModel } from \"./supplier\";\nimport { UserAccountModel } from \"./userAccount\";\nimport { UploadVisibilityTypeModel } from \"./uploadVisibilityType\";\nimport { ImportFileHeaderModel } from \"./importFileHeader\";\nimport { UploadDto } from \"@vini-wine/core-dtos\";\n\nexport interface UploadModel extends UUID {\n // transform\n status: {\n id: UploadStatusEnum;\n statusUpdatedAt: Date;\n };\n type: {\n id: UploadTypeEnum;\n };\n name: string;\n validFrom: Date;\n validUntil: Date;\n numItems: number;\n createdAt: Date;\n\n // default includes\n organisation: OrganisationModel;\n organisationSupplier: SupplierModel;\n\n // available includes\n createdUser?: UserAccountModel;\n visibilityTypes?: UploadVisibilityTypeModel[];\n importFileHeaders?: ImportFileHeaderModel[];\n statusUpdatedBy?: UserAccountModel | null;\n}\n\nexport const createUploadDtoFromAdminUploadModel = (\n upload: UploadModel,\n): UploadDto => {\n return {\n uuid: upload.uuid,\n name: upload.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport {\n createSupplierDtoFromAdminSupplierModel,\n SupplierModel,\n} from \"./supplier\";\nimport { createSellerDtoFromAdminSellerModel, SellerModel } from \"./seller\";\nimport {\n createVintageProductDtoFromAdminVintageProductModel,\n VintageProductModel,\n} from \"./vintageProduct\";\nimport { createPriceDtoFromAdminPriceModel, PriceModel } from \"./price\";\nimport { createUploadDtoFromAdminUploadModel, UploadModel } from \"./upload\";\nimport { PackageEnum } from \"@vini-wine/core-enums\";\nimport { CountryModel, createCountryDtoFromAdminCountryModel } from \"./country\";\nimport { OfferDto, VintageProductDto } from \"@vini-wine/core-dtos\";\n\nexport interface OfferModel extends UUID {\n // default includes\n price: PriceModel | null;\n\n // available includes\n supplier?: SupplierModel | null;\n seller?: SellerModel;\n vintageProducts?: VintageProductModel[];\n upload?: UploadModel;\n shippedFromCountry?: CountryModel | null;\n\n // transform\n quantity: number;\n package: PackageEnum | null;\n createdAt: Date;\n}\n\nexport const createOfferDtoFromAdminOfferModel = (\n offer: OfferModel,\n): OfferDto => {\n const vintageProducts: VintageProductDto[] = [];\n if (offer.vintageProducts && offer.vintageProducts.length) {\n for (let i = 0; i < offer.vintageProducts.length; i += 1) {\n vintageProducts.push(\n createVintageProductDtoFromAdminVintageProductModel(\n offer.vintageProducts[i],\n ),\n );\n }\n }\n\n return {\n uuid: offer.uuid,\n createdAt: offer.createdAt,\n package: offer.package,\n price: offer.price ? createPriceDtoFromAdminPriceModel(offer.price) : null,\n quantity: offer.quantity,\n seller: offer.seller\n ? createSellerDtoFromAdminSellerModel(offer.seller)\n : undefined,\n supplier: offer.supplier\n ? createSupplierDtoFromAdminSupplierModel(offer.supplier)\n : undefined,\n shippedFromCountry: offer.shippedFromCountry\n ? createCountryDtoFromAdminCountryModel(offer.shippedFromCountry)\n : undefined,\n vintageProducts,\n upload: offer.upload\n ? createUploadDtoFromAdminUploadModel(offer.upload)\n : undefined,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AA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,mBAAmB,MAAM,gBAAgB,QAAQ;AACzD,aAAS,IAAI,GAAG,IAAI,MAAM,gBAAgB,QAAQ,KAAK,GAAG;AACxD,sBAAgB;AAAA,QACd;AAAA,UACE,MAAM,gBAAgB,CAAC;AAAA,QACzB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,MAAM,MAAM;AAAA,IACZ,WAAW,MAAM;AAAA,IACjB,SAAS,MAAM;AAAA,IACf,OAAO,MAAM,QAAQ,kCAAkC,MAAM,KAAK,IAAI;AAAA,IACtE,UAAU,MAAM;AAAA,IAChB,QAAQ,MAAM,SACV,oCAAoC,MAAM,MAAM,IAChD;AAAA,IACJ,UAAU,MAAM,WACZ,wCAAwC,MAAM,QAAQ,IACtD;AAAA,IACJ,oBAAoB,MAAM,qBACtB,sCAAsC,MAAM,kBAAkB,IAC9D;AAAA,IACJ;AAAA,IACA,QAAQ,MAAM,SACV,oCAAoC,MAAM,MAAM,IAChD;AAAA,EACN;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/models/price.ts","../src/models/b2bMarketPrice.ts","../src/models/country.ts","../src/models/vatTax.ts","../src/models/organisation.ts","../src/models/supplier.ts","../src/models/seller.ts","../src/models/region.ts","../src/models/wineType.ts","../src/models/winery.ts","../src/models/wine.ts","../src/models/vintage.ts","../src/models/vintageProduct.ts","../src/models/upload.ts","../src/models/offer.ts"],"sourcesContent":["import { B2bMarketPriceModel } from \"./models/b2bMarketPrice\";\nimport { B2bMarketPriceUploadModel } from \"./models/b2bMarketPriceUpload\";\nimport { ContactPointModel } from \"./models/contactPoint\";\nimport { ContactRequestModel } from \"./models/contactRequest\";\nimport { ContactTypeModel } from \"./models/contactType\";\nimport { CountryModel } from \"./models/country\";\nimport { CurrencyRateModel } from \"./models/currencyRate\";\nimport { CustomerModel } from \"./models/customer\";\nimport { DocumentModel } from \"./models/document\";\nimport { FilterCriteriaModel } from \"./models/filterCriteria\";\nimport { GenderModel } from \"./models/gender\";\nimport { ImageModel } from \"./models/image\";\nimport { ImageImageTypeCropPropertyModel } from \"./models/imageImageTypeCropProperty\";\nimport { ImageTypeModel } from \"./models/imageType\";\nimport { ImageVariationModel } from \"./models/imageVariation\";\nimport { ImportFileHeaderModel } from \"./models/importFileHeader\";\nimport { ImportResolvedFileHeaderValueModel } from \"./models/importResolvedFileHeaderValue\";\nimport { InboundEmailModel } from \"./models/inboundEmail\";\nimport { InboundEmailFileModel } from \"./models/inboundEmailFile\";\nimport { InboundEmailParsedModel } from \"./models/inboundEmailParsed\";\nimport { IntegrationExactModel } from \"./models/integrationExact\";\nimport { IntegrationExactItemModel } from \"./models/integrationExactItem\";\nimport { IntegrationExactSalesOrderModel } from \"./models/integrationExactSalesOrder\";\nimport { IntegrationExactSalesOrderLineModel } from \"./models/integrationExactSalesOrderLine\";\nimport { IntegrationExactWebhookLogModel } from \"./models/integrationExactWebhookLog\";\nimport { MarginMarketModel } from \"./models/marginMarket\";\nimport { MarginOrganisationModel } from \"./models/marginOrganisation\";\nimport { NotificationModel } from \"./models/notification\";\nimport { NotificationChannelModel } from \"./models/notificationChannel\";\nimport { NotificationTypeModel } from \"./models/notificationType\";\nimport { OfferModel } from \"./models/offer\";\nimport { OfferAlertModel } from \"./models/offerAlert\";\nimport { OfferAlertTimelineModel } from \"./models/offerAlertTimeline\";\nimport { OfferRequestModel } from \"./models/offerRequest\";\nimport { OfferRequestOptionModel } from \"./models/offerRequestOption\";\nimport { OfferRequestStatusModel } from \"./models/offerRequestStatus\";\nimport { OfferRequestTimelineModel } from \"./models/offerRequestTimeline\";\nimport { OrderModel } from \"./models/order\";\nimport { OrderItemModel } from \"./models/orderItem\";\nimport { OrderItemPurchaseModel } from \"./models/orderItemPurchase\";\nimport { OrganisationModel } from \"./models/organisation\";\nimport { OrganisationUserInvitationStatusModel } from \"./models/organisationUserInvitationStatus\";\nimport { PermissionModel } from \"./models/permission\";\nimport { PersonModel } from \"./models/person\";\nimport { PlanModel } from \"./models/plan\";\nimport { PlanAlertModel } from \"./models/planAlert\";\nimport { PlanDataRetentionModel } from \"./models/planDataRetention\";\nimport { PlanUploadModel } from \"./models/planUpload\";\nimport { PlanUploadServiceModel } from \"./models/planUploadService\";\nimport { PlanUserOrganisationModel } from \"./models/planUserOrganisation\";\nimport { PostalAddressModel } from \"./models/postalAddress\";\nimport { PriceModel } from \"./models/price\";\nimport { PricingPlanModel } from \"./models/pricingPlan\";\nimport { PricingPlanFeatureModel } from \"./models/pricingPlanFeature\";\nimport { RegionModel } from \"./models/region\";\nimport { RoleModel } from \"./models/role\";\nimport { SellerModel } from \"./models/seller\";\nimport { SupplierModel } from \"./models/supplier\";\nimport { TelephoneModel } from \"./models/telephone\";\nimport { UploadModel } from \"./models/upload\";\nimport { UploadVisibilityTypeModel } from \"./models/uploadVisibilityType\";\nimport { UserAccountModel } from \"./models/userAccount\";\nimport { OrganisationUserInvitationModel } from \"./models/organisationUserInvitation\";\nimport { UserOrganisationModel } from \"./models/userOrganisation\";\nimport { UserOrganisationClaimRequestModel } from \"./models/userOrganisationClaimRequest\";\nimport { UserOrganisationStatusModel } from \"./models/userOrganisationStatus\";\nimport { UserStatusModel } from \"./models/userStatus\";\nimport { VatTaxModel } from \"./models/vatTax\";\nimport { VintageModel } from \"./models/vintage\";\nimport { VintageProductModel } from \"./models/vintageProduct\";\nimport { VintageRatingModel } from \"./models/vintageRating\";\nimport { VintageScoreModel } from \"./models/vintageScore\";\nimport { VintageScoreAuthorModel } from \"./models/vintageScoreAuthor\";\nimport { VintageScoreUploadModel } from \"./models/vintageScoreUpload\";\nimport { WineModel } from \"./models/wine\";\nimport { WineryModel } from \"./models/winery\";\nimport { WineTypeModel } from \"./models/wineType\";\n\n// transformers from models to dto\nimport { createB2BMarketPriceDtoFromAdminB2BMarketPriceModel } from \"./models/b2bMarketPrice\";\nimport { createCountryDtoFromAdminCountryModel } from \"./models/country\";\nimport { createOfferDtoFromAdminOfferModel } from \"./models/offer\";\nimport { createOrganisationDtoFromAdminOrganisationModel } from \"./models/organisation\";\nimport { createPriceDtoFromAdminPriceModel } from \"./models/price\";\nimport { createRegionDtoFromAdminRegionModel } from \"./models/region\";\nimport { createSellerDtoFromAdminSellerModel } from \"./models/seller\";\nimport { createSupplierDtoFromAdminSupplierModel } from \"./models/supplier\";\nimport { createUploadDtoFromAdminUploadModel } from \"./models/upload\";\nimport { createVatTaxDtoFromAdminVatTaxModel } from \"./models/vatTax\";\nimport { createVintageDtoFromAdminVintageModel } from \"./models/vintage\";\nimport { createVintageProductDtoFromAdminVintageProductModel } from \"./models/vintageProduct\";\nimport { createWineDtoFromAdminWineModel } from \"./models/wine\";\nimport { createWineryDtoFromAdminWineryModel } from \"./models/winery\";\nimport { createWineTypeDtoFromAdminWineTypeModel } from \"./models/wineType\";\n\nexport {\n B2bMarketPriceModel,\n B2bMarketPriceUploadModel,\n ContactPointModel,\n ContactRequestModel,\n ContactTypeModel,\n CountryModel,\n CurrencyRateModel,\n CustomerModel,\n DocumentModel,\n FilterCriteriaModel,\n GenderModel,\n ImageModel,\n ImageTypeModel,\n ImageImageTypeCropPropertyModel,\n ImageVariationModel,\n ImportFileHeaderModel,\n ImportResolvedFileHeaderValueModel,\n InboundEmailModel,\n InboundEmailFileModel,\n InboundEmailParsedModel,\n IntegrationExactModel,\n IntegrationExactItemModel,\n IntegrationExactSalesOrderModel,\n IntegrationExactSalesOrderLineModel,\n IntegrationExactWebhookLogModel,\n MarginMarketModel,\n MarginOrganisationModel,\n NotificationModel,\n NotificationChannelModel,\n NotificationTypeModel,\n OfferModel,\n OfferAlertModel,\n OfferAlertTimelineModel,\n OfferRequestModel,\n OfferRequestOptionModel,\n OfferRequestStatusModel,\n OfferRequestTimelineModel,\n OrderModel,\n OrderItemModel,\n OrderItemPurchaseModel,\n OrganisationModel,\n OrganisationUserInvitationStatusModel,\n PermissionModel,\n PersonModel,\n PlanModel,\n PlanAlertModel,\n PlanDataRetentionModel,\n PlanUploadModel,\n PlanUploadServiceModel,\n PlanUserOrganisationModel,\n PostalAddressModel,\n PriceModel,\n PricingPlanModel,\n PricingPlanFeatureModel,\n RegionModel,\n RoleModel,\n SellerModel,\n SupplierModel,\n TelephoneModel,\n UploadModel,\n UploadVisibilityTypeModel,\n UserAccountModel,\n OrganisationUserInvitationModel,\n UserOrganisationModel,\n UserOrganisationClaimRequestModel,\n UserOrganisationStatusModel,\n UserStatusModel,\n VatTaxModel,\n VintageModel,\n VintageProductModel,\n VintageRatingModel,\n VintageScoreModel,\n VintageScoreAuthorModel,\n VintageScoreUploadModel,\n WineModel,\n WineryModel,\n WineTypeModel,\n\n // transformers from models to dto\n createB2BMarketPriceDtoFromAdminB2BMarketPriceModel,\n createCountryDtoFromAdminCountryModel,\n createOfferDtoFromAdminOfferModel,\n createOrganisationDtoFromAdminOrganisationModel,\n createPriceDtoFromAdminPriceModel,\n createRegionDtoFromAdminRegionModel,\n createSellerDtoFromAdminSellerModel,\n createSupplierDtoFromAdminSupplierModel,\n createUploadDtoFromAdminUploadModel,\n createVatTaxDtoFromAdminVatTaxModel,\n createVintageDtoFromAdminVintageModel,\n createVintageProductDtoFromAdminVintageProductModel,\n createWineDtoFromAdminWineModel,\n createWineryDtoFromAdminWineryModel,\n createWineTypeDtoFromAdminWineTypeModel,\n};\n","import {\n CurrencyCodeEnum,\n UploadVisibilityTypeEnum,\n} from \"@vini-wine/core-enums\";\nimport { PriceDto } from \"@vini-wine/core-dtos\";\n\nexport interface PriceModel {\n // transform\n priceMicros: number;\n currency: CurrencyCodeEnum;\n visibility: { id: UploadVisibilityTypeEnum };\n}\n\nexport const createPriceDtoFromAdminPriceModel = (\n price: PriceModel,\n): PriceDto => {\n return {\n priceMicros: price.priceMicros,\n currency: price.currency,\n visibility: {\n id: price.visibility ? price.visibility.id : null,\n },\n };\n};\n","import { createPriceDtoFromAdminPriceModel, PriceModel } from \"./price\";\nimport { B2bMarketPriceDto } from \"@vini-wine/core-dtos\";\n\nexport interface B2bMarketPriceModel {\n // default includes\n price: PriceModel | null;\n\n // transform\n updatedAt: Date;\n}\n\nexport const createB2BMarketPriceDtoFromAdminB2BMarketPriceModel = (\n b2bMarketPrice: B2bMarketPriceModel,\n): B2bMarketPriceDto => {\n return {\n price: b2bMarketPrice.price\n ? createPriceDtoFromAdminPriceModel(b2bMarketPrice.price)\n : null,\n updatedAt: b2bMarketPrice.updatedAt,\n };\n};\n","import { CountryEnum } from \"@vini-wine/core-enums\";\nimport { CountryDto } from \"@vini-wine/core-dtos\";\n\nexport interface CountryModel {\n // transform\n codeAlpha2: CountryEnum;\n codeAlpha3: string;\n codeUn: string;\n}\n\nexport const createCountryDtoFromAdminCountryModel = (\n country: CountryModel,\n): CountryDto => {\n return {\n codeAlpha2: country.codeAlpha2,\n };\n};\n","import { CountryEnum } from \"@vini-wine/core-enums\";\nimport { VatTaxDto } from \"@vini-wine/core-dtos\";\n\nexport interface VatTaxModel {\n countryCode: CountryEnum;\n value: string;\n}\n\nexport const createVatTaxDtoFromAdminVatTaxModel = (\n vatTax: VatTaxModel,\n): VatTaxDto => {\n return {\n countryCode: vatTax.countryCode,\n value: vatTax.value,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { PostalAddressModel } from \"./postalAddress\";\nimport { createVatTaxDtoFromAdminVatTaxModel, VatTaxModel } from \"./vatTax\";\nimport { SupplierModel } from \"./supplier\";\nimport { OrganisationStatusModel } from \"./organisationStatus\";\nimport { UserAccountModel } from \"./userAccount\";\nimport { ImageModel } from \"./image\";\nimport { UserOrganisationModel } from \"./userOrganisation\";\nimport { TimezoneEnum } from \"@vini-wine/core-enums\";\nimport { OrganisationDto } from \"@vini-wine/core-dtos\";\nimport { IntegrationExactModel } from \"./integrationExact\";\nimport { PermissionModel } from \"./permission\";\nimport { PlanModel } from \"./plan\";\n\nexport interface OrganisationModel extends UUID {\n // available includes\n suppliers?: Partial<SupplierModel>[];\n billingPostalAddress?: PostalAddressModel;\n defaultShippingPostalAddress?: PostalAddressModel | null;\n organisationOwner?: Partial<UserAccountModel>;\n registeredBy?: Partial<UserAccountModel>;\n userOrganisations?: UserOrganisationModel[];\n avatar?: ImageModel | null;\n integrationExact?: IntegrationExactModel | null;\n permissions?: PermissionModel[];\n plan?: PlanModel;\n\n // transform\n name: string;\n legalName: string;\n vatTax: VatTaxModel;\n createdAt: Date;\n defaultTimezone: TimezoneEnum;\n status: OrganisationStatusModel;\n}\n\nexport const createOrganisationDtoFromAdminOrganisationModel = (\n organisation: OrganisationModel,\n): OrganisationDto => {\n return {\n defaultTimezone: organisation.defaultTimezone,\n legalName: organisation.legalName,\n name: organisation.name,\n uuid: organisation.uuid,\n vatTax: createVatTaxDtoFromAdminVatTaxModel(organisation.vatTax),\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport {\n createOrganisationDtoFromAdminOrganisationModel,\n OrganisationModel,\n} from \"./organisation\";\nimport { ContactPointModel } from \"./contactPoint\";\nimport { SupplierDto } from \"@vini-wine/core-dtos\";\nimport { SupplierStatusEnum } from \"@vini-wine/core-enums\";\n\nexport interface SupplierModel extends UUID {\n // transform\n isCustomer: boolean;\n name: string;\n createdAt: Date;\n status: {\n id: SupplierStatusEnum;\n };\n\n // available includes\n supplierOrganisation?: OrganisationModel;\n organisation?: OrganisationModel;\n primaryLogisticsContactPoint?: ContactPointModel | null;\n primarySalesContactPoint?: ContactPointModel | null;\n}\n\nexport const createSupplierDtoFromAdminSupplierModel = (\n supplier: SupplierModel,\n): SupplierDto => {\n return {\n name: supplier.name,\n uuid: supplier.uuid,\n supplierOrganisation: supplier.supplierOrganisation\n ? createOrganisationDtoFromAdminOrganisationModel(\n supplier.supplierOrganisation,\n )\n : undefined,\n };\n};\n","import {\n createOrganisationDtoFromAdminOrganisationModel,\n OrganisationModel,\n} from \"./organisation\";\nimport { SellerDto } from \"@vini-wine/core-dtos\";\n\nexport interface SellerModel {\n // available includes\n organisation?: OrganisationModel;\n}\n\nexport const createSellerDtoFromAdminSellerModel = (\n seller: SellerModel,\n): SellerDto => {\n return {\n uuid: seller.organisation ? seller.organisation.uuid : \"Not found\",\n name: seller.organisation?.name,\n organisation: seller.organisation\n ? createOrganisationDtoFromAdminOrganisationModel(seller.organisation)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { CountryModel, createCountryDtoFromAdminCountryModel } from \"./country\";\nimport { ImageModel } from \"./image\";\nimport { RegionDto } from \"@vini-wine/core-dtos\";\n\nexport interface RegionModel extends UUID {\n // default includes\n country: CountryModel;\n\n // available includes\n mappedItems?: any;\n parentRegion?: RegionModel | null;\n subRegions?: RegionModel[];\n images?: ImageModel[];\n\n // transform\n name: string;\n}\n\nexport const createRegionDtoFromAdminRegionModel = (\n region: RegionModel,\n): RegionDto => {\n return {\n uuid: region.uuid,\n name: region.name,\n country: createCountryDtoFromAdminCountryModel(region.country),\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { WineTypeDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineTypeModel extends UUID {\n // available includes\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineTypeDtoFromAdminWineTypeModel = (\n wineType: WineTypeModel,\n): WineTypeDto => {\n return {\n uuid: wineType.uuid,\n name: wineType.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { WineryDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineryModel extends UUID {\n // available includes\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineryDtoFromAdminWineryModel = (\n winery: WineryModel,\n): WineryDto => {\n return {\n uuid: winery.uuid,\n name: winery.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\n\nimport { createRegionDtoFromAdminRegionModel, RegionModel } from \"./region\";\nimport {\n createWineTypeDtoFromAdminWineTypeModel,\n WineTypeModel,\n} from \"./wineType\";\nimport { createWineryDtoFromAdminWineryModel, WineryModel } from \"./winery\";\nimport { WineDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineModel extends UUID {\n // available includes\n region?: RegionModel;\n wineType?: WineTypeModel;\n winery?: WineryModel;\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineDtoFromAdminWineModel = (wine: WineModel): WineDto => {\n return {\n uuid: wine.uuid,\n name: wine.name,\n wineType: wine.wineType\n ? createWineTypeDtoFromAdminWineTypeModel(wine.wineType)\n : undefined,\n region: wine.region\n ? createRegionDtoFromAdminRegionModel(wine.region)\n : undefined,\n winery: wine.winery\n ? createWineryDtoFromAdminWineryModel(wine.winery)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { createWineDtoFromAdminWineModel, WineModel } from \"./wine\";\nimport { VintageRatingModel } from \"./vintageRating\";\nimport { VintageScoreModel } from \"./vintageScore\";\nimport { ImageModel } from \"./image\";\nimport { VintageDto } from \"@vini-wine/core-dtos\";\n\nexport interface VintageModel extends UUID {\n // transform\n year: number;\n\n // default includes\n bottleImage: ImageModel | null;\n\n // available includes\n wine?: WineModel;\n mappedExternal1Rating?: VintageRatingModel | null;\n scores?: VintageScoreModel[];\n labelImage?: ImageModel | null;\n}\n\nexport const createVintageDtoFromAdminVintageModel = (\n vintage: VintageModel,\n): VintageDto => {\n return {\n uuid: vintage.uuid,\n year: vintage.year,\n wine: vintage.wine\n ? createWineDtoFromAdminWineModel(vintage.wine)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { createVintageDtoFromAdminVintageModel, VintageModel } from \"./vintage\";\nimport {\n B2bMarketPriceModel,\n createB2BMarketPriceDtoFromAdminB2BMarketPriceModel,\n} from \"./b2bMarketPrice\";\nimport { VintageProductDto } from \"@vini-wine/core-dtos\";\n\nexport interface VintageProductModel extends UUID {\n // transform\n milliliters: number;\n\n // available includes\n vintage?: VintageModel;\n b2bMarketPrice?: B2bMarketPriceModel | null;\n}\n\nexport const createVintageProductDtoFromAdminVintageProductModel = (\n vintageProduct: VintageProductModel,\n): VintageProductDto => {\n return {\n uuid: vintageProduct.uuid,\n milliliters: vintageProduct.milliliters,\n vintage: vintageProduct.vintage\n ? createVintageDtoFromAdminVintageModel(vintageProduct.vintage)\n : undefined,\n b2bMarketPrice: vintageProduct.b2bMarketPrice\n ? createB2BMarketPriceDtoFromAdminB2BMarketPriceModel(\n vintageProduct.b2bMarketPrice,\n )\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { UploadStatusEnum, UploadTypeEnum } from \"@vini-wine/core-enums\";\nimport { OrganisationModel } from \"./organisation\";\nimport { SupplierModel } from \"./supplier\";\nimport { UserAccountModel } from \"./userAccount\";\nimport { UploadVisibilityTypeModel } from \"./uploadVisibilityType\";\nimport { ImportFileHeaderModel } from \"./importFileHeader\";\nimport { UploadDto } from \"@vini-wine/core-dtos\";\n\nexport interface UploadModel extends UUID {\n // transform\n status: {\n id: UploadStatusEnum;\n statusUpdatedAt: Date;\n };\n type: {\n id: UploadTypeEnum;\n };\n name: string;\n validFrom: Date;\n validUntil: Date;\n numItems: number;\n createdAt: Date;\n\n // default includes\n organisation: OrganisationModel;\n organisationSupplier: SupplierModel;\n\n // available includes\n createdUser?: UserAccountModel;\n visibilityTypes?: UploadVisibilityTypeModel[];\n importFileHeaders?: ImportFileHeaderModel[];\n statusUpdatedBy?: UserAccountModel | null;\n}\n\nexport const createUploadDtoFromAdminUploadModel = (\n upload: UploadModel,\n): UploadDto => {\n return {\n uuid: upload.uuid,\n name: upload.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport {\n createSupplierDtoFromAdminSupplierModel,\n SupplierModel,\n} from \"./supplier\";\nimport { createSellerDtoFromAdminSellerModel, SellerModel } from \"./seller\";\nimport {\n createVintageProductDtoFromAdminVintageProductModel,\n VintageProductModel,\n} from \"./vintageProduct\";\nimport { createPriceDtoFromAdminPriceModel, PriceModel } from \"./price\";\nimport { createUploadDtoFromAdminUploadModel, UploadModel } from \"./upload\";\nimport { PackageEnum } from \"@vini-wine/core-enums\";\nimport { CountryModel, createCountryDtoFromAdminCountryModel } from \"./country\";\nimport { OfferDto, VintageProductDto } from \"@vini-wine/core-dtos\";\n\nexport interface OfferModel extends UUID {\n // default includes\n price: PriceModel | null;\n\n // available includes\n supplier?: SupplierModel | null;\n seller?: SellerModel;\n vintageProducts?: VintageProductModel[];\n upload?: UploadModel;\n shippedFromCountry?: CountryModel | null;\n\n // transform\n quantity: number;\n package: PackageEnum | null;\n createdAt: Date;\n}\n\nexport const createOfferDtoFromAdminOfferModel = (\n offer: OfferModel,\n): OfferDto => {\n const vintageProducts: VintageProductDto[] = [];\n if (offer.vintageProducts && offer.vintageProducts.length) {\n for (let i = 0; i < offer.vintageProducts.length; i += 1) {\n vintageProducts.push(\n createVintageProductDtoFromAdminVintageProductModel(\n offer.vintageProducts[i],\n ),\n );\n }\n }\n\n return {\n uuid: offer.uuid,\n createdAt: offer.createdAt,\n package: offer.package,\n price: offer.price ? createPriceDtoFromAdminPriceModel(offer.price) : null,\n quantity: offer.quantity,\n seller: offer.seller\n ? createSellerDtoFromAdminSellerModel(offer.seller)\n : undefined,\n supplier: offer.supplier\n ? createSupplierDtoFromAdminSupplierModel(offer.supplier)\n : undefined,\n shippedFromCountry: offer.shippedFromCountry\n ? createCountryDtoFromAdminCountryModel(offer.shippedFromCountry)\n : undefined,\n vintageProducts,\n upload: offer.upload\n ? createUploadDtoFromAdminUploadModel(offer.upload)\n : undefined,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACaO,IAAM,oCAAoC,CAC/C,UACa;AACb,SAAO;AAAA,IACL,aAAa,MAAM;AAAA,IACnB,UAAU,MAAM;AAAA,IAChB,YAAY;AAAA,MACV,IAAI,MAAM,aAAa,MAAM,WAAW,KAAK;AAAA,IAC/C;AAAA,EACF;AACF;;;ACZO,IAAM,sDAAsD,CACjE,mBACsB;AACtB,SAAO;AAAA,IACL,OAAO,eAAe,QAClB,kCAAkC,eAAe,KAAK,IACtD;AAAA,IACJ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AChD;AAAA,IACJ,UAAU,MAAM,WACZ,wCAAwC,MAAM,QAAQ,IACtD;AAAA,IACJ,oBAAoB,MAAM,qBACtB,sCAAsC,MAAM,kBAAkB,IAC9D;AAAA,IACJ;AAAA,IACA,QAAQ,MAAM,SACV,oCAAoC,MAAM,MAAM,IAChD;AAAA,EACN;AACF;","names":[]}
package/dist/index.mjs CHANGED
@@ -24,9 +24,6 @@ var createCountryDtoFromAdminCountryModel = (country) => {
24
24
  };
25
25
  };
26
26
 
27
- // src/index.ts
28
- import { DocumentTypeEnum } from "@vini-wine/core-enums";
29
-
30
27
  // src/models/vatTax.ts
31
28
  var createVatTaxDtoFromAdminVatTaxModel = (vatTax) => {
32
29
  return {
@@ -158,7 +155,6 @@ var createOfferDtoFromAdminOfferModel = (offer) => {
158
155
  };
159
156
  };
160
157
  export {
161
- DocumentTypeEnum,
162
158
  createB2BMarketPriceDtoFromAdminB2BMarketPriceModel,
163
159
  createCountryDtoFromAdminCountryModel,
164
160
  createOfferDtoFromAdminOfferModel,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/models/price.ts","../src/models/b2bMarketPrice.ts","../src/models/country.ts","../src/index.ts","../src/models/vatTax.ts","../src/models/organisation.ts","../src/models/supplier.ts","../src/models/seller.ts","../src/models/region.ts","../src/models/wineType.ts","../src/models/winery.ts","../src/models/wine.ts","../src/models/vintage.ts","../src/models/vintageProduct.ts","../src/models/upload.ts","../src/models/offer.ts"],"sourcesContent":["import {\n CurrencyCodeEnum,\n UploadVisibilityTypeEnum,\n} from \"@vini-wine/core-enums\";\nimport { PriceDto } from \"@vini-wine/core-dtos\";\n\nexport interface PriceModel {\n // transform\n priceMicros: number;\n currency: CurrencyCodeEnum;\n visibility: { id: UploadVisibilityTypeEnum };\n}\n\nexport const createPriceDtoFromAdminPriceModel = (\n price: PriceModel,\n): PriceDto => {\n return {\n priceMicros: price.priceMicros,\n currency: price.currency,\n visibility: {\n id: price.visibility ? price.visibility.id : null,\n },\n };\n};\n","import { createPriceDtoFromAdminPriceModel, PriceModel } from \"./price\";\nimport { B2bMarketPriceDto } from \"@vini-wine/core-dtos\";\n\nexport interface B2bMarketPriceModel {\n // default includes\n price: PriceModel | null;\n\n // transform\n updatedAt: Date;\n}\n\nexport const createB2BMarketPriceDtoFromAdminB2BMarketPriceModel = (\n b2bMarketPrice: B2bMarketPriceModel,\n): B2bMarketPriceDto => {\n return {\n price: b2bMarketPrice.price\n ? createPriceDtoFromAdminPriceModel(b2bMarketPrice.price)\n : null,\n updatedAt: b2bMarketPrice.updatedAt,\n };\n};\n","import { CountryEnum } from \"@vini-wine/core-enums\";\nimport { CountryDto } from \"@vini-wine/core-dtos\";\n\nexport interface CountryModel {\n // transform\n codeAlpha2: CountryEnum;\n codeAlpha3: string;\n codeUn: string;\n}\n\nexport const createCountryDtoFromAdminCountryModel = (\n country: CountryModel,\n): CountryDto => {\n return {\n codeAlpha2: country.codeAlpha2,\n };\n};\n","import { B2bMarketPriceModel } from \"./models/b2bMarketPrice\";\nimport { B2bMarketPriceUploadModel } from \"./models/b2bMarketPriceUpload\";\nimport { ContactPointModel } from \"./models/contactPoint\";\nimport { ContactRequestModel } from \"./models/contactRequest\";\nimport { ContactTypeModel } from \"./models/contactType\";\nimport { CountryModel } from \"./models/country\";\nimport { CurrencyRateModel } from \"./models/currencyRate\";\nimport { CustomerModel } from \"./models/customer\";\nimport { DocumentTypeEnum } from \"@vini-wine/core-enums\";\nimport { FilterCriteriaModel } from \"./models/filterCriteria\";\nimport { GenderModel } from \"./models/gender\";\nimport { ImageModel } from \"./models/image\";\nimport { ImageImageTypeCropPropertyModel } from \"./models/imageImageTypeCropProperty\";\nimport { ImageTypeModel } from \"./models/imageType\";\nimport { ImageVariationModel } from \"./models/imageVariation\";\nimport { ImportFileHeaderModel } from \"./models/importFileHeader\";\nimport { ImportResolvedFileHeaderValueModel } from \"./models/importResolvedFileHeaderValue\";\nimport { InboundEmailModel } from \"./models/inboundEmail\";\nimport { InboundEmailFileModel } from \"./models/inboundEmailFile\";\nimport { InboundEmailParsedModel } from \"./models/inboundEmailParsed\";\nimport { IntegrationExactModel } from \"./models/integrationExact\";\nimport { IntegrationExactItemModel } from \"./models/integrationExactItem\";\nimport { IntegrationExactSalesOrderModel } from \"./models/integrationExactSalesOrder\";\nimport { IntegrationExactSalesOrderLineModel } from \"./models/integrationExactSalesOrderLine\";\nimport { IntegrationExactWebhookLogModel } from \"./models/integrationExactWebhookLog\";\nimport { MarginMarketModel } from \"./models/marginMarket\";\nimport { MarginOrganisationModel } from \"./models/marginOrganisation\";\nimport { NotificationModel } from \"./models/notification\";\nimport { NotificationChannelModel } from \"./models/notificationChannel\";\nimport { NotificationTypeModel } from \"./models/notificationType\";\nimport { OfferModel } from \"./models/offer\";\nimport { OfferAlertModel } from \"./models/offerAlert\";\nimport { OfferAlertTimelineModel } from \"./models/offerAlertTimeline\";\nimport { OfferRequestModel } from \"./models/offerRequest\";\nimport { OfferRequestOptionModel } from \"./models/offerRequestOption\";\nimport { OfferRequestStatusModel } from \"./models/offerRequestStatus\";\nimport { OfferRequestTimelineModel } from \"./models/offerRequestTimeline\";\nimport { OrderModel } from \"./models/order\";\nimport { OrderItemModel } from \"./models/orderItem\";\nimport { OrderItemPurchaseModel } from \"./models/orderItemPurchase\";\nimport { OrganisationModel } from \"./models/organisation\";\nimport { OrganisationUserInvitationStatusModel } from \"./models/organisationUserInvitationStatus\";\nimport { PermissionModel } from \"./models/permission\";\nimport { PersonModel } from \"./models/person\";\nimport { PlanModel } from \"./models/plan\";\nimport { PlanAlertModel } from \"./models/planAlert\";\nimport { PlanDataRetentionModel } from \"./models/planDataRetention\";\nimport { PlanUploadModel } from \"./models/planUpload\";\nimport { PlanUploadServiceModel } from \"./models/planUploadService\";\nimport { PlanUserOrganisationModel } from \"./models/planUserOrganisation\";\nimport { PostalAddressModel } from \"./models/postalAddress\";\nimport { PriceModel } from \"./models/price\";\nimport { PricingPlanModel } from \"./models/pricingPlan\";\nimport { PricingPlanFeatureModel } from \"./models/pricingPlanFeature\";\nimport { RegionModel } from \"./models/region\";\nimport { RoleModel } from \"./models/role\";\nimport { SellerModel } from \"./models/seller\";\nimport { SupplierModel } from \"./models/supplier\";\nimport { TelephoneModel } from \"./models/telephone\";\nimport { UploadModel } from \"./models/upload\";\nimport { UploadVisibilityTypeModel } from \"./models/uploadVisibilityType\";\nimport { UserAccountModel } from \"./models/userAccount\";\nimport { OrganisationUserInvitationModel } from \"./models/organisationUserInvitation\";\nimport { UserOrganisationModel } from \"./models/userOrganisation\";\nimport { UserOrganisationClaimRequestModel } from \"./models/userOrganisationClaimRequest\";\nimport { UserOrganisationStatusModel } from \"./models/userOrganisationStatus\";\nimport { UserStatusModel } from \"./models/userStatus\";\nimport { VatTaxModel } from \"./models/vatTax\";\nimport { VintageModel } from \"./models/vintage\";\nimport { VintageProductModel } from \"./models/vintageProduct\";\nimport { VintageRatingModel } from \"./models/vintageRating\";\nimport { VintageScoreModel } from \"./models/vintageScore\";\nimport { VintageScoreAuthorModel } from \"./models/vintageScoreAuthor\";\nimport { VintageScoreUploadModel } from \"./models/vintageScoreUpload\";\nimport { WineModel } from \"./models/wine\";\nimport { WineryModel } from \"./models/winery\";\nimport { WineTypeModel } from \"./models/wineType\";\n\n// transformers from models to dto\nimport { createB2BMarketPriceDtoFromAdminB2BMarketPriceModel } from \"./models/b2bMarketPrice\";\nimport { createCountryDtoFromAdminCountryModel } from \"./models/country\";\nimport { createOfferDtoFromAdminOfferModel } from \"./models/offer\";\nimport { createOrganisationDtoFromAdminOrganisationModel } from \"./models/organisation\";\nimport { createPriceDtoFromAdminPriceModel } from \"./models/price\";\nimport { createRegionDtoFromAdminRegionModel } from \"./models/region\";\nimport { createSellerDtoFromAdminSellerModel } from \"./models/seller\";\nimport { createSupplierDtoFromAdminSupplierModel } from \"./models/supplier\";\nimport { createUploadDtoFromAdminUploadModel } from \"./models/upload\";\nimport { createVatTaxDtoFromAdminVatTaxModel } from \"./models/vatTax\";\nimport { createVintageDtoFromAdminVintageModel } from \"./models/vintage\";\nimport { createVintageProductDtoFromAdminVintageProductModel } from \"./models/vintageProduct\";\nimport { createWineDtoFromAdminWineModel } from \"./models/wine\";\nimport { createWineryDtoFromAdminWineryModel } from \"./models/winery\";\nimport { createWineTypeDtoFromAdminWineTypeModel } from \"./models/wineType\";\n\nexport {\n B2bMarketPriceModel,\n B2bMarketPriceUploadModel,\n ContactPointModel,\n ContactRequestModel,\n ContactTypeModel,\n CountryModel,\n CurrencyRateModel,\n CustomerModel,\n DocumentTypeEnum,\n FilterCriteriaModel,\n GenderModel,\n ImageModel,\n ImageTypeModel,\n ImageImageTypeCropPropertyModel,\n ImageVariationModel,\n ImportFileHeaderModel,\n ImportResolvedFileHeaderValueModel,\n InboundEmailModel,\n InboundEmailFileModel,\n InboundEmailParsedModel,\n IntegrationExactModel,\n IntegrationExactItemModel,\n IntegrationExactSalesOrderModel,\n IntegrationExactSalesOrderLineModel,\n IntegrationExactWebhookLogModel,\n MarginMarketModel,\n MarginOrganisationModel,\n NotificationModel,\n NotificationChannelModel,\n NotificationTypeModel,\n OfferModel,\n OfferAlertModel,\n OfferAlertTimelineModel,\n OfferRequestModel,\n OfferRequestOptionModel,\n OfferRequestStatusModel,\n OfferRequestTimelineModel,\n OrderModel,\n OrderItemModel,\n OrderItemPurchaseModel,\n OrganisationModel,\n OrganisationUserInvitationStatusModel,\n PermissionModel,\n PersonModel,\n PlanModel,\n PlanAlertModel,\n PlanDataRetentionModel,\n PlanUploadModel,\n PlanUploadServiceModel,\n PlanUserOrganisationModel,\n PostalAddressModel,\n PriceModel,\n PricingPlanModel,\n PricingPlanFeatureModel,\n RegionModel,\n RoleModel,\n SellerModel,\n SupplierModel,\n TelephoneModel,\n UploadModel,\n UploadVisibilityTypeModel,\n UserAccountModel,\n OrganisationUserInvitationModel,\n UserOrganisationModel,\n UserOrganisationClaimRequestModel,\n UserOrganisationStatusModel,\n UserStatusModel,\n VatTaxModel,\n VintageModel,\n VintageProductModel,\n VintageRatingModel,\n VintageScoreModel,\n VintageScoreAuthorModel,\n VintageScoreUploadModel,\n WineModel,\n WineryModel,\n WineTypeModel,\n\n // transformers from models to dto\n createB2BMarketPriceDtoFromAdminB2BMarketPriceModel,\n createCountryDtoFromAdminCountryModel,\n createOfferDtoFromAdminOfferModel,\n createOrganisationDtoFromAdminOrganisationModel,\n createPriceDtoFromAdminPriceModel,\n createRegionDtoFromAdminRegionModel,\n createSellerDtoFromAdminSellerModel,\n createSupplierDtoFromAdminSupplierModel,\n createUploadDtoFromAdminUploadModel,\n createVatTaxDtoFromAdminVatTaxModel,\n createVintageDtoFromAdminVintageModel,\n createVintageProductDtoFromAdminVintageProductModel,\n createWineDtoFromAdminWineModel,\n createWineryDtoFromAdminWineryModel,\n createWineTypeDtoFromAdminWineTypeModel,\n};\n","import { CountryEnum } from \"@vini-wine/core-enums\";\nimport { VatTaxDto } from \"@vini-wine/core-dtos\";\n\nexport interface VatTaxModel {\n countryCode: CountryEnum;\n value: string;\n}\n\nexport const createVatTaxDtoFromAdminVatTaxModel = (\n vatTax: VatTaxModel,\n): VatTaxDto => {\n return {\n countryCode: vatTax.countryCode,\n value: vatTax.value,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { PostalAddressModel } from \"./postalAddress\";\nimport { createVatTaxDtoFromAdminVatTaxModel, VatTaxModel } from \"./vatTax\";\nimport { SupplierModel } from \"./supplier\";\nimport { OrganisationStatusModel } from \"./organisationStatus\";\nimport { UserAccountModel } from \"./userAccount\";\nimport { ImageModel } from \"./image\";\nimport { UserOrganisationModel } from \"./userOrganisation\";\nimport { TimezoneEnum } from \"@vini-wine/core-enums\";\nimport { OrganisationDto } from \"@vini-wine/core-dtos\";\nimport { IntegrationExactModel } from \"./integrationExact\";\nimport { PermissionModel } from \"./permission\";\nimport { PlanModel } from \"./plan\";\n\nexport interface OrganisationModel extends UUID {\n // available includes\n suppliers?: Partial<SupplierModel>[];\n billingPostalAddress?: PostalAddressModel;\n defaultShippingPostalAddress?: PostalAddressModel | null;\n organisationOwner?: Partial<UserAccountModel>;\n registeredBy?: Partial<UserAccountModel>;\n userOrganisations?: UserOrganisationModel[];\n avatar?: ImageModel | null;\n integrationExact?: IntegrationExactModel | null;\n permissions?: PermissionModel[];\n plan?: PlanModel;\n\n // transform\n name: string;\n legalName: string;\n vatTax: VatTaxModel;\n createdAt: Date;\n defaultTimezone: TimezoneEnum;\n status: OrganisationStatusModel;\n}\n\nexport const createOrganisationDtoFromAdminOrganisationModel = (\n organisation: OrganisationModel,\n): OrganisationDto => {\n return {\n defaultTimezone: organisation.defaultTimezone,\n legalName: organisation.legalName,\n name: organisation.name,\n uuid: organisation.uuid,\n vatTax: createVatTaxDtoFromAdminVatTaxModel(organisation.vatTax),\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport {\n createOrganisationDtoFromAdminOrganisationModel,\n OrganisationModel,\n} from \"./organisation\";\nimport { ContactPointModel } from \"./contactPoint\";\nimport { SupplierDto } from \"@vini-wine/core-dtos\";\nimport { SupplierStatusEnum } from \"@vini-wine/core-enums\";\n\nexport interface SupplierModel extends UUID {\n // transform\n isCustomer: boolean;\n name: string;\n createdAt: Date;\n status: {\n id: SupplierStatusEnum;\n };\n\n // available includes\n supplierOrganisation?: OrganisationModel;\n organisation?: OrganisationModel;\n primaryLogisticsContactPoint?: ContactPointModel | null;\n primarySalesContactPoint?: ContactPointModel | null;\n}\n\nexport const createSupplierDtoFromAdminSupplierModel = (\n supplier: SupplierModel,\n): SupplierDto => {\n return {\n name: supplier.name,\n uuid: supplier.uuid,\n supplierOrganisation: supplier.supplierOrganisation\n ? createOrganisationDtoFromAdminOrganisationModel(\n supplier.supplierOrganisation,\n )\n : undefined,\n };\n};\n","import {\n createOrganisationDtoFromAdminOrganisationModel,\n OrganisationModel,\n} from \"./organisation\";\nimport { SellerDto } from \"@vini-wine/core-dtos\";\n\nexport interface SellerModel {\n // available includes\n organisation?: OrganisationModel;\n}\n\nexport const createSellerDtoFromAdminSellerModel = (\n seller: SellerModel,\n): SellerDto => {\n return {\n uuid: seller.organisation ? seller.organisation.uuid : \"Not found\",\n name: seller.organisation?.name,\n organisation: seller.organisation\n ? createOrganisationDtoFromAdminOrganisationModel(seller.organisation)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { CountryModel, createCountryDtoFromAdminCountryModel } from \"./country\";\nimport { ImageModel } from \"./image\";\nimport { RegionDto } from \"@vini-wine/core-dtos\";\n\nexport interface RegionModel extends UUID {\n // default includes\n country: CountryModel;\n\n // available includes\n mappedItems?: any;\n parentRegion?: RegionModel | null;\n subRegions?: RegionModel[];\n images?: ImageModel[];\n\n // transform\n name: string;\n}\n\nexport const createRegionDtoFromAdminRegionModel = (\n region: RegionModel,\n): RegionDto => {\n return {\n uuid: region.uuid,\n name: region.name,\n country: createCountryDtoFromAdminCountryModel(region.country),\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { WineTypeDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineTypeModel extends UUID {\n // available includes\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineTypeDtoFromAdminWineTypeModel = (\n wineType: WineTypeModel,\n): WineTypeDto => {\n return {\n uuid: wineType.uuid,\n name: wineType.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { WineryDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineryModel extends UUID {\n // available includes\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineryDtoFromAdminWineryModel = (\n winery: WineryModel,\n): WineryDto => {\n return {\n uuid: winery.uuid,\n name: winery.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\n\nimport { createRegionDtoFromAdminRegionModel, RegionModel } from \"./region\";\nimport {\n createWineTypeDtoFromAdminWineTypeModel,\n WineTypeModel,\n} from \"./wineType\";\nimport { createWineryDtoFromAdminWineryModel, WineryModel } from \"./winery\";\nimport { WineDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineModel extends UUID {\n // available includes\n region?: RegionModel;\n wineType?: WineTypeModel;\n winery?: WineryModel;\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineDtoFromAdminWineModel = (wine: WineModel): WineDto => {\n return {\n uuid: wine.uuid,\n name: wine.name,\n wineType: wine.wineType\n ? createWineTypeDtoFromAdminWineTypeModel(wine.wineType)\n : undefined,\n region: wine.region\n ? createRegionDtoFromAdminRegionModel(wine.region)\n : undefined,\n winery: wine.winery\n ? createWineryDtoFromAdminWineryModel(wine.winery)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { createWineDtoFromAdminWineModel, WineModel } from \"./wine\";\nimport { VintageRatingModel } from \"./vintageRating\";\nimport { VintageScoreModel } from \"./vintageScore\";\nimport { ImageModel } from \"./image\";\nimport { VintageDto } from \"@vini-wine/core-dtos\";\n\nexport interface VintageModel extends UUID {\n // transform\n year: number;\n\n // default includes\n bottleImage: ImageModel | null;\n\n // available includes\n wine?: WineModel;\n mappedExternal1Rating?: VintageRatingModel | null;\n scores?: VintageScoreModel[];\n labelImage?: ImageModel | null;\n}\n\nexport const createVintageDtoFromAdminVintageModel = (\n vintage: VintageModel,\n): VintageDto => {\n return {\n uuid: vintage.uuid,\n year: vintage.year,\n wine: vintage.wine\n ? createWineDtoFromAdminWineModel(vintage.wine)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { createVintageDtoFromAdminVintageModel, VintageModel } from \"./vintage\";\nimport {\n B2bMarketPriceModel,\n createB2BMarketPriceDtoFromAdminB2BMarketPriceModel,\n} from \"./b2bMarketPrice\";\nimport { VintageProductDto } from \"@vini-wine/core-dtos\";\n\nexport interface VintageProductModel extends UUID {\n // transform\n milliliters: number;\n\n // available includes\n vintage?: VintageModel;\n b2bMarketPrice?: B2bMarketPriceModel | null;\n}\n\nexport const createVintageProductDtoFromAdminVintageProductModel = (\n vintageProduct: VintageProductModel,\n): VintageProductDto => {\n return {\n uuid: vintageProduct.uuid,\n milliliters: vintageProduct.milliliters,\n vintage: vintageProduct.vintage\n ? createVintageDtoFromAdminVintageModel(vintageProduct.vintage)\n : undefined,\n b2bMarketPrice: vintageProduct.b2bMarketPrice\n ? createB2BMarketPriceDtoFromAdminB2BMarketPriceModel(\n vintageProduct.b2bMarketPrice,\n )\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { UploadStatusEnum, UploadTypeEnum } from \"@vini-wine/core-enums\";\nimport { OrganisationModel } from \"./organisation\";\nimport { SupplierModel } from \"./supplier\";\nimport { UserAccountModel } from \"./userAccount\";\nimport { UploadVisibilityTypeModel } from \"./uploadVisibilityType\";\nimport { ImportFileHeaderModel } from \"./importFileHeader\";\nimport { UploadDto } from \"@vini-wine/core-dtos\";\n\nexport interface UploadModel extends UUID {\n // transform\n status: {\n id: UploadStatusEnum;\n statusUpdatedAt: Date;\n };\n type: {\n id: UploadTypeEnum;\n };\n name: string;\n validFrom: Date;\n validUntil: Date;\n numItems: number;\n createdAt: Date;\n\n // default includes\n organisation: OrganisationModel;\n organisationSupplier: SupplierModel;\n\n // available includes\n createdUser?: UserAccountModel;\n visibilityTypes?: UploadVisibilityTypeModel[];\n importFileHeaders?: ImportFileHeaderModel[];\n statusUpdatedBy?: UserAccountModel | null;\n}\n\nexport const createUploadDtoFromAdminUploadModel = (\n upload: UploadModel,\n): UploadDto => {\n return {\n uuid: upload.uuid,\n name: upload.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport {\n createSupplierDtoFromAdminSupplierModel,\n SupplierModel,\n} from \"./supplier\";\nimport { createSellerDtoFromAdminSellerModel, SellerModel } from \"./seller\";\nimport {\n createVintageProductDtoFromAdminVintageProductModel,\n VintageProductModel,\n} from \"./vintageProduct\";\nimport { createPriceDtoFromAdminPriceModel, PriceModel } from \"./price\";\nimport { createUploadDtoFromAdminUploadModel, UploadModel } from \"./upload\";\nimport { PackageEnum } from \"@vini-wine/core-enums\";\nimport { CountryModel, createCountryDtoFromAdminCountryModel } from \"./country\";\nimport { OfferDto, VintageProductDto } from \"@vini-wine/core-dtos\";\n\nexport interface OfferModel extends UUID {\n // default includes\n price: PriceModel | null;\n\n // available includes\n supplier?: SupplierModel | null;\n seller?: SellerModel;\n vintageProducts?: VintageProductModel[];\n upload?: UploadModel;\n shippedFromCountry?: CountryModel | null;\n\n // transform\n quantity: number;\n package: PackageEnum | null;\n createdAt: Date;\n}\n\nexport const createOfferDtoFromAdminOfferModel = (\n offer: OfferModel,\n): OfferDto => {\n const vintageProducts: VintageProductDto[] = [];\n if (offer.vintageProducts && offer.vintageProducts.length) {\n for (let i = 0; i < offer.vintageProducts.length; i += 1) {\n vintageProducts.push(\n createVintageProductDtoFromAdminVintageProductModel(\n offer.vintageProducts[i],\n ),\n );\n }\n }\n\n return {\n uuid: offer.uuid,\n createdAt: offer.createdAt,\n package: offer.package,\n price: offer.price ? createPriceDtoFromAdminPriceModel(offer.price) : null,\n quantity: offer.quantity,\n seller: offer.seller\n ? createSellerDtoFromAdminSellerModel(offer.seller)\n : undefined,\n supplier: offer.supplier\n ? createSupplierDtoFromAdminSupplierModel(offer.supplier)\n : undefined,\n shippedFromCountry: offer.shippedFromCountry\n ? createCountryDtoFromAdminCountryModel(offer.shippedFromCountry)\n : undefined,\n vintageProducts,\n upload: offer.upload\n ? createUploadDtoFromAdminUploadModel(offer.upload)\n : undefined,\n };\n};\n"],"mappings":";AAaO,IAAM,oCAAoC,CAC/C,UACa;AACb,SAAO;AAAA,IACL,aAAa,MAAM;AAAA,IACnB,UAAU,MAAM;AAAA,IAChB,YAAY;AAAA,MACV,IAAI,MAAM,aAAa,MAAM,WAAW,KAAK;AAAA,IAC/C;AAAA,EACF;AACF;;;ACZO,IAAM,sDAAsD,CACjE,mBACsB;AACtB,SAAO;AAAA,IACL,OAAO,eAAe,QAClB,kCAAkC,eAAe,KAAK,IACtD;AAAA,IACJ,WAAW,eAAe;AAAA,EAC5B;AACF;;;ACVO,IAAM,wCAAwC,CACnD,YACe;AACf,SAAO;AAAA,IACL,YAAY,QAAQ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BAAoB,MAAM,qBACtB,sCAAsC,MAAM,kBAAkB,IAC9D;AAAA,IACJ;AAAA,IACA,QAAQ,MAAM,SACV,oCAAoC,MAAM,MAAM,IAChD;AAAA,EACN;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/models/price.ts","../src/models/b2bMarketPrice.ts","../src/models/country.ts","../src/models/vatTax.ts","../src/models/organisation.ts","../src/models/supplier.ts","../src/models/seller.ts","../src/models/region.ts","../src/models/wineType.ts","../src/models/winery.ts","../src/models/wine.ts","../src/models/vintage.ts","../src/models/vintageProduct.ts","../src/models/upload.ts","../src/models/offer.ts"],"sourcesContent":["import {\n CurrencyCodeEnum,\n UploadVisibilityTypeEnum,\n} from \"@vini-wine/core-enums\";\nimport { PriceDto } from \"@vini-wine/core-dtos\";\n\nexport interface PriceModel {\n // transform\n priceMicros: number;\n currency: CurrencyCodeEnum;\n visibility: { id: UploadVisibilityTypeEnum };\n}\n\nexport const createPriceDtoFromAdminPriceModel = (\n price: PriceModel,\n): PriceDto => {\n return {\n priceMicros: price.priceMicros,\n currency: price.currency,\n visibility: {\n id: price.visibility ? price.visibility.id : null,\n },\n };\n};\n","import { createPriceDtoFromAdminPriceModel, PriceModel } from \"./price\";\nimport { B2bMarketPriceDto } from \"@vini-wine/core-dtos\";\n\nexport interface B2bMarketPriceModel {\n // default includes\n price: PriceModel | null;\n\n // transform\n updatedAt: Date;\n}\n\nexport const createB2BMarketPriceDtoFromAdminB2BMarketPriceModel = (\n b2bMarketPrice: B2bMarketPriceModel,\n): B2bMarketPriceDto => {\n return {\n price: b2bMarketPrice.price\n ? createPriceDtoFromAdminPriceModel(b2bMarketPrice.price)\n : null,\n updatedAt: b2bMarketPrice.updatedAt,\n };\n};\n","import { CountryEnum } from \"@vini-wine/core-enums\";\nimport { CountryDto } from \"@vini-wine/core-dtos\";\n\nexport interface CountryModel {\n // transform\n codeAlpha2: CountryEnum;\n codeAlpha3: string;\n codeUn: string;\n}\n\nexport const createCountryDtoFromAdminCountryModel = (\n country: CountryModel,\n): CountryDto => {\n return {\n codeAlpha2: country.codeAlpha2,\n };\n};\n","import { CountryEnum } from \"@vini-wine/core-enums\";\nimport { VatTaxDto } from \"@vini-wine/core-dtos\";\n\nexport interface VatTaxModel {\n countryCode: CountryEnum;\n value: string;\n}\n\nexport const createVatTaxDtoFromAdminVatTaxModel = (\n vatTax: VatTaxModel,\n): VatTaxDto => {\n return {\n countryCode: vatTax.countryCode,\n value: vatTax.value,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { PostalAddressModel } from \"./postalAddress\";\nimport { createVatTaxDtoFromAdminVatTaxModel, VatTaxModel } from \"./vatTax\";\nimport { SupplierModel } from \"./supplier\";\nimport { OrganisationStatusModel } from \"./organisationStatus\";\nimport { UserAccountModel } from \"./userAccount\";\nimport { ImageModel } from \"./image\";\nimport { UserOrganisationModel } from \"./userOrganisation\";\nimport { TimezoneEnum } from \"@vini-wine/core-enums\";\nimport { OrganisationDto } from \"@vini-wine/core-dtos\";\nimport { IntegrationExactModel } from \"./integrationExact\";\nimport { PermissionModel } from \"./permission\";\nimport { PlanModel } from \"./plan\";\n\nexport interface OrganisationModel extends UUID {\n // available includes\n suppliers?: Partial<SupplierModel>[];\n billingPostalAddress?: PostalAddressModel;\n defaultShippingPostalAddress?: PostalAddressModel | null;\n organisationOwner?: Partial<UserAccountModel>;\n registeredBy?: Partial<UserAccountModel>;\n userOrganisations?: UserOrganisationModel[];\n avatar?: ImageModel | null;\n integrationExact?: IntegrationExactModel | null;\n permissions?: PermissionModel[];\n plan?: PlanModel;\n\n // transform\n name: string;\n legalName: string;\n vatTax: VatTaxModel;\n createdAt: Date;\n defaultTimezone: TimezoneEnum;\n status: OrganisationStatusModel;\n}\n\nexport const createOrganisationDtoFromAdminOrganisationModel = (\n organisation: OrganisationModel,\n): OrganisationDto => {\n return {\n defaultTimezone: organisation.defaultTimezone,\n legalName: organisation.legalName,\n name: organisation.name,\n uuid: organisation.uuid,\n vatTax: createVatTaxDtoFromAdminVatTaxModel(organisation.vatTax),\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport {\n createOrganisationDtoFromAdminOrganisationModel,\n OrganisationModel,\n} from \"./organisation\";\nimport { ContactPointModel } from \"./contactPoint\";\nimport { SupplierDto } from \"@vini-wine/core-dtos\";\nimport { SupplierStatusEnum } from \"@vini-wine/core-enums\";\n\nexport interface SupplierModel extends UUID {\n // transform\n isCustomer: boolean;\n name: string;\n createdAt: Date;\n status: {\n id: SupplierStatusEnum;\n };\n\n // available includes\n supplierOrganisation?: OrganisationModel;\n organisation?: OrganisationModel;\n primaryLogisticsContactPoint?: ContactPointModel | null;\n primarySalesContactPoint?: ContactPointModel | null;\n}\n\nexport const createSupplierDtoFromAdminSupplierModel = (\n supplier: SupplierModel,\n): SupplierDto => {\n return {\n name: supplier.name,\n uuid: supplier.uuid,\n supplierOrganisation: supplier.supplierOrganisation\n ? createOrganisationDtoFromAdminOrganisationModel(\n supplier.supplierOrganisation,\n )\n : undefined,\n };\n};\n","import {\n createOrganisationDtoFromAdminOrganisationModel,\n OrganisationModel,\n} from \"./organisation\";\nimport { SellerDto } from \"@vini-wine/core-dtos\";\n\nexport interface SellerModel {\n // available includes\n organisation?: OrganisationModel;\n}\n\nexport const createSellerDtoFromAdminSellerModel = (\n seller: SellerModel,\n): SellerDto => {\n return {\n uuid: seller.organisation ? seller.organisation.uuid : \"Not found\",\n name: seller.organisation?.name,\n organisation: seller.organisation\n ? createOrganisationDtoFromAdminOrganisationModel(seller.organisation)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { CountryModel, createCountryDtoFromAdminCountryModel } from \"./country\";\nimport { ImageModel } from \"./image\";\nimport { RegionDto } from \"@vini-wine/core-dtos\";\n\nexport interface RegionModel extends UUID {\n // default includes\n country: CountryModel;\n\n // available includes\n mappedItems?: any;\n parentRegion?: RegionModel | null;\n subRegions?: RegionModel[];\n images?: ImageModel[];\n\n // transform\n name: string;\n}\n\nexport const createRegionDtoFromAdminRegionModel = (\n region: RegionModel,\n): RegionDto => {\n return {\n uuid: region.uuid,\n name: region.name,\n country: createCountryDtoFromAdminCountryModel(region.country),\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { WineTypeDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineTypeModel extends UUID {\n // available includes\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineTypeDtoFromAdminWineTypeModel = (\n wineType: WineTypeModel,\n): WineTypeDto => {\n return {\n uuid: wineType.uuid,\n name: wineType.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { WineryDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineryModel extends UUID {\n // available includes\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineryDtoFromAdminWineryModel = (\n winery: WineryModel,\n): WineryDto => {\n return {\n uuid: winery.uuid,\n name: winery.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\n\nimport { createRegionDtoFromAdminRegionModel, RegionModel } from \"./region\";\nimport {\n createWineTypeDtoFromAdminWineTypeModel,\n WineTypeModel,\n} from \"./wineType\";\nimport { createWineryDtoFromAdminWineryModel, WineryModel } from \"./winery\";\nimport { WineDto } from \"@vini-wine/core-dtos\";\n\nexport interface WineModel extends UUID {\n // available includes\n region?: RegionModel;\n wineType?: WineTypeModel;\n winery?: WineryModel;\n mappedItems?: any;\n\n // transform\n name: string;\n}\n\nexport const createWineDtoFromAdminWineModel = (wine: WineModel): WineDto => {\n return {\n uuid: wine.uuid,\n name: wine.name,\n wineType: wine.wineType\n ? createWineTypeDtoFromAdminWineTypeModel(wine.wineType)\n : undefined,\n region: wine.region\n ? createRegionDtoFromAdminRegionModel(wine.region)\n : undefined,\n winery: wine.winery\n ? createWineryDtoFromAdminWineryModel(wine.winery)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { createWineDtoFromAdminWineModel, WineModel } from \"./wine\";\nimport { VintageRatingModel } from \"./vintageRating\";\nimport { VintageScoreModel } from \"./vintageScore\";\nimport { ImageModel } from \"./image\";\nimport { VintageDto } from \"@vini-wine/core-dtos\";\n\nexport interface VintageModel extends UUID {\n // transform\n year: number;\n\n // default includes\n bottleImage: ImageModel | null;\n\n // available includes\n wine?: WineModel;\n mappedExternal1Rating?: VintageRatingModel | null;\n scores?: VintageScoreModel[];\n labelImage?: ImageModel | null;\n}\n\nexport const createVintageDtoFromAdminVintageModel = (\n vintage: VintageModel,\n): VintageDto => {\n return {\n uuid: vintage.uuid,\n year: vintage.year,\n wine: vintage.wine\n ? createWineDtoFromAdminWineModel(vintage.wine)\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { createVintageDtoFromAdminVintageModel, VintageModel } from \"./vintage\";\nimport {\n B2bMarketPriceModel,\n createB2BMarketPriceDtoFromAdminB2BMarketPriceModel,\n} from \"./b2bMarketPrice\";\nimport { VintageProductDto } from \"@vini-wine/core-dtos\";\n\nexport interface VintageProductModel extends UUID {\n // transform\n milliliters: number;\n\n // available includes\n vintage?: VintageModel;\n b2bMarketPrice?: B2bMarketPriceModel | null;\n}\n\nexport const createVintageProductDtoFromAdminVintageProductModel = (\n vintageProduct: VintageProductModel,\n): VintageProductDto => {\n return {\n uuid: vintageProduct.uuid,\n milliliters: vintageProduct.milliliters,\n vintage: vintageProduct.vintage\n ? createVintageDtoFromAdminVintageModel(vintageProduct.vintage)\n : undefined,\n b2bMarketPrice: vintageProduct.b2bMarketPrice\n ? createB2BMarketPriceDtoFromAdminB2BMarketPriceModel(\n vintageProduct.b2bMarketPrice,\n )\n : undefined,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport { UploadStatusEnum, UploadTypeEnum } from \"@vini-wine/core-enums\";\nimport { OrganisationModel } from \"./organisation\";\nimport { SupplierModel } from \"./supplier\";\nimport { UserAccountModel } from \"./userAccount\";\nimport { UploadVisibilityTypeModel } from \"./uploadVisibilityType\";\nimport { ImportFileHeaderModel } from \"./importFileHeader\";\nimport { UploadDto } from \"@vini-wine/core-dtos\";\n\nexport interface UploadModel extends UUID {\n // transform\n status: {\n id: UploadStatusEnum;\n statusUpdatedAt: Date;\n };\n type: {\n id: UploadTypeEnum;\n };\n name: string;\n validFrom: Date;\n validUntil: Date;\n numItems: number;\n createdAt: Date;\n\n // default includes\n organisation: OrganisationModel;\n organisationSupplier: SupplierModel;\n\n // available includes\n createdUser?: UserAccountModel;\n visibilityTypes?: UploadVisibilityTypeModel[];\n importFileHeaders?: ImportFileHeaderModel[];\n statusUpdatedBy?: UserAccountModel | null;\n}\n\nexport const createUploadDtoFromAdminUploadModel = (\n upload: UploadModel,\n): UploadDto => {\n return {\n uuid: upload.uuid,\n name: upload.name,\n };\n};\n","import { UUID } from \"../generic/uuid\";\nimport {\n createSupplierDtoFromAdminSupplierModel,\n SupplierModel,\n} from \"./supplier\";\nimport { createSellerDtoFromAdminSellerModel, SellerModel } from \"./seller\";\nimport {\n createVintageProductDtoFromAdminVintageProductModel,\n VintageProductModel,\n} from \"./vintageProduct\";\nimport { createPriceDtoFromAdminPriceModel, PriceModel } from \"./price\";\nimport { createUploadDtoFromAdminUploadModel, UploadModel } from \"./upload\";\nimport { PackageEnum } from \"@vini-wine/core-enums\";\nimport { CountryModel, createCountryDtoFromAdminCountryModel } from \"./country\";\nimport { OfferDto, VintageProductDto } from \"@vini-wine/core-dtos\";\n\nexport interface OfferModel extends UUID {\n // default includes\n price: PriceModel | null;\n\n // available includes\n supplier?: SupplierModel | null;\n seller?: SellerModel;\n vintageProducts?: VintageProductModel[];\n upload?: UploadModel;\n shippedFromCountry?: CountryModel | null;\n\n // transform\n quantity: number;\n package: PackageEnum | null;\n createdAt: Date;\n}\n\nexport const createOfferDtoFromAdminOfferModel = (\n offer: OfferModel,\n): OfferDto => {\n const vintageProducts: VintageProductDto[] = [];\n if (offer.vintageProducts && offer.vintageProducts.length) {\n for (let i = 0; i < offer.vintageProducts.length; i += 1) {\n vintageProducts.push(\n createVintageProductDtoFromAdminVintageProductModel(\n offer.vintageProducts[i],\n ),\n );\n }\n }\n\n return {\n uuid: offer.uuid,\n createdAt: offer.createdAt,\n package: offer.package,\n price: offer.price ? createPriceDtoFromAdminPriceModel(offer.price) : null,\n quantity: offer.quantity,\n seller: offer.seller\n ? createSellerDtoFromAdminSellerModel(offer.seller)\n : undefined,\n supplier: offer.supplier\n ? createSupplierDtoFromAdminSupplierModel(offer.supplier)\n : undefined,\n shippedFromCountry: offer.shippedFromCountry\n ? createCountryDtoFromAdminCountryModel(offer.shippedFromCountry)\n : undefined,\n vintageProducts,\n upload: offer.upload\n ? createUploadDtoFromAdminUploadModel(offer.upload)\n : undefined,\n };\n};\n"],"mappings":";AAaO,IAAM,oCAAoC,CAC/C,UACa;AACb,SAAO;AAAA,IACL,aAAa,MAAM;AAAA,IACnB,UAAU,MAAM;AAAA,IAChB,YAAY;AAAA,MACV,IAAI,MAAM,aAAa,MAAM,WAAW,KAAK;AAAA,IAC/C;AAAA,EACF;AACF;;;ACZO,IAAM,sDAAsD,CACjE,mBACsB;AACtB,SAAO;AAAA,IACL,OAAO,eAAe,QAClB,kCAAkC,eAAe,KAAK,IACtD;AAAA,IACJ,WAAW,eAAe;AAAA,EAC5B;AACF;;;ACVO,IAAM,wCAAwC,CACnD,YACe;AACf,SAAO;AAAA,IACL,YAAY,QAAQ;AAAA,EACtB;AACF;;;ACRO,IAAM,sCAAsC,CACjD,WACc;AACd,SAAO;AAAA,IACL,aAAa,OAAO;AAAA,IACpB,OAAO,OAAO;AAAA,EAChB;AACF;;;ACqBO,IAAM,kDAAkD,CAC7D,iBACoB;AACpB,SAAO;AAAA,IACL,iBAAiB,aAAa;AAAA,IAC9B,WAAW,aAAa;AAAA,IACxB,MAAM,aAAa;AAAA,IACnB,MAAM,aAAa;AAAA,IACnB,QAAQ,oCAAoC,aAAa,MAAM;AAAA,EACjE;AACF;;;ACrBO,IAAM,0CAA0C,CACrD,aACgB;AAChB,SAAO;AAAA,IACL,MAAM,SAAS;AAAA,IACf,MAAM,SAAS;AAAA,IAC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AAe,OAAO,IAC5D;AAAA,IACJ,gBAAgB,eAAe,iBAC3B;AAAA,MACE,eAAe;AAAA,IACjB,IACA;AAAA,EACN;AACF;;;ACGO,IAAM,sCAAsC,CACjD,WACc;AACd,SAAO;AAAA,IACL,MAAM,OAAO;AAAA,IACb,MAAM,OAAO;AAAA,EACf;AACF;;;ACTO,IAAM,oCAAoC,CAC/C,UACa;AACb,QAAM,kBAAuC,CAAC;AAC9C,MAAI,MAAM,mBAAmB,MAAM,gBAAgB,QAAQ;AACzD,aAAS,IAAI,GAAG,IAAI,MAAM,gBAAgB,QAAQ,KAAK,GAAG;AACxD,sBAAgB;AAAA,QACd;AAAA,UACE,MAAM,gBAAgB,CAAC;AAAA,QACzB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,MAAM,MAAM;AAAA,IACZ,WAAW,MAAM;AAAA,IACjB,SAAS,MAAM;AAAA,IACf,OAAO,MAAM,QAAQ,kCAAkC,MAAM,KAAK,IAAI;AAAA,IACtE,UAAU,MAAM;AAAA,IAChB,QAAQ,MAAM,SACV,oCAAoC,MAAM,MAAM,IAChD;AAAA,IACJ,UAAU,MAAM,WACZ,wCAAwC,MAAM,QAAQ,IACtD;AAAA,IACJ,oBAAoB,MAAM,qBACtB,sCAAsC,MAAM,kBAAkB,IAC9D;AAAA,IACJ;AAAA,IACA,QAAQ,MAAM,SACV,oCAAoC,MAAM,MAAM,IAChD;AAAA,EACN;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vini-wine/admin-core-models",
3
- "version": "1.1.52",
3
+ "version": "1.1.54",
4
4
  "description": "Core package for Vini models related to the admin API.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",