@seamapi/http 1.82.0 → 1.84.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 (40) hide show
  1. package/dist/connect.cjs +90 -79
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +35 -34
  4. package/dist/index.cjs +92 -81
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +1 -1
  8. package/lib/seam/connect/routes/seam/customer/v1/index.js +1 -1
  9. package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -1
  10. package/lib/seam/connect/routes/seam/customer/v1/staff-members/index.d.ts +1 -0
  11. package/lib/seam/connect/routes/seam/customer/v1/{webhooks/connectors/workspace-id → staff-members}/index.js +1 -1
  12. package/lib/seam/connect/routes/seam/customer/v1/{webhooks → staff-members}/index.js.map +1 -1
  13. package/lib/seam/connect/routes/seam/customer/v1/{webhooks/connectors/workspace-id/workspace-id.d.ts → staff-members/staff-members.d.ts} +20 -20
  14. package/lib/seam/connect/routes/seam/customer/v1/{webhooks/connectors/workspace-id/workspace-id.js → staff-members/staff-members.js} +26 -20
  15. package/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.js.map +1 -0
  16. package/lib/seam/connect/routes/seam/customer/v1/v1.d.ts +2 -0
  17. package/lib/seam/connect/routes/seam/customer/v1/v1.js +4 -0
  18. package/lib/seam/connect/routes/seam/customer/v1/v1.js.map +1 -1
  19. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +5 -5
  20. package/lib/seam/connect/routes/seam-http-endpoints.js +8 -5
  21. package/lib/seam/connect/routes/seam-http-endpoints.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/customer/v1/index.ts +1 -1
  26. package/src/lib/seam/connect/routes/seam/customer/v1/{webhooks/connectors/workspace-id → staff-members}/index.ts +1 -1
  27. package/src/lib/seam/connect/routes/seam/customer/v1/{webhooks/connectors/workspace-id/workspace-id.ts → staff-members/staff-members.ts} +44 -46
  28. package/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +8 -0
  29. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +24 -23
  30. package/src/lib/version.ts +1 -1
  31. package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/index.d.ts +0 -1
  32. package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/index.js +0 -6
  33. package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/index.js.map +0 -1
  34. package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/index.d.ts +0 -1
  35. package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/index.js.map +0 -1
  36. package/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/workspace-id.js.map +0 -1
  37. package/lib/seam/connect/routes/seam/customer/v1/webhooks/index.d.ts +0 -1
  38. package/lib/seam/connect/routes/seam/customer/v1/webhooks/index.js +0 -6
  39. package/src/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/index.ts +0 -6
  40. package/src/lib/seam/connect/routes/seam/customer/v1/webhooks/index.ts +0 -6
