@seamapi/http 1.116.0 → 1.118.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 +364 -16
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +146 -17
- package/dist/index.cjs +368 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/access-methods/access-methods.d.ts +24 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js +18 -0
- package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -1
- package/lib/seam/connect/routes/acs/encoders/encoders.d.ts +12 -0
- package/lib/seam/connect/routes/acs/encoders/encoders.js +9 -0
- package/lib/seam/connect/routes/acs/encoders/encoders.js.map +1 -1
- package/lib/seam/connect/routes/seam/console/v1/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/console/v1/index.js +1 -0
- package/lib/seam/connect/routes/seam/console/v1/index.js.map +1 -1
- package/lib/seam/connect/routes/seam/console/v1/sites/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/console/v1/sites/index.js +6 -0
- package/lib/seam/connect/routes/seam/console/v1/sites/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/v1/sites/sites.d.ts +73 -0
- package/lib/seam/connect/routes/seam/console/v1/sites/sites.js +140 -0
- package/lib/seam/connect/routes/seam/console/v1/sites/sites.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/v1/v1.d.ts +2 -0
- package/lib/seam/connect/routes/seam/console/v1/v1.js +4 -0
- package/lib/seam/connect/routes/seam/console/v1/v1.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.d.ts +2 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js +4 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.d.ts +34 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.js +104 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.d.ts +0 -13
- package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.js +0 -12
- package/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/connectors/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/index.js +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/connectors/index.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +15 -6
- package/lib/seam/connect/routes/seam-http-endpoints.js +67 -4
- package/lib/seam/connect/routes/seam-http-endpoints.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 +76 -0
- package/src/lib/seam/connect/routes/acs/encoders/encoders.ts +39 -0
- package/src/lib/seam/connect/routes/seam/console/v1/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam/console/v1/sites/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/console/v1/sites/sites.ts +327 -0
- package/src/lib/seam/connect/routes/seam/console/v1/v1.ts +5 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts +8 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts +214 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts +0 -41
- package/src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +158 -15
- package/src/lib/version.ts +1 -1
package/dist/connect.cjs
CHANGED
|
@@ -1862,6 +1862,15 @@ var SeamHttpAccessMethods = class _SeamHttpAccessMethods {
|
|
|
1862
1862
|
get unmanaged() {
|
|
1863
1863
|
return SeamHttpAccessMethodsUnmanaged.fromClient(this.client, this.defaults);
|
|
1864
1864
|
}
|
|
1865
|
+
assignCard(parameters, options = {}) {
|
|
1866
|
+
return new SeamHttpRequest(this, {
|
|
1867
|
+
pathname: "/access_methods/assign_card",
|
|
1868
|
+
method: "POST",
|
|
1869
|
+
body: parameters,
|
|
1870
|
+
responseKey: "action_attempt",
|
|
1871
|
+
options
|
|
1872
|
+
});
|
|
1873
|
+
}
|
|
1865
1874
|
delete(parameters, options = {}) {
|
|
1866
1875
|
return new SeamHttpRequest(this, {
|
|
1867
1876
|
pathname: "/access_methods/delete",
|
|
@@ -1907,6 +1916,15 @@ var SeamHttpAccessMethods = class _SeamHttpAccessMethods {
|
|
|
1907
1916
|
options
|
|
1908
1917
|
});
|
|
1909
1918
|
}
|
|
1919
|
+
unlockDoor(parameters, options = {}) {
|
|
1920
|
+
return new SeamHttpRequest(this, {
|
|
1921
|
+
pathname: "/access_methods/unlock_door",
|
|
1922
|
+
method: "POST",
|
|
1923
|
+
body: parameters,
|
|
1924
|
+
responseKey: "action_attempt",
|
|
1925
|
+
options
|
|
1926
|
+
});
|
|
1927
|
+
}
|
|
1910
1928
|
};
|
|
1911
1929
|
|
|
1912
1930
|
// src/lib/seam/connect/routes/acs/access-groups/unmanaged/unmanaged.ts
|
|
@@ -2944,6 +2962,15 @@ var SeamHttpAcsEncoders = class _SeamHttpAcsEncoders {
|
|
|
2944
2962
|
options
|
|
2945
2963
|
});
|
|
2946
2964
|
}
|
|
2965
|
+
scanToAssignCredential(parameters, options = {}) {
|
|
2966
|
+
return new SeamHttpRequest(this, {
|
|
2967
|
+
pathname: "/acs/encoders/scan_to_assign_credential",
|
|
2968
|
+
method: "POST",
|
|
2969
|
+
body: parameters,
|
|
2970
|
+
responseKey: "action_attempt",
|
|
2971
|
+
options
|
|
2972
|
+
});
|
|
2973
|
+
}
|
|
2947
2974
|
};
|
|
2948
2975
|
|
|
2949
2976
|
// src/lib/seam/connect/routes/acs/entrances/entrances.ts
|
|
@@ -5823,6 +5850,153 @@ var SeamHttpPhones = class _SeamHttpPhones {
|
|
|
5823
5850
|
}
|
|
5824
5851
|
};
|
|
5825
5852
|
|
|
5853
|
+
// src/lib/seam/connect/routes/seam/console/v1/sites/sites.ts
|
|
5854
|
+
var SeamHttpSeamConsoleV1Sites = class _SeamHttpSeamConsoleV1Sites {
|
|
5855
|
+
client;
|
|
5856
|
+
defaults;
|
|
5857
|
+
ltsVersion = seamApiLtsVersion;
|
|
5858
|
+
static ltsVersion = seamApiLtsVersion;
|
|
5859
|
+
constructor(apiKeyOrOptions = {}) {
|
|
5860
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
5861
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
5862
|
+
throw new Error(
|
|
5863
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5864
|
+
);
|
|
5865
|
+
}
|
|
5866
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
5867
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
5868
|
+
}
|
|
5869
|
+
static fromClient(client, options = {}) {
|
|
5870
|
+
const constructorOptions = { ...options, client };
|
|
5871
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
5872
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
5873
|
+
}
|
|
5874
|
+
return new _SeamHttpSeamConsoleV1Sites(constructorOptions);
|
|
5875
|
+
}
|
|
5876
|
+
static fromApiKey(apiKey, options = {}) {
|
|
5877
|
+
const constructorOptions = { ...options, apiKey };
|
|
5878
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
5879
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
5880
|
+
}
|
|
5881
|
+
return new _SeamHttpSeamConsoleV1Sites(constructorOptions);
|
|
5882
|
+
}
|
|
5883
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
5884
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
5885
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
5886
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
5887
|
+
}
|
|
5888
|
+
return new _SeamHttpSeamConsoleV1Sites(constructorOptions);
|
|
5889
|
+
}
|
|
5890
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
5891
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
5892
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
5893
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
5894
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5895
|
+
"The client option cannot be used with SeamHttpSeamConsoleV1Sites.fromPublishableKey"
|
|
5896
|
+
);
|
|
5897
|
+
}
|
|
5898
|
+
const client = createClient(clientOptions);
|
|
5899
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
5900
|
+
const { token } = await clientSessions.getOrCreate({
|
|
5901
|
+
user_identifier_key: userIdentifierKey
|
|
5902
|
+
});
|
|
5903
|
+
return _SeamHttpSeamConsoleV1Sites.fromClientSessionToken(token, options);
|
|
5904
|
+
}
|
|
5905
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
5906
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
5907
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
5908
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5909
|
+
"Missing consoleSessionToken or workspaceId"
|
|
5910
|
+
);
|
|
5911
|
+
}
|
|
5912
|
+
return new _SeamHttpSeamConsoleV1Sites(constructorOptions);
|
|
5913
|
+
}
|
|
5914
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
5915
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
5916
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
5917
|
+
throw new SeamHttpInvalidOptionsError(
|
|
5918
|
+
"Missing personalAccessToken or workspaceId"
|
|
5919
|
+
);
|
|
5920
|
+
}
|
|
5921
|
+
return new _SeamHttpSeamConsoleV1Sites(constructorOptions);
|
|
5922
|
+
}
|
|
5923
|
+
createPaginator(request) {
|
|
5924
|
+
return new SeamPaginator(this, request);
|
|
5925
|
+
}
|
|
5926
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
5927
|
+
const { headers } = this.client.defaults;
|
|
5928
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
5929
|
+
clientSessionToken
|
|
5930
|
+
});
|
|
5931
|
+
for (const key of Object.keys(authHeaders)) {
|
|
5932
|
+
if (headers[key] == null) {
|
|
5933
|
+
throw new Error(
|
|
5934
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
5935
|
+
);
|
|
5936
|
+
}
|
|
5937
|
+
}
|
|
5938
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
5939
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
5940
|
+
await clientSessions.get();
|
|
5941
|
+
}
|
|
5942
|
+
create(parameters, options = {}) {
|
|
5943
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5944
|
+
throw new Error(
|
|
5945
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5946
|
+
);
|
|
5947
|
+
}
|
|
5948
|
+
return new SeamHttpRequest(this, {
|
|
5949
|
+
pathname: "/seam/console/v1/sites/create",
|
|
5950
|
+
method: "POST",
|
|
5951
|
+
body: parameters,
|
|
5952
|
+
responseKey: "site",
|
|
5953
|
+
options
|
|
5954
|
+
});
|
|
5955
|
+
}
|
|
5956
|
+
delete(parameters, options = {}) {
|
|
5957
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5958
|
+
throw new Error(
|
|
5959
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5960
|
+
);
|
|
5961
|
+
}
|
|
5962
|
+
return new SeamHttpRequest(this, {
|
|
5963
|
+
pathname: "/seam/console/v1/sites/delete",
|
|
5964
|
+
method: "POST",
|
|
5965
|
+
body: parameters,
|
|
5966
|
+
responseKey: void 0,
|
|
5967
|
+
options
|
|
5968
|
+
});
|
|
5969
|
+
}
|
|
5970
|
+
list(parameters, options = {}) {
|
|
5971
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5972
|
+
throw new Error(
|
|
5973
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5974
|
+
);
|
|
5975
|
+
}
|
|
5976
|
+
return new SeamHttpRequest(this, {
|
|
5977
|
+
pathname: "/seam/console/v1/sites/list",
|
|
5978
|
+
method: "POST",
|
|
5979
|
+
body: parameters,
|
|
5980
|
+
responseKey: "sites",
|
|
5981
|
+
options
|
|
5982
|
+
});
|
|
5983
|
+
}
|
|
5984
|
+
update(parameters, options = {}) {
|
|
5985
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
5986
|
+
throw new Error(
|
|
5987
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
5988
|
+
);
|
|
5989
|
+
}
|
|
5990
|
+
return new SeamHttpRequest(this, {
|
|
5991
|
+
pathname: "/seam/console/v1/sites/update",
|
|
5992
|
+
method: "PATCH",
|
|
5993
|
+
body: parameters,
|
|
5994
|
+
responseKey: "site",
|
|
5995
|
+
options
|
|
5996
|
+
});
|
|
5997
|
+
}
|
|
5998
|
+
};
|
|
5999
|
+
|
|
5826
6000
|
// src/lib/seam/connect/routes/seam/console/v1/timelines/timelines.ts
|
|
5827
6001
|
var SeamHttpSeamConsoleV1Timelines = class _SeamHttpSeamConsoleV1Timelines {
|
|
5828
6002
|
client;
|
|
@@ -6017,6 +6191,9 @@ var SeamHttpSeamConsoleV1 = class _SeamHttpSeamConsoleV1 {
|
|
|
6017
6191
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6018
6192
|
await clientSessions.get();
|
|
6019
6193
|
}
|
|
6194
|
+
get sites() {
|
|
6195
|
+
return SeamHttpSeamConsoleV1Sites.fromClient(this.client, this.defaults);
|
|
6196
|
+
}
|
|
6020
6197
|
get timelines() {
|
|
6021
6198
|
return SeamHttpSeamConsoleV1Timelines.fromClient(this.client, this.defaults);
|
|
6022
6199
|
}
|
|
@@ -6712,8 +6889,8 @@ var SeamHttpSeamCustomerV1ConnectorCustomers = class _SeamHttpSeamCustomerV1Conn
|
|
|
6712
6889
|
}
|
|
6713
6890
|
};
|
|
6714
6891
|
|
|
6715
|
-
// src/lib/seam/connect/routes/seam/customer/v1/connectors/
|
|
6716
|
-
var
|
|
6892
|
+
// src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts
|
|
6893
|
+
var SeamHttpSeamCustomerV1ConnectorsExternalSites = class _SeamHttpSeamCustomerV1ConnectorsExternalSites {
|
|
6717
6894
|
client;
|
|
6718
6895
|
defaults;
|
|
6719
6896
|
ltsVersion = seamApiLtsVersion;
|
|
@@ -6733,28 +6910,28 @@ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1Connecto
|
|
|
6733
6910
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
6734
6911
|
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
6735
6912
|
}
|
|
6736
|
-
return new
|
|
6913
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
6737
6914
|
}
|
|
6738
6915
|
static fromApiKey(apiKey, options = {}) {
|
|
6739
6916
|
const constructorOptions = { ...options, apiKey };
|
|
6740
6917
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
6741
6918
|
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
6742
6919
|
}
|
|
6743
|
-
return new
|
|
6920
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
6744
6921
|
}
|
|
6745
6922
|
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
6746
6923
|
const constructorOptions = { ...options, clientSessionToken };
|
|
6747
6924
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
6748
6925
|
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
6749
6926
|
}
|
|
6750
|
-
return new
|
|
6927
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
6751
6928
|
}
|
|
6752
6929
|
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
6753
6930
|
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
6754
6931
|
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
6755
6932
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
6756
6933
|
throw new SeamHttpInvalidOptionsError(
|
|
6757
|
-
"The client option cannot be used with
|
|
6934
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1ConnectorsExternalSites.fromPublishableKey"
|
|
6758
6935
|
);
|
|
6759
6936
|
}
|
|
6760
6937
|
const client = createClient(clientOptions);
|
|
@@ -6762,7 +6939,7 @@ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1Connecto
|
|
|
6762
6939
|
const { token } = await clientSessions.getOrCreate({
|
|
6763
6940
|
user_identifier_key: userIdentifierKey
|
|
6764
6941
|
});
|
|
6765
|
-
return
|
|
6942
|
+
return _SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClientSessionToken(
|
|
6766
6943
|
token,
|
|
6767
6944
|
options
|
|
6768
6945
|
);
|
|
@@ -6774,7 +6951,7 @@ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1Connecto
|
|
|
6774
6951
|
"Missing consoleSessionToken or workspaceId"
|
|
6775
6952
|
);
|
|
6776
6953
|
}
|
|
6777
|
-
return new
|
|
6954
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
6778
6955
|
}
|
|
6779
6956
|
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
6780
6957
|
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
@@ -6783,7 +6960,7 @@ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1Connecto
|
|
|
6783
6960
|
"Missing personalAccessToken or workspaceId"
|
|
6784
6961
|
);
|
|
6785
6962
|
}
|
|
6786
|
-
return new
|
|
6963
|
+
return new _SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions);
|
|
6787
6964
|
}
|
|
6788
6965
|
createPaginator(request) {
|
|
6789
6966
|
return new SeamPaginator(this, request);
|
|
@@ -6804,19 +6981,113 @@ var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1Connecto
|
|
|
6804
6981
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6805
6982
|
await clientSessions.get();
|
|
6806
6983
|
}
|
|
6807
|
-
|
|
6984
|
+
list(parameters, options = {}) {
|
|
6808
6985
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6809
6986
|
throw new Error(
|
|
6810
6987
|
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6811
6988
|
);
|
|
6812
6989
|
}
|
|
6813
6990
|
return new SeamHttpRequest(this, {
|
|
6814
|
-
pathname: "/seam/customer/v1/connectors/
|
|
6991
|
+
pathname: "/seam/customer/v1/connectors/external_sites/list",
|
|
6815
6992
|
method: "POST",
|
|
6816
6993
|
body: parameters,
|
|
6817
|
-
responseKey: "
|
|
6994
|
+
responseKey: "external_sites",
|
|
6995
|
+
options
|
|
6996
|
+
});
|
|
6997
|
+
}
|
|
6998
|
+
};
|
|
6999
|
+
|
|
7000
|
+
// src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts
|
|
7001
|
+
var SeamHttpSeamCustomerV1ConnectorsIcal = class _SeamHttpSeamCustomerV1ConnectorsIcal {
|
|
7002
|
+
client;
|
|
7003
|
+
defaults;
|
|
7004
|
+
ltsVersion = seamApiLtsVersion;
|
|
7005
|
+
static ltsVersion = seamApiLtsVersion;
|
|
7006
|
+
constructor(apiKeyOrOptions = {}) {
|
|
7007
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
7008
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
7009
|
+
throw new Error(
|
|
7010
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7011
|
+
);
|
|
7012
|
+
}
|
|
7013
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
7014
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
7015
|
+
}
|
|
7016
|
+
static fromClient(client, options = {}) {
|
|
7017
|
+
const constructorOptions = { ...options, client };
|
|
7018
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
7019
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
7020
|
+
}
|
|
7021
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7022
|
+
}
|
|
7023
|
+
static fromApiKey(apiKey, options = {}) {
|
|
7024
|
+
const constructorOptions = { ...options, apiKey };
|
|
7025
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
7026
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
7027
|
+
}
|
|
7028
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7029
|
+
}
|
|
7030
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
7031
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
7032
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
7033
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
7034
|
+
}
|
|
7035
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7036
|
+
}
|
|
7037
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7038
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7039
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7040
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7041
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7042
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1ConnectorsIcal.fromPublishableKey"
|
|
7043
|
+
);
|
|
7044
|
+
}
|
|
7045
|
+
const client = createClient(clientOptions);
|
|
7046
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
7047
|
+
const { token } = await clientSessions.getOrCreate({
|
|
7048
|
+
user_identifier_key: userIdentifierKey
|
|
7049
|
+
});
|
|
7050
|
+
return _SeamHttpSeamCustomerV1ConnectorsIcal.fromClientSessionToken(
|
|
7051
|
+
token,
|
|
6818
7052
|
options
|
|
7053
|
+
);
|
|
7054
|
+
}
|
|
7055
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
7056
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
7057
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
7058
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7059
|
+
"Missing consoleSessionToken or workspaceId"
|
|
7060
|
+
);
|
|
7061
|
+
}
|
|
7062
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7063
|
+
}
|
|
7064
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7065
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
7066
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
7067
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7068
|
+
"Missing personalAccessToken or workspaceId"
|
|
7069
|
+
);
|
|
7070
|
+
}
|
|
7071
|
+
return new _SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions);
|
|
7072
|
+
}
|
|
7073
|
+
createPaginator(request) {
|
|
7074
|
+
return new SeamPaginator(this, request);
|
|
7075
|
+
}
|
|
7076
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
7077
|
+
const { headers } = this.client.defaults;
|
|
7078
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
7079
|
+
clientSessionToken
|
|
6819
7080
|
});
|
|
7081
|
+
for (const key of Object.keys(authHeaders)) {
|
|
7082
|
+
if (headers[key] == null) {
|
|
7083
|
+
throw new Error(
|
|
7084
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
7085
|
+
);
|
|
7086
|
+
}
|
|
7087
|
+
}
|
|
7088
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
7089
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7090
|
+
await clientSessions.get();
|
|
6820
7091
|
}
|
|
6821
7092
|
validateConfig(parameters, options = {}) {
|
|
6822
7093
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -6926,6 +7197,12 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
6926
7197
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6927
7198
|
await clientSessions.get();
|
|
6928
7199
|
}
|
|
7200
|
+
get externalSites() {
|
|
7201
|
+
return SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClient(
|
|
7202
|
+
this.client,
|
|
7203
|
+
this.defaults
|
|
7204
|
+
);
|
|
7205
|
+
}
|
|
6929
7206
|
get ical() {
|
|
6930
7207
|
return SeamHttpSeamCustomerV1ConnectorsIcal.fromClient(
|
|
6931
7208
|
this.client,
|
|
@@ -11037,6 +11314,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11037
11314
|
return seam.update(...args);
|
|
11038
11315
|
};
|
|
11039
11316
|
}
|
|
11317
|
+
get "/access_methods/assign_card"() {
|
|
11318
|
+
const { client, defaults } = this;
|
|
11319
|
+
return function accessMethodsAssignCard(...args) {
|
|
11320
|
+
const seam = SeamHttpAccessMethods.fromClient(client, defaults);
|
|
11321
|
+
return seam.assignCard(...args);
|
|
11322
|
+
};
|
|
11323
|
+
}
|
|
11040
11324
|
get "/access_methods/delete"() {
|
|
11041
11325
|
const { client, defaults } = this;
|
|
11042
11326
|
return function accessMethodsDelete(...args) {
|
|
@@ -11072,6 +11356,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11072
11356
|
return seam.list(...args);
|
|
11073
11357
|
};
|
|
11074
11358
|
}
|
|
11359
|
+
get "/access_methods/unlock_door"() {
|
|
11360
|
+
const { client, defaults } = this;
|
|
11361
|
+
return function accessMethodsUnlockDoor(...args) {
|
|
11362
|
+
const seam = SeamHttpAccessMethods.fromClient(client, defaults);
|
|
11363
|
+
return seam.unlockDoor(...args);
|
|
11364
|
+
};
|
|
11365
|
+
}
|
|
11075
11366
|
get "/access_methods/unmanaged/get"() {
|
|
11076
11367
|
const { client, defaults } = this;
|
|
11077
11368
|
return function accessMethodsUnmanagedGet(...args) {
|
|
@@ -11306,6 +11597,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11306
11597
|
return seam.scanCredential(...args);
|
|
11307
11598
|
};
|
|
11308
11599
|
}
|
|
11600
|
+
get "/acs/encoders/scan_to_assign_credential"() {
|
|
11601
|
+
const { client, defaults } = this;
|
|
11602
|
+
return function acsEncodersScanToAssignCredential(...args) {
|
|
11603
|
+
const seam = SeamHttpAcsEncoders.fromClient(client, defaults);
|
|
11604
|
+
return seam.scanToAssignCredential(...args);
|
|
11605
|
+
};
|
|
11606
|
+
}
|
|
11309
11607
|
get "/acs/encoders/simulate/next_credential_encode_will_fail"() {
|
|
11310
11608
|
const { client, defaults } = this;
|
|
11311
11609
|
return function acsEncodersSimulateNextCredentialEncodeWillFail(...args) {
|
|
@@ -11989,6 +12287,54 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11989
12287
|
return seam.getResourceLocator(...args);
|
|
11990
12288
|
};
|
|
11991
12289
|
}
|
|
12290
|
+
get "/seam/console/v1/sites/create"() {
|
|
12291
|
+
const { client, defaults } = this;
|
|
12292
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12293
|
+
throw new Error(
|
|
12294
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12295
|
+
);
|
|
12296
|
+
}
|
|
12297
|
+
return function seamConsoleV1SitesCreate(...args) {
|
|
12298
|
+
const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults);
|
|
12299
|
+
return seam.create(...args);
|
|
12300
|
+
};
|
|
12301
|
+
}
|
|
12302
|
+
get "/seam/console/v1/sites/delete"() {
|
|
12303
|
+
const { client, defaults } = this;
|
|
12304
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12305
|
+
throw new Error(
|
|
12306
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12307
|
+
);
|
|
12308
|
+
}
|
|
12309
|
+
return function seamConsoleV1SitesDelete(...args) {
|
|
12310
|
+
const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults);
|
|
12311
|
+
return seam.delete(...args);
|
|
12312
|
+
};
|
|
12313
|
+
}
|
|
12314
|
+
get "/seam/console/v1/sites/list"() {
|
|
12315
|
+
const { client, defaults } = this;
|
|
12316
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12317
|
+
throw new Error(
|
|
12318
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12319
|
+
);
|
|
12320
|
+
}
|
|
12321
|
+
return function seamConsoleV1SitesList(...args) {
|
|
12322
|
+
const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults);
|
|
12323
|
+
return seam.list(...args);
|
|
12324
|
+
};
|
|
12325
|
+
}
|
|
12326
|
+
get "/seam/console/v1/sites/update"() {
|
|
12327
|
+
const { client, defaults } = this;
|
|
12328
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12329
|
+
throw new Error(
|
|
12330
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12331
|
+
);
|
|
12332
|
+
}
|
|
12333
|
+
return function seamConsoleV1SitesUpdate(...args) {
|
|
12334
|
+
const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults);
|
|
12335
|
+
return seam.update(...args);
|
|
12336
|
+
};
|
|
12337
|
+
}
|
|
11992
12338
|
get "/seam/console/v1/timelines/get"() {
|
|
11993
12339
|
const { client, defaults } = this;
|
|
11994
12340
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -12205,19 +12551,19 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
12205
12551
|
return seam.update(...args);
|
|
12206
12552
|
};
|
|
12207
12553
|
}
|
|
12208
|
-
get "/seam/customer/v1/connectors/
|
|
12554
|
+
get "/seam/customer/v1/connectors/external_sites/list"() {
|
|
12209
12555
|
const { client, defaults } = this;
|
|
12210
12556
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12211
12557
|
throw new Error(
|
|
12212
12558
|
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12213
12559
|
);
|
|
12214
12560
|
}
|
|
12215
|
-
return function
|
|
12216
|
-
const seam =
|
|
12561
|
+
return function seamCustomerV1ConnectorsExternalSitesList(...args) {
|
|
12562
|
+
const seam = SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClient(
|
|
12217
12563
|
client,
|
|
12218
12564
|
defaults
|
|
12219
12565
|
);
|
|
12220
|
-
return seam.
|
|
12566
|
+
return seam.list(...args);
|
|
12221
12567
|
};
|
|
12222
12568
|
}
|
|
12223
12569
|
get "/seam/customer/v1/connectors/ical/validate-config"() {
|
|
@@ -13356,6 +13702,7 @@ exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
|
|
|
13356
13702
|
exports.SeamHttpRequest = SeamHttpRequest;
|
|
13357
13703
|
exports.SeamHttpSeamConsole = SeamHttpSeamConsole;
|
|
13358
13704
|
exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
|
|
13705
|
+
exports.SeamHttpSeamConsoleV1Sites = SeamHttpSeamConsoleV1Sites;
|
|
13359
13706
|
exports.SeamHttpSeamConsoleV1Timelines = SeamHttpSeamConsoleV1Timelines;
|
|
13360
13707
|
exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
|
|
13361
13708
|
exports.SeamHttpSeamCustomerV1AccessGrants = SeamHttpSeamCustomerV1AccessGrants;
|
|
@@ -13364,6 +13711,7 @@ exports.SeamHttpSeamCustomerV1AutomationRuns = SeamHttpSeamCustomerV1AutomationR
|
|
|
13364
13711
|
exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|
|
13365
13712
|
exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
|
|
13366
13713
|
exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
|
|
13714
|
+
exports.SeamHttpSeamCustomerV1ConnectorsExternalSites = SeamHttpSeamCustomerV1ConnectorsExternalSites;
|
|
13367
13715
|
exports.SeamHttpSeamCustomerV1ConnectorsIcal = SeamHttpSeamCustomerV1ConnectorsIcal;
|
|
13368
13716
|
exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
|
|
13369
13717
|
exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
|