@seamapi/types 1.1159.0 → 1.1160.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.
@@ -91508,6 +91508,139 @@ export type Routes = {
91508
91508
  };
91509
91509
  maxDuration: undefined;
91510
91510
  };
91511
+ '/seam/console/v1/credits/checkout/start': {
91512
+ route: '/seam/console/v1/credits/checkout/start';
91513
+ method: 'POST';
91514
+ queryParams: {};
91515
+ jsonBody: {
91516
+ organization_id: string;
91517
+ package_quantity: number;
91518
+ success_url: string;
91519
+ cancel_url: string;
91520
+ };
91521
+ commonParams: {};
91522
+ formData: {};
91523
+ jsonResponse: {
91524
+ checkout_url: string;
91525
+ credit_subscription_id: string;
91526
+ };
91527
+ maxDuration: undefined;
91528
+ };
91529
+ '/seam/console/v1/credits/get': {
91530
+ route: '/seam/console/v1/credits/get';
91531
+ method: 'POST';
91532
+ queryParams: {};
91533
+ jsonBody: {
91534
+ organization_id: string;
91535
+ };
91536
+ commonParams: {};
91537
+ formData: {};
91538
+ jsonResponse: {
91539
+ credits: {
91540
+ is_test_mode: boolean;
91541
+ credit_subscription: {
91542
+ credit_subscription_id: string;
91543
+ status: string;
91544
+ package_quantity: number;
91545
+ price_cents: number;
91546
+ current_period_started_at: string | null;
91547
+ current_period_ends_at: string | null;
91548
+ past_due_since: string | null;
91549
+ canceled_at: string | null;
91550
+ } | null;
91551
+ usage: {
91552
+ period_started_at: string;
91553
+ period_ends_at: string;
91554
+ package_tokens: number;
91555
+ used_tokens: number;
91556
+ remaining_tokens: number;
91557
+ extra_tokens: number;
91558
+ extra_cents_per_token: number;
91559
+ estimated_extra_cents: number;
91560
+ percent_used: number;
91561
+ breakdown: {
91562
+ billable_action: string;
91563
+ label: string;
91564
+ count: number;
91565
+ token_weight: number;
91566
+ tokens: number;
91567
+ }[];
91568
+ connectivity: {
91569
+ metric: string;
91570
+ label: string;
91571
+ device_months: number;
91572
+ tokens: number;
91573
+ }[];
91574
+ } | null;
91575
+ };
91576
+ };
91577
+ maxDuration: undefined;
91578
+ };
91579
+ '/seam/console/v1/credits/invoices/list': {
91580
+ route: '/seam/console/v1/credits/invoices/list';
91581
+ method: 'POST';
91582
+ queryParams: {};
91583
+ jsonBody: {
91584
+ organization_id: string;
91585
+ };
91586
+ commonParams: {};
91587
+ formData: {};
91588
+ jsonResponse: {
91589
+ invoices: {
91590
+ invoice_id: string;
91591
+ period_started_at: string;
91592
+ period_ends_at: string;
91593
+ total_cents: number;
91594
+ status: string;
91595
+ hosted_invoice_url: string | null;
91596
+ issued_at: string;
91597
+ }[];
91598
+ };
91599
+ maxDuration: undefined;
91600
+ };
91601
+ '/seam/console/v1/credits/packages/list': {
91602
+ route: '/seam/console/v1/credits/packages/list';
91603
+ method: 'POST';
91604
+ queryParams: {};
91605
+ jsonBody: {
91606
+ organization_id: string;
91607
+ };
91608
+ commonParams: {};
91609
+ formData: {};
91610
+ jsonResponse: {
91611
+ packages: {
91612
+ package_quantity: number;
91613
+ price_cents: number;
91614
+ included_cents_per_token: number;
91615
+ extra_cents_per_token: number;
91616
+ }[];
91617
+ recommended_package_quantity: number;
91618
+ recommendation_basis: {
91619
+ trailing_30_day_tokens: number;
91620
+ };
91621
+ };
91622
+ maxDuration: undefined;
91623
+ };
91624
+ '/seam/console/v1/credits/purchases/get': {
91625
+ route: '/seam/console/v1/credits/purchases/get';
91626
+ method: 'POST';
91627
+ queryParams: {};
91628
+ jsonBody: {
91629
+ organization_id: string;
91630
+ credit_subscription_id: string;
91631
+ };
91632
+ commonParams: {};
91633
+ formData: {};
91634
+ jsonResponse: {
91635
+ purchase: {
91636
+ status: string;
91637
+ package_quantity: number;
91638
+ hosted_invoice_url: string | null;
91639
+ failure_reason: string | null;
91640
+ };
91641
+ };
91642
+ maxDuration: undefined;
91643
+ };
91511
91644
  '/seam/console/v1/get_resource_locator': {
91512
91645
  route: '/seam/console/v1/get_resource_locator';
91513
91646
  method: 'GET' | 'POST';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1159.0",
3
+ "version": "1.1160.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -61686,6 +61686,514 @@ const openapi: OpenAPISpec = {
61686
61686
  'x-undocumented': 'Internal endpoint for Console',
61687
61687
  },
