@aptly-as/types 1.12.1 → 1.12.3

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,10 +1,16 @@
1
1
  import { AptlyDocumentSchema, AptlyOrderSchema, AptlyUnitSchema } from '../models/index.js';
2
2
  export declare namespace AptlyWebhookEventData {
3
- type NewUnitOrderSigned = NewUnitOrderSignedSchema<string, string>;
4
- interface NewUnitOrderSignedSchema<ID, DATE> {
5
- order: Pick<AptlyOrderSchema<ID, DATE>, '_id' | 'orderNumber' | 'receipt' | 'period'>;
3
+ interface UnitWebhookSchema<ID, DATE> {
6
4
  unit: Pick<AptlyUnitSchema<ID, DATE>, '_id' | 'name'>;
5
+ }
6
+ interface UnitDocumentWebhookSchema<ID, DATE> {
7
7
  document: AptlyDocumentSchema<ID, DATE>;
8
8
  documentUrl: string;
9
9
  }
10
+ type NewUnitDocument = NewUnitDocumentSchema<string, string>;
11
+ type NewUnitDocumentSchema<ID, DATE> = UnitWebhookSchema<ID, DATE> & UnitDocumentWebhookSchema<ID, DATE>;
12
+ type NewUnitOrder = NewUnitOrderSchema<string, string>;
13
+ interface NewUnitOrderSchema<ID, DATE> extends NewUnitDocumentSchema<ID, DATE> {
14
+ order: Pick<AptlyOrderSchema<ID, DATE>, '_id' | 'orderNumber' | 'receipt' | 'period'>;
15
+ }
10
16
  }
@@ -5,7 +5,9 @@ export declare enum AptlyWebhookType {
5
5
  UnitUpdated = "aptly.unit.updated",
6
6
  UnitMessageNew = "aptly.unit.message.new",
7
7
  UnitMessageReply = "aptly.unit.message.reply",
8
+ UnitOrderCreated = "aptly.unit.order.created",
8
9
  UnitOrderSigned = "aptly.unit.order.signed",
10
+ UnitReportFinal = "aptly.unit.report.final",
9
11
  OrganizationAppUpdated = "aptly.organization.app.updated",
10
12
  OrganizationAppDeleted = "aptly.organization.app.deleted"
11
13
  }
package/enums/webhook.js CHANGED
@@ -6,7 +6,9 @@ export var AptlyWebhookType;
6
6
  AptlyWebhookType["UnitUpdated"] = "aptly.unit.updated";
7
7
  AptlyWebhookType["UnitMessageNew"] = "aptly.unit.message.new";
8
8
  AptlyWebhookType["UnitMessageReply"] = "aptly.unit.message.reply";
9
+ AptlyWebhookType["UnitOrderCreated"] = "aptly.unit.order.created";
9
10
  AptlyWebhookType["UnitOrderSigned"] = "aptly.unit.order.signed";
11
+ AptlyWebhookType["UnitReportFinal"] = "aptly.unit.report.final";
10
12
  AptlyWebhookType["OrganizationAppUpdated"] = "aptly.organization.app.updated";
11
13
  AptlyWebhookType["OrganizationAppDeleted"] = "aptly.organization.app.deleted";
12
14
  })(AptlyWebhookType || (AptlyWebhookType = {}));
@@ -63,6 +63,7 @@ export interface AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE> {
63
63
  description?: string;
64
64
  _product_order?: ID[];
65
65
  products?: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
66
+ assortments?: AptlyUnitTemplateCategorySectionAssortmentSchema<ID, DATE>[];
66
67
  }
67
68
  export type AptlyUnitTemplateCategorySectionAssortment = AptlyUnitTemplateCategorySectionAssortmentSchema<string, string>;
68
69
  export interface AptlyUnitTemplateCategorySectionAssortmentSchema<ID, DATE> extends Pick<AptlyBaseSchema<ID, DATE>, '_id' | 'createdAt' | 'updatedAt'> {
@@ -1,6 +1,6 @@
1
1
  import { AptlyWebhookEventStatus, AptlyWebhookType } from '../enums/index.js';
2
2
  import { AptlyBaseSchema } from './extends.js';
3
- type ServerKeys = 'run' | 'organization' | 'project' | 'status' | 'url' | 'headers' | 'responses';
3
+ type ServerKeys = 'run' | 'status' | 'url' | 'headers' | 'responses';
4
4
  export type AptlyWebhookEvent<T = unknown> = Omit<AptlyWebhookEventSchema<string, string, T>, ServerKeys>;
5
5
  export interface AptlyWebhookEventSchema<ID, DATE, DATA = unknown> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
6
6
  specversion: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "1.12.1",
3
+ "version": "1.12.3",
4
4
  "description": "Aptly types and enums",
5
5
  "type": "module",
6
6
  "main": "./index.js",