package/dist/index.cjs CHANGED
@@ -111,7 +111,7 @@ __export(index_exports, {
111
111
  SeamHttpSeamCustomerV1Reservations: () => SeamHttpSeamCustomerV1Reservations,
112
112
  SeamHttpSeamCustomerV1Settings: () => SeamHttpSeamCustomerV1Settings,
113
113
  SeamHttpSeamCustomerV1Spaces: () => SeamHttpSeamCustomerV1Spaces,
114
- SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId: () => SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId,
114
+ SeamHttpSeamCustomerV1StaffMembers: () => SeamHttpSeamCustomerV1StaffMembers,
115
115
  SeamHttpSeamPartnerV1BuildingBlocks: () => SeamHttpSeamPartnerV1BuildingBlocks,
116
116
  SeamHttpSeamPartnerV1BuildingBlocksSpaces: () => SeamHttpSeamPartnerV1BuildingBlocksSpaces,
117
117
  SeamHttpSpaces: () => SeamHttpSpaces,
@@ -219,7 +219,7 @@ __export(connect_exports, {
219
219
  SeamHttpSeamCustomerV1Reservations: () => SeamHttpSeamCustomerV1Reservations,
220
220
  SeamHttpSeamCustomerV1Settings: () => SeamHttpSeamCustomerV1Settings,
221
221
  SeamHttpSeamCustomerV1Spaces: () => SeamHttpSeamCustomerV1Spaces,
222
- SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId: () => SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId,
222
+ SeamHttpSeamCustomerV1StaffMembers: () => SeamHttpSeamCustomerV1StaffMembers,
223
223
  SeamHttpSeamPartnerV1BuildingBlocks: () => SeamHttpSeamPartnerV1BuildingBlocks,
224
224
  SeamHttpSeamPartnerV1BuildingBlocksSpaces: () => SeamHttpSeamPartnerV1BuildingBlocksSpaces,
225
225
  SeamHttpSpaces: () => SeamHttpSpaces,
@@ -7027,14 +7027,19 @@ var SeamHttpSeamCustomerV1Spaces = class _SeamHttpSeamCustomerV1Spaces {
7027
7027
  }
7028
7028
  };
7029
7029
 
7030
- // src/lib/seam/connect/routes/seam/customer/v1/v1.ts
7031
- var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
7030
+ // src/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.ts
7031
+ var SeamHttpSeamCustomerV1StaffMembers = class _SeamHttpSeamCustomerV1StaffMembers {
7032
7032
  client;
7033
7033
  defaults;
7034
7034
  ltsVersion = seamApiLtsVersion;
7035
7035
  static ltsVersion = seamApiLtsVersion;
7036
7036
  constructor(apiKeyOrOptions = {}) {
7037
7037
  const options = parseOptions(apiKeyOrOptions);
7038
+ if (!options.isUndocumentedApiEnabled) {
7039
+ throw new Error(
7040
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7041
+ );
7042
+ }
7038
7043
  this.client = "client" in options ? options.client : createClient(options);
7039
7044
  this.defaults = limitToSeamHttpRequestOptions(options);
7040
7045
  }
@@ -7043,28 +7048,28 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
7043
7048
  if (!isSeamHttpOptionsWithClient(constructorOptions)) {
7044
7049
  throw new SeamHttpInvalidOptionsError("Missing client");
7045
7050
  }
7046
- return new _SeamHttpSeamCustomerV1(constructorOptions);
7051
+ return new _SeamHttpSeamCustomerV1StaffMembers(constructorOptions);
7047
7052
  }
7048
7053
  static fromApiKey(apiKey, options = {}) {
7049
7054
  const constructorOptions = { ...options, apiKey };
7050
7055
  if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
7051
7056
  throw new SeamHttpInvalidOptionsError("Missing apiKey");
7052
7057
  }
7053
- return new _SeamHttpSeamCustomerV1(constructorOptions);
7058
+ return new _SeamHttpSeamCustomerV1StaffMembers(constructorOptions);
7054
7059
  }
7055
7060
  static fromClientSessionToken(clientSessionToken, options = {}) {
7056
7061
  const constructorOptions = { ...options, clientSessionToken };
7057
7062
  if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
7058
7063
  throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
7059
7064
  }
7060
- return new _SeamHttpSeamCustomerV1(constructorOptions);
7065
+ return new _SeamHttpSeamCustomerV1StaffMembers(constructorOptions);
7061
7066
  }
7062
7067
  static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
7063
7068
  warnOnInsecureuserIdentifierKey(userIdentifierKey);
7064
7069
  const clientOptions = parseOptions({ ...options, publishableKey });
7065
7070
  if (isSeamHttpOptionsWithClient(clientOptions)) {
7066
7071
  throw new SeamHttpInvalidOptionsError(
7067
- "The client option cannot be used with SeamHttpSeamCustomerV1.fromPublishableKey"
7072
+ "The client option cannot be used with SeamHttpSeamCustomerV1StaffMembers.fromPublishableKey"
7068
7073
  );
7069
7074
  }
7070
7075
  const client = createClient(clientOptions);
@@ -7072,7 +7077,10 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
7072
7077
  const { token } = await clientSessions.getOrCreate({
7073
7078
  user_identifier_key: userIdentifierKey
7074
7079
  });
7075
- return _SeamHttpSeamCustomerV1.fromClientSessionToken(token, options);
7080
+ return _SeamHttpSeamCustomerV1StaffMembers.fromClientSessionToken(
7081
+ token,
7082
+ options
7083
+ );
7076
7084
  }
