- getMicrofrontendsGroups - List microfrontends groups
- getMicrofrontendsInGroup - List projects in a microfrontends group
- getMicrofrontendsConfig - Get microfrontends config for a deployment
- getMicrofrontendsConfigForProject - Get microfrontends config for a project
- createMicrofrontendsGroupWithApplications - Create a microfrontends group with applications
Get the microfrontends group IDs for a team.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.microfrontends.getMicrofrontendsGroups({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { microfrontendsGetMicrofrontendsGroups } from "@vercel/sdk/funcs/microfrontendsGetMicrofrontendsGroups.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await microfrontendsGetMicrofrontendsGroups(vercel, {
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("microfrontendsGetMicrofrontendsGroups failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.GetMicrofrontendsGroupsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.GetMicrofrontendsGroupsResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Get the microfrontends for a given group ID.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.microfrontends.getMicrofrontendsInGroup({
groupId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { microfrontendsGetMicrofrontendsInGroup } from "@vercel/sdk/funcs/microfrontendsGetMicrofrontendsInGroup.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await microfrontendsGetMicrofrontendsInGroup(vercel, {
groupId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("microfrontendsGetMicrofrontendsInGroup failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.GetMicrofrontendsInGroupRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.GetMicrofrontendsInGroupResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Get the microfrontends config for a deployment.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.microfrontends.getMicrofrontendsConfig({
deploymentId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { microfrontendsGetMicrofrontendsConfig } from "@vercel/sdk/funcs/microfrontendsGetMicrofrontendsConfig.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await microfrontendsGetMicrofrontendsConfig(vercel, {
deploymentId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("microfrontendsGetMicrofrontendsConfig failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.GetMicrofrontendsConfigRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.GetMicrofrontendsConfigResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Get the microfrontends config for a project by ID or name.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.microfrontends.getMicrofrontendsConfigForProject({
projectIdOrName: "<value>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { microfrontendsGetMicrofrontendsConfigForProject } from "@vercel/sdk/funcs/microfrontendsGetMicrofrontendsConfigForProject.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await microfrontendsGetMicrofrontendsConfigForProject(vercel, {
projectIdOrName: "<value>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("microfrontendsGetMicrofrontendsConfigForProject failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.GetMicrofrontendsConfigForProjectRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.GetMicrofrontendsConfigForProjectResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |
Creates a microfrontends group and attaches multiple projects in a single request.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.microfrontends.createMicrofrontendsGroupWithApplications({
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
groupName: "MFE Group 1",
defaultApp: {
projectId: "<id>",
},
otherApplications: [
{
projectId: "<id>",
},
],
},
});
console.log(result);
}
run();The standalone function version of this method:
import { VercelCore } from "@vercel/sdk/core.js";
import { microfrontendsCreateMicrofrontendsGroupWithApplications } from "@vercel/sdk/funcs/microfrontendsCreateMicrofrontendsGroupWithApplications.js";
// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const res = await microfrontendsCreateMicrofrontendsGroupWithApplications(vercel, {
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
requestBody: {
groupName: "MFE Group 1",
defaultApp: {
projectId: "<id>",
},
otherApplications: [
{
projectId: "<id>",
},
],
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("microfrontendsCreateMicrofrontendsGroupWithApplications failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.CreateMicrofrontendsGroupWithApplicationsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.CreateMicrofrontendsGroupWithApplicationsResponseBody>
| Error Type | Status Code | Content Type |
|---|---|---|
| models.SDKError | 4XX, 5XX | */* |