bump version to v1.0.11 (#4574)
This commit is contained in:
@@ -30,6 +30,7 @@ describe("SkyvernClient", () => {
|
||||
max_screenshot_scrolls: 1,
|
||||
script_run: { ai_fallback_triggered: true },
|
||||
errors: [{ key: "value" }],
|
||||
step_count: 1,
|
||||
run_request: {
|
||||
prompt: "Find the top 3 posts on Hacker News.",
|
||||
url: "url",
|
||||
@@ -101,6 +102,7 @@ describe("SkyvernClient", () => {
|
||||
key: "value",
|
||||
},
|
||||
],
|
||||
step_count: 1,
|
||||
run_request: {
|
||||
prompt: "Find the top 3 posts on Hacker News.",
|
||||
url: "url",
|
||||
@@ -203,6 +205,7 @@ describe("SkyvernClient", () => {
|
||||
max_screenshot_scrolls: 1,
|
||||
script_run: { ai_fallback_triggered: true },
|
||||
errors: [{ key: "value" }],
|
||||
step_count: 1,
|
||||
run_with: "run_with",
|
||||
ai_fallback: true,
|
||||
run_request: {
|
||||
@@ -275,6 +278,7 @@ describe("SkyvernClient", () => {
|
||||
key: "value",
|
||||
},
|
||||
],
|
||||
step_count: 1,
|
||||
run_with: "run_with",
|
||||
ai_fallback: true,
|
||||
run_request: {
|
||||
@@ -372,6 +376,7 @@ describe("SkyvernClient", () => {
|
||||
max_screenshot_scrolls: 1,
|
||||
script_run: { ai_fallback_triggered: true },
|
||||
errors: [{ key: "value" }],
|
||||
step_count: 1,
|
||||
run_request: {
|
||||
prompt: "Find the top 3 posts on Hacker News.",
|
||||
url: "url",
|
||||
@@ -431,6 +436,7 @@ describe("SkyvernClient", () => {
|
||||
key: "value",
|
||||
},
|
||||
],
|
||||
step_count: 1,
|
||||
run_request: {
|
||||
prompt: "Find the top 3 posts on Hacker News.",
|
||||
url: "url",
|
||||
@@ -563,6 +569,7 @@ describe("SkyvernClient", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
finally_block_label: "finally_block_label",
|
||||
},
|
||||
proxy_location: "RESIDENTIAL",
|
||||
webhook_callback_url: "webhook_callback_url",
|
||||
@@ -634,6 +641,7 @@ describe("SkyvernClient", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
finally_block_label: "finally_block_label",
|
||||
},
|
||||
proxy_location: "RESIDENTIAL",
|
||||
webhook_callback_url: "webhook_callback_url",
|
||||
@@ -713,6 +721,7 @@ describe("SkyvernClient", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
finally_block_label: "finally_block_label",
|
||||
},
|
||||
proxy_location: "RESIDENTIAL",
|
||||
webhook_callback_url: "webhook_callback_url",
|
||||
@@ -782,6 +791,7 @@ describe("SkyvernClient", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
finally_block_label: "finally_block_label",
|
||||
},
|
||||
proxy_location: "RESIDENTIAL",
|
||||
webhook_callback_url: "webhook_callback_url",
|
||||
@@ -869,6 +879,7 @@ describe("SkyvernClient", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
finally_block_label: "finally_block_label",
|
||||
},
|
||||
proxy_location: "RESIDENTIAL",
|
||||
webhook_callback_url: "webhook_callback_url",
|
||||
@@ -935,6 +946,7 @@ describe("SkyvernClient", () => {
|
||||
},
|
||||
},
|
||||
],
|
||||
finally_block_label: "finally_block_label",
|
||||
},
|
||||
proxy_location: "RESIDENTIAL",
|
||||
webhook_callback_url: "webhook_callback_url",
|
||||
@@ -1715,11 +1727,14 @@ describe("SkyvernClient", () => {
|
||||
{
|
||||
browser_session_id: "pbs_123456",
|
||||
organization_id: "organization_id",
|
||||
status: "status",
|
||||
runnable_type: "runnable_type",
|
||||
runnable_id: "runnable_id",
|
||||
timeout: 1,
|
||||
browser_address: "browser_address",
|
||||
app_url: "app_url",
|
||||
extensions: ["ad-blocker"],
|
||||
browser_type: "msedge",
|
||||
vnc_streaming_supported: true,
|
||||
download_path: "download_path",
|
||||
downloaded_files: [{ url: "url" }],
|
||||
@@ -1744,11 +1759,14 @@ describe("SkyvernClient", () => {
|
||||
{
|
||||
browser_session_id: "pbs_123456",
|
||||
organization_id: "organization_id",
|
||||
status: "status",
|
||||
runnable_type: "runnable_type",
|
||||
runnable_id: "runnable_id",
|
||||
timeout: 1,
|
||||
browser_address: "browser_address",
|
||||
app_url: "app_url",
|
||||
extensions: ["ad-blocker"],
|
||||
browser_type: "msedge",
|
||||
vnc_streaming_supported: true,
|
||||
download_path: "download_path",
|
||||
downloaded_files: [
|
||||
@@ -1813,11 +1831,14 @@ describe("SkyvernClient", () => {
|
||||
const rawResponseBody = {
|
||||
browser_session_id: "pbs_123456",
|
||||
organization_id: "organization_id",
|
||||
status: "status",
|
||||
runnable_type: "runnable_type",
|
||||
runnable_id: "runnable_id",
|
||||
timeout: 1,
|
||||
browser_address: "browser_address",
|
||||
app_url: "app_url",
|
||||
extensions: ["ad-blocker"],
|
||||
browser_type: "msedge",
|
||||
vnc_streaming_supported: true,
|
||||
download_path: "download_path",
|
||||
downloaded_files: [
|
||||
@@ -1845,11 +1866,14 @@ describe("SkyvernClient", () => {
|
||||
expect(response).toEqual({
|
||||
browser_session_id: "pbs_123456",
|
||||
organization_id: "organization_id",
|
||||
status: "status",
|
||||
runnable_type: "runnable_type",
|
||||
runnable_id: "runnable_id",
|
||||
timeout: 1,
|
||||
browser_address: "browser_address",
|
||||
app_url: "app_url",
|
||||
extensions: ["ad-blocker"],
|
||||
browser_type: "msedge",
|
||||
vnc_streaming_supported: true,
|
||||
download_path: "download_path",
|
||||
downloaded_files: [
|
||||
@@ -1976,11 +2000,14 @@ describe("SkyvernClient", () => {
|
||||
const rawResponseBody = {
|
||||
browser_session_id: "pbs_123456",
|
||||
organization_id: "organization_id",
|
||||
status: "status",
|
||||
runnable_type: "runnable_type",
|
||||
runnable_id: "runnable_id",
|
||||
timeout: 1,
|
||||
browser_address: "browser_address",
|
||||
app_url: "app_url",
|
||||
extensions: ["ad-blocker"],
|
||||
browser_type: "msedge",
|
||||
vnc_streaming_supported: true,
|
||||
download_path: "download_path",
|
||||
downloaded_files: [
|
||||
@@ -2007,11 +2034,14 @@ describe("SkyvernClient", () => {
|
||||
expect(response).toEqual({
|
||||
browser_session_id: "pbs_123456",
|
||||
organization_id: "organization_id",
|
||||
status: "status",
|
||||
runnable_type: "runnable_type",
|
||||
runnable_id: "runnable_id",
|
||||
timeout: 1,
|
||||
browser_address: "browser_address",
|
||||
app_url: "app_url",
|
||||
extensions: ["ad-blocker"],
|
||||
browser_type: "msedge",
|
||||
vnc_streaming_supported: true,
|
||||
download_path: "download_path",
|
||||
downloaded_files: [
|
||||
@@ -2107,6 +2137,7 @@ describe("SkyvernClient", () => {
|
||||
source: "source",
|
||||
content: "Hello, your verification code is 123456",
|
||||
expired_at: "2024-01-15T09:30:00Z",
|
||||
type: "totp",
|
||||
totp_code_id: "totp_code_id",
|
||||
code: "code",
|
||||
organization_id: "organization_id",
|
||||
@@ -2135,6 +2166,7 @@ describe("SkyvernClient", () => {
|
||||
source: "source",
|
||||
content: "Hello, your verification code is 123456",
|
||||
expired_at: "2024-01-15T09:30:00Z",
|
||||
type: "totp",
|
||||
totp_code_id: "totp_code_id",
|
||||
code: "code",
|
||||
organization_id: "organization_id",
|
||||
@@ -2398,6 +2430,7 @@ describe("SkyvernClient", () => {
|
||||
max_screenshot_scrolls: 1,
|
||||
script_run: { ai_fallback_triggered: true },
|
||||
errors: [{ key: "value" }],
|
||||
step_count: 1,
|
||||
run_with: "run_with",
|
||||
ai_fallback: true,
|
||||
run_request: {
|
||||
@@ -2463,6 +2496,7 @@ describe("SkyvernClient", () => {
|
||||
key: "value",
|
||||
},
|
||||
],
|
||||
step_count: 1,
|
||||
run_with: "run_with",
|
||||
ai_fallback: true,
|
||||
run_request: {
|
||||
@@ -2534,6 +2568,7 @@ describe("SkyvernClient", () => {
|
||||
max_screenshot_scrolls: 1,
|
||||
script_run: { ai_fallback_triggered: true },
|
||||
errors: [{ key: "value" }],
|
||||
step_count: 1,
|
||||
run_with: "run_with",
|
||||
ai_fallback: true,
|
||||
run_request: {
|
||||
@@ -2599,6 +2634,7 @@ describe("SkyvernClient", () => {
|
||||
key: "value",
|
||||
},
|
||||
],
|
||||
step_count: 1,
|
||||
run_with: "run_with",
|
||||
ai_fallback: true,
|
||||
run_request: {
|
||||
@@ -2958,4 +2994,199 @@ describe("SkyvernClient", () => {
|
||||
});
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("create_checkout_session_api_v1_billing_checkout_post (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
const rawRequestBody = { tier: "free" };
|
||||
const rawResponseBody = { id: "id", url: "url" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/api/v1/billing/checkout")
|
||||
.jsonBody(rawRequestBody)
|
||||
.respondWith()
|
||||
.statusCode(200)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
const response = await client.createCheckoutSessionApiV1BillingCheckoutPost({
|
||||
tier: "free",
|
||||
});
|
||||
expect(response).toEqual({
|
||||
id: "id",
|
||||
url: "url",
|
||||
});
|
||||
});
|
||||
|
||||
test("create_checkout_session_api_v1_billing_checkout_post (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
const rawRequestBody = { tier: "free" };
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/api/v1/billing/checkout")
|
||||
.jsonBody(rawRequestBody)
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.createCheckoutSessionApiV1BillingCheckoutPost({
|
||||
tier: "free",
|
||||
});
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("create_portal_session_api_v1_billing_portal_post (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { url: "url" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/api/v1/billing/portal")
|
||||
.respondWith()
|
||||
.statusCode(200)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
const response = await client.createPortalSessionApiV1BillingPortalPost();
|
||||
expect(response).toEqual({
|
||||
url: "url",
|
||||
});
|
||||
});
|
||||
|
||||
test("create_portal_session_api_v1_billing_portal_post (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/api/v1/billing/portal")
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.createPortalSessionApiV1BillingPortalPost();
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("get_organization_billing_api_v1_billing_state_get (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = {
|
||||
billing_id: "billing_id",
|
||||
organization_id: "organization_id",
|
||||
plan_tier: "free",
|
||||
current_period_start: "2024-01-15T09:30:00Z",
|
||||
current_period_end: "2024-01-15T09:30:00Z",
|
||||
included_credits_this_period: 1,
|
||||
credits_consumed_this_period: 1,
|
||||
cached_credits_consumed_this_period: 1,
|
||||
overage_enabled: true,
|
||||
browser_uptime_seconds_consumed: 1,
|
||||
topup_credits_total: 1,
|
||||
topup_credits_used: 1,
|
||||
topup_credits_remaining: 1,
|
||||
credits_remaining: 1,
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
};
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/api/v1/billing/state")
|
||||
.respondWith()
|
||||
.statusCode(200)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
const response = await client.getOrganizationBillingApiV1BillingStateGet();
|
||||
expect(response).toEqual({
|
||||
billing_id: "billing_id",
|
||||
organization_id: "organization_id",
|
||||
plan_tier: "free",
|
||||
current_period_start: "2024-01-15T09:30:00Z",
|
||||
current_period_end: "2024-01-15T09:30:00Z",
|
||||
included_credits_this_period: 1,
|
||||
credits_consumed_this_period: 1,
|
||||
cached_credits_consumed_this_period: 1,
|
||||
overage_enabled: true,
|
||||
browser_uptime_seconds_consumed: 1,
|
||||
topup_credits_total: 1,
|
||||
topup_credits_used: 1,
|
||||
topup_credits_remaining: 1,
|
||||
credits_remaining: 1,
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
});
|
||||
});
|
||||
|
||||
test("get_organization_billing_api_v1_billing_state_get (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/api/v1/billing/state")
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.getOrganizationBillingApiV1BillingStateGet();
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("change_tier_api_v1_billing_change_tier_post (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
const rawRequestBody = { tier: "free" };
|
||||
const rawResponseBody = { status: "status", tier: "tier", redirect_url: "redirect_url" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/api/v1/billing/change-tier")
|
||||
.jsonBody(rawRequestBody)
|
||||
.respondWith()
|
||||
.statusCode(200)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
const response = await client.changeTierApiV1BillingChangeTierPost({
|
||||
tier: "free",
|
||||
});
|
||||
expect(response).toEqual({
|
||||
status: "status",
|
||||
tier: "tier",
|
||||
redirect_url: "redirect_url",
|
||||
});
|
||||
});
|
||||
|
||||
test("change_tier_api_v1_billing_change_tier_post (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
const rawRequestBody = { tier: "free" };
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/api/v1/billing/change-tier")
|
||||
.jsonBody(rawRequestBody)
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.changeTierApiV1BillingChangeTierPost({
|
||||
tier: "free",
|
||||
});
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user