7077
7085
  static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
7078
7086
  const constructorOptions = { ...options, consoleSessionToken, workspaceId };
@@ -7081,7 +7089,7 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
7081
7089
  "Missing consoleSessionToken or workspaceId"
7082
7090
  );
7083
7091
  }
7084
- return new _SeamHttpSeamCustomerV1(constructorOptions);
7092
+ return new _SeamHttpSeamCustomerV1StaffMembers(constructorOptions);
7085
7093
  }
7086
7094
  static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
7087
7095
  const constructorOptions = { ...options, personalAccessToken, workspaceId };
@@ -7090,7 +7098,7 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
7090
7098
  "Missing personalAccessToken or workspaceId"
7091
7099
  );
7092
7100
  }
7093
- return new _SeamHttpSeamCustomerV1(constructorOptions);
7101
+ return new _SeamHttpSeamCustomerV1StaffMembers(constructorOptions);
7094
7102
  }
7095
7103
  createPaginator(request) {
7096
7104
  return new SeamPaginator(this, request);
@@ -7111,46 +7119,24 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
7111
7119
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7112
7120
  await clientSessions.get();
7113
7121
  }
7114
- get automationRuns() {
7115
- return SeamHttpSeamCustomerV1AutomationRuns.fromClient(
7116
- this.client,
7117
- this.defaults
7118
- );
7119
- }
7120
- get automations() {
7121
- return SeamHttpSeamCustomerV1Automations.fromClient(
7122
- this.client,
7123
- this.defaults
7124
- );
7125
- }
7126
- get connectors() {
7127
- return SeamHttpSeamCustomerV1Connectors.fromClient(
7128
- this.client,
7129
- this.defaults
7130
- );
7131
- }
7132
- get events() {
7133
- return SeamHttpSeamCustomerV1Events.fromClient(this.client, this.defaults);
7134
- }
7135
- get portals() {
7136
- return SeamHttpSeamCustomerV1Portals.fromClient(this.client, this.defaults);
7137
- }
7138
- get reservations() {
7139
- return SeamHttpSeamCustomerV1Reservations.fromClient(
7140
- this.client,
7141
- this.defaults
7142
- );
7143
- }
7144
- get settings() {
7145
- return SeamHttpSeamCustomerV1Settings.fromClient(this.client, this.defaults);
7146
- }
7147
- get spaces() {
7148
- return SeamHttpSeamCustomerV1Spaces.fromClient(this.client, this.defaults);
7122
+ list(parameters, options = {}) {
7123
+ if (!this.defaults.isUndocumentedApiEnabled) {
7124
+ throw new Error(
7125
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
7126
+ );
7127
+ }
7128
+ return new SeamHttpRequest(this, {
7129
+ pathname: "/seam/customer/v1/staff_members/list",
7130
+ method: "POST",
7131
+ body: parameters,
7132
+ responseKey: "staff_members",
7133
+ options
7134
+ });
7149
7135
  }
7150
7136
  };
7151
7137
 
7152
- // src/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/workspace-id.ts
7153
- var SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId = class _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId {
7138
+ // src/lib/seam/connect/routes/seam/customer/v1/v1.ts
7139
+ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
7154
7140
  client;
7155
7141
  defaults;
7156
7142
  ltsVersion = seamApiLtsVersion;
@@ -7165,34 +7151,28 @@ var SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId = class _SeamHttpSeamCus
7165
7151
  if (!isSeamHttpOptionsWithClient(constructorOptions)) {
7166
7152
  throw new SeamHttpInvalidOptionsError("Missing client");
7167
7153
  }
7168
- return new _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId(
7169
- constructorOptions
7170
- );
7154
+ return new _SeamHttpSeamCustomerV1(constructorOptions);
7171
7155
  }
