@distilled.cloud/cloudflare 0.12.2 → 0.12.4

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 (41) hide show
  1. package/lib/services/accounts.d.ts +52 -52
  2. package/lib/services/accounts.d.ts.map +1 -1
  3. package/lib/services/accounts.js +1533 -569
  4. package/lib/services/accounts.js.map +1 -1
  5. package/lib/services/d1.d.ts +7 -1
  6. package/lib/services/d1.d.ts.map +1 -1
  7. package/lib/services/d1.js +4 -1
  8. package/lib/services/d1.js.map +1 -1
  9. package/lib/services/pipelines.d.ts +35 -5
  10. package/lib/services/pipelines.d.ts.map +1 -1
  11. package/lib/services/pipelines.js +25 -6
  12. package/lib/services/pipelines.js.map +1 -1
  13. package/lib/services/queues.d.ts +24 -6
  14. package/lib/services/queues.d.ts.map +1 -1
  15. package/lib/services/queues.js +31 -7
  16. package/lib/services/queues.js.map +1 -1
  17. package/lib/services/r2.d.ts +15 -3
  18. package/lib/services/r2.d.ts.map +1 -1
  19. package/lib/services/r2.js +18 -2
  20. package/lib/services/r2.js.map +1 -1
  21. package/lib/services/user.d.ts +36 -5
  22. package/lib/services/user.d.ts.map +1 -1
  23. package/lib/services/user.js +32 -5
  24. package/lib/services/user.js.map +1 -1
  25. package/lib/services/workers.d.ts +7 -1
  26. package/lib/services/workers.d.ts.map +1 -1
  27. package/lib/services/workers.js +4 -1
  28. package/lib/services/workers.js.map +1 -1
  29. package/lib/services/workflows.d.ts +8 -2
  30. package/lib/services/workflows.d.ts.map +1 -1
  31. package/lib/services/workflows.js +5 -2
  32. package/lib/services/workflows.js.map +1 -1
  33. package/package.json +2 -2
  34. package/src/services/accounts.ts +3546 -1036
  35. package/src/services/d1.ts +9 -2
  36. package/src/services/pipelines.ts +56 -11
  37. package/src/services/queues.ts +48 -7
  38. package/src/services/r2.ts +27 -2
  39. package/src/services/user.ts +66 -10
  40. package/src/services/workers.ts +11 -2
  41. package/src/services/workflows.ts +10 -2
@@ -16,6 +16,12 @@ import { type DefaultErrors } from "../errors.ts";
16
16
  // Errors
17
17
  // =============================================================================
18
18
 
19
+ export class DatabaseAlreadyExists extends Schema.TaggedErrorClass<DatabaseAlreadyExists>()(
20
+ "DatabaseAlreadyExists",
21
+ { code: Schema.Number, message: Schema.String },
22
+ ) {}
23
+ T.applyErrorMatchers(DatabaseAlreadyExists, [{ code: 7502 }]);
24
+
19
25
  export class DatabaseNotFound extends Schema.TaggedErrorClass<DatabaseNotFound>()(
20
26
  "DatabaseNotFound",
21
27
  { code: Schema.Number, message: Schema.String },
@@ -370,7 +376,8 @@ export const CreateDatabaseResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
370
376
  export type CreateDatabaseError =
371
377
  | DefaultErrors
372
378
  | InvalidObjectIdentifier
373
- | InvalidProperty;
379
+ | InvalidProperty
380
+ | DatabaseAlreadyExists;
374
381
 
375
382
  export const createDatabase: API.OperationMethod<
376
383
  CreateDatabaseRequest,
@@ -380,7 +387,7 @@ export const createDatabase: API.OperationMethod<
380
387
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
381
388
  input: CreateDatabaseRequest,
382
389
  output: CreateDatabaseResponse,
383
- errors: [InvalidObjectIdentifier, InvalidProperty],
390
+ errors: [InvalidObjectIdentifier, InvalidProperty, DatabaseAlreadyExists],
384
391
  }));
385
392
 
