@seamapi/http 1.102.0 → 1.105.1

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.
Files changed (101) hide show
  1. package/README.md +0 -1
  2. package/dist/connect.cjs +601 -235
  3. package/dist/connect.cjs.map +1 -1
  4. package/dist/connect.d.cts +184 -52
  5. package/dist/index.cjs +609 -239
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +1 -1
  8. package/lib/seam/connect/routes/access-codes/access-codes.d.ts +13 -0
  9. package/lib/seam/connect/routes/access-codes/access-codes.js +9 -0
  10. package/lib/seam/connect/routes/access-codes/access-codes.js.map +1 -1
  11. package/lib/seam/connect/routes/access-methods/access-methods.d.ts +2 -2
  12. package/lib/seam/connect/routes/access-methods/access-methods.js +2 -2
  13. package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -1
  14. package/lib/seam/connect/routes/customers/customers.d.ts +2 -0
  15. package/lib/seam/connect/routes/customers/customers.js +4 -0
  16. package/lib/seam/connect/routes/customers/customers.js.map +1 -1
  17. package/lib/seam/connect/routes/customers/index.d.ts +1 -0
  18. package/lib/seam/connect/routes/customers/index.js +1 -0
  19. package/lib/seam/connect/routes/customers/index.js.map +1 -1
  20. package/lib/seam/connect/routes/customers/reservations/index.d.ts +1 -0
  21. package/lib/seam/connect/routes/{seam/v1 → customers/reservations}/index.js +1 -2
  22. package/lib/seam/connect/routes/customers/reservations/index.js.map +1 -0
  23. package/lib/seam/connect/routes/{seam/v1/v1.d.ts → customers/reservations/reservations.d.ts} +23 -10
  24. package/lib/seam/connect/routes/{seam/v1/v1.js → customers/reservations/reservations.js} +18 -12
  25. package/lib/seam/connect/routes/customers/reservations/reservations.js.map +1 -0
  26. package/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.d.ts +13 -0
  27. package/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.js +12 -0
  28. package/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.js.map +1 -1
  29. package/lib/seam/connect/routes/seam/customer/v1/access-methods/access-methods.d.ts +33 -0
  30. package/lib/seam/connect/routes/seam/customer/v1/access-methods/access-methods.js +104 -0
  31. package/lib/seam/connect/routes/seam/customer/v1/access-methods/access-methods.js.map +1 -0
  32. package/lib/seam/connect/routes/seam/customer/v1/access-methods/index.d.ts +1 -0
  33. package/lib/seam/connect/routes/seam/customer/v1/access-methods/index.js +6 -0
  34. package/lib/seam/connect/routes/seam/customer/v1/access-methods/index.js.map +1 -0
  35. package/lib/seam/connect/routes/seam/customer/v1/customers/customers.d.ts +14 -1
  36. package/lib/seam/connect/routes/seam/customer/v1/customers/customers.js +9 -3
  37. package/lib/seam/connect/routes/seam/customer/v1/customers/customers.js.map +1 -1
  38. package/lib/seam/connect/routes/seam/{v1/customers/customers.d.ts → customer/v1/encoders/encoders.d.ts} +20 -20
  39. package/lib/seam/connect/routes/seam/{v1/customers/customers.js → customer/v1/encoders/encoders.js} +26 -20
  40. package/lib/seam/connect/routes/seam/customer/v1/encoders/encoders.js.map +1 -0
  41. package/lib/seam/connect/routes/seam/customer/v1/encoders/index.d.ts +1 -0
  42. package/lib/seam/connect/routes/seam/{v1/customers → customer/v1/encoders}/index.js +1 -1
  43. package/lib/seam/connect/routes/seam/customer/v1/encoders/index.js.map +1 -0
  44. package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +2 -0
  45. package/lib/seam/connect/routes/seam/customer/v1/index.js +2 -0
  46. package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -1
  47. package/lib/seam/connect/routes/seam/customer/v1/settings/index.d.ts +1 -0
  48. package/lib/seam/connect/routes/seam/customer/v1/settings/index.js +1 -0
  49. package/lib/seam/connect/routes/seam/customer/v1/settings/index.js.map +1 -1
  50. package/lib/seam/connect/routes/seam/customer/v1/settings/settings.d.ts +2 -0
  51. package/lib/seam/connect/routes/seam/customer/v1/settings/settings.js +4 -0
  52. package/lib/seam/connect/routes/seam/customer/v1/settings/settings.js.map +1 -1
  53. package/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/index.d.ts +1 -0
  54. package/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/index.js +6 -0
  55. package/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/index.js.map +1 -0
  56. package/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/vertical-resource-aliases.d.ts +34 -0
  57. package/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/vertical-resource-aliases.js +104 -0
  58. package/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/vertical-resource-aliases.js.map +1 -0
  59. package/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.d.ts +13 -0
  60. package/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.js +9 -3
  61. package/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.js.map +1 -1
  62. package/lib/seam/connect/routes/seam/customer/v1/v1.d.ts +4 -0
  63. package/lib/seam/connect/routes/seam/customer/v1/v1.js +8 -3
  64. package/lib/seam/connect/routes/seam/customer/v1/v1.js.map +1 -1
  65. package/lib/seam/connect/routes/seam/index.d.ts +0 -1
  66. package/lib/seam/connect/routes/seam/index.js +0 -1
  67. package/lib/seam/connect/routes/seam/index.js.map +1 -1
  68. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +19 -9
  69. package/lib/seam/connect/routes/seam-http-endpoints.js +72 -8
  70. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  71. package/lib/version.d.ts +1 -1
  72. package/lib/version.js +1 -1
  73. package/package.json +6 -6
  74. package/src/lib/seam/connect/routes/access-codes/access-codes.ts +35 -0
  75. package/src/lib/seam/connect/routes/access-methods/access-methods.ts +8 -4
  76. package/src/lib/seam/connect/routes/customers/customers.ts +6 -0
  77. package/src/lib/seam/connect/routes/customers/index.ts +1 -0
  78. package/src/lib/seam/connect/routes/{seam/v1 → customers/reservations}/index.ts +1 -2
  79. package/src/lib/seam/connect/routes/{seam/v1/customers/customers.ts → customers/reservations/reservations.ts} +33 -29
  80. package/src/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.ts +41 -0
  81. package/src/lib/seam/connect/routes/seam/customer/v1/access-methods/access-methods.ts +217 -0
  82. package/src/lib/seam/connect/routes/seam/customer/v1/access-methods/index.ts +6 -0
  83. package/src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts +38 -6
  84. package/src/lib/seam/connect/routes/seam/{v1/v1.ts → customer/v1/encoders/encoders.ts} +62 -19
  85. package/src/lib/seam/connect/routes/seam/{v1/customers → customer/v1/encoders}/index.ts +1 -1
  86. package/src/lib/seam/connect/routes/seam/customer/v1/index.ts +2 -0
  87. package/src/lib/seam/connect/routes/seam/customer/v1/settings/index.ts +1 -0
  88. package/src/lib/seam/connect/routes/seam/customer/v1/settings/settings.ts +9 -0
  89. package/src/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/index.ts +6 -0
  90. package/src/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/vertical-resource-aliases.ts +228 -0
  91. package/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts +36 -5
  92. package/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +13 -5
  93. package/src/lib/seam/connect/routes/seam/index.ts +0 -1
  94. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +182 -21
  95. package/src/lib/version.ts +1 -1
  96. package/lib/seam/connect/routes/seam/v1/customers/customers.js.map +0 -1
  97. package/lib/seam/connect/routes/seam/v1/customers/index.d.ts +0 -1
  98. package/lib/seam/connect/routes/seam/v1/customers/index.js.map +0 -1
  99. package/lib/seam/connect/routes/seam/v1/index.d.ts +0 -2
  100. package/lib/seam/connect/routes/seam/v1/index.js.map +0 -1
  101. package/lib/seam/connect/routes/seam/v1/v1.js.map +0 -1
