@workwae/sdk 0.1.0-alpha.6 → 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 CHANGED
@@ -1,4 +1,4 @@
1
- import type { ContractRouterClient } from "@orpc/contract";
1
+ import type { RouterContractClient } from "@orpc/contract";
2
2
  import { type V1Contract } from "./contract/public.js";
3
3
  /** Per call, as `{ context }`: `workwae.send.create(input, { context: { idempotencyKey } })`. */
4
4
  export interface CallContext {
@@ -8,7 +8,7 @@ export interface CallContext {
8
8
  idempotencyKey?: string;
9
9
  }
10
10
  /** Every /v1 procedure, typed from the contract: `workwae.accounts.get({ accountId })`. */
11
- export type WorkwaeClient = ContractRouterClient<V1Contract, CallContext>;
11
+ export type WorkwaeClient = RouterContractClient<V1Contract, CallContext>;
12
12
  export interface RetryOptions {
13
13
  /** Further attempts after a 429 or 503. Default 2. */
14
14
  maxRetries?: number;
@@ -18,7 +18,7 @@ export declare const OAUTH_CLIENT: import("../errors.js").DeclaredErrors<{
18
18
  readonly provider_not_configured: "No OAuth app is given and the platform has none for the provider (and cloud).";
19
19
  }>;
20
20
  export declare const accounts: {
21
- list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
21
+ list: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
22
22
  externalRef: z.ZodOptional<z.ZodString>;
23
23
  q: z.ZodOptional<z.ZodString>;
24
24
  status: z.ZodOptional<z.ZodEnum<{
@@ -170,7 +170,7 @@ export declare const accounts: {
170
170
  updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
171
171
  }, z.core.$strip>>;
172
172
  nextCursor: z.ZodNullable<z.ZodString>;
173
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
173
+ }, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
174
174
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
175
175
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
176
176
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -187,10 +187,10 @@ export declare const accounts: {
187
187
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
188
188
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
189
189
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
190
- }>>, import("../errors.js").DeclaredErrors<{
190
+ }>, "invalid_cursor"> & import("../errors.js").DeclaredErrors<{
191
191
  readonly invalid_cursor: "The cursor is not one this list issued.";
192
- }>>, Record<never, never>>;
193
- get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
192
+ }>>;
193
+ get: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
194
194
  accountId: z.ZodUUID;
195
195
  }, z.core.$strip>, z.ZodObject<{
196
196
  id: z.ZodUUID;
@@ -328,7 +328,7 @@ export declare const accounts: {
328
328
  contactsInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
329
329
  createdAt: z.ZodPreprocess<z.ZodDate, Date>;
330
330
  updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
331
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
331
+ }, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
332
332
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
333
333
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
334
334
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -345,10 +345,10 @@ export declare const accounts: {
345
345
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
346
346
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
347
347
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
348
- }>>, import("../errors.js").DeclaredErrors<{
348
+ }>, "account_not_found"> & import("../errors.js").DeclaredErrors<{
349
349
  readonly account_not_found: "The account does not exist, or the caller is an account token for another account.";
350
- }>>, Record<never, never>>;
351
- create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
350
+ }>>;
351
+ create: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
352
352
  provider: z.ZodEnum<{
353
353
  google: "google";
354
354
  microsoft: "microsoft";
@@ -524,7 +524,7 @@ export declare const accounts: {
524
524
  contactsInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
525
525
  createdAt: z.ZodPreprocess<z.ZodDate, Date>;
526
526
  updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
527
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
527
+ }, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
528
528
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
529
529
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
530
530
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -541,81 +541,64 @@ export declare const accounts: {
541
541
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
542
542
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
543
543
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
544
- }>>, {
544
+ }>, "access_token_rejected" | "provider_unavailable" | "provider_not_configured" | "token_exchange_failed" | "invalid_client" | "interaction_required" | "invalid_grant" | "scope_denied" | "identity_failed" | "identity_unavailable" | "unknown_oauth_app" | "oauth_app_mismatch" | "oauth_app_secret_unreadable" | "plan_limit_accounts" | "plan_required" | "spend_cap_reached" | "plan_module_unavailable" | "billing_past_due" | "plan_limit_storage" | "storage_unavailable" | "mail_permissions_unsupported"> & {
545
545
  access_token_rejected: {
546
- status: 400;
547
546
  message: string;
548
547
  };
549
548
  provider_unavailable: {
550
- status: 502;
551
549
  message: string;
552
550
  };
553
551
  token_exchange_failed: {
554
- status: 400;
555
552
  message: string;
556
553
  };
557
554
  invalid_client: {
558
- status: 400;
559
555
  message: string;
560
556
  };
561
557
  interaction_required: {
562
- status: 400;
563
558
  message: string;
564
559
  };
565
560
  invalid_grant: {
566
- status: 400;
567
561
  message: string;
568
562
  };
569
563
  scope_denied: {
570
- status: 400;
571
564
  message: string;
572
565
  };
573
566
  identity_failed: {
574
- status: 400;
575
567
  message: string;
576
568
  };
577
569
  identity_unavailable: {
578
- status: 400;
579
570
  message: string;
580
571
  };
581
572
  mail_permissions_unsupported: {
582
- status: 400;
583
573
  message: string;
584
574
  };
585
575
  provider_not_configured: {
586
- status: 400;
587
576
  message: string;
588
577
  };
589
578
  unknown_oauth_app: {
590
- status: 422;
591
579
  message: string;
592
580
  };
593
581
  oauth_app_mismatch: {
594
- status: 400;
595
582
  message: string;
596
583
  };
597
584
  oauth_app_secret_unreadable: {
598
- status: 400;
599
585
  message: string;
600
586
  };
601
587
  billing_past_due: {
602
- status: 402;
603
588
  message: string;
604
589
  };
605
590
  plan_limit_accounts: import("../errors.js").DeclaredError<"plan_limit_accounts">;
606
591
  plan_required: import("../errors.js").DeclaredError<"plan_required">;
607
592
  spend_cap_reached: import("../errors.js").DeclaredError<"spend_cap_reached">;
608
593
  plan_module_unavailable: {
609
- status: 403;
610
594
  message: string;
611
595
  };
612
596
  plan_limit_storage: import("../errors.js").DeclaredError<"plan_limit_storage">;
613
597
  storage_unavailable: {
614
- status: 400;
615
598
  message: string;
616
599
  };
617
- }>, Record<never, never>>;
618
- update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
600
+ }>;
601
+ update: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
619
602
  accountId: z.ZodUUID;
620
603
  externalRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
621
604
  status: z.ZodOptional<z.ZodEnum<{
@@ -778,7 +761,7 @@ export declare const accounts: {
778
761
  contactsInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
779
762
  createdAt: z.ZodPreprocess<z.ZodDate, Date>;
780
763
  updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
781
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
764
+ }, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
782
765
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
783
766
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
784
767
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -795,29 +778,25 @@ export declare const accounts: {
795
778
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
796
779
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
797
780
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
798
- }>>, {
781
+ }>, "account_not_found" | "plan_limit_accounts" | "plan_required" | "spend_cap_reached" | "plan_limit_storage" | "storage_unavailable" | "account_disabled" | "account_reauth_required"> & {
799
782
  account_disabled: {
800
- status: 409;
801
783
  message: string;
802
784
  };
803
785
  account_reauth_required: {
804
- status: 409;
805
786
  message: string;
806
787
  };
807
788
  plan_limit_storage: import("../errors.js").DeclaredError<"plan_limit_storage">;
808
789
  storage_unavailable: {
809
- status: 400;
810
790
  message: string;
811
791
  };
812
792
  plan_limit_accounts: import("../errors.js").DeclaredError<"plan_limit_accounts">;
813
793
  plan_required: import("../errors.js").DeclaredError<"plan_required">;
814
794
  spend_cap_reached: import("../errors.js").DeclaredError<"spend_cap_reached">;
815
795
  account_not_found: {
816
- status: 404;
817
796
  message: string;
818
797
  };
819
- }>, Record<never, never>>;
820
- delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
798
+ }>;
799
+ delete: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
821
800
  params: z.ZodObject<{
822
801
  accountId: z.ZodUUID;
823
802
  }, z.core.$strip>;
@@ -830,7 +809,7 @@ export declare const accounts: {
830
809
  }>
831
810
  ]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