7172
7156
  static fromApiKey(apiKey, options = {}) {
7173
7157
  const constructorOptions = { ...options, apiKey };
7174
7158
  if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
7175
7159
  throw new SeamHttpInvalidOptionsError("Missing apiKey");
7176
7160
  }
7177
- return new _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId(
7178
- constructorOptions
7179
- );
7161
+ return new _SeamHttpSeamCustomerV1(constructorOptions);
7180
7162
  }
7181
7163
  static fromClientSessionToken(clientSessionToken, options = {}) {
7182
7164
  const constructorOptions = { ...options, clientSessionToken };
7183
7165
  if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
7184
7166
  throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
7185
7167
  }
7186
- return new _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId(
7187
- constructorOptions
7188
- );
7168
+ return new _SeamHttpSeamCustomerV1(constructorOptions);
7189
7169
  }
7190
7170
  static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
7191
7171
  warnOnInsecureuserIdentifierKey(userIdentifierKey);
7192
7172
  const clientOptions = parseOptions({ ...options, publishableKey });
7193
7173
  if (isSeamHttpOptionsWithClient(clientOptions)) {
7194
7174
  throw new SeamHttpInvalidOptionsError(
7195
- "The client option cannot be used with SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId.fromPublishableKey"
7175
+ "The client option cannot be used with SeamHttpSeamCustomerV1.fromPublishableKey"
7196
7176
  );
7197
7177
  }
7198
7178
  const client = createClient(clientOptions);
@@ -7200,10 +7180,7 @@ var SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId = class _SeamHttpSeamCus
7200
7180
  const { token } = await clientSessions.getOrCreate({
7201
7181
  user_identifier_key: userIdentifierKey
7202
7182
  });
7203
- return _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId.fromClientSessionToken(
7204
- token,
7205
- options
7206
- );
7183
+ return _SeamHttpSeamCustomerV1.fromClientSessionToken(token, options);
7207
7184
  }
7208
7185
  static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
7209
7186
  const constructorOptions = { ...options, consoleSessionToken, workspaceId };
@@ -7212,9 +7189,7 @@ var SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId = class _SeamHttpSeamCus
7212
7189
  "Missing consoleSessionToken or workspaceId"
7213
7190
  );
7214
7191
  }
7215
- return new _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId(
7216
- constructorOptions
7217
- );
7192
+ return new _SeamHttpSeamCustomerV1(constructorOptions);
7218
7193
  }
7219
7194
  static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
7220
7195
  const constructorOptions = { ...options, personalAccessToken, workspaceId };
@@ -7223,9 +7198,7 @@ var SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId = class _SeamHttpSeamCus
7223
7198
  "Missing personalAccessToken or workspaceId"
7224
7199
  );
7225
7200
  }
7226
- return new _SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId(
7227
- constructorOptions
7228
- );
7201
+ return new _SeamHttpSeamCustomerV1(constructorOptions);
7229
7202
  }
7230
7203
  createPaginator(request) {
7231
7204
  return new SeamPaginator(this, request);
@@ -7246,14 +7219,47 @@ var SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId = class _SeamHttpSeamCus
7246
7219
  const clientSessions = SeamHttpClientSessions.fromClient(this.client);
7247
7220
  await clientSessions.get();
7248
7221
  }
