@aligent/aws-wrappers 0.5.9 → 0.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +78 -10
  2. package/cjs/index.cjs +427 -133
  3. package/cjs/package.json +3 -2
  4. package/cjs/src/dynamodb/dynamodb.d.ts +23 -4
  5. package/cjs/src/dynamodb/dynamodb.d.ts.map +1 -1
  6. package/cjs/src/eventbridge/eventbridge.d.ts.map +1 -1
  7. package/cjs/src/index.d.ts +1 -0
  8. package/cjs/src/index.d.ts.map +1 -1
  9. package/cjs/src/s3/s3.d.ts +6 -1
  10. package/cjs/src/s3/s3.d.ts.map +1 -1
  11. package/cjs/src/secrets-manager/secrets-manager.d.ts +3 -1
  12. package/cjs/src/secrets-manager/secrets-manager.d.ts.map +1 -1
  13. package/cjs/src/ses/ses.d.ts +64 -0
  14. package/cjs/src/ses/ses.d.ts.map +1 -0
  15. package/cjs/src/sns/sns.d.ts +8 -5
  16. package/cjs/src/sns/sns.d.ts.map +1 -1
  17. package/cjs/src/sqs/sqs.d.ts +7 -3
  18. package/cjs/src/sqs/sqs.d.ts.map +1 -1
  19. package/cjs/src/ssm/ssm.d.ts +3 -1
  20. package/cjs/src/ssm/ssm.d.ts.map +1 -1
  21. package/cjs/src/util/batch-operation-error.d.ts +19 -2
  22. package/cjs/src/util/batch-operation-error.d.ts.map +1 -1
  23. package/cjs/src/util/chunk.d.ts +8 -0
  24. package/cjs/src/util/chunk.d.ts.map +1 -1
  25. package/cjs/src/util/json.d.ts +14 -0
  26. package/cjs/src/util/json.d.ts.map +1 -0
  27. package/docs/index/classes/APIGatewayService.md +6 -6
  28. package/docs/index/classes/APIGatewayV2Service.md +5 -5
  29. package/docs/index/classes/BatchOperationError.md +15 -6
  30. package/docs/index/classes/DynamoDBService.md +39 -16
  31. package/docs/index/classes/EventBridgeService.md +3 -3
  32. package/docs/index/classes/LambdaFunctionError.md +7 -7
  33. package/docs/index/classes/LambdaService.md +3 -3
  34. package/docs/index/classes/S3Service.md +24 -16
  35. package/docs/index/classes/SESService.md +123 -0
  36. package/docs/index/classes/SNSService.md +12 -9
  37. package/docs/index/classes/SQSService.md +14 -10
  38. package/docs/index/classes/SSMService.md +10 -8
  39. package/docs/index/classes/SchedulerService.md +11 -11
  40. package/docs/index/classes/SecretsManagerService.md +11 -9
  41. package/docs/index/classes/StepFunctionsService.md +6 -6
  42. package/docs/index/interfaces/BatchFailedEntry.md +6 -5
  43. package/docs/index/interfaces/EmptyBucketPageResult.md +2 -2
  44. package/docs/index/modules.md +1 -0
  45. package/docs/testing/testing/functions/createMockService.md +1 -1
  46. package/esm/index.mjs +428 -135
  47. package/esm/package.json +3 -2
  48. package/esm/src/dynamodb/dynamodb.d.ts +23 -4
  49. package/esm/src/dynamodb/dynamodb.d.ts.map +1 -1
  50. package/esm/src/eventbridge/eventbridge.d.ts.map +1 -1
  51. package/esm/src/index.d.ts +1 -0
  52. package/esm/src/index.d.ts.map +1 -1
  53. package/esm/src/s3/s3.d.ts +6 -1
  54. package/esm/src/s3/s3.d.ts.map +1 -1
  55. package/esm/src/secrets-manager/secrets-manager.d.ts +3 -1
  56. package/esm/src/secrets-manager/secrets-manager.d.ts.map +1 -1
  57. package/esm/src/ses/ses.d.ts +64 -0
  58. package/esm/src/ses/ses.d.ts.map +1 -0
  59. package/esm/src/sns/sns.d.ts +8 -5
  60. package/esm/src/sns/sns.d.ts.map +1 -1
  61. package/esm/src/sqs/sqs.d.ts +7 -3
  62. package/esm/src/sqs/sqs.d.ts.map +1 -1
  63. package/esm/src/ssm/ssm.d.ts +3 -1
  64. package/esm/src/ssm/ssm.d.ts.map +1 -1
  65. package/esm/src/util/batch-operation-error.d.ts +19 -2
  66. package/esm/src/util/batch-operation-error.d.ts.map +1 -1
  67. package/esm/src/util/chunk.d.ts +8 -0
  68. package/esm/src/util/chunk.d.ts.map +1 -1
  69. package/esm/src/util/json.d.ts +14 -0
  70. package/esm/src/util/json.d.ts.map +1 -0
  71. package/package.json +3 -2
