@mestra-dev/contract 0.0.220 → 0.0.221
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/index.d.ts +122 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10173,13 +10173,100 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
10173
10173
|
};
|
|
10174
10174
|
};
|
|
10175
10175
|
};
|
|
10176
|
+
readonly "/payments/invoice/{invoiceId}/cancel": {
|
|
10177
|
+
readonly post: {
|
|
10178
|
+
readonly tags: readonly [
|
|
10179
|
+
"Payments"
|
|
10180
|
+
];
|
|
10181
|
+
readonly summary: "Cancel an unpaid upgrade and restore the paid workspace";
|
|
10182
|
+
readonly description: "Workspace owner only. Cancels a pending upgrade invoice and leaves the plan, seats, and billing period that were already paid. While the paid term is still open, the subscription returns to active and writes are allowed again. If that term has already ended, the upgrade is replaced by a renewal invoice and the subscription returns to past_due. A YooKassa payment that already succeeded is applied instead. A payment waiting for capture cannot be canceled. An open redirect checkout is abandoned; completing that old link does not change the workspace. Initial and renewal invoices cannot be canceled here.";
|
|
10183
|
+
readonly security: readonly [
|
|
10184
|
+
never
|
|
10185
|
+
];
|
|
10186
|
+
readonly parameters: readonly [
|
|
10187
|
+
{
|
|
10188
|
+
readonly name: "invoiceId";
|
|
10189
|
+
readonly in: "path";
|
|
10190
|
+
readonly required: true;
|
|
10191
|
+
readonly schema: {
|
|
10192
|
+
readonly type: "string";
|
|
10193
|
+
readonly format: "uuid";
|
|
10194
|
+
};
|
|
10195
|
+
}
|
|
10196
|
+
];
|
|
10197
|
+
readonly responses: {
|
|
10198
|
+
readonly 200: {
|
|
10199
|
+
readonly description: "Upgrade canceled. subscriptionStatus is active when the paid term is still open, or past_due when it has ended and a renewal invoice was created.";
|
|
10200
|
+
readonly content: {
|
|
10201
|
+
readonly "application/json": {
|
|
10202
|
+
readonly schema: {
|
|
10203
|
+
readonly type: "object";
|
|
10204
|
+
readonly required: readonly [
|
|
10205
|
+
"success",
|
|
10206
|
+
"invoiceId",
|
|
10207
|
+
"subscriptionStatus"
|
|
10208
|
+
];
|
|
10209
|
+
readonly properties: {
|
|
10210
|
+
readonly success: {
|
|
10211
|
+
readonly type: "boolean";
|
|
10212
|
+
readonly const: true;
|
|
10213
|
+
};
|
|
10214
|
+
readonly invoiceId: {
|
|
10215
|
+
readonly type: "string";
|
|
10216
|
+
readonly format: "uuid";
|
|
10217
|
+
};
|
|
10218
|
+
readonly subscriptionStatus: {
|
|
10219
|
+
readonly type: "string";
|
|
10220
|
+
readonly enum: readonly [
|
|
10221
|
+
"active",
|
|
10222
|
+
"past_due"
|
|
10223
|
+
];
|
|
10224
|
+
};
|
|
10225
|
+
};
|
|
10226
|
+
};
|
|
10227
|
+
};
|
|
10228
|
+
};
|
|
10229
|
+
};
|
|
10230
|
+
readonly 404: {
|
|
10231
|
+
readonly description: "Invoice not found.";
|
|
10232
|
+
readonly content: {
|
|
10233
|
+
readonly "application/json": {
|
|
10234
|
+
readonly schema: {
|
|
10235
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10236
|
+
};
|
|
10237
|
+
};
|
|
10238
|
+
};
|
|
10239
|
+
};
|
|
10240
|
+
readonly 409: {
|
|
10241
|
+
readonly description: "Invoice is not an unpaid upgrade, is already paid, or a YooKassa payment is being processed.";
|
|
10242
|
+
readonly content: {
|
|
10243
|
+
readonly "application/json": {
|
|
10244
|
+
readonly schema: {
|
|
10245
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10246
|
+
};
|
|
10247
|
+
};
|
|
10248
|
+
};
|
|
10249
|
+
};
|
|
10250
|
+
readonly 503: {
|
|
10251
|
+
readonly description: "YooKassa configuration is missing.";
|
|
10252
|
+
readonly content: {
|
|
10253
|
+
readonly "application/json": {
|
|
10254
|
+
readonly schema: {
|
|
10255
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
10256
|
+
};
|
|
10257
|
+
};
|
|
10258
|
+
};
|
|
10259
|
+
};
|
|
10260
|
+
};
|
|
10261
|
+
};
|
|
10262
|
+
};
|
|
10176
10263
|
readonly "/payments/upgrade": {
|
|
10177
10264
|
readonly post: {
|
|
10178
10265
|
readonly tags: readonly [
|
|
10179
10266
|
"Payments"
|
|
10180
10267
|
];
|
|
10181
10268
|
readonly summary: "Create a plan-change or seat-change invoice";
|
|
10182
|
-
readonly description: "Before the first payment, owners can correct a plan or seat count up or down. After any payment, only a higher plan and/or more seats is accepted. The selected plan must fit the workspace's current tasks, comments, customers, services, storage usage, and active collaborator count; otherwise delete data or select a larger plan before retrying. The selected change takes effect only after the new invoice is paid.";
|
|
10269
|
+
readonly description: "Before the first payment, owners can correct a plan or seat count up or down. After any payment, only a higher plan and/or more seats is accepted. The selected plan must fit the workspace's current tasks, comments, customers, services, storage usage, and active collaborator count; otherwise delete data or select a larger plan before retrying. The selected change takes effect only after the new invoice is paid. Until then the subscription is pending and writes are blocked. Cancel that unpaid upgrade with POST /payments/invoice/{invoiceId}/cancel to return to the plan already paid for.";
|
|
10183
10270
|
readonly security: readonly [
|
|
10184
10271
|
never
|
|
10185
10272
|
];
|
|
@@ -30617,6 +30704,40 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
30617
30704
|
status: 400 | 403 | 404 | 409;
|
|
30618
30705
|
};
|
|
30619
30706
|
};
|
|
30707
|
+
} & {
|
|
30708
|
+
"/invoice/:invoiceId/cancel": {
|
|
30709
|
+
$post: {
|
|
30710
|
+
input: {
|
|
30711
|
+
param: {
|
|
30712
|
+
invoiceId: string;
|
|
30713
|
+
};
|
|
30714
|
+
};
|
|
30715
|
+
output: {
|
|
30716
|
+
invoiceId: string;
|
|
30717
|
+
subscriptionStatus: "active";
|
|
30718
|
+
success: true;
|
|
30719
|
+
} | {
|
|
30720
|
+
invoiceId: string;
|
|
30721
|
+
subscriptionStatus: "past_due";
|
|
30722
|
+
success: true;
|
|
30723
|
+
};
|
|
30724
|
+
outputFormat: "json";
|
|
30725
|
+
status: 200;
|
|
30726
|
+
} | {
|
|
30727
|
+
input: {
|
|
30728
|
+
param: {
|
|
30729
|
+
invoiceId: string;
|
|
30730
|
+
};
|
|
30731
|
+
};
|
|
30732
|
+
output: {
|
|
30733
|
+
success: false;
|
|
30734
|
+
error: string;
|
|
30735
|
+
code: string | undefined;
|
|
30736
|
+
};
|
|
30737
|
+
outputFormat: "json";
|
|
30738
|
+
status: 400 | 403 | 404 | 409 | 502 | 503;
|
|
30739
|
+
};
|
|
30740
|
+
};
|
|
30620
30741
|
} & {
|
|
30621
30742
|
"/upgrade": {
|
|
30622
30743
|
$post: {
|