@cat-factory/sdk 0.45.1 → 0.47.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/README.md +13 -0
- package/dist/diagnosis.d.ts +48 -0
- package/dist/diagnosis.d.ts.map +1 -0
- package/dist/diagnosis.js +221 -0
- package/dist/diagnosis.js.map +1 -0
- package/dist/http.d.ts +8 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +19 -2
- package/dist/http.js.map +1 -1
- package/dist/models.generated.d.ts +142 -3
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +11 -1
- package/dist/models.generated.js.map +1 -1
- package/dist/operations.generated.d.ts +35 -4
- package/dist/operations.generated.d.ts.map +1 -1
- package/dist/operations.generated.js +62 -3
- package/dist/operations.generated.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -82,6 +82,19 @@ Classes: `CatFactoryValidationError` (400/422), `…Unauthorized` (401), `…For
|
|
|
82
82
|
`CatFactoryError`. Every API error carries `status`, `code`, `details`, `issues` and the
|
|
83
83
|
`requestId` to quote when reporting a fault.
|
|
84
84
|
|
|
85
|
+
A `CatFactoryConnectionError` states what actually failed rather than asserting the deployment was
|
|
86
|
+
unreachable, and says what this client had already seen from the origin:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
cat-factory SDK: POST /api/v1/tasks failed: https://cat-factory.example.com reset the connection
|
|
90
|
+
before answering. This client had answered 9 calls against https://cat-factory.example.com, the
|
|
91
|
+
last 0.2s ago. (read ECONNRESET)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
A reset after nine answered calls is a deployment that restarted; a refusal with nothing answered
|
|
95
|
+
yet is an address with nothing behind it, and the two send you to completely different places. The
|
|
96
|
+
runtime's own cause chain is kept verbatim at the end of the message and on `cause`.
|
|
97
|
+
|
|
85
98
|
## Options
|
|
86
99
|
|
|
87
100
|
```ts
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why a request never produced a response. `unknown` is a real member: an unrecognised chain is
|
|
3
|
+
* reported as itself rather than guessed onto a cause, because a wrong cause is what sends a
|
|
4
|
+
* reader to fix something that was never broken.
|
|
5
|
+
*/
|
|
6
|
+
export type TransportFailureCause = 'refused' | 'dns' | 'timeout' | 'aborted' | 'unreachable' | 'reset' | 'tls-untrusted' | 'tls-expired' | 'tls-hostname' | 'tls-protocol' | 'invalid-header' | 'unknown';
|
|
7
|
+
/** What this client has seen from the origin, which is what tells a restart from a bad address. */
|
|
8
|
+
export interface OriginHistory {
|
|
9
|
+
/** Requests that produced a RESPONSE, of any status: each one proves the origin answered. */
|
|
10
|
+
completedCalls: number;
|
|
11
|
+
/** When the last of them answered (epoch ms), or null when none has. */
|
|
12
|
+
lastCompletedAt: number | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Flatten a thrown value's whole cause chain, outermost first.
|
|
16
|
+
*
|
|
17
|
+
* `AggregateError.errors` is walked as well as `cause`: a host resolving to both `::1` and
|
|
18
|
+
* `127.0.0.1` fails as an aggregate of two connection attempts, and the useful code is inside it.
|
|
19
|
+
*/
|
|
20
|
+
export declare function flattenCauseChain(error: unknown): unknown[];
|
|
21
|
+
/**
|
|
22
|
+
* The cause of a whole chain, DEEPEST-FIRST, because depth is specificity order: a mid-handshake
|
|
23
|
+
* `DEPTH_ZERO_SELF_SIGNED_CERT` arrives wrapped in a socket error that is itself a recognised
|
|
24
|
+
* `reset`, so taking the first match in walk order answers with the wrapper and sends the reader
|
|
25
|
+
* looking for a proxy instead of pasting a CA bundle.
|
|
26
|
+
*
|
|
27
|
+
* The text pass runs only after EVERY link failed to produce a code: a message match is a guess
|
|
28
|
+
* where a code is a fact, and it must never outrank one.
|
|
29
|
+
*/
|
|
30
|
+
export declare function classifyTransportFailure(error: unknown): TransportFailureCause;
|
|
31
|
+
/** Render the chain as the runtime reported it, leading with the link that names the failure. */
|
|
32
|
+
export declare function renderCauseChain(error: unknown): string;
|
|
33
|
+
/**
|
|
34
|
+
* The whole message a {@link CatFactoryConnectionError} carries: what happened, what this client
|
|
35
|
+
* knows about the origin, and the exact chain the runtime reported, in that order.
|
|
36
|
+
*
|
|
37
|
+
* The chain stays LAST and stays verbatim. It is the evidence, and a reader who disagrees with the
|
|
38
|
+
* classification needs it unedited.
|
|
39
|
+
*/
|
|
40
|
+
export declare function describeTransportFailure(input: {
|
|
41
|
+
method: string;
|
|
42
|
+
path: string;
|
|
43
|
+
baseUrl: string;
|
|
44
|
+
error: unknown;
|
|
45
|
+
history: OriginHistory;
|
|
46
|
+
now: number;
|
|
47
|
+
}): string;
|
|
48
|
+
//# sourceMappingURL=diagnosis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnosis.d.ts","sourceRoot":"","sources":["../src/diagnosis.ts"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,KAAK,GACL,SAAS,GACT,SAAS,GACT,aAAa,GACb,OAAO,GACP,eAAe,GACf,aAAa,GACb,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,SAAS,CAAA;AAEb,mGAAmG;AACnG,MAAM,WAAW,aAAa;IAC5B,6FAA6F;IAC7F,cAAc,EAAE,MAAM,CAAA;IACtB,wEAAwE;IACxE,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAmDD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,CAiB3D;AAkBD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,qBAAqB,CAU9E;AAED,iGAAiG;AACjG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAYvD;AAiED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,aAAa,CAAA;IACtB,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,MAAM,CAKT"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
// What a transport failure actually was, and what the client already knows about the origin.
|
|
2
|
+
//
|
|
3
|
+
// The problem this exists for: on Node a transport failure's own message is the contentless
|
|
4
|
+
// `fetch failed`, identical for an unreachable host, a bad cert and a DNS typo, and the SDK used
|
|
5
|
+
// to render every one of them as `failed to reach <baseUrl>`. That sentence is a verdict about
|
|
6
|
+
// REACHABILITY, and it is the one provably false reading when the deployment answered nine calls
|
|
7
|
+
// two hundred milliseconds earlier and then restarted: it sends the reader to the boot log, the
|
|
8
|
+
// database and the CORS config before the transport is ever suspected.
|
|
9
|
+
//
|
|
10
|
+
// So the SDK says which cause it was, and drops the reachability claim when the cause does not
|
|
11
|
+
// support it. The two facts needed for that are already here: the CAUSE hangs off the thrown
|
|
12
|
+
// value's chain, and the HISTORY belongs to the client instance that made the earlier calls.
|
|
13
|
+
//
|
|
14
|
+
// A PORT of the platform's own `ConnectionFailureCause` vocabulary (kernel's
|
|
15
|
+
// `connection-failure.logic.ts`, owned by `@cat-factory/contracts`), not an import of it. This SDK
|
|
16
|
+
// declares no dependencies by design, so reaching across that boundary is not available.
|
|
17
|
+
//
|
|
18
|
+
// What keeps the copy honest is `scripts/check-sdk-connection-causes.mjs`, a repo-level guard that
|
|
19
|
+
// reads the contracts picklist and all four ported lists and fails on any disagreement. It has to
|
|
20
|
+
// be a guard rather than a test in here: a test in this package cannot see the picklist, so it
|
|
21
|
+
// could only restate the list a second time and would stay green through the exact drift that
|
|
22
|
+
// matters. What each cause is MATCHED ON below is this runtime's own business, and is pinned by
|
|
23
|
+
// `test/diagnosis.test.ts`.
|
|
24
|
+
/** The codes and DOM names each cause is recognised by, deliberately the platform's own list. */
|
|
25
|
+
const CAUSE_CODES = {
|
|
26
|
+
refused: ['ECONNREFUSED'],
|
|
27
|
+
dns: ['ENOTFOUND', 'EAI_AGAIN'],
|
|
28
|
+
timeout: [
|
|
29
|
+
'TimeoutError',
|
|
30
|
+
'ETIMEDOUT',
|
|
31
|
+
'UND_ERR_CONNECT_TIMEOUT',
|
|
32
|
+
'UND_ERR_HEADERS_TIMEOUT',
|
|
33
|
+
'UND_ERR_BODY_TIMEOUT',
|
|
34
|
+
],
|
|
35
|
+
aborted: ['AbortError', 'UND_ERR_ABORTED'],
|
|
36
|
+
unreachable: ['EHOSTUNREACH', 'ENETUNREACH', 'EHOSTDOWN', 'ENETDOWN'],
|
|
37
|
+
reset: ['ECONNRESET', 'EPIPE', 'UND_ERR_SOCKET'],
|
|
38
|
+
'tls-untrusted': [
|
|
39
|
+
'DEPTH_ZERO_SELF_SIGNED_CERT',
|
|
40
|
+
'SELF_SIGNED_CERT_IN_CHAIN',
|
|
41
|
+
'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
|
|
42
|
+
'UNABLE_TO_GET_ISSUER_CERT',
|
|
43
|
+
'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
|
|
44
|
+
'CERT_UNTRUSTED',
|
|
45
|
+
],
|
|
46
|
+
'tls-expired': ['CERT_HAS_EXPIRED', 'CERT_NOT_YET_VALID'],
|
|
47
|
+
'tls-hostname': ['ERR_TLS_CERT_ALTNAME_INVALID'],
|
|
48
|
+
'tls-protocol': [
|
|
49
|
+
'EPROTO',
|
|
50
|
+
'ERR_SSL_WRONG_VERSION_NUMBER',
|
|
51
|
+
'ERR_SSL_PACKET_LENGTH_TOO_LONG',
|
|
52
|
+
'ERR_SSL_UNEXPECTED_MESSAGE',
|
|
53
|
+
'ERR_TLS_HANDSHAKE_TIMEOUT',
|
|
54
|
+
],
|
|
55
|
+
'invalid-header': ['ERR_INVALID_CHAR', 'ERR_INVALID_HTTP_TOKEN', 'ERR_HTTP_INVALID_HEADER_VALUE'],
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The one cause recognised WITHOUT a code, matched on the whole wording each runtime uses rather
|
|
59
|
+
* than a keyword: a header value carrying a control character is rejected before a socket is ever
|
|
60
|
+
* opened, as a bare `TypeError`, and a credential pasted with a line break in it is exactly the
|
|
61
|
+
* case a reader most needs named. A looser `invalid character` matches a JSON decode error, which
|
|
62
|
+
* is one of the commonest things a proxy answers with.
|
|
63
|
+
*/
|
|
64
|
+
const INVALID_HEADER_TEXT = /invalid header value|invalid header field|invalid character in header/i;
|
|
65
|
+
/** `fetch` wraps every transport error in this, and it says nothing at all. */
|
|
66
|
+
const CONTENTLESS_WRAPPER = 'fetch failed';
|
|
67
|
+
/** Bounded, because a chain a caller built can be cyclic or arbitrarily deep. */
|
|
68
|
+
const MAX_CHAIN_LINKS = 12;
|
|
69
|
+
/**
|
|
70
|
+
* Flatten a thrown value's whole cause chain, outermost first.
|
|
71
|
+
*
|
|
72
|
+
* `AggregateError.errors` is walked as well as `cause`: a host resolving to both `::1` and
|
|
73
|
+
* `127.0.0.1` fails as an aggregate of two connection attempts, and the useful code is inside it.
|
|
74
|
+
*/
|
|
75
|
+
export function flattenCauseChain(error) {
|
|
76
|
+
const links = [];
|
|
77
|
+
const seen = new Set();
|
|
78
|
+
const queue = [error];
|
|
79
|
+
while (queue.length > 0 && links.length < MAX_CHAIN_LINKS) {
|
|
80
|
+
const link = queue.shift();
|
|
81
|
+
if (link === undefined || link === null)
|
|
82
|
+
continue;
|
|
83
|
+
if (typeof link === 'object') {
|
|
84
|
+
if (seen.has(link))
|
|
85
|
+
continue;
|
|
86
|
+
seen.add(link);
|
|
87
|
+
}
|
|
88
|
+
links.push(link);
|
|
89
|
+
const aggregated = link.errors;
|
|
90
|
+
if (Array.isArray(aggregated))
|
|
91
|
+
queue.push(...aggregated);
|
|
92
|
+
queue.push(link.cause);
|
|
93
|
+
}
|
|
94
|
+
return links;
|
|
95
|
+
}
|
|
96
|
+
function errorCode(link) {
|
|
97
|
+
const code = link?.code;
|
|
98
|
+
return typeof code === 'string' && code ? code : undefined;
|
|
99
|
+
}
|
|
100
|
+
function classifyLink(link) {
|
|
101
|
+
const code = errorCode(link);
|
|
102
|
+
const name = link instanceof Error ? link.name : undefined;
|
|
103
|
+
for (const [cause, codes] of Object.entries(CAUSE_CODES)) {
|
|
104
|
+
if (codes.some((candidate) => candidate === code || candidate === name)) {
|
|
105
|
+
return cause;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The cause of a whole chain, DEEPEST-FIRST, because depth is specificity order: a mid-handshake
|
|
112
|
+
* `DEPTH_ZERO_SELF_SIGNED_CERT` arrives wrapped in a socket error that is itself a recognised
|
|
113
|
+
* `reset`, so taking the first match in walk order answers with the wrapper and sends the reader
|
|
114
|
+
* looking for a proxy instead of pasting a CA bundle.
|
|
115
|
+
*
|
|
116
|
+
* The text pass runs only after EVERY link failed to produce a code: a message match is a guess
|
|
117
|
+
* where a code is a fact, and it must never outrank one.
|
|
118
|
+
*/
|
|
119
|
+
export function classifyTransportFailure(error) {
|
|
120
|
+
const deepestFirst = flattenCauseChain(error).reverse();
|
|
121
|
+
for (const link of deepestFirst) {
|
|
122
|
+
const byCode = classifyLink(link);
|
|
123
|
+
if (byCode)
|
|
124
|
+
return byCode;
|
|
125
|
+
}
|
|
126
|
+
for (const link of deepestFirst) {
|
|
127
|
+
if (link instanceof Error && INVALID_HEADER_TEXT.test(link.message))
|
|
128
|
+
return 'invalid-header';
|
|
129
|
+
}
|
|
130
|
+
return 'unknown';
|
|
131
|
+
}
|
|
132
|
+
/** Render the chain as the runtime reported it, leading with the link that names the failure. */
|
|
133
|
+
export function renderCauseChain(error) {
|
|
134
|
+
const parts = [];
|
|
135
|
+
for (const link of flattenCauseChain(error)) {
|
|
136
|
+
const text = link instanceof Error ? link.message : String(link);
|
|
137
|
+
const trimmed = text.trim();
|
|
138
|
+
if (!trimmed || parts.includes(trimmed))
|
|
139
|
+
continue;
|
|
140
|
+
parts.push(trimmed);
|
|
141
|
+
}
|
|
142
|
+
// Drop the contentless wrapper, but only when something else survives it: an empty diagnosis is
|
|
143
|
+
// worse than an uninformative one.
|
|
144
|
+
const meaningful = parts.filter((part) => part !== CONTENTLESS_WRAPPER);
|
|
145
|
+
return (meaningful.length > 0 ? meaningful : parts).join(': ');
|
|
146
|
+
}
|
|
147
|
+
/** The host a base URL names, for a sentence about DNS or a certificate. Falls back to the URL. */
|
|
148
|
+
function hostOf(baseUrl) {
|
|
149
|
+
try {
|
|
150
|
+
return new URL(baseUrl).host || baseUrl;
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
return baseUrl;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* What happened, in the caller's terms. Every sentence states only what the cause supports: a
|
|
158
|
+
* refusal names a port with nothing behind it, a reset names an origin that WAS there, and a
|
|
159
|
+
* request rejected before a socket was opened claims nothing about the origin at all.
|
|
160
|
+
*/
|
|
161
|
+
function verdictFor(cause, baseUrl) {
|
|
162
|
+
switch (cause) {
|
|
163
|
+
case 'refused':
|
|
164
|
+
return `nothing is listening at ${baseUrl}`;
|
|
165
|
+
case 'dns':
|
|
166
|
+
return `the host ${hostOf(baseUrl)} does not resolve from here`;
|
|
167
|
+
case 'timeout':
|
|
168
|
+
return `${baseUrl} did not answer before the connection timed out`;
|
|
169
|
+
case 'aborted':
|
|
170
|
+
return `the request was cancelled before an answer arrived, so nothing was learned about ${baseUrl}`;
|
|
171
|
+
case 'unreachable':
|
|
172
|
+
return `there is no network route to ${baseUrl} from here`;
|
|
173
|
+
case 'reset':
|
|
174
|
+
return `${baseUrl} reset the connection before answering`;
|
|
175
|
+
case 'tls-untrusted':
|
|
176
|
+
return `${baseUrl} presented a TLS certificate this client does not trust`;
|
|
177
|
+
case 'tls-expired':
|
|
178
|
+
return `the TLS certificate ${baseUrl} presented is outside its validity window`;
|
|
179
|
+
case 'tls-hostname':
|
|
180
|
+
return `the TLS certificate ${baseUrl} presented was not issued for ${hostOf(baseUrl)}`;
|
|
181
|
+
case 'tls-protocol':
|
|
182
|
+
return `the TLS handshake with ${baseUrl} failed, which is what a plain-HTTP port answers when it is addressed over https`;
|
|
183
|
+
case 'invalid-header':
|
|
184
|
+
return 'the request could not be built, because a header value holds a character that is not allowed in one';
|
|
185
|
+
case 'unknown':
|
|
186
|
+
return `the request to ${baseUrl} ended before any response arrived`;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/** `0.2s`, `12.5s`, `4m`: precise where a restart is being told from a long-dead origin. */
|
|
190
|
+
function renderAge(ms) {
|
|
191
|
+
const seconds = Math.max(0, ms) / 1000;
|
|
192
|
+
if (seconds < 60)
|
|
193
|
+
return `${seconds < 10 ? seconds.toFixed(1) : Math.round(seconds)}s`;
|
|
194
|
+
return `${Math.round(seconds / 60)}m`;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* What this client already knows about the origin, which is the half that separates a deployment
|
|
198
|
+
* that restarted from one that was never there. Stated in both directions: "answered nothing yet"
|
|
199
|
+
* is evidence too, and it is what points at the address rather than at the deployment.
|
|
200
|
+
*/
|
|
201
|
+
function historyFor(history, baseUrl, now) {
|
|
202
|
+
if (history.completedCalls === 0 || history.lastCompletedAt === null) {
|
|
203
|
+
return ` This client has not completed a call against ${baseUrl} yet.`;
|
|
204
|
+
}
|
|
205
|
+
const calls = history.completedCalls === 1 ? '1 call' : `${history.completedCalls} calls`;
|
|
206
|
+
return ` This client had answered ${calls} against ${baseUrl}, the last ${renderAge(now - history.lastCompletedAt)} ago.`;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The whole message a {@link CatFactoryConnectionError} carries: what happened, what this client
|
|
210
|
+
* knows about the origin, and the exact chain the runtime reported, in that order.
|
|
211
|
+
*
|
|
212
|
+
* The chain stays LAST and stays verbatim. It is the evidence, and a reader who disagrees with the
|
|
213
|
+
* classification needs it unedited.
|
|
214
|
+
*/
|
|
215
|
+
export function describeTransportFailure(input) {
|
|
216
|
+
const cause = classifyTransportFailure(input.error);
|
|
217
|
+
const detail = renderCauseChain(input.error);
|
|
218
|
+
const evidence = detail ? ` (${detail})` : '';
|
|
219
|
+
return `cat-factory SDK: ${input.method} ${input.path} failed: ${verdictFor(cause, input.baseUrl)}.${historyFor(input.history, input.baseUrl, input.now)}${evidence}`;
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=diagnosis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnosis.js","sourceRoot":"","sources":["../src/diagnosis.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,EAAE;AACF,4FAA4F;AAC5F,iGAAiG;AACjG,+FAA+F;AAC/F,iGAAiG;AACjG,gGAAgG;AAChG,uEAAuE;AACvE,EAAE;AACF,+FAA+F;AAC/F,6FAA6F;AAC7F,6FAA6F;AAC7F,EAAE;AACF,6EAA6E;AAC7E,mGAAmG;AACnG,yFAAyF;AACzF,EAAE;AACF,mGAAmG;AACnG,kGAAkG;AAClG,+FAA+F;AAC/F,8FAA8F;AAC9F,gGAAgG;AAChG,4BAA4B;AA6B5B,iGAAiG;AACjG,MAAM,WAAW,GAAyE;IACxF,OAAO,EAAE,CAAC,cAAc,CAAC;IACzB,GAAG,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;IAC/B,OAAO,EAAE;QACP,cAAc;QACd,WAAW;QACX,yBAAyB;QACzB,yBAAyB;QACzB,sBAAsB;KACvB;IACD,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;IAC1C,WAAW,EAAE,CAAC,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC;IACrE,KAAK,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,gBAAgB,CAAC;IAChD,eAAe,EAAE;QACf,6BAA6B;QAC7B,2BAA2B;QAC3B,iCAAiC;QACjC,2BAA2B;QAC3B,m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E,CAAC;QACrE,OAAO,iDAAiD,OAAO,OAAO,CAAA;IACxE,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,cAAc,QAAQ,CAAA;IACzF,OAAO,6BAA6B,KAAK,YAAY,OAAO,cAAc,SAAS,CAAC,GAAG,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAA;AAC3H,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAOxC;IACC,MAAM,KAAK,GAAG,wBAAwB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACnD,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAC5C,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;IAC7C,OAAO,oBAAoB,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,YAAY,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,QAAQ,EAAE,CAAA;AACvK,CAAC"}
|
package/dist/http.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface RequestSpec {
|
|
|
45
45
|
options: RequestOptions;
|
|
46
46
|
}
|
|
47
47
|
/** SDK version, stamped into `User-Agent`. Kept in step with package.json by `check:sdk`. */
|
|
48
|
-
export declare const SDK_VERSION = "0.
|
|
48
|
+
export declare const SDK_VERSION = "0.47.0";
|
|
49
49
|
/**
|
|
50
50
|
* Percent-encode a path parameter.
|
|
51
51
|
*
|
|
@@ -67,6 +67,13 @@ export declare class Transport {
|
|
|
67
67
|
* supply it without rebuilding a configured client; a per-call `headers` entry still wins.
|
|
68
68
|
*/
|
|
69
69
|
personalPassword: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* What this client has seen from the origin, kept so a transport failure can say whether the
|
|
72
|
+
* deployment was answering a moment ago. A response of ANY status counts: a 500 is still proof
|
|
73
|
+
* the origin is there, and it is the difference between "it restarted" and "that address never
|
|
74
|
+
* answered", which are the two readings a bare `failed to reach` collapses.
|
|
75
|
+
*/
|
|
76
|
+
private readonly history;
|
|
70
77
|
constructor(options: ClientOptions);
|
|
71
78
|
/** Perform a request, returning the decoded JSON body. */
|
|
72
79
|
request<T>(spec: RequestSpec): Promise<T>;
|
package/dist/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,UAAU,CAAA;AAE5D,iFAAiF;AACjF,MAAM,WAAW,cAAc;IAC7B,gFAAgF;IAChF,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAA;IACf,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAA;IACd,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,M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IACG,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CASpD;YAEa,IAAI;CAuFnB"}
|
package/dist/http.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
// The 38 generated operation methods do nothing but describe a request and hand it here, so any
|
|
4
4
|
// change to HOW the SDK talks to a deployment is a change to this file alone.
|
|
5
5
|
import { CatFactoryConnectionError, CatFactoryDecodeError, CatFactoryError, CatFactoryTimeoutError, toApiError, } from './errors.js';
|
|
6
|
+
import { describeTransportFailure } from './diagnosis.js';
|
|
6
7
|
import { readEventStream } from './sse.js';
|
|
7
8
|
/** SDK version, stamped into `User-Agent`. Kept in step with package.json by `check:sdk`. */
|
|
8
|
-
export const SDK_VERSION = '0.
|
|
9
|
+
export const SDK_VERSION = '0.47.0';
|
|
9
10
|
/**
|
|
10
11
|
* Percent-encode a path parameter.
|
|
11
12
|
*
|
|
@@ -60,6 +61,13 @@ export class Transport {
|
|
|
60
61
|
* supply it without rebuilding a configured client; a per-call `headers` entry still wins.
|
|
61
62
|
*/
|
|
62
63
|
personalPassword;
|
|
64
|
+
/**
|
|
65
|
+
* What this client has seen from the origin, kept so a transport failure can say whether the
|
|
66
|
+
* deployment was answering a moment ago. A response of ANY status counts: a 500 is still proof
|
|
67
|
+
* the origin is there, and it is the difference between "it restarted" and "that address never
|
|
68
|
+
* answered", which are the two readings a bare `failed to reach` collapses.
|
|
69
|
+
*/
|
|
70
|
+
history = { completedCalls: 0, lastCompletedAt: null };
|
|
63
71
|
constructor(options) {
|
|
64
72
|
if (!options.baseUrl)
|
|
65
73
|
throw new Error('cat-factory SDK: `baseUrl` is required.');
|
|
@@ -154,6 +162,8 @@ export class Transport {
|
|
|
154
162
|
body: spec.body === undefined ? undefined : JSON.stringify(spec.body),
|
|
155
163
|
signal: controller.signal,
|
|
156
164
|
});
|
|
165
|
+
this.history.completedCalls += 1;
|
|
166
|
+
this.history.lastCompletedAt = Date.now();
|
|
157
167
|
if (response.ok)
|
|
158
168
|
return response;
|
|
159
169
|
const requestId = response.headers.get('x-request-id');
|
|
@@ -189,7 +199,14 @@ export class Transport {
|
|
|
189
199
|
await sleep(backoffMs(attempt));
|
|
190
200
|
continue;
|
|
191
201
|
}
|
|
192
|
-
throw new CatFactoryConnectionError(
|
|
202
|
+
throw new CatFactoryConnectionError(describeTransportFailure({
|
|
203
|
+
method: spec.method,
|
|
204
|
+
path: spec.path,
|
|
205
|
+
baseUrl: this.baseUrl,
|
|
206
|
+
error: lastError,
|
|
207
|
+
history: this.history,
|
|
208
|
+
now: Date.now(),
|
|
209
|
+
}), { cause: lastError });
|
|
193
210
|
}
|
|
194
211
|
finally {
|
|
195
212
|
if (timer)
|
package/dist/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,EAAE;AACF,gGAAgG;AAChG,8EAA8E;AAE9E,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,UAAU,GACX,MAAM,aAAa,CAAA;AACpB,OAAO,EAAoB,eAAe,EAAE,MAAM,UAAU,CAAA;AAkD5D,6FAA6F;AAC7F,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAA;AAEnC;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAA;AAClC,CAAC;AAED,gDAAgD;AAChD,SAAS,WAAW,CAAC,MAAc,EAAE,MAAqB;IACxD,wFAAwF;IACxF,yFAAyF;IACzF,qFAAqF;IACrF,+DAA+D;IAC/D,MAAM,UAAU,GAAG,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,QAAQ,CAAA;IAC/E,IAAI,CAAC,UAAU;QAAE,OAAO,KAAK,CAAA;IAC7B,IAAI,MAAM,KAAK,IAAI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AA;IAClD,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IACtB,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC;AAED,sFAAsF;AACtF,SAAS,YAAY,CAAC,QAAkB;IACtC,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IAClD,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IACxB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;IAC9B,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,EAAE,MAAM,CAAC,CAAA;IACrF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IACnC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC,CAAA;AACzD,CAAC"}
|
|
@@ -872,6 +872,36 @@ export interface GetPublicVcsConnectionResponseConnection {
|
|
|
872
872
|
export type GetPublicVcsConnectionResponseConnectionMethod = 'app' | 'pat';
|
|
873
873
|
/** Every `GetPublicVcsConnectionResponseConnectionMethod` value, for exhaustive handling and runtime validation. */
|
|
874
874
|
export declare const GET_PUBLIC_VCS_CONNECTION_RESPONSE_CONNECTION_METHOD_VALUES: readonly ['app', 'pat'];
|
|
875
|
+
export interface InvokePublicUseCaseRequest {
|
|
876
|
+
maxOutputTokens?: number;
|
|
877
|
+
/** Length 1..120. */
|
|
878
|
+
model?: string;
|
|
879
|
+
parameters?: Record<string, InvokePublicUseCaseRequestParametersValue>;
|
|
880
|
+
temperature?: number;
|
|
881
|
+
}
|
|
882
|
+
export type InvokePublicUseCaseRequestParametersValue = string | string[] | boolean | number;
|
|
883
|
+
export interface InvokePublicUseCaseResponse {
|
|
884
|
+
finishReason: InvokePublicUseCaseResponseFinishReason;
|
|
885
|
+
model: InvokePublicUseCaseResponseModel;
|
|
886
|
+
text: string;
|
|
887
|
+
truncated: boolean;
|
|
888
|
+
usage: InvokePublicUseCaseResponseUsage;
|
|
889
|
+
useCaseId: string;
|
|
890
|
+
}
|
|
891
|
+
export type InvokePublicUseCaseResponseFinishReason = 'stop' | 'length' | 'content-filter' | 'other';
|
|
892
|
+
/** Every `InvokePublicUseCaseResponseFinishReason` value, for exhaustive handling and runtime validation. */
|
|
893
|
+
export declare const INVOKE_PUBLIC_USE_CASE_RESPONSE_FINISH_REASON_VALUES: readonly ['stop', 'length', 'content-filter', 'other'];
|
|
894
|
+
export interface InvokePublicUseCaseResponseModel {
|
|
895
|
+
id: string;
|
|
896
|
+
label: string;
|
|
897
|
+
model: string;
|
|
898
|
+
provider: string;
|
|
899
|
+
}
|
|
900
|
+
export interface InvokePublicUseCaseResponseUsage {
|
|
901
|
+
inputTokens: number;
|
|
902
|
+
outputTokens: number;
|
|
903
|
+
totalTokens: number;
|
|
904
|
+
}
|
|
875
905
|
export interface LinkPublicRepoRequest {
|
|
876
906
|
/** Length 1..100. */
|
|
877
907
|
name: string;
|
|
@@ -972,6 +1002,19 @@ export interface ListPublicEnvironmentConnectionsResponseConnection {
|
|
|
972
1002
|
provisionType: string;
|
|
973
1003
|
secretKeys: string[];
|
|
974
1004
|
}
|
|
1005
|
+
export interface ListPublicEnvironmentManifestTypesResponse {
|
|
1006
|
+
manifestTypes: ListPublicEnvironmentManifestTypesResponseManifestType[];
|
|
1007
|
+
}
|
|
1008
|
+
export interface ListPublicEnvironmentManifestTypesResponseManifestType {
|
|
1009
|
+
/** Always present; `null` when the server has no value for it. */
|
|
1010
|
+
defaultManifestPath: string | null;
|
|
1011
|
+
label: string;
|
|
1012
|
+
manifestId: string;
|
|
1013
|
+
source: ListPublicEnvironmentManifestTypesResponseManifestTypeSource;
|
|
1014
|
+
}
|
|
1015
|
+
export type ListPublicEnvironmentManifestTypesResponseManifestTypeSource = 'registered' | 'workspace';
|
|
1016
|
+
/** Every `ListPublicEnvironmentManifestTypesResponseManifestTypeSource` value, for exhaustive handling and runtime validation. */
|
|
1017
|
+
export declare const LIST_PUBLIC_ENVIRONMENT_MANIFEST_TYPES_RESPONSE_MANIFEST_TYPE_SOURCE_VALUES: readonly ['registered', 'workspace'];
|
|
975
1018
|
export interface ListPublicJobsResponse {
|
|
976
1019
|
jobs: PublicJob[];
|
|
977
1020
|
/** Always present; `null` when the server has no value for it. */
|
|
@@ -1106,6 +1149,70 @@ export type ListPublicTaskTypesResponseTaskTypeFieldShowWhenEquals = string | bo
|
|
|
1106
1149
|
export type ListPublicTaskTypesResponseTaskTypeFieldType = 'text' | 'password' | 'select' | 'number' | 'checkbox' | 'textarea' | 'checkbox-group' | 'path';
|
|
1107
1150
|
/** Every `ListPublicTaskTypesResponseTaskTypeFieldType` value, for exhaustive handling and runtime validation. */
|
|
1108
1151
|
export declare const LIST_PUBLIC_TASK_TYPES_RESPONSE_TASK_TYPE_FIELD_TYPE_VALUES: readonly ['text', 'password', 'select', 'number', 'checkbox', 'textarea', 'checkbox-group', 'path'];
|
|
1152
|
+
export interface ListPublicUseCasesResponse {
|
|
1153
|
+
useCases: ListPublicUseCasesResponseUseCase[];
|
|
1154
|
+
}
|
|
1155
|
+
export interface ListPublicUseCasesResponseUseCase {
|
|
1156
|
+
/** Length 1..60. */
|
|
1157
|
+
category?: string;
|
|
1158
|
+
/** Length 1..500. */
|
|
1159
|
+
description: string;
|
|
1160
|
+
generation: ListPublicUseCasesResponseUseCaseGeneration;
|
|
1161
|
+
/** Length 1..120. */
|
|
1162
|
+
label: string;
|
|
1163
|
+
models: ListPublicUseCasesResponseUseCaseModel[];
|
|
1164
|
+
parameters: ListPublicUseCasesResponseUseCaseParameter[];
|
|
1165
|
+
useCaseId: string;
|
|
1166
|
+
}
|
|
1167
|
+
export interface ListPublicUseCasesResponseUseCaseGeneration {
|
|
1168
|
+
maxOutputTokens: ListPublicUseCasesResponseUseCaseGenerationMaxOutputTokens;
|
|
1169
|
+
temperature: ListPublicUseCasesResponseUseCaseGenerationMaxOutputTokens;
|
|
1170
|
+
}
|
|
1171
|
+
export interface ListPublicUseCasesResponseUseCaseGenerationMaxOutputTokens {
|
|
1172
|
+
default: number;
|
|
1173
|
+
max: number;
|
|
1174
|
+
min: number;
|
|
1175
|
+
}
|
|
1176
|
+
export interface ListPublicUseCasesResponseUseCaseModel {
|
|
1177
|
+
available: boolean;
|
|
1178
|
+
default: boolean;
|
|
1179
|
+
/** Length 0..500. */
|
|
1180
|
+
description?: string;
|
|
1181
|
+
/** Length 1..120. */
|
|
1182
|
+
id: string;
|
|
1183
|
+
/** Length 1..120. */
|
|
1184
|
+
label: string;
|
|
1185
|
+
unavailableReason?: ListPublicUseCasesResponseUseCaseModelUnavailableReason;
|
|
1186
|
+
}
|
|
1187
|
+
export type ListPublicUseCasesResponseUseCaseModelUnavailableReason = 'provider_unavailable' | 'container_only';
|
|
1188
|
+
/** Every `ListPublicUseCasesResponseUseCaseModelUnavailableReason` value, for exhaustive handling and runtime validation. */
|
|
1189
|
+
export declare const LIST_PUBLIC_USE_CASES_RESPONSE_USE_CASE_MODEL_UNAVAILABLE_REASON_VALUES: readonly ['provider_unavailable', 'container_only'];
|
|
1190
|
+
export interface ListPublicUseCasesResponseUseCaseParameter {
|
|
1191
|
+
/** Length 0..2000. */
|
|
1192
|
+
default?: string;
|
|
1193
|
+
defaultValues?: string[];
|
|
1194
|
+
/** Length 0..300. */
|
|
1195
|
+
help?: string;
|
|
1196
|
+
/** Length 1..80. */
|
|
1197
|
+
key: string;
|
|
1198
|
+
/** Length 1..120. */
|
|
1199
|
+
label: string;
|
|
1200
|
+
max?: number;
|
|
1201
|
+
/** Range 1..2000. */
|
|
1202
|
+
maxLength?: number;
|
|
1203
|
+
min?: number;
|
|
1204
|
+
options?: ListPublicTaskTypesResponseTaskTypeFieldOption[];
|
|
1205
|
+
/** Length 0..200. */
|
|
1206
|
+
placeholder?: string;
|
|
1207
|
+
required?: boolean;
|
|
1208
|
+
/** Length 1..120. */
|
|
1209
|
+
section?: string;
|
|
1210
|
+
showWhen?: ListPublicTaskTypesResponseTaskTypeFieldShowWhen;
|
|
1211
|
+
type?: ListPublicUseCasesResponseUseCaseParameterType;
|
|
1212
|
+
}
|
|
1213
|
+
export type ListPublicUseCasesResponseUseCaseParameterType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'checkbox-group';
|
|
1214
|
+
/** Every `ListPublicUseCasesResponseUseCaseParameterType` value, for exhaustive handling and runtime validation. */
|
|
1215
|
+
export declare const LIST_PUBLIC_USE_CASES_RESPONSE_USE_CASE_PARAMETER_TYPE_VALUES: readonly ['text', 'textarea', 'number', 'select', 'checkbox', 'checkbox-group'];
|
|
1109
1216
|
export interface ListPublicWiredModelsResponse {
|
|
1110
1217
|
excludesUserScopedModels: boolean;
|
|
1111
1218
|
models: ListPublicWiredModelsResponseModel[];
|
|
@@ -1553,6 +1660,7 @@ export interface PrVerificationReport {
|
|
|
1553
1660
|
ci: PrReportCi;
|
|
1554
1661
|
context: PrReportContext;
|
|
1555
1662
|
environments: PrReportEnvironments;
|
|
1663
|
+
followUps: PrVerificationReportFollowUps;
|
|
1556
1664
|
generatedAt: number;
|
|
1557
1665
|
judges: PrReportJudges;
|
|
1558
1666
|
merge: PrReportMerge;
|
|
@@ -1566,6 +1674,29 @@ export interface PrVerificationReport {
|
|
|
1566
1674
|
validation: PrReportValidation;
|
|
1567
1675
|
version: number;
|
|
1568
1676
|
}
|
|
1677
|
+
export interface PrVerificationReportFollowUps {
|
|
1678
|
+
dismissedByPolicy: number;
|
|
1679
|
+
dropped: number;
|
|
1680
|
+
/** Always present; `null` when the server has no value for it. */
|
|
1681
|
+
droppedBudget: PrVerificationReportFollowUpsDroppedBudget | null;
|
|
1682
|
+
entries: PrVerificationReportFollowUpsEntry[];
|
|
1683
|
+
loops: number;
|
|
1684
|
+
maxLoops: number;
|
|
1685
|
+
note?: string | null;
|
|
1686
|
+
status: PrReportCiStatus;
|
|
1687
|
+
total: number;
|
|
1688
|
+
}
|
|
1689
|
+
export interface PrVerificationReportFollowUpsDroppedBudget {
|
|
1690
|
+
loops: number;
|
|
1691
|
+
maxLoops: number;
|
|
1692
|
+
}
|
|
1693
|
+
export interface PrVerificationReportFollowUpsEntry {
|
|
1694
|
+
dismissedByPolicy: boolean;
|
|
1695
|
+
kind: PublicFollowUpItemKind;
|
|
1696
|
+
sendBackDropped: boolean;
|
|
1697
|
+
status: PublicFollowUpItemStatus;
|
|
1698
|
+
title: string;
|
|
1699
|
+
}
|
|
1569
1700
|
export interface PrVerificationReportScope {
|
|
1570
1701
|
frameId?: string | null;
|
|
1571
1702
|
frameIds?: string[];
|
|
@@ -1590,7 +1721,11 @@ export interface PublicAgentDecision {
|
|
|
1590
1721
|
export interface PublicAnswerFollowUp {
|
|
1591
1722
|
/** Length 1..4000. */
|
|
1592
1723
|
answer: string;
|
|
1724
|
+
resolution?: PublicAnswerFollowUpResolution;
|
|
1593
1725
|
}
|
|
1726
|
+
export type PublicAnswerFollowUpResolution = 'answered' | 'closed';
|
|
1727
|
+
/** Every `PublicAnswerFollowUpResolution` value, for exhaustive handling and runtime validation. */
|
|
1728
|
+
export declare const PUBLIC_ANSWER_FOLLOW_UP_RESOLUTION_VALUES: readonly ['answered', 'closed'];
|
|
1594
1729
|
export interface PublicAnswerInterview {
|
|
1595
1730
|
/** Length 0..2000. */
|
|
1596
1731
|
answer: string;
|
|
@@ -1700,6 +1835,7 @@ export interface PublicFollowUpItem {
|
|
|
1700
1835
|
detail: string;
|
|
1701
1836
|
itemId: string;
|
|
1702
1837
|
kind: PublicFollowUpItemKind;
|
|
1838
|
+
sendBackDropped: boolean;
|
|
1703
1839
|
status: PublicFollowUpItemStatus;
|
|
1704
1840
|
/** Always present; `null` when the server has no value for it. */
|
|
1705
1841
|
suggestedAction: string | null;
|
|
@@ -1712,9 +1848,9 @@ export interface PublicFollowUpItem {
|
|
|
1712
1848
|
export type PublicFollowUpItemKind = 'follow_up' | 'question';
|
|
1713
1849
|
/** Every `PublicFollowUpItemKind` value, for exhaustive handling and runtime validation. */
|
|
1714
1850
|
export declare const PUBLIC_FOLLOW_UP_ITEM_KIND_VALUES: readonly ['follow_up', 'question'];
|
|
1715
|
-
export type PublicFollowUpItemStatus = 'pending' | 'filed' | 'queued' | 'answered' | 'dismissed';
|
|
1851
|
+
export type PublicFollowUpItemStatus = 'pending' | 'filed' | 'queued' | 'answered' | 'closed' | 'dismissed';
|
|
1716
1852
|
/** Every `PublicFollowUpItemStatus` value, for exhaustive handling and runtime validation. */
|
|
1717
|
-
export declare const PUBLIC_FOLLOW_UP_ITEM_STATUS_VALUES: readonly ['pending', 'filed', 'queued', 'answered', 'dismissed'];
|
|
1853
|
+
export declare const PUBLIC_FOLLOW_UP_ITEM_STATUS_VALUES: readonly ['pending', 'filed', 'queued', 'answered', 'closed', 'dismissed'];
|
|
1718
1854
|
export interface PublicFollowUpsDecision {
|
|
1719
1855
|
items: PublicFollowUpItem[];
|
|
1720
1856
|
kind: 'follow-ups';
|
|
@@ -2173,7 +2309,7 @@ export interface PublicServiceList {
|
|
|
2173
2309
|
services: PublicService[];
|
|
2174
2310
|
}
|
|
2175
2311
|
/** Discriminated by `type`. */
|
|
2176
|
-
export type PublicServiceProvisioning = PublicServiceProvisioningVariant0 | PublicServiceProvisioningVariant1;
|
|
2312
|
+
export type PublicServiceProvisioning = PublicServiceProvisioningVariant0 | PublicServiceProvisioningVariant1 | PublicServiceProvisioningVariant2;
|
|
2177
2313
|
export interface PublicServiceProvisioningVariant0 {
|
|
2178
2314
|
manifestSource: PublicServiceProvisioningVariant0ManifestSource;
|
|
2179
2315
|
type: 'kubernetes';
|
|
@@ -2199,6 +2335,9 @@ export interface PublicServiceProvisioningVariant0ManifestSourceVariant1 {
|
|
|
2199
2335
|
type: 'separate';
|
|
2200
2336
|
}
|
|
2201
2337
|
export interface PublicServiceProvisioningVariant1 {
|
|
2338
|
+
type: 'infraless';
|
|
2339
|
+
}
|
|
2340
|
+
export interface PublicServiceProvisioningVariant2 {
|
|
2202
2341
|
/** Length 1..64. */
|
|
2203
2342
|
manifestId: string;
|
|
2204
2343
|
/** Length 0..500. */
|