@seamapi/http 1.58.0 → 1.59.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 +200 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +90 -3
- package/dist/index.cjs +202 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +8 -2
- package/lib/seam/connect/routes/seam-http-endpoints.js +39 -0
- package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
- package/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.d.ts +86 -0
- package/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.js +135 -0
- package/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.js.map +1 -0
- package/lib/seam/connect/routes/workspaces/customization-profiles/index.d.ts +1 -0
- package/lib/seam/connect/routes/workspaces/customization-profiles/index.js +6 -0
- package/lib/seam/connect/routes/workspaces/customization-profiles/index.js.map +1 -0
- package/lib/seam/connect/routes/workspaces/index.d.ts +1 -0
- package/lib/seam/connect/routes/workspaces/index.js +1 -0
- package/lib/seam/connect/routes/workspaces/index.js.map +1 -1
- package/lib/seam/connect/routes/workspaces/workspaces.d.ts +2 -0
- package/lib/seam/connect/routes/workspaces/workspaces.js +4 -0
- package/lib/seam/connect/routes/workspaces/workspaces.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-http-endpoints.ts +110 -0
- package/src/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.ts +361 -0
- package/src/lib/seam/connect/routes/workspaces/customization-profiles/index.ts +6 -0
- package/src/lib/seam/connect/routes/workspaces/index.ts +1 -0
- package/src/lib/seam/connect/routes/workspaces/workspaces.ts +9 -0
- package/src/lib/version.ts +1 -1
package/dist/connect.cjs
CHANGED
|
@@ -7851,6 +7851,144 @@ var _SeamHttpWebhooks = class _SeamHttpWebhooks {
|
|
|
7851
7851
|
_SeamHttpWebhooks.ltsVersion = seamApiLtsVersion;
|
|
7852
7852
|
var SeamHttpWebhooks = _SeamHttpWebhooks;
|
|
7853
7853
|
|
|
7854
|
+
// src/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.ts
|
|
7855
|
+
var _SeamHttpWorkspacesCustomizationProfiles = class _SeamHttpWorkspacesCustomizationProfiles {
|
|
7856
|
+
constructor(apiKeyOrOptions = {}) {
|
|
7857
|
+
this.ltsVersion = seamApiLtsVersion;
|
|
7858
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
7859
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
7860
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
7861
|
+
}
|
|
7862
|
+
static fromClient(client, options = {}) {
|
|
7863
|
+
const constructorOptions = { ...options, client };
|
|
7864
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
7865
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
7866
|
+
}
|
|
7867
|
+
return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
|
|
7868
|
+
}
|
|
7869
|
+
static fromApiKey(apiKey, options = {}) {
|
|
7870
|
+
const constructorOptions = { ...options, apiKey };
|
|
7871
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
7872
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
7873
|
+
}
|
|
7874
|
+
return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
|
|
7875
|
+
}
|
|
7876
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
7877
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
7878
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
7879
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
7880
|
+
}
|
|
7881
|
+
return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
|
|
7882
|
+
}
|
|
7883
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
7884
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
7885
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
7886
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
7887
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7888
|
+
"The client option cannot be used with SeamHttpWorkspacesCustomizationProfiles.fromPublishableKey"
|
|
7889
|
+
);
|
|
7890
|
+
}
|
|
7891
|
+
const client = createClient(clientOptions);
|
|
7892
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
7893
|
+
const { token } = await clientSessions.getOrCreate({
|
|
7894
|
+
user_identifier_key: userIdentifierKey
|
|
7895
|
+
});
|
|
7896
|
+
return _SeamHttpWorkspacesCustomizationProfiles.fromClientSessionToken(
|
|
7897
|
+
token,
|
|
7898
|
+
options
|
|
7899
|
+
);
|
|
7900
|
+
}
|
|
7901
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
7902
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
7903
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
7904
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7905
|
+
"Missing consoleSessionToken or workspaceId"
|
|
7906
|
+
);
|
|
7907
|
+
}
|
|
7908
|
+
return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
|
|
7909
|
+
}
|
|
7910
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
7911
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
7912
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
7913
|
+
throw new SeamHttpInvalidOptionsError(
|
|
7914
|
+
"Missing personalAccessToken or workspaceId"
|
|
7915
|
+
);
|
|
7916
|
+
}
|
|
7917
|
+
return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
|
|
7918
|
+
}
|
|
7919
|
+
createPaginator(request) {
|
|
7920
|
+
return new SeamPaginator(this, request);
|
|
7921
|
+
}
|
|
7922
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
7923
|
+
const { headers } = this.client.defaults;
|
|
7924
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
7925
|
+
clientSessionToken
|
|
7926
|
+
});
|
|
7927
|
+
for (const key of Object.keys(authHeaders)) {
|
|
7928
|
+
if (headers[key] == null) {
|
|
7929
|
+
throw new Error(
|
|
7930
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
7931
|
+
);
|
|
7932
|
+
}
|
|
7933
|
+
}
|
|
7934
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
7935
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7936
|
+
await clientSessions.get();
|
|
7937
|
+
}
|
|
7938
|
+
create(parameters, options = {}) {
|
|
7939
|
+
return new SeamHttpRequest(this, {
|
|
7940
|
+
pathname: "/workspaces/customization_profiles/create",
|
|
7941
|
+
method: "POST",
|
|
7942
|
+
body: parameters,
|
|
7943
|
+
responseKey: "customization_profile",
|
|
7944
|
+
options
|
|
7945
|
+
});
|
|
7946
|
+
}
|
|
7947
|
+
get(parameters, options = {}) {
|
|
7948
|
+
return new SeamHttpRequest(this, {
|
|
7949
|
+
pathname: "/workspaces/customization_profiles/get",
|
|
7950
|
+
method: "POST",
|
|
7951
|
+
body: parameters,
|
|
7952
|
+
responseKey: "customization_profile",
|
|
7953
|
+
options
|
|
7954
|
+
});
|
|
7955
|
+
}
|
|
7956
|
+
list(parameters, options = {}) {
|
|
7957
|
+
return new SeamHttpRequest(this, {
|
|
7958
|
+
pathname: "/workspaces/customization_profiles/list",
|
|
7959
|
+
method: "GET",
|
|
7960
|
+
params: parameters,
|
|
7961
|
+
responseKey: "customization_profiles",
|
|
7962
|
+
options
|
|
7963
|
+
});
|
|
7964
|
+
}
|
|
7965
|
+
update(parameters, options = {}) {
|
|
7966
|
+
return new SeamHttpRequest(this, {
|
|
7967
|
+
pathname: "/workspaces/customization_profiles/update",
|
|
7968
|
+
method: "PATCH",
|
|
7969
|
+
body: parameters,
|
|
7970
|
+
responseKey: void 0,
|
|
7971
|
+
options
|
|
7972
|
+
});
|
|
7973
|
+
}
|
|
7974
|
+
uploadImages(parameters, options = {}) {
|
|
7975
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
7976
|
+
throw new Error(
|
|
7977
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
7978
|
+
);
|
|
7979
|
+
}
|
|
7980
|
+
return new SeamHttpRequest(this, {
|
|
7981
|
+
pathname: "/workspaces/customization_profiles/upload_images",
|
|
7982
|
+
method: "POST",
|
|
7983
|
+
body: parameters,
|
|
7984
|
+
responseKey: void 0,
|
|
7985
|
+
options
|
|
7986
|
+
});
|
|
7987
|
+
}
|
|
7988
|
+
};
|
|
7989
|
+
_SeamHttpWorkspacesCustomizationProfiles.ltsVersion = seamApiLtsVersion;
|
|
7990
|
+
var SeamHttpWorkspacesCustomizationProfiles = _SeamHttpWorkspacesCustomizationProfiles;
|
|
7991
|
+
|
|
7854
7992
|
// src/lib/seam/connect/routes/workspaces/workspaces.ts
|
|
7855
7993
|
var _SeamHttpWorkspaces = class _SeamHttpWorkspaces {
|
|
7856
7994
|
constructor(apiKeyOrOptions = {}) {
|
|
@@ -7932,6 +8070,12 @@ var _SeamHttpWorkspaces = class _SeamHttpWorkspaces {
|
|
|
7932
8070
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
7933
8071
|
await clientSessions.get();
|
|
7934
8072
|
}
|
|
8073
|
+
get customizationProfiles() {
|
|
8074
|
+
return SeamHttpWorkspacesCustomizationProfiles.fromClient(
|
|
8075
|
+
this.client,
|
|
8076
|
+
this.defaults
|
|
8077
|
+
);
|
|
8078
|
+
}
|
|
7935
8079
|
create(parameters, options = {}) {
|
|
7936
8080
|
return new SeamHttpRequest(this, {
|
|
7937
8081
|
pathname: "/workspaces/create",
|
|
@@ -9914,6 +10058,61 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
9914
10058
|
return seam.update(...args);
|
|
9915
10059
|
};
|
|
9916
10060
|
}
|
|
10061
|
+
get ["/workspaces/customization_profiles/create"]() {
|
|
10062
|
+
const { client, defaults } = this;
|
|
10063
|
+
return function workspacesCustomizationProfilesCreate(...args) {
|
|
10064
|
+
const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
|
|
10065
|
+
client,
|
|
10066
|
+
defaults
|
|
10067
|
+
);
|
|
10068
|
+
return seam.create(...args);
|
|
10069
|
+
};
|
|
10070
|
+
}
|
|
10071
|
+
get ["/workspaces/customization_profiles/get"]() {
|
|
10072
|
+
const { client, defaults } = this;
|
|
10073
|
+
return function workspacesCustomizationProfilesGet(...args) {
|
|
10074
|
+
const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
|
|
10075
|
+
client,
|
|
10076
|
+
defaults
|
|
10077
|
+
);
|
|
10078
|
+
return seam.get(...args);
|
|
10079
|
+
};
|
|
10080
|
+
}
|
|
10081
|
+
get ["/workspaces/customization_profiles/list"]() {
|
|
10082
|
+
const { client, defaults } = this;
|
|
10083
|
+
return function workspacesCustomizationProfilesList(...args) {
|
|
10084
|
+
const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
|
|
10085
|
+
client,
|
|
10086
|
+
defaults
|
|
10087
|
+
);
|
|
10088
|
+
return seam.list(...args);
|
|
10089
|
+
};
|
|
10090
|
+
}
|
|
10091
|
+
get ["/workspaces/customization_profiles/update"]() {
|
|
10092
|
+
const { client, defaults } = this;
|
|
10093
|
+
return function workspacesCustomizationProfilesUpdate(...args) {
|
|
10094
|
+
const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
|
|
10095
|
+
client,
|
|
10096
|
+
defaults
|
|
10097
|
+
);
|
|
10098
|
+
return seam.update(...args);
|
|
10099
|
+
};
|
|
10100
|
+
}
|
|
10101
|
+
get ["/workspaces/customization_profiles/upload_images"]() {
|
|
10102
|
+
const { client, defaults } = this;
|
|
10103
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10104
|
+
throw new Error(
|
|
10105
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10106
|
+
);
|
|
10107
|
+
}
|
|
10108
|
+
return function workspacesCustomizationProfilesUploadImages(...args) {
|
|
10109
|
+
const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
|
|
10110
|
+
client,
|
|
10111
|
+
defaults
|
|
10112
|
+
);
|
|
10113
|
+
return seam.uploadImages(...args);
|
|
10114
|
+
};
|
|
10115
|
+
}
|
|
9917
10116
|
};
|
|
9918
10117
|
_SeamHttpEndpoints.ltsVersion = seamApiLtsVersion;
|
|
9919
10118
|
var SeamHttpEndpoints = _SeamHttpEndpoints;
|
|
@@ -10090,6 +10289,7 @@ exports.SeamHttpWebhooks = SeamHttpWebhooks;
|
|
|
10090
10289
|
exports.SeamHttpWithoutWorkspace = SeamHttpWithoutWorkspace;
|
|
10091
10290
|
exports.SeamHttpWithoutWorkspaceInvalidOptionsError = SeamHttpWithoutWorkspaceInvalidOptionsError;
|
|
10092
10291
|
exports.SeamHttpWorkspaces = SeamHttpWorkspaces;
|
|
10292
|
+
exports.SeamHttpWorkspacesCustomizationProfiles = SeamHttpWorkspacesCustomizationProfiles;
|
|
10093
10293
|
exports.SeamPaginator = SeamPaginator;
|
|
10094
10294
|
exports.errorInterceptor = errorInterceptor;
|
|
10095
10295
|
exports.getOpenapiSchema = getOpenapiSchema;
|