@aligent/aws-wrappers 0.5.8 → 0.5.10

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 (61) hide show
  1. package/README.md +130 -3
  2. package/cjs/index.cjs +424 -11
  3. package/cjs/package.json +4 -1
  4. package/cjs/src/eventbridge/eventbridge.d.ts +58 -0
  5. package/cjs/src/eventbridge/eventbridge.d.ts.map +1 -0
  6. package/cjs/src/index.d.ts +4 -0
  7. package/cjs/src/index.d.ts.map +1 -1
  8. package/cjs/src/lambda/lambda.d.ts +54 -0
  9. package/cjs/src/lambda/lambda.d.ts.map +1 -0
  10. package/cjs/src/scheduler/scheduler.d.ts +3 -2
  11. package/cjs/src/scheduler/scheduler.d.ts.map +1 -1
  12. package/cjs/src/ses/ses.d.ts +64 -0
  13. package/cjs/src/ses/ses.d.ts.map +1 -0
  14. package/cjs/src/ssm/ssm.d.ts +18 -3
  15. package/cjs/src/ssm/ssm.d.ts.map +1 -1
  16. package/cjs/src/util/batch-operation-error.d.ts +13 -7
  17. package/cjs/src/util/batch-operation-error.d.ts.map +1 -1
  18. package/cjs/src/util/chunk.d.ts +8 -0
  19. package/cjs/src/util/chunk.d.ts.map +1 -1
  20. package/cjs/src/util/lambda-function-error.d.ts +36 -0
  21. package/cjs/src/util/lambda-function-error.d.ts.map +1 -0
  22. package/docs/index/classes/APIGatewayService.md +6 -6
  23. package/docs/index/classes/APIGatewayV2Service.md +5 -5
  24. package/docs/index/classes/BatchOperationError.md +7 -6
  25. package/docs/index/classes/DynamoDBService.md +12 -12
  26. package/docs/index/classes/EventBridgeService.md +99 -0
  27. package/docs/index/classes/LambdaFunctionError.md +283 -0
  28. package/docs/index/classes/LambdaService.md +95 -0
  29. package/docs/index/classes/S3Service.md +15 -15
  30. package/docs/index/classes/SESService.md +123 -0
  31. package/docs/index/classes/SNSService.md +4 -4
  32. package/docs/index/classes/SQSService.md +7 -7
  33. package/docs/index/classes/SSMService.md +33 -10
  34. package/docs/index/classes/SchedulerService.md +14 -13
  35. package/docs/index/classes/SecretsManagerService.md +8 -8
  36. package/docs/index/classes/StepFunctionsService.md +6 -6
  37. package/docs/index/interfaces/BatchFailedEntry.md +6 -5
  38. package/docs/index/interfaces/EmptyBucketPageResult.md +2 -2
  39. package/docs/index/modules.md +4 -0
  40. package/docs/testing/testing/functions/createMockService.md +1 -1
  41. package/esm/index.mjs +421 -12
  42. package/esm/package.json +4 -1
  43. package/esm/src/eventbridge/eventbridge.d.ts +58 -0
  44. package/esm/src/eventbridge/eventbridge.d.ts.map +1 -0
  45. package/esm/src/index.d.ts +4 -0
  46. package/esm/src/index.d.ts.map +1 -1
  47. package/esm/src/lambda/lambda.d.ts +54 -0
  48. package/esm/src/lambda/lambda.d.ts.map +1 -0
  49. package/esm/src/scheduler/scheduler.d.ts +3 -2
  50. package/esm/src/scheduler/scheduler.d.ts.map +1 -1
  51. package/esm/src/ses/ses.d.ts +64 -0
  52. package/esm/src/ses/ses.d.ts.map +1 -0
  53. package/esm/src/ssm/ssm.d.ts +18 -3
  54. package/esm/src/ssm/ssm.d.ts.map +1 -1
  55. package/esm/src/util/batch-operation-error.d.ts +13 -7
  56. package/esm/src/util/batch-operation-error.d.ts.map +1 -1
  57. package/esm/src/util/chunk.d.ts +8 -0
  58. package/esm/src/util/chunk.d.ts.map +1 -1
  59. package/esm/src/util/lambda-function-error.d.ts +36 -0
  60. package/esm/src/util/lambda-function-error.d.ts.map +1 -0
  61. package/package.json +4 -1
