@breadstone/archipel-mcp 0.0.22 → 0.0.25
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/README.md +32 -13
- package/data/guides/ai-text-generation.md +16 -24
- package/data/guides/caching.md +33 -0
- package/data/guides/email-delivery.md +27 -1
- package/data/guides/email-templates.md +49 -39
- 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/Interface.IMfaSubjectUpdate.md +1 -1
- package/data/packages/platform-authentication/api/index.md +2 -1
- 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 +13 -13
- 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 +20 -20
- package/data/packages/platform-database/api/Function.paginator.md +1 -1
- package/data/packages/platform-database/api/Interface.IDatabaseModuleConfig.md +3 -3
- package/data/packages/platform-database/api/TypeAlias.DelegateArgs.md +1 -1
- 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/Variable.DATABASE_MODULE_CONFIG.md +1 -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 +19 -8
- 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-mapping/index.md +1 -1
- 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-resources/index.md +1 -1
- package/data/packages/platform-telemetry/api/Class.OtelSdkHolder.md +21 -3
- 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 +5 -3
- package/package.json +2 -2
- package/src/tools/registerGetConfigPatternTool.js +1 -1
- package/src/tools/registerGetDtoPatternTool.js +1 -1
- package/src/tools/registerGetErrorHandlingPatternTool.js +1 -1
- package/src/tools/registerGetGuardPatternTool.js +1 -1
- package/src/tools/registerGetMappingPatternTool.js +1 -1
- package/src/tools/registerGetModulePatternTool.js +1 -1
- package/src/tools/registerGetQueryPatternTool.js +1 -1
- package/src/tools/registerGetRepositoryPatternTool.js +1 -1
- package/src/tools/registerGetTestingPatternTool.js +1 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: MemoryQueue'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: MemoryQueue
|
|
7
|
+
|
|
8
|
+
Defined in: [memory/MemoryQueue.ts:47](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/memory/MemoryQueue.ts#L47)
|
|
9
|
+
|
|
10
|
+
In-memory FIFO queue implementation.
|
|
11
|
+
|
|
12
|
+
Stores all jobs in process memory. Suitable for development, testing,
|
|
13
|
+
and lightweight single-instance workloads. Data is lost on process restart.
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
Jobs are organized per named queue. Capacity enforcement evicts the oldest
|
|
18
|
+
completed or failed jobs when [IMemoryQueueOptions.maxJobs](Interface.IMemoryQueueOptions#maxjobs) is reached.
|
|
19
|
+
|
|
20
|
+
## Implements
|
|
21
|
+
|
|
22
|
+
- [`IQueue`](Interface.IQueue)
|
|
23
|
+
|
|
24
|
+
## Constructors
|
|
25
|
+
|
|
26
|
+
### Constructor
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
new MemoryQueue(options?): MemoryQueue;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Defined in: [memory/MemoryQueue.ts:65](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/memory/MemoryQueue.ts#L65)
|
|
33
|
+
|
|
34
|
+
Creates a new MemoryQueue instance.
|
|
35
|
+
|
|
36
|
+
#### Parameters
|
|
37
|
+
|
|
38
|
+
| Parameter | Type | Description |
|
|
39
|
+
| ------ | ------ | ------ |
|
|
40
|
+
| `options?` | [`IMemoryQueueOptions`](Interface.IMemoryQueueOptions) | Optional configuration. See [IMemoryQueueOptions](Interface.IMemoryQueueOptions). |
|
|
41
|
+
|
|
42
|
+
#### Returns
|
|
43
|
+
|
|
44
|
+
`MemoryQueue`
|
|
45
|
+
|
|
46
|
+
## Methods
|
|
47
|
+
|
|
48
|
+
### dequeue()
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
dequeue(queueName): Promise<IQueueJob<unknown> | null>;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Defined in: [memory/MemoryQueue.ts:103](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/memory/MemoryQueue.ts#L103)
|
|
55
|
+
|
|
56
|
+
Dequeues the next pending job from the named queue.
|
|
57
|
+
|
|
58
|
+
The returned job transitions to `processing` status.
|
|
59
|
+
|
|
60
|
+
#### Parameters
|
|
61
|
+
|
|
62
|
+
| Parameter | Type | Description |
|
|
63
|
+
| ------ | ------ | ------ |
|
|
64
|
+
| `queueName` | `string` | The name of the queue to dequeue from. |
|
|
65
|
+
|
|
66
|
+
#### Returns
|
|
67
|
+
|
|
68
|
+
`Promise`\<[`IQueueJob`](Interface.IQueueJob)\<`unknown`\> \| `null`\>
|
|
69
|
+
|
|
70
|
+
The next pending job, or `null` if the queue is empty.
|
|
71
|
+
|
|
72
|
+
#### Implementation of
|
|
73
|
+
|
|
74
|
+
[`IQueue`](Interface.IQueue).[`dequeue`](Interface.IQueue#dequeue)
|
|
75
|
+
|
|
76
|
+
***
|
|
77
|
+
|
|
78
|
+
### enqueue()
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
enqueue<T>(queueName, payload): Promise<IQueueJob<T>>;
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Defined in: [memory/MemoryQueue.ts:74](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/memory/MemoryQueue.ts#L74)
|
|
85
|
+
|
|
86
|
+
Enqueues a new job into the named queue.
|
|
87
|
+
|
|
88
|
+
#### Type Parameters
|
|
89
|
+
|
|
90
|
+
| Type Parameter | Default type | Description |
|
|
91
|
+
| ------ | ------ | ------ |
|
|
92
|
+
| `T` | `unknown` | |
|
|
93
|
+
|
|
94
|
+
#### Parameters
|
|
95
|
+
|
|
96
|
+
| Parameter | Type | Description |
|
|
97
|
+
| ------ | ------ | ------ |
|
|
98
|
+
| `queueName` | `string` | The name of the target queue. |
|
|
99
|
+
| `payload` | `T` | The job payload. |
|
|
100
|
+
|
|
101
|
+
#### Returns
|
|
102
|
+
|
|
103
|
+
`Promise`\<[`IQueueJob`](Interface.IQueueJob)\<`T`\>\>
|
|
104
|
+
|
|
105
|
+
The created job in `pending` status.
|
|
106
|
+
|
|
107
|
+
#### Implementation of
|
|
108
|
+
|
|
109
|
+
[`IQueue`](Interface.IQueue).[`enqueue`](Interface.IQueue#enqueue)
|
|
110
|
+
|
|
111
|
+
***
|
|
112
|
+
|
|
113
|
+
### getJobs()
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
getJobs(queueName): Promise<readonly IQueueJob<unknown>[]>;
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Defined in: [memory/MemoryQueue.ts:188](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/memory/MemoryQueue.ts#L188)
|
|
120
|
+
|
|
121
|
+
Returns all jobs for the given queue in insertion order.
|
|
122
|
+
|
|
123
|
+
#### Parameters
|
|
124
|
+
|
|
125
|
+
| Parameter | Type | Description |
|
|
126
|
+
| ------ | ------ | ------ |
|
|
127
|
+
| `queueName` | `string` | The name of the queue. |
|
|
128
|
+
|
|
129
|
+
#### Returns
|
|
130
|
+
|
|
131
|
+
`Promise`\<readonly [`IQueueJob`](Interface.IQueueJob)\<`unknown`\>[]\>
|
|
132
|
+
|
|
133
|
+
An array of jobs, possibly empty.
|
|
134
|
+
|
|
135
|
+
#### Implementation of
|
|
136
|
+
|
|
137
|
+
[`IQueue`](Interface.IQueue).[`getJobs`](Interface.IQueue#getjobs)
|
|
138
|
+
|
|
139
|
+
***
|
|
140
|
+
|
|
141
|
+
### markCompleted()
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
markCompleted(jobId): Promise<IQueueJob<unknown>>;
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Defined in: [memory/MemoryQueue.ts:138](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/memory/MemoryQueue.ts#L138)
|
|
148
|
+
|
|
149
|
+
Marks a processing job as completed.
|
|
150
|
+
|
|
151
|
+
#### Parameters
|
|
152
|
+
|
|
153
|
+
| Parameter | Type | Description |
|
|
154
|
+
| ------ | ------ | ------ |
|
|
155
|
+
| `jobId` | `string` | The ID of the job to complete. |
|
|
156
|
+
|
|
157
|
+
#### Returns
|
|
158
|
+
|
|
159
|
+
`Promise`\<[`IQueueJob`](Interface.IQueueJob)\<`unknown`\>\>
|
|
160
|
+
|
|
161
|
+
The updated job in `completed` status.
|
|
162
|
+
|
|
163
|
+
#### Implementation of
|
|
164
|
+
|
|
165
|
+
[`IQueue`](Interface.IQueue).[`markCompleted`](Interface.IQueue#markcompleted)
|
|
166
|
+
|
|
167
|
+
***
|
|
168
|
+
|
|
169
|
+
### markFailed()
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
markFailed(jobId, errorMessage): Promise<IQueueJob<unknown>>;
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Defined in: [memory/MemoryQueue.ts:160](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/memory/MemoryQueue.ts#L160)
|
|
176
|
+
|
|
177
|
+
Marks a processing job as failed.
|
|
178
|
+
|
|
179
|
+
#### Parameters
|
|
180
|
+
|
|
181
|
+
| Parameter | Type | Description |
|
|
182
|
+
| ------ | ------ | ------ |
|
|
183
|
+
| `jobId` | `string` | The ID of the job to mark as failed. |
|
|
184
|
+
| `errorMessage` | `string` | A human-readable error message. |
|
|
185
|
+
|
|
186
|
+
#### Returns
|
|
187
|
+
|
|
188
|
+
`Promise`\<[`IQueueJob`](Interface.IQueueJob)\<`unknown`\>\>
|
|
189
|
+
|
|
190
|
+
The updated job in `failed` status.
|
|
191
|
+
|
|
192
|
+
#### Implementation of
|
|
193
|
+
|
|
194
|
+
[`IQueue`](Interface.IQueue).[`markFailed`](Interface.IQueue#markfailed)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: QueueError'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: QueueError
|
|
7
|
+
|
|
8
|
+
Defined in: [errors/QueueError.ts:9](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/errors/QueueError.ts#L9)
|
|
9
|
+
|
|
10
|
+
Base error class for all queue-related errors.
|
|
11
|
+
|
|
12
|
+
Every domain-specific queue error (validation, not-found, state) extends
|
|
13
|
+
this class so consumers can catch the entire hierarchy with a single type.
|
|
14
|
+
|
|
15
|
+
## Extends
|
|
16
|
+
|
|
17
|
+
- `Error`
|
|
18
|
+
|
|
19
|
+
## Extended by
|
|
20
|
+
|
|
21
|
+
- [`QueueJobNotFoundError`](Class.QueueJobNotFoundError)
|
|
22
|
+
- [`QueueJobStateError`](Class.QueueJobStateError)
|
|
23
|
+
- [`QueueValidationError`](Class.QueueValidationError)
|
|
24
|
+
|
|
25
|
+
## Constructors
|
|
26
|
+
|
|
27
|
+
### Constructor
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
new QueueError(message): QueueError;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Defined in: [errors/QueueError.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/errors/QueueError.ts#L17)
|
|
34
|
+
|
|
35
|
+
Creates a new QueueError.
|
|
36
|
+
|
|
37
|
+
#### Parameters
|
|
38
|
+
|
|
39
|
+
| Parameter | Type | Description |
|
|
40
|
+
| ------ | ------ | ------ |
|
|
41
|
+
| `message` | `string` | A human-readable description of the error. |
|
|
42
|
+
|
|
43
|
+
#### Returns
|
|
44
|
+
|
|
45
|
+
`QueueError`
|
|
46
|
+
|
|
47
|
+
#### Overrides
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
Error.constructor
|
|
51
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: QueueHealthIndicator'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: QueueHealthIndicator
|
|
7
|
+
|
|
8
|
+
Defined in: health/QueueHealthIndicator.ts:15
|
|
9
|
+
|
|
10
|
+
Health indicator for the queue infrastructure.
|
|
11
|
+
|
|
12
|
+
## Implements
|
|
13
|
+
|
|
14
|
+
- `IHealthIndicator`
|
|
15
|
+
|
|
16
|
+
## Constructors
|
|
17
|
+
|
|
18
|
+
### Constructor
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
new QueueHealthIndicator(): QueueHealthIndicator;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
#### Returns
|
|
25
|
+
|
|
26
|
+
`QueueHealthIndicator`
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
|
|
30
|
+
### key
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
readonly key: string = 'queue';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Defined in: health/QueueHealthIndicator.ts:18
|
|
37
|
+
|
|
38
|
+
Unique key identifying the indicator
|
|
39
|
+
|
|
40
|
+
#### Implementation of
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
IHealthIndicator.key
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Methods
|
|
47
|
+
|
|
48
|
+
### check()
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
check(): HealthIndicatorResult<string>;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Defined in: health/QueueHealthIndicator.ts:30
|
|
55
|
+
|
|
56
|
+
Returns the health status of the queue infrastructure.
|
|
57
|
+
|
|
58
|
+
#### Returns
|
|
59
|
+
|
|
60
|
+
`HealthIndicatorResult`\<`string`\>
|
|
61
|
+
|
|
62
|
+
The health indicator result.
|
|
63
|
+
|
|
64
|
+
#### Implementation of
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
IHealthIndicator.check
|
|
68
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: QueueJobNotFoundError'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: QueueJobNotFoundError
|
|
7
|
+
|
|
8
|
+
Defined in: [errors/QueueJobNotFoundError.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/errors/QueueJobNotFoundError.ts#L15)
|
|
9
|
+
|
|
10
|
+
Thrown when a queue job cannot be found by its ID.
|
|
11
|
+
|
|
12
|
+
Typically raised by [IQueue.markCompleted](Interface.IQueue#markcompleted) or [IQueue.markFailed](Interface.IQueue#markfailed)
|
|
13
|
+
when the supplied job identifier does not match any tracked job.
|
|
14
|
+
|
|
15
|
+
## Extends
|
|
16
|
+
|
|
17
|
+
- [`QueueError`](Class.QueueError)
|
|
18
|
+
|
|
19
|
+
## Constructors
|
|
20
|
+
|
|
21
|
+
### Constructor
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
new QueueJobNotFoundError(jobId): QueueJobNotFoundError;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Defined in: [errors/QueueJobNotFoundError.ts:23](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/errors/QueueJobNotFoundError.ts#L23)
|
|
28
|
+
|
|
29
|
+
Creates a new QueueJobNotFoundError.
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
| Parameter | Type | Description |
|
|
34
|
+
| ------ | ------ | ------ |
|
|
35
|
+
| `jobId` | `string` | The identifier of the job that could not be located. |
|
|
36
|
+
|
|
37
|
+
#### Returns
|
|
38
|
+
|
|
39
|
+
`QueueJobNotFoundError`
|
|
40
|
+
|
|
41
|
+
#### Overrides
|
|
42
|
+
|
|
43
|
+
[`QueueError`](Class.QueueError).[`constructor`](Class.QueueError#constructor)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: QueueJobStateError'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: QueueJobStateError
|
|
7
|
+
|
|
8
|
+
Defined in: [errors/QueueJobStateError.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/errors/QueueJobStateError.ts#L15)
|
|
9
|
+
|
|
10
|
+
Thrown when a queue job is in an invalid state for the requested transition.
|
|
11
|
+
|
|
12
|
+
For example, calling [IQueue.markCompleted](Interface.IQueue#markcompleted) on a job that is still
|
|
13
|
+
in `pending` status rather than `processing` triggers this error.
|
|
14
|
+
|
|
15
|
+
## Extends
|
|
16
|
+
|
|
17
|
+
- [`QueueError`](Class.QueueError)
|
|
18
|
+
|
|
19
|
+
## Constructors
|
|
20
|
+
|
|
21
|
+
### Constructor
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
new QueueJobStateError(
|
|
25
|
+
jobId,
|
|
26
|
+
expectedStatus,
|
|
27
|
+
actualStatus): QueueJobStateError;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Defined in: [errors/QueueJobStateError.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/errors/QueueJobStateError.ts#L25)
|
|
31
|
+
|
|
32
|
+
Creates a new QueueJobStateError.
|
|
33
|
+
|
|
34
|
+
#### Parameters
|
|
35
|
+
|
|
36
|
+
| Parameter | Type | Description |
|
|
37
|
+
| ------ | ------ | ------ |
|
|
38
|
+
| `jobId` | `string` | The identifier of the affected job. |
|
|
39
|
+
| `expectedStatus` | `string` | The status required for the attempted transition. |
|
|
40
|
+
| `actualStatus` | `string` | The current status of the job. |
|
|
41
|
+
|
|
42
|
+
#### Returns
|
|
43
|
+
|
|
44
|
+
`QueueJobStateError`
|
|
45
|
+
|
|
46
|
+
#### Overrides
|
|
47
|
+
|
|
48
|
+
[`QueueError`](Class.QueueError).[`constructor`](Class.QueueError#constructor)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Class: QueueValidationError'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Class: QueueValidationError
|
|
7
|
+
|
|
8
|
+
Defined in: [errors/QueueValidationError.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/errors/QueueValidationError.ts#L15)
|
|
9
|
+
|
|
10
|
+
Thrown when a queue operation receives invalid input.
|
|
11
|
+
|
|
12
|
+
Common triggers include an empty or whitespace-only queue name,
|
|
13
|
+
or an empty error message passed to [IQueue.markFailed](Interface.IQueue#markfailed).
|
|
14
|
+
|
|
15
|
+
## Extends
|
|
16
|
+
|
|
17
|
+
- [`QueueError`](Class.QueueError)
|
|
18
|
+
|
|
19
|
+
## Constructors
|
|
20
|
+
|
|
21
|
+
### Constructor
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
new QueueValidationError(message): QueueValidationError;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Defined in: [errors/QueueValidationError.ts:23](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/errors/QueueValidationError.ts#L23)
|
|
28
|
+
|
|
29
|
+
Creates a new QueueValidationError.
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
| Parameter | Type | Description |
|
|
34
|
+
| ------ | ------ | ------ |
|
|
35
|
+
| `message` | `string` | A human-readable description of the validation failure. |
|
|
36
|
+
|
|
37
|
+
#### Returns
|
|
38
|
+
|
|
39
|
+
`QueueValidationError`
|
|
40
|
+
|
|
41
|
+
#### Overrides
|
|
42
|
+
|
|
43
|
+
[`QueueError`](Class.QueueError).[`constructor`](Class.QueueError#constructor)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Interface: IAzureQueueOptions'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Interface: IAzureQueueOptions
|
|
7
|
+
|
|
8
|
+
Defined in: [azure/AzureQueue.ts:19](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/azure/AzureQueue.ts#L19)
|
|
9
|
+
|
|
10
|
+
Configuration options for [AzureQueue](Class.AzureQueue).
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### connectionString
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
connectionString: string;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Defined in: [azure/AzureQueue.ts:28](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/azure/AzureQueue.ts#L28)
|
|
21
|
+
|
|
22
|
+
Azure Service Bus connection string.
|
|
23
|
+
|
|
24
|
+
#### Example
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
`Endpoint=sb://my-namespace.servicebus.windows.net/;SharedAccessKeyName=...;SharedAccessKey=...`
|
|
28
|
+
@public
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### receiveWaitMs?
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
optional receiveWaitMs?: number;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Defined in: [azure/AzureQueue.ts:36](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/azure/AzureQueue.ts#L36)
|
|
40
|
+
|
|
41
|
+
Maximum wait time in milliseconds when receiving messages.
|
|
42
|
+
|
|
43
|
+
#### Default Value
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
5_000
|
|
47
|
+
@public
|
|
48
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Interface: IBullMqQueueOptions'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Interface: IBullMqQueueOptions
|
|
7
|
+
|
|
8
|
+
Defined in: [bullmq/BullMqQueue.ts:20](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/bullmq/BullMqQueue.ts#L20)
|
|
9
|
+
|
|
10
|
+
Configuration options for [BullMqQueue](Class.BullMqQueue).
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### prefix?
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
optional prefix?: string;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Defined in: [bullmq/BullMqQueue.ts:37](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/bullmq/BullMqQueue.ts#L37)
|
|
21
|
+
|
|
22
|
+
Optional prefix applied to all BullMQ queue keys in Redis.
|
|
23
|
+
|
|
24
|
+
#### Default Value
|
|
25
|
+
|
|
26
|
+
`''`
|
|
27
|
+
|
|
28
|
+
***
|
|
29
|
+
|
|
30
|
+
### redisUrl
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
redisUrl: string;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Defined in: [bullmq/BullMqQueue.ts:29](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/bullmq/BullMqQueue.ts#L29)
|
|
37
|
+
|
|
38
|
+
Redis connection URL.
|
|
39
|
+
|
|
40
|
+
#### Example
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
`redis://localhost:6379`
|
|
44
|
+
@public
|
|
45
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Interface: IMemoryQueueOptions'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Interface: IMemoryQueueOptions
|
|
7
|
+
|
|
8
|
+
Defined in: [memory/MemoryQueue.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/memory/MemoryQueue.ts#L17)
|
|
9
|
+
|
|
10
|
+
Configuration options for [MemoryQueue](Class.MemoryQueue).
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### maxJobs?
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
optional maxJobs?: number;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Defined in: [memory/MemoryQueue.ts:29](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-queue/src/memory/MemoryQueue.ts#L29)
|
|
21
|
+
|
|
22
|
+
Maximum number of jobs retained across all queues.
|
|
23
|
+
|
|
24
|
+
When the limit is exceeded, the oldest completed or failed jobs
|
|
25
|
+
are evicted first. Defaults to `10_000`.
|
|
26
|
+
|
|
27
|
+
#### Default Value
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
10_000
|
|
31
|
+
@public
|
|
32
|
+
```
|