@kensio/yulin 1.10.4 → 1.11.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.
Files changed (120) hide show
  1. package/dist/config/lint/cff-js2-lint.fixture.d.ts.map +1 -1
  2. package/dist/config/lint/cff-js2-lint.fixture.js +23 -0
  3. package/dist/config/lint/cff-js2-lint.fixture.js.map +1 -1
  4. package/dist/config/lint/cff-js2-restriction.d.ts +5 -5
  5. package/dist/config/lint/cff-js2-restriction.d.ts.map +1 -1
  6. package/dist/config/lint/cff-js2-restriction.js +11 -5
  7. package/dist/config/lint/cff-js2-restriction.js.map +1 -1
  8. package/dist/sdk/router/resolve-sim-sdk-command-router.d.ts.map +1 -1
  9. package/dist/sdk/router/resolve-sim-sdk-command-router.js +3 -0
  10. package/dist/sdk/router/resolve-sim-sdk-command-router.js.map +1 -1
  11. package/dist/service/aws/sim-aws-account-region-scope.d.ts +9 -0
  12. package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
  13. package/dist/service/aws/sim-aws-account-region-scope.js +10 -0
  14. package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
  15. package/dist/service/aws/sim-aws-account.d.ts +5 -0
  16. package/dist/service/aws/sim-aws-account.d.ts.map +1 -1
  17. package/dist/service/aws/sim-aws-account.js +6 -0
  18. package/dist/service/aws/sim-aws-account.js.map +1 -1
  19. package/dist/service/aws/sim-aws-region.d.ts +5 -0
  20. package/dist/service/aws/sim-aws-region.d.ts.map +1 -1
  21. package/dist/service/aws/sim-aws-region.js +6 -0
  22. package/dist/service/aws/sim-aws-region.js.map +1 -1
  23. package/dist/service/aws/sim-aws-service-accessors.d.ts +5 -0
  24. package/dist/service/aws/sim-aws-service-accessors.d.ts.map +1 -1
  25. package/dist/service/aws/sim-aws-service-accessors.js +6 -0
  26. package/dist/service/aws/sim-aws-service-accessors.js.map +1 -1
  27. package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.d.ts +24 -0
  28. package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.d.ts.map +1 -0
  29. package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.js +43 -0
  30. package/dist/service/cloudfront/command/key-value-store/sim-cf-create-key-value-store.js.map +1 -0
  31. package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.d.ts +26 -0
  32. package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.d.ts.map +1 -0
  33. package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.js +40 -0
  34. package/dist/service/cloudfront/command/key-value-store/sim-cf-delete-key-value-store.js.map +1 -0
  35. package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.d.ts +24 -0
  36. package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.d.ts.map +1 -0
  37. package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.js +32 -0
  38. package/dist/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.js.map +1 -0
  39. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.d.ts +109 -0
  40. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.d.ts.map +1 -0
  41. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.js +12 -0
  42. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.js.map +1 -0
  43. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.d.ts +10 -0
  44. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.d.ts.map +1 -0
  45. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.js +17 -0
  46. package/dist/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.js.map +1 -0
  47. package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.d.ts +20 -0
  48. package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.d.ts.map +1 -0
  49. package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.js +34 -0
  50. package/dist/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.js.map +1 -0
  51. package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.d.ts +24 -0
  52. package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.d.ts.map +1 -0
  53. package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.js +35 -0
  54. package/dist/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.js.map +1 -0
  55. package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.d.ts +116 -0
  56. package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.d.ts.map +1 -0
  57. package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.js +12 -0
  58. package/dist/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.js.map +1 -0
  59. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.d.ts +22 -0
  60. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.d.ts.map +1 -0
  61. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.js +26 -0
  62. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-batch.js.map +1 -0
  63. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.d.ts +37 -0
  64. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.d.ts.map +1 -0
  65. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.js +67 -0
  66. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.js.map +1 -0
  67. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.d.ts +43 -0
  68. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.d.ts.map +1 -0
  69. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.js +81 -0
  70. package/dist/service/cloudfront/command/key-value-store-data/sim-kvs-key-writes.js.map +1 -0
  71. package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts +63 -0
  72. package/dist/service/cloudfront/error/sim-cloudfront.error.d.ts.map +1 -1
  73. package/dist/service/cloudfront/error/sim-cloudfront.error.js +75 -0
  74. package/dist/service/cloudfront/error/sim-cloudfront.error.js.map +1 -1
  75. package/dist/service/cloudfront/index.d.ts +3 -0
  76. package/dist/service/cloudfront/index.d.ts.map +1 -1
  77. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.d.ts +57 -0
  78. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.d.ts.map +1 -0
  79. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.js +72 -0
  80. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-access.js.map +1 -0
  81. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.d.ts +51 -0
  82. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.d.ts.map +1 -0
  83. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.js +65 -0
  84. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-commands.js.map +1 -0
  85. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.d.ts +72 -0
  86. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.d.ts.map +1 -0
  87. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.js +94 -0
  88. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-keys.js.map +1 -0
  89. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.d.ts +59 -0
  90. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.d.ts.map +1 -0
  91. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.js +92 -0
  92. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-registry.js.map +1 -0
  93. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.d.ts +22 -0
  94. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.d.ts.map +1 -0
  95. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.js +7 -0
  96. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store-users.js.map +1 -0
  97. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.d.ts +141 -0
  98. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.d.ts.map +1 -0
  99. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.js +180 -0
  100. package/dist/service/cloudfront/key-value-store/sim-cf-key-value-store.js.map +1 -0
  101. package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.d.ts +24 -0
  102. package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.d.ts.map +1 -0
  103. package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.js +54 -0
  104. package/dist/service/cloudfront/sdk/sim-cf-key-value-store-sdk-command-router.js.map +1 -0
  105. package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.d.ts.map +1 -1
  106. package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.js +30 -0
  107. package/dist/service/cloudfront/sdk/sim-cloudfront-sdk-command-router.js.map +1 -1
  108. package/dist/service/cloudfront/sim-cloudfront-commands.d.ts +10 -0
  109. package/dist/service/cloudfront/sim-cloudfront-commands.d.ts.map +1 -1
  110. package/dist/service/cloudfront/sim-cloudfront-commands.js +22 -0
  111. package/dist/service/cloudfront/sim-cloudfront-commands.js.map +1 -1
  112. package/dist/service/cloudfront/sim-cloudfront-key-value-store.d.ts +58 -0
  113. package/dist/service/cloudfront/sim-cloudfront-key-value-store.d.ts.map +1 -0
  114. package/dist/service/cloudfront/sim-cloudfront-key-value-store.js +68 -0
  115. package/dist/service/cloudfront/sim-cloudfront-key-value-store.js.map +1 -0
  116. package/dist/service/cloudfront/sim-cloudfront.d.ts +13 -0
  117. package/dist/service/cloudfront/sim-cloudfront.d.ts.map +1 -1
  118. package/dist/service/cloudfront/sim-cloudfront.js +15 -0
  119. package/dist/service/cloudfront/sim-cloudfront.js.map +1 -1
  120. package/package.json +3 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-describe-key-value-store.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAEvG,OAAO,KAAK,EACV,+BAA+B,EAC/B,qCAAqC,EACtC,MAAM,2CAA2C,CAAC;AAEnD;;;;;;;;GAQG;AACH,qBAAa,0BAA0B;IAGzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAsC;IAEpE,YAA6B,MAAM,EAAE,wBAAwB,EAAI;IAEjE;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,+BAA+B,EACxC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE,GAC3C,OAAO,CAAC,qCAAqC,CAAC,CAmBhD;CACF"}