61688
61688
  },
61689
+ '/seam/console/v1/credits/checkout/start': {
61690
+ post: {
61691
+ description:
61692
+ "Starts the Stripe Checkout for the first purchase of a monthly token package, or resumes the organization's pending one.",
61693
+ operationId: 'seamConsoleV1CreditsCheckoutStartPost',
61694
+ requestBody: {
61695
+ content: {
61696
+ 'application/json': {
61697
+ schema: {
61698
+ properties: {
61699
+ cancel_url: { format: 'uri', type: 'string' },
61700
+ organization_id: { format: 'uuid', type: 'string' },
61701
+ package_quantity: {
61702
+ exclusiveMinimum: true,
61703
+ minimum: 0,
61704
+ type: 'integer',
61705
+ },
61706
+ success_url: { format: 'uri', type: 'string' },
61707
+ },
61708
+ required: [
61709
+ 'organization_id',
61710
+ 'package_quantity',
61711
+ 'success_url',
61712
+ 'cancel_url',
61713
+ ],
61714
+ type: 'object',
61715
+ },
61716
+ },
61717
+ },
61718
+ },
61719
+ responses: {
61720
+ '200': {
61721
+ content: {
61722
+ 'application/json': {
61723
+ schema: {
61724
+ properties: {
61725
+ checkout_url: { format: 'uri', type: 'string' },
61726
+ credit_subscription_id: { format: 'uuid', type: 'string' },
61727
+ ok: { type: 'boolean' },
61728
+ },
61729
+ required: ['checkout_url', 'credit_subscription_id', 'ok'],
61730
+ type: 'object',
61731
+ },
61732
+ },
61733
+ },
61734
+ description: 'OK',
61735
+ },
61736
+ '400': { description: 'Bad Request' },
61737
+ '401': { description: 'Unauthorized' },
61738
+ },
61739
+ security: [{ console_session_without_workspace: [] }],
61740
+ summary: '/seam/console/v1/credits/checkout/start',
61741
+ tags: [],
61742
+ 'x-fern-sdk-group-name': [
61743
+ 'seam',
61744
+ 'console',
61745
+ 'v1',
61746
+ 'credits',
61747
+ 'checkout',
61748
+ ],
61749
+ 'x-fern-sdk-method-name': 'start',
61750
+ 'x-response-key': null,
61751
+ 'x-title': 'Start a Credit Subscription Checkout',
61752
+ 'x-undocumented': 'Internal endpoint for Console',
61753
+ },
61754
+ },
61755
+ '/seam/console/v1/credits/get': {
61756
+ post: {
61757
+ description:
61758
+ "Returns the organization's credit subscription and its token usage for the subscription's current period.",
61759
+ operationId: 'seamConsoleV1CreditsGetPost',
61760
+ requestBody: {
61761
+ content: {
61762
+ 'application/json': {
61763
+ schema: {
61764
+ properties: {
61765
+ organization_id: { format: 'uuid', type: 'string' },
61766
+ },
61767
+ required: ['organization_id'],
61768
+ type: 'object',
61769
+ },
61770
+ },
61771
+ },
61772
+ },
61773
+ responses: {
61774
+ '200': {
61775
+ content: {
61776
+ 'application/json': {
61777
+ schema: {
61778
+ properties: {
61779
+ credits: {
61780
+ properties: {
61781
+ credit_subscription: {
61782
+ nullable: true,
61783
+ properties: {
61784
+ canceled_at: {
61785
+ format: 'date-time',
61786
+ nullable: true,
61787
+ type: 'string',
61788
+ },
61789
+ credit_subscription_id: {
61790
+ format: 'uuid',
61791
+ type: 'string',
61792
+ },
61793
+ current_period_ends_at: {
61794
+ format: 'date-time',
61795
+ nullable: true,
61796
+ type: 'string',
61797
+ },
61798
+ current_period_started_at: {
61799
+ format: 'date-time',
61800
+ nullable: true,
61801
+ type: 'string',
61802
+ },
61803
+ package_quantity: {
61804
+ format: 'float',
61805
+ type: 'number',
61806
+ },
61807
+ past_due_since: {
61808
+ format: 'date-time',
61809
+ nullable: true,
61810
+ type: 'string',
61811
+ },
61812
+ price_cents: { format: 'float', type: 'number' },
61813
+ status: { type: 'string' },
61814
+ },
61815
+ required: [
61816
+ 'credit_subscription_id',
61817
+ 'status',
61818
+ 'package_quantity',
61819
+ 'price_cents',
61820
+ 'current_period_started_at',
61821
+ 'current_period_ends_at',
61822
+ 'past_due_since',
61823
+ 'canceled_at',
61824
+ ],
61825
+ type: 'object',
61826
+ },
61827
+ is_test_mode: { type: 'boolean' },
61828
+ usage: {
61829
+ nullable: true,
61830
+ properties: {
61831
+ breakdown: {
61832
+ items: {
61833
+ properties: {
61834
+ billable_action: { type: 'string' },
61835
+ count: { format: 'float', type: 'number' },
61836
+ label: { type: 'string' },
61837
+ token_weight: {
61838
+ format: 'float',
61839
+ type: 'number',
61840
+ },
61841
+ tokens: { format: 'float', type: 'number' },
61842
+ },
61843
+ required: [
61844
+ 'billable_action',
61845
+ 'label',
61846
+ 'count',
61847
+ 'token_weight',
61848
+ 'tokens',
61849
+ ],
61850
+ type: 'object',
61851
+ },
61852
+ type: 'array',
61853
+ },
61854
+ connectivity: {
61855
+ items: {
61856
+ properties: {
61857
+ device_months: {
61858
+ format: 'float',
61859
+ type: 'number',
61860
+ },
61861
+ label: { type: 'string' },
61862
+ metric: { type: 'string' },
61863
+ tokens: { format: 'float', type: 'number' },
61864
+ },
61865
+ required: [
61866
+ 'metric',
61867
+ 'label',
61868
+ 'device_months',
61869
+ 'tokens',
61870
+ ],
61871
+ type: 'object',
61872
+ },
61873
+ type: 'array',
61874
+ },
61875
+ estimated_extra_cents: {
61876
+ format: 'float',
61877
+ type: 'number',
61878
+ },
61879
+ extra_cents_per_token: {
61880
+ format: 'float',
61881
+ type: 'number',
61882
+ },
61883
+ extra_tokens: { format: 'float', type: 'number' },
61884
+ package_tokens: { format: 'float', type: 'number' },
61885
+ percent_used: { format: 'float', type: 'number' },
61886
+ period_ends_at: {
61887
+ format: 'date-time',
61888
+ type: 'string',
61889
+ },
61890
+ period_started_at: {
61891
+ format: 'date-time',
61892
+ type: 'string',
61893
+ },
61894
+ remaining_tokens: {
61895
+ format: 'float',
61896
+ type: 'number',
61897
+ },
61898
+ used_tokens: { format: 'float', type: 'number' },
61899
+ },
61900
+ required: [
61901
+ 'period_started_at',
61902
+ 'period_ends_at',
61903
+ 'package_tokens',
61904
+ 'used_tokens',
61905
+ 'remaining_tokens',
61906
+ 'extra_tokens',
61907
+ 'extra_cents_per_token',
61908
+ 'estimated_extra_cents',
61909
+ 'percent_used',
61910
+ 'breakdown',
61911
+ 'connectivity',
61912
+ ],
61913
+ type: 'object',
61914
+ },
61915
+ },
61916
+ required: [
61917
+ 'is_test_mode',
61918
+ 'credit_subscription',
61919
+ 'usage',
61920
+ ],
61921
+ type: 'object',
61922
+ },
61923
+ ok: { type: 'boolean' },
61924
+ },
61925
+ required: ['credits', 'ok'],
61926
+ type: 'object',
61927
+ },
61928
+ },
61929
+ },
61930
+ description: 'OK',
61931
+ },
61932
+ '400': { description: 'Bad Request' },
61933
+ '401': { description: 'Unauthorized' },
61934
+ },
61935
+ security: [{ console_session_without_workspace: [] }],
61936
+ summary: '/seam/console/v1/credits/get',
61937
+ tags: [],
61938
+ 'x-fern-sdk-group-name': ['seam', 'console', 'v1', 'credits'],
61939
+ 'x-fern-sdk-method-name': 'get',
61940
+ 'x-fern-sdk-return-value': 'credits',
61941
+ 'x-response-key': 'credits',
61942
+ 'x-title': "Get an Organization's Credits",
61943
+ 'x-undocumented': 'Internal endpoint for Console',
61944
+ },
61945
+ },
61946
+ '/seam/console/v1/credits/invoices/list': {
61947
+ post: {
61948
+ description:
61949
+ "Lists the organization's most recent token package invoices, newest first.",
61950
+ operationId: 'seamConsoleV1CreditsInvoicesListPost',
61951
+ requestBody: {
61952
+ content: {
61953
+ 'application/json': {
61954
+ schema: {
61955
+ properties: {
61956
+ organization_id: { format: 'uuid', type: 'string' },
61957
+ },
61958
+ required: ['organization_id'],
61959
+ type: 'object',
61960
+ },
61961
+ },
61962
+ },
61963
+ },
61964
+ responses: {
61965
+ '200': {
61966
+ content: {
61967
+ 'application/json': {
61968
+ schema: {
61969
+ properties: {
61970
+ invoices: {
61971
+ items: {
61972
+ properties: {
61973
+ hosted_invoice_url: {
61974
+ nullable: true,
61975
+ type: 'string',
61976
+ },
61977
+ invoice_id: { type: 'string' },
61978
+ issued_at: { format: 'date-time', type: 'string' },
61979
+ period_ends_at: {
61980
+ format: 'date-time',
61981
+ type: 'string',
61982
+ },
61983
+ period_started_at: {
61984
+ format: 'date-time',
61985
+ type: 'string',
61986
+ },
61987
+ status: { type: 'string' },
61988
+ total_cents: { format: 'float', type: 'number' },
61989
+ },
61990
+ required: [
61991
+ 'invoice_id',
61992
+ 'period_started_at',
61993
+ 'period_ends_at',
61994
+ 'total_cents',
61995
+ 'status',
61996
+ 'hosted_invoice_url',
61997
+ 'issued_at',
61998
+ ],
61999
+ type: 'object',
62000
+ },
62001
+ type: 'array',
62002
+ },
62003
+ ok: { type: 'boolean' },
62004
+ },
62005
+ required: ['invoices', 'ok'],
62006
+ type: 'object',
62007
+ },
62008
+ },
62009
+ },
62010
+ description: 'OK',
62011
+ },
62012
+ '400': { description: 'Bad Request' },
62013
+ '401': { description: 'Unauthorized' },
62014
+ },
62015
+ security: [{ console_session_without_workspace: [] }],
62016
+ summary: '/seam/console/v1/credits/invoices/list',
62017
+ tags: [],
62018
+ 'x-fern-sdk-group-name': [
62019
+ 'seam',
62020
+ 'console',
62021
+ 'v1',
62022
+ 'credits',
62023
+ 'invoices',
62024
+ ],
62025
+ 'x-fern-sdk-method-name': 'list',
62026
+ 'x-fern-sdk-return-value': 'invoices',
62027
+ 'x-response-key': 'invoices',
62028
+ 'x-title': 'List Credit Invoices',
62029
+ 'x-undocumented': 'Internal endpoint for Console',
62030
+ },
62031
+ },
62032
+ '/seam/console/v1/credits/packages/list': {
62033
+ post: {
62034
+ description:
62035
+ "Lists the purchasable monthly token packages and the package recommended for the organization's trailing 30 days of usage.",
62036
+ operationId: 'seamConsoleV1CreditsPackagesListPost',
62037
+ requestBody: {
62038
+ content: {
62039
+ 'application/json': {
62040
+ schema: {
62041
+ properties: {
62042
+ organization_id: { format: 'uuid', type: 'string' },
62043
+ },
62044
+ required: ['organization_id'],
62045
+ type: 'object',
62046
+ },
62047
+ },
62048
+ },
62049
+ },
62050
+ responses: {
62051
+ '200': {
62052
+ content: {
62053
+ 'application/json': {
62054
+ schema: {
62055
+ properties: {
62056
+ ok: { type: 'boolean' },
62057
+ packages: {
62058
+ items: {
62059
+ properties: {
62060
+ extra_cents_per_token: {
62061
+ format: 'float',
62062
+ type: 'number',
62063
+ },
62064
+ included_cents_per_token: {
62065
+ format: 'float',
62066
+ type: 'number',
62067
+ },
62068
+ package_quantity: { format: 'float', type: 'number' },
62069
+ price_cents: { format: 'float', type: 'number' },
62070
+ },
62071
+ required: [
62072
+ 'package_quantity',
62073
+ 'price_cents',
62074
+ 'included_cents_per_token',
62075
+ 'extra_cents_per_token',
62076
+ ],
62077
+ type: 'object',
62078
+ },
62079
+ type: 'array',
62080
+ },
62081
+ recommendation_basis: {
62082
+ properties: {
62083
+ trailing_30_day_tokens: {
62084
+ format: 'float',
62085
+ type: 'number',
62086
+ },
62087
+ },
62088
+ required: ['trailing_30_day_tokens'],
62089
+ type: 'object',
62090
+ },
62091
+ recommended_package_quantity: {
62092
+ format: 'float',
62093
+ type: 'number',
62094
+ },
62095
+ },
62096
+ required: [
62097
+ 'packages',
62098
+ 'recommended_package_quantity',
62099
+ 'recommendation_basis',
62100
+ 'ok',
62101
+ ],
62102
+ type: 'object',
62103
+ },
62104
+ },
62105
+ },
62106
+ description: 'OK',
62107
+ },
62108
+ '400': { description: 'Bad Request' },
62109
+ '401': { description: 'Unauthorized' },
62110
+ },
62111
+ security: [{ console_session_without_workspace: [] }],
62112
+ summary: '/seam/console/v1/credits/packages/list',
62113
+ tags: [],
62114
+ 'x-fern-sdk-group-name': [
62115
+ 'seam',
62116
+ 'console',
62117
+ 'v1',
62118
+ 'credits',
62119
+ 'packages',
62120
+ ],
62121
+ 'x-fern-sdk-method-name': 'list',
62122
+ 'x-fern-sdk-return-value': 'packages',
62123
+ 'x-response-key': 'packages',
62124
+ 'x-title': 'List Credit Packages',
62125
+ 'x-undocumented': 'Internal endpoint for Console',
62126
+ },
62127
+ },
62128
+ '/seam/console/v1/credits/purchases/get': {
62129
+ post: {
62130
+ description:
62131
+ 'Advances a pending credit subscription purchase and returns its status.',
62132
+ operationId: 'seamConsoleV1CreditsPurchasesGetPost',
62133
+ requestBody: {
62134
+ content: {
62135
+ 'application/json': {
62136
+ schema: {
62137
+ properties: {
62138
+ credit_subscription_id: { format: 'uuid', type: 'string' },
62139
+ organization_id: { format: 'uuid', type: 'string' },
62140
+ },
62141
+ required: ['organization_id', 'credit_subscription_id'],
62142
+ type: 'object',
62143
+ },
62144
+ },
62145
+ },
62146
+ },
62147
+ responses: {
62148
+ '200': {
62149
+ content: {
62150
+ 'application/json': {
62151
+ schema: {
62152
+ properties: {
62153
+ ok: { type: 'boolean' },
62154
+ purchase: {
62155
+ properties: {
62156
+ failure_reason: { nullable: true, type: 'string' },
62157
+ hosted_invoice_url: { nullable: true, type: 'string' },
62158
+ package_quantity: { format: 'float', type: 'number' },
62159
+ status: { type: 'string' },
62160
+ },
62161
+ required: [
62162
+ 'status',
62163
+ 'package_quantity',
62164
+ 'hosted_invoice_url',
62165
+ 'failure_reason',
62166
+ ],
62167
+ type: 'object',
62168
+ },
62169
+ },
62170
+ required: ['purchase', 'ok'],
62171
+ type: 'object',
62172
+ },
62173
+ },
62174
+ },
62175
+ description: 'OK',
62176
+ },
62177
+ '400': { description: 'Bad Request' },
62178
+ '401': { description: 'Unauthorized' },
62179
+ },
62180
+ security: [{ console_session_without_workspace: [] }],
62181
+ summary: '/seam/console/v1/credits/purchases/get',
62182
+ tags: [],
62183
+ 'x-fern-sdk-group-name': [
62184
+ 'seam',
62185
+ 'console',
62186
+ 'v1',
62187
+ 'credits',
62188
+ 'purchases',
62189
+ ],
62190
+ 'x-fern-sdk-method-name': 'get',
62191
+ 'x-fern-sdk-return-value': 'purchase',
62192
+ 'x-response-key': 'purchase',
62193
+ 'x-title': 'Get a Credit Purchase',
62194
+ 'x-undocumented': 'Internal endpoint for Console',
62195
+ },
62196
+ },
61689
62197
  '/seam/console/v1/get_resource_locator': {
61690
62198
  get: {
61691
62199
  description: