@vibexp/api-client 0.41.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,103 @@ 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
+ };
4202
+ /**
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.
4204
+ *
4205
+ */
4206
+ export type TeamSearchSettings = {
4207
+ /**
4208
+ * Where the effective values come from. `instance` means the team has no override and inherits the deployment defaults; `team` means the team has stored its own profile.
4209
+ *
4210
+ */
4211
+ source: 'instance' | 'team';
4212
+ /**
4213
+ * Effective value — the team's when source is `team`, otherwise the instance default.
4214
+ */
4215
+ recency_ranking_enabled: boolean;
4216
+ /**
4217
+ * Effective value — the team's when source is `team`, otherwise the instance default.
4218
+ */
4219
+ rank_weight_relevance: number;
4220
+ /**
4221
+ * Effective value — the team's when source is `team`, otherwise the instance default.
4222
+ */
4223
+ rank_weight_created: number;
4224
+ /**
4225
+ * Effective value — the team's when source is `team`, otherwise the instance default.
4226
+ */
4227
+ rank_weight_updated: number;
4228
+ /**
4229
+ * Effective value — the team's when source is `team`, otherwise the instance default.
4230
+ */
4231
+ rank_half_life_days: number;
4232
+ instance_defaults: TeamSearchSettingsValues;
4233
+ /**
4234
+ * How many top-by-relevance rows are pulled and re-ranked in memory per query. Instance-owned and NOT team-configurable — one team must not be able to raise the whole deployment's per-query cost. Exposed so clients can explain why pagination is clamped to this many results when recency ranking is on.
4235
+ * Deliberately NOT marked `readOnly`: the update request uses a separate schema that has no such field, which is what actually makes the cap unsettable. Marking it readOnly additionally makes oapi-codegen emit it as an optional pointer, which would let a required field serialize as absent.
4236
+ *
4237
+ */
4238
+ rank_candidate_cap: number;
4239
+ };
4240
+ /**
4241
+ * A complete search ranking profile. The three weights are normalized by their sum at ranking time, so they need not pre-sum to 1.
4242
+ *
4243
+ */
4244
+ export type TeamSearchSettingsValues = {
4245
+ /**
4246
+ * When false, results keep relevance-only ordering. When true they are re-ranked by a weighted blend of relevance and freshness.
4247
+ *
4248
+ */
4249
+ recency_ranking_enabled: boolean;
4250
+ /**
4251
+ * Weight of semantic relevance. Expected to be the dominant weight.
4252
+ */
4253
+ rank_weight_relevance: number;
4254
+ /**
4255
+ * Weight of how recently the resource was created.
4256
+ */
4257
+ rank_weight_created: number;
4258
+ /**
4259
+ * Weight of how recently the resource was updated.
4260
+ */
4261
+ rank_weight_updated: number;
4262
+ /**
4263
+ * Half-life in days for the exponential freshness decay applied to both created_at and updated_at. An item exactly one half-life old scores 0.5.
4264
+ *
4265
+ */
4266
+ rank_half_life_days: number;
4267
+ };
4268
+ /**
4269
+ * A complete replacement ranking profile for the team. There is no partial update: every field is required, and the whole profile is stored or replaced atomically. `rank_candidate_cap` is deliberately absent — it is instance-owned.
4270
+ *
4271
+ */
4272
+ export type UpdateTeamSearchSettingsRequest = {
4273
+ recency_ranking_enabled: boolean;
4274
+ rank_weight_relevance: number;
4275
+ rank_weight_created: number;
4276
+ rank_weight_updated: number;
4277
+ rank_half_life_days: number;
4278
+ };
3888
4279
  /**
3889
4280
  * Instance-wide totals for the top-level entities (unscoped counts).
3890
4281
  */
