@to11ai/sdk 3.0.0-rc.24 → 3.0.0-rc.26

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.
@@ -206,6 +206,13 @@ export declare const zPrincipalApiKeyContextInvariant: z.ZodObject<{
206
206
  workspaceId: z.ZodNullable<z.ZodString>;
207
207
  }, z.core.$strip>>>;
208
208
  audience: z.ZodArray<z.ZodString>;
209
+ delegation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
210
+ actor: z.ZodEnum<{
211
+ "assistant:slack": "assistant:slack";
212
+ }>;
213
+ organizationId: z.ZodString;
214
+ scopes: z.ZodArray<z.ZodString>;
215
+ }, z.core.$strip>>>;
209
216
  email: z.ZodNullable<z.ZodString>;
210
217
  emailVerified: z.ZodBoolean;
211
218
  externalId: z.ZodString;
@@ -1375,7 +1382,6 @@ export declare const zSlackIntegrationLookupSlackInstallationBody: z.ZodObject<{
1375
1382
  export declare const zSlackIntegrationLookupSlackInstallationResponse: z.ZodObject<{
1376
1383
  code: z.ZodNumber;
1377
1384
  data: z.ZodNullable<z.ZodObject<{
1378
- apiKey: z.ZodString;
1379
1385
  botToken: z.ZodString;
1380
1386
  botUserId: z.ZodString;
1381
1387
  organizationId: z.ZodString;
@@ -1402,6 +1408,117 @@ export declare const zSlackIntegrationLookupSlackInstallationResponse: z.ZodObje
1402
1408
  }, z.core.$strip>>>;
1403
1409
  success: z.ZodBoolean;
1404
1410
  }, z.core.$strip>;
1411
+ export declare const zSlackIntegrationRecordRefusedSlackRunBody: z.ZodObject<{
1412
+ run: z.ZodObject<{
1413
+ finishedAt: z.ZodString;
1414
+ model: z.ZodString;
1415
+ outcome: z.ZodEnum<{
1416
+ answered: "answered";
1417
+ limit_tool_rounds: "limit_tool_rounds";
1418
+ limit_wall_clock: "limit_wall_clock";
1419
+ limit_output_tokens: "limit_output_tokens";
1420
+ refused: "refused";
1421
+ credential_expired: "credential_expired";
1422
+ model_error: "model_error";
1423
+ disabled: "disabled";
1424
+ superseded: "superseded";
1425
+ credential_unavailable: "credential_unavailable";
1426
+ }>;
1427
+ reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1428
+ credential_unavailable: "credential_unavailable";
1429
+ asker_external: "asker_external";
1430
+ asker_guest: "asker_guest";
1431
+ shared_channel: "shared_channel";
1432
+ guest_in_channel: "guest_in_channel";
1433
+ unverified: "unverified";
1434
+ not_linked: "not_linked";
1435
+ }>>>;
1436
+ reportedAsker: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1437
+ slackTeamId: z.ZodString;
1438
+ slackUserId: z.ZodString;
1439
+ }, z.core.$strip>>>;
1440
+ runId: z.ZodString;
1441
+ runType: z.ZodEnum<{
1442
+ data_question: "data_question";
1443
+ skill_run: "skill_run";
1444
+ }>;
1445
+ startedAt: z.ZodString;
1446
+ surface: z.ZodEnum<{
1447
+ slack: "slack";
1448
+ web_chat: "web_chat";
1449
+ mcp: "mcp";
1450
+ }>;
1451
+ toolsCalled: z.ZodArray<z.ZodString>;
1452
+ }, z.core.$strip>;
1453
+ slackTeamId: z.ZodString;
1454
+ }, z.core.$strip>;
1455
+ /**
1456
+ * Success
1457
+ */
1458
+ export declare const zSlackIntegrationRecordRefusedSlackRunResponse: z.ZodObject<{
1459
+ code: z.ZodNumber;
1460
+ data: z.ZodNullable<z.ZodObject<{
1461
+ id: z.ZodString;
1462
+ }, z.core.$strip>>;
1463
+ error: z.ZodNullable<z.ZodObject<{
1464
+ code: z.ZodString;
1465
+ details: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1466
+ message: z.ZodString;
1467
+ rowErrors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1468
+ code: z.ZodString;
1469
+ message: z.ZodString;
1470
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1471
+ }, z.core.$strip>>>>;
1472
+ }, z.core.$strip>>;
1473
+ pagination: z.ZodNullable<z.ZodObject<{
1474
+ limit: z.ZodInt;
1475
+ page: z.ZodInt;
1476
+ total: z.ZodInt;
1477
+ totalPages: z.ZodInt;
1478
+ }, z.core.$strip>>;
1479
+ sdkBehavior: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1480
+ flags: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1481
+ v: z.ZodInt;
1482
+ }, z.core.$strip>>>;
1483
+ success: z.ZodBoolean;
1484
+ }, z.core.$strip>;
1485
+ export declare const zSlackIntegrationIssueSlackUserCredentialBody: z.ZodObject<{
1486
+ slackTeamId: z.ZodString;
1487
+ slackUserId: z.ZodString;
1488
+ }, z.core.$strip>;
1489
+ /**
1490
+ * Success
1491
+ */
1492
+ export declare const zSlackIntegrationIssueSlackUserCredentialResponse: z.ZodObject<{
1493
+ code: z.ZodNumber;
1494
+ data: z.ZodNullable<z.ZodObject<{
1495
+ credential: z.ZodString;
1496
+ displayName: z.ZodNullable<z.ZodString>;
1497
+ expiresAt: z.ZodString;
1498
+ principalId: z.ZodString;
1499
+ }, z.core.$strip>>;
1500
+ error: z.ZodNullable<z.ZodObject<{
1501
+ code: z.ZodString;
1502
+ details: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1503
+ message: z.ZodString;
1504
+ rowErrors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1505
+ code: z.ZodString;
1506
+ message: z.ZodString;
1507
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1508
+ }, z.core.$strip>>>>;
1509
+ }, z.core.$strip>>;
1510
+ pagination: z.ZodNullable<z.ZodObject<{
1511
+ limit: z.ZodInt;
1512
+ page: z.ZodInt;
1513
+ total: z.ZodInt;
1514
+ totalPages: z.ZodInt;
1515
+ }, z.core.$strip>>;
1516
+ sdkBehavior: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1517
+ flags: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1518
+ v: z.ZodInt;
1519
+ }, z.core.$strip>>>;
1520
+ success: z.ZodBoolean;
1521
+ }, z.core.$strip>;
1405
1522
  /**
1406
1523
  * Success
1407
1524
  */