386
393
  export interface UpdateDatabaseRequest {
@@ -17,12 +17,24 @@ import { SensitiveString } from "../sensitive.ts";
17
17
  // Errors
18
18
  // =============================================================================
19
19
 
20
+ export class InvalidSinkConfig extends Schema.TaggedErrorClass<InvalidSinkConfig>()(
21
+ "InvalidSinkConfig",
22
+ { code: Schema.Number, message: Schema.String },
23
+ ) {}
24
+ T.applyErrorMatchers(InvalidSinkConfig, [{ code: 1012 }]);
25
+
20
26
  export class InvalidSinkId extends Schema.TaggedErrorClass<InvalidSinkId>()(
21
27
  "InvalidSinkId",
22
28
  { code: Schema.Number, message: Schema.String },
23
29
  ) {}
24
30
  T.applyErrorMatchers(InvalidSinkId, [{ code: 2 }]);
25
31
 
32
+ export class InvalidSql extends Schema.TaggedErrorClass<InvalidSql>()(
33
+ "InvalidSql",
34
+ { code: Schema.Number, message: Schema.String },
35
+ ) {}
36
+ T.applyErrorMatchers(InvalidSql, [{ code: 1014 }]);
37
+
26
38
  export class InvalidStreamId extends Schema.TaggedErrorClass<InvalidStreamId>()(
27
39
  "InvalidStreamId",
28
40
  { code: Schema.Number, message: Schema.String },
@@ -35,12 +47,32 @@ export class InvalidStreamName extends Schema.TaggedErrorClass<InvalidStreamName
35
47
  ) {}
36
48
  T.applyErrorMatchers(InvalidStreamName, [{ code: 2 }]);
37
49
 
50
+ export class PipelineAlreadyExists extends Schema.TaggedErrorClass<PipelineAlreadyExists>()(
51
+ "PipelineAlreadyExists",
52
+ { code: Schema.Number, message: Schema.String },
53
+ ) {}
54
+ T.applyErrorMatchers(PipelineAlreadyExists, [{ code: 1003 }]);
55
+
38
56
  export class PipelineNotExists extends Schema.TaggedErrorClass<PipelineNotExists>()(
39
57
  "PipelineNotExists",
40
58
  { code: Schema.Number, message: Schema.String },
41
59
  ) {}
42
60
  T.applyErrorMatchers(PipelineNotExists, [{ code: 1000 }]);
43
61
 
62
+ export class SinkAlreadyExists extends Schema.TaggedErrorClass<SinkAlreadyExists>()(
63
+ "SinkAlreadyExists",
64
+ { code: Schema.Number, message: Schema.String },
65
+ ) {}
66
+ T.applyErrorMatchers(SinkAlreadyExists, [{ code: 1003 }]);
67
+
68
+ export class SinkAuthFailed extends Schema.TaggedErrorClass<SinkAuthFailed>()(
69
+ "SinkAuthFailed",
70
+ { code: Schema.Number, message: Schema.String },
71
+ ) {}
72
+ T.applyErrorMatchers(SinkAuthFailed, [
73
+ { code: 1012, message: { includes: "could not authenticate" } },
74
+ ]);
75
+
44
76
  export class SinkNotFound extends Schema.TaggedErrorClass<SinkNotFound>()(
45
77
  "SinkNotFound",
46
78
  { code: Schema.Number, message: Schema.String },
@@ -63,7 +95,9 @@ export class TableNotFound extends Schema.TaggedErrorClass<TableNotFound>()(
63
95
  "TableNotFound",
64
96
  { code: Schema.Number, message: Schema.String },
65
97
  ) {}
66
- T.applyErrorMatchers(TableNotFound, [{ code: 1014 }]);
98
+ T.applyErrorMatchers(TableNotFound, [
99
+ { code: 1014, message: { includes: "not found" } },
100
+ ]);
67
101
 
68
102
  // =============================================================================
69
103
  // Pipeline
@@ -3328,7 +3362,11 @@ export const CreateSinkResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3328
3362
  T.ResponsePath("result"),
3329
3363
  ) as unknown as Schema.Schema<CreateSinkResponse>;
3330
3364
 
3331
- export type CreateSinkError = DefaultErrors;
3365
+ export type CreateSinkError =
3366
+ | DefaultErrors
3367
+ | SinkAuthFailed
3368
+ | InvalidSinkConfig
3369
+ | SinkAlreadyExists;
3332
3370
 
3333
3371
  export const createSink: API.OperationMethod<
3334
3372
  CreateSinkRequest,
@@ -3338,7 +3376,7 @@ export const createSink: API.OperationMethod<
3338
3376
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3339
3377
  input: CreateSinkRequest,
3340
3378
  output: CreateSinkResponse,
3341
- errors: [],
3379
+ errors: [SinkAuthFailed, InvalidSinkConfig, SinkAlreadyExists],
3342
3380
  }));
3343
3381
 
3344
3382
  export interface DeleteSinkRequest {
@@ -3466,7 +3504,10 @@ export const ValidateSqlPipelineResponse =
3466
3504
  T.ResponsePath("result"),
3467
3505
  ) as unknown as Schema.Schema<ValidateSqlPipelineResponse>;
