@seamapi/http 1.105.2 → 1.106.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 +134 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +48 -3
- package/dist/index.cjs +136 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +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 +5 -2
- package/lib/seam/connect/routes/seam-http-endpoints.js +15 -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/seam/customer/v1/customers/automations/automations.ts +240 -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 +43 -0
- package/src/lib/version.ts +1 -1
package/dist/connect.cjs
CHANGED
|
@@ -6871,6 +6871,113 @@ var SeamHttpSeamCustomerV1Connectors = class _SeamHttpSeamCustomerV1Connectors {
|
|
|
6871
6871
|
}
|
|
6872
6872
|
};
|
|
6873
6873
|
|
|
6874
|
+
// src/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.ts
|
|
6875
|
+
var SeamHttpSeamCustomerV1CustomersAutomations = class _SeamHttpSeamCustomerV1CustomersAutomations {
|
|
6876
|
+
client;
|
|
6877
|
+
defaults;
|
|
6878
|
+
ltsVersion = seamApiLtsVersion;
|
|
6879
|
+
static ltsVersion = seamApiLtsVersion;
|
|
6880
|
+
constructor(apiKeyOrOptions = {}) {
|
|
6881
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
6882
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
6883
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
6884
|
+
}
|
|
6885
|
+
static fromClient(client, options = {}) {
|
|
6886
|
+
const constructorOptions = { ...options, client };
|
|
6887
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
6888
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
6889
|
+
}
|
|
6890
|
+
return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
|
|
6891
|
+
}
|
|
6892
|
+
static fromApiKey(apiKey, options = {}) {
|
|
6893
|
+
const constructorOptions = { ...options, apiKey };
|
|
6894
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
6895
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
6896
|
+
}
|
|
6897
|
+
return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
|
|
6898
|
+
}
|
|
6899
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
6900
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
6901
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
6902
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
6903
|
+
}
|
|
6904
|
+
return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
|
|
6905
|
+
}
|
|
6906
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
6907
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
6908
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
6909
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
6910
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6911
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1CustomersAutomations.fromPublishableKey"
|
|
6912
|
+
);
|
|
6913
|
+
}
|
|
6914
|
+
const client = createClient(clientOptions);
|
|
6915
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
6916
|
+
const { token } = await clientSessions.getOrCreate({
|
|
6917
|
+
user_identifier_key: userIdentifierKey
|
|
6918
|
+
});
|
|
6919
|
+
return _SeamHttpSeamCustomerV1CustomersAutomations.fromClientSessionToken(
|
|
6920
|
+
token,
|
|
6921
|
+
options
|
|
6922
|
+
);
|
|
6923
|
+
}
|
|
6924
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
6925
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
6926
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
6927
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6928
|
+
"Missing consoleSessionToken or workspaceId"
|
|
6929
|
+
);
|
|
6930
|
+
}
|
|
6931
|
+
return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
|
|
6932
|
+
}
|
|
6933
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
6934
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
6935
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
6936
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6937
|
+
"Missing personalAccessToken or workspaceId"
|
|
6938
|
+
);
|
|
6939
|
+
}
|
|
6940
|
+
return new _SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions);
|
|
6941
|
+
}
|
|
6942
|
+
createPaginator(request) {
|
|
6943
|
+
return new SeamPaginator(this, request);
|
|
6944
|
+
}
|
|
6945
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
6946
|
+
const { headers } = this.client.defaults;
|
|
6947
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
6948
|
+
clientSessionToken
|
|
6949
|
+
});
|
|
6950
|
+
for (const key of Object.keys(authHeaders)) {
|
|
6951
|
+
if (headers[key] == null) {
|
|
6952
|
+
throw new Error(
|
|
6953
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
6954
|
+
);
|
|
6955
|
+
}
|
|
6956
|
+
}
|
|
6957
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
6958
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6959
|
+
await clientSessions.get();
|
|
6960
|
+
}
|
|
6961
|
+
get(parameters, options = {}) {
|
|
6962
|
+
return new SeamHttpRequest(this, {
|
|
6963
|
+
pathname: "/seam/customer/v1/customers/automations/get",
|
|
6964
|
+
method: "POST",
|
|
6965
|
+
body: parameters,
|
|
6966
|
+
responseKey: "automation",
|
|
6967
|
+
options
|
|
6968
|
+
});
|
|
6969
|
+
}
|
|
6970
|
+
update(parameters, options = {}) {
|
|
6971
|
+
return new SeamHttpRequest(this, {
|
|
6972
|
+
pathname: "/seam/customer/v1/customers/automations/update",
|
|
6973
|
+
method: "PATCH",
|
|
6974
|
+
body: parameters,
|
|
6975
|
+
responseKey: void 0,
|
|
6976
|
+
options
|
|
6977
|
+
});
|
|
6978
|
+
}
|
|
6979
|
+
};
|
|
6980
|
+
|
|
6874
6981
|
// src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts
|
|
6875
6982
|
var SeamHttpSeamCustomerV1Customers = class _SeamHttpSeamCustomerV1Customers {
|
|
6876
6983
|
client;
|
|
@@ -6958,6 +7065,12 @@ var SeamHttpSeamCustomerV1Customers = class _SeamHttpSeamCustomerV1Customers {
|
|
|
6958
7065
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6959
7066
|
await clientSessions.get();
|
|
6960
7067
|
}
|
|
7068
|
+
get automations() {
|
|
7069
|
+
return SeamHttpSeamCustomerV1CustomersAutomations.fromClient(
|
|
7070
|
+
this.client,
|
|
7071
|
+
this.defaults
|
|
7072
|
+
);
|
|
7073
|
+
}
|
|
6961
7074
|
list(parameters, options = {}) {
|
|
6962
7075
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6963
7076
|
throw new Error(
|
|
@@ -11812,6 +11925,26 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
11812
11925
|
return seam.update(...args);
|
|
11813
11926
|
};
|
|
11814
11927
|
}
|
|
11928
|
+
get "/seam/customer/v1/customers/automations/get"() {
|
|
11929
|
+
const { client, defaults } = this;
|
|
11930
|
+
return function seamCustomerV1CustomersAutomationsGet(...args) {
|
|
11931
|
+
const seam = SeamHttpSeamCustomerV1CustomersAutomations.fromClient(
|
|
11932
|
+
client,
|
|
11933
|
+
defaults
|
|
11934
|
+
);
|
|
11935
|
+
return seam.get(...args);
|
|
11936
|
+
};
|
|
11937
|
+
}
|
|
11938
|
+
get "/seam/customer/v1/customers/automations/update"() {
|
|
11939
|
+
const { client, defaults } = this;
|
|
11940
|
+
return function seamCustomerV1CustomersAutomationsUpdate(...args) {
|
|
11941
|
+
const seam = SeamHttpSeamCustomerV1CustomersAutomations.fromClient(
|
|
11942
|
+
client,
|
|
11943
|
+
defaults
|
|
11944
|
+
);
|
|
11945
|
+
return seam.update(...args);
|
|
11946
|
+
};
|
|
11947
|
+
}
|
|
11815
11948
|
get "/seam/customer/v1/customers/list"() {
|
|
11816
11949
|
const { client, defaults } = this;
|
|
11817
11950
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -12854,6 +12987,7 @@ exports.SeamHttpSeamCustomerV1Automations = SeamHttpSeamCustomerV1Automations;
|
|
|
12854
12987
|
exports.SeamHttpSeamCustomerV1ConnectorCustomers = SeamHttpSeamCustomerV1ConnectorCustomers;
|
|
12855
12988
|
exports.SeamHttpSeamCustomerV1Connectors = SeamHttpSeamCustomerV1Connectors;
|
|
12856
12989
|
exports.SeamHttpSeamCustomerV1Customers = SeamHttpSeamCustomerV1Customers;
|
|
12990
|
+
exports.SeamHttpSeamCustomerV1CustomersAutomations = SeamHttpSeamCustomerV1CustomersAutomations;
|
|
12857
12991
|
exports.SeamHttpSeamCustomerV1Encoders = SeamHttpSeamCustomerV1Encoders;
|
|
12858
12992
|
exports.SeamHttpSeamCustomerV1Events = SeamHttpSeamCustomerV1Events;
|
|
12859
12993
|
exports.SeamHttpSeamCustomerV1Portals = SeamHttpSeamCustomerV1Portals;
|