@@ -2226,6 +2343,13 @@ export declare const zAuthAuthMeResponse: z.ZodObject<{
2226
2343
  workspaceId: z.ZodNullable<z.ZodString>;
2227
2344
  }, z.core.$strip>>>;
2228
2345
  audience: z.ZodArray<z.ZodString>;
2346
+ delegation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2347
+ actor: z.ZodEnum<{
2348
+ "assistant:slack": "assistant:slack";
2349
+ }>;
2350
+ organizationId: z.ZodString;
2351
+ scopes: z.ZodArray<z.ZodString>;
2352
+ }, z.core.$strip>>>;
2229
2353
  email: z.ZodNullable<z.ZodString>;
2230
2354
  emailVerified: z.ZodBoolean;
2231
2355
  externalId: z.ZodString;
@@ -2673,6 +2797,78 @@ export declare const zIngestTokenExchangeIngestTokenResponse: z.ZodObject<{
2673
2797
  }, z.core.$strip>>>;
2674
2798
  success: z.ZodBoolean;
2675
2799
  }, z.core.$strip>;
2800
+ export declare const zSlackIntegrationCompleteSlackUserLinkBody: z.ZodObject<{
2801
+ code: z.ZodString;
2802
+ state: z.ZodString;
2803
+ }, z.core.$strip>;
2804
+ /**
2805
+ * Success
2806
+ */
2807
+ export declare const zSlackIntegrationCompleteSlackUserLinkResponse: z.ZodObject<{
2808
+ code: z.ZodNumber;
2809
+ data: z.ZodNullable<z.ZodObject<{
2810
+ organizationId: z.ZodString;
2811
+ organizationName: z.ZodString;
2812
+ replaced: z.ZodArray<z.ZodObject<{
2813
+ platformPrincipalId: z.ZodString;
2814
+ slackTeamId: z.ZodString;
2815
+ slackUserId: z.ZodString;
2816
+ }, z.core.$strip>>;
2817
+ slackUserName: z.ZodNullable<z.ZodString>;
2818
+ workspaceName: z.ZodString;
2819
+ }, z.core.$strip>>;
2820
+ error: z.ZodNullable<z.ZodObject<{
2821
+ code: z.ZodString;
2822
+ details: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
2823
+ message: z.ZodString;
2824
+ rowErrors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2825
+ code: z.ZodString;
2826
+ message: z.ZodString;
2827
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
2828
+ }, z.core.$strip>>>>;
2829
+ }, z.core.$strip>>;
2830
+ pagination: z.ZodNullable<z.ZodObject<{
2831
+ limit: z.ZodInt;
2832
+ page: z.ZodInt;
2833
+ total: z.ZodInt;
2834
+ totalPages: z.ZodInt;
2835
+ }, z.core.$strip>>;
2836
+ sdkBehavior: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2837
+ flags: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2838
+ v: z.ZodInt;
2839
+ }, z.core.$strip>>>;
2840
+ success: z.ZodBoolean;
2841
+ }, z.core.$strip>;
2842
+ /**
2843
+ * Success
2844
+ */
2845
+ export declare const zSlackIntegrationStartSlackUserLinkResponse: z.ZodObject<{
2846
+ code: z.ZodNumber;
2847
+ data: z.ZodNullable<z.ZodObject<{
2848
+ authorizeUrl: z.ZodString;
2849
+ }, z.core.$strip>>;
2850
+ error: z.ZodNullable<z.ZodObject<{
2851
+ code: z.ZodString;
2852
+ details: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
2853
+ message: z.ZodString;
2854
+ rowErrors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2855
+ code: z.ZodString;
2856
+ message: z.ZodString;
2857
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
2858
+ }, z.core.$strip>>>>;
2859
+ }, z.core.$strip>>;
2860
+ pagination: z.ZodNullable<z.ZodObject<{
2861
+ limit: z.ZodInt;
2862
+ page: z.ZodInt;
2863
+ total: z.ZodInt;
2864
+ totalPages: z.ZodInt;
2865
+ }, z.core.$strip>>;
2866
+ sdkBehavior: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2867
+ flags: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2868
+ v: z.ZodInt;
2869
+ }, z.core.$strip>>>;
2870
+ success: z.ZodBoolean;
2871
+ }, z.core.$strip>;
2676
2872
  export declare const zOrganizationsAcceptOrganizationInvitationBody: z.ZodObject<{
2677
2873
  token: z.ZodString;
2678
2874
  }, z.core.$strip>;