3468
3506
 
3469
- export type ValidateSqlPipelineError = DefaultErrors | TableNotFound;
3507
+ export type ValidateSqlPipelineError =
3508
+ | DefaultErrors
3509
+ | TableNotFound
3510
+ | InvalidSql;
3470
3511
 
3471
3512
  export const validateSqlPipeline: API.OperationMethod<
3472
3513
  ValidateSqlPipelineRequest,
@@ -3476,7 +3517,7 @@ export const validateSqlPipeline: API.OperationMethod<
3476
3517
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3477
3518
  input: ValidateSqlPipelineRequest,
3478
3519
  output: ValidateSqlPipelineResponse,
3479
- errors: [TableNotFound],
3520
+ errors: [TableNotFound, InvalidSql],
3480
3521
  }));
3481
3522
 
3482
3523
  // =============================================================================
@@ -5863,7 +5904,7 @@ export const GetV1PipelineResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
5863
5904
  T.ResponsePath("result"),
5864
5905
  ) as unknown as Schema.Schema<GetV1PipelineResponse>;
5865
5906
 
5866
- export type GetV1PipelineError = DefaultErrors;
5907
+ export type GetV1PipelineError = DefaultErrors | PipelineNotExists;
5867
5908
 
5868
5909
  export const getV1Pipeline: API.OperationMethod<
5869
5910
  GetV1PipelineRequest,
@@ -5873,7 +5914,7 @@ export const getV1Pipeline: API.OperationMethod<
5873
5914
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
5874
5915
  input: GetV1PipelineRequest,
5875
5916
  output: GetV1PipelineResponse,
5876
- errors: [],
5917
+ errors: [PipelineNotExists],
5877
5918
  }));
5878
5919
 
5879
5920
  export interface ListV1PipelineRequest {
@@ -6030,7 +6071,11 @@ export const CreateV1PipelineResponse =
6030
6071
  T.ResponsePath("result"),
6031
6072
  ) as unknown as Schema.Schema<CreateV1PipelineResponse>;
6032
6073
 
6033
- export type CreateV1PipelineError = DefaultErrors;
6074
+ export type CreateV1PipelineError =
6075
+ | DefaultErrors
6076
+ | TableNotFound
6077
+ | InvalidSql
6078
+ | PipelineAlreadyExists;
6034
6079
 
6035
6080
  export const createV1Pipeline: API.OperationMethod<
6036
6081
  CreateV1PipelineRequest,
@@ -6040,7 +6085,7 @@ export const createV1Pipeline: API.OperationMethod<
6040
6085
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
6041
6086
  input: CreateV1PipelineRequest,
6042
6087
  output: CreateV1PipelineResponse,
6043
- errors: [],
6088
+ errors: [TableNotFound, InvalidSql, PipelineAlreadyExists],
6044
6089
  }));
6045
6090
 
6046
6091
  export interface DeleteV1PipelineRequest {
@@ -6065,7 +6110,7 @@ export type DeleteV1PipelineResponse = unknown;
6065
6110
  export const DeleteV1PipelineResponse =
6066
6111
  /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<DeleteV1PipelineResponse>;
6067
6112
 
6068
- export type DeleteV1PipelineError = DefaultErrors;
6113
+ export type DeleteV1PipelineError = DefaultErrors | PipelineNotExists;
6069
6114
 
6070
6115
  export const deleteV1Pipeline: API.OperationMethod<
6071
6116
  DeleteV1PipelineRequest,
@@ -6075,5 +6120,5 @@ export const deleteV1Pipeline: API.OperationMethod<
6075
6120
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
6076
6121
  input: DeleteV1PipelineRequest,
6077
6122
  output: DeleteV1PipelineResponse,
6078
- errors: [],
6123
+ errors: [PipelineNotExists],
6079
6124
  }));
@@ -16,6 +16,18 @@ import { type DefaultErrors } from "../errors.ts";
16
16
  // Errors
17
17
  // =============================================================================
18
18
 
