@openshift-assisted/types 2.25.4 → 2.27.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.
@@ -1,3 +1,62 @@
1
- export interface AccessTokenCfg {
2
- auths: Record<string, Record<'email' | 'auth', string>>;
1
+ export interface ObjectReference {
2
+ href?: string;
3
+ id?: string;
4
+ kind?: string;
3
5
  }
6
+
7
+ export type AccessTokenCfg = {
8
+ auths: Record<string, Record<'email' | 'auth', string>>;
9
+ };
10
+
11
+ export type Account = ObjectReference & {
12
+ ban_code?: string;
13
+ ban_description?: string;
14
+ banned?: boolean;
15
+ capabilities?: Array<Capability>;
16
+ created_at?: string;
17
+ email?: string;
18
+ first_name?: string;
19
+ labels?: Array<Label>;
20
+ last_name?: string;
21
+ organization?: Organization;
22
+ organization_id?: string;
23
+ rhit_account_id?: string;
24
+ rhit_web_user_id?: string;
25
+ service_account?: boolean;
26
+ updated_at?: string;
27
+ username: string;
28
+ };
29
+
30
+ export type Organization = ObjectReference & {
31
+ capabilities?: Array<Capability>;
32
+ created_at?: string;
33
+ ebs_account_id?: string;
34
+ external_id?: string;
35
+ labels?: Array<Label>;
36
+ name?: string;
37
+ updated_at?: string;
38
+ };
39
+
40
+ export type Capability = ObjectReference & {
41
+ inherited: boolean;
42
+ name: string;
43
+ value: string;
44
+ };
45
+
46
+ export type Label = ObjectReference & {
47
+ account_id?: string;
48
+ created_at?: string;
49
+ internal: boolean;
50
+ key: string;
51
+ organization_id?: string;
52
+ subscription_id?: string;
53
+ type?: string;
54
+ updated_at?: string;
55
+ value: string;
56
+ };
57
+
58
+ export type ApiError = ObjectReference & {
59
+ code?: string;
60
+ operation_id?: string;
61
+ reason?: string;
62
+ };
@@ -0,0 +1,145 @@
1
+ export type ObjectReference = {
2
+ href?: string;
3
+ id?: string;
4
+ kind?: string;
5
+ };
6
+
7
+ export type ApiError = ObjectReference & {
8
+ code?: string;
9
+ operation_id?: string;
10
+ reason?: string;
11
+ };
12
+
13
+ export type FeatureReviewResponse = {
14
+ enabled: boolean;
15
+ feature_id: string;
16
+ };
17
+
18
+ export type AccessReviewResponse = {
19
+ account_id?: string;
20
+ action?: AccessReviewResponse.Action;
21
+ allowed: boolean;
22
+ cluster_id?: string;
23
+ cluster_uuid?: string;
24
+ organization_id?: string;
25
+ resource_type?: AccessReviewResponse.ResourceType;
26
+ subscription_id?: string;
27
+ };
28
+
29
+ export namespace AccessReviewResponse {
30
+ export const enum Action {
31
+ GET = 'get',
32
+ LIST = 'list',
33
+ CREATE = 'create',
34
+ DELETE = 'delete',
35
+ UPDATE = 'update',
36
+ }
37
+
38
+ export const enum ResourceType {
39
+ ADD_ON = 'AddOn',
40
+ FLAVOUR = 'Flavour',
41
+ ACCOUNT = 'Account',
42
+ ACCOUNT_POOL = 'AccountPool',
43
+ CLUSTER = 'Cluster',
44
+ PLAN = 'Plan',
45
+ SUBSCRIPTION = 'Subscription',
46
+ ORGANIZATION = 'Organization',
47
+ ROLE = 'Role',
48
+ PERMISSION = 'Permission',
49
+ ROLE_BINDING = 'RoleBinding',
50
+ REGISTRY = 'Registry',
51
+ REGISTRY_CREDENTIAL = 'RegistryCredential',
52
+ CURRENT_ACCOUNT = 'CurrentAccount',
53
+ ACCESS_REVIEW = 'AccessReview',
54
+ SELF_ACCCESS_REVIEW = 'SelfAcccessReview',
55
+ RESOURCE_REVIEW = 'ResourceReview',
56
+ SELF_RESOURCE_REVIEW = 'SelfResourceReview',
57
+ CLUSTER_REGISTRATION = 'ClusterRegistration',
58
+ ACCESS_TOKEN = 'AccessToken',
59
+ CLUSTER_AUTHORIZATION = 'ClusterAuthorization',
60
+ SELF_MANAGED_CLUSTER = 'SelfManagedCluster',
61
+ REDHAT_MANAGED_CLUSTER = 'RedhatManagedCluster',
62
+ EXPORT_CONTROL_REVIEW = 'ExportControlReview',
63
+ CLUSTER_LOG = 'ClusterLog',
64
+ CLUSTER_CREDENTIAL = 'ClusterCredential',
65
+ CLUSTER_METRIC = 'ClusterMetric',
66
+ RESOURCE_QUOTA = 'ResourceQuota',
67
+ RESERVED_RESOURCE = 'ReservedResource',
68
+ DASHBOARD = 'Dashboard',
69
+ CLUSTER_PROVIDER_AND_REGION = 'ClusterProviderAndRegion',
70
+ SERVICE_LOG = 'ServiceLog',
71
+ INTERNAL_SERVICE_LOG = 'InternalServiceLog',
72
+ CSLOGS = 'CSLogs',
73
+ SUBSCRIPTION_LABEL = 'SubscriptionLabel',
74
+ ORGANIZATION_LABEL = 'OrganizationLabel',
75
+ SUBSCRIPTION_LABEL_INTERNAL = 'SubscriptionLabelInternal',
76
+ SELF_ACCESS_REVIEW = 'SelfAccessReview',
77
+ SUBSCRIPTION_INTERNAL = 'SubscriptionInternal',
78
+ SUBSCRIPTION_ROLE_BINDING = 'SubscriptionRoleBinding',
79
+ }
80
+ }
81
+
82
+ export type SelfAccessReview = {
83
+ action: SelfAccessReview.Action;
84
+ cluster_id?: string;
85
+ cluster_uuid?: string;
86
+ organization_id?: string;
87
+ resource_type: SelfAccessReview.ResourceType;
88
+ subscription_id?: string;
89
+ };
90
+
91
+ export namespace SelfAccessReview {
92
+ export const enum Action {
93
+ GET = 'get',
94
+ LIST = 'list',
95
+ CREATE = 'create',
96
+ DELETE = 'delete',
97
+ UPDATE = 'update',
98
+ }
99
+
100
+ export const enum ResourceType {
101
+ ADD_ON = 'AddOn',
102
+ FLAVOUR = 'Flavour',
103
+ ACCOUNT = 'Account',
104
+ ACCOUNT_POOL = 'AccountPool',
105
+ CLUSTER = 'Cluster',
106
+ IDP = 'Idp',
107
+ PLAN = 'Plan',
108
+ SUBSCRIPTION = 'Subscription',
109
+ ORGANIZATION = 'Organization',
110
+ ROLE = 'Role',
111
+ PERMISSION = 'Permission',
112
+ ROLE_BINDING = 'RoleBinding',
113
+ REGISTRY = 'Registry',
114
+ REGISTRY_CREDENTIAL = 'RegistryCredential',
115
+ CURRENT_ACCOUNT = 'CurrentAccount',
116
+ ACCESS_REVIEW = 'AccessReview',
117
+ SELF_ACCCESS_REVIEW = 'SelfAcccessReview',
118
+ RESOURCE_REVIEW = 'ResourceReview',
119
+ SELF_RESOURCE_REVIEW = 'SelfResourceReview',
120
+ CLUSTER_REGISTRATION = 'ClusterRegistration',
121
+ ACCESS_TOKEN = 'AccessToken',
122
+ CLUSTER_AUTHORIZATION = 'ClusterAuthorization',
123
+ SELF_MANAGED_CLUSTER = 'SelfManagedCluster',
124
+ REDHAT_MANAGED_CLUSTER = 'RedhatManagedCluster',
125
+ EXPORT_CONTROL_REVIEW = 'ExportControlReview',
126
+ CLUSTER_LOG = 'ClusterLog',
127
+ CLUSTER_CREDENTIAL = 'ClusterCredential',
128
+ CLUSTER_METRIC = 'ClusterMetric',
129
+ CLUSTER_AUTOSCALER = 'ClusterAutoscaler',
130
+ RESOURCE_QUOTA = 'ResourceQuota',
131
+ RESERVED_RESOURCE = 'ReservedResource',
132
+ DASHBOARD = 'Dashboard',
133
+ CLUSTER_PROVIDER_AND_REGION = 'ClusterProviderAndRegion',
134
+ SERVICE_LOG = 'ServiceLog',
135
+ INTERNAL_SERVICE_LOG = 'InternalServiceLog',
136
+ CSLOGS = 'CSLogs',
137
+ SUBSCRIPTION_LABEL = 'SubscriptionLabel',
138
+ ORGANIZATION_LABEL = 'OrganizationLabel',
139
+ SUBSCRIPTION_LABEL_INTERNAL = 'SubscriptionLabelInternal',
140
+ SELF_ACCESS_REVIEW = 'SelfAccessReview',
141
+ SUBSCRIPTION_INTERNAL = 'SubscriptionInternal',
142
+ SUBSCRIPTION_ROLE_BINDING = 'SubscriptionRoleBinding',
143
+ MACHINE_POOL = 'MachinePool',
144
+ }
145
+ }
package/package.json CHANGED
@@ -4,6 +4,7 @@
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./assisted-installer-service": "./assisted-installer-service.d.ts",
7
+ "./authorization-service": "./authorization-service.d.ts",
7
8
  "./accounts-management-service": "./accounts-management-service.d.ts",
8
9
  "./package.json": "./package.json"
9
10
  },
