@effect-aws/client-iot-wireless 1.10.9 → 2.0.0-beta.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 (37) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -3
  3. package/dist/dts/IoTWirelessClientInstance.d.ts +2 -2
  4. package/dist/dts/IoTWirelessClientInstance.d.ts.map +1 -1
  5. package/dist/dts/IoTWirelessService.d.ts +114 -116
  6. package/dist/dts/IoTWirelessService.d.ts.map +1 -1
  7. package/dist/dts/IoTWirelessServiceConfig.d.ts.map +1 -1
  8. package/dist/esm/IoTWirelessClientInstance.js +3 -3
  9. package/dist/esm/IoTWirelessClientInstance.js.map +1 -1
  10. package/dist/esm/IoTWirelessService.js +2 -2
  11. package/dist/esm/IoTWirelessService.js.map +1 -1
  12. package/dist/esm/IoTWirelessServiceConfig.js +5 -6
  13. package/dist/esm/IoTWirelessServiceConfig.js.map +1 -1
  14. package/package.json +8 -14
  15. package/src/IoTWirelessClientInstance.ts +4 -4
  16. package/src/IoTWirelessService.ts +115 -115
  17. package/src/IoTWirelessServiceConfig.ts +6 -7
  18. package/dist/cjs/Errors.d.ts +0 -14
  19. package/dist/cjs/Errors.d.ts.map +0 -1
  20. package/dist/cjs/Errors.js +0 -13
  21. package/dist/cjs/Errors.js.map +0 -1
  22. package/dist/cjs/IoTWirelessClientInstance.d.ts +0 -24
  23. package/dist/cjs/IoTWirelessClientInstance.d.ts.map +0 -1
  24. package/dist/cjs/IoTWirelessClientInstance.js +0 -50
  25. package/dist/cjs/IoTWirelessClientInstance.js.map +0 -1
  26. package/dist/cjs/IoTWirelessService.d.ts +0 -494
  27. package/dist/cjs/IoTWirelessService.d.ts.map +0 -1
  28. package/dist/cjs/IoTWirelessService.js +0 -171
  29. package/dist/cjs/IoTWirelessService.js.map +0 -1
  30. package/dist/cjs/IoTWirelessServiceConfig.d.ts +0 -25
  31. package/dist/cjs/IoTWirelessServiceConfig.d.ts.map +0 -1
  32. package/dist/cjs/IoTWirelessServiceConfig.js +0 -35
  33. package/dist/cjs/IoTWirelessServiceConfig.js.map +0 -1
  34. package/dist/cjs/index.d.ts +0 -44
  35. package/dist/cjs/index.d.ts.map +0 -1
  36. package/dist/cjs/index.js +0 -56
  37. package/dist/cjs/index.js.map +0 -1
@@ -3,18 +3,17 @@
3
3
  */
4
4
  import type { IoTWirelessClientConfig } from "@aws-sdk/client-iot-wireless";
5
5
  import { ServiceLogger } from "@effect-aws/commons";
6
- import { Effect, FiberRef, Layer } from "effect";
6
+ import { Effect, Layer, ServiceMap } from "effect";
7
7
  import { dual } from "effect/Function";
8
- import { globalValue } from "effect/GlobalValue";
9
8
  import type { IoTWirelessService } from "./IoTWirelessService.js";
10
9
 
11
10
  /**
12
11
  * @since 1.0.0
13
12
  * @category iot-wireless service config
14
13
  */
