From 9b9776f9aca0e334b50e32dd9e1622b5ba9b27e7 Mon Sep 17 00:00:00 2001 From: kogeletey Date: Thu, 5 Sep 2024 22:40:11 +0300 Subject: [PATCH] feat: support paylinkks, compose and address. Added bitcart invoice as extensions --- entities/deployment.d.ts | 10 ++++++-- entities/extensions/bitcart.d.ts | 41 ++++++++++++++++++++++++++++++++ entities/provider.d.ts | 2 ++ 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 entities/extensions/bitcart.d.ts diff --git a/entities/deployment.d.ts b/entities/deployment.d.ts index 622a054..94128b9 100644 --- a/entities/deployment.d.ts +++ b/entities/deployment.d.ts @@ -1,8 +1,14 @@ -type Spec = string +import type { Compose } from "./compose.d.ts" + +type Spec = string | Compose export type Deployment = { - uuid: string kind: string spec: Spec promocode?: string } + +export type DeploymentResponse = Deployment & { + uuid: string + payLink: string +} diff --git a/entities/extensions/bitcart.d.ts b/entities/extensions/bitcart.d.ts new file mode 100644 index 0000000..888f987 --- /dev/null +++ b/entities/extensions/bitcart.d.ts @@ -0,0 +1,41 @@ +export type Invoice = { + metadata?: Object + created?: string + price: string + store_id: string + currency?: string + order_id?: string + notification_url?: string + redirect_url?: string + buyer_email?: string + promocode?: string + shipping_address?: string + notes?: string + status?: string + exception_status?: string + products?: string[] | Object[] + tx_hashes?: string[] + expiration?: number + sent_amount?: number + id: string + user_id: string + time_left: number + expiration_seconds: number + product_names?: Object + payments: Object[] + paid_date: string + payment_id: string + refund_id: string + paid_currency: string | null + discount: string | null +} + +type TError = { + loc: string[] | number[] + msg: string + type: string +} + +export type Errors = { + detail: TError[] +} diff --git a/entities/provider.d.ts b/entities/provider.d.ts index 264bc39..14fcee2 100644 --- a/entities/provider.d.ts +++ b/entities/provider.d.ts @@ -4,6 +4,8 @@ export type Provider = { api: string description?: string price: PriceTable + /* address for receive payments */ + address: string } type Unit = {