@@ -5260,6 +5651,10 @@ export type ListArtifactsData = {
5260
5651
  * Search in title, description, and content
5261
5652
  */
5262
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;
5263
5658
  /**
5264
5659
  * Sort field
5265
5660
  */
@@ -5280,6 +5675,10 @@ export type ListArtifactsData = {
5280
5675
  url: '/api/v1/{team_id}/artifacts';
5281
5676
  };
5282
5677
  export type ListArtifactsErrors = {
5678
+ /**
5679
+ * Invalid query parameter (for example a malformed `metadata` filter)
5680
+ */
5681
+ 400: ErrorResponse;
5283
5682
  /**
5284
5683
  * Unauthorized
5285
5684
  */
@@ -5388,6 +5787,10 @@ export type ListArtifactsByProjectData = {
5388
5787
  * Search in title, description, and content
5389
5788
  */
5390
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;
5391
5794
  /**
5392
5795
  * Sort field
5393
5796
  */
@@ -5408,6 +5811,10 @@ export type ListArtifactsByProjectData = {
5408
5811
  url: '/api/v1/{team_id}/artifacts/{project_id}';
5409
5812
  };
5410
5813
  export type ListArtifactsByProjectErrors = {
5814
+ /**
5815
+ * Invalid query parameter (for example a malformed `metadata` filter)
5816
+ */
5817
+ 400: ErrorResponse;
5411
5818
  /**
5412
5819
  * Unauthorized
5413
5820
  */
@@ -6170,6 +6577,10 @@ export type ListMemoriesData = {
6170
6577
  * Filter by metadata value (requires metadata_key)
6171
6578
  */
6172
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;
6173
6584
  /**
6174
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.
6175
6586
  */
@@ -6194,6 +6605,10 @@ export type ListMemoriesData = {
6194
6605
  url: '/api/v1/{team_id}/memories';
6195
6606
  };
6196
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;
6197
6612
  /**
6198
6613
  * Unauthorized
6199
6614
  */
@@ -6627,7 +7042,7 @@ export type ListSpecLibrariesData = {
6627
7042
  /**
6628
7043
  * Filter by type
6629
7044
  */
6630
- type?: 'general';
7045
+ type?: 'general' | 'claude-code' | 'claude' | 'cursor' | 'codex';
6631
7046
  /**
6632
7047
  * Filter by subtype category
6633
7048
  */
@@ -6636,6 +7051,10 @@ export type ListSpecLibrariesData = {
6636
7051
  * Search in title, description, and content
6637
7052
  */
6638
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;
6639
7058
  /**
6640
7059
  * Sort field
6641
7060
  */
@@ -6656,6 +7075,10 @@ export type ListSpecLibrariesData = {
6656
7075
  url: '/api/v1/{team_id}/blueprints';
6657
7076
  };
6658
7077
  export type ListSpecLibrariesErrors = {
7078
+ /**
7079
+ * Invalid query parameter (for example a malformed `metadata` filter)
7080
+ */
7081
+ 400: ErrorResponse;
6659
7082
  /**
6660
7083
  * Unauthorized
6661
7084
  */
@@ -6759,7 +7182,7 @@ export type ListSpecLibrariesByProjectData = {
6759
7182
  /**
6760
7183
  * Filter by type
6761
7184
  */
6762
- type?: 'general';
7185
+ type?: 'general' | 'claude-code' | 'claude' | 'cursor' | 'codex';
6763
7186
  /**
6764
7187
  * Filter by subtype category
6765
7188
  */
@@ -6768,6 +7191,10 @@ export type ListSpecLibrariesByProjectData = {
6768
7191
  * Search in title, description, and content
6769
7192
  */
6770
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;
6771
7198
  /**
6772
7199
  * Sort field
6773
7200
  */
@@ -8029,6 +8456,10 @@ export type GetGitHubInstallUrlErrors = {
8029
8456
  * Forbidden - user does not have access to this team, or is not a team owner/admin
8030
8457
  */
8031
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;
8032
8463
  /**
8033
8464
  * Internal server error
8034
8465
  */
@@ -8053,7 +8484,7 @@ export type HandleGitHubCallbackData = {
8053
8484
  */
8054
8485
  setup_action?: string;
8055
8486
  /**
8056
- * 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.
8057
8488
  */
8058
8489
  state: string;
8059
8490
  /**
@@ -8072,7 +8503,7 @@ export type HandleGitHubCallbackData = {
8072
8503
  };
8073
8504
  export type HandleGitHubCallbackErrors = {
8074
8505
  /**
8075
- * 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
8076
8507
  */
8077
8508
  400: ErrorResponse;
8078
8509
  /**
@@ -8084,7 +8515,7 @@ export type HandleGitHubCallbackErrors = {
8084
8515
  */
8085
8516
  403: ErrorResponse;
8086
8517
  /**
8087
- * 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
8088
8519
  */
8089
8520
  409: ErrorResponse;
8090
8521
  /**
@@ -8298,22 +8729,49 @@ export type HandleGitHubWebhookData = {
8298
8729
  };
8299
8730
  export type HandleGitHubWebhookErrors = {
8300
8731
  /**
8301
- * 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
8302
8756
  */
8303
8757
  400: ErrorResponse;
8304
8758
  /**
8305
- * Invalid webhook signature
8759
+ * Missing or invalid `X-Hub-Signature-256`
8306
8760
  */
8307
8761
  401: ErrorResponse;
8762
+ /**
8763
+ * Unknown or malformed routing token (deliberately indistinguishable)
8764
+ */
8765
+ 404: ErrorResponse;
8308
8766
  /**
8309
8767
  * Internal server error
8310
8768
  */
8311
8769
  500: ErrorResponse;
8312
8770
  };
8313
- export type HandleGitHubWebhookError = HandleGitHubWebhookErrors[keyof HandleGitHubWebhookErrors];
8314
- export type HandleGitHubWebhookResponses = {
8771
+ export type HandleGitHubWebhookByTokenError = HandleGitHubWebhookByTokenErrors[keyof HandleGitHubWebhookByTokenErrors];
8772
+ export type HandleGitHubWebhookByTokenResponses = {
8315
8773
  /**
8316
- * Webhook received and processed successfully
8774
+ * Delivery accepted (or already processed — dedup by delivery id)
8317
8775
  */
8318
8776
  200: unknown;
8319
8777
  };
@@ -12633,11 +13091,231 @@ export type ValidateEmbeddingProviderResponses = {
12633
13091
  200: ValidateEmbeddingProviderResponse;
12634
13092
  };
12635
13093
  export type ValidateEmbeddingProviderResponse2 = ValidateEmbeddingProviderResponses[keyof ValidateEmbeddingProviderResponses];
12636
- export type ListEmbeddingProvidersSettingsData = {
13094
+ export type GetMetadataKeysData = {
12637
13095
  body?: never;
12638
13096
  path: {
12639
13097
  /**
12640
- * Team that owns the embedding provider(s).
13098
+ * Team identifier
13099
+ */
13100
+ team_id: string;
13101
+ };
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';
13117
+ };
13118
+ export type GetMetadataKeysErrors = {
13119
+ /**
13120
+ * Invalid or missing query parameter
13121
+ */
13122
+ 400: ErrorResponse;
13123
+ /**
13124
+ * Unauthorized
13125
+ */
13126
+ 401: ErrorResponse;
13127
+ /**
13128
+ * Caller is not a member of the team
13129
+ */
13130
+ 403: ErrorResponse;
13131
+ /**
13132
+ * Internal server error
13133
+ */
13134
+ 500: ErrorResponse;
13135
+ };
13136
+ export type GetMetadataKeysError = GetMetadataKeysErrors[keyof GetMetadataKeysErrors];
13137
+ export type GetMetadataKeysResponses = {
13138
+ /**
13139
+ * Metadata keys retrieved successfully
13140
+ */
13141
+ 200: MetadataKeysResponse;
13142
+ };
13143
+ export type GetMetadataKeysResponse = GetMetadataKeysResponses[keyof GetMetadataKeysResponses];
13144
+ export type GetMetadataValuesData = {
13145
+ body?: never;
13146
+ path: {
13147
+ /**
13148
+ * Team identifier
13149
+ */
13150
+ team_id: string;
13151
+ };
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';
13175
+ };
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 = {
13251
+ /**
13252
+ * Invalid team_id
13253
+ */
13254
+ 400: ErrorResponse;
13255
+ /**
13256
+ * Unauthorized
13257
+ */
13258
+ 401: ErrorResponse;
13259
+ /**
13260
+ * Caller is not a member of the team
13261
+ */
13262
+ 403: ErrorResponse;
13263
+ /**
13264
+ * Failed to read the team's search settings
13265
+ */
13266
+ 500: ErrorResponse;
13267
+ };
13268
+ export type GetTeamSearchSettingsError = GetTeamSearchSettingsErrors[keyof GetTeamSearchSettingsErrors];
13269
+ export type GetTeamSearchSettingsResponses = {
13270
+ /**
13271
+ * Settings retrieved successfully
13272
+ */
13273
+ 200: TeamSearchSettings;
13274
+ };
13275
+ export type GetTeamSearchSettingsResponse = GetTeamSearchSettingsResponses[keyof GetTeamSearchSettingsResponses];
13276
+ export type UpdateTeamSearchSettingsData = {
13277
+ body: UpdateTeamSearchSettingsRequest;
13278
+ path: {
13279
+ /**
13280
+ * Team identifier
13281
+ */
13282
+ team_id: string;
13283
+ };
13284
+ query?: never;
13285
+ url: '/api/v1/{team_id}/settings/search';
13286
+ };
13287
+ export type UpdateTeamSearchSettingsErrors = {
13288
+ /**
13289
+ * Invalid ranking parameters — a negative weight, all weights zero, or a half-life outside (0, 36500]
13290
+ *
13291
+ */
13292
+ 400: ErrorResponse;
13293
+ /**
13294
+ * Unauthorized
13295
+ */
13296
+ 401: ErrorResponse;
13297
+ /**
13298
+ * Caller's role does not grant team.settings.update
13299
+ */
13300
+ 403: ErrorResponse;
13301
+ /**
13302
+ * Failed to store the team's search settings
13303
+ */
13304
+ 500: ErrorResponse;
13305
+ };
13306
+ export type UpdateTeamSearchSettingsError = UpdateTeamSearchSettingsErrors[keyof UpdateTeamSearchSettingsErrors];
13307
+ export type UpdateTeamSearchSettingsResponses = {
13308
+ /**
13309
+ * Settings stored successfully; the response reports source `team`
13310
+ */
13311
+ 200: TeamSearchSettings;
13312
+ };
13313
+ export type UpdateTeamSearchSettingsResponse = UpdateTeamSearchSettingsResponses[keyof UpdateTeamSearchSettingsResponses];
13314
+ export type ListEmbeddingProvidersSettingsData = {
13315
+ body?: never;
13316
+ path: {
13317
+ /**
13318
+ * Team that owns the embedding provider(s).
12641
13319
  */
12642
13320
  team_id: string;
12643
13321
  };
@@ -12970,6 +13648,658 @@ export type ClearEmbeddingsSettingsResponses = {
12970
13648
  200: ClearEmbeddingsResponse;
12971
13649
  };
12972
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];
12973
14303
  export type ListModelProvidersData = {
12974
14304
  body?: never;
12975
14305
  path: {