@@ -3195,7 +3391,17 @@ export declare const zAssistantRunsRecordAssistantRunBody: z.ZodObject<{
3195
3391
  model_error: "model_error";
3196
3392
  disabled: "disabled";
3197
3393
  superseded: "superseded";
3394
+ credential_unavailable: "credential_unavailable";
3198
3395
  }>;
3396
+ reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
3397
+ credential_unavailable: "credential_unavailable";
3398
+ asker_external: "asker_external";
3399
+ asker_guest: "asker_guest";
3400
+ shared_channel: "shared_channel";
3401
+ guest_in_channel: "guest_in_channel";
3402
+ unverified: "unverified";
3403
+ not_linked: "not_linked";
3404
+ }>>>;
3199
3405
  reportedAsker: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3200
3406
  slackTeamId: z.ZodString;
3201
3407
  slackUserId: z.ZodString;
@@ -3289,6 +3495,7 @@ export declare const zOrgAuditListOrgAuditEventsResponse: z.ZodObject<{
3289
3495
  platform_setting: "platform_setting";
3290
3496
  assistant_run: "assistant_run";
3291
3497
  slack_installation: "slack_installation";
3498
+ slack_user_link: "slack_user_link";
3292
3499
  }>;
3293
3500
  scope: z.ZodEnum<{
3294
3501
  system: "system";
@@ -3945,6 +4152,114 @@ export declare const zSlackIntegrationCreateSlackInstallUrlResponse: z.ZodObject
3945
4152
  }, z.core.$strip>>>;
