Skip to content

Commit

Permalink
chore: remove toolkit dependency (#74)
Browse files Browse the repository at this point in the history
Because

- remove toolkit dependency

This commit

- remove toolkit dependency
  • Loading branch information
iamnamananand996 authored Apr 18, 2024
1 parent 7aff630 commit c9827da
Show file tree
Hide file tree
Showing 11 changed files with 349 additions and 4,025 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"access": "public"
},
"dependencies": {
"@instill-ai/toolkit": "0.78.1",
"@types/json-schema": "^7.0.11",
"axios": "^1.3.4",
"json-schema": "^0.4.0",
Expand Down
4,339 changes: 334 additions & 4,005 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/connector/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

import { AirbyteFieldValues } from "@instill-ai/toolkit";
import { Owner, Spec } from "../types";
import { AirbyteFieldValues, Owner, Spec } from "../types";

export type ConnectorState =
| "STATE_CONNECTED"
Expand Down
1 change: 0 additions & 1 deletion src/mgmt/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from "./types";
export * from "./AuthClient";
3 changes: 1 addition & 2 deletions src/mgmt/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { GeneralRecord } from "@instill-ai/toolkit";
import { Nullable } from "../types";
import { GeneralRecord, Nullable } from "../types";

export type User = {
name: string;
Expand Down
3 changes: 1 addition & 2 deletions src/organization/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from "./mutations";
export * from "./queries";
export * from "./types";
export * from "./queries";
6 changes: 0 additions & 6 deletions src/organization/mutations.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { AxiosInstance } from "axios";
import {
Organization,
MembershipRole,
OrganizationMembership,
MembershipState,
UserMembership,
CreateOrganizationPayload,
CreateOrganizationResponse,
UpdateOrganizationPayload,
Expand All @@ -14,7 +9,6 @@ import {
UpdateUserMembershipPayload,
UpdateUserMembershipResponse,
} from "./types";
import { GeneralRecord, Nullable } from "@instill-ai/toolkit";

export async function createOrganizationMutation({
payload,
Expand Down
4 changes: 2 additions & 2 deletions src/organization/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import {
GetOrganizationMembershipsResponse,
ListOrganizationsResponse,
Organization,
OrganizationMembership,
OrganizationResponse,
UserMembership,
} from "./types";
import { Nullable } from "@instill-ai/toolkit";

import { getQueryString } from "../helper";
import { Nullable } from "../types";

export async function listOrganizationsQuery({
axiosInstance,
Expand Down
4 changes: 2 additions & 2 deletions src/organization/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GeneralRecord, Nullable } from "@instill-ai/toolkit";
import { User } from "../mgmt";
import { User } from "../mgmt/types";
import { GeneralRecord, Nullable } from "../types";

export type Organization = {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions src/pipeline/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import { OpenAPIV3 } from "openapi-types";
import { ConnectorDefinition, Connector } from "../connector";
import { Spec, Visibility } from "../types";
import { GeneralRecord, Nullable, Spec, Visibility } from "../types";
import { JSONSchema7TypeName } from "json-schema";
import { GeneralRecord, Nullable } from "@instill-ai/toolkit";

import { Operation } from "../operation";
import { AxiosInstance } from "axios";

Expand Down
6 changes: 6 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ export type Visibility =

export type Nullable<T> = T | null;

export type GeneralRecord = Record<string, any>;

export type AirbyteFieldValues = {
[k: string]: string | number | boolean | null | AirbyteFieldValues;
};

export type OrganizationProfile = {
display_name?: string;
bio?: string;
Expand Down

0 comments on commit c9827da

Please sign in to comment.