@workwae/sdk 0.1.0-alpha.5 → 0.1.0-alpha.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/client.d.ts +2 -2
- package/contract/accounts/routes.d.ts +40 -96
- package/contract/ai/routes.d.ts +4 -19
- package/contract/audit-log/routes.d.ts +4 -6
- package/contract/calendar/routes.d.ts +48 -248
- package/contract/connect/routes.d.ts +24 -74
- package/contract/connect-domain/routes.d.ts +15 -29
- package/contract/contacts/routes.d.ts +28 -102
- package/contract/email-validation/routes.d.ts +8 -8
- package/contract/errors.d.ts +4 -8
- package/contract/events/models.d.ts +0 -6
- package/contract/events/routes.d.ts +4 -4
- package/contract/exports/routes.d.ts +20 -28
- package/contract/identities/routes.d.ts +24 -51
- package/contract/mail/routes.d.ts +44 -201
- package/contract/mcp-keys/routes.d.ts +12 -16
- package/contract/meetings/routes.d.ts +36 -60
- package/contract/oauth-apps/routes.d.ts +15 -25
- package/contract/org-connections/routes.d.ts +43 -104
- package/contract/primitives.d.ts +7 -4
- package/contract/reasons.d.ts +0 -1
- package/contract/router.d.ts +645 -1582
- package/contract/scheduling/routes.d.ts +32 -81
- package/contract/send/models.d.ts +21 -0
- package/contract/send/routes.d.ts +81 -209
- package/contract/settings/routes.d.ts +7 -9
- package/contract/suppressions/routes.d.ts +48 -50
- package/contract/templates/routes.d.ts +30 -37
- package/contract/threads/routes.d.ts +16 -56
- package/contract/tracking-domain/routes.d.ts +15 -28
- package/contract/usage/routes.d.ts +4 -4
- package/contract/webhooks/routes.d.ts +43 -66
- package/errors.d.ts +2 -0
- package/index.js +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
export declare const webhooks: {
|
|
3
|
-
list: import("@orpc/contract").
|
|
3
|
+
list: import("@orpc/contract").ProcedureContractBuilderWithOutput<z.ZodObject<{
|
|
4
4
|
items: z.ZodArray<z.ZodObject<{
|
|
5
5
|
id: z.ZodUUID;
|
|
6
6
|
url: z.ZodURL;
|
|
@@ -79,7 +79,7 @@ export declare const webhooks: {
|
|
|
79
79
|
previousSecretExpiresAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
80
80
|
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
81
81
|
}, z.core.$strip>>;
|
|
82
|
-
}, z.core.$strip>, import("
|
|
82
|
+
}, z.core.$strip>, import("../errors.js").DeclaredErrors<{
|
|
83
83
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
84
84
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
85
85
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -96,8 +96,8 @@ export declare const webhooks: {
|
|
|
96
96
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
97
97
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
98
98
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
99
|
-
}
|
|
100
|
-
create: import("@orpc/contract").
|
|
99
|
+
}>>;
|
|
100
|
+
create: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
|
|
101
101
|
url: z.ZodURL;
|
|
102
102
|
description: z.ZodOptional<z.ZodString>;
|
|
103
103
|
filters: z.ZodOptional<z.ZodObject<{
|
|
@@ -247,7 +247,7 @@ export declare const webhooks: {
|
|
|
247
247
|
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
248
248
|
}, z.core.$strip>;
|
|
249
249
|
secret: z.ZodString;
|
|
250
|
-
}, z.core.$strip>,
|
|
250
|
+
}, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
|
|
251
251
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
252
252
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
253
253
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -264,20 +264,18 @@ export declare const webhooks: {
|
|
|
264
264
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
265
265
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
266
266
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
267
|
-
}
|
|
267
|
+
}>, "plan_limit_webhooks" | "unknown_account" | "unknown_mailbox" | "mailbox_outside_accounts" | "https_required"> & {
|
|
268
268
|
plan_limit_webhooks: import("../errors.js").DeclaredError<"plan_limit_webhooks">;
|
|
269
269
|
unknown_account: import("../errors.js").DeclaredError<"unknown_account">;
|
|
270
270
|
unknown_mailbox: import("../errors.js").DeclaredError<"unknown_mailbox">;
|
|
271
271
|
mailbox_outside_accounts: {
|
|
272
|
-
status: 400;
|
|
273
272
|
message: string;
|
|
274
273
|
};
|
|
275
274
|
https_required: {
|
|
276
|
-
status: 400;
|
|
277
275
|
message: string;
|
|
278
276
|
};
|
|
279
|
-
}
|
|
280
|
-
update: import("@orpc/contract").
|
|
277
|
+
}>;
|
|
278
|
+
update: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
|
|
281
279
|
endpointId: z.ZodUUID;
|
|
282
280
|
url: z.ZodOptional<z.ZodURL>;
|
|
283
281
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -426,7 +424,7 @@ export declare const webhooks: {
|
|
|
426
424
|
failingSince: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
427
425
|
previousSecretExpiresAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
428
426
|
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
429
|
-
}, z.core.$strip>,
|
|
427
|
+
}, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
|
|
430
428
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
431
429
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
432
430
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -443,25 +441,22 @@ export declare const webhooks: {
|
|
|
443
441
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
444
442
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
445
443
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
446
|
-
}
|
|
444
|
+
}>, "unknown_account" | "unknown_mailbox" | "webhook_endpoint_not_found" | "mailbox_outside_accounts" | "https_required"> & {
|
|
447
445
|
unknown_account: import("../errors.js").DeclaredError<"unknown_account">;
|
|
448
446
|
unknown_mailbox: import("../errors.js").DeclaredError<"unknown_mailbox">;
|
|
449
447
|
mailbox_outside_accounts: {
|
|
450
|
-
status: 400;
|
|
451
448
|
message: string;
|
|
452
449
|
};
|
|
453
450
|
https_required: {
|
|
454
|
-
status: 400;
|
|
455
451
|
message: string;
|
|
456
452
|
};
|
|
457
453
|
webhook_endpoint_not_found: {
|
|
458
|
-
status: 404;
|
|
459
454
|
message: string;
|
|
460
455
|
};
|
|
461
|
-
}
|
|
462
|
-
delete: import("@orpc/contract").
|
|
456
|
+
}>;
|
|
457
|
+
delete: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
|
|
463
458
|
endpointId: z.ZodUUID;
|
|
464
|
-
}, z.core.$strip>, z.ZodVoid,
|
|
459
|
+
}, z.core.$strip>, z.ZodVoid, Omit<import("../errors.js").DeclaredErrors<{
|
|
465
460
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
466
461
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
467
462
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -478,16 +473,16 @@ export declare const webhooks: {
|
|
|
478
473
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
479
474
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
480
475
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
481
|
-
}
|
|
476
|
+
}>, "webhook_endpoint_not_found"> & import("../errors.js").DeclaredErrors<{
|
|
482
477
|
readonly webhook_endpoint_not_found: "The endpoint does not exist.";
|
|
483
|
-
}
|
|
484
|
-
rotateSecret: import("@orpc/contract").
|
|
478
|
+
}>>;
|
|
479
|
+
rotateSecret: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
|
|
485
480
|
graceSeconds: z.ZodDefault<z.ZodNumber>;
|
|
486
481
|
endpointId: z.ZodUUID;
|
|
487
482
|
}, z.core.$strip>, z.ZodObject<{
|
|
488
483
|
secret: z.ZodString;
|
|
489
484
|
previousSecretExpiresAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
490
|
-
}, z.core.$strip>,
|
|
485
|
+
}, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
|
|
491
486
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
492
487
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
493
488
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -504,10 +499,10 @@ export declare const webhooks: {
|
|
|
504
499
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
505
500
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
506
501
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
507
|
-
}
|
|
502
|
+
}>, "webhook_endpoint_not_found"> & import("../errors.js").DeclaredErrors<{
|
|
508
503
|
readonly webhook_endpoint_not_found: "The endpoint does not exist.";
|
|
509
|
-
}
|
|
510
|
-
test: import("@orpc/contract").
|
|
504
|
+
}>>;
|
|
505
|
+
test: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
|
|
511
506
|
eventType: z.ZodDefault<z.ZodEnum<{
|
|
512
507
|
"account.connected": "account.connected";
|
|
513
508
|
"account.updated": "account.updated";
|
|
@@ -555,7 +550,7 @@ export declare const webhooks: {
|
|
|
555
550
|
endpointId: z.ZodUUID;
|
|
556
551
|
}, z.core.$strip>, z.ZodObject<{
|
|
557
552
|
eventId: z.ZodString;
|
|
558
|
-
}, z.core.$strip>,
|
|
553
|
+
}, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
|
|
559
554
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
560
555
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
561
556
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -572,18 +567,16 @@ export declare const webhooks: {
|
|
|
572
567
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
573
568
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
574
569
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
575
|
-
}
|
|
570
|
+
}>, "unknown_account" | "webhook_endpoint_not_found" | "endpoint_disabled"> & {
|
|
576
571
|
unknown_account: import("../errors.js").DeclaredError<"unknown_account">;
|
|
577
572
|
endpoint_disabled: {
|
|
578
|
-
status: 409;
|
|
579
573
|
message: string;
|
|
580
574
|
};
|
|
581
575
|
webhook_endpoint_not_found: {
|
|
582
|
-
status: 404;
|
|
583
576
|
message: string;
|
|
584
577
|
};
|
|
585
|
-
}
|
|
586
|
-
attempts: import("@orpc/contract").
|
|
578
|
+
}>;
|
|
579
|
+
attempts: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
|
|
587
580
|
endpointId: z.ZodUUID;
|
|
588
581
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
589
582
|
cursor: z.ZodOptional<z.ZodString>;
|
|
@@ -694,7 +687,7 @@ export declare const webhooks: {
|
|
|
694
687
|
occurredAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
695
688
|
}, z.core.$strip>>;
|
|
696
689
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
697
|
-
}, z.core.$strip>,
|
|
690
|
+
}, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
|
|
698
691
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
699
692
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
700
693
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -711,28 +704,25 @@ export declare const webhooks: {
|
|
|
711
704
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
712
705
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
713
706
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
714
|
-
}
|
|
707
|
+
}>, "invalid_range" | "invalid_cursor" | "webhook_endpoint_not_found"> & {
|
|
715
708
|
invalid_range: {
|
|
716
|
-
status: 400;
|
|
717
709
|
message: string;
|
|
718
710
|
};
|
|
719
711
|
invalid_cursor: {
|
|
720
|
-
status: 400;
|
|
721
712
|
message: string;
|
|
722
713
|
};
|
|
723
714
|
webhook_endpoint_not_found: {
|
|
724
|
-
status: 404;
|
|
725
715
|
message: string;
|
|
726
716
|
};
|
|
727
|
-
}
|
|
728
|
-
replay: import("@orpc/contract").
|
|
717
|
+
}>;
|
|
718
|
+
replay: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
|
|
729
719
|
since: z.ZodPreprocess<z.ZodDate, string | Date>;
|
|
730
720
|
until: z.ZodPreprocess<z.ZodDate, string | Date>;
|
|
731
721
|
endpointId: z.ZodUUID;
|
|
732
722
|
}, z.core.$strip>, z.ZodObject<{
|
|
733
723
|
queued: z.ZodNumber;
|
|
734
724
|
alreadyQueued: z.ZodNumber;
|
|
735
|
-
}, z.core.$strip>,
|
|
725
|
+
}, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
|
|
736
726
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
737
727
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
738
728
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -749,31 +739,27 @@ export declare const webhooks: {
|
|
|
749
739
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
750
740
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
751
741
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
752
|
-
}
|
|
742
|
+
}>, "invalid_range" | "webhook_endpoint_not_found" | "endpoint_disabled" | "replay_range_too_large"> & {
|
|
753
743
|
invalid_range: {
|
|
754
|
-
status: 400;
|
|
755
744
|
message: string;
|
|
756
745
|
};
|
|
757
746
|
replay_range_too_large: {
|
|
758
|
-
status: 400;
|
|
759
747
|
message: string;
|
|
760
748
|
};
|
|
761
749
|
endpoint_disabled: {
|
|
762
|
-
status: 409;
|
|
763
750
|
message: string;
|
|
764
751
|
};
|
|
765
752
|
webhook_endpoint_not_found: {
|
|
766
|
-
status: 404;
|
|
767
753
|
message: string;
|
|
768
754
|
};
|
|
769
|
-
}
|
|
770
|
-
replayEvent: import("@orpc/contract").
|
|
755
|
+
}>;
|
|
756
|
+
replayEvent: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
|
|
771
757
|
endpointId: z.ZodUUID;
|
|
772
758
|
eventId: z.ZodString;
|
|
773
759
|
}, z.core.$strip>, z.ZodObject<{
|
|
774
760
|
queued: z.ZodNumber;
|
|
775
761
|
alreadyQueued: z.ZodNumber;
|
|
776
|
-
}, z.core.$strip>,
|
|
762
|
+
}, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
|
|
777
763
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
778
764
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
779
765
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -790,27 +776,24 @@ export declare const webhooks: {
|
|
|
790
776
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
791
777
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
792
778
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
793
|
-
}
|
|
779
|
+
}>, "webhook_endpoint_not_found" | "endpoint_disabled" | "event_not_found"> & {
|
|
794
780
|
event_not_found: {
|
|
795
|
-
status: 404;
|
|
796
781
|
message: string;
|
|
797
782
|
};
|
|
798
783
|
endpoint_disabled: {
|
|
799
|
-
status: 409;
|
|
800
784
|
message: string;
|
|
801
785
|
};
|
|
802
786
|
webhook_endpoint_not_found: {
|
|
803
|
-
status: 404;
|
|
804
787
|
message: string;
|
|
805
788
|
};
|
|
806
|
-
}
|
|
807
|
-
countFailed: import("@orpc/contract").
|
|
789
|
+
}>;
|
|
790
|
+
countFailed: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
|
|
808
791
|
since: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
|
|
809
792
|
until: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
|
|
810
793
|
endpointId: z.ZodUUID;
|
|
811
794
|
}, z.core.$strip>, z.ZodObject<{
|
|
812
795
|
count: z.ZodNumber;
|
|
813
|
-
}, z.core.$strip>,
|
|
796
|
+
}, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
|
|
814
797
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
815
798
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
816
799
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -827,24 +810,22 @@ export declare const webhooks: {
|
|
|
827
810
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
828
811
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
829
812
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
830
|
-
}
|
|
813
|
+
}>, "invalid_range" | "webhook_endpoint_not_found"> & {
|
|
831
814
|
invalid_range: {
|
|
832
|
-
status: 400;
|
|
833
815
|
message: string;
|
|
834
816
|
};
|
|
835
817
|
webhook_endpoint_not_found: {
|
|
836
|
-
status: 404;
|
|
837
818
|
message: string;
|
|
838
819
|
};
|
|
839
|
-
}
|
|
840
|
-
replayFailed: import("@orpc/contract").
|
|
820
|
+
}>;
|
|
821
|
+
replayFailed: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
|
|
841
822
|
since: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
|
|
842
823
|
until: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
|
|
843
824
|
endpointId: z.ZodUUID;
|
|
844
825
|
}, z.core.$strip>, z.ZodObject<{
|
|
845
826
|
queued: z.ZodNumber;
|
|
846
827
|
alreadyQueued: z.ZodNumber;
|
|
847
|
-
}, z.core.$strip>,
|
|
828
|
+
}, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
|
|
848
829
|
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
849
830
|
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
850
831
|
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
@@ -861,22 +842,18 @@ export declare const webhooks: {
|
|
|
861
842
|
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
862
843
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
863
844
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
864
|
-
}
|
|
845
|
+
}>, "invalid_range" | "webhook_endpoint_not_found" | "endpoint_disabled" | "replay_range_too_large"> & {
|
|
865
846
|
invalid_range: {
|
|
866
|
-
status: 400;
|
|
867
847
|
message: string;
|
|
868
848
|
};
|
|
869
849
|
replay_range_too_large: {
|
|
870
|
-
status: 400;
|
|
871
850
|
message: string;
|
|
872
851
|
};
|
|
873
852
|
endpoint_disabled: {
|
|
874
|
-
status: 409;
|
|
875
853
|
message: string;
|
|
876
854
|
};
|
|
877
855
|
webhook_endpoint_not_found: {
|
|
878
|
-
status: 404;
|
|
879
856
|
message: string;
|
|
880
857
|
};
|
|
881
|
-
}
|
|
858
|
+
}>;
|
|
882
859
|
};
|
package/errors.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { isDefinedError, ORPCError, safe } from "@orpc/client";
|
|
|
4
4
|
export type { ErrorReason } from "./contract/public.js";
|
|
5
5
|
declare module "@orpc/client" {
|
|
6
6
|
interface ORPCError<TCode extends ORPCErrorCode, TData> {
|
|
7
|
+
/** The HTTP status of the answer the error came in; undefined when no answer came. */
|
|
8
|
+
status?: number;
|
|
7
9
|
/** The X-Request-Id of the answer the error came in; undefined when no answer named one. */
|
|
8
10
|
requestId?: string;
|
|
9
11
|
}
|