3946
4153
  success: z.ZodBoolean;
3947
4154
  }, z.core.$strip>;
4155
+ export declare const zSlackIntegrationListSlackUserLinksPath: z.ZodObject<{
4156
+ orgId: z.ZodString;
4157
+ }, z.core.$strip>;
4158
+ /**
4159
+ * Success
4160
+ */
4161
+ export declare const zSlackIntegrationListSlackUserLinksResponse: z.ZodObject<{
4162
+ code: z.ZodNumber;
4163
+ data: z.ZodNullable<z.ZodArray<z.ZodObject<{
4164
+ createdAt: z.ZodString;
4165
+ id: z.ZodString;
4166
+ platformPrincipalId: z.ZodString;
4167
+ slackTeamId: z.ZodString;
4168
+ slackUserId: z.ZodString;
4169
+ }, z.core.$strip>>>;
4170
+ error: z.ZodNullable<z.ZodObject<{
4171
+ code: z.ZodString;
4172
+ details: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
4173
+ message: z.ZodString;
4174
+ rowErrors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
4175
+ code: z.ZodString;
4176
+ message: z.ZodString;
4177
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
4178
+ }, z.core.$strip>>>>;
4179
+ }, z.core.$strip>>;
4180
+ pagination: z.ZodNullable<z.ZodObject<{
4181
+ limit: z.ZodInt;
4182
+ page: z.ZodInt;
4183
+ total: z.ZodInt;
4184
+ totalPages: z.ZodInt;
4185
+ }, z.core.$strip>>;
4186
+ sdkBehavior: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4187
+ flags: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4188
+ v: z.ZodInt;
4189
+ }, z.core.$strip>>>;
4190
+ success: z.ZodBoolean;
4191
+ }, z.core.$strip>;
4192
+ export declare const zSlackIntegrationGetMySlackUserLinkPath: z.ZodObject<{
4193
+ orgId: z.ZodString;
4194
+ }, z.core.$strip>;
4195
+ /**
4196
+ * Success
4197
+ */
4198
+ export declare const zSlackIntegrationGetMySlackUserLinkResponse: z.ZodObject<{
4199
+ code: z.ZodNumber;
4200
+ data: z.ZodNullable<z.ZodObject<{
4201
+ createdAt: z.ZodString;
4202
+ id: z.ZodString;
4203
+ platformPrincipalId: z.ZodString;
4204
+ slackTeamId: z.ZodString;
4205
+ slackUserId: z.ZodString;
4206
+ }, z.core.$strip>>;
4207
+ error: z.ZodNullable<z.ZodObject<{
4208
+ code: z.ZodString;
4209
+ details: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
4210
+ message: z.ZodString;
4211
+ rowErrors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
4212
+ code: z.ZodString;
4213
+ message: z.ZodString;
4214
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
4215
+ }, z.core.$strip>>>>;
4216
+ }, z.core.$strip>>;
4217
+ pagination: z.ZodNullable<z.ZodObject<{
4218
+ limit: z.ZodInt;
4219
+ page: z.ZodInt;
4220
+ total: z.ZodInt;
4221
+ totalPages: z.ZodInt;
4222
+ }, z.core.$strip>>;
4223
+ sdkBehavior: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4224
+ flags: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4225
+ v: z.ZodInt;
4226
+ }, z.core.$strip>>>;
4227
+ success: z.ZodBoolean;
4228
+ }, z.core.$strip>;
4229
+ export declare const zSlackIntegrationRemoveSlackUserLinkPath: z.ZodObject<{
4230
+ orgId: z.ZodString;
4231
+ linkId: z.ZodUUID;
4232
+ }, z.core.$strip>;
4233
+ /**
4234
+ * Success
4235
+ */
4236
+ export declare const zSlackIntegrationRemoveSlackUserLinkResponse: z.ZodObject<{
4237
+ code: z.ZodNumber;
4238
+ data: z.ZodNullable<z.ZodObject<{
4239
+ deleted: z.ZodBoolean;
4240
+ }, z.core.$strip>>;
4241
+ error: z.ZodNullable<z.ZodObject<{
4242
+ code: z.ZodString;
4243
+ details: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
4244
+ message: z.ZodString;
4245
+ rowErrors: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
4246
+ code: z.ZodString;
4247
+ message: z.ZodString;
4248
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
4249
+ }, z.core.$strip>>>>;
4250
+ }, z.core.$strip>>;
4251
+ pagination: z.ZodNullable<z.ZodObject<{
4252
+ limit: z.ZodInt;
4253
+ page: z.ZodInt;
4254
+ total: z.ZodInt;
4255
+ totalPages: z.ZodInt;
4256
+ }, z.core.$strip>>;
4257
+ sdkBehavior: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4258
+ flags: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4259
+ v: z.ZodInt;
4260
+ }, z.core.$strip>>>;
4261
+ success: z.ZodBoolean;
4262
+ }, z.core.$strip>;
3948
4263
  export declare const zOrganizationsListOrganizationInvitationsPath: z.ZodObject<{
3949
4264
  orgId: z.ZodString;
3950
4265
  }, z.core.$strip>;
