@mestra-dev/contract 0.0.149 → 0.0.151
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 +23 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -470,6 +470,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
470
470
|
}
|
|
471
471
|
];
|
|
472
472
|
};
|
|
473
|
+
readonly code: {
|
|
474
|
+
readonly type: "string";
|
|
475
|
+
readonly description: "Optional stable machine-readable error code.";
|
|
476
|
+
readonly example: "CHECKOUT_PENDING";
|
|
477
|
+
};
|
|
473
478
|
readonly link: {
|
|
474
479
|
readonly type: "string";
|
|
475
480
|
readonly format: "uri";
|
|
@@ -7887,7 +7892,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
7887
7892
|
"Workspace"
|
|
7888
7893
|
];
|
|
7889
7894
|
readonly summary: "Delete a workspace";
|
|
7890
|
-
readonly description: "Soft-deletes a workspace: sets deleted_at, revokes collaborator access, and purges CRM content (policies, assignees, chat tenants, comments, tasks, customers, services, tags, templates). Billing subscriptions and invoices are retained for audit/history (pending invoices are canceled; the subscription is marked canceled). Free trial workspaces cannot be deleted. Only the owner can delete. Requires write access to crm::general.
|
|
7895
|
+
readonly description: "Soft-deletes a workspace: sets deleted_at, revokes collaborator access, and purges CRM content (policies, assignees, chat tenants, comments, tasks, customers, services, tags, templates). Billing subscriptions and invoices are retained for audit/history (pending invoices are canceled; the subscription is marked canceled). Free trial workspaces cannot be deleted. Only the owner can delete. Requires write access to crm::general. A YooKassa payment can be canceled only after it reaches waiting_for_capture; deletion is blocked while a checkout is pending, paid, or unresolved. Past-due paid workspaces and Free trials cannot.";
|
|
7891
7896
|
readonly security: readonly [
|
|
7892
7897
|
never
|
|
7893
7898
|
];
|
|
@@ -8153,7 +8158,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
8153
8158
|
"Payments"
|
|
8154
8159
|
];
|
|
8155
8160
|
readonly summary: "Create or retrieve YooKassa checkout";
|
|
8156
|
-
readonly description: "Workspace owner only. Starts checkout for a pending invoice and returns a redirect URL. Redirect the browser to paymentUrl.
|
|
8161
|
+
readonly description: "Workspace owner only. Starts a two-stage YooKassa checkout for a pending invoice and returns a redirect URL. Redirect the browser to paymentUrl. The backend captures an authorized payment only after YooKassa confirms it. A checkout is cancelable only after it reaches waiting_for_capture; a pending checkout must expire or complete.";
|
|
8157
8162
|
readonly security: readonly [
|
|
8158
8163
|
never
|
|
8159
8164
|
];
|
|
@@ -8246,7 +8251,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
8246
8251
|
"Payments"
|
|
8247
8252
|
];
|
|
8248
8253
|
readonly summary: "Apply a coupon to a pending invoice";
|
|
8249
|
-
readonly description: "Workspace owner only. Applies a fixed or percentage coupon. If an unpaid
|
|
8254
|
+
readonly description: "Workspace owner only. Applies a fixed or percentage coupon. If YooKassa has authorized an unpaid checkout (waiting_for_capture), it is canceled and replaced with the discounted invoice amount. A pending checkout expires after up to 5 minutes and must expire or complete before a coupon can be applied. Coupon attempts are rate limited; invalid codes intentionally return the same response.";
|
|
8250
8255
|
readonly security: readonly [
|
|
8251
8256
|
never
|
|
8252
8257
|
];
|
|
@@ -8506,7 +8511,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
8506
8511
|
"Payments"
|
|
8507
8512
|
];
|
|
8508
8513
|
readonly summary: "Receive YooKassa payment event";
|
|
8509
|
-
readonly description: "Server-to-server endpoint for YooKassa only. The core verifies the payment
|
|
8514
|
+
readonly description: "Server-to-server endpoint for YooKassa only. The core verifies the payment, captures an authorized two-stage payment, and only then marks the invoice paid. Frontends must not call this endpoint.";
|
|
8510
8515
|
readonly requestBody: {
|
|
8511
8516
|
readonly required: true;
|
|
8512
8517
|
readonly content: {
|
|
@@ -23582,6 +23587,18 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
23582
23587
|
} & {
|
|
23583
23588
|
"/invoice/:invoiceId/coupon": {
|
|
23584
23589
|
$post: {
|
|
23590
|
+
input: {
|
|
23591
|
+
param: {
|
|
23592
|
+
invoiceId: string;
|
|
23593
|
+
};
|
|
23594
|
+
};
|
|
23595
|
+
output: {
|
|
23596
|
+
success: false;
|
|
23597
|
+
error: never;
|
|
23598
|
+
};
|
|
23599
|
+
outputFormat: "json";
|
|
23600
|
+
status: 400;
|
|
23601
|
+
} | {
|
|
23585
23602
|
input: {
|
|
23586
23603
|
param: {
|
|
23587
23604
|
invoiceId: string;
|
|
@@ -23609,6 +23626,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
23609
23626
|
output: {
|
|
23610
23627
|
success: false;
|
|
23611
23628
|
error: string;
|
|
23629
|
+
code: string | undefined;
|
|
23612
23630
|
};
|
|
23613
23631
|
outputFormat: "json";
|
|
23614
23632
|
status: 400 | 403 | 404 | 409;
|
|
@@ -23695,7 +23713,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
23695
23713
|
error: string;
|
|
23696
23714
|
};
|
|
23697
23715
|
outputFormat: "json";
|
|
23698
|
-
status: 400 | 404 | 503;
|
|
23716
|
+
status: 400 | 404 | 409 | 502 | 503;
|
|
23699
23717
|
};
|
|
23700
23718
|
};
|
|
23701
23719
|
}, "/payments">, "/", "/">;
|