@to11ai/sdk 3.0.0-rc.13 → 3.0.0-rc.15

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.
@@ -2597,6 +2597,148 @@ export const zDashboardingSyncOrganizationPersesResponse = z.object({
2597
2597
  success: z.boolean()
2598
2598
  });
2599
2599
 
2600
+ export const zIntegrationsGetGitHubIntegrationPath = z.object({
2601
+ orgId: z.string()
2602
+ });
2603
+
2604
+ /**
2605
+ * Success
2606
+ */
2607
+ export const zIntegrationsGetGitHubIntegrationResponse = z.object({
2608
+ code: z.number(),
2609
+ data: z.object({
2610
+ appSlug: z.string().nullable(),
2611
+ configured: z.boolean(),
2612
+ installation: z.object({
2613
+ accountLogin: z.string(),
2614
+ backfillRequestedAt: z.string().nullable(),
2615
+ createdAt: z.string(),
2616
+ externalId: z.string(),
2617
+ id: z.string(),
2618
+ lastReconciledAt: z.string().nullable(),
2619
+ repositoryCount: z.number(),
2620
+ suspendedAt: z.string().nullable(),
2621
+ uninstalledAt: z.string().nullable(),
2622
+ updatedAt: z.string()
2623
+ }).nullable()
2624
+ }).nullable(),
2625
+ error: z.object({
2626
+ code: z.string(),
2627
+ details: z.unknown().nullish(),
2628
+ message: z.string(),
2629
+ rowErrors: z.array(z.object({
2630
+ code: z.string(),
2631
+ message: z.string(),
2632
+ path: z.array(z.union([z.string(), z.number()]))
2633
+ })).nullish()
2634
+ }).nullable(),
2635
+ pagination: z.object({
2636
+ limit: z.int().gte(1).lte(100),
2637
+ page: z.int().gte(1).lte(9007199254740991),
2638
+ total: z.int().gte(0).lte(9007199254740991),
2639
+ totalPages: z.int().gte(0).lte(9007199254740991)
2640
+ }).nullable(),
2641
+ sdkBehavior: z.object({
2642
+ flags: z.record(z.string(), z.unknown()),
2643
+ v: z.int().gte(1).lte(9007199254740991)
2644
+ }).nullish(),
2645
+ success: z.boolean()
2646
+ });
2647
+
2648
+ export const zIntegrationsCompleteGitHubIntegrationBody = z.object({
2649
+ code: z.string(),
2650
+ installationId: z.string().nullish(),
2651
+ setupAction: z.string().nullish(),
2652
+ state: z.string()
2653
+ });
2654
+
2655
+ export const zIntegrationsCompleteGitHubIntegrationPath = z.object({
2656
+ orgId: z.string()
2657
+ });
2658
+
2659
+ /**
2660
+ * Success
2661
+ */
2662
+ export const zIntegrationsCompleteGitHubIntegrationResponse = z.object({
2663
+ code: z.number(),
2664
+ data: z.object({
2665
+ installation: z.object({
2666
+ accountLogin: z.string(),
2667
+ backfillRequestedAt: z.string().nullable(),
2668
+ createdAt: z.string(),
2669
+ externalId: z.string(),
2670
+ id: z.string(),
2671
+ lastReconciledAt: z.string().nullable(),
2672
+ repositoryCount: z.number(),
2673
+ suspendedAt: z.string().nullable(),
2674
+ uninstalledAt: z.string().nullable(),
2675
+ updatedAt: z.string()
2676
+ })
2677
+ }).nullable(),
2678
+ error: z.object({
2679
+ code: z.string(),
2680
+ details: z.unknown().nullish(),
2681
+ message: z.string(),
2682
+ rowErrors: z.array(z.object({
2683
+ code: z.string(),
2684
+ message: z.string(),
2685
+ path: z.array(z.union([z.string(), z.number()]))
2686
+ })).nullish()
2687
+ }).nullable(),
2688
+ pagination: z.object({
2689
+ limit: z.int().gte(1).lte(100),
2690
+ page: z.int().gte(1).lte(9007199254740991),
2691
+ total: z.int().gte(0).lte(9007199254740991),
2692
+ totalPages: z.int().gte(0).lte(9007199254740991)
2693
+ }).nullable(),
2694
+ sdkBehavior: z.object({
2695
+ flags: z.record(z.string(), z.unknown()),
2696
+ v: z.int().gte(1).lte(9007199254740991)
2697
+ }).nullish(),
2698
+ success: z.boolean()
2699
+ });
2700
+
2701
+ export const zIntegrationsConnectGitHubIntegrationBody = z.object({
2702
+ accountLogin: z.string().nullish(),
2703
+ mode: z.enum(['install', 'authorize'])
2704
+ });
2705
+
2706
+ export const zIntegrationsConnectGitHubIntegrationPath = z.object({
2707
+ orgId: z.string()
2708
+ });
2709
+
2710
+ /**
2711
+ * Success
2712
+ */
2713
+ export const zIntegrationsConnectGitHubIntegrationResponse = z.object({
2714
+ code: z.number(),
2715
+ data: z.object({
2716
+ state: z.string(),
2717
+ url: z.string()
2718
+ }).nullable(),
2719
+ error: z.object({
2720
+ code: z.string(),
2721
+ details: z.unknown().nullish(),
2722
+ message: z.string(),
2723
+ rowErrors: z.array(z.object({
2724
+ code: z.string(),
2725
+ message: z.string(),
2726
+ path: z.array(z.union([z.string(), z.number()]))
2727
+ })).nullish()
2728
+ }).nullable(),
2729
+ pagination: z.object({
2730
+ limit: z.int().gte(1).lte(100),
2731
+ page: z.int().gte(1).lte(9007199254740991),
2732
+ total: z.int().gte(0).lte(9007199254740991),
2733
+ totalPages: z.int().gte(0).lte(9007199254740991)
2734
+ }).nullable(),
2735
+ sdkBehavior: z.object({
2736
+ flags: z.record(z.string(), z.unknown()),
2737
+ v: z.int().gte(1).lte(9007199254740991)
2738
+ }).nullish(),
2739
+ success: z.boolean()
2740
+ });
2741
+
2600
2742
  export const zOrganizationsListOrganizationInvitationsPath = z.object({
2601
2743
  orgId: z.string()
2602
2744
  });
