mulesoft-anypoint-cli-agent-fabric-plugin 1.0.5

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.
Files changed (114) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +321 -0
  3. package/bin/run +5 -0
  4. package/bin/run.cmd +3 -0
  5. package/dist/commands/agent-network/project/build.d.ts +26 -0
  6. package/dist/commands/agent-network/project/build.js +192 -0
  7. package/dist/commands/agent-network/project/build.js.map +1 -0
  8. package/dist/commands/agent-network/project/create.d.ts +28 -0
  9. package/dist/commands/agent-network/project/create.js +101 -0
  10. package/dist/commands/agent-network/project/create.js.map +1 -0
  11. package/dist/commands/agent-network/project/deploy.d.ts +67 -0
  12. package/dist/commands/agent-network/project/deploy.js +580 -0
  13. package/dist/commands/agent-network/project/deploy.js.map +1 -0
  14. package/dist/commands/agent-network/project/publish.d.ts +27 -0
  15. package/dist/commands/agent-network/project/publish.js +159 -0
  16. package/dist/commands/agent-network/project/publish.js.map +1 -0
  17. package/dist/commands/agent-network/setup/dependencies.d.ts +12 -0
  18. package/dist/commands/agent-network/setup/dependencies.js +65 -0
  19. package/dist/commands/agent-network/setup/dependencies.js.map +1 -0
  20. package/dist/commands/agent-network/setup/gateways.d.ts +31 -0
  21. package/dist/commands/agent-network/setup/gateways.js +175 -0
  22. package/dist/commands/agent-network/setup/gateways.js.map +1 -0
  23. package/dist/errors/base-error.d.ts +8 -0
  24. package/dist/errors/base-error.js +81 -0
  25. package/dist/errors/base-error.js.map +1 -0
  26. package/dist/errors/error-factory.d.ts +71 -0
  27. package/dist/errors/error-factory.js +362 -0
  28. package/dist/errors/error-factory.js.map +1 -0
  29. package/dist/helpers/dependency-manager.d.ts +30 -0
  30. package/dist/helpers/dependency-manager.js +366 -0
  31. package/dist/helpers/dependency-manager.js.map +1 -0
  32. package/dist/helpers/entitlement-utils.d.ts +4 -0
  33. package/dist/helpers/entitlement-utils.js +20 -0
  34. package/dist/helpers/entitlement-utils.js.map +1 -0
  35. package/dist/helpers/policy-helper.d.ts +21 -0
  36. package/dist/helpers/policy-helper.js +96 -0
  37. package/dist/helpers/policy-helper.js.map +1 -0
  38. package/dist/helpers/project/api-project-dependency-fetcher.d.ts +10 -0
  39. package/dist/helpers/project/api-project-dependency-fetcher.js +213 -0
  40. package/dist/helpers/project/api-project-dependency-fetcher.js.map +1 -0
  41. package/dist/helpers/project/constants.d.ts +52 -0
  42. package/dist/helpers/project/constants.js +52 -0
  43. package/dist/helpers/project/constants.js.map +1 -0
  44. package/dist/helpers/project/debug-messages.d.ts +4 -0
  45. package/dist/helpers/project/debug-messages.js +8 -0
  46. package/dist/helpers/project/debug-messages.js.map +1 -0
  47. package/dist/helpers/project/templates.d.ts +1 -0
  48. package/dist/helpers/project/templates.js +6 -0
  49. package/dist/helpers/project/templates.js.map +1 -0
  50. package/dist/helpers/project/uris.d.ts +2 -0
  51. package/dist/helpers/project/uris.js +8 -0
  52. package/dist/helpers/project/uris.js.map +1 -0
  53. package/dist/helpers/project/validation-commons.d.ts +6 -0
  54. package/dist/helpers/project/validation-commons.js +50 -0
  55. package/dist/helpers/project/validation-commons.js.map +1 -0
  56. package/dist/helpers/types.d.ts +54 -0
  57. package/dist/helpers/types.js +10 -0
  58. package/dist/helpers/types.js.map +1 -0
  59. package/dist/helpers/utils.d.ts +68 -0
  60. package/dist/helpers/utils.js +374 -0
  61. package/dist/helpers/utils.js.map +1 -0
  62. package/dist/index.d.ts +5 -0
  63. package/dist/index.js +17 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/resources/mule-generation-dependencies.json +1 -0
  66. package/dist/resources/runtime-dependencies.json +13 -0
  67. package/dist/resources/schemas/mule-generation-dependencies-schema.json +52 -0
  68. package/dist/resources/schemas/runtime-dependencies-schema.json +57 -0
  69. package/dist/types/agent-network.d.ts +214 -0
  70. package/dist/types/agent-network.js +13 -0
  71. package/dist/types/agent-network.js.map +1 -0
  72. package/dist/types/types.d.ts +296 -0
  73. package/dist/types/types.js +3 -0
  74. package/dist/types/types.js.map +1 -0
  75. package/dist/utils/access-management.d.ts +5 -0
  76. package/dist/utils/access-management.js +14 -0
  77. package/dist/utils/access-management.js.map +1 -0
  78. package/dist/utils/api-instance-builder.d.ts +28 -0
  79. package/dist/utils/api-instance-builder.js +450 -0
  80. package/dist/utils/api-instance-builder.js.map +1 -0
  81. package/dist/utils/asset-builder.d.ts +28 -0
  82. package/dist/utils/asset-builder.js +248 -0
  83. package/dist/utils/asset-builder.js.map +1 -0
  84. package/dist/utils/constants.d.ts +73 -0
  85. package/dist/utils/constants.js +87 -0
  86. package/dist/utils/constants.js.map +1 -0
  87. package/dist/utils/exchange.d.ts +4 -0
  88. package/dist/utils/exchange.js +26 -0
  89. package/dist/utils/exchange.js.map +1 -0
  90. package/dist/utils/files.d.ts +63 -0
  91. package/dist/utils/files.js +300 -0
  92. package/dist/utils/files.js.map +1 -0
  93. package/dist/utils/gateway.d.ts +12 -0
  94. package/dist/utils/gateway.js +83 -0
  95. package/dist/utils/gateway.js.map +1 -0
  96. package/dist/utils/naming.d.ts +1 -0
  97. package/dist/utils/naming.js +17 -0
  98. package/dist/utils/naming.js.map +1 -0
  99. package/dist/utils/report/junit-report.d.ts +2 -0
  100. package/dist/utils/report/junit-report.js +19 -0
  101. package/dist/utils/report/junit-report.js.map +1 -0
  102. package/dist/utils/report/validation-report.d.ts +27 -0
  103. package/dist/utils/report/validation-report.js +16 -0
  104. package/dist/utils/report/validation-report.js.map +1 -0
  105. package/dist/utils/uris.d.ts +26 -0
  106. package/dist/utils/uris.js +41 -0
  107. package/dist/utils/uris.js.map +1 -0
  108. package/dist/utils/variables.d.ts +6 -0
  109. package/dist/utils/variables.js +22 -0
  110. package/dist/utils/variables.js.map +1 -0
  111. package/package.json +100 -0
  112. package/scripts/post-install.js +102 -0
  113. package/templates/agent-network.yaml.template +89 -0
  114. package/templates/exchange.json.template +36 -0
