Compare commits
15 Commits
@nhost/rea
...
@nhost/rea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac3f12c878 | ||
|
|
65cabb089f | ||
|
|
2905beb0a1 | ||
|
|
83fee54460 | ||
|
|
82898b6dae | ||
|
|
500f76a38d | ||
|
|
5e1e80aa8b | ||
|
|
6d0a126907 | ||
|
|
1b7dcf2121 | ||
|
|
2b9205b6cf | ||
|
|
bdc4d4a88c | ||
|
|
45759c4d4c | ||
|
|
5f9886577a | ||
|
|
fa65496327 | ||
|
|
03777680c1 |
@@ -1,5 +1,13 @@
|
||||
# @nhost/dashboard
|
||||
|
||||
## 0.20.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 5e1e80aa8: fix(dashboard): show correct locales in user details
|
||||
- @nhost/react-apollo@5.0.35
|
||||
- @nhost/nextjs@1.13.37
|
||||
|
||||
## 0.20.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/dashboard",
|
||||
"version": "0.20.8",
|
||||
"version": "0.20.9",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
|
||||
@@ -38,6 +38,10 @@ query GetAuthenticationSettings($appId: uuid!) {
|
||||
default
|
||||
rating
|
||||
}
|
||||
locale {
|
||||
allowed
|
||||
default
|
||||
}
|
||||
}
|
||||
version
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import { copy } from '@/utils/copy';
|
||||
import { getServerError } from '@/utils/getServerError';
|
||||
import {
|
||||
RemoteAppGetUsersDocument,
|
||||
useGetProjectLocalesQuery,
|
||||
useGetRolesPermissionsQuery,
|
||||
useUpdateRemoteAppUserMutation,
|
||||
} from '@/utils/__generated__/graphql';
|
||||
@@ -146,6 +147,14 @@ export default function EditUserForm({
|
||||
dataRoles?.config?.auth?.user?.roles?.allowed,
|
||||
);
|
||||
|
||||
const { data } = useGetProjectLocalesQuery({
|
||||
variables: {
|
||||
appId: currentProject?.id,
|
||||
},
|
||||
});
|
||||
|
||||
const allowedLocales = data?.config?.auth?.user?.locale?.allowed || [];
|
||||
|
||||
/**
|
||||
* This will change the `disabled` field in the user to its opposite.
|
||||
* If the user is disabled, it will be enabled and vice versa.
|
||||
@@ -374,12 +383,11 @@ export default function EditUserForm({
|
||||
error={!!errors.locale}
|
||||
helperText={errors?.locale?.message}
|
||||
>
|
||||
<Option key="en" value="en">
|
||||
en
|
||||
</Option>
|
||||
<Option key="fr" value="fr">
|
||||
fr
|
||||
</Option>
|
||||
{allowedLocales.map((locale) => (
|
||||
<Option key={locale} value={locale}>
|
||||
{locale}
|
||||
</Option>
|
||||
))}
|
||||
</ControlledSelect>
|
||||
</Box>
|
||||
<Box
|
||||
|
||||
12
dashboard/src/gql/app/getProjectLocales.graphql
Normal file
12
dashboard/src/gql/app/getProjectLocales.graphql
Normal file
@@ -0,0 +1,12 @@
|
||||
query getProjectLocales($appId: uuid!) {
|
||||
config(appID: $appId, resolve: true) {
|
||||
auth {
|
||||
user {
|
||||
locale {
|
||||
allowed
|
||||
default
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
368
dashboard/src/utils/__generated__/graphql.ts
generated
368
dashboard/src/utils/__generated__/graphql.ts
generated
@@ -2052,6 +2052,12 @@ export type Int_Comparison_Exp = {
|
||||
_nin?: InputMaybe<Array<Scalars['Int']>>;
|
||||
};
|
||||
|
||||
export type InvoiceSummary = {
|
||||
__typename?: 'InvoiceSummary';
|
||||
AmountDue: Scalars['float64'];
|
||||
PeriodEnd: Scalars['Timestamp'];
|
||||
};
|
||||
|
||||
export type Log = {
|
||||
__typename?: 'Log';
|
||||
log: Scalars['String'];
|
||||
@@ -10475,6 +10481,10 @@ export type Mutation_Root = {
|
||||
deleteUser?: Maybe<Users>;
|
||||
/** delete data from the table: "auth.users" */
|
||||
deleteUsers?: Maybe<Users_Mutation_Response>;
|
||||
/** delete single row from the table: "users_usage" */
|
||||
deleteUsersUsage?: Maybe<Users_Usage>;
|
||||
/** delete data from the table: "users_usage" */
|
||||
deleteUsersUsages?: Maybe<Users_Usage_Mutation_Response>;
|
||||
/** delete single row from the table: "workspaces" */
|
||||
deleteWorkspace?: Maybe<Workspaces>;
|
||||
/** delete single row from the table: "workspace_members" */
|
||||
@@ -10614,6 +10624,10 @@ export type Mutation_Root = {
|
||||
insertUser?: Maybe<Users>;
|
||||
/** insert data into the table: "auth.users" */
|
||||
insertUsers?: Maybe<Users_Mutation_Response>;
|
||||
/** insert a single row into the table: "users_usage" */
|
||||
insertUsersUsage?: Maybe<Users_Usage>;
|
||||
/** insert data into the table: "users_usage" */
|
||||
insertUsersUsages?: Maybe<Users_Usage_Mutation_Response>;
|
||||
/** insert a single row into the table: "workspaces" */
|
||||
insertWorkspace?: Maybe<Workspaces>;
|
||||
/** insert a single row into the table: "workspace_members" */
|
||||
@@ -10760,6 +10774,10 @@ export type Mutation_Root = {
|
||||
updateUser?: Maybe<Users>;
|
||||
/** update data of the table: "auth.users" */
|
||||
updateUsers?: Maybe<Users_Mutation_Response>;
|
||||
/** update single row of the table: "users_usage" */
|
||||
updateUsersUsage?: Maybe<Users_Usage>;
|
||||
/** update data of the table: "users_usage" */
|
||||
updateUsersUsages?: Maybe<Users_Usage_Mutation_Response>;
|
||||
/** update single row of the table: "workspaces" */
|
||||
updateWorkspace?: Maybe<Workspaces>;
|
||||
/** update single row of the table: "workspace_members" */
|
||||
@@ -10854,6 +10872,8 @@ export type Mutation_Root = {
|
||||
update_run_service_many?: Maybe<Array<Maybe<Run_Service_Mutation_Response>>>;
|
||||
/** update multiples rows of table: "auth.users" */
|
||||
update_users_many?: Maybe<Array<Maybe<Users_Mutation_Response>>>;
|
||||
/** update multiples rows of table: "users_usage" */
|
||||
update_users_usage_many?: Maybe<Array<Maybe<Users_Usage_Mutation_Response>>>;
|
||||
/** update multiples rows of table: "workspace_member_invites" */
|
||||
update_workspaceMemberInvites_many?: Maybe<Array<Maybe<WorkspaceMemberInvites_Mutation_Response>>>;
|
||||
/** update multiples rows of table: "workspace_members" */
|
||||
@@ -11284,6 +11304,18 @@ export type Mutation_RootDeleteUsersArgs = {
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootDeleteUsersUsageArgs = {
|
||||
id: Scalars['uuid'];
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootDeleteUsersUsagesArgs = {
|
||||
where: Users_Usage_Bool_Exp;
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootDeleteWorkspaceArgs = {
|
||||
id: Scalars['uuid'];
|
||||
@@ -11768,6 +11800,20 @@ export type Mutation_RootInsertUsersArgs = {
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootInsertUsersUsageArgs = {
|
||||
object: Users_Usage_Insert_Input;
|
||||
on_conflict?: InputMaybe<Users_Usage_On_Conflict>;
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootInsertUsersUsagesArgs = {
|
||||
objects: Array<Users_Usage_Insert_Input>;
|
||||
on_conflict?: InputMaybe<Users_Usage_On_Conflict>;
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootInsertWorkspaceArgs = {
|
||||
object: Workspaces_Insert_Input;
|
||||
@@ -12383,6 +12429,20 @@ export type Mutation_RootUpdateUsersArgs = {
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootUpdateUsersUsageArgs = {
|
||||
_set?: InputMaybe<Users_Usage_Set_Input>;
|
||||
pk_columns: Users_Usage_Pk_Columns_Input;
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootUpdateUsersUsagesArgs = {
|
||||
_set?: InputMaybe<Users_Usage_Set_Input>;
|
||||
where: Users_Usage_Bool_Exp;
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootUpdateWorkspaceArgs = {
|
||||
_set?: InputMaybe<Workspaces_Set_Input>;
|
||||
@@ -12685,6 +12745,12 @@ export type Mutation_RootUpdate_Users_ManyArgs = {
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootUpdate_Users_Usage_ManyArgs = {
|
||||
updates: Array<Users_Usage_Updates>;
|
||||
};
|
||||
|
||||
|
||||
/** mutation root */
|
||||
export type Mutation_RootUpdate_WorkspaceMemberInvites_ManyArgs = {
|
||||
updates: Array<WorkspaceMemberInvites_Updates>;
|
||||
@@ -13905,7 +13971,7 @@ export type Query_Root = {
|
||||
billingDedicatedComputeReportsAggregate: Billing_Dedicated_Compute_Reports_Aggregate;
|
||||
/** fetch data from the table: "billing.dedicated_compute" */
|
||||
billingDedicatedComputes: Array<Billing_Dedicated_Compute>;
|
||||
billingDummy: Scalars['Boolean'];
|
||||
billingGetNextInvoice?: Maybe<InvoiceSummary>;
|
||||
/** fetch data from the table: "billing.subscriptions" using primary key columns */
|
||||
billingSubscription?: Maybe<Billing_Subscriptions>;
|
||||
/** fetch data from the table: "billing.subscriptions" */
|
||||
@@ -14048,6 +14114,12 @@ export type Query_Root = {
|
||||
users: Array<Users>;
|
||||
/** fetch aggregated fields from the table: "auth.users" */
|
||||
usersAggregate: Users_Aggregate;
|
||||
/** fetch data from the table: "users_usage" using primary key columns */
|
||||
usersUsage?: Maybe<Users_Usage>;
|
||||
/** fetch data from the table: "users_usage" */
|
||||
usersUsages: Array<Users_Usage>;
|
||||
/** fetch aggregated fields from the table: "users_usage" */
|
||||
usersUsagesAggregate: Users_Usage_Aggregate;
|
||||
/** fetch data from the table: "workspaces" using primary key columns */
|
||||
workspace?: Maybe<Workspaces>;
|
||||
/** fetch data from the table: "workspace_members" using primary key columns */
|
||||
@@ -14419,6 +14491,11 @@ export type Query_RootBillingDedicatedComputesArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type Query_RootBillingGetNextInvoiceArgs = {
|
||||
appID: Scalars['uuid'];
|
||||
};
|
||||
|
||||
|
||||
export type Query_RootBillingSubscriptionArgs = {
|
||||
id: Scalars['uuid'];
|
||||
};
|
||||
@@ -14973,6 +15050,29 @@ export type Query_RootUsersAggregateArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type Query_RootUsersUsageArgs = {
|
||||
id: Scalars['uuid'];
|
||||
};
|
||||
|
||||
|
||||
export type Query_RootUsersUsagesArgs = {
|
||||
distinct_on?: InputMaybe<Array<Users_Usage_Select_Column>>;
|
||||
limit?: InputMaybe<Scalars['Int']>;
|
||||
offset?: InputMaybe<Scalars['Int']>;
|
||||
order_by?: InputMaybe<Array<Users_Usage_Order_By>>;
|
||||
where?: InputMaybe<Users_Usage_Bool_Exp>;
|
||||
};
|
||||
|
||||
|
||||
export type Query_RootUsersUsagesAggregateArgs = {
|
||||
distinct_on?: InputMaybe<Array<Users_Usage_Select_Column>>;
|
||||
limit?: InputMaybe<Scalars['Int']>;
|
||||
offset?: InputMaybe<Scalars['Int']>;
|
||||
order_by?: InputMaybe<Array<Users_Usage_Order_By>>;
|
||||
where?: InputMaybe<Users_Usage_Bool_Exp>;
|
||||
};
|
||||
|
||||
|
||||
export type Query_RootWorkspaceArgs = {
|
||||
id: Scalars['uuid'];
|
||||
};
|
||||
@@ -16401,8 +16501,16 @@ export type Subscription_Root = {
|
||||
users: Array<Users>;
|
||||
/** fetch aggregated fields from the table: "auth.users" */
|
||||
usersAggregate: Users_Aggregate;
|
||||
/** fetch data from the table: "users_usage" using primary key columns */
|
||||
usersUsage?: Maybe<Users_Usage>;
|
||||
/** fetch data from the table: "users_usage" */
|
||||
usersUsages: Array<Users_Usage>;
|
||||
/** fetch aggregated fields from the table: "users_usage" */
|
||||
usersUsagesAggregate: Users_Usage_Aggregate;
|
||||
/** fetch data from the table in a streaming manner: "auth.users" */
|
||||
users_stream: Array<Users>;
|
||||
/** fetch data from the table in a streaming manner: "users_usage" */
|
||||
users_usage_stream: Array<Users_Usage>;
|
||||
/** fetch data from the table: "workspaces" using primary key columns */
|
||||
workspace?: Maybe<Workspaces>;
|
||||
/** fetch data from the table: "workspace_members" using primary key columns */
|
||||
@@ -17450,6 +17558,29 @@ export type Subscription_RootUsersAggregateArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type Subscription_RootUsersUsageArgs = {
|
||||
id: Scalars['uuid'];
|
||||
};
|
||||
|
||||
|
||||
export type Subscription_RootUsersUsagesArgs = {
|
||||
distinct_on?: InputMaybe<Array<Users_Usage_Select_Column>>;
|
||||
limit?: InputMaybe<Scalars['Int']>;
|
||||
offset?: InputMaybe<Scalars['Int']>;
|
||||
order_by?: InputMaybe<Array<Users_Usage_Order_By>>;
|
||||
where?: InputMaybe<Users_Usage_Bool_Exp>;
|
||||
};
|
||||
|
||||
|
||||
export type Subscription_RootUsersUsagesAggregateArgs = {
|
||||
distinct_on?: InputMaybe<Array<Users_Usage_Select_Column>>;
|
||||
limit?: InputMaybe<Scalars['Int']>;
|
||||
offset?: InputMaybe<Scalars['Int']>;
|
||||
order_by?: InputMaybe<Array<Users_Usage_Order_By>>;
|
||||
where?: InputMaybe<Users_Usage_Bool_Exp>;
|
||||
};
|
||||
|
||||
|
||||
export type Subscription_RootUsers_StreamArgs = {
|
||||
batch_size: Scalars['Int'];
|
||||
cursor: Array<InputMaybe<Users_Stream_Cursor_Input>>;
|
||||
@@ -17457,6 +17588,13 @@ export type Subscription_RootUsers_StreamArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type Subscription_RootUsers_Usage_StreamArgs = {
|
||||
batch_size: Scalars['Int'];
|
||||
cursor: Array<InputMaybe<Users_Usage_Stream_Cursor_Input>>;
|
||||
where?: InputMaybe<Users_Usage_Bool_Exp>;
|
||||
};
|
||||
|
||||
|
||||
export type Subscription_RootWorkspaceArgs = {
|
||||
id: Scalars['uuid'];
|
||||
};
|
||||
@@ -18539,6 +18677,176 @@ export type Users_Updates = {
|
||||
where: Users_Bool_Exp;
|
||||
};
|
||||
|
||||
/** columns and relationships of "users_usage" */
|
||||
export type Users_Usage = {
|
||||
__typename?: 'users_usage';
|
||||
created_at: Scalars['timestamptz'];
|
||||
free_allowance_exceeded: Scalars['Boolean'];
|
||||
id: Scalars['uuid'];
|
||||
updated_at: Scalars['timestamptz'];
|
||||
user_id: Scalars['uuid'];
|
||||
};
|
||||
|
||||
/** aggregated selection of "users_usage" */
|
||||
export type Users_Usage_Aggregate = {
|
||||
__typename?: 'users_usage_aggregate';
|
||||
aggregate?: Maybe<Users_Usage_Aggregate_Fields>;
|
||||
nodes: Array<Users_Usage>;
|
||||
};
|
||||
|
||||
/** aggregate fields of "users_usage" */
|
||||
export type Users_Usage_Aggregate_Fields = {
|
||||
__typename?: 'users_usage_aggregate_fields';
|
||||
count: Scalars['Int'];
|
||||
max?: Maybe<Users_Usage_Max_Fields>;
|
||||
min?: Maybe<Users_Usage_Min_Fields>;
|
||||
};
|
||||
|
||||
|
||||
/** aggregate fields of "users_usage" */
|
||||
export type Users_Usage_Aggregate_FieldsCountArgs = {
|
||||
columns?: InputMaybe<Array<Users_Usage_Select_Column>>;
|
||||
distinct?: InputMaybe<Scalars['Boolean']>;
|
||||
};
|
||||
|
||||
/** Boolean expression to filter rows from the table "users_usage". All fields are combined with a logical 'AND'. */
|
||||
export type Users_Usage_Bool_Exp = {
|
||||
_and?: InputMaybe<Array<Users_Usage_Bool_Exp>>;
|
||||
_not?: InputMaybe<Users_Usage_Bool_Exp>;
|
||||
_or?: InputMaybe<Array<Users_Usage_Bool_Exp>>;
|
||||
created_at?: InputMaybe<Timestamptz_Comparison_Exp>;
|
||||
free_allowance_exceeded?: InputMaybe<Boolean_Comparison_Exp>;
|
||||
id?: InputMaybe<Uuid_Comparison_Exp>;
|
||||
updated_at?: InputMaybe<Timestamptz_Comparison_Exp>;
|
||||
user_id?: InputMaybe<Uuid_Comparison_Exp>;
|
||||
};
|
||||
|
||||
/** unique or primary key constraints on table "users_usage" */
|
||||
export enum Users_Usage_Constraint {
|
||||
/** unique or primary key constraint on columns "id" */
|
||||
UsersUsagePkey = 'users_usage_pkey',
|
||||
/** unique or primary key constraint on columns "user_id" */
|
||||
UsersUsageUserIdKey = 'users_usage_user_id_key'
|
||||
}
|
||||
|
||||
/** input type for inserting data into table "users_usage" */
|
||||
export type Users_Usage_Insert_Input = {
|
||||
created_at?: InputMaybe<Scalars['timestamptz']>;
|
||||
free_allowance_exceeded?: InputMaybe<Scalars['Boolean']>;
|
||||
id?: InputMaybe<Scalars['uuid']>;
|
||||
updated_at?: InputMaybe<Scalars['timestamptz']>;
|
||||
user_id?: InputMaybe<Scalars['uuid']>;
|
||||
};
|
||||
|
||||
/** aggregate max on columns */
|
||||
export type Users_Usage_Max_Fields = {
|
||||
__typename?: 'users_usage_max_fields';
|
||||
created_at?: Maybe<Scalars['timestamptz']>;
|
||||
id?: Maybe<Scalars['uuid']>;
|
||||
updated_at?: Maybe<Scalars['timestamptz']>;
|
||||
user_id?: Maybe<Scalars['uuid']>;
|
||||
};
|
||||
|
||||
/** aggregate min on columns */
|
||||
export type Users_Usage_Min_Fields = {
|
||||
__typename?: 'users_usage_min_fields';
|
||||
created_at?: Maybe<Scalars['timestamptz']>;
|
||||
id?: Maybe<Scalars['uuid']>;
|
||||
updated_at?: Maybe<Scalars['timestamptz']>;
|
||||
user_id?: Maybe<Scalars['uuid']>;
|
||||
};
|
||||
|
||||
/** response of any mutation on the table "users_usage" */
|
||||
export type Users_Usage_Mutation_Response = {
|
||||
__typename?: 'users_usage_mutation_response';
|
||||
/** number of rows affected by the mutation */
|
||||
affected_rows: Scalars['Int'];
|
||||
/** data from the rows affected by the mutation */
|
||||
returning: Array<Users_Usage>;
|
||||
};
|
||||
|
||||
/** on_conflict condition type for table "users_usage" */
|
||||
export type Users_Usage_On_Conflict = {
|
||||
constraint: Users_Usage_Constraint;
|
||||
update_columns?: Array<Users_Usage_Update_Column>;
|
||||
where?: InputMaybe<Users_Usage_Bool_Exp>;
|
||||
};
|
||||
|
||||
/** Ordering options when selecting data from "users_usage". */
|
||||
export type Users_Usage_Order_By = {
|
||||
created_at?: InputMaybe<Order_By>;
|
||||
free_allowance_exceeded?: InputMaybe<Order_By>;
|
||||
id?: InputMaybe<Order_By>;
|
||||
updated_at?: InputMaybe<Order_By>;
|
||||
user_id?: InputMaybe<Order_By>;
|
||||
};
|
||||
|
||||
/** primary key columns input for table: users_usage */
|
||||
export type Users_Usage_Pk_Columns_Input = {
|
||||
id: Scalars['uuid'];
|
||||
};
|
||||
|
||||
/** select columns of table "users_usage" */
|
||||
export enum Users_Usage_Select_Column {
|
||||
/** column name */
|
||||
CreatedAt = 'created_at',
|
||||
/** column name */
|
||||
FreeAllowanceExceeded = 'free_allowance_exceeded',
|
||||
/** column name */
|
||||
Id = 'id',
|
||||
/** column name */
|
||||
UpdatedAt = 'updated_at',
|
||||
/** column name */
|
||||
UserId = 'user_id'
|
||||
}
|
||||
|
||||
/** input type for updating data in table "users_usage" */
|
||||
export type Users_Usage_Set_Input = {
|
||||
created_at?: InputMaybe<Scalars['timestamptz']>;
|
||||
free_allowance_exceeded?: InputMaybe<Scalars['Boolean']>;
|
||||
id?: InputMaybe<Scalars['uuid']>;
|
||||
updated_at?: InputMaybe<Scalars['timestamptz']>;
|
||||
user_id?: InputMaybe<Scalars['uuid']>;
|
||||
};
|
||||
|
||||
/** Streaming cursor of the table "users_usage" */
|
||||
export type Users_Usage_Stream_Cursor_Input = {
|
||||
/** Stream column input with initial value */
|
||||
initial_value: Users_Usage_Stream_Cursor_Value_Input;
|
||||
/** cursor ordering */
|
||||
ordering?: InputMaybe<Cursor_Ordering>;
|
||||
};
|
||||
|
||||
/** Initial value of the column from where the streaming should start */
|
||||
export type Users_Usage_Stream_Cursor_Value_Input = {
|
||||
created_at?: InputMaybe<Scalars['timestamptz']>;
|
||||
free_allowance_exceeded?: InputMaybe<Scalars['Boolean']>;
|
||||
id?: InputMaybe<Scalars['uuid']>;
|
||||
updated_at?: InputMaybe<Scalars['timestamptz']>;
|
||||
user_id?: InputMaybe<Scalars['uuid']>;
|
||||
};
|
||||
|
||||
/** update columns of table "users_usage" */
|
||||
export enum Users_Usage_Update_Column {
|
||||
/** column name */
|
||||
CreatedAt = 'created_at',
|
||||
/** column name */
|
||||
FreeAllowanceExceeded = 'free_allowance_exceeded',
|
||||
/** column name */
|
||||
Id = 'id',
|
||||
/** column name */
|
||||
UpdatedAt = 'updated_at',
|
||||
/** column name */
|
||||
UserId = 'user_id'
|
||||
}
|
||||
|
||||
export type Users_Usage_Updates = {
|
||||
/** sets the columns of the filtered rows to the given values */
|
||||
_set?: InputMaybe<Users_Usage_Set_Input>;
|
||||
/** filter the rows which have to be updated */
|
||||
where: Users_Usage_Bool_Exp;
|
||||
};
|
||||
|
||||
/** Boolean expression to compare columns of type "uuid". All fields are combined with logical 'AND'. */
|
||||
export type Uuid_Comparison_Exp = {
|
||||
_eq?: InputMaybe<Scalars['uuid']>;
|
||||
@@ -19718,7 +20026,7 @@ export type GetAuthenticationSettingsQueryVariables = Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type GetAuthenticationSettingsQuery = { __typename?: 'query_root', config?: { __typename: 'ConfigConfig', id: 'ConfigConfig', auth?: { __typename: 'ConfigAuth', version?: string | null, id: 'ConfigAuth', redirections?: { __typename?: 'ConfigAuthRedirections', clientUrl?: any | null, allowedUrls?: Array<string> | null } | null, totp?: { __typename?: 'ConfigAuthTotp', enabled?: boolean | null, issuer?: string | null } | null, signUp?: { __typename?: 'ConfigAuthSignUp', enabled?: boolean | null } | null, session?: { __typename?: 'ConfigAuthSession', accessToken?: { __typename?: 'ConfigAuthSessionAccessToken', expiresIn?: any | null } | null, refreshToken?: { __typename?: 'ConfigAuthSessionRefreshToken', expiresIn?: any | null } | null } | null, user?: { __typename?: 'ConfigAuthUser', email?: { __typename?: 'ConfigAuthUserEmail', allowed?: Array<any> | null, blocked?: Array<any> | null } | null, emailDomains?: { __typename?: 'ConfigAuthUserEmailDomains', allowed?: Array<string> | null, blocked?: Array<string> | null } | null, gravatar?: { __typename?: 'ConfigAuthUserGravatar', enabled?: boolean | null, default?: string | null, rating?: string | null } | null } | null } | null } | null };
|
||||
export type GetAuthenticationSettingsQuery = { __typename?: 'query_root', config?: { __typename: 'ConfigConfig', id: 'ConfigConfig', auth?: { __typename: 'ConfigAuth', version?: string | null, id: 'ConfigAuth', redirections?: { __typename?: 'ConfigAuthRedirections', clientUrl?: any | null, allowedUrls?: Array<string> | null } | null, totp?: { __typename?: 'ConfigAuthTotp', enabled?: boolean | null, issuer?: string | null } | null, signUp?: { __typename?: 'ConfigAuthSignUp', enabled?: boolean | null } | null, session?: { __typename?: 'ConfigAuthSession', accessToken?: { __typename?: 'ConfigAuthSessionAccessToken', expiresIn?: any | null } | null, refreshToken?: { __typename?: 'ConfigAuthSessionRefreshToken', expiresIn?: any | null } | null } | null, user?: { __typename?: 'ConfigAuthUser', email?: { __typename?: 'ConfigAuthUserEmail', allowed?: Array<any> | null, blocked?: Array<any> | null } | null, emailDomains?: { __typename?: 'ConfigAuthUserEmailDomains', allowed?: Array<string> | null, blocked?: Array<string> | null } | null, gravatar?: { __typename?: 'ConfigAuthUserGravatar', enabled?: boolean | null, default?: string | null, rating?: string | null } | null, locale?: { __typename?: 'ConfigAuthUserLocale', allowed?: Array<any> | null, default?: any | null } | null } | null } | null } | null };
|
||||
|
||||
export type GetPostgresSettingsQueryVariables = Exact<{
|
||||
appId: Scalars['uuid'];
|
||||
@@ -19815,6 +20123,13 @@ export type GetApplicationStateQueryVariables = Exact<{
|
||||
|
||||
export type GetApplicationStateQuery = { __typename?: 'query_root', app?: { __typename?: 'apps', id: any, name: string, appStates: Array<{ __typename?: 'appStateHistory', id: any, appId: any, message?: string | null, stateId: number, createdAt: any }> } | null };
|
||||
|
||||
export type GetProjectLocalesQueryVariables = Exact<{
|
||||
appId: Scalars['uuid'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GetProjectLocalesQuery = { __typename?: 'query_root', config?: { __typename?: 'ConfigConfig', auth?: { __typename?: 'ConfigAuth', user?: { __typename?: 'ConfigAuthUser', locale?: { __typename?: 'ConfigAuthUserLocale', allowed?: Array<any> | null, default?: any | null } | null } | null } | null } | null };
|
||||
|
||||
export type GetProjectMetricsQueryVariables = Exact<{
|
||||
appId: Scalars['String'];
|
||||
subdomain: Scalars['String'];
|
||||
@@ -20785,6 +21100,10 @@ export const GetAuthenticationSettingsDocument = gql`
|
||||
default
|
||||
rating
|
||||
}
|
||||
locale {
|
||||
allowed
|
||||
default
|
||||
}
|
||||
}
|
||||
version
|
||||
}
|
||||
@@ -21326,6 +21645,51 @@ export type GetApplicationStateQueryResult = Apollo.QueryResult<GetApplicationSt
|
||||
export function refetchGetApplicationStateQuery(variables: GetApplicationStateQueryVariables) {
|
||||
return { query: GetApplicationStateDocument, variables: variables }
|
||||
}
|
||||
export const GetProjectLocalesDocument = gql`
|
||||
query getProjectLocales($appId: uuid!) {
|
||||
config(appID: $appId, resolve: true) {
|
||||
auth {
|
||||
user {
|
||||
locale {
|
||||
allowed
|
||||
default
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetProjectLocalesQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetProjectLocalesQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetProjectLocalesQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
||||
* you can use to render your UI.
|
||||
*
|
||||
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
||||
*
|
||||
* @example
|
||||
* const { data, loading, error } = useGetProjectLocalesQuery({
|
||||
* variables: {
|
||||
* appId: // value for 'appId'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetProjectLocalesQuery(baseOptions: Apollo.QueryHookOptions<GetProjectLocalesQuery, GetProjectLocalesQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetProjectLocalesQuery, GetProjectLocalesQueryVariables>(GetProjectLocalesDocument, options);
|
||||
}
|
||||
export function useGetProjectLocalesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetProjectLocalesQuery, GetProjectLocalesQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetProjectLocalesQuery, GetProjectLocalesQueryVariables>(GetProjectLocalesDocument, options);
|
||||
}
|
||||
export type GetProjectLocalesQueryHookResult = ReturnType<typeof useGetProjectLocalesQuery>;
|
||||
export type GetProjectLocalesLazyQueryHookResult = ReturnType<typeof useGetProjectLocalesLazyQuery>;
|
||||
export type GetProjectLocalesQueryResult = Apollo.QueryResult<GetProjectLocalesQuery, GetProjectLocalesQueryVariables>;
|
||||
export function refetchGetProjectLocalesQuery(variables: GetProjectLocalesQueryVariables) {
|
||||
return { query: GetProjectLocalesDocument, variables: variables }
|
||||
}
|
||||
export const GetProjectMetricsDocument = gql`
|
||||
query GetProjectMetrics($appId: String!, $subdomain: String!, $from: Timestamp, $to: Timestamp) {
|
||||
logsVolume: getLogsVolume(appID: $appId, from: $from, to: $to) {
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost-examples/serverless-functions
|
||||
|
||||
## 0.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 45759c4d4: fix(stripe-graphql-js): fix stripe GraphQL extension export issue in serverless functions
|
||||
- Updated dependencies [45759c4d4]
|
||||
- @nhost/stripe-graphql-js@1.0.5
|
||||
|
||||
## 0.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -17,6 +17,4 @@ https://github.com/nhost/nhost/tree/main/integrations/stripe-graphql-js
|
||||
|
||||
import { createStripeGraphQLServer } from '@nhost/stripe-graphql-js'
|
||||
|
||||
const server = createStripeGraphQLServer()
|
||||
|
||||
export default server
|
||||
export default createStripeGraphQLServer()
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
[global]
|
||||
[[global.environment]]
|
||||
name='STRIPE_SECRET_KEY'
|
||||
value='{{ secrets.STRIPE_SECRET_KEY }}'
|
||||
|
||||
[hasura]
|
||||
version = 'v2.25.1-ce'
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@nhost-examples/serverless-functions",
|
||||
"private": true,
|
||||
"version": "0.0.8",
|
||||
"version": "0.0.9",
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.13"
|
||||
},
|
||||
"dependencies": {
|
||||
"@graphql-yoga/node": "^2.13.13",
|
||||
"@nhost/stripe-graphql-js": "^1.0.2",
|
||||
"@nhost/stripe-graphql-js": "^1.0.5",
|
||||
"@pothos/core": "^3.21.0",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"graphql": "15.7.2",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/apollo
|
||||
|
||||
## 5.2.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@2.2.16
|
||||
|
||||
## 5.2.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/apollo",
|
||||
"version": "5.2.17",
|
||||
"version": "5.2.18",
|
||||
"description": "Nhost Apollo Client library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @nhost/react-apollo
|
||||
|
||||
## 5.0.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/apollo@5.2.18
|
||||
- @nhost/react@2.0.31
|
||||
|
||||
## 5.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-apollo",
|
||||
"version": "5.0.34",
|
||||
"version": "5.0.35",
|
||||
"description": "Nhost React Apollo client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/react-urql
|
||||
|
||||
## 2.0.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/react@2.0.31
|
||||
|
||||
## 2.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-urql",
|
||||
"version": "2.0.31",
|
||||
"version": "2.0.32",
|
||||
"description": "Nhost React URQL client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/stripe-graphql-js
|
||||
|
||||
## 1.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 45759c4d4: fix(stripe-graphql-js): fix stripe GraphQL extension export issue in serverless functions
|
||||
|
||||
## 1.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { createServer } from 'http'
|
||||
import { Context, createStripeGraphQLServer } from '../src/index'
|
||||
|
||||
const isAllowed = (stripeCustomerId: string, context: Context) => {
|
||||
@@ -10,11 +11,13 @@ const isAllowed = (stripeCustomerId: string, context: Context) => {
|
||||
return false
|
||||
}
|
||||
|
||||
const server = createStripeGraphQLServer({
|
||||
const yoga = createStripeGraphQLServer({
|
||||
isAllowed,
|
||||
graphiql: true
|
||||
})
|
||||
|
||||
const server = createServer(yoga)
|
||||
|
||||
server.listen(4000, () => {
|
||||
console.info('Stripe GraphQL API server is running on http://localhost:4000')
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/stripe-graphql-js",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "Stripe GraphQL API",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { createServer } from 'node:http'
|
||||
import { createYoga, YogaInitialContext } from 'graphql-yoga'
|
||||
|
||||
import { schema } from './schema'
|
||||
@@ -54,7 +53,7 @@ const createStripeGraphQLServer = (params?: CreateServerProps) => {
|
||||
graphqlEndpoint: '*'
|
||||
})
|
||||
|
||||
return createServer(yoga)
|
||||
return yoga
|
||||
}
|
||||
|
||||
export { createStripeGraphQLServer, schema }
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/hasura-storage-js
|
||||
|
||||
## 2.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 83fee5446: fix(hasura-storage-js): swap fetch when running on edge runtime
|
||||
|
||||
## 2.2.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/hasura-storage-js",
|
||||
"version": "2.2.3",
|
||||
"version": "2.2.4",
|
||||
"description": "Hasura-storage client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -2,6 +2,8 @@ import fetchPonyfill from 'fetch-ponyfill'
|
||||
import FormData from 'form-data'
|
||||
import { StorageErrorPayload, StorageUploadResponse } from './types'
|
||||
|
||||
declare const EdgeRuntime: any
|
||||
|
||||
/** Convert any string into ISO-8859-1 */
|
||||
export const toIso88591 = (fileName: string) => {
|
||||
try {
|
||||
@@ -12,7 +14,11 @@ export const toIso88591 = (fileName: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
const { fetch } = fetchPonyfill()
|
||||
let fetch = globalThis.fetch
|
||||
|
||||
if (typeof EdgeRuntime !== 'string') {
|
||||
fetch = fetchPonyfill().fetch
|
||||
}
|
||||
|
||||
export const fetchUpload = async (
|
||||
backendUrl: string,
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/nextjs
|
||||
|
||||
## 1.13.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/react@2.0.31
|
||||
|
||||
## 1.13.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nextjs",
|
||||
"version": "1.13.36",
|
||||
"version": "1.13.37",
|
||||
"description": "Nhost NextJS library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @nhost/nhost-js
|
||||
|
||||
## 2.2.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [83fee5446]
|
||||
- @nhost/hasura-storage-js@2.2.4
|
||||
|
||||
## 2.2.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nhost-js",
|
||||
"version": "2.2.15",
|
||||
"version": "2.2.16",
|
||||
"description": "Nhost JavaScript SDK",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/react
|
||||
|
||||
## 2.0.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@2.2.16
|
||||
|
||||
## 2.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react",
|
||||
"version": "2.0.30",
|
||||
"version": "2.0.31",
|
||||
"description": "Nhost React library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/vue
|
||||
|
||||
## 1.13.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@2.2.16
|
||||
|
||||
## 1.13.35
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/vue",
|
||||
"version": "1.13.35",
|
||||
"version": "1.13.36",
|
||||
"description": "Nhost Vue library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
24
pnpm-lock.yaml
generated
24
pnpm-lock.yaml
generated
@@ -1062,7 +1062,7 @@ importers:
|
||||
specifier: ^2.13.13
|
||||
version: 2.13.13(graphql@16.7.1)
|
||||
'@nhost/stripe-graphql-js':
|
||||
specifier: ^1.0.2
|
||||
specifier: ^1.0.5
|
||||
version: link:../../integrations/stripe-graphql-js
|
||||
'@pothos/core':
|
||||
specifier: ^3.21.0
|
||||
@@ -1481,7 +1481,7 @@ importers:
|
||||
version: 3.1.1(graphql@16.7.1)
|
||||
isomorphic-unfetch:
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0
|
||||
version: 3.1.0(encoding@0.1.13)
|
||||
devDependencies:
|
||||
'@nhost/docgen':
|
||||
specifier: workspace:*
|
||||
@@ -1562,7 +1562,7 @@ importers:
|
||||
version: link:../react
|
||||
isomorphic-unfetch:
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0
|
||||
version: 3.1.0(encoding@0.1.13)
|
||||
js-cookie:
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1
|
||||
@@ -1599,7 +1599,7 @@ importers:
|
||||
version: link:../hasura-storage-js
|
||||
isomorphic-unfetch:
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0
|
||||
version: 3.1.0(encoding@0.1.13)
|
||||
devDependencies:
|
||||
'@nhost/docgen':
|
||||
specifier: workspace:*
|
||||
@@ -10147,7 +10147,7 @@ packages:
|
||||
dependencies:
|
||||
'@graphql-typed-document-node/core': 3.2.0(graphql@16.7.1)
|
||||
graphql: 16.7.1
|
||||
isomorphic-unfetch: 3.1.0
|
||||
isomorphic-unfetch: 3.1.0(encoding@0.1.13)
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: true
|
||||
@@ -10183,7 +10183,7 @@ packages:
|
||||
'@nhost/hasura-auth-js': 2.1.7
|
||||
'@nhost/hasura-storage-js': 2.2.2
|
||||
graphql: 16.7.1
|
||||
isomorphic-unfetch: 3.1.0
|
||||
isomorphic-unfetch: 3.1.0(encoding@0.1.13)
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: true
|
||||
@@ -24376,7 +24376,7 @@ packages:
|
||||
- encoding
|
||||
dev: true
|
||||
|
||||
/isomorphic-unfetch@3.1.0:
|
||||
/isomorphic-unfetch@3.1.0(encoding@0.1.13):
|
||||
resolution: {integrity: sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==}
|
||||
dependencies:
|
||||
node-fetch: 2.6.7(encoding@0.1.13)
|
||||
@@ -24384,15 +24384,6 @@ packages:
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
|
||||
/isomorphic-unfetch@3.1.0(encoding@0.1.13):
|
||||
resolution: {integrity: sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==}
|
||||
dependencies:
|
||||
node-fetch: 2.6.12(encoding@0.1.13)
|
||||
unfetch: 4.2.0
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: true
|
||||
|
||||
/isomorphic-ws@5.0.0(ws@8.12.1):
|
||||
resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==}
|
||||
peerDependencies:
|
||||
@@ -26495,6 +26486,7 @@ packages:
|
||||
dependencies:
|
||||
encoding: 0.1.13
|
||||
whatwg-url: 5.0.0
|
||||
dev: false
|
||||
|
||||
/node-fetch@2.6.7(encoding@0.1.13):
|
||||
resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==}
|
||||
|
||||
Reference in New Issue
Block a user