@xemahq/contracts 0.87.0 → 0.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.
- package/dist/.source-stamp.json +2 -2
- package/dist/conformance/decision-open-identity.vectors.json +14 -0
- package/dist/decision/index.d.ts +1 -0
- package/dist/decision/index.d.ts.map +1 -1
- package/dist/decision/index.js +1 -0
- package/dist/decision/index.js.map +1 -1
- package/dist/decision/lib/events.d.ts +100 -53
- package/dist/decision/lib/events.d.ts.map +1 -1
- package/dist/decision/lib/events.js +39 -17
- package/dist/decision/lib/events.js.map +1 -1
- package/dist/decision/lib/open-identity.d.ts +25 -0
- package/dist/decision/lib/open-identity.d.ts.map +1 -0
- package/dist/decision/lib/open-identity.js +40 -0
- package/dist/decision/lib/open-identity.js.map +1 -0
- package/dist/decision/lib/open-request.d.ts +1 -0
- package/dist/decision/lib/open-request.d.ts.map +1 -1
- package/dist/decision/lib/open-request.js +1 -0
- package/dist/decision/lib/open-request.js.map +1 -1
- package/package.json +2 -2
package/dist/.source-stamp.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Conformance vectors for opening a decision (`resolveDecisionOpen`, @xemahq/contracts/decision). `(idempotencyKey, attempt)` names exactly one decision forever: a retry returns it in any state, a deliberate re-ask is attempt + 1 and opens a NEW decision (an expired or terminal one is never reused), a re-ask while the previous attempt is still answerable is refused, and attempts are contiguous from 1. `latest` is the highest attempt existing under the key and whether that decision is still answerable (read-time derivation; LAPSED is answerable, EXPIRED is not), or null when none exists. decision-api re-runs these against its open path.",
|
|
3
|
+
"vectors": [
|
|
4
|
+
{ "name": "first-ask", "requestedAttempt": 1, "latest": null, "expect": { "kind": "OPEN_NEW", "attempt": 1 }, "why": "Nothing exists under the key: the first ask opens." },
|
|
5
|
+
{ "name": "retry-while-open", "requestedAttempt": 1, "latest": { "attempt": 1, "answerable": true }, "expect": { "kind": "RETURN_EXISTING", "attempt": 1 }, "why": "A retried open re-attaches to the ask already in front of the human." },
|
|
6
|
+
{ "name": "retry-after-settlement", "requestedAttempt": 1, "latest": { "attempt": 1, "answerable": false }, "expect": { "kind": "RETURN_EXISTING", "attempt": 1 }, "why": "A lost open response, a settlement, then a retry: the retry identity survives settlement and gets the settled decision back, never a second ask." },
|
|
7
|
+
{ "name": "retry-after-expiry", "requestedAttempt": 2, "latest": { "attempt": 2, "answerable": false }, "expect": { "kind": "RETURN_EXISTING", "attempt": 2 }, "why": "An expired decision is returned as it stands to a retry of its own attempt; it is not reopened." },
|
|
8
|
+
{ "name": "re-ask-after-expiry", "requestedAttempt": 2, "latest": { "attempt": 1, "answerable": false }, "expect": { "kind": "OPEN_NEW", "attempt": 2 }, "why": "A deliberate re-ask is attempt + 1 and opens a fresh decision; the expired attempt 1 is never reused." },
|
|
9
|
+
{ "name": "re-ask-while-answerable", "requestedAttempt": 2, "latest": { "attempt": 1, "answerable": true }, "expect": { "kind": "REFUSE_PREVIOUS_STILL_ANSWERABLE", "previousAttempt": 1 }, "why": "Two live asks for one key would be two answers to one question; the producer closes attempt 1 first (a LAPSED ask is still answerable)." },
|
|
10
|
+
{ "name": "retry-of-older-attempt", "requestedAttempt": 1, "latest": { "attempt": 3, "answerable": true }, "expect": { "kind": "RETURN_EXISTING", "attempt": 1 }, "why": "A late retry of an earlier generation gets that generation's decision, never the current one." },
|
|
11
|
+
{ "name": "gap-from-nothing", "requestedAttempt": 2, "latest": null, "expect": { "kind": "REFUSE_ATTEMPT_GAP", "nextAttempt": 1 }, "why": "Attempts are contiguous from 1; a gap is refused, never filled." },
|
|
12
|
+
{ "name": "gap-after-existing", "requestedAttempt": 4, "latest": { "attempt": 2, "answerable": false }, "expect": { "kind": "REFUSE_ATTEMPT_GAP", "nextAttempt": 3 }, "why": "Skipping a generation is refused even when the previous one is terminal." }
|
|
13
|
+
]
|
|
14
|
+
}
|
package/dist/decision/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decision/index.ts"],"names":[],"mappings":"AAwBA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decision/index.ts"],"names":[],"mappings":"AAwBA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC"}
|
package/dist/decision/index.js
CHANGED
|
@@ -21,5 +21,6 @@ __exportStar(require("./lib/escalation"), exports);
|
|
|
21
21
|
__exportStar(require("./lib/status"), exports);
|
|
22
22
|
__exportStar(require("./lib/deep-link"), exports);
|
|
23
23
|
__exportStar(require("./lib/open-request"), exports);
|
|
24
|
+
__exportStar(require("./lib/open-identity"), exports);
|
|
24
25
|
__exportStar(require("./lib/events"), exports);
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decision/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBA,8CAA4B;AAC5B,kDAAgC;AAChC,qDAAmC;AACnC,mDAAiC;AACjC,+CAA6B;AAC7B,kDAAgC;AAChC,qDAAmC;AACnC,+CAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decision/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwBA,8CAA4B;AAC5B,kDAAgC;AAChC,qDAAmC;AACnC,mDAAiC;AACjC,+CAA6B;AAC7B,kDAAgC;AAChC,qDAAmC;AACnC,sDAAoC;AACpC,+CAA6B"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { DecisionAnswerRestriction, DecisionDeadlineEffect, DecisionKind, DecisionOptionEffect,
|
|
2
|
+
import { DecisionAnswerRestriction, DecisionDeadlineEffect, DecisionKind, DecisionOptionEffect, DecisionOrgRole, DecisionSettlement } from './enums';
|
|
3
3
|
import { DecisionOutcome } from './status';
|
|
4
4
|
export declare enum DecisionEventType {
|
|
5
5
|
DecisionOpened = "decision.decision.opened",
|
|
6
6
|
DecisionCommitted = "decision.decision.committed",
|
|
7
7
|
DecisionClosed = "decision.decision.closed",
|
|
8
|
+
DecisionEscalated = "decision.decision.escalated",
|
|
8
9
|
CommitRetracted = "decision.commit.retracted",
|
|
9
10
|
DecisionAnnounced = "decision.decision.announced"
|
|
10
11
|
}
|
|
@@ -25,14 +26,29 @@ export declare const DecisionEventOptionSchema: z.ZodObject<{
|
|
|
25
26
|
label: z.ZodString;
|
|
26
27
|
description: z.ZodOptional<z.ZodString>;
|
|
27
28
|
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
28
|
-
commitThreshold: z.ZodNumber;
|
|
29
29
|
capabilityRef: z.ZodOptional<z.ZodString>;
|
|
30
30
|
}, z.core.$strict>;
|
|
31
31
|
export type DecisionEventOption = z.infer<typeof DecisionEventOptionSchema>;
|
|
32
32
|
export declare const DecisionOpenedEventSchema: z.ZodObject<{
|
|
33
|
+
deadlineAt: z.ZodOptional<z.ZodString>;
|
|
34
|
+
deadlineEffect: z.ZodEnum<typeof DecisionDeadlineEffect>;
|
|
35
|
+
options: z.ZodArray<z.ZodObject<{
|
|
36
|
+
key: z.ZodString;
|
|
37
|
+
label: z.ZodString;
|
|
38
|
+
description: z.ZodOptional<z.ZodString>;
|
|
39
|
+
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
40
|
+
capabilityRef: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strict>>;
|
|
42
|
+
createdAt: z.ZodString;
|
|
43
|
+
answerRestriction: z.ZodEnum<typeof DecisionAnswerRestriction>;
|
|
44
|
+
minimumOrgRole: z.ZodOptional<z.ZodEnum<typeof DecisionOrgRole>>;
|
|
45
|
+
recipients: z.ZodArray<z.ZodObject<{
|
|
46
|
+
kind: z.ZodEnum<typeof DecisionRecipientKind>;
|
|
47
|
+
recipientId: z.ZodString;
|
|
48
|
+
userId: z.ZodString;
|
|
49
|
+
}, z.core.$strict>>;
|
|
33
50
|
decisionId: z.ZodString;
|
|
34
51
|
orgId: z.ZodString;
|
|
35
|
-
idempotencyKey: z.ZodString;
|
|
36
52
|
attempt: z.ZodNumber;
|
|
37
53
|
kind: z.ZodEnum<typeof DecisionKind>;
|
|
38
54
|
settlement: z.ZodEnum<typeof DecisionSettlement>;
|
|
@@ -40,30 +56,31 @@ export declare const DecisionOpenedEventSchema: z.ZodObject<{
|
|
|
40
56
|
summary: z.ZodOptional<z.ZodString>;
|
|
41
57
|
deepLink: z.ZodOptional<z.ZodString>;
|
|
42
58
|
subjectResourceRef: z.ZodString;
|
|
43
|
-
subjectClassification: z.ZodEnum<typeof DecisionSubjectClassification>;
|
|
44
59
|
producerService: z.ZodString;
|
|
45
60
|
producerRef: z.ZodOptional<z.ZodString>;
|
|
46
|
-
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
export type DecisionOpenedEventPayload = z.infer<typeof DecisionOpenedEventSchema>;
|
|
63
|
+
export declare const DecisionEscalatedEventSchema: z.ZodObject<{
|
|
64
|
+
deadlineAt: z.ZodOptional<z.ZodString>;
|
|
65
|
+
revision: z.ZodNumber;
|
|
47
66
|
answerRestriction: z.ZodEnum<typeof DecisionAnswerRestriction>;
|
|
67
|
+
minimumOrgRole: z.ZodOptional<z.ZodEnum<typeof DecisionOrgRole>>;
|
|
48
68
|
recipients: z.ZodArray<z.ZodObject<{
|
|
49
69
|
kind: z.ZodEnum<typeof DecisionRecipientKind>;
|
|
50
70
|
recipientId: z.ZodString;
|
|
51
71
|
userId: z.ZodString;
|
|
52
72
|
}, z.core.$strict>>;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
60
|
-
commitThreshold: z.ZodNumber;
|
|
61
|
-
capabilityRef: z.ZodOptional<z.ZodString>;
|
|
62
|
-
}, z.core.$strict>>;
|
|
63
|
-
createdAt: z.ZodString;
|
|
73
|
+
decisionId: z.ZodString;
|
|
74
|
+
orgId: z.ZodString;
|
|
75
|
+
attempt: z.ZodNumber;
|
|
76
|
+
producerService: z.ZodString;
|
|
77
|
+
producerRef: z.ZodOptional<z.ZodString>;
|
|
78
|
+
level: z.ZodNumber;
|
|
64
79
|
}, z.core.$strict>;
|
|
65
|
-
export type
|
|
66
|
-
export declare const DecisionCommittedEventSchema: z.ZodObject<{
|
|
80
|
+
export type DecisionEscalatedEventPayload = z.infer<typeof DecisionEscalatedEventSchema>;
|
|
81
|
+
export declare const DecisionCommittedEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
82
|
+
settled: z.ZodLiteral<true>;
|
|
83
|
+
outcome: z.ZodEnum<typeof DecisionOutcome>;
|
|
67
84
|
decisionId: z.ZodString;
|
|
68
85
|
orgId: z.ZodString;
|
|
69
86
|
attempt: z.ZodNumber;
|
|
@@ -74,12 +91,21 @@ export declare const DecisionCommittedEventSchema: z.ZodObject<{
|
|
|
74
91
|
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
75
92
|
committedBy: z.ZodString;
|
|
76
93
|
committedAt: z.ZodString;
|
|
77
|
-
settled: z.ZodBoolean;
|
|
78
|
-
storedState: z.ZodEnum<typeof DecisionStoredState>;
|
|
79
|
-
outcome: z.ZodOptional<z.ZodEnum<typeof DecisionOutcome>>;
|
|
80
|
-
settledAt: z.ZodOptional<z.ZodString>;
|
|
81
94
|
revision: z.ZodNumber;
|
|
82
|
-
}, z.core.$strict
|
|
95
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
96
|
+
settled: z.ZodLiteral<false>;
|
|
97
|
+
decisionId: z.ZodString;
|
|
98
|
+
orgId: z.ZodString;
|
|
99
|
+
attempt: z.ZodNumber;
|
|
100
|
+
producerService: z.ZodString;
|
|
101
|
+
producerRef: z.ZodOptional<z.ZodString>;
|
|
102
|
+
commitId: z.ZodString;
|
|
103
|
+
optionKey: z.ZodString;
|
|
104
|
+
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
105
|
+
committedBy: z.ZodString;
|
|
106
|
+
committedAt: z.ZodString;
|
|
107
|
+
revision: z.ZodNumber;
|
|
108
|
+
}, z.core.$strict>], "settled">;
|
|
83
109
|
export type DecisionCommittedEventPayload = z.infer<typeof DecisionCommittedEventSchema>;
|
|
84
110
|
export declare const DecisionClosedEventSchema: z.ZodObject<{
|
|
85
111
|
decisionId: z.ZodString;
|
|
@@ -87,7 +113,6 @@ export declare const DecisionClosedEventSchema: z.ZodObject<{
|
|
|
87
113
|
attempt: z.ZodNumber;
|
|
88
114
|
producerService: z.ZodString;
|
|
89
115
|
producerRef: z.ZodOptional<z.ZodString>;
|
|
90
|
-
producerOutcome: z.ZodEnum<typeof DecisionOutcome>;
|
|
91
116
|
outcome: z.ZodEnum<typeof DecisionOutcome>;
|
|
92
117
|
closedReason: z.ZodOptional<z.ZodString>;
|
|
93
118
|
closedAt: z.ZodString;
|
|
@@ -103,7 +128,6 @@ export declare const CommitRetractedEventSchema: z.ZodObject<{
|
|
|
103
128
|
commitId: z.ZodString;
|
|
104
129
|
optionKey: z.ZodString;
|
|
105
130
|
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
106
|
-
committedBy: z.ZodString;
|
|
107
131
|
retractedBy: z.ZodString;
|
|
108
132
|
retractedAt: z.ZodString;
|
|
109
133
|
revision: z.ZodNumber;
|
|
@@ -115,9 +139,25 @@ export declare const DecisionAnnouncedEventSchema: z.ZodObject<{
|
|
|
115
139
|
export type DecisionAnnouncedEventPayload = z.infer<typeof DecisionAnnouncedEventSchema>;
|
|
116
140
|
export declare const DECISION_EVENT_PAYLOAD_SCHEMAS: {
|
|
117
141
|
readonly "decision.decision.opened": z.ZodObject<{
|
|
142
|
+
deadlineAt: z.ZodOptional<z.ZodString>;
|
|
143
|
+
deadlineEffect: z.ZodEnum<typeof DecisionDeadlineEffect>;
|
|
144
|
+
options: z.ZodArray<z.ZodObject<{
|
|
145
|
+
key: z.ZodString;
|
|
146
|
+
label: z.ZodString;
|
|
147
|
+
description: z.ZodOptional<z.ZodString>;
|
|
148
|
+
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
149
|
+
capabilityRef: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$strict>>;
|
|
151
|
+
createdAt: z.ZodString;
|
|
152
|
+
answerRestriction: z.ZodEnum<typeof DecisionAnswerRestriction>;
|
|
153
|
+
minimumOrgRole: z.ZodOptional<z.ZodEnum<typeof DecisionOrgRole>>;
|
|
154
|
+
recipients: z.ZodArray<z.ZodObject<{
|
|
155
|
+
kind: z.ZodEnum<typeof DecisionRecipientKind>;
|
|
156
|
+
recipientId: z.ZodString;
|
|
157
|
+
userId: z.ZodString;
|
|
158
|
+
}, z.core.$strict>>;
|
|
118
159
|
decisionId: z.ZodString;
|
|
119
160
|
orgId: z.ZodString;
|
|
120
|
-
idempotencyKey: z.ZodString;
|
|
121
161
|
attempt: z.ZodNumber;
|
|
122
162
|
kind: z.ZodEnum<typeof DecisionKind>;
|
|
123
163
|
settlement: z.ZodEnum<typeof DecisionSettlement>;
|
|
@@ -125,29 +165,12 @@ export declare const DECISION_EVENT_PAYLOAD_SCHEMAS: {
|
|
|
125
165
|
summary: z.ZodOptional<z.ZodString>;
|
|
126
166
|
deepLink: z.ZodOptional<z.ZodString>;
|
|
127
167
|
subjectResourceRef: z.ZodString;
|
|
128
|
-
subjectClassification: z.ZodEnum<typeof DecisionSubjectClassification>;
|
|
129
168
|
producerService: z.ZodString;
|
|
130
169
|
producerRef: z.ZodOptional<z.ZodString>;
|
|
131
|
-
addressedActorIds: z.ZodArray<z.ZodString>;
|
|
132
|
-
answerRestriction: z.ZodEnum<typeof DecisionAnswerRestriction>;
|
|
133
|
-
recipients: z.ZodArray<z.ZodObject<{
|
|
134
|
-
kind: z.ZodEnum<typeof DecisionRecipientKind>;
|
|
135
|
-
recipientId: z.ZodString;
|
|
136
|
-
userId: z.ZodString;
|
|
137
|
-
}, z.core.$strict>>;
|
|
138
|
-
deadlineAt: z.ZodOptional<z.ZodString>;
|
|
139
|
-
deadlineEffect: z.ZodEnum<typeof DecisionDeadlineEffect>;
|
|
140
|
-
options: z.ZodArray<z.ZodObject<{
|
|
141
|
-
key: z.ZodString;
|
|
142
|
-
label: z.ZodString;
|
|
143
|
-
description: z.ZodOptional<z.ZodString>;
|
|
144
|
-
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
145
|
-
commitThreshold: z.ZodNumber;
|
|
146
|
-
capabilityRef: z.ZodOptional<z.ZodString>;
|
|
147
|
-
}, z.core.$strict>>;
|
|
148
|
-
createdAt: z.ZodString;
|
|
149
170
|
}, z.core.$strict>;
|
|
150
|
-
readonly "decision.decision.committed": z.ZodObject<{
|
|
171
|
+
readonly "decision.decision.committed": z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
172
|
+
settled: z.ZodLiteral<true>;
|
|
173
|
+
outcome: z.ZodEnum<typeof DecisionOutcome>;
|
|
151
174
|
decisionId: z.ZodString;
|
|
152
175
|
orgId: z.ZodString;
|
|
153
176
|
attempt: z.ZodNumber;
|
|
@@ -158,24 +181,49 @@ export declare const DECISION_EVENT_PAYLOAD_SCHEMAS: {
|
|
|
158
181
|
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
159
182
|
committedBy: z.ZodString;
|
|
160
183
|
committedAt: z.ZodString;
|
|
161
|
-
settled: z.ZodBoolean;
|
|
162
|
-
storedState: z.ZodEnum<typeof DecisionStoredState>;
|
|
163
|
-
outcome: z.ZodOptional<z.ZodEnum<typeof DecisionOutcome>>;
|
|
164
|
-
settledAt: z.ZodOptional<z.ZodString>;
|
|
165
184
|
revision: z.ZodNumber;
|
|
166
|
-
}, z.core.$strict
|
|
185
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
186
|
+
settled: z.ZodLiteral<false>;
|
|
187
|
+
decisionId: z.ZodString;
|
|
188
|
+
orgId: z.ZodString;
|
|
189
|
+
attempt: z.ZodNumber;
|
|
190
|
+
producerService: z.ZodString;
|
|
191
|
+
producerRef: z.ZodOptional<z.ZodString>;
|
|
192
|
+
commitId: z.ZodString;
|
|
193
|
+
optionKey: z.ZodString;
|
|
194
|
+
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
195
|
+
committedBy: z.ZodString;
|
|
196
|
+
committedAt: z.ZodString;
|
|
197
|
+
revision: z.ZodNumber;
|
|
198
|
+
}, z.core.$strict>], "settled">;
|
|
167
199
|
readonly "decision.decision.closed": z.ZodObject<{
|
|
168
200
|
decisionId: z.ZodString;
|
|
169
201
|
orgId: z.ZodString;
|
|
170
202
|
attempt: z.ZodNumber;
|
|
171
203
|
producerService: z.ZodString;
|
|
172
204
|
producerRef: z.ZodOptional<z.ZodString>;
|
|
173
|
-
producerOutcome: z.ZodEnum<typeof DecisionOutcome>;
|
|
174
205
|
outcome: z.ZodEnum<typeof DecisionOutcome>;
|
|
175
206
|
closedReason: z.ZodOptional<z.ZodString>;
|
|
176
207
|
closedAt: z.ZodString;
|
|
177
208
|
revision: z.ZodNumber;
|
|
178
209
|
}, z.core.$strict>;
|
|
210
|
+
readonly "decision.decision.escalated": z.ZodObject<{
|
|
211
|
+
deadlineAt: z.ZodOptional<z.ZodString>;
|
|
212
|
+
revision: z.ZodNumber;
|
|
213
|
+
answerRestriction: z.ZodEnum<typeof DecisionAnswerRestriction>;
|
|
214
|
+
minimumOrgRole: z.ZodOptional<z.ZodEnum<typeof DecisionOrgRole>>;
|
|
215
|
+
recipients: z.ZodArray<z.ZodObject<{
|
|
216
|
+
kind: z.ZodEnum<typeof DecisionRecipientKind>;
|
|
217
|
+
recipientId: z.ZodString;
|
|
218
|
+
userId: z.ZodString;
|
|
219
|
+
}, z.core.$strict>>;
|
|
220
|
+
decisionId: z.ZodString;
|
|
221
|
+
orgId: z.ZodString;
|
|
222
|
+
attempt: z.ZodNumber;
|
|
223
|
+
producerService: z.ZodString;
|
|
224
|
+
producerRef: z.ZodOptional<z.ZodString>;
|
|
225
|
+
level: z.ZodNumber;
|
|
226
|
+
}, z.core.$strict>;
|
|
179
227
|
readonly "decision.commit.retracted": z.ZodObject<{
|
|
180
228
|
decisionId: z.ZodString;
|
|
181
229
|
orgId: z.ZodString;
|
|
@@ -185,7 +233,6 @@ export declare const DECISION_EVENT_PAYLOAD_SCHEMAS: {
|
|
|
185
233
|
commitId: z.ZodString;
|
|
186
234
|
optionKey: z.ZodString;
|
|
187
235
|
effect: z.ZodEnum<typeof DecisionOptionEffect>;
|
|
188
|
-
committedBy: z.ZodString;
|
|
189
236
|
retractedBy: z.ZodString;
|
|
190
237
|
retractedAt: z.ZodString;
|
|
191
238
|
revision: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/decision/lib/events.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/decision/lib/events.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,EACpB,eAA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AK,CAC9C,OAAO,yBAAyB,CACjC,CAAC;AAWF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;kBAgB5B,CAAC;AACZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,0BAA0B,CAClC,CAAC;AA2BF,eAAO,MAAM,4BAA4B;;kBAI9B,CAAC;AACZ,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,4BAA4B,CACpC,CAAC;AAOF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOiB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DECISION_EVENT_PAYLOAD_SCHEMAS = exports.DecisionAnnouncedEventSchema = exports.CommitRetractedEventSchema = exports.DecisionClosedEventSchema = exports.DecisionCommittedEventSchema = exports.DecisionOpenedEventSchema = exports.DecisionEventOptionSchema = exports.DecisionRecipientSchema = exports.DecisionRecipientKind = exports.DECISION_EVENT_SCHEMA_VERSION = exports.DECISION_EVENT_SOURCE = exports.DecisionEventType = void 0;
|
|
3
|
+
exports.DECISION_EVENT_PAYLOAD_SCHEMAS = exports.DecisionAnnouncedEventSchema = exports.CommitRetractedEventSchema = exports.DecisionClosedEventSchema = exports.DecisionCommittedEventSchema = exports.DecisionEscalatedEventSchema = exports.DecisionOpenedEventSchema = exports.DecisionEventOptionSchema = exports.DecisionRecipientSchema = exports.DecisionRecipientKind = exports.DECISION_EVENT_SCHEMA_VERSION = exports.DECISION_EVENT_SOURCE = exports.DecisionEventType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enums_1 = require("./enums");
|
|
6
6
|
const status_1 = require("./status");
|
|
@@ -9,6 +9,7 @@ var DecisionEventType;
|
|
|
9
9
|
DecisionEventType["DecisionOpened"] = "decision.decision.opened";
|
|
10
10
|
DecisionEventType["DecisionCommitted"] = "decision.decision.committed";
|
|
11
11
|
DecisionEventType["DecisionClosed"] = "decision.decision.closed";
|
|
12
|
+
DecisionEventType["DecisionEscalated"] = "decision.decision.escalated";
|
|
12
13
|
DecisionEventType["CommitRetracted"] = "decision.commit.retracted";
|
|
13
14
|
DecisionEventType["DecisionAnnounced"] = "decision.decision.announced";
|
|
14
15
|
})(DecisionEventType || (exports.DecisionEventType = DecisionEventType = {}));
|
|
@@ -32,15 +33,18 @@ exports.DecisionEventOptionSchema = zod_1.z
|
|
|
32
33
|
label: zod_1.z.string().min(1),
|
|
33
34
|
description: zod_1.z.string().optional(),
|
|
34
35
|
effect: zod_1.z.nativeEnum(enums_1.DecisionOptionEffect),
|
|
35
|
-
commitThreshold: zod_1.z.number().int().min(1),
|
|
36
36
|
capabilityRef: zod_1.z.string().min(1).optional(),
|
|
37
37
|
})
|
|
38
38
|
.strict();
|
|
39
|
+
const DecisionAudienceShape = {
|
|
40
|
+
answerRestriction: zod_1.z.nativeEnum(enums_1.DecisionAnswerRestriction),
|
|
41
|
+
minimumOrgRole: zod_1.z.nativeEnum(enums_1.DecisionOrgRole).optional(),
|
|
42
|
+
recipients: zod_1.z.array(exports.DecisionRecipientSchema),
|
|
43
|
+
};
|
|
39
44
|
exports.DecisionOpenedEventSchema = zod_1.z
|
|
40
45
|
.object({
|
|
41
46
|
decisionId: zod_1.z.string().min(1),
|
|
42
47
|
orgId: zod_1.z.string().min(1),
|
|
43
|
-
idempotencyKey: zod_1.z.string().min(1),
|
|
44
48
|
attempt: zod_1.z.number().int().min(1),
|
|
45
49
|
kind: zod_1.z.nativeEnum(enums_1.DecisionKind),
|
|
46
50
|
settlement: zod_1.z.nativeEnum(enums_1.DecisionSettlement),
|
|
@@ -48,20 +52,29 @@ exports.DecisionOpenedEventSchema = zod_1.z
|
|
|
48
52
|
summary: zod_1.z.string().optional(),
|
|
49
53
|
deepLink: zod_1.z.string().optional(),
|
|
50
54
|
subjectResourceRef: zod_1.z.string().min(1),
|
|
51
|
-
subjectClassification: zod_1.z.nativeEnum(enums_1.DecisionSubjectClassification),
|
|
52
55
|
producerService: zod_1.z.string().min(1),
|
|
53
56
|
producerRef: zod_1.z.string().optional(),
|
|
54
|
-
|
|
55
|
-
answerRestriction: zod_1.z.nativeEnum(enums_1.DecisionAnswerRestriction),
|
|
56
|
-
recipients: zod_1.z.array(exports.DecisionRecipientSchema),
|
|
57
|
+
...DecisionAudienceShape,
|
|
57
58
|
deadlineAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
58
59
|
deadlineEffect: zod_1.z.nativeEnum(enums_1.DecisionDeadlineEffect),
|
|
59
60
|
options: zod_1.z.array(exports.DecisionEventOptionSchema).min(1),
|
|
60
61
|
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
61
62
|
})
|
|
62
63
|
.strict();
|
|
63
|
-
exports.
|
|
64
|
+
exports.DecisionEscalatedEventSchema = zod_1.z
|
|
64
65
|
.object({
|
|
66
|
+
decisionId: zod_1.z.string().min(1),
|
|
67
|
+
orgId: zod_1.z.string().min(1),
|
|
68
|
+
attempt: zod_1.z.number().int().min(1),
|
|
69
|
+
producerService: zod_1.z.string().min(1),
|
|
70
|
+
producerRef: zod_1.z.string().optional(),
|
|
71
|
+
level: zod_1.z.number().int().min(1),
|
|
72
|
+
...DecisionAudienceShape,
|
|
73
|
+
deadlineAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
74
|
+
revision: zod_1.z.number().int().min(0),
|
|
75
|
+
})
|
|
76
|
+
.strict();
|
|
77
|
+
const DecisionCommittedEventBaseShape = {
|
|
65
78
|
decisionId: zod_1.z.string().min(1),
|
|
66
79
|
orgId: zod_1.z.string().min(1),
|
|
67
80
|
attempt: zod_1.z.number().int().min(1),
|
|
@@ -72,13 +85,23 @@ exports.DecisionCommittedEventSchema = zod_1.z
|
|
|
72
85
|
effect: zod_1.z.nativeEnum(enums_1.DecisionOptionEffect),
|
|
73
86
|
committedBy: zod_1.z.string().min(1),
|
|
74
87
|
committedAt: zod_1.z.string().datetime({ offset: true }),
|
|
75
|
-
settled: zod_1.z.boolean(),
|
|
76
|
-
storedState: zod_1.z.nativeEnum(enums_1.DecisionStoredState),
|
|
77
|
-
outcome: zod_1.z.nativeEnum(status_1.DecisionOutcome).optional(),
|
|
78
|
-
settledAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
79
88
|
revision: zod_1.z.number().int().min(0),
|
|
80
|
-
}
|
|
81
|
-
|
|
89
|
+
};
|
|
90
|
+
exports.DecisionCommittedEventSchema = zod_1.z.discriminatedUnion('settled', [
|
|
91
|
+
zod_1.z
|
|
92
|
+
.object({
|
|
93
|
+
...DecisionCommittedEventBaseShape,
|
|
94
|
+
settled: zod_1.z.literal(true),
|
|
95
|
+
outcome: zod_1.z.nativeEnum(status_1.DecisionOutcome),
|
|
96
|
+
})
|
|
97
|
+
.strict(),
|
|
98
|
+
zod_1.z
|
|
99
|
+
.object({
|
|
100
|
+
...DecisionCommittedEventBaseShape,
|
|
101
|
+
settled: zod_1.z.literal(false),
|
|
102
|
+
})
|
|
103
|
+
.strict(),
|
|
104
|
+
]);
|
|
82
105
|
exports.DecisionClosedEventSchema = zod_1.z
|
|
83
106
|
.object({
|
|
84
107
|
decisionId: zod_1.z.string().min(1),
|
|
@@ -86,9 +109,8 @@ exports.DecisionClosedEventSchema = zod_1.z
|
|
|
86
109
|
attempt: zod_1.z.number().int().min(1),
|
|
87
110
|
producerService: zod_1.z.string().min(1),
|
|
88
111
|
producerRef: zod_1.z.string().optional(),
|
|
89
|
-
producerOutcome: zod_1.z.nativeEnum(status_1.DecisionOutcome),
|
|
90
112
|
outcome: zod_1.z.nativeEnum(status_1.DecisionOutcome),
|
|
91
|
-
closedReason: zod_1.z.string().optional(),
|
|
113
|
+
closedReason: zod_1.z.string().min(1).optional(),
|
|
92
114
|
closedAt: zod_1.z.string().datetime({ offset: true }),
|
|
93
115
|
revision: zod_1.z.number().int().min(0),
|
|
94
116
|
})
|
|
@@ -103,7 +125,6 @@ exports.CommitRetractedEventSchema = zod_1.z
|
|
|
103
125
|
commitId: zod_1.z.string().min(1),
|
|
104
126
|
optionKey: zod_1.z.string().min(1),
|
|
105
127
|
effect: zod_1.z.nativeEnum(enums_1.DecisionOptionEffect),
|
|
106
|
-
committedBy: zod_1.z.string().min(1),
|
|
107
128
|
retractedBy: zod_1.z.string().min(1),
|
|
108
129
|
retractedAt: zod_1.z.string().datetime({ offset: true }),
|
|
109
130
|
revision: zod_1.z.number().int().min(0),
|
|
@@ -118,6 +139,7 @@ exports.DECISION_EVENT_PAYLOAD_SCHEMAS = {
|
|
|
118
139
|
[DecisionEventType.DecisionOpened]: exports.DecisionOpenedEventSchema,
|
|
119
140
|
[DecisionEventType.DecisionCommitted]: exports.DecisionCommittedEventSchema,
|
|
120
141
|
[DecisionEventType.DecisionClosed]: exports.DecisionClosedEventSchema,
|
|
142
|
+
[DecisionEventType.DecisionEscalated]: exports.DecisionEscalatedEventSchema,
|
|
121
143
|
[DecisionEventType.CommitRetracted]: exports.CommitRetractedEventSchema,
|
|
122
144
|
[DecisionEventType.DecisionAnnounced]: exports.DecisionAnnouncedEventSchema,
|
|
123
145
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/decision/lib/events.ts"],"names":[],"mappings":";;;AAuBA,6BAAwB;AAExB,
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/decision/lib/events.ts"],"names":[],"mappings":";;;AAuBA,6BAAwB;AAExB,mCAOiB;AACjB,qCAA2C;AAM3C,IAAY,iBAiBX;AAjBD,WAAY,iBAAiB;IAE3B,gEAA2C,CAAA;IAE3C,sEAAiD,CAAA;IAEjD,gEAA2C,CAAA;IAE3C,sEAAiD,CAAA;IAEjD,kEAA6C,CAAA;IAM7C,sEAAiD,C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E,CAAC,GAAG,CAAC,CAAC,CAAC;CAClC,CAAC;KACD,MAAM,EAAE,CAAC;AA8BC,QAAA,4BAA4B,GAAG,OAAC;KAC1C,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACzB,CAAC;KACD,MAAM,EAAE,CAAC;AAUC,QAAA,8BAA8B,GAAG;IAC5C,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,iCAAyB;IAC7D,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,oCAA4B;IACnE,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,iCAAyB;IAC7D,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,oCAA4B;IACnE,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,kCAA0B;IAC/D,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,EAAE,oCAA4B;CACT,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface DecisionAttemptFact {
|
|
2
|
+
readonly attempt: number;
|
|
3
|
+
readonly answerable: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare enum DecisionOpenResolutionKind {
|
|
6
|
+
ReturnExisting = "RETURN_EXISTING",
|
|
7
|
+
OpenNew = "OPEN_NEW",
|
|
8
|
+
RefusePreviousStillAnswerable = "REFUSE_PREVIOUS_STILL_ANSWERABLE",
|
|
9
|
+
RefuseAttemptGap = "REFUSE_ATTEMPT_GAP"
|
|
10
|
+
}
|
|
11
|
+
export type DecisionOpenResolution = {
|
|
12
|
+
readonly kind: DecisionOpenResolutionKind.ReturnExisting;
|
|
13
|
+
readonly attempt: number;
|
|
14
|
+
} | {
|
|
15
|
+
readonly kind: DecisionOpenResolutionKind.OpenNew;
|
|
16
|
+
readonly attempt: number;
|
|
17
|
+
} | {
|
|
18
|
+
readonly kind: DecisionOpenResolutionKind.RefusePreviousStillAnswerable;
|
|
19
|
+
readonly previousAttempt: number;
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: DecisionOpenResolutionKind.RefuseAttemptGap;
|
|
22
|
+
readonly nextAttempt: number;
|
|
23
|
+
};
|
|
24
|
+
export declare function resolveDecisionOpen(requestedAttempt: number, latest: DecisionAttemptFact | null): DecisionOpenResolution;
|
|
25
|
+
//# sourceMappingURL=open-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-identity.d.ts","sourceRoot":"","sources":["../../../src/decision/lib/open-identity.ts"],"names":[],"mappings":"AAgCA,MAAM,WAAW,mBAAmB;IAElC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAGD,oBAAY,0BAA0B;IAEpC,cAAc,oBAAoB;IAElC,OAAO,aAAa;IAEpB,6BAA6B,qCAAqC;IAElE,gBAAgB,uBAAuB;CACxC;AAED,MAAM,MAAM,sBAAsB,GAC9B;IACE,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC,cAAc,CAAC;IACzD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC/E;IACE,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC,6BAA6B,CAAC;IACxE,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC,gBAAgB,CAAC;IAC3D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAAC;AAMN,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,MAAM,EACxB,MAAM,EAAE,mBAAmB,GAAG,IAAI,GACjC,sBAAsB,CA+BxB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DecisionOpenResolutionKind = void 0;
|
|
4
|
+
exports.resolveDecisionOpen = resolveDecisionOpen;
|
|
5
|
+
var DecisionOpenResolutionKind;
|
|
6
|
+
(function (DecisionOpenResolutionKind) {
|
|
7
|
+
DecisionOpenResolutionKind["ReturnExisting"] = "RETURN_EXISTING";
|
|
8
|
+
DecisionOpenResolutionKind["OpenNew"] = "OPEN_NEW";
|
|
9
|
+
DecisionOpenResolutionKind["RefusePreviousStillAnswerable"] = "REFUSE_PREVIOUS_STILL_ANSWERABLE";
|
|
10
|
+
DecisionOpenResolutionKind["RefuseAttemptGap"] = "REFUSE_ATTEMPT_GAP";
|
|
11
|
+
})(DecisionOpenResolutionKind || (exports.DecisionOpenResolutionKind = DecisionOpenResolutionKind = {}));
|
|
12
|
+
function resolveDecisionOpen(requestedAttempt, latest) {
|
|
13
|
+
if (!Number.isInteger(requestedAttempt) || requestedAttempt < 1) {
|
|
14
|
+
throw new RangeError(`resolveDecisionOpen: attempt must be an integer >= 1, got ${String(requestedAttempt)}.`);
|
|
15
|
+
}
|
|
16
|
+
if (latest !== null && (!Number.isInteger(latest.attempt) || latest.attempt < 1)) {
|
|
17
|
+
throw new RangeError(`resolveDecisionOpen: the latest attempt must be an integer >= 1, got ${String(latest.attempt)}.`);
|
|
18
|
+
}
|
|
19
|
+
const latestAttempt = latest === null ? 0 : latest.attempt;
|
|
20
|
+
if (requestedAttempt <= latestAttempt) {
|
|
21
|
+
return {
|
|
22
|
+
kind: DecisionOpenResolutionKind.ReturnExisting,
|
|
23
|
+
attempt: requestedAttempt,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (requestedAttempt > latestAttempt + 1) {
|
|
27
|
+
return {
|
|
28
|
+
kind: DecisionOpenResolutionKind.RefuseAttemptGap,
|
|
29
|
+
nextAttempt: latestAttempt + 1,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
if (latest !== null && latest.answerable) {
|
|
33
|
+
return {
|
|
34
|
+
kind: DecisionOpenResolutionKind.RefusePreviousStillAnswerable,
|
|
35
|
+
previousAttempt: latest.attempt,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return { kind: DecisionOpenResolutionKind.OpenNew, attempt: requestedAttempt };
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=open-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-identity.js","sourceRoot":"","sources":["../../../src/decision/lib/open-identity.ts"],"names":[],"mappings":";;;AAsEA,kDAkCC;AAhED,IAAY,0BASX;AATD,WAAY,0BAA0B;IAEpC,gEAAkC,CAAA;IAElC,kDAAoB,CAAA;IAEpB,gGAAkE,CAAA;IAElE,qEAAuC,CAAA;AACzC,CAAC,EATW,0BAA0B,0CAA1B,0BAA0B,QASrC;AAqBD,SAAgB,mBAAmB,CACjC,gBAAwB,EACxB,MAAkC;IAElC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,GAAG,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,UAAU,CAClB,6DAA6D,MAAM,CAAC,gBAAgB,CAAC,GAAG,CACzF,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,EAAE,CAAC;QACjF,MAAM,IAAI,UAAU,CAClB,wEAAwE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAClG,CAAC;IACJ,CAAC;IACD,MAAM,aAAa,GAAG,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;IAC3D,IAAI,gBAAgB,IAAI,aAAa,EAAE,CAAC;QACtC,OAAO;YACL,IAAI,EAAE,0BAA0B,CAAC,cAAc;YAC/C,OAAO,EAAE,gBAAgB;SAC1B,CAAC;IACJ,CAAC;IACD,IAAI,gBAAgB,GAAG,aAAa,GAAG,CAAC,EAAE,CAAC;QACzC,OAAO;YACL,IAAI,EAAE,0BAA0B,CAAC,gBAAgB;YACjD,WAAW,EAAE,aAAa,GAAG,CAAC;SAC/B,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACzC,OAAO;YACL,IAAI,EAAE,0BAA0B,CAAC,6BAA6B;YAC9D,eAAe,EAAE,MAAM,CAAC,OAAO;SAChC,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,0BAA0B,CAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;AACjF,CAAC"}
|
|
@@ -27,6 +27,7 @@ export declare const DeclaredDecisionOptionSchema: z.ZodObject<{
|
|
|
27
27
|
export type DeclaredDecisionOption = z.infer<typeof DeclaredDecisionOptionSchema>;
|
|
28
28
|
export declare const OpenDecisionRequestSchema: z.ZodObject<{
|
|
29
29
|
idempotencyKey: z.ZodString;
|
|
30
|
+
attempt: z.ZodDefault<z.ZodNumber>;
|
|
30
31
|
kind: z.ZodEnum<typeof DecisionKind>;
|
|
31
32
|
settlement: z.ZodDefault<z.ZodEnum<typeof DecisionSettlement>>;
|
|
32
33
|
title: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-request.d.ts","sourceRoot":"","sources":["../../../src/decision/lib/open-request.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAQjB,eAAO,MAAM,2BAA2B,QAAgC,CAAC;AASzE,eAAO,MAAM,sBAAsB,wCAA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BA4C9B,CAAC;AACZ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAYF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8K3B,CAAC;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAG5E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,yBAAyB,CACjC,CAAC"}
|
|
@@ -48,6 +48,7 @@ exports.DeclaredDecisionOptionSchema = zod_1.z
|
|
|
48
48
|
exports.OpenDecisionRequestSchema = zod_1.z
|
|
49
49
|
.object({
|
|
50
50
|
idempotencyKey: zod_1.z.string().min(1).max(512),
|
|
51
|
+
attempt: zod_1.z.number().int().min(1).default(1),
|
|
51
52
|
kind: zod_1.z.nativeEnum(enums_1.DecisionKind),
|
|
52
53
|
settlement: zod_1.z
|
|
53
54
|
.nativeEnum(enums_1.DecisionSettlement)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-request.js","sourceRoot":"","sources":["../../../src/decision/lib/open-request.ts"],"names":[],"mappings":";;;AAeA,6BAAwB;AAExB,6CAAoD;AACpD,2CAA8C;AAC9C,iDAAmD;AAEnD,mCAQiB;AACjB,2CAAqD;AAOxC,QAAA,2BAA2B,GAAG,6BAA6B,CAAC;AAS5D,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAW3D,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,CAAC;IACN,K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E,OAAC;SAC/B,MAAM,EAAE;SACR,KAAK,CAAC,mCAA2B,CAAC;SAClC,QAAQ,EAAE;IAOb,eAAe,EAAE,8BAAsB,CAAC,QAAQ,EAAE;IAClD,iBAAiB,EAAE,OAAC;SACjB,UAAU,CAAC,iCAAyB,CAAC;SACrC,OAAO,CAAC,iCAAyB,CAAC,aAAa,CAAC;IAEnD,cAAc,EAAE,OAAC,CAAC,UAAU,CAAC,uBAAe,CAAC,CAAC,QAAQ,EAAE;IAOxD,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAO7C,iBAAiB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAM5C,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5D,cAAc,EAAE,OAAC;SACd,UAAU,CAAC,8BAAsB,CAAC;SAClC,OAAO,CAAC,8BAAsB,CAAC,KAAK,CAAC;IAOxC,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,oCAA4B,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACnE,CAAC;KACD,MAAM,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.88.0",
|
|
4
4
|
"description": "Consolidated Xema kernel wire contracts — pure types + zod schemas for the kernel protocol surfaces. One package, one npm scope, wildcard per-surface subpath exports. No framework deps; the one runtime dependency beside zod is the OpenFGA syntax transformer the authorization-module composer runs.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Neuralchowder Inc. <developer@xema.dev> (https://xema.dev)",
|
|
@@ -68,6 +68,6 @@
|
|
|
68
68
|
"test:authorization-models": "node scripts/run-authorization-model-tests.mjs"
|
|
69
69
|
},
|
|
70
70
|
"xemaRelease": {
|
|
71
|
-
"sourceDigest": "sha256:
|
|
71
|
+
"sourceDigest": "sha256:1223c4c00dece8440fe6fb1d71ab7f8407c80bdcf0d529d91c87d810d4be2abf"
|
|
72
72
|
}
|
|
73
73
|
}
|