@@ -3,6 +3,8 @@
3
3
  * Do not edit this file or add other files to this directory.
4
4
  */
5
5
 
6
+ import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
7
+
6
8
  import { seamApiLtsVersion } from 'lib/lts-version.js'
7
9
  import {
8
10
  getAuthHeadersForClientSessionToken,
@@ -30,12 +32,11 @@ import {
30
32
  parseOptions,
31
33
  } from 'lib/seam/connect/parse-options.js'
32
34
  import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
33
- import type { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
35
+ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
34
36
  import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
37
+ import type { SetNonNullable } from 'lib/types.js'
35
38
 
36
- import { SeamHttpSeamV1Customers } from './customers/index.js'
37
-
38
- export class SeamHttpSeamV1 {
39
+ export class SeamHttpSeamCustomerV1Encoders {
39
40
  client: Client
40
41
  readonly defaults: Required<SeamHttpRequestOptions>
41
42
  readonly ltsVersion = seamApiLtsVersion
@@ -43,6 +44,11 @@ export class SeamHttpSeamV1 {
43
44
 
44
45
  constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
45
46
  const options = parseOptions(apiKeyOrOptions)
47
+ if (!options.isUndocumentedApiEnabled) {
48
+ throw new Error(
49
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
50
+ )
51
+ }
46
52
  this.client = 'client' in options ? options.client : createClient(options)
47
53
  this.defaults = limitToSeamHttpRequestOptions(options)
48
54
  }
@@ -50,23 +56,23 @@ export class SeamHttpSeamV1 {
50
56
  static fromClient(
51
57
  client: SeamHttpOptionsWithClient['client'],
52
58
  options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
53
- ): SeamHttpSeamV1 {
59
+ ): SeamHttpSeamCustomerV1Encoders {
54
60
  const constructorOptions = { ...options, client }
55
61
  if (!isSeamHttpOptionsWithClient(constructorOptions)) {
56
62
  throw new SeamHttpInvalidOptionsError('Missing client')
57
63
  }
58
- return new SeamHttpSeamV1(constructorOptions)
64
+ return new SeamHttpSeamCustomerV1Encoders(constructorOptions)
59
65
  }
60
66
 
61
67
  static fromApiKey(
62
68
  apiKey: SeamHttpOptionsWithApiKey['apiKey'],
63
69
  options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
64
- ): SeamHttpSeamV1 {
70
+ ): SeamHttpSeamCustomerV1Encoders {
65
71
  const constructorOptions = { ...options, apiKey }
66
72
  if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
67
73
  throw new SeamHttpInvalidOptionsError('Missing apiKey')
68
74
  }
69
- return new SeamHttpSeamV1(constructorOptions)
75
+ return new SeamHttpSeamCustomerV1Encoders(constructorOptions)
70
76
  }
71
77
 
72
78
  static fromClientSessionToken(
@@ -75,24 +81,24 @@ export class SeamHttpSeamV1 {
75
81
  SeamHttpOptionsWithClientSessionToken,
76
82
  'clientSessionToken'
77
83
  > = {},
78
- ): SeamHttpSeamV1 {
84
+ ): SeamHttpSeamCustomerV1Encoders {
79
85
  const constructorOptions = { ...options, clientSessionToken }
80
86
  if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
81
87
  throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
82
88
  }
83
- return new SeamHttpSeamV1(constructorOptions)
89
+ return new SeamHttpSeamCustomerV1Encoders(constructorOptions)
84
90
  }
85
91
 
86
92
  static async fromPublishableKey(
87
93
  publishableKey: string,
88
94
  userIdentifierKey: string,
89
95
  options: SeamHttpFromPublishableKeyOptions = {},
90
- ): Promise<SeamHttpSeamV1> {
96
+ ): Promise<SeamHttpSeamCustomerV1Encoders> {
91
97
  warnOnInsecureuserIdentifierKey(userIdentifierKey)
92
98
  const clientOptions = parseOptions({ ...options, publishableKey })
93
99
  if (isSeamHttpOptionsWithClient(clientOptions)) {
94
100
  throw new SeamHttpInvalidOptionsError(
95
- 'The client option cannot be used with SeamHttpSeamV1.fromPublishableKey',
101
+ 'The client option cannot be used with SeamHttpSeamCustomerV1Encoders.fromPublishableKey',
96
102
  )
97
103
  }
98
104
  const client = createClient(clientOptions)
@@ -100,7 +106,7 @@ export class SeamHttpSeamV1 {
100
106
  const { token } = await clientSessions.getOrCreate({
101
107
  user_identifier_key: userIdentifierKey,
102
108
  })
103
- return SeamHttpSeamV1.fromClientSessionToken(token, options)
109
+ return SeamHttpSeamCustomerV1Encoders.fromClientSessionToken(token, options)
104
110
  }
105
111
 
106
112
  static fromConsoleSessionToken(
@@ -110,14 +116,14 @@ export class SeamHttpSeamV1 {
110
116
  SeamHttpOptionsWithConsoleSessionToken,
111
117
  'consoleSessionToken' | 'workspaceId'
112
118
  > = {},
113
- ): SeamHttpSeamV1 {
119
+ ): SeamHttpSeamCustomerV1Encoders {
114
120
  const constructorOptions = { ...options, consoleSessionToken, workspaceId }
115
121
  if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
116
122
  throw new SeamHttpInvalidOptionsError(
117
123
  'Missing consoleSessionToken or workspaceId',
118
124
  )
119
125
  }
120
- return new SeamHttpSeamV1(constructorOptions)
126
+ return new SeamHttpSeamCustomerV1Encoders(constructorOptions)
121
127
  }
122
128
 
123
129
  static fromPersonalAccessToken(
@@ -127,14 +133,14 @@ export class SeamHttpSeamV1 {
127
133
  SeamHttpOptionsWithPersonalAccessToken,
128
134
  'personalAccessToken' | 'workspaceId'
129
135
  > = {},
130
- ): SeamHttpSeamV1 {
136
+ ): SeamHttpSeamCustomerV1Encoders {
131
137
  const constructorOptions = { ...options, personalAccessToken, workspaceId }
132
138
  if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
133
139
  throw new SeamHttpInvalidOptionsError(
134
140
  'Missing personalAccessToken or workspaceId',
135
141
  )
136
142
  }
137
- return new SeamHttpSeamV1(constructorOptions)
143
+ return new SeamHttpSeamCustomerV1Encoders(constructorOptions)
138
144
  }
139
145
 
140
146
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
@@ -162,7 +168,44 @@ export class SeamHttpSeamV1 {
162
168
  await clientSessions.get()
163
169
  }
164
170
 
165
- get customers(): SeamHttpSeamV1Customers {
166
- return SeamHttpSeamV1Customers.fromClient(this.client, this.defaults)
171
+ list(
172
+ parameters?: SeamCustomerV1EncodersListParameters,
173
+ options: SeamCustomerV1EncodersListOptions = {},
174
+ ): SeamCustomerV1EncodersListRequest {
175
+ if (!this.defaults.isUndocumentedApiEnabled) {
176
+ throw new Error(
177
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
178
+ )
179
+ }
180
+ return new SeamHttpRequest(this, {
181
+ pathname: '/seam/customer/v1/encoders/list',
182
+ method: 'POST',
183
+ body: parameters,
184
+ responseKey: 'encoders',
185
+ options,
186
+ })
167
187
  }
168
188
  }
189
+
190
+ export type SeamCustomerV1EncodersListParameters =
191
+ RouteRequestBody<'/seam/customer/v1/encoders/list'>
192
+
193
+ /**
194
+ * @deprecated Use SeamCustomerV1EncodersListParameters instead.
195
+ */
196
+ export type SeamCustomerV1EncodersListParams =
197
+ SeamCustomerV1EncodersListParameters
198
+
199
+ /**
200
+ * @deprecated Use SeamCustomerV1EncodersListRequest instead.
201
+ */
202
+ export type SeamCustomerV1EncodersListResponse = SetNonNullable<
203
+ Required<RouteResponse<'/seam/customer/v1/encoders/list'>>
204
+ >
205
+
206
+ export type SeamCustomerV1EncodersListRequest = SeamHttpRequest<
207
+ SeamCustomerV1EncodersListResponse,
208
+ 'encoders'
209
+ >
210
+
211
+ export interface SeamCustomerV1EncodersListOptions {}
@@ -3,4 +3,4 @@
3
3
  * Do not edit this file or add other files to this directory.
4
4
  */
5
5
 
6
- export * from './customers.js'
6
+ export * from './encoders.js'
@@ -4,11 +4,13 @@
4
4
  */
5
5
 
6
6
  export * from './access-grants/index.js'
7
+ export * from './access-methods/index.js'
7
8
  export * from './automation-runs/index.js'
8
9
  export * from './automations/index.js'
9
10
  export * from './connector-customers/index.js'
10
11
  export * from './connectors/index.js'
11
12
  export * from './customers/index.js'
13
+ export * from './encoders/index.js'
12
14
  export * from './events/index.js'
13
15
  export * from './portals/index.js'
14
16
  export * from './reservations/index.js'
@@ -4,3 +4,4 @@
4
4
  */
5
5
 
6
6
  export * from './settings.js'
7
+ export * from './vertical-resource-aliases/index.js'
@@ -40,6 +40,8 @@ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
40
40
  import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
41
41
  import type { SetNonNullable } from 'lib/types.js'
42
42
 
43
+ import { SeamHttpSeamCustomerV1SettingsVerticalResourceAliases } from './vertical-resource-aliases/index.js'
44
+
43
45
  export class SeamHttpSeamCustomerV1Settings {
44
46
  client: Client
45
47
  readonly defaults: Required<SeamHttpRequestOptions>
@@ -172,6 +174,13 @@ export class SeamHttpSeamCustomerV1Settings {
172
174
  await clientSessions.get()
173
175
  }
174
176
 
177
+ get verticalResourceAliases(): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases {
178
+ return SeamHttpSeamCustomerV1SettingsVerticalResourceAliases.fromClient(
179
+ this.client,
180
+ this.defaults,
181
+ )
182
+ }
183
+
175
184
  get(
176
185
  parameters?: SeamCustomerV1SettingsGetParameters,
177
186
  options: SeamCustomerV1SettingsGetOptions = {},
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Automatically generated by codegen/smith.ts.
3
+ * Do not edit this file or add other files to this directory.
4
+ */
5
+
6
+ export * from './vertical-resource-aliases.js'
@@ -0,0 +1,228 @@
1
+ /*
2
+ * Automatically generated by codegen/smith.ts.
3
+ * Do not edit this file or add other files to this directory.
4
+ */
5
+
6
+ import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
7
+
8
+ import { seamApiLtsVersion } from 'lib/lts-version.js'
9
+ import {
10
+ getAuthHeadersForClientSessionToken,
11
+ warnOnInsecureuserIdentifierKey,
12
+ } from 'lib/seam/connect/auth.js'
13
+ import { type Client, createClient } from 'lib/seam/connect/client.js'
14
+ import {
15
+ isSeamHttpOptionsWithApiKey,
16
+ isSeamHttpOptionsWithClient,
17
+ isSeamHttpOptionsWithClientSessionToken,
18
+ isSeamHttpOptionsWithConsoleSessionToken,
19
+ isSeamHttpOptionsWithPersonalAccessToken,
20
+ type SeamHttpFromPublishableKeyOptions,
21
+ SeamHttpInvalidOptionsError,
22
+ type SeamHttpOptions,
23
+ type SeamHttpOptionsWithApiKey,
24
+ type SeamHttpOptionsWithClient,
25
+ type SeamHttpOptionsWithClientSessionToken,
26
+ type SeamHttpOptionsWithConsoleSessionToken,
27
+ type SeamHttpOptionsWithPersonalAccessToken,
28
+ type SeamHttpRequestOptions,
29
+ } from 'lib/seam/connect/options.js'
30
+ import {
31
+ limitToSeamHttpRequestOptions,
32
+ parseOptions,
33
+ } from 'lib/seam/connect/parse-options.js'
34
+ import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
35
+ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
36
+ import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
37
+ import type { SetNonNullable } from 'lib/types.js'
38
+
39
+ export class SeamHttpSeamCustomerV1SettingsVerticalResourceAliases {
40
+ client: Client
41
+ readonly defaults: Required<SeamHttpRequestOptions>
42
+ readonly ltsVersion = seamApiLtsVersion
43
+ static ltsVersion = seamApiLtsVersion
44
+
45
+ constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
46
+ const options = parseOptions(apiKeyOrOptions)
47
+ if (!options.isUndocumentedApiEnabled) {
48
+ throw new Error(
49
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
50
+ )
51
+ }
52
+ this.client = 'client' in options ? options.client : createClient(options)
53
+ this.defaults = limitToSeamHttpRequestOptions(options)
54
+ }
55
+
56
+ static fromClient(
57
+ client: SeamHttpOptionsWithClient['client'],
58
+ options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
59
+ ): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases {
60
+ const constructorOptions = { ...options, client }
61
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
62
+ throw new SeamHttpInvalidOptionsError('Missing client')
63
+ }
64
+ return new SeamHttpSeamCustomerV1SettingsVerticalResourceAliases(
65
+ constructorOptions,
66
+ )
67
+ }
68
+
69
+ static fromApiKey(
70
+ apiKey: SeamHttpOptionsWithApiKey['apiKey'],
71
+ options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
72
+ ): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases {
73
+ const constructorOptions = { ...options, apiKey }
74
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
75
+ throw new SeamHttpInvalidOptionsError('Missing apiKey')
76
+ }
77
+ return new SeamHttpSeamCustomerV1SettingsVerticalResourceAliases(
78
+ constructorOptions,
79
+ )
80
+ }
81
+
82
+ static fromClientSessionToken(
83
+ clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
84
+ options: Omit<
85
+ SeamHttpOptionsWithClientSessionToken,
86
+ 'clientSessionToken'
87
+ > = {},
88
+ ): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases {
89
+ const constructorOptions = { ...options, clientSessionToken }
90
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
91
+ throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
92
+ }
93
+ return new SeamHttpSeamCustomerV1SettingsVerticalResourceAliases(
94
+ constructorOptions,
95
+ )
96
+ }
97
+
98
+ static async fromPublishableKey(
99
+ publishableKey: string,
100
+ userIdentifierKey: string,
101
+ options: SeamHttpFromPublishableKeyOptions = {},
102
+ ): Promise<SeamHttpSeamCustomerV1SettingsVerticalResourceAliases> {
103
+ warnOnInsecureuserIdentifierKey(userIdentifierKey)
104
+ const clientOptions = parseOptions({ ...options, publishableKey })
105
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
106
+ throw new SeamHttpInvalidOptionsError(
107
+ 'The client option cannot be used with SeamHttpSeamCustomerV1SettingsVerticalResourceAliases.fromPublishableKey',
108
+ )
109
+ }
110
+ const client = createClient(clientOptions)
111
+ const clientSessions = SeamHttpClientSessions.fromClient(client)
112
+ const { token } = await clientSessions.getOrCreate({
113
+ user_identifier_key: userIdentifierKey,
114
+ })
115
+ return SeamHttpSeamCustomerV1SettingsVerticalResourceAliases.fromClientSessionToken(
116
+ token,
117
+ options,
118
+ )
119
+ }
120
+
121
+ static fromConsoleSessionToken(
122
+ consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
123
+ workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
124
+ options: Omit<
125
+ SeamHttpOptionsWithConsoleSessionToken,
126
+ 'consoleSessionToken' | 'workspaceId'
127
+ > = {},
128
+ ): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases {
129
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId }
130
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
131
+ throw new SeamHttpInvalidOptionsError(
132
+ 'Missing consoleSessionToken or workspaceId',
133
+ )
134
+ }
135
+ return new SeamHttpSeamCustomerV1SettingsVerticalResourceAliases(
136
+ constructorOptions,
137
+ )
138
+ }
139
+
140
+ static fromPersonalAccessToken(
141
+ personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
142
+ workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
143
+ options: Omit<
144
+ SeamHttpOptionsWithPersonalAccessToken,
145
+ 'personalAccessToken' | 'workspaceId'
146
+ > = {},
147
+ ): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases {
148
+ const constructorOptions = { ...options, personalAccessToken, workspaceId }
149
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
150
+ throw new SeamHttpInvalidOptionsError(
151
+ 'Missing personalAccessToken or workspaceId',
152
+ )
153
+ }
154
+ return new SeamHttpSeamCustomerV1SettingsVerticalResourceAliases(
155
+ constructorOptions,
156
+ )
157
+ }
158
+
159
+ createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
160
+ request: SeamHttpRequest<TResponse, TResponseKey>,
161
+ ): SeamPaginator<TResponse, TResponseKey> {
162
+ return new SeamPaginator<TResponse, TResponseKey>(this, request)
163
+ }
164
+
165
+ async updateClientSessionToken(
166
+ clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
167
+ ): Promise<void> {
168
+ const { headers } = this.client.defaults
169
+ const authHeaders = getAuthHeadersForClientSessionToken({
170
+ clientSessionToken,
171
+ })
172
+ for (const key of Object.keys(authHeaders)) {
173
+ if (headers[key] == null) {
174
+ throw new Error(
175
+ 'Cannot update a clientSessionToken on a client created without a clientSessionToken',
176
+ )
177
+ }
178
+ }
179
+ this.client.defaults.headers = { ...headers, ...authHeaders }
180
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client)
181
+ await clientSessions.get()
182
+ }
183
+
184
+ get(
185
+ parameters?: SeamCustomerV1SettingsVerticalResourceAliasesGetParameters,
186
+ options: SeamCustomerV1SettingsVerticalResourceAliasesGetOptions = {},
187
+ ): SeamCustomerV1SettingsVerticalResourceAliasesGetRequest {
188
+ if (!this.defaults.isUndocumentedApiEnabled) {
189
+ throw new Error(
190
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
191
+ )
192
+ }
193
+ return new SeamHttpRequest(this, {
194
+ pathname: '/seam/customer/v1/settings/vertical_resource_aliases/get',
195
+ method: 'POST',
196
+ body: parameters,
197
+ responseKey: 'vertical_resource_aliases',
198
+ options,
199
+ })
200
+ }
201
+ }
202
+
203
+ export type SeamCustomerV1SettingsVerticalResourceAliasesGetParameters =
204
+ RouteRequestBody<'/seam/customer/v1/settings/vertical_resource_aliases/get'>
205
+
206
+ /**
207
+ * @deprecated Use SeamCustomerV1SettingsVerticalResourceAliasesGetParameters instead.
208
+ */
209
+ export type SeamCustomerV1SettingsVerticalResourceAliasesGetParams =
210
+ SeamCustomerV1SettingsVerticalResourceAliasesGetParameters
211
+
212
+ /**
213
+ * @deprecated Use SeamCustomerV1SettingsVerticalResourceAliasesGetRequest instead.
214
+ */
215
+ export type SeamCustomerV1SettingsVerticalResourceAliasesGetResponse =
216
+ SetNonNullable<
217
+ Required<
218
+ RouteResponse<'/seam/customer/v1/settings/vertical_resource_aliases/get'>
219
+ >
220
+ >
221
+
222
+ export type SeamCustomerV1SettingsVerticalResourceAliasesGetRequest =
223
+ SeamHttpRequest<
224
+ SeamCustomerV1SettingsVerticalResourceAliasesGetResponse,
225
+ 'vertical_resource_aliases'
226
+ >
227
+
228
+ export interface SeamCustomerV1SettingsVerticalResourceAliasesGetOptions {}
@@ -44,11 +44,6 @@ export class SeamHttpSeamCustomerV1Spaces {
44
44
 
45
45
  constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
46
46
  const options = parseOptions(apiKeyOrOptions)
47
- if (!options.isUndocumentedApiEnabled) {
48
- throw new Error(
49
- 'Cannot use undocumented API without isUndocumentedApiEnabled',
50
- )
51
- }
52
47
  this.client = 'client' in options ? options.client : createClient(options)
53
48
  this.defaults = limitToSeamHttpRequestOptions(options)
54
49
  }