19
+ export class ConsumerAlreadyExists extends Schema.TaggedErrorClass<ConsumerAlreadyExists>()(
20
+ "ConsumerAlreadyExists",
21
+ { code: Schema.Number, message: Schema.String },
22
+ ) {}
23
+ T.applyErrorMatchers(ConsumerAlreadyExists, [{ code: 11004 }]);
24
+
25
+ export class ConsumerNotFound extends Schema.TaggedErrorClass<ConsumerNotFound>()(
26
+ "ConsumerNotFound",
27
+ { code: Schema.Number, message: Schema.String },
28
+ ) {}
29
+ T.applyErrorMatchers(ConsumerNotFound, [{ code: 10105 }, { code: 11006 }]);
30
+
19
31
  export class InvalidMessageBody extends Schema.TaggedErrorClass<InvalidMessageBody>()(
20
32
  "InvalidMessageBody",
21
33
  { code: Schema.Number, message: Schema.String },
@@ -56,7 +68,10 @@ export class QueueNotFound extends Schema.TaggedErrorClass<QueueNotFound>()(
56
68
  "QueueNotFound",
57
69
  { code: Schema.Number, message: Schema.String },
58
70
  ) {}
59
- T.applyErrorMatchers(QueueNotFound, [{ code: 11000 }]);
71
+ T.applyErrorMatchers(QueueNotFound, [
72
+ { code: 11000 },
73
+ { code: 0, message: { includes: "Queue does not exist" } },
74
+ ]);
60
75
 
61
76
  export class UnrecognizedEventType extends Schema.TaggedErrorClass<UnrecognizedEventType>()(
62
77
  "UnrecognizedEventType",
@@ -66,6 +81,12 @@ T.applyErrorMatchers(UnrecognizedEventType, [
66
81
  { code: 0, message: { includes: "Unrecognized event types" } },
67
82
  ]);
68
83
 
84
+ export class WorkerNotFound extends Schema.TaggedErrorClass<WorkerNotFound>()(
85
+ "WorkerNotFound",
86
+ { code: Schema.Number, message: Schema.String },
87
+ ) {}
88
+ T.applyErrorMatchers(WorkerNotFound, [{ code: 10007 }]);
89
+
69
90
  // =============================================================================
70
91
  // Consumer
71
92
  // =============================================================================
@@ -215,6 +236,7 @@ export type GetConsumerError =
215
236
  | DefaultErrors
216
237
  | InvalidRequestBody
217
238
  | QueueNotFound
239
+ | ConsumerNotFound
218
240
  | InvalidRoute;
219
241
 
220
242
  export const getConsumer: API.OperationMethod<
@@ -225,7 +247,7 @@ export const getConsumer: API.OperationMethod<
225
247
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
226
248
  input: GetConsumerRequest,
227
249
  output: GetConsumerResponse,
228
- errors: [InvalidRequestBody, QueueNotFound, InvalidRoute],
250
+ errors: [InvalidRequestBody, QueueNotFound, ConsumerNotFound, InvalidRoute],
229
251
  }));
230
252
 
231
253
  export interface ListConsumersRequest {
@@ -576,6 +598,8 @@ export type CreateConsumerError =
576
598
  | DefaultErrors
577
599
  | InvalidRequestBody
578
600
  | QueueNotFound
601
+ | ConsumerAlreadyExists
602
+ | WorkerNotFound
579
603
  | InvalidRoute;
580
604
 
581
605
  export const createConsumer: API.OperationMethod<
@@ -586,7 +610,13 @@ export const createConsumer: API.OperationMethod<
586
610
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
587
611
  input: CreateConsumerRequest,
588
612
  output: CreateConsumerResponse,
589
- errors: [InvalidRequestBody, QueueNotFound, InvalidRoute],
613
+ errors: [
614
+ InvalidRequestBody,
615
+ QueueNotFound,
616
+ ConsumerAlreadyExists,
617
+ WorkerNotFound,
618
+ InvalidRoute,
619
+ ],
590
620
  }));
591
621
 
592
622
  export interface UpdateConsumerRequest {
@@ -774,6 +804,8 @@ export type UpdateConsumerError =
774
804
  | DefaultErrors
775
805
  | InvalidRequestBody
776
806
  | QueueNotFound
807
+ | ConsumerNotFound
808
+ | WorkerNotFound
777
809
  | InvalidRoute;
778
810
 
779
811
  export const updateConsumer: API.OperationMethod<
@@ -784,7 +816,13 @@ export const updateConsumer: API.OperationMethod<
784
816
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
785
817
  input: UpdateConsumerRequest,
786
818
  output: UpdateConsumerResponse,
787
- errors: [InvalidRequestBody, QueueNotFound, InvalidRoute],
819
+ errors: [
820
+ InvalidRequestBody,
821
+ QueueNotFound,
822
+ ConsumerNotFound,
823
+ WorkerNotFound,
824
+ InvalidRoute,
825
+ ],
788
826
  }));
789
827
 
