Skip to content

Commit

Permalink
Fix: Only set once for hasSpeckleMembers (#3646)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikehrn authored Dec 5, 2024
1 parent 2f44ae2 commit 384510f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
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

0 comments on commit 384510f

Please sign in to comment.