@vibexp/api-client 0.42.0 → 0.43.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.
@@ -935,6 +935,300 @@ export type ValidateModelProviderResponse = {
935
935
  error_details?: string;
936
936
  };
937
937
  };
938
+ /**
939
+ * A team's own GitHub App registration. Never carries secret values.
940
+ */
941
+ export type GitHubAppConfig = {
942
+ id: string;
943
+ /**
944
+ * Team that owns this App registration.
945
+ */
946
+ team_id: string;
947
+ /**
948
+ * Who registered the App. Informational only — the team is the tenancy boundary, and no read is scoped by this field.
949
+ */
950
+ user_id?: string | null;
951
+ /**
952
+ * GitHub's numeric App id, carried as a string.
953
+ */
954
+ app_id: string;
955
+ /**
956
+ * The App's slug, which builds its install URL (https://github.com/apps/{app_slug}/installations/new).
957
+ */
958
+ app_slug: string;
959
+ /**
960
+ * The App's OAuth client id. Not a secret — GitHub shows it on the App settings page, and it is echoed back so an operator can confirm which App is wired up.
961
+ */
962
+ client_id: string;
963
+ created_at: string;
964
+ updated_at: string;
965
+ /**
966
+ * Optimistic-concurrency version counter, incremented on each update.
967
+ */
968
+ version: number;
969
+ };
970
+ /**
971
+ * The App registration as returned by every read. Secrets are replaced by has_* booleans; webhook_url is the URL to paste into the App's settings.
972
+ */
973
+ export type GitHubAppConfigResponse = GitHubAppConfig & {
974
+ /**
975
+ * Whether a private key is stored. The key itself is never returned.
976
+ */
977
+ has_private_key: boolean;
978
+ /**
979
+ * Whether a client secret is stored. The secret itself is never returned.
980
+ */
981
+ has_client_secret: boolean;
982
+ /**
983
+ * Whether a webhook secret is stored. The secret is disclosed only once, when it is generated; recovering a lost one means rotating it.
984
+ */
985
+ has_webhook_secret: boolean;
986
+ /**
987
+ * The webhook URL for this App, carrying its opaque routing token. Paste it into the App's settings on GitHub. Empty when the instance has no public base URL configured.
988
+ */
989
+ webhook_url: string;
990
+ };
991
+ /**
992
+ * The one and only payload that carries a plaintext webhook secret. Returned by create and by webhook-secret rotation; every subsequent read returns GitHubAppConfigResponse, which cannot carry it.
993
+ */
994
+ export type CreateGitHubAppConfigResponse = GitHubAppConfigResponse & {
995
+ /**
996
+ * The generated webhook secret, shown exactly once. Paste it into the App's settings alongside the webhook URL; it cannot be read back.
997
+ */
998
+ webhook_secret: string;
999
+ };
1000
+ /**
1001
+ * Registers a team's GitHub App. There is deliberately no webhook_secret field — the server generates it and returns it once.
1002
+ */
1003
+ export type CreateGitHubAppConfigRequest = {
1004
+ /**
1005
+ * GitHub's numeric App id.
1006
+ */
1007
+ app_id: string;
1008
+ /**
1009
+ * The App's slug, used to build its install URL.
1010
+ */
1011
+ app_slug: string;
1012
+ /**
1013
+ * The App's OAuth client id.
1014
+ */
1015
+ client_id: string;
1016
+ /**
1017
+ * The App's RSA private key, as raw PEM or base64-encoded PEM. Encrypted at rest and never returned.
1018
+ */
1019
+ private_key: string;
1020
+ /**
1021
+ * The App's OAuth client secret. Encrypted at rest and never returned.
1022
+ */
1023
+ client_secret: string;
1024
+ };
1025
+ /**
1026
+ * Edits the team's App registration. Every field is optional; an omitted field keeps the stored value. An explicitly EMPTY value is rejected rather than treated as a clear — a GitHub App with no private key is not a meaningful state, so a blank value is far more likely a client bug than an intent. webhook_secret is absent for the same reason it is absent from create: it is server-generated, and replaced through the rotation endpoint.
1027
+ */
1028
+ export type UpdateGitHubAppConfigRequest = {
1029
+ app_id?: string;
1030
+ app_slug?: string;
1031
+ client_id?: string;
1032
+ /**
1033
+ * Replacement RSA private key (raw PEM or base64-encoded PEM).
1034
+ */
1035
+ private_key?: string;
1036
+ /**
1037
+ * Replacement OAuth client secret.
1038
+ */
1039
+ client_secret?: string;
1040
+ };
1041
+ /**
1042
+ * Result of probing GitHub with the stored credentials. A failed probe is reported here with is_valid=false, not as an HTTP error — a wrong key is user-correctable, not a server fault. error_details is always one of a fixed set of categories so the response cannot become an oracle for what the server could reach; the real upstream error is logged server-side only.
1043
+ */
1044
+ export type ValidateGitHubAppConfigResponse = {
1045
+ is_valid: boolean;
1046
+ /**
1047
+ * Human-readable summary of the outcome.
1048
+ */
1049
+ message: string;
1050
+ /**
1051
+ * The slug GitHub reports for the authenticated App, echoed so a mismatch with the stored value is visible rather than silently producing a broken install URL later.
1052
+ */
1053
+ app_slug?: string;
1054
+ /**
1055
+ * The App's granted permissions, so a missing contents/metadata read can be surfaced before it breaks an import.
1056
+ */
1057
+ permissions?: {
1058
+ [key: string]: string;
1059
+ };
1060
+ details?: ValidateGitHubAppConfigDetails;
1061
+ };
1062
+ /**
1063
+ * Fixed-category diagnostics for a validation probe.
1064
+ */
1065
+ export type ValidateGitHubAppConfigDetails = {
1066
+ response_time_ms?: number;
1067
+ /**
1068
+ * HTTP status GitHub returned, when the probe got that far.
1069
+ */
1070
+ status_code?: number;
1071
+ /**
1072
+ * Fixed failure category. Never carries upstream error text, which would reveal what the server could and could not reach.
1073
+ */
1074
+ error_details?: 'invalid_credentials' | 'app_not_found' | 'slug_mismatch' | 'insufficient_permissions' | 'connection_failed';
1075
+ };
1076
+ /**
1077
+ * Non-secret SMTP settings. The password is the provider's secret.
1078
+ */
1079
+ export type SmtpProviderSettings = {
1080
+ /**
1081
+ * SMTP server hostname.
1082
+ */
1083
+ host: string;
1084
+ /**
1085
+ * SMTP port, as a string. Must parse to 1-65535.
1086
+ */
1087
+ port: string;
1088
+ /**
1089
+ * SMTP username, when the server requires authentication.
1090
+ */
1091
+ username?: string;
1092
+ };
1093
+ /**
1094
+ * Non-secret Mailgun settings. The sending key is the provider's secret.
1095
+ */
1096
+ export type MailgunProviderSettings = {
1097
+ /**
1098
+ * The Mailgun sending domain. Must be a bare domain, not a URL.
1099
+ */
1100
+ domain: string;
1101
+ /**
1102
+ * Optional API base URL, to select a non-US region (for example https://api.eu.mailgun.net/v3). A missing /v2|/v3|/v4 suffix is normalised to /v3.
1103
+ */
1104
+ base_url?: string;
1105
+ };
1106
+ /**
1107
+ * Non-secret Postmark settings. The server token is the provider's secret.
1108
+ */
1109
+ export type PostmarkProviderSettings = {
1110
+ /**
1111
+ * Postmark message stream to send on. Defaults to "outbound", the default transactional stream.
1112
+ */
1113
+ message_stream?: string;
1114
+ };
1115
+ /**
1116
+ * Per-type non-secret settings. Exactly the block matching `provider_type` may be present; a block belonging to another type is rejected rather than ignored. SendGrid has no block — its only configuration is its API key, which is the secret.
1117
+ */
1118
+ export type TeamEmailProviderSettings = {
1119
+ smtp?: SmtpProviderSettings;
1120
+ mailgun?: MailgunProviderSettings;
1121
+ postmark?: PostmarkProviderSettings;
1122
+ };
1123
+ /**
1124
+ * The team's email provider configuration. This is an upsert, so the same body creates or replaces.
1125
+ */
1126
+ export type UpsertTeamEmailProviderRequest = {
1127
+ /**
1128
+ * Which provider to send through. Matched case-insensitively.
1129
+ */
1130
+ provider_type: 'smtp' | 'mailgun' | 'postmark' | 'sendgrid';
1131
+ settings?: TeamEmailProviderSettings;
1132
+ /**
1133
+ * The provider's single credential (SMTP password, Mailgun sending key, Postmark server token, or SendGrid API key). Required when configuring a provider for the first time.
1134
+ * On a team that already has a provider, OMIT this field to keep the stored credential — it is never returned, so a client cannot resend it. An explicitly empty string is rejected: a provider with no credential cannot send, so clearing it would silently disable the team's mail.
1135
+ */
1136
+ secret?: string;
1137
+ /**
1138
+ * The address the team's mail is sent from.
1139
+ */
1140
+ from_address: string;
1141
+ /**
1142
+ * Optional display name shown beside the from address.
1143
+ */
1144
+ from_name?: string | null;
1145
+ /**
1146
+ * Optional Reply-To address.
1147
+ */
1148
+ reply_to?: string | null;
1149
+ };
1150
+ /**
1151
+ * The email configuration in force for a team — its own provider, or the instance provider it inherits. This is never a 404: a team without its own provider is inheriting one, which is a state the caller needs described.
1152
+ * No field here can carry the credential; `has_credential` reports only that one is stored.
1153
+ */
1154
+ export type TeamEmailProviderResponse = {
1155
+ /**
1156
+ * Whether the team has its own provider configured.
1157
+ */
1158
+ configured: boolean;
1159
+ /**
1160
+ * Which provider will actually send: the team's own, or the instance provider from the deployment configuration.
1161
+ */
1162
+ source: 'team' | 'instance';
1163
+ /**
1164
+ * The address mail will actually be sent from — the team's when configured, otherwise the instance's.
1165
+ */
1166
+ effective_from_address: string;
1167
+ /**
1168
+ * The team's provider type, or null when the team inherits the instance provider.
1169
+ */
1170
+ provider_type: 'smtp' | 'mailgun' | 'postmark' | 'sendgrid' | null;
1171
+ /**
1172
+ * Whether a credential is stored for the team's provider. The credential itself is never returned.
1173
+ */
1174
+ has_credential: boolean;
1175
+ /**
1176
+ * The team's configured from address. Absent when inheriting the instance provider.
1177
+ */
1178
+ from_address?: string;
1179
+ /**
1180
+ * The team's configured display name.
1181
+ */
1182
+ from_name?: string | null;
1183
+ /**
1184
+ * The team's configured Reply-To address.
1185
+ */
1186
+ reply_to?: string | null;
1187
+ settings?: TeamEmailProviderSettings;
1188
+ /**
1189
+ * Whether the last observed send succeeded. Derived by comparing last_success_at with last_error_at, so a recovered provider is healthy even though last_error is still populated.
1190
+ */
1191
+ is_healthy?: boolean;
1192
+ /**
1193
+ * When a send through the team's provider last succeeded.
1194
+ */
1195
+ last_success_at?: string | null;
1196
+ /**
1197
+ * The last delivery error. Deliberately retained after recovery for diagnosis, so its presence alone does not mean the provider is broken — use is_healthy.
1198
+ */
1199
+ last_error?: string | null;
1200
+ /**
1201
+ * When the last delivery error occurred.
1202
+ */
1203
+ last_error_at?: string | null;
1204
+ };
1205
+ /**
1206
+ * Fixed-category detail for a failed test send. The real upstream error is logged server-side only.
1207
+ */
1208
+ export type TeamEmailProviderTestDetails = {
1209
+ /**
1210
+ * Why the test failed: `configuration_invalid` when the provider could not be built at all (nothing was dialled), `send_failed` when it was built but delivery failed. Absent on success.
1211
+ */
1212
+ error_details?: 'configuration_invalid' | 'send_failed';
1213
+ };
1214
+ /**
1215
+ * Outcome of a test send. A failed send is reported here with `is_valid: false`, not as an HTTP error — the caller asked whether the configuration works, and "no, because X" is a successful answer.
1216
+ */
1217
+ export type TeamEmailProviderTestResponse = {
1218
+ /**
1219
+ * Whether the test message was accepted by the provider.
1220
+ */
1221
+ is_valid: boolean;
1222
+ /**
1223
+ * Human-readable outcome, safe to show to an admin.
1224
+ */
1225
+ message: string;
1226
+ /**
1227
+ * Where the test message was sent. Always the acting user's own account email — this endpoint never accepts a caller-supplied recipient, so it cannot be used to send mail to third parties.
1228
+ */
1229
+ recipient: string;
1230
+ details: TeamEmailProviderTestDetails;
1231
+ };
938
1232
  export type ResourceUsageItem = {
939
1233
  /**
940
1234
  * Type of resource (e.g., prompt, memory, artifact)
@@ -3885,6 +4179,26 @@ export type RelationListResponse = {
3885
4179
  */
3886
4180
  total_pages: number;
3887
4181
  };
