UNPKG

@gobolt/models

Version:

This is a shared repository that includes models that should be shared across all BoxKnight services. Do not include anything for the controller, service or repository layers of your application in this package.

596 lines 22.4 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Merchant = void 0; const dynamodb_data_mapper_annotations_1 = require("@aws/dynamodb-data-mapper-annotations"); const class_transformer_1 = require("class-transformer"); const address_1 = require("./address/address"); const deliveryConstraintsByWeek_1 = require("./constraints/deliveryConstraintsByWeek"); const pickupConstraintsByWeek_1 = require("./constraints/pickupConstraintsByWeek"); const customNotifications_1 = require("./customNotifications"); const emailNotifications_1 = require("./emailNotifications"); const labelingFormatType_1 = require("./labelingFormatType"); const merchantLocation_1 = require("./merchantLocation"); const rateShowingOptionType_1 = require("./rateShowingOptionType"); const shipHero_1 = require("./shipHero"); const shipstation_1 = require("./shipstation"); const locationPricing_1 = require("./strategies/location/locationPricing"); const taskTimeCreationType_1 = require("./taskTimeCreationType"); const webhooks_1 = require("./webhooks"); let Merchant = class Merchant { constructor() { this.createPickup = false; this.scanningRequired = true; this.signatureRequired = false; this.createOnePackagePerItem = false; // default is create one package per order for Shopify orders this.labelingFormat = labelingFormatType_1.LabelingFormatType.ZPL; this.taskTimeCreation = taskTimeCreationType_1.TaskTimeCreationType.MANUAL; this.rateShowingOptionType = rateShowingOptionType_1.RateShowingOptionType.ALWAYSSHOWSAMEDAY; this.dataRedactionEnabled = false; this.partialDeliveryEnabled = false; this.getId = () => { return this.id; }; this.setId = (value) => { this.id = value; }; this.getCreatedAt = () => { return this.createdAt; }; this.setCreatedAt = (value) => { this.createdAt = value; }; this.getName = () => { return this.name; }; this.setName = (value) => { this.name = value; }; this.getMerchantLocation = () => { return this.merchantLocation; }; this.setMerchantLocation = (value) => { this.merchantLocation = value; }; this.getServices = () => { return this.services; }; this.setServices = (value) => { this.services = value; }; this.getLocationPricing = () => { return this.locationPricing; }; this.setLocationPricing = (value) => { this.locationPricing = value; }; this.getDeliveryConstraintsByWeek = () => { return this.deliveryConstraintsByWeek; }; this.setDeliveryConstraintsByWeek = (value) => { this.deliveryConstraintsByWeek = value; }; this.getPickupConstraintsByWeek = () => { return this.pickupConstraintsByWeek; }; this.setPickupConstraintsByWeek = (value) => { this.pickupConstraintsByWeek = value; }; this.getScheduledDeliveryPickupConstraintsByWeek = () => { return this.scheduledDeliveryPickupConstraintsByWeek; }; this.setscheduledDeliveryPickupConstraintsByWeek = (value) => { this.scheduledDeliveryPickupConstraintsByWeek = value; }; this.getLabelingFormat = () => { return this.labelingFormat; }; this.setLabelingFormat = (value) => { this.labelingFormat = value; }; this.getTaskTimeCreation = () => { return this.taskTimeCreation; }; this.setTaskTimeCreation = (value) => { this.taskTimeCreation = value; }; this.getCreatePickup = () => { return this.createPickup; }; this.setCreatePickup = (value) => { this.createPickup = value; }; this.getSignatureRequired = () => { return this.signatureRequired; }; this.setSignatureRequired = (value) => { this.signatureRequired = value; }; this.getScanningRequired = () => { return this.scanningRequired; }; this.setScanningRequired = (value) => { this.scanningRequired = value; }; this.getCreateOnePackagePerItem = () => { return this.createOnePackagePerItem; }; this.setCreateOnePackagePerItem = (value) => { this.createOnePackagePerItem = value; }; this.getOtherLocations = () => { return this.otherLocations; }; this.setOtherLocations = (value) => { this.otherLocations = value; }; this.getPickupNotes = () => { return this.pickupNotes; }; this.setPickupNotes = (value) => { this.pickupNotes = value; }; this.getPersonalizedNotes = () => { return this.personalizedNotes; }; this.setPersonalizedNotes = (value) => { this.personalizedNotes = value; }; this.getMaxWindowDays = () => { return this.maxWindowDays; }; this.setMaxWindowDays = (value) => { this.maxWindowDays = value; }; this.getRateShowingOptionType = () => { return this.rateShowingOptionType; }; this.setRateShowingOptionType = (value) => { this.rateShowingOptionType = value; }; this.getShipstation = () => { return this.shipstation; }; this.setShipstation = (value) => { this.shipstation = value; }; this.getShipHero = () => { return this.shipHero; }; this.setShipHero = (value) => { this.shipHero = value; }; this.getShopifyShop = () => { return this.shopifyShop; }; this.setShopifyShop = (shopifyShop) => { this.shopifyShop = shopifyShop; }; this.getShops = () => { return this.shops; }; this.setShops = (shops) => { this.shops = shops; }; this.getWebhooks = () => { return this.webhooks; }; this.setWebhooks = (value) => { this.webhooks = value; }; this.getThirdPartyId = () => { return this.thirdPartyId; }; this.setThirdPartyId = (value) => { this.thirdPartyId = value; }; this.getPhone = () => { return this.phone; }; this.setPhone = (value) => { this.phone = value; }; this.getAddEstimatedDelivery = () => { return this.addEstimatedDelivery; }; this.setAddEstimatedDelivery = (value) => { this.addEstimatedDelivery = value; }; this.getGeocodedAddressWithCoordinate = () => { return this.geocodedAddressWithCoordinate; }; this.setGeocodedAddressWithCoordinate = (value) => { this.geocodedAddressWithCoordinate = value; }; this.getUseGeocodedAddressWithCoordinate = () => { return this.useGeocodedAddressWithCoordinate; }; this.setUseGeocodedAddressWithCoordinate = (value) => { this.useGeocodedAddressWithCoordinate = value; }; this.getInTransitDays = () => { return this.inTransitDays; }; this.setInTransitDays = (value) => { this.inTransitDays = value; }; this.getZones = () => { return this.zones; }; this.setZones = (value) => { this.zones = value; }; this.getShippingRules = () => { return this.shippingRules; }; this.setShippingRules = (value) => { this.shippingRules = value; }; this.getFreshFood = () => { return this.freshFood; }; this.setFreshFood = (value) => { this.freshFood = value; }; this.getOrderTags = () => { return this.orderTags; }; this.setOrderTags = (value) => { this.orderTags = value; }; this.getCustomNotifications = () => { return this.customNotifications; }; this.setCustomNotifications = (value) => { this.customNotifications = value; }; this.getEmailNotifications = () => { return this.emailNotifications; }; this.setEmailNotifications = (value) => { this.emailNotifications = value; }; this.getTimeZone = () => { return this.timeZone; }; this.setTimeZone = (value) => { this.timeZone = value; }; this.getEmail = () => { return this.email; }; this.setEmail = (value) => { this.email = value; }; this.getRetailerEmailNotifications = () => { return this.retailerEmailNotifications; }; this.setRetailerEmailNotifications = (value) => { this.retailerEmailNotifications = value; }; this.getPhoneOptional = () => { return this.phoneOptional; }; this.setPhoneOptional = (value) => { this.phoneOptional = value; }; this.getLogoUrl = () => { return this.logoUrl; }; this.setLogoUrl = (value) => { this.logoUrl = value; }; this.getAdditionalLocations = () => { return this.additionalLocations; }; this.setAdditionalLocations = (value) => { this.additionalLocations = value; }; this.getApiRequestMappings = () => { return this.apiRequestMappings; }; this.setApiRequestMappings = (value) => { this.apiRequestMappings = value; }; this.getMerchantDisplayLogoUrls = () => { return this.merchantDisplayLogoUrls; }; this.setMerchantDisplayLogoUrls = (value) => { this.merchantDisplayLogoUrls = value; }; this.getReports = () => { return this.reports; }; this.setReports = (value) => { this.reports = value; }; this.getMinimumAge = () => { return this.minimumAge; }; this.setMinimumAge = (value) => { this.minimumAge = value; }; this.getGoboltOrgId = () => { return this.goboltOrgId; }; this.setGoboltOrgId = (value) => { this.goboltOrgId = value; }; this.getGoboltPickupCustomerId = () => { return this.goboltPickupCustomerId; }; this.setGoboltPickupCustomerId = (value) => { this.goboltPickupCustomerId = value; }; this.getStatus = () => { return this.status; }; this.setStatus = (value) => { this.status = value; }; this.getArchivedAt = () => { return this.archivedAt; }; this.setArchivedAt = (value) => { this.archivedAt = value; }; this.getArchivedBy = () => { return this.archivedBy; }; this.setArchivedBy = (value) => { this.archivedBy = value; }; this.getLastRedactedAt = () => { return this.lastRedactedAt; }; this.setLastRedactedAt = (value) => { this.lastRedactedAt = value; }; this.getDataRedactionEnabled = () => { return this.dataRedactionEnabled; }; this.setDataRedactionEnabled = (value) => { this.dataRedactionEnabled = value; }; this.getPartialDeliveryEnabled = () => { return this.partialDeliveryEnabled; }; this.setPartialDeliveryEnabled = (value) => { this.partialDeliveryEnabled = value; }; } }; exports.Merchant = Merchant; __decorate([ (0, dynamodb_data_mapper_annotations_1.autoGeneratedHashKey)(), __metadata("design:type", String) ], Merchant.prototype, "id", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)({ defaultProvider: () => new Date().toISOString() }), __metadata("design:type", Date) ], Merchant.prototype, "createdAt", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "name", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Boolean) ], Merchant.prototype, "createPickup", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Boolean) ], Merchant.prototype, "scanningRequired", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Boolean) ], Merchant.prototype, "signatureRequired", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Boolean) ], Merchant.prototype, "createOnePackagePerItem", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), (0, class_transformer_1.Type)(() => merchantLocation_1.MerchantLocation), __metadata("design:type", merchantLocation_1.MerchantLocation) ], Merchant.prototype, "merchantLocation", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Array) ], Merchant.prototype, "services", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", locationPricing_1.LocationPricing) ], Merchant.prototype, "locationPricing", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "labelingFormat", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "taskTimeCreation", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", deliveryConstraintsByWeek_1.DeliveryConstraintsByWeek) ], Merchant.prototype, "deliveryConstraintsByWeek", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", pickupConstraintsByWeek_1.PickupConstraintsByWeek) ], Merchant.prototype, "pickupConstraintsByWeek", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", deliveryConstraintsByWeek_1.DeliveryConstraintsByWeek) ], Merchant.prototype, "scheduledDeliveryPickupConstraintsByWeek", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Array) ], Merchant.prototype, "otherLocations", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "personalizedNotes", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "pickupNotes", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Number) ], Merchant.prototype, "maxWindowDays", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "rateShowingOptionType", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", shipstation_1.Shipstation) ], Merchant.prototype, "shipstation", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", shipHero_1.ShipHero) ], Merchant.prototype, "shipHero", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "shopifyShop", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Array) ], Merchant.prototype, "shops", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", webhooks_1.Webhooks) ], Merchant.prototype, "webhooks", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "thirdPartyId", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "phone", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Boolean) ], Merchant.prototype, "addEstimatedDelivery", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", address_1.Address) ], Merchant.prototype, "geocodedAddressWithCoordinate", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Boolean) ], Merchant.prototype, "useGeocodedAddressWithCoordinate", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Number) ], Merchant.prototype, "inTransitDays", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Array) ], Merchant.prototype, "zones", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Array) ], Merchant.prototype, "shippingRules", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Boolean) ], Merchant.prototype, "freshFood", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Array) ], Merchant.prototype, "orderTags", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", customNotifications_1.CustomNotifications) ], Merchant.prototype, "customNotifications", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", emailNotifications_1.EmailNotifications) ], Merchant.prototype, "emailNotifications", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "timeZone", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "email", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", emailNotifications_1.EmailNotifications) ], Merchant.prototype, "retailerEmailNotifications", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Boolean) ], Merchant.prototype, "phoneOptional", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "logoUrl", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Array) ], Merchant.prototype, "additionalLocations", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Array) ], Merchant.prototype, "apiRequestMappings", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Array) ], Merchant.prototype, "merchantDisplayLogoUrls", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Array) ], Merchant.prototype, "reports", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Number) ], Merchant.prototype, "minimumAge", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "goboltOrgId", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "goboltPickupCustomerId", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "status", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Number) ], Merchant.prototype, "archivedAt", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", String) ], Merchant.prototype, "archivedBy", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Number) ], Merchant.prototype, "lastRedactedAt", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Boolean) ], Merchant.prototype, "dataRedactionEnabled", void 0); __decorate([ (0, dynamodb_data_mapper_annotations_1.attribute)(), __metadata("design:type", Boolean) ], Merchant.prototype, "partialDeliveryEnabled", void 0); exports.Merchant = Merchant = __decorate([ (0, dynamodb_data_mapper_annotations_1.table)('Merchants') ], Merchant); //# sourceMappingURL=merchant.js.map