@lafken/queue 0.14.0 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,65 @@
1
+ /**
2
+ * Options for sending a single message to an SQS queue via
3
+ * `QueueService.sendMessage`.
4
+ *
5
+ * @example
6
+ * await QueueService.sendMessage({
7
+ * url: 'https://sqs.us-east-1.amazonaws.com/123456789/orders',
8
+ * body: { orderId: 'ord-123', total: 49.99 },
9
+ * delay: 10,
10
+ * });
11
+ *
12
+ * @example
13
+ * // Send to a FIFO queue
14
+ * await QueueService.sendMessage({
15
+ * url: 'https://sqs.us-east-1.amazonaws.com/123456789/payments.fifo',
16
+ * body: { paymentId: 'pay-456', amount: 100 },
17
+ * groupId: 'customer-789',
18
+ * deduplicationId: 'pay-456',
19
+ * });
20
+ */
1
21
  export interface SendMessageProps {
22
+ /**
23
+ * Full SQS queue URL.
24
+ *
25
+ * Identifies the queue the message is sent to, e.g.
26
+ * `https://sqs.us-east-1.amazonaws.com/123456789/my-queue`.
27
+ */
2
28
  url: string;
29
+ /**
30
+ * SQS message attributes.
31
+ *
32
+ * Each entry is sent as a message attribute with its `DataType` inferred
33
+ * from the value type: `number` values become `Number` and `string` values
34
+ * become `String`.
35
+ */
3
36
  attributes?: Record<string, number | string>;
37
+ /**
38
+ * Message body.
39
+ *
40
+ * Automatically JSON-stringified before sending. Omit to send a message
41
+ * without a body.
42
+ */
4
43
  body?: any;
44
+ /**
45
+ * Delay in seconds before the message becomes visible to consumers.
46
+ *
47
+ * Maps to the SQS `DelaySeconds` parameter. Only applies to standard queues
48
+ * (FIFO queues do not support per-message delays).
49
+ */
5
50
  delay?: number;
6
51
  /**
7
- * only for fifo queues
52
+ * Deduplication ID used to prevent duplicate messages.
53
+ *
54
+ * Only applies to FIFO queues. Required when the queue has
55
+ * content-based deduplication disabled.
8
56
  */
9
57
  deduplicationId?: string;
10
58
  /**
11
- * only for fifo queues
59
+ * Message group ID used to enforce ordered, exactly-once processing.
60
+ *
61
+ * Only applies to FIFO queues. Messages with the same group ID are
62
+ * processed in strict order.
12
63
  */
13
64
  groupId?: string;
14
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lafken/queue",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "private": false,
5
5
  "description": "Define SQS queues and consumers using TypeScript decorators - automatic infrastructure generation with Lafken",
6
6
  "keywords": [
@@ -43,6 +43,9 @@
43
43
  "main": [
44
44
  "./lib/main/index.d.ts"
45
45
  ],
46
+ "service": [
47
+ "./lib/service/index.d.ts"
48
+ ],
46
49
  "resolver": [
47
50
  "./lib/resolver/index.d.ts"
48
51
  ]
@@ -54,7 +57,7 @@
54
57
  "dependencies": {
55
58
  "@aws-sdk/client-sqs": "^3.1106.0",
56
59
  "reflect-metadata": "^0.2.2",
57
- "@lafken/resolver": "0.14.0"
60
+ "@lafken/resolver": "0.14.2"
58
61
  },
59
62
  "devDependencies": {
60
63
  "@cdktn/provider-aws": "^25.0.0",
@@ -68,13 +71,13 @@
68
71
  "typescript": "7.0.2",
69
72
  "unplugin-swc": "^1.5.10",
70
73
  "vitest": "^4.1.10",
71
- "@lafken/common": "0.14.0"
74
+ "@lafken/common": "0.14.2"
72
75
  },
73
76
  "peerDependencies": {
74
77
  "@cdktn/provider-aws": ">=23.0.0",
75
78
  "cdktn": ">=0.22.0",
76
79
  "constructs": ">=10.7.0",
77
- "@lafken/common": "0.14.0"
80
+ "@lafken/common": "0.14.2"
78
81
  },
79
82
  "engines": {
80
83
  "node": ">=20.19"