4182
+ export type MetadataKeysResponse = {
4183
+ /**
4184
+ * Distinct metadata keys present on the caller's rows of the requested resource type, in ascending order.
4185
+ */
4186
+ keys: Array<string>;
4187
+ /**
4188
+ * True when more distinct keys exist than the requested limit returned.
4189
+ */
4190
+ truncated: boolean;
4191
+ };
4192
+ export type MetadataValuesResponse = {
4193
+ /**
4194
+ * Distinct values stored under the requested key, in ascending order. Values held in an array are flattened, and non-string scalars are rendered in their text form. Keys whose value is a JSON object are skipped, since they have no meaningful value list.
4195
+ */
4196
+ values: Array<string>;
4197
+ /**
4198
+ * True when more distinct values exist than the requested limit returned.
4199
+ */
4200
+ truncated: boolean;
4201
+ };
3888
4202
  /**
3889
4203
  * The search ranking settings in effect for a team, with enough context for a client to render the whole settings surface from this one response: the effective values, where they came from, the instance defaults to preview a reset against, and the instance-owned candidate cap.
3890
4204
  *
@@ -5337,6 +5651,10 @@ export type ListArtifactsData = {
5337
5651
  * Search in title, description, and content
5338
5652
  */
5339
5653
  search?: string;
5654
+ /**
5655
+ * Filter by metadata as a JSON object of key to array of string values. Keys are combined with AND, values within a key with OR, and an empty array means "the key exists". Values match metadata stored as a scalar or as an array, and numeric/boolean values are matched by their string form. At most 10 keys, 25 values per key, key length 255, value length 512. Example: {"env":["prod","staging"],"team":["core"]}
5656
+ */
5657
+ metadata?: string;
5340
5658
  /**
5341
5659
  * Sort field
5342
5660
  */
@@ -5357,6 +5675,10 @@ export type ListArtifactsData = {
5357
5675
  url: '/api/v1/{team_id}/artifacts';
5358
5676
  };
