@seamapi/http 0.13.0 → 0.14.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 +3 -3
- package/dist/connect.cjs +296 -16
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +79 -12
- package/lib/seam/connect/parse-options.js +9 -0
- package/lib/seam/connect/parse-options.js.map +1 -1
- package/lib/seam/connect/routes/connected-accounts.d.ts +3 -3
- package/lib/seam/connect/routes/connected-accounts.js +3 -3
- package/lib/seam/connect/routes/connected-accounts.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/networks.d.ts +23 -0
- package/lib/seam/connect/routes/networks.js +81 -0
- package/lib/seam/connect/routes/networks.js.map +1 -0
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.d.ts +1 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js +2 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +1 -1
- package/lib/seam/connect/routes/phones.d.ts +19 -0
- package/lib/seam/connect/routes/phones.js +73 -0
- package/lib/seam/connect/routes/phones.js.map +1 -0
- package/lib/seam/connect/routes/user-identities-enrollment-automations.d.ts +27 -0
- package/lib/seam/connect/routes/user-identities-enrollment-automations.js +89 -0
- package/lib/seam/connect/routes/user-identities-enrollment-automations.js.map +1 -0
- package/lib/seam/connect/routes/user-identities.d.ts +9 -3
- package/lib/seam/connect/routes/user-identities.js +15 -3
- package/lib/seam/connect/routes/user-identities.js.map +1 -1
- package/lib/seam/connect/routes/webhooks.d.ts +3 -3
- package/lib/seam/connect/routes/webhooks.js +3 -3
- package/lib/seam/connect/routes/webhooks.js.map +1 -1
- package/lib/seam/connect/routes/workspaces.d.ts +5 -5
- package/lib/seam/connect/routes/workspaces.js +6 -6
- package/lib/seam/connect/routes/workspaces.js.map +1 -1
- package/lib/seam/connect/seam-http.d.ts +3 -1
- package/lib/seam/connect/seam-http.js +7 -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/package.json +3 -3
- package/src/lib/seam/connect/parse-options.ts +17 -0
- package/src/lib/seam/connect/routes/connected-accounts.ts +5 -9
- package/src/lib/seam/connect/routes/index.ts +3 -0
- package/src/lib/seam/connect/routes/networks.ts +171 -0
- package/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts +11 -6
- package/src/lib/seam/connect/routes/phones.ts +151 -0
- package/src/lib/seam/connect/routes/user-identities-enrollment-automations.ts +214 -0
- package/src/lib/seam/connect/routes/user-identities.ts +35 -10
- package/src/lib/seam/connect/routes/webhooks.ts +5 -9
- package/src/lib/seam/connect/routes/workspaces.ts +9 -13
- package/src/lib/seam/connect/seam-http.ts +10 -0
- package/src/lib/version.ts +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by generate-routes.ts.
|
|
3
|
+
* Do not edit this file or add other files to this directory.
|
|
4
|
+
*/
|
|
5
|
+
import { warnOnInsecureuserIdentifierKey } from '../../../../lib/seam/connect/auth.js';
|
|
6
|
+
import { createClient } from '../../../../lib/seam/connect/client.js';
|
|
7
|
+
import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/options.js';
|
|
8
|
+
import { limitToSeamHttpRequestOptions, parseOptions, } from '../../../../lib/seam/connect/parse-options.js';
|
|
9
|
+
import { SeamHttpClientSessions } from './client-sessions.js';
|
|
10
|
+
export class SeamHttpPhones {
|
|
11
|
+
constructor(apiKeyOrOptions = {}) {
|
|
12
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
13
|
+
this.client = 'client' in options ? options.client : createClient(options);
|
|
14
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
15
|
+
}
|
|
16
|
+
static fromClient(client, options = {}) {
|
|
17
|
+
const constructorOptions = { ...options, client };
|
|
18
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
19
|
+
throw new SeamHttpInvalidOptionsError('Missing client');
|
|
20
|
+
}
|
|
21
|
+
return new SeamHttpPhones(constructorOptions);
|
|
22
|
+
}
|
|
23
|
+
static fromApiKey(apiKey, options = {}) {
|
|
24
|
+
const constructorOptions = { ...options, apiKey };
|
|
25
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
26
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey');
|
|
27
|
+
}
|
|
28
|
+
return new SeamHttpPhones(constructorOptions);
|
|
29
|
+
}
|
|
30
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
31
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
32
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
33
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
|
|
34
|
+
}
|
|
35
|
+
return new SeamHttpPhones(constructorOptions);
|
|
36
|
+
}
|
|
37
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
38
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
39
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
40
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
41
|
+
throw new SeamHttpInvalidOptionsError('The client option cannot be used with SeamHttp.fromPublishableKey');
|
|
42
|
+
}
|
|
43
|
+
const client = createClient(clientOptions);
|
|
44
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
45
|
+
const { token } = await clientSessions.getOrCreate({
|
|
46
|
+
user_identifier_key: userIdentifierKey,
|
|
47
|
+
});
|
|
48
|
+
return SeamHttpPhones.fromClientSessionToken(token, options);
|
|
49
|
+
}
|
|
50
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
51
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
52
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
53
|
+
throw new SeamHttpInvalidOptionsError('Missing consoleSessionToken or workspaceId');
|
|
54
|
+
}
|
|
55
|
+
return new SeamHttpPhones(constructorOptions);
|
|
56
|
+
}
|
|
57
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
58
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
59
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
60
|
+
throw new SeamHttpInvalidOptionsError('Missing personalAccessToken or workspaceId');
|
|
61
|
+
}
|
|
62
|
+
return new SeamHttpPhones(constructorOptions);
|
|
63
|
+
}
|
|
64
|
+
async list(body) {
|
|
65
|
+
const { data } = await this.client.request({
|
|
66
|
+
url: '/phones/list',
|
|
67
|
+
method: 'post',
|
|
68
|
+
data: body,
|
|
69
|
+
});
|
|
70
|
+
return data.phones;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=phones.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phones.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/phones.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAe,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EAExC,2BAA2B,GAQ5B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,6BAA6B,EAC7B,YAAY,GACb,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBA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AE,CAAC;YAClE,MAAM,IAAI,2BAA2B,CACnC,4CAA4C,CAC7C,CAAA;QACH,CAAC;QACD,OAAO,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAA;IAC/C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAuB;QAChC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAqB;YAC7D,GAAG,EAAE,cAAc;YACnB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;QAEF,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
|
|
2
|
+
import type { SetNonNullable } from 'type-fest';
|
|
3
|
+
import { type Client } from '../../../../lib/seam/connect/client.js';
|
|
4
|
+
import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../lib/seam/connect/options.js';
|
|
5
|
+
export declare class SeamHttpUserIdentitiesEnrollmentAutomations {
|
|
6
|
+
client: Client;
|
|
7
|
+
readonly defaults: Required<SeamHttpRequestOptions>;
|
|
8
|
+
constructor(apiKeyOrOptions?: string | SeamHttpOptions);
|
|
9
|
+
static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpUserIdentitiesEnrollmentAutomations;
|
|
10
|
+
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpUserIdentitiesEnrollmentAutomations;
|
|
11
|
+
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpUserIdentitiesEnrollmentAutomations;
|
|
12
|
+
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpUserIdentitiesEnrollmentAutomations>;
|
|
13
|
+
static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpUserIdentitiesEnrollmentAutomations;
|
|
14
|
+
static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpUserIdentitiesEnrollmentAutomations;
|
|
15
|
+
get(body?: UserIdentitiesEnrollmentAutomationsGetParams): Promise<UserIdentitiesEnrollmentAutomationsGetResponse['enrollment_automation']>;
|
|
16
|
+
launch(body?: UserIdentitiesEnrollmentAutomationsLaunchBody): Promise<UserIdentitiesEnrollmentAutomationsLaunchResponse['enrollment_automation']>;
|
|
17
|
+
list(body?: UserIdentitiesEnrollmentAutomationsListParams): Promise<UserIdentitiesEnrollmentAutomationsListResponse['enrollment_automations']>;
|
|
18
|
+
}
|
|
19
|
+
export type UserIdentitiesEnrollmentAutomationsGetParams = RouteRequestBody<'/user_identities/enrollment_automations/get'>;
|
|
20
|
+
export type UserIdentitiesEnrollmentAutomationsGetResponse = SetNonNullable<Required<RouteResponse<'/user_identities/enrollment_automations/get'>>>;
|
|
21
|
+
export type UserIdentitiesEnrollmentAutomationsGetOptions = never;
|
|
22
|
+
export type UserIdentitiesEnrollmentAutomationsLaunchBody = RouteRequestBody<'/user_identities/enrollment_automations/launch'>;
|
|
23
|
+
export type UserIdentitiesEnrollmentAutomationsLaunchResponse = SetNonNullable<Required<RouteResponse<'/user_identities/enrollment_automations/launch'>>>;
|
|
24
|
+
export type UserIdentitiesEnrollmentAutomationsLaunchOptions = never;
|
|
25
|
+
export type UserIdentitiesEnrollmentAutomationsListParams = RouteRequestBody<'/user_identities/enrollment_automations/list'>;
|
|
26
|
+
export type UserIdentitiesEnrollmentAutomationsListResponse = SetNonNullable<Required<RouteResponse<'/user_identities/enrollment_automations/list'>>>;
|
|
27
|
+
export type UserIdentitiesEnrollmentAutomationsListOptions = never;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by generate-routes.ts.
|
|
3
|
+
* Do not edit this file or add other files to this directory.
|
|
4
|
+
*/
|
|
5
|
+
import { warnOnInsecureuserIdentifierKey } from '../../../../lib/seam/connect/auth.js';
|
|
6
|
+
import { createClient } from '../../../../lib/seam/connect/client.js';
|
|
7
|
+
import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/options.js';
|
|
8
|
+
import { limitToSeamHttpRequestOptions, parseOptions, } from '../../../../lib/seam/connect/parse-options.js';
|
|
9
|
+
import { SeamHttpClientSessions } from './client-sessions.js';
|
|
10
|
+
export class SeamHttpUserIdentitiesEnrollmentAutomations {
|
|
11
|
+
constructor(apiKeyOrOptions = {}) {
|
|
12
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
13
|
+
this.client = 'client' in options ? options.client : createClient(options);
|
|
14
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
15
|
+
}
|
|
16
|
+
static fromClient(client, options = {}) {
|
|
17
|
+
const constructorOptions = { ...options, client };
|
|
18
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
19
|
+
throw new SeamHttpInvalidOptionsError('Missing client');
|
|
20
|
+
}
|
|
21
|
+
return new SeamHttpUserIdentitiesEnrollmentAutomations(constructorOptions);
|
|
22
|
+
}
|
|
23
|
+
static fromApiKey(apiKey, options = {}) {
|
|
24
|
+
const constructorOptions = { ...options, apiKey };
|
|
25
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
26
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey');
|
|
27
|
+
}
|
|
28
|
+
return new SeamHttpUserIdentitiesEnrollmentAutomations(constructorOptions);
|
|
29
|
+
}
|
|
30
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
31
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
32
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
33
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
|
|
34
|
+
}
|
|
35
|
+
return new SeamHttpUserIdentitiesEnrollmentAutomations(constructorOptions);
|
|
36
|
+
}
|
|
37
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
38
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
39
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
40
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
41
|
+
throw new SeamHttpInvalidOptionsError('The client option cannot be used with SeamHttp.fromPublishableKey');
|
|
42
|
+
}
|
|
43
|
+
const client = createClient(clientOptions);
|
|
44
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
45
|
+
const { token } = await clientSessions.getOrCreate({
|
|
46
|
+
user_identifier_key: userIdentifierKey,
|
|
47
|
+
});
|
|
48
|
+
return SeamHttpUserIdentitiesEnrollmentAutomations.fromClientSessionToken(token, options);
|
|
49
|
+
}
|
|
50
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
51
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
52
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
53
|
+
throw new SeamHttpInvalidOptionsError('Missing consoleSessionToken or workspaceId');
|
|
54
|
+
}
|
|
55
|
+
return new SeamHttpUserIdentitiesEnrollmentAutomations(constructorOptions);
|
|
56
|
+
}
|
|
57
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
58
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
59
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
60
|
+
throw new SeamHttpInvalidOptionsError('Missing personalAccessToken or workspaceId');
|
|
61
|
+
}
|
|
62
|
+
return new SeamHttpUserIdentitiesEnrollmentAutomations(constructorOptions);
|
|
63
|
+
}
|
|
64
|
+
async get(body) {
|
|
65
|
+
const { data } = await this.client.request({
|
|
66
|
+
url: '/user_identities/enrollment_automations/get',
|
|
67
|
+
method: 'post',
|
|
68
|
+
data: body,
|
|
69
|
+
});
|
|
70
|
+
return data.enrollment_automation;
|
|
71
|
+
}
|
|
72
|
+
async launch(body) {
|
|
73
|
+
const { data } = await this.client.request({
|
|
74
|
+
url: '/user_identities/enrollment_automations/launch',
|
|
75
|
+
method: 'post',
|
|
76
|
+
data: body,
|
|
77
|
+
});
|
|
78
|
+
return data.enrollment_automation;
|
|
79
|
+
}
|
|
80
|
+
async list(body) {
|
|
81
|
+
const { data } = await this.client.request({
|
|
82
|
+
url: '/user_identities/enrollment_automations/list',
|
|
83
|
+
method: 'post',
|
|
84
|
+
data: body,
|
|
85
|
+
});
|
|
86
|
+
return data.enrollment_automations;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=user-identities-enrollment-automations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-identities-enrollment-automations.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/user-identities-enrollment-automations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,+BAA+B,EAAE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,7 +1,8 @@
|
|
|
1
|
-
import type { RouteRequestBody,
|
|
1
|
+
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
|
|
2
2
|
import type { SetNonNullable } from 'type-fest';
|
|
3
3
|
import { type Client } from '../../../../lib/seam/connect/client.js';
|
|
4
4
|
import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../lib/seam/connect/options.js';
|
|
5
|
+
import { SeamHttpUserIdentitiesEnrollmentAutomations } from './user-identities-enrollment-automations.js';
|
|
5
6
|
export declare class SeamHttpUserIdentities {
|
|
6
7
|
client: Client;
|
|
7
8
|
readonly defaults: Required<SeamHttpRequestOptions>;
|
|
@@ -12,12 +13,14 @@ export declare class SeamHttpUserIdentities {
|
|
|
12
13
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpUserIdentities>;
|
|
13
14
|
static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpUserIdentities;
|
|
14
15
|
static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpUserIdentities;
|
|
16
|
+
get enrollmentAutomations(): SeamHttpUserIdentitiesEnrollmentAutomations;
|
|
15
17
|
addAcsUser(body?: UserIdentitiesAddAcsUserBody): Promise<void>;
|
|
16
18
|
create(body?: UserIdentitiesCreateBody): Promise<UserIdentitiesCreateResponse['user_identity']>;
|
|
17
19
|
get(body?: UserIdentitiesGetParams): Promise<UserIdentitiesGetResponse['user_identity']>;
|
|
18
20
|
grantAccessToDevice(body?: UserIdentitiesGrantAccessToDeviceBody): Promise<void>;
|
|
19
|
-
list(
|
|
21
|
+
list(body?: UserIdentitiesListParams): Promise<UserIdentitiesListResponse['user_identities']>;
|
|
20
22
|
listAccessibleDevices(body?: UserIdentitiesListAccessibleDevicesParams): Promise<UserIdentitiesListAccessibleDevicesResponse['accessible_devices']>;
|
|
23
|
+
listAcsSystems(body?: UserIdentitiesListAcsSystemsParams): Promise<UserIdentitiesListAcsSystemsResponse['acs_systems']>;
|
|
21
24
|
listAcsUsers(body?: UserIdentitiesListAcsUsersParams): Promise<UserIdentitiesListAcsUsersResponse['acs_users']>;
|
|
22
25
|
removeAcsUser(body?: UserIdentitiesRemoveAcsUserBody): Promise<void>;
|
|
23
26
|
revokeAccessToDevice(body?: UserIdentitiesRevokeAccessToDeviceBody): Promise<void>;
|
|
@@ -34,12 +37,15 @@ export type UserIdentitiesGetOptions = never;
|
|
|
34
37
|
export type UserIdentitiesGrantAccessToDeviceBody = RouteRequestBody<'/user_identities/grant_access_to_device'>;
|
|
35
38
|
export type UserIdentitiesGrantAccessToDeviceResponse = SetNonNullable<Required<RouteResponse<'/user_identities/grant_access_to_device'>>>;
|
|
36
39
|
export type UserIdentitiesGrantAccessToDeviceOptions = never;
|
|
37
|
-
export type UserIdentitiesListParams =
|
|
40
|
+
export type UserIdentitiesListParams = RouteRequestBody<'/user_identities/list'>;
|
|
38
41
|
export type UserIdentitiesListResponse = SetNonNullable<Required<RouteResponse<'/user_identities/list'>>>;
|
|
39
42
|
export type UserIdentitiesListOptions = never;
|
|
40
43
|
export type UserIdentitiesListAccessibleDevicesParams = RouteRequestBody<'/user_identities/list_accessible_devices'>;
|
|
41
44
|
export type UserIdentitiesListAccessibleDevicesResponse = SetNonNullable<Required<RouteResponse<'/user_identities/list_accessible_devices'>>>;
|
|
42
45
|
export type UserIdentitiesListAccessibleDevicesOptions = never;
|
|
46
|
+
export type UserIdentitiesListAcsSystemsParams = RouteRequestBody<'/user_identities/list_acs_systems'>;
|
|
47
|
+
export type UserIdentitiesListAcsSystemsResponse = SetNonNullable<Required<RouteResponse<'/user_identities/list_acs_systems'>>>;
|
|
48
|
+
export type UserIdentitiesListAcsSystemsOptions = never;
|
|
43
49
|
export type UserIdentitiesListAcsUsersParams = RouteRequestBody<'/user_identities/list_acs_users'>;
|
|
44
50
|
export type UserIdentitiesListAcsUsersResponse = SetNonNullable<Required<RouteResponse<'/user_identities/list_acs_users'>>>;
|
|
45
51
|
export type UserIdentitiesListAcsUsersOptions = never;
|
|
@@ -7,6 +7,7 @@ import { createClient } from '../../../../lib/seam/connect/client.js';
|
|
|
7
7
|
import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/options.js';
|
|
8
8
|
import { limitToSeamHttpRequestOptions, parseOptions, } from '../../../../lib/seam/connect/parse-options.js';
|
|
9
9
|
import { SeamHttpClientSessions } from './client-sessions.js';
|
|
10
|
+
import { SeamHttpUserIdentitiesEnrollmentAutomations } from './user-identities-enrollment-automations.js';
|
|
10
11
|
export class SeamHttpUserIdentities {
|
|
11
12
|
constructor(apiKeyOrOptions = {}) {
|
|
12
13
|
const options = parseOptions(apiKeyOrOptions);
|
|
@@ -61,6 +62,9 @@ export class SeamHttpUserIdentities {
|
|
|
61
62
|
}
|
|
62
63
|
return new SeamHttpUserIdentities(constructorOptions);
|
|
63
64
|
}
|
|
65
|
+
get enrollmentAutomations() {
|
|
66
|
+
return SeamHttpUserIdentitiesEnrollmentAutomations.fromClient(this.client, this.defaults);
|
|
67
|
+
}
|
|
64
68
|
async addAcsUser(body) {
|
|
65
69
|
await this.client.request({
|
|
66
70
|
url: '/user_identities/add_acs_user',
|
|
@@ -91,11 +95,11 @@ export class SeamHttpUserIdentities {
|
|
|
91
95
|
data: body,
|
|
92
96
|
});
|
|
93
97
|
}
|
|
94
|
-
async list(
|
|
98
|
+
async list(body) {
|
|
95
99
|
const { data } = await this.client.request({
|
|
96
100
|
url: '/user_identities/list',
|
|
97
|
-
method: '
|
|
98
|
-
|
|
101
|
+
method: 'post',
|
|
102
|
+
data: body,
|
|
99
103
|
});
|
|
100
104
|
return data.user_identities;
|
|
101
105
|
}
|
|
@@ -107,6 +111,14 @@ export class SeamHttpUserIdentities {
|
|
|
107
111
|
});
|
|
108
112
|
return data.accessible_devices;
|
|
109
113
|
}
|
|
114
|
+
async listAcsSystems(body) {
|
|
115
|
+
const { data } = await this.client.request({
|
|
116
|
+
url: '/user_identities/list_acs_systems',
|
|
117
|
+
method: 'post',
|
|
118
|
+
data: body,
|
|
119
|
+
});
|
|
120
|
+
return data.acs_systems;
|
|
121
|
+
}
|
|
110
122
|
async listAcsUsers(body) {
|
|
111
123
|
const { data } = await this.client.request({
|
|
112
124
|
url: '/user_identities/list_acs_users',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-identities.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/user-identities.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"user-identities.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/user-identities.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAe,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EAExC,2BAA2B,GAQ5B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,6BAA6B,EAC7B,YAAY,GACb,MAAM,mCAAmC,CA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AAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,IAA6C;QAE7C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAA6C;YACpE,GAAG,EAAE,0CAA0C;YAC/C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RouteRequestBody,
|
|
1
|
+
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
|
|
2
2
|
import type { SetNonNullable } from 'type-fest';
|
|
3
3
|
import { type Client } from '../../../../lib/seam/connect/client.js';
|
|
4
4
|
import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../lib/seam/connect/options.js';
|
|
@@ -15,7 +15,7 @@ export declare class SeamHttpWebhooks {
|
|
|
15
15
|
create(body?: WebhooksCreateBody): Promise<WebhooksCreateResponse['webhook']>;
|
|
16
16
|
delete(body?: WebhooksDeleteBody): Promise<void>;
|
|
17
17
|
get(body?: WebhooksGetParams): Promise<WebhooksGetResponse['webhook']>;
|
|
18
|
-
list(
|
|
18
|
+
list(body?: WebhooksListParams): Promise<WebhooksListResponse['webhooks']>;
|
|
19
19
|
}
|
|
20
20
|
export type WebhooksCreateBody = RouteRequestBody<'/webhooks/create'>;
|
|
21
21
|
export type WebhooksCreateResponse = SetNonNullable<Required<RouteResponse<'/webhooks/create'>>>;
|
|
@@ -26,6 +26,6 @@ export type WebhooksDeleteOptions = never;
|
|
|
26
26
|
export type WebhooksGetParams = RouteRequestBody<'/webhooks/get'>;
|
|
27
27
|
export type WebhooksGetResponse = SetNonNullable<Required<RouteResponse<'/webhooks/get'>>>;
|
|
28
28
|
export type WebhooksGetOptions = never;
|
|
29
|
-
export type WebhooksListParams =
|
|
29
|
+
export type WebhooksListParams = RouteRequestBody<'/webhooks/list'>;
|
|
30
30
|
export type WebhooksListResponse = SetNonNullable<Required<RouteResponse<'/webhooks/list'>>>;
|
|
31
31
|
export type WebhooksListOptions = never;
|
|
@@ -84,11 +84,11 @@ export class SeamHttpWebhooks {
|
|
|
84
84
|
});
|
|
85
85
|
return data.webhook;
|
|
86
86
|
}
|
|
87
|
-
async list(
|
|
87
|
+
async list(body) {
|
|
88
88
|
const { data } = await this.client.request({
|
|
89
89
|
url: '/webhooks/list',
|
|
90
|
-
method: '
|
|
91
|
-
|
|
90
|
+
method: 'post',
|
|
91
|
+
data: body,
|
|
92
92
|
});
|
|
93
93
|
return data.webhooks;
|
|
94
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/webhooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/webhooks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAe,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EAExC,2BAA2B,GAQ5B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,6BAA6B,EAC7B,YAAY,GACb,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,MAAM,OAAO,gBAAgB;IAI3B,YAAY,kBAA4C,EAAE;QACxD,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAAA;QAC7C,IAAI,CAAC,MAAM,GAAG,QAAQ,IAAI,OAAO,CAAC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AAyB;QAEzB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAyB;YACjE,GAAG,EAAE,kBAAkB;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;QAEF,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAyB;QACpC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAyB;YAChD,GAAG,EAAE,kBAAkB;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,IAAwB;QAChC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAsB;YAC9D,GAAG,EAAE,eAAe;YACpB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;QAEF,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,IAAI,CACR,IAAyB;QAEzB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuB;YAC/D,GAAG,EAAE,gBAAgB;YACrB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;QAEF,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RouteRequestBody,
|
|
1
|
+
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
|
|
2
2
|
import type { SetNonNullable } from 'type-fest';
|
|
3
3
|
import { type Client } from '../../../../lib/seam/connect/client.js';
|
|
4
4
|
import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../lib/seam/connect/options.js';
|
|
@@ -13,17 +13,17 @@ export declare class SeamHttpWorkspaces {
|
|
|
13
13
|
static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpWorkspaces;
|
|
14
14
|
static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpWorkspaces;
|
|
15
15
|
create(body?: WorkspacesCreateBody): Promise<WorkspacesCreateResponse['workspace']>;
|
|
16
|
-
get(
|
|
17
|
-
list(
|
|
16
|
+
get(body?: WorkspacesGetParams): Promise<WorkspacesGetResponse['workspace']>;
|
|
17
|
+
list(body?: WorkspacesListParams): Promise<WorkspacesListResponse['workspaces']>;
|
|
18
18
|
resetSandbox(body?: WorkspacesResetSandboxBody): Promise<void>;
|
|
19
19
|
}
|
|
20
20
|
export type WorkspacesCreateBody = RouteRequestBody<'/workspaces/create'>;
|
|
21
21
|
export type WorkspacesCreateResponse = SetNonNullable<Required<RouteResponse<'/workspaces/create'>>>;
|
|
22
22
|
export type WorkspacesCreateOptions = never;
|
|
23
|
-
export type WorkspacesGetParams =
|
|
23
|
+
export type WorkspacesGetParams = RouteRequestBody<'/workspaces/get'>;
|
|
24
24
|
export type WorkspacesGetResponse = SetNonNullable<Required<RouteResponse<'/workspaces/get'>>>;
|
|
25
25
|
export type WorkspacesGetOptions = never;
|
|
26
|
-
export type WorkspacesListParams =
|
|
26
|
+
export type WorkspacesListParams = RouteRequestBody<'/workspaces/list'>;
|
|
27
27
|
export type WorkspacesListResponse = SetNonNullable<Required<RouteResponse<'/workspaces/list'>>>;
|
|
28
28
|
export type WorkspacesListOptions = never;
|
|
29
29
|
export type WorkspacesResetSandboxBody = RouteRequestBody<'/workspaces/reset_sandbox'>;
|
|
@@ -69,19 +69,19 @@ export class SeamHttpWorkspaces {
|
|
|
69
69
|
});
|
|
70
70
|
return data.workspace;
|
|
71
71
|
}
|
|
72
|
-
async get(
|
|
72
|
+
async get(body) {
|
|
73
73
|
const { data } = await this.client.request({
|
|
74
74
|
url: '/workspaces/get',
|
|
75
|
-
method: '
|
|
76
|
-
|
|
75
|
+
method: 'post',
|
|
76
|
+
data: body,
|
|
77
77
|
});
|
|
78
78
|
return data.workspace;
|
|
79
79
|
}
|
|
80
|
-
async list(
|
|
80
|
+
async list(body) {
|
|
81
81
|
const { data } = await this.client.request({
|
|
82
82
|
url: '/workspaces/list',
|
|
83
|
-
method: '
|
|
84
|
-
|
|
83
|
+
method: 'post',
|
|
84
|
+
data: body,
|
|
85
85
|
});
|
|
86
86
|
return data.workspaces;
|
|
87
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/workspaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/workspaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAA;AAC1E,OAAO,EAAe,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EAExC,2BAA2B,GAQ5B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,6BAA6B,EAC7B,YAAY,GACb,MAAM,mCAAmC,CAAA;AAE1C,OAAO,EAAE,s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type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from './options.js';
|
|
3
|
-
import { SeamHttpAccessCodes, SeamHttpAcs, SeamHttpActionAttempts, SeamHttpClientSessions, SeamHttpConnectedAccounts, SeamHttpConnectWebviews, SeamHttpDevices, SeamHttpEvents, SeamHttpLocks, SeamHttpNoiseSensors, SeamHttpThermostats, SeamHttpUserIdentities, SeamHttpWebhooks, SeamHttpWorkspaces } from './routes/index.js';
|
|
3
|
+
import { SeamHttpAccessCodes, SeamHttpAcs, SeamHttpActionAttempts, SeamHttpClientSessions, SeamHttpConnectedAccounts, SeamHttpConnectWebviews, SeamHttpDevices, SeamHttpEvents, SeamHttpLocks, SeamHttpNetworks, SeamHttpNoiseSensors, SeamHttpPhones, SeamHttpThermostats, SeamHttpUserIdentities, SeamHttpWebhooks, SeamHttpWorkspaces } from './routes/index.js';
|
|
4
4
|
export declare class SeamHttp {
|
|
5
5
|
client: Client;
|
|
6
6
|
readonly defaults: Required<SeamHttpRequestOptions>;
|
|
@@ -20,7 +20,9 @@ export declare class SeamHttp {
|
|
|
20
20
|
get devices(): SeamHttpDevices;
|
|
21
21
|
get events(): SeamHttpEvents;
|
|
22
22
|
get locks(): SeamHttpLocks;
|
|
23
|
+
get networks(): SeamHttpNetworks;
|
|
23
24
|
get noiseSensors(): SeamHttpNoiseSensors;
|
|
25
|
+
get phones(): SeamHttpPhones;
|
|
24
26
|
get thermostats(): SeamHttpThermostats;
|
|
25
27
|
get userIdentities(): SeamHttpUserIdentities;
|
|
26
28
|
get webhooks(): SeamHttpWebhooks;
|
|
@@ -2,7 +2,7 @@ import { warnOnInsecureuserIdentifierKey } from './auth.js';
|
|
|
2
2
|
import { createClient } from './client.js';
|
|
3
3
|
import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from './options.js';
|
|
4
4
|
import { limitToSeamHttpRequestOptions, parseOptions } from './parse-options.js';
|
|
5
|
-
import { SeamHttpAccessCodes, SeamHttpAcs, SeamHttpActionAttempts, SeamHttpClientSessions, SeamHttpConnectedAccounts, SeamHttpConnectWebviews, SeamHttpDevices, SeamHttpEvents, SeamHttpLocks, SeamHttpNoiseSensors, SeamHttpThermostats, SeamHttpUserIdentities, SeamHttpWebhooks, SeamHttpWorkspaces, } from './routes/index.js';
|
|
5
|
+
import { SeamHttpAccessCodes, SeamHttpAcs, SeamHttpActionAttempts, SeamHttpClientSessions, SeamHttpConnectedAccounts, SeamHttpConnectWebviews, SeamHttpDevices, SeamHttpEvents, SeamHttpLocks, SeamHttpNetworks, SeamHttpNoiseSensors, SeamHttpPhones, SeamHttpThermostats, SeamHttpUserIdentities, SeamHttpWebhooks, SeamHttpWorkspaces, } from './routes/index.js';
|
|
6
6
|
export class SeamHttp {
|
|
7
7
|
constructor(apiKeyOrOptions = {}) {
|
|
8
8
|
const options = parseOptions(apiKeyOrOptions);
|
|
@@ -84,9 +84,15 @@ export class SeamHttp {
|
|
|
84
84
|
get locks() {
|
|
85
85
|
return SeamHttpLocks.fromClient(this.client, this.defaults);
|
|
86
86
|
}
|
|
87
|
+
get networks() {
|
|
88
|
+
return SeamHttpNetworks.fromClient(this.client, this.defaults);
|
|
89
|
+
}
|
|
87
90
|
get noiseSensors() {
|
|
88
91
|
return SeamHttpNoiseSensors.fromClient(this.client, this.defaults);
|
|
89
92
|
}
|
|
93
|
+
get phones() {
|
|
94
|
+
return SeamHttpPhones.fromClient(this.client, this.defaults);
|
|
95
|
+
}
|
|
90
96
|
get thermostats() {
|
|
91
97
|
return SeamHttpThermostats.fromClient(this.client, this.defaults);
|
|
92
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seam-http.js","source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AAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IAChE,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IAClE,CAAC;CACF"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const seamapiJavascriptHttpVersion = "0.
|
|
1
|
+
declare const seamapiJavascriptHttpVersion = "0.14.1";
|
|
2
2
|
export default seamapiJavascriptHttpVersion;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamapi/http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "JavaScript HTTP client for the Seam API written in TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -107,14 +107,14 @@
|
|
|
107
107
|
"@types/eslint": "^8.44.2",
|
|
108
108
|
"@types/node": "^20.8.10",
|
|
109
109
|
"ava": "^5.0.1",
|
|
110
|
-
"c8": "^
|
|
110
|
+
"c8": "^9.0.0",
|
|
111
111
|
"change-case": "^5.0.2",
|
|
112
112
|
"concurrently": "^8.2.1",
|
|
113
113
|
"del-cli": "^5.0.0",
|
|
114
114
|
"eslint": "^8.9.0",
|
|
115
115
|
"eslint-config-prettier": "^9.0.0",
|
|
116
116
|
"eslint-config-standard": "^17.1.0",
|
|
117
|
-
"eslint-config-standard-with-typescript": "^
|
|
117
|
+
"eslint-config-standard-with-typescript": "^43.0.0",
|
|
118
118
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
119
119
|
"eslint-plugin-unused-imports": "^3.0.0",
|
|
120
120
|
"execa": "^8.0.1",
|
|
@@ -97,6 +97,23 @@ const getApiKeyFromEnv = (
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
const getEndpointFromEnv = (): string | null | undefined => {
|
|
100
|
+
if (globalThis.process?.env?.SEAM_API_URL != null) {
|
|
101
|
+
// eslint-disable-next-line no-console
|
|
102
|
+
console.warn(
|
|
103
|
+
'Using the SEAM_API_URL environment variable is deprecated. Support will be remove in a later major version. Use SEAM_ENDPOINT instead.',
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (
|
|
108
|
+
globalThis.process?.env?.SEAM_API_URL != null &&
|
|
109
|
+
globalThis.process?.env?.SEAM_ENDPOINT != null
|
|
110
|
+
) {
|
|
111
|
+
// eslint-disable-next-line no-console
|
|
112
|
+
console.warn(
|
|
113
|
+
'Detected both the SEAM_API_URL and SEAM_ENDPOINT environment variables. Using SEAM_ENDPOINT.',
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
|
|
100
117
|
return (
|
|
101
118
|
globalThis.process?.env?.SEAM_ENDPOINT ??
|
|
102
119
|
globalThis.process?.env?.SEAM_API_URL
|