Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@cloudflare/vitest-pool-workers": "^0.8.12",
"@cloudflare/workers-types": "^4.20240603.0",
"@unkey/api": "workspace:^",
"@unkey/api": "2.0.0",
"@unkey/tsconfig": "workspace:^",
"@vitest/ui": "^1.6.0",
"typescript": "^5.5.3",
Expand Down
66 changes: 0 additions & 66 deletions apps/api/src/integration/sdk/create_and_verify.test.ts

This file was deleted.

This file was deleted.

47 changes: 0 additions & 47 deletions apps/api/src/integration/sdk/create_key_with_permissions.ts

This file was deleted.

94 changes: 0 additions & 94 deletions apps/api/src/integration/sdk/verify.test.ts

This file was deleted.

54 changes: 0 additions & 54 deletions apps/api/src/integration/sdk/verify_with_ratelimit.test.ts

This file was deleted.

3 changes: 1 addition & 2 deletions apps/api/src/integration/verify_permissions.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { IntegrationHarness } from "@/pkg/testutil/integration-harness";
import type { V1KeysVerifyKeyRequest, V1KeysVerifyKeyResponse } from "@/routes/v1_keys_verifyKey";
import type { ErrorResponse } from "@unkey/api/src";
import { describe, expect, test } from "vitest";

test("without permissions", async (t) => {
Expand Down Expand Up @@ -199,7 +198,7 @@ describe(
const h = await IntegrationHarness.init(t);
const { key } = await h.createKey();

const res = await h.post<V1KeysVerifyKeyRequest, ErrorResponse>({
const res = await h.post<V1KeysVerifyKeyRequest, { error: { code: string } }>({
url: `${h.baseUrl}/v1/keys.verifyKey`,
headers: {
"Content-Type": "application/json",
Expand Down
7 changes: 3 additions & 4 deletions apps/api/src/routes/v1_keys_createKey.security.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { eq, schema } from "@unkey/db";
import { newId } from "@unkey/id";
import { IntegrationHarness } from "src/pkg/testutil/integration-harness";

import type { ErrorResponse } from "@unkey/api/src";
import { describe, expect, test } from "vitest";
import type { V1KeysCreateKeyRequest, V1KeysCreateKeyResponse } from "./v1_keys_createKey";

Expand Down Expand Up @@ -94,7 +93,7 @@ test("cannot encrypt without permissions", async (t) => {

const root = await h.createRootKey([`api.${h.resources.userApi.id}.create_key`]);

const res = await h.post<V1KeysCreateKeyRequest, ErrorResponse>({
const res = await h.post<V1KeysCreateKeyRequest, { error: { code: string } }>({
url: "/v1/keys.createKey",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -122,7 +121,7 @@ test("cannot create role without permissions", async (t) => {

const root = await h.createRootKey([`api.${h.resources.userApi.id}.create_key`]);

const res = await h.post<V1KeysCreateKeyRequest, ErrorResponse>({
const res = await h.post<V1KeysCreateKeyRequest, { error: { code: string } }>({
url: "/v1/keys.createKey",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -150,7 +149,7 @@ test("cannot create permission without permissions", async (t) => {

const root = await h.createRootKey([`api.${h.resources.userApi.id}.create_key`]);

const res = await h.post<V1KeysCreateKeyRequest, ErrorResponse>({
const res = await h.post<V1KeysCreateKeyRequest, { error: { code: string } }>({
url: "/v1/keys.createKey",
headers: {
"Content-Type": "application/json",
Expand Down
3 changes: 1 addition & 2 deletions apps/api/src/routes/v1_keys_verifyKey.multilimit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { newId } from "@unkey/id";
import { KeyV1 } from "@unkey/keys";
import { IntegrationHarness } from "src/pkg/testutil/integration-harness";

import type { ErrorResponse } from "@unkey/api/src";
import type { V1KeysVerifyKeyRequest, V1KeysVerifyKeyResponse } from "./v1_keys_verifyKey";

describe("without identities", () => {
Expand Down Expand Up @@ -110,7 +109,7 @@ describe("without identities", () => {
createdAtM: Date.now(),
});

const res = await h.post<V1KeysVerifyKeyRequest, ErrorResponse>({
const res = await h.post<V1KeysVerifyKeyRequest, { error: { code: string } }>({
url: "/v1/keys.verifyKey",
headers: {
"Content-Type": "application/json",
Expand Down
Loading