@seamapi/http 1.119.0 → 1.120.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 +168 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +49 -4
- package/dist/index.cjs +170 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/seam/console/v1/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/console/v1/index.js +1 -0
- package/lib/seam/connect/routes/seam/console/v1/index.js.map +1 -1
- package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.d.ts +47 -0
- package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.js +116 -0
- package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.js +6 -0
- package/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/console/v1/workspace/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/console/v1/workspace/index.js +6 -0
- package/lib/seam/connect/routes/seam/console/v1/workspace/index.js.map +1 -0
- package/lib/seam/connect/routes/seam-http-endpoints-without-workspace.d.ts +3 -1
- package/lib/seam/connect/routes/seam-http-endpoints-without-workspace.js +11 -0
- package/lib/seam/connect/routes/seam-http-endpoints-without-workspace.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +5 -2
- package/lib/seam/connect/routes/seam-http-endpoints.js +21 -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/console/v1/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.ts +259 -0
- package/src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/console/v1/workspace/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts +28 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +53 -0
- package/src/lib/version.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -106,6 +106,7 @@ __export(index_exports, {
|
|
|
106
106
|
SeamHttpSeamConsoleV1LynxMigration: () => SeamHttpSeamConsoleV1LynxMigration,
|
|
107
107
|
SeamHttpSeamConsoleV1Sites: () => SeamHttpSeamConsoleV1Sites,
|
|
108
108
|
SeamHttpSeamConsoleV1Timelines: () => SeamHttpSeamConsoleV1Timelines,
|
|
109
|
+
SeamHttpSeamConsoleV1WorkspaceFeatureFlags: () => SeamHttpSeamConsoleV1WorkspaceFeatureFlags,
|
|
109
110
|
SeamHttpSeamCustomerV1: () => SeamHttpSeamCustomerV1,
|
|
110
111
|
SeamHttpSeamCustomerV1AccessGrants: () => SeamHttpSeamCustomerV1AccessGrants,
|
|
111
112
|
SeamHttpSeamCustomerV1AccessMethods: () => SeamHttpSeamCustomerV1AccessMethods,
|
|
@@ -227,6 +228,7 @@ __export(connect_exports, {
|
|
|
227
228
|
SeamHttpSeamConsoleV1LynxMigration: () => SeamHttpSeamConsoleV1LynxMigration,
|
|
228
229
|
SeamHttpSeamConsoleV1Sites: () => SeamHttpSeamConsoleV1Sites,
|
|
229
230
|
SeamHttpSeamConsoleV1Timelines: () => SeamHttpSeamConsoleV1Timelines,
|
|
231
|
+
SeamHttpSeamConsoleV1WorkspaceFeatureFlags: () => SeamHttpSeamConsoleV1WorkspaceFeatureFlags,
|
|
230
232
|
SeamHttpSeamCustomerV1: () => SeamHttpSeamCustomerV1,
|
|
231
233
|
SeamHttpSeamCustomerV1AccessGrants: () => SeamHttpSeamCustomerV1AccessGrants,
|
|
232
234
|
SeamHttpSeamCustomerV1AccessMethods: () => SeamHttpSeamCustomerV1AccessMethods,
|
|
@@ -6648,6 +6650,128 @@ var SeamHttpSeamConsoleV1 = class _SeamHttpSeamConsoleV1 {
|
|
|
6648
6650
|
}
|
|
6649
6651
|
};
|
|
6650
6652
|
|
|
6653
|
+
// src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.ts
|
|
6654
|
+
var SeamHttpSeamConsoleV1WorkspaceFeatureFlags = class _SeamHttpSeamConsoleV1WorkspaceFeatureFlags {
|
|
6655
|
+
client;
|
|
6656
|
+
defaults;
|
|
6657
|
+
ltsVersion = seamApiLtsVersion;
|
|
6658
|
+
static ltsVersion = seamApiLtsVersion;
|
|
6659
|
+
constructor(apiKeyOrOptions = {}) {
|
|
6660
|
+
const options = parseOptions(apiKeyOrOptions);
|
|
6661
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
6662
|
+
throw new Error(
|
|
6663
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6664
|
+
);
|
|
6665
|
+
}
|
|
6666
|
+
this.client = "client" in options ? options.client : createClient(options);
|
|
6667
|
+
this.defaults = limitToSeamHttpRequestOptions(options);
|
|
6668
|
+
}
|
|
6669
|
+
static fromClient(client, options = {}) {
|
|
6670
|
+
const constructorOptions = { ...options, client };
|
|
6671
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
6672
|
+
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
6673
|
+
}
|
|
6674
|
+
return new _SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions);
|
|
6675
|
+
}
|
|
6676
|
+
static fromApiKey(apiKey, options = {}) {
|
|
6677
|
+
const constructorOptions = { ...options, apiKey };
|
|
6678
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
6679
|
+
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
6680
|
+
}
|
|
6681
|
+
return new _SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions);
|
|
6682
|
+
}
|
|
6683
|
+
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
6684
|
+
const constructorOptions = { ...options, clientSessionToken };
|
|
6685
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
6686
|
+
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
6687
|
+
}
|
|
6688
|
+
return new _SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions);
|
|
6689
|
+
}
|
|
6690
|
+
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
6691
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
6692
|
+
const clientOptions = parseOptions({ ...options, publishableKey });
|
|
6693
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
6694
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6695
|
+
"The client option cannot be used with SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromPublishableKey"
|
|
6696
|
+
);
|
|
6697
|
+
}
|
|
6698
|
+
const client = createClient(clientOptions);
|
|
6699
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client);
|
|
6700
|
+
const { token } = await clientSessions.getOrCreate({
|
|
6701
|
+
user_identifier_key: userIdentifierKey
|
|
6702
|
+
});
|
|
6703
|
+
return _SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClientSessionToken(
|
|
6704
|
+
token,
|
|
6705
|
+
options
|
|
6706
|
+
);
|
|
6707
|
+
}
|
|
6708
|
+
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
6709
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
6710
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
6711
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6712
|
+
"Missing consoleSessionToken or workspaceId"
|
|
6713
|
+
);
|
|
6714
|
+
}
|
|
6715
|
+
return new _SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions);
|
|
6716
|
+
}
|
|
6717
|
+
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
6718
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
6719
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
6720
|
+
throw new SeamHttpInvalidOptionsError(
|
|
6721
|
+
"Missing personalAccessToken or workspaceId"
|
|
6722
|
+
);
|
|
6723
|
+
}
|
|
6724
|
+
return new _SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions);
|
|
6725
|
+
}
|
|
6726
|
+
createPaginator(request) {
|
|
6727
|
+
return new SeamPaginator(this, request);
|
|
6728
|
+
}
|
|
6729
|
+
async updateClientSessionToken(clientSessionToken) {
|
|
6730
|
+
const { headers } = this.client.defaults;
|
|
6731
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
6732
|
+
clientSessionToken
|
|
6733
|
+
});
|
|
6734
|
+
for (const key of Object.keys(authHeaders)) {
|
|
6735
|
+
if (headers[key] == null) {
|
|
6736
|
+
throw new Error(
|
|
6737
|
+
"Cannot update a clientSessionToken on a client created without a clientSessionToken"
|
|
6738
|
+
);
|
|
6739
|
+
}
|
|
6740
|
+
}
|
|
6741
|
+
this.client.defaults.headers = { ...headers, ...authHeaders };
|
|
6742
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
6743
|
+
await clientSessions.get();
|
|
6744
|
+
}
|
|
6745
|
+
list(parameters, options = {}) {
|
|
6746
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6747
|
+
throw new Error(
|
|
6748
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6749
|
+
);
|
|
6750
|
+
}
|
|
6751
|
+
return new SeamHttpRequest(this, {
|
|
6752
|
+
pathname: "/seam/console/v1/workspace/feature_flags/list",
|
|
6753
|
+
method: "GET",
|
|
6754
|
+
params: parameters,
|
|
6755
|
+
responseKey: "feature_flags",
|
|
6756
|
+
options
|
|
6757
|
+
});
|
|
6758
|
+
}
|
|
6759
|
+
update(parameters, options = {}) {
|
|
6760
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
6761
|
+
throw new Error(
|
|
6762
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
6763
|
+
);
|
|
6764
|
+
}
|
|
6765
|
+
return new SeamHttpRequest(this, {
|
|
6766
|
+
pathname: "/seam/console/v1/workspace/feature_flags/update",
|
|
6767
|
+
method: "POST",
|
|
6768
|
+
body: parameters,
|
|
6769
|
+
responseKey: "feature_flag",
|
|
6770
|
+
options
|
|
6771
|
+
});
|
|
6772
|
+
}
|
|
6773
|
+
};
|
|
6774
|
+
|
|
6651
6775
|
// src/lib/seam/connect/routes/seam/console/console.ts
|
|
6652
6776
|
var SeamHttpSeamConsole = class _SeamHttpSeamConsole {
|
|
6653
6777
|
client;
|
|
@@ -12842,6 +12966,36 @@ var SeamHttpEndpoints = class _SeamHttpEndpoints {
|
|
|
12842
12966
|
return seam.get(...args);
|
|
12843
12967
|
};
|
|
12844
12968
|
}
|
|
12969
|
+
get "/seam/console/v1/workspace/feature_flags/list"() {
|
|
12970
|
+
const { client, defaults } = this;
|
|
12971
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12972
|
+
throw new Error(
|
|
12973
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12974
|
+
);
|
|
12975
|
+
}
|
|
12976
|
+
return function seamConsoleV1WorkspaceFeatureFlagsList(...args) {
|
|
12977
|
+
const seam = SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClient(
|
|
12978
|
+
client,
|
|
12979
|
+
defaults
|
|
12980
|
+
);
|
|
12981
|
+
return seam.list(...args);
|
|
12982
|
+
};
|
|
12983
|
+
}
|
|
12984
|
+
get "/seam/console/v1/workspace/feature_flags/update"() {
|
|
12985
|
+
const { client, defaults } = this;
|
|
12986
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
12987
|
+
throw new Error(
|
|
12988
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
12989
|
+
);
|
|
12990
|
+
}
|
|
12991
|
+
return function seamConsoleV1WorkspaceFeatureFlagsUpdate(...args) {
|
|
12992
|
+
const seam = SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClient(
|
|
12993
|
+
client,
|
|
12994
|
+
defaults
|
|
12995
|
+
);
|
|
12996
|
+
return seam.update(...args);
|
|
12997
|
+
};
|
|
12998
|
+
}
|
|
12845
12999
|
get "/seam/customer/v1/access_grants/list"() {
|
|
12846
13000
|
const { client, defaults } = this;
|
|
12847
13001
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -14069,6 +14223,21 @@ var SeamHttpEndpointsWithoutWorkspace = class _SeamHttpEndpointsWithoutWorkspace
|
|
|
14069
14223
|
}
|
|
14070
14224
|
return new _SeamHttpEndpointsWithoutWorkspace(constructorOptions);
|
|
14071
14225
|
}
|
|
14226
|
+
get "/seam/console/v1/workspace/feature_flags/list"() {
|
|
14227
|
+
const { client, defaults } = this;
|
|
14228
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
14229
|
+
throw new Error(
|
|
14230
|
+
"Cannot use undocumented API without isUndocumentedApiEnabled"
|
|
14231
|
+
);
|
|
14232
|
+
}
|
|
14233
|
+
return function seamConsoleV1WorkspaceFeatureFlagsList(...args) {
|
|
14234
|
+
const seam = SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClient(
|
|
14235
|
+
client,
|
|
14236
|
+
defaults
|
|
14237
|
+
);
|
|
14238
|
+
return seam.list(...args);
|
|
14239
|
+
};
|
|
14240
|
+
}
|
|
14072
14241
|
get "/seam/customer/v1/connectors/authorize"() {
|
|
14073
14242
|
const { client, defaults } = this;
|
|
14074
14243
|
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
@@ -14206,6 +14375,7 @@ exports.SeamHttpSeamConsoleV1 = SeamHttpSeamConsoleV1;
|
|
|
14206
14375
|
exports.SeamHttpSeamConsoleV1LynxMigration = SeamHttpSeamConsoleV1LynxMigration;
|
|
14207
14376
|
exports.SeamHttpSeamConsoleV1Sites = SeamHttpSeamConsoleV1Sites;
|
|
14208
14377
|
exports.SeamHttpSeamConsoleV1Timelines = SeamHttpSeamConsoleV1Timelines;
|
|
14378
|
+
exports.SeamHttpSeamConsoleV1WorkspaceFeatureFlags = SeamHttpSeamConsoleV1WorkspaceFeatureFlags;
|
|
14209
14379
|
exports.SeamHttpSeamCustomerV1 = SeamHttpSeamCustomerV1;
|
|
14210
14380
|
exports.SeamHttpSeamCustomerV1AccessGrants = SeamHttpSeamCustomerV1AccessGrants;
|
|
14211
14381
|
exports.SeamHttpSeamCustomerV1AccessMethods = SeamHttpSeamCustomerV1AccessMethods;
|