@leaflow/sdk 0.129.1 → 0.130.0
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.
- package/dist/billing/type/order/v1/generated/models.d.ts +241 -85
- package/dist/billing/type/order/v1/generated/models.js +19 -4
- package/dist/billing/type/order/v1/generated/validators/paymentResult.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/refund.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/refundList.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/transaction.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/transactionList.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/transactionType.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/transactionType.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.d.ts +40 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.js +43 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalAllocation.zod.d.ts +19 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalAllocation.zod.js +17 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalCreate.zod.d.ts +25 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalCreate.zod.js +19 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.d.ts +46 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.js +37 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalItemList.zod.d.ts +48 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalItemList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalList.zod.d.ts +39 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreview.zod.d.ts +40 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreview.zod.js +25 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +28 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewItem.zod.js +19 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewRequest.zod.js +13 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalSource.zod.d.ts +23 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalSource.zod.js +23 -0
- package/dist/billing/v1/generated/functions.d.ts +106 -1
- package/dist/billing/v1/generated/functions.js +132 -0
- package/dist/billing/v1/generated/models.d.ts +194 -9
- package/dist/billing/v1/generated/models.js +15 -0
- package/dist/billing/v1/generated/schemas.zod.d.ts +59 -0
- package/dist/billing/v1/generated/schemas.zod.js +67 -0
- package/dist/billing/v1/generated/validators/listWithdrawalItemsParams.zod.d.ts +18 -0
- package/dist/billing/v1/generated/validators/listWithdrawalItemsParams.zod.js +24 -0
- package/dist/billing/v1/generated/validators/listWithdrawalsParams.zod.d.ts +19 -0
- package/dist/billing/v1/generated/validators/listWithdrawalsParams.zod.js +25 -0
- package/dist/billing/v1/generated/validators/paymentResult.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/refund.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/refundList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/transaction.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/transactionList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/transactionType.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/transactionType.zod.js +1 -1
- package/dist/billing/v1/generated/validators/withdrawal.zod.d.ts +40 -0
- package/dist/billing/v1/generated/validators/withdrawal.zod.js +43 -0
- package/dist/billing/v1/generated/validators/withdrawalAllocation.zod.d.ts +19 -0
- package/dist/billing/v1/generated/validators/withdrawalAllocation.zod.js +17 -0
- package/dist/billing/v1/generated/validators/withdrawalCreate.zod.d.ts +25 -0
- package/dist/billing/v1/generated/validators/withdrawalCreate.zod.js +19 -0
- package/dist/billing/v1/generated/validators/withdrawalItem.zod.d.ts +46 -0
- package/dist/billing/v1/generated/validators/withdrawalItem.zod.js +37 -0
- package/dist/billing/v1/generated/validators/withdrawalItemList.zod.d.ts +48 -0
- package/dist/billing/v1/generated/validators/withdrawalItemList.zod.js +14 -0
- package/dist/billing/v1/generated/validators/withdrawalList.zod.d.ts +39 -0
- package/dist/billing/v1/generated/validators/withdrawalList.zod.js +14 -0
- package/dist/billing/v1/generated/validators/withdrawalPreview.zod.d.ts +40 -0
- package/dist/billing/v1/generated/validators/withdrawalPreview.zod.js +25 -0
- package/dist/billing/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +28 -0
- package/dist/billing/v1/generated/validators/withdrawalPreviewItem.zod.js +19 -0
- package/dist/billing/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +15 -0
- package/dist/billing/v1/generated/validators/withdrawalPreviewRequest.zod.js +13 -0
- package/dist/billing/v1/generated/validators/withdrawalSource.zod.d.ts +23 -0
- package/dist/billing/v1/generated/validators/withdrawalSource.zod.js +23 -0
- package/dist/canopy/v1/generated/models.d.ts +241 -85
- package/dist/canopy/v1/generated/models.js +19 -4
- package/dist/canopy/v1/generated/validators/paymentResult.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/refund.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/refundList.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/transaction.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/transactionList.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/transactionType.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/transactionType.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/withdrawal.zod.d.ts +63 -0
- package/dist/canopy/v1/generated/validators/withdrawal.zod.js +66 -0
- package/dist/canopy/v1/generated/validators/withdrawalAllocation.zod.d.ts +42 -0
- package/dist/canopy/v1/generated/validators/withdrawalAllocation.zod.js +40 -0
- package/dist/canopy/v1/generated/validators/withdrawalCreate.zod.d.ts +48 -0
- package/dist/canopy/v1/generated/validators/withdrawalCreate.zod.js +42 -0
- package/dist/canopy/v1/generated/validators/withdrawalItem.zod.d.ts +69 -0
- package/dist/canopy/v1/generated/validators/withdrawalItem.zod.js +60 -0
- package/dist/canopy/v1/generated/validators/withdrawalItemList.zod.d.ts +71 -0
- package/dist/canopy/v1/generated/validators/withdrawalItemList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/withdrawalList.zod.d.ts +62 -0
- package/dist/canopy/v1/generated/validators/withdrawalList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreview.zod.d.ts +63 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreview.zod.js +48 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +51 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreviewItem.zod.js +42 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreviewRequest.zod.js +36 -0
- package/dist/canopy/v1/generated/validators/withdrawalSource.zod.d.ts +46 -0
- package/dist/canopy/v1/generated/validators/withdrawalSource.zod.js +46 -0
- package/dist/compute/v1/generated/models.d.ts +241 -85
- package/dist/compute/v1/generated/models.js +19 -4
- package/dist/compute/v1/generated/validators/paymentResult.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/refund.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/refundList.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/transaction.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/transactionList.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/transactionType.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/transactionType.zod.js +1 -1
- package/dist/compute/v1/generated/validators/withdrawal.zod.d.ts +56 -0
- package/dist/compute/v1/generated/validators/withdrawal.zod.js +59 -0
- package/dist/compute/v1/generated/validators/withdrawalAllocation.zod.d.ts +35 -0
- package/dist/compute/v1/generated/validators/withdrawalAllocation.zod.js +33 -0
- package/dist/compute/v1/generated/validators/withdrawalCreate.zod.d.ts +41 -0
- package/dist/compute/v1/generated/validators/withdrawalCreate.zod.js +35 -0
- package/dist/compute/v1/generated/validators/withdrawalItem.zod.d.ts +62 -0
- package/dist/compute/v1/generated/validators/withdrawalItem.zod.js +53 -0
- package/dist/compute/v1/generated/validators/withdrawalItemList.zod.d.ts +64 -0
- package/dist/compute/v1/generated/validators/withdrawalItemList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/withdrawalList.zod.d.ts +55 -0
- package/dist/compute/v1/generated/validators/withdrawalList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/withdrawalPreview.zod.d.ts +56 -0
- package/dist/compute/v1/generated/validators/withdrawalPreview.zod.js +41 -0
- package/dist/compute/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +44 -0
- package/dist/compute/v1/generated/validators/withdrawalPreviewItem.zod.js +35 -0
- package/dist/compute/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/withdrawalPreviewRequest.zod.js +29 -0
- package/dist/compute/v1/generated/validators/withdrawalSource.zod.d.ts +39 -0
- package/dist/compute/v1/generated/validators/withdrawalSource.zod.js +39 -0
- package/dist/membership/v1/generated/models.d.ts +247 -85
- package/dist/membership/v1/generated/models.js +19 -4
- package/dist/membership/v1/generated/validators/grant.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/grant.zod.js +5 -0
- package/dist/membership/v1/generated/validators/membership.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/membershipList.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/membershipPurchase.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/paymentResult.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/period.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/periodList.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/refund.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/refundList.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/transaction.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/transactionList.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/transactionType.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/transactionType.zod.js +1 -1
- package/dist/membership/v1/generated/validators/withdrawal.zod.d.ts +40 -0
- package/dist/membership/v1/generated/validators/withdrawal.zod.js +43 -0
- package/dist/membership/v1/generated/validators/withdrawalAllocation.zod.d.ts +19 -0
- package/dist/membership/v1/generated/validators/withdrawalAllocation.zod.js +17 -0
- package/dist/membership/v1/generated/validators/withdrawalCreate.zod.d.ts +25 -0
- package/dist/membership/v1/generated/validators/withdrawalCreate.zod.js +19 -0
- package/dist/membership/v1/generated/validators/withdrawalItem.zod.d.ts +46 -0
- package/dist/membership/v1/generated/validators/withdrawalItem.zod.js +37 -0
- package/dist/membership/v1/generated/validators/withdrawalItemList.zod.d.ts +48 -0
- package/dist/membership/v1/generated/validators/withdrawalItemList.zod.js +14 -0
- package/dist/membership/v1/generated/validators/withdrawalList.zod.d.ts +39 -0
- package/dist/membership/v1/generated/validators/withdrawalList.zod.js +14 -0
- package/dist/membership/v1/generated/validators/withdrawalPreview.zod.d.ts +40 -0
- package/dist/membership/v1/generated/validators/withdrawalPreview.zod.js +25 -0
- package/dist/membership/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +28 -0
- package/dist/membership/v1/generated/validators/withdrawalPreviewItem.zod.js +19 -0
- package/dist/membership/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +15 -0
- package/dist/membership/v1/generated/validators/withdrawalPreviewRequest.zod.js +13 -0
- package/dist/membership/v1/generated/validators/withdrawalSource.zod.d.ts +23 -0
- package/dist/membership/v1/generated/validators/withdrawalSource.zod.js +23 -0
- package/dist/routes.d.ts +40 -0
- package/dist/routes.js +45 -0
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
export const withdrawalAllocationAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
33
|
+
export const withdrawalAllocationFeeAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
34
|
+
export const withdrawalAllocationRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
35
|
+
export const WithdrawalAllocation = zod.strictObject({
|
|
36
|
+
source_transaction_id: zod.uuid(),
|
|
37
|
+
amount: zod.string().regex(withdrawalAllocationAmountRegExp),
|
|
38
|
+
fee_amount: zod.string().regex(withdrawalAllocationFeeAmountRegExp),
|
|
39
|
+
refund_amount: zod.string().regex(withdrawalAllocationRefundAmountRegExp),
|
|
40
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
export declare const withdrawalCreateAmountRegExp: RegExp;
|
|
33
|
+
export declare const withdrawalCreateExpectedRefundAmountRegExp: RegExp;
|
|
34
|
+
export declare const withdrawalCreateExpectedItemsMax = 200;
|
|
35
|
+
export declare const WithdrawalCreate: zod.ZodObject<{
|
|
36
|
+
id: zod.ZodUUID;
|
|
37
|
+
billing_account_id: zod.ZodInt;
|
|
38
|
+
amount: zod.ZodString;
|
|
39
|
+
expected_refund_amount: zod.ZodString;
|
|
40
|
+
expected_items: zod.ZodArray<zod.ZodObject<{
|
|
41
|
+
source_transaction_id: zod.ZodUUID;
|
|
42
|
+
amount: zod.ZodString;
|
|
43
|
+
fee_amount: zod.ZodString;
|
|
44
|
+
refund_amount: zod.ZodString;
|
|
45
|
+
}, zod.z.core.$strict>>;
|
|
46
|
+
}, zod.z.core.$strict>;
|
|
47
|
+
export type WithdrawalCreate = zod.input<typeof WithdrawalCreate>;
|
|
48
|
+
export type WithdrawalCreateOutput = zod.output<typeof WithdrawalCreate>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
import { WithdrawalAllocation } from "./withdrawalAllocation.zod.js";
|
|
33
|
+
export const withdrawalCreateAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
34
|
+
export const withdrawalCreateExpectedRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
35
|
+
export const withdrawalCreateExpectedItemsMax = 200;
|
|
36
|
+
export const WithdrawalCreate = zod.strictObject({
|
|
37
|
+
id: zod.uuid(),
|
|
38
|
+
billing_account_id: zod.int(),
|
|
39
|
+
amount: zod.string().regex(withdrawalCreateAmountRegExp),
|
|
40
|
+
expected_refund_amount: zod.string().regex(withdrawalCreateExpectedRefundAmountRegExp),
|
|
41
|
+
expected_items: zod.array(WithdrawalAllocation).min(1).max(withdrawalCreateExpectedItemsMax),
|
|
42
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
export declare const withdrawalItemAmountRegExp: RegExp;
|
|
33
|
+
export declare const withdrawalItemFeeAmountRegExp: RegExp;
|
|
34
|
+
export declare const withdrawalItemRefundAmountRegExp: RegExp;
|
|
35
|
+
export declare const withdrawalItemCurrencyMin = 3;
|
|
36
|
+
export declare const withdrawalItemCurrencyMax = 3;
|
|
37
|
+
export declare const WithdrawalItem: zod.ZodObject<{
|
|
38
|
+
source_transaction_id: zod.ZodUUID;
|
|
39
|
+
amount: zod.ZodString;
|
|
40
|
+
fee_amount: zod.ZodString;
|
|
41
|
+
refund_amount: zod.ZodString;
|
|
42
|
+
id: zod.ZodUUID;
|
|
43
|
+
withdrawal_id: zod.ZodUUID;
|
|
44
|
+
billing_account_id: zod.ZodInt;
|
|
45
|
+
currency: zod.ZodString;
|
|
46
|
+
refund_id: zod.ZodUUID;
|
|
47
|
+
fee_transaction_id: zod.ZodOptional<zod.ZodUUID>;
|
|
48
|
+
status: zod.ZodEnum<{
|
|
49
|
+
pending: "pending";
|
|
50
|
+
failed: "failed";
|
|
51
|
+
succeeded: "succeeded";
|
|
52
|
+
reversed: "reversed";
|
|
53
|
+
}>;
|
|
54
|
+
completed_at: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
55
|
+
payment_gateway: zod.ZodString;
|
|
56
|
+
method_type: zod.ZodString;
|
|
57
|
+
source: zod.ZodObject<{
|
|
58
|
+
amount: zod.ZodString;
|
|
59
|
+
currency: zod.ZodString;
|
|
60
|
+
received_at: zod.z.ZodISODateTime;
|
|
61
|
+
payment_gateway: zod.ZodString;
|
|
62
|
+
method_type: zod.ZodString;
|
|
63
|
+
card_brand: zod.ZodOptional<zod.ZodString>;
|
|
64
|
+
card_last4: zod.ZodOptional<zod.ZodString>;
|
|
65
|
+
}, zod.z.core.$strict>;
|
|
66
|
+
failure_code: zod.ZodOptional<zod.ZodString>;
|
|
67
|
+
}, zod.z.core.$strict>;
|
|
68
|
+
export type WithdrawalItem = zod.input<typeof WithdrawalItem>;
|
|
69
|
+
export type WithdrawalItemOutput = zod.output<typeof WithdrawalItem>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
import { WithdrawalSource } from "./withdrawalSource.zod.js";
|
|
33
|
+
export const withdrawalItemAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
34
|
+
export const withdrawalItemFeeAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
35
|
+
export const withdrawalItemRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
36
|
+
export const withdrawalItemCurrencyMin = 3;
|
|
37
|
+
export const withdrawalItemCurrencyMax = 3;
|
|
38
|
+
export const WithdrawalItem = zod
|
|
39
|
+
.strictObject({
|
|
40
|
+
source_transaction_id: zod.uuid(),
|
|
41
|
+
amount: zod.string().regex(withdrawalItemAmountRegExp),
|
|
42
|
+
fee_amount: zod.string().regex(withdrawalItemFeeAmountRegExp),
|
|
43
|
+
refund_amount: zod.string().regex(withdrawalItemRefundAmountRegExp),
|
|
44
|
+
id: zod.uuid(),
|
|
45
|
+
withdrawal_id: zod.uuid(),
|
|
46
|
+
billing_account_id: zod.int(),
|
|
47
|
+
currency: zod.string().min(withdrawalItemCurrencyMin).max(withdrawalItemCurrencyMax),
|
|
48
|
+
refund_id: zod.uuid(),
|
|
49
|
+
fee_transaction_id: zod.uuid().optional(),
|
|
50
|
+
status: zod.enum(["pending", "succeeded", "failed", "reversed"]),
|
|
51
|
+
completed_at: zod.iso.datetime({ offset: true }).optional(),
|
|
52
|
+
payment_gateway: zod.string(),
|
|
53
|
+
method_type: zod.string(),
|
|
54
|
+
source: WithdrawalSource,
|
|
55
|
+
failure_code: zod
|
|
56
|
+
.string()
|
|
57
|
+
.optional()
|
|
58
|
+
.describe("The original gateway failure code when a refund failed, or refund_reversed when a completed refund was reversed. Absent while pending or successful."),
|
|
59
|
+
})
|
|
60
|
+
.describe("The fixed principal deduction, withdrawal fee and exact refund obligation for one original top-up. Each item has its own refund; payment_gateway and method_type identify the original route.");
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
export declare const WithdrawalItemList: zod.ZodObject<{
|
|
33
|
+
items: zod.ZodArray<zod.ZodObject<{
|
|
34
|
+
source_transaction_id: zod.ZodUUID;
|
|
35
|
+
amount: zod.ZodString;
|
|
36
|
+
fee_amount: zod.ZodString;
|
|
37
|
+
refund_amount: zod.ZodString;
|
|
38
|
+
id: zod.ZodUUID;
|
|
39
|
+
withdrawal_id: zod.ZodUUID;
|
|
40
|
+
billing_account_id: zod.ZodInt;
|
|
41
|
+
currency: zod.ZodString;
|
|
42
|
+
refund_id: zod.ZodUUID;
|
|
43
|
+
fee_transaction_id: zod.ZodOptional<zod.ZodUUID>;
|
|
44
|
+
status: zod.ZodEnum<{
|
|
45
|
+
pending: "pending";
|
|
46
|
+
failed: "failed";
|
|
47
|
+
succeeded: "succeeded";
|
|
48
|
+
reversed: "reversed";
|
|
49
|
+
}>;
|
|
50
|
+
completed_at: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
51
|
+
payment_gateway: zod.ZodString;
|
|
52
|
+
method_type: zod.ZodString;
|
|
53
|
+
source: zod.ZodObject<{
|
|
54
|
+
amount: zod.ZodString;
|
|
55
|
+
currency: zod.ZodString;
|
|
56
|
+
received_at: zod.z.ZodISODateTime;
|
|
57
|
+
payment_gateway: zod.ZodString;
|
|
58
|
+
method_type: zod.ZodString;
|
|
59
|
+
card_brand: zod.ZodOptional<zod.ZodString>;
|
|
60
|
+
card_last4: zod.ZodOptional<zod.ZodString>;
|
|
61
|
+
}, zod.z.core.$strict>;
|
|
62
|
+
failure_code: zod.ZodOptional<zod.ZodString>;
|
|
63
|
+
}, zod.z.core.$strict>>;
|
|
64
|
+
pagination: zod.ZodObject<{
|
|
65
|
+
page: zod.ZodInt;
|
|
66
|
+
page_size: zod.ZodInt;
|
|
67
|
+
total_count: zod.ZodOptional<zod.ZodInt>;
|
|
68
|
+
}, zod.z.core.$strict>;
|
|
69
|
+
}, zod.z.core.$strict>;
|
|
70
|
+
export type WithdrawalItemList = zod.input<typeof WithdrawalItemList>;
|
|
71
|
+
export type WithdrawalItemListOutput = zod.output<typeof WithdrawalItemList>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
import { OffsetPagination } from "./offsetPagination.zod.js";
|
|
33
|
+
import { WithdrawalItem } from "./withdrawalItem.zod.js";
|
|
34
|
+
export const WithdrawalItemList = zod.strictObject({
|
|
35
|
+
items: zod.array(WithdrawalItem),
|
|
36
|
+
pagination: OffsetPagination,
|
|
37
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
export declare const WithdrawalList: zod.ZodObject<{
|
|
33
|
+
items: zod.ZodArray<zod.ZodObject<{
|
|
34
|
+
id: zod.ZodUUID;
|
|
35
|
+
billing_account_id: zod.ZodInt;
|
|
36
|
+
currency: zod.ZodString;
|
|
37
|
+
amount: zod.ZodString;
|
|
38
|
+
fee_amount: zod.ZodString;
|
|
39
|
+
refund_amount: zod.ZodString;
|
|
40
|
+
deducted_amount: zod.ZodString;
|
|
41
|
+
settled_amount: zod.ZodString;
|
|
42
|
+
charged_fee_amount: zod.ZodString;
|
|
43
|
+
status: zod.ZodEnum<{
|
|
44
|
+
pending: "pending";
|
|
45
|
+
failed: "failed";
|
|
46
|
+
succeeded: "succeeded";
|
|
47
|
+
processing: "processing";
|
|
48
|
+
partially_completed: "partially_completed";
|
|
49
|
+
reversed: "reversed";
|
|
50
|
+
}>;
|
|
51
|
+
created_at: zod.z.ZodISODateTime;
|
|
52
|
+
completed_at: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
53
|
+
created_by: zod.ZodOptional<zod.ZodString>;
|
|
54
|
+
}, zod.z.core.$strict>>;
|
|
55
|
+
pagination: zod.ZodObject<{
|
|
56
|
+
page: zod.ZodInt;
|
|
57
|
+
page_size: zod.ZodInt;
|
|
58
|
+
total_count: zod.ZodOptional<zod.ZodInt>;
|
|
59
|
+
}, zod.z.core.$strict>;
|
|
60
|
+
}, zod.z.core.$strict>;
|
|
61
|
+
export type WithdrawalList = zod.input<typeof WithdrawalList>;
|
|
62
|
+
export type WithdrawalListOutput = zod.output<typeof WithdrawalList>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
import { OffsetPagination } from "./offsetPagination.zod.js";
|
|
33
|
+
import { Withdrawal } from "./withdrawal.zod.js";
|
|
34
|
+
export const WithdrawalList = zod.strictObject({
|
|
35
|
+
items: zod.array(Withdrawal),
|
|
36
|
+
pagination: OffsetPagination,
|
|
37
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
export declare const withdrawalPreviewCurrencyMin = 3;
|
|
33
|
+
export declare const withdrawalPreviewCurrencyMax = 3;
|
|
34
|
+
export declare const withdrawalPreviewAvailableAmountRegExp: RegExp;
|
|
35
|
+
export declare const withdrawalPreviewAmountRegExp: RegExp;
|
|
36
|
+
export declare const withdrawalPreviewFeeAmountRegExp: RegExp;
|
|
37
|
+
export declare const withdrawalPreviewRefundAmountRegExp: RegExp;
|
|
38
|
+
export declare const withdrawalPreviewItemsMax = 200;
|
|
39
|
+
export declare const WithdrawalPreview: zod.ZodObject<{
|
|
40
|
+
billing_account_id: zod.ZodInt;
|
|
41
|
+
currency: zod.ZodString;
|
|
42
|
+
available_amount: zod.ZodString;
|
|
43
|
+
amount: zod.ZodString;
|
|
44
|
+
fee_amount: zod.ZodString;
|
|
45
|
+
refund_amount: zod.ZodString;
|
|
46
|
+
items: zod.ZodArray<zod.ZodObject<{
|
|
47
|
+
source_transaction_id: zod.ZodUUID;
|
|
48
|
+
amount: zod.ZodString;
|
|
49
|
+
fee_amount: zod.ZodString;
|
|
50
|
+
refund_amount: zod.ZodString;
|
|
51
|
+
source: zod.ZodObject<{
|
|
52
|
+
amount: zod.ZodString;
|
|
53
|
+
currency: zod.ZodString;
|
|
54
|
+
received_at: zod.z.ZodISODateTime;
|
|
55
|
+
payment_gateway: zod.ZodString;
|
|
56
|
+
method_type: zod.ZodString;
|
|
57
|
+
card_brand: zod.ZodOptional<zod.ZodString>;
|
|
58
|
+
card_last4: zod.ZodOptional<zod.ZodString>;
|
|
59
|
+
}, zod.z.core.$strict>;
|
|
60
|
+
}, zod.z.core.$strict>>;
|
|
61
|
+
}, zod.z.core.$strict>;
|
|
62
|
+
export type WithdrawalPreview = zod.input<typeof WithdrawalPreview>;
|
|
63
|
+
export type WithdrawalPreviewOutput = zod.output<typeof WithdrawalPreview>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
import { WithdrawalPreviewItem } from "./withdrawalPreviewItem.zod.js";
|
|
33
|
+
export const withdrawalPreviewCurrencyMin = 3;
|
|
34
|
+
export const withdrawalPreviewCurrencyMax = 3;
|
|
35
|
+
export const withdrawalPreviewAvailableAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
36
|
+
export const withdrawalPreviewAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
37
|
+
export const withdrawalPreviewFeeAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
38
|
+
export const withdrawalPreviewRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
39
|
+
export const withdrawalPreviewItemsMax = 200;
|
|
40
|
+
export const WithdrawalPreview = zod.strictObject({
|
|
41
|
+
billing_account_id: zod.int(),
|
|
42
|
+
currency: zod.string().min(withdrawalPreviewCurrencyMin).max(withdrawalPreviewCurrencyMax),
|
|
43
|
+
available_amount: zod.string().regex(withdrawalPreviewAvailableAmountRegExp),
|
|
44
|
+
amount: zod.string().regex(withdrawalPreviewAmountRegExp),
|
|
45
|
+
fee_amount: zod.string().regex(withdrawalPreviewFeeAmountRegExp),
|
|
46
|
+
refund_amount: zod.string().regex(withdrawalPreviewRefundAmountRegExp),
|
|
47
|
+
items: zod.array(WithdrawalPreviewItem).max(withdrawalPreviewItemsMax),
|
|
48
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These endpoints do not accept an API key, and the forwarding endpoints do not accept a scoped token.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
export declare const withdrawalPreviewItemAmountRegExp: RegExp;
|
|
33
|
+
export declare const withdrawalPreviewItemFeeAmountRegExp: RegExp;
|
|
34
|
+
export declare const withdrawalPreviewItemRefundAmountRegExp: RegExp;
|
|
35
|
+
export declare const WithdrawalPreviewItem: zod.ZodObject<{
|
|
36
|
+
source_transaction_id: zod.ZodUUID;
|
|
37
|
+
amount: zod.ZodString;
|
|
38
|
+
fee_amount: zod.ZodString;
|
|
39
|
+
refund_amount: zod.ZodString;
|
|
40
|
+
source: zod.ZodObject<{
|
|
41
|
+
amount: zod.ZodString;
|
|
42
|
+
currency: zod.ZodString;
|
|
43
|
+
received_at: zod.z.ZodISODateTime;
|
|
44
|
+
payment_gateway: zod.ZodString;
|
|
45
|
+
method_type: zod.ZodString;
|
|
46
|
+
card_brand: zod.ZodOptional<zod.ZodString>;
|
|
47
|
+
card_last4: zod.ZodOptional<zod.ZodString>;
|
|
48
|
+
}, zod.z.core.$strict>;
|
|
49
|
+
}, zod.z.core.$strict>;
|
|
50
|
+
export type WithdrawalPreviewItem = zod.input<typeof WithdrawalPreviewItem>;
|
|
51
|
+
export type WithdrawalPreviewItemOutput = zod.output<typeof WithdrawalPreviewItem>;
|