@@ -0,0 +1,54 @@
1
+ import type { LoggerInterface } from '@aws-lambda-powertools/logger/types';
2
+ import { InvokeCommandInput, InvokeCommandOutput, LambdaClient } from '@aws-sdk/client-lambda';
3
+ /**
4
+ * Wrapper around the AWS Lambda client providing structured Powertools logging
5
+ * and X-Ray tracing by default.
6
+ *
7
+ * Where a method's input carries payloads, secret material or PII, the INFO
8
+ * log line omits them; the verbose levels (`POWERTOOLS_LOG_LEVEL=DEBUG` or
9
+ * `TRACE`) log full SDK inputs.
10
+ *
11
+ * Covers `invoke` only.
12
+ */
13
+ export declare class LambdaService {
14
+ private readonly client;
15
+ private readonly logger;
16
+ /**
17
+ * @param opts.logger - Optional Powertools logger. Defaults to `new Logger()`,
18
+ * which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
19
+ * @param opts.client - Optional pre-configured `LambdaClient`. When
20
+ * supplied, the wrapper does not apply X-Ray instrumentation.
21
+ */
22
+ constructor(opts?: {
23
+ logger?: LoggerInterface;
24
+ client?: LambdaClient;
25
+ });
26
+ /**
27
+ * Invoke a Lambda function. The input is the SDK input unchanged and the
28
+ * output is the SDK output unchanged: `Payload` stays a `Uint8Array` you
29
+ * decode yourself. Choose synchronous, asynchronous or dry-run invocation
30
+ * with `InvocationType`; omitting it means synchronous (`RequestResponse`).
31
+ *
32
+ * Lambda answers HTTP 200 even when the invoked function threw, flagging it
33
+ * with `FunctionError` on the response. If that marker is present this
34
+ * method warns and throws a {@link LambdaFunctionError} carrying the
35
+ * function name, the marker, and the error type and message parsed from the
36
+ * payload when it has the usual JSON shape. The raw output and the stack
37
+ * trace are deliberately left off the error.
38
+ *
39
+ * The marker only appears on synchronous responses, so the check is
40
+ * unconditional: asynchronous (`Event`) and `DryRun` responses return
41
+ * without throwing. Failures of asynchronous invocations are therefore not
42
+ * observable here; they belong to dead-letter queues and destinations on
43
+ * the invoked function. No status code check is added; service-level
44
+ * errors such as throttling are thrown by the SDK and propagate unwrapped.
45
+ *
46
+ * At INFO level the log line includes only the function name, invocation
47
+ * type, qualifier, log type and tenant id. `Payload` and `ClientContext` are
48
+ * omitted, and responses are never logged.
49
+ *
50
+ * @param input - InvokeCommandInput including FunctionName.
51
+ */
52
+ invoke(input: InvokeCommandInput): Promise<InvokeCommandOutput>;
53
+ }
54
+ //# sourceMappingURL=lambda.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lambda.d.ts","sourceRoot":"","sources":["../../../../src/lambda/lambda.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACf,MAAM,wBAAwB,CAAC;AAkBhC;;;;;;;;;GASG;AACH,qBAAa,aAAa;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;OAKG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE;IAKtE;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,MAAM,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAiBxE"}
@@ -9,8 +9,9 @@ import { CreateScheduleCommandInput, CreateScheduleCommandOutput, CreateSchedule
9
9
  * `TRACE`) log full SDK inputs.
10
10
  *
11
11
  * Covers CRUD on schedules and their groups. Named `SchedulerService` (not
12
- * `EventBridgeSchedulerService`) so it doesn't collide with a future wrapper
13
- * over the separate EventBridge bus/rules API (`@aws-sdk/client-eventbridge`).
12
+ * `EventBridgeSchedulerService`) so it doesn't collide with `EventBridgeService`,
13
+ * the wrapper over the separate EventBridge bus/rules API
14
+ * (`@aws-sdk/client-eventbridge`).
14
15
  *
15
16
  * `FlexibleTimeWindow` is required by `CreateSchedule` and is passed through
16
17
  * untouched — the wrapper bakes in no default, so the caller must state their