790
828
  export interface DeleteConsumerRequest {
@@ -863,6 +901,7 @@ export type DeleteConsumerError =
863
901
  | DefaultErrors
864
902
  | InvalidRequestBody
865
903
  | QueueNotFound
904
+ | ConsumerNotFound
866
905
  | InvalidRoute;
867
906
 
868
907
  export const deleteConsumer: API.OperationMethod<
@@ -873,7 +912,7 @@ export const deleteConsumer: API.OperationMethod<
873
912
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
874
913
  input: DeleteConsumerRequest,
875
914
  output: DeleteConsumerResponse,
876
- errors: [InvalidRequestBody, QueueNotFound, InvalidRoute],
915
+ errors: [InvalidRequestBody, QueueNotFound, ConsumerNotFound, InvalidRoute],
877
916
  }));
878
917
 
879
918
  // =============================================================================
@@ -1092,6 +1131,7 @@ export type PullMessageError =
1092
1131
  | DefaultErrors
1093
1132
  | InvalidRequestBody
1094
1133
  | InvalidQueueId
1134
+ | QueueNotFound
1095
1135
  | InvalidRoute;
1096
1136
 
1097
1137
  export const pullMessage: API.OperationMethod<
@@ -1102,7 +1142,7 @@ export const pullMessage: API.OperationMethod<
1102
1142
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1103
1143
  input: PullMessageRequest,
1104
1144
  output: PullMessageResponse,
1105
- errors: [InvalidRequestBody, InvalidQueueId, InvalidRoute],
1145
+ errors: [InvalidRequestBody, InvalidQueueId, QueueNotFound, InvalidRoute],
1106
1146
  }));
1107
1147
 
1108
1148
  export interface PushMessageRequest {
@@ -1266,6 +1306,7 @@ export type AckMessageError =
1266
1306
  | DefaultErrors
1267
1307
  | InvalidRequestBody
1268
1308
  | InvalidQueueId
1309
+ | QueueNotFound
1269
1310
  | InvalidRoute;
1270
1311
 
1271
1312
  export const ackMessage: API.OperationMethod<
@@ -1276,7 +1317,7 @@ export const ackMessage: API.OperationMethod<
1276
1317
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1277
1318
  input: AckMessageRequest,
1278
1319
  output: AckMessageResponse,
1279
- errors: [InvalidRequestBody, InvalidQueueId, InvalidRoute],
1320
+ errors: [InvalidRequestBody, InvalidQueueId, QueueNotFound, InvalidRoute],
1280
1321
  }));
1281
1322
 
1282
1323
  // =============================================================================
@@ -36,6 +36,18 @@ export class DomainNotFound extends Schema.TaggedErrorClass<DomainNotFound>()(
36
36
  ) {}
37
37
  T.applyErrorMatchers(DomainNotFound, [{ code: 10053 }]);
38
38
 
39
+ export class EventNotificationConfigNotFound extends Schema.TaggedErrorClass<EventNotificationConfigNotFound>()(
40
+ "EventNotificationConfigNotFound",
41
+ { code: Schema.Number, message: Schema.String },
42
+ ) {}
43
+ T.applyErrorMatchers(EventNotificationConfigNotFound, [{ code: 11011 }]);
44
+
45
+ export class EventNotificationRuleConflict extends Schema.TaggedErrorClass<EventNotificationRuleConflict>()(
46
+ "EventNotificationRuleConflict",
47
+ { code: Schema.Number, message: Schema.String },
48
+ ) {}
49
+ T.applyErrorMatchers(EventNotificationRuleConflict, [{ code: 11020 }]);
50
+
39
51
  export class InvalidBucketName extends Schema.TaggedErrorClass<InvalidBucketName>()(
40
52
  "InvalidBucketName",
41
53
  { code: Schema.Number, message: Schema.String },
@@ -46,7 +58,10 @@ export class InvalidEventNotificationConfig extends Schema.TaggedErrorClass<Inva
46
58
  "InvalidEventNotificationConfig",
47
59
  { code: Schema.Number, message: Schema.String },
48
60
  ) {}
49
- T.applyErrorMatchers(InvalidEventNotificationConfig, [{ code: 11014 }]);
61
+ T.applyErrorMatchers(InvalidEventNotificationConfig, [
62
+ { code: 11014 },
63
+ { code: 11019 },
64
+ ]);
50
65
 
