feat: add workspace level feature apis (#5503)

This commit is contained in:
DarkSky
2024-01-05 04:13:49 +00:00
parent 04ca554525
commit f6ec786ef9
25 changed files with 497 additions and 244 deletions
+72
View File
@@ -32,6 +32,12 @@ export interface Scalars {
Upload: { input: File; output: File };
}
/** The type of workspace feature */
export enum FeatureType {
Copilot = 'Copilot',
EarlyAccess = 'EarlyAccess',
}
export enum InvoiceStatus {
Draft = 'Draft',
Open = 'Open',
@@ -392,6 +398,15 @@ export type GetWorkspacePublicPagesQuery = {
};
};
export type GetWorkspaceFeaturesQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
}>;
export type GetWorkspaceFeaturesQuery = {
__typename?: 'Query';
workspace: { __typename?: 'WorkspaceType'; features: Array<FeatureType> };
};
export type GetWorkspaceQueryVariables = Exact<{
id: Scalars['String']['input'];
}>;
@@ -724,6 +739,43 @@ export type UploadAvatarMutation = {
};
};
export type AddWorkspaceFeatureMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
feature: FeatureType;
}>;
export type AddWorkspaceFeatureMutation = {
__typename?: 'Mutation';
addWorkspaceFeature: number;
};
export type ListWorkspaceFeaturesQueryVariables = Exact<{
feature: FeatureType;
}>;
export type ListWorkspaceFeaturesQuery = {
__typename?: 'Query';
listWorkspaceFeatures: Array<{
__typename?: 'WorkspaceType';
id: string;
public: boolean;
createdAt: string;
memberCount: number;
features: Array<FeatureType>;
owner: { __typename?: 'UserType'; id: string };
}>;
};
export type RemoveWorkspaceFeatureMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
feature: FeatureType;
}>;
export type RemoveWorkspaceFeatureMutation = {
__typename?: 'Mutation';
removeWorkspaceFeature: number;
};
export type InviteByEmailMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
email: Scalars['String']['input'];
@@ -815,6 +867,11 @@ export type Queries =
variables: GetWorkspacePublicPagesQueryVariables;
response: GetWorkspacePublicPagesQuery;
}
| {
name: 'getWorkspaceFeaturesQuery';
variables: GetWorkspaceFeaturesQueryVariables;
response: GetWorkspaceFeaturesQuery;
}
| {
name: 'getWorkspaceQuery';
variables: GetWorkspaceQueryVariables;
@@ -859,6 +916,11 @@ export type Queries =
name: 'subscriptionQuery';
variables: SubscriptionQueryVariables;
response: SubscriptionQuery;
}
| {
name: 'listWorkspaceFeaturesQuery';
variables: ListWorkspaceFeaturesQueryVariables;
response: ListWorkspaceFeaturesQuery;
};
export type Mutations =
@@ -1002,6 +1064,16 @@ export type Mutations =
variables: UploadAvatarMutationVariables;
response: UploadAvatarMutation;
}
| {
name: 'addWorkspaceFeatureMutation';
variables: AddWorkspaceFeatureMutationVariables;
response: AddWorkspaceFeatureMutation;
}
| {
name: 'removeWorkspaceFeatureMutation';
variables: RemoveWorkspaceFeatureMutationVariables;
response: RemoveWorkspaceFeatureMutation;
}
| {
name: 'inviteByEmailMutation';
variables: InviteByEmailMutationVariables;