@brazosd/node 0.1.11 → 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 +38 -4
- package/browser.js +42 -4
- package/index.d.ts +39 -5
- package/index.js +42 -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
|
|
@@ -8782,11 +8807,20 @@ declare class DefaultService$2 {
|
|
|
8782
8807
|
};
|
|
8783
8808
|
}): CancelablePromise<DeploymentPackage>;
|
|
8784
8809
|
/**
|
|
8785
|
-
*
|
|
8810
|
+
* List a function's deployments from newest to oldest
|
|
8811
|
+
* @returns Deployment Deployments ordered by creation time and ID, both descending
|
|
8786
8812
|
* @throws ApiError
|
|
8787
8813
|
*/
|
|
8788
|
-
listDeployments({ id, }: {
|
|
8814
|
+
listDeployments({ id, limit, after, }: {
|
|
8789
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;
|
|
8790
8824
|
}): CancelablePromise<Array<Deployment>>;
|
|
8791
8825
|
/**
|
|
8792
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
|
});
|
|
@@ -9042,11 +9066,14 @@ var DefaultService3 = class {
|
|
|
9042
9066
|
});
|
|
9043
9067
|
}
|
|
9044
9068
|
/**
|
|
9045
|
-
*
|
|
9069
|
+
* List a function's deployments from newest to oldest
|
|
9070
|
+
* @returns Deployment Deployments ordered by creation time and ID, both descending
|
|
9046
9071
|
* @throws ApiError
|
|
9047
9072
|
*/
|
|
9048
9073
|
listDeployments({
|
|
9049
|
-
id
|
|
9074
|
+
id,
|
|
9075
|
+
limit = 100,
|
|
9076
|
+
after
|
|
9050
9077
|
}) {
|
|
9051
9078
|
return this.httpRequest.request({
|
|
9052
9079
|
method: "GET",
|
|
@@ -9054,6 +9081,10 @@ var DefaultService3 = class {
|
|
|
9054
9081
|
path: {
|
|
9055
9082
|
"id": id
|
|
9056
9083
|
},
|
|
9084
|
+
query: {
|
|
9085
|
+
"limit": limit,
|
|
9086
|
+
"after": after
|
|
9087
|
+
},
|
|
9057
9088
|
errors: {
|
|
9058
9089
|
400: `Invalid input`,
|
|
9059
9090
|
401: `Unauthorized`,
|
|
@@ -9389,6 +9420,13 @@ var operations = {
|
|
|
9389
9420
|
"200": "json"
|
|
9390
9421
|
}
|
|
9391
9422
|
},
|
|
9423
|
+
"POST /account/sso/requests/{requestId}/authorize-dock": {
|
|
9424
|
+
"authenticated": true,
|
|
9425
|
+
"redirect": false,
|
|
9426
|
+
"responses": {
|
|
9427
|
+
"200": "json"
|
|
9428
|
+
}
|
|
9429
|
+
},
|
|
9392
9430
|
"DELETE /agent-contact-list/{agentId}": {
|
|
9393
9431
|
"authenticated": true,
|
|
9394
9432
|
"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
|
|
@@ -8784,11 +8809,20 @@ declare class DefaultService$2 {
|
|
|
8784
8809
|
};
|
|
8785
8810
|
}): CancelablePromise<DeploymentPackage>;
|
|
8786
8811
|
/**
|
|
8787
|
-
*
|
|
8812
|
+
* List a function's deployments from newest to oldest
|
|
8813
|
+
* @returns Deployment Deployments ordered by creation time and ID, both descending
|
|
8788
8814
|
* @throws ApiError
|
|
8789
8815
|
*/
|
|
8790
|
-
listDeployments({ id, }: {
|
|
8816
|
+
listDeployments({ id, limit, after, }: {
|
|
8791
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;
|
|
8792
8826
|
}): CancelablePromise<Array<Deployment>>;
|
|
8793
8827
|
/**
|
|
8794
8828
|
* Deploy a package to the target cloud function
|
|
@@ -8999,7 +9033,7 @@ export type SSOIdentityTokens = SSOTokens & {
|
|
|
8999
9033
|
mode: "identity";
|
|
9000
9034
|
identityToken: string;
|
|
9001
9035
|
};
|
|
9002
|
-
export interface SSOOptions extends Pick<ClientOptions, "apiUrl" | "credentials" | "credentialsFile"> {
|
|
9036
|
+
export interface SSOOptions extends Pick<ClientOptions, "apiUrl" | "credentials" | "credentialsFile" | "headers"> {
|
|
9003
9037
|
appId: string;
|
|
9004
9038
|
redirectUri: string;
|
|
9005
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
|
});
|
|
@@ -9042,11 +9066,14 @@ var DefaultService3 = class {
|
|
|
9042
9066
|
});
|
|
9043
9067
|
}
|
|
9044
9068
|
/**
|
|
9045
|
-
*
|
|
9069
|
+
* List a function's deployments from newest to oldest
|
|
9070
|
+
* @returns Deployment Deployments ordered by creation time and ID, both descending
|
|
9046
9071
|
* @throws ApiError
|
|
9047
9072
|
*/
|
|
9048
9073
|
listDeployments({
|
|
9049
|
-
id
|
|
9074
|
+
id,
|
|
9075
|
+
limit = 100,
|
|
9076
|
+
after
|
|
9050
9077
|
}) {
|
|
9051
9078
|
return this.httpRequest.request({
|
|
9052
9079
|
method: "GET",
|
|
@@ -9054,6 +9081,10 @@ var DefaultService3 = class {
|
|
|
9054
9081
|
path: {
|
|
9055
9082
|
"id": id
|
|
9056
9083
|
},
|
|
9084
|
+
query: {
|
|
9085
|
+
"limit": limit,
|
|
9086
|
+
"after": after
|
|
9087
|
+
},
|
|
9057
9088
|
errors: {
|
|
9058
9089
|
400: `Invalid input`,
|
|
9059
9090
|
401: `Unauthorized`,
|
|
@@ -9389,6 +9420,13 @@ var operations = {
|
|
|
9389
9420
|
"200": "json"
|
|
9390
9421
|
}
|
|
9391
9422
|
},
|
|
9423
|
+
"POST /account/sso/requests/{requestId}/authorize-dock": {
|
|
9424
|
+
"authenticated": true,
|
|
9425
|
+
"redirect": false,
|
|
9426
|
+
"responses": {
|
|
9427
|
+
"200": "json"
|
|
9428
|
+
}
|
|
9429
|
+
},
|
|
9392
9430
|
"DELETE /agent-contact-list/{agentId}": {
|
|
9393
9431
|
"authenticated": true,
|
|
9394
9432
|
"redirect": false,
|