@seamapi/http 1.39.0 → 1.39.1

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 (100) hide show
  1. package/dist/connect.cjs +0 -1128
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +3 -279
  4. package/dist/index.cjs.map +1 -1
  5. package/lib/seam/connect/routes/seam/index.d.ts +0 -3
  6. package/lib/seam/connect/routes/seam/index.js +0 -3
  7. package/lib/seam/connect/routes/seam/index.js.map +1 -1
  8. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +2 -16
  9. package/lib/seam/connect/routes/seam-http-endpoints.js +0 -95
  10. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  11. package/lib/version.d.ts +1 -1
  12. package/lib/version.js +1 -1
  13. package/package.json +3 -3
  14. package/src/lib/seam/connect/routes/seam/index.ts +0 -3
  15. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +0 -252
  16. package/src/lib/version.ts +1 -1
  17. package/lib/seam/connect/routes/seam/bridge/index.d.ts +0 -1
  18. package/lib/seam/connect/routes/seam/bridge/index.js +0 -6
  19. package/lib/seam/connect/routes/seam/bridge/index.js.map +0 -1
  20. package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/bridge-client-sessions.d.ts +0 -86
  21. package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/bridge-client-sessions.js +0 -150
  22. package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/bridge-client-sessions.js.map +0 -1
  23. package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/index.d.ts +0 -1
  24. package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/index.js +0 -6
  25. package/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/index.js.map +0 -1
  26. package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/bridge-connected-systems.d.ts +0 -34
  27. package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/bridge-connected-systems.js +0 -102
  28. package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/bridge-connected-systems.js.map +0 -1
  29. package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/index.d.ts +0 -1
  30. package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/index.js +0 -6
  31. package/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/index.js.map +0 -1
  32. package/lib/seam/connect/routes/seam/bridge/v1/index.d.ts +0 -3
  33. package/lib/seam/connect/routes/seam/bridge/v1/index.js +0 -8
  34. package/lib/seam/connect/routes/seam/bridge/v1/index.js.map +0 -1
  35. package/lib/seam/connect/routes/seam/bridge/v1/v1.d.ts +0 -23
  36. package/lib/seam/connect/routes/seam/bridge/v1/v1.js +0 -97
  37. package/lib/seam/connect/routes/seam/bridge/v1/v1.js.map +0 -1
  38. package/lib/seam/connect/routes/seam/instant-key/index.d.ts +0 -1
  39. package/lib/seam/connect/routes/seam/instant-key/index.js +0 -6
  40. package/lib/seam/connect/routes/seam/instant-key/index.js.map +0 -1
  41. package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/client-sessions.d.ts +0 -34
  42. package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/client-sessions.js +0 -102
  43. package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/client-sessions.js.map +0 -1
  44. package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/index.d.ts +0 -1
  45. package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/index.js +0 -6
  46. package/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/index.js.map +0 -1
  47. package/lib/seam/connect/routes/seam/instant-key/v1/index.d.ts +0 -2
  48. package/lib/seam/connect/routes/seam/instant-key/v1/index.js +0 -7
  49. package/lib/seam/connect/routes/seam/instant-key/v1/index.js.map +0 -1
  50. package/lib/seam/connect/routes/seam/instant-key/v1/v1.d.ts +0 -21
  51. package/lib/seam/connect/routes/seam/instant-key/v1/v1.js +0 -93
  52. package/lib/seam/connect/routes/seam/instant-key/v1/v1.js.map +0 -1
  53. package/lib/seam/connect/routes/seam/mobile-sdk/index.d.ts +0 -1
  54. package/lib/seam/connect/routes/seam/mobile-sdk/index.js +0 -6
  55. package/lib/seam/connect/routes/seam/mobile-sdk/index.js.map +0 -1
  56. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/acs.d.ts +0 -21
  57. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/acs.js +0 -93
  58. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/acs.js.map +0 -1
  59. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/credentials.d.ts +0 -34
  60. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/credentials.js +0 -102
  61. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/credentials.js.map +0 -1
  62. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/index.d.ts +0 -1
  63. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/index.js +0 -6
  64. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/index.js.map +0 -1
  65. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/index.d.ts +0 -2
  66. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/index.js +0 -7
  67. package/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/index.js.map +0 -1
  68. package/lib/seam/connect/routes/seam/mobile-sdk/v1/index.d.ts +0 -3
  69. package/lib/seam/connect/routes/seam/mobile-sdk/v1/index.js +0 -8
  70. package/lib/seam/connect/routes/seam/mobile-sdk/v1/index.js.map +0 -1
  71. package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/index.d.ts +0 -1
  72. package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/index.js +0 -6
  73. package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/index.js.map +0 -1
  74. package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/phone-sessions.d.ts +0 -34
  75. package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/phone-sessions.js +0 -102
  76. package/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/phone-sessions.js.map +0 -1
  77. package/lib/seam/connect/routes/seam/mobile-sdk/v1/v1.d.ts +0 -23
  78. package/lib/seam/connect/routes/seam/mobile-sdk/v1/v1.js +0 -97
  79. package/lib/seam/connect/routes/seam/mobile-sdk/v1/v1.js.map +0 -1
  80. package/src/lib/seam/connect/routes/seam/bridge/index.ts +0 -6
  81. package/src/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/bridge-client-sessions.ts +0 -398
  82. package/src/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/index.ts +0 -6
  83. package/src/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/bridge-connected-systems.ts +0 -215
  84. package/src/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/index.ts +0 -6
  85. package/src/lib/seam/connect/routes/seam/bridge/v1/index.ts +0 -8
  86. package/src/lib/seam/connect/routes/seam/bridge/v1/v1.ts +0 -184
  87. package/src/lib/seam/connect/routes/seam/instant-key/index.ts +0 -6
  88. package/src/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/client-sessions.ts +0 -219
  89. package/src/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/index.ts +0 -6
  90. package/src/lib/seam/connect/routes/seam/instant-key/v1/index.ts +0 -7
  91. package/src/lib/seam/connect/routes/seam/instant-key/v1/v1.ts +0 -176
  92. package/src/lib/seam/connect/routes/seam/mobile-sdk/index.ts +0 -6
  93. package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/acs.ts +0 -176
  94. package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/credentials.ts +0 -215
  95. package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/index.ts +0 -6
  96. package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/index.ts +0 -7
  97. package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/index.ts +0 -8
  98. package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/index.ts +0 -6
  99. package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/phone-sessions.ts +0 -215
  100. package/src/lib/seam/connect/routes/seam/mobile-sdk/v1/v1.ts +0 -181
