@fleetless/contracts 10.0.0 → 11.0.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/CHANGELOG.md +22 -0
- package/artifacts/openapi.json +378 -13
- package/artifacts/routes.json +45 -6
- package/artifacts/schema/billing-change-response.schema.json +42 -3
- package/artifacts/schema/billing-invoice-pdf-query.schema.json +15 -0
- package/artifacts/schema/billing-invoice.schema.json +14 -1
- package/artifacts/schema/billing-view.schema.json +14 -1
- package/artifacts/schema/bridge-state.schema.json +14 -0
- package/artifacts/schema/client-robot-list-item.schema.json +14 -0
- package/artifacts/schema/client-robot-list-response.schema.json +14 -0
- package/artifacts/schema/purchase-intent-response.schema.json +42 -3
- package/artifacts/schema/recover-held-job-request.schema.json +29 -0
- package/artifacts/schema/recover-held-job-response.schema.json +125 -0
- package/artifacts/schema/robot-detail-response.schema.json +14 -0
- package/artifacts/schema/robot-list-item.schema.json +14 -0
- package/artifacts/schema/robot-list-response.schema.json +14 -0
- package/dist/billing.d.ts +32 -7
- package/dist/billing.js +9 -2
- package/dist/client-robots.d.ts +6 -0
- package/dist/errors.d.ts +6 -4
- package/dist/errors.js +17 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/protocol.d.ts +3 -0
- package/dist/protocol.js +1 -0
- package/dist/rest.d.ts +52 -0
- package/dist/rest.js +15 -0
- package/dist/routes.js +24 -10
- package/package.json +1 -1
|
@@ -45,6 +45,20 @@
|
|
|
45
45
|
"low_bandwidth": {
|
|
46
46
|
"type": "boolean",
|
|
47
47
|
"description": "Whether the bridge is in its low-bandwidth mode: datapoints capped, cameras reduced or stopped. Bridge-reported."
|
|
48
|
+
},
|
|
49
|
+
"health_reason": {
|
|
50
|
+
"description": "Cloud-observed connection health: `job_query_unanswered` after a bridge ignores held-job queries; `null` on an ordinary connect or disconnect. Optional for older observations.",
|
|
51
|
+
"anyOf": [
|
|
52
|
+
{
|
|
53
|
+
"type": "string",
|
|
54
|
+
"enum": [
|
|
55
|
+
"job_query_unanswered"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "null"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
48
62
|
}
|
|
49
63
|
},
|
|
50
64
|
"required": [
|
package/dist/billing.d.ts
CHANGED
|
@@ -6238,11 +6238,12 @@ export declare const paymentMethod: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
6238
6238
|
account: z.ZodString;
|
|
6239
6239
|
}, z.core.$strip>], "kind">;
|
|
6240
6240
|
export type PaymentMethod = z.infer<typeof paymentMethod>;
|
|
6241
|
-
/** An invoice's status: `open` until paid,
|
|
6241
|
+
/** An invoice's status: `open` until paid, `cancelled` after a cancellation, or `uncollectible` after an unpaid fallback. */
|
|
6242
6242
|
export declare const invoiceStatus: z.ZodEnum<{
|
|
6243
6243
|
paid: "paid";
|
|
6244
6244
|
open: "open";
|
|
6245
6245
|
uncollectible: "uncollectible";
|
|
6246
|
+
cancelled: "cancelled";
|
|
6246
6247
|
}>;
|
|
6247
6248
|
export type InvoiceStatus = z.infer<typeof invoiceStatus>;
|
|
6248
6249
|
/** One invoice, rendered by the cloud: the number is gapless, `FL-<year>-<seq>`. */
|
|
@@ -6254,7 +6255,9 @@ export declare const billingInvoice: z.ZodObject<{
|
|
|
6254
6255
|
paid: "paid";
|
|
6255
6256
|
open: "open";
|
|
6256
6257
|
uncollectible: "uncollectible";
|
|
6258
|
+
cancelled: "cancelled";
|
|
6257
6259
|
}>;
|
|
6260
|
+
cancellation_document_url: z.ZodNullable<z.ZodString>;
|
|
6258
6261
|
currency: z.ZodEnum<{
|
|
6259
6262
|
eur: "eur";
|
|
6260
6263
|
usd: "usd";
|
|
@@ -6265,6 +6268,14 @@ export declare const billingInvoice: z.ZodObject<{
|
|
|
6265
6268
|
gross_cents: z.ZodNumber;
|
|
6266
6269
|
}, z.core.$strip>;
|
|
6267
6270
|
export type BillingInvoice = z.infer<typeof billingInvoice>;
|
|
6271
|
+
/** Optional document kind for `GET /api/billing/invoices/:id/pdf`; omitted means the original invoice. */
|
|
6272
|
+
export declare const billingInvoicePdfQuery: z.ZodObject<{
|
|
6273
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
6274
|
+
invoice: "invoice";
|
|
6275
|
+
cancellation: "cancellation";
|
|
6276
|
+
}>>;
|
|
6277
|
+
}, z.core.$strict>;
|
|
6278
|
+
export type BillingInvoicePdfQuery = z.infer<typeof billingInvoicePdfQuery>;
|
|
6268
6279
|
/**
|
|
6269
6280
|
* The org's billing account: the payer, the VAT treatment, the cycle and
|
|
6270
6281
|
* period, what is scheduled for the period's end and dunning
|
|
@@ -6397,8 +6408,8 @@ export declare const billingCharge: z.ZodObject<{
|
|
|
6397
6408
|
status: z.ZodEnum<{
|
|
6398
6409
|
paid: "paid";
|
|
6399
6410
|
uncollectible: "uncollectible";
|
|
6400
|
-
due: "due";
|
|
6401
6411
|
cancelled: "cancelled";
|
|
6412
|
+
due: "due";
|
|
6402
6413
|
}>;
|
|
6403
6414
|
currency: z.ZodLiteral<"eur">;
|
|
6404
6415
|
net_cents: z.ZodNumber;
|
|
@@ -6547,7 +6558,9 @@ export declare const billingView: z.ZodObject<{
|
|
|
6547
6558
|
paid: "paid";
|
|
6548
6559
|
open: "open";
|
|
6549
6560
|
uncollectible: "uncollectible";
|
|
6561
|
+
cancelled: "cancelled";
|
|
6550
6562
|
}>;
|
|
6563
|
+
cancellation_document_url: z.ZodNullable<z.ZodString>;
|
|
6551
6564
|
currency: z.ZodEnum<{
|
|
6552
6565
|
eur: "eur";
|
|
6553
6566
|
usd: "usd";
|
|
@@ -6567,8 +6580,8 @@ export declare const billingView: z.ZodObject<{
|
|
|
6567
6580
|
status: z.ZodEnum<{
|
|
6568
6581
|
paid: "paid";
|
|
6569
6582
|
uncollectible: "uncollectible";
|
|
6570
|
-
due: "due";
|
|
6571
6583
|
cancelled: "cancelled";
|
|
6584
|
+
due: "due";
|
|
6572
6585
|
}>;
|
|
6573
6586
|
currency: z.ZodLiteral<"eur">;
|
|
6574
6587
|
net_cents: z.ZodNumber;
|
|
@@ -6970,7 +6983,9 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
6970
6983
|
paid: "paid";
|
|
6971
6984
|
open: "open";
|
|
6972
6985
|
uncollectible: "uncollectible";
|
|
6986
|
+
cancelled: "cancelled";
|
|
6973
6987
|
}>;
|
|
6988
|
+
cancellation_document_url: z.ZodNullable<z.ZodString>;
|
|
6974
6989
|
currency: z.ZodEnum<{
|
|
6975
6990
|
eur: "eur";
|
|
6976
6991
|
usd: "usd";
|
|
@@ -6990,8 +7005,8 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
6990
7005
|
status: z.ZodEnum<{
|
|
6991
7006
|
paid: "paid";
|
|
6992
7007
|
uncollectible: "uncollectible";
|
|
6993
|
-
due: "due";
|
|
6994
7008
|
cancelled: "cancelled";
|
|
7009
|
+
due: "due";
|
|
6995
7010
|
}>;
|
|
6996
7011
|
currency: z.ZodLiteral<"eur">;
|
|
6997
7012
|
net_cents: z.ZodNumber;
|
|
@@ -7020,7 +7035,9 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
7020
7035
|
paid: "paid";
|
|
7021
7036
|
open: "open";
|
|
7022
7037
|
uncollectible: "uncollectible";
|
|
7038
|
+
cancelled: "cancelled";
|
|
7023
7039
|
}>;
|
|
7040
|
+
cancellation_document_url: z.ZodNullable<z.ZodString>;
|
|
7024
7041
|
currency: z.ZodEnum<{
|
|
7025
7042
|
eur: "eur";
|
|
7026
7043
|
usd: "usd";
|
|
@@ -7153,7 +7170,9 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
7153
7170
|
paid: "paid";
|
|
7154
7171
|
open: "open";
|
|
7155
7172
|
uncollectible: "uncollectible";
|
|
7173
|
+
cancelled: "cancelled";
|
|
7156
7174
|
}>;
|
|
7175
|
+
cancellation_document_url: z.ZodNullable<z.ZodString>;
|
|
7157
7176
|
currency: z.ZodEnum<{
|
|
7158
7177
|
eur: "eur";
|
|
7159
7178
|
usd: "usd";
|
|
@@ -7173,8 +7192,8 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
7173
7192
|
status: z.ZodEnum<{
|
|
7174
7193
|
paid: "paid";
|
|
7175
7194
|
uncollectible: "uncollectible";
|
|
7176
|
-
due: "due";
|
|
7177
7195
|
cancelled: "cancelled";
|
|
7196
|
+
due: "due";
|
|
7178
7197
|
}>;
|
|
7179
7198
|
currency: z.ZodLiteral<"eur">;
|
|
7180
7199
|
net_cents: z.ZodNumber;
|
|
@@ -7470,7 +7489,9 @@ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscrimin
|
|
|
7470
7489
|
paid: "paid";
|
|
7471
7490
|
open: "open";
|
|
7472
7491
|
uncollectible: "uncollectible";
|
|
7492
|
+
cancelled: "cancelled";
|
|
7473
7493
|
}>;
|
|
7494
|
+
cancellation_document_url: z.ZodNullable<z.ZodString>;
|
|
7474
7495
|
currency: z.ZodEnum<{
|
|
7475
7496
|
eur: "eur";
|
|
7476
7497
|
usd: "usd";
|
|
@@ -7490,8 +7511,8 @@ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscrimin
|
|
|
7490
7511
|
status: z.ZodEnum<{
|
|
7491
7512
|
paid: "paid";
|
|
7492
7513
|
uncollectible: "uncollectible";
|
|
7493
|
-
due: "due";
|
|
7494
7514
|
cancelled: "cancelled";
|
|
7515
|
+
due: "due";
|
|
7495
7516
|
}>;
|
|
7496
7517
|
currency: z.ZodLiteral<"eur">;
|
|
7497
7518
|
net_cents: z.ZodNumber;
|
|
@@ -7520,7 +7541,9 @@ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscrimin
|
|
|
7520
7541
|
paid: "paid";
|
|
7521
7542
|
open: "open";
|
|
7522
7543
|
uncollectible: "uncollectible";
|
|
7544
|
+
cancelled: "cancelled";
|
|
7523
7545
|
}>;
|
|
7546
|
+
cancellation_document_url: z.ZodNullable<z.ZodString>;
|
|
7524
7547
|
currency: z.ZodEnum<{
|
|
7525
7548
|
eur: "eur";
|
|
7526
7549
|
usd: "usd";
|
|
@@ -7653,7 +7676,9 @@ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscrimin
|
|
|
7653
7676
|
paid: "paid";
|
|
7654
7677
|
open: "open";
|
|
7655
7678
|
uncollectible: "uncollectible";
|
|
7679
|
+
cancelled: "cancelled";
|
|
7656
7680
|
}>;
|
|
7681
|
+
cancellation_document_url: z.ZodNullable<z.ZodString>;
|
|
7657
7682
|
currency: z.ZodEnum<{
|
|
7658
7683
|
eur: "eur";
|
|
7659
7684
|
usd: "usd";
|
|
@@ -7673,8 +7698,8 @@ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscrimin
|
|
|
7673
7698
|
status: z.ZodEnum<{
|
|
7674
7699
|
paid: "paid";
|
|
7675
7700
|
uncollectible: "uncollectible";
|
|
7676
|
-
due: "due";
|
|
7677
7701
|
cancelled: "cancelled";
|
|
7702
|
+
due: "due";
|
|
7678
7703
|
}>;
|
|
7679
7704
|
currency: z.ZodLiteral<"eur">;
|
|
7680
7705
|
net_cents: z.ZodNumber;
|
package/dist/billing.js
CHANGED
|
@@ -673,8 +673,8 @@ export const paymentMethod = z.discriminatedUnion('kind', [
|
|
|
673
673
|
account: z.string().meta({ description: "The PayPal account Mollie's mandate names." }),
|
|
674
674
|
}),
|
|
675
675
|
]);
|
|
676
|
-
/** An invoice's status: `open` until paid,
|
|
677
|
-
export const invoiceStatus = z.enum(['open', 'paid', 'uncollectible']);
|
|
676
|
+
/** An invoice's status: `open` until paid, `cancelled` after a cancellation, or `uncollectible` after an unpaid fallback. */
|
|
677
|
+
export const invoiceStatus = z.enum(['open', 'paid', 'uncollectible', 'cancelled']);
|
|
678
678
|
/** One invoice, rendered by the cloud: the number is gapless, `FL-<year>-<seq>`. */
|
|
679
679
|
export const billingInvoice = z.object({
|
|
680
680
|
id: z.uuid().meta({ description: "The invoice's id." }),
|
|
@@ -683,12 +683,19 @@ export const billingInvoice = z.object({
|
|
|
683
683
|
}),
|
|
684
684
|
issued_at: z.iso.datetime().meta({ description: 'When the invoice was issued.' }),
|
|
685
685
|
status: invoiceStatus.meta({ description: 'This invoice\'s own status.' }),
|
|
686
|
+
cancellation_document_url: z.string().nullable().meta({
|
|
687
|
+
description: 'Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice\'s id, not the cancellation number.',
|
|
688
|
+
}),
|
|
686
689
|
currency: planCurrency.meta({ description: "The org's billing currency." }),
|
|
687
690
|
net_cents: z.number().int().nonnegative().meta({ description: 'The charge, excluding VAT, in integer cents.' }),
|
|
688
691
|
vat_rate_percent: z.number().int().min(0).max(100).meta({ description: 'The VAT rate applied, in whole percent.' }),
|
|
689
692
|
vat_cents: z.number().int().nonnegative().meta({ description: 'VAT, in integer cents (`vatCents`).' }),
|
|
690
693
|
gross_cents: z.number().int().nonnegative().meta({ description: 'Net plus VAT, in integer cents.' }),
|
|
691
694
|
});
|
|
695
|
+
/** Optional document kind for `GET /api/billing/invoices/:id/pdf`; omitted means the original invoice. */
|
|
696
|
+
export const billingInvoicePdfQuery = z.object({
|
|
697
|
+
kind: z.enum(['invoice', 'cancellation']).optional().meta({ description: 'The original invoice or its stored cancellation PDF; omitted means `invoice`.' }),
|
|
698
|
+
}).strict();
|
|
692
699
|
/**
|
|
693
700
|
* The org's billing account: the payer, the VAT treatment, the cycle and
|
|
694
701
|
* period, what is scheduled for the period's end and dunning
|
package/dist/client-robots.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ export declare const clientRobotListItem: z.ZodObject<{
|
|
|
15
15
|
online: z.ZodBoolean;
|
|
16
16
|
latency_ms: z.ZodNullable<z.ZodNumber>;
|
|
17
17
|
low_bandwidth: z.ZodBoolean;
|
|
18
|
+
health_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
19
|
+
job_query_unanswered: "job_query_unanswered";
|
|
20
|
+
}>>>;
|
|
18
21
|
}, z.core.$strip>;
|
|
19
22
|
published_version: z.ZodNullable<z.ZodNumber>;
|
|
20
23
|
id: z.ZodUUID;
|
|
@@ -29,6 +32,9 @@ export declare const clientRobotListResponse: z.ZodObject<{
|
|
|
29
32
|
online: z.ZodBoolean;
|
|
30
33
|
latency_ms: z.ZodNullable<z.ZodNumber>;
|
|
31
34
|
low_bandwidth: z.ZodBoolean;
|
|
35
|
+
health_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
36
|
+
job_query_unanswered: "job_query_unanswered";
|
|
37
|
+
}>>>;
|
|
32
38
|
}, z.core.$strip>;
|
|
33
39
|
published_version: z.ZodNullable<z.ZodNumber>;
|
|
34
40
|
id: z.ZodUUID;
|
package/dist/errors.d.ts
CHANGED
|
@@ -228,9 +228,11 @@ export type FileTooLargeDetails = z.infer<typeof fileTooLargeDetails>;
|
|
|
228
228
|
/**
|
|
229
229
|
* The `details` of a `502 payment_provider_unavailable` refusal (2026-10-04,
|
|
230
230
|
* fleetless/fleetless#104): Mollie did not answer, or answered with an
|
|
231
|
-
* error
|
|
232
|
-
*
|
|
233
|
-
*
|
|
231
|
+
* error. A plan change or add-on purchase is not applied, but an interrupted
|
|
232
|
+
* Mollie request may still be charged and later refunded in full; a `502`
|
|
233
|
+
* does not prove that no charge occurred (fleetless/fleetless#187, #216).
|
|
234
|
+
* `status` is Mollie's own HTTP status, `null` for a timeout — the two ways
|
|
235
|
+
* "did not answer" happens, told apart for whoever reads a support ticket.
|
|
234
236
|
*/
|
|
235
237
|
export declare const paymentProviderUnavailableDetails: z.ZodObject<{
|
|
236
238
|
provider: z.ZodLiteral<"mollie">;
|
|
@@ -258,5 +260,5 @@ export type BillingDocumentsUnavailableDetails = z.infer<typeof billingDocuments
|
|
|
258
260
|
* list is the shared vocabulary, not a closed set, so a new refusal never
|
|
259
261
|
* needs a contracts release before it can be reported honestly.
|
|
260
262
|
*/
|
|
261
|
-
export declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden"];
|
|
263
|
+
export declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "operator_verified_stopped", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "job_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating", "billing_documents_unavailable", "support_read_only", "support_forbidden"];
|
|
262
264
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|
package/dist/errors.js
CHANGED
|
@@ -157,9 +157,11 @@ export const fileTooLargeDetails = z.object({
|
|
|
157
157
|
/**
|
|
158
158
|
* The `details` of a `502 payment_provider_unavailable` refusal (2026-10-04,
|
|
159
159
|
* fleetless/fleetless#104): Mollie did not answer, or answered with an
|
|
160
|
-
* error
|
|
161
|
-
*
|
|
162
|
-
*
|
|
160
|
+
* error. A plan change or add-on purchase is not applied, but an interrupted
|
|
161
|
+
* Mollie request may still be charged and later refunded in full; a `502`
|
|
162
|
+
* does not prove that no charge occurred (fleetless/fleetless#187, #216).
|
|
163
|
+
* `status` is Mollie's own HTTP status, `null` for a timeout — the two ways
|
|
164
|
+
* "did not answer" happens, told apart for whoever reads a support ticket.
|
|
163
165
|
*/
|
|
164
166
|
export const paymentProviderUnavailableDetails = z.object({
|
|
165
167
|
provider: z.literal('mollie').meta({ description: 'The payment provider. Always `mollie` today.' }),
|
|
@@ -315,6 +317,12 @@ export const ERROR_CODES = [
|
|
|
315
317
|
* `job_unknown_to_bridge` (confirmed not-known job).
|
|
316
318
|
*/
|
|
317
319
|
'job_lost',
|
|
320
|
+
/**
|
|
321
|
+
* `Job.error.code` on `lost` after an org Owner explicitly verifies the
|
|
322
|
+
* robot is physically stopped and releases one held job. This records a
|
|
323
|
+
* human safety assertion, not a bridge statement or a timer decision.
|
|
324
|
+
*/
|
|
325
|
+
'operator_verified_stopped',
|
|
318
326
|
/**
|
|
319
327
|
* The bridge confirms it does not know this job after reconciliation,
|
|
320
328
|
* rather than merely omitting it from `hello.active_jobs`. For an action,
|
|
@@ -758,6 +766,12 @@ export const ERROR_CODES = [
|
|
|
758
766
|
*
|
|
759
767
|
*/
|
|
760
768
|
'target_state_conflict',
|
|
769
|
+
/**
|
|
770
|
+
* A held-job recovery cannot release the named job: its state changed, the
|
|
771
|
+
* bridge reconnected, or the id no longer matches. The Owner must read the
|
|
772
|
+
* current job and connection state before deciding whether to try again.
|
|
773
|
+
*/
|
|
774
|
+
'job_state_conflict',
|
|
761
775
|
// 2026-09-04 — the public site (closed beta).
|
|
762
776
|
/**
|
|
763
777
|
* `403` from the portal's sign-up pages while `SIGNUP_MODE=closed`. Not
|
package/dist/index.d.ts
CHANGED
|
@@ -21,12 +21,12 @@ export { DOCUMENT_ROOT_PATH, EXPOSURE_SECTIONS, schemaIssues, formatPath, splitF
|
|
|
21
21
|
export type { SchemaIssue, ExposureSection } from './config-issues.js';
|
|
22
22
|
export { rosGraphEntry, rosGraph, typeField, typeDefinition, parameterFieldsOf } from './introspection.js';
|
|
23
23
|
export type { RosGraphEntry, RosGraph, TypeField, TypeDefinition } from './introspection.js';
|
|
24
|
-
export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, robotDetailsDoc, putRobotDetailsResponse, putRobotDetailsRequest, invokeRequest, invokeResponse, cancelRequest, releaseLiveQuery, serviceCallResponse, invokeOrServiceResponse, publishRequest, jobResponse, robotJobsResponse, rateLimitDetails, exposure, exposureListResponse, SNAPSHOT_HEADERS, ASSET_UPLOAD_HEADERS, cameraDescriptor, cameraListResponse, liveSessionResponse, snapshotMetaResponse, historyQuery, historySamplesResponse, historyBucketsResponse, historyResponse, orgQuotas, orgQuotaUsage, orgQuotaUsageCounts, robotDeletionSummary, RESOURCE_HEALTH_STATES, resourceHealthState, resourceHealthListResponse, orgHealthQuery, robotDeleteQuery, patchRobotRequest, renameSlugRequest, renameSlugResponse, slugUsageResponse, } from './rest.js';
|
|
24
|
+
export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, robotDetailsDoc, putRobotDetailsResponse, putRobotDetailsRequest, invokeRequest, invokeResponse, cancelRequest, recoverHeldJobRequest, recoverHeldJobResponse, releaseLiveQuery, serviceCallResponse, invokeOrServiceResponse, publishRequest, jobResponse, robotJobsResponse, rateLimitDetails, exposure, exposureListResponse, SNAPSHOT_HEADERS, ASSET_UPLOAD_HEADERS, cameraDescriptor, cameraListResponse, liveSessionResponse, snapshotMetaResponse, historyQuery, historySamplesResponse, historyBucketsResponse, historyResponse, orgQuotas, orgQuotaUsage, orgQuotaUsageCounts, robotDeletionSummary, RESOURCE_HEALTH_STATES, resourceHealthState, resourceHealthListResponse, orgHealthQuery, robotDeleteQuery, patchRobotRequest, renameSlugRequest, renameSlugResponse, slugUsageResponse, } from './rest.js';
|
|
25
25
|
export type { HistoryQuery, HistorySamplesResponse, HistoryResponse, HistoryBucketsResponse, OrgQuotas, OrgQuotaUsage, OrgQuotaUsageCounts, RobotDeletionSummary, ResourceHealthState, ResourceHealthListResponse, OrgHealthQuery, RobotDeleteQuery, PatchRobotRequest, RenameSlugRequest, RenameSlugResponse, SlugUsageResponse, } from './rest.js';
|
|
26
26
|
export { LATENCY_BUCKET_MS, BRIDGE_LATENCY_RETENTION_DAYS, MAX_LATENCY_BUCKETS_PER_RESPONSE, latencyBucket, robotLatencySeries, orgLatencyQuery, orgLatencyResponse, USAGE_WINDOW_MAX_DAYS, usageMetric, usageDay, orgUsageQuery, usageRow, orgUsageResponse, } from './rest.js';
|
|
27
27
|
export type { LatencyBucket, RobotLatencySeries, OrgLatencyResponse } from './rest.js';
|
|
28
28
|
export type { UsageMetric, OrgUsageQuery, UsageRow, OrgUsageResponse } from './rest.js';
|
|
29
|
-
export type { Robot, PatchRobotResponse, CreateRobotRequest, CreateRobotResponse, RobotTokenRotateResponse, JointStatePutRequest, JointStatePutResponse, ExposureCounts, ProtocolStatusValue, RobotListItem, RobotListResponse, DatapointValue, RobotDetailResponse, ConfigDraftResponse, PutConfigDraftRequest, PublishConfigResponse, ConfigVersionsResponse, ConfigVersionResponse, IntrospectionResponse, TypesResponse, FetchTypesRequest, FetchTypesResponse, DatapointDescriptor, DatapointListResponse, RobotDetailsDoc, PutRobotDetailsResponse, PutRobotDetailsRequest, InvokeRequest, InvokeResponse, CancelRequest, ReleaseLiveQuery, ServiceCallResponse, InvokeOrServiceResponse, PublishRequest, JobResponse, RobotJobsResponse, RateLimitDetails, Exposure, ExposureListResponse, CameraDescriptor, CameraListResponse, LiveSessionResponse, SnapshotMetaResponse, } from './rest.js';
|
|
29
|
+
export type { Robot, PatchRobotResponse, CreateRobotRequest, CreateRobotResponse, RobotTokenRotateResponse, JointStatePutRequest, JointStatePutResponse, ExposureCounts, ProtocolStatusValue, RobotListItem, RobotListResponse, DatapointValue, RobotDetailResponse, ConfigDraftResponse, PutConfigDraftRequest, PublishConfigResponse, ConfigVersionsResponse, ConfigVersionResponse, IntrospectionResponse, TypesResponse, FetchTypesRequest, FetchTypesResponse, DatapointDescriptor, DatapointListResponse, RobotDetailsDoc, PutRobotDetailsResponse, PutRobotDetailsRequest, InvokeRequest, InvokeResponse, CancelRequest, RecoverHeldJobRequest, RecoverHeldJobResponse, ReleaseLiveQuery, ServiceCallResponse, InvokeOrServiceResponse, PublishRequest, JobResponse, RobotJobsResponse, RateLimitDetails, Exposure, ExposureListResponse, CameraDescriptor, CameraListResponse, LiveSessionResponse, SnapshotMetaResponse, } from './rest.js';
|
|
30
30
|
export { clientAuth, authOk, authError, clientInvoke, clientCancel, clientPublish, commandResult, errorFrame, clientSubscribe, clientUnsubscribe, subscribeError, datapointEvent, resourceHealthEvent, resourceHealthCleared, liveSessionEndReason, liveSessionEvent, ORG_EVENT_SAMPLE_INTERVAL_MS, ORG_EVENT_ORG_CEILING_PER_SECOND, ORG_EVENT_BUFFER_SIZE, ORG_EVENT_BUFFER_IDLE_MS, ORG_EVENT_DETAIL_MAX_BYTES, orgEventKind, orgEventSeverity, orgEvent, orgEventSubscribe, orgEventUnsubscribe, orgEventReplay, orgEventDropped, } from './realtime.js';
|
|
31
31
|
export type { ClientAuth, AuthOk, AuthError, ClientInvoke, ClientCancel, ClientPublish, CommandResult, ErrorFrame, ClientSubscribe, ClientUnsubscribe, SubscribeError, DatapointEvent, ResourceHealthEvent, ResourceHealthCleared, LiveSessionEndReason, LiveSessionEvent, OrgEventKind, OrgEventSeverity, OrgEvent, OrgEventSubscribe, OrgEventUnsubscribe, OrgEventReplay, OrgEventDropped, } from './realtime.js';
|
|
32
32
|
export { password, org, patchOrgResponse, sessionTokens, refreshRequest, WAITLIST_F1_TEXT_VERSION, waitlistRequest, USER_DISPLAY_NAME_MAX, orgAdminTier, fleetlessUser, fleetlessUserListResponse, createTeamInviteRequest, teamInvite, pendingTeamInvite, pendingTeamInviteListResponse, acceptTeamInviteRequest, patchFleetlessUserRequest, tierChangeRequest, mailStatus, tierRequiredDetails, passwordChangeRequest, idpIssuer, loginCode, totpCode, recoveryCode, recoveryCodesList, twoFactorSetupResponse, webauthnJson, webauthnOptionsResponse, developerPasskey, developerTwoFactor, createPasskeyRequest, createPasskeyResponse, renamePasskeyRequest, totpConfirmRequest, totpConfirmResponse, recoveryCodesResponse, authMeResponse, patchOrgRequest, patchAuthMeRequest, } from './identity.js';
|
|
@@ -64,8 +64,8 @@ export type { PlanId, PlanLimitKey, PlanLimits, PlanFeature, PlanFeatures, PlanP
|
|
|
64
64
|
export { planCurrency, orgAddons, orgPlanUsage, planChangeKeep, planChangeReason, pendingPlanChange, orgLock, orgPlan, planChangeRequest, planChangePrepareRequest, planChangeDecisionLookupQuery, planChangeDecisionStatusResponse, planOverrides, adminPlanChangeRequest, } from './plans.js';
|
|
65
65
|
export type { PlanCurrency, OrgAddons, OrgPlanUsage, PlanChangeKeep, PlanChangeReason, PendingPlanChange, OrgLock, OrgPlan, PlanChangeRequest, PlanChangePrepareRequest, PlanChangeDecisionLookupQuery, PlanChangeDecisionStatusResponse, PlanOverrides, AdminPlanChangeRequest, } from './plans.js';
|
|
66
66
|
export { ianaTimeZones } from './iana-time-zones.js';
|
|
67
|
-
export { countryCode, EU_COUNTRIES, SELLER_COUNTRY, DE_VAT_RATE_PERCENT, isEuCountry, currencyForCountry, payerKind, billingCycle, vatTreatment, payerRefusalRule, vatFor, viesCountry, normalizeVatId, periodNetCents, prorateCents, vatCents, chargeAmounts, DAY_MS, periodDays, remainingDays, changeNetCents, checkoutQuote, BILLING_RETRY_DAYS, BILLING_LOCK_DAY, billingAddress, billingDetails, checkoutRequest, checkoutResponse, checkoutStatus, vatIdStatus, vatIdCheckRequest, vatIdCheckResponse, billingChangeRequest, billingCancelRequest, billingDetailsUpdate, paymentMethodKind, paymentMethodChangeRequest, billingAccountStatus, paymentMethod, invoiceStatus, billingInvoice, billingAccount, billingView, billingChangeResponse, billingDocumentKind, billingDocumentStatus, billingDocumentProfile, billingDocumentFormat, billingDocument, billingDocumentList, billingDocumentFileRole, billingDocumentDetail, billingDocumentFileQuery, billingIssuer, billingChargeInvoice, billingCharge, chargePayRequest, } from './billing.js';
|
|
68
|
-
export type { PayerKind, BillingCycle, VatTreatment, PayerRefusalRule, VatDecision, ChargeAmounts, BillingState, QuoteLine, CheckoutQuote, BillingAddress, BillingDetails, CheckoutRequest, CheckoutResponse, CheckoutStatus, VatIdStatus, VatIdCheckRequest, VatIdCheckResponse, BillingChangeRequest, BillingCancelRequest, BillingDetailsUpdate, PaymentMethodKind, PaymentMethodChangeRequest, BillingAccountStatus, PaymentMethod, InvoiceStatus, BillingInvoice, BillingAccount, BillingView, BillingChangeResponse, BillingDocumentKind, BillingDocumentStatus, BillingDocumentProfile, BillingDocumentFormat, BillingDocument, BillingDocumentList, BillingDocumentFileRole, BillingDocumentDetail, BillingDocumentFileQuery, BillingIssuer, BillingChargeInvoice, BillingCharge, ChargePayRequest, } from './billing.js';
|
|
67
|
+
export { countryCode, EU_COUNTRIES, SELLER_COUNTRY, DE_VAT_RATE_PERCENT, isEuCountry, currencyForCountry, payerKind, billingCycle, vatTreatment, payerRefusalRule, vatFor, viesCountry, normalizeVatId, periodNetCents, prorateCents, vatCents, chargeAmounts, DAY_MS, periodDays, remainingDays, changeNetCents, checkoutQuote, BILLING_RETRY_DAYS, BILLING_LOCK_DAY, billingAddress, billingDetails, checkoutRequest, checkoutResponse, checkoutStatus, vatIdStatus, vatIdCheckRequest, vatIdCheckResponse, billingChangeRequest, billingCancelRequest, billingDetailsUpdate, paymentMethodKind, paymentMethodChangeRequest, billingAccountStatus, paymentMethod, invoiceStatus, billingInvoice, billingInvoicePdfQuery, billingAccount, billingView, billingChangeResponse, billingDocumentKind, billingDocumentStatus, billingDocumentProfile, billingDocumentFormat, billingDocument, billingDocumentList, billingDocumentFileRole, billingDocumentDetail, billingDocumentFileQuery, billingIssuer, billingChargeInvoice, billingCharge, chargePayRequest, } from './billing.js';
|
|
68
|
+
export type { PayerKind, BillingCycle, VatTreatment, PayerRefusalRule, VatDecision, ChargeAmounts, BillingState, QuoteLine, CheckoutQuote, BillingAddress, BillingDetails, CheckoutRequest, CheckoutResponse, CheckoutStatus, VatIdStatus, VatIdCheckRequest, VatIdCheckResponse, BillingChangeRequest, BillingCancelRequest, BillingDetailsUpdate, PaymentMethodKind, PaymentMethodChangeRequest, BillingAccountStatus, PaymentMethod, InvoiceStatus, BillingInvoice, BillingInvoicePdfQuery, BillingAccount, BillingView, BillingChangeResponse, BillingDocumentKind, BillingDocumentStatus, BillingDocumentProfile, BillingDocumentFormat, BillingDocument, BillingDocumentList, BillingDocumentFileRole, BillingDocumentDetail, BillingDocumentFileQuery, BillingIssuer, BillingChargeInvoice, BillingCharge, ChargePayRequest, } from './billing.js';
|
|
69
69
|
export { controllerRegisterAddress, controllerRegisterPrivacyContact, controllerRegisterRepresentative, controllerRegisterWrite, controllerRegisterOrgRecord, controllerRegisterOrgResponse } from './controller-register.js';
|
|
70
70
|
export type { ControllerRegisterWrite, ControllerRegisterOrgResponse } from './controller-register.js';
|
|
71
71
|
export { purchaseBillingDetails, purchaseOperationKey, purchaseOperation, purchaseQuote, billingDecisionDisplayRequest, confirmationProof, billingDecisionAmounts, billingDecisionPeriod, billingDecisionSnapshot, billingDecisionDisplayResponse, planChangePrepareResponse, purchaseHoldReason, purchaseRefusalRule, purchaseIntent, purchaseIntentLookupQuery, purchaseIntentDraft, purchaseIntentPaymentStarted, purchaseIntentAcceptedWithoutPayment, purchaseIntentConfirmRequest, purchaseConflictDetails, invoicePayRequest, purchaseIntentResponse, vatDecision, viesPendingReason, } from './billing.js';
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export { DOCUMENT_ROOT_PATH, EXPOSURE_SECTIONS, schemaIssues, formatPath, splitF
|
|
|
22
22
|
export { rosGraphEntry, rosGraph, typeField, typeDefinition, parameterFieldsOf } from './introspection.js';
|
|
23
23
|
export { robot, patchRobotResponse, robotToken, createRobotRequest, createRobotResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, exposureCounts, protocolStatusValue, robotListItem, robotListResponse, datapointValue, robotDetailResponse, configDraftResponse, putConfigDraftRequest, publishConfigResponse, configVersionsResponse, configVersionResponse, introspectionResponse, typesResponse, fetchTypesRequest, fetchTypesResponse, datapointDescriptor, datapointListResponse, robotDetailsDoc, putRobotDetailsResponse, putRobotDetailsRequest, invokeRequest, invokeResponse,
|
|
24
24
|
// Addressing.
|
|
25
|
-
cancelRequest, releaseLiveQuery, serviceCallResponse, invokeOrServiceResponse, publishRequest, jobResponse, robotJobsResponse, rateLimitDetails, exposure, exposureListResponse, SNAPSHOT_HEADERS, ASSET_UPLOAD_HEADERS, cameraDescriptor, cameraListResponse, liveSessionResponse, snapshotMetaResponse,
|
|
25
|
+
cancelRequest, recoverHeldJobRequest, recoverHeldJobResponse, releaseLiveQuery, serviceCallResponse, invokeOrServiceResponse, publishRequest, jobResponse, robotJobsResponse, rateLimitDetails, exposure, exposureListResponse, SNAPSHOT_HEADERS, ASSET_UPLOAD_HEADERS, cameraDescriptor, cameraListResponse, liveSessionResponse, snapshotMetaResponse,
|
|
26
26
|
// Retention, history, quotas.
|
|
27
27
|
historyQuery, historySamplesResponse, historyBucketsResponse, historyResponse, orgQuotas, orgQuotaUsage, orgQuotaUsageCounts, robotDeletionSummary, RESOURCE_HEALTH_STATES, resourceHealthState, resourceHealthListResponse, orgHealthQuery, robotDeleteQuery,
|
|
28
28
|
// Robot rename, slug rename.
|
|
@@ -77,7 +77,7 @@ export { planId, PLAN_ORDER, planLimitKey, planLimits, planFeature, planFeatures
|
|
|
77
77
|
export { planCurrency, orgAddons, orgPlanUsage, planChangeKeep, planChangeReason, pendingPlanChange, orgLock, orgPlan, planChangeRequest, planChangePrepareRequest, planChangeDecisionLookupQuery, planChangeDecisionStatusResponse, planOverrides, adminPlanChangeRequest, } from './plans.js';
|
|
78
78
|
export { ianaTimeZones } from './iana-time-zones.js';
|
|
79
79
|
// 2026-10-04 — billing through Mollie (#104).
|
|
80
|
-
export { countryCode, EU_COUNTRIES, SELLER_COUNTRY, DE_VAT_RATE_PERCENT, isEuCountry, currencyForCountry, payerKind, billingCycle, vatTreatment, payerRefusalRule, vatFor, viesCountry, normalizeVatId, periodNetCents, prorateCents, vatCents, chargeAmounts, DAY_MS, periodDays, remainingDays, changeNetCents, checkoutQuote, BILLING_RETRY_DAYS, BILLING_LOCK_DAY, billingAddress, billingDetails, checkoutRequest, checkoutResponse, checkoutStatus, vatIdStatus, vatIdCheckRequest, vatIdCheckResponse, billingChangeRequest, billingCancelRequest, billingDetailsUpdate, paymentMethodKind, paymentMethodChangeRequest, billingAccountStatus, paymentMethod, invoiceStatus, billingInvoice, billingAccount, billingView, billingChangeResponse,
|
|
80
|
+
export { countryCode, EU_COUNTRIES, SELLER_COUNTRY, DE_VAT_RATE_PERCENT, isEuCountry, currencyForCountry, payerKind, billingCycle, vatTreatment, payerRefusalRule, vatFor, viesCountry, normalizeVatId, periodNetCents, prorateCents, vatCents, chargeAmounts, DAY_MS, periodDays, remainingDays, changeNetCents, checkoutQuote, BILLING_RETRY_DAYS, BILLING_LOCK_DAY, billingAddress, billingDetails, checkoutRequest, checkoutResponse, checkoutStatus, vatIdStatus, vatIdCheckRequest, vatIdCheckResponse, billingChangeRequest, billingCancelRequest, billingDetailsUpdate, paymentMethodKind, paymentMethodChangeRequest, billingAccountStatus, paymentMethod, invoiceStatus, billingInvoice, billingInvoicePdfQuery, billingAccount, billingView, billingChangeResponse,
|
|
81
81
|
// 2026-10-19 — Lexware billing documents (fleetless/fleetless#544).
|
|
82
82
|
billingDocumentKind, billingDocumentStatus, billingDocumentProfile, billingDocumentFormat, billingDocument, billingDocumentList, billingDocumentFileRole, billingDocumentDetail, billingDocumentFileQuery,
|
|
83
83
|
// 2026-10-19 — the Lexware issuer cutover (fleetless/fleetless#327).
|
package/dist/protocol.d.ts
CHANGED
|
@@ -942,6 +942,9 @@ export declare const bridgeState: z.ZodObject<{
|
|
|
942
942
|
online: z.ZodBoolean;
|
|
943
943
|
latency_ms: z.ZodNullable<z.ZodNumber>;
|
|
944
944
|
low_bandwidth: z.ZodBoolean;
|
|
945
|
+
health_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
946
|
+
job_query_unanswered: "job_query_unanswered";
|
|
947
|
+
}>>>;
|
|
945
948
|
}, z.core.$strip>;
|
|
946
949
|
export type BridgeState = z.infer<typeof bridgeState>;
|
|
947
950
|
/**
|
package/dist/protocol.js
CHANGED
|
@@ -706,6 +706,7 @@ export const bridgeState = z.object({
|
|
|
706
706
|
online: z.boolean(),
|
|
707
707
|
latency_ms: z.number().nonnegative().nullable(),
|
|
708
708
|
low_bandwidth: z.boolean().meta({ description: 'Whether the bridge is in its low-bandwidth mode: datapoints capped, cameras reduced or stopped. Bridge-reported.' }),
|
|
709
|
+
health_reason: z.enum(['job_query_unanswered']).nullable().optional().meta({ description: 'Cloud-observed connection health: `job_query_unanswered` after a bridge ignores held-job queries; `null` on an ordinary connect or disconnect. Optional for older observations.' }),
|
|
709
710
|
});
|
|
710
711
|
/* ------------------------------------------------------------------------
|
|
711
712
|
* Cameras.
|
package/dist/rest.d.ts
CHANGED
|
@@ -117,6 +117,9 @@ export declare const robotListItem: z.ZodObject<{
|
|
|
117
117
|
online: z.ZodBoolean;
|
|
118
118
|
latency_ms: z.ZodNullable<z.ZodNumber>;
|
|
119
119
|
low_bandwidth: z.ZodBoolean;
|
|
120
|
+
health_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
121
|
+
job_query_unanswered: "job_query_unanswered";
|
|
122
|
+
}>>>;
|
|
120
123
|
}, z.core.$strip>;
|
|
121
124
|
exposes: z.ZodObject<{
|
|
122
125
|
datapoints: z.ZodNumber;
|
|
@@ -141,6 +144,9 @@ export declare const robotListResponse: z.ZodObject<{
|
|
|
141
144
|
online: z.ZodBoolean;
|
|
142
145
|
latency_ms: z.ZodNullable<z.ZodNumber>;
|
|
143
146
|
low_bandwidth: z.ZodBoolean;
|
|
147
|
+
health_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
148
|
+
job_query_unanswered: "job_query_unanswered";
|
|
149
|
+
}>>>;
|
|
144
150
|
}, z.core.$strip>;
|
|
145
151
|
exposes: z.ZodObject<{
|
|
146
152
|
datapoints: z.ZodNumber;
|
|
@@ -217,6 +223,9 @@ export declare const robotDetailResponse: z.ZodObject<{
|
|
|
217
223
|
online: z.ZodBoolean;
|
|
218
224
|
latency_ms: z.ZodNullable<z.ZodNumber>;
|
|
219
225
|
low_bandwidth: z.ZodBoolean;
|
|
226
|
+
health_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
227
|
+
job_query_unanswered: "job_query_unanswered";
|
|
228
|
+
}>>>;
|
|
220
229
|
}, z.core.$strip>;
|
|
221
230
|
exposes: z.ZodObject<{
|
|
222
231
|
datapoints: z.ZodNumber;
|
|
@@ -865,6 +874,49 @@ export declare const cancelRequest: z.ZodObject<{
|
|
|
865
874
|
job_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
866
875
|
}, z.core.$strict>;
|
|
867
876
|
export type CancelRequest = z.infer<typeof cancelRequest>;
|
|
877
|
+
/**
|
|
878
|
+
* Release one held job only after a human has physically stopped or isolated
|
|
879
|
+
* the robot and checked that it cannot move. This is an Owner operation, not
|
|
880
|
+
* an app command: a normal cancel asks the bridge to stop and cannot stand in
|
|
881
|
+
* for this assertion when the bridge is silent. The cloud cannot sense the
|
|
882
|
+
* physical stop from this field; it records the Owner's statement and reason.
|
|
883
|
+
*/
|
|
884
|
+
export declare const recoverHeldJobRequest: z.ZodObject<{
|
|
885
|
+
job_id: z.ZodUUID;
|
|
886
|
+
verified_stopped: z.ZodLiteral<true>;
|
|
887
|
+
reason: z.ZodString;
|
|
888
|
+
}, z.core.$strict>;
|
|
889
|
+
export type RecoverHeldJobRequest = z.infer<typeof recoverHeldJobRequest>;
|
|
890
|
+
/** The exact job settled to `lost` by the audited recovery. */
|
|
891
|
+
export declare const recoverHeldJobResponse: z.ZodObject<{
|
|
892
|
+
job: z.ZodObject<{
|
|
893
|
+
id: z.ZodUUID;
|
|
894
|
+
robot_id: z.ZodUUID;
|
|
895
|
+
slug: z.ZodString;
|
|
896
|
+
state: z.ZodEnum<{
|
|
897
|
+
unknown: "unknown";
|
|
898
|
+
failed: "failed";
|
|
899
|
+
running: "running";
|
|
900
|
+
succeeded: "succeeded";
|
|
901
|
+
cancelled: "cancelled";
|
|
902
|
+
lost: "lost";
|
|
903
|
+
}>;
|
|
904
|
+
origin: z.ZodEnum<{
|
|
905
|
+
fleetless: "fleetless";
|
|
906
|
+
external: "external";
|
|
907
|
+
}>;
|
|
908
|
+
started_at: z.ZodISODateTime;
|
|
909
|
+
updated_at: z.ZodISODateTime;
|
|
910
|
+
seq: z.ZodNumber;
|
|
911
|
+
result: z.ZodNullable<z.ZodUnknown>;
|
|
912
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
913
|
+
code: z.ZodString;
|
|
914
|
+
message: z.ZodString;
|
|
915
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
916
|
+
}, z.core.$strip>>;
|
|
917
|
+
}, z.core.$strip>;
|
|
918
|
+
}, z.core.$strip>;
|
|
919
|
+
export type RecoverHeldJobResponse = z.infer<typeof recoverHeldJobResponse>;
|
|
868
920
|
/**
|
|
869
921
|
* The query of a live release: `DELETE .../live?session_id=<uuid>`.
|
|
870
922
|
*
|
package/dist/rest.js
CHANGED
|
@@ -333,6 +333,7 @@ export const putRobotDetailsRequest = z.object({ details: robotDetailsDoc });
|
|
|
333
333
|
* | `POST /api/robots/:id/jobs/:slug` | `invokeRequest` | `invokeResponse` (action) or `serviceCallResponse` (service) |
|
|
334
334
|
* | `GET /api/robots/:id/jobs/:slug` | — | `jobResponse` (the current job, or null) |
|
|
335
335
|
* | `POST /api/robots/:id/jobs/:slug/cancel` | `cancelRequest` | `jobResponse` |
|
|
336
|
+
* | `POST /api/robots/:id/jobs/:slug/recover` | `recoverHeldJobRequest` | `recoverHeldJobResponse` |
|
|
336
337
|
* | `POST /api/robots/:id/publishers/:slug` | `publishRequest`| 204 |
|
|
337
338
|
* | `GET /api/robots/:id/exposures` | — | `exposureListResponse` |
|
|
338
339
|
*
|
|
@@ -418,6 +419,20 @@ export const cancelRequest = z.object({
|
|
|
418
419
|
description: 'The one job to stop. Absent or `null` cancels whatever is currently running on the slug, which is what every caller written before this field existed means. Unknown keys are refused rather than stripped, so a misspelling cannot silently become the slug-wide cancel.',
|
|
419
420
|
}),
|
|
420
421
|
}).strict();
|
|
422
|
+
/**
|
|
423
|
+
* Release one held job only after a human has physically stopped or isolated
|
|
424
|
+
* the robot and checked that it cannot move. This is an Owner operation, not
|
|
425
|
+
* an app command: a normal cancel asks the bridge to stop and cannot stand in
|
|
426
|
+
* for this assertion when the bridge is silent. The cloud cannot sense the
|
|
427
|
+
* physical stop from this field; it records the Owner's statement and reason.
|
|
428
|
+
*/
|
|
429
|
+
export const recoverHeldJobRequest = z.object({
|
|
430
|
+
job_id: z.uuid().meta({ description: 'The exact held job id read from the robot job state; another job must never be released by a stale request.' }),
|
|
431
|
+
verified_stopped: z.literal(true).meta({ description: 'The Owner confirms a physical stop and safety check; this is not a cloud sensor reading.' }),
|
|
432
|
+
reason: z.string().trim().min(10).max(500).meta({ description: 'The Owner\'s reason and safety-check record, 10–500 characters after trimming; retained in the audit trail.' }),
|
|
433
|
+
}).strict();
|
|
434
|
+
/** The exact job settled to `lost` by the audited recovery. */
|
|
435
|
+
export const recoverHeldJobResponse = z.object({ job });
|
|
421
436
|
/**
|
|
422
437
|
* The query of a live release: `DELETE .../live?session_id=<uuid>`.
|
|
423
438
|
*
|
package/dist/routes.js
CHANGED
|
@@ -15,8 +15,8 @@ import { MCP_APP_PATHS, mcpRobotDatasheet, mcpRolePreviewResponse } from './mcp.
|
|
|
15
15
|
import { authorizationServerMetadata, dynamicClientRegistrationRequest, dynamicClientRegistrationResponse, oauthAuthorizeQuery, oauthRedirectResponse, oauthTokenRequest, oauthTokenResponse, protectedResourceMetadata, } from './oauth.js';
|
|
16
16
|
import { adminPlanChangeRequest, orgPlan, planChangeRequest, planChangePrepareRequest, planChangeDecisionLookupQuery, planChangeDecisionStatusResponse } from './plans.js';
|
|
17
17
|
import { supportRenewFailRequest, supportTokenRequest, supportTokenResponse } from './support.js';
|
|
18
|
-
import { purchaseIntentLookupQuery, purchaseIntentConfirmRequest, billingDecisionDisplayRequest, billingDecisionDisplayResponse, planChangePrepareResponse, purchaseIntentResponse, invoicePayRequest, billingCancelRequest, billingChangeRequest, billingChangeResponse, billingDetailsUpdate, billingDocumentDetail, billingDocumentFileQuery, billingDocumentList, billingView, chargePayRequest, checkoutRequest, checkoutResponse, checkoutStatus, paymentMethodChangeRequest, vatIdCheckRequest, vatIdCheckResponse, } from './billing.js';
|
|
19
|
-
import { cameraListResponse, cancelRequest, configDraftResponse, configVersionResponse, configVersionsResponse, createRobotRequest, createRobotResponse, datapointListResponse, datapointValue, exposureListResponse, fetchTypesRequest, fetchTypesResponse, historyQuery, historyResponse, introspectionResponse, invokeOrServiceResponse, invokeRequest, jobResponse, liveSessionResponse, orgHealthQuery, orgLatencyQuery, orgLatencyResponse, orgQuotaUsage, orgUsageQuery, orgUsageResponse, patchRobotRequest, patchRobotResponse, publishConfigResponse, publishRequest, putConfigDraftRequest, putRobotDetailsRequest, putRobotDetailsResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, releaseLiveQuery, renameSlugRequest, renameSlugResponse, robotDeleteQuery, resourceHealthListResponse, robotDeletionSummary, robotDetailResponse, robotJobsResponse, robotListResponse, slugUsageResponse, snapshotMetaResponse, typesResponse, } from './rest.js';
|
|
18
|
+
import { purchaseIntentLookupQuery, purchaseIntentConfirmRequest, billingDecisionDisplayRequest, billingDecisionDisplayResponse, planChangePrepareResponse, purchaseIntentResponse, invoicePayRequest, billingCancelRequest, billingChangeRequest, billingChangeResponse, billingDetailsUpdate, billingInvoicePdfQuery, billingDocumentDetail, billingDocumentFileQuery, billingDocumentList, billingView, chargePayRequest, checkoutRequest, checkoutResponse, checkoutStatus, paymentMethodChangeRequest, vatIdCheckRequest, vatIdCheckResponse, } from './billing.js';
|
|
19
|
+
import { cameraListResponse, cancelRequest, recoverHeldJobRequest, recoverHeldJobResponse, configDraftResponse, configVersionResponse, configVersionsResponse, createRobotRequest, createRobotResponse, datapointListResponse, datapointValue, exposureListResponse, fetchTypesRequest, fetchTypesResponse, historyQuery, historyResponse, introspectionResponse, invokeOrServiceResponse, invokeRequest, jobResponse, liveSessionResponse, orgHealthQuery, orgLatencyQuery, orgLatencyResponse, orgQuotaUsage, orgUsageQuery, orgUsageResponse, patchRobotRequest, patchRobotResponse, publishConfigResponse, publishRequest, putConfigDraftRequest, putRobotDetailsRequest, putRobotDetailsResponse, robotTokenRotateResponse, jointStatePutRequest, jointStatePutResponse, releaseLiveQuery, renameSlugRequest, renameSlugResponse, robotDeleteQuery, resourceHealthListResponse, robotDeletionSummary, robotDetailResponse, robotJobsResponse, robotListResponse, slugUsageResponse, snapshotMetaResponse, typesResponse, } from './rest.js';
|
|
20
20
|
export const ROUTE_SECTIONS = [
|
|
21
21
|
{ id: 'health', title: 'Health' },
|
|
22
22
|
{ id: 'developer-auth', title: 'Developer auth' },
|
|
@@ -2613,6 +2613,19 @@ export const ROUTES = [
|
|
|
2613
2613
|
'`JOB_HEARTBEAT_TIMEOUT_MS` is `504 bridge_timeout`; a cancel the bridge could not send at all is `502` carrying the bridge\'s own ' +
|
|
2614
2614
|
'code (`unknown_slug`, `action_server_lost`, `internal_error`).',
|
|
2615
2615
|
},
|
|
2616
|
+
{
|
|
2617
|
+
method: 'POST', path: '/api/robots/:id/jobs/:slug/recover', section: 'commands',
|
|
2618
|
+
summary: 'Releases one held job after an Owner verifies the robot is stopped.',
|
|
2619
|
+
audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: true, status: 200,
|
|
2620
|
+
params: [
|
|
2621
|
+
{ name: 'id', description: 'The robot uuid in the authenticated Owner\'s organization.' },
|
|
2622
|
+
{ name: 'slug', description: 'The action slug holding the exact job named in the body.' },
|
|
2623
|
+
],
|
|
2624
|
+
query: null, request: recoverHeldJobRequest, response: recoverHeldJobResponse,
|
|
2625
|
+
errors: [...DEVELOPER_GUARD, 'tier_required', 'support_forbidden', 'invalid_uuid', 'not_found', 'validation_error', 'job_state_conflict', 'internal_error'],
|
|
2626
|
+
transport: 'http',
|
|
2627
|
+
notes: 'Use only after physically stopping or isolating the robot and checking that it cannot move. Read the held job id, then submit that exact id with a reason and `verified_stopped: true`. The assertion is a human safety check, not a sensor reading. The cloud records the Owner and reason in the audit trail and returns the job settled to `lost`. App users, server keys, other developers and support sessions cannot use this route. A connected bridge or a changed job returns `409 job_state_conflict`; a normal cancel is not recovery and never releases an uncertain job.',
|
|
2628
|
+
},
|
|
2616
2629
|
{
|
|
2617
2630
|
method: 'POST', path: '/api/robots/:id/publishers/:slug', section: 'commands',
|
|
2618
2631
|
summary: 'Publishes one message onto a configured publisher.',
|
|
@@ -3019,7 +3032,7 @@ export const ROUTES = [
|
|
|
3019
3032
|
params: [], query: null, request: checkoutRequest, response: checkoutResponse,
|
|
3020
3033
|
errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'plan_limit', 'target_state_conflict', 'rate_limited', ...BILLING_OFF, ...MOLLIE],
|
|
3021
3034
|
transport: 'http',
|
|
3022
|
-
notes: "Basic stays free for every payer. This start creates only a nonbinding draft; accept_terms is deprecated and cannot confirm an order. Current company, buyer, VIES and EUR quote checks still apply. Persist operation_key before POST; same key
|
|
3035
|
+
notes: "Basic stays free for every payer. This start creates only a nonbinding draft; accept_terms is deprecated and cannot confirm an order. Current company, buyer, VIES and EUR quote checks still apply. Persist operation_key before POST; the same key and input return 200 with the existing intent (and its hosted checkout when payment_started), without another Mollie payment; changed input conflicts. A different operation_key while a first payment is open returns 409 target_state_conflict with rule checkout_open and details expires_at: null. An eligible Owner obtains a no-store C.4 display, then explicitly confirms with its proof. No payment or acceptance occurs at start. Hosted payment later offers card, PayPal or Apple Pay; its return is <console>/settings/billing?checkout=<checkout_id>. An active/past_due account uses billing/change.",
|
|
3023
3036
|
},
|
|
3024
3037
|
{
|
|
3025
3038
|
method: 'GET', path: '/api/billing/intents', section: 'billing',
|
|
@@ -3045,7 +3058,7 @@ export const ROUTES = [
|
|
|
3045
3058
|
params: [{ name: 'id', description: 'The intent ID returned by the start or lookup response.' }],
|
|
3046
3059
|
query: null, request: purchaseIntentConfirmRequest, response: purchaseIntentResponse,
|
|
3047
3060
|
errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'not_found', 'target_state_conflict', 'plan_limit', 'rate_limited', ...BILLING_OFF, ...MOLLIE], transport: 'http',
|
|
3048
|
-
notes: 'Checkout and paid-change decisions require confirmation_proof along with the operation key, quote revision and buyer fingerprint shown in the persisted C.4 display. Cloud rechecks buyer, quote, selection, legal references, period and current state under the org lock; stale or spent proof conflicts without effect. One decision and one legal acceptance commit together. An exact same-key replay returns the original result without another payment or acceptance. Foreign ownership answers 404 without disclosure; pending or held cannot charge.',
|
|
3061
|
+
notes: 'Checkout and paid-change decisions require confirmation_proof along with the operation key, quote revision and buyer fingerprint shown in the persisted C.4 display. Cloud rechecks buyer, quote, selection, legal references, period and current state under the org lock; stale or spent proof conflicts without effect. One decision and one legal acceptance commit together. An exact same-key replay returns the original result without another payment or acceptance. A paid change can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; it does not start another charge. Foreign ownership answers 404 without disclosure; pending or held cannot charge.',
|
|
3049
3062
|
},
|
|
3050
3063
|
{
|
|
3051
3064
|
method: 'GET', path: '/api/billing/checkout/:id', section: 'billing',
|
|
@@ -3082,7 +3095,7 @@ export const ROUTES = [
|
|
|
3082
3095
|
params: [], query: null, request: billingChangeRequest, response: billingChangeResponse,
|
|
3083
3096
|
errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'plan_limit', 'target_state_conflict', ...BILLING_OFF, ...MOLLIE],
|
|
3084
3097
|
transport: 'http',
|
|
3085
|
-
notes: "The request names an absolute plan/cycle/add-on target and a stable operation_key. Start is nonbinding for every change, including zero-charge, scheduled and formerly immediate decreases: it neither changes the plan nor writes legal acceptance. An eligible Owner obtains a C.4 display and explicitly confirms with its proof. Confirmation may return accepted_no_payment with charged: null and no provider payment or redirect, or payment_started for a charged change. Exact-key lookup recovers the accepted result. Existing no_account, past_due, no_valid_mandate and plan_limit conflicts remain.",
|
|
3098
|
+
notes: "The request names an absolute plan/cycle/add-on target and a stable operation_key. Start is nonbinding for every change, including zero-charge, scheduled and formerly immediate decreases: it neither changes the plan nor writes legal acceptance. An eligible Owner obtains a C.4 display and explicitly confirms with its proof. Confirmation may return accepted_no_payment with charged: null and no provider payment or redirect, or payment_started for a charged change. Exact-key lookup recovers the accepted result. Existing no_account, past_due, no_valid_mandate and plan_limit conflicts remain. A later paid-change confirmation can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; no second charge starts.",
|
|
3086
3099
|
},
|
|
3087
3100
|
{
|
|
3088
3101
|
method: 'POST', path: '/api/billing/payment-method', section: 'billing',
|
|
@@ -3111,13 +3124,14 @@ export const ROUTES = [
|
|
|
3111
3124
|
},
|
|
3112
3125
|
{
|
|
3113
3126
|
method: 'GET', path: '/api/billing/invoices/:id/pdf', section: 'billing',
|
|
3114
|
-
summary: "Downloads
|
|
3127
|
+
summary: "Downloads an invoice's original or cancellation PDF.",
|
|
3115
3128
|
audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: true, status: 200,
|
|
3116
3129
|
params: [{ name: 'id', description: 'The invoice id, from `billingInvoice.id` in `GET /api/billing`\'s `invoices`.' }],
|
|
3117
|
-
query:
|
|
3118
|
-
errors: [...DEVELOPER_GUARD, 'tier_required', 'not_found'], transport: 'http',
|
|
3119
|
-
notes: '
|
|
3120
|
-
'
|
|
3130
|
+
query: billingInvoicePdfQuery, request: null, response: null, contentType: 'application/pdf',
|
|
3131
|
+
errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'not_found'], transport: 'http',
|
|
3132
|
+
notes: 'Owner-only. Omitted `kind` or `kind=invoice` returns the original PDF, rendered once with `pdfkit` when issued and stored as bytes. ' +
|
|
3133
|
+
'`kind=cancellation` returns the stored cancellation PDF for this same invoice id; no read renders a new PDF. ' +
|
|
3134
|
+
'`404 not_found` for an unknown id, one from another org, or a missing cancellation number or PDF. This reads historical Cloud ' +
|
|
3121
3135
|
"invoices only: a due charge has no PDF of its own here — its eventual Lexware invoice is a document, read through " +
|
|
3122
3136
|
'`GET /api/billing/documents/:id/file`.',
|
|
3123
3137
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetless/contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Dehne Robotik GmbH",
|