@aptly-as/types 2.6.5 → 2.6.7

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.
@@ -1,4 +1,4 @@
1
- import { AptlyDocumentSchema, AptlyOrderSchema, AptlyUnitSchema } from '../models/index.js';
1
+ import { AptlyDocumentSchema, AptlyOrderSchema, AptlyPaymentSchema, AptlyUnitSchema } from '../models/index.js';
2
2
  export declare namespace AptlyWebhookEventData {
3
3
  interface UnitWebhookSchema<ID, DATE> {
4
4
  unit: Pick<AptlyUnitSchema<ID, DATE>, '_id' | 'name'>;
@@ -7,6 +7,10 @@ export declare namespace AptlyWebhookEventData {
7
7
  document: AptlyDocumentSchema<ID, DATE>;
8
8
  documentUrl: string;
9
9
  }
10
+ interface PaymentCrated<ID, DATE> {
11
+ payment: AptlyPaymentSchema<ID, DATE>;
12
+ order: AptlyOrderSchema<ID, DATE>;
13
+ }
10
14
  type NewUnitDocument = NewUnitDocumentSchema<string, string>;
11
15
  type NewUnitDocumentSchema<ID, DATE> = UnitWebhookSchema<ID, DATE> & UnitDocumentWebhookSchema<ID, DATE>;
12
16
  type NewUnitOrder = NewUnitOrderSchema<string, string>;
@@ -21,7 +21,8 @@ export declare enum AptlyDocumentType {
21
21
  Chunk = "chunk",
22
22
  Gdpr = "gdpr",
23
23
  Zip = "zip",
24
- CircuitDirectory = "circuitDirectory"
24
+ CircuitDirectory = "circuitDirectory",
25
+ DeclarationOfConformity = "declaration-of-conformity"
25
26
  }
26
27
  export declare enum AptlyHistoryType {
27
28
  Added = "added",
package/enums/document.js CHANGED
@@ -23,6 +23,7 @@ export var AptlyDocumentType;
23
23
  AptlyDocumentType["Gdpr"] = "gdpr";
24
24
  AptlyDocumentType["Zip"] = "zip";
25
25
  AptlyDocumentType["CircuitDirectory"] = "circuitDirectory";
26
+ AptlyDocumentType["DeclarationOfConformity"] = "declaration-of-conformity";
26
27
  })(AptlyDocumentType || (AptlyDocumentType = {}));
27
28
  export var AptlyHistoryType;
28
29
  (function (AptlyHistoryType) {
package/enums/index.d.ts CHANGED
@@ -144,6 +144,7 @@ export declare enum AptlyEmailType {
144
144
  OrderPay = "order-pay",
145
145
  OrderPayNotify = "order-pay-notify",
146
146
  OrderPayFailed = "order-pay-failed",
147
+ OrderPayDelivery = "order-pay-delivery",
147
148
  OrderPayed = "order-payed",
148
149
  OrderReceipt = "order-receipt",
149
150
  OrderCompleted = "order-completed",
package/enums/index.js CHANGED
@@ -164,6 +164,7 @@ export var AptlyEmailType;
164
164
  AptlyEmailType["OrderPay"] = "order-pay";
165
165
  AptlyEmailType["OrderPayNotify"] = "order-pay-notify";
166
166
  AptlyEmailType["OrderPayFailed"] = "order-pay-failed";
167
+ AptlyEmailType["OrderPayDelivery"] = "order-pay-delivery";
167
168
  AptlyEmailType["OrderPayed"] = "order-payed";
168
169
  AptlyEmailType["OrderReceipt"] = "order-receipt";
169
170
  AptlyEmailType["OrderCompleted"] = "order-completed";
@@ -7,6 +7,7 @@ export declare enum AptlyWebhookType {
7
7
  UnitMessageReply = "aptly.unit.message.reply",
8
8
  UnitOrderCreated = "aptly.unit.order.created",
9
9
  UnitOrderSigned = "aptly.unit.order.signed",
10
+ UnitPaymentCreated = "aptly.unit.payment.created",
10
11
  UnitReportFinal = "aptly.unit.report.final",
11
12
  OrganizationAppUpdated = "aptly.organization.app.updated",
12
13
  OrganizationAppDeleted = "aptly.organization.app.deleted"
package/enums/webhook.js CHANGED
@@ -8,6 +8,7 @@ export var AptlyWebhookType;
8
8
  AptlyWebhookType["UnitMessageReply"] = "aptly.unit.message.reply";
9
9
  AptlyWebhookType["UnitOrderCreated"] = "aptly.unit.order.created";
10
10
  AptlyWebhookType["UnitOrderSigned"] = "aptly.unit.order.signed";
11
+ AptlyWebhookType["UnitPaymentCreated"] = "aptly.unit.payment.created";
11
12
  AptlyWebhookType["UnitReportFinal"] = "aptly.unit.report.final";
12
13
  AptlyWebhookType["OrganizationAppUpdated"] = "aptly.organization.app.updated";
13
14
  AptlyWebhookType["OrganizationAppDeleted"] = "aptly.organization.app.deleted";
package/models/order.d.ts CHANGED
@@ -105,6 +105,7 @@ export interface AptlyOrderItemSchema<ID, DATE> {
105
105
  producer: ID;
106
106
  params: AptlyUnitItemParamSchema<ID, DATE>[];
107
107
  quantity: number;
108
+ baseCost?: number;
108
109
  unitCost: number;
109
110
  unitVat?: number;
110
111
  vat?: number;
@@ -26,6 +26,7 @@ export interface AptlyPaymentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, D
26
26
  customer: AptlyPaymentCustomerSchema<ID, DATE>;
27
27
  shipping: AptlyAddress;
28
28
  shippingDate?: DATE;
29
+ shippingDescription?: string;
29
30
  billing?: AptlyAddress;
30
31
  card?: {
31
32
  brand: string;
@@ -74,6 +75,7 @@ export interface AptlyPaymentItemSchema<ID> {
74
75
  sku: string;
75
76
  quantity: number;
76
77
  vat: number;
78
+ baseCost: number;
77
79
  unitCost: number;
78
80
  unitVat: number;
79
81
  totalCost: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "2.6.5",
3
+ "version": "2.6.7",
4
4
  "description": "Aptly types and enums",
5
5
  "type": "module",
6
6
  "main": "./index.js",