@seamapi/types 1.1168.0 → 1.1169.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.
@@ -91564,6 +91564,7 @@ export type Routes = {
91564
91564
  canceled_at: string | null;
91565
91565
  } | null;
91566
91566
  usage: {
91567
+ as_of: string;
91567
91568
  period_started_at: string;
91568
91569
  period_ends_at: string;
91569
91570
  package_tokens: number;
@@ -91706,6 +91707,62 @@ export type Routes = {
91706
91707
  };
91707
91708
  maxDuration: undefined;
91708
91709
  };
91710
+ '/seam/console/v1/credits/usage/get': {
91711
+ route: '/seam/console/v1/credits/usage/get';
91712
+ method: 'POST';
91713
+ queryParams: {};
91714
+ jsonBody: {
91715
+ organization_id: string;
91716
+ };
91717
+ commonParams: {};
91718
+ formData: {};
91719
+ jsonResponse: {
91720
+ usage: {
91721
+ source: 'metronome' | 'estimate';
91722
+ as_of: string;
91723
+ period_started_at: string;
91724
+ period_ends_at: string;
91725
+ package_credits: number | null;
91726
+ used_credits: number | null;
91727
+ by_workspace: {
91728
+ workspace_id: string | null;
91729
+ workspace_name: string | null;
91730
+ connectivity: {
91731
+ metric: string;
91732
+ label: string;
91733
+ device_months: number;
91734
+ credits_per_device_month: number;
91735
+ credits: number;
91736
+ }[];
91737
+ actions: {
91738
+ billable_action: string;
91739
+ label: string;
91740
+ count: number;
91741
+ credits: number;
91742
+ }[];
91743
+ credits: number;
91744
+ percent_of_total: number;
91745
+ }[] | null;
91746
+ by_category: {
91747
+ kind: 'connectivity' | 'action';
91748
+ key: string;
91749
+ label: string;
91750
+ quantity: number;
91751
+ credits_per_unit: number;
91752
+ credits: number;
91753
+ percent_of_total: number;
91754
+ }[] | null;
91755
+ daily: {
91756
+ date: string;
91757
+ connectivity_credits: number;
91758
+ action_credits: number;
91759
+ previous_period_credits: number | null;
91760
+ }[] | null;
91761
+ is_daily_connectivity_included: boolean;
91762
+ };
91763
+ };
91764
+ maxDuration: undefined;
91765
+ };
91709
91766
  '/seam/console/v1/get_resource_locator': {
91710
91767
  route: '/seam/console/v1/get_resource_locator';
91711
91768
  method: 'GET' | 'POST';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1168.0",
3
+ "version": "1.1169.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -61860,6 +61860,7 @@ const openapi: OpenAPISpec = {
61860
61860
  usage: {
61861
61861
  nullable: true,
61862
61862
  properties: {
61863
+ as_of: { format: 'date-time', type: 'string' },
61863
61864
  breakdown: {
61864
61865
  items: {
61865
61866
  properties: {
@@ -61930,6 +61931,7 @@ const openapi: OpenAPISpec = {
61930
61931
  used_tokens: { format: 'float', type: 'number' },
61931
61932
  },
61932
61933
  required: [
61934
+ 'as_of',
61933
61935
  'period_started_at',
61934
61936
  'period_ends_at',
61935
61937
  'package_tokens',
@@ -62434,6 +62436,231 @@ const openapi: OpenAPISpec = {
62434
62436
  'x-undocumented': 'Internal endpoint for Console',
62435
62437
  },
62436
62438
  },
62439
+ '/seam/console/v1/credits/usage/get': {
62440
+ post: {
62441
+ description:
62442
+ "Returns the organization's credit usage for the current subscription period (or the trailing 30 days without a subscription), broken down by workspace, by action and by day.",
62443
+ operationId: 'seamConsoleV1CreditsUsageGetPost',
62444
+ requestBody: {
62445
+ content: {
62446
+ 'application/json': {
62447
+ schema: {
62448
+ properties: {
62449
+ organization_id: { format: 'uuid', type: 'string' },
62450
+ },
62451
+ required: ['organization_id'],
62452
+ type: 'object',
62453
+ },
62454
+ },
62455
+ },
62456
+ },
62457
+ responses: {
62458
+ '200': {
62459
+ content: {
62460
+ 'application/json': {
62461
+ schema: {
62462
+ properties: {
62463
+ ok: { type: 'boolean' },
62464
+ usage: {
62465
+ properties: {
62466
+ as_of: { format: 'date-time', type: 'string' },
62467
+ by_category: {
62468
+ items: {
62469
+ properties: {
62470
+ credits: { format: 'float', type: 'number' },
62471
+ credits_per_unit: {
62472
+ format: 'float',
62473
+ type: 'number',
62474
+ },
62475
+ key: { type: 'string' },
62476
+ kind: {
62477
+ enum: ['connectivity', 'action'],
62478
+ type: 'string',
62479
+ },
62480
+ label: { type: 'string' },
62481
+ percent_of_total: {
62482
+ format: 'float',
62483
+ type: 'number',
62484
+ },
62485
+ quantity: { format: 'float', type: 'number' },
62486
+ },
62487
+ required: [
62488
+ 'kind',
62489
+ 'key',
62490
+ 'label',
62491
+ 'quantity',
62492
+ 'credits_per_unit',
62493
+ 'credits',
62494
+ 'percent_of_total',
62495
+ ],
62496
+ type: 'object',
62497
+ },
62498
+ nullable: true,
62499
+ type: 'array',
62500
+ },
62501
+ by_workspace: {
62502
+ items: {
62503
+ properties: {
62504
+ actions: {
62505
+ items: {
62506
+ properties: {
62507
+ billable_action: { type: 'string' },
62508
+ count: { format: 'float', type: 'number' },
62509
+ credits: {
62510
+ format: 'float',
62511
+ type: 'number',
62512
+ },
62513
+ label: { type: 'string' },
62514
+ },
62515
+ required: [
62516
+ 'billable_action',
62517
+ 'label',
62518
+ 'count',
62519
+ 'credits',
62520
+ ],
62521
+ type: 'object',
62522
+ },
62523
+ type: 'array',
62524
+ },
62525
+ connectivity: {
62526
+ items: {
62527
+ properties: {
62528
+ credits: {
62529
+ format: 'float',
62530
+ type: 'number',
62531
+ },
62532
+ credits_per_device_month: {
62533
+ format: 'float',
62534
+ type: 'number',
62535
+ },
62536
+ device_months: {
62537
+ format: 'float',
62538
+ type: 'number',
62539
+ },
62540
+ label: { type: 'string' },
62541
+ metric: { type: 'string' },
62542
+ },
62543
+ required: [
62544
+ 'metric',
62545
+ 'label',
62546
+ 'device_months',
62547
+ 'credits_per_device_month',
62548
+ 'credits',
62549
+ ],
62550
+ type: 'object',
62551
+ },
62552
+ type: 'array',
62553
+ },
62554
+ credits: { format: 'float', type: 'number' },
62555
+ percent_of_total: {
62556
+ format: 'float',
62557
+ type: 'number',
62558
+ },
62559
+ workspace_id: { nullable: true, type: 'string' },
62560
+ workspace_name: {
62561
+ nullable: true,
62562
+ type: 'string',
62563
+ },
62564
+ },
62565
+ required: [
62566
+ 'workspace_id',
62567
+ 'workspace_name',
62568
+ 'connectivity',
62569
+ 'actions',
62570
+ 'credits',
62571
+ 'percent_of_total',
62572
+ ],
62573
+ type: 'object',
62574
+ },
62575
+ nullable: true,
62576
+ type: 'array',
62577
+ },
62578
+ daily: {
62579
+ items: {
62580
+ properties: {
62581
+ action_credits: {
62582
+ format: 'float',
62583
+ type: 'number',
62584
+ },
62585
+ connectivity_credits: {
62586
+ format: 'float',
62587
+ type: 'number',
62588
+ },
62589
+ date: { type: 'string' },
62590
+ previous_period_credits: {
62591
+ format: 'float',
62592
+ nullable: true,
62593
+ type: 'number',
62594
+ },
62595
+ },
62596
+ required: [
62597
+ 'date',
62598
+ 'connectivity_credits',
62599
+ 'action_credits',
62600
+ 'previous_period_credits',
62601
+ ],
62602
+ type: 'object',
62603
+ },
62604
+ nullable: true,
62605
+ type: 'array',
62606
+ },
62607
+ is_daily_connectivity_included: { type: 'boolean' },
62608
+ package_credits: {
62609
+ format: 'float',
62610
+ nullable: true,
62611
+ type: 'number',
62612
+ },
62613
+ period_ends_at: { format: 'date-time', type: 'string' },
62614
+ period_started_at: {
62615
+ format: 'date-time',
62616
+ type: 'string',
62617
+ },
62618
+ source: {
62619
+ enum: ['metronome', 'estimate'],
62620
+ type: 'string',
62621
+ },
62622
+ used_credits: {
62623
+ format: 'float',
62624
+ nullable: true,
62625
+ type: 'number',
62626
+ },
62627
+ },
62628
+ required: [
62629
+ 'source',
62630
+ 'as_of',
62631
+ 'period_started_at',
62632
+ 'period_ends_at',
62633
+ 'package_credits',
62634
+ 'used_credits',
62635
+ 'by_workspace',
62636
+ 'by_category',
62637
+ 'daily',
62638
+ 'is_daily_connectivity_included',
62639
+ ],
62640
+ type: 'object',
62641
+ },
62642
+ },
62643
+ required: ['usage', 'ok'],
62644
+ type: 'object',
62645
+ },
62646
+ },
62647
+ },
62648
+ description: 'OK',
62649
+ },
62650
+ '400': { description: 'Bad Request' },
62651
+ '401': { description: 'Unauthorized' },
62652
+ },
62653
+ security: [{ console_session_without_workspace: [] }],
62654
+ summary: '/seam/console/v1/credits/usage/get',
62655
+ tags: [],
62656
+ 'x-fern-sdk-group-name': ['seam', 'console', 'v1', 'credits', 'usage'],
62657
+ 'x-fern-sdk-method-name': 'get',
62658
+ 'x-fern-sdk-return-value': 'usage',
62659
+ 'x-response-key': 'usage',
62660
+ 'x-title': "Get an Organization's Credit Usage in Detail",
62661
+ 'x-undocumented': 'Internal endpoint for Console',
62662
+ },
62663
+ },
62437
62664
  '/seam/console/v1/get_resource_locator': {
62438
62665
  get: {
62439
62666
  description:
@@ -109423,6 +109423,7 @@ export type Routes = {
109423
109423
  canceled_at: string | null
109424
109424
  } | null
109425
109425
  usage: {
109426
+ as_of: string
109426
109427
  period_started_at: string
109427
109428
  period_ends_at: string
109428
109429
  package_tokens: number
@@ -109565,6 +109566,68 @@ export type Routes = {
109565
109566
  }
109566
109567
  maxDuration: undefined
109567
109568
  }
109569
+ '/seam/console/v1/credits/usage/get': {
109570
+ route: '/seam/console/v1/credits/usage/get'
109571
+ method: 'POST'
109572
+ queryParams: {}
109573
+ jsonBody: {
109574
+ organization_id: string
109575
+ }
109576
+ commonParams: {}
109577
+ formData: {}
109578
+ jsonResponse: {
109579
+ usage: {
109580
+ source: 'metronome' | 'estimate'
109581
+ as_of: string
109582
+ period_started_at: string
109583
+ period_ends_at: string
109584
+ package_credits: number | null
109585
+ used_credits: number | null
109586
+ by_workspace:
109587
+ | {
109588
+ workspace_id: string | null
109589
+ workspace_name: string | null
109590
+ connectivity: {
109591
+ metric: string
109592
+ label: string
109593
+ device_months: number
109594
+ credits_per_device_month: number
109595
+ credits: number
109596
+ }[]
109597
+ actions: {
109598
+ billable_action: string
109599
+ label: string
109600
+ count: number
109601
+ credits: number
109602
+ }[]
109603
+ credits: number
109604
+ percent_of_total: number
109605
+ }[]
109606
+ | null
109607
+ by_category:
109608
+ | {
109609
+ kind: 'connectivity' | 'action'
109610
+ key: string
109611
+ label: string
109612
+ quantity: number
109613
+ credits_per_unit: number
109614
+ credits: number
109615
+ percent_of_total: number
109616
+ }[]
109617
+ | null
109618
+ daily:
109619
+ | {
109620
+ date: string
109621
+ connectivity_credits: number
109622
+ action_credits: number
109623
+ previous_period_credits: number | null
109624
+ }[]
109625
+ | null
109626
+ is_daily_connectivity_included: boolean
109627
+ }
109628
+ }
109629
+ maxDuration: undefined
109630
+ }
109568
109631
  '/seam/console/v1/get_resource_locator': {
109569
109632
  route: '/seam/console/v1/get_resource_locator'
109570
109633
  method: 'GET' | 'POST'