@flowcore/cli-plugin-iam 1.3.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +32 -5
- package/dist/commands/edit/policy.d.ts +16 -0
- package/dist/commands/edit/policy.js +118 -0
- package/dist/commands/get/policy.js +5 -2
- package/dist/commands/get/role.js +1 -0
- package/dist/utils/clients/iam/Api.d.ts +757 -189
- package/dist/utils/clients/iam/Api.js +717 -189
- package/dist/utils/clients/iam/Health.d.ts +1 -0
- package/dist/utils/clients/iam/Health.js +1 -0
- package/dist/utils/clients/iam/Transformers.d.ts +92 -28
- package/dist/utils/clients/iam/Transformers.js +92 -28
- package/dist/utils/clients/iam/http-client.d.ts +2 -2
- package/dist/utils/clients/iam/http-client.js +18 -6
- package/oclif.manifest.json +49 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export declare class Health<SecurityDataType = unknown> extends HttpClient<Secur
|
|
|
5
5
|
*
|
|
6
6
|
* @name GetHealth
|
|
7
7
|
* @request GET:/health/
|
|
8
|
+
* @response `200` `void`
|
|
8
9
|
*/
|
|
9
10
|
getHealth: (params?: RequestParams) => Promise<import("./http-client.js").HttpResponse<void, any>>;
|
|
10
11
|
}
|
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
import { HttpClient, type RequestParams } from "./http-client.js";
|
|
2
2
|
export declare class Transformers<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
* No description
|
|
5
|
+
*
|
|
6
|
+
* @tags transformers
|
|
7
|
+
* @name PostTransformersIam0
|
|
8
|
+
* @request POST:/transformers/iam.0
|
|
9
|
+
* @secure
|
|
10
|
+
* @response `200` `({
|
|
11
|
+
status: "ok",
|
|
12
|
+
statusCode: 200,
|
|
13
|
+
|
|
14
|
+
} | {
|
|
15
|
+
status: "error",
|
|
16
|
+
statusCode: number,
|
|
17
|
+
message: string,
|
|
18
|
+
|
|
19
|
+
} | {
|
|
20
|
+
status: "error",
|
|
21
|
+
statusCode: 400,
|
|
22
|
+
message: string,
|
|
23
|
+
errors?: object,
|
|
24
|
+
|
|
25
|
+
})`
|
|
26
|
+
*/
|
|
11
27
|
postTransformersIam0: (data: {
|
|
12
28
|
eventId: string;
|
|
13
29
|
aggregator: string;
|
|
@@ -30,13 +46,29 @@ export declare class Transformers<SecurityDataType = unknown> extends HttpClient
|
|
|
30
46
|
errors?: object;
|
|
31
47
|
}, any>>;
|
|
32
48
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
* No description
|
|
50
|
+
*
|
|
51
|
+
* @tags transformers
|
|
52
|
+
* @name PostTransformersOrganization0
|
|
53
|
+
* @request POST:/transformers/organization.0
|
|
54
|
+
* @secure
|
|
55
|
+
* @response `200` `({
|
|
56
|
+
status: "ok",
|
|
57
|
+
statusCode: 200,
|
|
58
|
+
|
|
59
|
+
} | {
|
|
60
|
+
status: "error",
|
|
61
|
+
statusCode: number,
|
|
62
|
+
message: string,
|
|
63
|
+
|
|
64
|
+
} | {
|
|
65
|
+
status: "error",
|
|
66
|
+
statusCode: 400,
|
|
67
|
+
message: string,
|
|
68
|
+
errors?: object,
|
|
69
|
+
|
|
70
|
+
})`
|
|
71
|
+
*/
|
|
40
72
|
postTransformersOrganization0: (data: {
|
|
41
73
|
eventId: string;
|
|
42
74
|
aggregator: string;
|
|
@@ -59,13 +91,29 @@ export declare class Transformers<SecurityDataType = unknown> extends HttpClient
|
|
|
59
91
|
errors?: object;
|
|
60
92
|
}, any>>;
|
|
61
93
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
94
|
+
* No description
|
|
95
|
+
*
|
|
96
|
+
* @tags transformers
|
|
97
|
+
* @name PostTransformersUser0
|
|
98
|
+
* @request POST:/transformers/user.0
|
|
99
|
+
* @secure
|
|
100
|
+
* @response `200` `({
|
|
101
|
+
status: "ok",
|
|
102
|
+
statusCode: 200,
|
|
103
|
+
|
|
104
|
+
} | {
|
|
105
|
+
status: "error",
|
|
106
|
+
statusCode: number,
|
|
107
|
+
message: string,
|
|
108
|
+
|
|
109
|
+
} | {
|
|
110
|
+
status: "error",
|
|
111
|
+
statusCode: 400,
|
|
112
|
+
message: string,
|
|
113
|
+
errors?: object,
|
|
114
|
+
|
|
115
|
+
})`
|
|
116
|
+
*/
|
|
69
117
|
postTransformersUser0: (data: {
|
|
70
118
|
eventId: string;
|
|
71
119
|
aggregator: string;
|
|
@@ -88,13 +136,29 @@ export declare class Transformers<SecurityDataType = unknown> extends HttpClient
|
|
|
88
136
|
errors?: object;
|
|
89
137
|
}, any>>;
|
|
90
138
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
139
|
+
* No description
|
|
140
|
+
*
|
|
141
|
+
* @tags transformers
|
|
142
|
+
* @name PostTransformersSecurity0
|
|
143
|
+
* @request POST:/transformers/security.0
|
|
144
|
+
* @secure
|
|
145
|
+
* @response `200` `({
|
|
146
|
+
status: "ok",
|
|
147
|
+
statusCode: 200,
|
|
148
|
+
|
|
149
|
+
} | {
|
|
150
|
+
status: "error",
|
|
151
|
+
statusCode: number,
|
|
152
|
+
message: string,
|
|
153
|
+
|
|
154
|
+
} | {
|
|
155
|
+
status: "error",
|
|
156
|
+
statusCode: 400,
|
|
157
|
+
message: string,
|
|
158
|
+
errors?: object,
|
|
159
|
+
|
|
160
|
+
})`
|
|
161
|
+
*/
|
|
98
162
|
postTransformersSecurity0: (data: {
|
|
99
163
|
eventId: string;
|
|
100
164
|
aggregator: string;
|
|
@@ -11,13 +11,29 @@
|
|
|
11
11
|
import { ContentType, HttpClient } from "./http-client.js";
|
|
12
12
|
export class Transformers extends HttpClient {
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
* No description
|
|
15
|
+
*
|
|
16
|
+
* @tags transformers
|
|
17
|
+
* @name PostTransformersIam0
|
|
18
|
+
* @request POST:/transformers/iam.0
|
|
19
|
+
* @secure
|
|
20
|
+
* @response `200` `({
|
|
21
|
+
status: "ok",
|
|
22
|
+
statusCode: 200,
|
|
23
|
+
|
|
24
|
+
} | {
|
|
25
|
+
status: "error",
|
|
26
|
+
statusCode: number,
|
|
27
|
+
message: string,
|
|
28
|
+
|
|
29
|
+
} | {
|
|
30
|
+
status: "error",
|
|
31
|
+
statusCode: 400,
|
|
32
|
+
message: string,
|
|
33
|
+
errors?: object,
|
|
34
|
+
|
|
35
|
+
})`
|
|
36
|
+
*/
|
|
21
37
|
postTransformersIam0 = (data, params = {}) => this.request({
|
|
22
38
|
path: `/transformers/iam.0`,
|
|
23
39
|
method: "POST",
|
|
@@ -28,13 +44,29 @@ export class Transformers extends HttpClient {
|
|
|
28
44
|
...params,
|
|
29
45
|
});
|
|
30
46
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
* No description
|
|
48
|
+
*
|
|
49
|
+
* @tags transformers
|
|
50
|
+
* @name PostTransformersOrganization0
|
|
51
|
+
* @request POST:/transformers/organization.0
|
|
52
|
+
* @secure
|
|
53
|
+
* @response `200` `({
|
|
54
|
+
status: "ok",
|
|
55
|
+
statusCode: 200,
|
|
56
|
+
|
|
57
|
+
} | {
|
|
58
|
+
status: "error",
|
|
59
|
+
statusCode: number,
|
|
60
|
+
message: string,
|
|
61
|
+
|
|
62
|
+
} | {
|
|
63
|
+
status: "error",
|
|
64
|
+
statusCode: 400,
|
|
65
|
+
message: string,
|
|
66
|
+
errors?: object,
|
|
67
|
+
|
|
68
|
+
})`
|
|
69
|
+
*/
|
|
38
70
|
postTransformersOrganization0 = (data, params = {}) => this.request({
|
|
39
71
|
path: `/transformers/organization.0`,
|
|
40
72
|
method: "POST",
|
|
@@ -45,13 +77,29 @@ export class Transformers extends HttpClient {
|
|
|
45
77
|
...params,
|
|
46
78
|
});
|
|
47
79
|
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
80
|
+
* No description
|
|
81
|
+
*
|
|
82
|
+
* @tags transformers
|
|
83
|
+
* @name PostTransformersUser0
|
|
84
|
+
* @request POST:/transformers/user.0
|
|
85
|
+
* @secure
|
|
86
|
+
* @response `200` `({
|
|
87
|
+
status: "ok",
|
|
88
|
+
statusCode: 200,
|
|
89
|
+
|
|
90
|
+
} | {
|
|
91
|
+
status: "error",
|
|
92
|
+
statusCode: number,
|
|
93
|
+
message: string,
|
|
94
|
+
|
|
95
|
+
} | {
|
|
96
|
+
status: "error",
|
|
97
|
+
statusCode: 400,
|
|
98
|
+
message: string,
|
|
99
|
+
errors?: object,
|
|
100
|
+
|
|
101
|
+
})`
|
|
102
|
+
*/
|
|
55
103
|
postTransformersUser0 = (data, params = {}) => this.request({
|
|
56
104
|
path: `/transformers/user.0`,
|
|
57
105
|
method: "POST",
|
|
@@ -62,13 +110,29 @@ export class Transformers extends HttpClient {
|
|
|
62
110
|
...params,
|
|
63
111
|
});
|
|
64
112
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
113
|
+
* No description
|
|
114
|
+
*
|
|
115
|
+
* @tags transformers
|
|
116
|
+
* @name PostTransformersSecurity0
|
|
117
|
+
* @request POST:/transformers/security.0
|
|
118
|
+
* @secure
|
|
119
|
+
* @response `200` `({
|
|
120
|
+
status: "ok",
|
|
121
|
+
statusCode: 200,
|
|
122
|
+
|
|
123
|
+
} | {
|
|
124
|
+
status: "error",
|
|
125
|
+
statusCode: number,
|
|
126
|
+
message: string,
|
|
127
|
+
|
|
128
|
+
} | {
|
|
129
|
+
status: "error",
|
|
130
|
+
statusCode: 400,
|
|
131
|
+
message: string,
|
|
132
|
+
errors?: object,
|
|
133
|
+
|
|
134
|
+
})`
|
|
135
|
+
*/
|
|
72
136
|
postTransformersSecurity0 = (data, params = {}) => this.request({
|
|
73
137
|
path: `/transformers/security.0`,
|
|
74
138
|
method: "POST",
|
|
@@ -25,11 +25,11 @@ export interface ApiConfig<SecurityDataType = unknown> {
|
|
|
25
25
|
securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
|
|
26
26
|
customFetch?: typeof fetch;
|
|
27
27
|
}
|
|
28
|
-
export interface HttpResponse<D
|
|
28
|
+
export interface HttpResponse<D, E = unknown> extends Response {
|
|
29
29
|
data: D;
|
|
30
30
|
error: E;
|
|
31
31
|
}
|
|
32
|
-
type CancelToken =
|
|
32
|
+
type CancelToken = symbol | string | number;
|
|
33
33
|
export declare enum ContentType {
|
|
34
34
|
Json = "application/json",
|
|
35
35
|
FormData = "multipart/form-data",
|
|
@@ -48,7 +48,9 @@ export class HttpClient {
|
|
|
48
48
|
const query = rawQuery || {};
|
|
49
49
|
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
|
|
50
50
|
return keys
|
|
51
|
-
.map((key) =>
|
|
51
|
+
.map((key) => Array.isArray(query[key])
|
|
52
|
+
? this.addArrayQueryParam(query, key)
|
|
53
|
+
: this.addQueryParam(query, key))
|
|
52
54
|
.join("&");
|
|
53
55
|
}
|
|
54
56
|
addQueryParams(rawQuery) {
|
|
@@ -56,8 +58,12 @@ export class HttpClient {
|
|
|
56
58
|
return queryString ? `?${queryString}` : "";
|
|
57
59
|
}
|
|
58
60
|
contentFormatters = {
|
|
59
|
-
[ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string")
|
|
60
|
-
|
|
61
|
+
[ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string")
|
|
62
|
+
? JSON.stringify(input)
|
|
63
|
+
: input,
|
|
64
|
+
[ContentType.Text]: (input) => input !== null && typeof input !== "string"
|
|
65
|
+
? JSON.stringify(input)
|
|
66
|
+
: input,
|
|
61
67
|
[ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => {
|
|
62
68
|
const property = input[key];
|
|
63
69
|
formData.append(key, property instanceof Blob
|
|
@@ -113,10 +119,16 @@ export class HttpClient {
|
|
|
113
119
|
...requestParams,
|
|
114
120
|
headers: {
|
|
115
121
|
...(requestParams.headers || {}),
|
|
116
|
-
...(type && type !== ContentType.FormData
|
|
122
|
+
...(type && type !== ContentType.FormData
|
|
123
|
+
? { "Content-Type": type }
|
|
124
|
+
: {}),
|
|
117
125
|
},
|
|
118
|
-
signal: (cancelToken
|
|
119
|
-
|
|
126
|
+
signal: (cancelToken
|
|
127
|
+
? this.createAbortSignal(cancelToken)
|
|
128
|
+
: requestParams.signal) || null,
|
|
129
|
+
body: typeof body === "undefined" || body === null
|
|
130
|
+
? null
|
|
131
|
+
: payloadFormatter(body),
|
|
120
132
|
}).then(async (response) => {
|
|
121
133
|
const r = response.clone();
|
|
122
134
|
r.data = null;
|
package/oclif.manifest.json
CHANGED
|
@@ -243,7 +243,55 @@
|
|
|
243
243
|
"get",
|
|
244
244
|
"role.js"
|
|
245
245
|
]
|
|
246
|
+
},
|
|
247
|
+
"edit:policy": {
|
|
248
|
+
"aliases": [],
|
|
249
|
+
"args": {
|
|
250
|
+
"NAME": {
|
|
251
|
+
"description": "name",
|
|
252
|
+
"name": "NAME",
|
|
253
|
+
"required": true
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"description": "Edit a policy in your preferred editor",
|
|
257
|
+
"examples": [
|
|
258
|
+
"$ flowcore iam edit policy my-policy -t my-tenant",
|
|
259
|
+
"$ FC_EDITOR=code flowcore iam edit policy my-policy -t my-tenant"
|
|
260
|
+
],
|
|
261
|
+
"flags": {
|
|
262
|
+
"profile": {
|
|
263
|
+
"description": "Specify the configuration profile to use",
|
|
264
|
+
"name": "profile",
|
|
265
|
+
"hasDynamicHelp": false,
|
|
266
|
+
"multiple": false,
|
|
267
|
+
"type": "option"
|
|
268
|
+
},
|
|
269
|
+
"tenant": {
|
|
270
|
+
"char": "t",
|
|
271
|
+
"description": "tenant",
|
|
272
|
+
"name": "tenant",
|
|
273
|
+
"required": true,
|
|
274
|
+
"hasDynamicHelp": false,
|
|
275
|
+
"multiple": false,
|
|
276
|
+
"type": "option"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"hasDynamicHelp": false,
|
|
280
|
+
"hiddenAliases": [],
|
|
281
|
+
"id": "edit:policy",
|
|
282
|
+
"pluginAlias": "@flowcore/cli-plugin-iam",
|
|
283
|
+
"pluginName": "@flowcore/cli-plugin-iam",
|
|
284
|
+
"pluginType": "core",
|
|
285
|
+
"strict": true,
|
|
286
|
+
"enableJsonFlag": false,
|
|
287
|
+
"isESM": true,
|
|
288
|
+
"relativePath": [
|
|
289
|
+
"dist",
|
|
290
|
+
"commands",
|
|
291
|
+
"edit",
|
|
292
|
+
"policy.js"
|
|
293
|
+
]
|
|
246
294
|
}
|
|
247
295
|
},
|
|
248
|
-
"version": "1.
|
|
296
|
+
"version": "1.5.0"
|
|
249
297
|
}
|
package/package.json
CHANGED
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"version": "oclif readme && git add README.md",
|
|
92
92
|
"update-schema": "rover graph introspect https://graph.api.flowcore.io/graphql -o schema.gql"
|
|
93
93
|
},
|
|
94
|
-
"version": "1.
|
|
94
|
+
"version": "1.5.0",
|
|
95
95
|
"bugs": "https://github.com/flowcore-io/cli-plugin-iam/issues",
|
|
96
96
|
"keywords": [
|
|
97
97
|
"oclif"
|