@effect-aws/client-scheduler 1.1.0 → 1.9.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 (69) hide show
  1. package/Errors/package.json +6 -0
  2. package/LICENSE +1 -1
  3. package/SchedulerClientInstance/package.json +6 -0
  4. package/SchedulerService/package.json +6 -0
  5. package/SchedulerServiceConfig/package.json +6 -0
  6. package/{lib → dist/cjs}/Errors.d.ts +6 -11
  7. package/dist/cjs/Errors.d.ts.map +1 -0
  8. package/dist/cjs/Errors.js +14 -0
  9. package/dist/cjs/Errors.js.map +1 -0
  10. package/dist/cjs/SchedulerClientInstance.d.ts +24 -0
  11. package/dist/cjs/SchedulerClientInstance.d.ts.map +1 -0
  12. package/dist/cjs/SchedulerClientInstance.js +50 -0
  13. package/dist/cjs/SchedulerClientInstance.js.map +1 -0
  14. package/{lib → dist/cjs}/SchedulerService.d.ts +16 -38
  15. package/dist/cjs/SchedulerService.d.ts.map +1 -0
  16. package/dist/cjs/SchedulerService.js +68 -0
  17. package/dist/cjs/SchedulerService.js.map +1 -0
  18. package/dist/cjs/SchedulerServiceConfig.d.ts +25 -0
  19. package/dist/cjs/SchedulerServiceConfig.d.ts.map +1 -0
  20. package/dist/cjs/SchedulerServiceConfig.js +35 -0
  21. package/dist/cjs/SchedulerServiceConfig.js.map +1 -0
  22. package/dist/cjs/index.d.ts +39 -0
  23. package/dist/cjs/index.d.ts.map +1 -0
  24. package/dist/cjs/index.js +56 -0
  25. package/dist/cjs/index.js.map +1 -0
  26. package/dist/dts/Errors.d.ts +13 -0
  27. package/dist/dts/Errors.d.ts.map +1 -0
  28. package/dist/dts/SchedulerClientInstance.d.ts +24 -0
  29. package/dist/dts/SchedulerClientInstance.d.ts.map +1 -0
  30. package/dist/dts/SchedulerService.d.ts +103 -0
  31. package/dist/dts/SchedulerService.d.ts.map +1 -0
  32. package/dist/dts/SchedulerServiceConfig.d.ts +25 -0
  33. package/dist/dts/SchedulerServiceConfig.d.ts.map +1 -0
  34. package/dist/dts/index.d.ts +39 -0
  35. package/dist/dts/index.d.ts.map +1 -0
  36. package/dist/esm/Errors.js +11 -0
  37. package/dist/esm/Errors.js.map +1 -0
  38. package/dist/esm/SchedulerClientInstance.js +23 -0
  39. package/dist/esm/SchedulerClientInstance.js.map +1 -0
  40. package/dist/esm/SchedulerService.js +41 -0
  41. package/dist/esm/SchedulerService.js.map +1 -0
  42. package/dist/esm/SchedulerServiceConfig.js +31 -0
  43. package/dist/esm/SchedulerServiceConfig.js.map +1 -0
  44. package/dist/esm/index.js +27 -0
  45. package/dist/esm/index.js.map +1 -0
  46. package/dist/esm/package.json +4 -0
  47. package/package.json +60 -43
  48. package/src/Errors.ts +29 -0
  49. package/src/SchedulerClientInstance.ts +33 -0
  50. package/src/SchedulerService.ts +263 -0
  51. package/src/SchedulerServiceConfig.ts +52 -0
  52. package/src/index.ts +44 -0
  53. package/CHANGELOG.md +0 -25
  54. package/docgen.json +0 -8
  55. package/lib/Errors.js +0 -14
  56. package/lib/SchedulerClientInstance.d.ts +0 -31
  57. package/lib/SchedulerClientInstance.js +0 -57
  58. package/lib/SchedulerClientInstanceConfig.d.ts +0 -23
  59. package/lib/SchedulerClientInstanceConfig.js +0 -44
  60. package/lib/SchedulerService.js +0 -100
  61. package/lib/esm/Errors.js +0 -11
  62. package/lib/esm/SchedulerClientInstance.js +0 -30
  63. package/lib/esm/SchedulerClientInstanceConfig.js +0 -40
  64. package/lib/esm/SchedulerService.js +0 -96
  65. package/lib/esm/index.js +0 -5
  66. package/lib/index.d.ts +0 -4
  67. package/lib/index.js +0 -21
  68. package/project.json +0 -77
  69. package/vitest.config.ts +0 -3