832
811
  }, z.core.$strip>;
833
- }, z.core.$strip>, z.ZodVoid, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
812
+ }, z.core.$strip>, z.ZodVoid, Omit<import("../errors.js").DeclaredErrors<{
834
813
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
835
814
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
836
815
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -847,10 +826,10 @@ export declare const accounts: {
847
826
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
848
827
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
849
828
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
850
- }>>, import("../errors.js").DeclaredErrors<{
829
+ }>, "account_not_found"> & import("../errors.js").DeclaredErrors<{
851
830
  readonly account_not_found: "The account does not exist, or (without purge) is already deleted.";
852
- }>>, Record<never, never>>;
853
- sync: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
831
+ }>>;
832
+ sync: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
854
833
  accountId: z.ZodUUID;
855
834
  kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
856
835
  mail: "mail";
@@ -863,7 +842,7 @@ export declare const accounts: {
863
842
  calendar: "calendar";
864
843
  contacts: "contacts";
865
844
  }>>;
866
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
845
+ }, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
867
846
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
868
847
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
869
848
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -880,28 +859,25 @@ export declare const accounts: {
880
859
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
881
860
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
882
861
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
883
- }>>, {
862
+ }>, "account_not_found" | "account_disabled" | "account_reauth_required" | "sync_kinds_disabled"> & {
884
863
  account_disabled: {
885
- status: 409;
886
864
  message: string;
887
865
  };
888
866
  account_reauth_required: {
889
- status: 409;
890
867
  message: string;
891
868
  };
892
869
  sync_kinds_disabled: import("../errors.js").DeclaredError<"sync_kinds_disabled">;
893
870
  account_not_found: {
894
- status: 404;
895
871
  message: string;
896
872
  };
897
- }>, Record<never, never>>;
898
- mintToken: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
873
+ }>;
874
+ mintToken: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
899
875
  accountId: z.ZodUUID;