@@ -6535,7 +6677,24 @@ export const zProjectOverviewGetProjectOverviewQuery = z.object({
6535
6677
  export const zProjectOverviewGetProjectOverviewResponse = z.object({
6536
6678
  code: z.number(),
6537
6679
  data: z.object({
6680
+ apiPriceEquivalentUsd: z.number().nullable(),
6681
+ billedCostUsd: z.number().nullable(),
6682
+ byBillingMode: z.array(z.object({
6683
+ apiPriceEquivalentUsd: z.number().nullable(),
6684
+ billedCostUsd: z.number().nullable(),
6685
+ billingMode: z.enum([
6686
+ 'subscription',
6687
+ 'api',
6688
+ 'unknown'
6689
+ ]),
6690
+ estimatedCostUsd: z.number().nullable(),
6691
+ spanCount: z.number(),
6692
+ totalTokens: z.number(),
6693
+ traceCount: z.number()
6694
+ })),
6538
6695
  cost: z.object({
6696
+ api_price_equivalent_total: z.number().nullish(),
6697
+ billed_total: z.number().nullish(),
6539
6698
  by_model: z.array(z.object({
6540
6699
  mode: z.string().nullish(),
6541
6700
  model: z.string(),
@@ -6638,11 +6797,16 @@ export const zProjectOverviewGetProjectOverviewResponse = z.object({
6638
6797
  model: z.string(),
6639
6798
  name: z.string(),
6640
6799
  provider: z.string(),
6800
+ sessionId: z.string().nullish(),
6641
6801
  timestamp: z.string(),
6642
6802
  traceId: z.string()
6643
6803
  })),
6644
6804
  timeSeries: z.array(z.object({
6805
+ apiPriceEquivalentUsd: z.number().nullable(),
6806
+ billedCostUsd: z.number().nullable(),
6645
6807
  cost: z.object({
6808
+ api_price_equivalent_total: z.number().nullish(),
6809
+ billed_total: z.number().nullish(),
6646
6810
  by_model: z.array(z.object({
6647
6811
  mode: z.string().nullish(),
6648
6812
  model: z.string(),
@@ -6735,10 +6899,15 @@ export const zProjectOverviewGetProjectOverviewResponse = z.object({
6735
6899
  errorCount: z.number(),
6736
6900
  estimatedCostUsd: z.number().nullable(),
6737
6901
  timestamp: z.string(),
6738
- traceCount: z.number()
6902
+ traceCount: z.number(),
6903
+ unclassifiedApiPriceEquivalentUsd: z.number().nullable()
6739
6904
  })),
6740
6905
  topModels: z.array(z.object({
6906
+ apiPriceEquivalentUsd: z.number().nullable(),
6907
+ billedCostUsd: z.number().nullable(),
6741
6908
  cost: z.object({
6909
+ api_price_equivalent_total: z.number().nullish(),
6910
+ billed_total: z.number().nullish(),
6742
6911
  by_model: z.array(z.object({
6743
6912
  mode: z.string().nullish(),
6744
6913
  model: z.string(),
@@ -6840,7 +7009,9 @@ export const zProjectOverviewGetProjectOverviewResponse = z.object({
6840
7009
  totalInputTokens: z.number(),
6841
7010
  totalOutputTokens: z.number(),
6842
7011
  totalTokens: z.number(),
6843
- totalTraces: z.number()
7012
+ totalTraces: z.number(),
7013
+ tracesReadable: z.boolean(),
7014
+ unclassifiedApiPriceEquivalentUsd: z.number().nullable()
6844
7015
  }).nullable(),
6845
7016
  error: z.object({
6846
7017
  code: z.string(),
@@ -12092,6 +12263,18 @@ export const zTracesListTracesQuery = z.object({
12092
12263
  vcsRepositoryUrl: z.string().min(1).max(256).nullish(),
12093
12264
  vcsHeadName: z.string().min(1).max(256).nullish(),
12094
12265
  vcsHeadRevision: z.string().regex(/^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$/).nullish(),
12266
+ billingMode: z.union([
12267
+ z.enum([
12268
+ 'subscription',
12269
+ 'api',
12270
+ 'unknown'
12271
+ ]),
12272
+ z.array(z.enum([
12273
+ 'subscription',
12274
+ 'api',
12275
+ 'unknown'
12276
+ ]))
12277
+ ]).nullish(),
12095
12278
  minTokens: z.string().nullish(),
12096
12279
  maxTokens: z.string().nullish(),
12097
12280
  minCost: z.string().nullish(),
@@ -12120,7 +12303,17 @@ export const zTracesListTracesQuery = z.object({
12120
12303
  export const zTracesListTracesResponse = z.object({
12121
12304
  code: z.number(),
12122
12305
  data: z.array(z.object({
12306
+ api_price_equivalent_usd: z.number().nullable(),
12307
+ billed_cost_usd: z.number().nullable(),
12308
+ billing_mode: z.enum([
12309
+ 'subscription',
12310
+ 'api',
12311
+ 'unknown',
12312
+ 'mixed'
12313
+ ]).nullable(),
12123
12314
  cost: z.object({
12315
+ api_price_equivalent_total: z.number().nullish(),
12316
+ billed_total: z.number().nullish(),
12124
12317
  by_model: z.array(z.object({
12125
12318
  mode: z.string().nullish(),
12126
12319
  model: z.string(),
@@ -12262,6 +12455,41 @@ export const zTracesListTracesResponse = z.object({
12262
12455
  success: z.boolean()
12263
12456
  });
12264
12457
 
12458
+ export const zTracesGetTraceExistencePath = z.object({
12459
+ projectId: z.string().min(1)
12460
+ });
12461
+
12462
+ /**
12463
+ * Success
12464
+ */
12465
+ export const zTracesGetTraceExistenceResponse = z.object({
12466
+ code: z.number(),
12467
+ data: z.object({
12468
+ exists: z.boolean()
12469
+ }).nullable(),
12470
+ error: z.object({
12471
+ code: z.string(),
12472
+ details: z.unknown().nullish(),
12473
+ message: z.string(),
12474
+ rowErrors: z.array(z.object({
12475
+ code: z.string(),
12476
+ message: z.string(),
12477
+ path: z.array(z.union([z.string(), z.number()]))
12478
+ })).nullish()
12479
+ }).nullable(),
12480
+ pagination: z.object({
12481
+ limit: z.int().gte(1).lte(100),
12482
+ page: z.int().gte(1).lte(9007199254740991),
12483
+ total: z.int().gte(0).lte(9007199254740991),
12484
+ totalPages: z.int().gte(0).lte(9007199254740991)
12485
+ }).nullable(),
12486
+ sdkBehavior: z.object({
12487
+ flags: z.record(z.string(), z.unknown()),
12488
+ v: z.int().gte(1).lte(9007199254740991)
12489
+ }).nullish(),
12490
+ success: z.boolean()
12491
+ });
12492
+
12265
12493
  export const zTracesListTracePromptFacetsPath = z.object({
12266
12494
  projectId: z.string().min(1)
12267
12495
  });
@@ -12301,6 +12529,18 @@ export const zTracesListTracePromptFacetsQuery = z.object({
12301
12529
  vcsRepositoryUrl: z.string().min(1).max(256).nullish(),
12302
12530
  vcsHeadName: z.string().min(1).max(256).nullish(),
12303
12531
  vcsHeadRevision: z.string().regex(/^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$/).nullish(),
12532
+ billingMode: z.union([
12533
+ z.enum([
12534
+ 'subscription',
12535
+ 'api',
12536
+ 'unknown'
12537
+ ]),
12538
+ z.array(z.enum([
12539
+ 'subscription',
12540
+ 'api',
12541
+ 'unknown'
12542
+ ]))
12543
+ ]).nullish(),
12304
12544
  minTokens: z.string().nullish(),
12305
12545
  maxTokens: z.string().nullish(),
12306
12546
  minCost: z.string().nullish(),
@@ -12367,7 +12607,17 @@ export const zTracesGetTraceDetailPath = z.object({
12367
12607
  export const zTracesGetTraceDetailResponse = z.object({
12368
12608
  code: z.number(),
12369
12609
  data: z.object({
12610
+ api_price_equivalent_usd: z.number().nullable(),
12611
+ billed_cost_usd: z.number().nullable(),
12612
+ billing_mode: z.enum([
12613
+ 'subscription',
12614
+ 'api',
12615
+ 'unknown',
12616
+ 'mixed'
12617
+ ]).nullable(),
12370
12618
  cost: z.object({
12619
+ api_price_equivalent_total: z.number().nullish(),
12620
+ billed_total: z.number().nullish(),
12371
12621
  by_model: z.array(z.object({
12372
12622
  mode: z.string().nullish(),
12373
12623
  model: z.string(),
@@ -12459,11 +12709,18 @@ export const zTracesGetTraceDetailResponse = z.object({
12459
12709
  }),
12460
12710
  duration_ms: z.number(),
12461
12711
  spans: z.array(z.object({
12712
+ api_price_equivalent_usd: z.number().nullable(),
12462
12713
  attributes: z.record(z.string(), z.union([
12463
12714
  z.string(),
12464
12715
  z.number(),
12465
12716
  z.boolean()
12466
12717
  ]).nullable()),
12718
+ billed_cost_usd: z.number().nullable(),
12719
+ billing_mode: z.enum([
12720
+ 'subscription',
12721
+ 'api',
12722
+ 'unknown'
12723
+ ]).nullable(),
12467
12724
  consumedBy: z.array(z.object({
12468
12725
  kind: z.string(),
12469
12726
  name: z.string(),
@@ -12471,6 +12728,8 @@ export const zTracesGetTraceDetailResponse = z.object({
12471
12728
  traceId: z.string()
12472
12729
  })).nullish(),
12473
12730
  cost: z.object({
12731
+ api_price_equivalent_total: z.number().nullish(),
12732
+ billed_total: z.number().nullish(),
12474
12733
  currency: z.enum(['USD']),
12475
12734
  tokens: z.object({
12476
12735
  cache_creation: z.object({
@@ -12760,6 +13019,42 @@ export const zClerkWebhooksReceiveClerkWebhookResponse = z.object({
12760
13019
  success: z.boolean()
12761
13020
  });
12762
13021
 
13022
+ export const zIntegrationsReceiveIntegrationWebhookPath = z.object({
13023
+ provider: z.string(),
13024
+ endpointRef: z.string()
13025
+ });
13026
+
13027
+ /**
13028
+ * Success
13029
+ */
13030
+ export const zIntegrationsReceiveIntegrationWebhookResponse = z.object({
13031
+ code: z.number(),
13032
+ data: z.object({
13033
+ received: z.boolean()
13034
+ }).nullable(),
13035
+ error: z.object({
13036
+ code: z.string(),
13037
+ details: z.unknown().nullish(),
13038
+ message: z.string(),
13039
+ rowErrors: z.array(z.object({
13040
+ code: z.string(),
13041
+ message: z.string(),
13042
+ path: z.array(z.union([z.string(), z.number()]))
13043
+ })).nullish()
13044
+ }).nullable(),
13045
+ pagination: z.object({
13046
+ limit: z.int().gte(1).lte(100),
13047
+ page: z.int().gte(1).lte(9007199254740991),
13048
+ total: z.int().gte(0).lte(9007199254740991),
13049
+ totalPages: z.int().gte(0).lte(9007199254740991)
13050
+ }).nullable(),
13051
+ sdkBehavior: z.object({
13052
+ flags: z.record(z.string(), z.unknown()),
13053
+ v: z.int().gte(1).lte(9007199254740991)
13054
+ }).nullish(),
13055
+ success: z.boolean()
13056
+ });
13057
+
12763
13058
  export const zProjectsListProjectsPath = z.object({
12764
13059
  workspaceId: z.string()
12765
13060
  });