@seamapi/http 1.41.0 → 1.43.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.
Files changed (47) hide show
  1. package/dist/connect.cjs +332 -41
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +131 -143
  4. package/lib/seam/connect/resolve-action-attempt.d.ts +32 -168
  5. package/lib/seam/connect/routes/access-methods/access-methods.d.ts +12 -0
  6. package/lib/seam/connect/routes/access-methods/access-methods.js +9 -0
  7. package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -1
  8. package/lib/seam/connect/routes/acs/encoders/encoders.d.ts +0 -12
  9. package/lib/seam/connect/routes/acs/encoders/encoders.js +0 -9
  10. package/lib/seam/connect/routes/acs/encoders/encoders.js.map +1 -1
  11. package/lib/seam/connect/routes/locks/simulate/simulate.js +0 -9
  12. package/lib/seam/connect/routes/locks/simulate/simulate.js.map +1 -1
  13. package/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.d.ts +34 -0
  14. package/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.js +102 -0
  15. package/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.js.map +1 -0
  16. package/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.d.ts +1 -0
  17. package/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.js +6 -0
  18. package/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.js.map +1 -0
  19. package/lib/seam/connect/routes/seam/customer/v1/automations/automations.d.ts +60 -0
  20. package/lib/seam/connect/routes/seam/customer/v1/automations/automations.js +126 -0
  21. package/lib/seam/connect/routes/seam/customer/v1/automations/automations.js.map +1 -0
  22. package/lib/seam/connect/routes/seam/customer/v1/automations/index.d.ts +1 -0
  23. package/lib/seam/connect/routes/seam/customer/v1/automations/index.js +6 -0
  24. package/lib/seam/connect/routes/seam/customer/v1/automations/index.js.map +1 -0
  25. package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +2 -0
  26. package/lib/seam/connect/routes/seam/customer/v1/index.js +2 -0
  27. package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -1
  28. package/lib/seam/connect/routes/seam/customer/v1/v1.d.ts +4 -0
  29. package/lib/seam/connect/routes/seam/customer/v1/v1.js +8 -0
  30. package/lib/seam/connect/routes/seam/customer/v1/v1.js.map +1 -1
  31. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +12 -6
  32. package/lib/seam/connect/routes/seam-http-endpoints.js +49 -13
  33. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  34. package/lib/version.d.ts +1 -1
  35. package/lib/version.js +1 -1
  36. package/package.json +3 -3
  37. package/src/lib/seam/connect/routes/access-methods/access-methods.ts +38 -0
  38. package/src/lib/seam/connect/routes/acs/encoders/encoders.ts +0 -39
  39. package/src/lib/seam/connect/routes/locks/simulate/simulate.ts +0 -15
  40. package/src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts +215 -0
  41. package/src/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.ts +6 -0
  42. package/src/lib/seam/connect/routes/seam/customer/v1/automations/automations.ts +303 -0
  43. package/src/lib/seam/connect/routes/seam/customer/v1/automations/index.ts +6 -0
  44. package/src/lib/seam/connect/routes/seam/customer/v1/index.ts +2 -0
  45. package/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +16 -0
  46. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +128 -31
  47. package/src/lib/version.ts +1 -1