@@ -1 +1 @@
1
- {"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../../../src/scheduler/scheduler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAEH,0BAA0B,EAC1B,2BAA2B,EAE3B,+BAA+B,EAC/B,gCAAgC,EAEhC,0BAA0B,EAC1B,2BAA2B,EAE3B,+BAA+B,EAC/B,gCAAgC,EAEhC,uBAAuB,EACv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AE,+BAA+B,GACvC,OAAO,CAAC,gCAAgC,CAAC;IAK5C;;OAEG;IACG,gBAAgB,CAClB,KAAK,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC;IAKzC;;;;OAIG;IACG,mBAAmB,CACrB,KAAK,EAAE,+BAA+B,GACvC,OAAO,CAAC,gCAAgC,CAAC;IAK5C;;;OAGG;IACG,kBAAkB,CACpB,KAAK,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,oBAAoB,EAAE,CAAC;CAKrC"}
@@ -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"}
@@ -34,6 +34,9 @@ export declare class SSMService {
34
34
  * @param name - The parameter name (or ARN).
35
35
  * @returns The parameter value, or `undefined` if the parameter has no
36
36
  * value set.
37
+ * @throws When the parameter does not exist (the SDK's
38
+ * `ParameterNotFound`). {@link SSMService.getParameters} instead returns
39
+ * `undefined` for a missing parameter unless `required` is set.
37
40
  */
38
41
  getParameter(name: string): Promise<string | undefined>;
39
42
  /**
@@ -54,13 +57,25 @@ export declare class SSMService {
54
57
  * the underlying parameter names and sends one request per chunk,
55
58
  * merging the results before building the alias-keyed return value.
56
59
  *
60
+ * Unlike {@link SSMService.getParameter}, which throws when the parameter
61
+ * does not exist, a missing parameter here maps to `undefined` — so a
62
+ * typo'd path surfaces later as an undefined value. Pass
63
+ * `{ required: true }` to fail fast instead: every chunk is still sent,
64
+ * then a {@link BatchOperationError} is thrown whose `failed` entries
65
+ * carry each missing path as `id`, the code `ParameterNotFound`, and the
66
+ * alias in `message`. Request-level SDK exceptions are not wrapped.
67
+ *
57
68
  * @param aliases - Record mapping each desired local alias to its SSM
58
69
  * parameter name (or ARN).
70
+ * @param opts.required - Throw when any requested parameter does not
71
+ * exist. Defaults to `false`.
59
72
  * @returns A record keyed by the same aliases, mapping each to the
60
- * parameter's value, or `undefined` when the parameter is missing or has
61
- * no value.
73
+ * parameter's value, or `undefined` when the parameter is missing (unless
74
+ * `required` is set) or has no value.
62
75
  */
63
- getParameters<K extends string>(aliases: Record<K, string>): Promise<Record<K, string | undefined>>;
76
+ getParameters<K extends string>(aliases: Record<K, string>, opts?: {
77
+ required?: boolean;
78
+ }): Promise<Record<K, string | undefined>>;
64
79
  /**
65
80
  * Create or update an SSM parameter. The log line omits `Value` to avoid
66
81
  * leaking secret material.
@@ -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;AAyB7B;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;;;OAKG;gBACS,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE;IAKnE;;;;;OAKG;IACG,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAQ7D;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,aAAa,CAAC,CAAC,SAAS,MAAM,EAChC,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAC3B,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAsBzC;;;;;;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,S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WhG"}
@@ -2,7 +2,8 @@ import type { LoggerInterface } from '@aws-lambda-powertools/logger/types';
2
2
  /**
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
- * any other payload the caller sent. For S3 the identifier is the object key.
5
+ * any other payload the caller sent. For S3 the identifier is the object key;
6
+ * for SSM it is the parameter path.
6
7
  */
7
8
  export interface BatchFailedEntry {
8
9
  id: string | undefined;
@@ -15,7 +16,8 @@ export interface BatchFailedEntry {
15
16
  *
16
17
  * `results` holds the raw SDK output of every chunk, so the outputs of the
17
18
  * entries that succeeded (message ids, sequence numbers) stay readable. The
18
- * one exception is `S3.emptyBucket`, whose `results` are per-page deleted keys.
19
+ * exceptions are `S3.emptyBucket`, whose `results` are per-page deleted keys,
20
+ * and `SSM.getParameters`, whose `results` are empty.
19
21
  * `failed` is the normalised list of rejected entries across all chunks.
20
22
  *
21
23
  * Match on `name` rather than `instanceof` if both the CJS and ESM builds of
@@ -38,8 +40,7 @@ interface RejectedEntry {
38
40
  /**
39
41
  * SQS and SNS report rejected entries under `Failed` on an otherwise
40
42
  * successful response, so a resolved chunk does not mean every entry was
41
- * accepted. Returns `results` untouched when nothing failed; otherwise warns
42
- * and throws a {@link BatchOperationError}.
43
+ * accepted. Extracts those entries and delegates to {@link throwIfAny}.
43
44
  *
44
45
  * Only id, code and message are copied out — never the entry itself — so
45
46
  * neither the error nor the warning can leak a payload.
@@ -64,9 +65,14 @@ export declare function throwIfAnyDeleteErrors<TResult extends {
64
65
  Errors?: DeleteError[] | undefined;
65
66
  }>(logger: LoggerInterface, operation: string, results: TResult[]): TResult[];
66
67
  /**
67
- * Throws a {@link BatchOperationError} for operations whose `results` aren't a
68
- * plain list of SDK outputs, such as `S3.emptyBucket`. Returns `results`
69
- * untouched when `failed` is empty.
68
+ * Warn-and-throw step for services whose responses don't use the SQS/SNS
69
+ * `Failed` shape and so extract their own rejected entries (`EventBridge.putEvents`),
70
+ * or whose `results` aren't a plain list of SDK outputs (`S3.emptyBucket`).
71
+ * Returns `results` untouched when `failed` is empty.
72
+ *
73
+ * Callers must build `failed` by copying id, code and message explicitly —
74
+ * never by spreading the SDK entry — because it goes straight into the error
75
+ * and the warning.
70
76
  */
71
77
  export declare function throwIfAny<TResult>(logger: LoggerInterface, operation: string, results: TResult[], failed: BatchFailedEntry[]): TResult[];
72
78
  export {};
@@ -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;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,mBAAmB,CAAC,OAAO,GAAG,OAAO,CAAE,SAAQ,KAAK;IAIzD,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE;IAC3B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,EAAE;IAJvC,SAAkB,IAAI,yBAAyB;gBAGlC,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,EAAE,gBAAgB,EAAE;CAM1C;AAED;;GAEG;AACH,UAAU,aAAa;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,SAAS;IAAE,MAAM,CAAC,EAAE,aAAa,EAAE,GAAG,SAAS,CAAA;CAAE,EACrF,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,EAAE,GACnB,OAAO,EAAE,CASX;AAED;;GAEG;AACH,UAAU,WAAW;IACjB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,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;;;;GAIG;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,CAQX"}
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,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAmB,CAAC,OAAO,GAAG,OAAO,CAAE,SAAQ,KAAK;IAIzD,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE;IAC3B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,EAAE;IAJvC,SAAkB,IAAI,yBAAyB;gBAGlC,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,EAAE,gBAAgB,EAAE;CAM1C;AAED;;GAEG;AACH,UAAU,aAAa;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,SAAS;IAAE,MAAM,CAAC,EAAE,aAAa,EAAE,GAAG,SAAS,CAAA;CAAE,EACrF,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,EAAE,GACnB,OAAO,EAAE,CASX;AAED;;GAEG;AACH,UAAU,WAAW;IACjB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,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,CAQX"}
@@ -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,36 @@
1
+ interface ParsedErrorPayload {
2
+ errorType: string | undefined;
3
+ errorMessage: string | undefined;
4
+ }
5
+ /**
6
+ * Thrown by `LambdaService.invoke` when a synchronous invocation reached the
7
+ * function but the function itself failed. Lambda reports that as an HTTP 200
8
+ * carrying a function error marker, so the SDK does not throw.
9
+ *
10
+ * `functionError` is the SDK's marker (`Handled` or `Unhandled`).
11
+ * `errorType` and `errorMessage` are parsed from the response payload when it
12
+ * has the usual `{ errorType, errorMessage }` JSON shape, otherwise undefined.
13
+ *
14
+ * Deliberately excludes the raw SDK output and the stack trace: either can
15
+ * contain the caller's payload or PII.
16
+ *
17
+ * Match on `name` rather than `instanceof` if both the CJS and ESM builds of
18
+ * this package may be loaded in one process.
19
+ */
20
+ export declare class LambdaFunctionError extends Error {
21
+ readonly functionName: string | undefined;
22
+ readonly functionError: string;
23
+ readonly name = "LambdaFunctionError";
24
+ readonly errorType: string | undefined;
25
+ readonly errorMessage: string | undefined;
26
+ constructor(functionName: string | undefined, functionError: string, payload: Pick<LambdaFunctionError, 'errorType' | 'errorMessage'>);
27
+ }
28
+ /**
29
+ * Reads `errorType` and `errorMessage` out of a function error payload.
30
+ * Anything that is not a JSON object with string fields yields undefined for
31
+ * that field rather than failing, because the payload is whatever the invoked
32
+ * function (or runtime) chose to return.
33
+ */
34
+ export declare function parseFunctionErrorPayload(payload: Uint8Array | undefined): ParsedErrorPayload;
35
+ export {};
36
+ //# sourceMappingURL=lambda-function-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lambda-function-error.d.ts","sourceRoot":"","sources":["../../../../src/util/lambda-function-error.ts"],"names":[],"mappings":"AAAA,UAAU,kBAAkB;IACxB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAMtC,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS;IACzC,QAAQ,CAAC,aAAa,EAAE,MAAM;IANlC,SAAkB,IAAI,yBAAyB;IAC/C,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;gBAG7B,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,aAAa,EAAE,MAAM,EAC9B,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,cAAc,CAAC;CAMvE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,GAAG,kBAAkB,CAiB7F"}
@@ -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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/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/e278ae3f29a38b1e451dd1bab16695aea28a55c1/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,14 +6,15 @@
6
6
 
7
7
  # Class: BatchOperationError\<TResult\>
8
8
 
9
- Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:26](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/util/batch-operation-error.ts#L26)
9
+ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:28](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/util/batch-operation-error.ts#L28)
10
10
 
11
11
  Thrown by the batch methods once every chunk has been sent and at least one
12
12
  entry was rejected.
13
13
 
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
- one exception is `S3.emptyBucket`, whose `results` are per-page deleted keys.
16
+ exceptions are `S3.emptyBucket`, whose `results` are per-page deleted keys,
17
+ and `SSM.getParameters`, whose `results` are empty.
17
18
  `failed` is the normalised list of rejected entries across all chunks.
18
19
 
19
20
  Match on `name` rather than `instanceof` if both the CJS and ESM builds of
@@ -39,7 +40,7 @@ this package may be loaded in one process.
39
40
 
40
41
  > **new BatchOperationError**\<`TResult`\>(`results`, `failed`): `BatchOperationError`\<`TResult`\>
41
42
 
42
- Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:29](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/util/batch-operation-error.ts#L29)
43
+ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:31](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/util/batch-operation-error.ts#L31)
43
44
 
44
45
  #### Parameters
45
46
 
@@ -81,7 +82,7 @@ Defined in: node\_modules/typescript/lib/lib.es2022.error.d.ts:24
81
82
 
82
83
  > `readonly` **failed**: [`BatchFailedEntry`](../interfaces/BatchFailedEntry.md)[]
83
84
 
84
- Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:31](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/util/batch-operation-error.ts#L31)
85
+ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:33](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/util/batch-operation-error.ts#L33)
85
86
 
86
87
  ***
87
88
 
@@ -105,7 +106,7 @@ Defined in: node\_modules/typescript/lib/lib.es5.d.ts:1075
105
106
 
106
107
  > `readonly` **name**: `"BatchOperationError"` = `'BatchOperationError'`
107
108
 
108
- Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:27](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/util/batch-operation-error.ts#L27)
109
+ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:29](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/util/batch-operation-error.ts#L29)
109
110
 
110
111
  #### Overrides
111
112
 
@@ -119,7 +120,7 @@ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:27](https:/
119
120
 
120
121
  > `readonly` **results**: `TResult`[]
121
122
 
122
- Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:30](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/util/batch-operation-error.ts#L30)
123
+ Defined in: [packages/aws-wrappers/src/util/batch-operation-error.ts:32](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/util/batch-operation-error.ts#L32)
123
124
 
124
125
  ***
125
126
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: DynamoDBService
8
8
 
9
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:166](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L166)
9
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:166](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L166)
10
10
 
11
11
  Wrapper around the AWS DynamoDB Document client providing structured
12
12
  Powertools logging and X-Ray tracing by default.
@@ -26,7 +26,7 @@ callers work with plain TypeScript objects in both directions.
26
26
 
27
27
  > **new DynamoDBService**(`opts?`): `DynamoDBService`
28
28
 
29
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:179](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L179)
29
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:179](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L179)
30
30
 
31
31
  #### Parameters
32
32
 
@@ -61,7 +61,7 @@ which picks up `POWERTOOLS_SERVICE_NAME` from the environment.
61
61
 
62
62
  > **batchGet**(`input`): `Promise`\<`BatchGetCommandOutput`\>
63
63
 
64
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:317](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L317)
64
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:317](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L317)
65
65
 