package/dist/connect.cjs CHANGED
@@ -5159,990 +5159,6 @@ var _SeamHttpPhones = class _SeamHttpPhones {
5159
5159
  _SeamHttpPhones.ltsVersion = seamApiLtsVersion;
5160
5160
  var SeamHttpPhones = _SeamHttpPhones;
5161
5161
 
5162
- // src/lib/seam/connect/routes/seam/bridge/v1/bridge-client-sessions/bridge-client-sessions.ts
5163
- var _SeamHttpSeamBridgeV1BridgeClientSessions = class _SeamHttpSeamBridgeV1BridgeClientSessions {
5164
- constructor(apiKeyOrOptions = {}) {
5165
- this.ltsVersion = seamApiLtsVersion;
5166
- const options = parseOptions(apiKeyOrOptions);
5167
- if (!options.isUndocumentedApiEnabled) {
5168
- throw new Error(
5169
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5170
- );
5171
- }
5172
- this.client = "client" in options ? options.client : createClient(options);
5173
- this.defaults = limitToSeamHttpRequestOptions(options);
5174
- }
5175
- static fromClient(client, options = {}) {
5176
- const constructorOptions = { ...options, client };
5177
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5178
- throw new SeamHttpInvalidOptionsError("Missing client");
5179
- }
5180
- return new _SeamHttpSeamBridgeV1BridgeClientSessions(constructorOptions);
5181
- }
5182
- static fromApiKey(apiKey, options = {}) {
5183
- const constructorOptions = { ...options, apiKey };
5184
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5185
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
5186
- }
5187
- return new _SeamHttpSeamBridgeV1BridgeClientSessions(constructorOptions);
5188
- }
5189
- static fromClientSessionToken(clientSessionToken, options = {}) {
5190
- const constructorOptions = { ...options, clientSessionToken };
5191
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5192
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5193
- }
5194
- return new _SeamHttpSeamBridgeV1BridgeClientSessions(constructorOptions);
5195
- }
5196
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5197
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
5198
- const clientOptions = parseOptions({ ...options, publishableKey });
5199
- if (isSeamHttpOptionsWithClient(clientOptions)) {
5200
- throw new SeamHttpInvalidOptionsError(
5201
- "The client option cannot be used with SeamHttpSeamBridgeV1BridgeClientSessions.fromPublishableKey"
5202
- );
5203
- }
5204
- const client = createClient(clientOptions);
5205
- const clientSessions = SeamHttpClientSessions.fromClient(client);
5206
- const { token } = await clientSessions.getOrCreate({
5207
- user_identifier_key: userIdentifierKey
5208
- });
5209
- return _SeamHttpSeamBridgeV1BridgeClientSessions.fromClientSessionToken(
5210
- token,
5211
- options
5212
- );
5213
- }
5214
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5215
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5216
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5217
- throw new SeamHttpInvalidOptionsError(
5218
- "Missing consoleSessionToken or workspaceId"
5219
- );
5220
- }
5221
- return new _SeamHttpSeamBridgeV1BridgeClientSessions(constructorOptions);
5222
- }
5223
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5224
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
5225
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5226
- throw new SeamHttpInvalidOptionsError(
5227
- "Missing personalAccessToken or workspaceId"
5228
- );
5229
- }
5230
- return new _SeamHttpSeamBridgeV1BridgeClientSessions(constructorOptions);
5231
- }
5232
- createPaginator(request) {
5233
- return new SeamPaginator(this, request);
5234
- }
5235
- async updateClientSessionToken(clientSessionToken) {
5236
- const { headers } = this.client.defaults;
5237
- const authHeaders = getAuthHeadersForClientSessionToken({
5238
- clientSessionToken
5239
- });
5240
- for (const key of Object.keys(authHeaders)) {
5241
- if (headers[key] == null) {
5242
- throw new Error(
5243
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5244
- );
5245
- }
5246
- }
5247
- this.client.defaults.headers = { ...headers, ...authHeaders };
5248
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5249
- await clientSessions.get();
5250
- }
5251
- create(parameters, options = {}) {
5252
- if (!this.defaults.isUndocumentedApiEnabled) {
5253
- throw new Error(
5254
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5255
- );
5256
- }
5257
- return new SeamHttpRequest(this, {
5258
- pathname: "/seam/bridge/v1/bridge_client_sessions/create",
5259
- method: "POST",
5260
- body: parameters,
5261
- responseKey: "bridge_client_session",
5262
- options
5263
- });
5264
- }
5265
- get(parameters, options = {}) {
5266
- if (!this.defaults.isUndocumentedApiEnabled) {
5267
- throw new Error(
5268
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5269
- );
5270
- }
5271
- return new SeamHttpRequest(this, {
5272
- pathname: "/seam/bridge/v1/bridge_client_sessions/get",
5273
- method: "GET",
5274
- params: parameters,
5275
- responseKey: "bridge_client_session",
5276
- options
5277
- });
5278
- }
5279
- refreshTelemetryToken(parameters, options = {}) {
5280
- if (!this.defaults.isUndocumentedApiEnabled) {
5281
- throw new Error(
5282
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5283
- );
5284
- }
5285
- return new SeamHttpRequest(this, {
5286
- pathname: "/seam/bridge/v1/bridge_client_sessions/refresh_telemetry_token",
5287
- method: "POST",
5288
- body: parameters,
5289
- responseKey: "bridge_client_session",
5290
- options
5291
- });
5292
- }
5293
- regeneratePairingCode(parameters, options = {}) {
5294
- if (!this.defaults.isUndocumentedApiEnabled) {
5295
- throw new Error(
5296
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5297
- );
5298
- }
5299
- return new SeamHttpRequest(this, {
5300
- pathname: "/seam/bridge/v1/bridge_client_sessions/regenerate_pairing_code",
5301
- method: "POST",
5302
- body: parameters,
5303
- responseKey: "bridge_client_session",
5304
- options
5305
- });
5306
- }
5307
- reportStatus(parameters, options = {}) {
5308
- if (!this.defaults.isUndocumentedApiEnabled) {
5309
- throw new Error(
5310
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5311
- );
5312
- }
5313
- return new SeamHttpRequest(this, {
5314
- pathname: "/seam/bridge/v1/bridge_client_sessions/report_status",
5315
- method: "POST",
5316
- body: parameters,
5317
- responseKey: void 0,
5318
- options
5319
- });
5320
- }
5321
- };
5322
- _SeamHttpSeamBridgeV1BridgeClientSessions.ltsVersion = seamApiLtsVersion;
5323
- var SeamHttpSeamBridgeV1BridgeClientSessions = _SeamHttpSeamBridgeV1BridgeClientSessions;
5324
-
5325
- // src/lib/seam/connect/routes/seam/bridge/v1/bridge-connected-systems/bridge-connected-systems.ts
5326
- var _SeamHttpSeamBridgeV1BridgeConnectedSystems = class _SeamHttpSeamBridgeV1BridgeConnectedSystems {
5327
- constructor(apiKeyOrOptions = {}) {
5328
- this.ltsVersion = seamApiLtsVersion;
5329
- const options = parseOptions(apiKeyOrOptions);
5330
- if (!options.isUndocumentedApiEnabled) {
5331
- throw new Error(
5332
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5333
- );
5334
- }
5335
- this.client = "client" in options ? options.client : createClient(options);
5336
- this.defaults = limitToSeamHttpRequestOptions(options);
5337
- }
5338
- static fromClient(client, options = {}) {
5339
- const constructorOptions = { ...options, client };
5340
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5341
- throw new SeamHttpInvalidOptionsError("Missing client");
5342
- }
5343
- return new _SeamHttpSeamBridgeV1BridgeConnectedSystems(constructorOptions);
5344
- }
5345
- static fromApiKey(apiKey, options = {}) {
5346
- const constructorOptions = { ...options, apiKey };
5347
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5348
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
5349
- }
5350
- return new _SeamHttpSeamBridgeV1BridgeConnectedSystems(constructorOptions);
5351
- }
5352
- static fromClientSessionToken(clientSessionToken, options = {}) {
5353
- const constructorOptions = { ...options, clientSessionToken };
5354
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5355
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5356
- }
5357
- return new _SeamHttpSeamBridgeV1BridgeConnectedSystems(constructorOptions);
5358
- }
5359
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5360
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
5361
- const clientOptions = parseOptions({ ...options, publishableKey });
5362
- if (isSeamHttpOptionsWithClient(clientOptions)) {
5363
- throw new SeamHttpInvalidOptionsError(
5364
- "The client option cannot be used with SeamHttpSeamBridgeV1BridgeConnectedSystems.fromPublishableKey"
5365
- );
5366
- }
5367
- const client = createClient(clientOptions);
5368
- const clientSessions = SeamHttpClientSessions.fromClient(client);
5369
- const { token } = await clientSessions.getOrCreate({
5370
- user_identifier_key: userIdentifierKey
5371
- });
5372
- return _SeamHttpSeamBridgeV1BridgeConnectedSystems.fromClientSessionToken(
5373
- token,
5374
- options
5375
- );
5376
- }
5377
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5378
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5379
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5380
- throw new SeamHttpInvalidOptionsError(
5381
- "Missing consoleSessionToken or workspaceId"
5382
- );
5383
- }
5384
- return new _SeamHttpSeamBridgeV1BridgeConnectedSystems(constructorOptions);
5385
- }
5386
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5387
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
5388
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5389
- throw new SeamHttpInvalidOptionsError(
5390
- "Missing personalAccessToken or workspaceId"
5391
- );
5392
- }
5393
- return new _SeamHttpSeamBridgeV1BridgeConnectedSystems(constructorOptions);
5394
- }
5395
- createPaginator(request) {
5396
- return new SeamPaginator(this, request);
5397
- }
5398
- async updateClientSessionToken(clientSessionToken) {
5399
- const { headers } = this.client.defaults;
5400
- const authHeaders = getAuthHeadersForClientSessionToken({
5401
- clientSessionToken
5402
- });
5403
- for (const key of Object.keys(authHeaders)) {
5404
- if (headers[key] == null) {
5405
- throw new Error(
5406
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5407
- );
5408
- }
5409
- }
5410
- this.client.defaults.headers = { ...headers, ...authHeaders };
5411
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5412
- await clientSessions.get();
5413
- }
5414
- list(parameters, options = {}) {
5415
- if (!this.defaults.isUndocumentedApiEnabled) {
5416
- throw new Error(
5417
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5418
- );
5419
- }
5420
- return new SeamHttpRequest(this, {
5421
- pathname: "/seam/bridge/v1/bridge_connected_systems/list",
5422
- method: "GET",
5423
- params: parameters,
5424
- responseKey: "bridge_connected_systems",
5425
- options
5426
- });
5427
- }
5428
- };
5429
- _SeamHttpSeamBridgeV1BridgeConnectedSystems.ltsVersion = seamApiLtsVersion;
5430
- var SeamHttpSeamBridgeV1BridgeConnectedSystems = _SeamHttpSeamBridgeV1BridgeConnectedSystems;
5431
-
5432
- // src/lib/seam/connect/routes/seam/bridge/v1/v1.ts
5433
- var _SeamHttpSeamBridgeV1 = class _SeamHttpSeamBridgeV1 {
5434
- constructor(apiKeyOrOptions = {}) {
5435
- this.ltsVersion = seamApiLtsVersion;
5436
- const options = parseOptions(apiKeyOrOptions);
5437
- if (!options.isUndocumentedApiEnabled) {
5438
- throw new Error(
5439
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5440
- );
5441
- }
5442
- this.client = "client" in options ? options.client : createClient(options);
5443
- this.defaults = limitToSeamHttpRequestOptions(options);
5444
- }
5445
- static fromClient(client, options = {}) {
5446
- const constructorOptions = { ...options, client };
5447
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5448
- throw new SeamHttpInvalidOptionsError("Missing client");
5449
- }
5450
- return new _SeamHttpSeamBridgeV1(constructorOptions);
5451
- }
5452
- static fromApiKey(apiKey, options = {}) {
5453
- const constructorOptions = { ...options, apiKey };
5454
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5455
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
5456
- }
5457
- return new _SeamHttpSeamBridgeV1(constructorOptions);
5458
- }
5459
- static fromClientSessionToken(clientSessionToken, options = {}) {
5460
- const constructorOptions = { ...options, clientSessionToken };
5461
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5462
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5463
- }
5464
- return new _SeamHttpSeamBridgeV1(constructorOptions);
5465
- }
5466
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5467
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
5468
- const clientOptions = parseOptions({ ...options, publishableKey });
5469
- if (isSeamHttpOptionsWithClient(clientOptions)) {
5470
- throw new SeamHttpInvalidOptionsError(
5471
- "The client option cannot be used with SeamHttpSeamBridgeV1.fromPublishableKey"
5472
- );
5473
- }
5474
- const client = createClient(clientOptions);
5475
- const clientSessions = SeamHttpClientSessions.fromClient(client);
5476
- const { token } = await clientSessions.getOrCreate({
5477
- user_identifier_key: userIdentifierKey
5478
- });
5479
- return _SeamHttpSeamBridgeV1.fromClientSessionToken(token, options);
5480
- }
5481
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5482
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5483
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5484
- throw new SeamHttpInvalidOptionsError(
5485
- "Missing consoleSessionToken or workspaceId"
5486
- );
5487
- }
5488
- return new _SeamHttpSeamBridgeV1(constructorOptions);
5489
- }
5490
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5491
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
5492
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5493
- throw new SeamHttpInvalidOptionsError(
5494
- "Missing personalAccessToken or workspaceId"
5495
- );
5496
- }
5497
- return new _SeamHttpSeamBridgeV1(constructorOptions);
5498
- }
5499
- createPaginator(request) {
5500
- return new SeamPaginator(this, request);
5501
- }
5502
- async updateClientSessionToken(clientSessionToken) {
5503
- const { headers } = this.client.defaults;
5504
- const authHeaders = getAuthHeadersForClientSessionToken({
5505
- clientSessionToken
5506
- });
5507
- for (const key of Object.keys(authHeaders)) {
5508
- if (headers[key] == null) {
5509
- throw new Error(
5510
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5511
- );
5512
- }
5513
- }
5514
- this.client.defaults.headers = { ...headers, ...authHeaders };
5515
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5516
- await clientSessions.get();
5517
- }
5518
- get bridgeClientSessions() {
5519
- return SeamHttpSeamBridgeV1BridgeClientSessions.fromClient(
5520
- this.client,
5521
- this.defaults
5522
- );
5523
- }
5524
- get bridgeConnectedSystems() {
5525
- return SeamHttpSeamBridgeV1BridgeConnectedSystems.fromClient(
5526
- this.client,
5527
- this.defaults
5528
- );
5529
- }
5530
- };
5531
- _SeamHttpSeamBridgeV1.ltsVersion = seamApiLtsVersion;
5532
- var SeamHttpSeamBridgeV1 = _SeamHttpSeamBridgeV1;
5533
-
5534
- // src/lib/seam/connect/routes/seam/instant-key/v1/client-sessions/client-sessions.ts
5535
- var _SeamHttpSeamInstantKeyV1ClientSessions = class _SeamHttpSeamInstantKeyV1ClientSessions {
5536
- constructor(apiKeyOrOptions = {}) {
5537
- this.ltsVersion = seamApiLtsVersion;
5538
- const options = parseOptions(apiKeyOrOptions);
5539
- if (!options.isUndocumentedApiEnabled) {
5540
- throw new Error(
5541
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5542
- );
5543
- }
5544
- this.client = "client" in options ? options.client : createClient(options);
5545
- this.defaults = limitToSeamHttpRequestOptions(options);
5546
- }
5547
- static fromClient(client, options = {}) {
5548
- const constructorOptions = { ...options, client };
5549
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5550
- throw new SeamHttpInvalidOptionsError("Missing client");
5551
- }
5552
- return new _SeamHttpSeamInstantKeyV1ClientSessions(constructorOptions);
5553
- }
5554
- static fromApiKey(apiKey, options = {}) {
5555
- const constructorOptions = { ...options, apiKey };
5556
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5557
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
5558
- }
5559
- return new _SeamHttpSeamInstantKeyV1ClientSessions(constructorOptions);
5560
- }
5561
- static fromClientSessionToken(clientSessionToken, options = {}) {
5562
- const constructorOptions = { ...options, clientSessionToken };
5563
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5564
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5565
- }
5566
- return new _SeamHttpSeamInstantKeyV1ClientSessions(constructorOptions);
5567
- }
5568
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5569
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
5570
- const clientOptions = parseOptions({ ...options, publishableKey });
5571
- if (isSeamHttpOptionsWithClient(clientOptions)) {
5572
- throw new SeamHttpInvalidOptionsError(
5573
- "The client option cannot be used with SeamHttpSeamInstantKeyV1ClientSessions.fromPublishableKey"
5574
- );
5575
- }
5576
- const client = createClient(clientOptions);
5577
- const clientSessions = SeamHttpClientSessions.fromClient(client);
5578
- const { token } = await clientSessions.getOrCreate({
5579
- user_identifier_key: userIdentifierKey
5580
- });
5581
- return _SeamHttpSeamInstantKeyV1ClientSessions.fromClientSessionToken(
5582
- token,
5583
- options
5584
- );
5585
- }
5586
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5587
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5588
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5589
- throw new SeamHttpInvalidOptionsError(
5590
- "Missing consoleSessionToken or workspaceId"
5591
- );
5592
- }
5593
- return new _SeamHttpSeamInstantKeyV1ClientSessions(constructorOptions);
5594
- }
5595
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5596
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
5597
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5598
- throw new SeamHttpInvalidOptionsError(
5599
- "Missing personalAccessToken or workspaceId"
5600
- );
5601
- }
5602
- return new _SeamHttpSeamInstantKeyV1ClientSessions(constructorOptions);
5603
- }
5604
- createPaginator(request) {
5605
- return new SeamPaginator(this, request);
5606
- }
5607
- async updateClientSessionToken(clientSessionToken) {
5608
- const { headers } = this.client.defaults;
5609
- const authHeaders = getAuthHeadersForClientSessionToken({
5610
- clientSessionToken
5611
- });
5612
- for (const key of Object.keys(authHeaders)) {
5613
- if (headers[key] == null) {
5614
- throw new Error(
5615
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5616
- );
5617
- }
5618
- }
5619
- this.client.defaults.headers = { ...headers, ...authHeaders };
5620
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5621
- await clientSessions.get();
5622
- }
5623
- exchangeShortCode(parameters, options = {}) {
5624
- if (!this.defaults.isUndocumentedApiEnabled) {
5625
- throw new Error(
5626
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5627
- );
5628
- }
5629
- return new SeamHttpRequest(this, {
5630
- pathname: "/seam/instant_key/v1/client_sessions/exchange_short_code",
5631
- method: "POST",
5632
- body: parameters,
5633
- responseKey: "client_session",
5634
- options
5635
- });
5636
- }
5637
- };
5638
- _SeamHttpSeamInstantKeyV1ClientSessions.ltsVersion = seamApiLtsVersion;
5639
- var SeamHttpSeamInstantKeyV1ClientSessions = _SeamHttpSeamInstantKeyV1ClientSessions;
5640
-
5641
- // src/lib/seam/connect/routes/seam/instant-key/v1/v1.ts
5642
- var _SeamHttpSeamInstantKeyV1 = class _SeamHttpSeamInstantKeyV1 {
5643
- constructor(apiKeyOrOptions = {}) {
5644
- this.ltsVersion = seamApiLtsVersion;
5645
- const options = parseOptions(apiKeyOrOptions);
5646
- if (!options.isUndocumentedApiEnabled) {
5647
- throw new Error(
5648
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5649
- );
5650
- }
5651
- this.client = "client" in options ? options.client : createClient(options);
5652
- this.defaults = limitToSeamHttpRequestOptions(options);
5653
- }
5654
- static fromClient(client, options = {}) {
5655
- const constructorOptions = { ...options, client };
5656
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5657
- throw new SeamHttpInvalidOptionsError("Missing client");
5658
- }
5659
- return new _SeamHttpSeamInstantKeyV1(constructorOptions);
5660
- }
5661
- static fromApiKey(apiKey, options = {}) {
5662
- const constructorOptions = { ...options, apiKey };
5663
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5664
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
5665
- }
5666
- return new _SeamHttpSeamInstantKeyV1(constructorOptions);
5667
- }
5668
- static fromClientSessionToken(clientSessionToken, options = {}) {
5669
- const constructorOptions = { ...options, clientSessionToken };
5670
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5671
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5672
- }
5673
- return new _SeamHttpSeamInstantKeyV1(constructorOptions);
5674
- }
5675
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5676
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
5677
- const clientOptions = parseOptions({ ...options, publishableKey });
5678
- if (isSeamHttpOptionsWithClient(clientOptions)) {
5679
- throw new SeamHttpInvalidOptionsError(
5680
- "The client option cannot be used with SeamHttpSeamInstantKeyV1.fromPublishableKey"
5681
- );
5682
- }
5683
- const client = createClient(clientOptions);
5684
- const clientSessions = SeamHttpClientSessions.fromClient(client);
5685
- const { token } = await clientSessions.getOrCreate({
5686
- user_identifier_key: userIdentifierKey
5687
- });
5688
- return _SeamHttpSeamInstantKeyV1.fromClientSessionToken(token, options);
5689
- }
5690
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5691
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5692
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5693
- throw new SeamHttpInvalidOptionsError(
5694
- "Missing consoleSessionToken or workspaceId"
5695
- );
5696
- }
5697
- return new _SeamHttpSeamInstantKeyV1(constructorOptions);
5698
- }
5699
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5700
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
5701
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5702
- throw new SeamHttpInvalidOptionsError(
5703
- "Missing personalAccessToken or workspaceId"
5704
- );
5705
- }
5706
- return new _SeamHttpSeamInstantKeyV1(constructorOptions);
5707
- }
5708
- createPaginator(request) {
5709
- return new SeamPaginator(this, request);
5710
- }
5711
- async updateClientSessionToken(clientSessionToken) {
5712
- const { headers } = this.client.defaults;
5713
- const authHeaders = getAuthHeadersForClientSessionToken({
5714
- clientSessionToken
5715
- });
5716
- for (const key of Object.keys(authHeaders)) {
5717
- if (headers[key] == null) {
5718
- throw new Error(
5719
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5720
- );
5721
- }
5722
- }
5723
- this.client.defaults.headers = { ...headers, ...authHeaders };
5724
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5725
- await clientSessions.get();
5726
- }
5727
- get clientSessions() {
5728
- return SeamHttpSeamInstantKeyV1ClientSessions.fromClient(
5729
- this.client,
5730
- this.defaults
5731
- );
5732
- }
5733
- };
5734
- _SeamHttpSeamInstantKeyV1.ltsVersion = seamApiLtsVersion;
5735
- var SeamHttpSeamInstantKeyV1 = _SeamHttpSeamInstantKeyV1;
5736
-
5737
- // src/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/credentials/credentials.ts
5738
- var _SeamHttpSeamMobileSdkV1AcsCredentials = class _SeamHttpSeamMobileSdkV1AcsCredentials {
5739
- constructor(apiKeyOrOptions = {}) {
5740
- this.ltsVersion = seamApiLtsVersion;
5741
- const options = parseOptions(apiKeyOrOptions);
5742
- if (!options.isUndocumentedApiEnabled) {
5743
- throw new Error(
5744
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5745
- );
5746
- }
5747
- this.client = "client" in options ? options.client : createClient(options);
5748
- this.defaults = limitToSeamHttpRequestOptions(options);
5749
- }
5750
- static fromClient(client, options = {}) {
5751
- const constructorOptions = { ...options, client };
5752
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5753
- throw new SeamHttpInvalidOptionsError("Missing client");
5754
- }
5755
- return new _SeamHttpSeamMobileSdkV1AcsCredentials(constructorOptions);
5756
- }
5757
- static fromApiKey(apiKey, options = {}) {
5758
- const constructorOptions = { ...options, apiKey };
5759
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5760
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
5761
- }
5762
- return new _SeamHttpSeamMobileSdkV1AcsCredentials(constructorOptions);
5763
- }
5764
- static fromClientSessionToken(clientSessionToken, options = {}) {
5765
- const constructorOptions = { ...options, clientSessionToken };
5766
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5767
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5768
- }
5769
- return new _SeamHttpSeamMobileSdkV1AcsCredentials(constructorOptions);
5770
- }
5771
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5772
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
5773
- const clientOptions = parseOptions({ ...options, publishableKey });
5774
- if (isSeamHttpOptionsWithClient(clientOptions)) {
5775
- throw new SeamHttpInvalidOptionsError(
5776
- "The client option cannot be used with SeamHttpSeamMobileSdkV1AcsCredentials.fromPublishableKey"
5777
- );
5778
- }
5779
- const client = createClient(clientOptions);
5780
- const clientSessions = SeamHttpClientSessions.fromClient(client);
5781
- const { token } = await clientSessions.getOrCreate({
5782
- user_identifier_key: userIdentifierKey
5783
- });
5784
- return _SeamHttpSeamMobileSdkV1AcsCredentials.fromClientSessionToken(
5785
- token,
5786
- options
5787
- );
5788
- }
5789
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5790
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5791
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5792
- throw new SeamHttpInvalidOptionsError(
5793
- "Missing consoleSessionToken or workspaceId"
5794
- );
5795
- }
5796
- return new _SeamHttpSeamMobileSdkV1AcsCredentials(constructorOptions);
5797
- }
5798
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5799
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
5800
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5801
- throw new SeamHttpInvalidOptionsError(
5802
- "Missing personalAccessToken or workspaceId"
5803
- );
5804
- }
5805
- return new _SeamHttpSeamMobileSdkV1AcsCredentials(constructorOptions);
5806
- }
5807
- createPaginator(request) {
5808
- return new SeamPaginator(this, request);
5809
- }
5810
- async updateClientSessionToken(clientSessionToken) {
5811
- const { headers } = this.client.defaults;
5812
- const authHeaders = getAuthHeadersForClientSessionToken({
5813
- clientSessionToken
5814
- });
5815
- for (const key of Object.keys(authHeaders)) {
5816
- if (headers[key] == null) {
5817
- throw new Error(
5818
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5819
- );
5820
- }
5821
- }
5822
- this.client.defaults.headers = { ...headers, ...authHeaders };
5823
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5824
- await clientSessions.get();
5825
- }
5826
- list(parameters, options = {}) {
5827
- if (!this.defaults.isUndocumentedApiEnabled) {
5828
- throw new Error(
5829
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5830
- );
5831
- }
5832
- return new SeamHttpRequest(this, {
5833
- pathname: "/seam/mobile_sdk/v1/acs/credentials/list",
5834
- method: "POST",
5835
- body: parameters,
5836
- responseKey: "acs_credentials",
5837
- options
5838
- });
5839
- }
5840
- };
5841
- _SeamHttpSeamMobileSdkV1AcsCredentials.ltsVersion = seamApiLtsVersion;
5842
- var SeamHttpSeamMobileSdkV1AcsCredentials = _SeamHttpSeamMobileSdkV1AcsCredentials;
5843
-
5844
- // src/lib/seam/connect/routes/seam/mobile-sdk/v1/acs/acs.ts
5845
- var _SeamHttpSeamMobileSdkV1Acs = class _SeamHttpSeamMobileSdkV1Acs {
5846
- constructor(apiKeyOrOptions = {}) {
5847
- this.ltsVersion = seamApiLtsVersion;
5848
- const options = parseOptions(apiKeyOrOptions);
5849
- if (!options.isUndocumentedApiEnabled) {
5850
- throw new Error(
5851
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5852
- );
5853
- }
5854
- this.client = "client" in options ? options.client : createClient(options);
5855
- this.defaults = limitToSeamHttpRequestOptions(options);
5856
- }
5857
- static fromClient(client, options = {}) {
5858
- const constructorOptions = { ...options, client };
5859
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5860
- throw new SeamHttpInvalidOptionsError("Missing client");
5861
- }
5862
- return new _SeamHttpSeamMobileSdkV1Acs(constructorOptions);
5863
- }
5864
- static fromApiKey(apiKey, options = {}) {
5865
- const constructorOptions = { ...options, apiKey };
5866
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5867
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
5868
- }
5869
- return new _SeamHttpSeamMobileSdkV1Acs(constructorOptions);
5870
- }
5871
- static fromClientSessionToken(clientSessionToken, options = {}) {
5872
- const constructorOptions = { ...options, clientSessionToken };
5873
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5874
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5875
- }
5876
- return new _SeamHttpSeamMobileSdkV1Acs(constructorOptions);
5877
- }
5878
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5879
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
5880
- const clientOptions = parseOptions({ ...options, publishableKey });
5881
- if (isSeamHttpOptionsWithClient(clientOptions)) {
5882
- throw new SeamHttpInvalidOptionsError(
5883
- "The client option cannot be used with SeamHttpSeamMobileSdkV1Acs.fromPublishableKey"
5884
- );
5885
- }
5886
- const client = createClient(clientOptions);
5887
- const clientSessions = SeamHttpClientSessions.fromClient(client);
5888
- const { token } = await clientSessions.getOrCreate({
5889
- user_identifier_key: userIdentifierKey
5890
- });
5891
- return _SeamHttpSeamMobileSdkV1Acs.fromClientSessionToken(token, options);
5892
- }
5893
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5894
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5895
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5896
- throw new SeamHttpInvalidOptionsError(
5897
- "Missing consoleSessionToken or workspaceId"
5898
- );
5899
- }
5900
- return new _SeamHttpSeamMobileSdkV1Acs(constructorOptions);
5901
- }
5902
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
5903
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
5904
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
5905
- throw new SeamHttpInvalidOptionsError(
5906
- "Missing personalAccessToken or workspaceId"
5907
- );
5908
- }
5909
- return new _SeamHttpSeamMobileSdkV1Acs(constructorOptions);
5910
- }
5911
- createPaginator(request) {
5912
- return new SeamPaginator(this, request);
5913
- }
5914
- async updateClientSessionToken(clientSessionToken) {
5915
- const { headers } = this.client.defaults;
5916
- const authHeaders = getAuthHeadersForClientSessionToken({
5917
- clientSessionToken
5918
- });
5919
- for (const key of Object.keys(authHeaders)) {
5920
- if (headers[key] == null) {
5921
- throw new Error(
5922
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
5923
- );
5924
- }
5925
- }
5926
- this.client.defaults.headers = { ...headers, ...authHeaders };
5927
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
5928
- await clientSessions.get();
5929
- }
5930
- get credentials() {
5931
- return SeamHttpSeamMobileSdkV1AcsCredentials.fromClient(
5932
- this.client,
5933
- this.defaults
5934
- );
5935
- }
5936
- };
5937
- _SeamHttpSeamMobileSdkV1Acs.ltsVersion = seamApiLtsVersion;
5938
- var SeamHttpSeamMobileSdkV1Acs = _SeamHttpSeamMobileSdkV1Acs;
5939
-
5940
- // src/lib/seam/connect/routes/seam/mobile-sdk/v1/phone-sessions/phone-sessions.ts
5941
- var _SeamHttpSeamMobileSdkV1PhoneSessions = class _SeamHttpSeamMobileSdkV1PhoneSessions {
5942
- constructor(apiKeyOrOptions = {}) {
5943
- this.ltsVersion = seamApiLtsVersion;
5944
- const options = parseOptions(apiKeyOrOptions);
5945
- if (!options.isUndocumentedApiEnabled) {
5946
- throw new Error(
5947
- "Cannot use undocumented API without isUndocumentedApiEnabled"
5948
- );
5949
- }
5950
- this.client = "client" in options ? options.client : createClient(options);
5951
- this.defaults = limitToSeamHttpRequestOptions(options);
5952
- }
5953
- static fromClient(client, options = {}) {
5954
- const constructorOptions = { ...options, client };
5955
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
5956
- throw new SeamHttpInvalidOptionsError("Missing client");
5957
- }
5958
- return new _SeamHttpSeamMobileSdkV1PhoneSessions(constructorOptions);
5959
- }
5960
- static fromApiKey(apiKey, options = {}) {
5961
- const constructorOptions = { ...options, apiKey };
5962
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
5963
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
5964
- }
5965
- return new _SeamHttpSeamMobileSdkV1PhoneSessions(constructorOptions);
5966
- }
5967
- static fromClientSessionToken(clientSessionToken, options = {}) {
5968
- const constructorOptions = { ...options, clientSessionToken };
5969
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
5970
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
5971
- }
5972
- return new _SeamHttpSeamMobileSdkV1PhoneSessions(constructorOptions);
5973
- }
5974
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
5975
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
5976
- const clientOptions = parseOptions({ ...options, publishableKey });
5977
- if (isSeamHttpOptionsWithClient(clientOptions)) {
5978
- throw new SeamHttpInvalidOptionsError(
5979
- "The client option cannot be used with SeamHttpSeamMobileSdkV1PhoneSessions.fromPublishableKey"
5980
- );
5981
- }
5982
- const client = createClient(clientOptions);
5983
- const clientSessions = SeamHttpClientSessions.fromClient(client);
5984
- const { token } = await clientSessions.getOrCreate({
5985
- user_identifier_key: userIdentifierKey
5986
- });
5987
- return _SeamHttpSeamMobileSdkV1PhoneSessions.fromClientSessionToken(
5988
- token,
5989
- options
5990
- );
5991
- }
5992
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
5993
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
5994
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
5995
- throw new SeamHttpInvalidOptionsError(
5996
- "Missing consoleSessionToken or workspaceId"
5997
- );
5998
- }
5999
- return new _SeamHttpSeamMobileSdkV1PhoneSessions(constructorOptions);
6000
- }
6001
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
6002
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
6003
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
6004
- throw new SeamHttpInvalidOptionsError(
6005
- "Missing personalAccessToken or workspaceId"
6006
- );
6007
- }
6008
- return new _SeamHttpSeamMobileSdkV1PhoneSessions(constructorOptions);
6009
- }
6010
- createPaginator(request) {
6011
- return new SeamPaginator(this, request);
6012
- }
6013
- async updateClientSessionToken(clientSessionToken) {
6014
- const { headers } = this.client.defaults;
6015
- const authHeaders = getAuthHeadersForClientSessionToken({
6016
- clientSessionToken
6017
- });
6018
- for (const key of Object.keys(authHeaders)) {
6019
- if (headers[key] == null) {
6020
- throw new Error(
6021
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
6022
- );
6023
- }
6024
- }
6025
- this.client.defaults.headers = { ...headers, ...authHeaders };
6026
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
6027
- await clientSessions.get();
6028
- }
6029
- getOrCreate(parameters, options = {}) {
6030
- if (!this.defaults.isUndocumentedApiEnabled) {
6031
- throw new Error(
6032
- "Cannot use undocumented API without isUndocumentedApiEnabled"
6033
- );
6034
- }
6035
- return new SeamHttpRequest(this, {
6036
- pathname: "/seam/mobile_sdk/v1/phone_sessions/get_or_create",
6037
- method: "POST",
6038
- body: parameters,
6039
- responseKey: "phone_session",
6040
- options
6041
- });
6042
- }
6043
- };
6044
- _SeamHttpSeamMobileSdkV1PhoneSessions.ltsVersion = seamApiLtsVersion;
6045
- var SeamHttpSeamMobileSdkV1PhoneSessions = _SeamHttpSeamMobileSdkV1PhoneSessions;
6046
-
6047
- // src/lib/seam/connect/routes/seam/mobile-sdk/v1/v1.ts
6048
- var _SeamHttpSeamMobileSdkV1 = class _SeamHttpSeamMobileSdkV1 {
6049
- constructor(apiKeyOrOptions = {}) {
6050
- this.ltsVersion = seamApiLtsVersion;
6051
- const options = parseOptions(apiKeyOrOptions);
6052
- if (!options.isUndocumentedApiEnabled) {
6053
- throw new Error(
6054
- "Cannot use undocumented API without isUndocumentedApiEnabled"
6055
- );
6056
- }
6057
- this.client = "client" in options ? options.client : createClient(options);
6058
- this.defaults = limitToSeamHttpRequestOptions(options);
6059
- }
6060
- static fromClient(client, options = {}) {
6061
- const constructorOptions = { ...options, client };
6062
- if (!isSeamHttpOptionsWithClient(constructorOptions)) {
6063
- throw new SeamHttpInvalidOptionsError("Missing client");
6064
- }
6065
- return new _SeamHttpSeamMobileSdkV1(constructorOptions);
6066
- }
6067
- static fromApiKey(apiKey, options = {}) {
6068
- const constructorOptions = { ...options, apiKey };
6069
- if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
6070
- throw new SeamHttpInvalidOptionsError("Missing apiKey");
6071
- }
6072
- return new _SeamHttpSeamMobileSdkV1(constructorOptions);
6073
- }
6074
- static fromClientSessionToken(clientSessionToken, options = {}) {
6075
- const constructorOptions = { ...options, clientSessionToken };
6076
- if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
6077
- throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
6078
- }
6079
- return new _SeamHttpSeamMobileSdkV1(constructorOptions);
6080
- }
6081
- static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
6082
- warnOnInsecureuserIdentifierKey(userIdentifierKey);
6083
- const clientOptions = parseOptions({ ...options, publishableKey });
6084
- if (isSeamHttpOptionsWithClient(clientOptions)) {
6085
- throw new SeamHttpInvalidOptionsError(
6086
- "The client option cannot be used with SeamHttpSeamMobileSdkV1.fromPublishableKey"
6087
- );
6088
- }
6089
- const client = createClient(clientOptions);
6090
- const clientSessions = SeamHttpClientSessions.fromClient(client);
6091
- const { token } = await clientSessions.getOrCreate({
6092
- user_identifier_key: userIdentifierKey
6093
- });
6094
- return _SeamHttpSeamMobileSdkV1.fromClientSessionToken(token, options);
6095
- }
6096
- static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
6097
- const constructorOptions = { ...options, consoleSessionToken, workspaceId };
6098
- if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
6099
- throw new SeamHttpInvalidOptionsError(
6100
- "Missing consoleSessionToken or workspaceId"
6101
- );
6102
- }
6103
- return new _SeamHttpSeamMobileSdkV1(constructorOptions);
6104
- }
6105
- static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
6106
- const constructorOptions = { ...options, personalAccessToken, workspaceId };
6107
- if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
6108
- throw new SeamHttpInvalidOptionsError(
6109
- "Missing personalAccessToken or workspaceId"
6110
- );
6111
- }
6112
- return new _SeamHttpSeamMobileSdkV1(constructorOptions);
6113
- }
6114
- createPaginator(request) {
6115
- return new SeamPaginator(this, request);
6116
- }
6117
- async updateClientSessionToken(clientSessionToken) {
6118
- const { headers } = this.client.defaults;
6119
- const authHeaders = getAuthHeadersForClientSessionToken({
6120
- clientSessionToken
6121
- });
6122
- for (const key of Object.keys(authHeaders)) {
6123
- if (headers[key] == null) {
6124
- throw new Error(
6125
- "Cannot update a clientSessionToken on a client created without a clientSessionToken"
6126
- );
6127
- }
6128
- }
6129
- this.client.defaults.headers = { ...headers, ...authHeaders };
6130
- const clientSessions = SeamHttpClientSessions.fromClient(this.client);
6131
- await clientSessions.get();
6132
- }
6133
- get acs() {
6134
- return SeamHttpSeamMobileSdkV1Acs.fromClient(this.client, this.defaults);
6135
- }
6136
- get phoneSessions() {
6137
- return SeamHttpSeamMobileSdkV1PhoneSessions.fromClient(
6138
- this.client,
6139
- this.defaults
6140
- );
6141
- }
6142
- };
6143
- _SeamHttpSeamMobileSdkV1.ltsVersion = seamApiLtsVersion;
6144
- var SeamHttpSeamMobileSdkV1 = _SeamHttpSeamMobileSdkV1;
6145
-
6146
5162
  // src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.ts