@@ -0,0 +1,32 @@
1
+ import { assertDefined } from "../../../../util/type-guard/defined.js";
2
+ import { simCfKeyValueStoreSummary } from "./sim-cf-key-value-store-summary.js";
3
+ /**
4
+ * Simulated CloudFront DescribeKeyValueStore command.
5
+ *
6
+ * This is the CloudFront client's describe, which answers with the resource
7
+ * and its ETag. The key value store client has a command of the same name that
8
+ * answers with the data instead: item count, size and status.
9
+ *
10
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/DescribeKeyValueStoreCommand/
11
+ */
12
+ export class SimCfDescribeKeyValueStore {
13
+ access;
14
+ static action = "cloudfront:DescribeKeyValueStore";
15
+ constructor(access) {
16
+ this.access = access;
17
+ }
18
+ /**
19
+ * Describe a sim CloudFront key value store.
20
+ */
21
+ async handle(command, options) {
22
+ assertDefined(command.input.Name, "DescribeKeyValueStoreCommand.input.Name");
23
+ await this.access.background.sequence();
24
+ const store = this.access.authorizedByName(SimCfDescribeKeyValueStore.action, command.input.Name, options?.caller);
25
+ return {
26
+ $metadata: {},
27
+ KeyValueStore: simCfKeyValueStoreSummary(store),
28
+ ETag: store.resourceETag,
29
+ };
30
+ }
31
+ }
32
+ //# sourceMappingURL=sim-cf-describe-key-value-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-describe-key-value-store.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-describe-key-value-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAMhF;;;;;;;;GAQG;AACH,MAAM,OAAO,0BAA0B;IAGR,MAAM;IAF3B,MAAM,CAAU,MAAM,GAAG,kCAAkC,CAAC;IAEpE,YAA6B,MAAgC;sBAAhC,MAAM;IAA6B,CAAC;IAEjE;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAwC,EACxC,OAA4C;QAE5C,aAAa,CACX,OAAO,CAAC,KAAK,CAAC,IAAI,EAClB,yCAAyC,CAC1C,CAAC;QAEF,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAExC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CACxC,0BAA0B,CAAC,MAAM,EACjC,OAAO,CAAC,KAAK,CAAC,IAAI,EAClB,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,EAAE;YACb,aAAa,EAAE,yBAAyB,CAAC,KAAK,CAAC;YAC/C,IAAI,EAAE,KAAK,CAAC,YAAY;SACzB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Structural types for the key value store commands on the CloudFront client.
3
+ *
4
+ * These are the commands that own the resource. They address a store by name,
5
+ * which is what the CloudFront client takes. The commands that read and write
6
+ * the keys are a separate client addressing a store by ARN, and their types
7
+ * live beside them under `command/key-value-store-data/`.
8
+ *
9
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/
10
+ */
11
+ import type { SimArn } from "../../../aws/arn.js";
12
+ import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
13
+ /**
14
+ * Minimal structural sim CloudFront key value store summary.
15
+ */
16
+ export interface SimCfKeyValueStoreSummary {
17
+ Id: string;
18
+ Name: string;
19
+ Comment: string | undefined;
20
+ ARN: SimArn;
21
+ Status: string;
22
+ LastModifiedTime: Date;
23
+ }
24
+ /**
25
+ * Minimal structural sim CloudFront CreateKeyValueStore command.
26
+ */
27
+ export interface SimCreateKeyValueStoreCommand {
28
+ readonly input: {
29
+ readonly Name?: string | undefined;
30
+ readonly Comment?: string | undefined;
31
+ };
32
+ }
33
+ /**
34
+ * Minimal structural sim CloudFront CreateKeyValueStore output.
35
+ */
36
+ export interface SimCreateKeyValueStoreCommandOutput {
37
+ readonly $metadata: SimResponseMetadata;
38
+ KeyValueStore: SimCfKeyValueStoreSummary;
39
+ ETag: string;
40
+ Location: string;
41
+ }
42
+ /**
43
+ * Minimal structural sim CloudFront DescribeKeyValueStore command.
44
+ */
45
+ export interface SimDescribeKeyValueStoreCommand {
46
+ readonly input: {
47
+ readonly Name?: string | undefined;
48
+ };
49
+ }
50
+ /**
51
+ * Minimal structural sim CloudFront DescribeKeyValueStore output.
52
+ */
53
+ export interface SimDescribeKeyValueStoreCommandOutput {
54
+ readonly $metadata: SimResponseMetadata;
55
+ KeyValueStore: SimCfKeyValueStoreSummary;
56
+ ETag: string;
57
+ }
58
+ /**
59
+ * Minimal structural sim CloudFront ListKeyValueStores command.
60
+ */
61
+ export interface SimListKeyValueStoresCommand {
62
+ readonly input: {
63
+ readonly Status?: string | undefined;
64
+ };
65
+ }
66
+ /**
67
+ * Minimal structural sim CloudFront ListKeyValueStores output.
68
+ */
69
+ export interface SimListKeyValueStoresCommandOutput {
70
+ readonly $metadata: SimResponseMetadata;
71
+ KeyValueStoreList: {
72
+ Quantity: number;
73
+ Items: SimCfKeyValueStoreSummary[];
74
+ };
75
+ }
76
+ /**
77
+ * Minimal structural sim CloudFront UpdateKeyValueStore command.
78
+ */
79
+ export interface SimUpdateKeyValueStoreCommand {
80
+ readonly input: {
81
+ readonly Name?: string | undefined;
82
+ readonly Comment?: string | undefined;
83
+ readonly IfMatch?: string | undefined;
84
+ };
85
+ }
86
+ /**
87
+ * Minimal structural sim CloudFront UpdateKeyValueStore output.
88
+ */
89
+ export interface SimUpdateKeyValueStoreCommandOutput {
90
+ readonly $metadata: SimResponseMetadata;
91
+ KeyValueStore: SimCfKeyValueStoreSummary;
92
+ ETag: string;
93
+ }
94
+ /**
95
+ * Minimal structural sim CloudFront DeleteKeyValueStore command.
96
+ */
97
+ export interface SimDeleteKeyValueStoreCommand {
98
+ readonly input: {
99
+ readonly Name?: string | undefined;
100
+ readonly IfMatch?: string | undefined;
101
+ };
102
+ }
103
+ /**
104
+ * Minimal structural sim CloudFront DeleteKeyValueStore output.
105
+ */
106
+ export interface SimDeleteKeyValueStoreCommandOutput {
107
+ readonly $metadata: SimResponseMetadata;
108
+ }
109
+ //# sourceMappingURL=sim-cf-key-value-store-command.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-key-value-store-command.types.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACvC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC,aAAa,EAAE,yBAAyB,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACpC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACpD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC,aAAa,EAAE,yBAAyB,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACtC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC,iBAAiB,EAAE;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,yBAAyB,EAAE,CAAC;KACpC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACvC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;IACxC,aAAa,EAAE,yBAAyB,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACvC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Structural types for the key value store commands on the CloudFront client.
3
+ *
4
+ * These are the commands that own the resource. They address a store by name,
5
+ * which is what the CloudFront client takes. The commands that read and write
6
+ * the keys are a separate client addressing a store by ARN, and their types
7
+ * live beside them under `command/key-value-store-data/`.
8
+ *
9
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=sim-cf-key-value-store-command.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-key-value-store-command.types.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-key-value-store-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
@@ -0,0 +1,10 @@
1
+ import type { SimCloudFrontKeyValueStore } from "../../key-value-store/sim-cf-key-value-store.js";
2
+ import type { SimCfKeyValueStoreSummary } from "./sim-cf-key-value-store-command.types.js";
3
+ /**
4
+ * Describe a key value store the way every CloudFront client command does.
5
+ *
6
+ * Create, Describe, List and Update all answer with the same summary shape, so
7
+ * it is built in one place rather than four.
8
+ */
9
+ export declare function simCfKeyValueStoreSummary(store: SimCloudFrontKeyValueStore): SimCfKeyValueStoreSummary;
10
+ //# sourceMappingURL=sim-cf-key-value-store-summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-key-value-store-summary.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAClG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAE3F;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,0BAA0B,GAChC,yBAAyB,CAS3B"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Describe a key value store the way every CloudFront client command does.
3
+ *
4
+ * Create, Describe, List and Update all answer with the same summary shape, so
5
+ * it is built in one place rather than four.
6
+ */
7
+ export function simCfKeyValueStoreSummary(store) {
8
+ return {
9
+ Id: store.id,
10
+ Name: store.name,
11
+ Comment: store.comment,
12
+ ARN: store.arn,
13
+ Status: store.status,
14
+ LastModifiedTime: store.lastModifiedTime,
15
+ };
16
+ }
17
+ //# sourceMappingURL=sim-cf-key-value-store-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-key-value-store-summary.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-key-value-store-summary.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAiC;IAEjC,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,GAAG,EAAE,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;KACzC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
2
+ import type { SimCfKeyValueStoreAccess } from "../../key-value-store/sim-cf-key-value-store-access.js";
3
+ import type { SimListKeyValueStoresCommand, SimListKeyValueStoresCommandOutput } from "./sim-cf-key-value-store-command.types.js";
4
+ /**
5
+ * Simulated CloudFront ListKeyValueStores command.
6
+ *
7
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/ListKeyValueStoresCommand/
8
+ */
9
+ export declare class SimCfListKeyValueStores {
10
+ private readonly access;
11
+ private static readonly action;
12
+ constructor(access: SimCfKeyValueStoreAccess);
13
+ /**
14
+ * List this Account's sim CloudFront key value stores.
15
+ */
16
+ handle(command: SimListKeyValueStoresCommand, options?: {
17
+ readonly caller?: SimAwsCaller;
18
+ }): Promise<SimListKeyValueStoresCommandOutput>;
19
+ }
20
+ //# sourceMappingURL=sim-cf-list-key-value-stores.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-list-key-value-stores.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAEvG,OAAO,KAAK,EACV,4BAA4B,EAC5B,kCAAkC,EACnC,MAAM,2CAA2C,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,uBAAuB;IAGtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAEjE,YAA6B,MAAM,EAAE,wBAAwB,EAAI;IAEjE;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE,GAC3C,OAAO,CAAC,kCAAkC,CAAC,CAsB7C;CACF"}
@@ -0,0 +1,34 @@
1
+ import { simCfKeyValueStoreSummary } from "./sim-cf-key-value-store-summary.js";
2
+ /**
3
+ * Simulated CloudFront ListKeyValueStores command.
4
+ *
5
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/ListKeyValueStoresCommand/
6
+ */
7
+ export class SimCfListKeyValueStores {
8
+ access;
9
+ static action = "cloudfront:ListKeyValueStores";
10
+ constructor(access) {
11
+ this.access = access;
12
+ }
13
+ /**
14
+ * List this Account's sim CloudFront key value stores.
15
+ */
16
+ async handle(command, options) {
17
+ await this.access.background.sequence();
18
+ // Listing is authorized across the Account rather than per store, which is
19
+ // what a policy for this action grants.
20
+ this.access.authorizeAnyStore(SimCfListKeyValueStores.action, options?.caller);
21
+ const status = command.input.Status;
22
+ const stores = this.access.stores
23
+ .all()
24
+ .filter((store) => status === undefined || store.status === status);
25
+ return {
26
+ $metadata: {},
27
+ KeyValueStoreList: {
28
+ Quantity: stores.length,
29
+ Items: stores.map((store) => simCfKeyValueStoreSummary(store)),
30
+ },
31
+ };
32
+ }
33
+ }
34
+ //# sourceMappingURL=sim-cf-list-key-value-stores.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-list-key-value-stores.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-list-key-value-stores.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAMhF;;;;GAIG;AACH,MAAM,OAAO,uBAAuB;IAGL,MAAM;IAF3B,MAAM,CAAU,MAAM,GAAG,+BAA+B,CAAC;IAEjE,YAA6B,MAAgC;sBAAhC,MAAM;IAA6B,CAAC;IAEjE;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAqC,EACrC,OAA4C;QAE5C,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAExC,2EAA2E;QAC3E,wCAAwC;QACxC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAC3B,uBAAuB,CAAC,MAAM,EAC9B,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM;aAC9B,GAAG,EAAE;aACL,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;QAEtE,OAAO;YACL,SAAS,EAAE,EAAE;YACb,iBAAiB,EAAE;gBACjB,QAAQ,EAAE,MAAM,CAAC,MAAM;gBACvB,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC;aAC/D;SACF,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,24 @@
1
+ import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
2
+ import type { SimCfKeyValueStoreAccess } from "../../key-value-store/sim-cf-key-value-store-access.js";
3
+ import type { SimUpdateKeyValueStoreCommand, SimUpdateKeyValueStoreCommandOutput } from "./sim-cf-key-value-store-command.types.js";
4
+ /**
5
+ * Simulated CloudFront UpdateKeyValueStore command.
6
+ *
7
+ * Only the comment can be changed. The name identifies the store in this API,
8
+ * so it is what the command looks the store up by rather than something the
9
+ * command can set.
10
+ *
11
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/UpdateKeyValueStoreCommand/
12
+ */
13
+ export declare class SimCfUpdateKeyValueStore {
14
+ private readonly access;
15
+ private static readonly action;
16
+ constructor(access: SimCfKeyValueStoreAccess);
17
+ /**
18
+ * Update a sim CloudFront key value store's comment.
19
+ */
20
+ handle(command: SimUpdateKeyValueStoreCommand, options?: {
21
+ readonly caller?: SimAwsCaller;
22
+ }): Promise<SimUpdateKeyValueStoreCommandOutput>;
23
+ }
24
+ //# sourceMappingURL=sim-cf-update-key-value-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-update-key-value-store.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAEvG,OAAO,KAAK,EACV,6BAA6B,EAC7B,mCAAmC,EACpC,MAAM,2CAA2C,CAAC;AAEnD;;;;;;;;GAQG;AACH,qBAAa,wBAAwB;IAGvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAElE,YAA6B,MAAM,EAAE,wBAAwB,EAAI;IAEjE;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,6BAA6B,EACtC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;KAAE,GAC3C,OAAO,CAAC,mCAAmC,CAAC,CAuB9C;CACF"}
@@ -0,0 +1,35 @@
1
+ import { assertDefined } from "../../../../util/type-guard/defined.js";
2
+ import { simCfKeyValueStoreSummary } from "./sim-cf-key-value-store-summary.js";
3
+ /**
4
+ * Simulated CloudFront UpdateKeyValueStore command.
5
+ *
6
+ * Only the comment can be changed. The name identifies the store in this API,
7
+ * so it is what the command looks the store up by rather than something the
8
+ * command can set.
9
+ *
10
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/UpdateKeyValueStoreCommand/
11
+ */
12
+ export class SimCfUpdateKeyValueStore {
13
+ access;
14
+ static action = "cloudfront:UpdateKeyValueStore";
15
+ constructor(access) {
16
+ this.access = access;
17
+ }
18
+ /**
19
+ * Update a sim CloudFront key value store's comment.
20
+ */
21
+ async handle(command, options) {
22
+ assertDefined(command.input.Name, "UpdateKeyValueStoreCommand.input.Name");
23
+ assertDefined(command.input.IfMatch, "UpdateKeyValueStoreCommand.input.IfMatch");
24
+ await this.access.background.sequence();
25
+ const store = this.access.authorizedByName(SimCfUpdateKeyValueStore.action, command.input.Name, options?.caller);
26
+ store.assertResourceETag(command.input.IfMatch);
27
+ store.update({ comment: command.input.Comment });
28
+ return {
29
+ $metadata: {},
30
+ KeyValueStore: simCfKeyValueStoreSummary(store),
31
+ ETag: store.resourceETag,
32
+ };
33
+ }
34
+ }
35
+ //# sourceMappingURL=sim-cf-update-key-value-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-update-key-value-store.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store/sim-cf-update-key-value-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAMhF;;;;;;;;GAQG;AACH,MAAM,OAAO,wBAAwB;IAGN,MAAM;IAF3B,MAAM,CAAU,MAAM,GAAG,gCAAgC,CAAC;IAElE,YAA6B,MAAgC;sBAAhC,MAAM;IAA6B,CAAC;IAEjE;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAsC,EACtC,OAA4C;QAE5C,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,uCAAuC,CAAC,CAAC;QAC3E,aAAa,CACX,OAAO,CAAC,KAAK,CAAC,OAAO,EACrB,0CAA0C,CAC3C,CAAC;QAEF,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAExC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CACxC,wBAAwB,CAAC,MAAM,EAC/B,OAAO,CAAC,KAAK,CAAC,IAAI,EAClB,OAAO,EAAE,MAAM,CAChB,CAAC;QAEF,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChD,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAEjD,OAAO;YACL,SAAS,EAAE,EAAE;YACb,aAAa,EAAE,yBAAyB,CAAC,KAAK,CAAC;YAC/C,IAAI,EAAE,KAAK,CAAC,YAAY;SACzB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Structural types for the commands on the key value store data client.
3
+ *
4
+ * These are the commands that read and write the keys. They are a separate AWS
5
+ * SDK client from CloudFront's own, and they address a store by ARN rather
6
+ * than by name. The commands that own the resource live beside them under
7
+ * `command/key-value-store/`.
8
+ *
9
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront-keyvaluestore/
10
+ */
11
+ import type { SimResponseMetadata } from "../../../aws/metadata/response-metadata.type.js";
12
+ /**
13
+ * What every write answers with: the store's new size and ETag.
14
+ */
15
+ export interface SimCfKeyValueStoreWriteOutput {
16
+ readonly $metadata: SimResponseMetadata;
17
+ ItemCount: number;
18
+ TotalSizeInBytes: number;
19
+ ETag: string;
20
+ }
21
+ /**
22
+ * Minimal structural sim key value store DescribeKeyValueStore command.
23
+ */
24
+ export interface SimKvsDescribeKeyValueStoreCommand {
25
+ readonly input: {
26
+ readonly KvsARN?: string | undefined;
27
+ };
28
+ }
29
+ /**
30
+ * Minimal structural sim key value store DescribeKeyValueStore output.
31
+ */
32
+ export interface SimKvsDescribeKeyValueStoreCommandOutput {
33
+ readonly $metadata: SimResponseMetadata;
34
+ KvsARN: string;
35
+ Created: Date;
36
+ LastModified: Date;
37
+ Status: string;
38
+ ItemCount: number;
39
+ TotalSizeInBytes: number;
40
+ ETag: string;
41
+ }
42
+ /**
43
+ * Minimal structural sim key value store GetKey command.
44
+ */
45
+ export interface SimKvsGetKeyCommand {
46
+ readonly input: {
47
+ readonly KvsARN?: string | undefined;
48
+ readonly Key?: string | undefined;
49
+ };
50
+ }
51
+ /**
52
+ * Minimal structural sim key value store GetKey output.
53
+ */
54
+ export interface SimKvsGetKeyCommandOutput {
55
+ readonly $metadata: SimResponseMetadata;
56
+ Key: string;
57
+ Value: string;
58
+ ItemCount: number;
59
+ TotalSizeInBytes: number;
60
+ }
61
+ /**
62
+ * Minimal structural sim key value store PutKey command.
63
+ */
64
+ export interface SimKvsPutKeyCommand {
65
+ readonly input: {
66
+ readonly KvsARN?: string | undefined;
67
+ readonly Key?: string | undefined;
68
+ readonly Value?: string | undefined;
69
+ readonly IfMatch?: string | undefined;
70
+ };
71
+ }
72
+ /**
73
+ * Minimal structural sim key value store DeleteKey command.
74
+ */
75
+ export interface SimKvsDeleteKeyCommand {
76
+ readonly input: {
77
+ readonly KvsARN?: string | undefined;
78
+ readonly Key?: string | undefined;
79
+ readonly IfMatch?: string | undefined;
80
+ };
81
+ }
82
+ /**
83
+ * Minimal structural sim key value store ListKeys command.
84
+ */
85
+ export interface SimKvsListKeysCommand {
86
+ readonly input: {
87
+ readonly KvsARN?: string | undefined;
88
+ };
89
+ }
90
+ /**
91
+ * Minimal structural sim key value store ListKeys output.
92
+ */
93
+ export interface SimKvsListKeysCommandOutput {
94
+ readonly $metadata: SimResponseMetadata;
95
+ Items: {
96
+ Key: string;
97
+ Value: string;
98
+ }[];
99
+ }
100
+ /**
101
+ * Minimal structural sim key value store UpdateKeys command.
102
+ */
103
+ export interface SimKvsUpdateKeysCommand {
104
+ readonly input: {
105
+ readonly KvsARN?: string | undefined;
106
+ readonly IfMatch?: string | undefined;
107
+ readonly Puts?: readonly {
108
+ Key: string | undefined;
109
+ Value: string | undefined;
110
+ }[] | undefined;
111
+ readonly Deletes?: readonly {
112
+ Key: string | undefined;
113
+ }[] | undefined;
114
+ };
115
+ }
116
+ //# sourceMappingURL=sim-cf-key-value-store-data-command.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-key-value-store-data-command.types.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Structural types for the commands on the key value store data client.
3
+ *
4
+ * These are the commands that read and write the keys. They are a separate AWS
5
+ * SDK client from CloudFront's own, and they address a store by ARN rather
6
+ * than by name. The commands that own the resource live beside them under
7
+ * `command/key-value-store/`.
8
+ *
9
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront-keyvaluestore/
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=sim-cf-key-value-store-data-command.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-cf-key-value-store-data-command.types.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-cf-key-value-store-data-command.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
@@ -0,0 +1,22 @@
1
+ import type { SimKvsUpdateKeysCommand } from "./sim-cf-key-value-store-data-command.types.js";
2
+ type UpdateKeysInput = SimKvsUpdateKeysCommand["input"];
3
+ /**
4
+ * Read the puts out of an UpdateKeys batch, refusing an incomplete pair.
5
+ *
6
+ * The SDK types a batch entry's key and value as `string | undefined` even
7
+ * though both are required, so an entry missing either reaches here as a
8
+ * well-typed value. Refusing it is what stops a key being written as the string
9
+ * "undefined".
10
+ */
11
+ export declare function kvsBatchPuts(input: UpdateKeysInput): readonly {
12
+ Key: string;
13
+ Value: string;
14
+ }[];
15
+ /**
16
+ * Read the deletes out of an UpdateKeys batch, refusing one with no key.
17
+ */
18
+ export declare function kvsBatchDeletes(input: UpdateKeysInput): readonly {
19
+ Key: string;
20
+ }[];
21
+ export {};
22
+ //# sourceMappingURL=sim-kvs-batch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-kvs-batch.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-kvs-batch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAE9F,KAAK,eAAe,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAExD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,eAAe,GACrB,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAa3C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,eAAe,GACrB,SAAS;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,CAS5B"}
@@ -0,0 +1,26 @@
1
+ import { assertDefined } from "../../../../util/type-guard/defined.js";
2
+ /**
3
+ * Read the puts out of an UpdateKeys batch, refusing an incomplete pair.
4
+ *
5
+ * The SDK types a batch entry's key and value as `string | undefined` even
6
+ * though both are required, so an entry missing either reaches here as a
7
+ * well-typed value. Refusing it is what stops a key being written as the string
8
+ * "undefined".
9
+ */
10
+ export function kvsBatchPuts(input) {
11
+ return (input.Puts ?? []).map((put, index) => {
12
+ assertDefined(put.Key, `UpdateKeysCommand.input.Puts[${String(index)}].Key`);
13
+ assertDefined(put.Value, `UpdateKeysCommand.input.Puts[${String(index)}].Value`);
14
+ return { Key: put.Key, Value: put.Value };
15
+ });
16
+ }
17
+ /**
18
+ * Read the deletes out of an UpdateKeys batch, refusing one with no key.
19
+ */
20
+ export function kvsBatchDeletes(input) {
21
+ return (input.Deletes ?? []).map((remove, index) => {
22
+ assertDefined(remove.Key, `UpdateKeysCommand.input.Deletes[${String(index)}].Key`);
23
+ return { Key: remove.Key };
24
+ });
25
+ }
26
+ //# sourceMappingURL=sim-kvs-batch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-kvs-batch.js","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-kvs-batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAKvE;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAsB;IAEtB,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QAC3C,aAAa,CACX,GAAG,CAAC,GAAG,EACP,gCAAgC,MAAM,CAAC,KAAK,CAAC,OAAO,CACrD,CAAC;QACF,aAAa,CACX,GAAG,CAAC,KAAK,EACT,gCAAgC,MAAM,CAAC,KAAK,CAAC,SAAS,CACvD,CAAC;QAEF,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAsB;IAEtB,OAAO,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACjD,aAAa,CACX,MAAM,CAAC,GAAG,EACV,mCAAmC,MAAM,CAAC,KAAK,CAAC,OAAO,CACxD,CAAC;QAEF,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { SimAwsCaller } from "../../../aws/caller/sim-aws-caller.js";
2
+ import type { SimCfKeyValueStoreAccess } from "../../key-value-store/sim-cf-key-value-store-access.js";
3
+ import type { SimKvsDescribeKeyValueStoreCommand, SimKvsDescribeKeyValueStoreCommandOutput, SimKvsGetKeyCommand, SimKvsGetKeyCommandOutput, SimKvsListKeysCommand, SimKvsListKeysCommandOutput } from "./sim-cf-key-value-store-data-command.types.js";
4
+ interface ReadOptions {
5
+ readonly caller?: SimAwsCaller;
6
+ }
7
+ /**
8
+ * The commands that read a key value store without changing it.
9
+ *
10
+ * None of them take an IfMatch, since nothing is being overwritten.
11
+ *
12
+ * https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront-keyvaluestore/
13
+ */
14
+ export declare class SimKvsKeyReads {
15
+ private readonly access;
16
+ private static readonly getAction;
17
+ private static readonly listAction;
18
+ private static readonly describeAction;
19
+ constructor(access: SimCfKeyValueStoreAccess);
20
+ /**
21
+ * Read one key, refusing one the store does not hold.
22
+ */
23
+ getKey(command: SimKvsGetKeyCommand, options?: ReadOptions): Promise<SimKvsGetKeyCommandOutput>;
24
+ /**
25
+ * List every key and value the store holds.
26
+ */
27
+ listKeys(command: SimKvsListKeysCommand, options?: ReadOptions): Promise<SimKvsListKeysCommandOutput>;
28
+ /**
29
+ * Describe the store's data: how much of it there is, and its status.
30
+ *
31
+ * The CloudFront client has a command of this name too, answering with the
32
+ * resource rather than the data.
33
+ */
34
+ describeKeyValueStore(command: SimKvsDescribeKeyValueStoreCommand, options?: ReadOptions): Promise<SimKvsDescribeKeyValueStoreCommandOutput>;
35
+ }
36
+ export {};
37
+ //# sourceMappingURL=sim-kvs-key-reads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-kvs-key-reads.d.ts","sourceRoot":"","sources":["../../../../../src/service/cloudfront/command/key-value-store-data/sim-kvs-key-reads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AACvG,OAAO,KAAK,EACV,kCAAkC,EAClC,wCAAwC,EACxC,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,gDAAgD,CAAC;AAExD,UAAU,WAAW;IACnB,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;CAChC;AAED;;;;;;GAMG;AACH,qBAAa,cAAc;IAMb,OAAO,CAAC,QAAQ,CAAC,MAAM;IALnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAqC;IACtE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAuC;IACzE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CACa;IAEnD,YAA6B,MAAM,EAAE,wBAAwB,EAAI;IAEjE;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,yBAAyB,CAAC,CAmBpC;IAED;;OAEG;IACG,QAAQ,CACZ,OAAO,EAAE,qBAAqB,EAC9B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,2BAA2B,CAAC,CAetC;IAED;;;;;OAKG;IACG,qBAAqB,CACzB,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,wCAAwC,CAAC,CAwBnD;CACF"}