@impz/client 2.4.0 → 2.4.1

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 CHANGED
@@ -16771,6 +16771,206 @@ declare const impContract: {
16771
16771
  }, z.core.$strip>;
16772
16772
  };
16773
16773
  }>, Record<never, never>>;
16774
+ features: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
16775
+ version: z.ZodString;
16776
+ features: z.ZodObject<{
16777
+ sessionOffsets: z.ZodBoolean;
16778
+ leases: z.ZodBoolean;
16779
+ grantableTokens: z.ZodOptional<z.ZodBoolean>;
16780
+ secretRebind: z.ZodOptional<z.ZodBoolean>;
16781
+ tokenUpdate: z.ZodOptional<z.ZodBoolean>;
16782
+ tokenImageAdd: z.ZodOptional<z.ZodBoolean>;
16783
+ databaseCopy: z.ZodOptional<z.ZodBoolean>;
16784
+ imageBuildStream: z.ZodOptional<z.ZodBoolean>;
16785
+ imageOpStream: z.ZodOptional<z.ZodBoolean>;
16786
+ imageBuilds: z.ZodOptional<z.ZodBoolean>;
16787
+ execRequire: z.ZodOptional<z.ZodBoolean>;
16788
+ oauthGrants: z.ZodOptional<z.ZodBoolean>;
16789
+ secretFilesGc: z.ZodOptional<z.ZodBoolean>;
16790
+ sessionLog: z.ZodOptional<z.ZodBoolean>;
16791
+ publicEgress: z.ZodOptional<z.ZodBoolean>;
16792
+ oauthSecrets: z.ZodOptional<z.ZodBoolean>;
16793
+ secretUpstream: z.ZodOptional<z.ZodBoolean>;
16794
+ backupOptOut: z.ZodOptional<z.ZodBoolean>;
16795
+ brokerRefusals: z.ZodOptional<z.ZodBoolean>;
16796
+ grantFilters: z.ZodOptional<z.ZodBoolean>;
16797
+ readOnlyFiles: z.ZodOptional<z.ZodBoolean>;
16798
+ execDropSysAdmin: z.ZodOptional<z.ZodBoolean>;
16799
+ }, z.core.$strip>;
16800
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
16801
+ NOT_FOUND: {
16802
+ readonly message: "Not found";
16803
+ readonly data: z.ZodObject<{
16804
+ kind: z.ZodEnum<{
16805
+ backup: "backup";
16806
+ checkpoint: "checkpoint";
16807
+ "database-copy": "database-copy";
16808
+ grant: "grant";
16809
+ image: "image";
16810
+ imp: "imp";
16811
+ network: "network";
16812
+ "oauth-approval": "oauth-approval";
16813
+ "oauth-client": "oauth-client";
16814
+ "oauth-grant": "oauth-grant";
16815
+ secret: "secret";
16816
+ service: "service";
16817
+ session: "session";
16818
+ "ssh-key": "ssh-key";
16819
+ token: "token";
16820
+ }>;
16821
+ name: z.ZodString;
16822
+ reason: z.ZodOptional<z.ZodEnum<{
16823
+ binding_changed: "binding_changed";
16824
+ }>>;
16825
+ }, z.core.$strip>;
16826
+ };
16827
+ CONFLICT: {
16828
+ readonly message: "Already exists";
16829
+ readonly data: z.ZodObject<{
16830
+ kind: z.ZodEnum<{
16831
+ backup: "backup";
16832
+ checkpoint: "checkpoint";
16833
+ "database-copy": "database-copy";
16834
+ grant: "grant";
16835
+ image: "image";
16836
+ imp: "imp";
16837
+ network: "network";
16838
+ "oauth-approval": "oauth-approval";
16839
+ "oauth-client": "oauth-client";
16840
+ "oauth-grant": "oauth-grant";
16841
+ secret: "secret";
16842
+ service: "service";
16843
+ session: "session";
16844
+ "ssh-key": "ssh-key";
16845
+ token: "token";
16846
+ }>;
16847
+ name: z.ZodString;
16848
+ reason: z.ZodOptional<z.ZodEnum<{
16849
+ binding_changed: "binding_changed";
16850
+ }>>;
16851
+ }, z.core.$strip>;
16852
+ };
16853
+ FORBIDDEN: {
16854
+ readonly message: "Not allowed";
16855
+ readonly data: z.ZodOptional<z.ZodObject<{
16856
+ reason: z.ZodEnum<{
16857
+ imp_out_of_scope: "imp_out_of_scope";
16858
+ not_grantable: "not_grantable";
16859
+ scope: "scope";
16860
+ }>;
16861
+ }, z.core.$strip>>;
16862
+ };
16863
+ PRECONDITION_FAILED: {
16864
+ readonly message: "Not possible on this host";
16865
+ readonly data: z.ZodOptional<z.ZodObject<{
16866
+ reason: z.ZodEnum<{
16867
+ broker_not_ready: "broker_not_ready";
16868
+ impd_outdated: "impd_outdated";
16869
+ }>;
16870
+ detail: z.ZodString;
16871
+ }, z.core.$strip>>;
16872
+ };
16873
+ RAM_BUDGET_EXCEEDED: {
16874
+ readonly message: "Not enough RAM budget, even after sleeping idle imps";
16875
+ readonly status: 503;
16876
+ readonly data: z.ZodObject<{
16877
+ budgetMib: z.ZodInt;
16878
+ usedMib: z.ZodInt;
16879
+ requestedMib: z.ZodInt;
16880
+ neededMib: z.ZodOptional<z.ZodInt>;
16881
+ protected: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
16882
+ name: z.ZodString;
16883
+ ramMib: z.ZodInt;
16884
+ leased: z.ZodBoolean;
16885
+ busy: z.ZodBoolean;
16886
+ }, z.core.$strip>>>>;
16887
+ protectedHidden: z.ZodOptional<z.ZodInt>;
16888
+ }, z.core.$strip>;
16889
+ };
16890
+ SERVICE_UNAVAILABLE: {
16891
+ readonly message: "impd is stopping";
16892
+ };
16893
+ INVALID_STATE: {
16894
+ readonly message: "The imp is not in a state that allows this";
16895
+ readonly status: 409;
16896
+ readonly data: z.ZodObject<{
16897
+ state: z.ZodEnum<{
16898
+ creating: "creating";
16899
+ error: "error";
16900
+ running: "running";
16901
+ sleeping: "sleeping";
16902
+ stopped: "stopped";
16903
+ }>;
16904
+ allowed: z.ZodArray<z.ZodEnum<{
16905
+ creating: "creating";
16906
+ error: "error";
16907
+ running: "running";
16908
+ sleeping: "sleeping";
16909
+ stopped: "stopped";
16910
+ }>>;
16911
+ coldBoots: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
16912
+ bootId: z.ZodString;
16913
+ cause: z.ZodEnum<{
16914
+ recovery: "recovery";
16915
+ restore: "restore";
16916
+ start: "start";
16917
+ unknown: "unknown";
16918
+ wake_fallback: "wake_fallback";
16919
+ watchdog: "watchdog";
16920
+ }>;
16921
+ at: z.ZodISODateTime;
16922
+ }, z.core.$strip>>>>>;
16923
+ }, z.core.$strip>;
16924
+ };
16925
+ INVALID_RESUME: {
16926
+ readonly message: "The resume offset is past the end of the output";
16927
+ readonly status: 409;
16928
+ readonly data: z.ZodReadonly<z.ZodObject<{
16929
+ end: z.ZodInt;
16930
+ bufferStart: z.ZodInt;
16931
+ }, z.core.$strip>>;
16932
+ };
16933
+ DISK_FULL: {
16934
+ readonly message: "Not enough free disk on the host";
16935
+ readonly status: 507;
16936
+ readonly data: z.ZodObject<{
16937
+ availableBytes: z.ZodInt;
16938
+ reserveBytes: z.ZodInt;
16939
+ requestedBytes: z.ZodInt;
16940
+ }, z.core.$strip>;
16941
+ };
16942
+ LEASED: {
16943
+ readonly message: "The imp is leased";
16944
+ readonly status: 409;
16945
+ readonly data: z.ZodObject<{
16946
+ leases: z.ZodReadonly<z.ZodArray<z.ZodObject<{
16947
+ name: z.ZodString;
16948
+ owner: z.ZodObject<{
16949
+ principal: z.ZodString;
16950
+ display: z.ZodString;
16951
+ label: z.ZodString;
16952
+ }, z.core.$strip>;
16953
+ until: z.ZodNullable<z.ZodDate>;
16954
+ }, z.core.$strip>>>;
16955
+ otherCount: z.ZodInt;
16956
+ }, z.core.$strip>;
16957
+ };
16958
+ LEASE_NOT_HELD: {
16959
+ readonly message: "The caller holds no such lease";
16960
+ readonly status: 409;
16961
+ };
16962
+ AGENT_OUTDATED: {
16963
+ readonly message: "The imp's agent is too old for this";
16964
+ readonly status: 409;
16965
+ };
16966
+ MOVING: {
16967
+ readonly message: "The imp is moving between hosts";
16968
+ readonly status: 409;
16969
+ readonly data: z.ZodObject<{
16970
+ retryAfterS: z.ZodInt;
16971
+ }, z.core.$strip>;
16972
+ };
16973
+ }>, Record<never, never>>;
16774
16974
  gc: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
16775
16975
  dryRun: z.ZodOptional<z.ZodBoolean>;
16776
16976
  orphans: z.ZodOptional<z.ZodBoolean>;
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { RPCLink } from "@orpc/client/fetch";
3
3
  import * as z from "zod";
4
4
  //#endregion
5
5
  //#region src/check-server.ts
6
- const CLIENT_VERSION = "2.4.0";
6
+ const CLIENT_VERSION = "2.4.1";
7
7
  async function checkServer(rpc) {
8
8
  const info = await rpc.system.info();
9
9
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@impz/client",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Typed client for impd, the imp host daemon: imps, checkpoints, images and exec",
5
5
  "license": "MIT",
6
6
  "repository": {