@qlever-llc/trellis 0.10.8 → 0.10.10

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.
Files changed (210) hide show
  1. package/esm/contract_support/mod.d.ts +1 -1
  2. package/esm/contract_support/mod.d.ts.map +1 -1
  3. package/esm/contract_support/mod.js +1 -1
  4. package/esm/contract_support/protocol.d.ts +67 -0
  5. package/esm/contract_support/protocol.d.ts.map +1 -1
  6. package/esm/contract_support/protocol.js +90 -0
  7. package/esm/generated-sdk/auth/api.d.ts.map +1 -1
  8. package/esm/generated-sdk/auth/client.d.ts.map +1 -1
  9. package/esm/generated-sdk/auth/contract.d.ts.map +1 -1
  10. package/esm/generated-sdk/auth/contract.js +9590 -7
  11. package/esm/generated-sdk/auth/mod.d.ts +3 -3
  12. package/esm/generated-sdk/auth/mod.d.ts.map +1 -1
  13. package/esm/generated-sdk/auth/mod.js +1 -1
  14. package/esm/generated-sdk/auth/owned_api.d.ts.map +1 -1
  15. package/esm/generated-sdk/auth/owned_api.js +305 -62
  16. package/esm/generated-sdk/auth/schemas.d.ts.map +1 -1
  17. package/esm/generated-sdk/auth/schemas.js +6492 -139
  18. package/esm/generated-sdk/auth/types.d.ts +254 -254
  19. package/esm/generated-sdk/auth/types.d.ts.map +1 -1
  20. package/esm/generated-sdk/health/api.d.ts.map +1 -1
  21. package/esm/generated-sdk/health/client.d.ts.map +1 -1
  22. package/esm/generated-sdk/health/contract.d.ts.map +1 -1
  23. package/esm/generated-sdk/health/contract.js +117 -7
  24. package/esm/generated-sdk/health/mod.d.ts +2 -2
  25. package/esm/generated-sdk/health/mod.d.ts.map +1 -1
  26. package/esm/generated-sdk/health/mod.js +1 -1
  27. package/esm/generated-sdk/health/owned_api.d.ts.map +1 -1
  28. package/esm/generated-sdk/health/schemas.d.ts.map +1 -1
  29. package/esm/generated-sdk/health/schemas.js +79 -1
  30. package/esm/generated-sdk/health/types.d.ts +4 -4
  31. package/esm/generated-sdk/health/types.d.ts.map +1 -1
  32. package/esm/generated-sdk/jobs/api.d.ts.map +1 -1
  33. package/esm/generated-sdk/jobs/api.js +12 -4
  34. package/esm/generated-sdk/jobs/client.d.ts.map +1 -1
  35. package/esm/generated-sdk/jobs/contract.d.ts.map +1 -1
  36. package/esm/generated-sdk/jobs/contract.js +1080 -7
  37. package/esm/generated-sdk/jobs/mod.d.ts +2 -2
  38. package/esm/generated-sdk/jobs/mod.d.ts.map +1 -1
  39. package/esm/generated-sdk/jobs/mod.js +1 -1
  40. package/esm/generated-sdk/jobs/owned_api.d.ts.map +1 -1
  41. package/esm/generated-sdk/jobs/owned_api.js +26 -6
  42. package/esm/generated-sdk/jobs/schemas.d.ts.map +1 -1
  43. package/esm/generated-sdk/jobs/schemas.js +768 -18
  44. package/esm/generated-sdk/jobs/types.d.ts +14 -14
  45. package/esm/generated-sdk/jobs/types.d.ts.map +1 -1
  46. package/esm/generated-sdk/state/api.d.ts.map +1 -1
  47. package/esm/generated-sdk/state/api.js +3 -1
  48. package/esm/generated-sdk/state/client.d.ts.map +1 -1
  49. package/esm/generated-sdk/state/contract.d.ts.map +1 -1
  50. package/esm/generated-sdk/state/contract.js +638 -7
  51. package/esm/generated-sdk/state/mod.d.ts +2 -2
  52. package/esm/generated-sdk/state/mod.d.ts.map +1 -1
  53. package/esm/generated-sdk/state/mod.js +1 -1
  54. package/esm/generated-sdk/state/owned_api.d.ts.map +1 -1
  55. package/esm/generated-sdk/state/owned_api.js +36 -8
  56. package/esm/generated-sdk/state/schemas.d.ts.map +1 -1
  57. package/esm/generated-sdk/state/schemas.js +441 -14
  58. package/esm/generated-sdk/state/types.d.ts +15 -15
  59. package/esm/generated-sdk/state/types.d.ts.map +1 -1
  60. package/esm/generated-sdk/trellis-core/api.d.ts.map +1 -1
  61. package/esm/generated-sdk/trellis-core/client.d.ts.map +1 -1
  62. package/esm/generated-sdk/trellis-core/contract.d.ts.map +1 -1
  63. package/esm/generated-sdk/trellis-core/contract.js +744 -7
  64. package/esm/generated-sdk/trellis-core/mod.d.ts +2 -2
  65. package/esm/generated-sdk/trellis-core/mod.d.ts.map +1 -1
  66. package/esm/generated-sdk/trellis-core/mod.js +1 -1
  67. package/esm/generated-sdk/trellis-core/owned_api.d.ts.map +1 -1
  68. package/esm/generated-sdk/trellis-core/owned_api.js +1 -1
  69. package/esm/generated-sdk/trellis-core/schemas.d.ts.map +1 -1
  70. package/esm/generated-sdk/trellis-core/schemas.js +626 -8
  71. package/esm/generated-sdk/trellis-core/types.d.ts +14 -14
  72. package/esm/generated-sdk/trellis-core/types.d.ts.map +1 -1
  73. package/esm/index.d.ts +2 -2
  74. package/esm/index.d.ts.map +1 -1
  75. package/esm/index.js +1 -1
  76. package/esm/server/service.d.ts +40 -9
  77. package/esm/server/service.d.ts.map +1 -1
  78. package/esm/server/service.js +28 -4
  79. package/esm/service/deno.d.ts +1 -1
  80. package/esm/service/deno.d.ts.map +1 -1
  81. package/esm/service/mod.d.ts +1 -1
  82. package/esm/service/mod.d.ts.map +1 -1
  83. package/esm/service/node.d.ts +1 -1
  84. package/esm/service/node.d.ts.map +1 -1
  85. package/package.json +2 -2
  86. package/script/contract_support/mod.d.ts +1 -1
  87. package/script/contract_support/mod.d.ts.map +1 -1
  88. package/script/contract_support/mod.js +8 -1
  89. package/script/contract_support/protocol.d.ts +67 -0
  90. package/script/contract_support/protocol.d.ts.map +1 -1
  91. package/script/contract_support/protocol.js +96 -1
  92. package/script/generated-sdk/auth/api.d.ts.map +1 -1
  93. package/script/generated-sdk/auth/client.d.ts.map +1 -1
  94. package/script/generated-sdk/auth/contract.d.ts.map +1 -1
  95. package/script/generated-sdk/auth/contract.js +9590 -7
  96. package/script/generated-sdk/auth/mod.d.ts +3 -3
  97. package/script/generated-sdk/auth/mod.d.ts.map +1 -1
  98. package/script/generated-sdk/auth/mod.js +2 -2
  99. package/script/generated-sdk/auth/owned_api.d.ts.map +1 -1
  100. package/script/generated-sdk/auth/owned_api.js +304 -61
  101. package/script/generated-sdk/auth/schemas.d.ts.map +1 -1
  102. package/script/generated-sdk/auth/schemas.js +6492 -139
  103. package/script/generated-sdk/auth/types.d.ts +254 -254
  104. package/script/generated-sdk/auth/types.d.ts.map +1 -1
  105. package/script/generated-sdk/health/api.d.ts.map +1 -1
  106. package/script/generated-sdk/health/client.d.ts.map +1 -1
  107. package/script/generated-sdk/health/contract.d.ts.map +1 -1
  108. package/script/generated-sdk/health/contract.js +117 -7
  109. package/script/generated-sdk/health/mod.d.ts +2 -2
  110. package/script/generated-sdk/health/mod.d.ts.map +1 -1
  111. package/script/generated-sdk/health/mod.js +2 -2
  112. package/script/generated-sdk/health/owned_api.d.ts.map +1 -1
  113. package/script/generated-sdk/health/schemas.d.ts.map +1 -1
  114. package/script/generated-sdk/health/schemas.js +79 -1
  115. package/script/generated-sdk/health/types.d.ts +4 -4
  116. package/script/generated-sdk/health/types.d.ts.map +1 -1
  117. package/script/generated-sdk/jobs/api.d.ts.map +1 -1
  118. package/script/generated-sdk/jobs/api.js +12 -4
  119. package/script/generated-sdk/jobs/client.d.ts.map +1 -1
  120. package/script/generated-sdk/jobs/contract.d.ts.map +1 -1
  121. package/script/generated-sdk/jobs/contract.js +1080 -7
  122. package/script/generated-sdk/jobs/mod.d.ts +2 -2
  123. package/script/generated-sdk/jobs/mod.d.ts.map +1 -1
  124. package/script/generated-sdk/jobs/mod.js +2 -2
  125. package/script/generated-sdk/jobs/owned_api.d.ts.map +1 -1
  126. package/script/generated-sdk/jobs/owned_api.js +25 -5
  127. package/script/generated-sdk/jobs/schemas.d.ts.map +1 -1
  128. package/script/generated-sdk/jobs/schemas.js +768 -18
  129. package/script/generated-sdk/jobs/types.d.ts +14 -14
  130. package/script/generated-sdk/jobs/types.d.ts.map +1 -1
  131. package/script/generated-sdk/state/api.d.ts.map +1 -1
  132. package/script/generated-sdk/state/api.js +3 -1
  133. package/script/generated-sdk/state/client.d.ts.map +1 -1
  134. package/script/generated-sdk/state/contract.d.ts.map +1 -1
  135. package/script/generated-sdk/state/contract.js +638 -7
  136. package/script/generated-sdk/state/mod.d.ts +2 -2
  137. package/script/generated-sdk/state/mod.d.ts.map +1 -1
  138. package/script/generated-sdk/state/mod.js +2 -2
  139. package/script/generated-sdk/state/owned_api.d.ts.map +1 -1
  140. package/script/generated-sdk/state/owned_api.js +35 -7
  141. package/script/generated-sdk/state/schemas.d.ts.map +1 -1
  142. package/script/generated-sdk/state/schemas.js +441 -14
  143. package/script/generated-sdk/state/types.d.ts +15 -15
  144. package/script/generated-sdk/state/types.d.ts.map +1 -1
  145. package/script/generated-sdk/trellis-core/api.d.ts.map +1 -1
  146. package/script/generated-sdk/trellis-core/client.d.ts.map +1 -1
  147. package/script/generated-sdk/trellis-core/contract.d.ts.map +1 -1
  148. package/script/generated-sdk/trellis-core/contract.js +744 -7
  149. package/script/generated-sdk/trellis-core/mod.d.ts +2 -2
  150. package/script/generated-sdk/trellis-core/mod.d.ts.map +1 -1
  151. package/script/generated-sdk/trellis-core/mod.js +2 -2
  152. package/script/generated-sdk/trellis-core/owned_api.d.ts.map +1 -1
  153. package/script/generated-sdk/trellis-core/schemas.d.ts.map +1 -1
  154. package/script/generated-sdk/trellis-core/schemas.js +626 -8
  155. package/script/generated-sdk/trellis-core/types.d.ts +14 -14
  156. package/script/generated-sdk/trellis-core/types.d.ts.map +1 -1
  157. package/script/index.d.ts +2 -2
  158. package/script/index.d.ts.map +1 -1
  159. package/script/index.js +9 -2
  160. package/script/server/service.d.ts +40 -9
  161. package/script/server/service.d.ts.map +1 -1
  162. package/script/server/service.js +27 -3
  163. package/script/service/deno.d.ts +1 -1
  164. package/script/service/deno.d.ts.map +1 -1
  165. package/script/service/mod.d.ts +1 -1
  166. package/script/service/mod.d.ts.map +1 -1
  167. package/script/service/node.d.ts +1 -1
  168. package/script/service/node.d.ts.map +1 -1
  169. package/src/contract_support/mod.ts +12 -0
  170. package/src/contract_support/protocol.ts +137 -0
  171. package/src/index.ts +12 -0
  172. package/src/sdk/_generated/auth/api.ts +10 -21
  173. package/src/sdk/_generated/auth/client.ts +1178 -160
  174. package/src/sdk/_generated/auth/contract.ts +9637 -13
  175. package/src/sdk/_generated/auth/mod.ts +22 -3
  176. package/src/sdk/_generated/auth/owned_api.ts +897 -264
  177. package/src/sdk/_generated/auth/schemas.ts +6630 -278
  178. package/src/sdk/_generated/auth/types.ts +2950 -359
  179. package/src/sdk/_generated/core/api.ts +10 -21
  180. package/src/sdk/_generated/core/client.ts +105 -12
  181. package/src/sdk/_generated/core/contract.ts +774 -13
  182. package/src/sdk/_generated/core/mod.ts +17 -2
  183. package/src/sdk/_generated/core/owned_api.ts +40 -24
  184. package/src/sdk/_generated/core/schemas.ts +626 -9
  185. package/src/sdk/_generated/core/types.ts +233 -18
  186. package/src/sdk/_generated/health/api.ts +10 -21
  187. package/src/sdk/_generated/health/client.ts +104 -8
  188. package/src/sdk/_generated/health/contract.ts +144 -13
  189. package/src/sdk/_generated/health/mod.ts +17 -2
  190. package/src/sdk/_generated/health/owned_api.ts +4 -9
  191. package/src/sdk/_generated/health/schemas.ts +79 -2
  192. package/src/sdk/_generated/health/types.ts +31 -4
  193. package/src/sdk/_generated/jobs/api.ts +20 -18
  194. package/src/sdk/_generated/jobs/client.ts +199 -28
  195. package/src/sdk/_generated/jobs/contract.ts +1119 -13
  196. package/src/sdk/_generated/jobs/mod.ts +17 -2
  197. package/src/sdk/_generated/jobs/owned_api.ts +64 -27
  198. package/src/sdk/_generated/jobs/schemas.ts +776 -20
  199. package/src/sdk/_generated/jobs/types.ts +407 -34
  200. package/src/sdk/_generated/state/api.ts +11 -18
  201. package/src/sdk/_generated/state/client.ts +169 -22
  202. package/src/sdk/_generated/state/contract.ts +670 -13
  203. package/src/sdk/_generated/state/mod.ts +17 -2
  204. package/src/sdk/_generated/state/owned_api.ts +65 -25
  205. package/src/sdk/_generated/state/schemas.ts +441 -15
  206. package/src/sdk/_generated/state/types.ts +229 -26
  207. package/src/server/service.ts +133 -7
  208. package/src/service/deno.ts +4 -0
  209. package/src/service/mod.ts +4 -0
  210. package/src/service/node.ts +4 -0
