@seamapi/http 1.58.0 → 1.60.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.
Files changed (30) hide show
  1. package/dist/connect.cjs +245 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +90 -3
  4. package/dist/index.cjs +247 -0
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +8 -2
  8. package/lib/seam/connect/routes/seam-http-endpoints.js +51 -0
  9. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  10. package/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.d.ts +86 -0
  11. package/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.js +150 -0
  12. package/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.js.map +1 -0
  13. package/lib/seam/connect/routes/workspaces/customization-profiles/index.d.ts +1 -0
  14. package/lib/seam/connect/routes/workspaces/customization-profiles/index.js +6 -0
  15. package/lib/seam/connect/routes/workspaces/customization-profiles/index.js.map +1 -0
  16. package/lib/seam/connect/routes/workspaces/index.d.ts +1 -0
  17. package/lib/seam/connect/routes/workspaces/index.js +1 -0
  18. package/lib/seam/connect/routes/workspaces/index.js.map +1 -1
  19. package/lib/seam/connect/routes/workspaces/workspaces.d.ts +2 -0
  20. package/lib/seam/connect/routes/workspaces/workspaces.js +4 -0
  21. package/lib/seam/connect/routes/workspaces/workspaces.js.map +1 -1
  22. package/lib/version.d.ts +1 -1
  23. package/lib/version.js +1 -1
  24. package/package.json +3 -3
  25. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +130 -0
  26. package/src/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.ts +386 -0
  27. package/src/lib/seam/connect/routes/workspaces/customization-profiles/index.ts +6 -0
  28. package/src/lib/seam/connect/routes/workspaces/index.ts +1 -0
  29. package/src/lib/seam/connect/routes/workspaces/workspaces.ts +9 -0
  30. package/src/lib/version.ts +1 -1
package/dist/connect.cjs CHANGED
@@ -7851,6 +7851,169 @@ 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
+ if (!options.isUndocumentedApiEnabled) {
7860
+ throw new Error(
7861
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7862
+ );
7863
+ }
7864
+ this.client = "client" in options ? options.client : createClient(options);
7865
+ this.defaults = limitToSeamHttpRequestOptions(options);
7866
+ }
7867
+ static fromClient(client, options = {}) {
7868
+ const constructorOptions = { ...options, client };
7869
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
7870
+ throw new SeamHttpInvalidOptionsError("Missing client");
7871
+ }
7872
+ return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
7873
+ }
7874
+ static fromApiKey(apiKey, options = {}) {
7875
+ const constructorOptions = { ...options, apiKey };
7876
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
7877
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
7878
+ }
7879
+ return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
7880
+ }
7881
+ static fromClientSessionToken(clientSessionToken, options = {}) {
7882
+ const constructorOptions = { ...options, clientSessionToken };
7883
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
7884
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
7885
+ }
7886
+ return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
7887
+ }
7888
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
7889
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
7890
+ const clientOptions = parseOptions({ ...options, publishableKey });
7891
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
7892
+ throw new SeamHttpInvalidOptionsError(
7893
+ "The client option cannot be used with SeamHttpWorkspacesCustomizationProfiles.fromPublishableKey"
7894
+ );
7895
+ }
7896
+ const client = createClient(clientOptions);
7897
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
7898
+ const { token } = await clientSessions.getOrCreate({
7899
+ user_identifier_key: userIdentifierKey
7900
+ });
7901
+ return _SeamHttpWorkspacesCustomizationProfiles.fromClientSessionToken(
7902
+ token,
7903
+ options
7904
+ );
7905
+ }
7906
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
7907
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
7908
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
7909
+ throw new SeamHttpInvalidOptionsError(
7910
+ "Missing consoleSessionToken or workspaceId"
7911
+ );
7912
+ }
7913
+ return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
7914
+ }
7915
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
7916
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
7917
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
7918
+ throw new SeamHttpInvalidOptionsError(
7919
+ "Missing personalAccessToken or workspaceId"
7920
+ );
7921
+ }
7922
+ return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
7923
+ }
7924
+ createPaginator(request) {
7925
+ return new SeamPaginator(this, request);
7926
+ }
7927
+ async updateClientSessionToken(clientSessionToken) {
7928
+ const { headers } = this.client.defaults;
7929
+ const authHeaders = getAuthHeadersForClientSessionToken({
7930
+ clientSessionToken
7931
+ });
7932
+ for (const key of Object.keys(authHeaders)) {
7933
+ if (headers[key] == null) {
7934
+ throw new Error(
7935
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
7936
+ );
7937
+ }
7938
+ }
7939
+ this.client.defaults.headers = { ...headers, ...authHeaders };
7940
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7941
+ await clientSessions.get();
7942
+ }
7943
+ create(parameters, options = {}) {
7944
+ if (!this.defaults.isUndocumentedApiEnabled) {
7945
+ throw new Error(
7946
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7947
+ );
7948
+ }
7949
+ return new SeamHttpRequest(this, {
7950
+ pathname: "/workspaces/customization_profiles/create",
7951
+ method: "POST",
7952
+ body: parameters,
7953
+ responseKey: "customization_profile",
7954
+ options
7955
+ });
7956
+ }
7957
+ get(parameters, options = {}) {
7958
+ if (!this.defaults.isUndocumentedApiEnabled) {
7959
+ throw new Error(
7960
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7961
+ );
7962
+ }
7963
+ return new SeamHttpRequest(this, {
7964
+ pathname: "/workspaces/customization_profiles/get",
7965
+ method: "POST",
7966
+ body: parameters,
7967
+ responseKey: "customization_profile",
7968
+ options
7969
+ });
7970
+ }
7971
+ list(parameters, options = {}) {
7972
+ if (!this.defaults.isUndocumentedApiEnabled) {
7973
+ throw new Error(
7974
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7975
+ );
7976
+ }
7977
+ return new SeamHttpRequest(this, {
7978
+ pathname: "/workspaces/customization_profiles/list",
7979
+ method: "GET",
7980
+ params: parameters,
7981
+ responseKey: "customization_profiles",
7982
+ options
7983
+ });
7984
+ }
7985
+ update(parameters, options = {}) {
7986
+ if (!this.defaults.isUndocumentedApiEnabled) {
7987
+ throw new Error(
7988
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7989
+ );
7990
+ }
7991
+ return new SeamHttpRequest(this, {
7992
+ pathname: "/workspaces/customization_profiles/update",
7993
+ method: "PATCH",
7994
+ body: parameters,
7995
+ responseKey: void 0,
7996
+ options
7997
+ });
7998
+ }
7999
+ uploadImages(parameters, options = {}) {
8000
+ if (!this.defaults.isUndocumentedApiEnabled) {
8001
+ throw new Error(
8002
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8003
+ );
8004
+ }
8005
+ return new SeamHttpRequest(this, {
8006
+ pathname: "/workspaces/customization_profiles/upload_images",
8007
+ method: "POST",
8008
+ body: parameters,
8009
+ responseKey: void 0,
8010
+ options
8011
+ });
8012
+ }
8013
+ };
8014
+ _SeamHttpWorkspacesCustomizationProfiles.ltsVersion = seamApiLtsVersion;
8015
+ var SeamHttpWorkspacesCustomizationProfiles = _SeamHttpWorkspacesCustomizationProfiles;
8016
+
7854
8017
  // src/lib/seam/connect/routes/workspaces/workspaces.ts