@@ -5756,8 +6071,7 @@ export declare const zUsageListUsagePrincipalsPath: z.ZodObject<{
5756
6071
  orgId: z.ZodString;
5757
6072
  }, z.core.$strip>;
5758
6073
  export declare const zUsageListUsagePrincipalsQuery: z.ZodObject<{
5759
- query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5760
- email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6074
+ query: z.ZodString;
5761
6075
  }, z.core.$strip>;
5762
6076
  /**
5763
6077
  * Success
@@ -14903,6 +15217,7 @@ export declare const zSessionsListSessionsResponse: z.ZodObject<{
14903
15217
  code: z.ZodNumber;
14904
15218
  data: z.ZodNullable<z.ZodObject<{
14905
15219
  items: z.ZodArray<z.ZodObject<{
15220
+ agentTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14906
15221
  apiPriceEquivalentUsd: z.ZodNullable<z.ZodNumber>;
14907
15222
  billedCostUsd: z.ZodNullable<z.ZodNumber>;
14908
15223
  billingMode: z.ZodNullable<z.ZodEnum<{
@@ -15095,6 +15410,7 @@ export declare const zSessionsGetSessionResponse: z.ZodObject<{
15095
15410
  code: z.ZodNumber;
15096
15411
  data: z.ZodNullable<z.ZodObject<{
15097
15412
  session: z.ZodObject<{
15413
+ agentTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15098
15414
  apiPriceEquivalentUsd: z.ZodNullable<z.ZodNumber>;
15099
15415
  billedCostUsd: z.ZodNullable<z.ZodNumber>;
15100
15416
  billingMode: z.ZodNullable<z.ZodEnum<{
@@ -15265,9 +15581,14 @@ export declare const zSessionsGetSessionResponse: z.ZodObject<{
15265
15581
  }, z.core.$strip>>;
15266
15582
  }, z.core.$strip>;
15267
15583
  timeline: z.ZodArray<z.ZodObject<{
15584
+ agentCall: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
15585
+ "quota-probe": "quota-probe";
15586
+ "session-title": "session-title";
15587
+ }>>>;
15268
15588
  durationMs: z.ZodNumber;
15269
15589
  firstUserMessage: z.ZodNullable<z.ZodString>;
15270
15590
  inputTokens: z.ZodInt;
15591
+ lastUserMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15271
15592
  model: z.ZodNullable<z.ZodString>;
15272
15593
  name: z.ZodString;
15273
15594
  outputTokens: z.ZodInt;
@@ -15318,6 +15639,7 @@ export declare const zSessionsExportSessionPath: z.ZodObject<{
15318
15639
  */