@@ -12,6 +13,9 @@
12
13
  "./assisted-installer-service": [
13
14
  "./assisted-installer-service.d.ts"
14
15
  ],
16
+ "./authorization-service": [
17
+ "./authorization-service.d.ts"
18
+ ],
15
19
  "./accounts-management-service": [
16
20
  "./accounts-management-service.d.ts"
17
21
  ]
@@ -27,17 +31,21 @@
27
31
  },
28
32
  "files": [
29
33
  "accounts-management-service.d.ts",
34
+ "authorization-service.d.ts",
30
35
  "assisted-installer-service.d.ts",
31
36
  "tsconfig.json"
32
37
  ],
33
38
  "scripts": {
34
39
  "update:assisted-installer-service": "node scripts/update-assisted-installer-service-types.js",
35
- "check_types": "yarn run -T tsc --noEmit"
40
+ "check_types": "yarn run -T tsc --noEmit",
41
+ "format": "yarn run -T prettier --cache --check . \"!build\"",
42
+ "fix-code-style": "yarn lint --fix && yarn format --write",
43
+ "lint": "yarn run -T eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache ."
36
44
  },
37
45
  "devDependencies": {
38
46
  "@types/js-yaml": "^4.0.1",
39
47
  "js-yaml": "^4.1.0",
40
48
  "sw2dts": "^2.6.3"
41
49
  },
42
- "version": "2.25.4"
50
+ "version": "2.27.0"
43
51
  }