@mestra-dev/contract 0.0.32 → 0.0.33
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 +1226 -71
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
27
27
|
readonly info: {
|
|
28
28
|
readonly title: "Auth Service API";
|
|
29
29
|
readonly version: "1.5.4";
|
|
30
|
-
readonly description: "OpenAPI specification for the Auth, Integrations, Workspace, Tasks, Templates, Tags, Comments, Assignees, Chat, Events, Billings, Files, and Notifications endpoints exposed by the k3-core platform. Unhandled HTTPException and unexpected errors are normalized by the global error handler to `{ success: false, error: string }` (status preserved for HTTPException; 500 otherwise).";
|
|
30
|
+
readonly description: "OpenAPI specification for the Auth, Integrations, Workspace, Payments, Tasks, Templates, Tags, Comments, Assignees, Chat, Events, Billings, Files, and Notifications endpoints exposed by the k3-core platform. Unhandled HTTPException and unexpected errors are normalized by the global error handler to `{ success: false, error: string }` (status preserved for HTTPException; 500 otherwise).";
|
|
31
31
|
};
|
|
32
32
|
readonly servers: readonly [
|
|
33
33
|
{
|
|
@@ -56,6 +56,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
56
56
|
readonly name: "Workspace";
|
|
57
57
|
readonly description: "Workspace management endpoints";
|
|
58
58
|
},
|
|
59
|
+
{
|
|
60
|
+
readonly name: "Payments";
|
|
61
|
+
readonly description: "Workspace subscription invoices, YooKassa checkout, renewals, and upgrades.";
|
|
62
|
+
},
|
|
59
63
|
{
|
|
60
64
|
readonly name: "Tasks";
|
|
61
65
|
readonly description: "Task management endpoints";
|
|
@@ -119,6 +123,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
119
123
|
readonly bearerFormat: "JWT";
|
|
120
124
|
readonly description: "Long-lived refresh token (iss: refresh). Claims include email and userId.";
|
|
121
125
|
};
|
|
126
|
+
readonly billingAdminToken: {
|
|
127
|
+
readonly type: "http";
|
|
128
|
+
readonly scheme: "bearer";
|
|
129
|
+
readonly description: "Operations-only token configured as BILLING_ADMIN_TOKEN. Never expose this token to a browser client.";
|
|
130
|
+
};
|
|
122
131
|
};
|
|
123
132
|
readonly schemas: {
|
|
124
133
|
readonly OtpRequestSuccess: {
|
|
@@ -348,7 +357,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
348
357
|
readonly required: readonly [
|
|
349
358
|
"success",
|
|
350
359
|
"workspace",
|
|
351
|
-
"name"
|
|
360
|
+
"name",
|
|
361
|
+
"invoiceId",
|
|
362
|
+
"subscriptionStatus",
|
|
363
|
+
"bonusWorkspace"
|
|
352
364
|
];
|
|
353
365
|
readonly properties: {
|
|
354
366
|
readonly success: {
|
|
@@ -362,6 +374,24 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
362
374
|
readonly name: {
|
|
363
375
|
readonly type: "string";
|
|
364
376
|
};
|
|
377
|
+
readonly invoiceId: {
|
|
378
|
+
readonly type: "string";
|
|
379
|
+
readonly format: "uuid";
|
|
380
|
+
readonly nullable: true;
|
|
381
|
+
readonly description: "Pending first-payment invoice for Economy, Standard, or Professional. Null for Free trial and complimentary Professional workspace.";
|
|
382
|
+
};
|
|
383
|
+
readonly subscriptionStatus: {
|
|
384
|
+
readonly type: "string";
|
|
385
|
+
readonly enum: readonly [
|
|
386
|
+
"trialing",
|
|
387
|
+
"pending",
|
|
388
|
+
"active"
|
|
389
|
+
];
|
|
390
|
+
};
|
|
391
|
+
readonly bonusWorkspace: {
|
|
392
|
+
readonly type: "boolean";
|
|
393
|
+
readonly description: "True only when this is the one complimentary Professional workspace linked to an active paid Professional workspace.";
|
|
394
|
+
};
|
|
365
395
|
};
|
|
366
396
|
};
|
|
367
397
|
readonly ErrorResponse: {
|
|
@@ -370,14 +400,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
370
400
|
"success",
|
|
371
401
|
"error"
|
|
372
402
|
];
|
|
373
|
-
readonly description: "Standard API error body. Route handlers and the global HTTPException handler return this shape. Validation failures may put
|
|
403
|
+
readonly description: "Standard API error body. Route handlers and the global HTTPException handler return this shape. Validation failures may put Valibot details in `error` instead of a string.";
|
|
374
404
|
readonly properties: {
|
|
375
405
|
readonly success: {
|
|
376
406
|
readonly type: "boolean";
|
|
377
407
|
readonly const: false;
|
|
378
408
|
};
|
|
379
409
|
readonly error: {
|
|
380
|
-
readonly description: "Human-readable message, or
|
|
410
|
+
readonly description: "Human-readable message, or Valibot validation details for invalid payloads.";
|
|
381
411
|
readonly oneOf: readonly [
|
|
382
412
|
{
|
|
383
413
|
readonly type: "string";
|
|
@@ -813,12 +843,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
813
843
|
};
|
|
814
844
|
readonly WorkspaceMaxCollaborators: {
|
|
815
845
|
readonly type: "integer";
|
|
816
|
-
readonly
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
50
|
|
820
|
-
];
|
|
821
|
-
readonly description: "Allowed collaborator cap for the workspace plan tier.";
|
|
846
|
+
readonly minimum: 1;
|
|
847
|
+
readonly maximum: 10000;
|
|
848
|
+
readonly description: "Number of billable seats reserved for the workspace.";
|
|
822
849
|
};
|
|
823
850
|
readonly WorkspaceResourceAccess: {
|
|
824
851
|
readonly type: "object";
|
|
@@ -1083,7 +1110,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1083
1110
|
readonly type: "object";
|
|
1084
1111
|
readonly required: readonly [
|
|
1085
1112
|
"success",
|
|
1086
|
-
"
|
|
1113
|
+
"plans",
|
|
1087
1114
|
"price"
|
|
1088
1115
|
];
|
|
1089
1116
|
readonly properties: {
|
|
@@ -1091,18 +1118,30 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1091
1118
|
readonly type: "boolean";
|
|
1092
1119
|
readonly const: true;
|
|
1093
1120
|
};
|
|
1094
|
-
readonly
|
|
1121
|
+
readonly plans: {
|
|
1095
1122
|
readonly type: "array";
|
|
1096
|
-
readonly description: "Available CRM pricing plans.";
|
|
1097
1123
|
readonly items: {
|
|
1098
|
-
readonly $ref: "#/components/schemas/
|
|
1124
|
+
readonly $ref: "#/components/schemas/WorkspacePlan";
|
|
1099
1125
|
};
|
|
1100
1126
|
};
|
|
1101
1127
|
readonly price: {
|
|
1102
|
-
readonly type: "
|
|
1103
|
-
readonly
|
|
1104
|
-
|
|
1105
|
-
|
|
1128
|
+
readonly type: "array";
|
|
1129
|
+
readonly items: {
|
|
1130
|
+
readonly type: "object";
|
|
1131
|
+
readonly required: readonly [
|
|
1132
|
+
"code",
|
|
1133
|
+
"amountKopecks"
|
|
1134
|
+
];
|
|
1135
|
+
readonly properties: {
|
|
1136
|
+
readonly code: {
|
|
1137
|
+
readonly type: "string";
|
|
1138
|
+
};
|
|
1139
|
+
readonly amountKopecks: {
|
|
1140
|
+
readonly type: "integer";
|
|
1141
|
+
readonly description: "Monthly total for the requested seat count, in kopecks.";
|
|
1142
|
+
};
|
|
1143
|
+
};
|
|
1144
|
+
};
|
|
1106
1145
|
};
|
|
1107
1146
|
};
|
|
1108
1147
|
};
|
|
@@ -1404,6 +1443,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1404
1443
|
readonly required: readonly [
|
|
1405
1444
|
"filename",
|
|
1406
1445
|
"contentType",
|
|
1446
|
+
"contentLength",
|
|
1407
1447
|
"workspace"
|
|
1408
1448
|
];
|
|
1409
1449
|
readonly properties: {
|
|
@@ -1417,6 +1457,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1417
1457
|
readonly contentType: {
|
|
1418
1458
|
readonly $ref: "#/components/schemas/FileContentType";
|
|
1419
1459
|
};
|
|
1460
|
+
readonly contentLength: {
|
|
1461
|
+
readonly type: "integer";
|
|
1462
|
+
readonly minimum: 1;
|
|
1463
|
+
readonly maximum: 15728640;
|
|
1464
|
+
readonly description: "Exact file byte length. The S3 upload policy rejects a different size.";
|
|
1465
|
+
};
|
|
1420
1466
|
readonly workspace: {
|
|
1421
1467
|
readonly type: "string";
|
|
1422
1468
|
readonly format: "uuid";
|
|
@@ -1490,7 +1536,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1490
1536
|
};
|
|
1491
1537
|
readonly maxSize: {
|
|
1492
1538
|
readonly type: "integer";
|
|
1493
|
-
readonly description: "
|
|
1539
|
+
readonly description: "Exact requested upload size in bytes; it cannot exceed 15 MB.";
|
|
1494
1540
|
readonly example: 15728640;
|
|
1495
1541
|
};
|
|
1496
1542
|
};
|
|
@@ -1500,6 +1546,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1500
1546
|
readonly required: readonly [
|
|
1501
1547
|
"filename",
|
|
1502
1548
|
"contentType",
|
|
1549
|
+
"contentLength",
|
|
1503
1550
|
"workspace",
|
|
1504
1551
|
"taskId",
|
|
1505
1552
|
"commentId"
|
|
@@ -1515,6 +1562,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1515
1562
|
readonly contentType: {
|
|
1516
1563
|
readonly $ref: "#/components/schemas/FileContentType";
|
|
1517
1564
|
};
|
|
1565
|
+
readonly contentLength: {
|
|
1566
|
+
readonly type: "integer";
|
|
1567
|
+
readonly minimum: 1;
|
|
1568
|
+
readonly maximum: 15728640;
|
|
1569
|
+
readonly description: "Exact file byte length. The S3 upload policy rejects a different size.";
|
|
1570
|
+
};
|
|
1518
1571
|
readonly workspace: {
|
|
1519
1572
|
readonly type: "string";
|
|
1520
1573
|
readonly format: "uuid";
|
|
@@ -1564,7 +1617,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1564
1617
|
};
|
|
1565
1618
|
readonly maxSize: {
|
|
1566
1619
|
readonly type: "integer";
|
|
1567
|
-
readonly description: "
|
|
1620
|
+
readonly description: "Exact requested upload size in bytes; it cannot exceed 15 MB.";
|
|
1568
1621
|
readonly example: 15728640;
|
|
1569
1622
|
};
|
|
1570
1623
|
};
|
|
@@ -3017,6 +3070,356 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
3017
3070
|
};
|
|
3018
3071
|
};
|
|
3019
3072
|
};
|
|
3073
|
+
readonly BillingInterval: {
|
|
3074
|
+
readonly type: "string";
|
|
3075
|
+
readonly enum: readonly [
|
|
3076
|
+
"monthly",
|
|
3077
|
+
"yearly"
|
|
3078
|
+
];
|
|
3079
|
+
readonly description: "Yearly prices represent 10 monthly payments (two months free).";
|
|
3080
|
+
};
|
|
3081
|
+
readonly BillingCycles: {
|
|
3082
|
+
readonly type: "integer";
|
|
3083
|
+
readonly minimum: 1;
|
|
3084
|
+
readonly maximum: 11;
|
|
3085
|
+
readonly description: "Number of prepaid billing units. Monthly supports 1\u201311 months; yearly supports 1\u20132 years.";
|
|
3086
|
+
};
|
|
3087
|
+
readonly WorkspacePlan: {
|
|
3088
|
+
readonly type: "object";
|
|
3089
|
+
readonly required: readonly [
|
|
3090
|
+
"id",
|
|
3091
|
+
"code",
|
|
3092
|
+
"name",
|
|
3093
|
+
"kind",
|
|
3094
|
+
"sortOrder",
|
|
3095
|
+
"prices",
|
|
3096
|
+
"limits"
|
|
3097
|
+
];
|
|
3098
|
+
readonly properties: {
|
|
3099
|
+
readonly id: {
|
|
3100
|
+
readonly type: "string";
|
|
3101
|
+
readonly format: "uuid";
|
|
3102
|
+
};
|
|
3103
|
+
readonly code: {
|
|
3104
|
+
readonly type: "string";
|
|
3105
|
+
readonly example: "economy";
|
|
3106
|
+
};
|
|
3107
|
+
readonly name: {
|
|
3108
|
+
readonly type: "string";
|
|
3109
|
+
readonly example: "Economy";
|
|
3110
|
+
};
|
|
3111
|
+
readonly kind: {
|
|
3112
|
+
readonly type: "string";
|
|
3113
|
+
readonly enum: readonly [
|
|
3114
|
+
"trial",
|
|
3115
|
+
"public",
|
|
3116
|
+
"enterprise"
|
|
3117
|
+
];
|
|
3118
|
+
};
|
|
3119
|
+
readonly sortOrder: {
|
|
3120
|
+
readonly type: "integer";
|
|
3121
|
+
};
|
|
3122
|
+
readonly prices: {
|
|
3123
|
+
readonly type: "object";
|
|
3124
|
+
readonly additionalProperties: {
|
|
3125
|
+
readonly type: "integer";
|
|
3126
|
+
};
|
|
3127
|
+
readonly description: "Price per seat in kopecks, keyed by billing interval. Free trial has no prices.";
|
|
3128
|
+
readonly example: {
|
|
3129
|
+
readonly monthly: 99000;
|
|
3130
|
+
readonly yearly: 990000;
|
|
3131
|
+
};
|
|
3132
|
+
};
|
|
3133
|
+
readonly limits: {
|
|
3134
|
+
readonly type: "object";
|
|
3135
|
+
readonly additionalProperties: {
|
|
3136
|
+
readonly type: "integer";
|
|
3137
|
+
readonly format: "int64";
|
|
3138
|
+
};
|
|
3139
|
+
readonly description: "Included limits keyed by tasks, comments, customers, services, and storage_bytes.";
|
|
3140
|
+
};
|
|
3141
|
+
};
|
|
3142
|
+
};
|
|
3143
|
+
readonly WorkspaceSubscription: {
|
|
3144
|
+
readonly type: "object";
|
|
3145
|
+
readonly required: readonly [
|
|
3146
|
+
"id",
|
|
3147
|
+
"status",
|
|
3148
|
+
"seats",
|
|
3149
|
+
"planId",
|
|
3150
|
+
"planCode",
|
|
3151
|
+
"planName"
|
|
3152
|
+
];
|
|
3153
|
+
readonly properties: {
|
|
3154
|
+
readonly id: {
|
|
3155
|
+
readonly type: "string";
|
|
3156
|
+
readonly format: "uuid";
|
|
3157
|
+
};
|
|
3158
|
+
readonly status: {
|
|
3159
|
+
readonly type: "string";
|
|
3160
|
+
readonly enum: readonly [
|
|
3161
|
+
"trialing",
|
|
3162
|
+
"pending",
|
|
3163
|
+
"active",
|
|
3164
|
+
"past_due",
|
|
3165
|
+
"frozen",
|
|
3166
|
+
"canceled"
|
|
3167
|
+
];
|
|
3168
|
+
};
|
|
3169
|
+
readonly seats: {
|
|
3170
|
+
readonly type: "integer";
|
|
3171
|
+
};
|
|
3172
|
+
readonly interval: {
|
|
3173
|
+
readonly $ref: "#/components/schemas/BillingInterval";
|
|
3174
|
+
readonly nullable: true;
|
|
3175
|
+
};
|
|
3176
|
+
readonly billingCycles: {
|
|
3177
|
+
readonly $ref: "#/components/schemas/BillingCycles";
|
|
3178
|
+
};
|
|
3179
|
+
readonly trialEndsAt: {
|
|
3180
|
+
readonly type: "string";
|
|
3181
|
+
readonly format: "date-time";
|
|
3182
|
+
readonly nullable: true;
|
|
3183
|
+
};
|
|
3184
|
+
readonly periodEnd: {
|
|
3185
|
+
readonly type: "string";
|
|
3186
|
+
readonly format: "date-time";
|
|
3187
|
+
readonly nullable: true;
|
|
3188
|
+
};
|
|
3189
|
+
readonly planId: {
|
|
3190
|
+
readonly type: "string";
|
|
3191
|
+
readonly format: "uuid";
|
|
3192
|
+
};
|
|
3193
|
+
readonly planCode: {
|
|
3194
|
+
readonly type: "string";
|
|
3195
|
+
};
|
|
3196
|
+
readonly planName: {
|
|
3197
|
+
readonly type: "string";
|
|
3198
|
+
};
|
|
3199
|
+
};
|
|
3200
|
+
};
|
|
3201
|
+
readonly BillingInvoice: {
|
|
3202
|
+
readonly type: "object";
|
|
3203
|
+
readonly required: readonly [
|
|
3204
|
+
"id",
|
|
3205
|
+
"workspaceId",
|
|
3206
|
+
"planId",
|
|
3207
|
+
"status",
|
|
3208
|
+
"kind",
|
|
3209
|
+
"seats",
|
|
3210
|
+
"interval",
|
|
3211
|
+
"billingCycles",
|
|
3212
|
+
"amountKopecks",
|
|
3213
|
+
"currency"
|
|
3214
|
+
];
|
|
3215
|
+
readonly properties: {
|
|
3216
|
+
readonly id: {
|
|
3217
|
+
readonly type: "string";
|
|
3218
|
+
readonly format: "uuid";
|
|
3219
|
+
};
|
|
3220
|
+
readonly workspaceId: {
|
|
3221
|
+
readonly type: "string";
|
|
3222
|
+
readonly format: "uuid";
|
|
3223
|
+
};
|
|
3224
|
+
readonly planId: {
|
|
3225
|
+
readonly type: "string";
|
|
3226
|
+
readonly format: "uuid";
|
|
3227
|
+
};
|
|
3228
|
+
readonly status: {
|
|
3229
|
+
readonly type: "string";
|
|
3230
|
+
readonly enum: readonly [
|
|
3231
|
+
"pending",
|
|
3232
|
+
"paid",
|
|
3233
|
+
"canceled",
|
|
3234
|
+
"failed"
|
|
3235
|
+
];
|
|
3236
|
+
};
|
|
3237
|
+
readonly kind: {
|
|
3238
|
+
readonly type: "string";
|
|
3239
|
+
readonly enum: readonly [
|
|
3240
|
+
"initial",
|
|
3241
|
+
"upgrade",
|
|
3242
|
+
"renewal"
|
|
3243
|
+
];
|
|
3244
|
+
};
|
|
3245
|
+
readonly seats: {
|
|
3246
|
+
readonly type: "integer";
|
|
3247
|
+
};
|
|
3248
|
+
readonly interval: {
|
|
3249
|
+
readonly $ref: "#/components/schemas/BillingInterval";
|
|
3250
|
+
};
|
|
3251
|
+
readonly billingCycles: {
|
|
3252
|
+
readonly $ref: "#/components/schemas/BillingCycles";
|
|
3253
|
+
};
|
|
3254
|
+
readonly amountKopecks: {
|
|
3255
|
+
readonly type: "integer";
|
|
3256
|
+
readonly description: "Full invoice amount in kopecks.";
|
|
3257
|
+
};
|
|
3258
|
+
readonly currency: {
|
|
3259
|
+
readonly type: "string";
|
|
3260
|
+
readonly enum: readonly [
|
|
3261
|
+
"RUB"
|
|
3262
|
+
];
|
|
3263
|
+
};
|
|
3264
|
+
readonly paymentUrl: {
|
|
3265
|
+
readonly type: "string";
|
|
3266
|
+
readonly format: "uri";
|
|
3267
|
+
readonly nullable: true;
|
|
3268
|
+
};
|
|
3269
|
+
readonly paidAt: {
|
|
3270
|
+
readonly type: "string";
|
|
3271
|
+
readonly format: "date-time";
|
|
3272
|
+
readonly nullable: true;
|
|
3273
|
+
};
|
|
3274
|
+
};
|
|
3275
|
+
};
|
|
3276
|
+
readonly BillingRecommendations: {
|
|
3277
|
+
readonly type: "object";
|
|
3278
|
+
readonly required: readonly [
|
|
3279
|
+
"usage",
|
|
3280
|
+
"plans"
|
|
3281
|
+
];
|
|
3282
|
+
readonly description: "Returned only for a frozen Free-trial workspace.";
|
|
3283
|
+
readonly properties: {
|
|
3284
|
+
readonly usage: {
|
|
3285
|
+
readonly type: "object";
|
|
3286
|
+
readonly required: readonly [
|
|
3287
|
+
"tasks",
|
|
3288
|
+
"comments",
|
|
3289
|
+
"customers",
|
|
3290
|
+
"services",
|
|
3291
|
+
"seats",
|
|
3292
|
+
"storage_bytes"
|
|
3293
|
+
];
|
|
3294
|
+
readonly additionalProperties: {
|
|
3295
|
+
readonly type: "integer";
|
|
3296
|
+
readonly format: "int64";
|
|
3297
|
+
};
|
|
3298
|
+
};
|
|
3299
|
+
readonly plans: {
|
|
3300
|
+
readonly type: "array";
|
|
3301
|
+
readonly items: {
|
|
3302
|
+
readonly allOf: readonly [
|
|
3303
|
+
{
|
|
3304
|
+
readonly $ref: "#/components/schemas/WorkspacePlan";
|
|
3305
|
+
},
|
|
3306
|
+
{
|
|
3307
|
+
readonly type: "object";
|
|
3308
|
+
readonly required: readonly [
|
|
3309
|
+
"fits",
|
|
3310
|
+
"overLimit"
|
|
3311
|
+
];
|
|
3312
|
+
readonly properties: {
|
|
3313
|
+
readonly fits: {
|
|
3314
|
+
readonly type: "boolean";
|
|
3315
|
+
};
|
|
3316
|
+
readonly overLimit: {
|
|
3317
|
+
readonly type: "array";
|
|
3318
|
+
readonly items: {
|
|
3319
|
+
readonly type: "string";
|
|
3320
|
+
};
|
|
3321
|
+
};
|
|
3322
|
+
};
|
|
3323
|
+
}
|
|
3324
|
+
];
|
|
3325
|
+
};
|
|
3326
|
+
};
|
|
3327
|
+
};
|
|
3328
|
+
};
|
|
3329
|
+
readonly UpgradeWorkspacePlanRequest: {
|
|
3330
|
+
readonly type: "object";
|
|
3331
|
+
readonly required: readonly [
|
|
3332
|
+
"workspace"
|
|
3333
|
+
];
|
|
3334
|
+
readonly properties: {
|
|
3335
|
+
readonly workspace: {
|
|
3336
|
+
readonly type: "string";
|
|
3337
|
+
readonly format: "uuid";
|
|
3338
|
+
};
|
|
3339
|
+
readonly plan: {
|
|
3340
|
+
readonly type: "string";
|
|
3341
|
+
readonly description: "Target public or workspace-granted Enterprise plan code. Required when choosing a plan.";
|
|
3342
|
+
};
|
|
3343
|
+
readonly seats: {
|
|
3344
|
+
readonly $ref: "#/components/schemas/WorkspaceMaxCollaborators";
|
|
3345
|
+
};
|
|
3346
|
+
readonly billingInterval: {
|
|
3347
|
+
readonly $ref: "#/components/schemas/BillingInterval";
|
|
3348
|
+
readonly description: "Required when converting a frozen Free trial to a paid plan.";
|
|
3349
|
+
};
|
|
3350
|
+
readonly billingCycles: {
|
|
3351
|
+
readonly $ref: "#/components/schemas/BillingCycles";
|
|
3352
|
+
readonly description: "Prepaid months (1\u201311) or years (1\u20132). Defaults to 1.";
|
|
3353
|
+
};
|
|
3354
|
+
};
|
|
3355
|
+
};
|
|
3356
|
+
readonly CreateEnterprisePlanRequest: {
|
|
3357
|
+
readonly type: "object";
|
|
3358
|
+
readonly required: readonly [
|
|
3359
|
+
"workspace",
|
|
3360
|
+
"email",
|
|
3361
|
+
"code",
|
|
3362
|
+
"name",
|
|
3363
|
+
"monthlyAmountKopecks",
|
|
3364
|
+
"yearlyAmountKopecks",
|
|
3365
|
+
"limits"
|
|
3366
|
+
];
|
|
3367
|
+
readonly properties: {
|
|
3368
|
+
readonly workspace: {
|
|
3369
|
+
readonly type: "string";
|
|
3370
|
+
readonly format: "uuid";
|
|
3371
|
+
};
|
|
3372
|
+
readonly email: {
|
|
3373
|
+
readonly type: "string";
|
|
3374
|
+
readonly format: "email";
|
|
3375
|
+
readonly description: "Email of the workspace owner who may see and select this private plan.";
|
|
3376
|
+
};
|
|
3377
|
+
readonly code: {
|
|
3378
|
+
readonly type: "string";
|
|
3379
|
+
readonly pattern: "^[a-z0-9_-]+$";
|
|
3380
|
+
readonly example: "enterprise-acme";
|
|
3381
|
+
};
|
|
3382
|
+
readonly name: {
|
|
3383
|
+
readonly type: "string";
|
|
3384
|
+
readonly example: "Acme Enterprise";
|
|
3385
|
+
};
|
|
3386
|
+
readonly monthlyAmountKopecks: {
|
|
3387
|
+
readonly type: "integer";
|
|
3388
|
+
readonly minimum: 1;
|
|
3389
|
+
};
|
|
3390
|
+
readonly yearlyAmountKopecks: {
|
|
3391
|
+
readonly type: "integer";
|
|
3392
|
+
readonly minimum: 1;
|
|
3393
|
+
};
|
|
3394
|
+
readonly limits: {
|
|
3395
|
+
readonly type: "array";
|
|
3396
|
+
readonly minItems: 1;
|
|
3397
|
+
readonly items: {
|
|
3398
|
+
readonly type: "object";
|
|
3399
|
+
readonly required: readonly [
|
|
3400
|
+
"metric",
|
|
3401
|
+
"limitValue"
|
|
3402
|
+
];
|
|
3403
|
+
readonly properties: {
|
|
3404
|
+
readonly metric: {
|
|
3405
|
+
readonly type: "string";
|
|
3406
|
+
readonly enum: readonly [
|
|
3407
|
+
"tasks",
|
|
3408
|
+
"comments",
|
|
3409
|
+
"customers",
|
|
3410
|
+
"services",
|
|
3411
|
+
"storage_bytes"
|
|
3412
|
+
];
|
|
3413
|
+
};
|
|
3414
|
+
readonly limitValue: {
|
|
3415
|
+
readonly type: "integer";
|
|
3416
|
+
readonly minimum: 1;
|
|
3417
|
+
};
|
|
3418
|
+
};
|
|
3419
|
+
};
|
|
3420
|
+
};
|
|
3421
|
+
};
|
|
3422
|
+
};
|
|
3020
3423
|
};
|
|
3021
3424
|
};
|
|
3022
3425
|
readonly paths: {
|
|
@@ -4481,7 +4884,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4481
4884
|
"Workspace"
|
|
4482
4885
|
];
|
|
4483
4886
|
readonly summary: "Create a new workspace";
|
|
4484
|
-
readonly description: "Creates a workspace and
|
|
4887
|
+
readonly description: "Creates a workspace and its billing subscription atomically. Free starts a 15-day trial. Economy, Standard, and Professional create a pending invoice; use the returned invoiceId to start YooKassa checkout. Professional may create one complimentary workspace for an owner with an active paid Professional workspace.";
|
|
4485
4888
|
readonly security: readonly [
|
|
4486
4889
|
never
|
|
4487
4890
|
];
|
|
@@ -4506,6 +4909,24 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4506
4909
|
readonly category: {
|
|
4507
4910
|
readonly $ref: "#/components/schemas/WorkspaceCategory";
|
|
4508
4911
|
};
|
|
4912
|
+
readonly plan: {
|
|
4913
|
+
readonly type: "string";
|
|
4914
|
+
readonly default: "free";
|
|
4915
|
+
readonly enum: readonly [
|
|
4916
|
+
"free",
|
|
4917
|
+
"economy",
|
|
4918
|
+
"standard",
|
|
4919
|
+
"professional"
|
|
4920
|
+
];
|
|
4921
|
+
readonly description: "Public plan code. Enterprise codes are only available after operations grants them to an existing workspace.";
|
|
4922
|
+
};
|
|
4923
|
+
readonly billingInterval: {
|
|
4924
|
+
readonly $ref: "#/components/schemas/BillingInterval";
|
|
4925
|
+
};
|
|
4926
|
+
readonly billingCycles: {
|
|
4927
|
+
readonly $ref: "#/components/schemas/BillingCycles";
|
|
4928
|
+
readonly description: "Prepaid months (1\u201311) or years (1\u20132). Defaults to 1.";
|
|
4929
|
+
};
|
|
4509
4930
|
};
|
|
4510
4931
|
};
|
|
4511
4932
|
};
|
|
@@ -4528,7 +4949,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4528
4949
|
};
|
|
4529
4950
|
};
|
|
4530
4951
|
readonly 400: {
|
|
4531
|
-
readonly description: "Invalid
|
|
4952
|
+
readonly description: "Invalid payload, an unavailable plan, or an attempted second Free trial.";
|
|
4532
4953
|
readonly content: {
|
|
4533
4954
|
readonly "application/json": {
|
|
4534
4955
|
readonly schema: {
|
|
@@ -4560,13 +4981,268 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4560
4981
|
};
|
|
4561
4982
|
};
|
|
4562
4983
|
};
|
|
4563
|
-
readonly "/workspace/
|
|
4984
|
+
readonly "/workspace/plans": {
|
|
4564
4985
|
readonly get: {
|
|
4565
4986
|
readonly tags: readonly [
|
|
4566
4987
|
"Workspace"
|
|
4567
4988
|
];
|
|
4568
|
-
readonly summary: "List
|
|
4569
|
-
readonly description: "Returns
|
|
4989
|
+
readonly summary: "List public workspace plans";
|
|
4990
|
+
readonly description: "Returns Free, Economy, Standard, and Professional cards. Enterprise is represented by a contact-us CTA and is not a public checkout plan.";
|
|
4991
|
+
readonly responses: {
|
|
4992
|
+
readonly 200: {
|
|
4993
|
+
readonly description: "Public plans fetched.";
|
|
4994
|
+
readonly content: {
|
|
4995
|
+
readonly "application/json": {
|
|
4996
|
+
readonly schema: {
|
|
4997
|
+
readonly type: "object";
|
|
4998
|
+
readonly required: readonly [
|
|
4999
|
+
"success",
|
|
5000
|
+
"plans",
|
|
5001
|
+
"enterprise"
|
|
5002
|
+
];
|
|
5003
|
+
readonly properties: {
|
|
5004
|
+
readonly success: {
|
|
5005
|
+
readonly type: "boolean";
|
|
5006
|
+
readonly const: true;
|
|
5007
|
+
};
|
|
5008
|
+
readonly plans: {
|
|
5009
|
+
readonly type: "array";
|
|
5010
|
+
readonly items: any;
|
|
5011
|
+
};
|
|
5012
|
+
readonly enterprise: {
|
|
5013
|
+
readonly type: "object";
|
|
5014
|
+
readonly required: readonly [
|
|
5015
|
+
"code",
|
|
5016
|
+
"cta"
|
|
5017
|
+
];
|
|
5018
|
+
readonly properties: any;
|
|
5019
|
+
};
|
|
5020
|
+
};
|
|
5021
|
+
};
|
|
5022
|
+
};
|
|
5023
|
+
};
|
|
5024
|
+
};
|
|
5025
|
+
};
|
|
5026
|
+
};
|
|
5027
|
+
};
|
|
5028
|
+
readonly "/workspace/plans/{workspace}": {
|
|
5029
|
+
readonly get: {
|
|
5030
|
+
readonly tags: readonly [
|
|
5031
|
+
"Workspace"
|
|
5032
|
+
];
|
|
5033
|
+
readonly summary: "List plans available to a workspace";
|
|
5034
|
+
readonly description: "Returns public plans plus any private Enterprise plans granted to this workspace.";
|
|
5035
|
+
readonly security: readonly [
|
|
5036
|
+
never
|
|
5037
|
+
];
|
|
5038
|
+
readonly parameters: readonly [
|
|
5039
|
+
{
|
|
5040
|
+
readonly name: "workspace";
|
|
5041
|
+
readonly in: "path";
|
|
5042
|
+
readonly required: true;
|
|
5043
|
+
readonly schema: {
|
|
5044
|
+
readonly type: "string";
|
|
5045
|
+
readonly format: "uuid";
|
|
5046
|
+
};
|
|
5047
|
+
}
|
|
5048
|
+
];
|
|
5049
|
+
readonly responses: {
|
|
5050
|
+
readonly 200: {
|
|
5051
|
+
readonly description: "Available plans fetched.";
|
|
5052
|
+
readonly content: {
|
|
5053
|
+
readonly "application/json": {
|
|
5054
|
+
readonly schema: {
|
|
5055
|
+
readonly type: "object";
|
|
5056
|
+
readonly required: readonly [
|
|
5057
|
+
"success",
|
|
5058
|
+
"plans"
|
|
5059
|
+
];
|
|
5060
|
+
readonly properties: {
|
|
5061
|
+
readonly success: {
|
|
5062
|
+
readonly type: "boolean";
|
|
5063
|
+
readonly const: true;
|
|
5064
|
+
};
|
|
5065
|
+
readonly plans: {
|
|
5066
|
+
readonly type: "array";
|
|
5067
|
+
readonly items: any;
|
|
5068
|
+
};
|
|
5069
|
+
};
|
|
5070
|
+
};
|
|
5071
|
+
};
|
|
5072
|
+
};
|
|
5073
|
+
};
|
|
5074
|
+
readonly 401: {
|
|
5075
|
+
readonly description: "Unauthorized.";
|
|
5076
|
+
readonly content: {
|
|
5077
|
+
readonly "application/json": {
|
|
5078
|
+
readonly schema: {
|
|
5079
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
5080
|
+
};
|
|
5081
|
+
};
|
|
5082
|
+
};
|
|
5083
|
+
};
|
|
5084
|
+
readonly 404: {
|
|
5085
|
+
readonly description: "Workspace not found or caller is not a collaborator.";
|
|
5086
|
+
readonly content: {
|
|
5087
|
+
readonly "application/json": {
|
|
5088
|
+
readonly schema: {
|
|
5089
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
5090
|
+
};
|
|
5091
|
+
};
|
|
5092
|
+
};
|
|
5093
|
+
};
|
|
5094
|
+
};
|
|
5095
|
+
};
|
|
5096
|
+
};
|
|
5097
|
+
readonly "/workspace/billing/{workspace}": {
|
|
5098
|
+
readonly get: {
|
|
5099
|
+
readonly tags: readonly [
|
|
5100
|
+
"Workspace"
|
|
5101
|
+
];
|
|
5102
|
+
readonly summary: "Get workspace billing state";
|
|
5103
|
+
readonly description: "Owner-only. For a frozen Free trial, includes usage and plan-fit recommendations. Paid workspaces receive subscription and pending-invoice state only.";
|
|
5104
|
+
readonly security: readonly [
|
|
5105
|
+
never
|
|
5106
|
+
];
|
|
5107
|
+
readonly parameters: readonly [
|
|
5108
|
+
{
|
|
5109
|
+
readonly name: "workspace";
|
|
5110
|
+
readonly in: "path";
|
|
5111
|
+
readonly required: true;
|
|
5112
|
+
readonly schema: {
|
|
5113
|
+
readonly type: "string";
|
|
5114
|
+
readonly format: "uuid";
|
|
5115
|
+
};
|
|
5116
|
+
}
|
|
5117
|
+
];
|
|
5118
|
+
readonly responses: {
|
|
5119
|
+
readonly 200: {
|
|
5120
|
+
readonly description: "Billing state fetched.";
|
|
5121
|
+
readonly content: {
|
|
5122
|
+
readonly "application/json": {
|
|
5123
|
+
readonly schema: {
|
|
5124
|
+
readonly type: "object";
|
|
5125
|
+
readonly required: readonly [
|
|
5126
|
+
"success",
|
|
5127
|
+
"subscription",
|
|
5128
|
+
"pendingInvoice",
|
|
5129
|
+
"recommendations"
|
|
5130
|
+
];
|
|
5131
|
+
readonly properties: {
|
|
5132
|
+
readonly success: {
|
|
5133
|
+
readonly type: "boolean";
|
|
5134
|
+
readonly const: true;
|
|
5135
|
+
};
|
|
5136
|
+
readonly subscription: {
|
|
5137
|
+
readonly allOf: readonly [ /*elided*/
|
|
5138
|
+
any
|
|
5139
|
+
];
|
|
5140
|
+
readonly nullable: true;
|
|
5141
|
+
};
|
|
5142
|
+
readonly pendingInvoice: {
|
|
5143
|
+
readonly allOf: readonly [ /*elided*/
|
|
5144
|
+
any
|
|
5145
|
+
];
|
|
5146
|
+
readonly nullable: true;
|
|
5147
|
+
};
|
|
5148
|
+
readonly recommendations: {
|
|
5149
|
+
readonly allOf: readonly [ /*elided*/
|
|
5150
|
+
any
|
|
5151
|
+
];
|
|
5152
|
+
readonly nullable: true;
|
|
5153
|
+
};
|
|
5154
|
+
};
|
|
5155
|
+
};
|
|
5156
|
+
};
|
|
5157
|
+
};
|
|
5158
|
+
};
|
|
5159
|
+
readonly 403: {
|
|
5160
|
+
readonly description: "Only the workspace owner can view billing.";
|
|
5161
|
+
readonly content: {
|
|
5162
|
+
readonly "application/json": {
|
|
5163
|
+
readonly schema: {
|
|
5164
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
5165
|
+
};
|
|
5166
|
+
};
|
|
5167
|
+
};
|
|
5168
|
+
};
|
|
5169
|
+
};
|
|
5170
|
+
};
|
|
5171
|
+
};
|
|
5172
|
+
readonly "/workspace/admin/enterprise-plan": {
|
|
5173
|
+
readonly post: {
|
|
5174
|
+
readonly tags: readonly [
|
|
5175
|
+
"Workspace"
|
|
5176
|
+
];
|
|
5177
|
+
readonly summary: "Create and grant a private Enterprise plan";
|
|
5178
|
+
readonly description: "Operations-only endpoint. It creates a plan and grants it to one workspace. Do not call from frontend code or expose BILLING_ADMIN_TOKEN.";
|
|
5179
|
+
readonly security: readonly [
|
|
5180
|
+
never
|
|
5181
|
+
];
|
|
5182
|
+
readonly requestBody: {
|
|
5183
|
+
readonly required: true;
|
|
5184
|
+
readonly content: {
|
|
5185
|
+
readonly "application/json": {
|
|
5186
|
+
readonly schema: {
|
|
5187
|
+
readonly $ref: "#/components/schemas/CreateEnterprisePlanRequest";
|
|
5188
|
+
};
|
|
5189
|
+
};
|
|
5190
|
+
};
|
|
5191
|
+
};
|
|
5192
|
+
readonly responses: {
|
|
5193
|
+
readonly 201: {
|
|
5194
|
+
readonly description: "Enterprise plan created and granted.";
|
|
5195
|
+
readonly content: {
|
|
5196
|
+
readonly "application/json": {
|
|
5197
|
+
readonly schema: {
|
|
5198
|
+
readonly type: "object";
|
|
5199
|
+
readonly required: readonly [
|
|
5200
|
+
"success",
|
|
5201
|
+
"plan"
|
|
5202
|
+
];
|
|
5203
|
+
readonly properties: {
|
|
5204
|
+
readonly success: {
|
|
5205
|
+
readonly type: "boolean";
|
|
5206
|
+
readonly const: true;
|
|
5207
|
+
};
|
|
5208
|
+
readonly plan: {
|
|
5209
|
+
readonly $ref: "#/components/schemas/WorkspacePlan";
|
|
5210
|
+
};
|
|
5211
|
+
};
|
|
5212
|
+
};
|
|
5213
|
+
};
|
|
5214
|
+
};
|
|
5215
|
+
};
|
|
5216
|
+
readonly 401: {
|
|
5217
|
+
readonly description: "Missing or invalid operations token.";
|
|
5218
|
+
readonly content: {
|
|
5219
|
+
readonly "application/json": {
|
|
5220
|
+
readonly schema: {
|
|
5221
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
5222
|
+
};
|
|
5223
|
+
};
|
|
5224
|
+
};
|
|
5225
|
+
};
|
|
5226
|
+
readonly 400: {
|
|
5227
|
+
readonly description: "Invalid plan definition or duplicate plan code.";
|
|
5228
|
+
readonly content: {
|
|
5229
|
+
readonly "application/json": {
|
|
5230
|
+
readonly schema: {
|
|
5231
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
5232
|
+
};
|
|
5233
|
+
};
|
|
5234
|
+
};
|
|
5235
|
+
};
|
|
5236
|
+
};
|
|
5237
|
+
};
|
|
5238
|
+
};
|
|
5239
|
+
readonly "/workspace/list": {
|
|
5240
|
+
readonly get: {
|
|
5241
|
+
readonly tags: readonly [
|
|
5242
|
+
"Workspace"
|
|
5243
|
+
];
|
|
5244
|
+
readonly summary: "List workspaces for the authenticated user";
|
|
5245
|
+
readonly description: "Returns workspaces the user collaborates on, each with category, role, billing flags, invitation state, workspace profile picture URL, and the resource grants effective for the caller.";
|
|
4570
5246
|
readonly security: readonly [
|
|
4571
5247
|
never
|
|
4572
5248
|
];
|
|
@@ -4579,8 +5255,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4579
5255
|
readonly type: "object";
|
|
4580
5256
|
readonly required: readonly [
|
|
4581
5257
|
"success",
|
|
4582
|
-
"workspaces"
|
|
4583
|
-
"unpaidLimit"
|
|
5258
|
+
"workspaces"
|
|
4584
5259
|
];
|
|
4585
5260
|
readonly properties: {
|
|
4586
5261
|
readonly success: {
|
|
@@ -4591,11 +5266,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4591
5266
|
readonly type: "array";
|
|
4592
5267
|
readonly items: any;
|
|
4593
5268
|
};
|
|
4594
|
-
readonly unpaidLimit: {
|
|
4595
|
-
readonly type: "integer";
|
|
4596
|
-
readonly description: "Configured cap on workspaces a user may own without payment (from UNPAID_WORKSPACE_LIMIT).";
|
|
4597
|
-
readonly example: 3;
|
|
4598
|
-
};
|
|
4599
5269
|
};
|
|
4600
5270
|
};
|
|
4601
5271
|
};
|
|
@@ -5266,7 +5936,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5266
5936
|
"Workspace"
|
|
5267
5937
|
];
|
|
5268
5938
|
readonly summary: "Update workspace settings";
|
|
5269
|
-
readonly description: "Updates workspace name
|
|
5939
|
+
readonly description: "Updates the workspace name. Only the workspace owner may call this endpoint; requires write access to crm::general. Seat changes must use `/payments/upgrade` so an invoice is created.";
|
|
5270
5940
|
readonly security: readonly [
|
|
5271
5941
|
never
|
|
5272
5942
|
];
|
|
@@ -5284,9 +5954,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5284
5954
|
readonly type: "string";
|
|
5285
5955
|
readonly description: "New name for the workspace.";
|
|
5286
5956
|
};
|
|
5287
|
-
readonly maxCollaborators: {
|
|
5288
|
-
readonly $ref: "#/components/schemas/WorkspaceMaxCollaborators";
|
|
5289
|
-
};
|
|
5290
5957
|
readonly workspace: {
|
|
5291
5958
|
readonly type: "string";
|
|
5292
5959
|
readonly format: "uuid";
|
|
@@ -5335,7 +6002,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5335
6002
|
};
|
|
5336
6003
|
};
|
|
5337
6004
|
readonly 400: {
|
|
5338
|
-
readonly description: "Invalid request payload,
|
|
6005
|
+
readonly description: "Invalid request payload, missing name, or caller is not the workspace owner. Seat changes are rejected; use /payments/upgrade.";
|
|
5339
6006
|
readonly content: {
|
|
5340
6007
|
readonly "application/json": {
|
|
5341
6008
|
readonly schema: {
|
|
@@ -5576,21 +6243,196 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5576
6243
|
readonly type: "string";
|
|
5577
6244
|
readonly format: "uuid";
|
|
5578
6245
|
};
|
|
5579
|
-
}
|
|
5580
|
-
];
|
|
6246
|
+
}
|
|
6247
|
+
];
|
|
6248
|
+
readonly responses: {
|
|
6249
|
+
readonly 200: {
|
|
6250
|
+
readonly description: "Left the workspace successfully.";
|
|
6251
|
+
readonly content: {
|
|
6252
|
+
readonly "application/json": {
|
|
6253
|
+
readonly schema: {
|
|
6254
|
+
readonly $ref: "#/components/schemas/SimpleSuccess";
|
|
6255
|
+
};
|
|
6256
|
+
};
|
|
6257
|
+
};
|
|
6258
|
+
};
|
|
6259
|
+
readonly 400: {
|
|
6260
|
+
readonly description: "Invalid workspace id, caller is not a collaborator, or caller is the workspace owner.";
|
|
6261
|
+
readonly content: {
|
|
6262
|
+
readonly "application/json": {
|
|
6263
|
+
readonly schema: {
|
|
6264
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
6265
|
+
};
|
|
6266
|
+
};
|
|
6267
|
+
};
|
|
6268
|
+
};
|
|
6269
|
+
readonly 401: {
|
|
6270
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
6271
|
+
readonly content: {
|
|
6272
|
+
readonly "application/json": {
|
|
6273
|
+
readonly schema: {
|
|
6274
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
6275
|
+
};
|
|
6276
|
+
};
|
|
6277
|
+
};
|
|
6278
|
+
};
|
|
6279
|
+
readonly 403: {
|
|
6280
|
+
readonly description: "Forbidden - Token issuer is not 'access' or user lacks workspace access.";
|
|
6281
|
+
readonly content: {
|
|
6282
|
+
readonly "application/json": {
|
|
6283
|
+
readonly schema: {
|
|
6284
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
6285
|
+
};
|
|
6286
|
+
};
|
|
6287
|
+
};
|
|
6288
|
+
};
|
|
6289
|
+
readonly 500: {
|
|
6290
|
+
readonly description: "Failed to leave workspace.";
|
|
6291
|
+
readonly content: {
|
|
6292
|
+
readonly "application/json": {
|
|
6293
|
+
readonly schema: {
|
|
6294
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
6295
|
+
};
|
|
6296
|
+
};
|
|
6297
|
+
};
|
|
6298
|
+
};
|
|
6299
|
+
};
|
|
6300
|
+
};
|
|
6301
|
+
};
|
|
6302
|
+
readonly "/payments/invoice/{invoiceId}/pay": {
|
|
6303
|
+
readonly post: {
|
|
6304
|
+
readonly tags: readonly [
|
|
6305
|
+
"Payments"
|
|
6306
|
+
];
|
|
6307
|
+
readonly summary: "Create or retrieve YooKassa checkout";
|
|
6308
|
+
readonly description: "Workspace owner only. Starts checkout for a pending invoice and returns a redirect URL. Redirect the browser to paymentUrl.";
|
|
6309
|
+
readonly security: readonly [
|
|
6310
|
+
never
|
|
6311
|
+
];
|
|
6312
|
+
readonly parameters: readonly [
|
|
6313
|
+
{
|
|
6314
|
+
readonly name: "invoiceId";
|
|
6315
|
+
readonly in: "path";
|
|
6316
|
+
readonly required: true;
|
|
6317
|
+
readonly schema: {
|
|
6318
|
+
readonly type: "string";
|
|
6319
|
+
readonly format: "uuid";
|
|
6320
|
+
};
|
|
6321
|
+
}
|
|
6322
|
+
];
|
|
6323
|
+
readonly responses: {
|
|
6324
|
+
readonly 200: {
|
|
6325
|
+
readonly description: "Checkout URL ready.";
|
|
6326
|
+
readonly content: {
|
|
6327
|
+
readonly "application/json": {
|
|
6328
|
+
readonly schema: {
|
|
6329
|
+
readonly type: "object";
|
|
6330
|
+
readonly required: readonly [
|
|
6331
|
+
"success",
|
|
6332
|
+
"paymentUrl",
|
|
6333
|
+
"providerPaymentId"
|
|
6334
|
+
];
|
|
6335
|
+
readonly properties: {
|
|
6336
|
+
readonly success: {
|
|
6337
|
+
readonly type: "boolean";
|
|
6338
|
+
readonly const: true;
|
|
6339
|
+
};
|
|
6340
|
+
readonly paymentUrl: {
|
|
6341
|
+
readonly type: "string";
|
|
6342
|
+
readonly format: "uri";
|
|
6343
|
+
};
|
|
6344
|
+
readonly providerPaymentId: {
|
|
6345
|
+
readonly type: "string";
|
|
6346
|
+
};
|
|
6347
|
+
};
|
|
6348
|
+
};
|
|
6349
|
+
};
|
|
6350
|
+
};
|
|
6351
|
+
};
|
|
6352
|
+
readonly 403: {
|
|
6353
|
+
readonly description: "Invoice does not belong to caller.";
|
|
6354
|
+
readonly content: {
|
|
6355
|
+
readonly "application/json": {
|
|
6356
|
+
readonly schema: {
|
|
6357
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
6358
|
+
};
|
|
6359
|
+
};
|
|
6360
|
+
};
|
|
6361
|
+
};
|
|
6362
|
+
readonly 404: {
|
|
6363
|
+
readonly description: "Pending invoice not found.";
|
|
6364
|
+
readonly content: {
|
|
6365
|
+
readonly "application/json": {
|
|
6366
|
+
readonly schema: {
|
|
6367
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
6368
|
+
};
|
|
6369
|
+
};
|
|
6370
|
+
};
|
|
6371
|
+
};
|
|
6372
|
+
readonly 503: {
|
|
6373
|
+
readonly description: "YooKassa configuration is missing.";
|
|
6374
|
+
readonly content: {
|
|
6375
|
+
readonly "application/json": {
|
|
6376
|
+
readonly schema: {
|
|
6377
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
6378
|
+
};
|
|
6379
|
+
};
|
|
6380
|
+
};
|
|
6381
|
+
};
|
|
6382
|
+
};
|
|
6383
|
+
};
|
|
6384
|
+
};
|
|
6385
|
+
readonly "/payments/upgrade": {
|
|
6386
|
+
readonly post: {
|
|
6387
|
+
readonly tags: readonly [
|
|
6388
|
+
"Payments"
|
|
6389
|
+
];
|
|
6390
|
+
readonly summary: "Create a plan-change or seat-change invoice";
|
|
6391
|
+
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 change takes effect only after the new invoice is paid.";
|
|
6392
|
+
readonly security: readonly [
|
|
6393
|
+
never
|
|
6394
|
+
];
|
|
6395
|
+
readonly requestBody: {
|
|
6396
|
+
readonly required: true;
|
|
6397
|
+
readonly content: {
|
|
6398
|
+
readonly "application/json": {
|
|
6399
|
+
readonly schema: {
|
|
6400
|
+
readonly $ref: "#/components/schemas/UpgradeWorkspacePlanRequest";
|
|
6401
|
+
};
|
|
6402
|
+
};
|
|
6403
|
+
};
|
|
6404
|
+
};
|
|
5581
6405
|
readonly responses: {
|
|
5582
|
-
readonly
|
|
5583
|
-
readonly description: "
|
|
6406
|
+
readonly 201: {
|
|
6407
|
+
readonly description: "Pending invoice created.";
|
|
5584
6408
|
readonly content: {
|
|
5585
6409
|
readonly "application/json": {
|
|
5586
6410
|
readonly schema: {
|
|
5587
|
-
readonly
|
|
6411
|
+
readonly type: "object";
|
|
6412
|
+
readonly required: readonly [
|
|
6413
|
+
"success",
|
|
6414
|
+
"invoiceId",
|
|
6415
|
+
"invoice"
|
|
6416
|
+
];
|
|
6417
|
+
readonly properties: {
|
|
6418
|
+
readonly success: {
|
|
6419
|
+
readonly type: "boolean";
|
|
6420
|
+
readonly const: true;
|
|
6421
|
+
};
|
|
6422
|
+
readonly invoiceId: {
|
|
6423
|
+
readonly type: "string";
|
|
6424
|
+
readonly format: "uuid";
|
|
6425
|
+
};
|
|
6426
|
+
readonly invoice: {
|
|
6427
|
+
readonly $ref: "#/components/schemas/BillingInvoice";
|
|
6428
|
+
};
|
|
6429
|
+
};
|
|
5588
6430
|
};
|
|
5589
6431
|
};
|
|
5590
6432
|
};
|
|
5591
6433
|
};
|
|
5592
6434
|
readonly 400: {
|
|
5593
|
-
readonly description: "Invalid
|
|
6435
|
+
readonly description: "Invalid change, no actual change, or disallowed downgrade.";
|
|
5594
6436
|
readonly content: {
|
|
5595
6437
|
readonly "application/json": {
|
|
5596
6438
|
readonly schema: {
|
|
@@ -5599,8 +6441,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5599
6441
|
};
|
|
5600
6442
|
};
|
|
5601
6443
|
};
|
|
5602
|
-
readonly
|
|
5603
|
-
readonly description: "
|
|
6444
|
+
readonly 403: {
|
|
6445
|
+
readonly description: "Plan is not available to this workspace.";
|
|
5604
6446
|
readonly content: {
|
|
5605
6447
|
readonly "application/json": {
|
|
5606
6448
|
readonly schema: {
|
|
@@ -5609,8 +6451,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5609
6451
|
};
|
|
5610
6452
|
};
|
|
5611
6453
|
};
|
|
5612
|
-
readonly
|
|
5613
|
-
readonly description: "
|
|
6454
|
+
readonly 404: {
|
|
6455
|
+
readonly description: "Workspace not found or caller is not its owner.";
|
|
5614
6456
|
readonly content: {
|
|
5615
6457
|
readonly "application/json": {
|
|
5616
6458
|
readonly schema: {
|
|
@@ -5619,8 +6461,52 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5619
6461
|
};
|
|
5620
6462
|
};
|
|
5621
6463
|
};
|
|
5622
|
-
|
|
5623
|
-
|
|
6464
|
+
};
|
|
6465
|
+
};
|
|
6466
|
+
};
|
|
6467
|
+
readonly "/payments/webhook": {
|
|
6468
|
+
readonly post: {
|
|
6469
|
+
readonly tags: readonly [
|
|
6470
|
+
"Payments"
|
|
6471
|
+
];
|
|
6472
|
+
readonly summary: "Receive YooKassa payment event";
|
|
6473
|
+
readonly description: "Server-to-server endpoint for YooKassa only. The core verifies the payment with YooKassa before marking an invoice paid. Frontends must not call this endpoint.";
|
|
6474
|
+
readonly requestBody: {
|
|
6475
|
+
readonly required: true;
|
|
6476
|
+
readonly content: {
|
|
6477
|
+
readonly "application/json": {
|
|
6478
|
+
readonly schema: {
|
|
6479
|
+
readonly type: "object";
|
|
6480
|
+
readonly required: readonly [
|
|
6481
|
+
"object"
|
|
6482
|
+
];
|
|
6483
|
+
readonly properties: {
|
|
6484
|
+
readonly type: {
|
|
6485
|
+
readonly type: "string";
|
|
6486
|
+
readonly example: "notification";
|
|
6487
|
+
};
|
|
6488
|
+
readonly object: {
|
|
6489
|
+
readonly type: "object";
|
|
6490
|
+
readonly required: readonly [
|
|
6491
|
+
"id",
|
|
6492
|
+
"status"
|
|
6493
|
+
];
|
|
6494
|
+
readonly properties: {
|
|
6495
|
+
readonly id: any;
|
|
6496
|
+
readonly status: any;
|
|
6497
|
+
};
|
|
6498
|
+
};
|
|
6499
|
+
};
|
|
6500
|
+
};
|
|
6501
|
+
};
|
|
6502
|
+
};
|
|
6503
|
+
};
|
|
6504
|
+
readonly responses: {
|
|
6505
|
+
readonly 200: {
|
|
6506
|
+
readonly description: "Payment applied or non-success event ignored.";
|
|
6507
|
+
};
|
|
6508
|
+
readonly 400: {
|
|
6509
|
+
readonly description: "Invalid webhook or payment did not succeed.";
|
|
5624
6510
|
readonly content: {
|
|
5625
6511
|
readonly "application/json": {
|
|
5626
6512
|
readonly schema: {
|
|
@@ -11824,6 +12710,103 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11824
12710
|
};
|
|
11825
12711
|
};
|
|
11826
12712
|
}, "/auth"> | import("hono/types").MergeSchemaPath<{
|
|
12713
|
+
"/plans": {
|
|
12714
|
+
$get: {
|
|
12715
|
+
input: {};
|
|
12716
|
+
output: {
|
|
12717
|
+
success: true;
|
|
12718
|
+
plans: {
|
|
12719
|
+
id: string;
|
|
12720
|
+
code: string;
|
|
12721
|
+
name: string;
|
|
12722
|
+
kind: string;
|
|
12723
|
+
sortOrder: number;
|
|
12724
|
+
prices: {
|
|
12725
|
+
[x: string]: number;
|
|
12726
|
+
};
|
|
12727
|
+
limits: {
|
|
12728
|
+
[x: string]: number;
|
|
12729
|
+
};
|
|
12730
|
+
}[];
|
|
12731
|
+
enterprise: {
|
|
12732
|
+
code: string;
|
|
12733
|
+
cta: string;
|
|
12734
|
+
};
|
|
12735
|
+
};
|
|
12736
|
+
outputFormat: "json";
|
|
12737
|
+
status: 200;
|
|
12738
|
+
};
|
|
12739
|
+
};
|
|
12740
|
+
} & {
|
|
12741
|
+
"/plans/:workspace": {
|
|
12742
|
+
$get: {
|
|
12743
|
+
input: {
|
|
12744
|
+
param: {
|
|
12745
|
+
workspace: string;
|
|
12746
|
+
};
|
|
12747
|
+
};
|
|
12748
|
+
output: {
|
|
12749
|
+
success: true;
|
|
12750
|
+
plans: {
|
|
12751
|
+
id: string;
|
|
12752
|
+
code: string;
|
|
12753
|
+
name: string;
|
|
12754
|
+
kind: string;
|
|
12755
|
+
sortOrder: number;
|
|
12756
|
+
prices: {
|
|
12757
|
+
[x: string]: number;
|
|
12758
|
+
};
|
|
12759
|
+
limits: {
|
|
12760
|
+
[x: string]: number;
|
|
12761
|
+
};
|
|
12762
|
+
}[];
|
|
12763
|
+
};
|
|
12764
|
+
outputFormat: "json";
|
|
12765
|
+
status: 200;
|
|
12766
|
+
};
|
|
12767
|
+
};
|
|
12768
|
+
} & {
|
|
12769
|
+
"/admin/enterprise-plan": {
|
|
12770
|
+
$post: {
|
|
12771
|
+
input: {};
|
|
12772
|
+
output: {
|
|
12773
|
+
success: false;
|
|
12774
|
+
error: string;
|
|
12775
|
+
};
|
|
12776
|
+
outputFormat: "json";
|
|
12777
|
+
status: 401;
|
|
12778
|
+
} | {
|
|
12779
|
+
input: {};
|
|
12780
|
+
output: {
|
|
12781
|
+
success: true;
|
|
12782
|
+
plan: {
|
|
12783
|
+
id: string;
|
|
12784
|
+
created_at: string;
|
|
12785
|
+
name: string;
|
|
12786
|
+
active: boolean;
|
|
12787
|
+
code: string;
|
|
12788
|
+
kind: string;
|
|
12789
|
+
sortOrder: number;
|
|
12790
|
+
publiclyVisible: boolean;
|
|
12791
|
+
updated_at: string | null;
|
|
12792
|
+
deleted_at: string | null;
|
|
12793
|
+
verified_at: string | null;
|
|
12794
|
+
suspended_at: string | null;
|
|
12795
|
+
};
|
|
12796
|
+
};
|
|
12797
|
+
outputFormat: "json";
|
|
12798
|
+
status: 201;
|
|
12799
|
+
} | {
|
|
12800
|
+
input: {};
|
|
12801
|
+
output: {
|
|
12802
|
+
success: false;
|
|
12803
|
+
error: string;
|
|
12804
|
+
};
|
|
12805
|
+
outputFormat: "json";
|
|
12806
|
+
status: 400 | 404;
|
|
12807
|
+
};
|
|
12808
|
+
};
|
|
12809
|
+
} & {
|
|
11827
12810
|
"/create": {
|
|
11828
12811
|
$post: {
|
|
11829
12812
|
input: {};
|
|
@@ -11832,13 +12815,16 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11832
12815
|
error: string;
|
|
11833
12816
|
};
|
|
11834
12817
|
outputFormat: "json";
|
|
11835
|
-
status: 400;
|
|
12818
|
+
status: 400 | 403 | 404 | 500;
|
|
11836
12819
|
} | {
|
|
11837
12820
|
input: {};
|
|
11838
12821
|
output: {
|
|
11839
12822
|
success: true;
|
|
11840
|
-
workspace:
|
|
11841
|
-
name:
|
|
12823
|
+
workspace: string;
|
|
12824
|
+
name: string;
|
|
12825
|
+
invoiceId: any;
|
|
12826
|
+
subscriptionStatus: any;
|
|
12827
|
+
bonusWorkspace: boolean;
|
|
11842
12828
|
};
|
|
11843
12829
|
outputFormat: "json";
|
|
11844
12830
|
status: 201;
|
|
@@ -11866,7 +12852,98 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11866
12852
|
action: string;
|
|
11867
12853
|
}[];
|
|
11868
12854
|
}[];
|
|
11869
|
-
|
|
12855
|
+
};
|
|
12856
|
+
outputFormat: "json";
|
|
12857
|
+
status: 200;
|
|
12858
|
+
};
|
|
12859
|
+
};
|
|
12860
|
+
} & {
|
|
12861
|
+
"/billing/:workspace": {
|
|
12862
|
+
$get: {
|
|
12863
|
+
input: {
|
|
12864
|
+
param: {
|
|
12865
|
+
workspace: string;
|
|
12866
|
+
};
|
|
12867
|
+
};
|
|
12868
|
+
output: {
|
|
12869
|
+
success: false;
|
|
12870
|
+
error: string;
|
|
12871
|
+
};
|
|
12872
|
+
outputFormat: "json";
|
|
12873
|
+
status: 403;
|
|
12874
|
+
} | {
|
|
12875
|
+
input: {
|
|
12876
|
+
param: {
|
|
12877
|
+
workspace: string;
|
|
12878
|
+
};
|
|
12879
|
+
};
|
|
12880
|
+
output: {
|
|
12881
|
+
subscription: null;
|
|
12882
|
+
pendingInvoice: null;
|
|
12883
|
+
recommendations: null;
|
|
12884
|
+
success: true;
|
|
12885
|
+
} | {
|
|
12886
|
+
subscription: {
|
|
12887
|
+
id: string;
|
|
12888
|
+
status: string;
|
|
12889
|
+
seats: number;
|
|
12890
|
+
interval: string | null;
|
|
12891
|
+
billingCycles: number;
|
|
12892
|
+
trialEndsAt: string | null;
|
|
12893
|
+
periodEnd: string | null;
|
|
12894
|
+
planCode: string;
|
|
12895
|
+
planName: string;
|
|
12896
|
+
planId: string;
|
|
12897
|
+
};
|
|
12898
|
+
pendingInvoice: {
|
|
12899
|
+
updated_at: string | null;
|
|
12900
|
+
deleted_at: string | null;
|
|
12901
|
+
verified_at: string | null;
|
|
12902
|
+
suspended_at: string | null;
|
|
12903
|
+
created_at: string;
|
|
12904
|
+
id: string;
|
|
12905
|
+
workspaceId: string;
|
|
12906
|
+
subscriptionId: string;
|
|
12907
|
+
planId: string;
|
|
12908
|
+
status: string;
|
|
12909
|
+
kind: string;
|
|
12910
|
+
seats: number;
|
|
12911
|
+
interval: string;
|
|
12912
|
+
billingCycles: number;
|
|
12913
|
+
amountKopecks: number;
|
|
12914
|
+
currency: string;
|
|
12915
|
+
periodStart: string;
|
|
12916
|
+
periodEnd: string;
|
|
12917
|
+
providerPaymentId: string | null;
|
|
12918
|
+
paymentUrl: string | null;
|
|
12919
|
+
paidAt: string | null;
|
|
12920
|
+
};
|
|
12921
|
+
recommendations: {
|
|
12922
|
+
usage: {
|
|
12923
|
+
tasks: number;
|
|
12924
|
+
comments: number;
|
|
12925
|
+
customers: number;
|
|
12926
|
+
services: number;
|
|
12927
|
+
seats: number;
|
|
12928
|
+
storage_bytes: number;
|
|
12929
|
+
};
|
|
12930
|
+
plans: {
|
|
12931
|
+
fits: boolean;
|
|
12932
|
+
overLimit: string[];
|
|
12933
|
+
id: string;
|
|
12934
|
+
code: string;
|
|
12935
|
+
name: string;
|
|
12936
|
+
kind: string;
|
|
12937
|
+
sortOrder: number;
|
|
12938
|
+
prices: {
|
|
12939
|
+
[x: string]: number;
|
|
12940
|
+
};
|
|
12941
|
+
limits: {
|
|
12942
|
+
[x: string]: number;
|
|
12943
|
+
};
|
|
12944
|
+
}[];
|
|
12945
|
+
} | null;
|
|
12946
|
+
success: true;
|
|
11870
12947
|
};
|
|
11871
12948
|
outputFormat: "json";
|
|
11872
12949
|
status: 200;
|
|
@@ -11916,23 +12993,23 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
11916
12993
|
input: {};
|
|
11917
12994
|
output: {
|
|
11918
12995
|
success: true;
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
12996
|
+
plans: {
|
|
12997
|
+
id: string;
|
|
12998
|
+
code: string;
|
|
12999
|
+
name: string;
|
|
13000
|
+
kind: string;
|
|
13001
|
+
sortOrder: number;
|
|
13002
|
+
prices: {
|
|
13003
|
+
[x: string]: number;
|
|
13004
|
+
};
|
|
13005
|
+
limits: {
|
|
13006
|
+
[x: string]: number;
|
|
13007
|
+
};
|
|
11922
13008
|
}[];
|
|
11923
|
-
price:
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
status: 200;
|
|
11927
|
-
} | {
|
|
11928
|
-
input: {};
|
|
11929
|
-
output: {
|
|
11930
|
-
success: true;
|
|
11931
|
-
crm: {
|
|
11932
|
-
price: number;
|
|
11933
|
-
maxCollaborators: number;
|
|
13009
|
+
price: {
|
|
13010
|
+
code: string;
|
|
13011
|
+
amountKopecks: number;
|
|
11934
13012
|
}[];
|
|
11935
|
-
price: null;
|
|
11936
13013
|
};
|
|
11937
13014
|
outputFormat: "json";
|
|
11938
13015
|
status: 200;
|
|
@@ -12679,8 +13756,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12679
13756
|
workspaceId: string;
|
|
12680
13757
|
description: string | null;
|
|
12681
13758
|
price: number | null;
|
|
12682
|
-
stock: number | null;
|
|
12683
13759
|
currency: string | null;
|
|
13760
|
+
stock: number | null;
|
|
12684
13761
|
updated_at: string | null;
|
|
12685
13762
|
deleted_at: string | null;
|
|
12686
13763
|
verified_at: string | null;
|
|
@@ -12849,11 +13926,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12849
13926
|
email: string | null;
|
|
12850
13927
|
workspaceId: string;
|
|
12851
13928
|
description: string | null;
|
|
12852
|
-
phone: string | null;
|
|
12853
13929
|
updated_at: string | null;
|
|
12854
13930
|
deleted_at: string | null;
|
|
12855
13931
|
verified_at: string | null;
|
|
12856
13932
|
suspended_at: string | null;
|
|
13933
|
+
phone: string | null;
|
|
12857
13934
|
website: string | null;
|
|
12858
13935
|
companyPhone: string | null;
|
|
12859
13936
|
companyAddress: string | null;
|
|
@@ -17430,7 +18507,85 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
17430
18507
|
status: 200;
|
|
17431
18508
|
};
|
|
17432
18509
|
};
|
|
17433
|
-
}, "/notifications"
|
|
18510
|
+
}, "/notifications"> | import("hono/types").MergeSchemaPath<{
|
|
18511
|
+
"/invoice/:invoiceId/pay": {
|
|
18512
|
+
$post: {
|
|
18513
|
+
input: {
|
|
18514
|
+
param: {
|
|
18515
|
+
invoiceId: string;
|
|
18516
|
+
};
|
|
18517
|
+
};
|
|
18518
|
+
output: {
|
|
18519
|
+
paymentUrl: string;
|
|
18520
|
+
providerPaymentId: string;
|
|
18521
|
+
success: true;
|
|
18522
|
+
};
|
|
18523
|
+
outputFormat: "json";
|
|
18524
|
+
status: 200;
|
|
18525
|
+
} | {
|
|
18526
|
+
input: {
|
|
18527
|
+
param: {
|
|
18528
|
+
invoiceId: string;
|
|
18529
|
+
};
|
|
18530
|
+
};
|
|
18531
|
+
output: {
|
|
18532
|
+
success: false;
|
|
18533
|
+
error: string;
|
|
18534
|
+
};
|
|
18535
|
+
outputFormat: "json";
|
|
18536
|
+
status: 400 | 403 | 404 | 503;
|
|
18537
|
+
};
|
|
18538
|
+
};
|
|
18539
|
+
} & {
|
|
18540
|
+
"/upgrade": {
|
|
18541
|
+
$post: {
|
|
18542
|
+
input: {};
|
|
18543
|
+
output: {
|
|
18544
|
+
success: true;
|
|
18545
|
+
invoiceId: any;
|
|
18546
|
+
invoice: any;
|
|
18547
|
+
};
|
|
18548
|
+
outputFormat: "json";
|
|
18549
|
+
status: 201;
|
|
18550
|
+
} | {
|
|
18551
|
+
input: {};
|
|
18552
|
+
output: {
|
|
18553
|
+
success: false;
|
|
18554
|
+
error: string;
|
|
18555
|
+
};
|
|
18556
|
+
outputFormat: "json";
|
|
18557
|
+
status: 400 | 403 | 404;
|
|
18558
|
+
};
|
|
18559
|
+
};
|
|
18560
|
+
} & {
|
|
18561
|
+
"/webhook": {
|
|
18562
|
+
$post: {
|
|
18563
|
+
input: {};
|
|
18564
|
+
output: {
|
|
18565
|
+
success: true;
|
|
18566
|
+
ignored: true;
|
|
18567
|
+
};
|
|
18568
|
+
outputFormat: "json";
|
|
18569
|
+
status: 200;
|
|
18570
|
+
} | {
|
|
18571
|
+
input: {};
|
|
18572
|
+
output: {
|
|
18573
|
+
success: true;
|
|
18574
|
+
invoiceId: string;
|
|
18575
|
+
};
|
|
18576
|
+
outputFormat: "json";
|
|
18577
|
+
status: 200;
|
|
18578
|
+
} | {
|
|
18579
|
+
input: {};
|
|
18580
|
+
output: {
|
|
18581
|
+
success: false;
|
|
18582
|
+
error: string;
|
|
18583
|
+
};
|
|
18584
|
+
outputFormat: "json";
|
|
18585
|
+
status: 400 | 404 | 503;
|
|
18586
|
+
};
|
|
18587
|
+
};
|
|
18588
|
+
}, "/payments">, "/", "/">;
|
|
17434
18589
|
type GlobalErrorResponses = {
|
|
17435
18590
|
400: {
|
|
17436
18591
|
json: ApiError;
|