15319
15640
  export declare const zSessionsExportSessionResponse: z.ZodObject<{
15320
15641
  session: z.ZodObject<{
15642
+ agentTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15321
15643
  apiPriceEquivalentUsd: z.ZodNullable<z.ZodNumber>;
15322
15644
  billedCostUsd: z.ZodNullable<z.ZodNumber>;
15323
15645
  billingMode: z.ZodNullable<z.ZodEnum<{
@@ -63,14 +63,10 @@ function windowQuery(window) {
63
63
  return { preset: window.preset, n: window.n, timezone: window.timezone };
64
64
  }
65
65
  function principalsQuery(input) {
66
- const { email, query } = input;
67
- const hasEmail = typeof email === "string";
68
- const hasQuery = typeof query === "string";
69
- if (hasEmail && !hasQuery)
70
- return { email };
71
- if (hasQuery && !hasEmail)
66
+ const { query } = input;
67
+ if (typeof query === "string")
72
68
  return { query };
73
- throw new import_errors.To11aiValidationError("[to11ai/sdk] findPrincipals() needs exactly one of `query` or `email`", "invalid_principal_lookup", { query: hasQuery, email: hasEmail });
69
+ throw new import_errors.To11aiValidationError("[to11ai/sdk] findPrincipals() needs `query`", "invalid_principal_lookup", { query: false });
74
70
  }
75
71
 
76
72
  class UsageResource {
@@ -9,7 +9,7 @@ export declare class UsageResource {
9
9
  private readonly transport;
10
10
  constructor(transport: Transport);
11
11
  /**
12
- * Members of the organization by name (`query`) or exact `email`, as
12
+ * Members of the organization by name (`query`), as
13
13
  * `{ principalId, displayName }`. Pass a `principalId` to the other reads.
14
14
  */
15
15
  findPrincipals(input: FindPrincipalsInput): Promise<FindPrincipalsResult>;
@@ -25,14 +25,10 @@ function windowQuery(window) {
25
25
  return { preset: window.preset, n: window.n, timezone: window.timezone };
26
26
  }
27
27
  function principalsQuery(input) {
28
- const { email, query } = input;
29
- const hasEmail = typeof email === "string";
30
- const hasQuery = typeof query === "string";
31
- if (hasEmail && !hasQuery)
32
- return { email };
33
- if (hasQuery && !hasEmail)
28
+ const { query } = input;
29
+ if (typeof query === "string")
34
30
  return { query };
35
- throw new To11aiValidationError("[to11ai/sdk] findPrincipals() needs exactly one of `query` or `email`", "invalid_principal_lookup", { query: hasQuery, email: hasEmail });
31
+ throw new To11aiValidationError("[to11ai/sdk] findPrincipals() needs `query`", "invalid_principal_lookup", { query: false });
36
32
  }
37
33
 
38
34
  class UsageResource {
@@ -33,13 +33,10 @@ export type TopTrace = ListTopTracesResult["items"][number];
33
33
  export type ResolvedUsageWindow = GetCostsResult["window"];
34
34
  /** A readable project a read left out, so totals are never silently partial. */
35
35
  export type UsageExcludedProject = FindPrincipalsResult["excludedProjects"][number];
36
- /** Look a member up by name (`query`, matched in the API) or exact `email`. */
36
+ /** Look a member up by name (`query`, matched in the API). */
37
37
  export type FindPrincipalsInput = {
38
38
  readonly orgId: string;
39
39
  readonly query: string;
40
- } | {
41
- readonly orgId: string;
42
- readonly email: string;
43
40
  };
44
41
  export interface ListSessionsInput {
45
42
  readonly orgId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@to11ai/sdk",
3
- "version": "3.0.0-rc.24",
3
+ "version": "3.0.0-rc.26",
4
4
  "license": "MPL-2.0",
5
5
  "repository": {
6
6
  "type": "git",