@cratis/chronicle.contracts 19.22.1 → 19.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,6 +68,7 @@ export interface Constraint {
68
68
  RemovedWith: string[];
69
69
  Definition: OneOfUniqueConstraintDefinitionUniqueEventTypeConstraintDefinition | undefined;
70
70
  Scope: ConstraintScope | undefined;
71
+ EventSequences: string[];
71
72
  }
72
73
 
73
74
  export interface ConstraintScope {
@@ -101,7 +102,7 @@ export interface UniqueEventTypeConstraintDefinition {
101
102
  }
102
103
 
103
104
  function createBaseConstraint(): Constraint {
104
- return { Name: "", Type: 0, RemovedWith: [], Definition: undefined, Scope: undefined };
105
+ return { Name: "", Type: 0, RemovedWith: [], Definition: undefined, Scope: undefined, EventSequences: [] };
105
106
  }
106
107
 
107
108
  export const Constraint: MessageFns<Constraint> = {
@@ -124,6 +125,9 @@ export const Constraint: MessageFns<Constraint> = {
124
125
  if (message.Scope !== undefined) {
125
126
  ConstraintScope.encode(message.Scope, writer.uint32(42).fork()).join();
126
127
  }
128
+ for (const v of message.EventSequences) {
129
+ writer.uint32(50).string(v!);
130
+ }
127
131
  return writer;
128
132
  },
129
133
 
@@ -183,6 +187,14 @@ export const Constraint: MessageFns<Constraint> = {
183
187
  message.Scope = ConstraintScope.decode(reader, reader.uint32());
184
188
  continue;
185
189
  }
190
+ case 6: {
191
+ if (tag !== 50) {
192
+ break;
193
+ }
194
+
195
+ message.EventSequences.push(reader.string());
196
+ continue;
197
+ }
186
198
  }
187
199
  if ((tag & 7) === 4 || tag === 0) {
188
200
  break;
@@ -206,6 +218,9 @@ export const Constraint: MessageFns<Constraint> = {
206
218
  ? OneOfUniqueConstraintDefinitionUniqueEventTypeConstraintDefinition.fromJSON(object.Definition)
207
219
  : undefined,
208
220
  Scope: isSet(object.Scope) ? ConstraintScope.fromJSON(object.Scope) : undefined,
221
+ EventSequences: globalThis.Array.isArray(object?.EventSequences)
222
+ ? object.EventSequences.map((e: any) => globalThis.String(e))
223
+ : [],
209
224
  };
210
225
  },
211
226
 
@@ -226,6 +241,9 @@ export const Constraint: MessageFns<Constraint> = {
226
241
  if (message.Scope !== undefined) {
227
242
  obj.Scope = ConstraintScope.toJSON(message.Scope);
228
243
  }
244
+ if (message.EventSequences?.length) {
245
+ obj.EventSequences = message.EventSequences;
246
+ }
229
247
  return obj;
230
248
  },
231
249
 
@@ -243,6 +261,7 @@ export const Constraint: MessageFns<Constraint> = {
243
261
  message.Scope = (object.Scope !== undefined && object.Scope !== null)
244
262
  ? ConstraintScope.fromPartial(object.Scope)
245
263
  : undefined;
264
+ message.EventSequences = object.EventSequences?.map((e) => e) || [];
246
265
  return message;
247
266
  },
248
267
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/chronicle.contracts",
3
- "version": "19.22.1",
3
+ "version": "19.23.0",
4
4
  "description": "TypeScript gRPC client contracts for Cratis Chronicle - the open-source event-sourcing database",
5
5
  "keywords": [
6
6
  "event-sourcing",