51
66
  export class InvalidRoute extends Schema.TaggedErrorClass<InvalidRoute>()(
52
67
  "InvalidRoute",
@@ -1471,6 +1486,7 @@ export type GetBucketEventNotificationError =
1471
1486
  | DefaultErrors
1472
1487
  | BucketNotFound
1473
1488
  | NoEventNotificationConfig
1489
+ | EventNotificationConfigNotFound
1474
1490
  | QueueNotFound
1475
1491
  | InvalidRoute;
1476
1492
 
@@ -1485,6 +1501,7 @@ export const getBucketEventNotification: API.OperationMethod<
1485
1501
  errors: [
1486
1502
  BucketNotFound,
1487
1503
  NoEventNotificationConfig,
1504
+ EventNotificationConfigNotFound,
1488
1505
  QueueNotFound,
1489
1506
  InvalidRoute,
1490
1507
  ],
@@ -1682,6 +1699,7 @@ export type PutBucketEventNotificationError =
1682
1699
  | DefaultErrors
1683
1700
  | BucketNotFound
1684
1701
  | InvalidEventNotificationConfig
1702
+ | EventNotificationRuleConflict
1685
1703
  | QueueNotFound
1686
1704
  | InvalidRoute;
1687
1705
 
@@ -1696,6 +1714,7 @@ export const putBucketEventNotification: API.OperationMethod<
1696
1714
  errors: [
1697
1715
  BucketNotFound,
1698
1716
  InvalidEventNotificationConfig,
1717
+ EventNotificationRuleConflict,
1699
1718
  QueueNotFound,
1700
1719
  InvalidRoute,
1701
1720
  ],
@@ -1735,6 +1754,7 @@ export const DeleteBucketEventNotificationResponse =
1735
1754
  export type DeleteBucketEventNotificationError =
1736
1755
  | DefaultErrors
1737
1756
  | BucketNotFound
1757
+ | EventNotificationConfigNotFound
1738
1758
  | QueueNotFound
1739
1759
  | InvalidRoute;
1740
1760
 
@@ -1746,7 +1766,12 @@ export const deleteBucketEventNotification: API.OperationMethod<
1746
1766
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1747
1767
  input: DeleteBucketEventNotificationRequest,
1748
1768
  output: DeleteBucketEventNotificationResponse,
1749
- errors: [BucketNotFound, QueueNotFound, InvalidRoute],
1769
+ errors: [
1770
+ BucketNotFound,
1771
+ EventNotificationConfigNotFound,
1772
+ QueueNotFound,
1773
+ InvalidRoute,
1774
+ ],
1750
1775
  }));
1751
1776
 
1752
1777
  // =============================================================================
@@ -12,6 +12,44 @@ import * as T from "../traits.ts";
12
12
  import type { Credentials } from "../credentials.ts";
13
13
  import { type DefaultErrors } from "../errors.ts";
14
14
 
15
+ // =============================================================================
16
+ // Errors
17
+ // =============================================================================
18
+
19
+ export class InvalidRoute extends Schema.TaggedErrorClass<InvalidRoute>()(
20
+ "InvalidRoute",
21
+ { code: Schema.Number, message: Schema.String },
22
+ ) {}
23
+ T.applyErrorMatchers(InvalidRoute, [{ code: 7003 }]);
24
+
25
+ export class InvalidTokenName extends Schema.TaggedErrorClass<InvalidTokenName>()(
26
+ "InvalidTokenName",
27
+ { code: Schema.Number, message: Schema.String },
28
+ ) {}
29
+ T.applyErrorMatchers(InvalidTokenName, [
30
+ { code: 400, message: { includes: "name must have a length" } },
31
+ ]);
32
+
33
+ export class MethodNotAllowed extends Schema.TaggedErrorClass<MethodNotAllowed>()(
34
+ "MethodNotAllowed",
35
+ { code: Schema.Number, message: Schema.String },
36
+ ) {}
37
+ T.applyErrorMatchers(MethodNotAllowed, [{ code: 7001 }]);
38
+
39
+ export class PermissionGroupNotFound extends Schema.TaggedErrorClass<PermissionGroupNotFound>()(
40
+ "PermissionGroupNotFound",
41
+ { code: Schema.Number, message: Schema.String },
42
+ ) {}
43
+ T.applyErrorMatchers(PermissionGroupNotFound, [
44
+ { code: 1001, message: { includes: "Permission group" } },
45
+ ]);
46
+
47
+ export class TokenNotFound extends Schema.TaggedErrorClass<TokenNotFound>()(
48
+ "TokenNotFound",
49
+ { code: Schema.Number, message: Schema.String },
50
+ ) {}
51
+ T.applyErrorMatchers(TokenNotFound, [{ code: 1003 }]);
52
+
15
53
  // =============================================================================
16
54
  // AuditLog
17
55
  // =============================================================================
@@ -1260,7 +1298,7 @@ export const GetTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1260
1298
  )
1261
1299
  .pipe(T.ResponsePath("result")) as unknown as Schema.Schema<GetTokenResponse>;
