@fractal_cloud/sdk 0.1.1 → 1.0.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.
@@ -0,0 +1,1625 @@
1
+ //#region src/values/kebab_case_string.d.ts
2
+ /**
3
+ * Represents a string formatted in kebab-case.
4
+ * Kebab-case is a naming convention where words are
5
+ * concatenated together, separated by hyphens, and all
6
+ * characters are in lowercase.
7
+ *
8
+ * This type enforces the structure of a string that adheres
9
+ * to the kebab-case standard. It is typically used in contexts
10
+ * where consistent, hyphen-delimited identifiers are required.
11
+ */
12
+ type KebabCaseString$1 = {
13
+ _type: 'kebab';
14
+ value: string;
15
+ equals: (other: KebabCaseString$1) => boolean;
16
+ toString: () => string;
17
+ };
18
+ /**
19
+ * Builder interface for constructing KebabCaseString objects.
20
+ * Provides a fluent API for setting and validating Kebab case strings.
21
+ */
22
+ type KebabCaseStringBuilder = {
23
+ /**
24
+ * Sets the value of the KebabCaseString.
25
+ * @param value - The string value in Kebab case format
26
+ * @returns The builder instance for method chaining
27
+ * @throws {RangeError} If the input is not in Kebab case format
28
+ */
29
+ withValue: (value: string) => KebabCaseStringBuilder;
30
+ /**
31
+ * Resets the builder to its default state, clearing the current value.
32
+ * @returns The builder instance for method chaining
33
+ */
34
+ reset: () => KebabCaseStringBuilder;
35
+ /**
36
+ * Constructs and returns the final KebabCaseString object.
37
+ * @returns The constructed KebabCaseString object
38
+ * @throws {SyntaxError} If no value has been set before building
39
+ */
40
+ build: () => KebabCaseString$1;
41
+ };
42
+ declare namespace KebabCaseString$1 {
43
+ const getBuilder: () => KebabCaseStringBuilder;
44
+ }
45
+ //#endregion
46
+ //#region src/component/id.d.ts
47
+ /**
48
+ * Represents a unique identifier for a component, adhering to a kebab-case format.
49
+ * Provides functionality to compare two ComponentId instances for equality.
50
+ *
51
+ * @typedef {Object} ComponentId
52
+ * @property {KebabCaseString} value - The string representation of the component identifier in kebab-case format.
53
+ * @property {function(ComponentId): boolean} equals - A method to check if the given ComponentId is equal to the current instance.
54
+ */
55
+ type ComponentId = {
56
+ value: KebabCaseString$1;
57
+ equals: (other: ComponentId) => boolean;
58
+ toString: () => string;
59
+ };
60
+ /**
61
+ * Builder interface for constructing ComponentId instances.
62
+ *
63
+ * The builder follows a fluent API pattern, allowing method chaining to configure
64
+ * the component identifier before building the final instance. It validates the
65
+ * component ID upon build and throws a SyntaxError if validation fails.
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * const componentId = getComponentIdBuilder()
70
+ * .withValue(someKebabCaseString)
71
+ * .build();
72
+ * ```
73
+ */
74
+ type ComponentIdBuilder = {
75
+ /**
76
+ * Sets the kebab-case string value for the component identifier.
77
+ *
78
+ * @param {KebabCaseString} value - The kebab-case string value to use for the component ID.
79
+ * @returns {ComponentIdBuilder} The builder instance for method chaining.
80
+ */
81
+ withValue: (value: KebabCaseString$1) => ComponentIdBuilder;
82
+ /**
83
+ * Resets the builder to its default state, clearing all configured values.
84
+ *
85
+ * @returns {ComponentIdBuilder} The builder instance for method chaining.
86
+ */
87
+ reset: () => ComponentIdBuilder;
88
+ /**
89
+ * Constructs and validates the ComponentId instance.
90
+ *
91
+ * @returns {ComponentId} The constructed and validated component identifier.
92
+ * @throws {SyntaxError} If the component ID fails validation.
93
+ */
94
+ build: () => ComponentId;
95
+ };
96
+ //#endregion
97
+ //#region src/values/owner_type.d.ts
98
+ /**
99
+ * Enum representing the type of ownership for an entity.
100
+ *
101
+ * This enumeration can be used to differentiate between entities owned by individuals
102
+ * and those owned by organizations.
103
+ *
104
+ * @enum {string}
105
+ * @readonly
106
+ * @property {string} Personal - Represents ownership by an individual person.
107
+ * @property {string} Organizational - Represents ownership by an organization or group.
108
+ */
109
+ declare enum OwnerType$1 {
110
+ Personal = "Personal",
111
+ Organizational = "Organizational"
112
+ }
113
+ //#endregion
114
+ //#region src/values/owner_id.d.ts
115
+ /**
116
+ * Represents a string that adheres to the OwnerId naming convention.
117
+ * This convention capitalizes the first letter of each concatenated word without any spaces, dashes, or underscores.
118
+ */
119
+ type OwnerId$1 = {
120
+ _type: 'ownerId';
121
+ value: string;
122
+ toString: () => string;
123
+ };
124
+ /**
125
+ * Builder interface for constructing OwnerId objects.
126
+ * Provides a fluent API for setting and validating uuid strings.
127
+ */
128
+ type OwnerIdBuilder = {
129
+ /**
130
+ * Sets the value of the OwnerId.
131
+ * @param value - The string value in uuid format
132
+ * @returns The builder instance for method chaining
133
+ * @throws {RangeError} If the input is not in uuid case format
134
+ */
135
+ withValue: (value: string) => OwnerIdBuilder;
136
+ /**
137
+ * Resets the builder to its default state, clearing the current value.
138
+ * @returns The builder instance for method chaining
139
+ */
140
+ reset: () => OwnerIdBuilder;
141
+ /**
142
+ * Constructs and returns the final OwnerId object.
143
+ * @returns The constructed OwnerId object
144
+ * @throws {SyntaxError} If no value has been set before building
145
+ */
146
+ build: () => OwnerId$1;
147
+ };
148
+ declare namespace OwnerId$1 {
149
+ const getBuilder: () => OwnerIdBuilder;
150
+ }
151
+ //#endregion
152
+ //#region src/bounded_context/id.d.ts
153
+ /**
154
+ * Represents the unique identifier for a bounded context.
155
+ *
156
+ * A bounded context is a distinct and cohesive domain of responsibility
157
+ * within a larger distributed system or domain, and this type
158
+ * provides the necessary information to identify it.
159
+ *
160
+ * @typedef {Object} BoundedContextId
161
+ *
162
+ * @property {OwnerType} ownerType - The type of the owner associated with the bounded context.
163
+ * @property {OwnerId} ownerId - The unique identifier of the owner.
164
+ * @property {KebabCaseString} name - The name of the bounded context, formatted as a kebab-case string.
165
+ */
166
+ type BoundedContextId = {
167
+ _type: 'bounded_context';
168
+ ownerType: OwnerType$1;
169
+ ownerId: OwnerId$1;
170
+ name: KebabCaseString$1;
171
+ equals: (other: BoundedContextId) => boolean;
172
+ toString: () => string;
173
+ };
174
+ /**
175
+ * Builder interface for constructing Id objects.
176
+ * Provides a fluent API for setting and validating bounded context identifiers.
177
+ */
178
+ type BoundedContextIdBuilder = {
179
+ /**
180
+ * Sets the owner type of the Id.
181
+ * @param ownerType - The type of the owner (e.g., Personal, Organization)
182
+ * @returns The builder instance for method chaining
183
+ */
184
+ withOwnerType: (ownerType: OwnerType$1) => BoundedContextIdBuilder;
185
+ /**
186
+ * Sets the owner ID of the Id.
187
+ * @param ownerId - The unique identifier of the owner
188
+ * @returns The builder instance for method chaining
189
+ */
190
+ withOwnerId: (ownerId: OwnerId$1) => BoundedContextIdBuilder;
191
+ /**
192
+ * Sets the name of the Id.
193
+ * @param name - The name in kebab-case format
194
+ * @returns The builder instance for method chaining
195
+ */
196
+ withName: (name: KebabCaseString$1) => BoundedContextIdBuilder;
197
+ /**
198
+ * Resets the builder to its default state, restoring all default values.
199
+ * @returns The builder instance for method chaining
200
+ */
201
+ reset: () => BoundedContextIdBuilder;
202
+ /**
203
+ * Constructs and returns the final Id object.
204
+ * @returns The constructed Id object
205
+ * @throws {SyntaxError} If the resulting Id is invalid
206
+ */
207
+ build: () => BoundedContextId;
208
+ };
209
+ //#endregion
210
+ //#region src/bounded_context/entity.d.ts
211
+ /**
212
+ * Creates a builder for constructing a BoundedContext object with a fluid API.
213
+ *
214
+ * The `getBoundedContextBuilder` function returns an object with methods that allow incremental construction
215
+ * of a `BoundedContext` instance. It ensures validation at the `build()` step and supports resets
216
+ * to default values.
217
+ *
218
+ * @function
219
+ * @returns {BoundedContextBuilder} A builder object for creating a `BoundedContext` instance.
220
+ *
221
+ * @throws {SyntaxError} Thrown when attempting to build a `BoundedContext` instance
222
+ * that is invalid, such as when required fields are not initialized.
223
+ */
224
+ /**
225
+ * Builder interface for constructing BoundedContext objects.
226
+ * Provides a fluent API for setting and validating bounded context properties.
227
+ */
228
+ type BoundedContextBuilder = {
229
+ /**
230
+ * Sets the ID of the BoundedContext.
231
+ * @param id - The unique identifier for the bounded context
232
+ * @returns The builder instance for method chaining
233
+ */
234
+ withId: (id: BoundedContextId) => BoundedContextBuilder;
235
+ /**
236
+ * Sets the display name of the BoundedContext.
237
+ * @param displayName - The human-readable name for the bounded context
238
+ * @returns The builder instance for method chaining
239
+ */
240
+ withDisplayName: (displayName: string) => BoundedContextBuilder;
241
+ /**
242
+ * Sets the description of the BoundedContext.
243
+ * @param description - An optional description providing additional details about the bounded context's purpose or scope
244
+ * @returns The builder instance for method chaining
245
+ */
246
+ withDescription: (description: string) => BoundedContextBuilder;
247
+ /**
248
+ * Resets the builder to its default state, clearing all current values.
249
+ * @returns The builder instance for method chaining
250
+ */
251
+ reset: () => BoundedContextBuilder;
252
+ /**
253
+ * Constructs and returns the final BoundedContext object.
254
+ * @returns The constructed BoundedContext object
255
+ * @throws {SyntaxError} If the bounded context is invalid (e.g., missing required fields)
256
+ */
257
+ build: () => BoundedContext$1;
258
+ };
259
+ //#endregion
260
+ //#region src/bounded_context/index.d.ts
261
+ declare namespace BoundedContext$1 {
262
+ type Id = BoundedContextId;
263
+ namespace Id {
264
+ type Builder = BoundedContextIdBuilder;
265
+ const getBuilder: () => BoundedContextIdBuilder;
266
+ }
267
+ type Builder = BoundedContextBuilder;
268
+ const getBuilder: () => BoundedContextBuilder;
269
+ }
270
+ /**
271
+ * A Bounded Context in Fractal Cloud is the mechanism that:
272
+ * - Maps infrastructure to business domains
273
+ * - Defines ownership and access boundaries
274
+ * - Enables self-service without sacrificing control
275
+ * - Allows large organizations to scale Fractal usage safely
276
+ *
277
+ * @typedef {Object} BoundedContext
278
+ * @property {BoundedContext.Id} id - A unique identifier for the bounded context.
279
+ * @property {string} displayName - A human-readable name for the bounded context.
280
+ * @property {string} [description] - An optional description providing additional details about the bounded context's purpose or scope.
281
+ */
282
+ type BoundedContext$1 = {
283
+ id: BoundedContext$1.Id;
284
+ displayName: string;
285
+ description?: string;
286
+ };
287
+ //#endregion
288
+ //#region src/values/version.d.ts
289
+ /**
290
+ * Represents a semantic version following the major.minor.patch format.
291
+ *
292
+ * This type is used to define a version number, where:
293
+ * - `major` indicates the major version, typically incremented for incompatible API changes.
294
+ * - `minor` indicates the minor version, incremented for backwards-compatible enhancements or features.
295
+ * - `patch` indicates the patch version, incremented for backwards-compatible bug fixes.
296
+ */
297
+ type Version$1 = {
298
+ major: number;
299
+ minor: number;
300
+ patch: number;
301
+ equals: (other: Version$1) => boolean;
302
+ toString: () => string;
303
+ };
304
+ /**
305
+ * Builder interface for constructing version objects.
306
+ * Provides a fluent API for setting version components.
307
+ */
308
+ type VersionBuilder = {
309
+ /**
310
+ * Sets the major version number.
311
+ * @param major - The major version number
312
+ * @returns The builder instance for method chaining
313
+ */
314
+ withMajor: (major: number) => VersionBuilder;
315
+ /**
316
+ * Sets the minor version number.
317
+ * @param minor - The minor version number
318
+ * @returns The builder instance for method chaining
319
+ */
320
+ withMinor: (minor: number) => VersionBuilder;
321
+ /**
322
+ * Sets the patch version number.
323
+ * @param patch - The patch version number
324
+ * @returns The builder instance for method chaining
325
+ */
326
+ withPatch: (patch: number) => VersionBuilder;
327
+ /**
328
+ * Resets the version to default values (0.0.0).
329
+ * @returns The builder instance for method chaining
330
+ */
331
+ reset: () => VersionBuilder;
332
+ /**
333
+ * Constructs and returns the final version object.
334
+ * @returns The constructed Version object
335
+ * @throws {SyntaxError} If the version is not initialized
336
+ */
337
+ build: () => Version$1;
338
+ };
339
+ declare namespace Version$1 {
340
+ const getBuilder: () => VersionBuilder;
341
+ }
342
+ //#endregion
343
+ //#region src/fractal/id.d.ts
344
+ /**
345
+ * Represents a unique identifier for a fractal within a system.
346
+ * The FractalId consists of a bounded context identifier, a name in kebab case,
347
+ * a version, and a string representation method.
348
+ *
349
+ * @typedef {Object} FractalId
350
+ * @property {BoundedContext.Id} boundedContextId - The identifier for the bounded context to which the fractal belongs.
351
+ * @property {KebabCaseString} name - The name of the fractal represented in kebab-case format.
352
+ * @property {Version} version - The version of the fractal.
353
+ * @property {function(): string} toString - Returns a string representation of the FractalId.
354
+ */
355
+ type FractalId = {
356
+ boundedContextId: BoundedContext$1.Id;
357
+ name: KebabCaseString$1;
358
+ version: Version$1;
359
+ equals: (other: FractalId) => boolean;
360
+ toString: () => string;
361
+ };
362
+ /**
363
+ * Represents a builder for creating and configuring instances of a FractalId.
364
+ * This builder follows a fluent API design, enabling chaining of methods
365
+ * for greater flexibility and readability.
366
+ */
367
+ type FractalIdBuilder = {
368
+ /**
369
+ * Assigns a bounded context identifier to the FractalIdBuilder.
370
+ *
371
+ * @param {BoundedContext.Id} value - The unique identifier for the bounded context to be associated.
372
+ * @returns {FractalIdBuilder} The updated instance of FractalIdBuilder with the specified bounded context ID applied.
373
+ */
374
+ withBoundedContextId: (value: BoundedContext$1.Id) => FractalIdBuilder;
375
+ /**
376
+ * Assigns a name, in kebab-case format, to the current Fractal ID being constructed.
377
+ *
378
+ * @param {KebabCaseString} name - The name to associate with the Fractal ID. Must follow kebab-case formatting.
379
+ * @returns {FractalIdBuilder} The updated builder instance, allowing for method chaining.
380
+ */
381
+ withName: (name: KebabCaseString$1) => FractalIdBuilder;
382
+ /**
383
+ * Sets the version information for the FractalIdBuilder instance.
384
+ *
385
+ * @param {Version} version - The version to be associated with the Fractal ID.
386
+ * @returns {FractalIdBuilder} The updated instance of FractalIdBuilder with the specified version.
387
+ */
388
+ withVersion: (version: Version$1) => FractalIdBuilder;
389
+ /**
390
+ * Resets the state of the current FractalIdBuilder instance to its initial default configuration.
391
+ * This method is typically used to clear any modifications made and start fresh.
392
+ *
393
+ * @returns {FractalIdBuilder} The current instance of FractalIdBuilder for method chaining.
394
+ */
395
+ reset: () => FractalIdBuilder;
396
+ /**
397
+ * Generates a FractalId object based on the current state or configuration.
398
+ *
399
+ * The `build` function serves to construct and return a fully initialized
400
+ * instance of a FractalId. This function encapsulates the logic needed
401
+ * to assemble the FractalId, ensuring all necessary components are properly
402
+ * configured and validated before being returned.
403
+ *
404
+ * @returns {FractalId} A fully constructed FractalId object.
405
+ */
406
+ build: () => FractalId;
407
+ };
408
+ //#endregion
409
+ //#region src/values/pascal_case_string.d.ts
410
+ /**
411
+ * Represents a string that adheres to the PascalCase naming convention.
412
+ * This convention capitalizes the first letter of each concatenated word without any spaces, dashes, or underscores.
413
+ * Commonly used in naming conventions for programming constructs such as types, classes, or enums.
414
+ */
415
+ type PascalCaseString$1 = {
416
+ _type: 'pascal';
417
+ value: string;
418
+ equals: (other: PascalCaseString$1) => boolean;
419
+ toString: () => string;
420
+ };
421
+ /**
422
+ * Builder interface for constructing PascalCaseString objects.
423
+ * Provides a fluent API for setting and validating Pascal case strings.
424
+ */
425
+ type PascalCaseStringBuilder = {
426
+ /**
427
+ * Sets the value of the PascalCaseString.
428
+ * @param value - The string value in Pascal case format
429
+ * @returns The builder instance for method chaining
430
+ * @throws {RangeError} If the input is not in Pascal case format
431
+ */
432
+ withValue: (value: string) => PascalCaseStringBuilder;
433
+ /**
434
+ * Resets the builder to its default state, clearing the current value.
435
+ * @returns The builder instance for method chaining
436
+ */
437
+ reset: () => PascalCaseStringBuilder;
438
+ /**
439
+ * Constructs and returns the final PascalCaseString object.
440
+ * @returns The constructed PascalCaseString object
441
+ * @throws {SyntaxError} If no value has been set before building
442
+ */
443
+ build: () => PascalCaseString$1;
444
+ };
445
+ declare namespace PascalCaseString$1 {
446
+ const getBuilder: () => PascalCaseStringBuilder;
447
+ }
448
+ //#endregion
449
+ //#region src/values/infrastructure_domain.d.ts
450
+ /**
451
+ * Enumeration representing various infrastructure domains.
452
+ * These domains categorize components or services
453
+ * within an infrastructure system.
454
+ *
455
+ * @enum {string}
456
+ * @property {string} ApiManagement - Represents API management-related components.
457
+ * @property {string} NetworkAndCompute - Represents network and compute components.
458
+ * @property {string} CustomWorkloads - Represents custom workload components.
459
+ * @property {string} Messaging - Represents messaging and communication components.
460
+ * @property {string} Storage - Represents data storage components.
461
+ * @property {string} Observability - Represents observability tools and monitoring components.
462
+ * @property {string} Security - Represents security-focused components.
463
+ */
464
+ declare enum InfrastructureDomain$1 {
465
+ ApiManagement = "APIManagement",
466
+ NetworkAndCompute = "NetworkAndCompute",
467
+ CustomWorkloads = "CustomWorkloads",
468
+ Messaging = "Messaging",
469
+ Storage = "Storage",
470
+ Observability = "Observability",
471
+ Security = "Security"
472
+ }
473
+ //#endregion
474
+ //#region src/component/type.d.ts
475
+ /**
476
+ * Describes a component type within a specific infrastructure domain.
477
+ *
478
+ * This type represents a blueprint for defining components by associating
479
+ * a domain category and a specific name in PascalCase format.
480
+ *
481
+ * @typedef {Object} ComponentType
482
+ * @property {InfrastructureDomain} domain - The domain category to which the component belongs.
483
+ * @property {PascalCaseString} name - The name of the component, formatted using PascalCase.
484
+ */
485
+ type ComponentType = {
486
+ domain: InfrastructureDomain$1;
487
+ name: PascalCaseString$1;
488
+ };
489
+ /**
490
+ * A builder interface for constructing Type objects in a fluent and type-safe manner.
491
+ *
492
+ * The TypeBuilder provides methods to configure a Type's properties step-by-step,
493
+ * validate the configuration, and produce an immutable Type instance. It follows
494
+ * the builder pattern, allowing method chaining for a more readable API.
495
+ *
496
+ * @typedef {Object} ComponentTypeBuilder
497
+ */
498
+ type ComponentTypeBuilder = {
499
+ /**
500
+ * Sets the infrastructure domain for the type being built.
501
+ *
502
+ * @param {InfrastructureDomain} domain - The infrastructure domain to associate with the type.
503
+ * @returns {ComponentTypeBuilder} The builder instance for method chaining.
504
+ */
505
+ withInfrastructureDomain: (domain: InfrastructureDomain$1) => ComponentTypeBuilder;
506
+ /**
507
+ * Sets the PascalCase name for the type being built.
508
+ *
509
+ * @param {PascalCaseString} name - The PascalCase formatted name for the type.
510
+ * @returns {ComponentTypeBuilder} The builder instance for method chaining.
511
+ */
512
+ withName: (name: PascalCaseString$1) => ComponentTypeBuilder;
513
+ /**
514
+ * Resets the builder's internal state to default values.
515
+ *
516
+ * This method clears all previously configured properties and returns
517
+ * the builder to its initial state, allowing it to be reused for
518
+ * constructing a new Type instance.
519
+ *
520
+ * @returns {ComponentTypeBuilder} The builder instance for method chaining.
521
+ */
522
+ reset: () => ComponentTypeBuilder;
523
+ /**
524
+ * Validates and constructs the final Type object.
525
+ *
526
+ * This method performs validation on the configured properties to ensure
527
+ * the Type is valid (domain must be initialized and name must be in PascalCase).
528
+ * If validation fails, a SyntaxError is thrown.
529
+ *
530
+ * @returns {ComponentType} An immutable Type instance with the configured properties.
531
+ * @throws {SyntaxError} If the type configuration is invalid.
532
+ */
533
+ build: () => ComponentType;
534
+ };
535
+ //#endregion
536
+ //#region src/values/generic_parameters.d.ts
537
+ /**
538
+ * Represents a type definition for Parameters, which provides methods to retrieve required
539
+ * and optional fields by their corresponding names.
540
+ *
541
+ * @typedef {Object} GenericParameters
542
+ *
543
+ * @property {Function} getRequiredFieldByName - Retrieves a required field by its name.
544
+ * Expects a string as input representing the field name and returns a record where keys
545
+ * are of type string and values are objects.
546
+ *
547
+ * @property {Function} getOptionalFieldByName - Retrieves an optional field by its name.
548
+ * Expects a string as input representing the field name and returns a record where keys
549
+ * are of type string and values are objects.
550
+ */
551
+ type GenericParameters = {
552
+ getRequiredFieldByName: (name: string) => Record<string, object>;
553
+ getOptionalFieldByName: (name: string) => Record<string, object>;
554
+ getAllFieldNames: () => string[];
555
+ push: (key: string, value: Record<string, object>) => void;
556
+ remove: (key: string) => void;
557
+ toMap: () => Record<string, object>;
558
+ };
559
+ //#endregion
560
+ //#region src/component/link.d.ts
561
+ /**
562
+ * Represents a link object with an identifier, type, and associated parameters.
563
+ *
564
+ * @typedef {Object} ComponentLink
565
+ * @property {ComponentId} id - The unique identifier for the link.
566
+ * @property {ComponentType} type - The type of the link, indicating its category or purpose.
567
+ * @property {Link.Parameters} parameters - A dictionary of configuration parameters,
568
+ * where keys are setting names and values are their corresponding configuration objects.
569
+ */
570
+ type ComponentLink = {
571
+ id: ComponentId;
572
+ type: ComponentType;
573
+ parameters: Component.Link.Parameters;
574
+ };
575
+ /**
576
+ * A builder interface for constructing ComponentLink objects in a fluent and type-safe manner.
577
+ *
578
+ * The LinkBuilder provides methods to configure a ComponentLink's properties step-by-step,
579
+ * validate the configuration, and produce an immutable ComponentLink instance. It follows
580
+ * the builder pattern, allowing method chaining for a more readable API.
581
+ *
582
+ * @typedef {Object} LinkBuilder
583
+ */
584
+ type LinkBuilder = {
585
+ /**
586
+ * Sets the identifier for the link being built.
587
+ *
588
+ * @param {ComponentId} id - The unique identifier to associate with the link.
589
+ * @returns {LinkBuilder} The builder instance for method chaining.
590
+ */
591
+ withId: (id: ComponentId) => LinkBuilder;
592
+ /**
593
+ * Sets the type for the link being built.
594
+ *
595
+ * @param {ComponentType} type - The type to associate with the link.
596
+ * @returns {LinkBuilder} The builder instance for method chaining.
597
+ */
598
+ withType: (type: ComponentType) => LinkBuilder;
599
+ /**
600
+ * Sets the parameters for the link being built.
601
+ *
602
+ * @param {Link.Parameters} parameters - The configuration parameters to associate with the link.
603
+ * @returns {LinkBuilder} The builder instance for method chaining.
604
+ */
605
+ withParameters: (parameters: Component.Link.Parameters) => LinkBuilder;
606
+ /**
607
+ * Resets the builder's internal state to default values.
608
+ *
609
+ * This method clears all previously configured properties and returns
610
+ * the builder to its initial state, allowing it to be reused for
611
+ * constructing a new ComponentLink instance.
612
+ *
613
+ * @returns {LinkBuilder} The builder instance for method chaining.
614
+ */
615
+ reset: () => LinkBuilder;
616
+ /**
617
+ * Validates and constructs the final ComponentLink object.
618
+ *
619
+ * This method performs validation on the configured properties to ensure
620
+ * the ComponentLink is valid (id must be initialized and type must be valid).
621
+ * If validation fails, a SyntaxError is thrown.
622
+ *
623
+ * @returns {ComponentLink} An immutable ComponentLink instance with the configured properties.
624
+ * @throws {SyntaxError} If the link configuration is invalid.
625
+ */
626
+ build: () => ComponentLink;
627
+ };
628
+ //#endregion
629
+ //#region src/component/dependency.d.ts
630
+ /**
631
+ * Represents a dependency with a specified type.
632
+ *
633
+ * This type can be used to define a specific dependency structure
634
+ * where the `type` property indicates the category or classification
635
+ * of the dependency.
636
+ *
637
+ * @typedef {Object} ComponentDependency
638
+ * @property {Type} type - Specifies the type of the dependency.
639
+ */
640
+ type ComponentDependency = {
641
+ type: ComponentType;
642
+ };
643
+ //#endregion
644
+ //#region src/component/entity.d.ts
645
+ /**
646
+ * Represents an object structure where the `value` field contains
647
+ * a record of key-value pairs. The keys are strings, and the values
648
+ * are objects.
649
+ *
650
+ * This type is typically used to structure output data and ensure
651
+ * a consistent schema in which string keys map to object values.
652
+ *
653
+ * Example usage of this type might involve representing data returned
654
+ * from a service or API, where the output follows a defined format.
655
+ */
656
+ type ComponentOutputFields = {
657
+ value: Record<string, object>;
658
+ };
659
+ /**
660
+ * A builder interface for constructing Component objects in a fluent and type-safe manner.
661
+ *
662
+ * The ComponentBuilder provides methods to configure a Component's properties step-by-step,
663
+ * validate the configuration, and produce an immutable Component instance. It follows
664
+ * the builder pattern, allowing method chaining for a more readable API.
665
+ *
666
+ * @typedef {Object} ComponentBuilder
667
+ */
668
+ type ComponentBuilder = {
669
+ /**
670
+ * Sets the type for the component being built.
671
+ *
672
+ * @param {ComponentType} type - The type to associate with the component.
673
+ * @returns {ComponentBuilder} The builder instance for method chaining.
674
+ */
675
+ withType: (type: ComponentType) => ComponentBuilder;
676
+ /**
677
+ * Sets the identifier for the component being built.
678
+ *
679
+ * @param {ComponentId} id - The unique identifier to associate with the component.
680
+ * @returns {ComponentBuilder} The builder instance for method chaining.
681
+ */
682
+ withId: (id: ComponentId) => ComponentBuilder;
683
+ /**
684
+ * Sets the version for the component being built.
685
+ *
686
+ * @param {Version} version - The version to associate with the component.
687
+ * @returns {ComponentBuilder} The builder instance for method chaining.
688
+ */
689
+ withVersion: (version: Version$1) => ComponentBuilder;
690
+ /**
691
+ * Sets the display name for the component being built.
692
+ *
693
+ * @param {string} displayName - The display name to associate with the component.
694
+ * @returns {ComponentBuilder} The builder instance for method chaining.
695
+ */
696
+ withDisplayName: (displayName: string) => ComponentBuilder;
697
+ /**
698
+ * Sets the description for the component being built.
699
+ *
700
+ * @param {string} description - The description to associate with the component.
701
+ * @returns {ComponentBuilder} The builder instance for method chaining.
702
+ */
703
+ withDescription: (description: string) => ComponentBuilder;
704
+ /**
705
+ * Sets the parameters for the component being built.
706
+ *
707
+ * @param {Component.Parameters} parameters - The parameters to associate with the component.
708
+ * @returns {ComponentBuilder} The builder instance for method chaining.
709
+ */
710
+ withParameters: (parameters: Component.Parameters) => ComponentBuilder;
711
+ /**
712
+ * Sets the links for the component being built.
713
+ *
714
+ * @param {ComponentLink[]} links - The links to associate with the component.
715
+ * @returns {ComponentBuilder} The builder instance for method chaining.
716
+ */
717
+ withLinks: (links: ComponentLink[]) => ComponentBuilder;
718
+ /**
719
+ * Sets the dependencies for the component being built.
720
+ *
721
+ * @param {Dependency[]} dependencies - The dependencies to associate with the component.
722
+ * @returns {ComponentBuilder} The builder instance for method chaining.
723
+ */
724
+ withDependencies: (dependencies: ComponentDependency[]) => ComponentBuilder;
725
+ /**
726
+ * Resets the builder's internal state to default values.
727
+ *
728
+ * This method clears all previously configured properties and returns
729
+ * the builder to its initial state, allowing it to be reused for
730
+ * constructing a new Component instance.
731
+ *
732
+ * @returns {ComponentBuilder} The builder instance for method chaining.
733
+ */
734
+ reset: () => ComponentBuilder;
735
+ /**
736
+ * Validates and constructs the final Component object.
737
+ *
738
+ * This method performs validation on the configured properties to ensure
739
+ * the Component is valid (id, type, version, and display name must be valid).
740
+ * If validation fails, a SyntaxError is thrown.
741
+ *
742
+ * @returns {Component} An immutable Component instance with the configured properties.
743
+ * @throws {SyntaxError} If the component configuration is invalid.
744
+ */
745
+ build: () => Component;
746
+ };
747
+ //#endregion
748
+ //#region src/component/index.d.ts
749
+ declare namespace Component {
750
+ type Type = ComponentType;
751
+ namespace Type {
752
+ type Builder = ComponentTypeBuilder;
753
+ const getBuilder: () => ComponentTypeBuilder;
754
+ }
755
+ type Parameters = GenericParameters;
756
+ namespace Parameters {
757
+ const getInstance: () => GenericParameters;
758
+ }
759
+ type Link = ComponentLink;
760
+ namespace Link {
761
+ type Builder = LinkBuilder;
762
+ type Parameters = GenericParameters;
763
+ namespace Parameters {
764
+ const getInstance: () => GenericParameters;
765
+ }
766
+ const getBuilder: () => LinkBuilder;
767
+ }
768
+ type Id = ComponentId;
769
+ namespace Id {
770
+ type Builder = ComponentIdBuilder;
771
+ const getBuilder: () => ComponentIdBuilder;
772
+ }
773
+ type OutputFields = ComponentOutputFields;
774
+ type Builder = ComponentBuilder;
775
+ type Dependency = ComponentDependency;
776
+ const getBuilder: () => ComponentBuilder;
777
+ }
778
+ type Component = {
779
+ type: Component.Type;
780
+ id: Component.Id;
781
+ version: Version$1;
782
+ displayName: string;
783
+ description: string;
784
+ parameters: Component.Parameters;
785
+ outputFields: Component.OutputFields;
786
+ links: Component.Link[];
787
+ dependencies: Component.Dependency[];
788
+ };
789
+ //#endregion
790
+ //#region src/values/service_delivery_model.d.ts
791
+ /**
792
+ * Enum representing the different types of service delivery models in cloud computing.
793
+ *
794
+ * @enum {string}
795
+ * @readonly
796
+ * @property {string} IaaS Infrastructure as a Service - A model that provides virtualized computing infrastructure over the internet.
797
+ * @property {string} CaaS Container as a Service - A model focused on deploying and managing containers as a service.
798
+ * @property {string} PaaS Platform as a Service - A cloud model that provides a platform allowing users to develop, run, and manage applications without dealing with the underlying infrastructure.
799
+ * @property {string} FaaS Function as a Service - A serverless model where cloud functions are executed in response to events.
800
+ * @property {string} SaaS Software as a Service - A model in which software applications are delivered over the internet on a subscription basis.
801
+ */
802
+ declare enum ServiceDeliveryModel$1 {
803
+ IaaS = "IaaS",
804
+ CaaS = "CaaS",
805
+ PaaS = "PaaS",
806
+ FaaS = "FaaS",
807
+ SaaS = "SaaS"
808
+ }
809
+ //#endregion
810
+ //#region src/fractal/component/type.d.ts
811
+ /**
812
+ * Represents a blueprint component type that extends the base `Component.Type`
813
+ * with additional properties and modifications. This type omits the `equals`
814
+ * method from `Component.Type` and introduces its own implementation, along
815
+ * with a custom `serviceDeliveryModel` property.
816
+ *
817
+ * BlueprintComponentType provides a way to define a component's blueprint with
818
+ * a specific service delivery model while also enabling object equality
819
+ * comparisons customized to the requirements of blueprint components.
820
+ *
821
+ * Properties:
822
+ * - Inherits all properties from `Component.Type` except for the `equals` method.
823
+ * - Adds a `serviceDeliveryModel` property to specify how the service is delivered.
824
+ * - Reimplements the `equals` method for comparing two blueprint component types.
825
+ */
826
+ type BlueprintComponentType = Component.Type & {
827
+ serviceDeliveryModel: ServiceDeliveryModel$1;
828
+ toString: () => string;
829
+ };
830
+ /**
831
+ * A builder interface for constructing Type objects in a fluent and type-safe manner.
832
+ *
833
+ * The TypeBuilder provides methods to configure a Type's properties step-by-step,
834
+ * validate the configuration, and produce an immutable Type instance. It follows
835
+ * the builder pattern, allowing method chaining for a more readable API.
836
+ *
837
+ * @typedef {Object} BlueprintComponentTypeBuilder
838
+ */
839
+ type BlueprintComponentTypeBuilder = {
840
+ /**
841
+ * Sets the infrastructure domain for the type being built.
842
+ *
843
+ * @param {InfrastructureDomain} domain - The infrastructure domain to associate with the type.
844
+ * @returns {BlueprintComponentTypeBuilder} The builder instance for method chaining.
845
+ */
846
+ withInfrastructureDomain: (domain: InfrastructureDomain$1) => BlueprintComponentTypeBuilder;
847
+ /**
848
+ * Configures the builder to use the specified service delivery model.
849
+ *
850
+ * @param {ServiceDeliveryModel} serviceDeliveryModel - The service delivery model to be applied during the building process.
851
+ * @returns {BlueprintComponentTypeBuilder} The builder instance for chaining additional configurations.
852
+ */
853
+ withServiceDeliveryModel: (serviceDeliveryModel: ServiceDeliveryModel$1) => BlueprintComponentTypeBuilder;
854
+ /**
855
+ * Sets the PascalCase name for the type being built.
856
+ *
857
+ * @param {PascalCaseString} name - The PascalCase formatted name for the type.
858
+ * @returns {BlueprintComponentTypeBuilder} The builder instance for method chaining.
859
+ */
860
+ withName: (name: PascalCaseString$1) => BlueprintComponentTypeBuilder;
861
+ /**
862
+ * Resets the builder's internal state to default values.
863
+ *
864
+ * This method clears all previously configured properties and returns
865
+ * the builder to its initial state, allowing it to be reused for
866
+ * constructing a new Type instance.
867
+ *
868
+ * @returns {BlueprintComponentTypeBuilder} The builder instance for method chaining.
869
+ */
870
+ reset: () => BlueprintComponentTypeBuilder;
871
+ /**
872
+ * Validates and constructs the final Type object.
873
+ *
874
+ * This method performs validation on the configured properties to ensure
875
+ * the Type is valid (domain must be initialized and name must be in PascalCase).
876
+ * If validation fails, a SyntaxError is thrown.
877
+ *
878
+ * @returns {BlueprintComponentType} An immutable Type instance with the configured properties.
879
+ * @throws {SyntaxError} If the type configuration is invalid.
880
+ */
881
+ build: () => BlueprintComponentType;
882
+ };
883
+ //#endregion
884
+ //#region src/fractal/component/dependency.d.ts
885
+ /**
886
+ * Represents a dependency for a blueprint component.
887
+ *
888
+ * This type defines the structure to describe a single dependency within a blueprint system for component-based architectures.
889
+ *
890
+ * Properties:
891
+ * - `id`: The unique identifier of the component that is required as a dependency.
892
+ */
893
+ type BlueprintComponentDependency = {
894
+ id: Component.Id;
895
+ };
896
+ //#endregion
897
+ //#region src/fractal/component/entity.d.ts
898
+ /**
899
+ * A type representing a builder for constructing a blueprint component.
900
+ * The builder pattern allows for configuring and constructing complex
901
+ * instances of blueprint components with a fluent API. Each method in
902
+ * this builder performs a configuration step, returning the builder instance
903
+ * to enable method chaining. Once fully configured, the `build` method finalizes
904
+ * the construction process and returns an immutable component instance.
905
+ */
906
+ type BlueprintComponentBuilder = {
907
+ /**
908
+ * Sets the type for the component being built.
909
+ *
910
+ * @param {BlueprintComponentType} type - The type to associate with the component.
911
+ * @returns {BlueprintComponentBuilder} The builder instance for method chaining.
912
+ */
913
+ withType: (type: BlueprintComponentType) => BlueprintComponentBuilder;
914
+ /**
915
+ * Sets the identifier for the component being built.
916
+ *
917
+ * @param {Component.Id} id - The unique identifier to associate with the component.
918
+ * @returns {BlueprintComponentBuilder} The builder instance for method chaining.
919
+ */
920
+ withId: (id: Component.Id) => BlueprintComponentBuilder;
921
+ /**
922
+ * Sets the version for the component being built.
923
+ *
924
+ * @param {Version} version - The version to associate with the component.
925
+ * @returns {BlueprintComponentBuilder} The builder instance for method chaining.
926
+ */
927
+ withVersion: (version: Version$1) => BlueprintComponentBuilder;
928
+ /**
929
+ * Sets the display name for the component being built.
930
+ *
931
+ * @param {string} displayName - The display name to associate with the component.
932
+ * @returns {BlueprintComponentBuilder} The builder instance for method chaining.
933
+ */
934
+ withDisplayName: (displayName: string) => BlueprintComponentBuilder;
935
+ /**
936
+ * Sets the description for the component being built.
937
+ *
938
+ * @param {string} description - The description to associate with the component.
939
+ * @returns {BlueprintComponentBuilder} The builder instance for method chaining.
940
+ */
941
+ withDescription: (description: string) => BlueprintComponentBuilder;
942
+ /**
943
+ * Sets the parameters for the component being built.
944
+ *
945
+ * @param {Component.Parameters} parameters - The parameters to associate with the component.
946
+ * @returns {BlueprintComponentBuilder} The builder instance for method chaining.
947
+ */
948
+ withParameters: (parameters: Component.Parameters) => BlueprintComponentBuilder;
949
+ /**
950
+ * Sets the links for the component being built.
951
+ *
952
+ * @param {Component.Link[]} links - The links to associate with the component.
953
+ * @returns {BlueprintComponentBuilder} The builder instance for method chaining.
954
+ */
955
+ withLinks: (links: Component.Link[]) => BlueprintComponentBuilder;
956
+ /**
957
+ * Adds a list of dependencies to the BlueprintComponentBuilder.
958
+ *
959
+ * This function allows specifying dependencies that the component requires
960
+ * to function correctly. Each dependency is passed as a
961
+ * BlueprintComponentDependency object, which provides the necessary
962
+ * details of the dependency.
963
+ *
964
+ * @param {BlueprintComponentDependency[]} dependencies - An array of objects
965
+ * representing the component's dependencies.
966
+ * @returns {BlueprintComponentBuilder} The updated instance of the
967
+ * BlueprintComponentBuilder with the specified dependencies included.
968
+ */
969
+ withDependencies: (dependencies: BlueprintComponentDependency[]) => BlueprintComponentBuilder;
970
+ /**
971
+ * Adds or updates the `isLocked` attribute for the blueprint component.
972
+ *
973
+ * @param {boolean} value - Determines whether the component should be marked as locked.
974
+ * Pass `true` to lock the component or `false` to unlock it.
975
+ * @returns {BlueprintComponentBuilder} The instance of the blueprint component builder for method chaining.
976
+ */
977
+ withIsLocked: (value: boolean) => BlueprintComponentBuilder;
978
+ /**
979
+ * Configures the builder to recreate the component upon encountering a failure.
980
+ *
981
+ * @param {boolean} value - A boolean flag indicating whether the component should be recreated on failure.
982
+ * If true, the builder will regenerate the component when a failure occurs.
983
+ * @returns {BlueprintComponentBuilder} The builder instance for method chaining.
984
+ */
985
+ withRecreateOnFailure: (value: boolean) => BlueprintComponentBuilder;
986
+ /**
987
+ * Resets the builder's internal state to default values.
988
+ *
989
+ * This method clears all previously configured properties and returns
990
+ * the builder to its initial state, allowing it to be reused for
991
+ * constructing a new Component instance.
992
+ *
993
+ * @returns {BlueprintComponentBuilder} The builder instance for method chaining.
994
+ */
995
+ reset: () => BlueprintComponentBuilder;
996
+ /**
997
+ * Validates and constructs the final Component object.
998
+ *
999
+ * This method performs validation on the configured properties to ensure
1000
+ * the Component is valid (id, type, version, and display name must be valid).
1001
+ * If validation fails, a SyntaxError is thrown.
1002
+ *
1003
+ * @returns {BlueprintComponent} An immutable Component instance with the configured properties.
1004
+ * @throws {SyntaxError} If the component configuration is invalid.
1005
+ */
1006
+ build: () => BlueprintComponent;
1007
+ };
1008
+ //#endregion
1009
+ //#region src/fractal/component/index.d.ts
1010
+ declare namespace BlueprintComponent {
1011
+ type Type = BlueprintComponentType;
1012
+ namespace Type {
1013
+ type Builder = BlueprintComponentTypeBuilder;
1014
+ const getBuilder: () => BlueprintComponentTypeBuilder;
1015
+ }
1016
+ type Id = Component.Id;
1017
+ namespace Id {
1018
+ type Builder = Component.Id.Builder;
1019
+ const getBuilder: () => ComponentIdBuilder;
1020
+ }
1021
+ type Builder = BlueprintComponentBuilder;
1022
+ type Dependency = BlueprintComponentDependency;
1023
+ const getBuilder: () => BlueprintComponentBuilder;
1024
+ }
1025
+ type BlueprintComponent = Omit<Component, 'type' | 'dependencies'> & {
1026
+ type: BlueprintComponent.Type;
1027
+ dependencies: BlueprintComponent.Dependency[];
1028
+ isLocked: boolean;
1029
+ recreateOnFailure: boolean;
1030
+ };
1031
+ //#endregion
1032
+ //#region src/values/service_account_id.d.ts
1033
+ /**
1034
+ * Represents a unique identifier for a service account.
1035
+ *
1036
+ * This type is used to encapsulate the value of a service account's unique ID as a string.
1037
+ */
1038
+ type ServiceAccountId$1 = {
1039
+ serviceAccountIdValue: string;
1040
+ };
1041
+ /**
1042
+ * A builder type to facilitate the construction of a `ServiceAccountId` object.
1043
+ * Provides methods for setting values, resetting the builder's state, and creating the final `ServiceAccountId`.
1044
+ */
1045
+ type ServiceAccountIdBuilder = {
1046
+ /**
1047
+ * Sets a value to the builder for constructing a ServiceAccountId.
1048
+ *
1049
+ * @param {string} value - The value to be assigned to the builder.
1050
+ * @returns {ServiceAccountIdBuilder} The instance of the builder with the specified value set.
1051
+ */
1052
+ withValue: (value: string) => ServiceAccountIdBuilder;
1053
+ /**
1054
+ * Resets the current state of the ServiceAccountIdBuilder instance, clearing any previously set values
1055
+ * and returning the builder to its initial state.
1056
+ *
1057
+ * @returns {ServiceAccountIdBuilder} The current instance of the ServiceAccountIdBuilder for method chaining.
1058
+ */
1059
+ reset: () => ServiceAccountIdBuilder;
1060
+ /**
1061
+ * A method that initiates the creation or retrieval of a `ServiceAccountId`.
1062
+ *
1063
+ * @function
1064
+ * @returns {ServiceAccountId} - The generated or fetched service account identifier.
1065
+ */
1066
+ build: () => ServiceAccountId$1;
1067
+ };
1068
+ declare namespace ServiceAccountId$1 {
1069
+ const getBuilder: () => ServiceAccountIdBuilder;
1070
+ }
1071
+ //#endregion
1072
+ //#region src/values/service_account_credentials.d.ts
1073
+ /**
1074
+ * Represents the credentials used for a service account.
1075
+ * This includes the service account's unique identifier and secret key.
1076
+ * The credentials are typically used for authenticating and authorizing
1077
+ * access to services or APIs on behalf of the service account.
1078
+ */
1079
+ type ServiceAccountCredentials$1 = {
1080
+ id: ServiceAccountId$1;
1081
+ secret: string;
1082
+ };
1083
+ /**
1084
+ * Represents a builder for creating service account credentials.
1085
+ */
1086
+ type ServiceAccountCredentialsBuilder = {
1087
+ /**
1088
+ * Assigns a specific `ServiceAccountId` to the builder object.
1089
+ *
1090
+ * @param {ServiceAccountId} value - The unique identifier for the service account.
1091
+ * @returns {ServiceAccountCredentialsBuilder} The updated builder instance for chaining.
1092
+ */
1093
+ withId: (value: ServiceAccountId$1) => ServiceAccountCredentialsBuilder;
1094
+ /**
1095
+ * Attaches a secret to the service account credentials builder.
1096
+ *
1097
+ * This method allows you to provide a secret value that will be associated with the
1098
+ * service account credentials being constructed. The secret is typically used
1099
+ * for authentication purposes or secure communication with external services.
1100
+ *
1101
+ * @param {string} value - The secret value to be attached.
1102
+ * @returns {ServiceAccountCredentialsBuilder} The updated instance of the service account credentials builder.
1103
+ */
1104
+ withSecret: (value: string) => ServiceAccountCredentialsBuilder;
1105
+ /**
1106
+ * Resets the current state of the ServiceAccountCredentialsBuilder instance,
1107
+ * clearing any previously set data and restoring it to its initial default state.
1108
+ *
1109
+ * @returns {ServiceAccountCredentialsBuilder} The current instance of the builder for method chaining.
1110
+ */
1111
+ reset: () => ServiceAccountCredentialsBuilder;
1112
+ /**
1113
+ * A function that constructs and returns an instance of ServiceAccountCredentials.
1114
+ * Typically used to build credentials required for authenticating or authorizing
1115
+ * service account interactions.
1116
+ *
1117
+ * @function
1118
+ * @returns {ServiceAccountCredentials} The generated service account credentials.
1119
+ */
1120
+ build: () => ServiceAccountCredentials$1;
1121
+ };
1122
+ declare namespace ServiceAccountCredentials$1 {
1123
+ const getBuilder: () => ServiceAccountCredentialsBuilder;
1124
+ }
1125
+ //#endregion
1126
+ //#region src/fractal/entity.d.ts
1127
+ /**
1128
+ * Represents a builder for creating and configuring Fractal objects.
1129
+ */
1130
+ type FractalBuilder = {
1131
+ /**
1132
+ * Sets the identifier for the fractal using the provided value.
1133
+ *
1134
+ * @param {FractalId} value - The unique identifier to assign to the fractal.
1135
+ * @returns {FractalBuilder} The instance of the FractalBuilder for method chaining.
1136
+ */
1137
+ withId: (value: FractalId) => FractalBuilder;
1138
+ /**
1139
+ * Sets the privacy flag for the FractalBuilder.
1140
+ *
1141
+ * @param {boolean} value - Indicates whether the entity should be marked as private.
1142
+ * @returns {FractalBuilder} The updated instance of the FractalBuilder.
1143
+ */
1144
+ withIsPrivate: (value: boolean) => FractalBuilder;
1145
+ /**
1146
+ * Assigns a description to the fractal being built.
1147
+ *
1148
+ * @param {string} value - The description to associate with the fractal.
1149
+ * @returns {FractalBuilder} The instance of the FractalBuilder to allow method chaining.
1150
+ */
1151
+ withDescription: (value: string) => FractalBuilder;
1152
+ /**
1153
+ * A method used to associate a set of components with a FractalBuilder instance.
1154
+ *
1155
+ * @param {BlueprintComponent[]} value - An array of BlueprintComponent objects to be linked to the FractalBuilder.
1156
+ * @returns {FractalBuilder} The FractalBuilder instance with the specified components applied.
1157
+ */
1158
+ withComponents: (value: BlueprintComponent[]) => FractalBuilder;
1159
+ /**
1160
+ * Assigns a specified BlueprintComponent to the current FractalBuilder instance.
1161
+ *
1162
+ * @param {BlueprintComponent} value - The component to be added to the FractalBuilder.
1163
+ * @returns {FractalBuilder} The updated instance of FractalBuilder for chaining further configurations.
1164
+ */
1165
+ withComponent: (value: BlueprintComponent) => FractalBuilder;
1166
+ /**
1167
+ * Resets the current state of the FractalBuilder to its initial configuration.
1168
+ *
1169
+ * @function
1170
+ * @returns {FractalBuilder} Returns the updated FractalBuilder instance after resetting.
1171
+ */
1172
+ reset: () => FractalBuilder;
1173
+ /**
1174
+ * A function that generates and returns a new instance of a Fractal object.
1175
+ *
1176
+ * This function is typically used to construct complex structures or data
1177
+ * representations that follow a fractal pattern. The returned Fractal object
1178
+ * encapsulates the properties and behaviors associated with the fractal design.
1179
+ *
1180
+ * @function
1181
+ * @returns {Fractal} A newly created instance of a Fractal object.
1182
+ */
1183
+ build: () => Fractal$1;
1184
+ };
1185
+ //#endregion
1186
+ //#region src/fractal/index.d.ts
1187
+ declare namespace Fractal$1 {
1188
+ type Id = FractalId;
1189
+ namespace Id {
1190
+ type Builder = FractalIdBuilder;
1191
+ const getBuilder: () => FractalIdBuilder;
1192
+ }
1193
+ type Component = BlueprintComponent;
1194
+ namespace Component {
1195
+ type Builder = BlueprintComponentBuilder;
1196
+ const getBuilder: () => BlueprintComponentBuilder;
1197
+ namespace Type {
1198
+ type Builder = BlueprintComponentTypeBuilder;
1199
+ const getBuilder: () => BlueprintComponentTypeBuilder;
1200
+ }
1201
+ type Id = BlueprintComponent.Id;
1202
+ namespace Id {
1203
+ type Builder = BlueprintComponent.Id.Builder;
1204
+ const getBuilder: () => ComponentIdBuilder;
1205
+ }
1206
+ }
1207
+ type Builder = FractalBuilder;
1208
+ const getBuilder: () => FractalBuilder;
1209
+ }
1210
+ type Fractal$1 = {
1211
+ id: Fractal$1.Id;
1212
+ isPrivate: boolean;
1213
+ description: string;
1214
+ components: Fractal$1.Component[];
1215
+ deploy: (credentials: ServiceAccountCredentials$1) => Promise<void>;
1216
+ destroy: (credentials: ServiceAccountCredentials$1) => Promise<void>;
1217
+ };
1218
+ //#endregion
1219
+ //#region src/environment/id.d.ts
1220
+ /**
1221
+ * Represents a unique identifier for an environment that includes type, ownership, and name information.
1222
+ *
1223
+ * This type encapsulates the details necessary to uniquely identify an environment,
1224
+ * including its owning entity, a descriptive name, and utility methods to compare
1225
+ * or represent the identifier as a string.
1226
+ *
1227
+ * Properties:
1228
+ * - `ownerType`: Specifies the type of the owner associated with the environment.
1229
+ * - `ownerId`: Uniquely identifies the owner of the environment.
1230
+ * - `name`: The name of the environment formatted as a kebab-case string.
1231
+ *
1232
+ * Methods:
1233
+ * - `equals`: Compares the current environment identifier with another `EnvironmentId` to check if they are identical.
1234
+ * - `toString`: Converts the environment identifier into a string representation.
1235
+ */
1236
+ type EnvironmentId = {
1237
+ _type: 'environment';
1238
+ ownerType: OwnerType$1;
1239
+ ownerId: OwnerId$1;
1240
+ name: KebabCaseString$1;
1241
+ equals: (other: EnvironmentId) => boolean;
1242
+ toString: () => string;
1243
+ };
1244
+ /**
1245
+ * A builder utility to construct an EnvironmentId with various parameters.
1246
+ * Provides a chainable API for setting properties and building the final object.
1247
+ */
1248
+ type EnvironmentIdBuilder = {
1249
+ /**
1250
+ * Sets the owner type of the Id.
1251
+ * @param ownerType - The type of the owner (e.g., Personal, Organization)
1252
+ * @returns The builder instance for method chaining
1253
+ */
1254
+ withOwnerType: (ownerType: OwnerType$1) => EnvironmentIdBuilder;
1255
+ /**
1256
+ * Sets the owner ID of the Id.
1257
+ * @param ownerId - The unique identifier of the owner
1258
+ * @returns The builder instance for method chaining
1259
+ */
1260
+ withOwnerId: (ownerId: OwnerId$1) => EnvironmentIdBuilder;
1261
+ /**
1262
+ * Sets the name of the Id.
1263
+ * @param name - The name in kebab-case format
1264
+ * @returns The builder instance for method chaining
1265
+ */
1266
+ withName: (name: KebabCaseString$1) => EnvironmentIdBuilder;
1267
+ /**
1268
+ * Resets the builder to its default state, restoring all default values.
1269
+ * @returns The builder instance for method chaining
1270
+ */
1271
+ reset: () => EnvironmentIdBuilder;
1272
+ /**
1273
+ * Constructs and returns the final Id object.
1274
+ * @returns The constructed Id object
1275
+ * @throws {SyntaxError} If the resulting Id is invalid
1276
+ */
1277
+ build: () => EnvironmentId;
1278
+ };
1279
+ //#endregion
1280
+ //#region src/environment/entity.d.ts
1281
+ type EnvironmentBuilder = {
1282
+ withId: (id: Environment$1.Id) => EnvironmentBuilder;
1283
+ withParameters: (parameters: Environment$1.Parameters) => EnvironmentBuilder;
1284
+ reset: () => EnvironmentBuilder;
1285
+ build: () => Environment$1;
1286
+ };
1287
+ //#endregion
1288
+ //#region src/environment/index.d.ts
1289
+ declare namespace Environment$1 {
1290
+ type Id = EnvironmentId;
1291
+ namespace Id {
1292
+ type Builder = EnvironmentIdBuilder;
1293
+ const getBuilder: () => EnvironmentIdBuilder;
1294
+ }
1295
+ type Parameters = GenericParameters;
1296
+ type Builder = EnvironmentBuilder;
1297
+ const getBuilder: () => EnvironmentBuilder;
1298
+ }
1299
+ type Environment$1 = {
1300
+ id: Environment$1.Id;
1301
+ parameters: Environment$1.Parameters;
1302
+ };
1303
+ //#endregion
1304
+ //#region src/live_system/id.d.ts
1305
+ /**
1306
+ * Represents the unique identifier for a live system instance in a specific bounded context.
1307
+ *
1308
+ * @typedef {Object} LiveSystemId
1309
+ * @property {BoundedContext.Id} boundedContextId - The identifier of the bounded context associated with the live system.
1310
+ * @property {KebabCaseString} name - The name of the live system in kebab-case format.
1311
+ * @property {function(): string} toString - A method that converts the live system identifier to its string representation.
1312
+ */
1313
+ type LiveSystemId = {
1314
+ boundedContextId: BoundedContext$1.Id;
1315
+ name: KebabCaseString$1;
1316
+ toString: () => string;
1317
+ };
1318
+ /**
1319
+ * A builder for creating instances of LiveSystemId. Allows setting various properties
1320
+ * before producing the final immutable LiveSystemId object.
1321
+ */
1322
+ type LiveSystemIdBuilder = {
1323
+ /**
1324
+ * Sets the bounded context identifier for the live system ID builder.
1325
+ *
1326
+ * This method assigns a specific bounded context ID to the builder, enabling it
1327
+ * to associate the resulting system identifiers with the provided context. The
1328
+ * bounded context ID uniquely identifies the context within which the system
1329
+ * operates, ensuring logical separation and consistency across different systems.
1330
+ *
1331
+ * @param {BoundedContext.Id} value - The unique identifier of the bounded context.
1332
+ * @returns {LiveSystemIdBuilder} The builder instance with the bounded context ID applied.
1333
+ */
1334
+ withBoundedContextId: (value: BoundedContext$1.Id) => LiveSystemIdBuilder;
1335
+ /**
1336
+ * A method that assigns a name to the builder object.
1337
+ *
1338
+ * @param {KebabCaseString} name - The name to be set, formatted as a kebab-case string.
1339
+ * @returns {LiveSystemIdBuilder} Returns an updated instance of the LiveSystemIdBuilder.
1340
+ */
1341
+ withName: (name: KebabCaseString$1) => LiveSystemIdBuilder;
1342
+ /**
1343
+ * Resets the current state of the LiveSystemIdBuilder instance to its initial configuration.
1344
+ *
1345
+ * @returns {LiveSystemIdBuilder} A new instance of LiveSystemIdBuilder with default settings.
1346
+ */
1347
+ reset: () => LiveSystemIdBuilder;
1348
+ /**
1349
+ * Represents a function that generates or retrieves a `LiveSystemId`.
1350
+ * The function is intended to construct or return an identifier for
1351
+ * a live system component, which may represent an active or dynamic
1352
+ * system entity.
1353
+ *
1354
+ * @function
1355
+ * @returns {LiveSystemId} A unique identifier for a live system.
1356
+ */
1357
+ build: () => LiveSystemId;
1358
+ };
1359
+ //#endregion
1360
+ //#region src/live_system/component/entity.d.ts
1361
+ /**
1362
+ * A builder interface for constructing instances of LiveSystemComponent with a fluent API.
1363
+ */
1364
+ type LiveSystemComponentBuilder = {
1365
+ /**
1366
+ * Configures the builder to associate a specific type with the system component.
1367
+ *
1368
+ * @param {BlueprintComponentType} type - The type of the system component to be set.
1369
+ * @returns {LiveSystemComponentBuilder} The builder instance, enabling method chaining.
1370
+ */
1371
+ withType: (type: BlueprintComponentType) => LiveSystemComponentBuilder;
1372
+ /**
1373
+ * Associates a specific identifier with a component in the builder pattern.
1374
+ *
1375
+ * @param {Component.Id} id - The unique identifier to be assigned to the component.
1376
+ * @returns {LiveSystemComponentBuilder} The builder instance for further configuration.
1377
+ */
1378
+ withId: (id: Component.Id) => LiveSystemComponentBuilder;
1379
+ /**
1380
+ * Sets the version for the LiveSystemComponentBuilder.
1381
+ *
1382
+ * @param {Version} version - The version to be set for the builder.
1383
+ * @returns {LiveSystemComponentBuilder} The updated instance of the builder with the specified version.
1384
+ */
1385
+ withVersion: (version: Version$1) => LiveSystemComponentBuilder;
1386
+ /**
1387
+ * Sets a display name for the component being built.
1388
+ *
1389
+ * This method allows specifying a human-readable name for the component,
1390
+ * which can be useful for debugging or identification purposes.
1391
+ *
1392
+ * @param {string} displayName - The display name to be assigned to the component.
1393
+ * @returns {LiveSystemComponentBuilder} The builder instance, allowing for method chaining.
1394
+ */
1395
+ withDisplayName: (displayName: string) => LiveSystemComponentBuilder;
1396
+ /**
1397
+ * Attaches a description to the component builder.
1398
+ *
1399
+ * @param {string} description - The description to associate with the component.
1400
+ * @returns {LiveSystemComponentBuilder} The current instance of the builder.
1401
+ */
1402
+ withDescription: (description: string) => LiveSystemComponentBuilder;
1403
+ /**
1404
+ * Configures the LiveSystemComponentBuilder with the specified parameters.
1405
+ *
1406
+ * @param {Component.Parameters} parameters - The parameters to be applied to the component builder.
1407
+ * @returns {LiveSystemComponentBuilder} The instance of the builder with the updated configuration.
1408
+ */
1409
+ withParameters: (parameters: Component.Parameters) => LiveSystemComponentBuilder;
1410
+ /**
1411
+ * Configures the component builder with a collection of links.
1412
+ * This method allows adding a list of links to the component being built,
1413
+ * enabling navigation or connectivity between different components or resources within the system.
1414
+ *
1415
+ * @param {Component.Link[]} links - An array of links to include in the component.
1416
+ * @returns {LiveSystemComponentBuilder} The current instance of the component builder, updated with the provided links.
1417
+ */
1418
+ withLinks: (links: Component.Link[]) => LiveSystemComponentBuilder;
1419
+ /**
1420
+ * A function that initializes a LiveSystemComponentBuilder with the specified dependencies.
1421
+ *
1422
+ * @param {BlueprintComponentDependency[]} dependencies - An array of blueprint component dependencies required for construction.
1423
+ * @returns {LiveSystemComponentBuilder} A builder instance configured with the provided dependencies.
1424
+ */
1425
+ withDependencies: (dependencies: BlueprintComponentDependency[]) => LiveSystemComponentBuilder;
1426
+ /**
1427
+ * Sets the locked state of the component.
1428
+ *
1429
+ * @param {boolean} value - Indicates whether the component should be locked.
1430
+ * @returns {LiveSystemComponentBuilder} The builder instance for chaining additional configuration methods.
1431
+ */
1432
+ withIsLocked: (value: boolean) => LiveSystemComponentBuilder;
1433
+ /**
1434
+ * Configures the system component builder to recreate the component upon failure, based on the specified flag.
1435
+ *
1436
+ * @param {boolean} value - A boolean indicating whether the component should be recreated on failure.
1437
+ * Passing `true` enables recreation on failure, while `false` disables it.
1438
+ * @returns {LiveSystemComponentBuilder} The current instance of the LiveSystemComponentBuilder
1439
+ * for method chaining.
1440
+ */
1441
+ withRecreateOnFailure: (value: boolean) => LiveSystemComponentBuilder;
1442
+ /**
1443
+ * Configures the LiveSystemComponentBuilder to use the specified provider.
1444
+ *
1445
+ * @param {LiveSystemComponent.Provider} value - The provider to associate with the LiveSystemComponentBuilder.
1446
+ * @returns {LiveSystemComponentBuilder} The updated instance of LiveSystemComponentBuilder with the specified provider.
1447
+ */
1448
+ withProvider: (value: LiveSystemComponent.Provider) => LiveSystemComponentBuilder;
1449
+ /**
1450
+ * Resets the current configuration of the LiveSystemComponentBuilder instance
1451
+ * to its initial state.
1452
+ *
1453
+ * @returns {LiveSystemComponentBuilder} A reference to the same builder instance,
1454
+ * allowing for method chaining.
1455
+ */
1456
+ reset: () => LiveSystemComponentBuilder;
1457
+ /**
1458
+ * Function that generates and returns a LiveSystemComponent instance.
1459
+ * The implementation defines the specific behavior and structure
1460
+ * of the returned LiveSystemComponent.
1461
+ *
1462
+ * @returns {LiveSystemComponent} A new instance of a LiveSystemComponent.
1463
+ */
1464
+ build: () => LiveSystemComponent;
1465
+ };
1466
+ //#endregion
1467
+ //#region src/live_system/component/index.d.ts
1468
+ declare namespace LiveSystemComponent {
1469
+ type Status = 'Unknown' | 'Instantiating' | 'Active' | 'Failed' | 'Mutating' | 'Deleting' | 'Cancelled';
1470
+ type Provider = 'Unknown' | 'AWS' | 'GCP' | 'Azure' | 'OCI' | 'Hetzner' | 'CaaS' | 'SaaS';
1471
+ type Builder = LiveSystemComponentBuilder;
1472
+ const getBuilder: () => LiveSystemComponentBuilder;
1473
+ }
1474
+ type LiveSystemComponent = BlueprintComponent & {
1475
+ status: LiveSystemComponent.Status;
1476
+ lastUpdated: Date;
1477
+ lastOperationRetried: number;
1478
+ provider: LiveSystemComponent.Provider;
1479
+ lastOperationStatusMessage: string;
1480
+ errorCode: string;
1481
+ };
1482
+ //#endregion
1483
+ //#region src/live_system/entity.d.ts
1484
+ /**
1485
+ * A builder interface for constructing a LiveSystem instance with various configurations.
1486
+ */
1487
+ type LiveSystemBuilder = {
1488
+ /**
1489
+ * Sets the identifier for the LiveSystemBuilder instance.
1490
+ *
1491
+ * @param {LiveSystemId} value - The unique identifier to associate with the LiveSystemBuilder.
1492
+ * @returns {LiveSystemBuilder} The current instance of the LiveSystemBuilder for chaining further configurations.
1493
+ */
1494
+ withId: (value: LiveSystemId) => LiveSystemBuilder;
1495
+ /**
1496
+ * A method that assigns a Fractal ID to the live system builder.
1497
+ *
1498
+ * @param {Fractal.Id} value - The unique identifier associated with the fractal.
1499
+ * @returns {LiveSystemBuilder} The current instance of the live system builder, allowing method chaining.
1500
+ */
1501
+ withFractalId: (value: Fractal$1.Id) => LiveSystemBuilder;
1502
+ /**
1503
+ * Sets the description for the system being built.
1504
+ *
1505
+ * @param {string} value - The description to be assigned.
1506
+ * @returns {LiveSystemBuilder} The builder instance to allow method chaining.
1507
+ */
1508
+ withDescription: (value: string) => LiveSystemBuilder;
1509
+ /**
1510
+ * Configures the current builder with the specified set of system components.
1511
+ *
1512
+ * @param {LiveSystemComponent[]} value - An array of components to be added to the system.
1513
+ * @returns {LiveSystemBuilder} The updated instance of the builder for method chaining.
1514
+ */
1515
+ withComponents: (value: LiveSystemComponent[]) => LiveSystemBuilder;
1516
+ /**
1517
+ * Attaches a specified component to the current LiveSystemBuilder instance.
1518
+ *
1519
+ * @param {LiveSystemComponent} value - The component to be added to the system.
1520
+ * @returns {LiveSystemBuilder} The updated LiveSystemBuilder instance, allowing for further configuration or chaining of components.
1521
+ */
1522
+ withComponent: (value: LiveSystemComponent) => LiveSystemBuilder;
1523
+ /**
1524
+ * A method that sets a generic provider for the live system builder.
1525
+ *
1526
+ * @param {LiveSystemComponent.Provider} value - The provider instance to be applied within the live system.
1527
+ * @returns {LiveSystemBuilder} The current instance of the live system builder, allowing for method chaining.
1528
+ */
1529
+ withGenericProvider: (value: LiveSystemComponent.Provider) => LiveSystemBuilder;
1530
+ /**
1531
+ * Sets the parameters for the live system being built.
1532
+ *
1533
+ * @param {LiveSystem.Parameters} parameters - The parameters to associate with the live system.
1534
+ * @returns {ComponentBuilder} The builder instance for method chaining.
1535
+ */
1536
+ withParameters: (parameters: Component.Parameters) => LiveSystemBuilder;
1537
+ /**
1538
+ * Configures the LiveSystemBuilder instance with the specified environment.
1539
+ *
1540
+ * @param {Environment} environment - The environment configuration to be applied.
1541
+ * @returns {LiveSystemBuilder} The updated LiveSystemBuilder instance configured with the provided environment.
1542
+ */
1543
+ withEnvironment: (environment: Environment) => LiveSystemBuilder;
1544
+ /**
1545
+ * Resets the current state of the LiveSystemBuilder to its initial configuration.
1546
+ * This operation typically clears any modifications or settings that have been applied
1547
+ * and returns a fresh instance ready for reconfiguration.
1548
+ *
1549
+ * @function
1550
+ * @returns {LiveSystemBuilder} A new instance of the LiveSystemBuilder with default settings.
1551
+ */
1552
+ reset: () => LiveSystemBuilder;
1553
+ /**
1554
+ * A method or function that, when invoked, initiates the creation or assembly process
1555
+ * to produce an instance of the `LiveSystem`. The returned `LiveSystem` is a fully
1556
+ * operational system ready to perform its designated tasks or services.
1557
+ *
1558
+ * @returns {LiveSystem} An instance of the `LiveSystem` representing the constructed system.
1559
+ */
1560
+ build: () => LiveSystem$1;
1561
+ };
1562
+ //#endregion
1563
+ //#region src/live_system/index.d.ts
1564
+ declare namespace LiveSystem$1 {
1565
+ type Status = 'Unknown' | 'Mutating' | 'Active' | 'FailedMutation' | 'Processing' | 'Error' | 'Ready' | 'Deleting' | 'Stale';
1566
+ type Id = LiveSystemId;
1567
+ namespace Id {
1568
+ type Builder = LiveSystemIdBuilder;
1569
+ const getBuilder: () => LiveSystemIdBuilder;
1570
+ }
1571
+ type Component = LiveSystemComponent;
1572
+ namespace Component {
1573
+ type Builder = LiveSystemComponentBuilder;
1574
+ const getBuilder: () => LiveSystemComponentBuilder;
1575
+ }
1576
+ type Parameters = GenericParameters;
1577
+ type Builder = LiveSystemBuilder;
1578
+ const getBuilder: () => LiveSystemBuilder;
1579
+ }
1580
+ type LiveSystem$1 = {
1581
+ id: LiveSystemId;
1582
+ requesterId: string;
1583
+ fractalId: Fractal$1.Id;
1584
+ description: string;
1585
+ status: LiveSystem$1.Status;
1586
+ statusMessage: string;
1587
+ components: LiveSystemComponent[];
1588
+ genericProvider: LiveSystemComponent.Provider;
1589
+ parameters: LiveSystem$1.Parameters;
1590
+ environment: Environment$1;
1591
+ createdAt: Date;
1592
+ updatedAt: Date;
1593
+ deploy: (credentials: ServiceAccountCredentials$1) => Promise<void>;
1594
+ destroy: (credentials: ServiceAccountCredentials$1) => Promise<void>;
1595
+ };
1596
+ //#endregion
1597
+ //#region src/index.d.ts
1598
+ declare const BoundedContext: typeof BoundedContext$1;
1599
+ type BoundedContext = BoundedContext$1;
1600
+ declare const Fractal: typeof Fractal$1;
1601
+ type Fractal = Fractal$1;
1602
+ declare const InfrastructureDomain: typeof InfrastructureDomain$1;
1603
+ type InfrastructureDomain = InfrastructureDomain$1;
1604
+ declare const KebabCaseString: typeof KebabCaseString$1;
1605
+ type KebabCaseString = KebabCaseString$1;
1606
+ declare const OwnerId: typeof OwnerId$1;
1607
+ type OwnerId = OwnerId$1;
1608
+ declare const OwnerType: typeof OwnerType$1;
1609
+ type OwnerType = OwnerType$1;
1610
+ declare const PascalCaseString: typeof PascalCaseString$1;
1611
+ type PascalCaseString = PascalCaseString$1;
1612
+ declare const ServiceAccountCredentials: typeof ServiceAccountCredentials$1;
1613
+ type ServiceAccountCredentials = ServiceAccountCredentials$1;
1614
+ declare const ServiceAccountId: typeof ServiceAccountId$1;
1615
+ type ServiceAccountId = ServiceAccountId$1;
1616
+ declare const ServiceDeliveryModel: typeof ServiceDeliveryModel$1;
1617
+ type ServiceDeliveryModel = ServiceDeliveryModel$1;
1618
+ declare const Version: typeof Version$1;
1619
+ type Version = Version$1;
1620
+ declare const Environment: typeof Environment$1;
1621
+ type Environment = Environment$1;
1622
+ declare const LiveSystem: typeof LiveSystem$1;
1623
+ type LiveSystem = LiveSystem$1;
1624
+ //#endregion
1625
+ export { BoundedContext, Environment, Fractal, InfrastructureDomain, KebabCaseString, LiveSystem, OwnerId, OwnerType, PascalCaseString, ServiceAccountCredentials, ServiceAccountId, ServiceDeliveryModel, Version };