PromucFlow_constructor/app/client/src/constants/userConstants.ts

53 lines
1.2 KiB
TypeScript
Raw Normal View History

export const ANONYMOUS_USERNAME = "anonymousUser";
type Gender = "MALE" | "FEMALE";
export type User = {
email: string;
workspaceIds: string[];
username: string;
name: string;
gender: Gender;
emptyInstance?: boolean;
photoId?: string;
isSuperUser: boolean;
role?: string;
useCase?: string;
isConfigurable: boolean;
enableTelemetry: boolean;
adminSettingsVisible?: boolean;
fix: fix usage pulse fallback (#21735) ## Description Added a fallback value (crypto.randomUUID) when there is an issue with generating the key from segment Fixes #https://github.com/appsmithorg/cloud-services/issues/582 Fixes #https://github.com/appsmithorg/cloud-services/issues/583 ## Type of change - Bug fix (non-breaking change which fixes an issue) - Chore (housekeeping or task changes that don't impact user perception) ## How Has This Been Tested? - Manual - Cypress ### Test Plan > Add Testsmith test cases links that relate to this PR ### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) ## Checklist: ### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag ### QA activity: - [ ] Test plan has been approved by relevant developers - [ ] Test plan has been peer reviewed by QA - [ ] Cypress test cases have been added and approved by either SDET or manual QA - [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA - [ ] Added Test Plan Approved label after reveiwing all Cypress test --------- Co-authored-by: balajisoundar <balaji@appsmith.com>
2023-04-06 12:21:58 +00:00
isAnonymous?: boolean;
feat: added intercom consent (one time consent) in CE (#22678) Context: currently, there is no way for us to know any details about a user when they reach out to support via Intercom. Thus, we are not able to offer right level of support to them basis their current plan. The idea is to ask for consent to share user details with Appsmith before Intercom is enabled for a user, basis which support can determine the right level of support. Fixes #22385 Media https://www.loom.com/share/ab63bb4d738445e8a8a484b66d8c1fa6 ## Type of change - New feature (non-breaking change which adds functionality) ## How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce. > Please also list any relevant details for your test configuration. > Delete anything that is not important - Manual ### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) ## Checklist: ### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag ### QA activity: - [ ] Test plan has been approved by relevant developers - [ ] Test plan has been peer reviewed by QA - [ ] Cypress test cases have been added and approved by either SDET or manual QA - [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA - [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-04-28 20:00:15 +00:00
isIntercomConsentGiven?: boolean;
};
2020-01-03 08:49:47 +00:00
export interface UserApplication {
id: string;
name: string;
}
2020-01-03 08:49:47 +00:00
export const CurrentUserDetailsRequestPayload = {
id: "profile",
2020-01-03 08:49:47 +00:00
};
export const DefaultCurrentUserDetails: User = {
name: ANONYMOUS_USERNAME,
email: ANONYMOUS_USERNAME,
workspaceIds: [],
username: ANONYMOUS_USERNAME,
gender: "MALE",
isSuperUser: false,
isConfigurable: false,
enableTelemetry: false,
adminSettingsVisible: false,
feat: added intercom consent (one time consent) in CE (#22678) Context: currently, there is no way for us to know any details about a user when they reach out to support via Intercom. Thus, we are not able to offer right level of support to them basis their current plan. The idea is to ask for consent to share user details with Appsmith before Intercom is enabled for a user, basis which support can determine the right level of support. Fixes #22385 Media https://www.loom.com/share/ab63bb4d738445e8a8a484b66d8c1fa6 ## Type of change - New feature (non-breaking change which adds functionality) ## How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce. > Please also list any relevant details for your test configuration. > Delete anything that is not important - Manual ### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) ## Checklist: ### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag ### QA activity: - [ ] Test plan has been approved by relevant developers - [ ] Test plan has been peer reviewed by QA - [ ] Cypress test cases have been added and approved by either SDET or manual QA - [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA - [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-04-28 20:00:15 +00:00
isIntercomConsentGiven: false,
};
// TODO keeping it here instead of the USER_API since it leads to cyclic deps errors during tests
export const USER_PHOTO_URL = "v1/users/photo";
export const USER_PHOTO_ASSET_URL = "v1/assets";
export type UserRoleUsecasePayload = {
role: string;
useCase: string;
};