@effect-aws/client-ivs 1.10.5

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 (53) hide show
  1. package/Errors/package.json +6 -0
  2. package/IvsClientInstance/package.json +6 -0
  3. package/IvsService/package.json +6 -0
  4. package/IvsServiceConfig/package.json +6 -0
  5. package/LICENSE +19 -0
  6. package/README.md +58 -0
  7. package/dist/cjs/Errors.d.ts +17 -0
  8. package/dist/cjs/Errors.d.ts.map +1 -0
  9. package/dist/cjs/Errors.js +16 -0
  10. package/dist/cjs/Errors.js.map +1 -0
  11. package/dist/cjs/IvsClientInstance.d.ts +24 -0
  12. package/dist/cjs/IvsClientInstance.d.ts.map +1 -0
  13. package/dist/cjs/IvsClientInstance.js +50 -0
  14. package/dist/cjs/IvsClientInstance.js.map +1 -0
  15. package/dist/cjs/IvsService.d.ts +186 -0
  16. package/dist/cjs/IvsService.d.ts.map +1 -0
  17. package/dist/cjs/IvsService.js +94 -0
  18. package/dist/cjs/IvsService.js.map +1 -0
  19. package/dist/cjs/IvsServiceConfig.d.ts +25 -0
  20. package/dist/cjs/IvsServiceConfig.d.ts.map +1 -0
  21. package/dist/cjs/IvsServiceConfig.js +35 -0
  22. package/dist/cjs/IvsServiceConfig.js.map +1 -0
  23. package/dist/cjs/index.d.ts +44 -0
  24. package/dist/cjs/index.d.ts.map +1 -0
  25. package/dist/cjs/index.js +56 -0
  26. package/dist/cjs/index.js.map +1 -0
  27. package/dist/dts/Errors.d.ts +17 -0
  28. package/dist/dts/Errors.d.ts.map +1 -0
  29. package/dist/dts/IvsClientInstance.d.ts +24 -0
  30. package/dist/dts/IvsClientInstance.d.ts.map +1 -0
  31. package/dist/dts/IvsService.d.ts +186 -0
  32. package/dist/dts/IvsService.d.ts.map +1 -0
  33. package/dist/dts/IvsServiceConfig.d.ts +25 -0
  34. package/dist/dts/IvsServiceConfig.d.ts.map +1 -0
  35. package/dist/dts/index.d.ts +44 -0
  36. package/dist/dts/index.d.ts.map +1 -0
  37. package/dist/esm/Errors.js +13 -0
  38. package/dist/esm/Errors.js.map +1 -0
  39. package/dist/esm/IvsClientInstance.js +23 -0
  40. package/dist/esm/IvsClientInstance.js.map +1 -0
  41. package/dist/esm/IvsService.js +67 -0
  42. package/dist/esm/IvsService.js.map +1 -0
  43. package/dist/esm/IvsServiceConfig.js +31 -0
  44. package/dist/esm/IvsServiceConfig.js.map +1 -0
  45. package/dist/esm/index.js +27 -0
  46. package/dist/esm/index.js.map +1 -0
  47. package/dist/esm/package.json +4 -0
  48. package/package.json +71 -0
  49. package/src/Errors.ts +38 -0
  50. package/src/IvsClientInstance.ts +33 -0
  51. package/src/IvsService.ts +725 -0
  52. package/src/IvsServiceConfig.ts +51 -0
  53. package/src/index.ts +50 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAE5D;;GAEG;AACH,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAE1D;;GAEG;AACH,cAAc,iBAAiB,CAAC;AAqBhC;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": []
