@merkaly/api 0.39.4 → 0.39.6

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.
@@ -44,11 +44,9 @@ export interface AccountAuthPasswordTicket {
44
44
  ticket: string;
45
45
  }
46
46
  export interface AccountAuthOrganizationMetadata {
47
- CONTACT_EMAIL?: string | null;
48
47
  email?: string | null;
49
48
  ORG_COUNTRY?: string | null;
50
49
  ORG_CURRENCY?: string | null;
51
- ORG_EMAIL?: string | null;
52
50
  ORG_SIZE?: string | null;
53
51
  ORG_TYPE?: string | null;
54
52
  [key: string]: string | null | undefined;
@@ -12,7 +12,7 @@ export interface Auth0JwtPayload {
12
12
  };
13
13
  }
14
14
  export interface AppAuth {
15
- clientId?: string;
15
+ clientId: string;
16
16
  expiresAt: Date;
17
17
  issuedAt: Date;
18
18
  orgId?: string;
@@ -72,7 +72,7 @@ export declare class FinancePaymentEntity extends AbstractEntity implements ITra
72
72
  fee: number;
73
73
  method?: FinancePaymentMethodEnum | null;
74
74
  gateway?: FinancePaymentGatewayEntity | null;
75
- attempts?: FinancePaymentAttemptEntity[];
75
+ attempts: FinancePaymentAttemptEntity[];
76
76
  split?: FinancePaymentSplitEntity | null;
77
77
  status: FinancePaymentStatusEnum;
78
78
  history: StatusEntity<FinancePaymentStatusEnum>[];
@@ -27,6 +27,7 @@ export declare const FinanceRefundGatewaySchema: MongoSchema<FinanceRefundGatewa
27
27
  export declare class FinanceRefundEntity extends AbstractEntity {
28
28
  payment: FinancePaymentEntity | string;
29
29
  purchase?: OrderPurchaseEntity | string | null;
30
+ supplierOrderId?: string | null;
30
31
  amount: number;
31
32
  isPartial: boolean;
32
33
  origin: FinanceRefundOriginEnum;
@@ -41,12 +41,22 @@ export interface SupplierOrderChargedLine {
41
41
  shipping: number;
42
42
  tax: number;
43
43
  }
44
+ export interface SupplierOrderPart {
45
+ externalOrderId: string;
46
+ status?: OrderPurchaseStatusEnum;
47
+ rawStatus: string;
48
+ lines: SupplierOrderChargedLine[];
49
+ charged: boolean;
50
+ }
51
+ export interface SupplierOrderParcel extends LogisticsParcelInput {
52
+ externalOrderIds: string[];
53
+ }
44
54
  export interface SupplierOrderSnapshot {
45
55
  status?: OrderPurchaseStatusEnum;
46
56
  received: boolean;
47
57
  rawStatus: string;
48
- parcels: LogisticsParcelInput[];
49
- charged?: SupplierOrderChargedLine[];
58
+ orders: SupplierOrderPart[];
59
+ parcels: SupplierOrderParcel[];
50
60
  payExpiryDate?: Date | null;
51
61
  }
52
62
  export interface SupplierOrderImportLine {
@@ -43,7 +43,6 @@ export interface SupplierProduct {
43
43
  assets: SupplierProductAsset[];
44
44
  currency: string;
45
45
  handlingDays?: number | null;
46
- deliveryDays?: number | null;
47
46
  properties: SupplierProductProperty[];
48
47
  ratingValue: number | null;
49
48
  ratingCount: number | null;
@@ -16,6 +16,7 @@ export interface SupplierQuote extends SupplierQuoteRequest {
16
16
  freight?: number;
17
17
  freightCode?: string;
18
18
  freightService?: string;
19
+ platformShipping?: boolean;
19
20
  taxBrackets?: SupplierImportTaxBracket[];
20
21
  deliveryDays?: {
21
22
  max?: number;
@@ -10,6 +10,11 @@ export interface LogisticsParcelInput {
10
10
  trackingUrl?: string;
11
11
  events: LogisticsTrackingInput[];
12
12
  received?: boolean;
13
+ items?: LogisticsShipmentItem[];
14
+ }
15
+ export interface LogisticsShipmentItem {
16
+ item: string;
17
+ quantity: number;
13
18
  }
14
19
  export interface LogisticsBuyerShipment {
15
20
  status: LogisticsShipmentStatusEnum;
@@ -23,4 +28,5 @@ export interface LogisticsBuyerShipment {
23
28
  code: LogisticsTrackingEventCodeEnum;
24
29
  location?: string;
25
30
  }[];
31
+ items: LogisticsShipmentItem[];
26
32
  }
@@ -32,10 +32,24 @@ export declare const LogisticsShipmentTrackingSchema: MongoSchema<LogisticsShipm
32
32
  } & {
33
33
  __v: number;
34
34
  }>;
35
+ export declare class LogisticsShipmentItemEntity {
36
+ item: string;
37
+ quantity: number;
38
+ }
39
+ export declare const LogisticsShipmentItemSchema: MongoSchema<LogisticsShipmentItemEntity, import("mongoose").Model<LogisticsShipmentItemEntity, any, any, any, import("mongoose").Document<unknown, any, LogisticsShipmentItemEntity, any, {}> & LogisticsShipmentItemEntity & {
40
+ _id: import("mongoose").Types.ObjectId;
41
+ } & {
42
+ __v: number;
43
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, LogisticsShipmentItemEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<LogisticsShipmentItemEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<LogisticsShipmentItemEntity> & {
44
+ _id: import("mongoose").Types.ObjectId;
45
+ } & {
46
+ __v: number;
47
+ }>;
35
48
  export declare class LogisticsShipmentEntity extends AbstractEntity {
36
49
  sale: OrderSaleEntity;
37
50
  purchase?: OrderPurchaseEntity | null;
38
51
  source: LogisticsShipmentSourceEnum;
52
+ items: LogisticsShipmentItemEntity[];
39
53
  tracking?: LogisticsShipmentTrackingEntity | null;
40
54
  shippedAt?: Date | null;
41
55
  deliveredAt?: Date | null;
@@ -18,9 +18,55 @@ export declare const OrderPurchaseSupplierErrorSchema: MongoSchema<OrderPurchase
18
18
  } & {
19
19
  __v: number;
20
20
  }>;
21
+ export declare class OrderPurchaseSupplierOrderItemEntity {
22
+ item: string;
23
+ quantity: number;
24
+ }
25
+ export declare const OrderPurchaseSupplierOrderItemSchema: MongoSchema<OrderPurchaseSupplierOrderItemEntity, import("mongoose").Model<OrderPurchaseSupplierOrderItemEntity, any, any, any, import("mongoose").Document<unknown, any, OrderPurchaseSupplierOrderItemEntity, any, {}> & OrderPurchaseSupplierOrderItemEntity & {
26
+ _id: import("mongoose").Types.ObjectId;
27
+ } & {
28
+ __v: number;
29
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderPurchaseSupplierOrderItemEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderPurchaseSupplierOrderItemEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<OrderPurchaseSupplierOrderItemEntity> & {
30
+ _id: import("mongoose").Types.ObjectId;
31
+ } & {
32
+ __v: number;
33
+ }>;
34
+ export declare class OrderPurchaseSupplierOrderPartEntity {
35
+ id: string;
36
+ status?: OrderPurchaseStatusEnum | null;
37
+ rawStatus?: string | null;
38
+ items: OrderPurchaseSupplierOrderItemEntity[];
39
+ productCost?: number | null;
40
+ shippingCost?: number | null;
41
+ taxCost?: number | null;
42
+ cancelledAt?: Date | null;
43
+ }
44
+ export declare const OrderPurchaseSupplierOrderPartSchema: MongoSchema<OrderPurchaseSupplierOrderPartEntity, import("mongoose").Model<OrderPurchaseSupplierOrderPartEntity, any, any, any, import("mongoose").Document<unknown, any, OrderPurchaseSupplierOrderPartEntity, any, {}> & OrderPurchaseSupplierOrderPartEntity & {
45
+ _id: import("mongoose").Types.ObjectId;
46
+ } & {
47
+ __v: number;
48
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderPurchaseSupplierOrderPartEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderPurchaseSupplierOrderPartEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<OrderPurchaseSupplierOrderPartEntity> & {
49
+ _id: import("mongoose").Types.ObjectId;
50
+ } & {
51
+ __v: number;
52
+ }>;
53
+ export declare class OrderPurchaseLogisticsEntity {
54
+ sku: string;
55
+ service: string;
56
+ }
57
+ export declare const OrderPurchaseLogisticsSchema: MongoSchema<OrderPurchaseLogisticsEntity, import("mongoose").Model<OrderPurchaseLogisticsEntity, any, any, any, import("mongoose").Document<unknown, any, OrderPurchaseLogisticsEntity, any, {}> & OrderPurchaseLogisticsEntity & {
58
+ _id: import("mongoose").Types.ObjectId;
59
+ } & {
60
+ __v: number;
61
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OrderPurchaseLogisticsEntity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OrderPurchaseLogisticsEntity>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<OrderPurchaseLogisticsEntity> & {
62
+ _id: import("mongoose").Types.ObjectId;
63
+ } & {
64
+ __v: number;
65
+ }>;
21
66
  export declare class OrderPurchaseSupplierOrderEntity {
22
67
  provider: SupplierProviderEnum;
23
68
  orderIds: string[];
69
+ orders?: OrderPurchaseSupplierOrderPartEntity[];
24
70
  reference?: string;
25
71
  rawStatus?: string;
26
72
  placedAt: Date;
@@ -45,5 +91,6 @@ export declare class OrderPurchaseEntity extends TransactionEntity<OrderPurchase
45
91
  shippingCost?: number;
46
92
  taxCost?: number;
47
93
  chargedAt?: Date;
94
+ logistics?: OrderPurchaseLogisticsEntity[];
48
95
  supplierOrder?: OrderPurchaseSupplierOrderEntity;
49
96
  }
@@ -1,7 +1,4 @@
1
1
  import { AbstractRequestValidator } from '../../abstract.validator.js';
2
- export declare class PlaceSupplierOrderRequestValidator extends AbstractRequestValidator {
3
- recipientBirthday?: string;
4
- }
5
2
  export declare class RegisterSupplierOrderRequestValidator extends AbstractRequestValidator {
6
3
  externalOrderId: string;
7
4
  }
@@ -10,15 +10,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  import * as class_validator_1 from "class-validator";
12
12
  import * as abstract_validator_1 from '../../abstract.validator.js';
13
- import * as person_validator_1 from '../../person.validator.js';
14
- export class PlaceSupplierOrderRequestValidator extends abstract_validator_1.AbstractRequestValidator {
15
- recipientBirthday;
16
- }
17
- __decorate([
18
- (0, person_validator_1.IsBirthday)(),
19
- (0, class_validator_1.IsOptional)(),
20
- __metadata("design:type", String)
21
- ], PlaceSupplierOrderRequestValidator.prototype, "recipientBirthday", void 0);
22
13
  export class RegisterSupplierOrderRequestValidator extends abstract_validator_1.AbstractRequestValidator {
23
14
  externalOrderId;
24
15
  }
@@ -39,6 +39,7 @@ export interface OrderSaleRefundSummary {
39
39
  origin: FinanceRefundOriginEnum;
40
40
  purchase: string | null;
41
41
  status: FinanceRefundStatusEnum;
42
+ supplierOrderId: string | null;
42
43
  }
43
44
  export interface OrderSaleSupplierCharges {
44
45
  shipping: {
@@ -7,6 +7,10 @@ export interface ProcurementLine {
7
7
  name: string;
8
8
  };
9
9
  variant: string;
10
+ vendor: {
11
+ id: string;
12
+ name: string;
13
+ };
10
14
  quantity: number;
11
15
  retailUnit: number;
12
16
  storedUnitCost: number;
@@ -20,10 +24,10 @@ export interface ProcurementGroup {
20
24
  id: string;
21
25
  provider: SupplierProviderEnum;
22
26
  };
23
- vendor: {
27
+ vendors: {
24
28
  id: string;
25
29
  name: string;
26
- } | null;
30
+ }[];
27
31
  items: ProcurementLine[];
28
32
  totals: {
29
33
  retail: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.39.4",
3
+ "version": "0.39.6",
4
4
  "type": "module",
5
5
  "description": "Shared TypeScript interfaces and enums for Merkaly API",
6
6
  "repository": {