@infra-blocks/aws-dynamodb 0.70.0 → 0.70.1-alpha.0
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/lib/cjs/commands/expressions/operands/value.d.ts +1 -1
- package/lib/cjs/commands/expressions/operands/value.js.map +1 -1
- package/lib/cjs/commands/outputs/consumed-capacity.js +13 -13
- package/lib/cjs/commands/outputs/consumed-capacity.js.map +1 -1
- package/lib/cjs/commands/outputs/delete-item.js +4 -3
- package/lib/cjs/commands/outputs/delete-item.js.map +1 -1
- package/lib/cjs/commands/outputs/get-item.js +5 -4
- package/lib/cjs/commands/outputs/get-item.js.map +1 -1
- package/lib/cjs/commands/outputs/lib.d.ts +3 -24
- package/lib/cjs/commands/outputs/lib.js +10 -55
- package/lib/cjs/commands/outputs/lib.js.map +1 -1
- package/lib/cjs/commands/outputs/put-item.js +4 -3
- package/lib/cjs/commands/outputs/put-item.js.map +1 -1
- package/lib/cjs/commands/outputs/query.js +7 -6
- package/lib/cjs/commands/outputs/query.js.map +1 -1
- package/lib/cjs/commands/outputs/update-item.js +4 -3
- package/lib/cjs/commands/outputs/update-item.js.map +1 -1
- package/lib/esm/commands/expressions/operands/value.d.ts +1 -1
- package/lib/esm/commands/expressions/operands/value.js.map +1 -1
- package/lib/esm/commands/outputs/consumed-capacity.js +14 -14
- package/lib/esm/commands/outputs/consumed-capacity.js.map +1 -1
- package/lib/esm/commands/outputs/delete-item.js +5 -4
- package/lib/esm/commands/outputs/delete-item.js.map +1 -1
- package/lib/esm/commands/outputs/get-item.js +6 -5
- package/lib/esm/commands/outputs/get-item.js.map +1 -1
- package/lib/esm/commands/outputs/lib.d.ts +3 -24
- package/lib/esm/commands/outputs/lib.js +9 -52
- package/lib/esm/commands/outputs/lib.js.map +1 -1
- package/lib/esm/commands/outputs/put-item.js +5 -4
- package/lib/esm/commands/outputs/put-item.js.map +1 -1
- package/lib/esm/commands/outputs/query.js +8 -7
- package/lib/esm/commands/outputs/query.js.map +1 -1
- package/lib/esm/commands/outputs/update-item.js +5 -4
- package/lib/esm/commands/outputs/update-item.js.map +1 -1
- package/package.json +4 -4
|
@@ -11,7 +11,7 @@ export type ImplicitValue = Exclude<AttributeValue, AttributePath>;
|
|
|
11
11
|
* It's a conditional type where a value can be expressed as a primitive
|
|
12
12
|
* unless it is a string, then it *must* be of type {@link Value}.
|
|
13
13
|
*/
|
|
14
|
-
export type ValueInput<T extends AttributeValue = AttributeValue> = T extends ImplicitValue ? T
|
|
14
|
+
export type ValueInput<T extends AttributeValue = AttributeValue> = Value<T> | (T extends ImplicitValue ? T : never);
|
|
15
15
|
export type Value<T extends AttributeValue = AttributeValue> = ValueFormatter & Brand<"Value"> & {
|
|
16
16
|
readonly type: "Value";
|
|
17
17
|
readonly _phantom?: T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/value.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/value.ts"],"names":[],"mappings":";;;AA6DA,sBAIC;AASD,oCAIC;AAeD,0BAMC;AAnGD,+CAA0D;AAC1D,gDAU2B;AAC3B,kDAIyB;AAqBZ,QAAA,KAAK,GAAG;IACnB,IAAI,CAA4C,KAAQ;QACtD,OAAO,IAAA,eAAO,EAAC;YACb,IAAI,EAAE,OAAO;YACb,GAAG,kCAAmB,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;SACtE,CAAC,CAAC;IACL,CAAC;IACD,SAAS,CACP,KAAoB;QAEpB,IAAI,OAAO,CAAI,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,aAAK,CAAC,IAAI,CAAI,KAAU,CAAC,CAAC;IACnC,CAAC;CACF,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,KAAK,CACnB,KAAQ;IAER,OAAO,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CAC1B,KAAc;IAEd,OAAO,OAAO,CAAI,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,8CAA8C;IAC9C,OAAO,CACL,IAAA,yBAAc,EAAC,KAAK,CAAC;QACrB,IAAA,0BAAe,EAAC,KAAK,CAAC;QACtB,IAAA,uBAAY,EAAC,KAAK,CAAC;QACnB,IAAA,sBAAW,EAAC,KAAK,CAAC;QAClB,IAAA,uBAAY,EAAC,KAAK,CAAC;QACnB,IAAA,yBAAc,EAAC,KAAK,CAAC;QACrB,IAAA,sBAAW,EAAC,KAAK,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO,CACrB,KAAc;IAEd,OAAO,CACL,IAAA,oCAAqB,EAAC,KAAK,CAAC,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CapacityUnits = exports.ConsumedCapacity = void 0;
|
|
4
|
+
const checks_1 = require("@infra-blocks/checks");
|
|
5
|
+
const object_1 = require("es-toolkit/object");
|
|
4
6
|
const lib_js_1 = require("./lib.js");
|
|
5
7
|
exports.ConsumedCapacity = {
|
|
6
8
|
decode(output) {
|
|
7
|
-
return {
|
|
9
|
+
return (0, lib_js_1.unsetUndefined)({
|
|
8
10
|
...exports.CapacityUnits.decode(output),
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.unwrap(),
|
|
15
|
-
};
|
|
11
|
+
tableName: (0, checks_1.checkNotNull)(output.TableName),
|
|
12
|
+
table: (0, lib_js_1.mapIfDefined)(output.Table, exports.CapacityUnits.decode),
|
|
13
|
+
globalSecondaryIndexes: (0, lib_js_1.mapIfDefined)(output.GlobalSecondaryIndexes, (gsis) => (0, object_1.mapValues)(gsis, exports.CapacityUnits.decode)),
|
|
14
|
+
localSecondaryIndexes: (0, lib_js_1.mapIfDefined)(output.LocalSecondaryIndexes, (lsis) => (0, object_1.mapValues)(lsis, exports.CapacityUnits.decode)),
|
|
15
|
+
});
|
|
16
16
|
},
|
|
17
17
|
};
|
|
18
18
|
exports.CapacityUnits = {
|
|
19
19
|
decode(output) {
|
|
20
|
-
return lib_js_1.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
return (0, lib_js_1.unsetUndefined)({
|
|
21
|
+
capacityUnits: (0, checks_1.checkNotNull)(output.CapacityUnits),
|
|
22
|
+
readCapacityUnits: output.ReadCapacityUnits,
|
|
23
|
+
writeCapacityUnits: output.WriteCapacityUnits,
|
|
24
|
+
});
|
|
25
25
|
},
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=consumed-capacity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumed-capacity.js","sourceRoot":"","sources":["../../../../src/commands/outputs/consumed-capacity.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"consumed-capacity.js","sourceRoot":"","sources":["../../../../src/commands/outputs/consumed-capacity.ts"],"names":[],"mappings":";;;AACA,iDAAoD;AACpD,8CAA8C;AAC9C,qCAAwD;AAe3C,QAAA,gBAAgB,GAAG;IAC9B,MAAM,CAAC,MAA4B;QACjC,OAAO,IAAA,uBAAc,EAAC;YACpB,GAAG,qBAAa,CAAC,MAAM,CAAC,MAAM,CAAC;YAC/B,SAAS,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,SAAS,CAAC;YACzC,KAAK,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,KAAK,EAAE,qBAAa,CAAC,MAAM,CAAC;YACvD,sBAAsB,EAAE,IAAA,qBAAY,EAClC,MAAM,CAAC,sBAAsB,EAC7B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,kBAAS,EAAC,IAAI,EAAE,qBAAa,CAAC,MAAM,CAAC,CAChD;YACD,qBAAqB,EAAE,IAAA,qBAAY,EACjC,MAAM,CAAC,qBAAqB,EAC5B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,kBAAS,EAAC,IAAI,EAAE,qBAAa,CAAC,MAAM,CAAC,CAChD;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AASW,QAAA,aAAa,GAAG;IAC3B,MAAM,CAAC,MAIN;QACC,OAAO,IAAA,uBAAc,EAAC;YACpB,aAAa,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,aAAa,CAAC;YACjD,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;YAC3C,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;SAC9C,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeleteItemOutput = void 0;
|
|
4
|
+
const types_1 = require("@infra-blocks/types");
|
|
4
5
|
const lib_js_1 = require("./lib.js");
|
|
5
6
|
exports.DeleteItemOutput = {
|
|
6
7
|
decode,
|
|
7
8
|
};
|
|
8
9
|
function decode(output) {
|
|
9
|
-
return lib_js_1.
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
return (0, lib_js_1.unsetUndefined)({
|
|
11
|
+
item: (0, lib_js_1.mapIfDefined)(output.Attributes, (types_1.trusted)),
|
|
12
|
+
});
|
|
12
13
|
}
|
|
13
14
|
//# sourceMappingURL=delete-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/delete-item.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"delete-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/delete-item.ts"],"names":[],"mappings":";;;AACA,+CAA8C;AAE9C,qCAAwD;AAI3C,QAAA,gBAAgB,GAAG;IAC9B,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,MAA2B;IAE3B,OAAO,IAAA,uBAAc,EAAC;QACpB,IAAI,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,UAAU,EAAE,CAAA,eAAU,CAAA,CAAC;KAClD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetItemOutput = void 0;
|
|
4
|
+
const types_1 = require("@infra-blocks/types");
|
|
4
5
|
const consumed_capacity_js_1 = require("./consumed-capacity.js");
|
|
5
6
|
const lib_js_1 = require("./lib.js");
|
|
6
7
|
exports.GetItemOutput = {
|
|
7
8
|
decode,
|
|
8
9
|
};
|
|
9
10
|
function decode(output) {
|
|
10
|
-
return lib_js_1.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
return (0, lib_js_1.unsetUndefined)({
|
|
12
|
+
item: (0, lib_js_1.mapIfDefined)(output.Item, (types_1.trusted)),
|
|
13
|
+
consumedCapacity: (0, lib_js_1.mapIfDefined)(output.ConsumedCapacity, consumed_capacity_js_1.ConsumedCapacity.decode),
|
|
14
|
+
});
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=get-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/get-item.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"get-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/get-item.ts"],"names":[],"mappings":";;;AACA,+CAA8C;AAE9C,iEAA0D;AAC1D,qCAAwD;AAO3C,QAAA,aAAa,GAAG;IAC3B,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,MAAwB;IAExB,OAAO,IAAA,uBAAc,EAAC;QACpB,IAAI,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,IAAI,EAAE,CAAA,eAAU,CAAA,CAAC;QAC3C,gBAAgB,EAAE,IAAA,qBAAY,EAC5B,MAAM,CAAC,gBAAgB,EACvB,uCAAgB,CAAC,MAAM,CACxB;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
[key in K]: NonNullable<T>;
|
|
5
|
-
}>;
|
|
6
|
-
map<K extends keyof A, T, R>(key: K, value: T, transform: Transform<T, R>): ObjectBuilder<A & {
|
|
7
|
-
[key in K]: R;
|
|
8
|
-
}>;
|
|
9
|
-
mapValuesIfNotNull<K extends keyof A, T extends Record<string, unknown>, R>(key: K, value: Nullable<T>, transform: Transform<T[keyof T], R>): ObjectBuilder<A & {
|
|
10
|
-
[key in K]?: {
|
|
11
|
-
[subKey in keyof T]: R;
|
|
12
|
-
};
|
|
13
|
-
}>;
|
|
14
|
-
mapIfNotNull<K extends keyof A, T, R>(key: K, value: Nullable<T>, transform: Transform<T, R>): ObjectBuilder<A & {
|
|
15
|
-
[key in K]?: R;
|
|
16
|
-
}>;
|
|
17
|
-
setIfNotNull<K extends keyof A, T>(key: K, value: T): ObjectBuilder<A & {
|
|
18
|
-
[key in K]?: T;
|
|
19
|
-
}>;
|
|
20
|
-
unwrap(): A;
|
|
21
|
-
};
|
|
22
|
-
export declare const ObjectBuilder: {
|
|
23
|
-
of<A extends Record<string, unknown>>(): ObjectBuilder<Partial<A>>;
|
|
24
|
-
};
|
|
1
|
+
import { type Transform } from "@infra-blocks/types";
|
|
2
|
+
export declare function unsetUndefined<O extends Record<PropertyKey, any>>(obj: O): O;
|
|
3
|
+
export declare function mapIfDefined<T, R>(value: T | undefined, transform: Transform<T, R>): R | undefined;
|
|
@@ -1,63 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
|
|
3
|
+
exports.unsetUndefined = unsetUndefined;
|
|
4
|
+
exports.mapIfDefined = mapIfDefined;
|
|
8
5
|
const types_1 = require("@infra-blocks/types");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function wrap(payload) {
|
|
15
|
-
return {
|
|
16
|
-
enforceNotNull(key, value) {
|
|
17
|
-
enforceNotNull(payload, key, value);
|
|
18
|
-
return (0, types_1.trusted)(this);
|
|
19
|
-
},
|
|
20
|
-
map(key, value, transform) {
|
|
21
|
-
map(payload, key, value, transform);
|
|
22
|
-
return (0, types_1.trusted)(this);
|
|
23
|
-
},
|
|
24
|
-
mapValuesIfNotNull(key, value, transform) {
|
|
25
|
-
mapValuesIfNotNull(payload, key, value, transform);
|
|
26
|
-
return (0, types_1.trusted)(this);
|
|
27
|
-
},
|
|
28
|
-
mapIfNotNull(key, value, transform) {
|
|
29
|
-
mapIfNotNull(payload, key, value, transform);
|
|
30
|
-
return (0, types_1.trusted)(this);
|
|
31
|
-
},
|
|
32
|
-
setIfNotNull(key, value) {
|
|
33
|
-
mapIfNotNull(payload, key, value, (v) => v);
|
|
34
|
-
return (0, types_1.trusted)(this);
|
|
35
|
-
},
|
|
36
|
-
unwrap: () => payload,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function mapValuesIfNotNull(acc, accKey, record, transform) {
|
|
40
|
-
if (record != null) {
|
|
41
|
-
acc[accKey] = {};
|
|
42
|
-
for (const [key, value] of Object.entries(record)) {
|
|
43
|
-
acc[accKey][key] = (0, types_1.trusted)(transform((0, types_1.trusted)(value)));
|
|
6
|
+
// biome-ignore lint/suspicious/noExplicitAny: Record<..., any> include interfaces. Record<..., unknown> doesn't.
|
|
7
|
+
function unsetUndefined(obj) {
|
|
8
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
9
|
+
if ((0, types_1.isUndefined)(value)) {
|
|
10
|
+
delete obj[key];
|
|
44
11
|
}
|
|
45
12
|
}
|
|
46
|
-
return
|
|
47
|
-
}
|
|
48
|
-
function mapIfNotNull(acc, accKey, value, transform) {
|
|
49
|
-
if (value != null) {
|
|
50
|
-
acc[accKey] = (0, types_1.trusted)(transform(value));
|
|
51
|
-
}
|
|
52
|
-
return (0, types_1.trusted)(acc);
|
|
53
|
-
}
|
|
54
|
-
function map(acc, accKey, value, transform) {
|
|
55
|
-
acc[accKey] = (0, types_1.trusted)(transform(value));
|
|
56
|
-
return (0, types_1.trusted)(acc);
|
|
13
|
+
return obj;
|
|
57
14
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
acc[accKey] = (0, types_1.trusted)(value);
|
|
61
|
-
return (0, types_1.trusted)(acc);
|
|
15
|
+
function mapIfDefined(value, transform) {
|
|
16
|
+
return value && transform(value);
|
|
62
17
|
}
|
|
63
18
|
//# sourceMappingURL=lib.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../../../src/commands/outputs/lib.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../../../src/commands/outputs/lib.ts"],"names":[],"mappings":";;AAGA,wCAOC;AAED,oCAKC;AAjBD,+CAAkE;AAElE,iHAAiH;AACjH,SAAgB,cAAc,CAAqC,GAAM;IACvE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,IAAI,IAAA,mBAAW,EAAC,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,YAAY,CAC1B,KAAoB,EACpB,SAA0B;IAE1B,OAAO,KAAK,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PutItemOutput = void 0;
|
|
4
|
+
const types_1 = require("@infra-blocks/types");
|
|
4
5
|
const lib_js_1 = require("./lib.js");
|
|
5
6
|
exports.PutItemOutput = {
|
|
6
7
|
decode,
|
|
7
8
|
};
|
|
8
9
|
function decode(output) {
|
|
9
|
-
return lib_js_1.
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
return (0, lib_js_1.unsetUndefined)({
|
|
11
|
+
item: (0, lib_js_1.mapIfDefined)(output.Attributes, (types_1.trusted)),
|
|
12
|
+
});
|
|
12
13
|
}
|
|
13
14
|
//# sourceMappingURL=put-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"put-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/put-item.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"put-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/put-item.ts"],"names":[],"mappings":";;;AACA,+CAA8C;AAE9C,qCAAwD;AAK3C,QAAA,aAAa,GAAG;IAC3B,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,MAAwB;IAExB,OAAO,IAAA,uBAAc,EAAC;QACpB,IAAI,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,UAAU,EAAE,CAAA,eAAU,CAAA,CAAC;KAClD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QueryOutput = void 0;
|
|
4
|
+
const checks_1 = require("@infra-blocks/checks");
|
|
4
5
|
const types_1 = require("@infra-blocks/types");
|
|
5
6
|
const lib_js_1 = require("./lib.js");
|
|
6
7
|
exports.QueryOutput = {
|
|
7
8
|
decode,
|
|
8
9
|
};
|
|
9
10
|
function decode(output) {
|
|
10
|
-
return lib_js_1.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
return (0, lib_js_1.unsetUndefined)({
|
|
12
|
+
count: (0, checks_1.checkNotNull)(output.Count),
|
|
13
|
+
items: (output.Items ?? []),
|
|
14
|
+
scannedCount: (0, checks_1.checkNotNull)(output.ScannedCount),
|
|
15
|
+
lastEvaluatedKey: (0, lib_js_1.mapIfDefined)(output.LastEvaluatedKey, (types_1.trusted)),
|
|
16
|
+
});
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/outputs/query.ts"],"names":[],"mappings":";;;AACA,+CAA8C;AAE9C,
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/outputs/query.ts"],"names":[],"mappings":";;;AACA,iDAAoD;AACpD,+CAA8C;AAE9C,qCAAwD;AAY3C,QAAA,WAAW,GAAG;IACzB,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CAGb,MAA0B;IAC1B,OAAO,IAAA,uBAAc,EAAC;QACpB,KAAK,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,KAAK,CAAC;QACjC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAa;QACvC,YAAY,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,YAAY,CAAC;QAC/C,gBAAgB,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,gBAAgB,EAAE,CAAA,eAAU,CAAA,CAAC;KACpE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateItemOutput = void 0;
|
|
4
|
+
const types_1 = require("@infra-blocks/types");
|
|
4
5
|
const lib_js_1 = require("./lib.js");
|
|
5
6
|
exports.UpdateItemOutput = {
|
|
6
7
|
decode,
|
|
7
8
|
};
|
|
8
9
|
function decode(output) {
|
|
9
|
-
return lib_js_1.
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
return (0, lib_js_1.unsetUndefined)({
|
|
11
|
+
attributes: (0, lib_js_1.mapIfDefined)(output.Attributes, (types_1.trusted)),
|
|
12
|
+
});
|
|
12
13
|
}
|
|
13
14
|
//# sourceMappingURL=update-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/update-item.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"update-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/update-item.ts"],"names":[],"mappings":";;;AACA,+CAA8C;AAE9C,qCAAwD;AAM3C,QAAA,gBAAgB,GAAG;IAC9B,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,MAA2B;IAE3B,OAAO,IAAA,uBAAc,EAAC;QACpB,UAAU,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,UAAU,EAAE,CAAA,eAAU,CAAA,CAAC;KACxD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -11,7 +11,7 @@ export type ImplicitValue = Exclude<AttributeValue, AttributePath>;
|
|
|
11
11
|
* It's a conditional type where a value can be expressed as a primitive
|
|
12
12
|
* unless it is a string, then it *must* be of type {@link Value}.
|
|
13
13
|
*/
|
|
14
|
-
export type ValueInput<T extends AttributeValue = AttributeValue> = T extends ImplicitValue ? T
|
|
14
|
+
export type ValueInput<T extends AttributeValue = AttributeValue> = Value<T> | (T extends ImplicitValue ? T : never);
|
|
15
15
|
export type Value<T extends AttributeValue = AttributeValue> = ValueFormatter & Brand<"Value"> & {
|
|
16
16
|
readonly type: "Value";
|
|
17
17
|
readonly _phantom?: T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAGL,cAAc,EACd,eAAe,EACf,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,cAAc,EACd,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAEtB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"value.js","sourceRoot":"","sources":["../../../../../src/commands/expressions/operands/value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAGL,cAAc,EACd,eAAe,EACf,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,cAAc,EACd,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAEtB,MAAM,iBAAiB,CAAC;AAqBzB,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,CAA4C,KAAQ;QACtD,OAAO,OAAO,CAAC;YACb,IAAI,EAAE,OAAO;YACb,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;SACtE,CAAC,CAAC;IACL,CAAC;IACD,SAAS,CACP,KAAoB;QAEpB,IAAI,OAAO,CAAI,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAI,KAAU,CAAC,CAAC;IACnC,CAAC;CACF,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,KAAK,CACnB,KAAQ;IAER,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAc;IAEd,OAAO,OAAO,CAAI,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,8CAA8C;IAC9C,OAAO,CACL,cAAc,CAAC,KAAK,CAAC;QACrB,eAAe,CAAC,KAAK,CAAC;QACtB,YAAY,CAAC,KAAK,CAAC;QACnB,WAAW,CAAC,KAAK,CAAC;QAClB,YAAY,CAAC,KAAK,CAAC;QACnB,cAAc,CAAC,KAAK,CAAC;QACrB,WAAW,CAAC,KAAK,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CACrB,KAAc;IAEd,OAAO,CACL,qBAAqB,CAAC,KAAK,CAAC,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { checkNotNull } from "@infra-blocks/checks";
|
|
2
|
+
import { mapValues } from "es-toolkit/object";
|
|
3
|
+
import { mapIfDefined, unsetUndefined } from "./lib.js";
|
|
2
4
|
export const ConsumedCapacity = {
|
|
3
5
|
decode(output) {
|
|
4
|
-
return {
|
|
6
|
+
return unsetUndefined({
|
|
5
7
|
...CapacityUnits.decode(output),
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
.unwrap(),
|
|
12
|
-
};
|
|
8
|
+
tableName: checkNotNull(output.TableName),
|
|
9
|
+
table: mapIfDefined(output.Table, CapacityUnits.decode),
|
|
10
|
+
globalSecondaryIndexes: mapIfDefined(output.GlobalSecondaryIndexes, (gsis) => mapValues(gsis, CapacityUnits.decode)),
|
|
11
|
+
localSecondaryIndexes: mapIfDefined(output.LocalSecondaryIndexes, (lsis) => mapValues(lsis, CapacityUnits.decode)),
|
|
12
|
+
});
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
export const CapacityUnits = {
|
|
16
16
|
decode(output) {
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
return unsetUndefined({
|
|
18
|
+
capacityUnits: checkNotNull(output.CapacityUnits),
|
|
19
|
+
readCapacityUnits: output.ReadCapacityUnits,
|
|
20
|
+
writeCapacityUnits: output.WriteCapacityUnits,
|
|
21
|
+
});
|
|
22
22
|
},
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=consumed-capacity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consumed-capacity.js","sourceRoot":"","sources":["../../../../src/commands/outputs/consumed-capacity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"consumed-capacity.js","sourceRoot":"","sources":["../../../../src/commands/outputs/consumed-capacity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAexD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM,CAAC,MAA4B;QACjC,OAAO,cAAc,CAAC;YACpB,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;YAC/B,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC;YACzC,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC;YACvD,sBAAsB,EAAE,YAAY,CAClC,MAAM,CAAC,sBAAsB,EAC7B,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAChD;YACD,qBAAqB,EAAE,YAAY,CACjC,MAAM,CAAC,qBAAqB,EAC5B,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAChD;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AASF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM,CAAC,MAIN;QACC,OAAO,cAAc,CAAC;YACpB,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,aAAa,CAAC;YACjD,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;YAC3C,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;SAC9C,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { trusted } from "@infra-blocks/types";
|
|
2
|
+
import { mapIfDefined, unsetUndefined } from "./lib.js";
|
|
2
3
|
export const DeleteItemOutput = {
|
|
3
4
|
decode,
|
|
4
5
|
};
|
|
5
6
|
function decode(output) {
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
return unsetUndefined({
|
|
8
|
+
item: mapIfDefined(output.Attributes, (trusted)),
|
|
9
|
+
});
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=delete-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/delete-item.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/delete-item.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAIxD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,MAA2B;IAE3B,OAAO,cAAc,CAAC;QACpB,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,UAAU,EAAE,CAAA,OAAU,CAAA,CAAC;KAClD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { trusted } from "@infra-blocks/types";
|
|
1
2
|
import { ConsumedCapacity } from "./consumed-capacity.js";
|
|
2
|
-
import {
|
|
3
|
+
import { mapIfDefined, unsetUndefined } from "./lib.js";
|
|
3
4
|
export const GetItemOutput = {
|
|
4
5
|
decode,
|
|
5
6
|
};
|
|
6
7
|
function decode(output) {
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
return unsetUndefined({
|
|
9
|
+
item: mapIfDefined(output.Item, (trusted)),
|
|
10
|
+
consumedCapacity: mapIfDefined(output.ConsumedCapacity, ConsumedCapacity.decode),
|
|
11
|
+
});
|
|
11
12
|
}
|
|
12
13
|
//# sourceMappingURL=get-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/get-item.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/get-item.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAOxD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,MAAwB;IAExB,OAAO,cAAc,CAAC;QACpB,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA,OAAU,CAAA,CAAC;QAC3C,gBAAgB,EAAE,YAAY,CAC5B,MAAM,CAAC,gBAAgB,EACvB,gBAAgB,CAAC,MAAM,CACxB;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
[key in K]: NonNullable<T>;
|
|
5
|
-
}>;
|
|
6
|
-
map<K extends keyof A, T, R>(key: K, value: T, transform: Transform<T, R>): ObjectBuilder<A & {
|
|
7
|
-
[key in K]: R;
|
|
8
|
-
}>;
|
|
9
|
-
mapValuesIfNotNull<K extends keyof A, T extends Record<string, unknown>, R>(key: K, value: Nullable<T>, transform: Transform<T[keyof T], R>): ObjectBuilder<A & {
|
|
10
|
-
[key in K]?: {
|
|
11
|
-
[subKey in keyof T]: R;
|
|
12
|
-
};
|
|
13
|
-
}>;
|
|
14
|
-
mapIfNotNull<K extends keyof A, T, R>(key: K, value: Nullable<T>, transform: Transform<T, R>): ObjectBuilder<A & {
|
|
15
|
-
[key in K]?: R;
|
|
16
|
-
}>;
|
|
17
|
-
setIfNotNull<K extends keyof A, T>(key: K, value: T): ObjectBuilder<A & {
|
|
18
|
-
[key in K]?: T;
|
|
19
|
-
}>;
|
|
20
|
-
unwrap(): A;
|
|
21
|
-
};
|
|
22
|
-
export declare const ObjectBuilder: {
|
|
23
|
-
of<A extends Record<string, unknown>>(): ObjectBuilder<Partial<A>>;
|
|
24
|
-
};
|
|
1
|
+
import { type Transform } from "@infra-blocks/types";
|
|
2
|
+
export declare function unsetUndefined<O extends Record<PropertyKey, any>>(obj: O): O;
|
|
3
|
+
export declare function mapIfDefined<T, R>(value: T | undefined, transform: Transform<T, R>): R | undefined;
|
|
@@ -1,57 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
of() {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
function wrap(payload) {
|
|
9
|
-
return {
|
|
10
|
-
enforceNotNull(key, value) {
|
|
11
|
-
enforceNotNull(payload, key, value);
|
|
12
|
-
return trusted(this);
|
|
13
|
-
},
|
|
14
|
-
map(key, value, transform) {
|
|
15
|
-
map(payload, key, value, transform);
|
|
16
|
-
return trusted(this);
|
|
17
|
-
},
|
|
18
|
-
mapValuesIfNotNull(key, value, transform) {
|
|
19
|
-
mapValuesIfNotNull(payload, key, value, transform);
|
|
20
|
-
return trusted(this);
|
|
21
|
-
},
|
|
22
|
-
mapIfNotNull(key, value, transform) {
|
|
23
|
-
mapIfNotNull(payload, key, value, transform);
|
|
24
|
-
return trusted(this);
|
|
25
|
-
},
|
|
26
|
-
setIfNotNull(key, value) {
|
|
27
|
-
mapIfNotNull(payload, key, value, (v) => v);
|
|
28
|
-
return trusted(this);
|
|
29
|
-
},
|
|
30
|
-
unwrap: () => payload,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function mapValuesIfNotNull(acc, accKey, record, transform) {
|
|
34
|
-
if (record != null) {
|
|
35
|
-
acc[accKey] = {};
|
|
36
|
-
for (const [key, value] of Object.entries(record)) {
|
|
37
|
-
acc[accKey][key] = trusted(transform(trusted(value)));
|
|
1
|
+
import { isUndefined } from "@infra-blocks/types";
|
|
2
|
+
// biome-ignore lint/suspicious/noExplicitAny: Record<..., any> include interfaces. Record<..., unknown> doesn't.
|
|
3
|
+
export function unsetUndefined(obj) {
|
|
4
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
5
|
+
if (isUndefined(value)) {
|
|
6
|
+
delete obj[key];
|
|
38
7
|
}
|
|
39
8
|
}
|
|
40
|
-
return
|
|
41
|
-
}
|
|
42
|
-
function mapIfNotNull(acc, accKey, value, transform) {
|
|
43
|
-
if (value != null) {
|
|
44
|
-
acc[accKey] = trusted(transform(value));
|
|
45
|
-
}
|
|
46
|
-
return trusted(acc);
|
|
47
|
-
}
|
|
48
|
-
function map(acc, accKey, value, transform) {
|
|
49
|
-
acc[accKey] = trusted(transform(value));
|
|
50
|
-
return trusted(acc);
|
|
9
|
+
return obj;
|
|
51
10
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
acc[accKey] = trusted(value);
|
|
55
|
-
return trusted(acc);
|
|
11
|
+
export function mapIfDefined(value, transform) {
|
|
12
|
+
return value && transform(value);
|
|
56
13
|
}
|
|
57
14
|
//# sourceMappingURL=lib.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../../../src/commands/outputs/lib.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../../../src/commands/outputs/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,qBAAqB,CAAC;AAElE,iHAAiH;AACjH,MAAM,UAAU,cAAc,CAAqC,GAAM;IACvE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,KAAoB,EACpB,SAA0B;IAE1B,OAAO,KAAK,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { trusted } from "@infra-blocks/types";
|
|
2
|
+
import { mapIfDefined, unsetUndefined } from "./lib.js";
|
|
2
3
|
export const PutItemOutput = {
|
|
3
4
|
decode,
|
|
4
5
|
};
|
|
5
6
|
function decode(output) {
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
return unsetUndefined({
|
|
8
|
+
item: mapIfDefined(output.Attributes, (trusted)),
|
|
9
|
+
});
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=put-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"put-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/put-item.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"put-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/put-item.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAKxD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,MAAwB;IAExB,OAAO,cAAc,CAAC;QACpB,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,UAAU,EAAE,CAAA,OAAU,CAAA,CAAC;KAClD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { checkNotNull } from "@infra-blocks/checks";
|
|
1
2
|
import { trusted } from "@infra-blocks/types";
|
|
2
|
-
import {
|
|
3
|
+
import { mapIfDefined, unsetUndefined } from "./lib.js";
|
|
3
4
|
export const QueryOutput = {
|
|
4
5
|
decode,
|
|
5
6
|
};
|
|
6
7
|
function decode(output) {
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
return unsetUndefined({
|
|
9
|
+
count: checkNotNull(output.Count),
|
|
10
|
+
items: (output.Items ?? []),
|
|
11
|
+
scannedCount: checkNotNull(output.ScannedCount),
|
|
12
|
+
lastEvaluatedKey: mapIfDefined(output.LastEvaluatedKey, (trusted)),
|
|
13
|
+
});
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/outputs/query.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/outputs/query.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAYxD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CAGb,MAA0B;IAC1B,OAAO,cAAc,CAAC;QACpB,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC;QACjC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAa;QACvC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC;QAC/C,gBAAgB,EAAE,YAAY,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAA,OAAU,CAAA,CAAC;KACpE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { trusted } from "@infra-blocks/types";
|
|
2
|
+
import { mapIfDefined, unsetUndefined } from "./lib.js";
|
|
2
3
|
export const UpdateItemOutput = {
|
|
3
4
|
decode,
|
|
4
5
|
};
|
|
5
6
|
function decode(output) {
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
return unsetUndefined({
|
|
8
|
+
attributes: mapIfDefined(output.Attributes, (trusted)),
|
|
9
|
+
});
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=update-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/update-item.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-item.js","sourceRoot":"","sources":["../../../../src/commands/outputs/update-item.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAMxD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,MAA2B;IAE3B,OAAO,cAAc,CAAC;QACpB,UAAU,EAAE,YAAY,CAAC,MAAM,CAAC,UAAU,EAAE,CAAA,OAAU,CAAA,CAAC;KACxD,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infra-blocks/aws-dynamodb",
|
|
3
|
-
"version": "0.70.0",
|
|
3
|
+
"version": "0.70.1-alpha.0",
|
|
4
4
|
"description": "A convenience wrapper over @aws-sdk/client-dynamodb and @aws-sdk/lib-dynamodb.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -51,9 +51,8 @@
|
|
|
51
51
|
"c8": "^10.1.3",
|
|
52
52
|
"dotenv": "^17.0.1",
|
|
53
53
|
"lefthook": "^1.11.16",
|
|
54
|
-
"radash": "^12.1.1",
|
|
55
54
|
"tsx": "^4.20.3",
|
|
56
|
-
"typescript": "^5.
|
|
55
|
+
"typescript": "^5.9.3",
|
|
57
56
|
"zod": "^4.3.6"
|
|
58
57
|
},
|
|
59
58
|
"engines": {
|
|
@@ -67,6 +66,7 @@
|
|
|
67
66
|
"@infra-blocks/logger-interface": "^0.3.1",
|
|
68
67
|
"@infra-blocks/null-logger": "^0.1.1",
|
|
69
68
|
"@infra-blocks/retry": "^0.1.1",
|
|
70
|
-
"@infra-blocks/types": "^0.
|
|
69
|
+
"@infra-blocks/types": "^0.28.0",
|
|
70
|
+
"es-toolkit": "^1.45.0"
|
|
71
71
|
}
|
|
72
72
|
}
|