66
66
  Batch-get items from one or more DynamoDB tables, retrying
67
67
  `UnprocessedKeys` with jittered exponential backoff. Up to 5 attempts
@@ -91,7 +91,7 @@ Callers should narrow the result type at the call site.
91
91
 
92
92
  > **batchWrite**(`input`): `Promise`\<`BatchWriteCommandOutput`\>
93
93
 
94
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:349](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L349)
94
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:349](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L349)
95
95
 
96
96
  Batch-write items to DynamoDB, retrying `UnprocessedItems` with jittered
97
97
  exponential backoff. Up to 5 attempts (200ms base delay). Throws when
@@ -115,7 +115,7 @@ items remain unprocessed after the final attempt.
115
115
 
116
116
  > **deleteItem**\<`K`, `R`\>(`input`): `Promise`\<`Omit`\<`DeleteCommandOutput`, `"Attributes"`\> & `object`\>
117
117
 
118
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:248](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L248)
118
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:248](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L248)
119
119
 
120
120
  Delete an item from DynamoDB. The `Attributes` field on the response is
121
121
  typed as `R` — relevant when `ReturnValues: 'ALL_OLD'` is set.
@@ -156,7 +156,7 @@ Expected shape of the returned `Attributes`.
156
156
 
157
157
  > **getItem**\<`K`, `R`\>(`input`): `Promise`\<`R` \| `undefined`\>
