@cratis/arc 22.87.2 → 22.88.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.
@@ -5,6 +5,7 @@ export declare const ValidationResultReason: {
5
5
  readonly ValidatorFailed: 'validatorFailed';
6
6
  readonly DependencyUnavailable: 'dependencyUnavailable';
7
7
  readonly MalformedRequest: 'malformedRequest';
8
+ readonly FrameworkFailure: 'frameworkFailure';
8
9
  };
9
10
  export type ValidationResultReason = string;
10
11
  //# sourceMappingURL=ValidationResultReason.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationResultReason.d.ts","sourceRoot":"","sources":["../../../validation/ValidationResultReason.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,sBAAsB;aAK/B,IAAI,EAAE,MAAM;aAKZ,oBAAoB,EAAE,sBAAsB;aAK5C,mBAAmB,EAAE,qBAAqB;aAM1C,eAAe,EAAE,iBAAiB;aAMlC,qBAAqB,EAAE,uBAAuB;aAM9C,gBAAgB,EAAE,kBAAkB;CAC9B,CAAC;AAKX,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"ValidationResultReason.d.ts","sourceRoot":"","sources":["../../../validation/ValidationResultReason.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,sBAAsB;aAK/B,IAAI,EAAE,MAAM;aAKZ,oBAAoB,EAAE,sBAAsB;aAK5C,mBAAmB,EAAE,qBAAqB;aAM1C,eAAe,EAAE,iBAAiB;aAMlC,qBAAqB,EAAE,uBAAuB;aAM9C,gBAAgB,EAAE,kBAAkB;aAMpC,gBAAgB,EAAE,kBAAkB;CAC9B,CAAC;AAKX,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC"}
@@ -33,7 +33,11 @@
33
33
  /**
34
34
  * The request itself could not be read - a malformed body, or a value that could not be bound. No rule was
35
35
  * reached.
36
- */ MalformedRequest: 'malformedRequest'
36
+ */ MalformedRequest: 'malformedRequest',
37
+ /**
38
+ * The framework could not fulfill a command contract or complete its effects. This is framework-composed;
39
+ * the message is a developer diagnostic, not end-user copy.
40
+ */ FrameworkFailure: 'frameworkFailure'
37
41
  };
38
42
 