7855
8018
  var _SeamHttpWorkspaces = class _SeamHttpWorkspaces {
7856
8019
  constructor(apiKeyOrOptions = {}) {
@@ -7932,6 +8095,12 @@ var _SeamHttpWorkspaces = class _SeamHttpWorkspaces {
7932
8095
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7933
8096
  await clientSessions.get();
7934
8097
  }
8098
+ get customizationProfiles() {
8099
+ return SeamHttpWorkspacesCustomizationProfiles.fromClient(
8100
+ this.client,
8101
+ this.defaults
8102
+ );
8103
+ }
7935
8104
  create(parameters, options = {}) {
7936
8105
  return new SeamHttpRequest(this, {
7937
8106
  pathname: "/workspaces/create",
@@ -9914,6 +10083,81 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9914
10083
  return seam.update(...args);
9915
10084
  };
9916
10085
  }
10086
+ get ["/workspaces/customization_profiles/create"]() {
10087
+ const { client, defaults } = this;
10088
+ if (!this.defaults.isUndocumentedApiEnabled) {
10089
+ throw new Error(
10090
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10091
+ );
10092
+ }
10093
+ return function workspacesCustomizationProfilesCreate(...args) {
10094
+ const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
10095
+ client,
10096
+ defaults
10097
+ );
10098
+ return seam.create(...args);
10099
+ };
10100
+ }
10101
+ get ["/workspaces/customization_profiles/get"]() {
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 workspacesCustomizationProfilesGet(...args) {
10109
+ const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
10110
+ client,
10111
+ defaults
10112
+ );
10113
+ return seam.get(...args);
10114
+ };
10115
+ }
10116
+ get ["/workspaces/customization_profiles/list"]() {
10117
+ const { client, defaults } = this;
10118
+ if (!this.defaults.isUndocumentedApiEnabled) {
10119
+ throw new Error(
10120
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10121
+ );
10122
+ }
10123
+ return function workspacesCustomizationProfilesList(...args) {
10124
+ const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
10125
+ client,
10126
+ defaults
10127
+ );
10128
+ return seam.list(...args);
10129
+ };
10130
+ }
10131
+ get ["/workspaces/customization_profiles/update"]() {
10132
+ const { client, defaults } = this;
10133
+ if (!this.defaults.isUndocumentedApiEnabled) {
10134
+ throw new Error(
10135
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10136
+ );
10137
+ }
10138
+ return function workspacesCustomizationProfilesUpdate(...args) {
10139
+ const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
10140
+ client,
10141
+ defaults
10142
+ );
10143
+ return seam.update(...args);
10144
+ };
10145
+ }
10146
+ get ["/workspaces/customization_profiles/upload_images"]() {
10147
+ const { client, defaults } = this;
10148
+ if (!this.defaults.isUndocumentedApiEnabled) {
10149
+ throw new Error(
10150
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10151
+ );
10152
+ }
10153
+ return function workspacesCustomizationProfilesUploadImages(...args) {
10154
+ const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
10155
+ client,
10156
+ defaults
10157
+ );
10158
+ return seam.uploadImages(...args);
10159
+ };
10160
+ }
9917
10161
  };
9918
10162
  _SeamHttpEndpoints.ltsVersion = seamApiLtsVersion;
9919
10163
  var SeamHttpEndpoints = _SeamHttpEndpoints;
@@ -10090,6 +10334,7 @@ exports.SeamHttpWebhooks = SeamHttpWebhooks;
10090
10334
  exports.SeamHttpWithoutWorkspace = SeamHttpWithoutWorkspace;
10091
10335
  exports.SeamHttpWithoutWorkspaceInvalidOptionsError = SeamHttpWithoutWorkspaceInvalidOptionsError;
10092
10336
  exports.SeamHttpWorkspaces = SeamHttpWorkspaces;
10337
+ exports.SeamHttpWorkspacesCustomizationProfiles = SeamHttpWorkspacesCustomizationProfiles;
10093
10338
  exports.SeamPaginator = SeamPaginator;
10094
10339
  exports.errorInterceptor = errorInterceptor;
10095
10340
  exports.getOpenapiSchema = getOpenapiSchema;