900
876
  ttlSeconds: z.ZodDefault<z.ZodNumber>;
901
877
  }, z.core.$strip>, z.ZodObject<{
902
878
  token: z.ZodString;
903
879
  expiresAt: z.ZodPreprocess<z.ZodDate, Date>;
904
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
880
+ }, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
905
881
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
906
882
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
907
883
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -918,12 +894,12 @@ export declare const accounts: {
918
894
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
919
895
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
920
896
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
921
- }>>, import("../errors.js").DeclaredErrors<{
897
+ }>, "account_not_found"> & import("../errors.js").DeclaredErrors<{
922
898
  readonly account_not_found: "The account does not exist, or the caller is an account token for another account.";
923
- }>>, Record<never, never>>;
899
+ }>>;
924
900
  };
925
901
  export declare const imapAccounts: {
926
- create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
902
+ create: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
927
903
  email: z.ZodEmail;
928
904
  displayName: z.ZodOptional<z.ZodString>;
929
905
  password: z.ZodString;
@@ -1112,7 +1088,7 @@ export declare const imapAccounts: {
1112
1088
  contactsInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
1113
1089
  createdAt: z.ZodPreprocess<z.ZodDate, Date>;
1114
1090
  updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
1115
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
1091
+ }, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
1116
1092
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
1117
1093
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
1118
1094
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -1129,13 +1105,11 @@ export declare const imapAccounts: {
1129
1105
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
1130
1106
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
1131
1107
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
1132
- }>>, {
1108
+ }>, "provider_unavailable" | "plan_limit_accounts" | "plan_required" | "spend_cap_reached" | "plan_module_unavailable" | "billing_past_due" | "plan_limit_storage" | "storage_unavailable" | "provider_throttled" | "autodiscovery_failed" | "dav_discovery_failed" | "login_failed" | "server_not_allowed" | "plaintext_not_allowed" | "not_dav_server"> & {
1133
1109
  plan_module_unavailable: {
1134
- status: 403;
1135
1110
  message: string;
1136
1111
  };
1137
1112
  billing_past_due: {
1138
- status: 402;
1139
1113
  message: string;
1140
1114
  };
1141
1115
  plan_limit_accounts: import("../errors.js").DeclaredError<"plan_limit_accounts">;
@@ -1143,45 +1117,36 @@ export declare const imapAccounts: {
1143
1117
  spend_cap_reached: import("../errors.js").DeclaredError<"spend_cap_reached">;
1144
1118
  plan_limit_storage: import("../errors.js").DeclaredError<"plan_limit_storage">;
1145
1119
  storage_unavailable: {
1146
- status: 400;
1147
1120
  message: string;
1148
1121
  };
1149
1122
  provider_unavailable: {
1150
- status: 502;
1151
1123
  message: string;
1152
1124
  };
1153
1125
  provider_throttled: {
1154
- status: 429;
1155
1126
  message: string;
1156
1127
  };
1157
1128
  dav_discovery_failed: {
1158
- status: 400;
1159
1129
  message: string;
1160
1130
  };
1161
1131
  not_dav_server: {
1162
- status: 400;
1163
1132
  message: string;
1164
1133
  };
1165
1134
  autodiscovery_failed: {
1166
- status: 422;
1167
1135
  message: string;
1168
1136
  };
1169
1137
  login_failed: {
1170
- status: 400;
1171
1138
  message: string;
1172
1139
  };
1173
1140
  server_not_allowed: {
1174
- status: 400;
1175
1141
  message: string;
1176
1142
  };
1177
1143
  plaintext_not_allowed: {
1178
- status: 400;
1179
1144
  message: string;
1180
1145
  };
1181
- }>, Record<never, never>>;
1146
+ }>;
1182
1147
  };