@@ -0,0 +1,215 @@
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 SeamHttpSeamCustomerV1AutomationRuns {
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
+ ): SeamHttpSeamCustomerV1AutomationRuns {
60
+ const constructorOptions = { ...options, client }
61
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
62
+ throw new SeamHttpInvalidOptionsError('Missing client')
63
+ }
64
+ return new SeamHttpSeamCustomerV1AutomationRuns(constructorOptions)
65
+ }
66
+
67
+ static fromApiKey(
68
+ apiKey: SeamHttpOptionsWithApiKey['apiKey'],
69
+ options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
70
+ ): SeamHttpSeamCustomerV1AutomationRuns {
71
+ const constructorOptions = { ...options, apiKey }
72
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
73
+ throw new SeamHttpInvalidOptionsError('Missing apiKey')
74
+ }
75
+ return new SeamHttpSeamCustomerV1AutomationRuns(constructorOptions)
76
+ }
77
+
78
+ static fromClientSessionToken(
79
+ clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
80
+ options: Omit<
81
+ SeamHttpOptionsWithClientSessionToken,
82
+ 'clientSessionToken'
83
+ > = {},
84
+ ): SeamHttpSeamCustomerV1AutomationRuns {
85
+ const constructorOptions = { ...options, clientSessionToken }
86
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
87
+ throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
88
+ }
89
+ return new SeamHttpSeamCustomerV1AutomationRuns(constructorOptions)
90
+ }
91
+
92
+ static async fromPublishableKey(
93
+ publishableKey: string,
94
+ userIdentifierKey: string,
95
+ options: SeamHttpFromPublishableKeyOptions = {},
96
+ ): Promise<SeamHttpSeamCustomerV1AutomationRuns> {
97
+ warnOnInsecureuserIdentifierKey(userIdentifierKey)
98
+ const clientOptions = parseOptions({ ...options, publishableKey })
99
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
100
+ throw new SeamHttpInvalidOptionsError(
101
+ 'The client option cannot be used with SeamHttpSeamCustomerV1AutomationRuns.fromPublishableKey',
102
+ )
103
+ }
104
+ const client = createClient(clientOptions)
105
+ const clientSessions = SeamHttpClientSessions.fromClient(client)
106
+ const { token } = await clientSessions.getOrCreate({
107
+ user_identifier_key: userIdentifierKey,
108
+ })
109
+ return SeamHttpSeamCustomerV1AutomationRuns.fromClientSessionToken(
110
+ token,
111
+ options,
112
+ )
113
+ }
114
+
115
+ static fromConsoleSessionToken(
116
+ consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
117
+ workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
118
+ options: Omit<
119
+ SeamHttpOptionsWithConsoleSessionToken,
120
+ 'consoleSessionToken' | 'workspaceId'
121
+ > = {},
122
+ ): SeamHttpSeamCustomerV1AutomationRuns {
123
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId }
124
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
125
+ throw new SeamHttpInvalidOptionsError(
126
+ 'Missing consoleSessionToken or workspaceId',
127
+ )
128
+ }
129
+ return new SeamHttpSeamCustomerV1AutomationRuns(constructorOptions)
130
+ }
131
+
132
+ static fromPersonalAccessToken(
133
+ personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
134
+ workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
135
+ options: Omit<
136
+ SeamHttpOptionsWithPersonalAccessToken,
137
+ 'personalAccessToken' | 'workspaceId'
138
+ > = {},
139
+ ): SeamHttpSeamCustomerV1AutomationRuns {
140
+ const constructorOptions = { ...options, personalAccessToken, workspaceId }
141
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
142
+ throw new SeamHttpInvalidOptionsError(
143
+ 'Missing personalAccessToken or workspaceId',
144
+ )
145
+ }
146
+ return new SeamHttpSeamCustomerV1AutomationRuns(constructorOptions)
147
+ }
148
+
149
+ createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
150
+ request: SeamHttpRequest<TResponse, TResponseKey>,
151
+ ): SeamPaginator<TResponse, TResponseKey> {
152
+ return new SeamPaginator<TResponse, TResponseKey>(this, request)
153
+ }
154
+
155
+ async updateClientSessionToken(
156
+ clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
157
+ ): Promise<void> {
158
+ const { headers } = this.client.defaults
159
+ const authHeaders = getAuthHeadersForClientSessionToken({
160
+ clientSessionToken,
161
+ })
162
+ for (const key of Object.keys(authHeaders)) {
163
+ if (headers[key] == null) {
164
+ throw new Error(
165
+ 'Cannot update a clientSessionToken on a client created without a clientSessionToken',
166
+ )
167
+ }
168
+ }
169
+ this.client.defaults.headers = { ...headers, ...authHeaders }
170
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client)
171
+ await clientSessions.get()
172
+ }
173
+
174
+ list(
175
+ parameters?: SeamCustomerV1AutomationRunsListParameters,
176
+ options: SeamCustomerV1AutomationRunsListOptions = {},
177
+ ): SeamCustomerV1AutomationRunsListRequest {
178
+ if (!this.defaults.isUndocumentedApiEnabled) {
179
+ throw new Error(
180
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
181
+ )
182
+ }
183
+ return new SeamHttpRequest(this, {
184
+ pathname: '/seam/customer/v1/automation_runs/list',
185
+ method: 'POST',
186
+ body: parameters,
187
+ responseKey: 'automation_runs',
188
+ options,
189
+ })
190
+ }
191
+ }
192
+
193
+ export type SeamCustomerV1AutomationRunsListParameters =
194
+ RouteRequestBody<'/seam/customer/v1/automation_runs/list'>
195
+
196
+ /**
197
+ * @deprecated Use SeamCustomerV1AutomationRunsListParameters instead.
198
+ */
199
+ export type SeamCustomerV1AutomationRunsListParams =
200
+ SeamCustomerV1AutomationRunsListParameters
201
+
202
+ /**
203
+ * @deprecated Use SeamCustomerV1AutomationRunsListRequest instead.
204
+ */
205
+ export type SeamCustomerV1AutomationRunsListResponse = SetNonNullable<
206
+ Required<RouteResponse<'/seam/customer/v1/automation_runs/list'>>
207
+ >
208
+
209
+ export type SeamCustomerV1AutomationRunsListRequest = SeamHttpRequest<
210
+ SeamCustomerV1AutomationRunsListResponse,
211
+ 'automation_runs'
212
+ >
213
+
214
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
215
+ export interface SeamCustomerV1AutomationRunsListOptions {}
@@ -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 './automation-runs.js'
@@ -0,0 +1,303 @@
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 {
7
+ RouteRequestBody,
8
+ RouteRequestParams,
9
+ RouteResponse,
10
+ } from '@seamapi/types/connect'
11
+
12
+ import { seamApiLtsVersion } from 'lib/lts-version.js'
13
+ import {
14
+ getAuthHeadersForClientSessionToken,
15
+ warnOnInsecureuserIdentifierKey,
16
+ } from 'lib/seam/connect/auth.js'
17
+ import { type Client, createClient } from 'lib/seam/connect/client.js'
18
+ import {
19
+ isSeamHttpOptionsWithApiKey,
20
+ isSeamHttpOptionsWithClient,
21
+ isSeamHttpOptionsWithClientSessionToken,
22
+ isSeamHttpOptionsWithConsoleSessionToken,
23
+ isSeamHttpOptionsWithPersonalAccessToken,
24
+ type SeamHttpFromPublishableKeyOptions,
25
+ SeamHttpInvalidOptionsError,
26
+ type SeamHttpOptions,
27
+ type SeamHttpOptionsWithApiKey,
28
+ type SeamHttpOptionsWithClient,
29
+ type SeamHttpOptionsWithClientSessionToken,
30
+ type SeamHttpOptionsWithConsoleSessionToken,
31
+ type SeamHttpOptionsWithPersonalAccessToken,
32
+ type SeamHttpRequestOptions,
33
+ } from 'lib/seam/connect/options.js'
34
+ import {
35
+ limitToSeamHttpRequestOptions,
36
+ parseOptions,
37
+ } from 'lib/seam/connect/parse-options.js'
38
+ import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
39
+ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
40
+ import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
41
+ import type { SetNonNullable } from 'lib/types.js'
42
+
43
+ export class SeamHttpSeamCustomerV1Automations {
44
+ client: Client
45
+ readonly defaults: Required<SeamHttpRequestOptions>
46
+ readonly ltsVersion = seamApiLtsVersion
47
+ static ltsVersion = seamApiLtsVersion
48
+
49
+ constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
50
+ const options = parseOptions(apiKeyOrOptions)
51
+ if (!options.isUndocumentedApiEnabled) {
52
+ throw new Error(
53
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
54
+ )
55
+ }
56
+ this.client = 'client' in options ? options.client : createClient(options)
57
+ this.defaults = limitToSeamHttpRequestOptions(options)
58
+ }
59
+
60
+ static fromClient(
61
+ client: SeamHttpOptionsWithClient['client'],
62
+ options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
63
+ ): SeamHttpSeamCustomerV1Automations {
64
+ const constructorOptions = { ...options, client }
65
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
66
+ throw new SeamHttpInvalidOptionsError('Missing client')
67
+ }
68
+ return new SeamHttpSeamCustomerV1Automations(constructorOptions)
69
+ }
70
+
71
+ static fromApiKey(
72
+ apiKey: SeamHttpOptionsWithApiKey['apiKey'],
73
+ options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
74
+ ): SeamHttpSeamCustomerV1Automations {
75
+ const constructorOptions = { ...options, apiKey }
76
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
77
+ throw new SeamHttpInvalidOptionsError('Missing apiKey')
78
+ }
79
+ return new SeamHttpSeamCustomerV1Automations(constructorOptions)
80
+ }
81
+
82
+ static fromClientSessionToken(
83
+ clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
84
+ options: Omit<
85
+ SeamHttpOptionsWithClientSessionToken,
86
+ 'clientSessionToken'
87
+ > = {},
88
+ ): SeamHttpSeamCustomerV1Automations {
89
+ const constructorOptions = { ...options, clientSessionToken }
90
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
91
+ throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
92
+ }
93
+ return new SeamHttpSeamCustomerV1Automations(constructorOptions)
94
+ }
95
+
96
+ static async fromPublishableKey(
97
+ publishableKey: string,
98
+ userIdentifierKey: string,
99
+ options: SeamHttpFromPublishableKeyOptions = {},
100
+ ): Promise<SeamHttpSeamCustomerV1Automations> {
101
+ warnOnInsecureuserIdentifierKey(userIdentifierKey)
102
+ const clientOptions = parseOptions({ ...options, publishableKey })
103
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
104
+ throw new SeamHttpInvalidOptionsError(
105
+ 'The client option cannot be used with SeamHttpSeamCustomerV1Automations.fromPublishableKey',
106
+ )
107
+ }
108
+ const client = createClient(clientOptions)
109
+ const clientSessions = SeamHttpClientSessions.fromClient(client)
110
+ const { token } = await clientSessions.getOrCreate({
111
+ user_identifier_key: userIdentifierKey,
112
+ })
113
+ return SeamHttpSeamCustomerV1Automations.fromClientSessionToken(
114
+ token,
115
+ options,
116
+ )
117
+ }
118
+
119
+ static fromConsoleSessionToken(
120
+ consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
121
+ workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
122
+ options: Omit<
123
+ SeamHttpOptionsWithConsoleSessionToken,
124
+ 'consoleSessionToken' | 'workspaceId'
125
+ > = {},
126
+ ): SeamHttpSeamCustomerV1Automations {
127
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId }
128
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
129
+ throw new SeamHttpInvalidOptionsError(
130
+ 'Missing consoleSessionToken or workspaceId',
131
+ )
132
+ }
133
+ return new SeamHttpSeamCustomerV1Automations(constructorOptions)
134
+ }
135
+
136
+ static fromPersonalAccessToken(
137
+ personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
138
+ workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
139
+ options: Omit<
140
+ SeamHttpOptionsWithPersonalAccessToken,
141
+ 'personalAccessToken' | 'workspaceId'
142
+ > = {},
143
+ ): SeamHttpSeamCustomerV1Automations {
144
+ const constructorOptions = { ...options, personalAccessToken, workspaceId }
145
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
146
+ throw new SeamHttpInvalidOptionsError(
147
+ 'Missing personalAccessToken or workspaceId',
148
+ )
149
+ }
150
+ return new SeamHttpSeamCustomerV1Automations(constructorOptions)
151
+ }
152
+
153
+ createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
154
+ request: SeamHttpRequest<TResponse, TResponseKey>,
155
+ ): SeamPaginator<TResponse, TResponseKey> {
156
+ return new SeamPaginator<TResponse, TResponseKey>(this, request)
157
+ }
158
+
159
+ async updateClientSessionToken(
160
+ clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
161
+ ): Promise<void> {
162
+ const { headers } = this.client.defaults
163
+ const authHeaders = getAuthHeadersForClientSessionToken({
164
+ clientSessionToken,
165
+ })
166
+ for (const key of Object.keys(authHeaders)) {
167
+ if (headers[key] == null) {
168
+ throw new Error(
169
+ 'Cannot update a clientSessionToken on a client created without a clientSessionToken',
170
+ )
171
+ }
172
+ }
173
+ this.client.defaults.headers = { ...headers, ...authHeaders }
174
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client)
175
+ await clientSessions.get()
176
+ }
177
+
178
+ delete(
179
+ parameters?: SeamCustomerV1AutomationsDeleteParameters,
180
+ options: SeamCustomerV1AutomationsDeleteOptions = {},
181
+ ): SeamCustomerV1AutomationsDeleteRequest {
182
+ if (!this.defaults.isUndocumentedApiEnabled) {
183
+ throw new Error(
184
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
185
+ )
186
+ }
187
+ return new SeamHttpRequest(this, {
188
+ pathname: '/seam/customer/v1/automations/delete',
189
+ method: 'POST',
190
+ body: parameters,
191
+ responseKey: undefined,
192
+ options,
193
+ })
194
+ }
195
+
196
+ get(
197
+ parameters?: SeamCustomerV1AutomationsGetParameters,
198
+ options: SeamCustomerV1AutomationsGetOptions = {},
199
+ ): SeamCustomerV1AutomationsGetRequest {
200
+ if (!this.defaults.isUndocumentedApiEnabled) {
201
+ throw new Error(
202
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
203
+ )
204
+ }
205
+ return new SeamHttpRequest(this, {
206
+ pathname: '/seam/customer/v1/automations/get',
207
+ method: 'GET',
208
+ params: parameters,
209
+ responseKey: undefined,
210
+ options,
211
+ })
212
+ }
213
+
214
+ update(
215
+ parameters?: SeamCustomerV1AutomationsUpdateParameters,
216
+ options: SeamCustomerV1AutomationsUpdateOptions = {},
217
+ ): SeamCustomerV1AutomationsUpdateRequest {
218
+ if (!this.defaults.isUndocumentedApiEnabled) {
219
+ throw new Error(
220
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
221
+ )
222
+ }
223
+ return new SeamHttpRequest(this, {
224
+ pathname: '/seam/customer/v1/automations/update',
225
+ method: 'PATCH',
226
+ body: parameters,
227
+ responseKey: undefined,
228
+ options,
229
+ })
230
+ }
231
+ }
232
+
233
+ export type SeamCustomerV1AutomationsDeleteParameters =
234
+ RouteRequestBody<'/seam/customer/v1/automations/delete'>
235
+
236
+ /**
237
+ * @deprecated Use SeamCustomerV1AutomationsDeleteParameters instead.
238
+ */
239
+ export type SeamCustomerV1AutomationsDeleteParams =
240
+ SeamCustomerV1AutomationsDeleteParameters
241
+
242
+ /**
243
+ * @deprecated Use SeamCustomerV1AutomationsDeleteRequest instead.
244
+ */
245
+ export type SeamCustomerV1AutomationsDeleteResponse = SetNonNullable<
246
+ Required<RouteResponse<'/seam/customer/v1/automations/delete'>>
247
+ >
248
+
249
+ export type SeamCustomerV1AutomationsDeleteRequest = SeamHttpRequest<
250
+ void,
251
+ undefined
252
+ >
253
+
254
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
255
+ export interface SeamCustomerV1AutomationsDeleteOptions {}
256
+
257
+ export type SeamCustomerV1AutomationsGetParameters =
258
+ RouteRequestParams<'/seam/customer/v1/automations/get'>
259
+
260
+ /**
261
+ * @deprecated Use SeamCustomerV1AutomationsGetParameters instead.
262
+ */
263
+ export type SeamCustomerV1AutomationsGetParams =
264
+ SeamCustomerV1AutomationsGetParameters
265
+
266
+ /**
267
+ * @deprecated Use SeamCustomerV1AutomationsGetRequest instead.
268
+ */
269
+ export type SeamCustomerV1AutomationsGetResponse = SetNonNullable<
270
+ Required<RouteResponse<'/seam/customer/v1/automations/get'>>
271
+ >
272
+
273
+ export type SeamCustomerV1AutomationsGetRequest = SeamHttpRequest<
274
+ void,
275
+ undefined
276
+ >
277
+
278
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
279
+ export interface SeamCustomerV1AutomationsGetOptions {}
280
+
281
+ export type SeamCustomerV1AutomationsUpdateParameters =
282
+ RouteRequestBody<'/seam/customer/v1/automations/update'>
283
+
284
+ /**
285
+ * @deprecated Use SeamCustomerV1AutomationsUpdateParameters instead.
286
+ */
287
+ export type SeamCustomerV1AutomationsUpdateBody =
288
+ SeamCustomerV1AutomationsUpdateParameters
289
+
290
+ /**
291
+ * @deprecated Use SeamCustomerV1AutomationsUpdateRequest instead.
292
+ */
293
+ export type SeamCustomerV1AutomationsUpdateResponse = SetNonNullable<
294
+ Required<RouteResponse<'/seam/customer/v1/automations/update'>>
295
+ >
296
+
297
+ export type SeamCustomerV1AutomationsUpdateRequest = SeamHttpRequest<
298
+ void,
299
+ undefined
300
+ >
301
+
302
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
303
+ export interface SeamCustomerV1AutomationsUpdateOptions {}
@@ -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 './automations.js'
@@ -3,6 +3,8 @@
3
3
  * Do not edit this file or add other files to this directory.
