@zinn-digital/sdk 0.1.2007 → 0.1.2008

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.
@@ -30709,6 +30709,72 @@ export interface paths {
30709
30709
  patch?: never;
30710
30710
  trace?: never;
30711
30711
  };
30712
+ "/v1/compute/connected-servers": {
30713
+ parameters: {
30714
+ query?: never;
30715
+ header?: never;
30716
+ path?: never;
30717
+ cookie?: never;
30718
+ };
30719
+ /**
30720
+ * The org's connected servers (connect your own server) and the next one's price.
30721
+ * @description PANEL-L2 (docs/1270). A server the customer runs elsewhere and links with one install line. The first connected server is free; each further one is billed monthly (`next.amount_minor`, integer minor units). `offered_os` and `offered_modes` are what the wizard may offer (only what is built). Needs `sites.view`.
30722
+ */
30723
+ get: operations["listConnectedServers"];
30724
+ put?: never;
30725
+ /**
30726
+ * Start connecting a server; returns the ONE install line (single use, 30 minutes).
30727
+ * @description Creates the machine in `awaiting_install` and returns `install_line` (a `curl … | sudo sh` line carrying a single-use token valid for 30 minutes; never shown again). Refused `422 {error.code}` with `unsupported_os`, `mode_not_offered`, or `not_in_good_standing` (a server that would not be free needs the account in good standing). Needs `billing.payment.manage`. Audited `compute.connected_server.create`.
30728
+ */
30729
+ post: operations["createConnectedServer"];
30730
+ delete?: never;
30731
+ options?: never;
30732
+ head?: never;
30733
+ patch?: never;
30734
+ trace?: never;
30735
+ };
30736
+ "/v1/compute/connected-servers/{serverId}": {
30737
+ parameters: {
30738
+ query?: never;
30739
+ header?: never;
30740
+ path: {
30741
+ serverId: string;
30742
+ };
30743
+ cookie?: never;
30744
+ };
30745
+ /** One connected server and its live checks (the wizard polls this). */
30746
+ get: operations["getConnectedServer"];
30747
+ put?: never;
30748
+ post?: never;
30749
+ /**
30750
+ * Disconnect a server; its monthly charge stops. Nothing on the machine is touched by us.
30751
+ * @description The agent's next report receives `410` and removes its own files only. Needs `billing.payment.manage`. Audited `compute.connected_server.remove`.
30752
+ */
30753
+ delete: operations["disconnectConnectedServer"];
30754
+ options?: never;
30755
+ head?: never;
30756
+ patch?: never;
30757
+ trace?: never;
30758
+ };
30759
+ "/v1/compute/connected-servers/{serverId}/line": {
30760
+ parameters: {
30761
+ query?: never;
30762
+ header?: never;
30763
+ path: {
30764
+ serverId: string;
30765
+ };
30766
+ cookie?: never;
30767
+ };
30768
+ get?: never;
30769
+ put?: never;
30770
+ /** A fresh install line for a machine not yet connected; every older line dies. */
30771
+ post: operations["renewConnectedServerLine"];
30772
+ delete?: never;
30773
+ options?: never;
30774
+ head?: never;
30775
+ patch?: never;
30776
+ trace?: never;
30777
+ };
30712
30778
  "/v1/compute/eligibility": {
30713
30779
  parameters: {
30714
30780
  query?: never;
@@ -32538,6 +32604,66 @@ export interface paths {
32538
32604
  patch?: never;
32539
32605
  trace?: never;
32540
32606
  };
32607
+ "/v1/connect/enrol": {
32608
+ parameters: {
32609
+ query?: never;
32610
+ header?: never;
32611
+ path?: never;
32612
+ cookie?: never;
32613
+ };
32614
+ get?: never;
32615
+ put?: never;
32616
+ /**
32617
+ * Redeem a single-use install token (machine-to-engine).
32618
+ * @description Called once by the install script. Checks the token (single use, 30 minutes) and the operating system (AlmaLinux 9/10, Rocky 9/10, Ubuntu 24.04/26.04); returns the agent token once (stored as a digest only). Refusal codes: `unknown_token` 401, `token_used` 409, `token_expired` 410, `wrong_org` 403, `unsupported_os` / `os_mismatch` 422. Throttled `connect-agent` 60/min.
32619
+ */
32620
+ post: operations["enrolConnectedServer"];
32621
+ delete?: never;
32622
+ options?: never;
32623
+ head?: never;
32624
+ patch?: never;
32625
+ trace?: never;
32626
+ };
32627
+ "/v1/connect/install.sh": {
32628
+ parameters: {
32629
+ query?: never;
32630
+ header?: never;
32631
+ path?: never;
32632
+ cookie?: never;
32633
+ };
32634
+ /**
32635
+ * The connect install script (machine-to-engine; plain POSIX sh).
32636
+ * @description Fetched by the install line on the customer's machine. The same script for everyone; the single-use token travels in the line's environment, never in this URL. Pull-only: it installs a 5-minute report timer and nothing that accepts a connection, adds no key and no user. Throttled `connect-agent` 60/min.
32637
+ */
32638
+ get: operations["getConnectInstallScript"];
32639
+ put?: never;
32640
+ post?: never;
32641
+ delete?: never;
32642
+ options?: never;
32643
+ head?: never;
32644
+ patch?: never;
32645
+ trace?: never;
32646
+ };
32647
+ "/v1/connect/report": {
32648
+ parameters: {
32649
+ query?: never;
32650
+ header?: never;
32651
+ path?: never;
32652
+ cookie?: never;
32653
+ };
32654
+ get?: never;
32655
+ put?: never;
32656
+ /**
32657
+ * A connected machine's 5-minute report (machine-to-engine).
32658
+ * @description `Authorization: Bearer <agent token>`. `managed` is false while management is paused for non-payment (the machine itself is never touched). `410 gone` once the customer disconnected it: the agent removes its own files. Throttled `connect-agent` 60/min.
32659
+ */
32660
+ post: operations["reportConnectedServer"];
32661
+ delete?: never;
32662
+ options?: never;
32663
+ head?: never;
32664
+ patch?: never;
32665
+ trace?: never;
32666
+ };
32541
32667
  "/v1/connections/{provider}": {
32542
32668
  parameters: {
32543
32669
  query?: never;
@@ -85894,6 +86020,47 @@ export interface components {
85894
86020
  ConnectedDomain: components["schemas"]["Domain"] & {
85895
86021
  delegation: components["schemas"]["Delegation"];
85896
86022
  };
86023
+ /** @description A server the customer runs elsewhere, linked by the connect agent (PANEL-L2). */
86024
+ ConnectedServer: {
86025
+ checks?: {
86026
+ [key: string]: "ok" | "failed" | "pending";
86027
+ };
86028
+ /** Format: date-time */
86029
+ connected_at?: string | null;
86030
+ /** Format: date-time */
86031
+ created_at?: string;
86032
+ currency: string;
86033
+ free: boolean;
86034
+ hostname?: string;
86035
+ /** Format: uuid */
86036
+ id: string;
86037
+ kernel?: string;
86038
+ label: string;
86039
+ /** Format: date-time */
86040
+ last_report_at?: string | null;
86041
+ /** Format: date-time */
86042
+ line_expires_at?: string | null;
86043
+ /** @description Paused for non-payment; no charge accrues and the machine is never touched. */
86044
+ management_paused: boolean;
86045
+ /** @enum {string} */
86046
+ mode: "watch" | "panel";
86047
+ /** @enum {string} */
86048
+ os_family: "almalinux" | "rocky" | "ubuntu";
86049
+ os_name?: string;
86050
+ /** @description Monthly price in minor units; 0 when free. */
86051
+ price_minor: number;
86052
+ /** @description Machine code when refused (unsupported_os */
86053
+ reason?: string;
86054
+ /** @enum {string} */
86055
+ state: "awaiting_install" | "connected" | "refused" | "expired" | "removed";
86056
+ /** @description connected, not_reporting, or the state. */
86057
+ status: string;
86058
+ };
86059
+ ConnectedServerQuote: {
86060
+ amount_minor: number;
86061
+ currency: string;
86062
+ free: boolean;
86063
+ };
85897
86064
  ConnectExternalBackupRequest: {
85898
86065
  channel: components["schemas"]["ExternalBackupChannel"];
85899
86066
  /** @description `ssh` only. Extra folders to include in every backup: absolute paths, no `..`, never `/`. Omit it to keep the saved list. A folder the SSH user cannot read in full makes the backup fail with that folder named, never a backup that silently lacks it. */
@@ -86038,6 +86205,12 @@ export interface components {
86038
86205
  /** @default true */
86039
86206
  verify_tls: boolean;
86040
86207
  };
86208
+ ConnectRefusal: {
86209
+ error: {
86210
+ /** @description Lower-case machine code the dashboard translates. */
86211
+ code: string;
86212
+ };
86213
+ };
86041
86214
  /** @description Supply **either** `token` or `credentials`. ⛔ `token` is no longer required, because two of the six BYO DNS vendors have no single-token credential to put there: ClouDNS needs `auth_id` and `auth_password`, Azure needs five fields. Call `listConnectionProviders` for the exact field names a provider takes. */
86042
86215
  ConnectTokenRequest: {
86043
86216
  /**
@@ -176128,6 +176301,183 @@ export interface operations {
176128
176301
  503: components["responses"]["ServiceUnavailable"];
176129
176302
  };
176130
176303
  };
176304
+ listConnectedServers: {
176305
+ parameters: {
176306
+ query?: {
176307
+ org_id?: string;
176308
+ };
176309
+ header?: never;
176310
+ path?: never;
176311
+ cookie?: never;
176312
+ };
176313
+ requestBody?: never;
176314
+ responses: {
176315
+ /** @description The connected servers. */
176316
+ 200: {
176317
+ headers: {
176318
+ [name: string]: unknown;
176319
+ };
176320
+ content: {
176321
+ "application/json": {
176322
+ data: components["schemas"]["ConnectedServer"][];
176323
+ next: components["schemas"]["ConnectedServerQuote"];
176324
+ offered_modes: ("watch" | "panel")[];
176325
+ offered_os: ("almalinux" | "rocky" | "ubuntu")[];
176326
+ };
176327
+ };
176328
+ };
176329
+ 401: components["responses"]["Unauthorized"];
176330
+ 403: components["responses"]["Forbidden"];
176331
+ 422: components["responses"]["UnprocessableEntity"];
176332
+ 429: components["responses"]["TooManyRequests"];
176333
+ };
176334
+ };
176335
+ createConnectedServer: {
176336
+ parameters: {
176337
+ query?: never;
176338
+ header?: never;
176339
+ path?: never;
176340
+ cookie?: never;
176341
+ };
176342
+ requestBody: {
176343
+ content: {
176344
+ "application/json": {
176345
+ label: string;
176346
+ /**
176347
+ * @default watch
176348
+ * @enum {string}
176349
+ */
176350
+ mode?: "watch" | "panel";
176351
+ /** Format: uuid */
176352
+ org_id?: string;
176353
+ /** @enum {string} */
176354
+ os_family: "almalinux" | "rocky" | "ubuntu";
176355
+ };
176356
+ };
176357
+ };
176358
+ responses: {
176359
+ /** @description The machine, its install line and the price it will carry. */
176360
+ 201: {
176361
+ headers: {
176362
+ [name: string]: unknown;
176363
+ };
176364
+ content: {
176365
+ "application/json": {
176366
+ data: components["schemas"]["ConnectedServer"];
176367
+ install_line: string;
176368
+ /** Format: date-time */
176369
+ line_expires_at: string | null;
176370
+ quote: components["schemas"]["ConnectedServerQuote"];
176371
+ };
176372
+ };
176373
+ };
176374
+ 400: components["responses"]["UnprocessableEntity"];
176375
+ 401: components["responses"]["Unauthorized"];
176376
+ 403: components["responses"]["Forbidden"];
176377
+ /** @description Refused; `error.code` is the machine reason the dashboard translates. */
176378
+ 422: {
176379
+ headers: {
176380
+ [name: string]: unknown;
176381
+ };
176382
+ content: {
176383
+ "application/json": components["schemas"]["ConnectRefusal"];
176384
+ };
176385
+ };
176386
+ 429: components["responses"]["TooManyRequests"];
176387
+ };
176388
+ };
176389
+ getConnectedServer: {
176390
+ parameters: {
176391
+ query?: never;
176392
+ header?: never;
176393
+ path: {
176394
+ serverId: string;
176395
+ };
176396
+ cookie?: never;
176397
+ };
176398
+ requestBody?: never;
176399
+ responses: {
176400
+ /** @description The machine. */
176401
+ 200: {
176402
+ headers: {
176403
+ [name: string]: unknown;
176404
+ };
176405
+ content: {
176406
+ "application/json": {
176407
+ data: components["schemas"]["ConnectedServer"];
176408
+ };
176409
+ };
176410
+ };
176411
+ 401: components["responses"]["Unauthorized"];
176412
+ 403: components["responses"]["Forbidden"];
176413
+ 404: components["responses"]["NotFound"];
176414
+ 429: components["responses"]["TooManyRequests"];
176415
+ };
176416
+ };
176417
+ disconnectConnectedServer: {
176418
+ parameters: {
176419
+ query?: never;
176420
+ header?: never;
176421
+ path: {
176422
+ serverId: string;
176423
+ };
176424
+ cookie?: never;
176425
+ };
176426
+ requestBody?: never;
176427
+ responses: {
176428
+ /** @description Disconnected. */
176429
+ 204: {
176430
+ headers: {
176431
+ [name: string]: unknown;
176432
+ };
176433
+ content?: never;
176434
+ };
176435
+ 401: components["responses"]["Unauthorized"];
176436
+ 403: components["responses"]["Forbidden"];
176437
+ 404: components["responses"]["NotFound"];
176438
+ 429: components["responses"]["TooManyRequests"];
176439
+ };
176440
+ };
176441
+ renewConnectedServerLine: {
176442
+ parameters: {
176443
+ query?: never;
176444
+ header?: never;
176445
+ path: {
176446
+ serverId: string;
176447
+ };
176448
+ cookie?: never;
176449
+ };
176450
+ requestBody?: never;
176451
+ responses: {
176452
+ /** @description The machine and its new line. */
176453
+ 200: {
176454
+ headers: {
176455
+ [name: string]: unknown;
176456
+ };
176457
+ content: {
176458
+ "application/json": {
176459
+ data: components["schemas"]["ConnectedServer"];
176460
+ install_line: string;
176461
+ /** Format: date-time */
176462
+ line_expires_at: string | null;
176463
+ };
176464
+ };
176465
+ };
176466
+ 401: components["responses"]["Unauthorized"];
176467
+ 403: components["responses"]["Forbidden"];
176468
+ 404: components["responses"]["NotFound"];
176469
+ /** @description Already connected (`already_connected`). */
176470
+ 409: {
176471
+ headers: {
176472
+ [name: string]: unknown;
176473
+ };
176474
+ content: {
176475
+ "application/json": components["schemas"]["ConnectRefusal"];
176476
+ };
176477
+ };
176478
+ 429: components["responses"]["TooManyRequests"];
176479
+ };
176480
+ };
176131
176481
  getComputeEligibility: {
176132
176482
  parameters: {
176133
176483
  query?: {
@@ -179130,6 +179480,182 @@ export interface operations {
179130
179480
  429: components["responses"]["TooManyRequests"];
179131
179481
  };
179132
179482
  };
179483
+ enrolConnectedServer: {
179484
+ parameters: {
179485
+ query?: never;
179486
+ header?: never;
179487
+ path?: never;
179488
+ cookie?: never;
179489
+ };
179490
+ requestBody: {
179491
+ content: {
179492
+ "application/json": {
179493
+ hostname?: string;
179494
+ kernel?: string;
179495
+ os_id: string;
179496
+ os_name?: string;
179497
+ os_version: string;
179498
+ token: string;
179499
+ };
179500
+ };
179501
+ };
179502
+ responses: {
179503
+ /** @description Enrolled. */
179504
+ 200: {
179505
+ headers: {
179506
+ [name: string]: unknown;
179507
+ };
179508
+ content: {
179509
+ "application/json": {
179510
+ data: {
179511
+ agent_token: string;
179512
+ /** @enum {string} */
179513
+ mode: "watch" | "panel";
179514
+ report_every_seconds: number;
179515
+ /** Format: uuid */
179516
+ server_id: string;
179517
+ };
179518
+ };
179519
+ };
179520
+ };
179521
+ /** @description Refused; `error.code` names why. */
179522
+ 400: {
179523
+ headers: {
179524
+ [name: string]: unknown;
179525
+ };
179526
+ content: {
179527
+ "application/json": components["schemas"]["ConnectRefusal"];
179528
+ };
179529
+ };
179530
+ /** @description Refused; `error.code` names why. */
179531
+ 401: {
179532
+ headers: {
179533
+ [name: string]: unknown;
179534
+ };
179535
+ content: {
179536
+ "application/json": components["schemas"]["ConnectRefusal"];
179537
+ };
179538
+ };
179539
+ /** @description Refused; `error.code` names why. */
179540
+ 403: {
179541
+ headers: {
179542
+ [name: string]: unknown;
179543
+ };
179544
+ content: {
179545
+ "application/json": components["schemas"]["ConnectRefusal"];
179546
+ };
179547
+ };
179548
+ /** @description Refused; `error.code` names why. */
179549
+ 409: {
179550
+ headers: {
179551
+ [name: string]: unknown;
179552
+ };
179553
+ content: {
179554
+ "application/json": components["schemas"]["ConnectRefusal"];
179555
+ };
179556
+ };
179557
+ /** @description Refused; `error.code` names why. */
179558
+ 410: {
179559
+ headers: {
179560
+ [name: string]: unknown;
179561
+ };
179562
+ content: {
179563
+ "application/json": components["schemas"]["ConnectRefusal"];
179564
+ };
179565
+ };
179566
+ /** @description Refused; `error.code` names why. */
179567
+ 422: {
179568
+ headers: {
179569
+ [name: string]: unknown;
179570
+ };
179571
+ content: {
179572
+ "application/json": components["schemas"]["ConnectRefusal"];
179573
+ };
179574
+ };
179575
+ 429: components["responses"]["TooManyRequests"];
179576
+ };
179577
+ };
179578
+ getConnectInstallScript: {
179579
+ parameters: {
179580
+ query?: never;
179581
+ header?: never;
179582
+ path?: never;
179583
+ cookie?: never;
179584
+ };
179585
+ requestBody?: never;
179586
+ responses: {
179587
+ /** @description The script. */
179588
+ 200: {
179589
+ headers: {
179590
+ [name: string]: unknown;
179591
+ };
179592
+ content: {
179593
+ "text/plain": string;
179594
+ };
179595
+ };
179596
+ 429: components["responses"]["TooManyRequests"];
179597
+ };
179598
+ };
179599
+ reportConnectedServer: {
179600
+ parameters: {
179601
+ query?: never;
179602
+ header?: never;
179603
+ path?: never;
179604
+ cookie?: never;
179605
+ };
179606
+ requestBody: {
179607
+ content: {
179608
+ "application/json": {
179609
+ kernel?: string;
179610
+ os_name?: string;
179611
+ };
179612
+ };
179613
+ };
179614
+ responses: {
179615
+ /** @description Recorded. */
179616
+ 200: {
179617
+ headers: {
179618
+ [name: string]: unknown;
179619
+ };
179620
+ content: {
179621
+ "application/json": {
179622
+ data: {
179623
+ managed: boolean;
179624
+ next_report_seconds: number;
179625
+ };
179626
+ };
179627
+ };
179628
+ };
179629
+ /** @description Invalid body. */
179630
+ 400: {
179631
+ headers: {
179632
+ [name: string]: unknown;
179633
+ };
179634
+ content: {
179635
+ "application/json": components["schemas"]["ConnectRefusal"];
179636
+ };
179637
+ };
179638
+ /** @description Unknown agent token. */
179639
+ 401: {
179640
+ headers: {
179641
+ [name: string]: unknown;
179642
+ };
179643
+ content: {
179644
+ "application/json": components["schemas"]["ConnectRefusal"];
179645
+ };
179646
+ };
179647
+ /** @description Disconnected; the agent removes itself. */
179648
+ 410: {
179649
+ headers: {
179650
+ [name: string]: unknown;
179651
+ };
179652
+ content: {
179653
+ "application/json": components["schemas"]["ConnectRefusal"];
179654
+ };
179655
+ };
179656
+ 429: components["responses"]["TooManyRequests"];
179657
+ };
179658
+ };
179133
179659
  listConnections: {
179134
179660
  parameters: {
179135
179661
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.2007",
3
+ "version": "0.1.2008",
4
4
  "description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
5
5
  "license": "MIT",
6
6
  "author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",