package/cjs/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@aligent/aws-wrappers",
3
- "version": "0.5.9",
3
+ "version": "0.5.11",
4
4
  "description": "Opinionated AWS SDK wrappers with Powertools logging and X-Ray tracing",
5
5
  "engines": {
6
- "node": ">=18"
6
+ "node": ">=20"
7
7
  },
8
8
  "main": "./index.cjs.js",
9
9
  "module": "./esm/index.mjs",
@@ -52,6 +52,7 @@
52
52
  "@aws-sdk/client-s3": "^3.1160.0",
53
53
  "@aws-sdk/client-scheduler": "^3.1160.0",
54
54
  "@aws-sdk/client-secrets-manager": "^3.1160.0",
55
+ "@aws-sdk/client-sesv2": "^3.1160.0",
55
56
  "@aws-sdk/client-sfn": "^3.1160.0",
56
57
  "@aws-sdk/client-sns": "^3.1160.0",
57
58
  "@aws-sdk/client-sqs": "^3.1160.0",
@@ -105,19 +105,38 @@ export declare class DynamoDBService {
105
105
  /**
106
106
  * Batch-get items from one or more DynamoDB tables, retrying
107
107
  * `UnprocessedKeys` with jittered exponential backoff. Up to 5 attempts
108
- * (200ms base delay). Throws when keys remain unprocessed after the final
109
- * attempt. `Responses` are merged across attempts, keyed by table name.
108
+ * (200ms base delay). `Responses` are merged across attempts, keyed by
109
+ * table name.
110
110
  *
111
111
  * Note: this method is intentionally **not** generic. `BatchGet`'s
112
112
  * `Responses` field is a multi-table `Record<string, item[]>` whose item
113
113
  * shapes can differ per table — no single `T` can soundly describe it.
114
114
  * Callers should narrow the result type at the call site.
115
+ *
116
+ * @throws {@link BatchOperationError} when keys remain unprocessed after
117
+ * the final attempt. `results` holds one output: the merged `Responses`
118
+ * retrieved so far, plus the still-pending `UnprocessedKeys` to retry.
119
+ * `failed` has one entry per pending key with `code: 'UnprocessedKeys'`
120
+ * and an `id` of `<table>[<index>]`, the key's position in
121
+ * `results[0].UnprocessedKeys[<table>].Keys`. The `failed` list never
122
+ * carries key values; `results` does, as it is data the caller requested,
123
+ * so don't log the error object itself (see {@link BatchOperationError}).
124
+ * Request-level SDK exceptions propagate unchanged.
115
125
  */
116
126
  batchGet(input: BatchGetCommandInput): Promise<BatchGetCommandOutput>;
117
127
  /**
118
128
  * Batch-write items to DynamoDB, retrying `UnprocessedItems` with jittered
119
- * exponential backoff. Up to 5 attempts (200ms base delay). Throws when
120
- * items remain unprocessed after the final attempt.
129
+ * exponential backoff. Up to 5 attempts (200ms base delay).
130
+ *
131
+ * @throws {@link BatchOperationError} when items remain unprocessed after
132
+ * the final attempt. `results` holds one output: the last response, whose
133
+ * `UnprocessedItems` are the writes still to retry. `failed` has one entry
134
+ * per pending write with `code: 'UnprocessedItems'` and an `id` of
135
+ * `<table>[<index>]`, the write's position in
136
+ * `results[0].UnprocessedItems[<table>]`. The `failed` list never carries
137
+ * item data; `results` does, as it is data the caller supplied, so don't
138
+ * log the error object itself (see {@link BatchOperationError}).
139
+ * Request-level SDK exceptions propagate unchanged.
121
140
  */
122
141
  batchWrite(input: BatchWriteCommandInput): Promise<BatchWriteCommandOutput>;
123
142
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dynamodb.d.ts","sourceRoot":"","sources":["../../../../src/dynamodb/dynamodb.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAEH,oBAAoB,EACpB,qBAAqB,EAErB,sBAAsB,EACtB,uBAAuB,EAEvB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EAEtB,eAAe,EAIf,eAAe,EACf,gBAAgB,EAEhB,iBAAiB,EACjB,kBAAkB,EAElB,gBAAgB,EAChB,iBAAiB,EAEjB,kBAAkB,EAClB,mBAAmB,EACtB,MAAM,uBAAuB,CAAC;AAoH/B;;;GAGG;AACH,KAAK,YAAY,CAAC,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG;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AAC;AAC3E,OAAO,EACH,iBAAiB,EAEjB,qBAAqB,EACrB,sBAAsB,EAEzB,MAAM,6BAA6B,CAAC;AA4CrC;;;;;;;;;;GAUG;AACH,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;OAKG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,iBAAiB,CAAA;KAAE;IAK3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,SAAS,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;CAkBnF"}
1
+ {"version":3,"file":"eventbridge.d.ts","sourceRoot":"","sources":["../../../../src/eventbridge/eventbridge.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EACH,iBAAiB,EAEjB,qBAAqB,EACrB,sBAAsB,EAEzB,MAAM,6BAA6B,CAAC;AAwCrC;;;;;;;;;;GAUG;AACH,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;OAKG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,iBAAiB,CAAA;KAAE;IAK3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,SAAS,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;CAkBnF"}
@@ -7,6 +7,7 @@ export { S3Service } from './s3/s3.js';
7
7
  export type { EmptyBucketPageResult } from './s3/s3.js';
8
8
  export { SchedulerService } from './scheduler/scheduler.js';
9
9
  export { SecretsManagerService } from './secrets-manager/secrets-manager.js';
10
+ export { SESService } from './ses/ses.js';
10
11
  export { StepFunctionsService } from './sfn/sfn.js';
11
12
  export { SNSService } from './sns/sns.js';
12
13
  export { SQSService } from './sqs/sqs.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -75,7 +75,9 @@ export declare class S3Service {
75
75
  * Get an object from S3 and parse it as JSON.
76
76
  * @template T - Expected type of the parsed value.
77
77
  * @returns The parsed value, or `undefined` if the response has no body.
78
- * @throws If the body is non-empty and not valid JSON.
78
+ * @throws If the body is non-empty and not valid JSON. The error names the
79
+ * object and never includes any of its content, unlike the native
80
+ * `SyntaxError`.
79
81
  */
80
82
  getJsonObject<T>(input: Required<Pick<GetObjectCommandInput, 'Bucket' | 'Key'>>): Promise<T | undefined>;
81
83
  /**
@@ -95,6 +97,9 @@ export declare class S3Service {
95
97
  * List and JSON-parse every object under a bucket and optional prefix.
96
98
  * Auto-paginated. Objects without a body are skipped.
97
99
  * @template T - Expected type of each parsed object.
100
+ * @throws If any object is not valid JSON. The error names that object's
101
+ * key and never includes any of its content, unlike the native
102
+ * `SyntaxError`; objects after it are not fetched.
98
103
  */
99
104
  getAllObjects<T>(bucket: string, prefix?: string): Promise<T[]>;
100
105
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../../../src/s3/s3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,sBAAsB,EACtB,uBAAuB,EAEvB,wBAAwB,EACxB,yBAAyB,EAEzB,0BAA0B,EAE1B,qBAAqB,EACrB,sBAAsB,EAEtB,sBAAsB,EACtB,uBAAuB,EAGvB,qBAAqB,EACrB,sBAAsB,EACtB,QAAQ,EACX,MAAM,oBAAoB,CAAC;AAiB5B;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,6CAA6C;IAC7C,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,gDAAgD;AAChD,KAAK,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC;AAEvF,oDAAoD;AACpD,KAAK,kBAAkB,CAAC,CAAC,IAAI;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC;AAiBF;;;;;;;;;;;GAWG;AACH,qBAAa,SAAS;IAClB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAW;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;OAKG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,QAAQ,CAAA;KAAE;IAKlE;;;;;;;;OAQG;IACG,SAAS,CAAC,KAAK,EAA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,GAChE,OAAO,CAAC,uBAAuB,CAAC;IAKnC;;OAEG;IACG,UAAU,CACZ,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,sBAAsB,EAAE,QAAQ,GAAG,KAAK,GAAG,YAAY,CAAC,CAAC,GAC/E,OAAO,CAAC,uBAAuB,CAAC;IAKnC;;;OAGG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAUrE;;;;;;;OAOG;IACG,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAoBrE;;;;;;;;;;;;;;;;;OAiBG;IACG,eAAe,CAAC,KAAK,EAAE;QACzB,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;KACtB,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBnB;;OAEG;IACG,YAAY,CACd,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,wBAAwB,EAAE,QAAQ,GAAG,KAAK,CAAC,CAAC,GAClE,OAAO,CAAC,yBAAyB,CAAC;IAKrC;;;;;;;;;;OAUG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC;IAqB1F;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAgBtC,UAAU;CAgB3B"}
@@ -42,7 +42,9 @@ export declare class SecretsManagerService {
42
42
  * @param secretId - The ARN or friendly name of the secret.
43
43
  * @template T - Expected shape of the parsed secret.
44
44
  * @returns The parsed secret value.
45
- * @throws If the secret has no `SecretString` or the value is not valid JSON.
45
+ * @throws If the secret has no `SecretString`, or the value is not valid
46
+ * JSON. The latter error names the secret and never includes any of its
47
+ * value, unlike the native `SyntaxError`.
46
48
  */
47
49
  getJsonSecret<T>(secretId: string): Promise<T>;
48
50
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"secrets-manager.d.ts","sourceRoot":"","sources":["../../../../src/secrets-manager/secrets-manager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,wBAAwB,EACxB,yBAAyB,EAEzB,wBAAwB,EACxB,yBAAyB,EAGzB,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,EAEpB,wBAAwB,EACxB,yBAAyB,EAC5B,MAAM,iCAAiC,CAAC;AA0CzC;;;;;;;;;;;;;;GAcG;AACH,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;;OAMG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,oBAAoB,CAAA;KAAE;IAK9E;;;;;;OAMG;IACG,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKlD;;;;;;OAMG;IACG,aAAa,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAMpD;;;;;;OAMG;IACG,YAAY,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAOvF;;;;;;OAMG;IACG,YAAY,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAOvF;;;;;OAKG;IACG,cAAc,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAO7F;;;;;OAKG;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iB;CASlC"}
@@ -0,0 +1,64 @@
1
+ import type { LoggerInterface } from '@aws-lambda-powertools/logger/types';
2
+ import { SendBulkEmailCommandInput, SendBulkEmailCommandOutput, SendEmailCommandInput, SendEmailCommandOutput, SESv2Client } from '@aws-sdk/client-sesv2';
3
+ /**
4
+ * Wrapper around the AWS SES v2 client providing structured Powertools logging
5
+ * and X-Ray tracing by default.
6
+ *
7
+ * Wraps SES v2 (`@aws-sdk/client-sesv2`), not the legacy v1 API. No defaults
8
+ * are baked in: every send option, including `FromEmailAddress` and
9
+ * `ConfigurationSetName`, comes from the caller.
10
+ *
11
+ * Where a method's input carries payloads or PII, the INFO log line omits
12
+ * them; the verbose levels (`POWERTOOLS_LOG_LEVEL=DEBUG` or `TRACE`) log full
13
+ * SDK inputs.
14
+ */
15
+ export declare class SESService {
16
+ private readonly client;
17
+ private readonly logger;
18
+ /**
19
+ * @param opts.logger - Optional Powertools logger. Defaults to `new Logger()`,
20
+ * which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
21
+ * @param opts.client - Optional pre-configured `SESv2Client`. When supplied,
22
+ * the wrapper does not apply X-Ray instrumentation.
23
+ */
24
+ constructor(opts?: {
25
+ logger?: LoggerInterface;
26
+ client?: SESv2Client;
27
+ });
28
+ /**
29
+ * Send a single email (Simple, Raw or Template content).
30
+ *
31
+ * At INFO level the log line includes only routing metadata and a
32
+ * recipient count; see `summariseSendEmail`.
33
+ *
34
+ * Pass-through: SDK exceptions (`MessageRejected`, `SendingPausedException`,
35
+ * …) propagate unwrapped.
36
+ *
37
+ * @returns The SDK output, including `MessageId`.
38
+ */
39
+ sendEmail(input: SendEmailCommandInput): Promise<SendEmailCommandOutput>;
40
+ /**
41
+ * Send a templated email to many destinations. SES caps `SendBulkEmail`
42
+ * at 50 entries per request, so this method auto-chunks `BulkEmailEntries`
43
+ * and sends one request per chunk, in order. Every chunk shares the other
44
+ * input fields.
45
+ *
46
+ * At INFO level the log line includes only routing metadata, the template
47
+ * name and an entry count; see `summariseSendBulkEmail`.
48
+ *
49
+ * SES answers HTTP 200 even when entries fail, so every chunk is sent
50
+ * before the outcome is judged. If any entry's `Status` isn't `SUCCESS`
51
+ * (or SES returned no result for it), a {@link BatchOperationError} is thrown whose
52
+ * `failed[].id` is the entry's original index in `BulkEmailEntries` as a
53
+ * string, and whose `results` are the per-chunk outputs — so a caller can
54
+ * retry only the failed indexes. Request-level SDK exceptions are not
55
+ * wrapped.
56
+ *
57
+ * Sending is not idempotent: retrying the whole batch after a throw
58
+ * re-sends the entries that succeeded.
59
+ *
60
+ * @returns One SDK output per request sent.
61
+ */
62
+ sendBulkEmail(input: SendBulkEmailCommandInput): Promise<SendBulkEmailCommandOutput[]>;
63
+ }
64
+ //# sourceMappingURL=ses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ses.d.ts","sourceRoot":"","sources":["../../../../src/ses/ses.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAGH,yBAAyB,EACzB,0BAA0B,EAE1B,qBAAqB,EACrB,sBAAsB,EACtB,WAAW,EACd,MAAM,uBAAuB,CAAC;AA4F/B;;;;;;;;;;;GAWG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;OAKG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE;IAKrE;;;;;;;;;;OAUG;IACG,SAAS,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAO9E;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,aAAa,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC;CAoB/F"}
@@ -17,11 +17,14 @@ export declare class SNSService {
17
17
  * which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
18
18
  * @param opts.client - Optional pre-configured `SNSClient`. When supplied,
19
19
  * the wrapper does not apply X-Ray instrumentation.
20
- * @param opts.truncate - When `true`, oversized `Message` / `Subject` are
21
- * truncated (byte-safe / codepoint-safe) before sending instead of failing
22
- * at the SDK. Defaults to `false` — the SDK throws on oversize, which is
23
- * usually the right failure mode. Each `publish` call can override via
24
- * its own `truncate` option.
20
+ * @param opts.truncate - When `true`, an oversized `Message` (above 256 KiB,
21
+ * the default topic limit — raising a topic's `MaximumMessageSize` does not
22
+ * raise this cut-off) or `Subject` (above 99 characters) is truncated
23
+ * (byte-safe / codepoint-safe) before sending instead of failing at the
24
+ * SDK. Truncating a structured `Message` such as JSON can leave it invalid.
25
+ * Defaults to `false` — the SDK throws on oversize, which is usually the
26
+ * right failure mode. Each `publish` call can override via its own
27
+ * `truncate` option.
25
28
  */
26
29
  constructor(opts?: {
27
30
  logger?: LoggerInterface;
@@ -1 +1 @@
1
- {"version":3,"file":"sns.d.ts","sourceRoot":"","sources":["../../../../src/sns/sns.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,wBAAwB,EACxB,yBAAyB,EAGzB,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,EACZ,MAAM,qBAAqB,CAAC;AAyB7B;;;;;;;GAOG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC;;;;;;;;;;OAUG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE;IAMvF;;;;;;;OAOG;IACG,OAAO,CACT,KAAK,EAAE,mBAAmB,EAC1B,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAC9B,OAAO,CAAC,oBAAoB,CAAC;IAShC;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IA0BvB;;;;;;;;;;;;;OAaG;IACG,YAAY,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAqB5F"}
1
+ {"version":3,"file":"sns.d.ts","sourceRoot":"","sources":["../../../../src/sns/sns.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,wBAAwB,EACxB,yBAAyB,EAGzB,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,EACZ,MAAM,qBAAqB,CAAC;AAmC7B;;;;;;;GAOG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC;;;;;;;;;;;;;OAaG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE;IAMvF;;;;;;;OAOG;IACG,OAAO,CACT,KAAK,EAAE,mBAAmB,EAC1B,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAC9B,OAAO,CAAC,oBAAoB,CAAC;IAShC;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IA0BvB;;;;;;;;;;;;;OAaG;IACG,YAAY,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAqB5F"}
@@ -17,9 +17,13 @@ export declare class SQSService {
17
17
  * which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
18
18
  * @param opts.client - Optional pre-configured `SQSClient`. When supplied,
19
19
  * the wrapper does not apply X-Ray instrumentation.
20
- * @param opts.truncate - When `true`, oversized `MessageBody` is truncated
21
- * (byte-safe) before sending instead of failing at the SDK. Defaults to
22
- * `false`. Each `sendMessage` call can override via its own `truncate`
20
+ * @param opts.truncate - When `true`, a `MessageBody` above 1 MiB is
21
+ * truncated (byte-safe) before sending instead of failing at the SDK. This
22
+ * is the SQS maximum; a queue configured with a lower `MaximumMessageSize`
23
+ * is not known to the wrapper. Message attributes count toward the limit
24
+ * too and are not truncated.
25
+ * Truncating a structured body such as JSON can leave it invalid. Defaults
26
+ * to `false`. Each `sendMessage` call can override via its own `truncate`
23
27
  * option.
24
28
  */
25
29
  constructor(opts?: {
@@ -1 +1 @@
1
- {"version":3,"file":"sqs.d.ts","sourceRoot":"","sources":["../../../../src/sqs/sqs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,8BAA8B,EAC9B,+BAA+B,EAG/B,yBAAyB,EACzB,0BAA0B,EAC1B,OAAO,EAEP,0BAA0B,EAE1B,4BAA4B,EAC5B,6BAA6B,EAG7B,uBAAuB,EACvB,wBAAwB,EACxB,SAAS,EACZ,MAAM,qBAAqB,CAAC;AAgC7B;;;;;;;GAOG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC;;;;;;;;;OASG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE;IAMvF;;;;;OAKG;IACG,WAAW,CACb,KAAK,EAAE,uBAAuB,EAC9B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ACb,KAAK,EAAE,uBAAuB,EAC9B,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAC9B,OAAO,CAAC,wBAAwB,CAAC;IASpC;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAkBvB;;;;;OAKG;IACG,eAAe,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAM5E;;OAEG;IACG,aAAa,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAK1F;;;;;;;;;;OAUG;IACG,gBAAgB,CAClB,KAAK,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,EAAE,CAAC;IAc3C;;;;;;;;;;;OAWG;IACG,kBAAkB,CACpB,KAAK,EAAE,8BAA8B,GACtC,OAAO,CAAC,+BAA+B,EAAE,CAAC;CAahD"}
@@ -66,7 +66,9 @@ export declare class SSMService {
66
66
  * alias in `message`. Request-level SDK exceptions are not wrapped.
67
67
  *
68
68
  * @param aliases - Record mapping each desired local alias to its SSM
69
- * parameter name (or ARN).
69
+ * parameter name, ARN, or a `name:version` / `name:label` selector. The
70
+ * value is matched back to the response by the name, ARN and selector SSM
71
+ * reports, so each of those forms resolves to its own parameter.
70
72
  * @param opts.required - Throw when any requested parameter does not
71
73
  * exist. Defaults to `false`.
72
74
  * @returns A record keyed by the same aliases, mapping each to the
@@ -1 +1 @@
1
- {"version":3,"file":"ssm.d.ts","sourceRoot":"","sources":["../../../../src/ssm/ssm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAKH,SAAS,EAET,wBAAwB,EACxB,yBAAyB,EACzB,SAAS,EACZ,MAAM,qBAAqB,CAAC;AA2C7B;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ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B;IAEzC;;;;;OAKG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE;IAKnE;;;;;;;;OAQG;IACG,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAQ7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACG,aAAa,CAAC,CAAC,SAAS,MAAM,EAChC,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,EAC1B,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAC9B,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAiCzC;;;;;;OAMG;IACG,YAAY,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAOvF;;;;;OAKG;IACG,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlD;;;;;;;;;;OAUG;IACG,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;CAWhG"}
@@ -3,7 +3,8 @@ import type { LoggerInterface } from '@aws-lambda-powertools/logger/types';
3
3
  * One entry a batch operation rejected. Deliberately limited to identifier,
4
4
  * code and message so the error never carries message bodies, attributes or
5
5
  * any other payload the caller sent. For S3 the identifier is the object key;
6
- * for SSM it is the parameter path.
6
+ * for SSM it is the parameter path; for DynamoDB it is `<table>[<index>]`,
7
+ * since a key or item is caller data.
7
8
  */
8
9
  export interface BatchFailedEntry {
9
10
  id: string | undefined;
@@ -17,9 +18,18 @@ export interface BatchFailedEntry {
17
18
  * `results` holds the raw SDK output of every chunk, so the outputs of the
18
19
  * entries that succeeded (message ids, sequence numbers) stay readable. The
19
20
  * exceptions are `S3.emptyBucket`, whose `results` are per-page deleted keys,
20
- * and `SSM.getParameters`, whose `results` are empty.
21
+ * `SSM.getParameters`, whose `results` are empty, and the DynamoDB batch
22
+ * methods, whose `results` hold a single output (the last response, with the
23
+ * `Responses` merged so far for `batchGet`) carrying what is still pending.
21
24
  * `failed` is the normalised list of rejected entries across all chunks.
22
25
  *
26
+ * Do not pass the error object itself to a logger. `results` is an enumerable
27
+ * property and the Powertools logger serialises every enumerable property of
28
+ * an error, so `logger.error('…', error)` writes `results` to the log — which
29
+ * for the DynamoDB batch methods holds the caller's keys and items. Log `name`,
30
+ * `message` and `failed`, which never carry a payload, and read `results` only
31
+ * to retry or recover.
32
+ *
23
33
  * Match on `name` rather than `instanceof` if both the CJS and ESM builds of
24
34
  * this package may be loaded in one process.
25
35
  */
@@ -75,5 +85,12 @@ export declare function throwIfAnyDeleteErrors<TResult extends {
75
85
  * and the warning.
76
86
  */
77
87
  export declare function throwIfAny<TResult>(logger: LoggerInterface, operation: string, results: TResult[], failed: BatchFailedEntry[]): TResult[];
88
+ /**
89
+ * The warn-and-throw half of {@link throwIfAny}, for callers that already know
90
+ * `failed` is non-empty and need the compiler to see that the call never
91
+ * returns. The same rule applies: build `failed` by copying id, code and
92
+ * message explicitly.
93
+ */
94
+ export declare function throwBatchFailure<TResult>(logger: LoggerInterface, operation: string, results: TResult[], failed: BatchFailedEntry[]): never;
78
95
  export {};
79
96
  //# sourceMappingURL=batch-operation-error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"batch-operation-error.d.ts","sourceRoot":"","sources":["../../../../src/util/batch-operation-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,GAAG,SAAS,CA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OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,SAAS;IAAE,MAAM,CAAC,EAAE,WAAW,EAAE,GAAG,SAAS,CAAA;CAAE,EACzF,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,EAAE,GACnB,OAAO,EAAE,CASX;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAC9B,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,EAAE,gBAAgB,EAAE,GAC3B,OAAO,EAAE,CAGX;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EACrC,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,EAAE,gBAAgB,EAAE,GAC3B,KAAK,CAMP"}
@@ -3,4 +3,12 @@
3
3
  * per-request caps the AWS APIs enforce on batch operations.
4
4
  */
5
5
  export declare function chunk<T>(items: readonly T[], size: number): T[][];
6
+ /**
7
+ * The index, as a string, that an entry had in the list `chunk` split, given
8
+ * its chunk number and its position within that chunk. Batch operations whose
9
+ * entries carry no identifier of their own report failures by this index.
10
+ * `chunk` fills every chunk but the last, so the chunk's offset is the chunk
11
+ * number times the chunk size.
12
+ */
13
+ export declare function originalIndex(chunkIndex: number, chunkSize: number, position: number): string;
6
14
  //# sourceMappingURL=chunk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunk.d.ts","sourceRoot":"","sources":["../../../../src/util/chunk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,EAAE,CAMjE"}
1
+ {"version":3,"file":"chunk.d.ts","sourceRoot":"","sources":["../../../../src/util/chunk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,EAAE,CAMjE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7F"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * `JSON.parse` that never leaks the parsed text. V8's `SyntaxError` message
3
+ * embeds a snippet of the input (`Unexpected token 'h', ..."assword": hunter2}"
4
+ * is not valid JSON`), and the wrappers parse secrets and stored objects, so
5
+ * letting it through would put that content into the caller's error logs.
6
+ *
7
+ * The original error is deliberately not attached as `cause`: loggers serialise
8
+ * `cause` and its message carries the snippet. `context` should identify the
9
+ * source (a secret id, a bucket and key) so the failure is still diagnosable.
10
+ *
11
+ * @throws An `Error` naming `context`, without any of the input text.
12
+ */
13
+ export declare function parseJson<T>(text: string, context: string): T;
14
+ //# sourceMappingURL=json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/util/json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC,CAM7D"}
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: APIGatewayService
8
8
 
9
- Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:30](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L30)
9
+ Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:30](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L30)
10
10
 
11
11
  Read-only wrapper around the API Gateway (REST API, v1) control-plane client
12
12
  providing structured Powertools logging and X-Ray tracing by default.
@@ -24,7 +24,7 @@ output; the wrapper never logs output, and no input carries secrets.
24
24
 
25
25
  > **new APIGatewayService**(`opts?`): `APIGatewayService`
26
26
 
27
- Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:40](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L40)
27
+ Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:40](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L40)
28
28
 
29
29
  #### Parameters
30
30
 
@@ -56,7 +56,7 @@ which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
56
56
 
57
57
  > **getApiKey**(`input`): `Promise`\<`GetApiKeyCommandOutput`\>
58
58
 
59
- Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:71](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L71)
59
+ Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:71](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L71)
60
60
 
61
61
  Fetch a single API key, including its secret value.
62
62
 
@@ -82,7 +82,7 @@ NotFoundException when the key does not exist.
82
82
 
83
83
  > **getApiKeys**(`input?`): `Promise`\<`ApiKey`[]\>
84
84
 
85
- Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:59](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L59)
85
+ Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:59](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L59)
86
86
 
87
87
  List API keys, including their secret values. Auto-paginated.
88
88
 
@@ -104,7 +104,7 @@ List API keys, including their secret values. Auto-paginated.
104
104
 
105
105
  > **getResources**(`input`): `Promise`\<`Resource`[]\>
106
106
 
107
- Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:83](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L83)
107
+ Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:83](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L83)
108
108
 
109
109
  List every resource (path) of a REST API, which is how REST APIs expose
110
110
  their routes. Pass `embed: ['methods']` to include each resource's
@@ -128,7 +128,7 @@ methods. Auto-paginated.
128
128
 
129
129
  > **getRestApis**(`input?`): `Promise`\<`RestApi`[]\>
130
130
 
131
- Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:48](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L48)
131
+ Defined in: [packages/aws-wrappers/src/api-gateway/api-gateway.ts:48](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway/api-gateway.ts#L48)
132
132
 
133
133
  List every REST API in the account and region. Auto-paginated.
134
134
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: APIGatewayV2Service
8
8
 
9
- Defined in: [packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts:26](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts#L26)
9
+ Defined in: [packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts:26](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts#L26)
10
10
 
11
11
  Read-only wrapper around the API Gateway v2 (HTTP and WebSocket APIs)
12
12
  control-plane client providing structured Powertools logging and X-Ray
@@ -23,7 +23,7 @@ follow `NextToken` manually.
23
23
 
24
24
  > **new APIGatewayV2Service**(`opts?`): `APIGatewayV2Service`
25
25
 
26
- Defined in: [packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts:36](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts#L36)
26
+ Defined in: [packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts:36](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts#L36)
27
27
 
28
28
  #### Parameters
29
29
 
@@ -55,7 +55,7 @@ which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
55
55
 
56
56
  > **getApis**(`input?`): `Promise`\<`Api`[]\>
57
57
 
58
- Defined in: [packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts:45](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts#L45)
58
+ Defined in: [packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts:45](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts#L45)
59
59
 
60
60
  List every HTTP and WebSocket API in the account and region.
61
61
  Auto-paginated.
@@ -78,7 +78,7 @@ Auto-paginated.
78
78
 
79
79
  > **getRoute**(`input`): `Promise`\<`GetRouteCommandOutput`\>
80
80
 
81
- Defined in: [packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts:58](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts#L58)
81
+ Defined in: [packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts:58](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts#L58)
82
82
 
83
83
  Fetch a single route of an HTTP or WebSocket API.
84
84
 
@@ -104,7 +104,7 @@ NotFoundException when the route does not exist.
104
104
 
105
105
  > **getRoutes**(`input`): `Promise`\<`Route`[]\>
106
106
 
107
- Defined in: [packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts:66](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts#L66)
107
+ Defined in: [packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts:66](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/api-gateway-v2/api-gateway-v2.ts#L66)
108
108
 
109
109
  List every route of an HTTP or WebSocket API. Auto-paginated.
110
110
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: BatchOperationError\<TResult\>
8
8
 
9
- Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:28](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/util/batch-operation-error.ts#L28)
9
+ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:38](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/util/batch-operation-error.ts#L38)
10
10
 
11
11
  Thrown by the batch methods once every chunk has been sent and at least one
12
12
  entry was rejected.
@@ -14,9 +14,18 @@ entry was rejected.
14
14
  `results` holds the raw SDK output of every chunk, so the outputs of the
15
15
  entries that succeeded (message ids, sequence numbers) stay readable. The
16
16
  exceptions are `S3.emptyBucket`, whose `results` are per-page deleted keys,
17
- and `SSM.getParameters`, whose `results` are empty.
17
+ `SSM.getParameters`, whose `results` are empty, and the DynamoDB batch
18
+ methods, whose `results` hold a single output (the last response, with the
19
+ `Responses` merged so far for `batchGet`) carrying what is still pending.
18
20
  `failed` is the normalised list of rejected entries across all chunks.
19
21
 
22
+ Do not pass the error object itself to a logger. `results` is an enumerable
23
+ property and the Powertools logger serialises every enumerable property of
24
+ an error, so `logger.error('…', error)` writes `results` to the log — which
25
+ for the DynamoDB batch methods holds the caller's keys and items. Log `name`,
26
+ `message` and `failed`, which never carry a payload, and read `results` only
27
+ to retry or recover.
28
+
20
29
  Match on `name` rather than `instanceof` if both the CJS and ESM builds of
21
30
  this package may be loaded in one process.
22
31
 
@@ -40,7 +49,7 @@ this package may be loaded in one process.
40
49
 
41
50
  > **new BatchOperationError**\<`TResult`\>(`results`, `failed`): `BatchOperationError`\<`TResult`\>
42
51
 
43
- Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:31](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/util/batch-operation-error.ts#L31)
52
+ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:41](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/util/batch-operation-error.ts#L41)
44
53
 
45
54
  #### Parameters
46
55
 
@@ -82,7 +91,7 @@ Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24
82
91
 
83
92
  > `readonly` **failed**: [`BatchFailedEntry`](../interfaces/BatchFailedEntry.md)[]
84
93
 
85
- Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:33](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/util/batch-operation-error.ts#L33)
94
+ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:43](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/util/batch-operation-error.ts#L43)
86
95
 
87
96
  ***
88
97
 
@@ -106,7 +115,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1075
106
115
 
107
116
  > `readonly` **name**: `"BatchOperationError"` = `'BatchOperationError'`
108
117
 
109
- Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:29](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/util/batch-operation-error.ts#L29)
118
+ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:39](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/util/batch-operation-error.ts#L39)
110
119
 
111
120
  #### Overrides
112
121
 
@@ -120,7 +129,7 @@ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:29](https:/
120
129
 
121
130
  > `readonly` **results**: `TResult`[]
122
131
 
123
- Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:32](https://github.com/aligent/microservice-development-utilities/blob/3822f761bcc8572b495cfd407e000d4fed44d0ba/packages/aws-wrappers/src/util/batch-operation-error.ts#L32)
132
+ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:42](https://github.com/aligent/microservice-development-utilities/blob/27475744987d7ba5a02f8568491326793a14edb4/packages/aws-wrappers/src/util/batch-operation-error.ts#L42)
124
133
 
125
134
  ***
126
135