5359
5677
  export type ListArtifactsErrors = {
5678
+ /**
5679
+ * Invalid query parameter (for example a malformed `metadata` filter)
5680
+ */
5681
+ 400: ErrorResponse;
5360
5682
  /**
5361
5683
  * Unauthorized
5362
5684
  */
@@ -5465,6 +5787,10 @@ export type ListArtifactsByProjectData = {
5465
5787
  * Search in title, description, and content
5466
5788
  */
5467
5789
  search?: string;
5790
+ /**
5791
+ * Filter by metadata as a JSON object of key to array of string values. Keys are combined with AND, values within a key with OR, and an empty array means "the key exists". Values match metadata stored as a scalar or as an array, and numeric/boolean values are matched by their string form. At most 10 keys, 25 values per key, key length 255, value length 512. Example: {"env":["prod","staging"],"team":["core"]}
5792
+ */
5793
+ metadata?: string;
5468
5794
  /**
5469
5795
  * Sort field
5470
5796
  */
@@ -5485,6 +5811,10 @@ export type ListArtifactsByProjectData = {
5485
5811
  url: '/api/v1/{team_id}/artifacts/{project_id}';
5486
5812
  };
5487
5813
  export type ListArtifactsByProjectErrors = {
5814
+ /**
5815
+ * Invalid query parameter (for example a malformed `metadata` filter)
5816
+ */
5817
+ 400: ErrorResponse;
5488
5818
  /**
5489
5819
  * Unauthorized
5490
5820
  */
@@ -6247,6 +6577,10 @@ export type ListMemoriesData = {
6247
6577
  * Filter by metadata value (requires metadata_key)
6248
6578
  */
6249
6579
  metadata_value?: string;
6580
+ /**
6581
+ * Filter by metadata as a JSON object of key to array of string values. Keys are combined with AND, values within a key with OR, and an empty array means "the key exists". Values match metadata stored as a scalar or as an array, and numeric/boolean values are matched by their string form. At most 10 keys, 25 values per key, key length 255, value length 512. Example: {"env":["prod","staging"],"team":["core"]}
6582
+ */
6583
+ metadata?: string;
6250
6584
  /**
6251
6585
  * Filter by lifecycle status. When omitted, archived memories are hidden (active and draft are returned); an explicit value returns only that status. Returns 400 for unknown values.
6252
6586
  */
@@ -6271,6 +6605,10 @@ export type ListMemoriesData = {
6271
6605
  url: '/api/v1/{team_id}/memories';
6272
6606
  };
6273
6607
  export type ListMemoriesErrors = {
6608
+ /**
6609
+ * Invalid query parameter (for example an unknown `status` or `sort_by` value, or a malformed `metadata` filter)
6610
+ */
6611
+ 400: ErrorResponse;
6274
6612
  /**
6275
6613
  * Unauthorized
6276
6614
  */
@@ -6704,7 +7042,7 @@ export type ListSpecLibrariesData = {
6704
7042
  /**
6705
7043
  * Filter by type
6706
7044
  */
6707
- type?: 'general';
7045
+ type?: 'general' | 'claude-code' | 'claude' | 'cursor' | 'codex';
6708
7046
  /**
6709
7047
  * Filter by subtype category
6710
7048
  */
@@ -6713,6 +7051,10 @@ export type ListSpecLibrariesData = {
6713
7051
  * Search in title, description, and content
6714
7052
  */
6715
7053
  search?: string;
7054
+ /**
7055
+ * Filter by metadata as a JSON object of key to array of string values. Keys are combined with AND, values within a key with OR, and an empty array means "the key exists". Values match metadata stored as a scalar or as an array, and numeric/boolean values are matched by their string form. At most 10 keys, 25 values per key, key length 255, value length 512. Example: {"env":["prod","staging"],"team":["core"]}
7056
+ */
7057
+ metadata?: string;
6716
7058
  /**
6717
7059
  * Sort field
6718
7060
  */
@@ -6733,6 +7075,10 @@ export type ListSpecLibrariesData = {
6733
7075
  url: '/api/v1/{team_id}/blueprints';
6734
7076
  };
6735
7077
  export type ListSpecLibrariesErrors = {
7078
+ /**
7079
+ * Invalid query parameter (for example a malformed `metadata` filter)
7080
+ */
7081
+ 400: ErrorResponse;
6736
7082
  /**
6737
7083
  * Unauthorized
6738
7084
  */
@@ -6836,7 +7182,7 @@ export type ListSpecLibrariesByProjectData = {
6836
7182
  /**
6837
7183
  * Filter by type
6838
7184
  */
6839
- type?: 'general';
7185
+ type?: 'general' | 'claude-code' | 'claude' | 'cursor' | 'codex';
6840
7186
  /**
6841
7187
  * Filter by subtype category
6842
7188
  */
@@ -6845,6 +7191,10 @@ export type ListSpecLibrariesByProjectData = {
6845
7191
  * Search in title, description, and content
6846
7192
  */
6847
7193
  search?: string;
7194
+ /**
7195
+ * Filter by metadata as a JSON object of key to array of string values. Keys are combined with AND, values within a key with OR, and an empty array means "the key exists". Values match metadata stored as a scalar or as an array, and numeric/boolean values are matched by their string form. At most 10 keys, 25 values per key, key length 255, value length 512. Example: {"env":["prod","staging"],"team":["core"]}
7196
+ */
7197
+ metadata?: string;
6848
7198
  /**
6849
7199
  * Sort field
6850
7200
  */
@@ -8106,6 +8456,10 @@ export type GetGitHubInstallUrlErrors = {
8106
8456
  * Forbidden - user does not have access to this team, or is not a team owner/admin
8107
8457
  */
8108
8458
  403: ErrorResponse;
8459
+ /**
8460
+ * Conflict - the team has no GitHub App configured, so there is no App slug to build an install URL from. Register the team's App first.
8461
+ */
8462
+ 409: ErrorResponse;
8109
8463
  /**
8110
8464
  * Internal server error
8111
8465
  */
@@ -8130,7 +8484,7 @@ export type HandleGitHubCallbackData = {
8130
8484
  */
8131
8485
  setup_action?: string;
8132
8486
  /**
8133
- * HMAC-signed state parameter from the install URL (CSRF protection)
8487
+ * HMAC-signed state parameter from the install URL (CSRF protection). It is bound to the team's GitHub App config, so a state minted before the team replaced or rotated its App is no longer redeemable.
8134
8488
  */
8135
8489
  state: string;
8136
8490
  /**
@@ -8149,7 +8503,7 @@ export type HandleGitHubCallbackData = {
8149
8503
  };
8150
8504
  export type HandleGitHubCallbackErrors = {
8151
8505
  /**
8152
- * Invalid request body, missing required fields, or invalid/expired state parameter
8506
+ * Invalid request body, missing required fields, an invalid/expired state parameter, or a state bound to a different installation or GitHub App than the team's current one
8153
8507
  */
8154
8508
  400: ErrorResponse;
8155
8509
  /**
@@ -8161,7 +8515,7 @@ export type HandleGitHubCallbackErrors = {
8161
8515
  */
8162
8516
  403: ErrorResponse;
8163
8517
  /**
8164
- * Conflict - this GitHub organization is already connected to another team
8518
+ * Conflict - this GitHub organization is already connected to another team, or the team has no GitHub App configured to complete the installation against
8165
8519
  */
8166
8520
  409: ErrorResponse;
8167
8521
  /**
@@ -8375,22 +8729,49 @@ export type HandleGitHubWebhookData = {
8375
8729
  };
8376
8730
  export type HandleGitHubWebhookErrors = {
8377
8731
  /**
8378
- * Invalid payload or missing required headers
8732
+ * Endpoint retired; use the team's per-App webhook URL
8733
+ */
8734
+ 410: ErrorResponse;
8735
+ };
8736
+ export type HandleGitHubWebhookError = HandleGitHubWebhookErrors[keyof HandleGitHubWebhookErrors];
8737
+ export type HandleGitHubWebhookByTokenData = {
8738
+ /**
8739
+ * GitHub webhook event payload (varies by event type)
8740
+ */
8741
+ body: {
8742
+ [key: string]: unknown;
8743
+ };
8744
+ path: {
8745
+ /**
8746
+ * Opaque routing token identifying which team's GitHub App this delivery belongs to. Minted as unpadded URL-safe base64, so it needs no percent-encoding. Treat it as a secret: it selects the secret the signature is verified against, and it is redacted from access logs.
8747
+ */
8748
+ token: string;
8749
+ };
8750
+ query?: never;
8751
+ url: '/api/v1/webhooks/github/{token}';
8752
+ };
8753
+ export type HandleGitHubWebhookByTokenErrors = {
8754
+ /**
8755
+ * Unreadable body, unparseable payload, or missing installation reference
8379
8756
  */
8380
8757
  400: ErrorResponse;
8381
8758
  /**
8382
- * Invalid webhook signature
8759
+ * Missing or invalid `X-Hub-Signature-256`
8383
8760
  */
8384
8761
  401: ErrorResponse;
8762
+ /**
8763
+ * Unknown or malformed routing token (deliberately indistinguishable)
8764
+ */
8765
+ 404: ErrorResponse;
8385
8766
  /**
8386
8767
  * Internal server error
8387
8768
  */
8388
8769
  500: ErrorResponse;
8389
8770
  };
8390
- export type HandleGitHubWebhookError = HandleGitHubWebhookErrors[keyof HandleGitHubWebhookErrors];
8391
- export type HandleGitHubWebhookResponses = {
8771
+ export type HandleGitHubWebhookByTokenError = HandleGitHubWebhookByTokenErrors[keyof HandleGitHubWebhookByTokenErrors];
8772
+ export type HandleGitHubWebhookByTokenResponses = {
8392
8773
  /**
8393
- * Webhook received and processed successfully
8774
+ * Delivery accepted (or already processed — dedup by delivery id)
8394
8775
  */
8395
8776
  200: unknown;
8396
8777
  };
@@ -12710,7 +13091,7 @@ export type ValidateEmbeddingProviderResponses = {
12710
13091
  200: ValidateEmbeddingProviderResponse;
12711
13092
  };
12712
13093
  export type ValidateEmbeddingProviderResponse2 = ValidateEmbeddingProviderResponses[keyof ValidateEmbeddingProviderResponses];
12713
- export type ResetTeamSearchSettingsData = {
13094
+ export type GetMetadataKeysData = {
12714
13095
  body?: never;
12715
13096
  path: {
12716
13097
  /**
@@ -12718,12 +13099,25 @@ export type ResetTeamSearchSettingsData = {
12718
13099
  */
12719
13100
  team_id: string;
12720
13101
  };
12721
- query?: never;
12722
- url: '/api/v1/{team_id}/settings/search';
13102
+ query: {
13103
+ /**
13104
+ * Which resource type's metadata to enumerate
13105
+ */
13106
+ resource_type: 'artifacts' | 'blueprints' | 'memories';
13107
+ /**
13108
+ * Narrow the catalog to a single project
13109
+ */
13110
+ project_id?: string;
13111
+ /**
13112
+ * Maximum number of keys to return
13113
+ */
13114
+ limit?: number;
13115
+ };
13116
+ url: '/api/v1/{team_id}/metadata/keys';
12723
13117
  };
12724
- export type ResetTeamSearchSettingsErrors = {
13118
+ export type GetMetadataKeysErrors = {
12725
13119
  /**
12726
- * Invalid team_id
13120
+ * Invalid or missing query parameter
12727
13121
  */
12728
13122
  400: ErrorResponse;
12729
13123
  /**
@@ -12731,23 +13125,23 @@ export type ResetTeamSearchSettingsErrors = {
12731
13125
  */
12732
13126
  401: ErrorResponse;
12733
13127
  /**
12734
- * Caller's role does not grant team.settings.update
13128
+ * Caller is not a member of the team
12735
13129
  */
12736
13130
  403: ErrorResponse;
12737
13131
  /**
12738
- * Failed to reset the team's search settings
13132
+ * Internal server error
12739
13133
  */
12740
13134
  500: ErrorResponse;
12741
13135
  };
12742
- export type ResetTeamSearchSettingsError = ResetTeamSearchSettingsErrors[keyof ResetTeamSearchSettingsErrors];
12743
- export type ResetTeamSearchSettingsResponses = {
13136
+ export type GetMetadataKeysError = GetMetadataKeysErrors[keyof GetMetadataKeysErrors];
13137
+ export type GetMetadataKeysResponses = {
12744
13138
  /**
12745
- * Settings reset (no content); the team now inherits the instance defaults
13139
+ * Metadata keys retrieved successfully
12746
13140
  */
12747
- 204: void;
13141
+ 200: MetadataKeysResponse;
12748
13142
  };
12749
- export type ResetTeamSearchSettingsResponse = ResetTeamSearchSettingsResponses[keyof ResetTeamSearchSettingsResponses];
12750
- export type GetTeamSearchSettingsData = {
13143
+ export type GetMetadataKeysResponse = GetMetadataKeysResponses[keyof GetMetadataKeysResponses];
13144
+ export type GetMetadataValuesData = {
12751
13145
  body?: never;
12752
13146
  path: {
12753
13147
  /**
@@ -12755,10 +13149,105 @@ export type GetTeamSearchSettingsData = {
12755
13149
  */
12756
13150
  team_id: string;
12757
13151
  };
12758
- query?: never;
12759
- url: '/api/v1/{team_id}/settings/search';
13152
+ query: {
13153
+ /**
13154
+ * Which resource type's metadata to enumerate
13155
+ */
13156
+ resource_type: 'artifacts' | 'blueprints' | 'memories';
13157
+ /**
13158
+ * The metadata key whose values to enumerate
13159
+ */
13160
+ key: string;
13161
+ /**
13162
+ * Narrow the catalog to a single project
13163
+ */
13164
+ project_id?: string;
13165
+ /**
13166
+ * Case-insensitive substring filter for typeahead
13167
+ */
13168
+ q?: string;
13169
+ /**
13170
+ * Maximum number of values to return
13171
+ */
13172
+ limit?: number;
13173
+ };
13174
+ url: '/api/v1/{team_id}/metadata/values';
12760
13175
  };
12761
- export type GetTeamSearchSettingsErrors = {
13176
+ export type GetMetadataValuesErrors = {
13177
+ /**
13178
+ * Invalid or missing query parameter
13179
+ */
13180
+ 400: ErrorResponse;
13181
+ /**
13182
+ * Unauthorized
13183
+ */
13184
+ 401: ErrorResponse;
13185
+ /**
13186
+ * Caller is not a member of the team
13187
+ */
13188
+ 403: ErrorResponse;
13189
+ /**
13190
+ * Internal server error
13191
+ */
13192
+ 500: ErrorResponse;
13193
+ };
13194
+ export type GetMetadataValuesError = GetMetadataValuesErrors[keyof GetMetadataValuesErrors];
13195
+ export type GetMetadataValuesResponses = {
13196
+ /**
13197
+ * Metadata values retrieved successfully
13198
+ */
13199
+ 200: MetadataValuesResponse;
13200
+ };
13201
+ export type GetMetadataValuesResponse = GetMetadataValuesResponses[keyof GetMetadataValuesResponses];
13202
+ export type ResetTeamSearchSettingsData = {
13203
+ body?: never;
13204
+ path: {
13205
+ /**
13206
+ * Team identifier
13207
+ */
13208
+ team_id: string;
13209
+ };
13210
+ query?: never;
13211
+ url: '/api/v1/{team_id}/settings/search';
13212
+ };
13213
+ export type ResetTeamSearchSettingsErrors = {
13214
+ /**
13215
+ * Invalid team_id
13216
+ */
13217
+ 400: ErrorResponse;
13218
+ /**
13219
+ * Unauthorized
13220
+ */
13221
+ 401: ErrorResponse;
13222
+ /**
13223
+ * Caller's role does not grant team.settings.update
13224
+ */
13225
+ 403: ErrorResponse;
13226
+ /**
13227
+ * Failed to reset the team's search settings
13228
+ */
13229
+ 500: ErrorResponse;
13230
+ };
13231
+ export type ResetTeamSearchSettingsError = ResetTeamSearchSettingsErrors[keyof ResetTeamSearchSettingsErrors];
13232
+ export type ResetTeamSearchSettingsResponses = {
13233
+ /**
13234
+ * Settings reset (no content); the team now inherits the instance defaults
13235
+ */
13236
+ 204: void;
13237
+ };
13238
+ export type ResetTeamSearchSettingsResponse = ResetTeamSearchSettingsResponses[keyof ResetTeamSearchSettingsResponses];
13239
+ export type GetTeamSearchSettingsData = {
13240
+ body?: never;
13241
+ path: {
13242
+ /**
13243
+ * Team identifier
13244
+ */
13245
+ team_id: string;
13246
+ };
13247
+ query?: never;
13248
+ url: '/api/v1/{team_id}/settings/search';
13249
+ };
13250
+ export type GetTeamSearchSettingsErrors = {
12762
13251
  /**
12763
13252
  * Invalid team_id
12764
13253
  */
@@ -13159,6 +13648,658 @@ export type ClearEmbeddingsSettingsResponses = {
13159
13648
  200: ClearEmbeddingsResponse;
13160
13649
  };
13161
13650
  export type ClearEmbeddingsSettingsResponse = ClearEmbeddingsSettingsResponses[keyof ClearEmbeddingsSettingsResponses];
13651
+ export type DeleteGitHubAppConfigData = {
13652
+ body?: never;
13653
+ path: {
13654
+ /**
13655
+ * Team that owns the GitHub App registration.
13656
+ */
13657
+ team_id: string;
13658
+ };
13659
+ query?: never;
13660
+ url: '/api/v1/{team_id}/integrations/github/app';
13661
+ };
13662
+ export type DeleteGitHubAppConfigErrors = {
13663
+ /**
13664
+ * Unauthorized
13665
+ */
13666
+ 401: ErrorResponse;
13667
+ /**
13668
+ * Forbidden - managing the GitHub App requires team owner/admin (`FORBIDDEN`)
13669
+ */
13670
+ 403: ErrorResponse;
13671
+ /**
13672
+ * The team has no GitHub App configured (`GITHUB_APP_NOT_CONFIGURED`)
13673
+ */
13674
+ 409: ErrorResponse;
13675
+ };
13676
+ export type DeleteGitHubAppConfigError = DeleteGitHubAppConfigErrors[keyof DeleteGitHubAppConfigErrors];
13677
+ export type DeleteGitHubAppConfigResponses = {
13678
+ /**
13679
+ * GitHub App configuration deleted
13680
+ */
13681
+ 204: void;
13682
+ };
13683
+ export type DeleteGitHubAppConfigResponse = DeleteGitHubAppConfigResponses[keyof DeleteGitHubAppConfigResponses];
13684
+ export type GetGitHubAppConfigData = {
13685
+ body?: never;
13686
+ path: {
13687
+ /**
13688
+ * Team that owns the GitHub App registration.
13689
+ */
13690
+ team_id: string;
13691
+ };
13692
+ query?: never;
13693
+ url: '/api/v1/{team_id}/integrations/github/app';
13694
+ };
13695
+ export type GetGitHubAppConfigErrors = {
13696
+ /**
13697
+ * Unauthorized
13698
+ */
13699
+ 401: ErrorResponse;
13700
+ /**
13701
+ * The team has no GitHub App configured (`GITHUB_APP_NOT_CONFIGURED`)
13702
+ */
13703
+ 409: ErrorResponse;
13704
+ };
13705
+ export type GetGitHubAppConfigError = GetGitHubAppConfigErrors[keyof GetGitHubAppConfigErrors];
13706
+ export type GetGitHubAppConfigResponses = {
13707
+ /**
13708
+ * The team's GitHub App configuration
13709
+ */
13710
+ 200: GitHubAppConfigResponse;
13711
+ };
13712
+ export type GetGitHubAppConfigResponse = GetGitHubAppConfigResponses[keyof GetGitHubAppConfigResponses];
13713
+ export type CreateGitHubAppConfigData = {
13714
+ body: CreateGitHubAppConfigRequest;
13715
+ path: {
13716
+ /**
13717
+ * Team that owns the GitHub App registration.
13718
+ */
13719
+ team_id: string;
13720
+ };
13721
+ query?: never;
13722
+ url: '/api/v1/{team_id}/integrations/github/app';
13723
+ };
13724
+ export type CreateGitHubAppConfigErrors = {
13725
+ /**
13726
+ * Malformed JSON body (`BAD_REQUEST`), missing required fields, or an unparseable private key (`VALIDATION_FAILED` with `validation_errors`)
13727
+ */
13728
+ 400: ErrorResponse;
13729
+ /**
13730
+ * Unauthorized
13731
+ */
13732
+ 401: ErrorResponse;
13733
+ /**
13734
+ * Forbidden - managing the GitHub App requires team owner/admin (`FORBIDDEN`)
13735
+ */
13736
+ 403: ErrorResponse;
13737
+ /**
13738
+ * The team already has an App configured (`GITHUB_APP_CONFIG_EXISTS`), or another team already registered this `app_id` (`GITHUB_APP_ALREADY_REGISTERED`) — a GitHub App has a single webhook URL, so it cannot be shared across teams
13739
+ */
13740
+ 409: ErrorResponse;
13741
+ };
13742
+ export type CreateGitHubAppConfigError = CreateGitHubAppConfigErrors[keyof CreateGitHubAppConfigErrors];
13743
+ export type CreateGitHubAppConfigResponses = {
13744
+ /**
13745
+ * GitHub App registered. This is the only response that carries the plaintext `webhook_secret`.
13746
+ */
13747
+ 200: CreateGitHubAppConfigResponse;
13748
+ };
13749
+ export type CreateGitHubAppConfigResponse2 = CreateGitHubAppConfigResponses[keyof CreateGitHubAppConfigResponses];
13750
+ export type UpdateGitHubAppConfigData = {
13751
+ body: UpdateGitHubAppConfigRequest;
13752
+ path: {
13753
+ /**
13754
+ * Team that owns the GitHub App registration.
13755
+ */
13756
+ team_id: string;
13757
+ };
13758
+ query?: never;
13759
+ url: '/api/v1/{team_id}/integrations/github/app';
13760
+ };
13761
+ export type UpdateGitHubAppConfigErrors = {
13762
+ /**
13763
+ * Malformed JSON body (`BAD_REQUEST`), an explicitly empty field, or an unparseable private key (`VALIDATION_FAILED` with `validation_errors`)
13764
+ */
13765
+ 400: ErrorResponse;
13766
+ /**
13767
+ * Unauthorized
13768
+ */
13769
+ 401: ErrorResponse;
13770
+ /**
13771
+ * Forbidden - managing the GitHub App requires team owner/admin (`FORBIDDEN`)
13772
+ */
13773
+ 403: ErrorResponse;
13774
+ /**
13775
+ * The team has no GitHub App configured (`GITHUB_APP_NOT_CONFIGURED`), another team already registered this `app_id` (`GITHUB_APP_ALREADY_REGISTERED`), or the configuration was modified concurrently (`GITHUB_APP_CONFIG_CONFLICT`)
13776
+ */
13777
+ 409: ErrorResponse;
13778
+ };
13779
+ export type UpdateGitHubAppConfigError = UpdateGitHubAppConfigErrors[keyof UpdateGitHubAppConfigErrors];
13780
+ export type UpdateGitHubAppConfigResponses = {
13781
+ /**
13782
+ * GitHub App configuration updated
13783
+ */
13784
+ 200: GitHubAppConfigResponse;
13785
+ };
13786
+ export type UpdateGitHubAppConfigResponse = UpdateGitHubAppConfigResponses[keyof UpdateGitHubAppConfigResponses];
13787
+ export type ValidateGitHubAppConfigData = {
13788
+ body?: never;
13789
+ path: {
13790
+ /**
13791
+ * Team that owns the GitHub App registration.
13792
+ */
13793
+ team_id: string;
13794
+ };
13795
+ query?: never;
13796
+ url: '/api/v1/{team_id}/integrations/github/app/validate';
13797
+ };
13798
+ export type ValidateGitHubAppConfigErrors = {
13799
+ /**
13800
+ * Unauthorized
13801
+ */
13802
+ 401: ErrorResponse;
13803
+ /**
13804
+ * Forbidden - managing the GitHub App requires team owner/admin (`FORBIDDEN`)
13805
+ */
13806
+ 403: ErrorResponse;
13807
+ /**
13808
+ * The team has no GitHub App configured (`GITHUB_APP_NOT_CONFIGURED`)
13809
+ */
13810
+ 409: ErrorResponse;
13811
+ };
13812
+ export type ValidateGitHubAppConfigError = ValidateGitHubAppConfigErrors[keyof ValidateGitHubAppConfigErrors];
13813
+ export type ValidateGitHubAppConfigResponses = {
13814
+ /**
13815
+ * Validation result (successful or not)
13816
+ */
13817
+ 200: ValidateGitHubAppConfigResponse;
13818
+ };
13819
+ export type ValidateGitHubAppConfigResponse2 = ValidateGitHubAppConfigResponses[keyof ValidateGitHubAppConfigResponses];
13820
+ export type RotateGitHubAppWebhookTokenData = {
13821
+ body?: never;
13822
+ path: {
13823
+ /**
13824
+ * Team that owns the GitHub App registration.
13825
+ */
13826
+ team_id: string;
13827
+ };
13828
+ query?: never;
13829
+ url: '/api/v1/{team_id}/integrations/github/app/rotate-webhook-token';
13830
+ };
13831
+ export type RotateGitHubAppWebhookTokenErrors = {
13832
+ /**
13833
+ * Unauthorized
13834
+ */
13835
+ 401: ErrorResponse;
13836
+ /**
13837
+ * Forbidden - managing the GitHub App requires team owner/admin (`FORBIDDEN`)
13838
+ */
13839
+ 403: ErrorResponse;
13840
+ /**
13841
+ * The team has no GitHub App configured (`GITHUB_APP_NOT_CONFIGURED`)
13842
+ */
13843
+ 409: ErrorResponse;
13844
+ };
13845
+ export type RotateGitHubAppWebhookTokenError = RotateGitHubAppWebhookTokenErrors[keyof RotateGitHubAppWebhookTokenErrors];
13846
+ export type RotateGitHubAppWebhookTokenResponses = {
13847
+ /**
13848
+ * Token rotated; the response carries the new `webhook_url`
13849
+ */
13850
+ 200: GitHubAppConfigResponse;
13851
+ };
13852
+ export type RotateGitHubAppWebhookTokenResponse = RotateGitHubAppWebhookTokenResponses[keyof RotateGitHubAppWebhookTokenResponses];
13853
+ export type DeleteGitHubAppConfigSettingsData = {
13854
+ body?: never;
13855
+ path: {
13856
+ /**
13857
+ * Team that owns the GitHub App registration.
13858
+ */
13859
+ team_id: string;
13860
+ };
13861
+ query?: never;
13862
+ url: '/api/v1/{team_id}/settings/github-app';
13863
+ };
13864
+ export type DeleteGitHubAppConfigSettingsErrors = {
13865
+ /**
13866
+ * Unauthorized
13867
+ */
13868
+ 401: ErrorResponse;
13869
+ /**
13870
+ * Forbidden - managing the GitHub App requires team owner/admin (`FORBIDDEN`)
13871
+ */
13872
+ 403: ErrorResponse;
13873
+ /**
13874
+ * The team has no GitHub App configured (`GITHUB_APP_NOT_CONFIGURED`)
13875
+ */
13876
+ 409: ErrorResponse;
13877
+ };
13878
+ export type DeleteGitHubAppConfigSettingsError = DeleteGitHubAppConfigSettingsErrors[keyof DeleteGitHubAppConfigSettingsErrors];
13879
+ export type DeleteGitHubAppConfigSettingsResponses = {
13880
+ /**
13881
+ * GitHub App configuration deleted
13882
+ */
13883
+ 204: void;
13884
+ };
13885
+ export type DeleteGitHubAppConfigSettingsResponse = DeleteGitHubAppConfigSettingsResponses[keyof DeleteGitHubAppConfigSettingsResponses];
13886
+ export type GetGitHubAppConfigSettingsData = {
13887
+ body?: never;
13888
+ path: {
13889
+ /**
13890
+ * Team that owns the GitHub App registration.
13891
+ */
13892
+ team_id: string;
13893
+ };
13894
+ query?: never;
13895
+ url: '/api/v1/{team_id}/settings/github-app';
13896
+ };
13897
+ export type GetGitHubAppConfigSettingsErrors = {
13898
+ /**
13899
+ * Unauthorized
13900
+ */
13901
+ 401: ErrorResponse;
13902
+ /**
13903
+ * The team has no GitHub App configured (`GITHUB_APP_NOT_CONFIGURED`)
13904
+ */
13905
+ 409: ErrorResponse;
13906
+ };
13907
+ export type GetGitHubAppConfigSettingsError = GetGitHubAppConfigSettingsErrors[keyof GetGitHubAppConfigSettingsErrors];
13908
+ export type GetGitHubAppConfigSettingsResponses = {
13909
+ /**
13910
+ * The team's GitHub App configuration
13911
+ */
13912
+ 200: GitHubAppConfigResponse;
13913
+ };
13914
+ export type GetGitHubAppConfigSettingsResponse = GetGitHubAppConfigSettingsResponses[keyof GetGitHubAppConfigSettingsResponses];
13915
+ export type CreateGitHubAppConfigSettingsData = {
13916
+ body: CreateGitHubAppConfigRequest;
13917
+ path: {
13918
+ /**
13919
+ * Team that owns the GitHub App registration.
13920
+ */
13921
+ team_id: string;
13922
+ };
13923
+ query?: never;
13924
+ url: '/api/v1/{team_id}/settings/github-app';
13925
+ };
13926
+ export type CreateGitHubAppConfigSettingsErrors = {
13927
+ /**
13928
+ * Malformed JSON body (`BAD_REQUEST`), missing required fields, or an unparseable private key (`VALIDATION_FAILED` with `validation_errors`)
13929
+ */
13930
+ 400: ErrorResponse;
13931
+ /**
13932
+ * Unauthorized
13933
+ */
13934
+ 401: ErrorResponse;
13935
+ /**
13936
+ * Forbidden - managing the GitHub App requires team owner/admin (`FORBIDDEN`)
13937
+ */
13938
+ 403: ErrorResponse;
13939
+ /**
13940
+ * The team already has an App configured (`GITHUB_APP_CONFIG_EXISTS`), or another team already registered this `app_id` (`GITHUB_APP_ALREADY_REGISTERED`) — a GitHub App has a single webhook URL, so it cannot be shared across teams
13941
+ */
13942
+ 409: ErrorResponse;
13943
+ };
13944
+ export type CreateGitHubAppConfigSettingsError = CreateGitHubAppConfigSettingsErrors[keyof CreateGitHubAppConfigSettingsErrors];
13945
+ export type CreateGitHubAppConfigSettingsResponses = {
13946
+ /**
13947
+ * GitHub App registered. This is the only response that carries the plaintext `webhook_secret`.
13948
+ */
13949
+ 200: CreateGitHubAppConfigResponse;
13950
+ };
13951
+ export type CreateGitHubAppConfigSettingsResponse = CreateGitHubAppConfigSettingsResponses[keyof CreateGitHubAppConfigSettingsResponses];
13952
+ export type UpdateGitHubAppConfigSettingsData = {
13953
+ body: UpdateGitHubAppConfigRequest;
13954
+ path: {
13955
+ /**
13956
+ * Team that owns the GitHub App registration.
13957
+ */
13958
+ team_id: string;
13959
+ };
13960
+ query?: never;
13961
+ url: '/api/v1/{team_id}/settings/github-app';
13962
+ };
13963
+ export type UpdateGitHubAppConfigSettingsErrors = {
13964
+ /**
13965
+ * Malformed JSON body (`BAD_REQUEST`), an explicitly empty field, or an unparseable private key (`VALIDATION_FAILED` with `validation_errors`)
13966
+ */
13967
+ 400: ErrorResponse;
13968
+ /**
13969
+ * Unauthorized
13970
+ */
13971
+ 401: ErrorResponse;
13972
+ /**
13973
+ * Forbidden - managing the GitHub App requires team owner/admin (`FORBIDDEN`)
13974
+ */
13975
+ 403: ErrorResponse;
13976
+ /**
13977
+ * The team has no GitHub App configured (`GITHUB_APP_NOT_CONFIGURED`), another team already registered this `app_id` (`GITHUB_APP_ALREADY_REGISTERED`), or the configuration was modified concurrently (`GITHUB_APP_CONFIG_CONFLICT`)
13978
+ */
13979
+ 409: ErrorResponse;
13980
+ };
13981
+ export type UpdateGitHubAppConfigSettingsError = UpdateGitHubAppConfigSettingsErrors[keyof UpdateGitHubAppConfigSettingsErrors];
13982
+ export type UpdateGitHubAppConfigSettingsResponses = {
13983
+ /**
13984
+ * GitHub App configuration updated
13985
+ */
13986
+ 200: GitHubAppConfigResponse;
13987
+ };
13988
+ export type UpdateGitHubAppConfigSettingsResponse = UpdateGitHubAppConfigSettingsResponses[keyof UpdateGitHubAppConfigSettingsResponses];
13989
+ export type ValidateGitHubAppConfigSettingsData = {
13990
+ body?: never;
13991
+ path: {
13992
+ /**
13993
+ * Team that owns the GitHub App registration.
13994
+ */
13995
+ team_id: string;
13996
+ };
13997
+ query?: never;
13998
+ url: '/api/v1/{team_id}/settings/github-app/validate';
13999
+ };
14000
+ export type ValidateGitHubAppConfigSettingsErrors = {
14001
+ /**
14002
+ * Unauthorized
14003
+ */
14004
+ 401: ErrorResponse;
14005
+ /**
14006
+ * Forbidden - managing the GitHub App requires team owner/admin (`FORBIDDEN`)
14007
+ */
14008
+ 403: ErrorResponse;
14009
+ /**
14010
+ * The team has no GitHub App configured (`GITHUB_APP_NOT_CONFIGURED`)
14011
+ */
14012
+ 409: ErrorResponse;
14013
+ };
14014
+ export type ValidateGitHubAppConfigSettingsError = ValidateGitHubAppConfigSettingsErrors[keyof ValidateGitHubAppConfigSettingsErrors];
14015
+ export type ValidateGitHubAppConfigSettingsResponses = {
14016
+ /**
14017
+ * Validation result (successful or not)
14018
+ */
14019
+ 200: ValidateGitHubAppConfigResponse;
14020
+ };
14021
+ export type ValidateGitHubAppConfigSettingsResponse = ValidateGitHubAppConfigSettingsResponses[keyof ValidateGitHubAppConfigSettingsResponses];
14022
+ export type RotateGitHubAppWebhookTokenSettingsData = {
14023
+ body?: never;
14024
+ path: {
14025
+ /**
14026
+ * Team that owns the GitHub App registration.
14027
+ */
14028
+ team_id: string;
14029
+ };
14030
+ query?: never;
14031
+ url: '/api/v1/{team_id}/settings/github-app/rotate-webhook-token';
14032
+ };
14033
+ export type RotateGitHubAppWebhookTokenSettingsErrors = {
14034
+ /**
14035
+ * Unauthorized
14036
+ */
14037
+ 401: ErrorResponse;
14038
+ /**
14039
+ * Forbidden - managing the GitHub App requires team owner/admin (`FORBIDDEN`)
14040
+ */
14041
+ 403: ErrorResponse;
14042
+ /**
14043
+ * The team has no GitHub App configured (`GITHUB_APP_NOT_CONFIGURED`)
14044
+ */
14045
+ 409: ErrorResponse;
14046
+ };
14047
+ export type RotateGitHubAppWebhookTokenSettingsError = RotateGitHubAppWebhookTokenSettingsErrors[keyof RotateGitHubAppWebhookTokenSettingsErrors];
14048
+ export type RotateGitHubAppWebhookTokenSettingsResponses = {
14049
+ /**
14050
+ * Token rotated; the response carries the new `webhook_url`
14051
+ */
14052
+ 200: GitHubAppConfigResponse;
14053
+ };
14054
+ export type RotateGitHubAppWebhookTokenSettingsResponse = RotateGitHubAppWebhookTokenSettingsResponses[keyof RotateGitHubAppWebhookTokenSettingsResponses];
14055
+ export type DeleteTeamEmailProviderData = {
14056
+ body?: never;
14057
+ path: {
14058
+ /**
14059
+ * Team that owns the email provider configuration.
14060
+ */
14061
+ team_id: string;
14062
+ };
14063
+ query?: never;
14064
+ url: '/api/v1/{team_id}/email-provider';
14065
+ };
14066
+ export type DeleteTeamEmailProviderErrors = {
14067
+ /**
14068
+ * Unauthorized
14069
+ */
14070
+ 401: ErrorResponse;
14071
+ /**
14072
+ * Forbidden - configuring the team's email provider requires team owner/admin (`FORBIDDEN`)
14073
+ */
14074
+ 403: ErrorResponse;
14075
+ /**
14076
+ * The team has no email provider of its own (`TEAM_EMAIL_PROVIDER_NOT_CONFIGURED`)
14077
+ */
14078
+ 409: ErrorResponse;
14079
+ };
14080
+ export type DeleteTeamEmailProviderError = DeleteTeamEmailProviderErrors[keyof DeleteTeamEmailProviderErrors];
14081
+ export type DeleteTeamEmailProviderResponses = {
14082
+ /**
14083
+ * Provider removed; the team now uses the instance provider
14084
+ */
14085
+ 204: void;
14086
+ };
14087
+ export type DeleteTeamEmailProviderResponse = DeleteTeamEmailProviderResponses[keyof DeleteTeamEmailProviderResponses];
14088
+ export type GetTeamEmailProviderData = {
14089
+ body?: never;
14090
+ path: {
14091
+ /**
14092
+ * Team that owns the email provider configuration.
14093
+ */
14094
+ team_id: string;
14095
+ };
14096
+ query?: never;
14097
+ url: '/api/v1/{team_id}/email-provider';
14098
+ };
14099
+ export type GetTeamEmailProviderErrors = {
14100
+ /**
14101
+ * Unauthorized
14102
+ */
14103
+ 401: ErrorResponse;
14104
+ };
14105
+ export type GetTeamEmailProviderError = GetTeamEmailProviderErrors[keyof GetTeamEmailProviderErrors];
14106
+ export type GetTeamEmailProviderResponses = {
14107
+ /**
14108
+ * The email configuration in force for the team
14109
+ */
14110
+ 200: TeamEmailProviderResponse;
14111
+ };
14112
+ export type GetTeamEmailProviderResponse = GetTeamEmailProviderResponses[keyof GetTeamEmailProviderResponses];
14113
+ export type UpsertTeamEmailProviderData = {
14114
+ body: UpsertTeamEmailProviderRequest;
14115
+ path: {
14116
+ /**
14117
+ * Team that owns the email provider configuration.
14118
+ */
14119
+ team_id: string;
14120
+ };
14121
+ query?: never;
14122
+ url: '/api/v1/{team_id}/email-provider';
14123
+ };
14124
+ export type UpsertTeamEmailProviderErrors = {
14125
+ /**
14126
+ * Malformed JSON body (`BAD_REQUEST`), or an invalid configuration (`TEAM_EMAIL_PROVIDER_VALIDATION_FAILED` with `validation_errors`) — an unknown provider type, a missing or mismatched settings block, an empty `secret`, a malformed address, or a destination that is not allowed
14127
+ */
14128
+ 400: ErrorResponse;
14129
+ /**
14130
+ * Unauthorized
14131
+ */
14132
+ 401: ErrorResponse;
14133
+ /**
14134
+ * Forbidden - configuring the team's email provider requires team owner/admin (`FORBIDDEN`)
14135
+ */
14136
+ 403: ErrorResponse;
14137
+ };
14138
+ export type UpsertTeamEmailProviderError = UpsertTeamEmailProviderErrors[keyof UpsertTeamEmailProviderErrors];
14139
+ export type UpsertTeamEmailProviderResponses = {
14140
+ /**
14141
+ * The stored configuration
14142
+ */
14143
+ 200: TeamEmailProviderResponse;
14144
+ };
14145
+ export type UpsertTeamEmailProviderResponse = UpsertTeamEmailProviderResponses[keyof UpsertTeamEmailProviderResponses];
14146
+ export type TestTeamEmailProviderData = {
14147
+ body: UpsertTeamEmailProviderRequest;
14148
+ path: {
14149
+ /**
14150
+ * Team that owns the email provider configuration.
14151
+ */
14152
+ team_id: string;
14153
+ };
14154
+ query?: never;
14155
+ url: '/api/v1/{team_id}/email-provider/test';
14156
+ };
14157
+ export type TestTeamEmailProviderErrors = {
14158
+ /**
14159
+ * Malformed JSON body (`BAD_REQUEST`), or an invalid configuration (`TEAM_EMAIL_PROVIDER_VALIDATION_FAILED` with `validation_errors`). `secret` is always required here, since there is no stored credential to fall back on
14160
+ */
14161
+ 400: ErrorResponse;
14162
+ /**
14163
+ * Unauthorized
14164
+ */
14165
+ 401: ErrorResponse;
14166
+ /**
14167
+ * Forbidden - testing the team's email provider requires team owner/admin (`FORBIDDEN`)
14168
+ */
14169
+ 403: ErrorResponse;
14170
+ };
14171
+ export type TestTeamEmailProviderError = TestTeamEmailProviderErrors[keyof TestTeamEmailProviderErrors];
14172
+ export type TestTeamEmailProviderResponses = {
14173
+ /**
14174
+ * Test outcome (successful or not)
14175
+ */
14176
+ 200: TeamEmailProviderTestResponse;
14177
+ };
14178
+ export type TestTeamEmailProviderResponse = TestTeamEmailProviderResponses[keyof TestTeamEmailProviderResponses];
14179
+ export type DeleteTeamEmailProviderSettingsData = {
14180
+ body?: never;
14181
+ path: {
14182
+ /**
14183
+ * Team that owns the email provider configuration.
14184
+ */
14185
+ team_id: string;
14186
+ };
14187
+ query?: never;
14188
+ url: '/api/v1/{team_id}/settings/email-provider';
14189
+ };
14190
+ export type DeleteTeamEmailProviderSettingsErrors = {
14191
+ /**
14192
+ * Unauthorized
14193
+ */
14194
+ 401: ErrorResponse;
14195
+ /**
14196
+ * Forbidden - configuring the team's email provider requires team owner/admin (`FORBIDDEN`)
14197
+ */
14198
+ 403: ErrorResponse;
14199
+ /**
14200
+ * The team has no email provider of its own (`TEAM_EMAIL_PROVIDER_NOT_CONFIGURED`)
14201
+ */
14202
+ 409: ErrorResponse;
14203
+ };
14204
+ export type DeleteTeamEmailProviderSettingsError = DeleteTeamEmailProviderSettingsErrors[keyof DeleteTeamEmailProviderSettingsErrors];
14205
+ export type DeleteTeamEmailProviderSettingsResponses = {
14206
+ /**
14207
+ * Provider removed; the team now uses the instance provider
14208
+ */
14209
+ 204: void;
14210
+ };
14211
+ export type DeleteTeamEmailProviderSettingsResponse = DeleteTeamEmailProviderSettingsResponses[keyof DeleteTeamEmailProviderSettingsResponses];
14212
+ export type GetTeamEmailProviderSettingsData = {
14213
+ body?: never;
14214
+ path: {
14215
+ /**
14216
+ * Team that owns the email provider configuration.
14217
+ */
14218
+ team_id: string;
14219
+ };
14220
+ query?: never;
14221
+ url: '/api/v1/{team_id}/settings/email-provider';
14222
+ };
14223
+ export type GetTeamEmailProviderSettingsErrors = {
14224
+ /**
14225
+ * Unauthorized
14226
+ */
14227
+ 401: ErrorResponse;
14228
+ };
14229
+ export type GetTeamEmailProviderSettingsError = GetTeamEmailProviderSettingsErrors[keyof GetTeamEmailProviderSettingsErrors];
14230
+ export type GetTeamEmailProviderSettingsResponses = {
14231
+ /**
14232
+ * The email configuration in force for the team
14233
+ */
14234
+ 200: TeamEmailProviderResponse;
14235
+ };
14236
+ export type GetTeamEmailProviderSettingsResponse = GetTeamEmailProviderSettingsResponses[keyof GetTeamEmailProviderSettingsResponses];
14237
+ export type UpsertTeamEmailProviderSettingsData = {
14238
+ body: UpsertTeamEmailProviderRequest;
14239
+ path: {
14240
+ /**
14241
+ * Team that owns the email provider configuration.
14242
+ */
14243
+ team_id: string;
14244
+ };
14245
+ query?: never;
14246
+ url: '/api/v1/{team_id}/settings/email-provider';
14247
+ };
14248
+ export type UpsertTeamEmailProviderSettingsErrors = {
14249
+ /**
14250
+ * Malformed JSON body (`BAD_REQUEST`), or an invalid configuration (`TEAM_EMAIL_PROVIDER_VALIDATION_FAILED` with `validation_errors`) — an unknown provider type, a missing or mismatched settings block, an empty `secret`, a malformed address, or a destination that is not allowed
14251
+ */
14252
+ 400: ErrorResponse;
14253
+ /**
14254
+ * Unauthorized
14255
+ */
14256
+ 401: ErrorResponse;
14257
+ /**
14258
+ * Forbidden - configuring the team's email provider requires team owner/admin (`FORBIDDEN`)
14259
+ */
14260
+ 403: ErrorResponse;
14261
+ };
14262
+ export type UpsertTeamEmailProviderSettingsError = UpsertTeamEmailProviderSettingsErrors[keyof UpsertTeamEmailProviderSettingsErrors];
14263
+ export type UpsertTeamEmailProviderSettingsResponses = {
14264
+ /**
14265
+ * The stored configuration
14266
+ */
14267
+ 200: TeamEmailProviderResponse;
14268
+ };
14269
+ export type UpsertTeamEmailProviderSettingsResponse = UpsertTeamEmailProviderSettingsResponses[keyof UpsertTeamEmailProviderSettingsResponses];
14270
+ export type TestTeamEmailProviderSettingsData = {
14271
+ body: UpsertTeamEmailProviderRequest;
14272
+ path: {
14273
+ /**
14274
+ * Team that owns the email provider configuration.
14275
+ */
14276
+ team_id: string;
14277
+ };
14278
+ query?: never;
14279
+ url: '/api/v1/{team_id}/settings/email-provider/test';
14280
+ };
14281
+ export type TestTeamEmailProviderSettingsErrors = {
14282
+ /**
14283
+ * Malformed JSON body (`BAD_REQUEST`), or an invalid configuration (`TEAM_EMAIL_PROVIDER_VALIDATION_FAILED` with `validation_errors`). `secret` is always required here, since there is no stored credential to fall back on
14284
+ */
14285
+ 400: ErrorResponse;
14286
+ /**
14287
+ * Unauthorized
14288
+ */
14289
+ 401: ErrorResponse;
14290
+ /**
14291
+ * Forbidden - testing the team's email provider requires team owner/admin (`FORBIDDEN`)
14292
+ */
14293
+ 403: ErrorResponse;
14294
+ };
14295
+ export type TestTeamEmailProviderSettingsError = TestTeamEmailProviderSettingsErrors[keyof TestTeamEmailProviderSettingsErrors];
14296
+ export type TestTeamEmailProviderSettingsResponses = {
14297
+ /**
14298
+ * Test outcome (successful or not)
14299
+ */
14300
+ 200: TeamEmailProviderTestResponse;
14301
+ };
14302
+ export type TestTeamEmailProviderSettingsResponse = TestTeamEmailProviderSettingsResponses[keyof TestTeamEmailProviderSettingsResponses];
13162
14303
  export type ListModelProvidersData = {
13163
14304
  body?: never;
13164
14305
  path: {