1262
1300
 
1263
- export type GetTokenError = DefaultErrors;
1301
+ export type GetTokenError = DefaultErrors | InvalidRoute | TokenNotFound;
1264
1302
 
1265
1303
  export const getToken: API.OperationMethod<
1266
1304
  GetTokenRequest,
@@ -1270,7 +1308,7 @@ export const getToken: API.OperationMethod<
1270
1308
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1271
1309
  input: GetTokenRequest,
1272
1310
  output: GetTokenResponse,
1273
- errors: [],
1311
+ errors: [InvalidRoute, TokenNotFound],
1274
1312
  }));
1275
1313
 
1276
1314
  export interface ListTokensRequest {}
@@ -1637,7 +1675,11 @@ export const CreateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1637
1675
  T.ResponsePath("result"),
1638
1676
  ) as unknown as Schema.Schema<CreateTokenResponse>;
1639
1677
 
1640
- export type CreateTokenError = DefaultErrors;
1678
+ export type CreateTokenError =
1679
+ | DefaultErrors
1680
+ | InvalidRoute
1681
+ | InvalidTokenName
1682
+ | PermissionGroupNotFound;
1641
1683
 
1642
1684
  export const createToken: API.OperationMethod<
1643
1685
  CreateTokenRequest,
@@ -1647,7 +1689,7 @@ export const createToken: API.OperationMethod<
1647
1689
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1648
1690
  input: CreateTokenRequest,
1649
1691
  output: CreateTokenResponse,
1650
- errors: [],
1692
+ errors: [InvalidRoute, InvalidTokenName, PermissionGroupNotFound],
1651
1693
  }));
1652
1694
 
1653
1695
  export interface UpdateTokenRequest {
@@ -1846,7 +1888,12 @@ export const UpdateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1846
1888
  T.ResponsePath("result"),
1847
1889
  ) as unknown as Schema.Schema<UpdateTokenResponse>;
1848
1890
 
1849
- export type UpdateTokenError = DefaultErrors;
1891
+ export type UpdateTokenError =
1892
+ | DefaultErrors
1893
+ | InvalidRoute
1894
+ | MethodNotAllowed
1895
+ | TokenNotFound
1896
+ | PermissionGroupNotFound;
1850
1897
 
1851
1898
  export const updateToken: API.OperationMethod<
1852
1899
  UpdateTokenRequest,
@@ -1856,7 +1903,12 @@ export const updateToken: API.OperationMethod<
1856
1903
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1857
1904
  input: UpdateTokenRequest,
1858
1905
  output: UpdateTokenResponse,
1859
- errors: [],
1906
+ errors: [
1907
+ InvalidRoute,
1908
+ MethodNotAllowed,
1909
+ TokenNotFound,
1910
+ PermissionGroupNotFound,
1911
+ ],
1860
1912
  }));
1861
1913
 
1862
1914
  export interface DeleteTokenRequest {
@@ -1880,7 +1932,11 @@ export const DeleteTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1880
1932
  T.ResponsePath("result"),
1881
1933
  ) as unknown as Schema.Schema<DeleteTokenResponse>;
1882
1934
 
1883
- export type DeleteTokenError = DefaultErrors;
1935
+ export type DeleteTokenError =
1936
+ | DefaultErrors
1937
+ | InvalidRoute
1938
+ | MethodNotAllowed
1939
+ | TokenNotFound;
1884
1940
 
1885
1941
  export const deleteToken: API.OperationMethod<
1886
1942
  DeleteTokenRequest,
@@ -1890,7 +1946,7 @@ export const deleteToken: API.OperationMethod<
1890
1946
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1891
1947
  input: DeleteTokenRequest,
1892
1948
  output: DeleteTokenResponse,
1893
- errors: [],
1949
+ errors: [InvalidRoute, MethodNotAllowed, TokenNotFound],
1894
1950
  }));
1895
1951
 
1896
1952
  export interface VerifyTokenRequest {}
@@ -2030,7 +2086,7 @@ export const PutTokenValueResponse =
2030
2086
  T.ResponsePath("result"),
2031
2087
  ) as unknown as Schema.Schema<PutTokenValueResponse>;
2032
2088
 
2033
- export type PutTokenValueError = DefaultErrors;
2089
+ export type PutTokenValueError = DefaultErrors | InvalidRoute | TokenNotFound;
2034
2090
 
2035
2091
  export const putTokenValue: API.OperationMethod<
2036
2092
  PutTokenValueRequest,
