@flipdish/authorization 0.0.2-rc.1756733622 → 0.0.3-rc.1756733706
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 +119 -1
- package/api.ts +64 -215
- package/configuration.ts +1 -1
- package/dist/api.d.ts +46 -183
- package/dist/api.js +64 -60
- package/dist/configuration.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,125 @@ Internally the package utilizes the [axios](https://github.com/axios/axios) as i
|
|
|
7
7
|
### Example code
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
import { AuthorizationApi
|
|
10
|
+
import { AuthorizationApi, Configuration, PermissionsApi, Permissions } from '@flipdish/authorisation';
|
|
11
|
+
import { describe, expect, test, it } from '@jest/globals';
|
|
12
|
+
|
|
13
|
+
const basePath = "https://api.flipdish.co/auth/";
|
|
14
|
+
const configuration = new Configuration({
|
|
15
|
+
basePath,
|
|
16
|
+
// to get the API key, you should follow these docs:
|
|
17
|
+
// https://developers.flipdish.com/docs/getting-started
|
|
18
|
+
accessToken: process.env.FLIPDISH_BEARER_TOKEN_PROD,
|
|
19
|
+
// if using in a browser set useDefaultUserAgent
|
|
20
|
+
// to true to prevent errors
|
|
21
|
+
// useDefaultUserAgent: true
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const authorization = new AuthorizationApi(configuration);
|
|
25
|
+
const permissions = new PermissionsApi(configuration);
|
|
26
|
+
|
|
27
|
+
describe('Authorisation Tests', () => {
|
|
28
|
+
describe('Authorisation', () => {
|
|
29
|
+
|
|
30
|
+
test('List Permissions', async () => {
|
|
31
|
+
const permissionsResponse = await permissions.listPermissions();
|
|
32
|
+
expect(permissionsResponse.status).toBe(200);
|
|
33
|
+
expect(permissionsResponse.data.permissions).toBeDefined();
|
|
34
|
+
expect(permissionsResponse.data.permissions.length).toBeGreaterThan(0);
|
|
35
|
+
expect(permissionsResponse.data.permissions).toContain(Permissions.ViewApp);
|
|
36
|
+
expect(permissionsResponse.data.permissions).toContain(Permissions.CreateApp);
|
|
37
|
+
expect(permissionsResponse.data.permissions).toContain(Permissions.UpdateApp);
|
|
38
|
+
expect(permissionsResponse.data.permissions).toContain(Permissions.ViewAppName);
|
|
39
|
+
expect(permissionsResponse.data.permissions).toContain(Permissions.EditAppAssets);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
describe('Authenticate and Authorise', () => {
|
|
43
|
+
it('should authenticate and authorise with a valid FD-Authorization cookie', async () => {
|
|
44
|
+
const authorizationResponse = await authorization.authenticateAndAuthorize({
|
|
45
|
+
authenticateAndAuthorizeRequest: {
|
|
46
|
+
headers: {
|
|
47
|
+
'Cookie': `FD-Authorization=${process.env.FD_AUTH_COOKIE_PROD};`,
|
|
48
|
+
},
|
|
49
|
+
action: Permissions.AnyAuditLogs,
|
|
50
|
+
resource: {
|
|
51
|
+
id: "org12345",
|
|
52
|
+
type: "Org",
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
expect(authorizationResponse.status).toBe(200);
|
|
58
|
+
expect(authorizationResponse.data.authentication.authenticated).toBe(true);
|
|
59
|
+
expect(authorizationResponse.data.authentication.principal?.type).toBe("User");
|
|
60
|
+
expect(authorizationResponse.data.authentication.principal?.id).toBe("8147747");
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('should not authenticate and authorise with an invalid FD-Authorization cookie', async () => {
|
|
64
|
+
try {
|
|
65
|
+
await authorization.authenticateAndAuthorize({
|
|
66
|
+
authenticateAndAuthorizeRequest: {
|
|
67
|
+
headers: {
|
|
68
|
+
'Cookie': `FD-Authorization=not-a-valid-cookie;`,
|
|
69
|
+
},
|
|
70
|
+
action: Permissions.AnyAuditLogs,
|
|
71
|
+
resource: {
|
|
72
|
+
id: "org12345",
|
|
73
|
+
type: "Org",
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
} catch (error: any) {
|
|
78
|
+
expect(error.response.status).toBe(401);
|
|
79
|
+
expect(error.response.data.message).toBe("Unauthenticated");
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it('should authenticate and authorise with a valid Bearer token', async () => {
|
|
84
|
+
const authorizationResponse = await authorization.authenticateAndAuthorize({
|
|
85
|
+
authenticateAndAuthorizeRequest: {
|
|
86
|
+
headers: {
|
|
87
|
+
'Authorization': `Bearer ${process.env.FLIPDISH_BEARER_TOKEN_PROD}`,
|
|
88
|
+
},
|
|
89
|
+
action: Permissions.AnyAuditLogs,
|
|
90
|
+
resource: {
|
|
91
|
+
id: "org12345",
|
|
92
|
+
type: "Org",
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
expect(authorizationResponse.status).toBe(200);
|
|
98
|
+
expect(authorizationResponse.data.authentication.authenticated).toBe(true);
|
|
99
|
+
expect(authorizationResponse.data.authentication.principal?.type).toBe("User");
|
|
100
|
+
expect(authorizationResponse.data.authentication.principal?.id).toBe("8147747");
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
test('Authorise', async () => {
|
|
106
|
+
let testPrincipal: any = {
|
|
107
|
+
id: "12345",
|
|
108
|
+
type: "User",
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
let testResource: any = {
|
|
112
|
+
id: "org12345",
|
|
113
|
+
type: "Org",
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const authorizationResponse = await authorization.authorize({
|
|
117
|
+
authorizationRequest: {
|
|
118
|
+
principal: testPrincipal,
|
|
119
|
+
action: Permissions.AnyAuditLogs,
|
|
120
|
+
resource: testResource
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
expect(authorizationResponse.status).toBe(200);
|
|
124
|
+
expect(authorizationResponse.data.allowed).toBe(false);
|
|
125
|
+
expect(authorizationResponse.data.decision).toBe("DENY");
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
});
|
|
11
129
|
```
|
|
12
130
|
|
|
13
131
|
The generated Node module can be used in the following environments:
|
package/api.ts
CHANGED
|
@@ -1467,30 +1467,16 @@ export const AuthenticationApiFactory = function (configuration?: Configuration,
|
|
|
1467
1467
|
/**
|
|
1468
1468
|
* Authenticate and authorize a user to perform an action
|
|
1469
1469
|
* @summary Authenticate and authorize Request
|
|
1470
|
-
* @param {
|
|
1470
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
1471
1471
|
* @param {*} [options] Override http request option.
|
|
1472
1472
|
* @throws {RequiredError}
|
|
1473
1473
|
*/
|
|
1474
|
-
authenticateAndAuthorize(
|
|
1475
|
-
return localVarFp.authenticateAndAuthorize(
|
|
1474
|
+
authenticateAndAuthorize(authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthenticateAndAuthorizeResponse> {
|
|
1475
|
+
return localVarFp.authenticateAndAuthorize(authenticateAndAuthorizeRequest, options).then((request) => request(axios, basePath));
|
|
1476
1476
|
},
|
|
1477
1477
|
};
|
|
1478
1478
|
};
|
|
1479
1479
|
|
|
1480
|
-
/**
|
|
1481
|
-
* Request parameters for authenticateAndAuthorize operation in AuthenticationApi.
|
|
1482
|
-
* @export
|
|
1483
|
-
* @interface AuthenticationApiAuthenticateAndAuthorizeRequest
|
|
1484
|
-
*/
|
|
1485
|
-
export interface AuthenticationApiAuthenticateAndAuthorizeRequest {
|
|
1486
|
-
/**
|
|
1487
|
-
*
|
|
1488
|
-
* @type {AuthenticateAndAuthorizeRequest}
|
|
1489
|
-
* @memberof AuthenticationApiAuthenticateAndAuthorize
|
|
1490
|
-
*/
|
|
1491
|
-
readonly authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
1480
|
/**
|
|
1495
1481
|
* AuthenticationApi - object-oriented interface
|
|
1496
1482
|
* @export
|
|
@@ -1501,13 +1487,13 @@ export class AuthenticationApi extends BaseAPI {
|
|
|
1501
1487
|
/**
|
|
1502
1488
|
* Authenticate and authorize a user to perform an action
|
|
1503
1489
|
* @summary Authenticate and authorize Request
|
|
1504
|
-
* @param {
|
|
1490
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
1505
1491
|
* @param {*} [options] Override http request option.
|
|
1506
1492
|
* @throws {RequiredError}
|
|
1507
1493
|
* @memberof AuthenticationApi
|
|
1508
1494
|
*/
|
|
1509
|
-
public authenticateAndAuthorize(
|
|
1510
|
-
return AuthenticationApiFp(this.configuration).authenticateAndAuthorize(
|
|
1495
|
+
public authenticateAndAuthorize(authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest, options?: RawAxiosRequestConfig) {
|
|
1496
|
+
return AuthenticationApiFp(this.configuration).authenticateAndAuthorize(authenticateAndAuthorizeRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1511
1497
|
}
|
|
1512
1498
|
}
|
|
1513
1499
|
|
|
@@ -1642,54 +1628,26 @@ export const AuthorizationApiFactory = function (configuration?: Configuration,
|
|
|
1642
1628
|
/**
|
|
1643
1629
|
* Authenticate and authorize a user to perform an action
|
|
1644
1630
|
* @summary Authenticate and authorize Request
|
|
1645
|
-
* @param {
|
|
1631
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
1646
1632
|
* @param {*} [options] Override http request option.
|
|
1647
1633
|
* @throws {RequiredError}
|
|
1648
1634
|
*/
|
|
1649
|
-
authenticateAndAuthorize(
|
|
1650
|
-
return localVarFp.authenticateAndAuthorize(
|
|
1635
|
+
authenticateAndAuthorize(authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthenticateAndAuthorizeResponse> {
|
|
1636
|
+
return localVarFp.authenticateAndAuthorize(authenticateAndAuthorizeRequest, options).then((request) => request(axios, basePath));
|
|
1651
1637
|
},
|
|
1652
1638
|
/**
|
|
1653
1639
|
* Check if a user is authorized to perform an action
|
|
1654
1640
|
* @summary Authorize Request
|
|
1655
|
-
* @param {
|
|
1641
|
+
* @param {AuthorizationRequest} [authorizationRequest]
|
|
1656
1642
|
* @param {*} [options] Override http request option.
|
|
1657
1643
|
* @throws {RequiredError}
|
|
1658
1644
|
*/
|
|
1659
|
-
authorize(
|
|
1660
|
-
return localVarFp.authorize(
|
|
1645
|
+
authorize(authorizationRequest?: AuthorizationRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizationResponse> {
|
|
1646
|
+
return localVarFp.authorize(authorizationRequest, options).then((request) => request(axios, basePath));
|
|
1661
1647
|
},
|
|
1662
1648
|
};
|
|
1663
1649
|
};
|
|
1664
1650
|
|
|
1665
|
-
/**
|
|
1666
|
-
* Request parameters for authenticateAndAuthorize operation in AuthorizationApi.
|
|
1667
|
-
* @export
|
|
1668
|
-
* @interface AuthorizationApiAuthenticateAndAuthorizeRequest
|
|
1669
|
-
*/
|
|
1670
|
-
export interface AuthorizationApiAuthenticateAndAuthorizeRequest {
|
|
1671
|
-
/**
|
|
1672
|
-
*
|
|
1673
|
-
* @type {AuthenticateAndAuthorizeRequest}
|
|
1674
|
-
* @memberof AuthorizationApiAuthenticateAndAuthorize
|
|
1675
|
-
*/
|
|
1676
|
-
readonly authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
/**
|
|
1680
|
-
* Request parameters for authorize operation in AuthorizationApi.
|
|
1681
|
-
* @export
|
|
1682
|
-
* @interface AuthorizationApiAuthorizeRequest
|
|
1683
|
-
*/
|
|
1684
|
-
export interface AuthorizationApiAuthorizeRequest {
|
|
1685
|
-
/**
|
|
1686
|
-
*
|
|
1687
|
-
* @type {AuthorizationRequest}
|
|
1688
|
-
* @memberof AuthorizationApiAuthorize
|
|
1689
|
-
*/
|
|
1690
|
-
readonly authorizationRequest?: AuthorizationRequest
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
1651
|
/**
|
|
1694
1652
|
* AuthorizationApi - object-oriented interface
|
|
1695
1653
|
* @export
|
|
@@ -1700,25 +1658,25 @@ export class AuthorizationApi extends BaseAPI {
|
|
|
1700
1658
|
/**
|
|
1701
1659
|
* Authenticate and authorize a user to perform an action
|
|
1702
1660
|
* @summary Authenticate and authorize Request
|
|
1703
|
-
* @param {
|
|
1661
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
1704
1662
|
* @param {*} [options] Override http request option.
|
|
1705
1663
|
* @throws {RequiredError}
|
|
1706
1664
|
* @memberof AuthorizationApi
|
|
1707
1665
|
*/
|
|
1708
|
-
public authenticateAndAuthorize(
|
|
1709
|
-
return AuthorizationApiFp(this.configuration).authenticateAndAuthorize(
|
|
1666
|
+
public authenticateAndAuthorize(authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest, options?: RawAxiosRequestConfig) {
|
|
1667
|
+
return AuthorizationApiFp(this.configuration).authenticateAndAuthorize(authenticateAndAuthorizeRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1710
1668
|
}
|
|
1711
1669
|
|
|
1712
1670
|
/**
|
|
1713
1671
|
* Check if a user is authorized to perform an action
|
|
1714
1672
|
* @summary Authorize Request
|
|
1715
|
-
* @param {
|
|
1673
|
+
* @param {AuthorizationRequest} [authorizationRequest]
|
|
1716
1674
|
* @param {*} [options] Override http request option.
|
|
1717
1675
|
* @throws {RequiredError}
|
|
1718
1676
|
* @memberof AuthorizationApi
|
|
1719
1677
|
*/
|
|
1720
|
-
public authorize(
|
|
1721
|
-
return AuthorizationApiFp(this.configuration).authorize(
|
|
1678
|
+
public authorize(authorizationRequest?: AuthorizationRequest, options?: RawAxiosRequestConfig) {
|
|
1679
|
+
return AuthorizationApiFp(this.configuration).authorize(authorizationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1722
1680
|
}
|
|
1723
1681
|
}
|
|
1724
1682
|
|
|
@@ -2077,130 +2035,50 @@ export const RoleAssignmentApiFactory = function (configuration?: Configuration,
|
|
|
2077
2035
|
/**
|
|
2078
2036
|
* Assigns a specified role to a given principal (user, group, etc.)
|
|
2079
2037
|
* @summary Assign Role to Principal
|
|
2080
|
-
* @param {
|
|
2038
|
+
* @param {string} orgId
|
|
2039
|
+
* @param {AssignRoleRequestBody} [assignRoleRequestBody]
|
|
2081
2040
|
* @param {*} [options] Override http request option.
|
|
2082
2041
|
* @throws {RequiredError}
|
|
2083
2042
|
*/
|
|
2084
|
-
assignRoleToPrincipal(
|
|
2085
|
-
return localVarFp.assignRoleToPrincipal(
|
|
2043
|
+
assignRoleToPrincipal(orgId: string, assignRoleRequestBody?: AssignRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<AssignRoleSuccessResponse> {
|
|
2044
|
+
return localVarFp.assignRoleToPrincipal(orgId, assignRoleRequestBody, options).then((request) => request(axios, basePath));
|
|
2086
2045
|
},
|
|
2087
2046
|
/**
|
|
2088
2047
|
* Get the active roles for a given principal
|
|
2089
2048
|
* @summary Get Principal Roles
|
|
2090
|
-
* @param {
|
|
2049
|
+
* @param {string} orgId
|
|
2050
|
+
* @param {GetPrincipalRolesRequestBody} [getPrincipalRolesRequestBody]
|
|
2091
2051
|
* @param {*} [options] Override http request option.
|
|
2092
2052
|
* @throws {RequiredError}
|
|
2093
2053
|
*/
|
|
2094
|
-
getPrincipalRoles(
|
|
2095
|
-
return localVarFp.getPrincipalRoles(
|
|
2054
|
+
getPrincipalRoles(orgId: string, getPrincipalRolesRequestBody?: GetPrincipalRolesRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<GetPrincipalRolesSuccessResponse> {
|
|
2055
|
+
return localVarFp.getPrincipalRoles(orgId, getPrincipalRolesRequestBody, options).then((request) => request(axios, basePath));
|
|
2096
2056
|
},
|
|
2097
2057
|
/**
|
|
2098
2058
|
* Revokes a forbidden role from a given principal (user, group, etc.)
|
|
2099
2059
|
* @summary Revoke Forbidden Role from Principal
|
|
2100
|
-
* @param {
|
|
2060
|
+
* @param {string} orgId
|
|
2061
|
+
* @param {RevokeForbiddenRoleRequestBody} [revokeForbiddenRoleRequestBody]
|
|
2101
2062
|
* @param {*} [options] Override http request option.
|
|
2102
2063
|
* @throws {RequiredError}
|
|
2103
2064
|
*/
|
|
2104
|
-
revokeForbiddenRoleFromPrincipal(
|
|
2105
|
-
return localVarFp.revokeForbiddenRoleFromPrincipal(
|
|
2065
|
+
revokeForbiddenRoleFromPrincipal(orgId: string, revokeForbiddenRoleRequestBody?: RevokeForbiddenRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<RevokeRoleSuccessResponse> {
|
|
2066
|
+
return localVarFp.revokeForbiddenRoleFromPrincipal(orgId, revokeForbiddenRoleRequestBody, options).then((request) => request(axios, basePath));
|
|
2106
2067
|
},
|
|
2107
2068
|
/**
|
|
2108
2069
|
* Revokes a specified role from a given principal (user, group, etc.)
|
|
2109
2070
|
* @summary Revoke Role from Principal
|
|
2110
|
-
* @param {
|
|
2071
|
+
* @param {string} orgId
|
|
2072
|
+
* @param {RevokeRoleRequestBody} [revokeRoleRequestBody]
|
|
2111
2073
|
* @param {*} [options] Override http request option.
|
|
2112
2074
|
* @throws {RequiredError}
|
|
2113
2075
|
*/
|
|
2114
|
-
revokeRoleFromPrincipal(
|
|
2115
|
-
return localVarFp.revokeRoleFromPrincipal(
|
|
2076
|
+
revokeRoleFromPrincipal(orgId: string, revokeRoleRequestBody?: RevokeRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<RevokeRoleSuccessResponse> {
|
|
2077
|
+
return localVarFp.revokeRoleFromPrincipal(orgId, revokeRoleRequestBody, options).then((request) => request(axios, basePath));
|
|
2116
2078
|
},
|
|
2117
2079
|
};
|
|
2118
2080
|
};
|
|
2119
2081
|
|
|
2120
|
-
/**
|
|
2121
|
-
* Request parameters for assignRoleToPrincipal operation in RoleAssignmentApi.
|
|
2122
|
-
* @export
|
|
2123
|
-
* @interface RoleAssignmentApiAssignRoleToPrincipalRequest
|
|
2124
|
-
*/
|
|
2125
|
-
export interface RoleAssignmentApiAssignRoleToPrincipalRequest {
|
|
2126
|
-
/**
|
|
2127
|
-
*
|
|
2128
|
-
* @type {string}
|
|
2129
|
-
* @memberof RoleAssignmentApiAssignRoleToPrincipal
|
|
2130
|
-
*/
|
|
2131
|
-
readonly orgId: string
|
|
2132
|
-
|
|
2133
|
-
/**
|
|
2134
|
-
*
|
|
2135
|
-
* @type {AssignRoleRequestBody}
|
|
2136
|
-
* @memberof RoleAssignmentApiAssignRoleToPrincipal
|
|
2137
|
-
*/
|
|
2138
|
-
readonly assignRoleRequestBody?: AssignRoleRequestBody
|
|
2139
|
-
}
|
|
2140
|
-
|
|
2141
|
-
/**
|
|
2142
|
-
* Request parameters for getPrincipalRoles operation in RoleAssignmentApi.
|
|
2143
|
-
* @export
|
|
2144
|
-
* @interface RoleAssignmentApiGetPrincipalRolesRequest
|
|
2145
|
-
*/
|
|
2146
|
-
export interface RoleAssignmentApiGetPrincipalRolesRequest {
|
|
2147
|
-
/**
|
|
2148
|
-
*
|
|
2149
|
-
* @type {string}
|
|
2150
|
-
* @memberof RoleAssignmentApiGetPrincipalRoles
|
|
2151
|
-
*/
|
|
2152
|
-
readonly orgId: string
|
|
2153
|
-
|
|
2154
|
-
/**
|
|
2155
|
-
*
|
|
2156
|
-
* @type {GetPrincipalRolesRequestBody}
|
|
2157
|
-
* @memberof RoleAssignmentApiGetPrincipalRoles
|
|
2158
|
-
*/
|
|
2159
|
-
readonly getPrincipalRolesRequestBody?: GetPrincipalRolesRequestBody
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
|
-
/**
|
|
2163
|
-
* Request parameters for revokeForbiddenRoleFromPrincipal operation in RoleAssignmentApi.
|
|
2164
|
-
* @export
|
|
2165
|
-
* @interface RoleAssignmentApiRevokeForbiddenRoleFromPrincipalRequest
|
|
2166
|
-
*/
|
|
2167
|
-
export interface RoleAssignmentApiRevokeForbiddenRoleFromPrincipalRequest {
|
|
2168
|
-
/**
|
|
2169
|
-
*
|
|
2170
|
-
* @type {string}
|
|
2171
|
-
* @memberof RoleAssignmentApiRevokeForbiddenRoleFromPrincipal
|
|
2172
|
-
*/
|
|
2173
|
-
readonly orgId: string
|
|
2174
|
-
|
|
2175
|
-
/**
|
|
2176
|
-
*
|
|
2177
|
-
* @type {RevokeForbiddenRoleRequestBody}
|
|
2178
|
-
* @memberof RoleAssignmentApiRevokeForbiddenRoleFromPrincipal
|
|
2179
|
-
*/
|
|
2180
|
-
readonly revokeForbiddenRoleRequestBody?: RevokeForbiddenRoleRequestBody
|
|
2181
|
-
}
|
|
2182
|
-
|
|
2183
|
-
/**
|
|
2184
|
-
* Request parameters for revokeRoleFromPrincipal operation in RoleAssignmentApi.
|
|
2185
|
-
* @export
|
|
2186
|
-
* @interface RoleAssignmentApiRevokeRoleFromPrincipalRequest
|
|
2187
|
-
*/
|
|
2188
|
-
export interface RoleAssignmentApiRevokeRoleFromPrincipalRequest {
|
|
2189
|
-
/**
|
|
2190
|
-
*
|
|
2191
|
-
* @type {string}
|
|
2192
|
-
* @memberof RoleAssignmentApiRevokeRoleFromPrincipal
|
|
2193
|
-
*/
|
|
2194
|
-
readonly orgId: string
|
|
2195
|
-
|
|
2196
|
-
/**
|
|
2197
|
-
*
|
|
2198
|
-
* @type {RevokeRoleRequestBody}
|
|
2199
|
-
* @memberof RoleAssignmentApiRevokeRoleFromPrincipal
|
|
2200
|
-
*/
|
|
2201
|
-
readonly revokeRoleRequestBody?: RevokeRoleRequestBody
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
2082
|
/**
|
|
2205
2083
|
* RoleAssignmentApi - object-oriented interface
|
|
2206
2084
|
* @export
|
|
@@ -2211,49 +2089,53 @@ export class RoleAssignmentApi extends BaseAPI {
|
|
|
2211
2089
|
/**
|
|
2212
2090
|
* Assigns a specified role to a given principal (user, group, etc.)
|
|
2213
2091
|
* @summary Assign Role to Principal
|
|
2214
|
-
* @param {
|
|
2092
|
+
* @param {string} orgId
|
|
2093
|
+
* @param {AssignRoleRequestBody} [assignRoleRequestBody]
|
|
2215
2094
|
* @param {*} [options] Override http request option.
|
|
2216
2095
|
* @throws {RequiredError}
|
|
2217
2096
|
* @memberof RoleAssignmentApi
|
|
2218
2097
|
*/
|
|
2219
|
-
public assignRoleToPrincipal(
|
|
2220
|
-
return RoleAssignmentApiFp(this.configuration).assignRoleToPrincipal(
|
|
2098
|
+
public assignRoleToPrincipal(orgId: string, assignRoleRequestBody?: AssignRoleRequestBody, options?: RawAxiosRequestConfig) {
|
|
2099
|
+
return RoleAssignmentApiFp(this.configuration).assignRoleToPrincipal(orgId, assignRoleRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
2221
2100
|
}
|
|
2222
2101
|
|
|
2223
2102
|
/**
|
|
2224
2103
|
* Get the active roles for a given principal
|
|
2225
2104
|
* @summary Get Principal Roles
|
|
2226
|
-
* @param {
|
|
2105
|
+
* @param {string} orgId
|
|
2106
|
+
* @param {GetPrincipalRolesRequestBody} [getPrincipalRolesRequestBody]
|
|
2227
2107
|
* @param {*} [options] Override http request option.
|
|
2228
2108
|
* @throws {RequiredError}
|
|
2229
2109
|
* @memberof RoleAssignmentApi
|
|
2230
2110
|
*/
|
|
2231
|
-
public getPrincipalRoles(
|
|
2232
|
-
return RoleAssignmentApiFp(this.configuration).getPrincipalRoles(
|
|
2111
|
+
public getPrincipalRoles(orgId: string, getPrincipalRolesRequestBody?: GetPrincipalRolesRequestBody, options?: RawAxiosRequestConfig) {
|
|
2112
|
+
return RoleAssignmentApiFp(this.configuration).getPrincipalRoles(orgId, getPrincipalRolesRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
2233
2113
|
}
|
|
2234
2114
|
|
|
2235
2115
|
/**
|
|
2236
2116
|
* Revokes a forbidden role from a given principal (user, group, etc.)
|
|
2237
2117
|
* @summary Revoke Forbidden Role from Principal
|
|
2238
|
-
* @param {
|
|
2118
|
+
* @param {string} orgId
|
|
2119
|
+
* @param {RevokeForbiddenRoleRequestBody} [revokeForbiddenRoleRequestBody]
|
|
2239
2120
|
* @param {*} [options] Override http request option.
|
|
2240
2121
|
* @throws {RequiredError}
|
|
2241
2122
|
* @memberof RoleAssignmentApi
|
|
2242
2123
|
*/
|
|
2243
|
-
public revokeForbiddenRoleFromPrincipal(
|
|
2244
|
-
return RoleAssignmentApiFp(this.configuration).revokeForbiddenRoleFromPrincipal(
|
|
2124
|
+
public revokeForbiddenRoleFromPrincipal(orgId: string, revokeForbiddenRoleRequestBody?: RevokeForbiddenRoleRequestBody, options?: RawAxiosRequestConfig) {
|
|
2125
|
+
return RoleAssignmentApiFp(this.configuration).revokeForbiddenRoleFromPrincipal(orgId, revokeForbiddenRoleRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
2245
2126
|
}
|
|
2246
2127
|
|
|
2247
2128
|
/**
|
|
2248
2129
|
* Revokes a specified role from a given principal (user, group, etc.)
|
|
2249
2130
|
* @summary Revoke Role from Principal
|
|
2250
|
-
* @param {
|
|
2131
|
+
* @param {string} orgId
|
|
2132
|
+
* @param {RevokeRoleRequestBody} [revokeRoleRequestBody]
|
|
2251
2133
|
* @param {*} [options] Override http request option.
|
|
2252
2134
|
* @throws {RequiredError}
|
|
2253
2135
|
* @memberof RoleAssignmentApi
|
|
2254
2136
|
*/
|
|
2255
|
-
public revokeRoleFromPrincipal(
|
|
2256
|
-
return RoleAssignmentApiFp(this.configuration).revokeRoleFromPrincipal(
|
|
2137
|
+
public revokeRoleFromPrincipal(orgId: string, revokeRoleRequestBody?: RevokeRoleRequestBody, options?: RawAxiosRequestConfig) {
|
|
2138
|
+
return RoleAssignmentApiFp(this.configuration).revokeRoleFromPrincipal(orgId, revokeRoleRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
2257
2139
|
}
|
|
2258
2140
|
}
|
|
2259
2141
|
|
|
@@ -2393,61 +2275,27 @@ export const UserPermissionsApiFactory = function (configuration?: Configuration
|
|
|
2393
2275
|
/**
|
|
2394
2276
|
* List the available permissions for the current user
|
|
2395
2277
|
* @summary List Own Permissions
|
|
2396
|
-
* @param {
|
|
2278
|
+
* @param {string} orgId
|
|
2397
2279
|
* @param {*} [options] Override http request option.
|
|
2398
2280
|
* @throws {RequiredError}
|
|
2399
2281
|
*/
|
|
2400
|
-
listOwnPermissions(
|
|
2401
|
-
return localVarFp.listOwnPermissions(
|
|
2282
|
+
listOwnPermissions(orgId: string, options?: RawAxiosRequestConfig): AxiosPromise<GetUserPermissionsSuccessResponse> {
|
|
2283
|
+
return localVarFp.listOwnPermissions(orgId, options).then((request) => request(axios, basePath));
|
|
2402
2284
|
},
|
|
2403
2285
|
/**
|
|
2404
2286
|
* List the available permissions for a given user
|
|
2405
2287
|
* @summary List User Permissions
|
|
2406
|
-
* @param {
|
|
2288
|
+
* @param {string} orgId
|
|
2289
|
+
* @param {string} userId
|
|
2407
2290
|
* @param {*} [options] Override http request option.
|
|
2408
2291
|
* @throws {RequiredError}
|
|
2409
2292
|
*/
|
|
2410
|
-
listUserPermissions(
|
|
2411
|
-
return localVarFp.listUserPermissions(
|
|
2293
|
+
listUserPermissions(orgId: string, userId: string, options?: RawAxiosRequestConfig): AxiosPromise<GetUserPermissionsSuccessResponse> {
|
|
2294
|
+
return localVarFp.listUserPermissions(orgId, userId, options).then((request) => request(axios, basePath));
|
|
2412
2295
|
},
|
|
2413
2296
|
};
|
|
2414
2297
|
};
|
|
2415
2298
|
|
|
2416
|
-
/**
|
|
2417
|
-
* Request parameters for listOwnPermissions operation in UserPermissionsApi.
|
|
2418
|
-
* @export
|
|
2419
|
-
* @interface UserPermissionsApiListOwnPermissionsRequest
|
|
2420
|
-
*/
|
|
2421
|
-
export interface UserPermissionsApiListOwnPermissionsRequest {
|
|
2422
|
-
/**
|
|
2423
|
-
*
|
|
2424
|
-
* @type {string}
|
|
2425
|
-
* @memberof UserPermissionsApiListOwnPermissions
|
|
2426
|
-
*/
|
|
2427
|
-
readonly orgId: string
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2430
|
-
/**
|
|
2431
|
-
* Request parameters for listUserPermissions operation in UserPermissionsApi.
|
|
2432
|
-
* @export
|
|
2433
|
-
* @interface UserPermissionsApiListUserPermissionsRequest
|
|
2434
|
-
*/
|
|
2435
|
-
export interface UserPermissionsApiListUserPermissionsRequest {
|
|
2436
|
-
/**
|
|
2437
|
-
*
|
|
2438
|
-
* @type {string}
|
|
2439
|
-
* @memberof UserPermissionsApiListUserPermissions
|
|
2440
|
-
*/
|
|
2441
|
-
readonly orgId: string
|
|
2442
|
-
|
|
2443
|
-
/**
|
|
2444
|
-
*
|
|
2445
|
-
* @type {string}
|
|
2446
|
-
* @memberof UserPermissionsApiListUserPermissions
|
|
2447
|
-
*/
|
|
2448
|
-
readonly userId: string
|
|
2449
|
-
}
|
|
2450
|
-
|
|
2451
2299
|
/**
|
|
2452
2300
|
* UserPermissionsApi - object-oriented interface
|
|
2453
2301
|
* @export
|
|
@@ -2458,25 +2306,26 @@ export class UserPermissionsApi extends BaseAPI {
|
|
|
2458
2306
|
/**
|
|
2459
2307
|
* List the available permissions for the current user
|
|
2460
2308
|
* @summary List Own Permissions
|
|
2461
|
-
* @param {
|
|
2309
|
+
* @param {string} orgId
|
|
2462
2310
|
* @param {*} [options] Override http request option.
|
|
2463
2311
|
* @throws {RequiredError}
|
|
2464
2312
|
* @memberof UserPermissionsApi
|
|
2465
2313
|
*/
|
|
2466
|
-
public listOwnPermissions(
|
|
2467
|
-
return UserPermissionsApiFp(this.configuration).listOwnPermissions(
|
|
2314
|
+
public listOwnPermissions(orgId: string, options?: RawAxiosRequestConfig) {
|
|
2315
|
+
return UserPermissionsApiFp(this.configuration).listOwnPermissions(orgId, options).then((request) => request(this.axios, this.basePath));
|
|
2468
2316
|
}
|
|
2469
2317
|
|
|
2470
2318
|
/**
|
|
2471
2319
|
* List the available permissions for a given user
|
|
2472
2320
|
* @summary List User Permissions
|
|
2473
|
-
* @param {
|
|
2321
|
+
* @param {string} orgId
|
|
2322
|
+
* @param {string} userId
|
|
2474
2323
|
* @param {*} [options] Override http request option.
|
|
2475
2324
|
* @throws {RequiredError}
|
|
2476
2325
|
* @memberof UserPermissionsApi
|
|
2477
2326
|
*/
|
|
2478
|
-
public listUserPermissions(
|
|
2479
|
-
return UserPermissionsApiFp(this.configuration).listUserPermissions(
|
|
2327
|
+
public listUserPermissions(orgId: string, userId: string, options?: RawAxiosRequestConfig) {
|
|
2328
|
+
return UserPermissionsApiFp(this.configuration).listUserPermissions(orgId, userId, options).then((request) => request(this.axios, this.basePath));
|
|
2480
2329
|
}
|
|
2481
2330
|
}
|
|
2482
2331
|
|
package/configuration.ts
CHANGED
|
@@ -100,7 +100,7 @@ export class Configuration {
|
|
|
100
100
|
|
|
101
101
|
const extraHeaders = param.useDefaultUserAgent ? {} : {
|
|
102
102
|
headers: {
|
|
103
|
-
"user-agent": "Flipdish authorization typescript SDK / 0.0.
|
|
103
|
+
"user-agent": "Flipdish authorization typescript SDK / 0.0.3-rc.1756733706"
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
|
package/dist/api.d.ts
CHANGED
|
@@ -1380,25 +1380,12 @@ export declare const AuthenticationApiFactory: (configuration?: Configuration, b
|
|
|
1380
1380
|
/**
|
|
1381
1381
|
* Authenticate and authorize a user to perform an action
|
|
1382
1382
|
* @summary Authenticate and authorize Request
|
|
1383
|
-
* @param {
|
|
1383
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
1384
1384
|
* @param {*} [options] Override http request option.
|
|
1385
1385
|
* @throws {RequiredError}
|
|
1386
1386
|
*/
|
|
1387
|
-
authenticateAndAuthorize(
|
|
1387
|
+
authenticateAndAuthorize(authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthenticateAndAuthorizeResponse>;
|
|
1388
1388
|
};
|
|
1389
|
-
/**
|
|
1390
|
-
* Request parameters for authenticateAndAuthorize operation in AuthenticationApi.
|
|
1391
|
-
* @export
|
|
1392
|
-
* @interface AuthenticationApiAuthenticateAndAuthorizeRequest
|
|
1393
|
-
*/
|
|
1394
|
-
export interface AuthenticationApiAuthenticateAndAuthorizeRequest {
|
|
1395
|
-
/**
|
|
1396
|
-
*
|
|
1397
|
-
* @type {AuthenticateAndAuthorizeRequest}
|
|
1398
|
-
* @memberof AuthenticationApiAuthenticateAndAuthorize
|
|
1399
|
-
*/
|
|
1400
|
-
readonly authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest;
|
|
1401
|
-
}
|
|
1402
1389
|
/**
|
|
1403
1390
|
* AuthenticationApi - object-oriented interface
|
|
1404
1391
|
* @export
|
|
@@ -1409,12 +1396,12 @@ export declare class AuthenticationApi extends BaseAPI {
|
|
|
1409
1396
|
/**
|
|
1410
1397
|
* Authenticate and authorize a user to perform an action
|
|
1411
1398
|
* @summary Authenticate and authorize Request
|
|
1412
|
-
* @param {
|
|
1399
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
1413
1400
|
* @param {*} [options] Override http request option.
|
|
1414
1401
|
* @throws {RequiredError}
|
|
1415
1402
|
* @memberof AuthenticationApi
|
|
1416
1403
|
*/
|
|
1417
|
-
authenticateAndAuthorize(
|
|
1404
|
+
authenticateAndAuthorize(authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthenticateAndAuthorizeResponse, any>>;
|
|
1418
1405
|
}
|
|
1419
1406
|
/**
|
|
1420
1407
|
* AuthorizationApi - axios parameter creator
|
|
@@ -1468,46 +1455,20 @@ export declare const AuthorizationApiFactory: (configuration?: Configuration, ba
|
|
|
1468
1455
|
/**
|
|
1469
1456
|
* Authenticate and authorize a user to perform an action
|
|
1470
1457
|
* @summary Authenticate and authorize Request
|
|
1471
|
-
* @param {
|
|
1458
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
1472
1459
|
* @param {*} [options] Override http request option.
|
|
1473
1460
|
* @throws {RequiredError}
|
|
1474
1461
|
*/
|
|
1475
|
-
authenticateAndAuthorize(
|
|
1462
|
+
authenticateAndAuthorize(authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthenticateAndAuthorizeResponse>;
|
|
1476
1463
|
/**
|
|
1477
1464
|
* Check if a user is authorized to perform an action
|
|
1478
1465
|
* @summary Authorize Request
|
|
1479
|
-
* @param {
|
|
1466
|
+
* @param {AuthorizationRequest} [authorizationRequest]
|
|
1480
1467
|
* @param {*} [options] Override http request option.
|
|
1481
1468
|
* @throws {RequiredError}
|
|
1482
1469
|
*/
|
|
1483
|
-
authorize(
|
|
1470
|
+
authorize(authorizationRequest?: AuthorizationRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizationResponse>;
|
|
1484
1471
|
};
|
|
1485
|
-
/**
|
|
1486
|
-
* Request parameters for authenticateAndAuthorize operation in AuthorizationApi.
|
|
1487
|
-
* @export
|
|
1488
|
-
* @interface AuthorizationApiAuthenticateAndAuthorizeRequest
|
|
1489
|
-
*/
|
|
1490
|
-
export interface AuthorizationApiAuthenticateAndAuthorizeRequest {
|
|
1491
|
-
/**
|
|
1492
|
-
*
|
|
1493
|
-
* @type {AuthenticateAndAuthorizeRequest}
|
|
1494
|
-
* @memberof AuthorizationApiAuthenticateAndAuthorize
|
|
1495
|
-
*/
|
|
1496
|
-
readonly authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest;
|
|
1497
|
-
}
|
|
1498
|
-
/**
|
|
1499
|
-
* Request parameters for authorize operation in AuthorizationApi.
|
|
1500
|
-
* @export
|
|
1501
|
-
* @interface AuthorizationApiAuthorizeRequest
|
|
1502
|
-
*/
|
|
1503
|
-
export interface AuthorizationApiAuthorizeRequest {
|
|
1504
|
-
/**
|
|
1505
|
-
*
|
|
1506
|
-
* @type {AuthorizationRequest}
|
|
1507
|
-
* @memberof AuthorizationApiAuthorize
|
|
1508
|
-
*/
|
|
1509
|
-
readonly authorizationRequest?: AuthorizationRequest;
|
|
1510
|
-
}
|
|
1511
1472
|
/**
|
|
1512
1473
|
* AuthorizationApi - object-oriented interface
|
|
1513
1474
|
* @export
|
|
@@ -1518,21 +1479,21 @@ export declare class AuthorizationApi extends BaseAPI {
|
|
|
1518
1479
|
/**
|
|
1519
1480
|
* Authenticate and authorize a user to perform an action
|
|
1520
1481
|
* @summary Authenticate and authorize Request
|
|
1521
|
-
* @param {
|
|
1482
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
1522
1483
|
* @param {*} [options] Override http request option.
|
|
1523
1484
|
* @throws {RequiredError}
|
|
1524
1485
|
* @memberof AuthorizationApi
|
|
1525
1486
|
*/
|
|
1526
|
-
authenticateAndAuthorize(
|
|
1487
|
+
authenticateAndAuthorize(authenticateAndAuthorizeRequest?: AuthenticateAndAuthorizeRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthenticateAndAuthorizeResponse, any>>;
|
|
1527
1488
|
/**
|
|
1528
1489
|
* Check if a user is authorized to perform an action
|
|
1529
1490
|
* @summary Authorize Request
|
|
1530
|
-
* @param {
|
|
1491
|
+
* @param {AuthorizationRequest} [authorizationRequest]
|
|
1531
1492
|
* @param {*} [options] Override http request option.
|
|
1532
1493
|
* @throws {RequiredError}
|
|
1533
1494
|
* @memberof AuthorizationApi
|
|
1534
1495
|
*/
|
|
1535
|
-
authorize(
|
|
1496
|
+
authorize(authorizationRequest?: AuthorizationRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthorizationResponse, any>>;
|
|
1536
1497
|
}
|
|
1537
1498
|
/**
|
|
1538
1499
|
* PermissionsApi - axios parameter creator
|
|
@@ -1681,112 +1642,40 @@ export declare const RoleAssignmentApiFactory: (configuration?: Configuration, b
|
|
|
1681
1642
|
/**
|
|
1682
1643
|
* Assigns a specified role to a given principal (user, group, etc.)
|
|
1683
1644
|
* @summary Assign Role to Principal
|
|
1684
|
-
* @param {
|
|
1645
|
+
* @param {string} orgId
|
|
1646
|
+
* @param {AssignRoleRequestBody} [assignRoleRequestBody]
|
|
1685
1647
|
* @param {*} [options] Override http request option.
|
|
1686
1648
|
* @throws {RequiredError}
|
|
1687
1649
|
*/
|
|
1688
|
-
assignRoleToPrincipal(
|
|
1650
|
+
assignRoleToPrincipal(orgId: string, assignRoleRequestBody?: AssignRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<AssignRoleSuccessResponse>;
|
|
1689
1651
|
/**
|
|
1690
1652
|
* Get the active roles for a given principal
|
|
1691
1653
|
* @summary Get Principal Roles
|
|
1692
|
-
* @param {
|
|
1654
|
+
* @param {string} orgId
|
|
1655
|
+
* @param {GetPrincipalRolesRequestBody} [getPrincipalRolesRequestBody]
|
|
1693
1656
|
* @param {*} [options] Override http request option.
|
|
1694
1657
|
* @throws {RequiredError}
|
|
1695
1658
|
*/
|
|
1696
|
-
getPrincipalRoles(
|
|
1659
|
+
getPrincipalRoles(orgId: string, getPrincipalRolesRequestBody?: GetPrincipalRolesRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<GetPrincipalRolesSuccessResponse>;
|
|
1697
1660
|
/**
|
|
1698
1661
|
* Revokes a forbidden role from a given principal (user, group, etc.)
|
|
1699
1662
|
* @summary Revoke Forbidden Role from Principal
|
|
1700
|
-
* @param {
|
|
1663
|
+
* @param {string} orgId
|
|
1664
|
+
* @param {RevokeForbiddenRoleRequestBody} [revokeForbiddenRoleRequestBody]
|
|
1701
1665
|
* @param {*} [options] Override http request option.
|
|
1702
1666
|
* @throws {RequiredError}
|
|
1703
1667
|
*/
|
|
1704
|
-
revokeForbiddenRoleFromPrincipal(
|
|
1668
|
+
revokeForbiddenRoleFromPrincipal(orgId: string, revokeForbiddenRoleRequestBody?: RevokeForbiddenRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<RevokeRoleSuccessResponse>;
|
|
1705
1669
|
/**
|
|
1706
1670
|
* Revokes a specified role from a given principal (user, group, etc.)
|
|
1707
1671
|
* @summary Revoke Role from Principal
|
|
1708
|
-
* @param {
|
|
1672
|
+
* @param {string} orgId
|
|
1673
|
+
* @param {RevokeRoleRequestBody} [revokeRoleRequestBody]
|
|
1709
1674
|
* @param {*} [options] Override http request option.
|
|
1710
1675
|
* @throws {RequiredError}
|
|
1711
1676
|
*/
|
|
1712
|
-
revokeRoleFromPrincipal(
|
|
1677
|
+
revokeRoleFromPrincipal(orgId: string, revokeRoleRequestBody?: RevokeRoleRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<RevokeRoleSuccessResponse>;
|
|
1713
1678
|
};
|
|
1714
|
-
/**
|
|
1715
|
-
* Request parameters for assignRoleToPrincipal operation in RoleAssignmentApi.
|
|
1716
|
-
* @export
|
|
1717
|
-
* @interface RoleAssignmentApiAssignRoleToPrincipalRequest
|
|
1718
|
-
*/
|
|
1719
|
-
export interface RoleAssignmentApiAssignRoleToPrincipalRequest {
|
|
1720
|
-
/**
|
|
1721
|
-
*
|
|
1722
|
-
* @type {string}
|
|
1723
|
-
* @memberof RoleAssignmentApiAssignRoleToPrincipal
|
|
1724
|
-
*/
|
|
1725
|
-
readonly orgId: string;
|
|
1726
|
-
/**
|
|
1727
|
-
*
|
|
1728
|
-
* @type {AssignRoleRequestBody}
|
|
1729
|
-
* @memberof RoleAssignmentApiAssignRoleToPrincipal
|
|
1730
|
-
*/
|
|
1731
|
-
readonly assignRoleRequestBody?: AssignRoleRequestBody;
|
|
1732
|
-
}
|
|
1733
|
-
/**
|
|
1734
|
-
* Request parameters for getPrincipalRoles operation in RoleAssignmentApi.
|
|
1735
|
-
* @export
|
|
1736
|
-
* @interface RoleAssignmentApiGetPrincipalRolesRequest
|
|
1737
|
-
*/
|
|
1738
|
-
export interface RoleAssignmentApiGetPrincipalRolesRequest {
|
|
1739
|
-
/**
|
|
1740
|
-
*
|
|
1741
|
-
* @type {string}
|
|
1742
|
-
* @memberof RoleAssignmentApiGetPrincipalRoles
|
|
1743
|
-
*/
|
|
1744
|
-
readonly orgId: string;
|
|
1745
|
-
/**
|
|
1746
|
-
*
|
|
1747
|
-
* @type {GetPrincipalRolesRequestBody}
|
|
1748
|
-
* @memberof RoleAssignmentApiGetPrincipalRoles
|
|
1749
|
-
*/
|
|
1750
|
-
readonly getPrincipalRolesRequestBody?: GetPrincipalRolesRequestBody;
|
|
1751
|
-
}
|
|
1752
|
-
/**
|
|
1753
|
-
* Request parameters for revokeForbiddenRoleFromPrincipal operation in RoleAssignmentApi.
|
|
1754
|
-
* @export
|
|
1755
|
-
* @interface RoleAssignmentApiRevokeForbiddenRoleFromPrincipalRequest
|
|
1756
|
-
*/
|
|
1757
|
-
export interface RoleAssignmentApiRevokeForbiddenRoleFromPrincipalRequest {
|
|
1758
|
-
/**
|
|
1759
|
-
*
|
|
1760
|
-
* @type {string}
|
|
1761
|
-
* @memberof RoleAssignmentApiRevokeForbiddenRoleFromPrincipal
|
|
1762
|
-
*/
|
|
1763
|
-
readonly orgId: string;
|
|
1764
|
-
/**
|
|
1765
|
-
*
|
|
1766
|
-
* @type {RevokeForbiddenRoleRequestBody}
|
|
1767
|
-
* @memberof RoleAssignmentApiRevokeForbiddenRoleFromPrincipal
|
|
1768
|
-
*/
|
|
1769
|
-
readonly revokeForbiddenRoleRequestBody?: RevokeForbiddenRoleRequestBody;
|
|
1770
|
-
}
|
|
1771
|
-
/**
|
|
1772
|
-
* Request parameters for revokeRoleFromPrincipal operation in RoleAssignmentApi.
|
|
1773
|
-
* @export
|
|
1774
|
-
* @interface RoleAssignmentApiRevokeRoleFromPrincipalRequest
|
|
1775
|
-
*/
|
|
1776
|
-
export interface RoleAssignmentApiRevokeRoleFromPrincipalRequest {
|
|
1777
|
-
/**
|
|
1778
|
-
*
|
|
1779
|
-
* @type {string}
|
|
1780
|
-
* @memberof RoleAssignmentApiRevokeRoleFromPrincipal
|
|
1781
|
-
*/
|
|
1782
|
-
readonly orgId: string;
|
|
1783
|
-
/**
|
|
1784
|
-
*
|
|
1785
|
-
* @type {RevokeRoleRequestBody}
|
|
1786
|
-
* @memberof RoleAssignmentApiRevokeRoleFromPrincipal
|
|
1787
|
-
*/
|
|
1788
|
-
readonly revokeRoleRequestBody?: RevokeRoleRequestBody;
|
|
1789
|
-
}
|
|
1790
1679
|
/**
|
|
1791
1680
|
* RoleAssignmentApi - object-oriented interface
|
|
1792
1681
|
* @export
|
|
@@ -1797,39 +1686,43 @@ export declare class RoleAssignmentApi extends BaseAPI {
|
|
|
1797
1686
|
/**
|
|
1798
1687
|
* Assigns a specified role to a given principal (user, group, etc.)
|
|
1799
1688
|
* @summary Assign Role to Principal
|
|
1800
|
-
* @param {
|
|
1689
|
+
* @param {string} orgId
|
|
1690
|
+
* @param {AssignRoleRequestBody} [assignRoleRequestBody]
|
|
1801
1691
|
* @param {*} [options] Override http request option.
|
|
1802
1692
|
* @throws {RequiredError}
|
|
1803
1693
|
* @memberof RoleAssignmentApi
|
|
1804
1694
|
*/
|
|
1805
|
-
assignRoleToPrincipal(
|
|
1695
|
+
assignRoleToPrincipal(orgId: string, assignRoleRequestBody?: AssignRoleRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AssignRoleSuccessResponse, any>>;
|
|
1806
1696
|
/**
|
|
1807
1697
|
* Get the active roles for a given principal
|
|
1808
1698
|
* @summary Get Principal Roles
|
|
1809
|
-
* @param {
|
|
1699
|
+
* @param {string} orgId
|
|
1700
|
+
* @param {GetPrincipalRolesRequestBody} [getPrincipalRolesRequestBody]
|
|
1810
1701
|
* @param {*} [options] Override http request option.
|
|
1811
1702
|
* @throws {RequiredError}
|
|
1812
1703
|
* @memberof RoleAssignmentApi
|
|
1813
1704
|
*/
|
|
1814
|
-
getPrincipalRoles(
|
|
1705
|
+
getPrincipalRoles(orgId: string, getPrincipalRolesRequestBody?: GetPrincipalRolesRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPrincipalRolesSuccessResponse, any>>;
|
|
1815
1706
|
/**
|
|
1816
1707
|
* Revokes a forbidden role from a given principal (user, group, etc.)
|
|
1817
1708
|
* @summary Revoke Forbidden Role from Principal
|
|
1818
|
-
* @param {
|
|
1709
|
+
* @param {string} orgId
|
|
1710
|
+
* @param {RevokeForbiddenRoleRequestBody} [revokeForbiddenRoleRequestBody]
|
|
1819
1711
|
* @param {*} [options] Override http request option.
|
|
1820
1712
|
* @throws {RequiredError}
|
|
1821
1713
|
* @memberof RoleAssignmentApi
|
|
1822
1714
|
*/
|
|
1823
|
-
revokeForbiddenRoleFromPrincipal(
|
|
1715
|
+
revokeForbiddenRoleFromPrincipal(orgId: string, revokeForbiddenRoleRequestBody?: RevokeForbiddenRoleRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RevokeRoleSuccessResponse, any>>;
|
|
1824
1716
|
/**
|
|
1825
1717
|
* Revokes a specified role from a given principal (user, group, etc.)
|
|
1826
1718
|
* @summary Revoke Role from Principal
|
|
1827
|
-
* @param {
|
|
1719
|
+
* @param {string} orgId
|
|
1720
|
+
* @param {RevokeRoleRequestBody} [revokeRoleRequestBody]
|
|
1828
1721
|
* @param {*} [options] Override http request option.
|
|
1829
1722
|
* @throws {RequiredError}
|
|
1830
1723
|
* @memberof RoleAssignmentApi
|
|
1831
1724
|
*/
|
|
1832
|
-
revokeRoleFromPrincipal(
|
|
1725
|
+
revokeRoleFromPrincipal(orgId: string, revokeRoleRequestBody?: RevokeRoleRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<RevokeRoleSuccessResponse, any>>;
|
|
1833
1726
|
}
|
|
1834
1727
|
/**
|
|
1835
1728
|
* UserPermissionsApi - axios parameter creator
|
|
@@ -1885,52 +1778,21 @@ export declare const UserPermissionsApiFactory: (configuration?: Configuration,
|
|
|
1885
1778
|
/**
|
|
1886
1779
|
* List the available permissions for the current user
|
|
1887
1780
|
* @summary List Own Permissions
|
|
1888
|
-
* @param {
|
|
1781
|
+
* @param {string} orgId
|
|
1889
1782
|
* @param {*} [options] Override http request option.
|
|
1890
1783
|
* @throws {RequiredError}
|
|
1891
1784
|
*/
|
|
1892
|
-
listOwnPermissions(
|
|
1785
|
+
listOwnPermissions(orgId: string, options?: RawAxiosRequestConfig): AxiosPromise<GetUserPermissionsSuccessResponse>;
|
|
1893
1786
|
/**
|
|
1894
1787
|
* List the available permissions for a given user
|
|
1895
1788
|
* @summary List User Permissions
|
|
1896
|
-
* @param {
|
|
1789
|
+
* @param {string} orgId
|
|
1790
|
+
* @param {string} userId
|
|
1897
1791
|
* @param {*} [options] Override http request option.
|
|
1898
1792
|
* @throws {RequiredError}
|
|
1899
1793
|
*/
|
|
1900
|
-
listUserPermissions(
|
|
1794
|
+
listUserPermissions(orgId: string, userId: string, options?: RawAxiosRequestConfig): AxiosPromise<GetUserPermissionsSuccessResponse>;
|
|
1901
1795
|
};
|
|
1902
|
-
/**
|
|
1903
|
-
* Request parameters for listOwnPermissions operation in UserPermissionsApi.
|
|
1904
|
-
* @export
|
|
1905
|
-
* @interface UserPermissionsApiListOwnPermissionsRequest
|
|
1906
|
-
*/
|
|
1907
|
-
export interface UserPermissionsApiListOwnPermissionsRequest {
|
|
1908
|
-
/**
|
|
1909
|
-
*
|
|
1910
|
-
* @type {string}
|
|
1911
|
-
* @memberof UserPermissionsApiListOwnPermissions
|
|
1912
|
-
*/
|
|
1913
|
-
readonly orgId: string;
|
|
1914
|
-
}
|
|
1915
|
-
/**
|
|
1916
|
-
* Request parameters for listUserPermissions operation in UserPermissionsApi.
|
|
1917
|
-
* @export
|
|
1918
|
-
* @interface UserPermissionsApiListUserPermissionsRequest
|
|
1919
|
-
*/
|
|
1920
|
-
export interface UserPermissionsApiListUserPermissionsRequest {
|
|
1921
|
-
/**
|
|
1922
|
-
*
|
|
1923
|
-
* @type {string}
|
|
1924
|
-
* @memberof UserPermissionsApiListUserPermissions
|
|
1925
|
-
*/
|
|
1926
|
-
readonly orgId: string;
|
|
1927
|
-
/**
|
|
1928
|
-
*
|
|
1929
|
-
* @type {string}
|
|
1930
|
-
* @memberof UserPermissionsApiListUserPermissions
|
|
1931
|
-
*/
|
|
1932
|
-
readonly userId: string;
|
|
1933
|
-
}
|
|
1934
1796
|
/**
|
|
1935
1797
|
* UserPermissionsApi - object-oriented interface
|
|
1936
1798
|
* @export
|
|
@@ -1941,19 +1803,20 @@ export declare class UserPermissionsApi extends BaseAPI {
|
|
|
1941
1803
|
/**
|
|
1942
1804
|
* List the available permissions for the current user
|
|
1943
1805
|
* @summary List Own Permissions
|
|
1944
|
-
* @param {
|
|
1806
|
+
* @param {string} orgId
|
|
1945
1807
|
* @param {*} [options] Override http request option.
|
|
1946
1808
|
* @throws {RequiredError}
|
|
1947
1809
|
* @memberof UserPermissionsApi
|
|
1948
1810
|
*/
|
|
1949
|
-
listOwnPermissions(
|
|
1811
|
+
listOwnPermissions(orgId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetUserPermissionsSuccessResponse, any>>;
|
|
1950
1812
|
/**
|
|
1951
1813
|
* List the available permissions for a given user
|
|
1952
1814
|
* @summary List User Permissions
|
|
1953
|
-
* @param {
|
|
1815
|
+
* @param {string} orgId
|
|
1816
|
+
* @param {string} userId
|
|
1954
1817
|
* @param {*} [options] Override http request option.
|
|
1955
1818
|
* @throws {RequiredError}
|
|
1956
1819
|
* @memberof UserPermissionsApi
|
|
1957
1820
|
*/
|
|
1958
|
-
listUserPermissions(
|
|
1821
|
+
listUserPermissions(orgId: string, userId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetUserPermissionsSuccessResponse, any>>;
|
|
1959
1822
|
}
|
package/dist/api.js
CHANGED
|
@@ -903,13 +903,12 @@ var AuthenticationApiFactory = function (configuration, basePath, axios) {
|
|
|
903
903
|
/**
|
|
904
904
|
* Authenticate and authorize a user to perform an action
|
|
905
905
|
* @summary Authenticate and authorize Request
|
|
906
|
-
* @param {
|
|
906
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
907
907
|
* @param {*} [options] Override http request option.
|
|
908
908
|
* @throws {RequiredError}
|
|
909
909
|
*/
|
|
910
|
-
authenticateAndAuthorize: function (
|
|
911
|
-
|
|
912
|
-
return localVarFp.authenticateAndAuthorize(requestParameters.authenticateAndAuthorizeRequest, options).then(function (request) { return request(axios, basePath); });
|
|
910
|
+
authenticateAndAuthorize: function (authenticateAndAuthorizeRequest, options) {
|
|
911
|
+
return localVarFp.authenticateAndAuthorize(authenticateAndAuthorizeRequest, options).then(function (request) { return request(axios, basePath); });
|
|
913
912
|
},
|
|
914
913
|
};
|
|
915
914
|
};
|
|
@@ -928,15 +927,14 @@ var AuthenticationApi = /** @class */ (function (_super) {
|
|
|
928
927
|
/**
|
|
929
928
|
* Authenticate and authorize a user to perform an action
|
|
930
929
|
* @summary Authenticate and authorize Request
|
|
931
|
-
* @param {
|
|
930
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
932
931
|
* @param {*} [options] Override http request option.
|
|
933
932
|
* @throws {RequiredError}
|
|
934
933
|
* @memberof AuthenticationApi
|
|
935
934
|
*/
|
|
936
|
-
AuthenticationApi.prototype.authenticateAndAuthorize = function (
|
|
935
|
+
AuthenticationApi.prototype.authenticateAndAuthorize = function (authenticateAndAuthorizeRequest, options) {
|
|
937
936
|
var _this = this;
|
|
938
|
-
|
|
939
|
-
return (0, exports.AuthenticationApiFp)(this.configuration).authenticateAndAuthorize(requestParameters.authenticateAndAuthorizeRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
937
|
+
return (0, exports.AuthenticationApiFp)(this.configuration).authenticateAndAuthorize(authenticateAndAuthorizeRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
940
938
|
};
|
|
941
939
|
return AuthenticationApi;
|
|
942
940
|
}(base_1.BaseAPI));
|
|
@@ -1105,24 +1103,22 @@ var AuthorizationApiFactory = function (configuration, basePath, axios) {
|
|
|
1105
1103
|
/**
|
|
1106
1104
|
* Authenticate and authorize a user to perform an action
|
|
1107
1105
|
* @summary Authenticate and authorize Request
|
|
1108
|
-
* @param {
|
|
1106
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
1109
1107
|
* @param {*} [options] Override http request option.
|
|
1110
1108
|
* @throws {RequiredError}
|
|
1111
1109
|
*/
|
|
1112
|
-
authenticateAndAuthorize: function (
|
|
1113
|
-
|
|
1114
|
-
return localVarFp.authenticateAndAuthorize(requestParameters.authenticateAndAuthorizeRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1110
|
+
authenticateAndAuthorize: function (authenticateAndAuthorizeRequest, options) {
|
|
1111
|
+
return localVarFp.authenticateAndAuthorize(authenticateAndAuthorizeRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1115
1112
|
},
|
|
1116
1113
|
/**
|
|
1117
1114
|
* Check if a user is authorized to perform an action
|
|
1118
1115
|
* @summary Authorize Request
|
|
1119
|
-
* @param {
|
|
1116
|
+
* @param {AuthorizationRequest} [authorizationRequest]
|
|
1120
1117
|
* @param {*} [options] Override http request option.
|
|
1121
1118
|
* @throws {RequiredError}
|
|
1122
1119
|
*/
|
|
1123
|
-
authorize: function (
|
|
1124
|
-
|
|
1125
|
-
return localVarFp.authorize(requestParameters.authorizationRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1120
|
+
authorize: function (authorizationRequest, options) {
|
|
1121
|
+
return localVarFp.authorize(authorizationRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1126
1122
|
},
|
|
1127
1123
|
};
|
|
1128
1124
|
};
|
|
@@ -1141,28 +1137,26 @@ var AuthorizationApi = /** @class */ (function (_super) {
|
|
|
1141
1137
|
/**
|
|
1142
1138
|
* Authenticate and authorize a user to perform an action
|
|
1143
1139
|
* @summary Authenticate and authorize Request
|
|
1144
|
-
* @param {
|
|
1140
|
+
* @param {AuthenticateAndAuthorizeRequest} [authenticateAndAuthorizeRequest]
|
|
1145
1141
|
* @param {*} [options] Override http request option.
|
|
1146
1142
|
* @throws {RequiredError}
|
|
1147
1143
|
* @memberof AuthorizationApi
|
|
1148
1144
|
*/
|
|
1149
|
-
AuthorizationApi.prototype.authenticateAndAuthorize = function (
|
|
1145
|
+
AuthorizationApi.prototype.authenticateAndAuthorize = function (authenticateAndAuthorizeRequest, options) {
|
|
1150
1146
|
var _this = this;
|
|
1151
|
-
|
|
1152
|
-
return (0, exports.AuthorizationApiFp)(this.configuration).authenticateAndAuthorize(requestParameters.authenticateAndAuthorizeRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1147
|
+
return (0, exports.AuthorizationApiFp)(this.configuration).authenticateAndAuthorize(authenticateAndAuthorizeRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1153
1148
|
};
|
|
1154
1149
|
/**
|
|
1155
1150
|
* Check if a user is authorized to perform an action
|
|
1156
1151
|
* @summary Authorize Request
|
|
1157
|
-
* @param {
|
|
1152
|
+
* @param {AuthorizationRequest} [authorizationRequest]
|
|
1158
1153
|
* @param {*} [options] Override http request option.
|
|
1159
1154
|
* @throws {RequiredError}
|
|
1160
1155
|
* @memberof AuthorizationApi
|
|
1161
1156
|
*/
|
|
1162
|
-
AuthorizationApi.prototype.authorize = function (
|
|
1157
|
+
AuthorizationApi.prototype.authorize = function (authorizationRequest, options) {
|
|
1163
1158
|
var _this = this;
|
|
1164
|
-
|
|
1165
|
-
return (0, exports.AuthorizationApiFp)(this.configuration).authorize(requestParameters.authorizationRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1159
|
+
return (0, exports.AuthorizationApiFp)(this.configuration).authorize(authorizationRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1166
1160
|
};
|
|
1167
1161
|
return AuthorizationApi;
|
|
1168
1162
|
}(base_1.BaseAPI));
|
|
@@ -1612,42 +1606,46 @@ var RoleAssignmentApiFactory = function (configuration, basePath, axios) {
|
|
|
1612
1606
|
/**
|
|
1613
1607
|
* Assigns a specified role to a given principal (user, group, etc.)
|
|
1614
1608
|
* @summary Assign Role to Principal
|
|
1615
|
-
* @param {
|
|
1609
|
+
* @param {string} orgId
|
|
1610
|
+
* @param {AssignRoleRequestBody} [assignRoleRequestBody]
|
|
1616
1611
|
* @param {*} [options] Override http request option.
|
|
1617
1612
|
* @throws {RequiredError}
|
|
1618
1613
|
*/
|
|
1619
|
-
assignRoleToPrincipal: function (
|
|
1620
|
-
return localVarFp.assignRoleToPrincipal(
|
|
1614
|
+
assignRoleToPrincipal: function (orgId, assignRoleRequestBody, options) {
|
|
1615
|
+
return localVarFp.assignRoleToPrincipal(orgId, assignRoleRequestBody, options).then(function (request) { return request(axios, basePath); });
|
|
1621
1616
|
},
|
|
1622
1617
|
/**
|
|
1623
1618
|
* Get the active roles for a given principal
|
|
1624
1619
|
* @summary Get Principal Roles
|
|
1625
|
-
* @param {
|
|
1620
|
+
* @param {string} orgId
|
|
1621
|
+
* @param {GetPrincipalRolesRequestBody} [getPrincipalRolesRequestBody]
|
|
1626
1622
|
* @param {*} [options] Override http request option.
|
|
1627
1623
|
* @throws {RequiredError}
|
|
1628
1624
|
*/
|
|
1629
|
-
getPrincipalRoles: function (
|
|
1630
|
-
return localVarFp.getPrincipalRoles(
|
|
1625
|
+
getPrincipalRoles: function (orgId, getPrincipalRolesRequestBody, options) {
|
|
1626
|
+
return localVarFp.getPrincipalRoles(orgId, getPrincipalRolesRequestBody, options).then(function (request) { return request(axios, basePath); });
|
|
1631
1627
|
},
|
|
1632
1628
|
/**
|
|
1633
1629
|
* Revokes a forbidden role from a given principal (user, group, etc.)
|
|
1634
1630
|
* @summary Revoke Forbidden Role from Principal
|
|
1635
|
-
* @param {
|
|
1631
|
+
* @param {string} orgId
|
|
1632
|
+
* @param {RevokeForbiddenRoleRequestBody} [revokeForbiddenRoleRequestBody]
|
|
1636
1633
|
* @param {*} [options] Override http request option.
|
|
1637
1634
|
* @throws {RequiredError}
|
|
1638
1635
|
*/
|
|
1639
|
-
revokeForbiddenRoleFromPrincipal: function (
|
|
1640
|
-
return localVarFp.revokeForbiddenRoleFromPrincipal(
|
|
1636
|
+
revokeForbiddenRoleFromPrincipal: function (orgId, revokeForbiddenRoleRequestBody, options) {
|
|
1637
|
+
return localVarFp.revokeForbiddenRoleFromPrincipal(orgId, revokeForbiddenRoleRequestBody, options).then(function (request) { return request(axios, basePath); });
|
|
1641
1638
|
},
|
|
1642
1639
|
/**
|
|
1643
1640
|
* Revokes a specified role from a given principal (user, group, etc.)
|
|
1644
1641
|
* @summary Revoke Role from Principal
|
|
1645
|
-
* @param {
|
|
1642
|
+
* @param {string} orgId
|
|
1643
|
+
* @param {RevokeRoleRequestBody} [revokeRoleRequestBody]
|
|
1646
1644
|
* @param {*} [options] Override http request option.
|
|
1647
1645
|
* @throws {RequiredError}
|
|
1648
1646
|
*/
|
|
1649
|
-
revokeRoleFromPrincipal: function (
|
|
1650
|
-
return localVarFp.revokeRoleFromPrincipal(
|
|
1647
|
+
revokeRoleFromPrincipal: function (orgId, revokeRoleRequestBody, options) {
|
|
1648
|
+
return localVarFp.revokeRoleFromPrincipal(orgId, revokeRoleRequestBody, options).then(function (request) { return request(axios, basePath); });
|
|
1651
1649
|
},
|
|
1652
1650
|
};
|
|
1653
1651
|
};
|
|
@@ -1666,50 +1664,54 @@ var RoleAssignmentApi = /** @class */ (function (_super) {
|
|
|
1666
1664
|
/**
|
|
1667
1665
|
* Assigns a specified role to a given principal (user, group, etc.)
|
|
1668
1666
|
* @summary Assign Role to Principal
|
|
1669
|
-
* @param {
|
|
1667
|
+
* @param {string} orgId
|
|
1668
|
+
* @param {AssignRoleRequestBody} [assignRoleRequestBody]
|
|
1670
1669
|
* @param {*} [options] Override http request option.
|
|
1671
1670
|
* @throws {RequiredError}
|
|
1672
1671
|
* @memberof RoleAssignmentApi
|
|
1673
1672
|
*/
|
|
1674
|
-
RoleAssignmentApi.prototype.assignRoleToPrincipal = function (
|
|
1673
|
+
RoleAssignmentApi.prototype.assignRoleToPrincipal = function (orgId, assignRoleRequestBody, options) {
|
|
1675
1674
|
var _this = this;
|
|
1676
|
-
return (0, exports.RoleAssignmentApiFp)(this.configuration).assignRoleToPrincipal(
|
|
1675
|
+
return (0, exports.RoleAssignmentApiFp)(this.configuration).assignRoleToPrincipal(orgId, assignRoleRequestBody, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1677
1676
|
};
|
|
1678
1677
|
/**
|
|
1679
1678
|
* Get the active roles for a given principal
|
|
1680
1679
|
* @summary Get Principal Roles
|
|
1681
|
-
* @param {
|
|
1680
|
+
* @param {string} orgId
|
|
1681
|
+
* @param {GetPrincipalRolesRequestBody} [getPrincipalRolesRequestBody]
|
|
1682
1682
|
* @param {*} [options] Override http request option.
|
|
1683
1683
|
* @throws {RequiredError}
|
|
1684
1684
|
* @memberof RoleAssignmentApi
|
|
1685
1685
|
*/
|
|
1686
|
-
RoleAssignmentApi.prototype.getPrincipalRoles = function (
|
|
1686
|
+
RoleAssignmentApi.prototype.getPrincipalRoles = function (orgId, getPrincipalRolesRequestBody, options) {
|
|
1687
1687
|
var _this = this;
|
|
1688
|
-
return (0, exports.RoleAssignmentApiFp)(this.configuration).getPrincipalRoles(
|
|
1688
|
+
return (0, exports.RoleAssignmentApiFp)(this.configuration).getPrincipalRoles(orgId, getPrincipalRolesRequestBody, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1689
1689
|
};
|
|
1690
1690
|
/**
|
|
1691
1691
|
* Revokes a forbidden role from a given principal (user, group, etc.)
|
|
1692
1692
|
* @summary Revoke Forbidden Role from Principal
|
|
1693
|
-
* @param {
|
|
1693
|
+
* @param {string} orgId
|
|
1694
|
+
* @param {RevokeForbiddenRoleRequestBody} [revokeForbiddenRoleRequestBody]
|
|
1694
1695
|
* @param {*} [options] Override http request option.
|
|
1695
1696
|
* @throws {RequiredError}
|
|
1696
1697
|
* @memberof RoleAssignmentApi
|
|
1697
1698
|
*/
|
|
1698
|
-
RoleAssignmentApi.prototype.revokeForbiddenRoleFromPrincipal = function (
|
|
1699
|
+
RoleAssignmentApi.prototype.revokeForbiddenRoleFromPrincipal = function (orgId, revokeForbiddenRoleRequestBody, options) {
|
|
1699
1700
|
var _this = this;
|
|
1700
|
-
return (0, exports.RoleAssignmentApiFp)(this.configuration).revokeForbiddenRoleFromPrincipal(
|
|
1701
|
+
return (0, exports.RoleAssignmentApiFp)(this.configuration).revokeForbiddenRoleFromPrincipal(orgId, revokeForbiddenRoleRequestBody, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1701
1702
|
};
|
|
1702
1703
|
/**
|
|
1703
1704
|
* Revokes a specified role from a given principal (user, group, etc.)
|
|
1704
1705
|
* @summary Revoke Role from Principal
|
|
1705
|
-
* @param {
|
|
1706
|
+
* @param {string} orgId
|
|
1707
|
+
* @param {RevokeRoleRequestBody} [revokeRoleRequestBody]
|
|
1706
1708
|
* @param {*} [options] Override http request option.
|
|
1707
1709
|
* @throws {RequiredError}
|
|
1708
1710
|
* @memberof RoleAssignmentApi
|
|
1709
1711
|
*/
|
|
1710
|
-
RoleAssignmentApi.prototype.revokeRoleFromPrincipal = function (
|
|
1712
|
+
RoleAssignmentApi.prototype.revokeRoleFromPrincipal = function (orgId, revokeRoleRequestBody, options) {
|
|
1711
1713
|
var _this = this;
|
|
1712
|
-
return (0, exports.RoleAssignmentApiFp)(this.configuration).revokeRoleFromPrincipal(
|
|
1714
|
+
return (0, exports.RoleAssignmentApiFp)(this.configuration).revokeRoleFromPrincipal(orgId, revokeRoleRequestBody, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1713
1715
|
};
|
|
1714
1716
|
return RoleAssignmentApi;
|
|
1715
1717
|
}(base_1.BaseAPI));
|
|
@@ -1885,22 +1887,23 @@ var UserPermissionsApiFactory = function (configuration, basePath, axios) {
|
|
|
1885
1887
|
/**
|
|
1886
1888
|
* List the available permissions for the current user
|
|
1887
1889
|
* @summary List Own Permissions
|
|
1888
|
-
* @param {
|
|
1890
|
+
* @param {string} orgId
|
|
1889
1891
|
* @param {*} [options] Override http request option.
|
|
1890
1892
|
* @throws {RequiredError}
|
|
1891
1893
|
*/
|
|
1892
|
-
listOwnPermissions: function (
|
|
1893
|
-
return localVarFp.listOwnPermissions(
|
|
1894
|
+
listOwnPermissions: function (orgId, options) {
|
|
1895
|
+
return localVarFp.listOwnPermissions(orgId, options).then(function (request) { return request(axios, basePath); });
|
|
1894
1896
|
},
|
|
1895
1897
|
/**
|
|
1896
1898
|
* List the available permissions for a given user
|
|
1897
1899
|
* @summary List User Permissions
|
|
1898
|
-
* @param {
|
|
1900
|
+
* @param {string} orgId
|
|
1901
|
+
* @param {string} userId
|
|
1899
1902
|
* @param {*} [options] Override http request option.
|
|
1900
1903
|
* @throws {RequiredError}
|
|
1901
1904
|
*/
|
|
1902
|
-
listUserPermissions: function (
|
|
1903
|
-
return localVarFp.listUserPermissions(
|
|
1905
|
+
listUserPermissions: function (orgId, userId, options) {
|
|
1906
|
+
return localVarFp.listUserPermissions(orgId, userId, options).then(function (request) { return request(axios, basePath); });
|
|
1904
1907
|
},
|
|
1905
1908
|
};
|
|
1906
1909
|
};
|
|
@@ -1919,26 +1922,27 @@ var UserPermissionsApi = /** @class */ (function (_super) {
|
|
|
1919
1922
|
/**
|
|
1920
1923
|
* List the available permissions for the current user
|
|
1921
1924
|
* @summary List Own Permissions
|
|
1922
|
-
* @param {
|
|
1925
|
+
* @param {string} orgId
|
|
1923
1926
|
* @param {*} [options] Override http request option.
|
|
1924
1927
|
* @throws {RequiredError}
|
|
1925
1928
|
* @memberof UserPermissionsApi
|
|
1926
1929
|
*/
|
|
1927
|
-
UserPermissionsApi.prototype.listOwnPermissions = function (
|
|
1930
|
+
UserPermissionsApi.prototype.listOwnPermissions = function (orgId, options) {
|
|
1928
1931
|
var _this = this;
|
|
1929
|
-
return (0, exports.UserPermissionsApiFp)(this.configuration).listOwnPermissions(
|
|
1932
|
+
return (0, exports.UserPermissionsApiFp)(this.configuration).listOwnPermissions(orgId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1930
1933
|
};
|
|
1931
1934
|
/**
|
|
1932
1935
|
* List the available permissions for a given user
|
|
1933
1936
|
* @summary List User Permissions
|
|
1934
|
-
* @param {
|
|
1937
|
+
* @param {string} orgId
|
|
1938
|
+
* @param {string} userId
|
|
1935
1939
|
* @param {*} [options] Override http request option.
|
|
1936
1940
|
* @throws {RequiredError}
|
|
1937
1941
|
* @memberof UserPermissionsApi
|
|
1938
1942
|
*/
|
|
1939
|
-
UserPermissionsApi.prototype.listUserPermissions = function (
|
|
1943
|
+
UserPermissionsApi.prototype.listUserPermissions = function (orgId, userId, options) {
|
|
1940
1944
|
var _this = this;
|
|
1941
|
-
return (0, exports.UserPermissionsApiFp)(this.configuration).listUserPermissions(
|
|
1945
|
+
return (0, exports.UserPermissionsApiFp)(this.configuration).listUserPermissions(orgId, userId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1942
1946
|
};
|
|
1943
1947
|
return UserPermissionsApi;
|
|
1944
1948
|
}(base_1.BaseAPI));
|
package/dist/configuration.js
CHANGED
|
@@ -36,7 +36,7 @@ var Configuration = /** @class */ (function () {
|
|
|
36
36
|
this.serverIndex = param.serverIndex;
|
|
37
37
|
var extraHeaders = param.useDefaultUserAgent ? {} : {
|
|
38
38
|
headers: {
|
|
39
|
-
"user-agent": "Flipdish authorization typescript SDK / 0.0.
|
|
39
|
+
"user-agent": "Flipdish authorization typescript SDK / 0.0.3-rc.1756733706"
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
this.baseOptions = __assign(__assign({}, extraHeaders), param.baseOptions);
|