4
+ }
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@effect-aws/client-ivs",
3
+ "version": "1.10.5",
4
+ "description": "Effectful AWS IVS client",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "github:floydspace/effect-aws",
9
+ "directory": "packages/client-ivs"
10
+ },
11
+ "sideEffects": [],
12
+ "author": {
13
+ "name": "Victor Korzunin",
14
+ "email": "ifloydrose@gmail.com"
15
+ },
16
+ "homepage": "https://floydspace.github.io/effect-aws/docs/client-ivs",
17
+ "dependencies": {
18
+ "@aws-sdk/client-ivs": "^3",
19
+ "@effect-aws/commons": "^0.3.0"
20
+ },
21
+ "peerDependencies": {
22
+ "effect": ">=3.0.4 <4.0.0"
23
+ },
24
+ "main": "./dist/cjs/index.js",
25
+ "module": "./dist/esm/index.js",
26
+ "types": "./dist/dts/index.d.ts",
27
+ "exports": {
28
+ "./package.json": "./package.json",
29
+ ".": {
30
+ "types": "./dist/dts/index.d.ts",
31
+ "import": "./dist/esm/index.js",
32
+ "default": "./dist/cjs/index.js"
33
+ },
34
+ "./Errors": {
35
+ "types": "./dist/dts/Errors.d.ts",
36
+ "import": "./dist/esm/Errors.js",
37
+ "default": "./dist/cjs/Errors.js"
38
+ },
39
+ "./IvsClientInstance": {
40
+ "types": "./dist/dts/IvsClientInstance.d.ts",
41
+ "import": "./dist/esm/IvsClientInstance.js",
42
+ "default": "./dist/cjs/IvsClientInstance.js"
43
+ },
44
+ "./IvsService": {
45
+ "types": "./dist/dts/IvsService.d.ts",
46
+ "import": "./dist/esm/IvsService.js",
47
+ "default": "./dist/cjs/IvsService.js"
48
+ },
49
+ "./IvsServiceConfig": {
50
+ "types": "./dist/dts/IvsServiceConfig.d.ts",
51
+ "import": "./dist/esm/IvsServiceConfig.js",
52
+ "default": "./dist/cjs/IvsServiceConfig.js"
53
+ }
54
+ },
55
+ "typesVersions": {
56
+ "*": {
57
+ "Errors": [
58
+ "./dist/dts/Errors.d.ts"
59
+ ],
60
+ "IvsClientInstance": [
61
+ "./dist/dts/IvsClientInstance.d.ts"
62
+ ],
63
+ "IvsService": [
64
+ "./dist/dts/IvsService.d.ts"
65
+ ],
66
+ "IvsServiceConfig": [
67
+ "./dist/dts/IvsServiceConfig.d.ts"
68
+ ]
69
+ }
70
+ }
71
+ }
package/src/Errors.ts ADDED
@@ -0,0 +1,38 @@
1
+ import type {
2
+ AccessDeniedException,
3
+ ChannelNotBroadcasting,
4
+ ConflictException,
5
+ InternalServerException,
6
+ PendingVerification,
7
+ ResourceNotFoundException,
8
+ ServiceQuotaExceededException,
9
+ StreamUnavailable,
10
+ ThrottlingException,
11
+ ValidationException,
12
+ } from "@aws-sdk/client-ivs";
13
+ import type { TaggedException } from "@effect-aws/commons";
14
+
15
+ export const AllServiceErrors = [
16
+ "AccessDeniedException",
17
+ "ChannelNotBroadcasting",
18
+ "ConflictException",
19
+ "InternalServerException",
20
+ "PendingVerification",
21
+ "ResourceNotFoundException",
22
+ "ServiceQuotaExceededException",
23
+ "StreamUnavailable",
24
+ "ThrottlingException",
25
+ "ValidationException",
26
+ ] as const;
27
+
28
+ export type AccessDeniedError = TaggedException<AccessDeniedException>;
29
+ export type ChannelNotBroadcastingError = TaggedException<ChannelNotBroadcasting>;
30
+ export type ConflictError = TaggedException<ConflictException>;
31
+ export type InternalServerError = TaggedException<InternalServerException>;
32
+ export type PendingVerificationError = TaggedException<PendingVerification>;
33
+ export type ResourceNotFoundError = TaggedException<ResourceNotFoundException>;
34
+ export type ServiceQuotaExceededError = TaggedException<ServiceQuotaExceededException>;
35
+ export type StreamUnavailableError = TaggedException<StreamUnavailable>;
36
+ export type ThrottlingError = TaggedException<ThrottlingException>;
37
+ export type ValidationError = TaggedException<ValidationException>;
38
+ export type SdkError = TaggedException<Error & { name: "SdkError" }>;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { IvsClient } from "@aws-sdk/client-ivs";
5
+ import { Context, Effect, Layer } from "effect";
6
+ import * as IvsServiceConfig from "./IvsServiceConfig.js";
7
+
8
+ /**
9
+ * @since 1.0.0
10
+ * @category tags
11
+ */
12
+ export class IvsClientInstance extends Context.Tag(
13
+ "@effect-aws/client-ivs/IvsClientInstance",
14
+ )<IvsClientInstance, IvsClient>() {}
15
+
16
+ /**
17
+ * @since 1.0.0
18
+ * @category constructors
19
+ */
20
+ export const make = Effect.flatMap(
21
+ IvsServiceConfig.toIvsClientConfig,
22
+ (config) =>
23
+ Effect.acquireRelease(
24
+ Effect.sync(() => new IvsClient(config)),
25
+ (client) => Effect.sync(() => client.destroy()),
26
+ ),
27
+ );
28
+
29
+ /**
30
+ * @since 1.0.0
31
+ * @category layers
32
+ */
33
+ export const layer = Layer.scoped(IvsClientInstance, make);