Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Only set once for hasSpeckleMembers #3646

Merged
merged 5 commits into from
Dec 5, 2024
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
20 changes: 20 additions & 0 deletions packages/dui3/lib/common/generated/gql/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2556,8 +2556,11 @@ export type Query = {
/**
* Search for users and return limited metadata about them, if you have the server:user role.
* The query looks for matches in name & email
* @deprecated Use users() instead.
*/
userSearch: UserSearchResultCollection;
/** Look up server users */
users: UserSearchResultCollection;
/** Validates the slug, to make sure it contains only valid characters and its not taken. */
validateWorkspaceSlug: Scalars['Boolean']['output'];
workspace: Workspace;
Expand Down Expand Up @@ -2699,6 +2702,11 @@ export type QueryUserSearchArgs = {
};


export type QueryUsersArgs = {
input: UsersRetrievalInput;
};


export type QueryValidateWorkspaceSlugArgs = {
slug: Scalars['String']['input'];
};
Expand Down Expand Up @@ -3871,6 +3879,18 @@ export type UserWorkspacesFilter = {
search?: InputMaybe<Scalars['String']['input']>;
};

export type UsersRetrievalInput = {
cursor?: InputMaybe<Scalars['String']['input']>;
/** Only find users with directly matching emails */
emailOnly?: InputMaybe<Scalars['Boolean']['input']>;
/** Limit defaults to 10 */
limit?: InputMaybe<Scalars['Int']['input']>;
/** Only find users that are collaborators of the specified project */
projectId?: InputMaybe<Scalars['String']['input']>;
/** The query looks for matches in user name & email */
query: Scalars['String']['input'];
};

export type Version = {
__typename?: 'Version';
authorUser?: Maybe<LimitedUser>;
Expand Down
10 changes: 7 additions & 3 deletions packages/frontend-2/lib/workspaces/composables/mixpanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,16 @@ export const useWorkspacesMixpanel = () => {
planStatus: workspace.plan?.status || '',
planCreatedAt: workspace.plan?.createdAt,
subscriptionBillingInterval: workspace.subscription?.billingInterval,
subscriptionCurrentBillingCycleEnd:
workspace.subscription?.currentBillingCycleEnd,
hasSpeckleMembers: userEmail?.includes('speckle.systems')
subscriptionCurrentBillingCycleEnd: workspace.subscription?.currentBillingCycleEnd
}

mixpanel.get_group('workspace_id', workspace.id).set(input)

if (userEmail?.includes('speckle.systems')) {
mixpanel.get_group('workspace_id', workspace.id).set_once({
hasSpeckleMembers: true
})
}
}

return {
Expand Down
20 changes: 20 additions & 0 deletions packages/frontend/src/graphql/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2573,8 +2573,11 @@ export type Query = {
/**
* Search for users and return limited metadata about them, if you have the server:user role.
* The query looks for matches in name & email
* @deprecated Use users() instead.
*/
userSearch: UserSearchResultCollection;
/** Look up server users */
users: UserSearchResultCollection;
/** Validates the slug, to make sure it contains only valid characters and its not taken. */
validateWorkspaceSlug: Scalars['Boolean']['output'];
workspace: Workspace;
Expand Down Expand Up @@ -2716,6 +2719,11 @@ export type QueryUserSearchArgs = {
};


export type QueryUsersArgs = {
input: UsersRetrievalInput;
};


export type QueryValidateWorkspaceSlugArgs = {
slug: Scalars['String']['input'];
};
Expand Down Expand Up @@ -3894,6 +3902,18 @@ export type UserWorkspacesFilter = {
search?: InputMaybe<Scalars['String']['input']>;
};

export type UsersRetrievalInput = {
cursor?: InputMaybe<Scalars['String']['input']>;
/** Only find users with directly matching emails */
emailOnly?: InputMaybe<Scalars['Boolean']['input']>;
/** Limit defaults to 10 */
limit?: InputMaybe<Scalars['Int']['input']>;
/** Only find users that are collaborators of the specified project */
projectId?: InputMaybe<Scalars['String']['input']>;
/** The query looks for matches in user name & email */
query: Scalars['String']['input'];
};

export type Version = {
__typename?: 'Version';
authorUser?: Maybe<LimitedUser>;
Expand Down