@@ -2040,7 +2096,7 @@ export const putTokenValue: API.OperationMethod<
2040
2096
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2041
2097
  input: PutTokenValueRequest,
2042
2098
  output: PutTokenValueResponse,
2043
- errors: [],
2099
+ errors: [InvalidRoute, TokenNotFound],
2044
2100
  }));
2045
2101
 
2046
2102
  // =============================================================================
@@ -99,6 +99,12 @@ export class ServiceBindingConflict extends Schema.TaggedErrorClass<ServiceBindi
99
99
  ) {}
100
100
  T.applyErrorMatchers(ServiceBindingConflict, [{ code: 10142 }]);
101
101
 
102
+ export class SubdomainAlreadyExists extends Schema.TaggedErrorClass<SubdomainAlreadyExists>()(
103
+ "SubdomainAlreadyExists",
104
+ { code: Schema.Number, message: Schema.String },
105
+ ) {}
106
+ T.applyErrorMatchers(SubdomainAlreadyExists, [{ code: 10036 }]);
107
+
102
108
  export class VersionNotFound extends Schema.TaggedErrorClass<VersionNotFound>()(
103
109
  "VersionNotFound",
104
110
  { code: Schema.Number, message: Schema.String },
@@ -14834,7 +14840,10 @@ export const PutSubdomainResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
14834
14840
  T.ResponsePath("result"),
14835
14841
  ) as unknown as Schema.Schema<PutSubdomainResponse>;
14836
14842
 
14837
- export type PutSubdomainError = DefaultErrors | InvalidRoute;
14843
+ export type PutSubdomainError =
14844
+ | DefaultErrors
14845
+ | SubdomainAlreadyExists
14846
+ | InvalidRoute;
14838
14847
 
14839
14848
  export const putSubdomain: API.OperationMethod<
14840
14849
  PutSubdomainRequest,
@@ -14844,7 +14853,7 @@ export const putSubdomain: API.OperationMethod<
14844
14853
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
14845
14854
  input: PutSubdomainRequest,
14846
14855
  output: PutSubdomainResponse,
14847
- errors: [InvalidRoute],
14856
+ errors: [SubdomainAlreadyExists, InvalidRoute],
14848
14857
  }));
14849
14858
 
14850
14859
  export interface DeleteSubdomainRequest {
@@ -16,6 +16,12 @@ import { type DefaultErrors } from "../errors.ts";
16
16
  // Errors
17
17
  // =============================================================================
18
18
 
19
+ export class InstanceAlreadyExists extends Schema.TaggedErrorClass<InstanceAlreadyExists>()(
20
+ "InstanceAlreadyExists",
21
+ { code: Schema.Number, message: Schema.String },
22
+ ) {}
23
+ T.applyErrorMatchers(InstanceAlreadyExists, [{ code: 10405 }]);
24
+
19
25
  export class InstanceCannotTerminate extends Schema.TaggedErrorClass<InstanceCannotTerminate>()(
20
26
  "InstanceCannotTerminate",
21
27
  { code: Schema.Number, message: Schema.String },
@@ -513,6 +519,7 @@ export const CreateInstanceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
513
519
  export type CreateInstanceError =
514
520
  | DefaultErrors
515
521
  | WorkflowNotFound
522
+ | InstanceAlreadyExists
516
523
  | InvalidRoute
517
524
  | InvalidBody;
518
525
 
@@ -524,7 +531,7 @@ export const createInstance: API.OperationMethod<
524
531
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
525
532
  input: CreateInstanceRequest,
526
533
  output: CreateInstanceResponse,
527
- errors: [WorkflowNotFound, InvalidRoute, InvalidBody],
534
+ errors: [WorkflowNotFound, InstanceAlreadyExists, InvalidRoute, InvalidBody],
528
535
  }));
529
536
 
530
537
  export interface BulkInstanceRequest {
@@ -628,6 +635,7 @@ export const BulkInstanceResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
628
635
  export type BulkInstanceError =
629
636
  | DefaultErrors
630
637
  | WorkflowNotFound
638
+ | InstanceAlreadyExists
631
639
  | InvalidRoute
632
640
  | InvalidBody;
633
641
 
@@ -639,7 +647,7 @@ export const bulkInstance: API.PaginatedOperationMethod<
639
647
  > = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
640
648
  input: BulkInstanceRequest,
641
649
  output: BulkInstanceResponse,
642
- errors: [WorkflowNotFound, InvalidRoute, InvalidBody],
650
+ errors: [WorkflowNotFound, InstanceAlreadyExists, InvalidRoute, InvalidBody],
643
651
  pagination: {
644
652
  mode: "single",
645
653
  items: "result",