7249
- connectorId(parameters, options = {}) {
7250
- return new SeamHttpRequest(this, {
7251
- pathname: "/seam/customer/v1/webhooks/connectors/[workspace_id]/[connector_id]",
7252
- method: "POST",
7253
- body: parameters,
7254
- responseKey: void 0,
7255
- options
7256
- });
7222
+ get automationRuns() {
7223
+ return SeamHttpSeamCustomerV1AutomationRuns.fromClient(
7224
+ this.client,
7225
+ this.defaults
7226
+ );
7227
+ }
7228
+ get automations() {
7229
+ return SeamHttpSeamCustomerV1Automations.fromClient(
7230
+ this.client,
7231
+ this.defaults
7232
+ );
7233
+ }
7234
+ get connectors() {
7235
+ return SeamHttpSeamCustomerV1Connectors.fromClient(
7236
+ this.client,
7237
+ this.defaults
7238
+ );
7239
+ }
7240
+ get events() {
7241
+ return SeamHttpSeamCustomerV1Events.fromClient(this.client, this.defaults);
7242
+ }
7243
+ get portals() {
7244
+ return SeamHttpSeamCustomerV1Portals.fromClient(this.client, this.defaults);
7245
+ }
7246
+ get reservations() {
7247
+ return SeamHttpSeamCustomerV1Reservations.fromClient(
7248
+ this.client,
7249
+ this.defaults
7250
+ );
7251
+ }
7252
+ get settings() {
7253
+ return SeamHttpSeamCustomerV1Settings.fromClient(this.client, this.defaults);
7254
+ }
7255
+ get spaces() {
7256
+ return SeamHttpSeamCustomerV1Spaces.fromClient(this.client, this.defaults);
7257
+ }
7258
+ get staffMembers() {
7259
+ return SeamHttpSeamCustomerV1StaffMembers.fromClient(
7260
+ this.client,
7261
+ this.defaults
7262
+ );
7257
7263
  }
7258
7264
  };
7259
7265
 
@@ -10902,14 +10908,19 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
10902
10908
  return seam.list(...args);
10903
10909
  };
10904
10910
  }
10905
- get "/seam/customer/v1/webhooks/connectors/[workspace_id]/[connector_id]"() {
10911
+ get "/seam/customer/v1/staff_members/list"() {
10906
10912
  const { client, defaults } = this;
10907
- return function seamCustomerV1WebhooksConnectorsWorkspaceIdConnectorId(...args) {
10908
- const seam = SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId.fromClient(
10913
+ if (!this.defaults.isUndocumentedApiEnabled) {
10914
+ throw new Error(
10915
+ "Cannot use undocumented API without isUndocumentedApiEnabled"
10916
+ );
10917
+ }
10918
+ return function seamCustomerV1StaffMembersList(...args) {
10919
+ const seam = SeamHttpSeamCustomerV1StaffMembers.fromClient(
10909
10920
  client,
10910
10921
  defaults
10911
10922
  );
10912
- return seam.connectorId(...args);
10923
+ return seam.list(...args);
10913
10924
  };
10914
10925
  }
10915
10926
  get "/seam/partner/v1/building_blocks/spaces/auto_map"() {
@@ -11738,7 +11749,7 @@ exports.SeamHttpSeamCustomerV1Portals = SeamHttpSeamCustomerV1Portals;
11738
11749
  exports.SeamHttpSeamCustomerV1Reservations = SeamHttpSeamCustomerV1Reservations;
11739
11750
  exports.SeamHttpSeamCustomerV1Settings = SeamHttpSeamCustomerV1Settings;
11740
11751
  exports.SeamHttpSeamCustomerV1Spaces = SeamHttpSeamCustomerV1Spaces;
11741
- exports.SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId = SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId;
11752
+ exports.SeamHttpSeamCustomerV1StaffMembers = SeamHttpSeamCustomerV1StaffMembers;
11742
11753
  exports.SeamHttpSeamPartnerV1BuildingBlocks = SeamHttpSeamPartnerV1BuildingBlocks;
11743
11754
  exports.SeamHttpSeamPartnerV1BuildingBlocksSpaces = SeamHttpSeamPartnerV1BuildingBlocksSpaces;
11744
11755
  exports.SeamHttpSpaces = SeamHttpSpaces;