diff --git a/js-api/src/api/grok_api.g.ts b/js-api/src/api/grok_api.g.ts index d82b68e01c..901f690ae4 100644 --- a/js-api/src/api/grok_api.g.ts +++ b/js-api/src/api/grok_api.g.ts @@ -830,6 +830,9 @@ export interface IDartApi { grok_User_Get_Picture(u: any): any; grok_User_ToMarkup(u: any): any; grok_User_Get_Group(u: any): any; + grok_User_Test(): any; + grok_User_Admin(): any; + grok_User_System(): any; grok_UserSession_Get_ExternalToken(s: any): any; grok_UserSession_Get_Type(s: any): any; grok_UserSession_Get_User(s: any): any; @@ -844,6 +847,13 @@ export interface IDartApi { grok_Group_Set_Personal(g: any, x: any): any; grok_Group_Get_Hidden(g: any): any; grok_Group_Set_Hidden(g: any, x: any): any; + grok_Group_AllUsers(): any; + grok_Group_Developers(): any; + grok_Group_NeedToCreate(): any; + grok_Group_Test(): any; + grok_Group_Admin(): any; + grok_Group_System(): any; + grok_Group_Administrators(): any; grok_Property(name: String, type: String, getter: any, setter: any, defaultValue: any): any; grok_Property_Get_Get(p: any): any; grok_Property_Set_Get(p: any, x: any): any; diff --git a/js-api/src/entities.ts b/js-api/src/entities.ts index 7168be7a79..656b32bc33 100644 --- a/js-api/src/entities.ts +++ b/js-api/src/entities.ts @@ -199,6 +199,12 @@ export class User extends Entity { "System": "3e32c5fa-ac9c-4d39-8b4b-4db3e576b3c3", } as const; } + + static get test(): User { return new User(api.grok_User_Test()); } + + static get admin(): User { return new User(api.grok_User_Admin()); } + + static get system(): User { return new User(api.grok_User_System()); } } @@ -988,6 +994,20 @@ export class Group extends Entity { "Administrators": "1ab8b38d-9c4e-4b1e-81c3-ae2bde3e12c5", } as const; } + + static get allUsers(): Group { return new Group(api.grok_Group_AllUsers()); } + + static get developers(): Group { return new Group(api.grok_Group_Developers()); } + + static get needToCreate(): Group { return new Group(api.grok_Group_NeedToCreate()); } + + static get test(): Group { return new Group(api.grok_Group_Test()); } + + static get admin(): Group { return new Group(api.grok_Group_Admin()); } + + static get system(): Group { return new Group(api.grok_Group_System()); } + + static get administrators(): Group { return new Group(api.grok_Group_Administrators()); } } /** @extends Func diff --git a/packages/ApiSamples/package.json b/packages/ApiSamples/package.json index 562c439159..9300f6c7cc 100644 --- a/packages/ApiSamples/package.json +++ b/packages/ApiSamples/package.json @@ -9,7 +9,7 @@ "dependencies": { "@datagrok-libraries/utils": "^4.4.0", "cash-dom": "^8.1.1", - "datagrok-api": "^1.23.0", + "datagrok-api": "../../js-api", "dayjs": "^1.11.13", "rxjs": "^6.6.7", "wu": "^2.1.0" diff --git a/packages/ApiSamples/scripts/ui/inputs/advanced/all-input-types.js b/packages/ApiSamples/scripts/ui/inputs/advanced/all-input-types.js index d09de2ee97..0e1836e51e 100644 --- a/packages/ApiSamples/scripts/ui/inputs/advanced/all-input-types.js +++ b/packages/ApiSamples/scripts/ui/inputs/advanced/all-input-types.js @@ -48,8 +48,8 @@ let object = { choice: 'Apple', multiChoice: ['Apple'], //file: '', - users: [DG.User.current()], - userGroups: [DG.User.current()], + user: [DG.User.admin], + userGroups: [DG.Group.developers], }; const div = ui.divV([