@@ -2,5 +2,20 @@ export { API, OWNED_API } from "./api.js";
2
2
  export type { Api, ApiViews, OwnedApi } from "./api.js";
3
3
  export * from "./types.js";
4
4
  export * from "./schemas.js";
5
- export type { Client, HandlerClient, Service, ServiceEventSurface, ServiceHandle, ServiceWithDeps, TrellisHealthClient, TrellisHealthState } from "./client.js";
6
- export { CONTRACT, CONTRACT_DIGEST, CONTRACT_ID, use, sdk } from "./contract.js";
5
+ export type {
6
+ Client,
7
+ HandlerClient,
8
+ Service,
9
+ ServiceEventSurface,
10
+ ServiceHandle,
11
+ ServiceWithDeps,
12
+ TrellisHealthClient,
13
+ TrellisHealthState,
14
+ } from "./client.js";
15
+ export {
16
+ CONTRACT,
17
+ CONTRACT_DIGEST,
18
+ CONTRACT_ID,
19
+ sdk,
20
+ use,
21
+ } from "./contract.js";
@@ -5,10 +5,8 @@ import type * as Types from "./types.js";
5
5
  import { HealthHeartbeatSchema } from "./schemas.js";
6
6
 
7
7
  export const OWNED_API = {
8
- rpc: {
9
- },
10
- operations: {
11
- },
8
+ rpc: {},
9
+ operations: {},
12
10
  events: {
13
11
  "Health.Heartbeat": {
14
12
  subject: "events.v1.Health.Heartbeat",
@@ -17,9 +15,6 @@ export const OWNED_API = {
17
15
  subscribeCapabilities: [],
18
16
  },
19
17
  },
20
- feeds: {
21
- },
22
- subjects: {
23
- },
18
+ feeds: {},
19
+ subjects: {},
24
20
  } satisfies TrellisAPI;
25
-
@@ -1,3 +1,80 @@
1
1
  // Generated from ./generated/contracts/manifests/trellis.health@v1.json
2
- export const HealthHeartbeatSchema = {"properties":{"checks":{"items":{"properties":{"error":{"type":"string"},"info":{"patternProperties":{"^.*$":{}},"type":"object"},"latencyMs":{"type":"number"},"name":{"type":"string"},"status":{"anyOf":[{"const":"ok","type":"string"},{"const":"failed","type":"string"}]},"summary":{"type":"string"}},"required":["name","status","latencyMs"],"type":"object"},"type":"array"},"header":{"properties":{"id":{"type":"string"},"time":{"format":"date-time","type":"string"}},"required":["id","time"],"type":"object"},"service":{"properties":{"contractDigest":{"type":"string"},"contractId":{"type":"string"},"info":{"patternProperties":{"^.*$":{}},"type":"object"},"instanceId":{"type":"string"},"kind":{"anyOf":[{"const":"service","type":"string"},{"const":"device","type":"string"}]},"name":{"type":"string"},"publishIntervalMs":{"minimum":1,"type":"integer"},"runtime":{"anyOf":[{"const":"deno","type":"string"},{"const":"node","type":"string"},{"const":"rust","type":"string"},{"const":"unknown","type":"string"}]},"runtimeVersion":{"type":"string"},"startedAt":{"format":"date-time","type":"string"},"version":{"type":"string"}},"required":["name","kind","instanceId","contractId","contractDigest","startedAt","publishIntervalMs","runtime"],"type":"object"},"status":{"anyOf":[{"const":"healthy","type":"string"},{"const":"unhealthy","type":"string"},{"const":"degraded","type":"string"}]},"summary":{"type":"string"}},"required":["header","service","status","checks"],"type":"object"} as const;
3
-
2
+ export const HealthHeartbeatSchema = {
3
+ "properties": {
4
+ "checks": {
5
+ "items": {
6
+ "properties": {
7
+ "error": { "type": "string" },
8
+ "info": { "patternProperties": { "^.*$": {} }, "type": "object" },
9
+ "latencyMs": { "type": "number" },
10
+ "name": { "type": "string" },
11
+ "status": {
12
+ "anyOf": [{ "const": "ok", "type": "string" }, {
13
+ "const": "failed",
14
+ "type": "string",
15
+ }],
16
+ },
17
+ "summary": { "type": "string" },
18
+ },
19
+ "required": ["name", "status", "latencyMs"],
20
+ "type": "object",
21
+ },
22
+ "type": "array",
23
+ },
24
+ "header": {
25
+ "properties": {
26
+ "id": { "type": "string" },
27
+ "time": { "format": "date-time", "type": "string" },
28
+ },
29
+ "required": ["id", "time"],
30
+ "type": "object",
31
+ },
32
+ "service": {
33
+ "properties": {
34
+ "contractDigest": { "type": "string" },
35
+ "contractId": { "type": "string" },
36
+ "info": { "patternProperties": { "^.*$": {} }, "type": "object" },
37
+ "instanceId": { "type": "string" },
38
+ "kind": {
39
+ "anyOf": [{ "const": "service", "type": "string" }, {
40
+ "const": "device",
41
+ "type": "string",
42
+ }],
43
+ },
44
+ "name": { "type": "string" },
45
+ "publishIntervalMs": { "minimum": 1, "type": "integer" },
46
+ "runtime": {
47
+ "anyOf": [
48
+ { "const": "deno", "type": "string" },
49
+ { "const": "node", "type": "string" },
50
+ { "const": "rust", "type": "string" },
51
+ { "const": "unknown", "type": "string" },
52
+ ],
53
+ },
54
+ "runtimeVersion": { "type": "string" },
55
+ "startedAt": { "format": "date-time", "type": "string" },
56
+ "version": { "type": "string" },
57
+ },
58
+ "required": [
59
+ "name",
60
+ "kind",
61
+ "instanceId",
62
+ "contractId",
63
+ "contractDigest",
64
+ "startedAt",
65
+ "publishIntervalMs",
66
+ "runtime",
67
+ ],
68
+ "type": "object",
69
+ },
70
+ "status": {
71
+ "anyOf": [{ "const": "healthy", "type": "string" }, {
72
+ "const": "unhealthy",
73
+ "type": "string",
74
+ }, { "const": "degraded", "type": "string" }],
75
+ },
76
+ "summary": { "type": "string" },
77
+ },
78
+ "required": ["header", "service", "status", "checks"],
79
+ "type": "object",
80
+ } as const;
@@ -1,14 +1,42 @@
1
1
  // Generated from ./generated/contracts/manifests/trellis.health@v1.json
2
2
  export const CONTRACT_ID = "trellis.health@v1" as const;
3
- export const CONTRACT_DIGEST = "RHDzeH2V6Nltzk6WklCLbTIK48hF0hNuO9Qk6-BosT4" as const;
3
+ export const CONTRACT_DIGEST =
4
+ "RHDzeH2V6Nltzk6WklCLbTIK48hF0hNuO9Qk6-BosT4" as const;
4
5
 
5
- export type HealthHeartbeatEvent = { checks: Array<{ error?: string; info?: { [k: string]: unknown; }; latencyMs: number; name: string; status: ("ok" | "failed"); summary?: string; }>; header: { id: string; time: string; }; service: { contractDigest: string; contractId: string; info?: { [k: string]: unknown; }; instanceId: string; kind: ("service" | "device"); name: string; publishIntervalMs: number; runtime: ("deno" | "node" | "rust" | "unknown"); runtimeVersion?: string; startedAt: string; version?: string; }; status: ("healthy" | "unhealthy" | "degraded"); summary?: string; };
6
+ export type HealthHeartbeatEvent = {
7
+ checks: Array<
8
+ {
9
+ error?: string;
10
+ info?: { [k: string]: unknown };
11
+ latencyMs: number;
12
+ name: string;
13
+ status: "ok" | "failed";
14
+ summary?: string;
15
+ }
16
+ >;
17
+ header: { id: string; time: string };
18
+ service: {
19
+ contractDigest: string;
20
+ contractId: string;
21
+ info?: { [k: string]: unknown };
22
+ instanceId: string;
23
+ kind: "service" | "device";
24
+ name: string;
25
+ publishIntervalMs: number;
26
+ runtime: "deno" | "node" | "rust" | "unknown";
27
+ runtimeVersion?: string;
28
+ startedAt: string;
29
+ version?: string;
30
+ };
31
+ status: "healthy" | "unhealthy" | "degraded";
32
+ summary?: string;
33
+ };
6
34
 
7
35
  export interface RpcMap {
8
36
  }
9
37
 
10
38
  export interface EventMap {
11
- "Health.Heartbeat": { event: HealthHeartbeatEvent; };
39
+ "Health.Heartbeat": { event: HealthHeartbeatEvent };
12
40
  }
13
41
 
14
42
  export interface FeedMap {
@@ -16,4 +44,3 @@ export interface FeedMap {
16
44
 
17
45
  export interface SubjectMap {
18
46
  }
19
-
@@ -8,36 +8,39 @@ export { OWNED_API };
8
8
 
9
9
  export type UsedApi = {
10
10
  rpc: {
11
- readonly "Auth.Requests.Validate": typeof AuthApi.rpc["Auth.Requests.Validate"];
11
+ readonly "Auth.Requests.Validate":
12
+ typeof AuthApi.rpc["Auth.Requests.Validate"];
12
13
  readonly "Trellis.Bindings.Get": typeof CoreApi.rpc["Trellis.Bindings.Get"];
13
14
  readonly "Trellis.Catalog": typeof CoreApi.rpc["Trellis.Catalog"];
14
15
  };
15
- operations: {
16
- };
16
+ operations: {};
17
17
  events: {
18
18
  readonly "Health.Heartbeat": typeof HealthApi.events["Health.Heartbeat"];
19
19
  };
20
- feeds: {
21
- };
22
- subjects: {
23
- };
20
+ feeds: {};
21
+ subjects: {};
24
22
  };
25
23
 
26
24
  export const USED_API: UsedApi = {
27
25
  rpc: {
28
- get "Auth.Requests.Validate"() { return AuthApi.rpc["Auth.Requests.Validate"]; },
29
- get "Trellis.Bindings.Get"() { return CoreApi.rpc["Trellis.Bindings.Get"]; },
30
- get "Trellis.Catalog"() { return CoreApi.rpc["Trellis.Catalog"]; },
31
- },
32
- operations: {
26
+ get "Auth.Requests.Validate"() {
27
+ return AuthApi.rpc["Auth.Requests.Validate"];
28
+ },
29
+ get "Trellis.Bindings.Get"() {
30
+ return CoreApi.rpc["Trellis.Bindings.Get"];
31
+ },
32
+ get "Trellis.Catalog"() {
33
+ return CoreApi.rpc["Trellis.Catalog"];
34
+ },
33
35
  },
36
+ operations: {},
34
37
  events: {
35
- get "Health.Heartbeat"() { return HealthApi.events["Health.Heartbeat"]; },
36
- },
37
- feeds: {
38
- },
39
- subjects: {
38
+ get "Health.Heartbeat"() {
39
+ return HealthApi.events["Health.Heartbeat"];
40
+ },
40
41
  },
42
+ feeds: {},
43
+ subjects: {},
41
44
  };
42
45
 
43
46
  export type OwnedApi = typeof OWNED_API;
@@ -55,4 +58,3 @@ export const API = {
55
58
  } as const;
56
59
 
57
60
  export type ApiViews = typeof API;
58
-
@@ -1,5 +1,36 @@
1
1
  // Generated from ./generated/contracts/manifests/trellis.jobs@v1.json
2
- import type { AcceptedOperation, AsyncResult, BaseError, EventListenerContext, EventOpts, FeedSubscribeOpts, FeedSubscription, HandlerTrellis, MapStateStoreClient, MaybeAsync, OperationInputBuilder, OperationObserverCallbacks, OperationRef, OperationRefData, OperationRuntimeHandle, OperationTransferHandle, PreparedTrellisEvent, ReceiveTransferGrant, ReceiveTransferHandle, RequestOpts, Result, RpcHandlerContext, SendTransferGrant, SendTransferHandle, TerminalOperation, TransferCapableOperationInputBuilder, TrellisConnection, UnexpectedError, ValidationError, ValueStateStoreClient } from "../../../index.js";
2
+ import type {
3
+ AcceptedOperation,
4
+ AsyncResult,
5
+ BaseError,
6
+ EventListenerContext,
7
+ EventOpts,
8
+ FeedSubscribeOpts,
9
+ FeedSubscription,
10
+ HandlerTrellis,
11
+ MapStateStoreClient,
12
+ MaybeAsync,
13
+ OperationInputBuilder,
14
+ OperationObserverCallbacks,
15
+ OperationRef,
16
+ OperationRefData,
17
+ OperationRuntimeHandle,
18
+ OperationTransferHandle,
19
+ PreparedTrellisEvent,
20
+ ReceiveTransferGrant,
21
+ ReceiveTransferHandle,
22
+ RequestOpts,
23
+ Result,
24
+ RpcHandlerContext,
25
+ SendTransferGrant,
26
+ SendTransferHandle,
27
+ TerminalOperation,
28
+ TransferCapableOperationInputBuilder,
29
+ TrellisConnection,
30
+ UnexpectedError,
31
+ ValidationError,
32
+ ValueStateStoreClient,
33
+ } from "../../../index.js";
3
34
  import type { API, Api } from "./api.js";
4
35
  import type * as Types from "./types.js";
5
36
  import type * as AuthSdk from "../auth/mod.js";
@@ -9,16 +40,51 @@ import type * as HealthSdk from "../health/mod.js";
9
40
  type WithDeps<TDeps> = [TDeps] extends [undefined] ? {} : { deps: TDeps };
10
41
 
11
42
  type EventCallback<TMessage> = {
12
- bivarianceHack(message: TMessage, context: EventListenerContext): MaybeAsync<void, BaseError>;
43
+ bivarianceHack(
44
+ message: TMessage,
45
+ context: EventListenerContext,
46
+ ): MaybeAsync<void, BaseError>;
13
47
  }["bivarianceHack"];
14
48
 
15
- type ServiceEventHandler<TEvent, TDeps = undefined> = (args: { event: TEvent; context: EventListenerContext; client: HandlerClient } & WithDeps<TDeps>) => MaybeAsync<void, BaseError>;
49
+ type ServiceEventHandler<TEvent, TDeps = undefined> = (
50
+ args:
51
+ & { event: TEvent; context: EventListenerContext; client: HandlerClient }
52
+ & WithDeps<TDeps>,
53
+ ) => MaybeAsync<void, BaseError>;
16
54
 
17
- type RpcHandler<TInput, TOutput, TDeps = undefined> = (args: { input: TInput; context: RpcHandlerContext; client: HandlerClient } & WithDeps<TDeps>) => MaybeAsync<TOutput, BaseError>;
55
+ type RpcHandler<TInput, TOutput, TDeps = undefined> = (
56
+ args:
57
+ & { input: TInput; context: RpcHandlerContext; client: HandlerClient }
58
+ & WithDeps<TDeps>,
59
+ ) => MaybeAsync<TOutput, BaseError>;
18
60
 
19
- type FeedHandler<TInput, TEvent, TDeps = undefined> = (context: { input: TInput; caller: unknown; signal: AbortSignal; emit(event: TEvent): AsyncResult<void, ValidationError | UnexpectedError>; client: HandlerClient } & WithDeps<TDeps>) => unknown | Promise<unknown>;
61
+ type FeedHandler<TInput, TEvent, TDeps = undefined> = (
62
+ context: {
63
+ input: TInput;
64
+ caller: unknown;
65
+ signal: AbortSignal;
66
+ emit(event: TEvent): AsyncResult<void, ValidationError | UnexpectedError>;
67
+ client: HandlerClient;
68
+ } & WithDeps<TDeps>,
69
+ ) => unknown | Promise<unknown>;
20
70
 
21
- type OperationHandler<TInput, TProgress, TOutput, TTransfer, TDeps = undefined> = (context: { input: TInput; op: OperationRuntimeHandle<TProgress, TOutput>; caller: unknown; client: HandlerClient } & TTransfer & WithDeps<TDeps>) => unknown | Promise<unknown>;
71
+ type OperationHandler<
72
+ TInput,
73
+ TProgress,
74
+ TOutput,
75
+ TTransfer,
76
+ TDeps = undefined,
77
+ > = (
78
+ context:
79
+ & {
80
+ input: TInput;
81
+ op: OperationRuntimeHandle<TProgress, TOutput>;
82
+ caller: unknown;
83
+ client: HandlerClient;
84
+ }
85
+ & TTransfer
86
+ & WithDeps<TDeps>,
87
+ ) => unknown | Promise<unknown>;
22
88
 
23
89
  export type TrellisJobsState = {};
24
90
 
@@ -33,26 +99,74 @@ export interface TrellisJobsClient {
33
99
  transfer(grant: ReceiveTransferGrant): ReceiveTransferHandle;
34
100
  readonly rpc: {
35
101
  readonly auth: {
36
- requestsValidate(input: AuthSdk.AuthRequestsValidateInput, opts?: RequestOpts): AsyncResult<AuthSdk.AuthRequestsValidateOutput, BaseError>;
102
+ requestsValidate(
103
+ input: AuthSdk.AuthRequestsValidateInput,
104
+ opts?: RequestOpts,
105
+ ): AsyncResult<AuthSdk.AuthRequestsValidateOutput, BaseError>;
37
106
  };
38
107
  readonly jobs: {
39
- cancel(input: Types.JobsCancelInput, opts?: RequestOpts): AsyncResult<Types.JobsCancelOutput, BaseError>;
40
- dismissDLQ(input: Types.JobsDismissDLQInput, opts?: RequestOpts): AsyncResult<Types.JobsDismissDLQOutput, BaseError>;
41
- get(input: Types.JobsGetInput, opts?: RequestOpts): AsyncResult<Types.JobsGetOutput, BaseError>;
42
- health(input: Types.JobsHealthInput, opts?: RequestOpts): AsyncResult<Types.JobsHealthOutput, BaseError>;
43
- list(input: Types.JobsListInput, opts?: RequestOpts): AsyncResult<Types.JobsListOutput, BaseError>;
44
- listDLQ(input: Types.JobsListDLQInput, opts?: RequestOpts): AsyncResult<Types.JobsListDLQOutput, BaseError>;
45
- listServices(input: Types.JobsListServicesInput, opts?: RequestOpts): AsyncResult<Types.JobsListServicesOutput, BaseError>;
46
- replayDLQ(input: Types.JobsReplayDLQInput, opts?: RequestOpts): AsyncResult<Types.JobsReplayDLQOutput, BaseError>;
47
- retry(input: Types.JobsRetryInput, opts?: RequestOpts): AsyncResult<Types.JobsRetryOutput, BaseError>;
108
+ cancel(
109
+ input: Types.JobsCancelInput,
110
+ opts?: RequestOpts,
111
+ ): AsyncResult<Types.JobsCancelOutput, BaseError>;
112
+ dismissDLQ(
113
+ input: Types.JobsDismissDLQInput,
114
+ opts?: RequestOpts,
115
+ ): AsyncResult<Types.JobsDismissDLQOutput, BaseError>;
116
+ get(
117
+ input: Types.JobsGetInput,
118
+ opts?: RequestOpts,
119
+ ): AsyncResult<Types.JobsGetOutput, BaseError>;
120
+ health(
121
+ input: Types.JobsHealthInput,
122
+ opts?: RequestOpts,
123
+ ): AsyncResult<Types.JobsHealthOutput, BaseError>;
124
+ list(
125
+ input: Types.JobsListInput,
126
+ opts?: RequestOpts,
127
+ ): AsyncResult<Types.JobsListOutput, BaseError>;
128
+ listDLQ(
129
+ input: Types.JobsListDLQInput,
130
+ opts?: RequestOpts,
131
+ ): AsyncResult<Types.JobsListDLQOutput, BaseError>;
132
+ listServices(
133
+ input: Types.JobsListServicesInput,
134
+ opts?: RequestOpts,
135
+ ): AsyncResult<Types.JobsListServicesOutput, BaseError>;
136
+ replayDLQ(
137
+ input: Types.JobsReplayDLQInput,
138
+ opts?: RequestOpts,
139
+ ): AsyncResult<Types.JobsReplayDLQOutput, BaseError>;
140
+ retry(
141
+ input: Types.JobsRetryInput,
142
+ opts?: RequestOpts,
143
+ ): AsyncResult<Types.JobsRetryOutput, BaseError>;
48
144
  };
49
145
  readonly trellis: {
50
- catalog(input: CoreSdk.TrellisCatalogInput, opts?: RequestOpts): AsyncResult<CoreSdk.TrellisCatalogOutput, BaseError>;
146
+ catalog(
147
+ input: CoreSdk.TrellisCatalogInput,
148
+ opts?: RequestOpts,
149
+ ): AsyncResult<CoreSdk.TrellisCatalogOutput, BaseError>;
51
150
  };
52
151
  };
53
152
  readonly event: {
54
153
  readonly health: {
55
- heartbeat: { publish(event: Omit<HealthSdk.HealthHeartbeatEvent, "header">): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Omit<HealthSdk.HealthHeartbeatEvent, "header">): Result<PreparedTrellisEvent<Omit<HealthSdk.HealthHeartbeatEvent, "header">>, ValidationError | UnexpectedError>; listen(handler: EventCallback<HealthSdk.HealthHeartbeatEvent>, subjectData?: Record<string, unknown>, opts?: EventOpts): AsyncResult<void, ValidationError | UnexpectedError>; };
154
+ heartbeat: {
155
+ publish(
156
+ event: Omit<HealthSdk.HealthHeartbeatEvent, "header">,
157
+ ): AsyncResult<void, ValidationError | UnexpectedError>;
158
+ prepare(
159
+ event: Omit<HealthSdk.HealthHeartbeatEvent, "header">,
160
+ ): Result<
161
+ PreparedTrellisEvent<Omit<HealthSdk.HealthHeartbeatEvent, "header">>,
162
+ ValidationError | UnexpectedError
163
+ >;
164
+ listen(
165
+ handler: EventCallback<HealthSdk.HealthHeartbeatEvent>,
166
+ subjectData?: Record<string, unknown>,
167
+ opts?: EventOpts,
168
+ ): AsyncResult<void, ValidationError | UnexpectedError>;
169
+ };
56
170
  };
57
171
  };
58
172
  readonly feed: {};
@@ -73,22 +187,79 @@ export type ServiceWithDeps<TDeps> = Omit<TrellisJobsClient, "event"> & {
73
187
 
74
188
  export interface ServiceEventSurface<TDeps> {
75
189
  readonly health: {
76
- heartbeat: { publish(event: Omit<HealthSdk.HealthHeartbeatEvent, "header">): AsyncResult<void, ValidationError | UnexpectedError>; prepare(event: Omit<HealthSdk.HealthHeartbeatEvent, "header">): Result<PreparedTrellisEvent<Omit<HealthSdk.HealthHeartbeatEvent, "header">>, ValidationError | UnexpectedError>; listen(handler: ServiceEventHandler<HealthSdk.HealthHeartbeatEvent, TDeps>, subjectData?: Record<string, unknown>, opts?: EventOpts): AsyncResult<void, ValidationError | UnexpectedError>; };
190
+ heartbeat: {
191
+ publish(
192
+ event: Omit<HealthSdk.HealthHeartbeatEvent, "header">,
193
+ ): AsyncResult<void, ValidationError | UnexpectedError>;
194
+ prepare(
195
+ event: Omit<HealthSdk.HealthHeartbeatEvent, "header">,
196
+ ): Result<
197
+ PreparedTrellisEvent<Omit<HealthSdk.HealthHeartbeatEvent, "header">>,
198
+ ValidationError | UnexpectedError
199
+ >;
200
+ listen(
201
+ handler: ServiceEventHandler<HealthSdk.HealthHeartbeatEvent, TDeps>,
202
+ subjectData?: Record<string, unknown>,
203
+ opts?: EventOpts,
204
+ ): AsyncResult<void, ValidationError | UnexpectedError>;
205
+ };
77
206
  };
78
207
  }
79
208
 
80
209
  export interface ServiceHandle<TDeps = undefined> {
81
210
  readonly rpc: {
82
211
  readonly jobs: {
83
- cancel(handler: RpcHandler<Types.JobsCancelInput, Types.JobsCancelOutput, TDeps>): Promise<void>;
84
- dismissDLQ(handler: RpcHandler<Types.JobsDismissDLQInput, Types.JobsDismissDLQOutput, TDeps>): Promise<void>;
85
- get(handler: RpcHandler<Types.JobsGetInput, Types.JobsGetOutput, TDeps>): Promise<void>;
86
- health(handler: RpcHandler<Types.JobsHealthInput, Types.JobsHealthOutput, TDeps>): Promise<void>;
87
- list(handler: RpcHandler<Types.JobsListInput, Types.JobsListOutput, TDeps>): Promise<void>;
88
- listDLQ(handler: RpcHandler<Types.JobsListDLQInput, Types.JobsListDLQOutput, TDeps>): Promise<void>;
89
- listServices(handler: RpcHandler<Types.JobsListServicesInput, Types.JobsListServicesOutput, TDeps>): Promise<void>;
90
- replayDLQ(handler: RpcHandler<Types.JobsReplayDLQInput, Types.JobsReplayDLQOutput, TDeps>): Promise<void>;
91
- retry(handler: RpcHandler<Types.JobsRetryInput, Types.JobsRetryOutput, TDeps>): Promise<void>;
212
+ cancel(
213
+ handler: RpcHandler<
214
+ Types.JobsCancelInput,
215
+ Types.JobsCancelOutput,
216
+ TDeps
217
+ >,
218
+ ): Promise<void>;
219
+ dismissDLQ(
220
+ handler: RpcHandler<
221
+ Types.JobsDismissDLQInput,
222
+ Types.JobsDismissDLQOutput,
223
+ TDeps
224
+ >,
225
+ ): Promise<void>;
226
+ get(
227
+ handler: RpcHandler<Types.JobsGetInput, Types.JobsGetOutput, TDeps>,
228
+ ): Promise<void>;
229
+ health(
230
+ handler: RpcHandler<
231
+ Types.JobsHealthInput,
232
+ Types.JobsHealthOutput,
233
+ TDeps
234
+ >,
235
+ ): Promise<void>;
236
+ list(
237
+ handler: RpcHandler<Types.JobsListInput, Types.JobsListOutput, TDeps>,
238
+ ): Promise<void>;
239
+ listDLQ(
240
+ handler: RpcHandler<
241
+ Types.JobsListDLQInput,
242
+ Types.JobsListDLQOutput,
243
+ TDeps
244
+ >,
245
+ ): Promise<void>;
246
+ listServices(
247
+ handler: RpcHandler<
248
+ Types.JobsListServicesInput,
249
+ Types.JobsListServicesOutput,
250
+ TDeps
251
+ >,
252
+ ): Promise<void>;
253
+ replayDLQ(
254
+ handler: RpcHandler<
255
+ Types.JobsReplayDLQInput,
256
+ Types.JobsReplayDLQOutput,
257
+ TDeps
258
+ >,
259
+ ): Promise<void>;
260
+ retry(
261
+ handler: RpcHandler<Types.JobsRetryInput, Types.JobsRetryOutput, TDeps>,
262
+ ): Promise<void>;
92
263
  };
93
264
  };
94
265
  readonly feed: {};