@seamapi/http 1.105.2 → 1.107.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 +152 -2
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +62 -4
- package/dist/index.cjs +154 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/acs/entrances/entrances.d.ts +12 -0
- package/lib/seam/connect/routes/acs/entrances/entrances.js +9 -0
- package/lib/seam/connect/routes/acs/entrances/entrances.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/automations/automations.d.ts +2 -2
- package/lib/seam/connect/routes/seam/customer/v1/automations/automations.js +2 -2
- package/lib/seam/connect/routes/seam/customer/v1/automations/automations.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.d.ts +47 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.js +107 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/customers.d.ts +2 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/customers.js +4 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/customers.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/customers/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/index.js +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/customers/index.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +7 -3
- package/lib/seam/connect/routes/seam-http-endpoints.js +22 -0
- 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/acs/entrances/entrances.ts +38 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/automations/automations.ts +4 -8
- package/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.ts +244 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts +9 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/customers/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +60 -0
- package/src/lib/version.ts +1 -1
package/dist/connect.cjs
CHANGED
|
@@ -3061,6 +3061,15 @@ var SeamHttpAcsEntrances = class _SeamHttpAcsEntrances {
|
|
|
3061
3061
|
options
|
|
3062
3062
|
});
|
|
3063
3063
|
}
|
|
3064
|
+
unlock(parameters, options = {}) {
|
|
3065
|
+
return new SeamHttpRequest(this, {
|
|
3066
|
+
pathname: "/acs/entrances/unlock",
|
|
3067
|
+
method: "POST",
|
|
3068
|
+
body: parameters,
|
|
3069
|
+
responseKey: "action_attempt",
|
|
3070
|
+
options
|
|
3071
|
+
});
|
|
3072
|
+
}
|
|
3064
3073
|
};
|
|
3065
3074
|
|
|
3066
3075
|
// src/lib/seam/connect/routes/acs/systems/systems.ts
|
|
@@ -6549,8 +6558,8 @@ var SeamHttpSeamCustomerV1Automations = class _SeamHttpSeamCustomerV1Automations
|
|
|
6549
6558
|
}
|
|
6550
6559
|
return new SeamHttpRequest(this, {
|
|
6551
6560
|
pathname: "/seam/customer/v1/automations/get",
|
|
6552
|
-
method: "
|
|
6553
|
-
|
|
6561
|
+
method: "POST",
|
|
6562
|
+
body: parameters,
|
|
6554
6563
|
responseKey: void 0,
|
|
6555
6564
|
options
|
|
6556
6565
|
});
|
|
@@ -6871,6 +6880,113 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
6871
6880
|
}
|
|
6872
6881
|
};
|
|
6873
6882
|
|
|
6883
|
+
// src/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.ts
|
|
6884
|
+
var SeamHttpSeamCustomerV1CustomersAutomations = class _SeamHttpSeamCustomerV1CustomersAutomations {
|
|
6885
|
+
client;
|
|
6886
|
+
defaults;
|
|
6887
|
+
ltsVersion = seamApiLtsVersion;
|
|
6888
|
+
static ltsVersion = seamApiLtsVersion;
|
|
6889
|
+
constructor(apiKeyOrOptions = {}) {
|
|
6890
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
6891
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
6892
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
6893
|
+
}
|
|
6894
|
+
static fromClient(client, options = {}) {
|
|
6895
|
+
const constructorOptions = { ...options, client };
|
|
6896
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
6897
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
6898
|
+
}
|
|
6899
|
+
return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
|
|
6900
|
+
}
|
|
6901
|
+
static fromApiKey(apiKey, options = {}) {
|
|
6902
|
+
const constructorOptions = { ...options, apiKey };
|
|
6903
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
6904
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
6905
|
+
}
|
|
6906
|
+
return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
|
|
6907
|
+
}
|
|
6908
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
6909
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
6910
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
6911
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
6912
|
+
}
|
|
6913
|
+
return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
|
|
6914
|
+
}
|
|
6915
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
6916
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
6917
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
6918
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
6919
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6920
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1CustomersAutomations.fromPublishableKey"
|
|
6921
|
+
);
|
|
6922
|
+
}
|
|
6923
|
+
const client = createClient(clientOptions);
|
|
6924
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
6925
|
+
const { token } = await clientSessions.getOrCreate({
|
|
6926
|
+
user_identifier_key: userIdentifierKey
|
|
6927
|
+
});
|
|
6928
|
+
return _SeamHttpSeamCustomerV1CustomersAutomations.fromClientSessionToken(
|
|
6929
|
+
token,
|
|
6930
|
+
options
|
|
6931
|
+
);
|
|
6932
|
+
}
|
|
6933
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
6934
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
6935
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
6936
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6937
|
+
"Missing consoleSessionToken or workspaceId"
|
|
6938
|
+
);
|
|
6939
|
+
}
|
|
6940
|
+
return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
|
|
6941
|
+
}
|
|
6942
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
6943
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
6944
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
6945
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6946
|
+
"Missing personalAccessToken or workspaceId"
|
|
6947
|
+
);
|
|
6948
|
+
}
|
|
6949
|
+
return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
|
|
6950
|
+
}
|
|
6951
|
+
createPaginator(request) {
|
|
6952
|
+
return new SeamPaginator(this, request);
|
|
6953
|
+
}
|
|
6954
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
6955
|
+
const { headers } = this.client.defaults;
|
|
6956
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
6957
|
+
clientSessionToken
|
|
6958
|
+
});
|
|
6959
|
+
for (const key of Object.keys(authHeaders)) {
|
|
6960
|
+
if (headers[key] == null) {
|
|
6961
|
+
throw new Error(
|
|
6962
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
6963
|
+
);
|
|
6964
|
+
}
|
|
6965
|
+
}
|
|
6966
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
6967
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6968
|
+
await clientSessions.get();
|
|
6969
|
+
}
|
|
6970
|
+
get(parameters, options = {}) {
|
|
6971
|
+
return new SeamHttpRequest(this, {
|
|
6972
|
+
pathname: "/seam/customer/v1/customers/automations/get",
|
|
6973
|
+
method: "GET",
|
|
6974
|
+
params: parameters,
|
|
6975
|
+
responseKey: "automation",
|
|
6976
|
+
options
|
|
6977
|
+
});
|
|
6978
|
+
}
|
|
6979
|
+
update(parameters, options = {}) {
|
|
6980
|
+
return new SeamHttpRequest(this, {
|
|
6981
|
+
pathname: "/seam/customer/v1/customers/automations/update",
|
|
6982
|
+
method: "PATCH",
|
|
6983
|
+
body: parameters,
|
|
6984
|
+
responseKey: void 0,
|
|
6985
|
+
options
|
|
6986
|
+
});
|
|
6987
|
+
}
|
|
6988
|
+
};
|
|
6989
|
+
|
|
6874
6990
|
// src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts
|
|
6875
6991
|
var SeamHttpSeamCustomerV1Customers = class _SeamHttpSeamCustomerV1Customers {
|
|
6876
6992
|
client;
|
|
@@ -6958,6 +7074,12 @@ var SeamHttpSeamCustomerV1Customers = class _SeamHttpSeamCustomerV1Customers {
|
|
|
6958
7074
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6959
7075
|
await clientSessions.get();
|
|
6960
7076
|
}
|
|
7077
|
+
get automations() {
|
|
7078
|
+
return SeamHttpSeamCustomerV1CustomersAutomations.fromClient(
|
|
7079
|
+
this.client,
|
|
7080
|
+
this.defaults
|
|
7081
|
+
);
|
|
7082
|
+
}
|
|
6961
7083
|
list(parameters, options = {}) {
|
|
6962
7084
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6963
7085
|
throw new Error(
|
|
@@ -10988,6 +11110,13 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
10988
11110
|
return seam.listCredentialsWithAccess(...args);
|
|
10989
11111
|
};
|
|
10990
11112
|
}
|
|
11113
|
+
get "/acs/entrances/unlock"() {
|
|
11114
|
+
const { client, defaults } = this;
|
|
11115
|
+
return function acsEntrancesUnlock(...args) {
|
|
11116
|
+
const seam = SeamHttpAcsEntrances.fromClient(client, defaults);
|
|
11117
|
+
return seam.unlock(...args);
|
|
11118
|
+
};
|
|
11119
|
+
}
|
|
10991
11120
|
get "/acs/systems/get"() {
|
|
10992
11121
|
const { client, defaults } = this;
|
|
10993
11122
|
return function acsSystemsGet(...args) {
|
|
@@ -11812,6 +11941,26 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11812
11941
|
return seam.update(...args);
|
|
11813
11942
|
};
|
|
11814
11943
|
}
|
|
11944
|
+
get "/seam/customer/v1/customers/automations/get"() {
|
|
11945
|
+
const { client, defaults } = this;
|
|
11946
|
+
return function seamCustomerV1CustomersAutomationsGet(...args) {
|
|
11947
|
+
const seam = SeamHttpSeamCustomerV1CustomersAutomations.fromClient(
|
|
11948
|
+
client,
|
|
11949
|
+
defaults
|
|
11950
|
+
);
|
|
11951
|
+
return seam.get(...args);
|
|
11952
|
+
};
|
|
11953
|
+
}
|
|
11954
|
+
get "/seam/customer/v1/customers/automations/update"() {
|
|
11955
|
+
const { client, defaults } = this;
|
|
11956
|
+
return function seamCustomerV1CustomersAutomationsUpdate(...args) {
|
|
11957
|
+
const seam = SeamHttpSeamCustomerV1CustomersAutomations.fromClient(
|
|
11958
|
+
client,
|
|
11959
|
+
defaults
|
|
11960
|
+
);
|
|
11961
|
+
return seam.update(...args);
|
|
11962
|
+
};
|
|
11963
|
+
}
|
|
11815
11964
|
get "/seam/customer/v1/customers/list"() {
|
|
11816
11965
|
const { client, defaults } = this;
|
|
11817
11966
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -12854,6 +13003,7 @@ exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|
|
|
12854
13003
|
exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
|
|
12855
13004
|
exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
|
|
12856
13005
|
exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
|
|
13006
|
+
exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
|
|
12857
13007
|
exports.SeamHttpSeamCustomerV1Encoders = SeamHttpSeamCustomerV1Encoders;
|
|
12858
13008
|
exports.SeamHttpSeamCustomerV1Events = SeamHttpSeamCustomerV1Events;
|
|
12859
13009
|
exports.SeamHttpSeamCustomerV1Portals = SeamHttpSeamCustomerV1Portals;
|