158
158
 
159
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:194](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L194)
159
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:194](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L194)
160
160
 
161
161
  Get an item from DynamoDB.
162
162
 
@@ -198,7 +198,7 @@ The item, or `undefined` if not found.
198
198
 
199
199
  > **paginateItems**\<`T`\>(`input`): `AsyncGenerator`\<`T`\>
200
200
 
201
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:395](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L395)
201
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:395](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L395)
202
202
 
203
203
  Paginate over Query results, yielding one unmarshalled item at a time.
204
204
 
@@ -251,7 +251,7 @@ Expected shape of each yielded item.
251
251
 
252
252
  > **paginateScan**\<`T`\>(`input`): `AsyncGenerator`\<`T`\>
253
253
 
254
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:417](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L417)
254
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:417](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L417)
255
255
 
256
256
  Paginate over Scan results, yielding one unmarshalled item at a time.
257
257
 
@@ -287,7 +287,7 @@ Expected shape of each yielded item.
287
287
 
288
288
  > **putItem**\<`T`\>(`input`): `Promise`\<`PutCommandOutput`\>
289
289
 
290
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:210](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L210)
290
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:210](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L210)
291
291
 
292
292
  Put an item into DynamoDB. The caller's `Item` is typed as `T`, which
293
293
  the document client marshalls automatically.