@@ -0,0 +1,103 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { type CreateScheduleCommandInput, type CreateScheduleCommandOutput, type CreateScheduleGroupCommandInput, type CreateScheduleGroupCommandOutput, type DeleteScheduleCommandInput, type DeleteScheduleCommandOutput, type DeleteScheduleGroupCommandInput, type DeleteScheduleGroupCommandOutput, type GetScheduleCommandInput, type GetScheduleCommandOutput, type GetScheduleGroupCommandInput, type GetScheduleGroupCommandOutput, type ListScheduleGroupsCommandInput, type ListScheduleGroupsCommandOutput, type ListSchedulesCommandInput, type ListSchedulesCommandOutput, type ListTagsForResourceCommandInput, type ListTagsForResourceCommandOutput, type SchedulerClient, type SchedulerClientConfig, type TagResourceCommandInput, type TagResourceCommandOutput, type UntagResourceCommandInput, type UntagResourceCommandOutput, type UpdateScheduleCommandInput, type UpdateScheduleCommandOutput } from "@aws-sdk/client-scheduler";
5
+ import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons";
6
+ import { Effect, Layer } from "effect";
7
+ import type { ConflictError, InternalServerError, ResourceNotFoundError, ServiceQuotaExceededError, ThrottlingError, ValidationError } from "./Errors.js";
8
+ import * as Instance from "./SchedulerClientInstance.js";
9
+ interface SchedulerService$ {
10
+ readonly _: unique symbol;
11
+ /**
12
+ * @see {@link CreateScheduleCommand}
13
+ */
14
+ createSchedule(args: CreateScheduleCommandInput, options?: HttpHandlerOptions): Effect.Effect<CreateScheduleCommandOutput, SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ThrottlingError | ValidationError>;
15
+ /**
16
+ * @see {@link CreateScheduleGroupCommand}
17
+ */
18
+ createScheduleGroup(args: CreateScheduleGroupCommandInput, options?: HttpHandlerOptions): Effect.Effect<CreateScheduleGroupCommandOutput, SdkError | ConflictError | InternalServerError | ServiceQuotaExceededError | ThrottlingError | ValidationError>;
19
+ /**
20
+ * @see {@link DeleteScheduleCommand}
21
+ */
22
+ deleteSchedule(args: DeleteScheduleCommandInput, options?: HttpHandlerOptions): Effect.Effect<DeleteScheduleCommandOutput, SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError>;
23
+ /**
24
+ * @see {@link DeleteScheduleGroupCommand}
25
+ */
26
+ deleteScheduleGroup(args: DeleteScheduleGroupCommandInput, options?: HttpHandlerOptions): Effect.Effect<DeleteScheduleGroupCommandOutput, SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError>;
27
+ /**
28
+ * @see {@link GetScheduleCommand}
29
+ */
30
+ getSchedule(args: GetScheduleCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetScheduleCommandOutput, SdkError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError>;
31
+ /**
32
+ * @see {@link GetScheduleGroupCommand}
33
+ */
34
+ getScheduleGroup(args: GetScheduleGroupCommandInput, options?: HttpHandlerOptions): Effect.Effect<GetScheduleGroupCommandOutput, SdkError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError>;
35
+ /**
36
+ * @see {@link ListScheduleGroupsCommand}
37
+ */
38
+ listScheduleGroups(args: ListScheduleGroupsCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListScheduleGroupsCommandOutput, SdkError | InternalServerError | ThrottlingError | ValidationError>;
39
+ /**
40
+ * @see {@link ListSchedulesCommand}
41
+ */
42
+ listSchedules(args: ListSchedulesCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListSchedulesCommandOutput, SdkError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError>;
43
+ /**
44
+ * @see {@link ListTagsForResourceCommand}
45
+ */
46
+ listTagsForResource(args: ListTagsForResourceCommandInput, options?: HttpHandlerOptions): Effect.Effect<ListTagsForResourceCommandOutput, SdkError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError>;
47
+ /**
48
+ * @see {@link TagResourceCommand}
49
+ */
50
+ tagResource(args: TagResourceCommandInput, options?: HttpHandlerOptions): Effect.Effect<TagResourceCommandOutput, SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError>;
51
+ /**
52
+ * @see {@link UntagResourceCommand}
53
+ */
54
+ untagResource(args: UntagResourceCommandInput, options?: HttpHandlerOptions): Effect.Effect<UntagResourceCommandOutput, SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError>;
55
+ /**
56
+ * @see {@link UpdateScheduleCommand}
57
+ */
58
+ updateSchedule(args: UpdateScheduleCommandInput, options?: HttpHandlerOptions): Effect.Effect<UpdateScheduleCommandOutput, SdkError | ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError>;
59
+ }
60
+ /**
61
+ * @since 1.0.0
62
+ * @category constructors
63
+ */
64
+ export declare const makeSchedulerService: Effect.Effect<SchedulerService$, never, Instance.SchedulerClientInstance>;
65
+ declare const SchedulerService_base: import("effect/Context").TagClass<SchedulerService, "@effect-aws/client-scheduler/SchedulerService", SchedulerService$> & {
66
+ readonly _: Effect.Effect<SchedulerService$["_"], never, SchedulerService>;
67
+ createSchedule: (args: CreateScheduleCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<CreateScheduleCommandOutput, ConflictError | InternalServerError | ResourceNotFoundError | ServiceQuotaExceededError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
68
+ createScheduleGroup: (args: CreateScheduleGroupCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<CreateScheduleGroupCommandOutput, ConflictError | InternalServerError | ServiceQuotaExceededError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
69
+ deleteSchedule: (args: DeleteScheduleCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DeleteScheduleCommandOutput, ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
70
+ deleteScheduleGroup: (args: DeleteScheduleGroupCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<DeleteScheduleGroupCommandOutput, ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
71
+ getSchedule: (args: GetScheduleCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<GetScheduleCommandOutput, InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
72
+ getScheduleGroup: (args: GetScheduleGroupCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<GetScheduleGroupCommandOutput, InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
73
+ listScheduleGroups: (args: ListScheduleGroupsCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListScheduleGroupsCommandOutput, InternalServerError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
74
+ listSchedules: (args: ListSchedulesCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListSchedulesCommandOutput, InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
75
+ listTagsForResource: (args: ListTagsForResourceCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<ListTagsForResourceCommandOutput, InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
76
+ tagResource: (args: TagResourceCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<TagResourceCommandOutput, ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
77
+ untagResource: (args: UntagResourceCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<UntagResourceCommandOutput, ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
78
+ updateSchedule: (args: UpdateScheduleCommandInput, options?: HttpHandlerOptions | undefined) => Effect.Effect<UpdateScheduleCommandOutput, ConflictError | InternalServerError | ResourceNotFoundError | ThrottlingError | ValidationError | SdkError, SchedulerService>;
79
+ } & {
80
+ use: <X>(body: (_: SchedulerService$) => X) => X extends Effect.Effect<infer A, infer E, infer R> ? Effect.Effect<A, E, SchedulerService | R> : Effect.Effect<X, never, SchedulerService>;
81
+ };
82
+ /**
83
+ * @since 1.0.0
84
+ * @category models
85
+ */
86
+ export declare class SchedulerService extends SchedulerService_base {
87
+ static readonly defaultLayer: Layer.Layer<SchedulerService, never, never>;
88
+ static readonly layer: (config: SchedulerService.Config) => Layer.Layer<SchedulerService, never, never>;
89
+ static readonly baseLayer: (evaluate: (defaultConfig: SchedulerClientConfig) => SchedulerClient) => Layer.Layer<SchedulerService, never, never>;
90
+ }
91
+ /**
92
+ * @since 1.0.0
93
+ */
94
+ export declare namespace SchedulerService {
95
+ /**
96
+ * @since 1.0.0
97
+ */
98
+ interface Config extends Omit<SchedulerClientConfig, "logger"> {
99
+ readonly logger?: ServiceLogger.ServiceLoggerConstructorProps | true;
100
+ }
101
+ }
102
+ export {};
103
+ //# sourceMappingURL=SchedulerService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchedulerService.d.ts","sourceRoot":"","sources":["../../src/SchedulerService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAEhC,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EAErC,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAEhC,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EAErC,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAE7B,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAElC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EAEpC,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAE/B,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAE1B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAE7B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAE/B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EACjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEvF,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,qBA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,CAC3G,CAAC;IAEF;;OAEG;IACH,cAAc,CACZ,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,kBAAkB,GAC3B,MAAM,CAAC,MAAM,CACd,2BAA2B,EAC3B,QAAQ,GAAG,aAAa,GAAG,mBAAmB,GAAG,qBAAqB,GAAG,eAAe,GAAG,eAAe,CAC3G,CAAC;CACH;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,2EAI/B,CAAC;;;;;;;;;;;;;;;;;;AAEH;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,qBAGnC;IACD,MAAM,CAAC,QAAQ,CAAC,YAAY,8CAAgF;IAC5G,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAY,iBAAiB,MAAM,iDAIpD;IACJ,MAAM,CAAC,QAAQ,CAAC,SAAS,aACb,CAAC,aAAa,EAAE,qBAAqB,KAAK,eAAe,iDASjE;CACL;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC;;OAEG;IACH,UAAiB,MAAO,SAAQ,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC;QACnE,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,6BAA6B,GAAG,IAAI,CAAC;KACtE;CACF"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type { SchedulerClientConfig } from "@aws-sdk/client-scheduler";
5
+ import { Effect, Layer } from "effect";
6
+ import type { SchedulerService } from "./SchedulerService.js";
7
+ /**
8
+ * @since 1.0.0
9
+ * @category scheduler service config
10
+ */
11
+ export declare const withSchedulerServiceConfig: {
12
+ (config: SchedulerService.Config): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
13
+ <A, E, R>(effect: Effect.Effect<A, E, R>, config: SchedulerService.Config): Effect.Effect<A, E, R>;
14
+ };
15
+ /**
16
+ * @since 1.0.0
17
+ * @category scheduler service config
18
+ */
19
+ export declare const setSchedulerServiceConfig: (config: SchedulerService.Config) => Layer.Layer<never, never, never>;
20
+ /**
21
+ * @since 1.0.0
22
+ * @category adapters
23
+ */
24
+ export declare const toSchedulerClientConfig: Effect.Effect<SchedulerClientConfig>;
25
+ //# sourceMappingURL=SchedulerServiceConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchedulerServiceConfig.d.ts","sourceRoot":"","sources":["../../src/SchedulerServiceConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,MAAM,EAAY,KAAK,EAAE,MAAM,QAAQ,CAAC;AAGjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAW9D;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE;IACvC,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACvG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAKpG,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,WAAY,iBAAiB,MAAM,qCACb,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAQvE,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { SchedulerService } from "./SchedulerService.js";
5
+ /**
6
+ * @since 1.0.0
7
+ */
8
+ export * from "./Errors.js";
9
+ /**
10
+ * @since 1.0.0
11
+ */
12
+ export * as SchedulerClientInstance from "./SchedulerClientInstance.js";
13
+ /**
14
+ * @since 1.0.0
15
+ */
16
+ export * as SchedulerServiceConfig from "./SchedulerServiceConfig.js";
17
+ /**
18
+ * @since 1.0.0
19
+ */
20
+ export * from "./SchedulerService.js";
21
+ /**
22
+ * @since 1.0.0
23
+ * @category exports
24
+ * @alias SchedulerService
25
+ */
26
+ export declare namespace Scheduler {
27
+ /**
28
+ * @since 1.0.0
29
+ * @alias SchedulerService.Config
30
+ */
31
+ type Config = SchedulerService.Config;
32
+ }
33
+ /**
34
+ * @since 1.0.0
35
+ * @category exports
36
+ * @alias SchedulerService
37
+ */
38
+ export declare const Scheduler: typeof SchedulerService;
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,uBAAuB,MAAM,8BAA8B,CAAC;AAExE;;GAEG;AACH,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AAEtE;;GAEG;AACH,cAAc,uBAAuB,CAAC;AAEtC;;;;GAIG;AACH,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC;;;OAGG;IACH,KAAY,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC;CAC9C;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,yBAAmB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { SdkError as CommonSdkError } from "@effect-aws/commons";
2
+ export const AllServiceErrors = [
3
+ "ConflictException",
4
+ "InternalServerException",
5
+ "ResourceNotFoundException",
6
+ "ServiceQuotaExceededException",
7
+ "ThrottlingException",
8
+ "ValidationException",
9
+ ];
10
+ export const SdkError = CommonSdkError;
11
+ //# sourceMappingURL=Errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,mBAAmB;IACnB,yBAAyB;IACzB,2BAA2B;IAC3B,+BAA+B;IAC/B,qBAAqB;IACrB,qBAAqB;CACb,CAAC;AAUX,MAAM,CAAC,MAAM,QAAQ,GAAG,cAAc,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { SchedulerClient } from "@aws-sdk/client-scheduler";
5
+ import { Context, Effect, Layer } from "effect";
6
+ import * as SchedulerServiceConfig from "./SchedulerServiceConfig.js";
7
+ /**
8
+ * @since 1.0.0
9
+ * @category tags
10
+ */
11
+ export class SchedulerClientInstance extends Context.Tag("@effect-aws/client-scheduler/SchedulerClientInstance")() {
12
+ }
13
+ /**
14
+ * @since 1.0.0
15
+ * @category constructors
16
+ */
17
+ export const make = Effect.flatMap(SchedulerServiceConfig.toSchedulerClientConfig, (config) => Effect.acquireRelease(Effect.sync(() => new SchedulerClient(config)), (client) => Effect.sync(() => client.destroy())));
18
+ /**
19
+ * @since 1.0.0
20
+ * @category layers
21
+ */
22
+ export const layer = Layer.scoped(SchedulerClientInstance, make);
23
+ //# sourceMappingURL=SchedulerClientInstance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchedulerClientInstance.js","sourceRoot":"","sources":["../../src/SchedulerClientInstance.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AAEtE;;;GAGG;AACH,MAAM,OAAO,uBAAwB,SAAQ,OAAO,CAAC,GAAG,CACtD,sDAAsD,CACvD,EAA4C;CAAG;AAEhD;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,sBAAsB,CAAC,uBAAuB,EAC9C,CAAC,MAAM,EAAE,EAAE,CACT,MAAM,CAAC,cAAc,CACnB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,EAC9C,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAChD,CACJ,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { CreateScheduleCommand, CreateScheduleGroupCommand, DeleteScheduleCommand, DeleteScheduleGroupCommand, GetScheduleCommand, GetScheduleGroupCommand, ListScheduleGroupsCommand, ListSchedulesCommand, ListTagsForResourceCommand, TagResourceCommand, UntagResourceCommand, UpdateScheduleCommand, } from "@aws-sdk/client-scheduler";
5
+ import { Service } from "@effect-aws/commons";
6
+ import { Effect, Layer } from "effect";
7
+ import { AllServiceErrors } from "./Errors.js";
8
+ import * as Instance from "./SchedulerClientInstance.js";
9
+ import * as SchedulerServiceConfig from "./SchedulerServiceConfig.js";
10
+ const commands = {
11
+ CreateScheduleCommand,
12
+ CreateScheduleGroupCommand,
13
+ DeleteScheduleCommand,
14
+ DeleteScheduleGroupCommand,
15
+ GetScheduleCommand,
16
+ GetScheduleGroupCommand,
17
+ ListScheduleGroupsCommand,
18
+ ListSchedulesCommand,
19
+ ListTagsForResourceCommand,
20
+ TagResourceCommand,
21
+ UntagResourceCommand,
22
+ UpdateScheduleCommand,
23
+ };
24
+ /**
25
+ * @since 1.0.0
26
+ * @category constructors
27
+ */
28
+ export const makeSchedulerService = Effect.gen(function* () {
29
+ const client = yield* Instance.SchedulerClientInstance;
30
+ return Service.fromClientAndCommands(client, commands, AllServiceErrors);
31
+ });
32
+ /**
33
+ * @since 1.0.0
34
+ * @category models
35
+ */
36
+ export class SchedulerService extends Effect.Tag("@effect-aws/client-scheduler/SchedulerService")() {
37
+ static defaultLayer = Layer.effect(this, makeSchedulerService).pipe(Layer.provide(Instance.layer));
38
+ static layer = (config) => Layer.effect(this, makeSchedulerService).pipe(Layer.provide(Instance.layer), Layer.provide(SchedulerServiceConfig.setSchedulerServiceConfig(config)));
39
+ static baseLayer = (evaluate) => Layer.effect(this, makeSchedulerService).pipe(Layer.provide(Layer.effect(Instance.SchedulerClientInstance, Effect.map(SchedulerServiceConfig.toSchedulerClientConfig, evaluate))));
40
+ }
41
+ //# sourceMappingURL=SchedulerService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchedulerService.js","sourceRoot":"","sources":["../../src/SchedulerService.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,qBAAqB,EAGrB,0BAA0B,EAG1B,qBAAqB,EAGrB,0BAA0B,EAG1B,kBAAkB,EAGlB,uBAAuB,EAGvB,yBAAyB,EAGzB,oBAAoB,EAGpB,0BAA0B,EAK1B,kBAAkB,EAGlB,oBAAoB,EAGpB,qBAAqB,GAGtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AASvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,QAAQ,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,sBAAsB,MAAM,6BAA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AAC,GAAG,CAAC,sBAAsB,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CACrE,CACF,CACF,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { ServiceLogger } from "@effect-aws/commons";
2
+ import { Effect, FiberRef, Layer } from "effect";
3
+ import { dual } from "effect/Function";
4
+ import { globalValue } from "effect/GlobalValue";
5
+ /**
6
+ * @since 1.0.0
7
+ * @category scheduler service config
8
+ */
9
+ const currentSchedulerServiceConfig = globalValue("@effect-aws/client-scheduler/currentSchedulerServiceConfig", () => FiberRef.unsafeMake({}));
10
+ /**
11
+ * @since 1.0.0
12
+ * @category scheduler service config
13
+ */
14
+ export const withSchedulerServiceConfig = dual(2, (effect, config) => Effect.locally(effect, currentSchedulerServiceConfig, config));
15
+ /**
16
+ * @since 1.0.0
17
+ * @category scheduler service config
18
+ */
19
+ export const setSchedulerServiceConfig = (config) => Layer.locallyScoped(currentSchedulerServiceConfig, config);
20
+ /**
21
+ * @since 1.0.0
22
+ * @category adapters
23
+ */
24
+ export const toSchedulerClientConfig = Effect.gen(function* () {
25
+ const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentSchedulerServiceConfig);
26
+ const logger = serviceLogger === true
27
+ ? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
28
+ : (serviceLogger ? yield* ServiceLogger.toClientLogger(ServiceLogger.make(serviceLogger)) : undefined);
29
+ return { logger, ...config };
30
+ });
31
+ //# sourceMappingURL=SchedulerServiceConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchedulerServiceConfig.js","sourceRoot":"","sources":["../../src/SchedulerServiceConfig.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAA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+ /**
10
+ * @since 1.0.0
11
+ */
12
+ export * as SchedulerClientInstance from "./SchedulerClientInstance.js";
13
+ /**
14
+ * @since 1.0.0
15
+ */
16
+ export * as SchedulerServiceConfig from "./SchedulerServiceConfig.js";
17
+ /**
18
+ * @since 1.0.0
19
+ */
20
+ export * from "./SchedulerService.js";
21
+ /**
22
+ * @since 1.0.0
23
+ * @category exports
24
+ * @alias SchedulerService
25
+ */
26
+ export const Scheduler = SchedulerService;
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,OAAO,KAAK,uBAAuB,MAAM,8BAA8B,CAAC;AAExE;;GAEG;AACH,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AAEtE;;GAEG;AACH,cAAc,uBAAuB,CAAC;AAetC;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": []
4
+ }
package/package.json CHANGED
@@ -1,54 +1,71 @@
1
1
  {
2
2
  "name": "@effect-aws/client-scheduler",
3
+ "version": "1.9.0",
4
+ "description": "Effectful AWS Scheduler client",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "github:floydspace/effect-aws",
9
+ "directory": "packages/client-scheduler"
10
+ },
11
+ "sideEffects": [],
3
12
  "author": {
4
13
  "name": "Victor Korzunin",
5
- "email": "ifloydrose@gmail.com",
6
- "organization": false
14
+ "email": "ifloydrose@gmail.com"
7
15
  },
8
- "devDependencies": {
9
- "@types/node": "^18",
10
- "@typescript-eslint/eslint-plugin": "^7",
11
- "@typescript-eslint/parser": "^7",
12
- "aws-sdk-client-mock": "^4.0.2",
13
- "aws-sdk-client-mock-vitest": "^4.0.0",
14
- "effect": "3.0.0",
15
- "eslint": "^8",
16
- "eslint-config-prettier": "^9.1.0",
17
- "eslint-import-resolver-typescript": "^3.6.1",
18
- "eslint-plugin-import": "^2.29.1",
19
- "eslint-plugin-prettier": "^5.2.1",
20
- "prettier": "^3.2.5",
21
- "typescript": "^5.4.2",
22
- "vitest": "^2.0.5"
16
+ "homepage": "https://floydspace.github.io/effect-aws/docs/client-scheduler",
17
+ "dependencies": {
18
+ "@aws-sdk/client-scheduler": "^3",
19
+ "@effect-aws/commons": "^0.1.0"
23
20
  },
24
21
  "peerDependencies": {
25
- "effect": ">=3.0.0 <4.0.0"
22
+ "effect": ">=3.0.4 <4.0.0"
26
23
  },
27
- "dependencies": {
28
- "@aws-sdk/client-scheduler": "^3"
29
- },
30
- "main": "lib/index.js",
31
- "license": "MIT",
32
- "homepage": "https://floydspace.github.io/effect-aws",
33
- "publishConfig": {
34
- "access": "public"
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
+ "./SchedulerClientInstance": {
40
+ "types": "./dist/dts/SchedulerClientInstance.d.ts",
41
+ "import": "./dist/esm/SchedulerClientInstance.js",
42
+ "default": "./dist/cjs/SchedulerClientInstance.js"
43
+ },
44
+ "./SchedulerService": {
45
+ "types": "./dist/dts/SchedulerService.d.ts",
46
+ "import": "./dist/esm/SchedulerService.js",
47
+ "default": "./dist/cjs/SchedulerService.js"
48
+ },
49
+ "./SchedulerServiceConfig": {
50
+ "types": "./dist/dts/SchedulerServiceConfig.d.ts",
51
+ "import": "./dist/esm/SchedulerServiceConfig.js",
52
+ "default": "./dist/cjs/SchedulerServiceConfig.js"
53
+ }
35
54
  },
36
- "version": "1.1.0",
37
- "types": "lib/index.d.ts",
38
- "module": "lib/esm/index.js",
39
- "sideEffects": [],
40
- "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\".",
41
- "scripts": {
42
- "build": "npx projen build",
43
- "compile": "npx projen compile",
44
- "default": "npx projen default",
45
- "eslint": "npx projen eslint",
46
- "package": "npx projen package",
47
- "post-compile": "npx projen post-compile",
48
- "pre-compile": "npx projen pre-compile",
49
- "test": "npx projen test",
50
- "test:watch": "npx projen test:watch",
51
- "watch": "npx projen watch",
52
- "docgen": "docgen"
55
+ "typesVersions": {
56
+ "*": {
57
+ "Errors": [
58
+ "./dist/dts/Errors.d.ts"
59
+ ],
60
+ "SchedulerClientInstance": [
61
+ "./dist/dts/SchedulerClientInstance.d.ts"
62
+ ],
63
+ "SchedulerService": [
64
+ "./dist/dts/SchedulerService.d.ts"
65
+ ],
66
+ "SchedulerServiceConfig": [
67
+ "./dist/dts/SchedulerServiceConfig.d.ts"
68
+ ]
69
+ }
53
70
  }
54
71
  }
package/src/Errors.ts ADDED
@@ -0,0 +1,29 @@
1
+ import type {
2
+ ConflictException,
3
+ InternalServerException,
4
+ ResourceNotFoundException,
5
+ ServiceQuotaExceededException,
6
+ ThrottlingException,
7
+ ValidationException,
8
+ } from "@aws-sdk/client-scheduler";
9
+ import type { TaggedException } from "@effect-aws/commons";
10
+ import { SdkError as CommonSdkError } from "@effect-aws/commons";
11
+
12
+ export const AllServiceErrors = [
13
+ "ConflictException",
14
+ "InternalServerException",
15
+ "ResourceNotFoundException",
16
+ "ServiceQuotaExceededException",
17
+ "ThrottlingException",
18
+ "ValidationException",
19
+ ] as const;
20
+
21
+ export type ConflictError = TaggedException<ConflictException>;
22
+ export type InternalServerError = TaggedException<InternalServerException>;
23
+ export type ResourceNotFoundError = TaggedException<ResourceNotFoundException>;
24
+ export type ServiceQuotaExceededError = TaggedException<ServiceQuotaExceededException>;
25
+ export type ThrottlingError = TaggedException<ThrottlingException>;
26
+ export type ValidationError = TaggedException<ValidationException>;
27
+
28
+ export type SdkError = CommonSdkError;
29
+ export const SdkError = CommonSdkError;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import { SchedulerClient } from "@aws-sdk/client-scheduler";
5
+ import { Context, Effect, Layer } from "effect";
6
+ import * as SchedulerServiceConfig from "./SchedulerServiceConfig.js";
7
+
8
+ /**
9
+ * @since 1.0.0
10
+ * @category tags
11
+ */
12
+ export class SchedulerClientInstance extends Context.Tag(
13
+ "@effect-aws/client-scheduler/SchedulerClientInstance",
14
+ )<SchedulerClientInstance, SchedulerClient>() {}
15
+
16
+ /**
17
+ * @since 1.0.0
18
+ * @category constructors
19
+ */
20
+ export const make = Effect.flatMap(
21
+ SchedulerServiceConfig.toSchedulerClientConfig,
22
+ (config) =>
23
+ Effect.acquireRelease(
24
+ Effect.sync(() => new SchedulerClient(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(SchedulerClientInstance, make);