@aws-sdk/util-dynamodb 3.996.5 → 3.996.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -270,7 +270,8 @@ const convertNumber = (numString, options) => {
270
270
  const convertString = (stringValue) => stringValue;
271
271
  const convertBinary = (binaryValue) => binaryValue;
272
272
  const convertList = (list, options) => list.map((item) => convertToNative(item, options));
273
- const convertMap = (map, options) => Object.entries(map).reduce((acc, [key, value]) => ((acc[key] = convertToNative(value, options)), acc), {});
273
+ const convertMap = (map, options) => Object.entries(map).reduce((acc, [key, value]) => ((acc[key] = convertToNative(value, options)),
274
+ acc), {});
274
275
 
275
276
  function marshall(data, options) {
276
277
  const attributeValue = convertToAttr(data, options);
@@ -58,4 +58,5 @@ const convertNumber = (numString, options) => {
58
58
  const convertString = (stringValue) => stringValue;
59
59
  const convertBinary = (binaryValue) => binaryValue;
60
60
  const convertList = (list, options) => list.map((item) => convertToNative(item, options));
61
- const convertMap = (map, options) => Object.entries(map).reduce((acc, [key, value]) => ((acc[key] = convertToNative(value, options)), acc), {});
61
+ const convertMap = (map, options) => Object.entries(map).reduce((acc, [key, value]) => ((acc[key] = convertToNative(value, options)),
62
+ acc), {});
package/dist-es/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  export { NumberValue as NumberValueImpl } from "./NumberValue";
2
- export * from "./convertToAttr";
3
- export * from "./convertToNative";
4
- export * from "./marshall";
5
- export * from "./models";
6
- export * from "./unmarshall";
2
+ export { convertToAttr } from "./convertToAttr";
3
+ export { convertToNative } from "./convertToNative";
4
+ export { marshall } from "./marshall";
5
+ export { unmarshall } from "./unmarshall";
@@ -19,7 +19,7 @@ export declare class NumberValue implements INumberValue {
19
19
  *
20
20
  * @param value - a precise number, or any BigInt or string, or AttributeValue.
21
21
  */
22
- constructor(value: number | Number | BigInt | string | {
22
+ constructor(value: number | number | bigint | string | {
23
23
  N: string;
24
24
  });
25
25
  /**
@@ -27,7 +27,7 @@ export declare class NumberValue implements INumberValue {
27
27
  *
28
28
  * @param value - a precise number, or any BigInt or string, or AttributeValue.
29
29
  */
30
- static from(value: number | Number | BigInt | string | {
30
+ static from(value: number | number | bigint | string | {
31
31
  N: string;
32
32
  }): NumberValue;
33
33
  /**
@@ -1,6 +1,8 @@
1
1
  export { NumberValue as NumberValueImpl } from "./NumberValue";
2
- export * from "./convertToAttr";
3
- export * from "./convertToNative";
4
- export * from "./marshall";
5
- export * from "./models";
6
- export * from "./unmarshall";
2
+ export { convertToAttr } from "./convertToAttr";
3
+ export { convertToNative } from "./convertToNative";
4
+ export { marshall } from "./marshall";
5
+ export type { marshallOptions } from "./marshall";
6
+ export type { NumberValue, NativeAttributeValue, NativeScalarAttributeValue, NativeAttributeBinary } from "./models";
7
+ export { unmarshall } from "./unmarshall";
8
+ export type { unmarshallOptions } from "./unmarshall";
@@ -4,22 +4,22 @@ export declare class NumberValue implements INumberValue {
4
4
  constructor(
5
5
  value:
6
6
  | number
7
- | Number
8
- | BigInt
7
+ | number
8
+ | bigint
9
9
  | string
10
10
  | {
11
11
  N: string;
12
- }
12
+ },
13
13
  );
14
14
  static from(
15
15
  value:
16
16
  | number
17
- | Number
18
- | BigInt
17
+ | number
18
+ | bigint
19
19
  | string
20
20
  | {
21
21
  N: string;
22
- }
22
+ },
23
23
  ): NumberValue;
24
24
  toAttributeValue(): {
25
25
  N: string;
@@ -3,5 +3,5 @@ import { marshallOptions } from "./marshall";
3
3
  import { NativeAttributeValue } from "./models";
4
4
  export declare const convertToAttr: (
5
5
  data: NativeAttributeValue,
6
- options?: marshallOptions
6
+ options?: marshallOptions,
7
7
  ) => AttributeValue;
@@ -3,5 +3,5 @@ import { NativeAttributeValue } from "./models";
3
3
  import { unmarshallOptions } from "./unmarshall";
4
4
  export declare const convertToNative: (
5
5
  data: AttributeValue,
6
- options?: unmarshallOptions
6
+ options?: unmarshallOptions,
7
7
  ) => NativeAttributeValue;
@@ -1,6 +1,13 @@
1
1
  export { NumberValue as NumberValueImpl } from "./NumberValue";
2
- export * from "./convertToAttr";
3
- export * from "./convertToNative";
4
- export * from "./marshall";
5
- export * from "./models";
6
- export * from "./unmarshall";
2
+ export { convertToAttr } from "./convertToAttr";
3
+ export { convertToNative } from "./convertToNative";
4
+ export { marshall } from "./marshall";
5
+ export { marshallOptions } from "./marshall";
6
+ export {
7
+ NumberValue,
8
+ NativeAttributeValue,
9
+ NativeScalarAttributeValue,
10
+ NativeAttributeBinary,
11
+ } from "./models";
12
+ export { unmarshall } from "./unmarshall";
13
+ export { unmarshallOptions } from "./unmarshall";
@@ -8,105 +8,88 @@ export interface marshallOptions {
8
8
  convertTopLevelContainer?: boolean;
9
9
  allowImpreciseNumbers?: boolean;
10
10
  }
11
- export declare function marshall(
12
- data: null,
13
- options?: marshallOptions
14
- ): AttributeValue.NULLMember;
11
+ export declare function marshall(data: null, options?: marshallOptions): AttributeValue.NULLMember;
15
12
  export declare function marshall(
16
13
  data: Set<bigint> | Set<number> | Set<NumberValue>,
17
- options?: marshallOptions
14
+ options?: marshallOptions,
18
15
  ): AttributeValue.NSMember;
19
16
  export declare function marshall(
20
17
  data: Set<string>,
21
- options?: marshallOptions
18
+ options?: marshallOptions,
22
19
  ): AttributeValue.SSMember;
23
20
  export declare function marshall(
24
21
  data: Set<NativeAttributeBinary>,
25
- options?: marshallOptions
22
+ options?: marshallOptions,
26
23
  ): AttributeValue.BSMember;
27
24
  export declare function marshall(
28
25
  data: NativeAttributeBinary,
29
- options?: marshallOptions
26
+ options?: marshallOptions,
30
27
  ): AttributeValue.BMember;
31
28
  export declare function marshall(
32
29
  data: boolean,
33
- options?: marshallOptions
30
+ options?: marshallOptions,
34
31
  ): AttributeValue.BOOLMember;
35
32
  export declare function marshall(
36
33
  data: number | NumberValue | bigint,
37
- options?: marshallOptions
34
+ options?: marshallOptions,
38
35
  ): AttributeValue.NMember;
39
- export declare function marshall(
40
- data: string,
41
- options?: marshallOptions
42
- ): AttributeValue.SMember;
36
+ export declare function marshall(data: string, options?: marshallOptions): AttributeValue.SMember;
43
37
  export declare function marshall(
44
38
  data: boolean,
45
- options?: marshallOptions
39
+ options?: marshallOptions,
46
40
  ): AttributeValue.BOOLMember;
47
41
  export declare function marshall<
48
42
  O extends {
49
43
  convertTopLevelContainer: true;
50
- }
51
- >(
52
- data: NativeAttributeValue[],
53
- options: marshallOptions & O
54
- ): AttributeValue.LMember;
44
+ },
45
+ >(data: NativeAttributeValue[], options: marshallOptions & O): AttributeValue.LMember;
55
46
  export declare function marshall<
56
47
  O extends {
57
48
  convertTopLevelContainer: false;
58
- }
49
+ },
59
50
  >(data: NativeAttributeValue[], options: marshallOptions & O): AttributeValue[];
60
51
  export declare function marshall<
61
52
  O extends {
62
53
  convertTopLevelContainer: boolean;
63
- }
54
+ },
64
55
  >(
65
56
  data: NativeAttributeValue[],
66
- options: marshallOptions & O
57
+ options: marshallOptions & O,
67
58
  ): AttributeValue[] | AttributeValue.LMember;
68
59
  export declare function marshall(
69
60
  data: NativeAttributeValue[],
70
- options?: marshallOptions
61
+ options?: marshallOptions,
71
62
  ): AttributeValue[];
72
63
  export declare function marshall<
73
64
  O extends {
74
65
  convertTopLevelContainer: true;
75
- }
66
+ },
76
67
  >(
77
- data:
78
- | Map<string, NativeAttributeValue>
79
- | Record<string, NativeAttributeValue>,
80
- options: marshallOptions & O
68
+ data: Map<string, NativeAttributeValue> | Record<string, NativeAttributeValue>,
69
+ options: marshallOptions & O,
81
70
  ): AttributeValue.MMember;
82
71
  export declare function marshall<
83
72
  O extends {
84
73
  convertTopLevelContainer: false;
85
- }
74
+ },
86
75
  >(
87
- data:
88
- | Map<string, NativeAttributeValue>
89
- | Record<string, NativeAttributeValue>,
90
- options: marshallOptions & O
76
+ data: Map<string, NativeAttributeValue> | Record<string, NativeAttributeValue>,
77
+ options: marshallOptions & O,
91
78
  ): Record<string, AttributeValue>;
92
79
  export declare function marshall<
93
80
  O extends {
94
81
  convertTopLevelContainer: boolean;
95
- }
82
+ },
96
83
  >(
97
- data:
98
- | Map<string, NativeAttributeValue>
99
- | Record<string, NativeAttributeValue>,
100
- options: marshallOptions & O
84
+ data: Map<string, NativeAttributeValue> | Record<string, NativeAttributeValue>,
85
+ options: marshallOptions & O,
101
86
  ): Record<string, AttributeValue> | AttributeValue.MMember;
102
87
  export declare function marshall(
103
- data:
104
- | Map<string, NativeAttributeValue>
105
- | Record<string, NativeAttributeValue>,
106
- options?: marshallOptions
88
+ data: Map<string, NativeAttributeValue> | Record<string, NativeAttributeValue>,
89
+ options?: marshallOptions,
107
90
  ): Record<string, AttributeValue>;
108
91
  export declare function marshall(data: any, options?: marshallOptions): any;
109
92
  export declare function marshall(
110
93
  data: unknown,
111
- options?: marshallOptions
94
+ options?: marshallOptions,
112
95
  ): AttributeValue.$UnknownMember;
@@ -7,9 +7,7 @@ export type NativeAttributeValue =
7
7
  [key: string]: NativeAttributeValue;
8
8
  }
9
9
  | NativeAttributeValue[]
10
- | Set<
11
- number | bigint | NumberValue | string | NativeAttributeBinary | undefined
12
- >
10
+ | Set<number | bigint | NumberValue | string | NativeAttributeBinary | undefined>
13
11
  | InstanceType<{
14
12
  new (...args: any[]): any;
15
13
  }>;
@@ -2,12 +2,10 @@ import { AttributeValue } from "@aws-sdk/client-dynamodb";
2
2
  import { NativeAttributeValue } from "./models";
3
3
  import { NumberValue } from "./NumberValue";
4
4
  export interface unmarshallOptions {
5
- wrapNumbers?:
6
- | boolean
7
- | ((value: string) => number | bigint | NumberValue | any);
5
+ wrapNumbers?: boolean | ((value: string) => number | bigint | NumberValue | any);
8
6
  convertWithoutMapWrapper?: boolean;
9
7
  }
10
8
  export declare const unmarshall: (
11
9
  data: Record<string, AttributeValue> | AttributeValue,
12
- options?: unmarshallOptions
10
+ options?: unmarshallOptions,
13
11
  ) => Record<string, NativeAttributeValue>;
package/package.json CHANGED
@@ -1,6 +1,31 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-dynamodb",
3
- "version": "3.996.5",
3
+ "version": "3.996.7",
4
+ "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/util-dynamodb",
5
+ "license": "Apache-2.0",
6
+ "author": {
7
+ "name": "AWS SDK for JavaScript Team",
8
+ "url": "https://aws.amazon.com/sdk-for-javascript/"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/aws/aws-sdk-js-v3.git",
13
+ "directory": "packages/util-dynamodb"
14
+ },
15
+ "files": [
16
+ "dist-*/**"
17
+ ],
18
+ "sideEffects": false,
19
+ "main": "./dist-cjs/index.js",
20
+ "module": "./dist-es/index.js",
21
+ "types": "./dist-types/index.d.ts",
22
+ "typesVersions": {
23
+ "<4.5": {
24
+ "dist-types/*": [
25
+ "dist-types/ts3.4/*"
26
+ ]
27
+ }
28
+ },
4
29
  "scripts": {
5
30
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
6
31
  "build:cjs": "node ../../scripts/compilation/inline",
@@ -13,20 +38,11 @@
13
38
  "test": "yarn g:vitest run",
14
39
  "test:watch": "yarn g:vitest watch"
15
40
  },
16
- "main": "./dist-cjs/index.js",
17
- "module": "./dist-es/index.js",
18
- "types": "./dist-types/index.d.ts",
19
- "sideEffects": false,
20
- "author": {
21
- "name": "AWS SDK for JavaScript Team",
22
- "url": "https://aws.amazon.com/sdk-for-javascript/"
23
- },
24
- "license": "Apache-2.0",
25
41
  "dependencies": {
26
42
  "tslib": "^2.6.2"
27
43
  },
28
44
  "devDependencies": {
29
- "@aws-sdk/client-dynamodb": "3.1069.0",
45
+ "@aws-sdk/client-dynamodb": "3.1088.0",
30
46
  "@tsconfig/recommended": "1.0.1",
31
47
  "concurrently": "7.0.0",
32
48
  "downlevel-dts": "0.10.1",
@@ -34,25 +50,9 @@
34
50
  "typescript": "~5.8.3"
35
51
  },
36
52
  "peerDependencies": {
37
- "@aws-sdk/client-dynamodb": "^3.1069.0"
53
+ "@aws-sdk/client-dynamodb": "^3.1088.0"
38
54
  },
39
55
  "engines": {
40
56
  "node": ">=20.0.0"
41
- },
42
- "typesVersions": {
43
- "<4.5": {
44
- "dist-types/*": [
45
- "dist-types/ts3.4/*"
46
- ]
47
- }
48
- },
49
- "files": [
50
- "dist-*/**"
51
- ],
52
- "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/util-dynamodb",
53
- "repository": {
54
- "type": "git",
55
- "url": "https://github.com/aws/aws-sdk-js-v3.git",
56
- "directory": "packages/util-dynamodb"
57
57
  }
58
58
  }