@@ -320,7 +320,7 @@ Type of the item being stored.
320
320
 
321
321
  > **query**\<`T`\>(`input`): `Promise`\<`Omit`\<`QueryCommandOutput`, `"Items"`\> & `object`\>
322
322
 
323
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:267](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L267)
323
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:267](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L267)
324
324
 
325
325
  Execute a DynamoDB Query. The full `QueryCommandOutput` is returned with
326
326
  `Items` typed as `T[]` so callers retain pagination metadata
@@ -354,7 +354,7 @@ Expected shape of each unmarshalled item.
354
354
 
355
355
  > **scan**\<`T`\>(`input`): `Promise`\<`Omit`\<`ScanCommandOutput`, `"Items"`\> & `object`\>
356
356
 
357
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:296](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L296)
357
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:296](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L296)
358
358
 
359
359
  Scan a DynamoDB table. The full `ScanCommandOutput` is returned with
360
360
  `Items` typed as `T[]` so callers retain pagination metadata.
@@ -400,7 +400,7 @@ Expected shape of each unmarshalled item.
400
400
 
401
401
  > **updateItem**\<`K`, `R`\>(`input`): `Promise`\<`Omit`\<`UpdateCommandOutput`, `"Attributes"`\> & `object`\>
402
402
 
403
- Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:229](https://github.com/aligent/microservice-development-utilities/blob/8b1bfce9cb585c7bb3b8f4bf6535b1058f295574/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L229)
403
+ Defined in: [packages/aws-wrappers/src/dynamodb/dynamodb.ts:229](https://github.com/aligent/microservice-development-utilities/blob/e278ae3f29a38b1e451dd1bab16695aea28a55c1/packages/aws-wrappers/src/dynamodb/dynamodb.ts#L229)
404
404
 
405
405
  Update an item in DynamoDB. The `Attributes` field on the response is
406
406
  typed as `R` — the caller should choose `R` to match their