@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/index.cjs CHANGED
@@ -129,6 +129,7 @@ __export(index_exports, {
129
129
  SeamHttpWithoutWorkspace: () => SeamHttpWithoutWorkspace,
130
130
  SeamHttpWithoutWorkspaceInvalidOptionsError: () => SeamHttpWithoutWorkspaceInvalidOptionsError,
131
131
  SeamHttpWorkspaces: () => SeamHttpWorkspaces,
132
+ SeamHttpWorkspacesCustomizationProfiles: () => SeamHttpWorkspacesCustomizationProfiles,
132
133
  SeamPaginator: () => SeamPaginator,
133
134
  errorInterceptor: () => errorInterceptor,
134
135
  getOpenapiSchema: () => getOpenapiSchema,
@@ -228,6 +229,7 @@ __export(connect_exports, {
228
229
  SeamHttpWithoutWorkspace: () => SeamHttpWithoutWorkspace,
229
230
  SeamHttpWithoutWorkspaceInvalidOptionsError: () => SeamHttpWithoutWorkspaceInvalidOptionsError,
230
231
  SeamHttpWorkspaces: () => SeamHttpWorkspaces,
232
+ SeamHttpWorkspacesCustomizationProfiles: () => SeamHttpWorkspacesCustomizationProfiles,
231
233
  SeamPaginator: () => SeamPaginator,
232
234
  errorInterceptor: () => errorInterceptor,
233
235
  getOpenapiSchema: () => getOpenapiSchema,
@@ -8085,6 +8087,169 @@ var _SeamHttpWebhooks = class _SeamHttpWebhooks {
8085
8087
  _SeamHttpWebhooks.ltsVersion = seamApiLtsVersion;
8086
8088
  var SeamHttpWebhooks = _SeamHttpWebhooks;
8087
8089
 
8090
+ // src/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.ts
8091
+ var _SeamHttpWorkspacesCustomizationProfiles = class _SeamHttpWorkspacesCustomizationProfiles {
8092
+ constructor(apiKeyOrOptions = {}) {
8093
+ this.ltsVersion = seamApiLtsVersion;
8094
+ const options = parseOptions(apiKeyOrOptions);
8095
+ if (!options.isUndocumentedApiEnabled) {
8096
+ throw new Error(
8097
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8098
+ );
8099
+ }
8100
+ this.client = "client" in options ? options.client : createClient(options);
8101
+ this.defaults = limitToSeamHttpRequestOptions(options);
8102
+ }
8103
+ static fromClient(client, options = {}) {
8104
+ const constructorOptions = { ...options, client };
8105
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
8106
+ throw new SeamHttpInvalidOptionsError("Missing client");
8107
+ }
8108
+ return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
8109
+ }
8110
+ static fromApiKey(apiKey, options = {}) {
8111
+ const constructorOptions = { ...options, apiKey };
8112
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
8113
+ throw new SeamHttpInvalidOptionsError("Missing apiKey");
8114
+ }
8115
+ return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
8116
+ }
8117
+ static fromClientSessionToken(clientSessionToken, options = {}) {
8118
+ const constructorOptions = { ...options, clientSessionToken };
8119
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
8120
+ throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
8121
+ }
8122
+ return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
8123
+ }
8124
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
8125
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
8126
+ const clientOptions = parseOptions({ ...options, publishableKey });
8127
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
8128
+ throw new SeamHttpInvalidOptionsError(
8129
+ "The client option cannot be used with SeamHttpWorkspacesCustomizationProfiles.fromPublishableKey"
8130
+ );
8131
+ }
8132
+ const client = createClient(clientOptions);
8133
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
8134
+ const { token } = await clientSessions.getOrCreate({
8135
+ user_identifier_key: userIdentifierKey
8136
+ });
8137
+ return _SeamHttpWorkspacesCustomizationProfiles.fromClientSessionToken(
8138
+ token,
8139
+ options
8140
+ );
8141
+ }
8142
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
8143
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
8144
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
8145
+ throw new SeamHttpInvalidOptionsError(
8146
+ "Missing consoleSessionToken or workspaceId"
8147
+ );
8148
+ }
8149
+ return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
8150
+ }
8151
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
8152
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
8153
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
8154
+ throw new SeamHttpInvalidOptionsError(
8155
+ "Missing personalAccessToken or workspaceId"
8156
+ );
8157
+ }
8158
+ return new _SeamHttpWorkspacesCustomizationProfiles(constructorOptions);
8159
+ }
8160
+ createPaginator(request) {
8161
+ return new SeamPaginator(this, request);
8162
+ }
8163
+ async updateClientSessionToken(clientSessionToken) {
8164
+ const { headers } = this.client.defaults;
8165
+ const authHeaders = getAuthHeadersForClientSessionToken({
8166
+ clientSessionToken
8167
+ });
8168
+ for (const key of Object.keys(authHeaders)) {
8169
+ if (headers[key] == null) {
8170
+ throw new Error(
8171
+ "Cannot update a clientSessionToken on a client created without a clientSessionToken"
8172
+ );
8173
+ }
8174
+ }
8175
+ this.client.defaults.headers = { ...headers, ...authHeaders };
8176
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
8177
+ await clientSessions.get();
8178
+ }
8179
+ create(parameters, options = {}) {
8180
+ if (!this.defaults.isUndocumentedApiEnabled) {
8181
+ throw new Error(
8182
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8183
+ );
8184
+ }
8185
+ return new SeamHttpRequest(this, {
8186
+ pathname: "/workspaces/customization_profiles/create",
8187
+ method: "POST",
8188
+ body: parameters,
8189
+ responseKey: "customization_profile",
8190
+ options
8191
+ });
8192
+ }
8193
+ get(parameters, options = {}) {
8194
+ if (!this.defaults.isUndocumentedApiEnabled) {
8195
+ throw new Error(
8196
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8197
+ );
8198
+ }
8199
+ return new SeamHttpRequest(this, {
8200
+ pathname: "/workspaces/customization_profiles/get",
8201
+ method: "POST",
8202
+ body: parameters,
8203
+ responseKey: "customization_profile",
8204
+ options
8205
+ });
8206
+ }
8207
+ list(parameters, options = {}) {
8208
+ if (!this.defaults.isUndocumentedApiEnabled) {
8209
+ throw new Error(
8210
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8211
+ );
8212
+ }
8213
+ return new SeamHttpRequest(this, {
8214
+ pathname: "/workspaces/customization_profiles/list",
8215
+ method: "GET",
8216
+ params: parameters,
8217
+ responseKey: "customization_profiles",
8218
+ options
8219
+ });
8220
+ }
8221
+ update(parameters, options = {}) {
8222
+ if (!this.defaults.isUndocumentedApiEnabled) {
8223
+ throw new Error(
8224
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8225
+ );
8226
+ }
8227
+ return new SeamHttpRequest(this, {
8228
+ pathname: "/workspaces/customization_profiles/update",
8229
+ method: "PATCH",
8230
+ body: parameters,
8231
+ responseKey: void 0,
8232
+ options
8233
+ });
8234
+ }
8235
+ uploadImages(parameters, options = {}) {
8236
+ if (!this.defaults.isUndocumentedApiEnabled) {
8237
+ throw new Error(
8238
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
8239
+ );
8240
+ }
8241
+ return new SeamHttpRequest(this, {
8242
+ pathname: "/workspaces/customization_profiles/upload_images",
8243
+ method: "POST",
8244
+ body: parameters,
8245
+ responseKey: void 0,
8246
+ options
8247
+ });
8248
+ }
8249
+ };
8250
+ _SeamHttpWorkspacesCustomizationProfiles.ltsVersion = seamApiLtsVersion;
8251
+ var SeamHttpWorkspacesCustomizationProfiles = _SeamHttpWorkspacesCustomizationProfiles;
8252
+
8088
8253
  // src/lib/seam/connect/routes/workspaces/workspaces.ts
