@brazosd/node 0.1.10 → 0.1.12
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 +4 -1
- package/browser.d.ts +125 -4
- package/browser.js +132 -4
- package/index.d.ts +126 -5
- package/index.js +132 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -125,7 +125,10 @@ Each client keeps its own URL, credential provider and request configuration. Co
|
|
|
125
125
|
|
|
126
126
|
SSO requires `@brazosd/node` 0.1.2 or later. `createSSO()` supports
|
|
127
127
|
`org-user` (same-organization user API credentials) and
|
|
128
|
-
`identity` (an
|
|
128
|
+
`identity` (an application-specific JWT). Identity login accepts any membership
|
|
129
|
+
by default. To limit it to the installation's organization, pass
|
|
130
|
+
`headers: { 'X-Brazosd-SSO-Org-Id': process.env.LEAWAN_ORG_ID }` to `createSSO`
|
|
131
|
+
after validating the runtime organization ID.
|
|
129
132
|
|
|
130
133
|
```js
|
|
131
134
|
import { createSSO } from '@brazosd/node';
|
package/browser.d.ts
CHANGED
|
@@ -762,6 +762,10 @@ type AppendAgentSessionEventRequest = {
|
|
|
762
762
|
*/
|
|
763
763
|
skipPersistent?: boolean;
|
|
764
764
|
};
|
|
765
|
+
type AuthorizeDockSSORequest = {
|
|
766
|
+
installationId: string;
|
|
767
|
+
orgId: number;
|
|
768
|
+
};
|
|
765
769
|
type SSOMode = "org-user" | "identity";
|
|
766
770
|
type AuthorizeSSORequest = {
|
|
767
771
|
mode: SSOMode;
|
|
@@ -3511,6 +3515,9 @@ type SSOGrant = {
|
|
|
3511
3515
|
type SSORequest = {
|
|
3512
3516
|
appId?: string;
|
|
3513
3517
|
appName: string;
|
|
3518
|
+
/**
|
|
3519
|
+
* Organization that owns the deployed application.
|
|
3520
|
+
*/
|
|
3514
3521
|
appOrgId?: number;
|
|
3515
3522
|
/**
|
|
3516
3523
|
* Local CLI callback containing only the request state and access_denied.
|
|
@@ -3524,6 +3531,10 @@ type SSORequest = {
|
|
|
3524
3531
|
id: string;
|
|
3525
3532
|
mode: SSOMode;
|
|
3526
3533
|
redirectUri: string;
|
|
3534
|
+
/**
|
|
3535
|
+
* The only organization that can authorize this request, when restricted.
|
|
3536
|
+
*/
|
|
3537
|
+
requiredOrgId?: number;
|
|
3527
3538
|
/**
|
|
3528
3539
|
* Cloud permissions requested by the CLI.
|
|
3529
3540
|
*/
|
|
@@ -4187,7 +4198,7 @@ declare class DefaultService {
|
|
|
4187
4198
|
}): CancelablePromise<void>;
|
|
4188
4199
|
/**
|
|
4189
4200
|
* Authorize using a human account login
|
|
4190
|
-
*
|
|
4201
|
+
* Requires a human account access token and an active membership in the selected organization. When the request specifies requiredOrgId, the selected organization must match. Returns a one-time authorization code.
|
|
4191
4202
|
* @returns SSOAuthorization Verified callback URL containing code and state
|
|
4192
4203
|
* @throws ApiError
|
|
4193
4204
|
*/
|
|
@@ -4195,6 +4206,16 @@ declare class DefaultService {
|
|
|
4195
4206
|
requestId: string;
|
|
4196
4207
|
requestBody: AuthorizeSSORequest;
|
|
4197
4208
|
}): CancelablePromise<SSOAuthorization>;
|
|
4209
|
+
/**
|
|
4210
|
+
* Sign in to the installed application opened in the desktop Dock
|
|
4211
|
+
* Uses the console's account access token. The member must be able to open the installation in the selected organization, and that organization must satisfy the request's requiredOrgId when present. Only an identity request from that installation's deployed application is eligible.
|
|
4212
|
+
* @returns SSOAuthorization Registered callback URL with a one-time authorization code and state
|
|
4213
|
+
* @throws ApiError
|
|
4214
|
+
*/
|
|
4215
|
+
authorizeDockSsoRequest({ requestId, requestBody, }: {
|
|
4216
|
+
requestId: string;
|
|
4217
|
+
requestBody: AuthorizeDockSSORequest;
|
|
4218
|
+
}): CancelablePromise<SSOAuthorization>;
|
|
4198
4219
|
/**
|
|
4199
4220
|
* Remove an agent contact list member
|
|
4200
4221
|
* Remove a delegation target from the specified agent within the current org
|
|
@@ -7353,8 +7374,12 @@ declare class DefaultService {
|
|
|
7353
7374
|
* @returns SSORequest Login request
|
|
7354
7375
|
* @throws ApiError
|
|
7355
7376
|
*/
|
|
7356
|
-
createSsoRequest({ requestBody, }: {
|
|
7377
|
+
createSsoRequest({ requestBody, xBrazosdSsoOrgId, }: {
|
|
7357
7378
|
requestBody: CreateSSORequest;
|
|
7379
|
+
/**
|
|
7380
|
+
* Restrict this login to a member of this organization. An org-user application request always requires the application's own organization.
|
|
7381
|
+
*/
|
|
7382
|
+
xBrazosdSsoOrgId?: number;
|
|
7358
7383
|
}): CancelablePromise<SSORequest>;
|
|
7359
7384
|
/**
|
|
7360
7385
|
* Preview a short-lived SSO request
|
|
@@ -7860,6 +7885,52 @@ type AppLogPage = {
|
|
|
7860
7885
|
*/
|
|
7861
7886
|
retryAfterSeconds?: number;
|
|
7862
7887
|
};
|
|
7888
|
+
type RuntimeMetricPoint = {
|
|
7889
|
+
/**
|
|
7890
|
+
* Inclusive end of this observation window in Unix seconds.
|
|
7891
|
+
*/
|
|
7892
|
+
timestamp: number;
|
|
7893
|
+
/**
|
|
7894
|
+
* Observed main-container CPU in millicores.
|
|
7895
|
+
*/
|
|
7896
|
+
cpuMillicores?: number;
|
|
7897
|
+
/**
|
|
7898
|
+
* CPU as a percentage of the admitted CPU allocation.
|
|
7899
|
+
*/
|
|
7900
|
+
cpuPercent?: number;
|
|
7901
|
+
/**
|
|
7902
|
+
* Main-container working set in MiB.
|
|
7903
|
+
*/
|
|
7904
|
+
memoryMiB?: number;
|
|
7905
|
+
/**
|
|
7906
|
+
* Working set as a percentage of the admitted memory allocation.
|
|
7907
|
+
*/
|
|
7908
|
+
memoryPercent?: number;
|
|
7909
|
+
/**
|
|
7910
|
+
* Sampled HTTP requests or SQL executions in progress.
|
|
7911
|
+
*/
|
|
7912
|
+
inFlight?: number;
|
|
7913
|
+
/**
|
|
7914
|
+
* Observed completions between sampled histogram counters.
|
|
7915
|
+
*/
|
|
7916
|
+
completedRequests?: number;
|
|
7917
|
+
latencyAvgMs?: number;
|
|
7918
|
+
latencyP50Ms?: number;
|
|
7919
|
+
latencyP95Ms?: number;
|
|
7920
|
+
};
|
|
7921
|
+
type FunctionInstanceMetrics = {
|
|
7922
|
+
instanceId: string;
|
|
7923
|
+
points: Array<RuntimeMetricPoint>;
|
|
7924
|
+
};
|
|
7925
|
+
type AppMetrics = {
|
|
7926
|
+
from: number;
|
|
7927
|
+
to: number;
|
|
7928
|
+
/**
|
|
7929
|
+
* Window length in seconds selected by the server for the queried range and runtime activations. The last window may be shorter.
|
|
7930
|
+
*/
|
|
7931
|
+
stepSeconds: number;
|
|
7932
|
+
instances: Array<FunctionInstanceMetrics>;
|
|
7933
|
+
};
|
|
7863
7934
|
type AppSettings = {
|
|
7864
7935
|
enabled?: boolean;
|
|
7865
7936
|
runtime?: "nodejs";
|
|
@@ -8061,6 +8132,15 @@ type DatabaseInput = {
|
|
|
8061
8132
|
type DatabaseMaintenance = {
|
|
8062
8133
|
maintenanceStartedAt: string | null;
|
|
8063
8134
|
};
|
|
8135
|
+
type DatabaseMetrics = {
|
|
8136
|
+
from: number;
|
|
8137
|
+
to: number;
|
|
8138
|
+
/**
|
|
8139
|
+
* Window length in seconds selected by the server for the queried range and runtime activations. The last window may be shorter.
|
|
8140
|
+
*/
|
|
8141
|
+
stepSeconds: number;
|
|
8142
|
+
points: Array<RuntimeMetricPoint>;
|
|
8143
|
+
};
|
|
8064
8144
|
type DatabaseRollback = {
|
|
8065
8145
|
id: string;
|
|
8066
8146
|
databaseId: string;
|
|
@@ -8416,6 +8496,22 @@ declare class DefaultService$2 {
|
|
|
8416
8496
|
deleteApp({ id, }: {
|
|
8417
8497
|
id: string;
|
|
8418
8498
|
}): CancelablePromise<any>;
|
|
8499
|
+
/**
|
|
8500
|
+
* Read aligned runtime metrics for the instances of one function, including retired instances
|
|
8501
|
+
* @returns AppMetrics Observed runtime metrics. Missing observations and latency without completed requests are omitted.
|
|
8502
|
+
* @throws ApiError
|
|
8503
|
+
*/
|
|
8504
|
+
getAppMetrics({ id, from, to, }: {
|
|
8505
|
+
id: string;
|
|
8506
|
+
/**
|
|
8507
|
+
* Start of the first observation window, in Unix seconds.
|
|
8508
|
+
*/
|
|
8509
|
+
from: number;
|
|
8510
|
+
/**
|
|
8511
|
+
* Inclusive end in Unix seconds. Each query may cover up to 24 hours and must end no later than the current time.
|
|
8512
|
+
*/
|
|
8513
|
+
to: number;
|
|
8514
|
+
}): CancelablePromise<AppMetrics>;
|
|
8419
8515
|
/**
|
|
8420
8516
|
* Keep an active function instance running while it processes background work
|
|
8421
8517
|
* @returns void
|
|
@@ -8548,6 +8644,22 @@ declare class DefaultService$2 {
|
|
|
8548
8644
|
deleteDatabase({ id, }: {
|
|
8549
8645
|
id: string;
|
|
8550
8646
|
}): CancelablePromise<any>;
|
|
8647
|
+
/**
|
|
8648
|
+
* Read the compute metrics of one SQLite database over time
|
|
8649
|
+
* @returns DatabaseMetrics Observed runtime metrics. Missing observations and latency without completed requests are omitted.
|
|
8650
|
+
* @throws ApiError
|
|
8651
|
+
*/
|
|
8652
|
+
getDatabaseMetrics({ id, from, to, }: {
|
|
8653
|
+
id: string;
|
|
8654
|
+
/**
|
|
8655
|
+
* Start of the first observation window, in Unix seconds.
|
|
8656
|
+
*/
|
|
8657
|
+
from: number;
|
|
8658
|
+
/**
|
|
8659
|
+
* Inclusive end in Unix seconds. Each query may cover up to 24 hours and must end no later than the current time.
|
|
8660
|
+
*/
|
|
8661
|
+
to: number;
|
|
8662
|
+
}): CancelablePromise<DatabaseMetrics>;
|
|
8551
8663
|
/**
|
|
8552
8664
|
* @returns TransactionalEventQueue Recent committed events and the shared organization delivery limit
|
|
8553
8665
|
* @throws ApiError
|
|
@@ -8695,11 +8807,20 @@ declare class DefaultService$2 {
|
|
|
8695
8807
|
};
|
|
8696
8808
|
}): CancelablePromise<DeploymentPackage>;
|
|
8697
8809
|
/**
|
|
8698
|
-
*
|
|
8810
|
+
* List a function's deployments from newest to oldest
|
|
8811
|
+
* @returns Deployment Deployments ordered by creation time and ID, both descending
|
|
8699
8812
|
* @throws ApiError
|
|
8700
8813
|
*/
|
|
8701
|
-
listDeployments({ id, }: {
|
|
8814
|
+
listDeployments({ id, limit, after, }: {
|
|
8702
8815
|
id: string;
|
|
8816
|
+
/**
|
|
8817
|
+
* Maximum number of deployments to return.
|
|
8818
|
+
*/
|
|
8819
|
+
limit?: number;
|
|
8820
|
+
/**
|
|
8821
|
+
* ID of the last deployment shown from the previous page of this function. Starts after that deployment.
|
|
8822
|
+
*/
|
|
8823
|
+
after?: string;
|
|
8703
8824
|
}): CancelablePromise<Array<Deployment>>;
|
|
8704
8825
|
/**
|
|
8705
8826
|
* Deploy a package to the target cloud function
|
package/browser.js
CHANGED
|
@@ -826,7 +826,7 @@ var DefaultService = class {
|
|
|
826
826
|
}
|
|
827
827
|
/**
|
|
828
828
|
* Authorize using a human account login
|
|
829
|
-
*
|
|
829
|
+
* Requires a human account access token and an active membership in the selected organization. When the request specifies requiredOrgId, the selected organization must match. Returns a one-time authorization code.
|
|
830
830
|
* @returns SSOAuthorization Verified callback URL containing code and state
|
|
831
831
|
* @throws ApiError
|
|
832
832
|
*/
|
|
@@ -844,6 +844,26 @@ var DefaultService = class {
|
|
|
844
844
|
mediaType: "application/json"
|
|
845
845
|
});
|
|
846
846
|
}
|
|
847
|
+
/**
|
|
848
|
+
* Sign in to the installed application opened in the desktop Dock
|
|
849
|
+
* Uses the console's account access token. The member must be able to open the installation in the selected organization, and that organization must satisfy the request's requiredOrgId when present. Only an identity request from that installation's deployed application is eligible.
|
|
850
|
+
* @returns SSOAuthorization Registered callback URL with a one-time authorization code and state
|
|
851
|
+
* @throws ApiError
|
|
852
|
+
*/
|
|
853
|
+
authorizeDockSsoRequest({
|
|
854
|
+
requestId,
|
|
855
|
+
requestBody
|
|
856
|
+
}) {
|
|
857
|
+
return this.httpRequest.request({
|
|
858
|
+
method: "POST",
|
|
859
|
+
url: "/account/sso/requests/{requestId}/authorize-dock",
|
|
860
|
+
path: {
|
|
861
|
+
"requestId": requestId
|
|
862
|
+
},
|
|
863
|
+
body: requestBody,
|
|
864
|
+
mediaType: "application/json"
|
|
865
|
+
});
|
|
866
|
+
}
|
|
847
867
|
/**
|
|
848
868
|
* Remove an agent contact list member
|
|
849
869
|
* Remove a delegation target from the specified agent within the current org
|
|
@@ -7258,11 +7278,15 @@ var DefaultService = class {
|
|
|
7258
7278
|
* @throws ApiError
|
|
7259
7279
|
*/
|
|
7260
7280
|
createSsoRequest({
|
|
7261
|
-
requestBody
|
|
7281
|
+
requestBody,
|
|
7282
|
+
xBrazosdSsoOrgId
|
|
7262
7283
|
}) {
|
|
7263
7284
|
return this.httpRequest.request({
|
|
7264
7285
|
method: "POST",
|
|
7265
7286
|
url: "/sso/requests",
|
|
7287
|
+
headers: {
|
|
7288
|
+
"X-Brazosd-SSO-Org-Id": xBrazosdSsoOrgId
|
|
7289
|
+
},
|
|
7266
7290
|
body: requestBody,
|
|
7267
7291
|
mediaType: "application/json"
|
|
7268
7292
|
});
|
|
@@ -8290,6 +8314,37 @@ var DefaultService3 = class {
|
|
|
8290
8314
|
}
|
|
8291
8315
|
});
|
|
8292
8316
|
}
|
|
8317
|
+
/**
|
|
8318
|
+
* Read aligned runtime metrics for the instances of one function, including retired instances
|
|
8319
|
+
* @returns AppMetrics Observed runtime metrics. Missing observations and latency without completed requests are omitted.
|
|
8320
|
+
* @throws ApiError
|
|
8321
|
+
*/
|
|
8322
|
+
getAppMetrics({
|
|
8323
|
+
id,
|
|
8324
|
+
from,
|
|
8325
|
+
to
|
|
8326
|
+
}) {
|
|
8327
|
+
return this.httpRequest.request({
|
|
8328
|
+
method: "GET",
|
|
8329
|
+
url: "/apps/{id}/metrics",
|
|
8330
|
+
path: {
|
|
8331
|
+
"id": id
|
|
8332
|
+
},
|
|
8333
|
+
query: {
|
|
8334
|
+
"from": from,
|
|
8335
|
+
"to": to
|
|
8336
|
+
},
|
|
8337
|
+
errors: {
|
|
8338
|
+
400: `Invalid time range`,
|
|
8339
|
+
401: `Unauthorized`,
|
|
8340
|
+
403: `Permission denied`,
|
|
8341
|
+
404: `Resource not found in this organization`,
|
|
8342
|
+
422: `Query exceeds the instance or sample budget. Narrow the time range.`,
|
|
8343
|
+
502: `Metrics provider query failed`,
|
|
8344
|
+
503: `Metrics provider unavailable`
|
|
8345
|
+
}
|
|
8346
|
+
});
|
|
8347
|
+
}
|
|
8293
8348
|
/**
|
|
8294
8349
|
* Keep an active function instance running while it processes background work
|
|
8295
8350
|
* @returns void
|
|
@@ -8609,6 +8664,37 @@ var DefaultService3 = class {
|
|
|
8609
8664
|
}
|
|
8610
8665
|
});
|
|
8611
8666
|
}
|
|
8667
|
+
/**
|
|
8668
|
+
* Read the compute metrics of one SQLite database over time
|
|
8669
|
+
* @returns DatabaseMetrics Observed runtime metrics. Missing observations and latency without completed requests are omitted.
|
|
8670
|
+
* @throws ApiError
|
|
8671
|
+
*/
|
|
8672
|
+
getDatabaseMetrics({
|
|
8673
|
+
id,
|
|
8674
|
+
from,
|
|
8675
|
+
to
|
|
8676
|
+
}) {
|
|
8677
|
+
return this.httpRequest.request({
|
|
8678
|
+
method: "GET",
|
|
8679
|
+
url: "/databases/{id}/metrics",
|
|
8680
|
+
path: {
|
|
8681
|
+
"id": id
|
|
8682
|
+
},
|
|
8683
|
+
query: {
|
|
8684
|
+
"from": from,
|
|
8685
|
+
"to": to
|
|
8686
|
+
},
|
|
8687
|
+
errors: {
|
|
8688
|
+
400: `Invalid time range`,
|
|
8689
|
+
401: `Unauthorized`,
|
|
8690
|
+
403: `Permission denied`,
|
|
8691
|
+
404: `Resource not found in this organization`,
|
|
8692
|
+
422: `Query exceeds the instance or sample budget. Narrow the time range.`,
|
|
8693
|
+
502: `Metrics provider query failed`,
|
|
8694
|
+
503: `Metrics provider unavailable`
|
|
8695
|
+
}
|
|
8696
|
+
});
|
|
8697
|
+
}
|
|
8612
8698
|
/**
|
|
8613
8699
|
* @returns TransactionalEventQueue Recent committed events and the shared organization delivery limit
|
|
8614
8700
|
* @throws ApiError
|
|
@@ -8980,11 +9066,14 @@ var DefaultService3 = class {
|
|
|
8980
9066
|
});
|
|
8981
9067
|
}
|
|
8982
9068
|
/**
|
|
8983
|
-
*
|
|
9069
|
+
* List a function's deployments from newest to oldest
|
|
9070
|
+
* @returns Deployment Deployments ordered by creation time and ID, both descending
|
|
8984
9071
|
* @throws ApiError
|
|
8985
9072
|
*/
|
|
8986
9073
|
listDeployments({
|
|
8987
|
-
id
|
|
9074
|
+
id,
|
|
9075
|
+
limit = 100,
|
|
9076
|
+
after
|
|
8988
9077
|
}) {
|
|
8989
9078
|
return this.httpRequest.request({
|
|
8990
9079
|
method: "GET",
|
|
@@ -8992,6 +9081,10 @@ var DefaultService3 = class {
|
|
|
8992
9081
|
path: {
|
|
8993
9082
|
"id": id
|
|
8994
9083
|
},
|
|
9084
|
+
query: {
|
|
9085
|
+
"limit": limit,
|
|
9086
|
+
"after": after
|
|
9087
|
+
},
|
|
8995
9088
|
errors: {
|
|
8996
9089
|
400: `Invalid input`,
|
|
8997
9090
|
401: `Unauthorized`,
|
|
@@ -9327,6 +9420,13 @@ var operations = {
|
|
|
9327
9420
|
"200": "json"
|
|
9328
9421
|
}
|
|
9329
9422
|
},
|
|
9423
|
+
"POST /account/sso/requests/{requestId}/authorize-dock": {
|
|
9424
|
+
"authenticated": true,
|
|
9425
|
+
"redirect": false,
|
|
9426
|
+
"responses": {
|
|
9427
|
+
"200": "json"
|
|
9428
|
+
}
|
|
9429
|
+
},
|
|
9330
9430
|
"DELETE /agent-contact-list/{agentId}": {
|
|
9331
9431
|
"authenticated": true,
|
|
9332
9432
|
"redirect": false,
|
|
@@ -12550,6 +12650,20 @@ var operations = {
|
|
|
12550
12650
|
"503": "void"
|
|
12551
12651
|
}
|
|
12552
12652
|
},
|
|
12653
|
+
"GET /apps/{id}/metrics": {
|
|
12654
|
+
"authenticated": true,
|
|
12655
|
+
"redirect": false,
|
|
12656
|
+
"responses": {
|
|
12657
|
+
"200": "json",
|
|
12658
|
+
"400": "void",
|
|
12659
|
+
"401": "void",
|
|
12660
|
+
"403": "void",
|
|
12661
|
+
"404": "void",
|
|
12662
|
+
"422": "void",
|
|
12663
|
+
"502": "void",
|
|
12664
|
+
"503": "void"
|
|
12665
|
+
}
|
|
12666
|
+
},
|
|
12553
12667
|
"POST /apps/{id}/instances/{instanceId}/activity": {
|
|
12554
12668
|
"authenticated": true,
|
|
12555
12669
|
"redirect": false,
|
|
@@ -12698,6 +12812,20 @@ var operations = {
|
|
|
12698
12812
|
"503": "void"
|
|
12699
12813
|
}
|
|
12700
12814
|
},
|
|
12815
|
+
"GET /databases/{id}/metrics": {
|
|
12816
|
+
"authenticated": true,
|
|
12817
|
+
"redirect": false,
|
|
12818
|
+
"responses": {
|
|
12819
|
+
"200": "json",
|
|
12820
|
+
"400": "void",
|
|
12821
|
+
"401": "void",
|
|
12822
|
+
"403": "void",
|
|
12823
|
+
"404": "void",
|
|
12824
|
+
"422": "void",
|
|
12825
|
+
"502": "void",
|
|
12826
|
+
"503": "void"
|
|
12827
|
+
}
|
|
12828
|
+
},
|
|
12701
12829
|
"GET /databases/{id}/event-queue": {
|
|
12702
12830
|
"authenticated": true,
|
|
12703
12831
|
"redirect": false,
|
package/index.d.ts
CHANGED
|
@@ -764,6 +764,10 @@ type AppendAgentSessionEventRequest = {
|
|
|
764
764
|
*/
|
|
765
765
|
skipPersistent?: boolean;
|
|
766
766
|
};
|
|
767
|
+
type AuthorizeDockSSORequest = {
|
|
768
|
+
installationId: string;
|
|
769
|
+
orgId: number;
|
|
770
|
+
};
|
|
767
771
|
export type SSOMode = "org-user" | "identity";
|
|
768
772
|
type AuthorizeSSORequest = {
|
|
769
773
|
mode: SSOMode;
|
|
@@ -3513,6 +3517,9 @@ type SSOGrant = {
|
|
|
3513
3517
|
type SSORequest = {
|
|
3514
3518
|
appId?: string;
|
|
3515
3519
|
appName: string;
|
|
3520
|
+
/**
|
|
3521
|
+
* Organization that owns the deployed application.
|
|
3522
|
+
*/
|
|
3516
3523
|
appOrgId?: number;
|
|
3517
3524
|
/**
|
|
3518
3525
|
* Local CLI callback containing only the request state and access_denied.
|
|
@@ -3526,6 +3533,10 @@ type SSORequest = {
|
|
|
3526
3533
|
id: string;
|
|
3527
3534
|
mode: SSOMode;
|
|
3528
3535
|
redirectUri: string;
|
|
3536
|
+
/**
|
|
3537
|
+
* The only organization that can authorize this request, when restricted.
|
|
3538
|
+
*/
|
|
3539
|
+
requiredOrgId?: number;
|
|
3529
3540
|
/**
|
|
3530
3541
|
* Cloud permissions requested by the CLI.
|
|
3531
3542
|
*/
|
|
@@ -4189,7 +4200,7 @@ declare class DefaultService {
|
|
|
4189
4200
|
}): CancelablePromise<void>;
|
|
4190
4201
|
/**
|
|
4191
4202
|
* Authorize using a human account login
|
|
4192
|
-
*
|
|
4203
|
+
* Requires a human account access token and an active membership in the selected organization. When the request specifies requiredOrgId, the selected organization must match. Returns a one-time authorization code.
|
|
4193
4204
|
* @returns SSOAuthorization Verified callback URL containing code and state
|
|
4194
4205
|
* @throws ApiError
|
|
4195
4206
|
*/
|
|
@@ -4197,6 +4208,16 @@ declare class DefaultService {
|
|
|
4197
4208
|
requestId: string;
|
|
4198
4209
|
requestBody: AuthorizeSSORequest;
|
|
4199
4210
|
}): CancelablePromise<SSOAuthorization>;
|
|
4211
|
+
/**
|
|
4212
|
+
* Sign in to the installed application opened in the desktop Dock
|
|
4213
|
+
* Uses the console's account access token. The member must be able to open the installation in the selected organization, and that organization must satisfy the request's requiredOrgId when present. Only an identity request from that installation's deployed application is eligible.
|
|
4214
|
+
* @returns SSOAuthorization Registered callback URL with a one-time authorization code and state
|
|
4215
|
+
* @throws ApiError
|
|
4216
|
+
*/
|
|
4217
|
+
authorizeDockSsoRequest({ requestId, requestBody, }: {
|
|
4218
|
+
requestId: string;
|
|
4219
|
+
requestBody: AuthorizeDockSSORequest;
|
|
4220
|
+
}): CancelablePromise<SSOAuthorization>;
|
|
4200
4221
|
/**
|
|
4201
4222
|
* Remove an agent contact list member
|
|
4202
4223
|
* Remove a delegation target from the specified agent within the current org
|
|
@@ -7355,8 +7376,12 @@ declare class DefaultService {
|
|
|
7355
7376
|
* @returns SSORequest Login request
|
|
7356
7377
|
* @throws ApiError
|
|
7357
7378
|
*/
|
|
7358
|
-
createSsoRequest({ requestBody, }: {
|
|
7379
|
+
createSsoRequest({ requestBody, xBrazosdSsoOrgId, }: {
|
|
7359
7380
|
requestBody: CreateSSORequest;
|
|
7381
|
+
/**
|
|
7382
|
+
* Restrict this login to a member of this organization. An org-user application request always requires the application's own organization.
|
|
7383
|
+
*/
|
|
7384
|
+
xBrazosdSsoOrgId?: number;
|
|
7360
7385
|
}): CancelablePromise<SSORequest>;
|
|
7361
7386
|
/**
|
|
7362
7387
|
* Preview a short-lived SSO request
|
|
@@ -7862,6 +7887,52 @@ type AppLogPage = {
|
|
|
7862
7887
|
*/
|
|
7863
7888
|
retryAfterSeconds?: number;
|
|
7864
7889
|
};
|
|
7890
|
+
type RuntimeMetricPoint = {
|
|
7891
|
+
/**
|
|
7892
|
+
* Inclusive end of this observation window in Unix seconds.
|
|
7893
|
+
*/
|
|
7894
|
+
timestamp: number;
|
|
7895
|
+
/**
|
|
7896
|
+
* Observed main-container CPU in millicores.
|
|
7897
|
+
*/
|
|
7898
|
+
cpuMillicores?: number;
|
|
7899
|
+
/**
|
|
7900
|
+
* CPU as a percentage of the admitted CPU allocation.
|
|
7901
|
+
*/
|
|
7902
|
+
cpuPercent?: number;
|
|
7903
|
+
/**
|
|
7904
|
+
* Main-container working set in MiB.
|
|
7905
|
+
*/
|
|
7906
|
+
memoryMiB?: number;
|
|
7907
|
+
/**
|
|
7908
|
+
* Working set as a percentage of the admitted memory allocation.
|
|
7909
|
+
*/
|
|
7910
|
+
memoryPercent?: number;
|
|
7911
|
+
/**
|
|
7912
|
+
* Sampled HTTP requests or SQL executions in progress.
|
|
7913
|
+
*/
|
|
7914
|
+
inFlight?: number;
|
|
7915
|
+
/**
|
|
7916
|
+
* Observed completions between sampled histogram counters.
|
|
7917
|
+
*/
|
|
7918
|
+
completedRequests?: number;
|
|
7919
|
+
latencyAvgMs?: number;
|
|
7920
|
+
latencyP50Ms?: number;
|
|
7921
|
+
latencyP95Ms?: number;
|
|
7922
|
+
};
|
|
7923
|
+
type FunctionInstanceMetrics = {
|
|
7924
|
+
instanceId: string;
|
|
7925
|
+
points: Array<RuntimeMetricPoint>;
|
|
7926
|
+
};
|
|
7927
|
+
type AppMetrics = {
|
|
7928
|
+
from: number;
|
|
7929
|
+
to: number;
|
|
7930
|
+
/**
|
|
7931
|
+
* Window length in seconds selected by the server for the queried range and runtime activations. The last window may be shorter.
|
|
7932
|
+
*/
|
|
7933
|
+
stepSeconds: number;
|
|
7934
|
+
instances: Array<FunctionInstanceMetrics>;
|
|
7935
|
+
};
|
|
7865
7936
|
type AppSettings = {
|
|
7866
7937
|
enabled?: boolean;
|
|
7867
7938
|
runtime?: "nodejs";
|
|
@@ -8063,6 +8134,15 @@ type DatabaseInput = {
|
|
|
8063
8134
|
type DatabaseMaintenance = {
|
|
8064
8135
|
maintenanceStartedAt: string | null;
|
|
8065
8136
|
};
|
|
8137
|
+
type DatabaseMetrics = {
|
|
8138
|
+
from: number;
|
|
8139
|
+
to: number;
|
|
8140
|
+
/**
|
|
8141
|
+
* Window length in seconds selected by the server for the queried range and runtime activations. The last window may be shorter.
|
|
8142
|
+
*/
|
|
8143
|
+
stepSeconds: number;
|
|
8144
|
+
points: Array<RuntimeMetricPoint>;
|
|
8145
|
+
};
|
|
8066
8146
|
type DatabaseRollback = {
|
|
8067
8147
|
id: string;
|
|
8068
8148
|
databaseId: string;
|
|
@@ -8418,6 +8498,22 @@ declare class DefaultService$2 {
|
|
|
8418
8498
|
deleteApp({ id, }: {
|
|
8419
8499
|
id: string;
|
|
8420
8500
|
}): CancelablePromise<any>;
|
|
8501
|
+
/**
|
|
8502
|
+
* Read aligned runtime metrics for the instances of one function, including retired instances
|
|
8503
|
+
* @returns AppMetrics Observed runtime metrics. Missing observations and latency without completed requests are omitted.
|
|
8504
|
+
* @throws ApiError
|
|
8505
|
+
*/
|
|
8506
|
+
getAppMetrics({ id, from, to, }: {
|
|
8507
|
+
id: string;
|
|
8508
|
+
/**
|
|
8509
|
+
* Start of the first observation window, in Unix seconds.
|
|
8510
|
+
*/
|
|
8511
|
+
from: number;
|
|
8512
|
+
/**
|
|
8513
|
+
* Inclusive end in Unix seconds. Each query may cover up to 24 hours and must end no later than the current time.
|
|
8514
|
+
*/
|
|
8515
|
+
to: number;
|
|
8516
|
+
}): CancelablePromise<AppMetrics>;
|
|
8421
8517
|
/**
|
|
8422
8518
|
* Keep an active function instance running while it processes background work
|
|
8423
8519
|
* @returns void
|
|
@@ -8550,6 +8646,22 @@ declare class DefaultService$2 {
|
|
|
8550
8646
|
deleteDatabase({ id, }: {
|
|
8551
8647
|
id: string;
|
|
8552
8648
|
}): CancelablePromise<any>;
|
|
8649
|
+
/**
|
|
8650
|
+
* Read the compute metrics of one SQLite database over time
|
|
8651
|
+
* @returns DatabaseMetrics Observed runtime metrics. Missing observations and latency without completed requests are omitted.
|
|
8652
|
+
* @throws ApiError
|
|
8653
|
+
*/
|
|
8654
|
+
getDatabaseMetrics({ id, from, to, }: {
|
|
8655
|
+
id: string;
|
|
8656
|
+
/**
|
|
8657
|
+
* Start of the first observation window, in Unix seconds.
|
|
8658
|
+
*/
|
|
8659
|
+
from: number;
|
|
8660
|
+
/**
|
|
8661
|
+
* Inclusive end in Unix seconds. Each query may cover up to 24 hours and must end no later than the current time.
|
|
8662
|
+
*/
|
|
8663
|
+
to: number;
|
|
8664
|
+
}): CancelablePromise<DatabaseMetrics>;
|
|
8553
8665
|
/**
|
|
8554
8666
|
* @returns TransactionalEventQueue Recent committed events and the shared organization delivery limit
|
|
8555
8667
|
* @throws ApiError
|
|
@@ -8697,11 +8809,20 @@ declare class DefaultService$2 {
|
|
|
8697
8809
|
};
|
|
8698
8810
|
}): CancelablePromise<DeploymentPackage>;
|
|
8699
8811
|
/**
|
|
8700
|
-
*
|
|
8812
|
+
* List a function's deployments from newest to oldest
|
|
8813
|
+
* @returns Deployment Deployments ordered by creation time and ID, both descending
|
|
8701
8814
|
* @throws ApiError
|
|
8702
8815
|
*/
|
|
8703
|
-
listDeployments({ id, }: {
|
|
8816
|
+
listDeployments({ id, limit, after, }: {
|
|
8704
8817
|
id: string;
|
|
8818
|
+
/**
|
|
8819
|
+
* Maximum number of deployments to return.
|
|
8820
|
+
*/
|
|
8821
|
+
limit?: number;
|
|
8822
|
+
/**
|
|
8823
|
+
* ID of the last deployment shown from the previous page of this function. Starts after that deployment.
|
|
8824
|
+
*/
|
|
8825
|
+
after?: string;
|
|
8705
8826
|
}): CancelablePromise<Array<Deployment>>;
|
|
8706
8827
|
/**
|
|
8707
8828
|
* Deploy a package to the target cloud function
|
|
@@ -8912,7 +9033,7 @@ export type SSOIdentityTokens = SSOTokens & {
|
|
|
8912
9033
|
mode: "identity";
|
|
8913
9034
|
identityToken: string;
|
|
8914
9035
|
};
|
|
8915
|
-
export interface SSOOptions extends Pick<ClientOptions, "apiUrl" | "credentials" | "credentialsFile"> {
|
|
9036
|
+
export interface SSOOptions extends Pick<ClientOptions, "apiUrl" | "credentials" | "credentialsFile" | "headers"> {
|
|
8916
9037
|
appId: string;
|
|
8917
9038
|
redirectUri: string;
|
|
8918
9039
|
/** 32 random bytes encoded as base64url. Keep secret and stable across instances. */
|
package/index.js
CHANGED
|
@@ -826,7 +826,7 @@ var DefaultService = class {
|
|
|
826
826
|
}
|
|
827
827
|
/**
|
|
828
828
|
* Authorize using a human account login
|
|
829
|
-
*
|
|
829
|
+
* Requires a human account access token and an active membership in the selected organization. When the request specifies requiredOrgId, the selected organization must match. Returns a one-time authorization code.
|
|
830
830
|
* @returns SSOAuthorization Verified callback URL containing code and state
|
|
831
831
|
* @throws ApiError
|
|
832
832
|
*/
|
|
@@ -844,6 +844,26 @@ var DefaultService = class {
|
|
|
844
844
|
mediaType: "application/json"
|
|
845
845
|
});
|
|
846
846
|
}
|
|
847
|
+
/**
|
|
848
|
+
* Sign in to the installed application opened in the desktop Dock
|
|
849
|
+
* Uses the console's account access token. The member must be able to open the installation in the selected organization, and that organization must satisfy the request's requiredOrgId when present. Only an identity request from that installation's deployed application is eligible.
|
|
850
|
+
* @returns SSOAuthorization Registered callback URL with a one-time authorization code and state
|
|
851
|
+
* @throws ApiError
|
|
852
|
+
*/
|
|
853
|
+
authorizeDockSsoRequest({
|
|
854
|
+
requestId,
|
|
855
|
+
requestBody
|
|
856
|
+
}) {
|
|
857
|
+
return this.httpRequest.request({
|
|
858
|
+
method: "POST",
|
|
859
|
+
url: "/account/sso/requests/{requestId}/authorize-dock",
|
|
860
|
+
path: {
|
|
861
|
+
"requestId": requestId
|
|
862
|
+
},
|
|
863
|
+
body: requestBody,
|
|
864
|
+
mediaType: "application/json"
|
|
865
|
+
});
|
|
866
|
+
}
|
|
847
867
|
/**
|
|
848
868
|
* Remove an agent contact list member
|
|
849
869
|
* Remove a delegation target from the specified agent within the current org
|
|
@@ -7258,11 +7278,15 @@ var DefaultService = class {
|
|
|
7258
7278
|
* @throws ApiError
|
|
7259
7279
|
*/
|
|
7260
7280
|
createSsoRequest({
|
|
7261
|
-
requestBody
|
|
7281
|
+
requestBody,
|
|
7282
|
+
xBrazosdSsoOrgId
|
|
7262
7283
|
}) {
|
|
7263
7284
|
return this.httpRequest.request({
|
|
7264
7285
|
method: "POST",
|
|
7265
7286
|
url: "/sso/requests",
|
|
7287
|
+
headers: {
|
|
7288
|
+
"X-Brazosd-SSO-Org-Id": xBrazosdSsoOrgId
|
|
7289
|
+
},
|
|
7266
7290
|
body: requestBody,
|
|
7267
7291
|
mediaType: "application/json"
|
|
7268
7292
|
});
|
|
@@ -8290,6 +8314,37 @@ var DefaultService3 = class {
|
|
|
8290
8314
|
}
|
|
8291
8315
|
});
|
|
8292
8316
|
}
|
|
8317
|
+
/**
|
|
8318
|
+
* Read aligned runtime metrics for the instances of one function, including retired instances
|
|
8319
|
+
* @returns AppMetrics Observed runtime metrics. Missing observations and latency without completed requests are omitted.
|
|
8320
|
+
* @throws ApiError
|
|
8321
|
+
*/
|
|
8322
|
+
getAppMetrics({
|
|
8323
|
+
id,
|
|
8324
|
+
from,
|
|
8325
|
+
to
|
|
8326
|
+
}) {
|
|
8327
|
+
return this.httpRequest.request({
|
|
8328
|
+
method: "GET",
|
|
8329
|
+
url: "/apps/{id}/metrics",
|
|
8330
|
+
path: {
|
|
8331
|
+
"id": id
|
|
8332
|
+
},
|
|
8333
|
+
query: {
|
|
8334
|
+
"from": from,
|
|
8335
|
+
"to": to
|
|
8336
|
+
},
|
|
8337
|
+
errors: {
|
|
8338
|
+
400: `Invalid time range`,
|
|
8339
|
+
401: `Unauthorized`,
|
|
8340
|
+
403: `Permission denied`,
|
|
8341
|
+
404: `Resource not found in this organization`,
|
|
8342
|
+
422: `Query exceeds the instance or sample budget. Narrow the time range.`,
|
|
8343
|
+
502: `Metrics provider query failed`,
|
|
8344
|
+
503: `Metrics provider unavailable`
|
|
8345
|
+
}
|
|
8346
|
+
});
|
|
8347
|
+
}
|
|
8293
8348
|
/**
|
|
8294
8349
|
* Keep an active function instance running while it processes background work
|
|
8295
8350
|
* @returns void
|
|
@@ -8609,6 +8664,37 @@ var DefaultService3 = class {
|
|
|
8609
8664
|
}
|
|
8610
8665
|
});
|
|
8611
8666
|
}
|
|
8667
|
+
/**
|
|
8668
|
+
* Read the compute metrics of one SQLite database over time
|
|
8669
|
+
* @returns DatabaseMetrics Observed runtime metrics. Missing observations and latency without completed requests are omitted.
|
|
8670
|
+
* @throws ApiError
|
|
8671
|
+
*/
|
|
8672
|
+
getDatabaseMetrics({
|
|
8673
|
+
id,
|
|
8674
|
+
from,
|
|
8675
|
+
to
|
|
8676
|
+
}) {
|
|
8677
|
+
return this.httpRequest.request({
|
|
8678
|
+
method: "GET",
|
|
8679
|
+
url: "/databases/{id}/metrics",
|
|
8680
|
+
path: {
|
|
8681
|
+
"id": id
|
|
8682
|
+
},
|
|
8683
|
+
query: {
|
|
8684
|
+
"from": from,
|
|
8685
|
+
"to": to
|
|
8686
|
+
},
|
|
8687
|
+
errors: {
|
|
8688
|
+
400: `Invalid time range`,
|
|
8689
|
+
401: `Unauthorized`,
|
|
8690
|
+
403: `Permission denied`,
|
|
8691
|
+
404: `Resource not found in this organization`,
|
|
8692
|
+
422: `Query exceeds the instance or sample budget. Narrow the time range.`,
|
|
8693
|
+
502: `Metrics provider query failed`,
|
|
8694
|
+
503: `Metrics provider unavailable`
|
|
8695
|
+
}
|
|
8696
|
+
});
|
|
8697
|
+
}
|
|
8612
8698
|
/**
|
|
8613
8699
|
* @returns TransactionalEventQueue Recent committed events and the shared organization delivery limit
|
|
8614
8700
|
* @throws ApiError
|
|
@@ -8980,11 +9066,14 @@ var DefaultService3 = class {
|
|
|
8980
9066
|
});
|
|
8981
9067
|
}
|
|
8982
9068
|
/**
|
|
8983
|
-
*
|
|
9069
|
+
* List a function's deployments from newest to oldest
|
|
9070
|
+
* @returns Deployment Deployments ordered by creation time and ID, both descending
|
|
8984
9071
|
* @throws ApiError
|
|
8985
9072
|
*/
|
|
8986
9073
|
listDeployments({
|
|
8987
|
-
id
|
|
9074
|
+
id,
|
|
9075
|
+
limit = 100,
|
|
9076
|
+
after
|
|
8988
9077
|
}) {
|
|
8989
9078
|
return this.httpRequest.request({
|
|
8990
9079
|
method: "GET",
|
|
@@ -8992,6 +9081,10 @@ var DefaultService3 = class {
|
|
|
8992
9081
|
path: {
|
|
8993
9082
|
"id": id
|
|
8994
9083
|
},
|
|
9084
|
+
query: {
|
|
9085
|
+
"limit": limit,
|
|
9086
|
+
"after": after
|
|
9087
|
+
},
|
|
8995
9088
|
errors: {
|
|
8996
9089
|
400: `Invalid input`,
|
|
8997
9090
|
401: `Unauthorized`,
|
|
@@ -9327,6 +9420,13 @@ var operations = {
|
|
|
9327
9420
|
"200": "json"
|
|
9328
9421
|
}
|
|
9329
9422
|
},
|
|
9423
|
+
"POST /account/sso/requests/{requestId}/authorize-dock": {
|
|
9424
|
+
"authenticated": true,
|
|
9425
|
+
"redirect": false,
|
|
9426
|
+
"responses": {
|
|
9427
|
+
"200": "json"
|
|
9428
|
+
}
|
|
9429
|
+
},
|
|
9330
9430
|
"DELETE /agent-contact-list/{agentId}": {
|
|
9331
9431
|
"authenticated": true,
|
|
9332
9432
|
"redirect": false,
|
|
@@ -12550,6 +12650,20 @@ var operations = {
|
|
|
12550
12650
|
"503": "void"
|
|
12551
12651
|
}
|
|
12552
12652
|
},
|
|
12653
|
+
"GET /apps/{id}/metrics": {
|
|
12654
|
+
"authenticated": true,
|
|
12655
|
+
"redirect": false,
|
|
12656
|
+
"responses": {
|
|
12657
|
+
"200": "json",
|
|
12658
|
+
"400": "void",
|
|
12659
|
+
"401": "void",
|
|
12660
|
+
"403": "void",
|
|
12661
|
+
"404": "void",
|
|
12662
|
+
"422": "void",
|
|
12663
|
+
"502": "void",
|
|
12664
|
+
"503": "void"
|
|
12665
|
+
}
|
|
12666
|
+
},
|
|
12553
12667
|
"POST /apps/{id}/instances/{instanceId}/activity": {
|
|
12554
12668
|
"authenticated": true,
|
|
12555
12669
|
"redirect": false,
|
|
@@ -12698,6 +12812,20 @@ var operations = {
|
|
|
12698
12812
|
"503": "void"
|
|
12699
12813
|
}
|
|
12700
12814
|
},
|
|
12815
|
+
"GET /databases/{id}/metrics": {
|
|
12816
|
+
"authenticated": true,
|
|
12817
|
+
"redirect": false,
|
|
12818
|
+
"responses": {
|
|
12819
|
+
"200": "json",
|
|
12820
|
+
"400": "void",
|
|
12821
|
+
"401": "void",
|
|
12822
|
+
"403": "void",
|
|
12823
|
+
"404": "void",
|
|
12824
|
+
"422": "void",
|
|
12825
|
+
"502": "void",
|
|
12826
|
+
"503": "void"
|
|
12827
|
+
}
|
|
12828
|
+
},
|
|
12701
12829
|
"GET /databases/{id}/event-queue": {
|
|
12702
12830
|
"authenticated": true,
|
|
12703
12831
|
"redirect": false,
|