@@ -0,0 +1,214 @@
1
+ import { ExchangeDescriptor, GAV } from './types';
2
+ export type AgentCard = {
3
+ description: string;
4
+ name: string;
5
+ };
6
+ export type Reference = {
7
+ name: string;
8
+ namespace?: string;
9
+ };
10
+ export type Properties = {
11
+ properties: {
12
+ [key: string]: string;
13
+ };
14
+ securedProperties: {
15
+ [key: string]: string;
16
+ };
17
+ };
18
+ export type Policy = {
19
+ ref: Reference;
20
+ configuration: Record<string, any>;
21
+ };
22
+ export type MCPConnection = {
23
+ kind: 'mcp';
24
+ description?: string;
25
+ ref: Reference;
26
+ spec: {
27
+ url: string;
28
+ authentication?: Authentication;
29
+ policies?: Array<Policy>;
30
+ };
31
+ };
32
+ export type LLMConnection = {
33
+ kind: 'llm';
34
+ description?: string;
35
+ ref: Reference;
36
+ spec: {
37
+ url: string;
38
+ configuration: Record<string, any>;
39
+ policies?: Array<Policy>;
40
+ };
41
+ };
42
+ export type LLMMetadata = {
43
+ platform: string;
44
+ policyRef?: GAV;
45
+ };
46
+ export type AgentConnection = {
47
+ kind: 'agent';
48
+ description?: string;
49
+ ref: Reference;
50
+ spec: {
51
+ url: string;
52
+ authentication?: Authentication;
53
+ policies?: Array<Policy>;
54
+ };
55
+ };
56
+ export type AgentNetwork = {
57
+ brokers?: {
58
+ [key: string]: {
59
+ card: AgentCard;
60
+ spec: {
61
+ llm: {
62
+ ref: Reference;
63
+ };
64
+ links?: Array<{
65
+ agent: {
66
+ ref: Reference;
67
+ };
68
+ }>;
69
+ tools?: Array<{
70
+ mcp: {
71
+ ref: Reference;
72
+ allowed?: Array<string>;
73
+ };
74
+ }>;
75
+ policies?: Array<Policy>;
76
+ };
77
+ };
78
+ };
79
+ agents?: {
80
+ [key: string]: {
81
+ card?: AgentCard;
82
+ label?: string;
83
+ description?: string;
84
+ tags?: Array<string>;
85
+ metadata?: {
86
+ protocol?: string;
87
+ platform?: string;
88
+ links?: Array<{
89
+ agent: {
90
+ ref: Reference;
91
+ };
92
+ }>;
93
+ tools?: Array<{
94
+ mcp: {
95
+ ref: Reference;
96
+ allowed?: Array<string>;
97
+ };
98
+ }>;
99
+ };
100
+ };
101
+ };
102
+ llmProviders?: {
103
+ [key: string]: {
104
+ description?: string;
105
+ label?: string;
106
+ tags?: Array<string>;
107
+ metadata: {
108
+ platform: string;
109
+ transcoder: {
110
+ ref: Reference;
111
+ };
112
+ };
113
+ };
114
+ };
115
+ mcpServers?: {
116
+ [key: string]: {
117
+ description?: string;
118
+ label?: string;
119
+ tags?: Array<string>;
120
+ metadata: {
121
+ transport: {
122
+ kind: string;
123
+ };
124
+ platform: string;
125
+ };
126
+ };
127
+ };
128
+ connections?: {
129
+ [key: string]: AgentConnection | MCPConnection | LLMConnection;
130
+ };
131
+ label?: string;
132
+ };
133
+ export type BasicAuth = {
134
+ kind: 'basic';
135
+ username: string;
136
+ password: string;
137
+ headerName?: string;
138
+ };
139
+ export type APIKey = {
140
+ kind: 'apikey';
141
+ apiKey: string;
142
+ headerName?: string;
143
+ };
144
+ export type ApiKeyClientCredentialsAuth = {
145
+ kind: 'apikey-client-credentials';
146
+ clientId: {
147
+ value: string;
148
+ name?: string;
149
+ };
150
+ clientSecret: {
151
+ value: string;
152
+ name?: string;
153
+ };
154
+ };
155
+ export type OAuth2ClientCredentialsAuth = {
156
+ kind: 'oauth2-client-credentials';
157
+ clientId: string;
158
+ clientSecret: string;
159
+ token: {
160
+ url: string;
161
+ timeout?: number;
162
+ bodyEncoding?: 'form' | 'json';
163
+ };
164
+ scopes?: string[];
165
+ };
166
+ export type OAuth2TokenExchangeAuth = {
167
+ kind: 'oauth2-token-exchange';
168
+ clientId: string;
169
+ clientSecret: string;
170
+ tokenEndpoint: string;
171
+ targetType?: 'audience' | 'resource';
172
+ targetValue: string;
173
+ scope?: string;
174
+ timeout?: number;
175
+ };
176
+ export type InTaskAuth = {
177
+ kind: 'in-task-auth';
178
+ secondaryAuthProvider?: string;
179
+ authorizationEndpoint: string;
180
+ tokenEndpoint: string;
181
+ scopes: string;
182
+ redirectUri: string;
183
+ responseType?: string;
184
+ codeChallengeMethod?: string;
185
+ tokenAudience?: string;
186
+ bodyEncoding?: string;
187
+ tokenTimeout?: number;
188
+ userIdHeader?: string;
189
+ userEmailHeader?: string;
190
+ challengeResponseStatusCode?: number;
191
+ };
192
+ export type Authentication = BasicAuth | APIKey | ApiKeyClientCredentialsAuth | OAuth2ClientCredentialsAuth | OAuth2TokenExchangeAuth | InTaskAuth;
193
+ export type APIDescriptor = {
194
+ id: string;
195
+ type: string;
196
+ label: string;
197
+ description?: string;
198
+ asset: GAV;
199
+ tags?: Array<string>;
200
+ endpointPath: string;
201
+ upstreamUrl: string;
202
+ metadata: {
203
+ connectionId: string;
204
+ source: string;
205
+ protectionDirection: 'ingress' | 'egress';
206
+ };
207
+ inboundPolicies: (apiId: string) => Promise<Array<PolicyBinding>>;
208
+ outboundPolicies: (apiId: string) => Promise<Array<PolicyBinding>>;
209
+ };
210
+ export type PolicyBinding = {
211
+ policyRef: GAV;
212
+ configuration: Record<string, any>;
213
+ };
214
+ export declare function resolveReference(link: Reference, descriptor: ExchangeDescriptor): GAV;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveReference = void 0;
4
+ function resolveReference(link, descriptor) {
5
+ var _a, _b;
6
+ return {
7
+ groupId: link.namespace || descriptor.groupId,
8
+ assetId: link.name,
9
+ version: ((_b = (_a = descriptor.dependencies) === null || _a === void 0 ? void 0 : _a.find(dep => dep.assetId === link.name && dep.groupId === (link.namespace || descriptor.groupId))) === null || _b === void 0 ? void 0 : _b.version) || descriptor.version,
10
+ };
11
+ }
12
+ exports.resolveReference = resolveReference;
13
+ //# sourceMappingURL=agent-network.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-network.js","sourceRoot":"","sources":["../../src/types/agent-network.ts"],"names":[],"mappings":";;;AAsNA,SAAgB,gBAAgB,CAAC,IAAe,EAAE,UAA8B;;IAC9E,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,SAAS,IAAI,UAAU,CAAC,OAAO;QAC7C,OAAO,EAAE,IAAI,CAAC,IAAI;QAClB,OAAO,EAAE,CAAA,MAAA,MAAA,UAAU,CAAC,YAAY,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,0CAAE,OAAO,KAAI,UAAU,CAAC,OAAO;KAClK,CAAA;AACH,CAAC;AAND,4CAMC"}
@@ -0,0 +1,296 @@
1
+ export type Gateway = {
2
+ id: string;
3
+ name: string;
4
+ targetId: string;
5
+ status: string;
6
+ dateCreated: string;
7
+ lastUpdated: string;
8
+ };
9
+ export type GatewaysResponse = {
10
+ content: Gateway[];
11
+ pageSize: number;
12
+ pageNumber: number;
13
+ totalElements: number;
14
+ };
15
+ export type GatewayDetails = {
16
+ id: string;
17
+ name: string;
18
+ status: string;
19
+ ready: boolean;
20
+ running: boolean;
21
+ lastUpdated: string;
22
+ dateCreated: string;
23
+ targetId: string;
24
+ targetName: string;
25
+ desiredStatus: string;
26
+ releaseChannel: string;
27
+ runtimeVersion: string;
28
+ size: string;
29
+ apiLimit: number;
30
+ configuration: {
31
+ ingress: {
32
+ publicUrl: string;
33
+ internalUrl: string;
34
+ forwardSslSession: boolean;
35
+ lastMileSecurity: boolean;
36
+ };
37
+ logging: {
38
+ level: string;
39
+ forwardLogs: boolean;
40
+ };
41
+ properties: {
42
+ upstreamResponseTimeout: number;
43
+ connectionIdleTimeout: number;
44
+ };
45
+ };
46
+ };
47
+ export type GAV = {
48
+ groupId: string;
49
+ assetId: string;
50
+ version: string;
51
+ };
52
+ export type Variable = {
53
+ description: string;
54
+ default?: string;
55
+ };
56
+ export type Variables = {
57
+ [key: string]: {} | Variable;
58
+ };
59
+ export type ExchangeDescriptor = GAV & {
60
+ main?: string;
61
+ name: string;
62
+ classifier?: string;
63
+ description?: string;
64
+ dependencies?: GAV[];
65
+ tags?: string[];
66
+ metadata: {
67
+ variables?: Variables;
68
+ properties?: {
69
+ [key: string]: string;
70
+ };
71
+ };
72
+ };
73
+ export type Deployment = {
74
+ id: string;
75
+ name: string;
76
+ creationDate: string;
77
+ lastModifiedDate: string;
78
+ target: {
79
+ provider: string;
80
+ targetId: string;
81
+ };
82
+ status: string;
83
+ application: {
84
+ status: string;
85
+ };
86
+ };
87
+ export type DeploymentsResponse = {
88
+ total: number;
89
+ items: Deployment[];
90
+ };
91
+ export type CreateAPIResponse = {
92
+ environmentId: string;
93
+ providerId: string;
94
+ technology: string;
95
+ assetVersion: string;
96
+ productVersion: string;
97
+ order: number;
98
+ stage: string;
99
+ audit: {
100
+ created: {
101
+ date: string;
102
+ };
103
+ updated: Record<string, unknown>;
104
+ };
105
+ masterOrganizationId: string;
106
+ organizationId: string;
107
+ id: number;
108
+ groupId: string;
109
+ assetId: string;
110
+ tags: string[];
111
+ endpoint: {
112
+ deploymentType: string;
113
+ isCloudHub: null | boolean;
114
+ muleVersion4OrAbove: null | boolean;
115
+ referencesUserDomain: null | boolean;
116
+ responseTimeout: null | number;
117
+ uri: string;
118
+ proxyUri: string;
119
+ type: string;
120
+ validation: string;
121
+ audit: {
122
+ created: {
123
+ date: string;
124
+ };
125
+ updated: Record<string, unknown>;
126
+ };
127
+ masterOrganizationId: string;
128
+ organizationId: string;
129
+ id: number;
130
+ apiId: number;
131
+ };
132
+ autodiscoveryInstanceName: string;
133
+ };
134
+ export type ListPoliciesReponse = {
135
+ policies: Array<ApplyPolicyResponse>;
136
+ };
137
+ export type ApplyPolicyResponse = {
138
+ configurationData: {
139
+ ipExpression: string;
140
+ ips: string[];
141
+ };
142
+ pointcutData: null | Record<string, unknown>;
143
+ template: {
144
+ groupId: string;
145
+ assetId: string;
146
+ assetVersion: string;
147
+ };
148
+ policyTemplateId: string;
149
+ order: number;
150
+ audit: {
151
+ created: {
152
+ date: string;
153
+ };
154
+ updated: Record<string, unknown>;
155
+ };
156
+ masterOrganizationId: string;
157
+ organizationId: string;
158
+ id: number;
159
+ policyId: number;
160
+ implementationAsset: {
161
+ groupId: string;
162
+ assetId: string;
163
+ version: string;
164
+ minRuntimeVersion: string;
165
+ technology: string;
166
+ };
167
+ apiId: number;
168
+ };
169
+ export type RuntimeTargetSpace = {
170
+ id: string;
171
+ name: string;
172
+ type: string;
173
+ };
174
+ export type RuntimeTargetSpaceResponse = {
175
+ content: RuntimeTargetSpace[];
176
+ };
177
+ export type TargetSpace = {
178
+ id: string;
179
+ name: string;
180
+ version: string;
181
+ type: string;
182
+ runtimes: Runtime[];
183
+ };
184
+ export type Runtime = {
185
+ type: string;
186
+ versions: RuntimeVersion[];
187
+ };
188
+ export type RuntimeVersion = {
189
+ baseVersion: string;
190
+ tag: string;
191
+ releaseDate: number;
192
+ minimumTag: string;
193
+ minimumTagReleaseDate: number;
194
+ endOfStandardSupportDate: number;
195
+ endOfExtendedSupportDate: number;
196
+ endOfLifeSupportDate: number;
197
+ channel: string;
198
+ };
199
+ export type ExistingAPIAudit = {
200
+ created: {
201
+ date: string;
202
+ };
203
+ updated: {
204
+ date?: string;
205
+ [key: string]: any;
206
+ };
207
+ };
208
+ export type ExistingAPIAssetAPI = {
209
+ audit: ExistingAPIAudit;
210
+ masterOrganizationId: string;
211
+ organizationId: string;
212
+ id: number;
213
+ instanceLabel: string | null;
214
+ autodiscoveryInstanceName: string | null;
215
+ assetVersion: string | null;
216
+ productVersion: string | null;
217
+ metadata?: Record<string, any>;
218
+ description: string;
219
+ tags: string[];
220
+ order: number;
221
+ deprecated: boolean;
222
+ lastActiveDate: string | null;
223
+ endpointUri: string | null;
224
+ environmentId: string;
225
+ lastActiveDelta?: number;
226
+ pinned: boolean;
227
+ activeContractsCount: number;
228
+ };
229
+ export type ExistingAPIAsset = {
230
+ audit: ExistingAPIAudit;
231
+ masterOrganizationId: string;
232
+ organizationId: string;
233
+ id: number;
234
+ name: string;
235
+ groupId: string | null;
236
+ assetId: string | null;
237
+ apis: ExistingAPIAssetAPI[];
238
+ totalApis: number;
239
+ };
240
+ export type ExistingAPIResponse = {
241
+ total: number;
242
+ assets: ExistingAPIAsset[];
243
+ };
244
+ export type ExchangeGetResult = {
245
+ groupId: string;
246
+ assetId: string;
247
+ version: string;
248
+ minorVersion: string;
249
+ organizationId: string;
250
+ description: string;
251
+ versionGroup: string;
252
+ isPublic: boolean;
253
+ name: string;
254
+ type: string;
255
+ status: string;
256
+ contactEmail: string | null;
257
+ contactName: string | null;
258
+ labels: string[];
259
+ attributes: any[];
260
+ categories: any[];
261
+ customFields: any[];
262
+ files: ExchangeFile[];
263
+ dependencies: any[];
264
+ createdAt: string;
265
+ createdById: string;
266
+ versions: any[];
267
+ };
268
+ export type ExchangeFile = {
269
+ classifier: string | null;
270
+ packaging: string;
271
+ downloadURL: string;
272
+ externalLink: string;
273
+ md5: string;
274
+ sha1: string;
275
+ createdDate: string;
276
+ mainFile: string | null;
277
+ isGenerated: boolean;
278
+ };
279
+ export type DomainsResponse = {
280
+ domains: string[];
281
+ appUniqueId: string;
282
+ };
283
+ export type Entitlements = {
284
+ monitoringCenter: {
285
+ productSKU: number;
286
+ };
287
+ };
288
+ export interface Upstream {
289
+ id: string;
290
+ label: string | null;
291
+ uri: string;
292
+ }
293
+ export interface UpstreamsResponse {
294
+ total: number;
295
+ upstreams: Upstream[];
296
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { Entitlements } from '../types/types';
3
+ export declare const AccessManagement: {
4
+ getEntitlements(requester: AxiosInstance, organizationId: string): Promise<Entitlements>;
5
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccessManagement = void 0;
4
+ const error_factory_1 = require("../errors/error-factory");
5
+ exports.AccessManagement = {
6
+ async getEntitlements(requester, organizationId) {
7
+ const entitlementResponse = await requester.get(`/accounts/api/v2/organizations/${organizationId}/entitlements`);
8
+ if (entitlementResponse.status !== 200) {
9
+ throw error_factory_1.ErrorFactory.noEntitlementForOrganization(organizationId, entitlementResponse.statusText);
10
+ }
11
+ return entitlementResponse.data;
12
+ },
13
+ };
14
+ //# sourceMappingURL=access-management.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-management.js","sourceRoot":"","sources":["../../src/utils/access-management.ts"],"names":[],"mappings":";;;AAEA,2DAAoD;AAEvC,QAAA,gBAAgB,GAAG;IAE9B,KAAK,CAAC,eAAe,CAAC,SAAwB,EAAE,cAAsB;QACpE,MAAM,mBAAmB,GAAG,MAAM,SAAS,CAAC,GAAG,CAAe,kCAAkC,cAAc,eAAe,CAAC,CAAA;QAC9H,IAAI,mBAAmB,CAAC,MAAM,KAAK,GAAG,EAAE;YACtC,MAAM,4BAAY,CAAC,4BAA4B,CAAC,cAAc,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAA;SAChG;QAED,OAAO,mBAAmB,CAAC,IAAI,CAAA;IACjC,CAAC;CACF,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { ExchangeDescriptor, GAV } from '../types/types';
2
+ import { AgentNetwork, Properties, APIDescriptor, LLMConnection, PolicyBinding } from '../types/agent-network';
3
+ /**
4
+ * Builds the API Instances (ingress and egress) declared in the agent network
5
+ */
6
+ export declare class AgentNetworkApiInstanceBuilder {
7
+ descriptor: ExchangeDescriptor;
8
+ an: AgentNetwork;
9
+ mulesoftOrg: string;
10
+ propertyMap: Properties;
11
+ projectHome: string;
12
+ constructor(projectHome: string, yamlPath: string, descriptor: ExchangeDescriptor, propertyMap: Properties, mulesoftOrg: string);
13
+ private sourceUrn;
14
+ requiredConnections(): Array<{
15
+ asset: GAV;
16
+ type: string;
17
+ }>;
18
+ hasBrokers(): boolean;
19
+ ingress(muleBaseUrl: string): Array<APIDescriptor>;
20
+ private createAPIDInjectionPolicy;
21
+ egress(): Array<APIDescriptor>;
22
+ private createConnectionPolicy;
23
+ createTranscodingPolicy(connection: LLMConnection, llmRef: GAV): Promise<PolicyBinding>;
24
+ private createAuthenticationPolicy;
25
+ private createMCPSupportPolicy;
26
+ private createAgentCardPolicy;
27
+ private createTracingPolicy;
28
+ }