1183
1148
  export declare const imapSettings: {
1184
- update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1149
+ update: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
1185
1150
  accountId: z.ZodUUID;
1186
1151
  password: z.ZodOptional<z.ZodString>;
1187
1152
  smtpPassword: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1348,7 +1313,7 @@ export declare const imapSettings: {
1348
1313
  contactsInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
1349
1314
  createdAt: z.ZodPreprocess<z.ZodDate, Date>;
1350
1315
  updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
1351
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
1316
+ }, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
1352
1317
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
1353
1318
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
1354
1319
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -1365,95 +1330,74 @@ export declare const imapSettings: {
1365
1330
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
1366
1331
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
1367
1332
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
1368
- }>>, {
1333
+ }>, "provider_unavailable" | "provider_not_configured" | "token_exchange_failed" | "invalid_client" | "credential_conflict" | "credential_missing" | "account_not_found" | "oauth_app_secret_unreadable" | "account_reauth_required" | "provider_throttled" | "password_required" | "oauth_servers_fixed" | "dav_discovery_failed" | "dav_unsupported" | "login_failed" | "server_not_allowed" | "plaintext_not_allowed" | "not_dav_server" | "not_imap_account" | "password_not_stored" | "password_unsupported"> & {
1369
1334
  provider_not_configured: {
1370
- status: 400;
1371
1335
  message: string;
1372
1336
  };
1373
1337
  token_exchange_failed: {
1374
- status: 400;
1375
1338
  message: string;
1376
1339
  };
1377
1340
  invalid_client: {
1378
- status: 400;
1379
1341
  message: string;
1380
1342
  };
1381
1343
  credential_conflict: {
1382
- status: 400;
1383
1344
  message: string;
1384
1345
  };
1385
1346
  credential_missing: {
1386
- status: 400;
1387
1347
  message: string;
1388
1348
  };
1389
1349
  oauth_app_secret_unreadable: {
1390
- status: 400;
1391
1350
  message: string;
1392
1351
  };
1393
1352
  account_reauth_required: {
1394
- status: 409;
1395
1353
  message: string;
1396
1354
  };
1397
1355
  password_required: {
1398
- status: 400;
1399
1356
  message: string;
1400
1357
  };
1401
1358
  oauth_servers_fixed: {
1402
- status: 400;
1403
1359
  message: string;
1404
1360
  };
1405
1361
  dav_unsupported: {
1406
- status: 400;
1407
1362
  message: string;
1408
1363
  };
1409
1364
  not_imap_account: {
1410
- status: 400;
1411
1365
  message: string;
1412
1366
  };
1413
1367
  password_not_stored: {
1414
- status: 400;
1415
1368
  message: string;
1416
1369
  };
1417
1370
  password_unsupported: {
1418
- status: 400;
1419
1371
  message: string;
1420
1372
  };
1421
1373
  provider_unavailable: {
1422
- status: 502;
1423
1374
  message: string;
1424
1375
  };
1425
1376
  provider_throttled: {
1426
- status: 429;
1427
1377
  message: string;
1428
1378
  };
1429
1379
  dav_discovery_failed: {
1430
- status: 400;
1431
1380
  message: string;
1432
1381
  };
1433
1382
  not_dav_server: {
1434
- status: 400;
1435
1383
  message: string;
1436
1384
  };
1437
1385
  login_failed: {
1438
- status: 400;
1439
1386
  message: string;
1440
1387
  };
1441
1388
  server_not_allowed: {
1442
- status: 400;
1443
1389
  message: string;
1444
1390
  };
1445
1391
  plaintext_not_allowed: {
1446
- status: 400;
1447
1392
  message: string;
1448
1393
  };
1449
1394
  account_not_found: {
1450
- status: 404;
1451
1395
  message: string;
1452
1396
  };
1453
- }>, Record<never, never>>;
1397
+ }>;
1454
1398
  };