@@ -221,6 +216,19 @@ export class SeamHttpSeamCustomerV1Spaces {
221
216
  options,
222
217
  })
223
218
  }
219
+
220
+ pushCommonAreas(
221
+ parameters?: SeamCustomerV1SpacesPushCommonAreasParameters,
222
+ options: SeamCustomerV1SpacesPushCommonAreasOptions = {},
223
+ ): SeamCustomerV1SpacesPushCommonAreasRequest {
224
+ return new SeamHttpRequest(this, {
225
+ pathname: '/seam/customer/v1/spaces/push_common_areas',
226
+ method: 'POST',
227
+ body: parameters,
228
+ responseKey: undefined,
229
+ options,
230
+ })
231
+ }
224
232
  }
225
233
 
226
234
  export type SeamCustomerV1SpacesCreateParameters =
@@ -290,3 +298,26 @@ export type SeamCustomerV1SpacesListReservationsRequest = SeamHttpRequest<
290
298
  >
291
299
 
292
300
  export interface SeamCustomerV1SpacesListReservationsOptions {}
301
+
302
+ export type SeamCustomerV1SpacesPushCommonAreasParameters =
303
+ RouteRequestBody<'/seam/customer/v1/spaces/push_common_areas'>
304
+
305
+ /**
306
+ * @deprecated Use SeamCustomerV1SpacesPushCommonAreasParameters instead.
307
+ */
308
+ export type SeamCustomerV1SpacesPushCommonAreasBody =
309
+ SeamCustomerV1SpacesPushCommonAreasParameters
310
+
311
+ /**
312
+ * @deprecated Use SeamCustomerV1SpacesPushCommonAreasRequest instead.
313
+ */
314
+ export type SeamCustomerV1SpacesPushCommonAreasResponse = SetNonNullable<
315
+ Required<RouteResponse<'/seam/customer/v1/spaces/push_common_areas'>>
316
+ >
317
+
318
+ export type SeamCustomerV1SpacesPushCommonAreasRequest = SeamHttpRequest<
319
+ void,
320
+ undefined
321
+ >
322
+
323
+ export interface SeamCustomerV1SpacesPushCommonAreasOptions {}
@@ -34,11 +34,13 @@ import type { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
34
34
  import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
35
35
 
36
36
  import { SeamHttpSeamCustomerV1AccessGrants } from './access-grants/index.js'
37
+ import { SeamHttpSeamCustomerV1AccessMethods } from './access-methods/index.js'
37
38
  import { SeamHttpSeamCustomerV1AutomationRuns } from './automation-runs/index.js'
38
39
  import { SeamHttpSeamCustomerV1Automations } from './automations/index.js'
39
40
  import { SeamHttpSeamCustomerV1ConnectorCustomers } from './connector-customers/index.js'
40
41
  import { SeamHttpSeamCustomerV1Connectors } from './connectors/index.js'
41
42
  import { SeamHttpSeamCustomerV1Customers } from './customers/index.js'
43
+ import { SeamHttpSeamCustomerV1Encoders } from './encoders/index.js'
42
44
  import { SeamHttpSeamCustomerV1Events } from './events/index.js'
43
45
  import { SeamHttpSeamCustomerV1Portals } from './portals/index.js'
44
46
  import { SeamHttpSeamCustomerV1Reservations } from './reservations/index.js'
@@ -54,11 +56,6 @@ export class SeamHttpSeamCustomerV1 {
54
56
 
55
57
  constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
56
58
  const options = parseOptions(apiKeyOrOptions)
57
- if (!options.isUndocumentedApiEnabled) {
58
- throw new Error(
59
- 'Cannot use undocumented API without isUndocumentedApiEnabled',
60
- )
61
- }
62
59
  this.client = 'client' in options ? options.client : createClient(options)
63
60
  this.defaults = limitToSeamHttpRequestOptions(options)
64
61
  }
@@ -185,6 +182,13 @@ export class SeamHttpSeamCustomerV1 {
185
182
  )
186
183
  }
187
184
 
185
+ get accessMethods(): SeamHttpSeamCustomerV1AccessMethods {
186
+ return SeamHttpSeamCustomerV1AccessMethods.fromClient(
187
+ this.client,
188
+ this.defaults,
189
+ )
190
+ }
191
+
188
192
  get automationRuns(): SeamHttpSeamCustomerV1AutomationRuns {
189
193
  return SeamHttpSeamCustomerV1AutomationRuns.fromClient(
190
194
  this.client,
@@ -220,6 +224,10 @@ export class SeamHttpSeamCustomerV1 {
220
224
  )
221
225
  }
222
226
 
227
+ get encoders(): SeamHttpSeamCustomerV1Encoders {
228
+ return SeamHttpSeamCustomerV1Encoders.fromClient(this.client, this.defaults)
229
+ }
230
+
223
231
  get events(): SeamHttpSeamCustomerV1Events {
224
232
  return SeamHttpSeamCustomerV1Events.fromClient(this.client, this.defaults)
225
233
  }
@@ -6,4 +6,3 @@
6
6
  export * from './console/index.js'
7
7
  export * from './customer/index.js'
8
8
  export * from './partner/index.js'
9
- export * from './v1/index.js'