4
4
  */
5
5
 
6
+ export * from './automation-runs/index.js'
7
+ export * from './automations/index.js'
6
8
  export * from './portals/index.js'
7
9
  export * from './settings/index.js'
8
10
  export * from './v1.js'
@@ -33,6 +33,8 @@ import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/
33
33
  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
+ import { SeamHttpSeamCustomerV1AutomationRuns } from './automation-runs/index.js'
37
+ import { SeamHttpSeamCustomerV1Automations } from './automations/index.js'
36
38
  import { SeamHttpSeamCustomerV1Portals } from './portals/index.js'
37
39
  import { SeamHttpSeamCustomerV1Settings } from './settings/index.js'
38
40
 
@@ -168,6 +170,20 @@ export class SeamHttpSeamCustomerV1 {
168
170
  await clientSessions.get()
169
171
  }
170
172
 
173
+ get automationRuns(): SeamHttpSeamCustomerV1AutomationRuns {
174
+ return SeamHttpSeamCustomerV1AutomationRuns.fromClient(
175
+ this.client,
176
+ this.defaults,
177
+ )
178
+ }
179
+
180
+ get automations(): SeamHttpSeamCustomerV1Automations {
181
+ return SeamHttpSeamCustomerV1Automations.fromClient(
182
+ this.client,
183
+ this.defaults,
184
+ )
185
+ }
186
+
171
187
  get portals(): SeamHttpSeamCustomerV1Portals {
172
188
  return SeamHttpSeamCustomerV1Portals.fromClient(this.client, this.defaults)
173
189
  }