@distilled.cloud/cloudflare 0.24.5 → 0.24.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distilled.cloud/cloudflare",
3
- "version": "0.24.5",
3
+ "version": "0.24.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/alchemy-run/distilled",
@@ -63,7 +63,7 @@
63
63
  "specs:update": "git -C specs/cloudflare-typescript fetch && git -C specs/cloudflare-typescript checkout main && git -C specs/cloudflare-typescript pull"
64
64
  },
65
65
  "dependencies": {
66
- "@distilled.cloud/core": "0.24.5"
66
+ "@distilled.cloud/core": "0.24.7"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@effect/platform-node": ">=4.0.0-beta.66 || >=4.0.0",
@@ -28,6 +28,14 @@ export class GatewayNotFound extends Schema.TaggedErrorClass<GatewayNotFound>()(
28
28
  ) {}
29
29
  T.applyErrorMatchers(GatewayNotFound, [{ code: 7002 }]);
30
30
 
31
+ export class NoManualTopup extends Schema.TaggedErrorClass<NoManualTopup>()(
32
+ "NoManualTopup",
33
+ { code: Schema.Number, message: Schema.String },
34
+ ) {}
35
+ T.applyErrorMatchers(NoManualTopup, [
36
+ { code: 1000, message: { includes: "NO_MANUAL_TOPUP" } },
37
+ ]);
38
+
31
39
  // =============================================================================
32
40
  // AiGateway
33
41
  // =============================================================================
@@ -3365,9 +3373,9 @@ export interface CreditBalanceBillingResponse {
3365
3373
  paymentMethod: { brand?: string | null; last4?: string | null } | null;
3366
3374
  topupConfig: {
3367
3375
  amount: number | null;
3368
- disabledReason: string | null;
3369
- error: string | null;
3370
- lastFailedAt: number | null;
3376
+ disabledReason?: string | null;
3377
+ error?: string | null;
3378
+ lastFailedAt?: number | null;
3371
3379
  threshold: number | null;
3372
3380
  };
3373
3381
  firstTopupSuccess?: boolean | null;
@@ -3386,9 +3394,11 @@ export const CreditBalanceBillingResponse =
3386
3394
  ]),
3387
3395
  topupConfig: Schema.Struct({
3388
3396
  amount: Schema.Union([Schema.Number, Schema.Null]),
3389
- disabledReason: Schema.Union([Schema.String, Schema.Null]),
3390
- error: Schema.Union([Schema.String, Schema.Null]),
3391
- lastFailedAt: Schema.Union([Schema.Number, Schema.Null]),
3397
+ disabledReason: Schema.optional(
3398
+ Schema.Union([Schema.String, Schema.Null]),
3399
+ ),
3400
+ error: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3401
+ lastFailedAt: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3392
3402
  threshold: Schema.Union([Schema.Number, Schema.Null]),
3393
3403
  }),
3394
3404
  firstTopupSuccess: Schema.optional(
@@ -3511,7 +3521,7 @@ export const CreateBillingSpendingLimitResponse =
3511
3521
  T.ResponsePath("result"),
3512
3522
  ) as unknown as Schema.Schema<CreateBillingSpendingLimitResponse>;
3513
3523
 
3514
- export type CreateBillingSpendingLimitError = DefaultErrors;
3524
+ export type CreateBillingSpendingLimitError = DefaultErrors | NoManualTopup;
3515
3525
 
3516
3526
  export const createBillingSpendingLimit: API.OperationMethod<
3517
3527
  CreateBillingSpendingLimitRequest,
@@ -3521,7 +3531,7 @@ export const createBillingSpendingLimit: API.OperationMethod<
3521
3531
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3522
3532
  input: CreateBillingSpendingLimitRequest,
3523
3533
  output: CreateBillingSpendingLimitResponse,
3524
- errors: [],
3534
+ errors: [NoManualTopup],
3525
3535
  }));
3526
3536
 
3527
3537
  export interface DeleteBillingSpendingLimitRequest {