@seamapi/http 1.82.0 → 1.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connect.cjs +130 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +34 -3
- package/dist/index.cjs +132 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.js +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/staff-members/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/staff-members/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/staff-members/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.d.ts +34 -0
- package/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.js +104 -0
- package/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/v1.d.ts +2 -0
- package/lib/seam/connect/routes/seam/customer/v1/v1.js +4 -0
- package/lib/seam/connect/routes/seam/customer/v1/v1.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +4 -2
- package/lib/seam/connect/routes/seam-http-endpoints.js +11 -0
- package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/lib/seam/connect/routes/seam/customer/v1/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/staff-members/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.ts +214 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +8 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +29 -0
- package/src/lib/version.ts +1 -1
package/dist/connect.cjs
CHANGED
|
@@ -6774,6 +6774,114 @@ var SeamHttpSeamCustomerV1Spaces = class _SeamHttpSeamCustomerV1Spaces {
|
|
|
6774
6774
|
}
|
|
6775
6775
|
};
|
|
6776
6776
|
|
|
6777
|
+
// src/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.ts
|
|
6778
|
+
var SeamHttpSeamCustomerV1StaffMembers = class _SeamHttpSeamCustomerV1StaffMembers {
|
|
6779
|
+
client;
|
|
6780
|
+
defaults;
|
|
6781
|
+
ltsVersion = seamApiLtsVersion;
|
|
6782
|
+
static ltsVersion = seamApiLtsVersion;
|
|
6783
|
+
constructor(apiKeyOrOptions = {}) {
|
|
6784
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
6785
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
6786
|
+
throw new Error(
|
|
6787
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6788
|
+
);
|
|
6789
|
+
}
|
|
6790
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
6791
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
6792
|
+
}
|
|
6793
|
+
static fromClient(client, options = {}) {
|
|
6794
|
+
const constructorOptions = { ...options, client };
|
|
6795
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
6796
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
6797
|
+
}
|
|
6798
|
+
return new _SeamHttpSeamCustomerV1StaffMembers(constructorOptions);
|
|
6799
|
+
}
|
|
6800
|
+
static fromApiKey(apiKey, options = {}) {
|
|
6801
|
+
const constructorOptions = { ...options, apiKey };
|
|
6802
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
6803
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
6804
|
+
}
|
|
6805
|
+
return new _SeamHttpSeamCustomerV1StaffMembers(constructorOptions);
|
|
6806
|
+
}
|
|
6807
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
6808
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
6809
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
6810
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
6811
|
+
}
|
|
6812
|
+
return new _SeamHttpSeamCustomerV1StaffMembers(constructorOptions);
|
|
6813
|
+
}
|
|
6814
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
6815
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
6816
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
6817
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
6818
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6819
|
+
"The client option cannot be used with SeamHttpSeamCustomerV1StaffMembers.fromPublishableKey"
|
|
6820
|
+
);
|
|
6821
|
+
}
|
|
6822
|
+
const client = createClient(clientOptions);
|
|
6823
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
6824
|
+
const { token } = await clientSessions.getOrCreate({
|
|
6825
|
+
user_identifier_key: userIdentifierKey
|
|
6826
|
+
});
|
|
6827
|
+
return _SeamHttpSeamCustomerV1StaffMembers.fromClientSessionToken(
|
|
6828
|
+
token,
|
|
6829
|
+
options
|
|
6830
|
+
);
|
|
6831
|
+
}
|
|
6832
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
6833
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
6834
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
6835
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6836
|
+
"Missing consoleSessionToken or workspaceId"
|
|
6837
|
+
);
|
|
6838
|
+
}
|
|
6839
|
+
return new _SeamHttpSeamCustomerV1StaffMembers(constructorOptions);
|
|
6840
|
+
}
|
|
6841
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
6842
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
6843
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
6844
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6845
|
+
"Missing personalAccessToken or workspaceId"
|
|
6846
|
+
);
|
|
6847
|
+
}
|
|
6848
|
+
return new _SeamHttpSeamCustomerV1StaffMembers(constructorOptions);
|
|
6849
|
+
}
|
|
6850
|
+
createPaginator(request) {
|
|
6851
|
+
return new SeamPaginator(this, request);
|
|
6852
|
+
}
|
|
6853
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
6854
|
+
const { headers } = this.client.defaults;
|
|
6855
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
6856
|
+
clientSessionToken
|
|
6857
|
+
});
|
|
6858
|
+
for (const key of Object.keys(authHeaders)) {
|
|
6859
|
+
if (headers[key] == null) {
|
|
6860
|
+
throw new Error(
|
|
6861
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
6862
|
+
);
|
|
6863
|
+
}
|
|
6864
|
+
}
|
|
6865
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
6866
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6867
|
+
await clientSessions.get();
|
|
6868
|
+
}
|
|
6869
|
+
list(parameters, options = {}) {
|
|
6870
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6871
|
+
throw new Error(
|
|
6872
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6873
|
+
);
|
|
6874
|
+
}
|
|
6875
|
+
return new SeamHttpRequest(this, {
|
|
6876
|
+
pathname: "/seam/customer/v1/staff_members/list",
|
|
6877
|
+
method: "POST",
|
|
6878
|
+
body: parameters,
|
|
6879
|
+
responseKey: "staff_members",
|
|
6880
|
+
options
|
|
6881
|
+
});
|
|
6882
|
+
}
|
|
6883
|
+
};
|
|
6884
|
+
|
|
6777
6885
|
// src/lib/seam/connect/routes/seam/customer/v1/v1.ts
|
|
6778
6886
|
var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
|
|
6779
6887
|
client;
|
|
@@ -6894,6 +7002,12 @@ var SeamHttpSeamCustomerV1 = class _SeamHttpSeamCustomerV1 {
|
|
|
6894
7002
|
get spaces() {
|
|
6895
7003
|
return SeamHttpSeamCustomerV1Spaces.fromClient(this.client, this.defaults);
|
|
6896
7004
|
}
|
|
7005
|
+
get staffMembers() {
|
|
7006
|
+
return SeamHttpSeamCustomerV1StaffMembers.fromClient(
|
|
7007
|
+
this.client,
|
|
7008
|
+
this.defaults
|
|
7009
|
+
);
|
|
7010
|
+
}
|
|
6897
7011
|
};
|
|
6898
7012
|
|
|
6899
7013
|
// src/lib/seam/connect/routes/seam/customer/v1/webhooks/connectors/workspace-id/workspace-id.ts
|
|
@@ -10649,6 +10763,21 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
10649
10763
|
return seam.list(...args);
|
|
10650
10764
|
};
|
|
10651
10765
|
}
|
|
10766
|
+
get "/seam/customer/v1/staff_members/list"() {
|
|
10767
|
+
const { client, defaults } = this;
|
|
10768
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
10769
|
+
throw new Error(
|
|
10770
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
10771
|
+
);
|
|
10772
|
+
}
|
|
10773
|
+
return function seamCustomerV1StaffMembersList(...args) {
|
|
10774
|
+
const seam = SeamHttpSeamCustomerV1StaffMembers.fromClient(
|
|
10775
|
+
client,
|
|
10776
|
+
defaults
|
|
10777
|
+
);
|
|
10778
|
+
return seam.list(...args);
|
|
10779
|
+
};
|
|
10780
|
+
}
|
|
10652
10781
|
get "/seam/customer/v1/webhooks/connectors/[workspace_id]/[connector_id]"() {
|
|
10653
10782
|
const { client, defaults } = this;
|
|
10654
10783
|
return function seamCustomerV1WebhooksConnectorsWorkspaceIdConnectorId(...args) {
|
|
@@ -11479,6 +11608,7 @@ exports.SeamHttpSeamCustomerV1Portals = SeamHttpSeamCustomerV1Portals;
|
|
|
11479
11608
|
exports.SeamHttpSeamCustomerV1Reservations = SeamHttpSeamCustomerV1Reservations;
|
|
11480
11609
|
exports.SeamHttpSeamCustomerV1Settings = SeamHttpSeamCustomerV1Settings;
|
|
11481
11610
|
exports.SeamHttpSeamCustomerV1Spaces = SeamHttpSeamCustomerV1Spaces;
|
|
11611
|
+
exports.SeamHttpSeamCustomerV1StaffMembers = SeamHttpSeamCustomerV1StaffMembers;
|
|
11482
11612
|
exports.SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId = SeamHttpSeamCustomerV1WebhooksConnectorsWorkspaceId;
|
|
11483
11613
|
exports.SeamHttpSeamPartnerV1BuildingBlocks = SeamHttpSeamPartnerV1BuildingBlocks;
|
|
11484
11614
|
exports.SeamHttpSeamPartnerV1BuildingBlocksSpaces = SeamHttpSeamPartnerV1BuildingBlocksSpaces;
|