@voltro/protocol 0.84.0 → 0.85.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/CHANGELOG.md +549 -0
- package/THIRD-PARTY-NOTICES.md +1 -57
- package/dist/apikey.d.ts +32 -34
- package/dist/index.d.ts +1273 -1349
- package/dist/index.js +1022 -733
- package/dist/inspect.d.ts +88 -88
- package/dist/inspect.js +103 -53
- package/dist/jwt.d.ts +32 -34
- package/dist/rest.d.ts +72 -57
- package/dist/rest.js +287 -208
- package/dist/{restFormat-EZ8k9ZcQ.js → restFormat-BlgTLxm1.js} +108 -114
- package/dist/{scopes-Di756ENh.js → scopes-ClywBij8.js} +167 -137
- package/dist/session.d.ts +90 -96
- package/dist/session.js +1 -1
- package/package.json +4 -8
package/dist/inspect.d.ts
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
import { ParseOptions } from 'effect/SchemaAST';
|
|
2
2
|
import { Schema } from 'effect';
|
|
3
3
|
|
|
4
|
-
export declare const decodeInspectBackfillInput: (
|
|
4
|
+
export declare const decodeInspectBackfillInput: (input: unknown, options?: ParseOptions) => {
|
|
5
|
+
readonly requestId: string;
|
|
5
6
|
readonly name: string;
|
|
6
7
|
readonly from: string;
|
|
7
|
-
readonly limit: number;
|
|
8
8
|
readonly to: string;
|
|
9
|
-
readonly requestId: string;
|
|
10
9
|
readonly confirm: boolean;
|
|
10
|
+
readonly limit: number;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export declare type InspectBackfillInput = typeof InspectBackfillInputSchema.Type;
|
|
14
14
|
|
|
15
15
|
export declare const InspectBackfillInputSchema: Schema.Struct<{
|
|
16
|
-
requestId: Schema.
|
|
17
|
-
name: Schema.
|
|
18
|
-
from: Schema.
|
|
19
|
-
to: Schema.
|
|
20
|
-
confirm:
|
|
21
|
-
limit: Schema.
|
|
16
|
+
readonly requestId: Schema.String;
|
|
17
|
+
readonly name: Schema.String;
|
|
18
|
+
readonly from: Schema.String;
|
|
19
|
+
readonly to: Schema.String;
|
|
20
|
+
readonly confirm: Schema.Boolean;
|
|
21
|
+
readonly limit: Schema.Number;
|
|
22
22
|
}>;
|
|
23
23
|
|
|
24
24
|
export declare type InspectBackfillReceipt = typeof InspectBackfillReceiptSchema.Type;
|
|
25
25
|
|
|
26
26
|
export declare const InspectBackfillReceiptSchema: Schema.Struct<{
|
|
27
|
-
id: Schema.
|
|
28
|
-
name: Schema.
|
|
29
|
-
from: Schema.
|
|
30
|
-
to: Schema.
|
|
31
|
-
occurrences: Schema
|
|
32
|
-
status: Schema.
|
|
33
|
-
owner: Schema.NullOr<
|
|
34
|
-
createdAt: Schema.
|
|
35
|
-
updatedAt: Schema.
|
|
36
|
-
cursor:
|
|
37
|
-
activeIndex: Schema.NullOr<
|
|
38
|
-
results: Schema
|
|
39
|
-
runId: Schema.
|
|
40
|
-
status: Schema.
|
|
27
|
+
readonly id: Schema.String;
|
|
28
|
+
readonly name: Schema.String;
|
|
29
|
+
readonly from: Schema.String;
|
|
30
|
+
readonly to: Schema.String;
|
|
31
|
+
readonly occurrences: Schema.$Array<Schema.Number>;
|
|
32
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "interrupted"]>;
|
|
33
|
+
readonly owner: Schema.NullOr<Schema.String>;
|
|
34
|
+
readonly createdAt: Schema.String;
|
|
35
|
+
readonly updatedAt: Schema.String;
|
|
36
|
+
readonly cursor: Schema.Number;
|
|
37
|
+
readonly activeIndex: Schema.NullOr<Schema.Number>;
|
|
38
|
+
readonly results: Schema.$Array<Schema.Struct<{
|
|
39
|
+
readonly runId: Schema.String;
|
|
40
|
+
readonly status: Schema.Literals<readonly ["succeeded", "failed", "skipped", "missed"]>;
|
|
41
41
|
}>>;
|
|
42
|
-
error: Schema.NullOr<
|
|
42
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
43
43
|
}>;
|
|
44
44
|
|
|
45
45
|
export declare type InspectBackfillResult = typeof InspectBackfillResultSchema.Type;
|
|
46
46
|
|
|
47
|
-
export declare const InspectBackfillResultSchema: Schema.Union<[Schema.Struct<{
|
|
48
|
-
kind: Schema.Literal<
|
|
49
|
-
request: Schema.Struct<{
|
|
50
|
-
id: Schema.
|
|
51
|
-
name: Schema.
|
|
52
|
-
from: Schema.
|
|
53
|
-
to: Schema.
|
|
54
|
-
occurrences: Schema
|
|
55
|
-
status: Schema.
|
|
56
|
-
owner: Schema.NullOr<
|
|
57
|
-
createdAt: Schema.
|
|
58
|
-
updatedAt: Schema.
|
|
59
|
-
cursor:
|
|
60
|
-
activeIndex: Schema.NullOr<
|
|
61
|
-
results: Schema
|
|
62
|
-
runId: Schema.
|
|
63
|
-
status: Schema.
|
|
47
|
+
export declare const InspectBackfillResultSchema: Schema.Union<readonly [Schema.Struct<{
|
|
48
|
+
readonly kind: Schema.Literal<"accepted">;
|
|
49
|
+
readonly request: Schema.Struct<{
|
|
50
|
+
readonly id: Schema.String;
|
|
51
|
+
readonly name: Schema.String;
|
|
52
|
+
readonly from: Schema.String;
|
|
53
|
+
readonly to: Schema.String;
|
|
54
|
+
readonly occurrences: Schema.$Array<Schema.Number>;
|
|
55
|
+
readonly status: Schema.Literals<readonly ["queued", "running", "completed", "interrupted"]>;
|
|
56
|
+
readonly owner: Schema.NullOr<Schema.String>;
|
|
57
|
+
readonly createdAt: Schema.String;
|
|
58
|
+
readonly updatedAt: Schema.String;
|
|
59
|
+
readonly cursor: Schema.Number;
|
|
60
|
+
readonly activeIndex: Schema.NullOr<Schema.Number>;
|
|
61
|
+
readonly results: Schema.$Array<Schema.Struct<{
|
|
62
|
+
readonly runId: Schema.String;
|
|
63
|
+
readonly status: Schema.Literals<readonly ["succeeded", "failed", "skipped", "missed"]>;
|
|
64
64
|
}>>;
|
|
65
|
-
error: Schema.NullOr<
|
|
65
|
+
readonly error: Schema.NullOr<Schema.String>;
|
|
66
66
|
}>;
|
|
67
67
|
}>, Schema.Struct<{
|
|
68
|
-
kind: Schema.Literal<
|
|
69
|
-
name: Schema.
|
|
70
|
-
occurrences:
|
|
71
|
-
reason:
|
|
68
|
+
readonly kind: Schema.Literal<"refused">;
|
|
69
|
+
readonly name: Schema.String;
|
|
70
|
+
readonly occurrences: Schema.Number;
|
|
71
|
+
readonly reason: Schema.String;
|
|
72
72
|
}>]>;
|
|
73
73
|
|
|
74
74
|
export declare type InspectCommandRejection = typeof InspectCommandRejectionSchema.Type;
|
|
@@ -78,9 +78,9 @@ export declare const inspectCommandRejection: (status: number, message: string)
|
|
|
78
78
|
/** Explicit non-acceptance from an Inspect command endpoint. Transport errors,
|
|
79
79
|
* conflicts with an earlier request and server failures are not this outcome. */
|
|
80
80
|
export declare const InspectCommandRejectionSchema: Schema.Struct<{
|
|
81
|
-
kind: Schema.Literal<
|
|
82
|
-
status: Schema.
|
|
83
|
-
message:
|
|
81
|
+
readonly kind: Schema.Literal<"rejected">;
|
|
82
|
+
readonly status: Schema.Literals<readonly [400, 401, 403, 404]>;
|
|
83
|
+
readonly message: Schema.String;
|
|
84
84
|
}>;
|
|
85
85
|
|
|
86
86
|
export declare type InspectReplicaSelection = {
|
|
@@ -94,75 +94,75 @@ export declare type InspectWorkflowExecutionObservation = typeof InspectWorkflow
|
|
|
94
94
|
|
|
95
95
|
/** A projection of engine evidence, not a run-row or recorder-entry claim.
|
|
96
96
|
* Deliberately excludes payloads, outputs, raw causes and journal identifiers. */
|
|
97
|
-
export declare const InspectWorkflowExecutionObservationSchema: Schema.Union<[Schema.Struct<{
|
|
98
|
-
kind: Schema.Literal<
|
|
99
|
-
workflowName: Schema.
|
|
100
|
-
executionId: Schema.
|
|
97
|
+
export declare const InspectWorkflowExecutionObservationSchema: Schema.Union<readonly [Schema.Struct<{
|
|
98
|
+
readonly kind: Schema.Literal<"not-observed">;
|
|
99
|
+
readonly workflowName: Schema.NonEmptyString;
|
|
100
|
+
readonly executionId: Schema.NonEmptyString;
|
|
101
101
|
}>, Schema.Struct<{
|
|
102
|
-
kind: Schema.Literal<
|
|
103
|
-
workflowName: Schema.
|
|
104
|
-
executionId: Schema.
|
|
102
|
+
readonly kind: Schema.Literal<"pending">;
|
|
103
|
+
readonly workflowName: Schema.NonEmptyString;
|
|
104
|
+
readonly executionId: Schema.NonEmptyString;
|
|
105
105
|
}>, Schema.Struct<{
|
|
106
|
-
kind: Schema.Literal<
|
|
107
|
-
workflowName: Schema.
|
|
108
|
-
executionId: Schema.
|
|
106
|
+
readonly kind: Schema.Literal<"delivery-failed">;
|
|
107
|
+
readonly workflowName: Schema.NonEmptyString;
|
|
108
|
+
readonly executionId: Schema.NonEmptyString;
|
|
109
109
|
}>, Schema.Struct<{
|
|
110
|
-
kind: Schema.Literal<
|
|
111
|
-
workflowName: Schema.
|
|
112
|
-
executionId: Schema.
|
|
110
|
+
readonly kind: Schema.Literal<"suspended">;
|
|
111
|
+
readonly workflowName: Schema.NonEmptyString;
|
|
112
|
+
readonly executionId: Schema.NonEmptyString;
|
|
113
113
|
}>, Schema.Struct<{
|
|
114
|
-
kind: Schema.Literal<
|
|
115
|
-
outcome: Schema.
|
|
116
|
-
workflowName: Schema.
|
|
117
|
-
executionId: Schema.
|
|
114
|
+
readonly kind: Schema.Literal<"completed">;
|
|
115
|
+
readonly outcome: Schema.Literals<readonly ["succeeded", "failed", "cancelled"]>;
|
|
116
|
+
readonly workflowName: Schema.NonEmptyString;
|
|
117
|
+
readonly executionId: Schema.NonEmptyString;
|
|
118
118
|
}>]>;
|
|
119
119
|
|
|
120
120
|
export declare type InspectWorkflowExecutionTarget = typeof InspectWorkflowExecutionTargetSchema.Type;
|
|
121
121
|
|
|
122
122
|
/** Read an existing execution identity; this is never a start command. */
|
|
123
123
|
export declare const InspectWorkflowExecutionTargetSchema: Schema.Struct<{
|
|
124
|
-
workflowName: Schema.
|
|
125
|
-
executionId: Schema.
|
|
124
|
+
readonly workflowName: Schema.NonEmptyString;
|
|
125
|
+
readonly executionId: Schema.NonEmptyString;
|
|
126
126
|
}>;
|
|
127
127
|
|
|
128
128
|
export declare type InspectWorkflowQueuedStartObservation = typeof InspectWorkflowQueuedStartObservationSchema.Type;
|
|
129
129
|
|
|
130
130
|
/** Read-only admission evidence. Accepted means an execution exists, not that it succeeded. */
|
|
131
|
-
export declare const InspectWorkflowQueuedStartObservationSchema: Schema.Union<[Schema.Struct<{
|
|
132
|
-
kind: Schema.Literal<
|
|
133
|
-
workflowName: Schema.
|
|
134
|
-
receiptId: Schema.
|
|
135
|
-
tenantId: Schema.NullOr<Schema.
|
|
131
|
+
export declare const InspectWorkflowQueuedStartObservationSchema: Schema.Union<readonly [Schema.Struct<{
|
|
132
|
+
readonly kind: Schema.Literal<"pending">;
|
|
133
|
+
readonly workflowName: Schema.NonEmptyString;
|
|
134
|
+
readonly receiptId: Schema.NonEmptyString;
|
|
135
|
+
readonly tenantId: Schema.NullOr<Schema.NonEmptyString>;
|
|
136
136
|
}>, Schema.Struct<{
|
|
137
|
-
kind: Schema.Literal<
|
|
138
|
-
executionId: Schema.
|
|
139
|
-
workflowName: Schema.
|
|
140
|
-
receiptId: Schema.
|
|
141
|
-
tenantId: Schema.NullOr<Schema.
|
|
137
|
+
readonly kind: Schema.Literal<"accepted">;
|
|
138
|
+
readonly executionId: Schema.NonEmptyString;
|
|
139
|
+
readonly workflowName: Schema.NonEmptyString;
|
|
140
|
+
readonly receiptId: Schema.NonEmptyString;
|
|
141
|
+
readonly tenantId: Schema.NullOr<Schema.NonEmptyString>;
|
|
142
142
|
}>, Schema.Struct<{
|
|
143
|
-
kind: Schema.Literal<
|
|
144
|
-
reason: Schema.
|
|
145
|
-
workflowName: Schema.
|
|
146
|
-
receiptId: Schema.
|
|
147
|
-
tenantId: Schema.NullOr<Schema.
|
|
143
|
+
readonly kind: Schema.Literal<"not-executed">;
|
|
144
|
+
readonly reason: Schema.Literals<readonly ["dropped", "skipped", "superseded", "cancelled", "abandoned", "rejected"]>;
|
|
145
|
+
readonly workflowName: Schema.NonEmptyString;
|
|
146
|
+
readonly receiptId: Schema.NonEmptyString;
|
|
147
|
+
readonly tenantId: Schema.NullOr<Schema.NonEmptyString>;
|
|
148
148
|
}>]>;
|
|
149
149
|
|
|
150
150
|
export declare type InspectWorkflowQueuedStartTarget = typeof InspectWorkflowQueuedStartTargetSchema.Type;
|
|
151
151
|
|
|
152
152
|
/** A caller receipt, never an execution or a reusable admission slot. */
|
|
153
153
|
export declare const InspectWorkflowQueuedStartTargetSchema: Schema.Struct<{
|
|
154
|
-
workflowName: Schema.
|
|
155
|
-
receiptId: Schema.
|
|
156
|
-
tenantId: Schema.NullOr<Schema.
|
|
154
|
+
readonly workflowName: Schema.NonEmptyString;
|
|
155
|
+
readonly receiptId: Schema.NonEmptyString;
|
|
156
|
+
readonly tenantId: Schema.NullOr<Schema.NonEmptyString>;
|
|
157
157
|
}>;
|
|
158
158
|
|
|
159
159
|
export declare class InvalidReplicaSelection extends Error {
|
|
160
160
|
readonly name = "InvalidReplicaSelection";
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
export declare const isInspectCommandRejection: (
|
|
164
|
-
readonly status: 400 | 401 | 403 | 404;
|
|
163
|
+
export declare const isInspectCommandRejection: <I>(input: I) => input is I & {
|
|
165
164
|
readonly kind: "rejected";
|
|
165
|
+
readonly status: 400 | 401 | 403 | 404;
|
|
166
166
|
readonly message: string;
|
|
167
167
|
};
|
|
168
168
|
|
package/dist/inspect.js
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
1
|
import { Schema as e } from "effect";
|
|
2
2
|
//#region src/inspectWorkflowQueuedStart.ts
|
|
3
|
-
var t = e.NonEmptyString.pipe(e.
|
|
3
|
+
var t = e.NonEmptyString.pipe(e.check(e.isMaxLength(1024)), e.check(e.makeFilter((e) => e.trim().length > 0 && !/[\u0000-\u001f\u007f]/.test(e)))), n = e.Struct({
|
|
4
4
|
workflowName: t,
|
|
5
5
|
receiptId: t,
|
|
6
6
|
tenantId: e.NullOr(t)
|
|
7
|
-
}), r = n.fields, i = e.Union(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
}), r = n.fields, i = e.Union([
|
|
8
|
+
e.Struct({
|
|
9
|
+
...r,
|
|
10
|
+
kind: e.Literal("pending")
|
|
11
|
+
}),
|
|
12
|
+
e.Struct({
|
|
13
|
+
...r,
|
|
14
|
+
kind: e.Literal("accepted"),
|
|
15
|
+
executionId: t
|
|
16
|
+
}),
|
|
17
|
+
e.Struct({
|
|
18
|
+
...r,
|
|
19
|
+
kind: e.Literal("not-executed"),
|
|
20
|
+
reason: e.Literals([
|
|
21
|
+
"dropped",
|
|
22
|
+
"skipped",
|
|
23
|
+
"superseded",
|
|
24
|
+
"cancelled",
|
|
25
|
+
"abandoned",
|
|
26
|
+
"rejected"
|
|
27
|
+
])
|
|
28
|
+
})
|
|
29
|
+
]), a = e.Struct({
|
|
19
30
|
kind: e.Literal("rejected"),
|
|
20
|
-
status: e.
|
|
31
|
+
status: e.Literals([
|
|
32
|
+
400,
|
|
33
|
+
401,
|
|
34
|
+
403,
|
|
35
|
+
404
|
|
36
|
+
]),
|
|
21
37
|
message: e.String
|
|
22
38
|
}), o = e.is(a), s = (e, t) => {
|
|
23
39
|
let n = {
|
|
@@ -26,13 +42,18 @@ var t = e.NonEmptyString.pipe(e.maxLength(1024), e.filter((e) => e.trim().length
|
|
|
26
42
|
message: t
|
|
27
43
|
};
|
|
28
44
|
return o(n) ? n : void 0;
|
|
29
|
-
}, c = e.String.pipe(e.
|
|
45
|
+
}, c = e.String.pipe(e.check(e.makeFilter((e) => Number.isFinite(Date.parse(e))))), l = e.String.pipe(e.check(e.isMinLength(1)), e.check(e.isMaxLength(256))), u = e.Struct({
|
|
30
46
|
id: l,
|
|
31
47
|
name: l,
|
|
32
48
|
from: c,
|
|
33
49
|
to: c,
|
|
34
50
|
occurrences: e.Array(e.Number),
|
|
35
|
-
status: e.
|
|
51
|
+
status: e.Literals([
|
|
52
|
+
"queued",
|
|
53
|
+
"running",
|
|
54
|
+
"completed",
|
|
55
|
+
"interrupted"
|
|
56
|
+
]),
|
|
36
57
|
owner: e.NullOr(e.String),
|
|
37
58
|
createdAt: c,
|
|
38
59
|
updatedAt: c,
|
|
@@ -40,7 +61,12 @@ var t = e.NonEmptyString.pipe(e.maxLength(1024), e.filter((e) => e.trim().length
|
|
|
40
61
|
activeIndex: e.NullOr(e.Number),
|
|
41
62
|
results: e.Array(e.Struct({
|
|
42
63
|
runId: l,
|
|
43
|
-
status: e.
|
|
64
|
+
status: e.Literals([
|
|
65
|
+
"succeeded",
|
|
66
|
+
"failed",
|
|
67
|
+
"skipped",
|
|
68
|
+
"missed"
|
|
69
|
+
])
|
|
44
70
|
})),
|
|
45
71
|
error: e.NullOr(e.String)
|
|
46
72
|
}), d = e.Struct({
|
|
@@ -49,8 +75,11 @@ var t = e.NonEmptyString.pipe(e.maxLength(1024), e.filter((e) => e.trim().length
|
|
|
49
75
|
from: c,
|
|
50
76
|
to: c,
|
|
51
77
|
confirm: e.Boolean,
|
|
52
|
-
limit: e.Number.pipe(e.
|
|
53
|
-
|
|
78
|
+
limit: e.Number.pipe(e.check(e.isInt()), e.check(e.isBetween({
|
|
79
|
+
minimum: 1,
|
|
80
|
+
maximum: 1e4
|
|
81
|
+
})))
|
|
82
|
+
}), f = e.decodeUnknownSync(d), p = e.Union([e.Struct({
|
|
54
83
|
kind: e.Literal("accepted"),
|
|
55
84
|
request: u
|
|
56
85
|
}), e.Struct({
|
|
@@ -58,28 +87,38 @@ var t = e.NonEmptyString.pipe(e.maxLength(1024), e.filter((e) => e.trim().length
|
|
|
58
87
|
name: l,
|
|
59
88
|
occurrences: e.Number,
|
|
60
89
|
reason: e.String
|
|
61
|
-
})), m = class extends Error {
|
|
90
|
+
})]), m = class extends Error {
|
|
62
91
|
name = "ScheduleBackfillRequestConflict";
|
|
63
|
-
}, h = e.NonEmptyString.pipe(e.
|
|
92
|
+
}, h = e.NonEmptyString.pipe(e.check(e.isMaxLength(1024)), e.check(e.makeFilter((e) => e.trim().length > 0 && !/[\u0000-\u001f\u007f]/.test(e)))), g = e.Struct({
|
|
64
93
|
workflowName: h,
|
|
65
94
|
executionId: h
|
|
66
|
-
}), _ = g.fields, v = e.Union(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
95
|
+
}), _ = g.fields, v = e.Union([
|
|
96
|
+
e.Struct({
|
|
97
|
+
..._,
|
|
98
|
+
kind: e.Literal("not-observed")
|
|
99
|
+
}),
|
|
100
|
+
e.Struct({
|
|
101
|
+
..._,
|
|
102
|
+
kind: e.Literal("pending")
|
|
103
|
+
}),
|
|
104
|
+
e.Struct({
|
|
105
|
+
..._,
|
|
106
|
+
kind: e.Literal("delivery-failed")
|
|
107
|
+
}),
|
|
108
|
+
e.Struct({
|
|
109
|
+
..._,
|
|
110
|
+
kind: e.Literal("suspended")
|
|
111
|
+
}),
|
|
112
|
+
e.Struct({
|
|
113
|
+
..._,
|
|
114
|
+
kind: e.Literal("completed"),
|
|
115
|
+
outcome: e.Literals([
|
|
116
|
+
"succeeded",
|
|
117
|
+
"failed",
|
|
118
|
+
"cancelled"
|
|
119
|
+
])
|
|
120
|
+
})
|
|
121
|
+
]), y = (e) => typeof e == "object" && e && !Array.isArray(e) ? e : void 0, b = (e) => Array.isArray(e) && e.every((e) => y(e) !== void 0) ? e : void 0, x = (e) => typeof e == "number" && Number.isFinite(e) ? e : 0, S = /* @__PURE__ */ new Set([
|
|
83
122
|
"counter",
|
|
84
123
|
"gauge",
|
|
85
124
|
"histogram",
|
|
@@ -100,7 +139,9 @@ var t = e.NonEmptyString.pipe(e.maxLength(1024), e.filter((e) => e.trim().length
|
|
|
100
139
|
let a = i.map((e) => ({
|
|
101
140
|
...e,
|
|
102
141
|
object: y(e.data)
|
|
103
|
-
})), o = (e) => a.reduce((t, n) => t + x(n.object?.[e]), 0), s =
|
|
142
|
+
})), o = (e) => a.reduce((t, n) => t + x(n.object?.[e]), 0), s = -Infinity;
|
|
143
|
+
for (let e of i) s = Math.max(s, x(e.observation?.capturedAt));
|
|
144
|
+
let c = {
|
|
104
145
|
capturedAt: s,
|
|
105
146
|
bufferSize: o("bufferSize"),
|
|
106
147
|
bufferCapacity: o("bufferCapacity")
|
|
@@ -134,16 +175,22 @@ var t = e.NonEmptyString.pipe(e.maxLength(1024), e.filter((e) => e.trim().length
|
|
|
134
175
|
}), e.set(r, a);
|
|
135
176
|
}
|
|
136
177
|
let t = [...e.values()].map((e) => {
|
|
137
|
-
let t = e.flatMap((e) => b(e.spans) ?? []).sort((e, t) => x(e.startMs) - x(t.startMs)), n =
|
|
178
|
+
let t = e.flatMap((e) => b(e.spans) ?? []).sort((e, t) => x(e.startMs) - x(t.startMs)), n = e[0], r = x(n.startMs);
|
|
179
|
+
for (let t = 1; t < e.length; t += 1) {
|
|
180
|
+
let i = e[t], a = x(i.startMs);
|
|
181
|
+
a < r && (n = i, r = a);
|
|
182
|
+
}
|
|
183
|
+
let i = -Infinity, a = -Infinity, o = 0, s = !1, c = !1, l = !1;
|
|
184
|
+
for (let t of e) i = Math.max(i, x(t.startMs) + x(t.durationMs)), s ||= t.hasError === !0, c ||= t.deliveryCount !== void 0, l ||= t.lastDeliveryMs !== void 0, o += x(t.deliveryCount), a = Math.max(a, x(t.lastDeliveryMs));
|
|
138
185
|
return {
|
|
139
186
|
...n,
|
|
140
187
|
startMs: r,
|
|
141
188
|
durationMs: Math.max(0, i - r),
|
|
142
189
|
spanCount: t.length,
|
|
143
|
-
hasError:
|
|
190
|
+
hasError: s,
|
|
144
191
|
spans: t,
|
|
145
|
-
...
|
|
146
|
-
...
|
|
192
|
+
...c ? { deliveryCount: o } : {},
|
|
193
|
+
...l ? { lastDeliveryMs: a } : {}
|
|
147
194
|
};
|
|
148
195
|
}).sort((e, t) => t.startMs - e.startMs);
|
|
149
196
|
l = {
|
|
@@ -151,16 +198,19 @@ var t = e.NonEmptyString.pipe(e.maxLength(1024), e.filter((e) => e.trim().length
|
|
|
151
198
|
returned: t.length,
|
|
152
199
|
traces: t
|
|
153
200
|
};
|
|
154
|
-
} else if (a.every((e) => b(e.object?.buckets) && typeof e.object?.windowMs == "number"))
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
201
|
+
} else if (a.every((e) => b(e.object?.buckets) && typeof e.object?.windowMs == "number")) {
|
|
202
|
+
let e = -Infinity;
|
|
203
|
+
for (let t of a) e = Math.max(e, x(t.object?.windowMs));
|
|
204
|
+
l = {
|
|
205
|
+
capturedAt: s,
|
|
206
|
+
windowMs: e,
|
|
207
|
+
totalSamples: o("totalSamples"),
|
|
208
|
+
buckets: a.flatMap((e) => b(e.object?.buckets).map((t) => ({
|
|
209
|
+
...t,
|
|
210
|
+
tag: `${String(t.tag)} [${e.replicaId}]`
|
|
211
|
+
})))
|
|
212
|
+
};
|
|
213
|
+
} else if (i.every((e) => C(e.data))) l = i.flatMap((e) => C(e.data).map((t) => ({
|
|
164
214
|
...t,
|
|
165
215
|
labels: {
|
|
166
216
|
...y(t.labels),
|
package/dist/jwt.d.ts
CHANGED
|
@@ -289,33 +289,31 @@ declare type StrategyResolution = {
|
|
|
289
289
|
readonly reason: string;
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
-
declare const Subject: Schema.Union<[Schema.Struct<{
|
|
293
|
-
type: Schema.Literal<
|
|
294
|
-
id:
|
|
295
|
-
tenantId:
|
|
296
|
-
scopes: Schema.optional<Schema
|
|
297
|
-
metadata: Schema.optional<Schema
|
|
292
|
+
declare const Subject: Schema.Union<readonly [Schema.Struct<{
|
|
293
|
+
readonly type: Schema.Literal<"user">;
|
|
294
|
+
readonly id: Schema.String;
|
|
295
|
+
readonly tenantId: Schema.String;
|
|
296
|
+
readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
|
|
297
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
298
298
|
}>, Schema.Struct<{
|
|
299
|
-
type: Schema.Literal<
|
|
300
|
-
id:
|
|
301
|
-
tenantId:
|
|
302
|
-
scopes: Schema.optional<Schema
|
|
303
|
-
metadata: Schema.optional<Schema
|
|
299
|
+
readonly type: Schema.Literal<"apiKey">;
|
|
300
|
+
readonly id: Schema.String;
|
|
301
|
+
readonly tenantId: Schema.String;
|
|
302
|
+
readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
|
|
303
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
304
304
|
}>, Schema.Struct<{
|
|
305
|
-
type: Schema.Literal<
|
|
306
|
-
id:
|
|
307
|
-
tenantId:
|
|
305
|
+
readonly type: Schema.Literal<"serviceAccount">;
|
|
306
|
+
readonly id: Schema.String;
|
|
307
|
+
readonly tenantId: Schema.String;
|
|
308
308
|
/** Application actor used for audit columns; null means machine work with
|
|
309
309
|
* no application actor. Identity only, never a permission grant. */
|
|
310
|
-
auditActorId: Schema.
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
scopes: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
314
|
-
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
310
|
+
readonly auditActorId: Schema.optionalKey<Schema.NullOr<Schema.String>>;
|
|
311
|
+
readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
|
|
312
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
315
313
|
}>, Schema.Struct<{
|
|
316
|
-
type: Schema.Literal<
|
|
317
|
-
id:
|
|
318
|
-
tenantId: Schema.NullOr<
|
|
314
|
+
readonly type: Schema.Literal<"anonymous">;
|
|
315
|
+
readonly id: Schema.Null;
|
|
316
|
+
readonly tenantId: Schema.NullOr<Schema.String>;
|
|
319
317
|
/**
|
|
320
318
|
* Set when this caller PRESENTED a credential and it was rejected — an
|
|
321
319
|
* expired token above all. Absent when they presented none.
|
|
@@ -332,21 +330,21 @@ declare const Subject: Schema.Union<[Schema.Struct<{
|
|
|
332
330
|
* must not break an `openAccess` procedure that needs no session at all. The
|
|
333
331
|
* fact travels, and only a guard that actually refuses spends it.
|
|
334
332
|
*/
|
|
335
|
-
credentialRejected: Schema.optional<
|
|
333
|
+
readonly credentialRejected: Schema.optional<Schema.String>;
|
|
336
334
|
}>, Schema.Struct<{
|
|
337
|
-
type: Schema.Literal<
|
|
338
|
-
id:
|
|
339
|
-
tenantId:
|
|
340
|
-
scopes: Schema.optional<Schema
|
|
341
|
-
metadata: Schema.optional<Schema
|
|
335
|
+
readonly type: Schema.Literal<"system">;
|
|
336
|
+
readonly id: Schema.String;
|
|
337
|
+
readonly tenantId: Schema.Null;
|
|
338
|
+
readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
|
|
339
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
342
340
|
}>, Schema.Struct<{
|
|
343
|
-
type: Schema.Literal<
|
|
344
|
-
id:
|
|
341
|
+
readonly type: Schema.Literal<"service">;
|
|
342
|
+
readonly id: Schema.String;
|
|
345
343
|
/** The calling app's name, as the callee lists it in `serviceCallers`. */
|
|
346
|
-
service:
|
|
347
|
-
tenantId:
|
|
348
|
-
scopes: Schema.optional<Schema
|
|
349
|
-
metadata: Schema.optional<Schema
|
|
344
|
+
readonly service: Schema.String;
|
|
345
|
+
readonly tenantId: Schema.Null;
|
|
346
|
+
readonly scopes: Schema.optional<Schema.$Array<Schema.String>>;
|
|
347
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
350
348
|
}>]>;
|
|
351
349
|
|
|
352
350
|
declare type Subject = typeof Subject.Type;
|