1455
1399
  export declare const autoconfig: {
1456
- lookup: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
1400
+ lookup: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<z.ZodObject<{
1457
1401
  email: z.ZodEmail;
1458
1402
  }, z.core.$strip>, z.ZodObject<{
1459
1403
  source: z.ZodEnum<{
@@ -1496,7 +1440,7 @@ export declare const autoconfig: {
1496
1440
  calendarUrl: z.ZodNullable<z.ZodString>;
1497
1441
  contactsUrl: z.ZodNullable<z.ZodString>;
1498
1442
  }, z.core.$strip>>;
1499
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
1443
+ }, z.core.$strip>, Omit<import("../errors.js").DeclaredErrors<{
1500
1444
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
1501
1445
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
1502
1446
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -1513,7 +1457,7 @@ export declare const autoconfig: {
1513
1457
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
1514
1458
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
1515
1459
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
1516
- }>>, import("../errors.js").DeclaredErrors<{
1460
+ }>, "autodiscovery_failed"> & import("../errors.js").DeclaredErrors<{
1517
1461
  readonly autodiscovery_failed: "No IMAP settings were found for the address; ask the user for the servers then.";
1518
- }>>, Record<never, never>>;
1462
+ }>>;
1519
1463
  };
@@ -1,5 +1,5 @@
1
1
  export declare const ai: {
2
- draft: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
2
+ draft: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<import("zod").ZodObject<{
3
3
  instructions: import("zod").ZodString;
4
4
  context: import("zod").ZodOptional<import("zod").ZodObject<{
5
5
  accountId: import("zod").ZodOptional<import("zod").ZodUUID>;
@@ -12,7 +12,7 @@ export declare const ai: {
12
12
  }>;
13
13
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
14
14
  text: import("zod").ZodString;
15
- }, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
15
+ }, import("zod/v4/core").$strip>, Omit<import("../errors.js").DeclaredErrors<{
16
16
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
17
17
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
18
18
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -29,70 +29,55 @@ export declare const ai: {
29
29
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
30
30
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
31
31
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
32
- }>>, {
32
+ }>, "provider_unavailable" | "plan_required" | "spend_cap_reached" | "plan_module_unavailable" | "plan_limit_ai" | "unknown_account" | "account_paused" | "account_disabled" | "account_reauth_required" | "account_misconfigured" | "mail_disabled" | "provider_not_found" | "provider_throttled" | "provider_forbidden" | "ai_disabled" | "ai_unavailable" | "ai_suspended" | "ai_refused" | "unknown_message"> & {
33
33
  unknown_account: import("../errors.js").DeclaredError<"unknown_account">;
34
34
  mail_disabled: {
35
- status: 409;
36
35
  message: string;
37
36
  };
38
37
  provider_not_found: {
39
- status: 404;
40
38
  message: string;
41
39
  };
42
40
  provider_forbidden: {
43
- status: 403;
44
41
  message: string;
45
42
  };
46
43
  ai_disabled: {
47
- status: 400;
48
44
  message: string;
49
45
  };
50
46
  ai_unavailable: {
51
- status: 502;
52
47
  message: string;
53
48
  };
54
49
  ai_suspended: {
55
- status: 502;
56
50
  message: string;
57
51
  };
58
52
  ai_refused: {
59
- status: 400;
60
53
  message: string;
61
54
  };
62
55
  unknown_message: {
63
- status: 422;
64
56
  message: string;
65
57
  };
66
58
  provider_unavailable: {
67
- status: 502;
68
59
  message: string;
69
60
  };
70
61
  provider_throttled: {
71
- status: 429;
72
62
  message: string;
73
63
  };
74
64
  account_paused: {
75
- status: 409;
76
65
  message: string;
77
66
  };
78
67
  account_disabled: {
79
- status: 409;
80
68
  message: string;
81
69
  };
82
70
  account_reauth_required: {
83
- status: 409;
84
71
  message: string;
85
72
  };
86
73
  account_misconfigured: {
87
- status: 409;
88
74
  message: string;
89
75
  };
90
76
  plan_required: import("../errors.js").DeclaredError<"plan_required">;
91
77
  spend_cap_reached: import("../errors.js").DeclaredError<"spend_cap_reached">;
92
78
  plan_limit_ai: import("../errors.js").DeclaredError<"plan_limit_ai">;
93
79
  plan_module_unavailable: {
94
- status: 403;
95
80
  message: string;
96
81
  };
97
- }>, Record<never, never>>;
82
+ }>;
98
83
  };
@@ -1,5 +1,5 @@
1
1
  export declare const auditLog: {
2
- list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
2
+ list: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<import("zod").ZodObject<{
3
3
  actorType: import("zod").ZodOptional<import("zod").ZodEnum<{
4
4
  user: "user";
5
5
  apiKey: "apiKey";
@@ -52,7 +52,7 @@ export declare const auditLog: {
52
52
  requestId: import("zod").ZodNullable<import("zod").ZodString>;
53
53
  }, import("zod/v4/core").$strip>>;
54
54
  nextCursor: import("zod").ZodNullable<import("zod").ZodString>;
55
- }, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
55
+ }, import("zod/v4/core").$strip>, Omit<import("../errors.js").DeclaredErrors<{
56
56
  readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
57
57
  readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
58
58
  readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
@@ -69,14 +69,12 @@ export declare const auditLog: {
69
69
  readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
70
70
  readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
71
71
  readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
72
- }>>, {
72
+ }>, "invalid_range" | "invalid_cursor"> & {
73
73
  invalid_range: {
74
- status: 400;
75
74
  message: string;
76
75
  };
77
76
  invalid_cursor: {
78
- status: 400;
79
77
  message: string;
80
78
  };
81
- }>, Record<never, never>>;
79
+ }>;
82
80
  };