6147
5163
  var _SeamHttpSeamPartnerV1BuildingBlocksSpaces = class _SeamHttpSeamPartnerV1BuildingBlocksSpaces {
6148
5164
  constructor(apiKeyOrOptions = {}) {
@@ -9965,141 +8981,6 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9965
8981
  return seam.createSandboxPhone(...args);
9966
8982
  };
9967
8983
  }
9968
- get ["/seam/bridge/v1/bridge_client_sessions/create"]() {
9969
- const { client, defaults } = this;
9970
- if (!this.defaults.isUndocumentedApiEnabled) {
9971
- throw new Error(
9972
- "Cannot use undocumented API without isUndocumentedApiEnabled"
9973
- );
9974
- }
9975
- return function seamBridgeV1BridgeClientSessionsCreate(...args) {
9976
- const seam = SeamHttpSeamBridgeV1BridgeClientSessions.fromClient(
9977
- client,
9978
- defaults
9979
- );
9980
- return seam.create(...args);
9981
- };
9982
- }
9983
- get ["/seam/bridge/v1/bridge_client_sessions/get"]() {
9984
- const { client, defaults } = this;
9985
- if (!this.defaults.isUndocumentedApiEnabled) {
9986
- throw new Error(
9987
- "Cannot use undocumented API without isUndocumentedApiEnabled"
9988
- );
9989
- }
9990
- return function seamBridgeV1BridgeClientSessionsGet(...args) {
9991
- const seam = SeamHttpSeamBridgeV1BridgeClientSessions.fromClient(
9992
- client,
9993
- defaults
9994
- );
9995
- return seam.get(...args);
9996
- };
9997
- }
9998
- get ["/seam/bridge/v1/bridge_client_sessions/refresh_telemetry_token"]() {
9999
- const { client, defaults } = this;
10000
- if (!this.defaults.isUndocumentedApiEnabled) {
10001
- throw new Error(
10002
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10003
- );
10004
- }
10005
- return function seamBridgeV1BridgeClientSessionsRefreshTelemetryToken(...args) {
10006
- const seam = SeamHttpSeamBridgeV1BridgeClientSessions.fromClient(
10007
- client,
10008
- defaults
10009
- );
10010
- return seam.refreshTelemetryToken(...args);
10011
- };
10012
- }
10013
- get ["/seam/bridge/v1/bridge_client_sessions/regenerate_pairing_code"]() {
10014
- const { client, defaults } = this;
10015
- if (!this.defaults.isUndocumentedApiEnabled) {
10016
- throw new Error(
10017
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10018
- );
10019
- }
10020
- return function seamBridgeV1BridgeClientSessionsRegeneratePairingCode(...args) {
10021
- const seam = SeamHttpSeamBridgeV1BridgeClientSessions.fromClient(
10022
- client,
10023
- defaults
10024
- );
10025
- return seam.regeneratePairingCode(...args);
10026
- };
10027
- }
10028
- get ["/seam/bridge/v1/bridge_client_sessions/report_status"]() {
10029
- const { client, defaults } = this;
10030
- if (!this.defaults.isUndocumentedApiEnabled) {
10031
- throw new Error(
10032
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10033
- );
10034
- }
10035
- return function seamBridgeV1BridgeClientSessionsReportStatus(...args) {
10036
- const seam = SeamHttpSeamBridgeV1BridgeClientSessions.fromClient(
10037
- client,
10038
- defaults
10039
- );
10040
- return seam.reportStatus(...args);
10041
- };
10042
- }
10043
- get ["/seam/bridge/v1/bridge_connected_systems/list"]() {
10044
- const { client, defaults } = this;
10045
- if (!this.defaults.isUndocumentedApiEnabled) {
10046
- throw new Error(
10047
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10048
- );
10049
- }
10050
- return function seamBridgeV1BridgeConnectedSystemsList(...args) {
10051
- const seam = SeamHttpSeamBridgeV1BridgeConnectedSystems.fromClient(
10052
- client,
10053
- defaults
10054
- );
10055
- return seam.list(...args);
10056
- };
10057
- }
10058
- get ["/seam/instant_key/v1/client_sessions/exchange_short_code"]() {
10059
- const { client, defaults } = this;
10060
- if (!this.defaults.isUndocumentedApiEnabled) {
10061
- throw new Error(
10062
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10063
- );
10064
- }
10065
- return function seamInstantKeyV1ClientSessionsExchangeShortCode(...args) {
10066
- const seam = SeamHttpSeamInstantKeyV1ClientSessions.fromClient(
10067
- client,
10068
- defaults
10069
- );
10070
- return seam.exchangeShortCode(...args);
10071
- };
10072
- }
10073
- get ["/seam/mobile_sdk/v1/acs/credentials/list"]() {
10074
- const { client, defaults } = this;
10075
- if (!this.defaults.isUndocumentedApiEnabled) {
10076
- throw new Error(
10077
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10078
- );
10079
- }
10080
- return function seamMobileSdkV1AcsCredentialsList(...args) {
10081
- const seam = SeamHttpSeamMobileSdkV1AcsCredentials.fromClient(
10082
- client,
10083
- defaults
10084
- );
10085
- return seam.list(...args);
10086
- };
10087
- }
10088
- get ["/seam/mobile_sdk/v1/phone_sessions/get_or_create"]() {
10089
- const { client, defaults } = this;
10090
- if (!this.defaults.isUndocumentedApiEnabled) {
10091
- throw new Error(
10092
- "Cannot use undocumented API without isUndocumentedApiEnabled"
10093
- );
10094
- }
10095
- return function seamMobileSdkV1PhoneSessionsGetOrCreate(...args) {
10096
- const seam = SeamHttpSeamMobileSdkV1PhoneSessions.fromClient(
10097
- client,
10098
- defaults
10099
- );
10100
- return seam.getOrCreate(...args);
10101
- };
10102
- }
10103
8984
  get ["/seam/partner/v1/building_blocks/spaces/auto_map"]() {
10104
8985
  const { client, defaults } = this;
10105
8986
  if (!this.defaults.isUndocumentedApiEnabled) {
@@ -10927,15 +9808,6 @@ exports.SeamHttpNoiseSensorsSimulate = SeamHttpNoiseSensorsSimulate;
10927
9808
  exports.SeamHttpPhones = SeamHttpPhones;
10928
9809
  exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
10929
9810
  exports.SeamHttpRequest = SeamHttpRequest;
10930
- exports.SeamHttpSeamBridgeV1 = SeamHttpSeamBridgeV1;
10931
- exports.SeamHttpSeamBridgeV1BridgeClientSessions = SeamHttpSeamBridgeV1BridgeClientSessions;
10932
- exports.SeamHttpSeamBridgeV1BridgeConnectedSystems = SeamHttpSeamBridgeV1BridgeConnectedSystems;
10933
- exports.SeamHttpSeamInstantKeyV1 = SeamHttpSeamInstantKeyV1;
10934
- exports.SeamHttpSeamInstantKeyV1ClientSessions = SeamHttpSeamInstantKeyV1ClientSessions;
10935
- exports.SeamHttpSeamMobileSdkV1 = SeamHttpSeamMobileSdkV1;
10936
- exports.SeamHttpSeamMobileSdkV1Acs = SeamHttpSeamMobileSdkV1Acs;
10937
- exports.SeamHttpSeamMobileSdkV1AcsCredentials = SeamHttpSeamMobileSdkV1AcsCredentials;
10938
- exports.SeamHttpSeamMobileSdkV1PhoneSessions = SeamHttpSeamMobileSdkV1PhoneSessions;
10939
9811
  exports.SeamHttpSeamPartnerV1 = SeamHttpSeamPartnerV1;
10940
9812
  exports.SeamHttpSeamPartnerV1BuildingBlocks = SeamHttpSeamPartnerV1BuildingBlocks;
10941
9813
  exports.SeamHttpSeamPartnerV1BuildingBlocksSpaces = SeamHttpSeamPartnerV1BuildingBlocksSpaces;