@cratis/chronicle 3.1.0 → 3.1.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.
@@ -6,6 +6,7 @@ import { diag } from '@opentelemetry/api';
6
6
  import { SpanStatusCode } from '@opentelemetry/api';
7
7
  import { ChronicleOptions } from './ChronicleOptions';
8
8
  import { ChronicleConnection } from './connection';
9
+ import { ensureCommandSuccess, ensureQuerySuccess, firstQueryResult } from './connection/callResults';
9
10
  import { ConnectionLifecycle } from './connection/ConnectionLifecycle';
10
11
  import { KernelKeepAlive } from './connection/KernelKeepAlive';
11
12
  import { EventStore } from './EventStore';
@@ -131,7 +132,7 @@ export class ChronicleClient implements IChronicleClient {
131
132
  this._logger.debug('Ensuring event store exists in kernel', {
132
133
  eventStore: storeName.value
133
134
  });
134
- await this._connection.eventStores.ensure({ Name: storeName.value });
135
+ ensureCommandSuccess('ensure event store', await this._connection.eventStores.ensureEventStore({ Name: storeName.value }));
135
136
 
136
137
  const created = new EventStore(storeName, namespaceName, this._connection, this._lifecycle, this.options.defaultSinkTypeId);
137
138
  this._stores.set(key, created);
@@ -167,9 +168,9 @@ export class ChronicleClient implements IChronicleClient {
167
168
  try {
168
169
  const response = await this.withReconnect('get_event_stores', async () => {
169
170
  await this.ensureConnected();
170
- return this._connection.eventStores.getEventStores({});
171
+ return firstQueryResult('get event stores', this._connection.eventStores.allEventStores({}));
171
172
  });
172
- const result = (response.items ?? []).map((name: string) => new EventStoreName(name));
173
+ const result = ensureQuerySuccess('get event stores', response).map((name: string) => new EventStoreName(name));
173
174
  this._logger.verbose('Retrieved event stores from kernel', {
174
175
  count: result.length
175
176
  });
package/EventStore.ts CHANGED
@@ -5,6 +5,7 @@ import { diag } from '@opentelemetry/api';
5
5
  import { SpanStatusCode } from '@opentelemetry/api';
6
6
  import { ChronicleConnection } from './connection';
7
7
  import { ConnectionLifecycle } from './connection/ConnectionLifecycle';
8
+ import { ensureQuerySuccess, firstQueryResult } from './connection/callResults';
8
9
  import { EventLog } from './eventSequences/EventLog';
9
10
  import { EventSequence } from './eventSequences/EventSequence';
10
11
  import { EventSequenceId } from './eventSequences/EventSequenceId';
@@ -163,8 +164,8 @@ export class EventStore implements IEventStore {
163
164
  return ChronicleTracer.startActiveSpan('chronicle.event_store.get_namespaces', async span => {
164
165
  span.setAttribute('chronicle.event_store', this.name.value);
165
166
  try {
166
- const response = await this._connection.namespaces.getNamespaces({ EventStore: this.name.value });
167
- const result = (response.items ?? []).map((namespace: string) => new EventStoreNamespaceName(namespace));
167
+ const response = await firstQueryResult('get namespaces', this._connection.namespaces.allNamespaces({ EventStore: this.name.value }));
168
+ const result = ensureQuerySuccess('get namespaces', response).map((namespace: string) => new EventStoreNamespaceName(namespace));
168
169
  span.setStatus({ code: SpanStatusCode.OK });
169
170
  return result;
170
171
  } catch (error) {
package/README.md CHANGED
@@ -1,38 +1,42 @@
1
1
  # Chronicle TypeScript Client
2
2
 
3
- A TypeScript-idiomatic client for [Cratis Chronicle](https://github.com/Cratis/Chronicle) — the open source event-sourcing kernel.
3
+ **Event sourcing for TypeScript and Node.js — the idiomatic client for [Cratis Chronicle](https://github.com/Cratis/Chronicle).**
4
+
5
+ [![npm](https://img.shields.io/npm/v/@cratis/chronicle?label=npm&logo=npm)](https://www.npmjs.com/package/@cratis/chronicle)
6
+ [![Build](https://github.com/Cratis/Chronicle.TypeScript/actions/workflows/build.yml/badge.svg)](https://github.com/Cratis/Chronicle.TypeScript/actions/workflows/build.yml)
7
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Cratis/Chronicle.TypeScript/blob/main/LICENSE)
8
+ [![Discord](https://img.shields.io/discord/1182595891576717413?label=Discord&logo=discord&logoColor=white)](https://discord.gg/kt4AMpV8WV)
9
+
10
+ Chronicle is an event-sourcing database and processing runtime with a first-class .NET SDK and additional TypeScript, Kotlin/Java (JVM), and Elixir clients — with a Python client coming soon — plus pluggable storage-provider implementations including MongoDB (default), PostgreSQL, SQL Server, and SQLite. This package is the **TypeScript client**.
4
11
 
5
12
  ## Overview
6
13
 
7
14
  `@cratis/chronicle` provides a clean, type-safe TypeScript API for interacting with the Chronicle Kernel. It builds on top of [`@cratis/chronicle.contracts`](https://www.npmjs.com/package/@cratis/chronicle.contracts) (the gRPC contracts package) and exposes idiomatic TypeScript constructs including:
8
15
 
9
- - **Decorators** — `@eventType`, `@eventTypeMigration`, `@readModel`, `@reactor`, `@reducer`, `@constraint`, `@projection`, and model-bound decorators such as `@fromEvent`
16
+ - **Decorators** — `@eventType`, `@eventTypeMigration`, `@readModel`, `@reactor`, `@reducer`, `@seeder`, `@constraint`, `@projection`, and model-bound decorators such as `@fromEvent`
10
17
  - **Value objects** — `EventSequenceNumber`, `EventTypeId`, `EventStoreName`, etc.
11
18
  - **Fluent client** — `ChronicleClient` → `EventStore` → `EventLog` → `append()`
12
19
 
13
- ## Structure
20
+ Beyond appending and observing events, the client covers the full Chronicle surface:
14
21
 
15
- ```
16
- Source/ ← @cratis/chronicle TypeScript library
17
- Documentation/ ← User-facing documentation
18
- Samples/
19
- Console/ ← Plain Node.js console sample application
20
- ```
22
+ - **Transactions** — group appends into a unit of work with a single commit
23
+ - **Jobs** inspect and control long-running kernel jobs
24
+ - **Webhooks** — push events to HTTP endpoints
25
+ - **Compliance / PII** — classify event data and handle personally identifiable information
26
+ - **OpenTelemetry** built-in metrics and tracing instrumentation
21
27
 
22
- ## Prerequisite: Chronicle Running
28
+ ## Installation
23
29
 
24
- You need a Chronicle Kernel available before running samples or application code.
30
+ ```bash
31
+ npm install @cratis/chronicle reflect-metadata
32
+ ```
25
33
 
26
- The easiest local setup is the development Docker image:
34
+ You need a Chronicle Kernel available. The easiest local setup is the development Docker image:
27
35
 
28
36
  ```bash
29
37
  docker run -p 35000:35000 cratis/chronicle:latest-development
30
38
  ```
31
39
 
32
- ## Getting Started
33
-
34
- See [Documentation/getting-started.md](./Documentation/getting-started.md) for installation and usage instructions.
35
-
36
40
  ## Quick Example
37
41
 
38
42
  ```typescript
@@ -51,19 +55,27 @@ console.log(`Appended at sequence number ${result.sequenceNumber.value}`);
51
55
  client.dispose();
52
56
  ```
53
57
 
54
- ## Building
58
+ ## Documentation
55
59
 
56
- ```bash
57
- yarn install
58
- yarn workspace @cratis/chronicle compile
59
- ```
60
+ See the [getting started guide](https://github.com/Cratis/Chronicle.TypeScript/blob/main/Documentation/getting-started.md) and the rest of the [documentation](https://github.com/Cratis/Chronicle.TypeScript/tree/main/Documentation) for installation and usage instructions, or visit [cratis.io](https://www.cratis.io/chronicle/).
60
61
 
61
- ## Running the Console Sample
62
+ ## The Cratis ecosystem
62
63
 
63
- ```bash
64
- yarn install
65
- yarn workspace @cratis/chronicle-test-console build
66
- yarn workspace @cratis/chronicle-test-console start
67
- ```
64
+ This package is part of [Cratis](https://www.cratis.io) — free, MIT-licensed tools for building event-sourced and CQRS applications.
65
+
66
+ - **[Chronicle](https://github.com/Cratis/Chronicle)** — event-sourcing database and runtime. Orleans-based kernel, pluggable storage (MongoDB default; PostgreSQL, SQL Server, SQLite, in-memory), language-agnostic gRPC contracts. [Docs](https://www.cratis.io/chronicle/)
67
+ - **Chronicle clients** — first-class [.NET SDK](https://github.com/Cratis/Chronicle), plus [TypeScript](https://github.com/Cratis/Chronicle.TypeScript), [Kotlin/Java](https://github.com/Cratis/Chronicle.Kotlin), and [Elixir](https://github.com/Cratis/Chronicle.Elixir); [Python](https://github.com/Cratis/Chronicle.Python) coming soon (pre-alpha). AI agents connect through the [Chronicle MCP server](https://github.com/Cratis/Chronicle.Mcp).
68
+ - **[Arc](https://github.com/Cratis/Arc)** — opinionated CQRS framework for ASP.NET Core with commands, queries, validation, authorization, and TypeScript proxy generation. Works without event sourcing. [Docs](https://www.cratis.io/arc/)
69
+ - **[Components](https://github.com/Cratis/Components)** — React components aligned with Arc patterns. [Docs](https://www.cratis.io/components/)
70
+ - **[CLI](https://github.com/Cratis/cli) + Workbench** — inspect and diagnose Chronicle from the terminal or the browser. [Docs](https://www.cratis.io/cli/)
71
+ - **[Samples](https://github.com/Cratis/Samples)** — runnable event sourcing and CQRS samples for the whole stack
72
+
73
+ Everything Cratis publishes today is MIT licensed and free to use.
74
+
75
+ ---
76
+
77
+ <div align="center">
78
+
79
+ *Part of the [Cratis](https://www.cratis.io) platform · Licensed under the [MIT license](https://github.com/Cratis/Chronicle.TypeScript/blob/main/LICENSE)*
68
80
 
69
- Set the `CHRONICLE_CONNECTION` environment variable to override the default connection string (`chronicle://localhost:35000`).
81
+ </div>
@@ -0,0 +1,90 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { describe, expect, it } from 'vitest';
5
+ import { ChronicleCallFailed, ensureCommandSuccess, ensureQuerySuccess, firstQueryResult, isCallSuccess } from './callResults';
6
+
7
+ const successfulResult = {
8
+ ValidationResults: [],
9
+ ExceptionMessages: [],
10
+ AuthorizationFailureReason: ''
11
+ };
12
+
13
+ describe('callResults', () => {
14
+ describe('when checking a successful result', () => {
15
+ it('should report success', () => {
16
+ expect(isCallSuccess(successfulResult)).toBe(true);
17
+ });
18
+ });
19
+
20
+ describe('when checking a result with an authorization failure reason', () => {
21
+ it('should report failure', () => {
22
+ expect(isCallSuccess({ ...successfulResult, AuthorizationFailureReason: 'no access' })).toBe(false);
23
+ });
24
+ });
25
+
26
+ describe('when checking a result with validation results', () => {
27
+ it('should report failure', () => {
28
+ expect(isCallSuccess({ ...successfulResult, ValidationResults: [{ Message: 'invalid', Members: [] }] })).toBe(false);
29
+ });
30
+ });
31
+
32
+ describe('when checking a result with exception messages', () => {
33
+ it('should report failure', () => {
34
+ expect(isCallSuccess({ ...successfulResult, ExceptionMessages: ['boom'] })).toBe(false);
35
+ });
36
+ });
37
+
38
+ describe('when ensuring a successful command', () => {
39
+ it('should not throw', () => {
40
+ expect(() => ensureCommandSuccess('operation', successfulResult)).not.toThrow();
41
+ });
42
+ });
43
+
44
+ describe('when ensuring a failed command', () => {
45
+ it('should throw with the failure reasons', () => {
46
+ expect(() => ensureCommandSuccess('operation', { ...successfulResult, ExceptionMessages: ['boom'] }))
47
+ .toThrow(ChronicleCallFailed);
48
+ expect(() => ensureCommandSuccess('operation', { ...successfulResult, ExceptionMessages: ['boom'] }))
49
+ .toThrow(/operation.*boom/);
50
+ });
51
+ });
52
+
53
+ describe('when ensuring a successful query', () => {
54
+ it('should return the data', () => {
55
+ expect(ensureQuerySuccess('operation', { ...successfulResult, Data: ['a', 'b'] })).toEqual(['a', 'b']);
56
+ });
57
+ });
58
+
59
+ describe('when ensuring a failed query', () => {
60
+ it('should throw with the failure reasons', () => {
61
+ expect(() => ensureQuerySuccess('operation', { ...successfulResult, AuthorizationFailureReason: 'no access', Data: [] }))
62
+ .toThrow(/no access/);
63
+ });
64
+ });
65
+
66
+ describe('when taking the first result from a stream', () => {
67
+ it('should return the first item and cancel the stream', async () => {
68
+ let cleanedUp = false;
69
+ async function* stream() {
70
+ try {
71
+ yield 'first';
72
+ yield 'second';
73
+ } finally {
74
+ cleanedUp = true;
75
+ }
76
+ }
77
+
78
+ const result = await firstQueryResult('operation', stream());
79
+ expect(result).toBe('first');
80
+ expect(cleanedUp).toBe(true);
81
+ });
82
+ });
83
+
84
+ describe('when taking the first result from an empty stream', () => {
85
+ it('should throw', async () => {
86
+ async function* stream() { /* produces nothing */ }
87
+ await expect(firstQueryResult('operation', stream())).rejects.toThrow(/completed without producing a result/);
88
+ });
89
+ });
90
+ });
@@ -0,0 +1,112 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ /**
5
+ * Shape of a validation result carried by Chronicle command and query results.
6
+ */
7
+ export interface CallValidationResult {
8
+ Message: string;
9
+ Members: string[];
10
+ }
11
+
12
+ /**
13
+ * Structural shape shared by every Chronicle command and query result envelope.
14
+ *
15
+ * The envelopes also carry an `IsAuthorized` boolean, but it is deliberately not part of
16
+ * this shape: the kernel declares it with a protobuf-net default of `true`, which means
17
+ * the field is omitted from the wire whenever it is true. A proto3 client decodes that
18
+ * absence as `false`, so the boolean always reads as `false` and carries no signal.
19
+ * Authorization failures are reported through `AuthorizationFailureReason` and gRPC
20
+ * status codes instead.
21
+ */
22
+ export interface CallResultLike {
23
+ ValidationResults: CallValidationResult[];
24
+ ExceptionMessages: string[];
25
+ AuthorizationFailureReason?: string;
26
+ }
27
+
28
+ /**
29
+ * Structural shape shared by every Chronicle query result envelope.
30
+ */
31
+ export interface QueryResultLike<TData> extends CallResultLike {
32
+ Data: TData;
33
+ }
34
+
35
+ /**
36
+ * Error thrown when a Chronicle command or query did not succeed.
37
+ */
38
+ export class ChronicleCallFailed extends Error {
39
+ /**
40
+ * Creates a new {@link ChronicleCallFailed}.
41
+ * @param operation - The operation that failed.
42
+ * @param result - The result envelope returned by the kernel.
43
+ */
44
+ constructor(operation: string, result: CallResultLike) {
45
+ const reasons: string[] = [];
46
+ if (result.AuthorizationFailureReason) {
47
+ reasons.push(result.AuthorizationFailureReason);
48
+ }
49
+ for (const validationResult of result.ValidationResults ?? []) {
50
+ reasons.push(validationResult.Message);
51
+ }
52
+ for (const exceptionMessage of result.ExceptionMessages ?? []) {
53
+ reasons.push(exceptionMessage);
54
+ }
55
+
56
+ super(`Chronicle operation '${operation}' failed: ${reasons.join(', ') || 'unknown reason'}`);
57
+ this.name = 'ChronicleCallFailed';
58
+ }
59
+ }
60
+
61
+ /**
62
+ * Determines whether a Chronicle result envelope represents success: no authorization
63
+ * failure reason, no validation results, and no exceptions.
64
+ * @param result - The result envelope to check.
65
+ * @returns True when the call succeeded, false otherwise.
66
+ */
67
+ export function isCallSuccess(result: CallResultLike): boolean {
68
+ return !result.AuthorizationFailureReason &&
69
+ (result.ValidationResults ?? []).length === 0 &&
70
+ (result.ExceptionMessages ?? []).length === 0;
71
+ }
72
+
73
+ /**
74
+ * Ensures a Chronicle command executed successfully, throwing when it did not.
75
+ * @param operation - The operation the result belongs to, used for error reporting.
76
+ * @param result - The command result envelope returned by the kernel.
77
+ */
78
+ export function ensureCommandSuccess(operation: string, result: CallResultLike): void {
79
+ if (!isCallSuccess(result)) {
80
+ throw new ChronicleCallFailed(operation, result);
81
+ }
82
+ }
83
+
84
+ /**
85
+ * Ensures a Chronicle query executed successfully, returning its data or throwing when it did not.
86
+ * @param operation - The operation the result belongs to, used for error reporting.
87
+ * @param result - The query result envelope returned by the kernel.
88
+ * @returns The data produced by the query.
89
+ */
90
+ export function ensureQuerySuccess<TData>(operation: string, result: QueryResultLike<TData>): TData {
91
+ if (!isCallSuccess(result)) {
92
+ throw new ChronicleCallFailed(operation, result);
93
+ }
94
+
95
+ return result.Data;
96
+ }
97
+
98
+ /**
99
+ * Takes the first result from a server-streaming Chronicle query and cancels the stream.
100
+ * Chronicle streams queries so they can also be observed; one-shot callers only need the
101
+ * first snapshot.
102
+ * @param operation - The operation the stream belongs to, used for error reporting.
103
+ * @param stream - The server-streaming query response.
104
+ * @returns The first result produced by the stream.
105
+ */
106
+ export async function firstQueryResult<TResult>(operation: string, stream: AsyncIterable<TResult>): Promise<TResult> {
107
+ for await (const result of stream) {
108
+ return result;
109
+ }
110
+
111
+ throw new Error(`Chronicle operation '${operation}' completed without producing a result.`);
112
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"ChronicleClient.d.ts","sourceRoot":"","sources":["../ChronicleClient.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5C;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAgB,YAAW,gBAAgB;IAwBxC,QAAQ,CAAC,OAAO,EAAE,gBAAgB;IAvB9C,OAA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CAAC,cAAc;IAQtB,OAAO,CAAC,uBAAuB;YAQjB,cAAc;YAkBd,oBAAoB;YAqCpB,yBAAyB;CAmB1C"}
@@ -4,6 +4,7 @@ import * as os from 'os';
4
4
  import { diag } from '@opentelemetry/api';
5
5
  import { SpanStatusCode } from '@opentelemetry/api';
6
6
  import { ChronicleConnection } from './connection';
7
+ import { ensureCommandSuccess, ensureQuerySuccess, firstQueryResult } from './connection/callResults';
7
8
  import { ConnectionLifecycle } from './connection/ConnectionLifecycle';
8
9
  import { KernelKeepAlive } from './connection/KernelKeepAlive';
9
10
  import { EventStore } from './EventStore';
@@ -113,7 +114,7 @@ export class ChronicleClient {
113
114
  this._logger.debug('Ensuring event store exists in kernel', {
114
115
  eventStore: storeName.value
115
116
  });
116
- await this._connection.eventStores.ensure({ Name: storeName.value });
117
+ ensureCommandSuccess('ensure event store', await this._connection.eventStores.ensureEventStore({ Name: storeName.value }));
117
118
  const created = new EventStore(storeName, namespaceName, this._connection, this._lifecycle, this.options.defaultSinkTypeId);
118
119
  this._stores.set(key, created);
119
120
  await this.registerArtifactsForStore(created, 'new-store');
@@ -147,9 +148,9 @@ export class ChronicleClient {
147
148
  try {
148
149
  const response = await this.withReconnect('get_event_stores', async () => {
149
150
  await this.ensureConnected();
150
- return this._connection.eventStores.getEventStores({});
151
+ return firstQueryResult('get event stores', this._connection.eventStores.allEventStores({}));
151
152
  });
152
- const result = (response.items ?? []).map((name) => new EventStoreName(name));
153
+ const result = ensureQuerySuccess('get event stores', response).map((name) => new EventStoreName(name));
153
154
  this._logger.verbose('Retrieved event stores from kernel', {
154
155
  count: result.length
155
156
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ChronicleClient.js","sourceRoot":"","sources":["../ChronicleClient.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EA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;IACrB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,wBAAwB,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;IAE7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0C;gBAGxD,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,uBAAuB,EAC1B,WAAW,EAAE,mBAAmB,EACjD,SAAS,EAAE,mBAAmB,EAC9B,iBAAiB,EAAE,MAAM;IAwB7B;;;;OAIG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAsCxC,kBAAkB;IAClB,gBAAgB,CAAC,EAAE,EAAE,eAAe,GAAG,cAAc;IAWrD,kBAAkB;IACZ,aAAa,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;CAiB5D"}
@@ -2,6 +2,7 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
  import { diag } from '@opentelemetry/api';
4
4
  import { SpanStatusCode } from '@opentelemetry/api';
5
+ import { ensureQuerySuccess, firstQueryResult } from './connection/callResults';
5
6
  import { EventLog } from './eventSequences/EventLog';
6
7
  import { EventSequence } from './eventSequences/EventSequence';
7
8
  import { EventSequenceId } from './eventSequences/EventSequenceId';
@@ -126,8 +127,8 @@ export class EventStore {
126
127
  return ChronicleTracer.startActiveSpan('chronicle.event_store.get_namespaces', async (span) => {
127
128
  span.setAttribute('chronicle.event_store', this.name.value);
128
129
  try {
129
- const response = await this._connection.namespaces.getNamespaces({ EventStore: this.name.value });
130
- const result = (response.items ?? []).map((namespace) => new EventStoreNamespaceName(namespace));
130
+ const response = await firstQueryResult('get namespaces', this._connection.namespaces.allNamespaces({ EventStore: this.name.value }));
131
+ const result = ensureQuerySuccess('get namespaces', response).map((namespace) => new EventStoreNamespaceName(namespace));
131
132
  span.setStatus({ code: SpanStatusCode.OK });
132
133
  return result;
133
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EventStore.js","sourceRoot":"","sources":["../EventStore.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAInE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAE5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAm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C,SAAS,CAAC,CAAC,CAAC;gBACjI,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC5C,OAAO,MAAM,CAAC;YAClB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACvE,IAAI,CAAC,eAAe,CAAC,KAAc,CAAC,CAAC;gBACrC,MAAM,KAAK,CAAC;YAChB,CAAC;oBAAS,CAAC;gBACP,IAAI,CAAC,GAAG,EAAE,CAAC;YACf,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Shape of a validation result carried by Chronicle command and query results.
3
+ */
4
+ export interface CallValidationResult {
5
+ Message: string;
6
+ Members: string[];
7
+ }
8
+ /**
9
+ * Structural shape shared by every Chronicle command and query result envelope.
10
+ *
11
+ * The envelopes also carry an `IsAuthorized` boolean, but it is deliberately not part of
12
+ * this shape: the kernel declares it with a protobuf-net default of `true`, which means
13
+ * the field is omitted from the wire whenever it is true. A proto3 client decodes that
14
+ * absence as `false`, so the boolean always reads as `false` and carries no signal.
15
+ * Authorization failures are reported through `AuthorizationFailureReason` and gRPC
16
+ * status codes instead.
17
+ */
18
+ export interface CallResultLike {
19
+ ValidationResults: CallValidationResult[];
20
+ ExceptionMessages: string[];
21
+ AuthorizationFailureReason?: string;
22
+ }
23
+ /**
24
+ * Structural shape shared by every Chronicle query result envelope.
25
+ */
26
+ export interface QueryResultLike<TData> extends CallResultLike {
27
+ Data: TData;
28
+ }
29
+ /**
30
+ * Error thrown when a Chronicle command or query did not succeed.
31
+ */
32
+ export declare class ChronicleCallFailed extends Error {
33
+ /**
34
+ * Creates a new {@link ChronicleCallFailed}.
35
+ * @param operation - The operation that failed.
36
+ * @param result - The result envelope returned by the kernel.
37
+ */
38
+ constructor(operation: string, result: CallResultLike);
39
+ }
40
+ /**
41
+ * Determines whether a Chronicle result envelope represents success: no authorization
42
+ * failure reason, no validation results, and no exceptions.
43
+ * @param result - The result envelope to check.
44
+ * @returns True when the call succeeded, false otherwise.
45
+ */
46
+ export declare function isCallSuccess(result: CallResultLike): boolean;
47
+ /**
48
+ * Ensures a Chronicle command executed successfully, throwing when it did not.
49
+ * @param operation - The operation the result belongs to, used for error reporting.
50
+ * @param result - The command result envelope returned by the kernel.
51
+ */
52
+ export declare function ensureCommandSuccess(operation: string, result: CallResultLike): void;
53
+ /**
54
+ * Ensures a Chronicle query executed successfully, returning its data or throwing when it did not.
55
+ * @param operation - The operation the result belongs to, used for error reporting.
56
+ * @param result - The query result envelope returned by the kernel.
57
+ * @returns The data produced by the query.
58
+ */
59
+ export declare function ensureQuerySuccess<TData>(operation: string, result: QueryResultLike<TData>): TData;
60
+ /**
61
+ * Takes the first result from a server-streaming Chronicle query and cancels the stream.
62
+ * Chronicle streams queries so they can also be observed; one-shot callers only need the
63
+ * first snapshot.
64
+ * @param operation - The operation the stream belongs to, used for error reporting.
65
+ * @param stream - The server-streaming query response.
66
+ * @returns The first result produced by the stream.
67
+ */
68
+ export declare function firstQueryResult<TResult>(operation: string, stream: AsyncIterable<TResult>): Promise<TResult>;
69
+ //# sourceMappingURL=callResults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callResults.d.ts","sourceRoot":"","sources":["../../connection/callResults.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC3B,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;IAC1C,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,KAAK,CAAE,SAAQ,cAAc;IAC1D,IAAI,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC1C;;;;OAIG;gBACS,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc;CAexD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAI7D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAIpF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG,KAAK,CAMlG;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAMnH"}
@@ -0,0 +1,74 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /**
4
+ * Error thrown when a Chronicle command or query did not succeed.
5
+ */
6
+ export class ChronicleCallFailed extends Error {
7
+ /**
8
+ * Creates a new {@link ChronicleCallFailed}.
9
+ * @param operation - The operation that failed.
10
+ * @param result - The result envelope returned by the kernel.
11
+ */
12
+ constructor(operation, result) {
13
+ const reasons = [];
14
+ if (result.AuthorizationFailureReason) {
15
+ reasons.push(result.AuthorizationFailureReason);
16
+ }
17
+ for (const validationResult of result.ValidationResults ?? []) {
18
+ reasons.push(validationResult.Message);
19
+ }
20
+ for (const exceptionMessage of result.ExceptionMessages ?? []) {
21
+ reasons.push(exceptionMessage);
22
+ }
23
+ super(`Chronicle operation '${operation}' failed: ${reasons.join(', ') || 'unknown reason'}`);
24
+ this.name = 'ChronicleCallFailed';
25
+ }
26
+ }
27
+ /**
28
+ * Determines whether a Chronicle result envelope represents success: no authorization
29
+ * failure reason, no validation results, and no exceptions.
30
+ * @param result - The result envelope to check.
31
+ * @returns True when the call succeeded, false otherwise.
32
+ */
33
+ export function isCallSuccess(result) {
34
+ return !result.AuthorizationFailureReason &&
35
+ (result.ValidationResults ?? []).length === 0 &&
36
+ (result.ExceptionMessages ?? []).length === 0;
37
+ }
38
+ /**
39
+ * Ensures a Chronicle command executed successfully, throwing when it did not.
40
+ * @param operation - The operation the result belongs to, used for error reporting.
41
+ * @param result - The command result envelope returned by the kernel.
42
+ */
43
+ export function ensureCommandSuccess(operation, result) {
44
+ if (!isCallSuccess(result)) {
45
+ throw new ChronicleCallFailed(operation, result);
46
+ }
47
+ }
48
+ /**
49
+ * Ensures a Chronicle query executed successfully, returning its data or throwing when it did not.
50
+ * @param operation - The operation the result belongs to, used for error reporting.
51
+ * @param result - The query result envelope returned by the kernel.
52
+ * @returns The data produced by the query.
53
+ */
54
+ export function ensureQuerySuccess(operation, result) {
55
+ if (!isCallSuccess(result)) {
56
+ throw new ChronicleCallFailed(operation, result);
57
+ }
58
+ return result.Data;
59
+ }
60
+ /**
61
+ * Takes the first result from a server-streaming Chronicle query and cancels the stream.
62
+ * Chronicle streams queries so they can also be observed; one-shot callers only need the
63
+ * first snapshot.
64
+ * @param operation - The operation the stream belongs to, used for error reporting.
65
+ * @param stream - The server-streaming query response.
66
+ * @returns The first result produced by the stream.
67
+ */
68
+ export async function firstQueryResult(operation, stream) {
69
+ for await (const result of stream) {
70
+ return result;
71
+ }
72
+ throw new Error(`Chronicle operation '${operation}' completed without producing a result.`);
73
+ }
74
+ //# sourceMappingURL=callResults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callResults.js","sourceRoot":"","sources":["../../connection/callResults.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAiCrG;;GAEG;AACH,MAAM,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F,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,mBAAmB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC;AACvB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAU,SAAiB,EAAE,MAA8B;IAC7F,IAAI,KAAK,EAAE,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,wBAAwB,SAAS,yCAAyC,CAAC,CAAC;AAChG,CAAC"}
@@ -51,7 +51,7 @@ export class Constraints {
51
51
  return {
52
52
  Name: capture.name,
53
53
  Type: ConstraintType.Unique,
54
- RemovedWith: uc.removedWithEventTypeId ?? '',
54
+ RemovedWith: uc.removedWithEventTypeId ? [uc.removedWithEventTypeId] : [],
55
55
  Definition: {
56
56
  Value0: {
57
57
  EventDefinitions: uc.eventDefinitions.map(ed => ({
@@ -70,7 +70,7 @@ export class Constraints {
70
70
  return {
71
71
  Name: uet.name ?? capture.name,
72
72
  Type: ConstraintType.UniqueEventType,
73
- RemovedWith: '',
73
+ RemovedWith: [],
74
74
  Definition: {
75
75
  Value0: undefined,
76
76
  Value1: {
@@ -83,7 +83,7 @@ export class Constraints {
83
83
  return {
84
84
  Name: capture.name,
85
85
  Type: ConstraintType.Unknown,
86
- RemovedWith: '',
86
+ RemovedWith: [],
87
87
  Definition: undefined,
88
88
  Scope: scope
89
89
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Constraints.js","sourceRoot":"","sources":["../../../events/constraints/Constraints.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAM7D,OAAO,EAAE,iBAAiB,EAAqB,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,qBA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xC,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,WAAW,EAAE,WAAW;SAC3B,CAAC,CAAC;IACP,CAAC;IAED,kBAAkB;IAClB,MAAM,CAAC,EAAgB;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;CACJ"}
@@ -1,5 +1,5 @@
1
1
  import { Guid } from '@cratis/fundamentals';
2
- import type { Job, JobStep } from '@cratis/chronicle.contracts';
2
+ import type { JobSummaryResponse, JobStepSummaryResponse } from '@cratis/chronicle.contracts';
3
3
  import { JobId } from './JobId';
4
4
  /**
5
5
  * Defines the API for working with jobs in Chronicle.
@@ -25,17 +25,17 @@ export interface IJobs {
25
25
  * @param jobId - The job identifier.
26
26
  * @returns The job, or undefined when not found.
27
27
  */
28
- getJob(jobId: JobId | Guid | string): Promise<Job | undefined>;
28
+ getJob(jobId: JobId | Guid | string): Promise<JobSummaryResponse | undefined>;
29
29
  /**
30
30
  * Gets all jobs for the event store namespace.
31
31
  * @returns All jobs.
32
32
  */
33
- getJobs(): Promise<Job[]>;
33
+ getJobs(): Promise<JobSummaryResponse[]>;
34
34
  /**
35
35
  * Gets all steps for a specific job.
36
36
  * @param jobId - The job identifier.
37
37
  * @returns The job steps.
38
38
  */
39
- getJobSteps(jobId: JobId | Guid | string): Promise<JobStep[]>;
39
+ getJobSteps(jobId: JobId | Guid | string): Promise<JobStepSummaryResponse[]>;
40
40
  }
41
41
  //# sourceMappingURL=IJobs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IJobs.d.ts","sourceRoot":"","sources":["../../jobs/IJobs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;GAEG;AACH,MAAM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AAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAC;IAE9E;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAEzC;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAC;CAChF"}
@@ -1,4 +1,4 @@
1
- import type { Job, JobStep } from '@cratis/chronicle.contracts';
1
+ import type { JobSummaryResponse, JobStepSummaryResponse } from '@cratis/chronicle.contracts';
2
2
  import { Guid } from '@cratis/fundamentals';
3
3
  import { ChronicleConnection } from '../connection';
4
4
  import { IJobs } from './IJobs';
@@ -24,11 +24,11 @@ export declare class Jobs implements IJobs {
24
24
  /** @inheritdoc */
25
25
  delete(jobId: JobId | Guid | string): Promise<void>;
26
26
  /** @inheritdoc */
27
- getJob(jobId: JobId | Guid | string): Promise<Job | undefined>;
27
+ getJob(jobId: JobId | Guid | string): Promise<JobSummaryResponse | undefined>;
28
28
  /** @inheritdoc */
29
- getJobs(): Promise<Job[]>;
29
+ getJobs(): Promise<JobSummaryResponse[]>;
30
30
  /** @inheritdoc */
31
- getJobSteps(jobId: JobId | Guid | string): Promise<JobStep[]>;
31
+ getJobSteps(jobId: JobId | Guid | string): Promise<JobStepSummaryResponse[]>;
32
32
  private createJobRequest;
33
33
  private normalizeJobId;
34
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Jobs.d.ts","sourceRoot":"","sources":["../../jobs/Jobs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,E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AAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;GAEG;AACH,qBAAa,IAAK,YAAW,KAAK;IAQ1B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAThC;;;;;OAKG;gBAEkB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,mBAAmB;IAGrD,kBAAkB;IACZ,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvD,kBAAkB;IACZ,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,kBAAkB;IACZ,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,kBAAkB;IACZ,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAMnF,kBAAkB;IACZ,OAAO,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAS9C,kBAAkB;IACZ,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;IAKlF,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,cAAc;CASzB"}
package/dist/jobs/Jobs.js CHANGED
@@ -1,7 +1,8 @@
1
1
  // Copyright (c) Cratis. All rights reserved.
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
  import { Guid } from '@cratis/fundamentals';
4
- import { toContractsGuid } from '../connection/Guid';
4
+ import { ensureCommandSuccess, ensureQuerySuccess, firstQueryResult } from '../connection/callResults';
5
+ import { fromContractsGuid, toContractsGuid } from '../connection/Guid';
5
6
  import { JobId } from './JobId';
6
7
  /**
7
8
  * Implements {@link IJobs}.
@@ -23,33 +24,34 @@ export class Jobs {
23
24
  }
24
25
  /** @inheritdoc */
25
26
  async stop(jobId) {
26
- await this._connection.jobs.stop(this.createJobRequest(jobId));
27
+ ensureCommandSuccess('stop job', await this._connection.jobs.stopJob(this.createJobRequest(jobId)));
27
28
  }
28
29
  /** @inheritdoc */
29
30
  async resume(jobId) {
30
- await this._connection.jobs.resume(this.createJobRequest(jobId));
31
+ ensureCommandSuccess('resume job', await this._connection.jobs.resumeJob(this.createJobRequest(jobId)));
31
32
  }
32
33
  /** @inheritdoc */
33
34
  async delete(jobId) {
34
- await this._connection.jobs.delete(this.createJobRequest(jobId));
35
+ ensureCommandSuccess('delete job', await this._connection.jobs.deleteJob(this.createJobRequest(jobId)));
35
36
  }
36
37
  /** @inheritdoc */
37
38
  async getJob(jobId) {
38
- const result = await this._connection.jobs.getJob(this.createJobRequest(jobId));
39
- return result.Value0;
39
+ const target = this.normalizeJobId(jobId).toString();
40
+ const jobs = await this.getJobs();
41
+ return jobs.find(job => fromContractsGuid(job.Id).toString() === target);
40
42
  }
41
43
  /** @inheritdoc */
42
44
  async getJobs() {
43
- const response = await this._connection.jobs.getJobs({
45
+ const response = await firstQueryResult('get jobs', this._connection.jobs.allJobs({
44
46
  EventStore: this._eventStore,
45
47
  Namespace: this._namespace
46
- });
47
- return response.items ?? [];
48
+ }));
49
+ return ensureQuerySuccess('get jobs', response);
48
50
  }
49
51
  /** @inheritdoc */
50
52
  async getJobSteps(jobId) {
51
53
  const response = await this._connection.jobs.getJobSteps(this.createJobRequest(jobId));
52
- return response.items ?? [];
54
+ return ensureQuerySuccess('get job steps', response);
53
55
  }
54
56
  createJobR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reName.ts","../EventStoreNamespaceName.ts","../IChronicleClient.ts","../IEventStore.ts","../Metrics.ts","../Tracing.ts","../index.ts","../artifacts/DefaultClientArtifactsProvider.ts","../artifacts/IClientArtifactsProvider.ts","../artifacts/index.ts","../auditing/Causation.ts","../auditing/CausationManager.ts","../auditing/CausationType.ts","../auditing/ICausationManager.ts","../auditing/index.ts","../compliance/ComplianceContracts.ts","../compliance/ComplianceMetadata.ts","../compliance/ComplianceMetadataResolver.ts","../compliance/ComplianceMetadataType.ts","../compliance/IPIIManager.ts","../compliance/PIIManager.ts","../compliance/index.ts","../compliance/pii.ts","../connection/ChronicleConnection.ts","../connection/ChronicleConnectionString.ts","../connection/ChronicleServerAddressResolver.ts","../connection/ChronicleServices.ts","../connection/ChronicleSrvResolutionError.ts","../connection/ChronicleSrvResolver.ts","../connection/ConnectionLifecycle.ts","../connection/DateTimeOffset.ts","../connection/Guid.ts","../connection/ILoadBalancerStrategy.ts","../connection/KernelKeepAlive.ts","../connection/LeastConnectionsLoadBalancerStrategy.ts","../connection/LoadBalancerMode.ts","../connection/LoadBalancerStrategyFactory.ts","../connection/RandomLoadBalancerStrategy.ts","../connection/RoundRobinLoadBalancerStrategy.ts","../connection/TokenProvider.ts","../connection/fetchOAuthAccessToken.ts","../connection/formatServerAddress.ts","../connection/index.ts","../correlation/CorrelationId.ts","../correlation/CorrelationIdManager.ts","../correlation/ICorrelationIdAccessor.ts","../correlation/ICorrelationIdSetter.ts","../correlation/index.ts","../eventSequences/AppendError.ts","../eventSequences/AppendOperationsBroadcaster.ts","../eventSequences/AppendOptions.ts","../eventSequences/AppendResult.ts","../eventSequences/AppendedEventWithResult.ts","../eventSequences/CompleteStreamError.ts","../eventSequences/CompleteStreamResult.ts","../eventSequences/ConcurrencyScope.ts","../eventSequences/ConcurrencyViolation.ts","../eventSequences/ConstraintViolation.ts","../eventSequences/EventForEventSourceId.ts","../eventSequences/EventLog.ts","../eventSequences/EventSequence.ts","../eventSequences/EventSequenceId.ts","../eventSequences/EventSequenceNumber.ts","../eventSequences/IEventLog.ts","../eventSequences/IEventSequence.ts","../eventSequences/ITransactionalEventSequence.ts","../eventSequences/TransactionalEventSequence.ts","../eventSequences/WaitForCompletionResult.ts","../eventSequences/index.ts","../eventStoreSubscriptions/EventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/EventStoreSubscriptionDefinition.ts","../eventStoreSubscriptions/EventStoreSubscriptionId.ts","../eventStoreSubscriptions/EventStoreSubscriptions.ts","../eventStoreSubscriptions/IEventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/IEventStoreSubscriptions.ts","../eventStoreSubscriptions/contracts.ts","../eventStoreSubscriptions/index.ts","../events/AppendedEvent.ts","../events/CausationEntry.ts","../events/EventContext.ts","../events/EventType.ts","../events/EventTypeGeneration.ts","../events/EventTypeId.ts","../events/EventTypes.ts","../events/IEventTypes.ts","../events/eventTypeDecorator.ts","../events/index.ts","../events/constraints/ConstraintBuilder.ts","../events/constraints/ConstraintId.ts","../events/constraints/Constraints.ts","../events/constraints/IConstraint.ts","../events/constraints/IConstraintBuilder.ts","../events/constraints/IConstraints.ts","../events/constraints/IUniqueConstraintBuilder.ts","../events/constraints/UniqueConstraintBuilder.ts","../events/constraints/constraint.ts","../events/constraints/index.ts","../events/migrations/EventMigrationBuilder.ts","../events/migrations/EventMigrationPropertyBuilder.ts","../events/migrations/EventTypeMigrators.ts","../events/migrations/IEventMigrationBuilder.ts","../events/migrations/IEventMigrationPropertyBuilder.ts","../events/migrations/IEventTypeMigration.ts","../events/migrations/IEventTypeMigrators.ts","../events/migrations/InvalidMigrationGenerationGap.ts","../events/migrations/eventTypeMigration.ts","../events/migrations/index.ts","../externalServices/ExternalServiceBuilder.ts","../externalServices/ExternalServices.ts","../externalServices/ExternalServicesContracts.ts","../externalServices/IExternalServiceBuilder.ts","../externalServices/IExternalServices.ts","../externalServices/index.ts","../identities/IIdentityManager.ts","../identities/IdentityManager.ts","../identities/index.ts","../identity/IIdentityProvider.ts","../identity/Identity.ts","../identity/IdentityProvider.ts","../identity/index.ts","../jobs/IJobs.ts","../jobs/JobId.ts","../jobs/Jobs.ts","../jobs/index.ts","../observation/FailedPartition.ts","../observation/FailedPartitionAttempt.ts","../observation/FailedPartitions.ts","../observation/ICanBeNotifiedWhenPartitionReplayed.ts","../observation/ICanBeNotifiedWhenReplay.ts","../observation/IFailedPartitions.ts","../observation/ObserverId.ts","../observation/ObserverRunningState.ts","../observation/index.ts","../observation/notifyReplayLifecycle.ts","../observation/toClientFailedPartition.ts","../projections/IProjections.ts","../projections/ProjectionId.ts","../projections/Projections.ts","../projections/index.ts","../projections/declarative/AddBuilder.ts","../projections/declarative/AddChildBuilder.ts","../projections/declarative/AllSetBuilder.ts","../projections/declarative/ChildrenBuilder.ts","../projections/declarative/CompositeKeyBuilder.ts","../projections/declarative/FromBuilder.ts","../projections/declarative/FromEveryBuilder.ts","../projections/declarative/IAddBuilder.ts","../projections/declarative/IAddChildBuilder.ts","../projections/declarative/IAllSetBuilder.ts","../projections/declarative/IChildrenBuilder.ts","../projections/declarative/ICompositeKeyBuilder.ts","../projections/declarative/IFromBuilder.ts","../projections/declarative/IFromEveryBuilder.ts","../projections/declarative/IJoinBuilder.ts","../projections/declarative/INestedBuilder.ts","../projections/declarative/IProjectionBuilder.ts","../projections/declarative/IProjectionBuilderFor.ts","../projections/declarative/IProjectionFor.ts","../projections/declarative/IReadModelPropertiesBuilder.ts","../projections/declarative/IRemovedWithBuilder.ts","../projections/declarative/IRemovedWithJoinBuilder.ts","../projections/declarative/ISetBuilder.ts","../projections/declarative/ISubtractBuilder.ts","../projections/declarative/JoinBuilder.ts","../projections/declarative/NestedBuilder.ts","../projections/declarative/ProjectionBuilderCore.ts","../projections/declarative/ProjectionBuilderFor.ts","../projections/declarative/RemovedWithBuilder.ts","../projections/declarative/RemovedWithJoinBuilder.ts","../projections/declarative/SetBuilder.ts","../projections/declarative/SubtractBuilder.ts","../projections/declarative/index.ts","../projections/declarative/projection.ts","../projections/modelBound/FromEventMetadata.ts","../projections/modelBound/FromEventOptions.ts","../projections/modelBound/addFrom.ts","../projections/modelBound/childrenAndNestedBuilder.ts","../projections/modelBound/childrenFrom.ts","../projections/modelBound/clearWith.ts","../projections/modelBound/count.ts","../projections/modelBound/decrement.ts","../projections/modelBound/fromEvent.ts","../projections/modelBound/fromEvery.ts","../projections/modelBound/increment.ts","../projections/modelBound/index.ts","../projections/modelBound/join.ts","../projections/modelBound/nested.ts","../projections/modelBound/notRewindable.ts","../projections/modelBound/passive.ts","../projections/modelBound/removedWith.ts","../projections/modelBound/removedWithJoin.ts","../projections/modelBound/setFrom.ts","../projections/modelBound/setFromContext.ts","../projections/modelBound/setValue.ts","../projections/modelBound/subtractFrom.ts","../reactors/IReactors.ts","../reactors/ReactorId.ts","../reactors/ReactorSideEffects.ts","../reactors/Reactors.ts","../reactors/index.ts","../reactors/reactor.ts","../readModels/IMaterializedReadModels.ts","../readModels/IReadModels.ts","../readModels/MaterializedReadModels.ts","../readModels/ReadModelChangeset.ts","../readModels/ReadModelId.ts","../readModels/ReadModelSnapshot.ts","../readModels/ReadModels.ts","../readModels/index.ts","../readModels/readModel.ts","../reducers/IReducers.ts","../reducers/ReducerId.ts","../reducers/Reducers.ts","../reducers/index.ts","../reducers/reducer.ts","../schemas/JsonSchema.ts","../schemas/JsonSchemaGenerator.ts","../schemas/index.ts","../schemas/jsonSchemaProperty.ts","../seeding/EventSeeding.ts","../seeding/ICanSeedEvents.ts","../seeding/IEventSeeding.ts","../seeding/IEventSeedingBuilder.ts","../seeding/IEventSeedingScopeBuilder.ts","../seeding/index.ts","../seeding/seeder.ts","../sinks/WellKnownSinks.ts","../sinks/index.ts","../transactions/IUnitOfWork.ts","../transactions/IUnitOfWorkManager.ts","../transactions/NoUnitOfWorkHasBeenStarted.ts","../transactions/UnitOfWork.ts","../transactions/UnitOfWorkManager.ts","../transactions/index.ts","../types/DecoratorType.ts","../types/TypeDiscoverer.ts","../types/TypeIntrospector.ts","../types/index.ts","../webhooks/IWebhook.ts","../webhooks/IWebhookDefinitionBuilder.ts","../webhooks/IWebhooks.ts","../webhooks/WebhookDefinitionBuilder.ts","../webhooks/WebhookId.ts","../webhooks/WebhookTargetUrl.ts","../webhooks/Webhooks.ts","../webhooks/index.ts","../webhooks/webhook.ts"],"version":"6.0.3"}
1
+ {"root":["../ChronicleClient.ts","../ChronicleOptions.ts","../EventStore.ts","../EventStoreName.ts","../EventStoreNamespaceName.ts","../IChronicleClient.ts","../IEventStore.ts","../Metrics.ts","../Tracing.ts","../index.ts","../artifacts/DefaultClientArtifactsProvider.ts","../artifacts/IClientArtifactsProvider.ts","../artifacts/index.ts","../auditing/Causation.ts","../auditing/CausationManager.ts","../auditing/CausationType.ts","../auditing/ICausationManager.ts","../auditing/index.ts","../compliance/ComplianceContracts.ts","../compliance/ComplianceMetadata.ts","../compliance/ComplianceMetadataResolver.ts","../compliance/ComplianceMetadataType.ts","../compliance/IPIIManager.ts","../compliance/PIIManager.ts","../compliance/index.ts","../compliance/pii.ts","../connection/ChronicleConnection.ts","../connection/ChronicleConnectionString.ts","../connection/ChronicleServerAddressResolver.ts","../connection/ChronicleServices.ts","../connection/ChronicleSrvResolutionError.ts","../connection/ChronicleSrvResolver.ts","../connection/ConnectionLifecycle.ts","../connection/DateTimeOffset.ts","../connection/Guid.ts","../connection/ILoadBalancerStrategy.ts","../connection/KernelKeepAlive.ts","../connection/LeastConnectionsLoadBalancerStrategy.ts","../connection/LoadBalancerMode.ts","../connection/LoadBalancerStrategyFactory.ts","../connection/RandomLoadBalancerStrategy.ts","../connection/RoundRobinLoadBalancerStrategy.ts","../connection/TokenProvider.ts","../connection/callResults.ts","../connection/fetchOAuthAccessToken.ts","../connection/formatServerAddress.ts","../connection/index.ts","../correlation/CorrelationId.ts","../correlation/CorrelationIdManager.ts","../correlation/ICorrelationIdAccessor.ts","../correlation/ICorrelationIdSetter.ts","../correlation/index.ts","../eventSequences/AppendError.ts","../eventSequences/AppendOperationsBroadcaster.ts","../eventSequences/AppendOptions.ts","../eventSequences/AppendResult.ts","../eventSequences/AppendedEventWithResult.ts","../eventSequences/CompleteStreamError.ts","../eventSequences/CompleteStreamResult.ts","../eventSequences/ConcurrencyScope.ts","../eventSequences/ConcurrencyViolation.ts","../eventSequences/ConstraintViolation.ts","../eventSequences/EventForEventSourceId.ts","../eventSequences/EventLog.ts","../eventSequences/EventSequence.ts","../eventSequences/EventSequenceId.ts","../eventSequences/EventSequenceNumber.ts","../eventSequences/IEventLog.ts","../eventSequences/IEventSequence.ts","../eventSequences/ITransactionalEventSequence.ts","../eventSequences/TransactionalEventSequence.ts","../eventSequences/WaitForCompletionResult.ts","../eventSequences/index.ts","../eventStoreSubscriptions/EventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/EventStoreSubscriptionDefinition.ts","../eventStoreSubscriptions/EventStoreSubscriptionId.ts","../eventStoreSubscriptions/EventStoreSubscriptions.ts","../eventStoreSubscriptions/IEventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/IEventStoreSubscriptions.ts","../eventStoreSubscriptions/contracts.ts","../eventStoreSubscriptions/index.ts","../events/AppendedEvent.ts","../events/CausationEntry.ts","../events/EventContext.ts","../events/EventType.ts","../events/EventTypeGeneration.ts","../events/EventTypeId.ts","../events/EventTypes.ts","../events/IEventTypes.ts","../events/eventTypeDecorator.ts","../events/index.ts","../events/constraints/ConstraintBuilder.ts","../events/constraints/ConstraintId.ts","../events/constraints/Constraints.ts","../events/constraints/IConstraint.ts","../events/constraints/IConstraintBuilder.ts","../events/constraints/IConstraints.ts","../events/constraints/IUniqueConstraintBuilder.ts","../events/constraints/UniqueConstraintBuilder.ts","../events/constraints/constraint.ts","../events/constraints/index.ts","../events/migrations/EventMigrationBuilder.ts","../events/migrations/EventMigrationPropertyBuilder.ts","../events/migrations/EventTypeMigrators.ts","../events/migrations/IEventMigrationBuilder.ts","../events/migrations/IEventMigrationPropertyBuilder.ts","../events/migrations/IEventTypeMigration.ts","../events/migrations/IEventTypeMigrators.ts","../events/migrations/InvalidMigrationGenerationGap.ts","../events/migrations/eventTypeMigration.ts","../events/migrations/index.ts","../externalServices/ExternalServiceBuilder.ts","../externalServices/ExternalServices.ts","../externalServices/ExternalServicesContracts.ts","../externalServices/IExternalServiceBuilder.ts","../externalServices/IExternalServices.ts","../externalServices/index.ts","../identities/IIdentityManager.ts","../identities/IdentityManager.ts","../identities/index.ts","../identity/IIdentityProvider.ts","../identity/Identity.ts","../identity/IdentityProvider.ts","../identity/index.ts","../jobs/IJobs.ts","../jobs/JobId.ts","../jobs/Jobs.ts","../jobs/index.ts","../observation/FailedPartition.ts","../observation/FailedPartitionAttempt.ts","../observation/FailedPartitions.ts","../observation/ICanBeNotifiedWhenPartitionReplayed.ts","../observation/ICanBeNotifiedWhenReplay.ts","../observation/IFailedPartitions.ts","../observation/ObserverId.ts","../observation/ObserverRunningState.ts","../observation/index.ts","../observation/notifyReplayLifecycle.ts","../observation/toClientFailedPartition.ts","../projections/IProjections.ts","../projections/ProjectionId.ts","../projections/Projections.ts","../projections/index.ts","../projections/declarative/AddBuilder.ts","../projections/declarative/AddChildBuilder.ts","../projections/declarative/AllSetBuilder.ts","../projections/declarative/ChildrenBuilder.ts","../projections/declarative/CompositeKeyBuilder.ts","../projections/declarative/FromBuilder.ts","../projections/declarative/FromEveryBuilder.ts","../projections/declarative/IAddBuilder.ts","../projections/declarative/IAddChildBuilder.ts","../projections/declarative/IAllSetBuilder.ts","../projections/declarative/IChildrenBuilder.ts","../projections/declarative/ICompositeKeyBuilder.ts","../projections/declarative/IFromBuilder.ts","../projections/declarative/IFromEveryBuilder.ts","../projections/declarative/IJoinBuilder.ts","../projections/declarative/INestedBuilder.ts","../projections/declarative/IProjectionBuilder.ts","../projections/declarative/IProjectionBuilderFor.ts","../projections/declarative/IProjectionFor.ts","../projections/declarative/IReadModelPropertiesBuilder.ts","../projections/declarative/IRemovedWithBuilder.ts","../projections/declarative/IRemovedWithJoinBuilder.ts","../projections/declarative/ISetBuilder.ts","../projections/declarative/ISubtractBuilder.ts","../projections/declarative/JoinBuilder.ts","../projections/declarative/NestedBuilder.ts","../projections/declarative/ProjectionBuilderCore.ts","../projections/declarative/ProjectionBuilderFor.ts","../projections/declarative/RemovedWithBuilder.ts","../projections/declarative/RemovedWithJoinBuilder.ts","../projections/declarative/SetBuilder.ts","../projections/declarative/SubtractBuilder.ts","../projections/declarative/index.ts","../projections/declarative/projection.ts","../projections/modelBound/FromEventMetadata.ts","../projections/modelBound/FromEventOptions.ts","../projections/modelBound/addFrom.ts","../projections/modelBound/childrenAndNestedBuilder.ts","../projections/modelBound/childrenFrom.ts","../projections/modelBound/clearWith.ts","../projections/modelBound/count.ts","../projections/modelBound/decrement.ts","../projections/modelBound/fromEvent.ts","../projections/modelBound/fromEvery.ts","../projections/modelBound/increment.ts","../projections/modelBound/index.ts","../projections/modelBound/join.ts","../projections/modelBound/nested.ts","../projections/modelBound/notRewindable.ts","../projections/modelBound/passive.ts","../projections/modelBound/removedWith.ts","../projections/modelBound/removedWithJoin.ts","../projections/modelBound/setFrom.ts","../projections/modelBound/setFromContext.ts","../projections/modelBound/setValue.ts","../projections/modelBound/subtractFrom.ts","../reactors/IReactors.ts","../reactors/ReactorId.ts","../reactors/ReactorSideEffects.ts","../reactors/Reactors.ts","../reactors/index.ts","../reactors/reactor.ts","../readModels/IMaterializedReadModels.ts","../readModels/IReadModels.ts","../readModels/MaterializedReadModels.ts","../readModels/ReadModelChangeset.ts","../readModels/ReadModelId.ts","../readModels/ReadModelSnapshot.ts","../readModels/ReadModels.ts","../readModels/index.ts","../readModels/readModel.ts","../reducers/IReducers.ts","../reducers/ReducerId.ts","../reducers/Reducers.ts","../reducers/index.ts","../reducers/reducer.ts","../schemas/JsonSchema.ts","../schemas/JsonSchemaGenerator.ts","../schemas/index.ts","../schemas/jsonSchemaProperty.ts","../seeding/EventSeeding.ts","../seeding/ICanSeedEvents.ts","../seeding/IEventSeeding.ts","../seeding/IEventSeedingBuilder.ts","../seeding/IEventSeedingScopeBuilder.ts","../seeding/index.ts","../seeding/seeder.ts","../sinks/WellKnownSinks.ts","../sinks/index.ts","../transactions/IUnitOfWork.ts","../transactions/IUnitOfWorkManager.ts","../transactions/NoUnitOfWorkHasBeenStarted.ts","../transactions/UnitOfWork.ts","../transactions/UnitOfWorkManager.ts","../transactions/index.ts","../types/DecoratorType.ts","../types/TypeDiscoverer.ts","../types/TypeIntrospector.ts","../types/index.ts","../webhooks/IWebhook.ts","../webhooks/IWebhookDefinitionBuilder.ts","../webhooks/IWebhooks.ts","../webhooks/WebhookDefinitionBuilder.ts","../webhooks/WebhookId.ts","../webhooks/WebhookTargetUrl.ts","../webhooks/Webhooks.ts","../webhooks/index.ts","../webhooks/webhook.ts"],"version":"6.0.3"}
@@ -60,7 +60,7 @@ export class Constraints implements IConstraints {
60
60
  return {
61
61
  Name: capture.name,
62
62
  Type: ConstraintType.Unique,
63
- RemovedWith: uc.removedWithEventTypeId ?? '',
63
+ RemovedWith: uc.removedWithEventTypeId ? [uc.removedWithEventTypeId] : [],
64
64
  Definition: {
65
65
  Value0: {
66
66
  EventDefinitions: uc.eventDefinitions.map(ed => ({
@@ -80,7 +80,7 @@ export class Constraints implements IConstraints {
80
80
  return {
81
81
  Name: uet.name ?? capture.name,
82
82
  Type: ConstraintType.UniqueEventType,
83
- RemovedWith: '',
83
+ RemovedWith: [],
84
84
  Definition: {
85
85
  Value0: undefined,
86
86
  Value1: {
@@ -94,7 +94,7 @@ export class Constraints implements IConstraints {
94
94
  return {
95
95
  Name: capture.name,
96
96
  Type: ConstraintType.Unknown,
97
- RemovedWith: '',
97
+ RemovedWith: [],
98
98
  Definition: undefined,
99
99
  Scope: scope
100
100
  };
package/jobs/IJobs.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
4
  import { Guid } from '@cratis/fundamentals';
5
- import type { Job, JobStep } from '@cratis/chronicle.contracts';
5
+ import type { JobSummaryResponse, JobStepSummaryResponse } from '@cratis/chronicle.contracts';
6
6
  import { JobId } from './JobId';
7
7
 
8
8
  /**
@@ -32,18 +32,18 @@ export interface IJobs {
32
32
  * @param jobId - The job identifier.
33
33
  * @returns The job, or undefined when not found.
34
34
  */
35
- getJob(jobId: JobId | Guid | string): Promise<Job | undefined>;
35
+ getJob(jobId: JobId | Guid | string): Promise<JobSummaryResponse | undefined>;
36
36
 
37
37
  /**
38
38
  * Gets all jobs for the event store namespace.
39
39
  * @returns All jobs.
40
40
  */
41
- getJobs(): Promise<Job[]>;
41
+ getJobs(): Promise<JobSummaryResponse[]>;
42
42
 
43
43
  /**
44
44
  * Gets all steps for a specific job.
45
45
  * @param jobId - The job identifier.
46
46
  * @returns The job steps.
47
47
  */
48
- getJobSteps(jobId: JobId | Guid | string): Promise<JobStep[]>;
48
+ getJobSteps(jobId: JobId | Guid | string): Promise<JobStepSummaryResponse[]>;
49
49
  }
package/jobs/Jobs.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  // Copyright (c) Cratis. All rights reserved.
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
- import type { Job, JobStep } from '@cratis/chronicle.contracts';
4
+ import type { JobSummaryResponse, JobStepSummaryResponse } from '@cratis/chronicle.contracts';
5
5
  import { Guid } from '@cratis/fundamentals';
6
6
  import { ChronicleConnection } from '../connection';
7
- import { toContractsGuid } from '../connection/Guid';
7
+ import { ensureCommandSuccess, ensureQuerySuccess, firstQueryResult } from '../connection/callResults';
8
+ import { fromContractsGuid, toContractsGuid } from '../connection/Guid';
8
9
  import { IJobs } from './IJobs';
9
10
  import { JobId } from './JobId';
10
11
 
@@ -26,39 +27,40 @@ export class Jobs implements IJobs {
26
27
 
27
28
  /** @inheritdoc */
28
29
  async stop(jobId: JobId | Guid | string): Promise<void> {
29
- await this._connection.jobs.stop(this.createJobRequest(jobId));
30
+ ensureCommandSuccess('stop job', await this._connection.jobs.stopJob(this.createJobRequest(jobId)));
30
31
  }
31
32
 
32
33
  /** @inheritdoc */
33
34
  async resume(jobId: JobId | Guid | string): Promise<void> {
34
- await this._connection.jobs.resume(this.createJobRequest(jobId));
35
+ ensureCommandSuccess('resume job', await this._connection.jobs.resumeJob(this.createJobRequest(jobId)));
35
36
  }
36
37
 
37
38
  /** @inheritdoc */
38
39
  async delete(jobId: JobId | Guid | string): Promise<void> {
39
- await this._connection.jobs.delete(this.createJobRequest(jobId));
40
+ ensureCommandSuccess('delete job', await this._connection.jobs.deleteJob(this.createJobRequest(jobId)));
40
41
  }
41
42
 
42
43
  /** @inheritdoc */
43
- async getJob(jobId: JobId | Guid | string): Promise<Job | undefined> {
44
- const result = await this._connection.jobs.getJob(this.createJobRequest(jobId));
45
- return result.Value0;
44
+ async getJob(jobId: JobId | Guid | string): Promise<JobSummaryResponse | undefined> {
45
+ const target = this.normalizeJobId(jobId).toString();
46
+ const jobs = await this.getJobs();
47
+ return jobs.find(job => fromContractsGuid(job.Id).toString() === target);
46
48
  }
47
49
 
48
50
  /** @inheritdoc */
49
- async getJobs(): Promise<Job[]> {
50
- const response = await this._connection.jobs.getJobs({
51
+ async getJobs(): Promise<JobSummaryResponse[]> {
52
+ const response = await firstQueryResult('get jobs', this._connection.jobs.allJobs({
51
53
  EventStore: this._eventStore,
52
54
  Namespace: this._namespace
53
- });
55
+ }));
54
56
 
55
- return response.items ?? [];
57
+ return ensureQuerySuccess('get jobs', response);
56
58
  }
57
59
 
58
60
  /** @inheritdoc */
59
- async getJobSteps(jobId: JobId | Guid | string): Promise<JobStep[]> {
61
+ async getJobSteps(jobId: JobId | Guid | string): Promise<JobStepSummaryResponse[]> {
60
62
  const response = await this._connection.jobs.getJobSteps(this.createJobRequest(jobId));
61
- return response.items ?? [];
63
+ return ensureQuerySuccess('get job steps', response);
62
64
  }
63
65
 
64
66
  private createJobRequest(jobId: JobId | Guid | string): { EventStore: string; Namespace: string; JobId: ReturnType<typeof toContractsGuid> } {
package/package.json CHANGED
@@ -1,9 +1,24 @@
1
1
  {
2
2
  "name": "@cratis/chronicle",
3
- "version": "3.1.0",
4
- "description": "TypeScript idiomatic client for Cratis Chronicle",
3
+ "version": "3.1.1",
4
+ "description": "Event sourcing for TypeScript and Node.js — the idiomatic client for Cratis Chronicle, the open-source event-sourcing database",
5
5
  "author": "Cratis",
6
6
  "license": "MIT",
7
+ "homepage": "https://www.cratis.io/chronicle/",
8
+ "keywords": [
9
+ "event-sourcing",
10
+ "eventsourcing",
11
+ "event-store",
12
+ "eventstore",
13
+ "cqrs",
14
+ "ddd",
15
+ "projections",
16
+ "grpc",
17
+ "typescript",
18
+ "nodejs",
19
+ "chronicle",
20
+ "cratis"
21
+ ],
7
22
  "repository": {
8
23
  "type": "git",
9
24
  "url": "git+https://github.com/Cratis/Chronicle.TypeScript.git"
@@ -145,7 +160,7 @@
145
160
  },
146
161
  "dependencies": {
147
162
  "@bufbuild/protobuf": "^2.12.0",
148
- "@cratis/chronicle.contracts": "16.13.4",
163
+ "@cratis/chronicle.contracts": "17.0.0",
149
164
  "@grpc/grpc-js": "^1.14.4",
150
165
  "@opentelemetry/api": "^1.9.1",
151
166
  "nice-grpc": "^2.1.16",