@effect-aws/client-sns 1.5.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/SNSClientInstance/package.json +6 -0
  4. package/SNSService/package.json +6 -0
  5. package/SNSServiceConfig/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 +42 -0
  9. package/dist/cjs/Errors.js.map +1 -0
  10. package/dist/cjs/SNSClientInstance.d.ts +24 -0
  11. package/dist/cjs/SNSClientInstance.d.ts.map +1 -0
  12. package/dist/cjs/SNSClientInstance.js +50 -0
  13. package/dist/cjs/SNSClientInstance.js.map +1 -0
  14. package/{lib → dist/cjs}/SNSService.d.ts +16 -38
  15. package/dist/cjs/SNSService.d.ts.map +1 -0
  16. package/dist/cjs/SNSService.js +98 -0
  17. package/dist/cjs/SNSService.js.map +1 -0
  18. package/dist/cjs/SNSServiceConfig.d.ts +25 -0
  19. package/dist/cjs/SNSServiceConfig.d.ts.map +1 -0
  20. package/dist/cjs/SNSServiceConfig.js +35 -0
  21. package/dist/cjs/SNSServiceConfig.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 +41 -0
  27. package/dist/dts/Errors.d.ts.map +1 -0
  28. package/dist/dts/SNSClientInstance.d.ts +24 -0
  29. package/dist/dts/SNSClientInstance.d.ts.map +1 -0
  30. package/dist/dts/SNSService.d.ts +253 -0
  31. package/dist/dts/SNSService.d.ts.map +1 -0
  32. package/dist/dts/SNSServiceConfig.d.ts +25 -0
  33. package/dist/dts/SNSServiceConfig.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 +39 -0
  37. package/dist/esm/Errors.js.map +1 -0
  38. package/dist/esm/SNSClientInstance.js +23 -0
  39. package/dist/esm/SNSClientInstance.js.map +1 -0
  40. package/dist/esm/SNSService.js +71 -0
  41. package/dist/esm/SNSService.js.map +1 -0
  42. package/dist/esm/SNSServiceConfig.js +31 -0
  43. package/dist/esm/SNSServiceConfig.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 +113 -0
  49. package/src/SNSClientInstance.ts +33 -0
  50. package/src/SNSService.ts +839 -0
  51. package/src/SNSServiceConfig.ts +51 -0
  52. package/src/index.ts +44 -0
  53. package/CHANGELOG.md +0 -107
  54. package/docgen.json +0 -8
  55. package/lib/Errors.js +0 -42
  56. package/lib/SNSClientInstance.d.ts +0 -31
  57. package/lib/SNSClientInstance.js +0 -57
  58. package/lib/SNSClientInstanceConfig.d.ts +0 -23
  59. package/lib/SNSClientInstanceConfig.js +0 -44
  60. package/lib/SNSService.js +0 -130
  61. package/lib/esm/Errors.js +0 -39
  62. package/lib/esm/SNSClientInstance.js +0 -30
  63. package/lib/esm/SNSClientInstanceConfig.js +0 -40
  64. package/lib/esm/SNSService.js +0 -126
  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,839 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import {
5
+ AddPermissionCommand,
6
+ type AddPermissionCommandInput,
7
+ type AddPermissionCommandOutput,
8
+ CheckIfPhoneNumberIsOptedOutCommand,
9
+ type CheckIfPhoneNumberIsOptedOutCommandInput,
10
+ type CheckIfPhoneNumberIsOptedOutCommandOutput,
11
+ ConfirmSubscriptionCommand,
12
+ type ConfirmSubscriptionCommandInput,
13
+ type ConfirmSubscriptionCommandOutput,
14
+ CreatePlatformApplicationCommand,
15
+ type CreatePlatformApplicationCommandInput,
16
+ type CreatePlatformApplicationCommandOutput,
17
+ CreatePlatformEndpointCommand,
18
+ type CreatePlatformEndpointCommandInput,
19
+ type CreatePlatformEndpointCommandOutput,
20
+ CreateSMSSandboxPhoneNumberCommand,
21
+ type CreateSMSSandboxPhoneNumberCommandInput,
22
+ type CreateSMSSandboxPhoneNumberCommandOutput,
23
+ CreateTopicCommand,
24
+ type CreateTopicCommandInput,
25
+ type CreateTopicCommandOutput,
26
+ DeleteEndpointCommand,
27
+ type DeleteEndpointCommandInput,
28
+ type DeleteEndpointCommandOutput,
29
+ DeletePlatformApplicationCommand,
30
+ type DeletePlatformApplicationCommandInput,
31
+ type DeletePlatformApplicationCommandOutput,
32
+ DeleteSMSSandboxPhoneNumberCommand,
33
+ type DeleteSMSSandboxPhoneNumberCommandInput,
34
+ type DeleteSMSSandboxPhoneNumberCommandOutput,
35
+ DeleteTopicCommand,
36
+ type DeleteTopicCommandInput,
37
+ type DeleteTopicCommandOutput,
38
+ GetDataProtectionPolicyCommand,
39
+ type GetDataProtectionPolicyCommandInput,
40
+ type GetDataProtectionPolicyCommandOutput,
41
+ GetEndpointAttributesCommand,
42
+ type GetEndpointAttributesCommandInput,
43
+ type GetEndpointAttributesCommandOutput,
44
+ GetPlatformApplicationAttributesCommand,
45
+ type GetPlatformApplicationAttributesCommandInput,
46
+ type GetPlatformApplicationAttributesCommandOutput,
47
+ GetSMSAttributesCommand,
48
+ type GetSMSAttributesCommandInput,
49
+ type GetSMSAttributesCommandOutput,
50
+ GetSMSSandboxAccountStatusCommand,
51
+ type GetSMSSandboxAccountStatusCommandInput,
52
+ type GetSMSSandboxAccountStatusCommandOutput,
53
+ GetSubscriptionAttributesCommand,
54
+ type GetSubscriptionAttributesCommandInput,
55
+ type GetSubscriptionAttributesCommandOutput,
56
+ GetTopicAttributesCommand,
57
+ type GetTopicAttributesCommandInput,
58
+ type GetTopicAttributesCommandOutput,
59
+ ListEndpointsByPlatformApplicationCommand,
60
+ type ListEndpointsByPlatformApplicationCommandInput,
61
+ type ListEndpointsByPlatformApplicationCommandOutput,
62
+ ListOriginationNumbersCommand,
63
+ type ListOriginationNumbersCommandInput,
64
+ type ListOriginationNumbersCommandOutput,
65
+ ListPhoneNumbersOptedOutCommand,
66
+ type ListPhoneNumbersOptedOutCommandInput,
67
+ type ListPhoneNumbersOptedOutCommandOutput,
68
+ ListPlatformApplicationsCommand,
69
+ type ListPlatformApplicationsCommandInput,
70
+ type ListPlatformApplicationsCommandOutput,
71
+ ListSMSSandboxPhoneNumbersCommand,
72
+ type ListSMSSandboxPhoneNumbersCommandInput,
73
+ type ListSMSSandboxPhoneNumbersCommandOutput,
74
+ ListSubscriptionsByTopicCommand,
75
+ type ListSubscriptionsByTopicCommandInput,
76
+ type ListSubscriptionsByTopicCommandOutput,
77
+ ListSubscriptionsCommand,
78
+ type ListSubscriptionsCommandInput,
79
+ type ListSubscriptionsCommandOutput,
80
+ ListTagsForResourceCommand,
81
+ type ListTagsForResourceCommandInput,
82
+ type ListTagsForResourceCommandOutput,
83
+ ListTopicsCommand,
84
+ type ListTopicsCommandInput,
85
+ type ListTopicsCommandOutput,
86
+ OptInPhoneNumberCommand,
87
+ type OptInPhoneNumberCommandInput,
88
+ type OptInPhoneNumberCommandOutput,
89
+ PublishBatchCommand,
90
+ type PublishBatchCommandInput,
91
+ type PublishBatchCommandOutput,
92
+ PublishCommand,
93
+ type PublishCommandInput,
94
+ type PublishCommandOutput,
95
+ PutDataProtectionPolicyCommand,
96
+ type PutDataProtectionPolicyCommandInput,
97
+ type PutDataProtectionPolicyCommandOutput,
98
+ RemovePermissionCommand,
99
+ type RemovePermissionCommandInput,
100
+ type RemovePermissionCommandOutput,
101
+ SetEndpointAttributesCommand,
102
+ type SetEndpointAttributesCommandInput,
103
+ type SetEndpointAttributesCommandOutput,
104
+ SetPlatformApplicationAttributesCommand,
105
+ type SetPlatformApplicationAttributesCommandInput,
106
+ type SetPlatformApplicationAttributesCommandOutput,
107
+ SetSMSAttributesCommand,
108
+ type SetSMSAttributesCommandInput,
109
+ type SetSMSAttributesCommandOutput,
110
+ SetSubscriptionAttributesCommand,
111
+ type SetSubscriptionAttributesCommandInput,
112
+ type SetSubscriptionAttributesCommandOutput,
113
+ SetTopicAttributesCommand,
114
+ type SetTopicAttributesCommandInput,
115
+ type SetTopicAttributesCommandOutput,
116
+ type SNSClient,
117
+ type SNSClientConfig,
118
+ SubscribeCommand,
119
+ type SubscribeCommandInput,
120
+ type SubscribeCommandOutput,
121
+ TagResourceCommand,
122
+ type TagResourceCommandInput,
123
+ type TagResourceCommandOutput,
124
+ UnsubscribeCommand,
125
+ type UnsubscribeCommandInput,
126
+ type UnsubscribeCommandOutput,
127
+ UntagResourceCommand,
128
+ type UntagResourceCommandInput,
129
+ type UntagResourceCommandOutput,
130
+ VerifySMSSandboxPhoneNumberCommand,
131
+ type VerifySMSSandboxPhoneNumberCommandInput,
132
+ type VerifySMSSandboxPhoneNumberCommandOutput,
133
+ } from "@aws-sdk/client-sns";
134
+ import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons";
135
+ import { Service } from "@effect-aws/commons";
136
+ import { Effect, Layer } from "effect";
137
+ import type {
138
+ AuthorizationError,
139
+ BatchEntryIdsNotDistinctError,
140
+ BatchRequestTooLongError,
141
+ ConcurrentAccessError,
142
+ EmptyBatchRequestError,
143
+ EndpointDisabledError,
144
+ FilterPolicyLimitExceededError,
145
+ InternalError,
146
+ InvalidBatchEntryIdError,
147
+ InvalidParameterError,
148
+ InvalidParameterValueError,
149
+ InvalidSecurityError,
150
+ InvalidStateError,
151
+ KMSAccessDeniedError,
152
+ KMSDisabledError,
153
+ KMSInvalidStateError,
154
+ KMSNotFoundError,
155
+ KMSOptInRequiredError,
156
+ KMSThrottlingError,
157
+ NotFoundError,
158
+ OptedOutError,
159
+ PlatformApplicationDisabledError,
160
+ ReplayLimitExceededError,
161
+ ResourceNotFoundError,
162
+ StaleTagError,
163
+ SubscriptionLimitExceededError,
164
+ TagLimitExceededError,
165
+ TagPolicyError,
166
+ ThrottledError,
167
+ TooManyEntriesInBatchRequestError,
168
+ TopicLimitExceededError,
169
+ UserError,
170
+ ValidationError,
171
+ VerificationError,
172
+ } from "./Errors.js";
173
+ import { AllServiceErrors } from "./Errors.js";
174
+ import * as Instance from "./SNSClientInstance.js";
175
+ import * as SNSServiceConfig from "./SNSServiceConfig.js";
176
+
177
+ const commands = {
178
+ AddPermissionCommand,
179
+ CheckIfPhoneNumberIsOptedOutCommand,
180
+ ConfirmSubscriptionCommand,
181
+ CreatePlatformApplicationCommand,
182
+ CreatePlatformEndpointCommand,
183
+ CreateSMSSandboxPhoneNumberCommand,
184
+ CreateTopicCommand,
185
+ DeleteEndpointCommand,
186
+ DeletePlatformApplicationCommand,
187
+ DeleteSMSSandboxPhoneNumberCommand,
188
+ DeleteTopicCommand,
189
+ GetDataProtectionPolicyCommand,
190
+ GetEndpointAttributesCommand,
191
+ GetPlatformApplicationAttributesCommand,
192
+ GetSMSAttributesCommand,
193
+ GetSMSSandboxAccountStatusCommand,
194
+ GetSubscriptionAttributesCommand,
195
+ GetTopicAttributesCommand,
196
+ ListEndpointsByPlatformApplicationCommand,
197
+ ListOriginationNumbersCommand,
198
+ ListPhoneNumbersOptedOutCommand,
199
+ ListPlatformApplicationsCommand,
200
+ ListSMSSandboxPhoneNumbersCommand,
201
+ ListSubscriptionsCommand,
202
+ ListSubscriptionsByTopicCommand,
203
+ ListTagsForResourceCommand,
204
+ ListTopicsCommand,
205
+ OptInPhoneNumberCommand,
206
+ PublishCommand,
207
+ PublishBatchCommand,
208
+ PutDataProtectionPolicyCommand,
209
+ RemovePermissionCommand,
210
+ SetEndpointAttributesCommand,
211
+ SetPlatformApplicationAttributesCommand,
212
+ SetSMSAttributesCommand,
213
+ SetSubscriptionAttributesCommand,
214
+ SetTopicAttributesCommand,
215
+ SubscribeCommand,
216
+ TagResourceCommand,
217
+ UnsubscribeCommand,
218
+ UntagResourceCommand,
219
+ VerifySMSSandboxPhoneNumberCommand,
220
+ };
221
+
222
+ interface SNSService$ {
223
+ readonly _: unique symbol;
224
+
225
+ /**
226
+ * @see {@link AddPermissionCommand}
227
+ */
228
+ addPermission(
229
+ args: AddPermissionCommandInput,
230
+ options?: HttpHandlerOptions,
231
+ ): Effect.Effect<
232
+ AddPermissionCommandOutput,
233
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | NotFoundError
234
+ >;
235
+
236
+ /**
237
+ * @see {@link CheckIfPhoneNumberIsOptedOutCommand}
238
+ */
239
+ checkIfPhoneNumberIsOptedOut(
240
+ args: CheckIfPhoneNumberIsOptedOutCommandInput,
241
+ options?: HttpHandlerOptions,
242
+ ): Effect.Effect<
243
+ CheckIfPhoneNumberIsOptedOutCommandOutput,
244
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | ThrottledError
245
+ >;
246
+
247
+ /**
248
+ * @see {@link ConfirmSubscriptionCommand}
249
+ */
250
+ confirmSubscription(
251
+ args: ConfirmSubscriptionCommandInput,
252
+ options?: HttpHandlerOptions,
253
+ ): Effect.Effect<
254
+ ConfirmSubscriptionCommandOutput,
255
+ | SdkError
256
+ | AuthorizationError
257
+ | FilterPolicyLimitExceededError
258
+ | InternalError
259
+ | InvalidParameterError
260
+ | NotFoundError
261
+ | ReplayLimitExceededError
262
+ | SubscriptionLimitExceededError
263
+ >;
264
+
265
+ /**
266
+ * @see {@link CreatePlatformApplicationCommand}
267
+ */
268
+ createPlatformApplication(
269
+ args: CreatePlatformApplicationCommandInput,
270
+ options?: HttpHandlerOptions,
271
+ ): Effect.Effect<
272
+ CreatePlatformApplicationCommandOutput,
273
+ SdkError | AuthorizationError | InternalError | InvalidParameterError
274
+ >;
275
+
276
+ /**
277
+ * @see {@link CreatePlatformEndpointCommand}
278
+ */
279
+ createPlatformEndpoint(
280
+ args: CreatePlatformEndpointCommandInput,
281
+ options?: HttpHandlerOptions,
282
+ ): Effect.Effect<
283
+ CreatePlatformEndpointCommandOutput,
284
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | NotFoundError
285
+ >;
286
+
287
+ /**
288
+ * @see {@link CreateSMSSandboxPhoneNumberCommand}
289
+ */
290
+ createSMSSandboxPhoneNumber(
291
+ args: CreateSMSSandboxPhoneNumberCommandInput,
292
+ options?: HttpHandlerOptions,
293
+ ): Effect.Effect<
294
+ CreateSMSSandboxPhoneNumberCommandOutput,
295
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | OptedOutError | ThrottledError | UserError
296
+ >;
297
+
298
+ /**
299
+ * @see {@link CreateTopicCommand}
300
+ */
301
+ createTopic(
302
+ args: CreateTopicCommandInput,
303
+ options?: HttpHandlerOptions,
304
+ ): Effect.Effect<
305
+ CreateTopicCommandOutput,
306
+ | SdkError
307
+ | AuthorizationError
308
+ | ConcurrentAccessError
309
+ | InternalError
310
+ | InvalidParameterError
311
+ | InvalidSecurityError
312
+ | StaleTagError
313
+ | TagLimitExceededError
314
+ | TagPolicyError
315
+ | TopicLimitExceededError
316
+ >;
317
+
318
+ /**
319
+ * @see {@link DeleteEndpointCommand}
320
+ */
321
+ deleteEndpoint(
322
+ args: DeleteEndpointCommandInput,
323
+ options?: HttpHandlerOptions,
324
+ ): Effect.Effect<
325
+ DeleteEndpointCommandOutput,
326
+ SdkError | AuthorizationError | InternalError | InvalidParameterError
327
+ >;
328
+
329
+ /**
330
+ * @see {@link DeletePlatformApplicationCommand}
331
+ */
332
+ deletePlatformApplication(
333
+ args: DeletePlatformApplicationCommandInput,
334
+ options?: HttpHandlerOptions,
335
+ ): Effect.Effect<
336
+ DeletePlatformApplicationCommandOutput,
337
+ SdkError | AuthorizationError | InternalError | InvalidParameterError
338
+ >;
339
+
340
+ /**
341
+ * @see {@link DeleteSMSSandboxPhoneNumberCommand}
342
+ */
343
+ deleteSMSSandboxPhoneNumber(
344
+ args: DeleteSMSSandboxPhoneNumberCommandInput,
345
+ options?: HttpHandlerOptions,
346
+ ): Effect.Effect<
347
+ DeleteSMSSandboxPhoneNumberCommandOutput,
348
+ | SdkError
349
+ | AuthorizationError
350
+ | InternalError
351
+ | InvalidParameterError
352
+ | ResourceNotFoundError
353
+ | ThrottledError
354
+ | UserError
355
+ >;
356
+
357
+ /**
358
+ * @see {@link DeleteTopicCommand}
359
+ */
360
+ deleteTopic(
361
+ args: DeleteTopicCommandInput,
362
+ options?: HttpHandlerOptions,
363
+ ): Effect.Effect<
364
+ DeleteTopicCommandOutput,
365
+ | SdkError
366
+ | AuthorizationError
367
+ | ConcurrentAccessError
368
+ | InternalError
369
+ | InvalidParameterError
370
+ | InvalidStateError
371
+ | NotFoundError
372
+ | StaleTagError
373
+ | TagPolicyError
374
+ >;
375
+
376
+ /**
377
+ * @see {@link GetDataProtectionPolicyCommand}
378
+ */
379
+ getDataProtectionPolicy(
380
+ args: GetDataProtectionPolicyCommandInput,
381
+ options?: HttpHandlerOptions,
382
+ ): Effect.Effect<
383
+ GetDataProtectionPolicyCommandOutput,
384
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | InvalidSecurityError | NotFoundError
385
+ >;
386
+
387
+ /**
388
+ * @see {@link GetEndpointAttributesCommand}
389
+ */
390
+ getEndpointAttributes(
391
+ args: GetEndpointAttributesCommandInput,
392
+ options?: HttpHandlerOptions,
393
+ ): Effect.Effect<
394
+ GetEndpointAttributesCommandOutput,
395
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | NotFoundError
396
+ >;
397
+
398
+ /**
399
+ * @see {@link GetPlatformApplicationAttributesCommand}
400
+ */
401
+ getPlatformApplicationAttributes(
402
+ args: GetPlatformApplicationAttributesCommandInput,
403
+ options?: HttpHandlerOptions,
404
+ ): Effect.Effect<
405
+ GetPlatformApplicationAttributesCommandOutput,
406
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | NotFoundError
407
+ >;
408
+
409
+ /**
410
+ * @see {@link GetSMSAttributesCommand}
411
+ */
412
+ getSMSAttributes(
413
+ args: GetSMSAttributesCommandInput,
414
+ options?: HttpHandlerOptions,
415
+ ): Effect.Effect<
416
+ GetSMSAttributesCommandOutput,
417
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | ThrottledError
418
+ >;
419
+
420
+ /**
421
+ * @see {@link GetSMSSandboxAccountStatusCommand}
422
+ */
423
+ getSMSSandboxAccountStatus(
424
+ args: GetSMSSandboxAccountStatusCommandInput,
425
+ options?: HttpHandlerOptions,
426
+ ): Effect.Effect<
427
+ GetSMSSandboxAccountStatusCommandOutput,
428
+ SdkError | AuthorizationError | InternalError | ThrottledError
429
+ >;
430
+
431
+ /**
432
+ * @see {@link GetSubscriptionAttributesCommand}
433
+ */
434
+ getSubscriptionAttributes(
435
+ args: GetSubscriptionAttributesCommandInput,
436
+ options?: HttpHandlerOptions,
437
+ ): Effect.Effect<
438
+ GetSubscriptionAttributesCommandOutput,
439
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | NotFoundError
440
+ >;
441
+
442
+ /**
443
+ * @see {@link GetTopicAttributesCommand}
444
+ */
445
+ getTopicAttributes(
446
+ args: GetTopicAttributesCommandInput,
447
+ options?: HttpHandlerOptions,
448
+ ): Effect.Effect<
449
+ GetTopicAttributesCommandOutput,
450
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | InvalidSecurityError | NotFoundError
451
+ >;
452
+
453
+ /**
454
+ * @see {@link ListEndpointsByPlatformApplicationCommand}
455
+ */
456
+ listEndpointsByPlatformApplication(
457
+ args: ListEndpointsByPlatformApplicationCommandInput,
458
+ options?: HttpHandlerOptions,
459
+ ): Effect.Effect<
460
+ ListEndpointsByPlatformApplicationCommandOutput,
461
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | NotFoundError
462
+ >;
463
+
464
+ /**
465
+ * @see {@link ListOriginationNumbersCommand}
466
+ */
467
+ listOriginationNumbers(
468
+ args: ListOriginationNumbersCommandInput,
469
+ options?: HttpHandlerOptions,
470
+ ): Effect.Effect<
471
+ ListOriginationNumbersCommandOutput,
472
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | ThrottledError | ValidationError
473
+ >;
474
+
475
+ /**
476
+ * @see {@link ListPhoneNumbersOptedOutCommand}
477
+ */
478
+ listPhoneNumbersOptedOut(
479
+ args: ListPhoneNumbersOptedOutCommandInput,
480
+ options?: HttpHandlerOptions,
481
+ ): Effect.Effect<
482
+ ListPhoneNumbersOptedOutCommandOutput,
483
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | ThrottledError
484
+ >;
485
+
486
+ /**
487
+ * @see {@link ListPlatformApplicationsCommand}
488
+ */
489
+ listPlatformApplications(
490
+ args: ListPlatformApplicationsCommandInput,
491
+ options?: HttpHandlerOptions,
492
+ ): Effect.Effect<
493
+ ListPlatformApplicationsCommandOutput,
494
+ SdkError | AuthorizationError | InternalError | InvalidParameterError
495
+ >;
496
+
497
+ /**
498
+ * @see {@link ListSMSSandboxPhoneNumbersCommand}
499
+ */
500
+ listSMSSandboxPhoneNumbers(
501
+ args: ListSMSSandboxPhoneNumbersCommandInput,
502
+ options?: HttpHandlerOptions,
503
+ ): Effect.Effect<
504
+ ListSMSSandboxPhoneNumbersCommandOutput,
505
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | ResourceNotFoundError | ThrottledError
506
+ >;
507
+
508
+ /**
509
+ * @see {@link ListSubscriptionsCommand}
510
+ */
511
+ listSubscriptions(
512
+ args: ListSubscriptionsCommandInput,
513
+ options?: HttpHandlerOptions,
514
+ ): Effect.Effect<
515
+ ListSubscriptionsCommandOutput,
516
+ SdkError | AuthorizationError | InternalError | InvalidParameterError
517
+ >;
518
+
519
+ /**
520
+ * @see {@link ListSubscriptionsByTopicCommand}
521
+ */
522
+ listSubscriptionsByTopic(
523
+ args: ListSubscriptionsByTopicCommandInput,
524
+ options?: HttpHandlerOptions,
525
+ ): Effect.Effect<
526
+ ListSubscriptionsByTopicCommandOutput,
527
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | NotFoundError
528
+ >;
529
+
530
+ /**
531
+ * @see {@link ListTagsForResourceCommand}
532
+ */
533
+ listTagsForResource(
534
+ args: ListTagsForResourceCommandInput,
535
+ options?: HttpHandlerOptions,
536
+ ): Effect.Effect<
537
+ ListTagsForResourceCommandOutput,
538
+ | SdkError
539
+ | AuthorizationError
540
+ | ConcurrentAccessError
541
+ | InvalidParameterError
542
+ | ResourceNotFoundError
543
+ | TagPolicyError
544
+ >;
545
+
546
+ /**
547
+ * @see {@link ListTopicsCommand}
548
+ */
549
+ listTopics(
550
+ args: ListTopicsCommandInput,
551
+ options?: HttpHandlerOptions,
552
+ ): Effect.Effect<
553
+ ListTopicsCommandOutput,
554
+ SdkError | AuthorizationError | InternalError | InvalidParameterError
555
+ >;
556
+
557
+ /**
558
+ * @see {@link OptInPhoneNumberCommand}
559
+ */
560
+ optInPhoneNumber(
561
+ args: OptInPhoneNumberCommandInput,
562
+ options?: HttpHandlerOptions,
563
+ ): Effect.Effect<
564
+ OptInPhoneNumberCommandOutput,
565
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | ThrottledError
566
+ >;
567
+
568
+ /**
569
+ * @see {@link PublishCommand}
570
+ */
571
+ publish(
572
+ args: PublishCommandInput,
573
+ options?: HttpHandlerOptions,
574
+ ): Effect.Effect<
575
+ PublishCommandOutput,
576
+ | SdkError
577
+ | AuthorizationError
578
+ | EndpointDisabledError
579
+ | InternalError
580
+ | InvalidParameterError
581
+ | InvalidParameterValueError
582
+ | InvalidSecurityError
583
+ | KMSAccessDeniedError
584
+ | KMSDisabledError
585
+ | KMSInvalidStateError
586
+ | KMSNotFoundError
587
+ | KMSOptInRequiredError
588
+ | KMSThrottlingError
589
+ | NotFoundError
590
+ | PlatformApplicationDisabledError
591
+ | ValidationError
592
+ >;
593
+
594
+ /**
595
+ * @see {@link PublishBatchCommand}
596
+ */
597
+ publishBatch(
598
+ args: PublishBatchCommandInput,
599
+ options?: HttpHandlerOptions,
600
+ ): Effect.Effect<
601
+ PublishBatchCommandOutput,
602
+ | SdkError
603
+ | AuthorizationError
604
+ | BatchEntryIdsNotDistinctError
605
+ | BatchRequestTooLongError
606
+ | EmptyBatchRequestError
607
+ | EndpointDisabledError
608
+ | InternalError
609
+ | InvalidBatchEntryIdError
610
+ | InvalidParameterError
611
+ | InvalidParameterValueError
612
+ | InvalidSecurityError
613
+ | KMSAccessDeniedError
614
+ | KMSDisabledError
615
+ | KMSInvalidStateError
616
+ | KMSNotFoundError
617
+ | KMSOptInRequiredError
618
+ | KMSThrottlingError
619
+ | NotFoundError
620
+ | PlatformApplicationDisabledError
621
+ | TooManyEntriesInBatchRequestError
622
+ | ValidationError
623
+ >;
624
+
625
+ /**
626
+ * @see {@link PutDataProtectionPolicyCommand}
627
+ */
628
+ putDataProtectionPolicy(
629
+ args: PutDataProtectionPolicyCommandInput,
630
+ options?: HttpHandlerOptions,
631
+ ): Effect.Effect<
632
+ PutDataProtectionPolicyCommandOutput,
633
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | InvalidSecurityError | NotFoundError
634
+ >;
635
+
636
+ /**
637
+ * @see {@link RemovePermissionCommand}
638
+ */
639
+ removePermission(
640
+ args: RemovePermissionCommandInput,
641
+ options?: HttpHandlerOptions,
642
+ ): Effect.Effect<
643
+ RemovePermissionCommandOutput,
644
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | NotFoundError
645
+ >;
646
+
647
+ /**
648
+ * @see {@link SetEndpointAttributesCommand}
649
+ */
650
+ setEndpointAttributes(
651
+ args: SetEndpointAttributesCommandInput,
652
+ options?: HttpHandlerOptions,
653
+ ): Effect.Effect<
654
+ SetEndpointAttributesCommandOutput,
655
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | NotFoundError
656
+ >;
657
+
658
+ /**
659
+ * @see {@link SetPlatformApplicationAttributesCommand}
660
+ */
661
+ setPlatformApplicationAttributes(
662
+ args: SetPlatformApplicationAttributesCommandInput,
663
+ options?: HttpHandlerOptions,
664
+ ): Effect.Effect<
665
+ SetPlatformApplicationAttributesCommandOutput,
666
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | NotFoundError
667
+ >;
668
+
669
+ /**
670
+ * @see {@link SetSMSAttributesCommand}
671
+ */
672
+ setSMSAttributes(
673
+ args: SetSMSAttributesCommandInput,
674
+ options?: HttpHandlerOptions,
675
+ ): Effect.Effect<
676
+ SetSMSAttributesCommandOutput,
677
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | ThrottledError
678
+ >;
679
+
680
+ /**
681
+ * @see {@link SetSubscriptionAttributesCommand}
682
+ */
683
+ setSubscriptionAttributes(
684
+ args: SetSubscriptionAttributesCommandInput,
685
+ options?: HttpHandlerOptions,
686
+ ): Effect.Effect<
687
+ SetSubscriptionAttributesCommandOutput,
688
+ | SdkError
689
+ | AuthorizationError
690
+ | FilterPolicyLimitExceededError
691
+ | InternalError
692
+ | InvalidParameterError
693
+ | NotFoundError
694
+ | ReplayLimitExceededError
695
+ >;
696
+
697
+ /**
698
+ * @see {@link SetTopicAttributesCommand}
699
+ */
700
+ setTopicAttributes(
701
+ args: SetTopicAttributesCommandInput,
702
+ options?: HttpHandlerOptions,
703
+ ): Effect.Effect<
704
+ SetTopicAttributesCommandOutput,
705
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | InvalidSecurityError | NotFoundError
706
+ >;
707
+
708
+ /**
709
+ * @see {@link SubscribeCommand}
710
+ */
711
+ subscribe(
712
+ args: SubscribeCommandInput,
713
+ options?: HttpHandlerOptions,
714
+ ): Effect.Effect<
715
+ SubscribeCommandOutput,
716
+ | SdkError
717
+ | AuthorizationError
718
+ | FilterPolicyLimitExceededError
719
+ | InternalError
720
+ | InvalidParameterError
721
+ | InvalidSecurityError
722
+ | NotFoundError
723
+ | ReplayLimitExceededError
724
+ | SubscriptionLimitExceededError
725
+ >;
726
+
727
+ /**
728
+ * @see {@link TagResourceCommand}
729
+ */
730
+ tagResource(
731
+ args: TagResourceCommandInput,
732
+ options?: HttpHandlerOptions,
733
+ ): Effect.Effect<
734
+ TagResourceCommandOutput,
735
+ | SdkError
736
+ | AuthorizationError
737
+ | ConcurrentAccessError
738
+ | InvalidParameterError
739
+ | ResourceNotFoundError
740
+ | StaleTagError
741
+ | TagLimitExceededError
742
+ | TagPolicyError
743
+ >;
744
+
745
+ /**
746
+ * @see {@link UnsubscribeCommand}
747
+ */
748
+ unsubscribe(
749
+ args: UnsubscribeCommandInput,
750
+ options?: HttpHandlerOptions,
751
+ ): Effect.Effect<
752
+ UnsubscribeCommandOutput,
753
+ SdkError | AuthorizationError | InternalError | InvalidParameterError | InvalidSecurityError | NotFoundError
754
+ >;
755
+
756
+ /**
757
+ * @see {@link UntagResourceCommand}
758
+ */
759
+ untagResource(
760
+ args: UntagResourceCommandInput,
761
+ options?: HttpHandlerOptions,
762
+ ): Effect.Effect<
763
+ UntagResourceCommandOutput,
764
+ | SdkError
765
+ | AuthorizationError
766
+ | ConcurrentAccessError
767
+ | InvalidParameterError
768
+ | ResourceNotFoundError
769
+ | StaleTagError
770
+ | TagLimitExceededError
771
+ | TagPolicyError
772
+ >;
773
+
774
+ /**
775
+ * @see {@link VerifySMSSandboxPhoneNumberCommand}
776
+ */
777
+ verifySMSSandboxPhoneNumber(
778
+ args: VerifySMSSandboxPhoneNumberCommandInput,
779
+ options?: HttpHandlerOptions,
780
+ ): Effect.Effect<
781
+ VerifySMSSandboxPhoneNumberCommandOutput,
782
+ | SdkError
783
+ | AuthorizationError
784
+ | InternalError
785
+ | InvalidParameterError
786
+ | ResourceNotFoundError
787
+ | ThrottledError
788
+ | VerificationError
789
+ >;
790
+ }
791
+
792
+ /**
793
+ * @since 1.0.0
794
+ * @category constructors
795
+ */
796
+ export const makeSNSService = Effect.gen(function*() {
797
+ const client = yield* Instance.SNSClientInstance;
798
+
799
+ return Service.fromClientAndCommands<SNSService$>(client, commands, AllServiceErrors);
800
+ });
801
+
802
+ /**
803
+ * @since 1.0.0
804
+ * @category models
805
+ */
806
+ export class SNSService extends Effect.Tag("@effect-aws/client-sns/SNSService")<
807
+ SNSService,
808
+ SNSService$
809
+ >() {
810
+ static readonly defaultLayer = Layer.effect(this, makeSNSService).pipe(Layer.provide(Instance.layer));
811
+ static readonly layer = (config: SNSService.Config) =>
812
+ Layer.effect(this, makeSNSService).pipe(
813
+ Layer.provide(Instance.layer),
814
+ Layer.provide(SNSServiceConfig.setSNSServiceConfig(config)),
815
+ );
816
+ static readonly baseLayer = (
817
+ evaluate: (defaultConfig: SNSClientConfig) => SNSClient,
818
+ ) =>
819
+ Layer.effect(this, makeSNSService).pipe(
820
+ Layer.provide(
821
+ Layer.effect(
822
+ Instance.SNSClientInstance,
823
+ Effect.map(SNSServiceConfig.toSNSClientConfig, evaluate),
824
+ ),
825
+ ),
826
+ );
827
+ }
828
+
829
+ /**
830
+ * @since 1.0.0
831
+ */
832
+ export declare namespace SNSService {
833
+ /**
834
+ * @since 1.0.0
835
+ */
836
+ export interface Config extends Omit<SNSClientConfig, "logger"> {
837
+ readonly logger?: ServiceLogger.ServiceLoggerConstructorProps | true;
838
+ }
839
+ }