@perpetualsystems/typescript-sdk 0.4.0-next-20261110214241 → 0.4.1
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 +146 -1
- package/dist/authorization-code-pkce.d.ts +1 -3
- package/dist/authorization-code-pkce.d.ts.map +1 -1
- package/dist/authorization-code-pkce.js.map +1 -1
- package/dist/client-store.d.ts +3 -3
- package/dist/client.d.ts +3 -3
- package/dist/client.js +3 -3
- package/dist/dynamic-registration.d.ts +4 -11
- package/dist/dynamic-registration.d.ts.map +1 -1
- package/dist/dynamic-registration.js +11 -10
- package/dist/dynamic-registration.js.map +1 -1
- package/dist/generated/file-schemas.gen.js +1 -1
- package/dist/generated/file-schemas.gen.js.map +1 -1
- package/dist/generated/spec-source.gen.d.ts +3 -3
- package/dist/generated/spec-source.gen.js +3 -3
- package/dist/generated/types.gen.d.ts +49 -17
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/refresh-token.d.ts +1 -3
- package/dist/refresh-token.d.ts.map +1 -1
- package/dist/refresh-token.js.map +1 -1
- package/openapi/openapi.json +221 -28
- package/package.json +1 -1
- package/src/__tests__/authorization-code-pkce.test.ts +28 -0
- package/src/__tests__/dynamic-registration.test.ts +8 -9
- package/src/authorization-code-pkce.ts +1 -3
- package/src/client-store.ts +3 -3
- package/src/client.ts +3 -3
- package/src/dynamic-registration.ts +11 -16
- package/src/generated/file-schemas.gen.ts +1 -1
- package/src/generated/spec-source.gen.ts +3 -3
- package/src/generated/types.gen.ts +49 -17
- package/src/refresh-token.ts +1 -3
|
@@ -124,6 +124,34 @@ describe("executeAuthorizationCodePkce", () => {
|
|
|
124
124
|
expect(body.get("code_verifier")).toMatch(/^[A-Za-z0-9_-]{43}$/);
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
+
it("exchanges the code with no client_secret for a public client", async () => {
|
|
128
|
+
const fetchFn = mockTokenEndpoint({
|
|
129
|
+
ok: true,
|
|
130
|
+
status: 200,
|
|
131
|
+
body: { access_token: "tok-public", token_type: "Bearer" },
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const result = await executeAuthorizationCodePkce({
|
|
135
|
+
endpoint: "https://app.prptl.org",
|
|
136
|
+
clientId: "public-cid",
|
|
137
|
+
redirectUri: "http://127.0.0.1:0/callback",
|
|
138
|
+
_fetch: fetchFn as unknown as typeof fetch,
|
|
139
|
+
_openUrl: async (url: string) => {
|
|
140
|
+
const { redirectUri, state } = parseAuthorizeUrl(url);
|
|
141
|
+
setImmediate(() => {
|
|
142
|
+
void hitCallback(redirectUri, `code=public-code&state=${state}`);
|
|
143
|
+
});
|
|
144
|
+
},
|
|
145
|
+
log: () => {},
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
expect(result.token).toBe("tok-public");
|
|
149
|
+
const body = new URLSearchParams(fetchFn.mock.calls[0][1].body as string);
|
|
150
|
+
expect(body.get("client_id")).toBe("public-cid");
|
|
151
|
+
expect(body.get("code_verifier")).toMatch(/^[A-Za-z0-9_-]{43}$/);
|
|
152
|
+
expect(body.has("client_secret")).toBe(false);
|
|
153
|
+
});
|
|
154
|
+
|
|
127
155
|
describe("token exchange failures", () => {
|
|
128
156
|
function exchangeWith(fetchFn: typeof fetch, requestTimeoutMs?: number) {
|
|
129
157
|
return executeAuthorizationCodePkce({
|
|
@@ -53,6 +53,8 @@ describe("registerClient", () => {
|
|
|
53
53
|
redirect_uris: ["http://127.0.0.1:41924/callback"],
|
|
54
54
|
grant_types: ["authorization_code", "refresh_token"],
|
|
55
55
|
response_types: ["code"],
|
|
56
|
+
token_endpoint_auth_method: "none",
|
|
57
|
+
application_type: "native",
|
|
56
58
|
}),
|
|
57
59
|
}),
|
|
58
60
|
);
|
|
@@ -76,26 +78,23 @@ describe("registerClient", () => {
|
|
|
76
78
|
expect(result.clientSecret).toBeUndefined();
|
|
77
79
|
});
|
|
78
80
|
|
|
79
|
-
it("
|
|
81
|
+
it("treats an empty client_secret as a public client with no secret", async () => {
|
|
80
82
|
const fetchFn = mockFetch({
|
|
81
83
|
ok: true,
|
|
82
84
|
status: 201,
|
|
83
85
|
body: {
|
|
84
|
-
client_id: "
|
|
86
|
+
client_id: "public-cid",
|
|
87
|
+
client_secret: "",
|
|
85
88
|
redirect_uris: ["http://127.0.0.1:0/callback"],
|
|
86
89
|
},
|
|
87
90
|
});
|
|
88
|
-
await registerClient({
|
|
91
|
+
const result = await registerClient({
|
|
89
92
|
endpoint: "https://app.prptl.org",
|
|
90
|
-
clientName: "
|
|
93
|
+
clientName: "public-client",
|
|
91
94
|
redirectUris: ["http://127.0.0.1:0/callback"],
|
|
92
|
-
grantTypes: ["client_credentials"],
|
|
93
|
-
responseTypes: ["token"],
|
|
94
95
|
_fetch: fetchFn as unknown as typeof fetch,
|
|
95
96
|
});
|
|
96
|
-
|
|
97
|
-
expect(sent.grant_types).toEqual(["client_credentials"]);
|
|
98
|
-
expect(sent.response_types).toEqual(["token"]);
|
|
97
|
+
expect(result.clientSecret).toBeUndefined();
|
|
99
98
|
});
|
|
100
99
|
|
|
101
100
|
it("throws on 4xx with body in the message", async () => {
|
|
@@ -13,9 +13,7 @@ export interface AuthorizationCodePkceOptions {
|
|
|
13
13
|
endpoint: string;
|
|
14
14
|
/** OAuth client_id (typically obtained via dynamic registration). */
|
|
15
15
|
clientId: string;
|
|
16
|
-
/**
|
|
17
|
-
* but the Perpetual backend may issue a secret on registration; if so
|
|
18
|
-
* it must be sent on the token exchange. */
|
|
16
|
+
/** Only for a confidential client. */
|
|
19
17
|
clientSecret?: string;
|
|
20
18
|
/** Loopback redirect URI registered with the authorization server.
|
|
21
19
|
* The CLI must listen on the host:port specified here. */
|
package/src/client-store.ts
CHANGED
|
@@ -15,9 +15,9 @@ import { normalizeEndpoint } from "./token-store.js";
|
|
|
15
15
|
* A dynamically registered OAuth client (RFC 7591) cached locally so the
|
|
16
16
|
* CLI doesn't need to register a fresh client_id on every invocation.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* `clientSecret` is present only for a client registered as confidential,
|
|
19
|
+
* such as a cache entry that predates public-client registration; token
|
|
20
|
+
* exchanges and refreshes must send it whenever it is present.
|
|
21
21
|
*
|
|
22
22
|
* `redirectUri` is recorded at registration time and reused on subsequent
|
|
23
23
|
* runs so the loopback server binds to the same port. If the port turns
|
package/src/client.ts
CHANGED
|
@@ -123,9 +123,9 @@ export class PerpetualClient {
|
|
|
123
123
|
* @param redirectUri - Loopback redirect URI registered with the AS;
|
|
124
124
|
* the SDK will start an HTTP server bound to its host:port to catch
|
|
125
125
|
* the callback. Use `http://127.0.0.1:PORT/callback`.
|
|
126
|
-
* @param options -
|
|
127
|
-
*
|
|
128
|
-
*
|
|
126
|
+
* @param options - client_secret (only for a confidential client; a
|
|
127
|
+
* client from `registerClient` is public and normally has none; pass
|
|
128
|
+
* its secret if it has one), log/open overrides for testing, and timeout.
|
|
129
129
|
* @returns Object containing the access token and optional refresh token
|
|
130
130
|
* + expiration in seconds.
|
|
131
131
|
*/
|
|
@@ -10,10 +10,6 @@ export interface RegisterClientOptions {
|
|
|
10
10
|
endpoint: string;
|
|
11
11
|
clientName: string;
|
|
12
12
|
redirectUris: string[];
|
|
13
|
-
/** Defaults to ["authorization_code", "refresh_token"] for interactive CLI clients. */
|
|
14
|
-
grantTypes?: string[];
|
|
15
|
-
/** Defaults to ["code"]. */
|
|
16
|
-
responseTypes?: string[];
|
|
17
13
|
/** Override fetch for testing */
|
|
18
14
|
_fetch?: typeof fetch;
|
|
19
15
|
requestTimeoutMs?: number;
|
|
@@ -21,18 +17,15 @@ export interface RegisterClientOptions {
|
|
|
21
17
|
|
|
22
18
|
export interface RegisteredClient {
|
|
23
19
|
clientId: string;
|
|
24
|
-
/**
|
|
20
|
+
/** Returned only if the server registered a confidential client anyway; send it on every token request. */
|
|
25
21
|
clientSecret?: string;
|
|
26
22
|
redirectUris: string[];
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
/**
|
|
30
|
-
* Register a
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* The Perpetual backend issues a client_secret even for public PKCE clients;
|
|
35
|
-
* callers using the authorization-code-pkce flow may ignore the secret.
|
|
26
|
+
* Register a public native OAuth client (RFC 7591, RFC 8252) that
|
|
27
|
+
* authenticates with PKCE alone. The Perpetual backend refuses anonymous
|
|
28
|
+
* registration of any client that would hold a secret.
|
|
36
29
|
*/
|
|
37
30
|
export async function registerClient(
|
|
38
31
|
options: RegisterClientOptions,
|
|
@@ -41,8 +34,6 @@ export async function registerClient(
|
|
|
41
34
|
endpoint,
|
|
42
35
|
clientName,
|
|
43
36
|
redirectUris,
|
|
44
|
-
grantTypes = ["authorization_code", "refresh_token"],
|
|
45
|
-
responseTypes = ["code"],
|
|
46
37
|
_fetch: fetchFn = fetch,
|
|
47
38
|
requestTimeoutMs = OAUTH_REQUEST_TIMEOUT_MS,
|
|
48
39
|
} = options;
|
|
@@ -56,8 +47,10 @@ export async function registerClient(
|
|
|
56
47
|
body: JSON.stringify({
|
|
57
48
|
client_name: clientName,
|
|
58
49
|
redirect_uris: redirectUris,
|
|
59
|
-
grant_types:
|
|
60
|
-
response_types:
|
|
50
|
+
grant_types: ["authorization_code", "refresh_token"],
|
|
51
|
+
response_types: ["code"],
|
|
52
|
+
token_endpoint_auth_method: "none",
|
|
53
|
+
application_type: "native",
|
|
61
54
|
}),
|
|
62
55
|
signal: AbortSignal.timeout(requestTimeoutMs),
|
|
63
56
|
});
|
|
@@ -103,7 +96,9 @@ export async function registerClient(
|
|
|
103
96
|
return {
|
|
104
97
|
clientId: data.client_id,
|
|
105
98
|
clientSecret:
|
|
106
|
-
typeof data.client_secret === "string"
|
|
99
|
+
typeof data.client_secret === "string" && data.client_secret
|
|
100
|
+
? data.client_secret
|
|
101
|
+
: undefined,
|
|
107
102
|
redirectUris: data.redirect_uris as string[],
|
|
108
103
|
};
|
|
109
104
|
}
|
|
@@ -2415,7 +2415,7 @@ export const fileSchemas: Readonly<Record<string, Record<string, unknown>>> = {
|
|
|
2415
2415
|
"type": "boolean"
|
|
2416
2416
|
},
|
|
2417
2417
|
"deploy": {
|
|
2418
|
-
"description": "Whether to deploy the detection
|
|
2418
|
+
"description": "Whether to deploy the detection.",
|
|
2419
2419
|
"type": "boolean"
|
|
2420
2420
|
},
|
|
2421
2421
|
"description": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export const specSource = {
|
|
4
4
|
repository: "perpetualsystems/simba",
|
|
5
5
|
path: "ipc/management-plane/openapi-0.0.1-alpha1.json",
|
|
6
|
-
sha: "
|
|
7
|
-
sha256: "
|
|
8
|
-
fileSchemasSha: "
|
|
6
|
+
sha: "b5f2ca1dbec3207b37d68ff9d21a8eff6d2889dc",
|
|
7
|
+
sha256: "84afb34d2375943bcc6515cd0f3fe6dd03c48bc8f00a917b6f7757df808d9e26",
|
|
8
|
+
fileSchemasSha: "b5f2ca1dbec3207b37d68ff9d21a8eff6d2889dc",
|
|
9
9
|
} as const;
|
|
@@ -429,7 +429,7 @@ export type Detection = {
|
|
|
429
429
|
createdByUserId: string | null;
|
|
430
430
|
deleted?: boolean;
|
|
431
431
|
/**
|
|
432
|
-
* Whether to deploy the detection
|
|
432
|
+
* Whether to deploy the detection.
|
|
433
433
|
*/
|
|
434
434
|
deploy: boolean;
|
|
435
435
|
deploymentStatus: 'UNDEPLOYED' | 'DEPLOYED' | 'FAILED' | 'DEGRADED' | 'DEPLOY_PENDING' | 'DEPLOY_IN_PROGRESS' | 'UPDATE_PENDING' | 'UPDATE_IN_PROGRESS' | 'REFRESH_IN_PROGRESS' | 'ARCHIVED' | 'CLEANUP_PENDING' | 'CLEANUP_IN_PROGRESS';
|
|
@@ -5478,7 +5478,7 @@ export type ChangesetsGetResponses = {
|
|
|
5478
5478
|
name: string;
|
|
5479
5479
|
query: string;
|
|
5480
5480
|
}>;
|
|
5481
|
-
query
|
|
5481
|
+
query?: string;
|
|
5482
5482
|
spec: {
|
|
5483
5483
|
[key: string]: unknown;
|
|
5484
5484
|
};
|
|
@@ -5857,7 +5857,7 @@ export type ChangesetsGetResponses = {
|
|
|
5857
5857
|
createdByUserId: string | null;
|
|
5858
5858
|
deleted?: boolean;
|
|
5859
5859
|
/**
|
|
5860
|
-
* Whether to deploy the detection
|
|
5860
|
+
* Whether to deploy the detection.
|
|
5861
5861
|
*/
|
|
5862
5862
|
deploy: boolean;
|
|
5863
5863
|
deploymentStatus: 'UNDEPLOYED' | 'DEPLOYED' | 'FAILED' | 'DEGRADED' | 'DEPLOY_PENDING' | 'DEPLOY_IN_PROGRESS' | 'UPDATE_PENDING' | 'UPDATE_IN_PROGRESS' | 'REFRESH_IN_PROGRESS' | 'ARCHIVED' | 'CLEANUP_PENDING' | 'CLEANUP_IN_PROGRESS';
|
|
@@ -9125,6 +9125,8 @@ export type ContentPackInstallationsListResponses = {
|
|
|
9125
9125
|
*/
|
|
9126
9126
|
count: number;
|
|
9127
9127
|
items: Array<{
|
|
9128
|
+
automaticUpdateFailed: boolean;
|
|
9129
|
+
automaticUpdatePending: boolean;
|
|
9128
9130
|
changesetId: string | null;
|
|
9129
9131
|
changesetStatus: 'Unchanged' | 'Added' | 'Modified' | 'Deleted' | null;
|
|
9130
9132
|
contentPackId: string;
|
|
@@ -9132,6 +9134,7 @@ export type ContentPackInstallationsListResponses = {
|
|
|
9132
9134
|
createdByUserId: string | null;
|
|
9133
9135
|
deleted?: boolean;
|
|
9134
9136
|
draftChangesetId: string | null;
|
|
9137
|
+
hasOpenChangesetChange: boolean;
|
|
9135
9138
|
id: string;
|
|
9136
9139
|
installDeployed: boolean;
|
|
9137
9140
|
/**
|
|
@@ -9142,6 +9145,7 @@ export type ContentPackInstallationsListResponses = {
|
|
|
9142
9145
|
installedReleaseVersion: number;
|
|
9143
9146
|
linkMode: 'Manual' | 'Copy' | 'Automatic';
|
|
9144
9147
|
name: string;
|
|
9148
|
+
openChangesetChangeCount: number;
|
|
9145
9149
|
organizationId: string;
|
|
9146
9150
|
packMeetsMinHamelinVersion: boolean;
|
|
9147
9151
|
packMinHamelinVersion: string | null;
|
|
@@ -9319,6 +9323,8 @@ export type ContentPackInstallationsInstallResponses = {
|
|
|
9319
9323
|
*/
|
|
9320
9324
|
installFolderId: string;
|
|
9321
9325
|
installation: {
|
|
9326
|
+
automaticUpdateFailed: boolean;
|
|
9327
|
+
automaticUpdatePending: boolean;
|
|
9322
9328
|
changesetId: string | null;
|
|
9323
9329
|
changesetStatus: 'Unchanged' | 'Added' | 'Modified' | 'Deleted' | null;
|
|
9324
9330
|
contentPackId: string;
|
|
@@ -9326,6 +9332,7 @@ export type ContentPackInstallationsInstallResponses = {
|
|
|
9326
9332
|
createdByUserId: string | null;
|
|
9327
9333
|
deleted?: boolean;
|
|
9328
9334
|
draftChangesetId: string | null;
|
|
9335
|
+
hasOpenChangesetChange: boolean;
|
|
9329
9336
|
id: string;
|
|
9330
9337
|
installDeployed: boolean;
|
|
9331
9338
|
/**
|
|
@@ -9336,6 +9343,7 @@ export type ContentPackInstallationsInstallResponses = {
|
|
|
9336
9343
|
installedReleaseVersion: number;
|
|
9337
9344
|
linkMode: 'Manual' | 'Copy' | 'Automatic';
|
|
9338
9345
|
name: string;
|
|
9346
|
+
openChangesetChangeCount: number;
|
|
9339
9347
|
organizationId: string;
|
|
9340
9348
|
packMeetsMinHamelinVersion: boolean;
|
|
9341
9349
|
packMinHamelinVersion: string | null;
|
|
@@ -9408,6 +9416,8 @@ export type ContentPackInstallationsBatchUpdateResponses = {
|
|
|
9408
9416
|
updatedAt: string;
|
|
9409
9417
|
} | null;
|
|
9410
9418
|
installations: Array<{
|
|
9419
|
+
automaticUpdateFailed: boolean;
|
|
9420
|
+
automaticUpdatePending: boolean;
|
|
9411
9421
|
changesetId: string | null;
|
|
9412
9422
|
changesetStatus: 'Unchanged' | 'Added' | 'Modified' | 'Deleted' | null;
|
|
9413
9423
|
contentPackId: string;
|
|
@@ -9415,6 +9425,7 @@ export type ContentPackInstallationsBatchUpdateResponses = {
|
|
|
9415
9425
|
createdByUserId: string | null;
|
|
9416
9426
|
deleted?: boolean;
|
|
9417
9427
|
draftChangesetId: string | null;
|
|
9428
|
+
hasOpenChangesetChange: boolean;
|
|
9418
9429
|
id: string;
|
|
9419
9430
|
installDeployed: boolean;
|
|
9420
9431
|
/**
|
|
@@ -9425,6 +9436,7 @@ export type ContentPackInstallationsBatchUpdateResponses = {
|
|
|
9425
9436
|
installedReleaseVersion: number;
|
|
9426
9437
|
linkMode: 'Manual' | 'Copy' | 'Automatic';
|
|
9427
9438
|
name: string;
|
|
9439
|
+
openChangesetChangeCount: number;
|
|
9428
9440
|
organizationId: string;
|
|
9429
9441
|
packMeetsMinHamelinVersion: boolean;
|
|
9430
9442
|
packMinHamelinVersion: string | null;
|
|
@@ -9518,6 +9530,8 @@ export type ContentPackInstallationsLinkResponses = {
|
|
|
9518
9530
|
*/
|
|
9519
9531
|
installFolderId: string;
|
|
9520
9532
|
installation: {
|
|
9533
|
+
automaticUpdateFailed: boolean;
|
|
9534
|
+
automaticUpdatePending: boolean;
|
|
9521
9535
|
changesetId: string | null;
|
|
9522
9536
|
changesetStatus: 'Unchanged' | 'Added' | 'Modified' | 'Deleted' | null;
|
|
9523
9537
|
contentPackId: string;
|
|
@@ -9525,6 +9539,7 @@ export type ContentPackInstallationsLinkResponses = {
|
|
|
9525
9539
|
createdByUserId: string | null;
|
|
9526
9540
|
deleted?: boolean;
|
|
9527
9541
|
draftChangesetId: string | null;
|
|
9542
|
+
hasOpenChangesetChange: boolean;
|
|
9528
9543
|
id: string;
|
|
9529
9544
|
installDeployed: boolean;
|
|
9530
9545
|
/**
|
|
@@ -9535,6 +9550,7 @@ export type ContentPackInstallationsLinkResponses = {
|
|
|
9535
9550
|
installedReleaseVersion: number;
|
|
9536
9551
|
linkMode: 'Manual' | 'Copy' | 'Automatic';
|
|
9537
9552
|
name: string;
|
|
9553
|
+
openChangesetChangeCount: number;
|
|
9538
9554
|
organizationId: string;
|
|
9539
9555
|
packMeetsMinHamelinVersion: boolean;
|
|
9540
9556
|
packMinHamelinVersion: string | null;
|
|
@@ -9589,6 +9605,8 @@ export type ContentPackInstallationsGetByIdResponses = {
|
|
|
9589
9605
|
* Content Pack Installation
|
|
9590
9606
|
*/
|
|
9591
9607
|
200: {
|
|
9608
|
+
automaticUpdateFailed: boolean;
|
|
9609
|
+
automaticUpdatePending: boolean;
|
|
9592
9610
|
changesetId: string | null;
|
|
9593
9611
|
changesetStatus: 'Unchanged' | 'Added' | 'Modified' | 'Deleted' | null;
|
|
9594
9612
|
contentPackId: string;
|
|
@@ -9596,6 +9614,7 @@ export type ContentPackInstallationsGetByIdResponses = {
|
|
|
9596
9614
|
createdByUserId: string | null;
|
|
9597
9615
|
deleted?: boolean;
|
|
9598
9616
|
draftChangesetId: string | null;
|
|
9617
|
+
hasOpenChangesetChange: boolean;
|
|
9599
9618
|
id: string;
|
|
9600
9619
|
installDeployed: boolean;
|
|
9601
9620
|
/**
|
|
@@ -9606,6 +9625,7 @@ export type ContentPackInstallationsGetByIdResponses = {
|
|
|
9606
9625
|
installedReleaseVersion: number;
|
|
9607
9626
|
linkMode: 'Manual' | 'Copy' | 'Automatic';
|
|
9608
9627
|
name: string;
|
|
9628
|
+
openChangesetChangeCount: number;
|
|
9609
9629
|
organizationId: string;
|
|
9610
9630
|
packMeetsMinHamelinVersion: boolean;
|
|
9611
9631
|
packMinHamelinVersion: string | null;
|
|
@@ -9658,6 +9678,8 @@ export type ContentPackInstallationsUpdateInstallDeployedResponses = {
|
|
|
9658
9678
|
* Content Pack Installation
|
|
9659
9679
|
*/
|
|
9660
9680
|
200: {
|
|
9681
|
+
automaticUpdateFailed: boolean;
|
|
9682
|
+
automaticUpdatePending: boolean;
|
|
9661
9683
|
changesetId: string | null;
|
|
9662
9684
|
changesetStatus: 'Unchanged' | 'Added' | 'Modified' | 'Deleted' | null;
|
|
9663
9685
|
contentPackId: string;
|
|
@@ -9665,6 +9687,7 @@ export type ContentPackInstallationsUpdateInstallDeployedResponses = {
|
|
|
9665
9687
|
createdByUserId: string | null;
|
|
9666
9688
|
deleted?: boolean;
|
|
9667
9689
|
draftChangesetId: string | null;
|
|
9690
|
+
hasOpenChangesetChange: boolean;
|
|
9668
9691
|
id: string;
|
|
9669
9692
|
installDeployed: boolean;
|
|
9670
9693
|
/**
|
|
@@ -9675,6 +9698,7 @@ export type ContentPackInstallationsUpdateInstallDeployedResponses = {
|
|
|
9675
9698
|
installedReleaseVersion: number;
|
|
9676
9699
|
linkMode: 'Manual' | 'Copy' | 'Automatic';
|
|
9677
9700
|
name: string;
|
|
9701
|
+
openChangesetChangeCount: number;
|
|
9678
9702
|
organizationId: string;
|
|
9679
9703
|
packMeetsMinHamelinVersion: boolean;
|
|
9680
9704
|
packMinHamelinVersion: string | null;
|
|
@@ -9731,6 +9755,8 @@ export type ContentPackInstallationsUpdateLinkModeResponses = {
|
|
|
9731
9755
|
* Content Pack Installation
|
|
9732
9756
|
*/
|
|
9733
9757
|
200: {
|
|
9758
|
+
automaticUpdateFailed: boolean;
|
|
9759
|
+
automaticUpdatePending: boolean;
|
|
9734
9760
|
changesetId: string | null;
|
|
9735
9761
|
changesetStatus: 'Unchanged' | 'Added' | 'Modified' | 'Deleted' | null;
|
|
9736
9762
|
contentPackId: string;
|
|
@@ -9738,6 +9764,7 @@ export type ContentPackInstallationsUpdateLinkModeResponses = {
|
|
|
9738
9764
|
createdByUserId: string | null;
|
|
9739
9765
|
deleted?: boolean;
|
|
9740
9766
|
draftChangesetId: string | null;
|
|
9767
|
+
hasOpenChangesetChange: boolean;
|
|
9741
9768
|
id: string;
|
|
9742
9769
|
installDeployed: boolean;
|
|
9743
9770
|
/**
|
|
@@ -9748,6 +9775,7 @@ export type ContentPackInstallationsUpdateLinkModeResponses = {
|
|
|
9748
9775
|
installedReleaseVersion: number;
|
|
9749
9776
|
linkMode: 'Manual' | 'Copy' | 'Automatic';
|
|
9750
9777
|
name: string;
|
|
9778
|
+
openChangesetChangeCount: number;
|
|
9751
9779
|
organizationId: string;
|
|
9752
9780
|
packMeetsMinHamelinVersion: boolean;
|
|
9753
9781
|
packMinHamelinVersion: string | null;
|
|
@@ -9950,6 +9978,8 @@ export type ContentPackInstallationsUpdateResponses = {
|
|
|
9950
9978
|
* Content Pack Installation
|
|
9951
9979
|
*/
|
|
9952
9980
|
installation: {
|
|
9981
|
+
automaticUpdateFailed: boolean;
|
|
9982
|
+
automaticUpdatePending: boolean;
|
|
9953
9983
|
changesetId: string | null;
|
|
9954
9984
|
changesetStatus: 'Unchanged' | 'Added' | 'Modified' | 'Deleted' | null;
|
|
9955
9985
|
contentPackId: string;
|
|
@@ -9957,6 +9987,7 @@ export type ContentPackInstallationsUpdateResponses = {
|
|
|
9957
9987
|
createdByUserId: string | null;
|
|
9958
9988
|
deleted?: boolean;
|
|
9959
9989
|
draftChangesetId: string | null;
|
|
9990
|
+
hasOpenChangesetChange: boolean;
|
|
9960
9991
|
id: string;
|
|
9961
9992
|
installDeployed: boolean;
|
|
9962
9993
|
/**
|
|
@@ -9967,6 +9998,7 @@ export type ContentPackInstallationsUpdateResponses = {
|
|
|
9967
9998
|
installedReleaseVersion: number;
|
|
9968
9999
|
linkMode: 'Manual' | 'Copy' | 'Automatic';
|
|
9969
10000
|
name: string;
|
|
10001
|
+
openChangesetChangeCount: number;
|
|
9970
10002
|
organizationId: string;
|
|
9971
10003
|
packMeetsMinHamelinVersion: boolean;
|
|
9972
10004
|
packMinHamelinVersion: string | null;
|
|
@@ -10466,7 +10498,7 @@ export type ContentPacksDashboardsCreateData = {
|
|
|
10466
10498
|
name: string;
|
|
10467
10499
|
query: string;
|
|
10468
10500
|
}>;
|
|
10469
|
-
query
|
|
10501
|
+
query?: string;
|
|
10470
10502
|
spec: {
|
|
10471
10503
|
[key: string]: unknown;
|
|
10472
10504
|
};
|
|
@@ -10618,7 +10650,7 @@ export type ContentPacksDashboardsCreateResponses = {
|
|
|
10618
10650
|
name: string;
|
|
10619
10651
|
query: string;
|
|
10620
10652
|
}>;
|
|
10621
|
-
query
|
|
10653
|
+
query?: string;
|
|
10622
10654
|
spec: {
|
|
10623
10655
|
[key: string]: unknown;
|
|
10624
10656
|
};
|
|
@@ -10806,7 +10838,7 @@ export type ContentPacksDashboardsGetByIdResponses = {
|
|
|
10806
10838
|
name: string;
|
|
10807
10839
|
query: string;
|
|
10808
10840
|
}>;
|
|
10809
|
-
query
|
|
10841
|
+
query?: string;
|
|
10810
10842
|
spec: {
|
|
10811
10843
|
[key: string]: unknown;
|
|
10812
10844
|
};
|
|
@@ -10911,7 +10943,7 @@ export type ContentPacksDashboardsUpdateData = {
|
|
|
10911
10943
|
name: string;
|
|
10912
10944
|
query: string;
|
|
10913
10945
|
}>;
|
|
10914
|
-
query
|
|
10946
|
+
query?: string;
|
|
10915
10947
|
spec: {
|
|
10916
10948
|
[key: string]: unknown;
|
|
10917
10949
|
};
|
|
@@ -11047,7 +11079,7 @@ export type ContentPacksDashboardsUpdateResponses = {
|
|
|
11047
11079
|
name: string;
|
|
11048
11080
|
query: string;
|
|
11049
11081
|
}>;
|
|
11050
|
-
query
|
|
11082
|
+
query?: string;
|
|
11051
11083
|
spec: {
|
|
11052
11084
|
[key: string]: unknown;
|
|
11053
11085
|
};
|
|
@@ -14890,7 +14922,7 @@ export type ContentPacksGetContentTemplateResponses = {
|
|
|
14890
14922
|
name: string;
|
|
14891
14923
|
query: string;
|
|
14892
14924
|
}>;
|
|
14893
|
-
query
|
|
14925
|
+
query?: string;
|
|
14894
14926
|
spec: {
|
|
14895
14927
|
[key: string]: unknown;
|
|
14896
14928
|
};
|
|
@@ -16961,7 +16993,7 @@ export type DashboardsListResponses = {
|
|
|
16961
16993
|
name: string;
|
|
16962
16994
|
query: string;
|
|
16963
16995
|
}>;
|
|
16964
|
-
query
|
|
16996
|
+
query?: string;
|
|
16965
16997
|
spec: {
|
|
16966
16998
|
[key: string]: unknown;
|
|
16967
16999
|
};
|
|
@@ -17075,7 +17107,7 @@ export type DashboardsCreateData = {
|
|
|
17075
17107
|
name: string;
|
|
17076
17108
|
query: string;
|
|
17077
17109
|
}>;
|
|
17078
|
-
query
|
|
17110
|
+
query?: string;
|
|
17079
17111
|
spec: {
|
|
17080
17112
|
[key: string]: unknown;
|
|
17081
17113
|
};
|
|
@@ -17239,7 +17271,7 @@ export type DashboardsCreateResponses = {
|
|
|
17239
17271
|
name: string;
|
|
17240
17272
|
query: string;
|
|
17241
17273
|
}>;
|
|
17242
|
-
query
|
|
17274
|
+
query?: string;
|
|
17243
17275
|
spec: {
|
|
17244
17276
|
[key: string]: unknown;
|
|
17245
17277
|
};
|
|
@@ -17516,7 +17548,7 @@ export type DashboardsGetByIdResponses = {
|
|
|
17516
17548
|
name: string;
|
|
17517
17549
|
query: string;
|
|
17518
17550
|
}>;
|
|
17519
|
-
query
|
|
17551
|
+
query?: string;
|
|
17520
17552
|
spec: {
|
|
17521
17553
|
[key: string]: unknown;
|
|
17522
17554
|
};
|
|
@@ -17621,7 +17653,7 @@ export type DashboardsUpdateData = {
|
|
|
17621
17653
|
name: string;
|
|
17622
17654
|
query: string;
|
|
17623
17655
|
}>;
|
|
17624
|
-
query
|
|
17656
|
+
query?: string;
|
|
17625
17657
|
spec: {
|
|
17626
17658
|
[key: string]: unknown;
|
|
17627
17659
|
};
|
|
@@ -17772,7 +17804,7 @@ export type DashboardsUpdateResponses = {
|
|
|
17772
17804
|
name: string;
|
|
17773
17805
|
query: string;
|
|
17774
17806
|
}>;
|
|
17775
|
-
query
|
|
17807
|
+
query?: string;
|
|
17776
17808
|
spec: {
|
|
17777
17809
|
[key: string]: unknown;
|
|
17778
17810
|
};
|
|
@@ -18713,7 +18745,7 @@ export type DetectionCreateData = {
|
|
|
18713
18745
|
*/
|
|
18714
18746
|
createCase?: boolean;
|
|
18715
18747
|
/**
|
|
18716
|
-
* Whether to deploy the detection
|
|
18748
|
+
* Whether to deploy the detection.
|
|
18717
18749
|
*/
|
|
18718
18750
|
deploy: boolean;
|
|
18719
18751
|
/**
|
|
@@ -18989,7 +19021,7 @@ export type DetectionUpdateData = {
|
|
|
18989
19021
|
*/
|
|
18990
19022
|
createCase?: boolean;
|
|
18991
19023
|
/**
|
|
18992
|
-
* Whether to deploy the detection
|
|
19024
|
+
* Whether to deploy the detection.
|
|
18993
19025
|
*/
|
|
18994
19026
|
deploy?: boolean;
|
|
18995
19027
|
/**
|
package/src/refresh-token.ts
CHANGED
|
@@ -11,9 +11,7 @@ export interface RefreshTokenGrantOptions {
|
|
|
11
11
|
/** OAuth client_id from dynamic registration. Public clients still send
|
|
12
12
|
* client_id on refresh; confidential clients also send client_secret. */
|
|
13
13
|
clientId: string;
|
|
14
|
-
/**
|
|
15
|
-
* flows can omit it, but the Perpetual backend may issue a secret on
|
|
16
|
-
* registration which must be included here. */
|
|
14
|
+
/** Only for a confidential client. */
|
|
17
15
|
clientSecret?: string;
|
|
18
16
|
/** The refresh token to exchange. Per OAuth 2.1 §6, the AS may rotate
|
|
19
17
|
* this on every use — the response's refresh_token field MUST be saved
|