39
43
  exports.ValidationResultReason = ValidationResultReason;
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationResultReason.js","sources":["../../../validation/ValidationResultReason.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Holds the well-known values for what composed a validation result - the machine-readable counterpart to its\n * message.\n * @remarks\n * A rejection's message is a developer diagnostic, not copy to show a user. Branch on this instead of matching the\n * message, and render your own wording for anything the framework composed.\n *\n * This is deliberately not an enum. Rejections are composed in Arc, in Chronicle and in application code, so the set\n * is open: treat an unrecognized value the way you would treat {@link ValidationResultReason.Rule} rather than as an\n * error.\n */\nexport const ValidationResultReason = {\n\n /**\n * A rule authored by the application rejected the input. The message is the author's, and is meant to be shown.\n */\n Rule: 'rule',\n\n /**\n * The append was rejected because the event source moved on since it was read. Retryable - re-read and resubmit.\n */\n ConcurrencyViolation: 'concurrencyViolation',\n\n /**\n * A constraint on the event store rejected the append.\n */\n ConstraintViolation: 'constraintViolation',\n\n /**\n * A validator threw, and the framework substituted this result for the one the validator would have produced.\n * Nothing the author wrote survives, so the message is not theirs to show.\n */\n ValidatorFailed: 'validatorFailed',\n\n /**\n * Something the command needed in order to be evaluated was not available, most often the read model a\n * validator depends on. Raised before any rule ran, so nothing about the command's own rules was decided.\n */\n DependencyUnavailable: 'dependencyUnavailable',\n\n /**\n * The request itself could not be read - a malformed body, or a value that could not be bound. No rule was\n * reached.\n */\n MalformedRequest: 'malformedRequest'\n} as const;\n\n/**\n * The type of a validation result reason. Widened to string because the set is open.\n */\nexport type ValidationResultReason = string;\n"],"names":["ValidationResultReason","Rule","ConcurrencyViolation","ConstraintViolation","ValidatorFailed","DependencyUnavailable","MalformedRequest"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;UAWaA,sBAAAA,GAAyB;AAElC;;AAEC,QACDC,IAAAA,EAAM,MAAA;AAEN;;AAEC,QACDC,oBAAAA,EAAsB,sBAAA;AAEtB;;AAEC,QACDC,mBAAAA,EAAqB,qBAAA;AAErB;;;AAGC,QACDC,eAAAA,EAAiB,iBAAA;AAEjB;;;AAGC,QACDC,qBAAAA,EAAuB,uBAAA;AAEvB;;;AAGC,QACDC,gBAAAA,EAAkB;AACtB;;"}
1
+ {"version":3,"file":"ValidationResultReason.js","sources":["../../../validation/ValidationResultReason.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Holds the well-known values for what composed a validation result - the machine-readable counterpart to its\n * message.\n * @remarks\n * A rejection's message is a developer diagnostic, not copy to show a user. Branch on this instead of matching the\n * message, and render your own wording for anything the framework composed.\n *\n * This is deliberately not an enum. Rejections are composed in Arc, in Chronicle and in application code, so the set\n * is open: treat an unrecognized value the way you would treat {@link ValidationResultReason.Rule} rather than as an\n * error.\n */\nexport const ValidationResultReason = {\n\n /**\n * A rule authored by the application rejected the input. The message is the author's, and is meant to be shown.\n */\n Rule: 'rule',\n\n /**\n * The append was rejected because the event source moved on since it was read. Retryable - re-read and resubmit.\n */\n ConcurrencyViolation: 'concurrencyViolation',\n\n /**\n * A constraint on the event store rejected the append.\n */\n ConstraintViolation: 'constraintViolation',\n\n /**\n * A validator threw, and the framework substituted this result for the one the validator would have produced.\n * Nothing the author wrote survives, so the message is not theirs to show.\n */\n ValidatorFailed: 'validatorFailed',\n\n /**\n * Something the command needed in order to be evaluated was not available, most often the read model a\n * validator depends on. Raised before any rule ran, so nothing about the command's own rules was decided.\n */\n DependencyUnavailable: 'dependencyUnavailable',\n\n /**\n * The request itself could not be read - a malformed body, or a value that could not be bound. No rule was\n * reached.\n */\n MalformedRequest: 'malformedRequest',\n\n /**\n * The framework could not fulfill a command contract or complete its effects. This is framework-composed;\n * the message is a developer diagnostic, not end-user copy.\n */\n FrameworkFailure: 'frameworkFailure'\n} as const;\n\n/**\n * The type of a validation result reason. Widened to string because the set is open.\n */\nexport type ValidationResultReason = string;\n"],"names":["ValidationResultReason","Rule","ConcurrencyViolation","ConstraintViolation","ValidatorFailed","DependencyUnavailable","MalformedRequest","FrameworkFailure"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;UAWaA,sBAAAA,GAAyB;AAElC;;AAEC,QACDC,IAAAA,EAAM,MAAA;AAEN;;AAEC,QACDC,oBAAAA,EAAsB,sBAAA;AAEtB;;AAEC,QACDC,mBAAAA,EAAqB,qBAAA;AAErB;;;AAGC,QACDC,eAAAA,EAAiB,iBAAA;AAEjB;;;AAGC,QACDC,qBAAAA,EAAuB,uBAAA;AAEvB;;;AAGC,QACDC,gBAAAA,EAAkB,kBAAA;AAElB;;;AAGC,QACDC,gBAAAA,EAAkB;AACtB;;"}