@breadstone/archipel-mcp 0.0.23 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/guides/caching.md +33 -0
- package/data/guides/email-delivery.md +27 -1
- package/data/guides/esigning-integration.md +11 -5
- package/data/guides/health-indicators.md +220 -0
- package/data/guides/index.md +2 -0
- package/data/guides/queue-infrastructure.md +329 -0
- package/data/guides/telemetry-and-observability.md +20 -0
- package/data/packages/platform-analytics/api/Class.AnalyticsClientPort.md +20 -0
- package/data/packages/platform-analytics/api/Class.AnalyticsHealthIndicator.md +78 -0
- package/data/packages/platform-analytics/api/Class.AppInsightsAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/Class.DatadogAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/Class.NoopAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/Class.SentryAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/index.md +1 -0
- package/data/packages/platform-analytics/index.md +25 -1
- package/data/packages/platform-authentication/api/Class.AuthenticationHealthIndicator.md +68 -0
- package/data/packages/platform-authentication/api/index.md +1 -0
- package/data/packages/platform-authentication/index.md +25 -1
- package/data/packages/platform-blob-storage/api/Class.BlobHealthIndicator.md +7 -7
- package/data/packages/platform-blob-storage/api/Class.BlobModule.md +2 -2
- package/data/packages/platform-blob-storage/api/Interface.IAwsS3BlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/Interface.IAzureBlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/Interface.IBlobModuleOptions.md +5 -5
- package/data/packages/platform-blob-storage/api/Interface.ICustomBlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/Interface.IVercelBlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/TypeAlias.IBlobProviderRegistration.md +1 -1
- package/data/packages/platform-blob-storage/api/index.md +1 -1
- package/data/packages/platform-blob-storage/index.md +19 -14
- package/data/packages/platform-caching/api/Class.MemoryLayeredCache.md +10 -10
- package/data/packages/platform-caching/api/Class.NoopCacheMetricsRecorder.md +6 -6
- package/data/packages/platform-caching/api/Class.RedisLayeredCache.md +10 -10
- package/data/packages/platform-caching/api/Interface.ILayeredCache.md +9 -9
- package/data/packages/platform-caching/api/Interface.ILayeredCacheOptions.md +6 -6
- package/data/packages/platform-caching/api/Variable.CACHE_DEFAULT_TTL_MS.md +14 -0
- package/data/packages/platform-caching/api/Variable.CACHE_MAX_ENTRIES.md +14 -0
- package/data/packages/platform-caching/api/Variable.CACHE_STALE_WHILE_REVALIDATE.md +14 -0
- package/data/packages/platform-caching/api/Variable.PLATFORM_CACHING_CONFIG_ENTRIES.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_CONFIG_ENTRIES.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_KEY_PREFIX.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_TTL_SECONDS.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_URL.md +14 -0
- package/data/packages/platform-caching/api/index.md +13 -0
- package/data/packages/platform-caching/index.md +47 -1
- package/data/packages/platform-configuration/api/Function.createConfigKey.md +1 -1
- package/data/packages/platform-core/api/Class.HttpLoggerMiddleware.md +3 -3
- package/data/packages/platform-core/api/Function.maskSensitive.md +26 -0
- package/data/packages/platform-core/api/Function.maskSensitiveFields.md +26 -0
- package/data/packages/platform-core/api/index.md +2 -0
- package/data/packages/platform-core/index.md +11 -0
- package/data/packages/platform-database/api/Class.DatabaseHealthIndicator.md +8 -6
- package/data/packages/platform-database/api/Class.DatabaseModule.md +3 -3
- package/data/packages/platform-database/api/Class.RepositoryBase.md +113 -49
- package/data/packages/platform-database/api/Class.RepositoryBase2.md +171 -0
- package/data/packages/platform-database/api/Function.aggregate.md +33 -0
- package/data/packages/platform-database/api/Function.aggregateRaw.md +34 -0
- package/data/packages/platform-database/api/Function.count.md +33 -0
- package/data/packages/platform-database/api/Function.create.md +33 -0
- package/data/packages/platform-database/api/Function.createMany.md +33 -0
- package/data/packages/platform-database/api/Function.createManyAndReturn.md +35 -0
- package/data/packages/platform-database/api/Function.findFirst.md +35 -0
- package/data/packages/platform-database/api/Function.findFirstOrThrow.md +34 -0
- package/data/packages/platform-database/api/Function.findMany.md +32 -0
- package/data/packages/platform-database/api/Function.findManyPaged.md +34 -0
- package/data/packages/platform-database/api/Function.findRaw.md +34 -0
- package/data/packages/platform-database/api/Function.findUnique.md +32 -0
- package/data/packages/platform-database/api/Function.findUniqueOrThrow.md +34 -0
- package/data/packages/platform-database/api/Function.groupBy.md +33 -0
- package/data/packages/platform-database/api/Function.paginator.md +1 -1
- package/data/packages/platform-database/api/Function.pipe.md +34 -0
- package/data/packages/platform-database/api/Function.pipeAll.md +35 -0
- package/data/packages/platform-database/api/Function.query2.md +35 -0
- package/data/packages/platform-database/api/Function.remove.md +33 -0
- package/data/packages/platform-database/api/Function.removeMany.md +33 -0
- package/data/packages/platform-database/api/Function.update.md +33 -0
- package/data/packages/platform-database/api/Function.updateMany.md +33 -0
- package/data/packages/platform-database/api/Function.updateManyAndReturn.md +35 -0
- package/data/packages/platform-database/api/Function.upsert.md +33 -0
- package/data/packages/platform-database/api/Interface.IDatabaseModuleConfig.md +3 -3
- package/data/packages/platform-database/api/Interface.IRepositoryQuery2.md +45 -0
- package/data/packages/platform-database/api/TypeAlias.DelegateArgs.md +1 -1
- package/data/packages/platform-database/api/TypeAlias.DelegateOperations.md +29 -0
- package/data/packages/platform-database/api/TypeAlias.DelegateReturnTypes.md +1 -1
- package/data/packages/platform-database/api/TypeAlias.PaginateFunction.md +1 -1
- package/data/packages/platform-database/api/TypeAlias.RepositoryOperationsAll.md +19 -0
- package/data/packages/platform-database/api/TypeAlias.RepositoryOperationsBase.md +34 -0
- package/data/packages/platform-database/api/Variable.DATABASE_MODULE_CONFIG.md +1 -1
- package/data/packages/platform-database/api/index.md +29 -1
- package/data/packages/platform-database/index.md +17 -5
- package/data/packages/platform-documents/api/Class.DocumentEngine.md +9 -5
- package/data/packages/platform-documents/index.md +1 -1
- package/data/packages/platform-esigning/api/Class.AdobeSignEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/Class.DocuSignEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/Class.DropboxSignEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/Class.EsigningClientPort.md +20 -0
- package/data/packages/platform-esigning/api/Class.EsigningHealthIndicator.md +78 -0
- package/data/packages/platform-esigning/api/Class.InternalEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/index.md +1 -0
- package/data/packages/platform-esigning/index.md +26 -2
- package/data/packages/platform-health/api/Class.HealthModule.md +42 -0
- package/data/packages/platform-health/api/Class.HealthOrchestrator.md +64 -0
- package/data/packages/platform-health/api/Interface.IHealthCheckResult.md +46 -0
- package/data/packages/platform-health/api/Interface.IHealthIndicator.md +41 -0
- package/data/packages/platform-health/api/Variable.HEALTH_INDICATORS_TOKEN.md +14 -0
- package/data/packages/platform-health/api/index.md +26 -0
- package/data/packages/platform-health/index.md +18 -7
- package/data/packages/platform-intelligence/api/Class.IntelligenceHealthIndicator.md +78 -0
- package/data/packages/platform-intelligence/api/index.md +1 -0
- package/data/packages/platform-intelligence/index.md +24 -1
- package/data/packages/platform-logging/api/Class.ContextLogger.md +152 -0
- package/data/packages/platform-logging/api/Class.LoggerModule.md +8 -2
- package/data/packages/platform-logging/api/Class.RequestContextStore.md +90 -0
- package/data/packages/platform-logging/api/Class.RequestIdMiddleware.md +68 -0
- package/data/packages/platform-logging/api/Interface.IRequestContext.md +34 -0
- package/data/packages/platform-logging/api/Variable.REQUEST_ID_HEADER.md +14 -0
- package/data/packages/platform-logging/api/index.md +11 -1
- package/data/packages/platform-logging/index.md +89 -7
- package/data/packages/platform-mailing/api/Class.MailHealthIndicator.md +5 -5
- package/data/packages/platform-mailing/api/Class.MailModule.md +28 -1
- package/data/packages/platform-mailing/api/Class.MailVerificationService.md +49 -16
- package/data/packages/platform-mailing/api/Class.SmtpConnectionVerifier.md +84 -0
- package/data/packages/platform-mailing/api/Interface.IMailModuleOptions.md +36 -0
- package/data/packages/platform-mailing/api/index.md +3 -1
- package/data/packages/platform-mailing/index.md +64 -8
- package/data/packages/platform-mapping/api/Class.MappingBuilder.md +110 -0
- package/data/packages/platform-mapping/api/Class.MappingError.md +56 -0
- package/data/packages/platform-mapping/api/Class.MappingModule.md +46 -0
- package/data/packages/platform-mapping/api/Class.MappingNotRegisteredError.md +52 -0
- package/data/packages/platform-mapping/api/Class.MappingProfileBase.md +52 -0
- package/data/packages/platform-mapping/api/Class.MappingService.md +284 -0
- package/data/packages/platform-mapping/api/Class.TypeMappingNotRegisteredError.md +53 -0
- package/data/packages/platform-mapping/api/Function.createMappingKey.md +39 -0
- package/data/packages/platform-mapping/api/Interface.IMappingBuilder.md +76 -0
- package/data/packages/platform-mapping/api/Interface.IMappingKey.md +58 -0
- package/data/packages/platform-mapping/api/Interface.IMappingProfile.md +32 -0
- package/data/packages/platform-mapping/api/TypeAlias.Constructor.md +28 -0
- package/data/packages/platform-mapping/api/index.md +38 -0
- package/data/packages/platform-mcp/api/Class.McpHealthIndicator.md +78 -0
- package/data/packages/platform-mcp/api/index.md +1 -0
- package/data/packages/platform-mcp/index.md +24 -1
- package/data/packages/platform-openapi/api/Function.SwaggerFeature.md +2 -2
- package/data/packages/platform-openapi/api/Function.getSwaggerFeatureMetadata.md +2 -2
- package/data/packages/platform-payments/api/Class.LemonSqueezyClient.md +24 -0
- package/data/packages/platform-payments/api/Class.MollieClient.md +24 -0
- package/data/packages/platform-payments/api/Class.PaddleClient.md +24 -0
- package/data/packages/platform-payments/api/Class.PaymentClientPort.md +20 -0
- package/data/packages/platform-payments/api/Class.PaymentHealthIndicator.md +78 -0
- package/data/packages/platform-payments/api/Class.StripeClient.md +28 -4
- package/data/packages/platform-payments/api/index.md +1 -0
- package/data/packages/platform-payments/index.md +26 -2
- package/data/packages/platform-queue/api/Class.AzureQueue.md +221 -0
- package/data/packages/platform-queue/api/Class.BullMqQueue.md +220 -0
- package/data/packages/platform-queue/api/Class.MemoryQueue.md +194 -0
- package/data/packages/platform-queue/api/Class.QueueError.md +51 -0
- package/data/packages/platform-queue/api/Class.QueueHealthIndicator.md +68 -0
- package/data/packages/platform-queue/api/Class.QueueJobNotFoundError.md +43 -0
- package/data/packages/platform-queue/api/Class.QueueJobStateError.md +48 -0
- package/data/packages/platform-queue/api/Class.QueueValidationError.md +43 -0
- package/data/packages/platform-queue/api/Interface.IAzureQueueOptions.md +48 -0
- package/data/packages/platform-queue/api/Interface.IBullMqQueueOptions.md +45 -0
- package/data/packages/platform-queue/api/Interface.IMemoryQueueOptions.md +32 -0
- package/data/packages/platform-queue/api/Interface.IQueue.md +173 -0
- package/data/packages/platform-queue/api/Interface.IQueueJob.md +139 -0
- package/data/packages/platform-queue/api/TypeAlias.QueueJobStatus.md +14 -0
- package/data/packages/platform-queue/api/Variable.AZURE_CONFIG_ENTRIES.md +17 -0
- package/data/packages/platform-queue/api/Variable.AZURE_CONNECTION_STRING.md +14 -0
- package/data/packages/platform-queue/api/Variable.AZURE_RECEIVE_WAIT_MS.md +21 -0
- package/data/packages/platform-queue/api/Variable.BULLMQ_CONFIG_ENTRIES.md +17 -0
- package/data/packages/platform-queue/api/Variable.BULLMQ_PREFIX.md +18 -0
- package/data/packages/platform-queue/api/Variable.BULLMQ_REDIS_URL.md +21 -0
- package/data/packages/platform-queue/api/Variable.PLATFORM_QUEUE_CONFIG_ENTRIES.md +17 -0
- package/data/packages/platform-queue/api/Variable.QUEUE_JOB_STATUS.md +30 -0
- package/data/packages/platform-queue/api/Variable.QUEUE_MAX_JOBS.md +21 -0
- package/data/packages/platform-queue/api/index.md +49 -0
- package/data/packages/platform-queue/index.md +168 -0
- package/data/packages/platform-resources/api/Class.BlobResourceStrategy.md +195 -0
- package/data/packages/platform-resources/api/Class.EmbeddedResourceStrategy.md +215 -0
- package/data/packages/platform-resources/api/Class.FileResourceStrategy.md +190 -0
- package/data/packages/platform-resources/api/Class.ResourceManager.md +477 -0
- package/data/packages/platform-resources/api/Class.ResourceModule.md +46 -0
- package/data/packages/platform-resources/api/Class.ResourceNotFoundError.md +60 -0
- package/data/packages/platform-resources/api/Interface.IBlobResourceStrategyConfig.md +28 -0
- package/data/packages/platform-resources/api/Interface.IBlobServiceAdapter.md +40 -0
- package/data/packages/platform-resources/api/Interface.IFileResourceStrategyConfig.md +72 -0
- package/data/packages/platform-resources/api/Interface.IResourceManagerConfig.md +89 -0
- package/data/packages/platform-resources/api/Interface.IResourceMetadata.md +94 -0
- package/data/packages/platform-resources/api/Interface.IResourceResult.md +34 -0
- package/data/packages/platform-resources/api/Interface.IResourceStrategy.md +134 -0
- package/data/packages/platform-resources/api/index.md +29 -0
- package/data/packages/platform-telemetry/api/Class.OtelSdkHolder.md +20 -2
- package/data/packages/platform-telemetry/api/Class.TelemetryHealthIndicator.md +78 -0
- package/data/packages/platform-telemetry/api/index.md +1 -0
- package/data/packages/platform-telemetry/index.md +25 -1
- package/data/patterns/config-pattern.md +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: AZURE\_RECEIVE\_WAIT\_MS'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: AZURE\_RECEIVE\_WAIT\_MS
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const AZURE_RECEIVE_WAIT_MS: IConfigKey<number>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [azure/env.ts:24](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/azure/env.ts#L24)
|
|
13
|
+
|
|
14
|
+
Maximum wait time in milliseconds when receiving messages.
|
|
15
|
+
|
|
16
|
+
## Default Value
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
5_000
|
|
20
|
+
@public
|
|
21
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: BULLMQ\_CONFIG\_ENTRIES'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: BULLMQ\_CONFIG\_ENTRIES
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const BULLMQ_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [bullmq/env.ts:39](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/bullmq/env.ts#L39)
|
|
13
|
+
|
|
14
|
+
All configuration entries required by the BullMQ queue provider.
|
|
15
|
+
|
|
16
|
+
Pass this array to the module's `register()` method so that the
|
|
17
|
+
configuration service validates and provides the values at startup.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: BULLMQ\_PREFIX'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: BULLMQ\_PREFIX
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const BULLMQ_PREFIX: IConfigKey<string>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [bullmq/env.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/bullmq/env.ts#L25)
|
|
13
|
+
|
|
14
|
+
Optional key prefix applied to all BullMQ queues in Redis.
|
|
15
|
+
|
|
16
|
+
## Default Value
|
|
17
|
+
|
|
18
|
+
`''`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: BULLMQ\_REDIS\_URL'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: BULLMQ\_REDIS\_URL
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const BULLMQ_REDIS_URL: IConfigKey<string>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [bullmq/env.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/bullmq/env.ts#L17)
|
|
13
|
+
|
|
14
|
+
Redis connection URL for BullMQ.
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
`redis://localhost:6379`
|
|
20
|
+
@public
|
|
21
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: PLATFORM\_QUEUE\_CONFIG\_ENTRIES'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: PLATFORM\_QUEUE\_CONFIG\_ENTRIES
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const PLATFORM_QUEUE_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [env.ts:31](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/env.ts#L31)
|
|
13
|
+
|
|
14
|
+
All configuration entries required by `platform-queue`.
|
|
15
|
+
|
|
16
|
+
Pass this array to the module's `register()` method so that the
|
|
17
|
+
configuration service validates and provides the values at startup.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: QUEUE\_JOB\_STATUS'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: QUEUE\_JOB\_STATUS
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const QUEUE_JOB_STATUS: {
|
|
10
|
+
completed: "completed";
|
|
11
|
+
failed: "failed";
|
|
12
|
+
pending: "pending";
|
|
13
|
+
processing: "processing";
|
|
14
|
+
};
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Defined in: [models/IQueueJob.ts:10](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/models/IQueueJob.ts#L10)
|
|
18
|
+
|
|
19
|
+
Possible statuses of a queue job.
|
|
20
|
+
|
|
21
|
+
Use as a const object and derive the union type via [QueueJobStatus](TypeAlias.QueueJobStatus).
|
|
22
|
+
|
|
23
|
+
## Type Declaration
|
|
24
|
+
|
|
25
|
+
| Name | Type | Default value | Description | Defined in |
|
|
26
|
+
| ------ | ------ | ------ | ------ | ------ |
|
|
27
|
+
| <a id="property-completed"></a> `completed` | `"completed"` | `'completed'` | Job finished successfully. | [models/IQueueJob.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/models/IQueueJob.ts#L16) |
|
|
28
|
+
| <a id="property-failed"></a> `failed` | `"failed"` | `'failed'` | Job finished with an error. | [models/IQueueJob.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/models/IQueueJob.ts#L18) |
|
|
29
|
+
| <a id="property-pending"></a> `pending` | `"pending"` | `'pending'` | Job is waiting to be picked up. | [models/IQueueJob.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/models/IQueueJob.ts#L12) |
|
|
30
|
+
| <a id="property-processing"></a> `processing` | `"processing"` | `'processing'` | Job has been dequeued and is being processed. | [models/IQueueJob.ts:14](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/models/IQueueJob.ts#L14) |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: QUEUE\_MAX\_JOBS'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: QUEUE\_MAX\_JOBS
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const QUEUE_MAX_JOBS: IConfigKey<number>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [env.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/env.ts#L17)
|
|
13
|
+
|
|
14
|
+
Maximum number of jobs retained in the in-memory queue before eviction.
|
|
15
|
+
|
|
16
|
+
## Default Value
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
10_000
|
|
20
|
+
@public
|
|
21
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '@breadstone/archipel-platform-queue'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# @breadstone/archipel-platform-queue
|
|
7
|
+
|
|
8
|
+
## Classes
|
|
9
|
+
|
|
10
|
+
| Class | Description |
|
|
11
|
+
| ------ | ------ |
|
|
12
|
+
| [AzureQueue](Class.AzureQueue) | Azure Service Bus queue implementation. |
|
|
13
|
+
| [BullMqQueue](Class.BullMqQueue) | BullMQ-backed queue implementation. |
|
|
14
|
+
| [MemoryQueue](Class.MemoryQueue) | In-memory FIFO queue implementation. |
|
|
15
|
+
| [QueueError](Class.QueueError) | Base error class for all queue-related errors. |
|
|
16
|
+
| [QueueHealthIndicator](Class.QueueHealthIndicator) | Health indicator for the queue infrastructure. |
|
|
17
|
+
| [QueueJobNotFoundError](Class.QueueJobNotFoundError) | Thrown when a queue job cannot be found by its ID. |
|
|
18
|
+
| [QueueJobStateError](Class.QueueJobStateError) | Thrown when a queue job is in an invalid state for the requested transition. |
|
|
19
|
+
| [QueueValidationError](Class.QueueValidationError) | Thrown when a queue operation receives invalid input. |
|
|
20
|
+
|
|
21
|
+
## Interfaces
|
|
22
|
+
|
|
23
|
+
| Interface | Description |
|
|
24
|
+
| ------ | ------ |
|
|
25
|
+
| [IAzureQueueOptions](Interface.IAzureQueueOptions) | Configuration options for [AzureQueue](Class.AzureQueue). |
|
|
26
|
+
| [IBullMqQueueOptions](Interface.IBullMqQueueOptions) | Configuration options for [BullMqQueue](Class.BullMqQueue). |
|
|
27
|
+
| [IMemoryQueueOptions](Interface.IMemoryQueueOptions) | Configuration options for [MemoryQueue](Class.MemoryQueue). |
|
|
28
|
+
| [IQueue](Interface.IQueue) | Contract for queue implementations. |
|
|
29
|
+
| [IQueueJob](Interface.IQueueJob) | Represents a job in a named queue with tracking metadata. |
|
|
30
|
+
|
|
31
|
+
## Type Aliases
|
|
32
|
+
|
|
33
|
+
| Type Alias | Description |
|
|
34
|
+
| ------ | ------ |
|
|
35
|
+
| [QueueJobStatus](TypeAlias.QueueJobStatus) | Union type derived from [QUEUE\_JOB\_STATUS](Variable.QUEUE_JOB_STATUS). |
|
|
36
|
+
|
|
37
|
+
## Variables
|
|
38
|
+
|
|
39
|
+
| Variable | Description |
|
|
40
|
+
| ------ | ------ |
|
|
41
|
+
| [AZURE\_CONFIG\_ENTRIES](Variable.AZURE_CONFIG_ENTRIES) | All configuration entries required by the Azure queue provider. |
|
|
42
|
+
| [AZURE\_CONNECTION\_STRING](Variable.AZURE_CONNECTION_STRING) | Azure queue connection string. |
|
|
43
|
+
| [AZURE\_RECEIVE\_WAIT\_MS](Variable.AZURE_RECEIVE_WAIT_MS) | Maximum wait time in milliseconds when receiving messages. |
|
|
44
|
+
| [BULLMQ\_CONFIG\_ENTRIES](Variable.BULLMQ_CONFIG_ENTRIES) | All configuration entries required by the BullMQ queue provider. |
|
|
45
|
+
| [BULLMQ\_PREFIX](Variable.BULLMQ_PREFIX) | Optional key prefix applied to all BullMQ queues in Redis. |
|
|
46
|
+
| [BULLMQ\_REDIS\_URL](Variable.BULLMQ_REDIS_URL) | Redis connection URL for BullMQ. |
|
|
47
|
+
| [PLATFORM\_QUEUE\_CONFIG\_ENTRIES](Variable.PLATFORM_QUEUE_CONFIG_ENTRIES) | All configuration entries required by `platform-queue`. |
|
|
48
|
+
| [QUEUE\_JOB\_STATUS](Variable.QUEUE_JOB_STATUS) | Possible statuses of a queue job. |
|
|
49
|
+
| [QUEUE\_MAX\_JOBS](Variable.QUEUE_MAX_JOBS) | Maximum number of jobs retained in the in-memory queue before eviction. |
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: platform-queue
|
|
3
|
+
description: Provider-agnostic queue infrastructure with support for in-memory FIFO, BullMQ (Redis), and Azure Service Bus.
|
|
4
|
+
order: 19
|
|
5
|
+
tags: [queue, job-queue, fifo, memory-queue, bullmq, redis, azure-service-bus, ports-and-adapters, health]
|
|
6
|
+
package: '@breadstone/archipel-platform-queue'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# platform-queue
|
|
10
|
+
|
|
11
|
+
Provider-agnostic queue infrastructure for NestJS. Exposes a unified `IQueue` contract with three ready-made implementations: in-memory FIFO (`MemoryQueue`), BullMQ/Redis (`BullMqQueue`), and Azure Service Bus (`AzureQueue`). Jobs follow a lifecycle from pending through processing to completed or failed, with full metadata tracking.
|
|
12
|
+
|
|
13
|
+
**Package:** `@breadstone/archipel-platform-queue`
|
|
14
|
+
|
|
15
|
+
## Architecture
|
|
16
|
+
|
|
17
|
+
```mermaid
|
|
18
|
+
graph TD
|
|
19
|
+
Core["@breadstone/archipel-platform-queue<br/><i>IQueue, models, errors, MemoryQueue</i>"]
|
|
20
|
+
BullMQ["@breadstone/archipel-platform-queue/bullmq<br/><i>BullMqQueue</i>"]
|
|
21
|
+
Azure["@breadstone/archipel-platform-queue/azure<br/><i>AzureQueue</i>"]
|
|
22
|
+
|
|
23
|
+
BullMQ -->|implements| Core
|
|
24
|
+
Azure -->|implements| Core
|
|
25
|
+
|
|
26
|
+
BullMQ -.-|requires| R["bullmq"]
|
|
27
|
+
Azure -.-|requires| S["@azure/service-bus"]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Each provider SDK is an **optional peer dependency**. Install only the one you need. `MemoryQueue` ships with the core entry point and requires no additional dependencies.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
### 1. Install the provider SDK (optional)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Pick one (or use MemoryQueue without any extra SDK):
|
|
40
|
+
yarn add bullmq
|
|
41
|
+
yarn add @azure/service-bus
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Register the queue
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
import { Module } from '@nestjs/common';
|
|
48
|
+
import { IQueue, MemoryQueue } from '@breadstone/archipel-platform-queue';
|
|
49
|
+
|
|
50
|
+
@Module({
|
|
51
|
+
providers: [
|
|
52
|
+
{
|
|
53
|
+
provide: 'IQueue',
|
|
54
|
+
useFactory: () => new MemoryQueue({ maxJobs: 5_000 }),
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
exports: ['IQueue'],
|
|
58
|
+
})
|
|
59
|
+
export class AppModule {}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Switching providers
|
|
63
|
+
|
|
64
|
+
Replace the imports — no other code change needed:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { BullMqQueue } from '@breadstone/archipel-platform-queue/bullmq';
|
|
68
|
+
|
|
69
|
+
{
|
|
70
|
+
provide: 'IQueue',
|
|
71
|
+
useFactory: () => new BullMqQueue({ redisUrl: 'redis://localhost:6379' }),
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Queue Providers
|
|
78
|
+
|
|
79
|
+
### Memory (built-in)
|
|
80
|
+
|
|
81
|
+
**Entry point:** `@breadstone/archipel-platform-queue`
|
|
82
|
+
|
|
83
|
+
| Variable | Required | Default | Description |
|
|
84
|
+
| ---------------- | -------- | ------- | ------------------------------------- |
|
|
85
|
+
| `QUEUE_MAX_JOBS` | No | `10000` | Maximum jobs retained before eviction |
|
|
86
|
+
|
|
87
|
+
### BullMQ
|
|
88
|
+
|
|
89
|
+
**Subpath:** `@breadstone/archipel-platform-queue/bullmq`
|
|
90
|
+
**SDK:** `bullmq` ≥ 5.0.0
|
|
91
|
+
|
|
92
|
+
| Variable | Required | Default | Description |
|
|
93
|
+
| ----------------- | -------- | ------- | -------------------------------------------- |
|
|
94
|
+
| `BULLMQ_REDIS_URL`| Yes | — | Redis connection URL (e.g. `redis://localhost:6379`) |
|
|
95
|
+
| `BULLMQ_PREFIX` | No | `""` | Optional key prefix for all BullMQ queues |
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
import { BullMqQueue, BULLMQ_CONFIG_ENTRIES } from '@breadstone/archipel-platform-queue/bullmq';
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Azure Service Bus
|
|
102
|
+
|
|
103
|
+
**Subpath:** `@breadstone/archipel-platform-queue/azure`
|
|
104
|
+
**SDK:** `@azure/service-bus` ≥ 7.0.0
|
|
105
|
+
|
|
106
|
+
| Variable | Required | Default | Description |
|
|
107
|
+
| ------------------------- | -------- | ------- | ---------------------------------------- |
|
|
108
|
+
| `AZURE_CONNECTION_STRING` | Yes | — | Azure Service Bus connection string |
|
|
109
|
+
| `AZURE_RECEIVE_WAIT_MS` | No | `5000` | Max wait time (ms) when receiving messages|
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
import { AzureQueue, AZURE_CONFIG_ENTRIES } from '@breadstone/archipel-platform-queue/azure';
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Job Lifecycle
|
|
118
|
+
|
|
119
|
+
| Status | Description |
|
|
120
|
+
| ------------ | ---------------------------------------------------- |
|
|
121
|
+
| `pending` | Job is waiting to be picked up |
|
|
122
|
+
| `processing` | Job has been dequeued and is being processed |
|
|
123
|
+
| `completed` | Job finished successfully via `markCompleted()` |
|
|
124
|
+
| `failed` | Job finished with an error via `markFailed()` |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Error Handling
|
|
129
|
+
|
|
130
|
+
| Error Class | Base Class | When Thrown |
|
|
131
|
+
| ----------------------- | ------------ | ---------------------------------------------- |
|
|
132
|
+
| `QueueError` | `Error` | Base class for all queue errors |
|
|
133
|
+
| `QueueJobNotFoundError` | `QueueError` | Job ID does not exist |
|
|
134
|
+
| `QueueJobStateError` | `QueueError` | Job is in wrong state for requested transition |
|
|
135
|
+
| `QueueValidationError` | `QueueError` | Empty queue name or error message |
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Health Check
|
|
140
|
+
|
|
141
|
+
The `QueueHealthIndicator` reports the queue subsystem as available. Import it from the `/health` subpath:
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
import { QueueHealthIndicator } from '@breadstone/archipel-platform-queue/health';
|
|
145
|
+
import { HealthModule } from '@breadstone/archipel-platform-health';
|
|
146
|
+
|
|
147
|
+
@Module({
|
|
148
|
+
imports: [
|
|
149
|
+
QueueModule.register({ /* ... */ }),
|
|
150
|
+
HealthModule.withIndicators([QueueHealthIndicator]),
|
|
151
|
+
],
|
|
152
|
+
})
|
|
153
|
+
export class AppModule {}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
| Key | Check | Dependencies |
|
|
157
|
+
| --- | ----- | ------------ |
|
|
158
|
+
| `queue` | Always reports `up` | None |
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Peer Dependencies
|
|
163
|
+
|
|
164
|
+
| Package | Required | Notes |
|
|
165
|
+
| -------------------- | -------- | -------------------------------- |
|
|
166
|
+
| `@nestjs/common` | Yes | NestJS core |
|
|
167
|
+
| `bullmq` | Optional | Required for BullMQ provider |
|
|
168
|
+
| `@azure/service-bus` | Optional | Required for Azure Service Bus |
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: BlobResourceStrategy'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: BlobResourceStrategy
|
|
7
|
+
|
|
8
|
+
Defined in: [strategies/BlobResourceStrategy.ts:47](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/BlobResourceStrategy.ts#L47)
|
|
9
|
+
|
|
10
|
+
Strategy for loading resources from blob storage.
|
|
11
|
+
|
|
12
|
+
## Implements
|
|
13
|
+
|
|
14
|
+
- [`IResourceStrategy`](Interface.IResourceStrategy)
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
### Constructor
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
new BlobResourceStrategy(blobService, config?): BlobResourceStrategy;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Defined in: [strategies/BlobResourceStrategy.ts:63](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/BlobResourceStrategy.ts#L63)
|
|
25
|
+
|
|
26
|
+
Constructs a new instance of the `BlobResourceStrategy` class.
|
|
27
|
+
|
|
28
|
+
#### Parameters
|
|
29
|
+
|
|
30
|
+
| Parameter | Type |
|
|
31
|
+
| ------ | ------ |
|
|
32
|
+
| `blobService` | [`IBlobServiceAdapter`](Interface.IBlobServiceAdapter) |
|
|
33
|
+
| `config` | [`IBlobResourceStrategyConfig`](Interface.IBlobResourceStrategyConfig) |
|
|
34
|
+
|
|
35
|
+
#### Returns
|
|
36
|
+
|
|
37
|
+
`BlobResourceStrategy`
|
|
38
|
+
|
|
39
|
+
## Accessors
|
|
40
|
+
|
|
41
|
+
### name
|
|
42
|
+
|
|
43
|
+
#### Get Signature
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
get name(): string;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Defined in: [strategies/BlobResourceStrategy.ts:72](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/BlobResourceStrategy.ts#L72)
|
|
50
|
+
|
|
51
|
+
The unique name of this strategy.
|
|
52
|
+
|
|
53
|
+
##### Returns
|
|
54
|
+
|
|
55
|
+
`string`
|
|
56
|
+
|
|
57
|
+
The unique name of this strategy.
|
|
58
|
+
|
|
59
|
+
#### Implementation of
|
|
60
|
+
|
|
61
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`name`](Interface.IResourceStrategy#name)
|
|
62
|
+
|
|
63
|
+
## Methods
|
|
64
|
+
|
|
65
|
+
### exists()
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
exists(key): boolean;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Defined in: [strategies/BlobResourceStrategy.ts:136](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/BlobResourceStrategy.ts#L136)
|
|
72
|
+
|
|
73
|
+
Checks if a resource exists without loading it.
|
|
74
|
+
Note: Blob storage is inherently async, so this delegates to existsAsync internally.
|
|
75
|
+
|
|
76
|
+
#### Parameters
|
|
77
|
+
|
|
78
|
+
| Parameter | Type | Description |
|
|
79
|
+
| ------ | ------ | ------ |
|
|
80
|
+
| `key` | `string` | The resource key |
|
|
81
|
+
|
|
82
|
+
#### Returns
|
|
83
|
+
|
|
84
|
+
`boolean`
|
|
85
|
+
|
|
86
|
+
True if the resource exists
|
|
87
|
+
|
|
88
|
+
#### Implementation of
|
|
89
|
+
|
|
90
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`exists`](Interface.IResourceStrategy#exists)
|
|
91
|
+
|
|
92
|
+
***
|
|
93
|
+
|
|
94
|
+
### existsAsync()
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
existsAsync(key): Promise<boolean>;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Defined in: [strategies/BlobResourceStrategy.ts:147](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/BlobResourceStrategy.ts#L147)
|
|
101
|
+
|
|
102
|
+
Checks if a resource exists without loading it (asynchronous).
|
|
103
|
+
|
|
104
|
+
#### Parameters
|
|
105
|
+
|
|
106
|
+
| Parameter | Type | Description |
|
|
107
|
+
| ------ | ------ | ------ |
|
|
108
|
+
| `key` | `string` | The resource key |
|
|
109
|
+
|
|
110
|
+
#### Returns
|
|
111
|
+
|
|
112
|
+
`Promise`\<`boolean`\>
|
|
113
|
+
|
|
114
|
+
Promise resolving to true if the resource exists
|
|
115
|
+
|
|
116
|
+
#### Implementation of
|
|
117
|
+
|
|
118
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`existsAsync`](Interface.IResourceStrategy#existsasync)
|
|
119
|
+
|
|
120
|
+
***
|
|
121
|
+
|
|
122
|
+
### load()
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
load(key): IResourceResult | undefined;
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Defined in: [strategies/BlobResourceStrategy.ts:88](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/BlobResourceStrategy.ts#L88)
|
|
129
|
+
|
|
130
|
+
Loads a resource by its key.
|
|
131
|
+
Note: Blob storage is inherently async, so this delegates to loadAsync internally.
|
|
132
|
+
|
|
133
|
+
#### Parameters
|
|
134
|
+
|
|
135
|
+
| Parameter | Type | Description |
|
|
136
|
+
| ------ | ------ | ------ |
|
|
137
|
+
| `key` | `string` | The resource key |
|
|
138
|
+
|
|
139
|
+
#### Returns
|
|
140
|
+
|
|
141
|
+
[`IResourceResult`](Interface.IResourceResult) \| `undefined`
|
|
142
|
+
|
|
143
|
+
The resource result or undefined if not found
|
|
144
|
+
|
|
145
|
+
#### Implementation of
|
|
146
|
+
|
|
147
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`load`](Interface.IResourceStrategy#load)
|
|
148
|
+
|
|
149
|
+
***
|
|
150
|
+
|
|
151
|
+
### loadAsync()
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
loadAsync(key): Promise<IResourceResult | undefined>;
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Defined in: [strategies/BlobResourceStrategy.ts:99](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/BlobResourceStrategy.ts#L99)
|
|
158
|
+
|
|
159
|
+
Loads a resource by its key (asynchronous).
|
|
160
|
+
|
|
161
|
+
#### Parameters
|
|
162
|
+
|
|
163
|
+
| Parameter | Type | Description |
|
|
164
|
+
| ------ | ------ | ------ |
|
|
165
|
+
| `key` | `string` | The resource key |
|
|
166
|
+
|
|
167
|
+
#### Returns
|
|
168
|
+
|
|
169
|
+
`Promise`\<[`IResourceResult`](Interface.IResourceResult) \| `undefined`\>
|
|
170
|
+
|
|
171
|
+
Promise resolving to the resource result or undefined if not found
|
|
172
|
+
|
|
173
|
+
#### Implementation of
|
|
174
|
+
|
|
175
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`loadAsync`](Interface.IResourceStrategy#loadasync)
|
|
176
|
+
|
|
177
|
+
***
|
|
178
|
+
|
|
179
|
+
### whatDoIHave()
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
whatDoIHave(): void;
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Defined in: [strategies/BlobResourceStrategy.ts:163](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-resources/src/strategies/BlobResourceStrategy.ts#L163)
|
|
186
|
+
|
|
187
|
+
List all files and folders in the base paths for debugging purposes.
|
|
188
|
+
|
|
189
|
+
#### Returns
|
|
190
|
+
|
|
191
|
+
`void`
|
|
192
|
+
|
|
193
|
+
#### Implementation of
|
|
194
|
+
|
|
195
|
+
[`IResourceStrategy`](Interface.IResourceStrategy).[`whatDoIHave`](Interface.IResourceStrategy#whatdoihave)
|