@platform-mesh/portal-ui-lib 0.72.1 → 0.74.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,258 +1,244 @@
1
- import { NodeContext } from '@openmfp/portal-ui-lib';
2
- import { ResourceDefinition, PermissionsDefinition, ButtonSettings, PlatformMeshFieldDefinition, Resource, DownloadKubeconfigFromSecretRefButtonSettings, ResourceOperationType, ResourcePagination, ResourceListResult, ResourceSubscriptionResult, AccountInfo, LogicalCluster } from '@platform-mesh/portal-ui-lib/models';
3
- import { Apollo } from 'apollo-angular';
4
- import * as i0 from '@angular/core';
5
- import { Observable } from 'rxjs';
6
- import { GenericResource } from '@openmfp/ngx';
7
- import { VariableOptions } from 'gql-query-builder';
8
-
9
- interface ResourceNodeContext extends Partial<NodeContext> {
10
- resourceDefinition?: ResourceDefinition;
11
- organization?: string;
12
- accountPath?: string;
13
- entityName?: string;
14
- resourceId?: string;
15
- accountId?: string;
16
- kcpCA?: string;
17
- namespaceId?: string;
18
- namespaces?: string[];
19
- portalPermissions?: {
20
- [key: string]: string[];
21
- };
22
- portalContext: {
23
- crdGatewayApiUrl: string;
24
- openSearchApiUrl?: string;
25
- kcpWorkspaceUrl?: string;
26
- };
27
- }
28
-
29
- declare class ApolloFactory {
30
- private httpLink;
31
- private gatewayService;
32
- private authService;
33
- private luigiCoreService;
34
- readonly apollo: (nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean) => Apollo;
35
- /**
36
- * The token must be resolved per request, never captured at client
37
- * creation: a client built before the shell delivers the token would
38
- * otherwise send "Bearer undefined" for its whole lifetime (silent 401s,
39
- * empty views until a hard reload). Prefer live sources over the node
40
- * context, which is a mount-time snapshot: in web-component bundles the
41
- * injected AuthService belongs to a separate injector that never runs a
42
- * refresh, so the shell's Luigi auth store is the only value that tracks
43
- * the boot refresh and later scheduled refreshes.
44
- */
45
- private resolveToken;
46
- private resolveLuigiStoreToken;
47
- /**
48
- * Retries an operation exactly once when the gateway answers 401. The
49
- * Authorization header is rebuilt by the context link on the retry, so a
50
- * request that raced ahead of token delivery (or whose token expired in
51
- * flight) heals itself instead of leaving the view empty until a manual
52
- * reload. 401 means the request was rejected before execution, so this
53
- * is safe for mutations too.
54
- */
55
- private createAuthRetryLink;
56
- private createApolloOptions;
57
- static ɵfac: i0.ɵɵFactoryDeclaration<ApolloFactory, never>;
58
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
59
- }
60
-
61
- declare class GatewayService {
62
- private luigiCoreService;
63
- getGatewayUrl(nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): string;
64
- updateCrdGatewayUrlWithEntityPath(kcpPath: string): void;
65
- resolveKcpPath(nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): string;
66
- private extractKcpPath;
67
- static ɵfac: i0.ɵɵFactoryDeclaration<GatewayService, never>;
68
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
69
- }
70
-
71
- interface InstanceCheck {
72
- resource: string;
73
- group: string;
1
+ import { NodeContext } from "@openmfp/portal-ui-lib";
2
+ import { AccountInfo, ButtonSettings, DownloadKubeconfigFromSecretRefButtonSettings, LogicalCluster, PermissionsDefinition, PlatformMeshFieldDefinition, Resource, ResourceDefinition, ResourceListResult, ResourceOperationType, ResourcePagination, ResourceSubscriptionResult } from "@platform-mesh/portal-ui-lib/models";
3
+ import { Apollo } from "apollo-angular";
4
+ import * as i0 from "@angular/core";
5
+ import { Observable } from "rxjs";
6
+ import { GenericResource } from "@openmfp/ngx";
7
+ import { VariableOptions } from "gql-query-builder";
8
+ export interface ResourceNodeContext extends Partial<NodeContext> {
9
+ resourceDefinition?: ResourceDefinition;
10
+ organization?: string;
11
+ accountPath?: string;
12
+ entityName?: string;
13
+ resourceId?: string;
14
+ accountId?: string;
15
+ kcpCA?: string;
16
+ namespaceId?: string;
17
+ namespaces?: string[];
18
+ portalPermissions?: {
19
+ [key: string]: string[];
20
+ };
21
+ portalContext: {
22
+ crdGatewayApiUrl: string;
23
+ openSearchApiUrl?: string;
24
+ kcpWorkspaceUrl?: string;
25
+ };
26
+ }
27
+ export declare class ApolloFactory {
28
+ private httpLink;
29
+ private gatewayService;
30
+ private authService;
31
+ private luigiCoreService;
32
+ readonly apollo: (nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean) => Apollo;
33
+ /**
34
+ * The token must be resolved per request, never captured at client
35
+ * creation: a client built before the shell delivers the token would
36
+ * otherwise send "Bearer undefined" for its whole lifetime (silent 401s,
37
+ * empty views until a hard reload). Prefer live sources over the node
38
+ * context, which is a mount-time snapshot: in web-component bundles the
39
+ * injected AuthService belongs to a separate injector that never runs a
40
+ * refresh, so the shell's Luigi auth store is the only value that tracks
41
+ * the boot refresh and later scheduled refreshes.
42
+ */
43
+ private resolveToken;
44
+ private resolveLuigiStoreToken;
45
+ /**
46
+ * Retries an operation exactly once when the gateway answers 401. The
47
+ * Authorization header is rebuilt by the context link on the retry, so a
48
+ * request that raced ahead of token delivery (or whose token expired in
49
+ * flight) heals itself instead of leaving the view empty until a manual
50
+ * reload. 401 means the request was rejected before execution, so this
51
+ * is safe for mutations too.
52
+ */
53
+ private createAuthRetryLink;
54
+ private createApolloOptions;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<ApolloFactory, never>;
56
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
57
+ }
58
+ export declare class GatewayService {
59
+ private luigiCoreService;
60
+ getGatewayUrl(nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): string;
61
+ updateCrdGatewayUrlWithEntityPath(kcpPath: string): void;
62
+ resolveKcpPath(nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): string;
63
+ private extractKcpPath;
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<GatewayService, never>;
65
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
66
+ }
67
+ export interface InstanceCheck {
68
+ resource: string;
69
+ group: string;
70
+ namespace?: string;
71
+ name: string;
72
+ actions: string[];
73
+ }
74
+ export interface ResourceCheckRequest {
75
+ organization: string;
76
+ accountPath?: string;
77
+ checks: InstanceCheck[];
78
+ }
79
+ export interface InstancePermissionResponse {
80
+ resource: string;
81
+ namespace?: string;
82
+ name?: string;
83
+ actions: string[];
84
+ }
85
+ export declare class InstancePermissionsService {
86
+ private httpClient;
87
+ private luigiCoreService;
88
+ private requestChecks;
89
+ checkInstance(nodeContext: ResourceNodeContext, permissionsDefinition: PermissionsDefinition, instance: {
90
+ name: string;
74
91
  namespace?: string;
92
+ }): Observable<InstancePermissionResponse[]>;
93
+ checkInstances(nodeContext: ResourceNodeContext, permissionsDefinition: PermissionsDefinition, instances: {
75
94
  name: string;
76
- actions: string[];
77
- }
78
- interface ResourceCheckRequest {
79
- organization: string;
80
- accountPath?: string;
81
- checks: InstanceCheck[];
82
- }
83
- interface InstancePermissionResponse {
84
- resource: string;
85
95
  namespace?: string;
86
- name?: string;
87
- actions: string[];
88
- }
89
- declare class InstancePermissionsService {
90
- private httpClient;
91
- private luigiCoreService;
92
- private requestChecks;
93
- checkInstance(nodeContext: ResourceNodeContext, permissionsDefinition: PermissionsDefinition, instance: {
94
- name: string;
95
- namespace?: string;
96
- }): Observable<InstancePermissionResponse[]>;
97
- checkInstances(nodeContext: ResourceNodeContext, permissionsDefinition: PermissionsDefinition, instances: {
98
- name: string;
99
- namespace?: string;
100
- }[]): Observable<InstancePermissionResponse[]>;
101
- static ɵfac: i0.ɵɵFactoryDeclaration<InstancePermissionsService, never>;
102
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
103
- }
104
-
105
- interface KubeconfigDownload {
106
- contents: string;
107
- filename: string;
108
- }
109
- declare function isDownloadKubeconfigButtonSettings(buttonSettings: ButtonSettings | undefined): buttonSettings is DownloadKubeconfigFromSecretRefButtonSettings;
110
- declare class KubeconfigSecretService {
111
- private resourceService;
112
- /**
113
- * Fields the detail-view query has to read so the action can resolve its
114
- * Secret reference from the loaded resource.
115
- */
116
- secretReferenceQueryFields(buttonSettings: ButtonSettings | undefined): PlatformMeshFieldDefinition[];
117
- isSecretReferenceAvailable(buttonSettings: ButtonSettings | undefined, resource: Resource | undefined, context: ResourceNodeContext): boolean;
118
- readKubeconfig(buttonSettings: ButtonSettings, resource: Resource | undefined, context: ResourceNodeContext): Observable<KubeconfigDownload>;
119
- private resolveSecretReference;
120
- private namespaceOf;
121
- private readString;
122
- static ɵfac: i0.ɵɵFactoryDeclaration<KubeconfigSecretService, never>;
123
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
124
- }
125
-
126
- interface ReadResourcesParams {
127
- /** Free-text query — used by the OpenSearch implementation; ignored by ResourceService. */
128
- q?: string;
129
- /** OpenSearch exact-match filter; ignored by ResourceService. */
130
- filter?: string;
131
- /** Plural resource name for OpenSearch; defaults to `resourceDefinition.entityCollection`. */
132
- resource?: string;
133
- /** GraphQL fields or a raw query string — used by ResourceService; ignored by OpenSearch. */
134
- fields?: any[] | string;
135
- /** GraphQL operation name — used by ResourceService; ignored by OpenSearch. */
136
- operation?: string;
137
- /** ResourceService-only flag controlling which Apollo client to use. */
138
- readFromParentKcpPath?: boolean;
139
- }
140
- interface ReadResourcesPagination {
141
- limit?: number;
142
- /** Unified pagination cursor — maps to `continue` for ResourceService and `cursor` for OpenSearch. */
143
- cursor?: string;
144
- /** 1-based page number for page-based (pager) pagination. */
145
- page?: number;
146
- }
147
- interface ReadResourcesResult {
148
- items: GenericResource[];
149
- nextCursor?: string;
150
- remainingItemCount?: number;
151
- resourceVersion?: string;
152
- }
153
- interface ReadResourcesSubscriptionResult {
154
- type: ResourceOperationType;
155
- object: GenericResource;
96
+ }[]): Observable<InstancePermissionResponse[]>;
97
+ static ɵfac: i0.ɵɵFactoryDeclaration<InstancePermissionsService, never>;
98
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
99
+ }
100
+ export interface KubeconfigDownload {
101
+ contents: string;
102
+ filename: string;
103
+ }
104
+ export declare function isDownloadKubeconfigButtonSettings(buttonSettings: ButtonSettings | undefined): buttonSettings is DownloadKubeconfigFromSecretRefButtonSettings;
105
+ export declare class KubeconfigSecretService {
106
+ private resourceService;
107
+ /**
108
+ * Fields the detail-view query has to read so the action can resolve its
109
+ * Secret reference from the loaded resource.
110
+ */
111
+ secretReferenceQueryFields(buttonSettings: ButtonSettings | undefined): PlatformMeshFieldDefinition[];
112
+ isSecretReferenceAvailable(buttonSettings: ButtonSettings | undefined, resource: Resource | undefined, context: ResourceNodeContext): boolean;
113
+ readKubeconfig(buttonSettings: ButtonSettings, resource: Resource | undefined, context: ResourceNodeContext): Observable<KubeconfigDownload>;
114
+ private resolveSecretReference;
115
+ private namespaceOf;
116
+ private readString;
117
+ static ɵfac: i0.ɵɵFactoryDeclaration<KubeconfigSecretService, never>;
118
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
119
+ }
120
+ export interface ReadResourcesParams {
121
+ /** Free-text query — used by the OpenSearch implementation; ignored by ResourceService. */
122
+ q?: string;
123
+ /** OpenSearch exact-match filter; ignored by ResourceService. */
124
+ filter?: string;
125
+ /** Plural resource name for OpenSearch; defaults to `resourceDefinition.entityCollection`. */
126
+ resource?: string;
127
+ /** GraphQL fields or a raw query string — used by ResourceService; ignored by OpenSearch. */
128
+ fields?: any[] | string;
129
+ /** GraphQL operation name — used by ResourceService; ignored by OpenSearch. */
130
+ operation?: string;
131
+ /** ResourceService-only flag controlling which Apollo client to use. */
132
+ readFromParentKcpPath?: boolean;
133
+ }
134
+ export interface ReadResourcesPagination {
135
+ limit?: number;
136
+ /** Unified pagination cursor — maps to `continue` for ResourceService and `cursor` for OpenSearch. */
137
+ cursor?: string;
138
+ /** 1-based page number for page-based (pager) pagination. */
139
+ page?: number;
140
+ }
141
+ export interface ReadResourcesResult {
142
+ items: GenericResource[];
143
+ nextCursor?: string;
144
+ remainingItemCount?: number;
145
+ resourceVersion?: string;
146
+ }
147
+ export interface ReadResourcesSubscriptionResult {
148
+ type: ResourceOperationType;
149
+ object: GenericResource;
156
150
  }
157
151
  /** Provider-agnostic read API for resource lists. Implementations can be backed by the GraphQL gateway (ResourceService) */
158
- interface ReadResources {
159
- list(nodeContext: ResourceNodeContext, pagination: ReadResourcesPagination, params: ReadResourcesParams): Observable<ReadResourcesResult>;
160
- subscribe(nodeContext: ResourceNodeContext, params: ReadResourcesParams & {
161
- resourceVersion?: string;
162
- }): Observable<ReadResourcesSubscriptionResult | undefined>;
163
- }
164
-
165
- interface ResourceRequestParams {
166
- entity: string;
167
- version: string;
168
- apiGroup?: string;
169
- }
170
- interface ListOptions {
171
- readFromParentKcpPath?: boolean;
172
- pagination?: ResourcePagination;
173
- variables?: VariableOptions;
174
- }
175
- declare class ResourceService {
176
- private apolloFactory;
177
- private luigiCoreService;
178
- read(resourceId: string, params: ResourceRequestParams, fieldsOrRawQuery: any[] | string, nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): Observable<Resource>;
179
- private resolveReadQuery;
180
- list(operation: string, fieldsOrRawQuery: any[] | string, nodeContext: ResourceNodeContext, options?: ListOptions): Observable<ResourceListResult | any>;
181
- private getResourceReadyStatus;
182
- private listWithFields;
183
- private getResourceId;
184
- isAvailable(item: Resource, availableWhenNotReady?: boolean): boolean;
185
- getAccessibleName(item: Resource): string | undefined;
186
- private listWithRawQuery;
187
- resourceChangeSubscription(operation: string, fields: any[], nodeContext: ResourceNodeContext, resourceVersion: string, readFromParentKcpPath: boolean): Observable<ResourceSubscriptionResult | undefined>;
188
- delete(resource: Resource, resourceDefinition: ResourceDefinition, nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): Observable<Apollo.MutateResult<void>>;
189
- create(resource: Resource, resourceDefinition: ResourceDefinition, nodeContext: ResourceNodeContext): Observable<Apollo.MutateResult<unknown>>;
190
- update(resource: Resource, resourceDefinition: ResourceDefinition, nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean, fields?: any[]): Observable<unknown>;
191
- /**
192
- * Reads the `__typename` of the query type that holds the resource, e.g.
193
- * `{ network_api_foo_bar { v1alpha1 { __typename } } }`, and derives the
194
- * mutation input type name from it. The gateway generates the schema, so
195
- * its type names are the only source of truth.
196
- */
197
- private readInputTypeName;
198
- getNamespace(nodeContext: ResourceNodeContext, resource?: Resource): string | undefined;
199
- private normalizeGqlBuilderVariables;
200
- private calcQueryOptions;
201
- private parseGQLQuery;
202
- /**
203
- * Returns a {@link ReadResources}-shaped adapter over this service so that
204
- * consumers can swap implementations behind a feature toggle without depending
205
- * on the GraphQL-specific signatures of `list` / `resourceChangeSubscription`.
206
- */
207
- asReadResources(): ReadResources;
208
- static ɵfac: i0.ɵɵFactoryDeclaration<ResourceService, never>;
209
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
210
- }
211
-
212
- declare class AccountInfoService {
213
- private apolloFactory;
214
- private gatewayService;
215
- private readCache;
216
- read(nodeContext: ResourceNodeContext): Observable<AccountInfo>;
217
- static ɵfac: i0.ɵɵFactoryDeclaration<AccountInfoService, never>;
218
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
219
- }
220
-
221
- declare class LogicalClusterService {
222
- private apolloFactory;
223
- read(nodeContext: ResourceNodeContext): Observable<LogicalCluster>;
224
- static ɵfac: i0.ɵɵFactoryDeclaration<LogicalClusterService, never>;
225
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
226
- }
227
-
228
- declare class NamespaceService {
229
- private resourceService;
230
- list(nodeContext: ResourceNodeContext): Observable<string[]>;
231
- static ɵfac: i0.ɵɵFactoryDeclaration<NamespaceService, never>;
232
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
233
- }
234
-
235
- declare class ErrorHandlerService {
236
- private luigiCoreService;
237
- handleError(error: any, msg?: string): void;
238
- errorCode(error: any): number;
239
- private isUnauthorizedAccess;
240
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorHandlerService, never>;
241
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
242
- }
243
-
244
- declare class OrganizationReadyService {
245
- private configService;
246
- private envConfigService;
247
- private logicalClusterService;
248
- private authService;
249
- private isReady;
250
- private pendingCheck?;
251
- isOrganizationReady(): Promise<boolean>;
252
- private readOrganizationReady;
253
- static ɵfac: i0.ɵɵFactoryDeclaration<OrganizationReadyService, never>;
254
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
255
- }
256
-
257
- export { AccountInfoService, ApolloFactory, ErrorHandlerService, GatewayService, InstancePermissionsService, KubeconfigSecretService, LogicalClusterService, NamespaceService, OrganizationReadyService, ResourceService, isDownloadKubeconfigButtonSettings };
258
- export type { InstanceCheck, InstancePermissionResponse, KubeconfigDownload, ListOptions, ReadResources, ReadResourcesPagination, ReadResourcesParams, ReadResourcesResult, ReadResourcesSubscriptionResult, ResourceCheckRequest, ResourceNodeContext, ResourceRequestParams };
152
+ export interface ReadResources {
153
+ list(nodeContext: ResourceNodeContext, pagination: ReadResourcesPagination, params: ReadResourcesParams): Observable<ReadResourcesResult>;
154
+ subscribe(nodeContext: ResourceNodeContext, params: ReadResourcesParams & {
155
+ resourceVersion?: string;
156
+ }): Observable<ReadResourcesSubscriptionResult | undefined>;
157
+ }
158
+ export interface ResourceRequestParams {
159
+ entity: string;
160
+ version: string;
161
+ apiGroup?: string;
162
+ }
163
+ export interface ListOptions {
164
+ readFromParentKcpPath?: boolean;
165
+ pagination?: ResourcePagination;
166
+ variables?: VariableOptions;
167
+ }
168
+ export declare class ResourceService {
169
+ private apolloFactory;
170
+ private luigiCoreService;
171
+ read(resourceId: string, params: ResourceRequestParams, fieldsOrRawQuery: any[] | string, nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): Observable<Resource>;
172
+ private resolveReadQuery;
173
+ list(operation: string, fieldsOrRawQuery: any[] | string, nodeContext: ResourceNodeContext, options?: ListOptions): Observable<ResourceListResult | any>;
174
+ private getResourceReadyStatus;
175
+ private listWithFields;
176
+ private getResourceId;
177
+ isAvailable(item: Resource, availableWhenNotReady?: boolean): boolean;
178
+ getAccessibleName(item: Resource): string | undefined;
179
+ private listWithRawQuery;
180
+ resourceChangeSubscription(operation: string, fields: any[], nodeContext: ResourceNodeContext, resourceVersion: string, readFromParentKcpPath: boolean): Observable<ResourceSubscriptionResult | undefined>;
181
+ delete(resource: Resource, resourceDefinition: ResourceDefinition, nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean): Observable<Apollo.MutateResult<void>>;
182
+ create(resource: Resource, resourceDefinition: ResourceDefinition, nodeContext: ResourceNodeContext): Observable<Apollo.MutateResult<unknown>>;
183
+ update(resource: Resource, resourceDefinition: ResourceDefinition, nodeContext: ResourceNodeContext, readFromParentKcpPath?: boolean, fields?: any[]): Observable<unknown>;
184
+ /**
185
+ * Reads the `__typename` of the query type that holds the resource, e.g.
186
+ * `{ network_api_foo_bar { v1alpha1 { __typename } } }`, and derives the
187
+ * mutation input type name from it. The gateway generates the schema, so
188
+ * its type names are the only source of truth.
189
+ */
190
+ private readInputTypeName;
191
+ getNamespace(nodeContext: ResourceNodeContext, resource?: Resource): string | undefined;
192
+ private normalizeGqlBuilderVariables;
193
+ private calcQueryOptions;
194
+ private parseGQLQuery;
195
+ /**
196
+ * Returns a {@link ReadResources}-shaped adapter over this service so that
197
+ * consumers can swap implementations behind a feature toggle without depending
198
+ * on the GraphQL-specific signatures of `list` / `resourceChangeSubscription`.
199
+ */
200
+ asReadResources(): ReadResources;
201
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResourceService, never>;
202
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
203
+ }
204
+ export declare class AccountInfoService {
205
+ private apolloFactory;
206
+ private gatewayService;
207
+ private readCache;
208
+ read(nodeContext: ResourceNodeContext): Observable<AccountInfo>;
209
+ static ɵfac: i0.ɵɵFactoryDeclaration<AccountInfoService, never>;
210
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
211
+ }
212
+ export declare class LogicalClusterService {
213
+ private apolloFactory;
214
+ read(nodeContext: ResourceNodeContext): Observable<LogicalCluster>;
215
+ static ɵfac: i0.ɵɵFactoryDeclaration<LogicalClusterService, never>;
216
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
217
+ }
218
+ export declare class NamespaceService {
219
+ private resourceService;
220
+ list(nodeContext: ResourceNodeContext): Observable<string[]>;
221
+ static ɵfac: i0.ɵɵFactoryDeclaration<NamespaceService, never>;
222
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
223
+ }
224
+ export declare class ErrorHandlerService {
225
+ private luigiCoreService;
226
+ handleError(error: any, msg?: string): void;
227
+ errorCode(error: any): number;
228
+ navigateToErrorPageIfForbidden(code: number | undefined): boolean;
229
+ private isUnauthorizedAccess;
230
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErrorHandlerService, never>;
231
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
232
+ }
233
+ export declare class OrganizationReadyService {
234
+ private configService;
235
+ private envConfigService;
236
+ private logicalClusterService;
237
+ private authService;
238
+ private isReady;
239
+ private pendingCheck?;
240
+ isOrganizationReady(): Promise<boolean>;
241
+ private readOrganizationReady;
242
+ static ɵfac: i0.ɵɵFactoryDeclaration<OrganizationReadyService, never>;
243
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
244
+ }
@@ -1,44 +1,34 @@
1
- import { PlatformMeshFieldDefinition, InstancePermission, Resource, ResourceSubscriptionResult, PropertyField } from '@platform-mesh/portal-ui-lib/models';
2
- import { NodeContext } from '@openmfp/portal-ui-lib';
3
-
1
+ import { InstancePermission, PlatformMeshFieldDefinition, PropertyField, Resource, ResourceSubscriptionResult } from "@platform-mesh/portal-ui-lib/models";
2
+ import { NodeContext } from "@openmfp/portal-ui-lib";
4
3
  /**
5
4
  * Builds the input type name of a mutation from the `__typename` of the query
6
5
  * type that holds the resource (e.g. `NetworkAPIFooBarV1alpha1Query`). The
7
6
  * gateway names the input type `<prefix><Kind>_Input` with the same prefix,
8
7
  * so the UI does not need its own copy of the gateway's naming rule.
9
8
  */
10
- declare function buildGraphQLInputTypeName(queryTypeName: string | undefined, entity: string): string;
11
-
12
- declare function buildResourcePath(input: {
13
- apiGroup?: string | undefined;
14
- entity: string;
15
- version?: string | undefined;
9
+ export declare function buildGraphQLInputTypeName(queryTypeName: string | undefined, entity: string): string;
10
+ export declare function buildResourcePath(input: {
11
+ apiGroup?: string | undefined;
12
+ entity: string;
13
+ version?: string | undefined;
16
14
  }, separator?: string): string;
17
-
18
- type GenerateGraphQLFieldsOptions = {
19
- /** Omit fields marked writeOnly (for queries/mutation return selections). */
20
- forRead?: boolean;
15
+ export type GenerateGraphQLFieldsOptions = {
16
+ /** Omit fields marked writeOnly (for queries/mutation return selections). */
17
+ forRead?: boolean;
21
18
  };
22
19
  /** Builds GraphQL field selections for reads, omitting write-only secrets. */
23
- declare const generateGraphQLReadFields: (uiFields: readonly PlatformMeshFieldDefinition[]) => any[];
24
- declare const generateGraphQLFields: (uiFields: readonly PlatformMeshFieldDefinition[], options?: GenerateGraphQLFieldsOptions) => any[];
25
-
26
- declare const getValueByPath: <T extends object, R = unknown>(obj: T, path: string) => R | undefined;
27
-
28
- declare const permissionKey: (instance: Partial<Omit<InstancePermission, "actions">>) => string;
29
-
30
- declare const isLocalSetup: () => boolean;
31
-
32
- declare function isNamespacedResource(nodeContext: Partial<NodeContext>): boolean;
33
-
34
- interface MergeListWithSubscriptionResultOptions<T> {
35
- getItemKey: (item: T) => string | undefined;
36
- mapSubscriptionObjectToItem: (object: Resource) => T;
20
+ export declare const generateGraphQLReadFields: (uiFields: readonly PlatformMeshFieldDefinition[]) => any[];
21
+ export declare const generateGraphQLFields: (uiFields: readonly PlatformMeshFieldDefinition[], options?: GenerateGraphQLFieldsOptions) => any[];
22
+ export declare const getValueByPath: <T extends object, R = unknown>(obj: T, path: string) => R | undefined;
23
+ export declare const permissionKey: (instance: Partial<Omit<InstancePermission, "actions">>) => string;
24
+ export declare const isLocalSetup: () => boolean;
25
+ export declare function isNamespacedResource(nodeContext: Partial<NodeContext>): boolean;
26
+ export interface MergeListWithSubscriptionResultOptions<T> {
27
+ getItemKey: (item: T) => string | undefined;
28
+ mapSubscriptionObjectToItem: (object: Resource) => T;
37
29
  }
38
- declare function mergeListWithSubscriptionResult<T>(items: T[], subscriptionResult: ResourceSubscriptionResult | undefined, options: MergeListWithSubscriptionResultOptions<T>): T[];
39
-
40
- declare const parseRawGqlQueryToFields: (s: string) => any[];
41
-
30
+ export declare function mergeListWithSubscriptionResult<T>(items: T[], subscriptionResult: ResourceSubscriptionResult | undefined, options: MergeListWithSubscriptionResultOptions<T>): T[];
31
+ export declare const parseRawGqlQueryToFields: (s: string) => any[];
42
32
  /**
43
33
  * Tier-1 resource-level permission check (fail-open).
44
34
  *
@@ -47,26 +37,23 @@ declare const parseRawGqlQueryToFields: (s: string) => any[];
47
37
  * portalPermissions → we don't gate). Returns false ONLY when permissions
48
38
  * WERE fetched for the resource and the verb is absent.
49
39
  */
50
- declare const resourceActionAllowed: (portalPermissions: {
51
- [key: string]: string[];
40
+ export declare const resourceActionAllowed: (portalPermissions: {
41
+ [key: string]: string[];
52
42
  } | undefined, resource: string | undefined, verb: string) => boolean;
53
-
54
- declare const getResourceValueByJsonPath: <T>(resource: T, field: {
55
- jsonPathExpression?: string;
56
- property?: string | string[];
57
- propertyField?: PropertyField;
43
+ export declare const getResourceValueByJsonPath: <T>(resource: T, field: {
44
+ jsonPathExpression?: string;
45
+ property?: string | string[];
46
+ propertyField?: PropertyField;
58
47
  }) => any;
59
- declare const encodeBase64: (str: string) => string;
60
- declare const decodeBase64: (base64: string) => string;
61
-
62
- declare function stripTypename<T>(value: T): T;
63
-
64
- declare function deletePropertyByPath<T extends Record<string, unknown>>(object: T, path: string): T;
65
-
48
+ export declare const encodeBase64: (str: string) => string;
49
+ export declare const decodeBase64: (base64: string) => string;
50
+ export declare function stripTypename<T>(value: T): T;
51
+ export interface ViewUrlPlaceholderSources {
52
+ context?: Record<string, unknown>;
53
+ nodeParams?: Record<string, unknown>;
54
+ }
55
+ export declare const resolveViewUrlPlaceholders: (viewUrl: string, sources: ViewUrlPlaceholderSources) => string | undefined;
56
+ export declare function deletePropertyByPath<T extends Record<string, unknown>>(object: T, path: string): T;
66
57
  /** Flattens nested `propertyCollection` trees into a list of leaf field definitions. */
67
- declare function flattenFieldTree(fields: readonly PlatformMeshFieldDefinition[] | undefined): PlatformMeshFieldDefinition[];
68
-
69
- declare function setPropertyByPath<T extends Record<string, any>>(object: T, path: string, value: unknown): T;
70
-
71
- export { buildGraphQLInputTypeName, buildResourcePath, decodeBase64, deletePropertyByPath, encodeBase64, flattenFieldTree, generateGraphQLFields, generateGraphQLReadFields, getResourceValueByJsonPath, getValueByPath, isLocalSetup, isNamespacedResource, mergeListWithSubscriptionResult, parseRawGqlQueryToFields, permissionKey, resourceActionAllowed, setPropertyByPath, stripTypename };
72
- export type { GenerateGraphQLFieldsOptions, MergeListWithSubscriptionResultOptions };
58
+ export declare function flattenFieldTree(fields: readonly PlatformMeshFieldDefinition[] | undefined): PlatformMeshFieldDefinition[];
59
+ export declare function setPropertyByPath<T extends Record<string, any>>(object: T, path: string, value: unknown): T;
@@ -1,3 +1 @@
1
- declare const EMPTY_PACKAGE = true;
2
-
3
- export { EMPTY_PACKAGE };
1
+ export declare const EMPTY_PACKAGE = true;