15
- const currentIoTWirelessServiceConfig = globalValue(
14
+ const currentIoTWirelessServiceConfig = ServiceMap.Reference<IoTWirelessService.Config>(
16
15
  "@effect-aws/client-iot-wireless/currentIoTWirelessServiceConfig",
17
- () => FiberRef.unsafeMake<IoTWirelessService.Config>({}),
16
+ { defaultValue: () => ({}) },
18
17
  );
19
18
 
20
19
  /**
@@ -27,7 +26,7 @@ export const withIoTWirelessServiceConfig: {
27
26
  } = dual(
28
27
  2,
29
28
  <A, E, R>(effect: Effect.Effect<A, E, R>, config: IoTWirelessService.Config): Effect.Effect<A, E, R> =>
30
- Effect.locally(effect, currentIoTWirelessServiceConfig, config),
29
+ Effect.provideService(effect, currentIoTWirelessServiceConfig, config),
31
30
  );
32
31
 
33
32
  /**
@@ -35,14 +34,14 @@ export const withIoTWirelessServiceConfig: {
35
34
  * @category iot-wireless service config
36
35
  */
37
36
  export const setIoTWirelessServiceConfig = (config: IoTWirelessService.Config) =>
38
- Layer.locallyScoped(currentIoTWirelessServiceConfig, config);
37
+ Layer.succeed(currentIoTWirelessServiceConfig, config);
39
38
 
40
39
  /**
41
40
  * @since 1.0.0
42
41
  * @category adapters
43
42
  */
44
43
  export const toIoTWirelessClientConfig: Effect.Effect<IoTWirelessClientConfig> = Effect.gen(function*() {
45
- const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentIoTWirelessServiceConfig);
44
+ const { logger: serviceLogger, ...config } = yield* currentIoTWirelessServiceConfig;
46
45
 
47
46
  const logger = serviceLogger === true
48
47
  ? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
@@ -1,14 +0,0 @@
1
- import type { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ThrottlingException, TooManyTagsException, ValidationException } from "@aws-sdk/client-iot-wireless";
2
- import type { TaggedException } from "@effect-aws/commons";
3
- export declare const AllServiceErrors: readonly ["AccessDeniedException", "ConflictException", "InternalServerException", "ResourceNotFoundException", "ThrottlingException", "TooManyTagsException", "ValidationException"];
4
- export type AccessDeniedError = TaggedException<AccessDeniedException>;
5
- export type ConflictError = TaggedException<ConflictException>;
6
- export type InternalServerError = TaggedException<InternalServerException>;
7
- export type ResourceNotFoundError = TaggedException<ResourceNotFoundException>;
8
- export type ThrottlingError = TaggedException<ThrottlingException>;
9
- export type TooManyTagsError = TaggedException<TooManyTagsException>;
10
- export type ValidationError = TaggedException<ValidationException>;
11
- export type SdkError = TaggedException<Error & {
12
- name: "SdkError";
13
- }>;
14
- //# sourceMappingURL=Errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,gBAAgB,uLAQnB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAAC;AACvE,MAAM,MAAM,aAAa,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAC/D,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;AAC3E,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;AAC/E,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;AACnE,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,oBAAoB,CAAC,CAAC;AACrE,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;AACnE,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AllServiceErrors = void 0;
4
- exports.AllServiceErrors = [
5
- "AccessDeniedException",
6
- "ConflictException",
7
- "InternalServerException",
8
- "ResourceNotFoundException",
9
- "ThrottlingException",
10
- "TooManyTagsException",
11
- "ValidationException",
12
- ];
13
- //# sourceMappingURL=Errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":";;;AAWa,QAAA,gBAAgB,GAAG;IAC9B,uBAAuB;IACvB,mBAAmB;IACnB,yBAAyB;IACzB,2BAA2B;IAC3B,qBAAqB;IACrB,sBAAsB;IACtB,qBAAqB;CACb,CAAC"}
@@ -1,24 +0,0 @@
1
- /**
2
- * @since 1.0.0
3
- */
4
- import { IoTWirelessClient } from "@aws-sdk/client-iot-wireless";
5
- import { Context, Effect, Layer } from "effect";
6
- declare const IoTWirelessClientInstance_base: Context.TagClass<IoTWirelessClientInstance, "@effect-aws/client-iot-wireless/IoTWirelessClientInstance", IoTWirelessClient>;
7
- /**
8
- * @since 1.0.0
9
- * @category tags
10
- */
11
- export declare class IoTWirelessClientInstance extends IoTWirelessClientInstance_base {
12
- }
13
- /**
14
- * @since 1.0.0
15
- * @category constructors
16
- */
17
- export declare const make: Effect.Effect<IoTWirelessClient, never, import("effect/Scope").Scope>;
18
- /**
19
- * @since 1.0.0
20
- * @category layers
21
- */
22
- export declare const layer: Layer.Layer<IoTWirelessClientInstance, never, never>;
23
- export {};
24
- //# sourceMappingURL=IoTWirelessClientInstance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IoTWirelessClientInstance.d.ts","sourceRoot":"","sources":["../../src/IoTWirelessClientInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;;AAGhD;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,8BAEE;CAAG;AAEpD;;;GAGG;AACH,eAAO,MAAM,IAAI,uEAOhB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,sDAAgD,CAAC"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.layer = exports.make = exports.IoTWirelessClientInstance = void 0;
27
- /**
28
- * @since 1.0.0
29
- */
30
- const client_iot_wireless_1 = require("@aws-sdk/client-iot-wireless");
31
- const effect_1 = require("effect");
32
- const IoTWirelessServiceConfig = __importStar(require("./IoTWirelessServiceConfig.js"));
33
- /**
34
- * @since 1.0.0
35
- * @category tags
36
- */
37
- class IoTWirelessClientInstance extends effect_1.Context.Tag("@effect-aws/client-iot-wireless/IoTWirelessClientInstance")() {
38
- }
39
- exports.IoTWirelessClientInstance = IoTWirelessClientInstance;
40
- /**
41
- * @since 1.0.0
42
- * @category constructors
43
- */
44
- exports.make = effect_1.Effect.flatMap(IoTWirelessServiceConfig.toIoTWirelessClientConfig, (config) => effect_1.Effect.acquireRelease(effect_1.Effect.sync(() => new client_iot_wireless_1.IoTWirelessClient(config)), (client) => effect_1.Effect.sync(() => client.destroy())));
45
- /**
46
- * @since 1.0.0
47
- * @category layers
48
- */
49
- exports.layer = effect_1.Layer.scoped(IoTWirelessClientInstance, exports.make);
50
- //# sourceMappingURL=IoTWirelessClientInstance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IoTWirelessClientInstance.js","sourceRoot":"","sources":["../../src/IoTWirelessClientInstance.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,sEAAiE;AACjE,mCAAgD;AAChD,wFAA0E;AAE1E;;;GAGG;AACH,MAAa,yBAA0B,SAAQ,gBAAO,CAAC,GAAG,CACxD,2DAA2D,CAC5D,EAAgD;CAAG;AAFpD,8DAEoD;AAEpD;;;GAGG;AACU,QAAA,IAAI,GAAG,eAAM,CAAC,OAAO,CAChC,wBAAwB,CAAC,yBAAyB,EAClD,CAAC,MAAM,EAAE,EAAE,CACT,eAAM,CAAC,cAAc,CACnB,eAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,uCAAiB,CAAC,MAAM,CAAC,CAAC,EAChD,CAAC,MAAM,EAAE,EAAE,CAAC,eAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAChD,CACJ,CAAC;AAEF;;;GAGG;AACU,QAAA,KAAK,GAAG,cAAK,CAAC,MAAM,CAAC,yBAAyB,EAAE,YAAI,CAAC,CAAC"}