@seamapi/http 1.48.0 → 1.50.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.
- package/dist/connect.cjs +253 -146
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +92 -62
- package/dist/index.cjs +257 -148
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/resolve-action-attempt.d.ts +20 -20
- package/lib/seam/connect/routes/access-methods/access-methods.d.ts +13 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js +9 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -1
- package/lib/seam/connect/routes/index.d.ts +0 -1
- package/lib/seam/connect/routes/index.js +0 -1
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/seam/console/console.d.ts +21 -0
- package/lib/seam/connect/routes/seam/console/console.js +93 -0
- package/lib/seam/connect/routes/seam/console/console.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/index.d.ts +2 -0
- package/lib/seam/connect/routes/seam/console/index.js +7 -0
- package/lib/seam/connect/routes/seam/console/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/v1/index.d.ts +1 -0
- package/lib/seam/connect/routes/{networks → seam/console/v1}/index.js +1 -1
- package/lib/seam/connect/routes/seam/console/v1/index.js.map +1 -0
- package/lib/seam/connect/routes/{networks/networks.d.ts → seam/console/v1/v1.d.ts} +21 -34
- package/lib/seam/connect/routes/{networks/networks.js → seam/console/v1/v1.js} +23 -35
- package/lib/seam/connect/routes/seam/console/v1/v1.js.map +1 -0
- package/lib/seam/connect/routes/seam/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/index.js +1 -0
- package/lib/seam/connect/routes/seam/index.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +7 -6
- package/lib/seam/connect/routes/seam-http-endpoints.js +28 -21
- package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
- package/lib/seam/connect/routes/seam-http.d.ts +0 -2
- package/lib/seam/connect/routes/seam-http.js +0 -4
- package/lib/seam/connect/routes/seam-http.js.map +1 -1
- package/lib/seam/connect/routes/workspaces/workspaces.d.ts +13 -0
- package/lib/seam/connect/routes/workspaces/workspaces.js +12 -0
- package/lib/seam/connect/routes/workspaces/workspaces.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/lib/seam/connect/routes/access-methods/access-methods.ts +36 -0
- package/src/lib/seam/connect/routes/index.ts +0 -1
- package/src/lib/seam/connect/routes/seam/console/console.ts +173 -0
- package/src/lib/seam/connect/routes/seam/console/index.ts +7 -0
- package/src/lib/seam/connect/routes/{networks → seam/console/v1}/index.ts +1 -1
- package/src/lib/seam/connect/routes/{networks/networks.ts → seam/console/v1/v1.ts} +35 -70
- package/src/lib/seam/connect/routes/seam/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +64 -47
- package/src/lib/seam/connect/routes/seam-http.ts +0 -5
- package/src/lib/seam/connect/routes/workspaces/workspaces.ts +41 -0
- package/src/lib/version.ts +1 -1
- package/lib/seam/connect/routes/networks/index.d.ts +0 -1
- package/lib/seam/connect/routes/networks/index.js.map +0 -1
- package/lib/seam/connect/routes/networks/networks.js.map +0 -1
|
@@ -0,0 +1,173 @@
|
|
|
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 { seamApiLtsVersion } from 'lib/lts-version.js'
|
|
7
|
+
import {
|
|
8
|
+
getAuthHeadersForClientSessionToken,
|
|
9
|
+
warnOnInsecureuserIdentifierKey,
|
|
10
|
+
} from 'lib/seam/connect/auth.js'
|
|
11
|
+
import { type Client, createClient } from 'lib/seam/connect/client.js'
|
|
12
|
+
import {
|
|
13
|
+
isSeamHttpOptionsWithApiKey,
|
|
14
|
+
isSeamHttpOptionsWithClient,
|
|
15
|
+
isSeamHttpOptionsWithClientSessionToken,
|
|
16
|
+
isSeamHttpOptionsWithConsoleSessionToken,
|
|
17
|
+
isSeamHttpOptionsWithPersonalAccessToken,
|
|
18
|
+
type SeamHttpFromPublishableKeyOptions,
|
|
19
|
+
SeamHttpInvalidOptionsError,
|
|
20
|
+
type SeamHttpOptions,
|
|
21
|
+
type SeamHttpOptionsWithApiKey,
|
|
22
|
+
type SeamHttpOptionsWithClient,
|
|
23
|
+
type SeamHttpOptionsWithClientSessionToken,
|
|
24
|
+
type SeamHttpOptionsWithConsoleSessionToken,
|
|
25
|
+
type SeamHttpOptionsWithPersonalAccessToken,
|
|
26
|
+
type SeamHttpRequestOptions,
|
|
27
|
+
} from 'lib/seam/connect/options.js'
|
|
28
|
+
import {
|
|
29
|
+
limitToSeamHttpRequestOptions,
|
|
30
|
+
parseOptions,
|
|
31
|
+
} from 'lib/seam/connect/parse-options.js'
|
|
32
|
+
import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
|
|
33
|
+
import type { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
35
|
+
|
|
36
|
+
import { SeamHttpSeamConsoleV1 } from './v1/index.js'
|
|
37
|
+
|
|
38
|
+
export class SeamHttpSeamConsole {
|
|
39
|
+
client: Client
|
|
40
|
+
readonly defaults: Required<SeamHttpRequestOptions>
|
|
41
|
+
readonly ltsVersion = seamApiLtsVersion
|
|
42
|
+
static ltsVersion = seamApiLtsVersion
|
|
43
|
+
|
|
44
|
+
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
45
|
+
const options = parseOptions(apiKeyOrOptions)
|
|
46
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
this.client = 'client' in options ? options.client : createClient(options)
|
|
52
|
+
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static fromClient(
|
|
56
|
+
client: SeamHttpOptionsWithClient['client'],
|
|
57
|
+
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
58
|
+
): SeamHttpSeamConsole {
|
|
59
|
+
const constructorOptions = { ...options, client }
|
|
60
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
61
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
62
|
+
}
|
|
63
|
+
return new SeamHttpSeamConsole(constructorOptions)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static fromApiKey(
|
|
67
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
68
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
69
|
+
): SeamHttpSeamConsole {
|
|
70
|
+
const constructorOptions = { ...options, apiKey }
|
|
71
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
72
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
73
|
+
}
|
|
74
|
+
return new SeamHttpSeamConsole(constructorOptions)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
static fromClientSessionToken(
|
|
78
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
79
|
+
options: Omit<
|
|
80
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
81
|
+
'clientSessionToken'
|
|
82
|
+
> = {},
|
|
83
|
+
): SeamHttpSeamConsole {
|
|
84
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
85
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
86
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
87
|
+
}
|
|
88
|
+
return new SeamHttpSeamConsole(constructorOptions)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
static async fromPublishableKey(
|
|
92
|
+
publishableKey: string,
|
|
93
|
+
userIdentifierKey: string,
|
|
94
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
95
|
+
): Promise<SeamHttpSeamConsole> {
|
|
96
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
97
|
+
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
98
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
99
|
+
throw new SeamHttpInvalidOptionsError(
|
|
100
|
+
'The client option cannot be used with SeamHttpSeamConsole.fromPublishableKey',
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
const client = createClient(clientOptions)
|
|
104
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client)
|
|
105
|
+
const { token } = await clientSessions.getOrCreate({
|
|
106
|
+
user_identifier_key: userIdentifierKey,
|
|
107
|
+
})
|
|
108
|
+
return SeamHttpSeamConsole.fromClientSessionToken(token, options)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
static fromConsoleSessionToken(
|
|
112
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
113
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
114
|
+
options: Omit<
|
|
115
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
116
|
+
'consoleSessionToken' | 'workspaceId'
|
|
117
|
+
> = {},
|
|
118
|
+
): SeamHttpSeamConsole {
|
|
119
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
120
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
121
|
+
throw new SeamHttpInvalidOptionsError(
|
|
122
|
+
'Missing consoleSessionToken or workspaceId',
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
return new SeamHttpSeamConsole(constructorOptions)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
static fromPersonalAccessToken(
|
|
129
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
130
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
131
|
+
options: Omit<
|
|
132
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
133
|
+
'personalAccessToken' | 'workspaceId'
|
|
134
|
+
> = {},
|
|
135
|
+
): SeamHttpSeamConsole {
|
|
136
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
137
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
138
|
+
throw new SeamHttpInvalidOptionsError(
|
|
139
|
+
'Missing personalAccessToken or workspaceId',
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
return new SeamHttpSeamConsole(constructorOptions)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
146
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
147
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
148
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
async updateClientSessionToken(
|
|
152
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
153
|
+
): Promise<void> {
|
|
154
|
+
const { headers } = this.client.defaults
|
|
155
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
156
|
+
clientSessionToken,
|
|
157
|
+
})
|
|
158
|
+
for (const key of Object.keys(authHeaders)) {
|
|
159
|
+
if (headers[key] == null) {
|
|
160
|
+
throw new Error(
|
|
161
|
+
'Cannot update a clientSessionToken on a client created without a clientSessionToken',
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
this.client.defaults.headers = { ...headers, ...authHeaders }
|
|
166
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client)
|
|
167
|
+
await clientSessions.get()
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
get v1(): SeamHttpSeamConsoleV1 {
|
|
171
|
+
return SeamHttpSeamConsoleV1.fromClient(this.client, this.defaults)
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Do not edit this file or add other files to this directory.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type { RouteRequestParams, RouteResponse } from '@seamapi/types/connect'
|
|
7
7
|
|
|
8
8
|
import { seamApiLtsVersion } from 'lib/lts-version.js'
|
|
9
9
|
import {
|
|
@@ -36,7 +36,7 @@ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
|
36
36
|
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
37
37
|
import type { SetNonNullable } from 'lib/types.js'
|
|
38
38
|
|
|
39
|
-
export class
|
|
39
|
+
export class SeamHttpSeamConsoleV1 {
|
|
40
40
|
client: Client
|
|
41
41
|
readonly defaults: Required<SeamHttpRequestOptions>
|
|
42
42
|
readonly ltsVersion = seamApiLtsVersion
|
|
@@ -56,23 +56,23 @@ export class SeamHttpNetworks {
|
|
|
56
56
|
static fromClient(
|
|
57
57
|
client: SeamHttpOptionsWithClient['client'],
|
|
58
58
|
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
59
|
-
):
|
|
59
|
+
): SeamHttpSeamConsoleV1 {
|
|
60
60
|
const constructorOptions = { ...options, client }
|
|
61
61
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
62
62
|
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
63
63
|
}
|
|
64
|
-
return new
|
|
64
|
+
return new SeamHttpSeamConsoleV1(constructorOptions)
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
static fromApiKey(
|
|
68
68
|
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
69
69
|
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
70
|
-
):
|
|
70
|
+
): SeamHttpSeamConsoleV1 {
|
|
71
71
|
const constructorOptions = { ...options, apiKey }
|
|
72
72
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
73
73
|
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
74
74
|
}
|
|
75
|
-
return new
|
|
75
|
+
return new SeamHttpSeamConsoleV1(constructorOptions)
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
static fromClientSessionToken(
|
|
@@ -81,24 +81,24 @@ export class SeamHttpNetworks {
|
|
|
81
81
|
SeamHttpOptionsWithClientSessionToken,
|
|
82
82
|
'clientSessionToken'
|
|
83
83
|
> = {},
|
|
84
|
-
):
|
|
84
|
+
): SeamHttpSeamConsoleV1 {
|
|
85
85
|
const constructorOptions = { ...options, clientSessionToken }
|
|
86
86
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
87
87
|
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
88
88
|
}
|
|
89
|
-
return new
|
|
89
|
+
return new SeamHttpSeamConsoleV1(constructorOptions)
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
static async fromPublishableKey(
|
|
93
93
|
publishableKey: string,
|
|
94
94
|
userIdentifierKey: string,
|
|
95
95
|
options: SeamHttpFromPublishableKeyOptions = {},
|
|
96
|
-
): Promise<
|
|
96
|
+
): Promise<SeamHttpSeamConsoleV1> {
|
|
97
97
|
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
98
98
|
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
99
99
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
100
100
|
throw new SeamHttpInvalidOptionsError(
|
|
101
|
-
'The client option cannot be used with
|
|
101
|
+
'The client option cannot be used with SeamHttpSeamConsoleV1.fromPublishableKey',
|
|
102
102
|
)
|
|
103
103
|
}
|
|
104
104
|
const client = createClient(clientOptions)
|
|
@@ -106,7 +106,7 @@ export class SeamHttpNetworks {
|
|
|
106
106
|
const { token } = await clientSessions.getOrCreate({
|
|
107
107
|
user_identifier_key: userIdentifierKey,
|
|
108
108
|
})
|
|
109
|
-
return
|
|
109
|
+
return SeamHttpSeamConsoleV1.fromClientSessionToken(token, options)
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
static fromConsoleSessionToken(
|
|
@@ -116,14 +116,14 @@ export class SeamHttpNetworks {
|
|
|
116
116
|
SeamHttpOptionsWithConsoleSessionToken,
|
|
117
117
|
'consoleSessionToken' | 'workspaceId'
|
|
118
118
|
> = {},
|
|
119
|
-
):
|
|
119
|
+
): SeamHttpSeamConsoleV1 {
|
|
120
120
|
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
121
121
|
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
122
122
|
throw new SeamHttpInvalidOptionsError(
|
|
123
123
|
'Missing consoleSessionToken or workspaceId',
|
|
124
124
|
)
|
|
125
125
|
}
|
|
126
|
-
return new
|
|
126
|
+
return new SeamHttpSeamConsoleV1(constructorOptions)
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
static fromPersonalAccessToken(
|
|
@@ -133,14 +133,14 @@ export class SeamHttpNetworks {
|
|
|
133
133
|
SeamHttpOptionsWithPersonalAccessToken,
|
|
134
134
|
'personalAccessToken' | 'workspaceId'
|
|
135
135
|
> = {},
|
|
136
|
-
):
|
|
136
|
+
): SeamHttpSeamConsoleV1 {
|
|
137
137
|
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
138
138
|
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
139
139
|
throw new SeamHttpInvalidOptionsError(
|
|
140
140
|
'Missing personalAccessToken or workspaceId',
|
|
141
141
|
)
|
|
142
142
|
}
|
|
143
|
-
return new
|
|
143
|
+
return new SeamHttpSeamConsoleV1(constructorOptions)
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
@@ -168,80 +168,45 @@ export class SeamHttpNetworks {
|
|
|
168
168
|
await clientSessions.get()
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
|
|
172
|
-
parameters?:
|
|
173
|
-
options:
|
|
174
|
-
):
|
|
171
|
+
getResourceType(
|
|
172
|
+
parameters?: SeamConsoleV1GetResourceTypeParameters,
|
|
173
|
+
options: SeamConsoleV1GetResourceTypeOptions = {},
|
|
174
|
+
): SeamConsoleV1GetResourceTypeRequest {
|
|
175
175
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
176
176
|
throw new Error(
|
|
177
177
|
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
178
178
|
)
|
|
179
179
|
}
|
|
180
180
|
return new SeamHttpRequest(this, {
|
|
181
|
-
pathname: '/
|
|
182
|
-
method: '
|
|
183
|
-
|
|
184
|
-
responseKey: '
|
|
185
|
-
options,
|
|
186
|
-
})
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
list(
|
|
190
|
-
parameters?: NetworksListParameters,
|
|
191
|
-
options: NetworksListOptions = {},
|
|
192
|
-
): NetworksListRequest {
|
|
193
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
194
|
-
throw new Error(
|
|
195
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
196
|
-
)
|
|
197
|
-
}
|
|
198
|
-
return new SeamHttpRequest(this, {
|
|
199
|
-
pathname: '/networks/list',
|
|
200
|
-
method: 'POST',
|
|
201
|
-
body: parameters,
|
|
202
|
-
responseKey: 'networks',
|
|
181
|
+
pathname: '/seam/console/v1/get_resource_type',
|
|
182
|
+
method: 'GET',
|
|
183
|
+
params: parameters,
|
|
184
|
+
responseKey: 'resource_type',
|
|
203
185
|
options,
|
|
204
186
|
})
|
|
205
187
|
}
|
|
206
188
|
}
|
|
207
189
|
|
|
208
|
-
export type
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* @deprecated Use NetworksGetParameters instead.
|
|
212
|
-
*/
|
|
213
|
-
export type NetworksGetParams = NetworksGetParameters
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* @deprecated Use NetworksGetRequest instead.
|
|
217
|
-
*/
|
|
218
|
-
export type NetworksGetResponse = SetNonNullable<
|
|
219
|
-
Required<RouteResponse<'/networks/get'>>
|
|
220
|
-
>
|
|
221
|
-
|
|
222
|
-
export type NetworksGetRequest = SeamHttpRequest<NetworksGetResponse, 'network'>
|
|
223
|
-
|
|
224
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
225
|
-
export interface NetworksGetOptions {}
|
|
226
|
-
|
|
227
|
-
export type NetworksListParameters = RouteRequestBody<'/networks/list'>
|
|
190
|
+
export type SeamConsoleV1GetResourceTypeParameters =
|
|
191
|
+
RouteRequestParams<'/seam/console/v1/get_resource_type'>
|
|
228
192
|
|
|
229
193
|
/**
|
|
230
|
-
* @deprecated Use
|
|
194
|
+
* @deprecated Use SeamConsoleV1GetResourceTypeParameters instead.
|
|
231
195
|
*/
|
|
232
|
-
export type
|
|
196
|
+
export type SeamConsoleV1GetResourceTypeParams =
|
|
197
|
+
SeamConsoleV1GetResourceTypeParameters
|
|
233
198
|
|
|
234
199
|
/**
|
|
235
|
-
* @deprecated Use
|
|
200
|
+
* @deprecated Use SeamConsoleV1GetResourceTypeRequest instead.
|
|
236
201
|
*/
|
|
237
|
-
export type
|
|
238
|
-
Required<RouteResponse<'/
|
|
202
|
+
export type SeamConsoleV1GetResourceTypeResponse = SetNonNullable<
|
|
203
|
+
Required<RouteResponse<'/seam/console/v1/get_resource_type'>>
|
|
239
204
|
>
|
|
240
205
|
|
|
241
|
-
export type
|
|
242
|
-
|
|
243
|
-
'
|
|
206
|
+
export type SeamConsoleV1GetResourceTypeRequest = SeamHttpRequest<
|
|
207
|
+
SeamConsoleV1GetResourceTypeResponse,
|
|
208
|
+
'resource_type'
|
|
244
209
|
>
|
|
245
210
|
|
|
246
211
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
247
|
-
export interface
|
|
212
|
+
export interface SeamConsoleV1GetResourceTypeOptions {}
|
|
@@ -119,6 +119,9 @@ import {
|
|
|
119
119
|
type AccessMethodsEncodeRequest,
|
|
120
120
|
type AccessMethodsGetOptions,
|
|
121
121
|
type AccessMethodsGetParameters,
|
|
122
|
+
type AccessMethodsGetRelatedOptions,
|
|
123
|
+
type AccessMethodsGetRelatedParameters,
|
|
124
|
+
type AccessMethodsGetRelatedRequest,
|
|
122
125
|
type AccessMethodsGetRequest,
|
|
123
126
|
type AccessMethodsListOptions,
|
|
124
127
|
type AccessMethodsListParameters,
|
|
@@ -473,15 +476,6 @@ import {
|
|
|
473
476
|
type LocksSimulateManualLockViaKeypadRequest,
|
|
474
477
|
SeamHttpLocksSimulate,
|
|
475
478
|
} from './locks/simulate/index.js'
|
|
476
|
-
import {
|
|
477
|
-
type NetworksGetOptions,
|
|
478
|
-
type NetworksGetParameters,
|
|
479
|
-
type NetworksGetRequest,
|
|
480
|
-
type NetworksListOptions,
|
|
481
|
-
type NetworksListParameters,
|
|
482
|
-
type NetworksListRequest,
|
|
483
|
-
SeamHttpNetworks,
|
|
484
|
-
} from './networks/index.js'
|
|
485
479
|
import {
|
|
486
480
|
type NoiseSensorsListOptions,
|
|
487
481
|
type NoiseSensorsListParameters,
|
|
@@ -530,6 +524,12 @@ import {
|
|
|
530
524
|
type PhonesSimulateCreateSandboxPhoneRequest,
|
|
531
525
|
SeamHttpPhonesSimulate,
|
|
532
526
|
} from './phones/simulate/index.js'
|
|
527
|
+
import {
|
|
528
|
+
type SeamConsoleV1GetResourceTypeOptions,
|
|
529
|
+
type SeamConsoleV1GetResourceTypeParameters,
|
|
530
|
+
type SeamConsoleV1GetResourceTypeRequest,
|
|
531
|
+
SeamHttpSeamConsoleV1,
|
|
532
|
+
} from './seam/console/v1/index.js'
|
|
533
533
|
import {
|
|
534
534
|
type SeamCustomerV1AutomationRunsListOptions,
|
|
535
535
|
type SeamCustomerV1AutomationRunsListParameters,
|
|
@@ -838,6 +838,9 @@ import {
|
|
|
838
838
|
type WorkspacesCreateOptions,
|
|
839
839
|
type WorkspacesCreateParameters,
|
|
840
840
|
type WorkspacesCreateRequest,
|
|
841
|
+
type WorkspacesFindResourcesOptions,
|
|
842
|
+
type WorkspacesFindResourcesParameters,
|
|
843
|
+
type WorkspacesFindResourcesRequest,
|
|
841
844
|
type WorkspacesGetOptions,
|
|
842
845
|
type WorkspacesGetParameters,
|
|
843
846
|
type WorkspacesGetRequest,
|
|
@@ -1306,6 +1309,19 @@ export class SeamHttpEndpoints {
|
|
|
1306
1309
|
}
|
|
1307
1310
|
}
|
|
1308
1311
|
|
|
1312
|
+
get ['/access_methods/get_related'](): (
|
|
1313
|
+
parameters?: AccessMethodsGetRelatedParameters,
|
|
1314
|
+
options?: AccessMethodsGetRelatedOptions,
|
|
1315
|
+
) => AccessMethodsGetRelatedRequest {
|
|
1316
|
+
const { client, defaults } = this
|
|
1317
|
+
return function accessMethodsGetRelated(
|
|
1318
|
+
...args: Parameters<SeamHttpAccessMethods['getRelated']>
|
|
1319
|
+
): ReturnType<SeamHttpAccessMethods['getRelated']> {
|
|
1320
|
+
const seam = SeamHttpAccessMethods.fromClient(client, defaults)
|
|
1321
|
+
return seam.getRelated(...args)
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1309
1325
|
get ['/access_methods/list'](): (
|
|
1310
1326
|
parameters?: AccessMethodsListParameters,
|
|
1311
1327
|
options?: AccessMethodsListOptions,
|
|
@@ -2596,42 +2612,6 @@ export class SeamHttpEndpoints {
|
|
|
2596
2612
|
}
|
|
2597
2613
|
}
|
|
2598
2614
|
|
|
2599
|
-
get ['/networks/get'](): (
|
|
2600
|
-
parameters?: NetworksGetParameters,
|
|
2601
|
-
options?: NetworksGetOptions,
|
|
2602
|
-
) => NetworksGetRequest {
|
|
2603
|
-
const { client, defaults } = this
|
|
2604
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
2605
|
-
throw new Error(
|
|
2606
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
2607
|
-
)
|
|
2608
|
-
}
|
|
2609
|
-
return function networksGet(
|
|
2610
|
-
...args: Parameters<SeamHttpNetworks['get']>
|
|
2611
|
-
): ReturnType<SeamHttpNetworks['get']> {
|
|
2612
|
-
const seam = SeamHttpNetworks.fromClient(client, defaults)
|
|
2613
|
-
return seam.get(...args)
|
|
2614
|
-
}
|
|
2615
|
-
}
|
|
2616
|
-
|
|
2617
|
-
get ['/networks/list'](): (
|
|
2618
|
-
parameters?: NetworksListParameters,
|
|
2619
|
-
options?: NetworksListOptions,
|
|
2620
|
-
) => NetworksListRequest {
|
|
2621
|
-
const { client, defaults } = this
|
|
2622
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
2623
|
-
throw new Error(
|
|
2624
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
2625
|
-
)
|
|
2626
|
-
}
|
|
2627
|
-
return function networksList(
|
|
2628
|
-
...args: Parameters<SeamHttpNetworks['list']>
|
|
2629
|
-
): ReturnType<SeamHttpNetworks['list']> {
|
|
2630
|
-
const seam = SeamHttpNetworks.fromClient(client, defaults)
|
|
2631
|
-
return seam.list(...args)
|
|
2632
|
-
}
|
|
2633
|
-
}
|
|
2634
|
-
|
|
2635
2615
|
get ['/noise_sensors/list'](): (
|
|
2636
2616
|
parameters?: NoiseSensorsListParameters,
|
|
2637
2617
|
options?: NoiseSensorsListOptions,
|
|
@@ -2790,6 +2770,24 @@ export class SeamHttpEndpoints {
|
|
|
2790
2770
|
}
|
|
2791
2771
|
}
|
|
2792
2772
|
|
|
2773
|
+
get ['/seam/console/v1/get_resource_type'](): (
|
|
2774
|
+
parameters?: SeamConsoleV1GetResourceTypeParameters,
|
|
2775
|
+
options?: SeamConsoleV1GetResourceTypeOptions,
|
|
2776
|
+
) => SeamConsoleV1GetResourceTypeRequest {
|
|
2777
|
+
const { client, defaults } = this
|
|
2778
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
2779
|
+
throw new Error(
|
|
2780
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
2781
|
+
)
|
|
2782
|
+
}
|
|
2783
|
+
return function seamConsoleV1GetResourceType(
|
|
2784
|
+
...args: Parameters<SeamHttpSeamConsoleV1['getResourceType']>
|
|
2785
|
+
): ReturnType<SeamHttpSeamConsoleV1['getResourceType']> {
|
|
2786
|
+
const seam = SeamHttpSeamConsoleV1.fromClient(client, defaults)
|
|
2787
|
+
return seam.getResourceType(...args)
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2793
2791
|
get ['/seam/customer/v1/automation_runs/list'](): (
|
|
2794
2792
|
parameters?: SeamCustomerV1AutomationRunsListParameters,
|
|
2795
2793
|
options?: SeamCustomerV1AutomationRunsListOptions,
|
|
@@ -4082,6 +4080,24 @@ export class SeamHttpEndpoints {
|
|
|
4082
4080
|
}
|
|
4083
4081
|
}
|
|
4084
4082
|
|
|
4083
|
+
get ['/workspaces/find_resources'](): (
|
|
4084
|
+
parameters?: WorkspacesFindResourcesParameters,
|
|
4085
|
+
options?: WorkspacesFindResourcesOptions,
|
|
4086
|
+
) => WorkspacesFindResourcesRequest {
|
|
4087
|
+
const { client, defaults } = this
|
|
4088
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
4089
|
+
throw new Error(
|
|
4090
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
4091
|
+
)
|
|
4092
|
+
}
|
|
4093
|
+
return function workspacesFindResources(
|
|
4094
|
+
...args: Parameters<SeamHttpWorkspaces['findResources']>
|
|
4095
|
+
): ReturnType<SeamHttpWorkspaces['findResources']> {
|
|
4096
|
+
const seam = SeamHttpWorkspaces.fromClient(client, defaults)
|
|
4097
|
+
return seam.findResources(...args)
|
|
4098
|
+
}
|
|
4099
|
+
}
|
|
4100
|
+
|
|
4085
4101
|
get ['/workspaces/get'](): (
|
|
4086
4102
|
parameters?: WorkspacesGetParameters,
|
|
4087
4103
|
options?: WorkspacesGetOptions,
|
|
@@ -4145,6 +4161,7 @@ export type SeamHttpEndpointQueryPaths =
|
|
|
4145
4161
|
| '/access_grants/get_related'
|
|
4146
4162
|
| '/access_grants/list'
|
|
4147
4163
|
| '/access_methods/get'
|
|
4164
|
+
| '/access_methods/get_related'
|
|
4148
4165
|
| '/access_methods/list'
|
|
4149
4166
|
| '/acs/access_groups/get'
|
|
4150
4167
|
| '/acs/access_groups/list'
|
|
@@ -4190,13 +4207,12 @@ export type SeamHttpEndpointQueryPaths =
|
|
|
4190
4207
|
| '/events/list'
|
|
4191
4208
|
| '/locks/get'
|
|
4192
4209
|
| '/locks/list'
|
|
4193
|
-
| '/networks/get'
|
|
4194
|
-
| '/networks/list'
|
|
4195
4210
|
| '/noise_sensors/list'
|
|
4196
4211
|
| '/noise_sensors/noise_thresholds/get'
|
|
4197
4212
|
| '/noise_sensors/noise_thresholds/list'
|
|
4198
4213
|
| '/phones/get'
|
|
4199
4214
|
| '/phones/list'
|
|
4215
|
+
| '/seam/console/v1/get_resource_type'
|
|
4200
4216
|
| '/seam/customer/v1/automation_runs/list'
|
|
4201
4217
|
| '/seam/customer/v1/automations/get'
|
|
4202
4218
|
| '/seam/customer/v1/portals/get'
|
|
@@ -4224,6 +4240,7 @@ export type SeamHttpEndpointQueryPaths =
|
|
|
4224
4240
|
| '/user_identities/enrollment_automations/list'
|
|
4225
4241
|
| '/webhooks/get'
|
|
4226
4242
|
| '/webhooks/list'
|
|
4243
|
+
| '/workspaces/find_resources'
|
|
4227
4244
|
| '/workspaces/get'
|
|
4228
4245
|
| '/workspaces/list'
|
|
4229
4246
|
|
|
@@ -45,7 +45,6 @@ import { SeamHttpCustomers } from './customers/index.js'
|
|
|
45
45
|
import { SeamHttpDevices } from './devices/index.js'
|
|
46
46
|
import { SeamHttpEvents } from './events/index.js'
|
|
47
47
|
import { SeamHttpLocks } from './locks/index.js'
|
|
48
|
-
import { SeamHttpNetworks } from './networks/index.js'
|
|
49
48
|
import { SeamHttpNoiseSensors } from './noise-sensors/index.js'
|
|
50
49
|
import { SeamHttpPhones } from './phones/index.js'
|
|
51
50
|
import { SeamHttpSpaces } from './spaces/index.js'
|
|
@@ -237,10 +236,6 @@ export class SeamHttp {
|
|
|
237
236
|
return SeamHttpLocks.fromClient(this.client, this.defaults)
|
|
238
237
|
}
|
|
239
238
|
|
|
240
|
-
get networks(): SeamHttpNetworks {
|
|
241
|
-
return SeamHttpNetworks.fromClient(this.client, this.defaults)
|
|
242
|
-
}
|
|
243
|
-
|
|
244
239
|
get noiseSensors(): SeamHttpNoiseSensors {
|
|
245
240
|
return SeamHttpNoiseSensors.fromClient(this.client, this.defaults)
|
|
246
241
|
}
|
|
@@ -180,6 +180,24 @@ export class SeamHttpWorkspaces {
|
|
|
180
180
|
})
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
findResources(
|
|
184
|
+
parameters?: WorkspacesFindResourcesParameters,
|
|
185
|
+
options: WorkspacesFindResourcesOptions = {},
|
|
186
|
+
): WorkspacesFindResourcesRequest {
|
|
187
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
188
|
+
throw new Error(
|
|
189
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
return new SeamHttpRequest(this, {
|
|
193
|
+
pathname: '/workspaces/find_resources',
|
|
194
|
+
method: 'GET',
|
|
195
|
+
params: parameters,
|
|
196
|
+
responseKey: 'batch',
|
|
197
|
+
options,
|
|
198
|
+
})
|
|
199
|
+
}
|
|
200
|
+
|
|
183
201
|
get(
|
|
184
202
|
parameters?: WorkspacesGetParameters,
|
|
185
203
|
options: WorkspacesGetOptions = {},
|
|
@@ -255,6 +273,29 @@ export type WorkspacesCreateRequest = SeamHttpRequest<
|
|
|
255
273
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
256
274
|
export interface WorkspacesCreateOptions {}
|
|
257
275
|
|
|
276
|
+
export type WorkspacesFindResourcesParameters =
|
|
277
|
+
RouteRequestParams<'/workspaces/find_resources'>
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* @deprecated Use WorkspacesFindResourcesParameters instead.
|
|
281
|
+
*/
|
|
282
|
+
export type WorkspacesFindResourcesParams = WorkspacesFindResourcesParameters
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* @deprecated Use WorkspacesFindResourcesRequest instead.
|
|
286
|
+
*/
|
|
287
|
+
export type WorkspacesFindResourcesResponse = SetNonNullable<
|
|
288
|
+
Required<RouteResponse<'/workspaces/find_resources'>>
|
|
289
|
+
>
|
|
290
|
+
|
|
291
|
+
export type WorkspacesFindResourcesRequest = SeamHttpRequest<
|
|
292
|
+
WorkspacesFindResourcesResponse,
|
|
293
|
+
'batch'
|
|
294
|
+
>
|
|
295
|
+
|
|
296
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
297
|
+
export interface WorkspacesFindResourcesOptions {}
|
|
298
|
+
|
|
258
299
|
export type WorkspacesGetParameters = RouteRequestParams<'/workspaces/get'>
|
|
259
300
|
|
|
260
301
|
/**
|
package/src/lib/version.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './networks.js';
|