8089
8254
  var _SeamHttpWorkspaces = class _SeamHttpWorkspaces {
8090
8255
  constructor(apiKeyOrOptions = {}) {
@@ -8166,6 +8331,12 @@ var _SeamHttpWorkspaces = class _SeamHttpWorkspaces {
8166
8331
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
8167
8332
  await clientSessions.get();
8168
8333
  }
8334
+ get customizationProfiles() {
8335
+ return SeamHttpWorkspacesCustomizationProfiles.fromClient(
8336
+ this.client,
8337
+ this.defaults
8338
+ );
8339
+ }
8169
8340
  create(parameters, options = {}) {
8170
8341
  return new SeamHttpRequest(this, {
8171
8342
  pathname: "/workspaces/create",
@@ -10148,6 +10319,81 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
10148
10319
  return seam.update(...args);
10149
10320
  };
10150
10321
  }
10322
+ get ["/workspaces/customization_profiles/create"]() {
10323
+ const { client, defaults } = this;
10324
+ if (!this.defaults.isUndocumentedApiEnabled) {
10325
+ throw new Error(
10326
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10327
+ );
10328
+ }
10329
+ return function workspacesCustomizationProfilesCreate(...args) {
10330
+ const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
10331
+ client,
10332
+ defaults
10333
+ );
10334
+ return seam.create(...args);
10335
+ };
10336
+ }
10337
+ get ["/workspaces/customization_profiles/get"]() {
10338
+ const { client, defaults } = this;
10339
+ if (!this.defaults.isUndocumentedApiEnabled) {
10340
+ throw new Error(
10341
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10342
+ );
10343
+ }
10344
+ return function workspacesCustomizationProfilesGet(...args) {
10345
+ const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
10346
+ client,
10347
+ defaults
10348
+ );
10349
+ return seam.get(...args);
10350
+ };
10351
+ }
10352
+ get ["/workspaces/customization_profiles/list"]() {
10353
+ const { client, defaults } = this;
10354
+ if (!this.defaults.isUndocumentedApiEnabled) {
10355
+ throw new Error(
10356
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10357
+ );
10358
+ }
10359
+ return function workspacesCustomizationProfilesList(...args) {
10360
+ const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
10361
+ client,
10362
+ defaults
10363
+ );
10364
+ return seam.list(...args);
10365
+ };
10366
+ }
10367
+ get ["/workspaces/customization_profiles/update"]() {
10368
+ const { client, defaults } = this;
10369
+ if (!this.defaults.isUndocumentedApiEnabled) {
10370
+ throw new Error(
10371
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10372
+ );
10373
+ }
10374
+ return function workspacesCustomizationProfilesUpdate(...args) {
10375
+ const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
10376
+ client,
10377
+ defaults
10378
+ );
10379
+ return seam.update(...args);
10380
+ };
10381
+ }
10382
+ get ["/workspaces/customization_profiles/upload_images"]() {
10383
+ const { client, defaults } = this;
10384
+ if (!this.defaults.isUndocumentedApiEnabled) {
10385
+ throw new Error(
10386
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10387
+ );
10388
+ }
10389
+ return function workspacesCustomizationProfilesUploadImages(...args) {
10390
+ const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient(
10391
+ client,
10392
+ defaults
10393
+ );
10394
+ return seam.uploadImages(...args);
10395
+ };
10396
+ }
10151
10397
  };
10152
10398
  _SeamHttpEndpoints.ltsVersion = seamApiLtsVersion;
10153
10399
  var SeamHttpEndpoints = _SeamHttpEndpoints;
@@ -10330,6 +10576,7 @@ exports.SeamHttpWebhooks = SeamHttpWebhooks;
10330
10576
  exports.SeamHttpWithoutWorkspace = SeamHttpWithoutWorkspace;
10331
10577
  exports.SeamHttpWithoutWorkspaceInvalidOptionsError = SeamHttpWithoutWorkspaceInvalidOptionsError;
10332
10578
  exports.SeamHttpWorkspaces = SeamHttpWorkspaces;
10579
+ exports.SeamHttpWorkspacesCustomizationProfiles = SeamHttpWorkspacesCustomizationProfiles;
10333
10580
  exports.SeamPaginator = SeamPaginator;
10334
10581
  exports.errorInterceptor = errorInterceptor;
10335
10582
  exports.getOpenapiSchema = getOpenapiSchema;