@aptly-as/types
Advanced tools
Comparing version 1.12.1 to 1.12.2
import { AptlyDocumentSchema, AptlyOrderSchema, AptlyUnitSchema } from '../models/index.js'; | ||
export declare namespace AptlyWebhookEventData { | ||
type NewUnitOrderSigned = NewUnitOrderSignedSchema<string, string>; | ||
interface NewUnitOrderSignedSchema<ID, DATE> { | ||
order: Pick<AptlyOrderSchema<ID, DATE>, '_id' | 'orderNumber' | 'receipt' | 'period'>; | ||
interface UnitWebhookSchema<ID, DATE> { | ||
unit: Pick<AptlyUnitSchema<ID, DATE>, '_id' | 'name'>; | ||
} | ||
interface UnitDocumentWebhookSchema<ID, DATE> { | ||
document: AptlyDocumentSchema<ID, DATE>; | ||
documentUrl: string; | ||
} | ||
type NewUnitDocument = NewUnitDocumentSchema<string, string>; | ||
type NewUnitDocumentSchema<ID, DATE> = UnitWebhookSchema<ID, DATE> & UnitDocumentWebhookSchema<ID, DATE>; | ||
type NewUnitOrder = NewUnitOrderSchema<string, string>; | ||
interface NewUnitOrderSchema<ID, DATE> extends NewUnitDocumentSchema<ID, DATE> { | ||
order: Pick<AptlyOrderSchema<ID, DATE>, '_id' | 'orderNumber' | 'receipt' | 'period'>; | ||
} | ||
} |
@@ -8,3 +8,5 @@ export declare enum AptlyWebhookType { | ||
UnitMessageReply = "aptly.unit.message.reply", | ||
UnitOrderCreated = "aptly.unit.order.created", | ||
UnitOrderSigned = "aptly.unit.order.signed", | ||
UnitReportFinal = "aptly.unit.report.final", | ||
OrganizationAppUpdated = "aptly.organization.app.updated", | ||
@@ -11,0 +13,0 @@ OrganizationAppDeleted = "aptly.organization.app.deleted" |
@@ -9,3 +9,5 @@ export var AptlyWebhookType; | ||
AptlyWebhookType["UnitMessageReply"] = "aptly.unit.message.reply"; | ||
AptlyWebhookType["UnitOrderCreated"] = "aptly.unit.order.created"; | ||
AptlyWebhookType["UnitOrderSigned"] = "aptly.unit.order.signed"; | ||
AptlyWebhookType["UnitReportFinal"] = "aptly.unit.report.final"; | ||
AptlyWebhookType["OrganizationAppUpdated"] = "aptly.organization.app.updated"; | ||
@@ -12,0 +14,0 @@ AptlyWebhookType["OrganizationAppDeleted"] = "aptly.organization.app.deleted"; |
import { AptlyWebhookEventStatus, AptlyWebhookType } from '../enums/index.js'; | ||
import { AptlyBaseSchema } from './extends.js'; | ||
type ServerKeys = 'run' | 'organization' | 'project' | 'status' | 'url' | 'headers' | 'responses'; | ||
type ServerKeys = 'run' | 'status' | 'url' | 'headers' | 'responses'; | ||
export type AptlyWebhookEvent<T = unknown> = Omit<AptlyWebhookEventSchema<string, string, T>, ServerKeys>; | ||
@@ -5,0 +5,0 @@ export interface AptlyWebhookEventSchema<ID, DATE, DATA = unknown> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> { |
{ | ||
"name": "@aptly-as/types", | ||
"version": "1.12.1", | ||
"version": "1.12.2", | ||
"description": "Aptly types and enums", | ||
@@ -5,0 +5,0 @@ "type": "module", |
88672
2293