@seamapi/http 0.9.3 → 0.10.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.
- package/README.md +5 -5
- package/dist/connect.cjs +281 -20
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +64 -1
- package/lib/params-serializer.js +12 -14
- package/lib/params-serializer.js.map +1 -1
- package/lib/seam/connect/auth.js.map +1 -1
- package/lib/seam/connect/client.js +0 -2
- package/lib/seam/connect/client.js.map +1 -1
- package/lib/seam/connect/error-interceptor.js +11 -3
- package/lib/seam/connect/error-interceptor.js.map +1 -1
- package/lib/seam/connect/options.js.map +1 -1
- package/lib/seam/connect/parse-options.js.map +1 -1
- package/lib/seam/connect/resolve-action-attempt.js.map +1 -1
- package/lib/seam/connect/routes/access-codes-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/access-codes.js.map +1 -1
- package/lib/seam/connect/routes/acs-access-groups.js.map +1 -1
- package/lib/seam/connect/routes/acs-credential-pools.d.ts +19 -0
- package/lib/seam/connect/routes/acs-credential-pools.js +73 -0
- package/lib/seam/connect/routes/acs-credential-pools.js.map +1 -0
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.d.ts +19 -0
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.js +73 -0
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.js.map +1 -0
- package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
- package/lib/seam/connect/routes/acs-entrances.d.ts +27 -0
- package/lib/seam/connect/routes/acs-entrances.js +88 -0
- package/lib/seam/connect/routes/acs-entrances.js.map +1 -0
- package/lib/seam/connect/routes/acs-systems.js.map +1 -1
- package/lib/seam/connect/routes/acs-users.js.map +1 -1
- package/lib/seam/connect/routes/acs.d.ts +6 -0
- package/lib/seam/connect/routes/acs.js +12 -0
- package/lib/seam/connect/routes/acs.js.map +1 -1
- package/lib/seam/connect/routes/action-attempts.js.map +1 -1
- package/lib/seam/connect/routes/client-sessions.js.map +1 -1
- package/lib/seam/connect/routes/connect-webviews.js.map +1 -1
- package/lib/seam/connect/routes/connected-accounts.d.ts +4 -0
- package/lib/seam/connect/routes/connected-accounts.js +8 -0
- package/lib/seam/connect/routes/connected-accounts.js.map +1 -1
- package/lib/seam/connect/routes/devices-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/devices.js.map +1 -1
- package/lib/seam/connect/routes/events.js.map +1 -1
- package/lib/seam/connect/routes/index.d.ts +3 -0
- package/lib/seam/connect/routes/index.js +3 -0
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/locks.js.map +1 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +1 -1
- package/lib/seam/connect/routes/noise-sensors.js.map +1 -1
- package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js.map +1 -1
- package/lib/seam/connect/routes/thermostats.js.map +1 -1
- package/lib/seam/connect/routes/user-identities.js.map +1 -1
- package/lib/seam/connect/routes/webhooks.js.map +1 -1
- package/lib/seam/connect/routes/workspaces.js.map +1 -1
- package/lib/seam/connect/seam-http-multi-workspace.js.map +1 -1
- package/lib/seam/connect/seam-http.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +10 -10
- package/src/lib/params-serializer.ts +8 -19
- package/src/lib/seam/connect/client.ts +0 -2
- package/src/lib/seam/connect/error-interceptor.ts +11 -3
- package/src/lib/seam/connect/routes/acs-credential-pools.ts +154 -0
- package/src/lib/seam/connect/routes/acs-credential-provisioning-automations.ts +162 -0
- package/src/lib/seam/connect/routes/acs-entrances.ts +190 -0
- package/src/lib/seam/connect/routes/acs.ts +18 -0
- package/src/lib/seam/connect/routes/connected-accounts.ts +23 -0
- package/src/lib/seam/connect/routes/index.ts +3 -0
- package/src/lib/version.ts +1 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by generate-routes.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
|
+
import type { SetNonNullable } from 'type-fest'
|
|
8
|
+
|
|
9
|
+
import { warnOnInsecureuserIdentifierKey } from 'lib/seam/connect/auth.js'
|
|
10
|
+
import { type Client, createClient } from 'lib/seam/connect/client.js'
|
|
11
|
+
import {
|
|
12
|
+
isSeamHttpOptionsWithApiKey,
|
|
13
|
+
isSeamHttpOptionsWithClient,
|
|
14
|
+
isSeamHttpOptionsWithClientSessionToken,
|
|
15
|
+
isSeamHttpOptionsWithConsoleSessionToken,
|
|
16
|
+
isSeamHttpOptionsWithPersonalAccessToken,
|
|
17
|
+
type SeamHttpFromPublishableKeyOptions,
|
|
18
|
+
SeamHttpInvalidOptionsError,
|
|
19
|
+
type SeamHttpOptions,
|
|
20
|
+
type SeamHttpOptionsWithApiKey,
|
|
21
|
+
type SeamHttpOptionsWithClient,
|
|
22
|
+
type SeamHttpOptionsWithClientSessionToken,
|
|
23
|
+
type SeamHttpOptionsWithConsoleSessionToken,
|
|
24
|
+
type SeamHttpOptionsWithPersonalAccessToken,
|
|
25
|
+
type SeamHttpRequestOptions,
|
|
26
|
+
} from 'lib/seam/connect/options.js'
|
|
27
|
+
import {
|
|
28
|
+
limitToSeamHttpRequestOptions,
|
|
29
|
+
parseOptions,
|
|
30
|
+
} from 'lib/seam/connect/parse-options.js'
|
|
31
|
+
|
|
32
|
+
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
33
|
+
|
|
34
|
+
export class SeamHttpAcsCredentialProvisioningAutomations {
|
|
35
|
+
client: Client
|
|
36
|
+
readonly defaults: Required<SeamHttpRequestOptions>
|
|
37
|
+
|
|
38
|
+
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
39
|
+
const options = parseOptions(apiKeyOrOptions)
|
|
40
|
+
this.client = 'client' in options ? options.client : createClient(options)
|
|
41
|
+
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static fromClient(
|
|
45
|
+
client: SeamHttpOptionsWithClient['client'],
|
|
46
|
+
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
47
|
+
): SeamHttpAcsCredentialProvisioningAutomations {
|
|
48
|
+
const constructorOptions = { ...options, client }
|
|
49
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
50
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
51
|
+
}
|
|
52
|
+
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static fromApiKey(
|
|
56
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
57
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
58
|
+
): SeamHttpAcsCredentialProvisioningAutomations {
|
|
59
|
+
const constructorOptions = { ...options, apiKey }
|
|
60
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
61
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
62
|
+
}
|
|
63
|
+
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static fromClientSessionToken(
|
|
67
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
68
|
+
options: Omit<
|
|
69
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
70
|
+
'clientSessionToken'
|
|
71
|
+
> = {},
|
|
72
|
+
): SeamHttpAcsCredentialProvisioningAutomations {
|
|
73
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
74
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
75
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
76
|
+
}
|
|
77
|
+
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
static async fromPublishableKey(
|
|
81
|
+
publishableKey: string,
|
|
82
|
+
userIdentifierKey: string,
|
|
83
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
84
|
+
): Promise<SeamHttpAcsCredentialProvisioningAutomations> {
|
|
85
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
86
|
+
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
87
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
88
|
+
throw new SeamHttpInvalidOptionsError(
|
|
89
|
+
'The client option cannot be used with SeamHttp.fromPublishableKey',
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
const client = createClient(clientOptions)
|
|
93
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client)
|
|
94
|
+
const { token } = await clientSessions.getOrCreate({
|
|
95
|
+
user_identifier_key: userIdentifierKey,
|
|
96
|
+
})
|
|
97
|
+
return SeamHttpAcsCredentialProvisioningAutomations.fromClientSessionToken(
|
|
98
|
+
token,
|
|
99
|
+
options,
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static fromConsoleSessionToken(
|
|
104
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
105
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
106
|
+
options: Omit<
|
|
107
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
108
|
+
'consoleSessionToken' | 'workspaceId'
|
|
109
|
+
> = {},
|
|
110
|
+
): SeamHttpAcsCredentialProvisioningAutomations {
|
|
111
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
112
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
113
|
+
throw new SeamHttpInvalidOptionsError(
|
|
114
|
+
'Missing consoleSessionToken or workspaceId',
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
static fromPersonalAccessToken(
|
|
121
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
122
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
123
|
+
options: Omit<
|
|
124
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
125
|
+
'personalAccessToken' | 'workspaceId'
|
|
126
|
+
> = {},
|
|
127
|
+
): SeamHttpAcsCredentialProvisioningAutomations {
|
|
128
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
129
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
130
|
+
throw new SeamHttpInvalidOptionsError(
|
|
131
|
+
'Missing personalAccessToken or workspaceId',
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
async launch(
|
|
138
|
+
body?: AcsCredentialProvisioningAutomationsLaunchBody,
|
|
139
|
+
): Promise<
|
|
140
|
+
AcsCredentialProvisioningAutomationsLaunchResponse['acs_credential_provisioning_automation']
|
|
141
|
+
> {
|
|
142
|
+
const { data } =
|
|
143
|
+
await this.client.request<AcsCredentialProvisioningAutomationsLaunchResponse>(
|
|
144
|
+
{
|
|
145
|
+
url: '/acs/credential_provisioning_automations/launch',
|
|
146
|
+
method: 'post',
|
|
147
|
+
data: body,
|
|
148
|
+
},
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
return data.acs_credential_provisioning_automation
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type AcsCredentialProvisioningAutomationsLaunchBody =
|
|
156
|
+
RouteRequestBody<'/acs/credential_provisioning_automations/launch'>
|
|
157
|
+
|
|
158
|
+
export type AcsCredentialProvisioningAutomationsLaunchResponse = SetNonNullable<
|
|
159
|
+
Required<RouteResponse<'/acs/credential_provisioning_automations/launch'>>
|
|
160
|
+
>
|
|
161
|
+
|
|
162
|
+
export type AcsCredentialProvisioningAutomationsLaunchOptions = never
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by generate-routes.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
|
+
import type { SetNonNullable } from 'type-fest'
|
|
8
|
+
|
|
9
|
+
import { warnOnInsecureuserIdentifierKey } from 'lib/seam/connect/auth.js'
|
|
10
|
+
import { type Client, createClient } from 'lib/seam/connect/client.js'
|
|
11
|
+
import {
|
|
12
|
+
isSeamHttpOptionsWithApiKey,
|
|
13
|
+
isSeamHttpOptionsWithClient,
|
|
14
|
+
isSeamHttpOptionsWithClientSessionToken,
|
|
15
|
+
isSeamHttpOptionsWithConsoleSessionToken,
|
|
16
|
+
isSeamHttpOptionsWithPersonalAccessToken,
|
|
17
|
+
type SeamHttpFromPublishableKeyOptions,
|
|
18
|
+
SeamHttpInvalidOptionsError,
|
|
19
|
+
type SeamHttpOptions,
|
|
20
|
+
type SeamHttpOptionsWithApiKey,
|
|
21
|
+
type SeamHttpOptionsWithClient,
|
|
22
|
+
type SeamHttpOptionsWithClientSessionToken,
|
|
23
|
+
type SeamHttpOptionsWithConsoleSessionToken,
|
|
24
|
+
type SeamHttpOptionsWithPersonalAccessToken,
|
|
25
|
+
type SeamHttpRequestOptions,
|
|
26
|
+
} from 'lib/seam/connect/options.js'
|
|
27
|
+
import {
|
|
28
|
+
limitToSeamHttpRequestOptions,
|
|
29
|
+
parseOptions,
|
|
30
|
+
} from 'lib/seam/connect/parse-options.js'
|
|
31
|
+
|
|
32
|
+
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
33
|
+
|
|
34
|
+
export class SeamHttpAcsEntrances {
|
|
35
|
+
client: Client
|
|
36
|
+
readonly defaults: Required<SeamHttpRequestOptions>
|
|
37
|
+
|
|
38
|
+
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
39
|
+
const options = parseOptions(apiKeyOrOptions)
|
|
40
|
+
this.client = 'client' in options ? options.client : createClient(options)
|
|
41
|
+
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static fromClient(
|
|
45
|
+
client: SeamHttpOptionsWithClient['client'],
|
|
46
|
+
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
47
|
+
): SeamHttpAcsEntrances {
|
|
48
|
+
const constructorOptions = { ...options, client }
|
|
49
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
50
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
51
|
+
}
|
|
52
|
+
return new SeamHttpAcsEntrances(constructorOptions)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static fromApiKey(
|
|
56
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
57
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
58
|
+
): SeamHttpAcsEntrances {
|
|
59
|
+
const constructorOptions = { ...options, apiKey }
|
|
60
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
61
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
62
|
+
}
|
|
63
|
+
return new SeamHttpAcsEntrances(constructorOptions)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static fromClientSessionToken(
|
|
67
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
68
|
+
options: Omit<
|
|
69
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
70
|
+
'clientSessionToken'
|
|
71
|
+
> = {},
|
|
72
|
+
): SeamHttpAcsEntrances {
|
|
73
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
74
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
75
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
76
|
+
}
|
|
77
|
+
return new SeamHttpAcsEntrances(constructorOptions)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
static async fromPublishableKey(
|
|
81
|
+
publishableKey: string,
|
|
82
|
+
userIdentifierKey: string,
|
|
83
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
84
|
+
): Promise<SeamHttpAcsEntrances> {
|
|
85
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
86
|
+
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
87
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
88
|
+
throw new SeamHttpInvalidOptionsError(
|
|
89
|
+
'The client option cannot be used with SeamHttp.fromPublishableKey',
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
const client = createClient(clientOptions)
|
|
93
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client)
|
|
94
|
+
const { token } = await clientSessions.getOrCreate({
|
|
95
|
+
user_identifier_key: userIdentifierKey,
|
|
96
|
+
})
|
|
97
|
+
return SeamHttpAcsEntrances.fromClientSessionToken(token, options)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
static fromConsoleSessionToken(
|
|
101
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
102
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
103
|
+
options: Omit<
|
|
104
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
105
|
+
'consoleSessionToken' | 'workspaceId'
|
|
106
|
+
> = {},
|
|
107
|
+
): SeamHttpAcsEntrances {
|
|
108
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
109
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
110
|
+
throw new SeamHttpInvalidOptionsError(
|
|
111
|
+
'Missing consoleSessionToken or workspaceId',
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
return new SeamHttpAcsEntrances(constructorOptions)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
static fromPersonalAccessToken(
|
|
118
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
119
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
120
|
+
options: Omit<
|
|
121
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
122
|
+
'personalAccessToken' | 'workspaceId'
|
|
123
|
+
> = {},
|
|
124
|
+
): SeamHttpAcsEntrances {
|
|
125
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
126
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
127
|
+
throw new SeamHttpInvalidOptionsError(
|
|
128
|
+
'Missing personalAccessToken or workspaceId',
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
return new SeamHttpAcsEntrances(constructorOptions)
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
async get(
|
|
135
|
+
body?: AcsEntrancesGetParams,
|
|
136
|
+
): Promise<AcsEntrancesGetResponse['acs_entrance']> {
|
|
137
|
+
const { data } = await this.client.request<AcsEntrancesGetResponse>({
|
|
138
|
+
url: '/acs/entrances/get',
|
|
139
|
+
method: 'post',
|
|
140
|
+
data: body,
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
return data.acs_entrance
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
async grantAccess(body?: AcsEntrancesGrantAccessBody): Promise<void> {
|
|
147
|
+
await this.client.request<AcsEntrancesGrantAccessResponse>({
|
|
148
|
+
url: '/acs/entrances/grant_access',
|
|
149
|
+
method: 'post',
|
|
150
|
+
data: body,
|
|
151
|
+
})
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
async list(
|
|
155
|
+
body?: AcsEntrancesListParams,
|
|
156
|
+
): Promise<AcsEntrancesListResponse['acs_entrances']> {
|
|
157
|
+
const { data } = await this.client.request<AcsEntrancesListResponse>({
|
|
158
|
+
url: '/acs/entrances/list',
|
|
159
|
+
method: 'post',
|
|
160
|
+
data: body,
|
|
161
|
+
})
|
|
162
|
+
|
|
163
|
+
return data.acs_entrances
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export type AcsEntrancesGetParams = RouteRequestBody<'/acs/entrances/get'>
|
|
168
|
+
|
|
169
|
+
export type AcsEntrancesGetResponse = SetNonNullable<
|
|
170
|
+
Required<RouteResponse<'/acs/entrances/get'>>
|
|
171
|
+
>
|
|
172
|
+
|
|
173
|
+
export type AcsEntrancesGetOptions = never
|
|
174
|
+
|
|
175
|
+
export type AcsEntrancesGrantAccessBody =
|
|
176
|
+
RouteRequestBody<'/acs/entrances/grant_access'>
|
|
177
|
+
|
|
178
|
+
export type AcsEntrancesGrantAccessResponse = SetNonNullable<
|
|
179
|
+
Required<RouteResponse<'/acs/entrances/grant_access'>>
|
|
180
|
+
>
|
|
181
|
+
|
|
182
|
+
export type AcsEntrancesGrantAccessOptions = never
|
|
183
|
+
|
|
184
|
+
export type AcsEntrancesListParams = RouteRequestBody<'/acs/entrances/list'>
|
|
185
|
+
|
|
186
|
+
export type AcsEntrancesListResponse = SetNonNullable<
|
|
187
|
+
Required<RouteResponse<'/acs/entrances/list'>>
|
|
188
|
+
>
|
|
189
|
+
|
|
190
|
+
export type AcsEntrancesListOptions = never
|
|
@@ -27,7 +27,10 @@ import {
|
|
|
27
27
|
} from 'lib/seam/connect/parse-options.js'
|
|
28
28
|
|
|
29
29
|
import { SeamHttpAcsAccessGroups } from './acs-access-groups.js'
|
|
30
|
+
import { SeamHttpAcsCredentialPools } from './acs-credential-pools.js'
|
|
31
|
+
import { SeamHttpAcsCredentialProvisioningAutomations } from './acs-credential-provisioning-automations.js'
|
|
30
32
|
import { SeamHttpAcsCredentials } from './acs-credentials.js'
|
|
33
|
+
import { SeamHttpAcsEntrances } from './acs-entrances.js'
|
|
31
34
|
import { SeamHttpAcsSystems } from './acs-systems.js'
|
|
32
35
|
import { SeamHttpAcsUsers } from './acs-users.js'
|
|
33
36
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -136,10 +139,25 @@ export class SeamHttpAcs {
|
|
|
136
139
|
return SeamHttpAcsAccessGroups.fromClient(this.client, this.defaults)
|
|
137
140
|
}
|
|
138
141
|
|
|
142
|
+
get credentialPools(): SeamHttpAcsCredentialPools {
|
|
143
|
+
return SeamHttpAcsCredentialPools.fromClient(this.client, this.defaults)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
get credentialProvisioningAutomations(): SeamHttpAcsCredentialProvisioningAutomations {
|
|
147
|
+
return SeamHttpAcsCredentialProvisioningAutomations.fromClient(
|
|
148
|
+
this.client,
|
|
149
|
+
this.defaults,
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
|
|
139
153
|
get credentials(): SeamHttpAcsCredentials {
|
|
140
154
|
return SeamHttpAcsCredentials.fromClient(this.client, this.defaults)
|
|
141
155
|
}
|
|
142
156
|
|
|
157
|
+
get entrances(): SeamHttpAcsEntrances {
|
|
158
|
+
return SeamHttpAcsEntrances.fromClient(this.client, this.defaults)
|
|
159
|
+
}
|
|
160
|
+
|
|
143
161
|
get systems(): SeamHttpAcsSystems {
|
|
144
162
|
return SeamHttpAcsSystems.fromClient(this.client, this.defaults)
|
|
145
163
|
}
|
|
@@ -166,6 +166,20 @@ export class SeamHttpConnectedAccounts {
|
|
|
166
166
|
|
|
167
167
|
return data.connected_accounts
|
|
168
168
|
}
|
|
169
|
+
|
|
170
|
+
async update(
|
|
171
|
+
body?: ConnectedAccountsUpdateBody,
|
|
172
|
+
): Promise<ConnectedAccountsUpdateResponse['connected_account']> {
|
|
173
|
+
const { data } = await this.client.request<ConnectedAccountsUpdateResponse>(
|
|
174
|
+
{
|
|
175
|
+
url: '/connected_accounts/update',
|
|
176
|
+
method: 'post',
|
|
177
|
+
data: body,
|
|
178
|
+
},
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
return data.connected_account
|
|
182
|
+
}
|
|
169
183
|
}
|
|
170
184
|
|
|
171
185
|
export type ConnectedAccountsDeleteBody =
|
|
@@ -194,3 +208,12 @@ export type ConnectedAccountsListResponse = SetNonNullable<
|
|
|
194
208
|
>
|
|
195
209
|
|
|
196
210
|
export type ConnectedAccountsListOptions = never
|
|
211
|
+
|
|
212
|
+
export type ConnectedAccountsUpdateBody =
|
|
213
|
+
RouteRequestBody<'/connected_accounts/update'>
|
|
214
|
+
|
|
215
|
+
export type ConnectedAccountsUpdateResponse = SetNonNullable<
|
|
216
|
+
Required<RouteResponse<'/connected_accounts/update'>>
|
|
217
|
+
>
|
|
218
|
+
|
|
219
|
+
export type ConnectedAccountsUpdateOptions = never
|
|
@@ -2,7 +2,10 @@ export * from './access-codes.js'
|
|
|
2
2
|
export * from './access-codes-unmanaged.js'
|
|
3
3
|
export * from './acs.js'
|
|
4
4
|
export * from './acs-access-groups.js'
|
|
5
|
+
export * from './acs-credential-pools.js'
|
|
6
|
+
export * from './acs-credential-provisioning-automations.js'
|
|
5
7
|
export * from './acs-credentials.js'
|
|
8
|
+
export * from './acs-entrances.js'
|
|
6
9
|
export * from './acs-systems.js'
|
|
7
10
|
export * from './acs-users.js'
|
|
8
11
|
export * from './action-attempts.js'
|
package/src/lib/version.ts
CHANGED