@jsb188/app 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/package.json +57 -42
  2. package/src/constants/agent.ts +74 -0
  3. package/src/constants/app.ts +389 -0
  4. package/src/constants/emoji.ts +9153 -0
  5. package/src/constants/other.ts +13 -0
  6. package/src/constants/user.ts +27 -0
  7. package/src/constants/wsActions.ts +49 -0
  8. package/src/i18n/account.ts +139 -0
  9. package/src/i18n/agent.ts +397 -0
  10. package/src/i18n/agentToolBusiness.ts +196 -0
  11. package/src/i18n/agentToolGrid.ts +137 -0
  12. package/src/i18n/agentToolWorkflow.ts +101 -0
  13. package/src/i18n/agent_note.ts +109 -0
  14. package/src/i18n/app.ts +124 -0
  15. package/src/i18n/auth.ts +128 -0
  16. package/src/i18n/billing.ts +7 -0
  17. package/src/i18n/c.ts +907 -0
  18. package/src/i18n/campaign.ts +919 -0
  19. package/src/i18n/country.ts +249 -0
  20. package/src/i18n/datetime.ts +66 -0
  21. package/src/i18n/editor.ts +58 -0
  22. package/src/i18n/error.ts +579 -0
  23. package/src/i18n/field_doc_editor.ts +21 -0
  24. package/src/i18n/field_doc_programs.ts +52 -0
  25. package/src/i18n/field_docs.ts +190 -0
  26. package/src/i18n/index.ts +64 -0
  27. package/src/i18n/log.ts +566 -0
  28. package/src/i18n/memory.ts +59 -0
  29. package/src/i18n/message.ts +13 -0
  30. package/src/i18n/note.ts +19 -0
  31. package/src/i18n/org.ts +306 -0
  32. package/src/i18n/schedule.ts +209 -0
  33. package/src/i18n/sheet.ts +339 -0
  34. package/src/i18n/sheet_formula.ts +165 -0
  35. package/src/i18n/workflow.ts +111 -0
  36. package/src/main.ts +89 -0
  37. package/src/platform.ts +166 -0
  38. package/src/types/ai.d.ts +63 -0
  39. package/src/types/app.d.ts +127 -0
  40. package/src/types/auth.d.ts +94 -0
  41. package/src/types/console.d.ts +3 -0
  42. package/src/types/node-polyglot.d.ts +23 -0
  43. package/src/types/other.d.ts +66 -0
  44. package/src/types.d.ts +29 -0
  45. package/src/utils/account.ts +97 -0
  46. package/src/utils/api.ts +358 -0
  47. package/src/utils/authSession.ts +24 -0
  48. package/src/utils/clientIP.ts +213 -0
  49. package/src/utils/color.ts +279 -0
  50. package/src/utils/cron.ts +310 -0
  51. package/src/utils/csv.ts +19 -0
  52. package/src/utils/datetime.ts +1394 -0
  53. package/src/utils/deferredSave.ts +89 -0
  54. package/src/utils/email.ts +39 -0
  55. package/src/utils/emoji.ts +174 -0
  56. package/src/utils/expression.helpers.ts +470 -0
  57. package/src/utils/expression.test.ts +793 -0
  58. package/src/utils/expression.ts +2261 -0
  59. package/src/utils/interval.ts +80 -0
  60. package/src/utils/language.ts +9 -0
  61. package/src/utils/logic.ts +299 -0
  62. package/src/utils/managedSession.ts +34 -0
  63. package/src/utils/managedSessionBff.test.ts +60 -0
  64. package/src/utils/managedSessionBff.ts +117 -0
  65. package/src/utils/number.ts +338 -0
  66. package/src/utils/object.ts +916 -0
  67. package/src/utils/promise.ts +98 -0
  68. package/src/utils/queryReset.ts +266 -0
  69. package/src/utils/recurringTask.ts +60 -0
  70. package/src/utils/schema.ts +293 -0
  71. package/src/utils/string.test.ts +278 -0
  72. package/src/utils/string.ts +709 -0
  73. package/{utils → src/utils}/timeZone.ts +531 -852
  74. package/src/utils/url_client.ts +206 -0
  75. package/tsconfig.json +12 -0
  76. package/constants/app.ts +0 -47
  77. package/constants/billing.ts +0 -146
  78. package/constants/emoji.ts +0 -8945
  79. package/constants/journal.ts +0 -74
  80. package/constants/user.ts +0 -36
  81. package/constants/ws.ts +0 -47
  82. package/i18n/app.ts +0 -101
  83. package/i18n/auth.ts +0 -63
  84. package/i18n/billing.ts +0 -94
  85. package/i18n/datetime.ts +0 -21
  86. package/i18n/error.ts +0 -143
  87. package/i18n/form.ts +0 -74
  88. package/i18n/index.ts +0 -5
  89. package/i18n/user.ts +0 -101
  90. package/main.ts +0 -94
  91. package/platform.ts +0 -125
  92. package/types/ai.d.ts +0 -30
  93. package/types/app.d.ts +0 -48
  94. package/types/auth.d.ts +0 -63
  95. package/types/form.d.ts +0 -56
  96. package/types/journal.d.ts +0 -24
  97. package/types/organization.d.ts +0 -38
  98. package/types/user.d.ts +0 -52
  99. package/types.d.ts +0 -31
  100. package/utils/api.ts +0 -99
  101. package/utils/billing.ts +0 -134
  102. package/utils/datetime.ts +0 -542
  103. package/utils/emoji.ts +0 -151
  104. package/utils/journal.ts +0 -17
  105. package/utils/logic.ts +0 -118
  106. package/utils/number.ts +0 -139
  107. package/utils/object.ts +0 -425
  108. package/utils/string.ts +0 -323
  109. package/utils/url_client.ts +0 -138
  110. package/utils/user.ts +0 -273
package/i18n/user.ts DELETED
@@ -1,101 +0,0 @@
1
- export default {
2
- en: {
3
- displayName: 'Display name',
4
- displayName_ph: 'e.g. "Jane Doe"',
5
- displayName_info: 'Display name is how others will see you.',
6
- pronouns: 'Pronouns',
7
- pronouns_ph: 'Enter your pronouns',
8
- about: 'About me',
9
- about_ph: 'This text will be displayed on your profile for others to see.',
10
- username: 'Username',
11
- username_ph: 'e.g. "@jane_doe"',
12
- username_info: 'Username, ID, and e-mail is used to log in to your account.',
13
- email: 'E-mail',
14
- email_ph: 'e.g. jane_doe@email.com',
15
- phone: 'e.g. jane_doe@email.com',
16
- // phone_ph: 'e.g. 222-333-4444',
17
- phone_ph: 'e.g. 123-444-5555',
18
- password: 'Password',
19
- password_ph: 'Enter your password',
20
- passwordRepeat: 'Password (please repeat)',
21
- search_ph: 'Search @ or ID',
22
- no_one_found_: 'No one found: "%{query}"',
23
- from_friends_list: 'From your friends list',
24
- not_friends_yet: 'Not friends yet',
25
- profile_no_desc: 'This user hasn\'t written anything about themselves.',
26
- no_one_found: 'No one found with this query.',
27
-
28
- // App settings
29
- account: 'Account',
30
- profile: 'Profile',
31
- profile_desc: 'Change how your profile looks to others.',
32
- personas: 'Personas',
33
- show_password: 'Show password',
34
- hide_password: 'Hide password',
35
- change_password: 'Change password',
36
- change_password_desc: 'Change your account\'s login password.',
37
- // personas_desc: 'Manage your roleplay personas. Persona for the chat (your name and photo) can be changed by clicking your photo next to the chat textarea.',
38
- personas_desc: 'Use personas to easily change your display name and profile photo. You can change your persona by clicking your photo next to the chat textarea.',
39
- persona_label: 'Roleplay persona',
40
- persona_ph: 'Persona\'s name',
41
- upload_photo_desc: 'Change your profile photo.',
42
- upload_persona_photo_desc: 'Change your persona\'s photo.',
43
- badge: 'Badge',
44
- badge_desc: 'Change the badge that appear next to your name in chat.',
45
- badge_instr: 'This badge will be displayed next to your name:',
46
-
47
- // Change password
48
- currentPassword: 'Current password',
49
- newPassword: 'New password',
50
- newPasswordRepeat: 'New password (repeat)',
51
-
52
- // Log out
53
- logout: 'Log out',
54
- logout_message: 'Do you want to log out from this account?',
55
- logout_yes: 'Yes, log me out',
56
-
57
- // Online status
58
- status_ONLINE: 'Online',
59
- status_AWAY: 'Away',
60
- status_BUSY: 'Busy',
61
- status_APPEAR_OFFLINE: 'Appear offline',
62
-
63
- // Mini status profile
64
- copy_id: 'Copy ID',
65
-
66
- // Profile
67
- open_profile: 'Open profile',
68
- cards_ct: '%{smart_count} Card||||%{smart_count} Cards',
69
- report_user: 'Report user',
70
- profile_deactivated_desc: 'This account has been deactivated.',
71
-
72
- // Friend status
73
- blocked: 'Blocked',
74
- blocked_by_me: 'You blocked this user.',
75
- blocked_by_other: 'You are blocked.',
76
- friends: 'Friends',
77
- friends_msg: 'You are friends.',
78
- friend_status: 'Friend status',
79
- friend_request: 'Friend',
80
- friend_requests_ct: '%{smart_count} Friend request||||%{smart_count} Friend requests',
81
- friend_requested: 'Requested',
82
- friend_requested_msg: 'You received a friend request.',
83
- recent_friends: 'Recent friends',
84
- sent_friend_msg: 'You sent a friend request.',
85
- accept_friend: 'Accept request',
86
- add_friend: 'Add friend',
87
- add_friend_msg: 'You must be friends to send direct messages.',
88
- send_friend: 'Send friend request',
89
- sent_friend: 'Friend requested',
90
- unblock: 'Unblock',
91
- block: 'Block',
92
- remove_friend: 'Remove friend',
93
- ignore_friend: 'Ignore request',
94
- cancel_friend: 'Cancel request',
95
-
96
- // Search instructions
97
- search_instr_1: 'Search by user ID',
98
- search_instr_2: 'Search by @username',
99
- search_instr_3: 'Search by display name',
100
- },
101
- };
package/main.ts DELETED
@@ -1,94 +0,0 @@
1
- import i18n from './i18n/';
2
- import app from './i18n/app';
3
- import auth from './i18n/auth';
4
- import billing from './i18n/billing';
5
- import datetime from './i18n/datetime';
6
- import error from './i18n/error';
7
- import form from './i18n/form';
8
- import user from './i18n/user';
9
-
10
- // Get the correct type for ENV
11
- let ENV: Map<string, string | boolean | number> = new Map();
12
-
13
- /**
14
- * Extend i18n with app specific texts
15
- */
16
-
17
- export function configI18n(texts: Record<string, any>) {
18
-
19
- // Locale support for later
20
- const locale = 'en';
21
-
22
- const extendedObj = {
23
- app: app[locale],
24
- auth: auth[locale],
25
- billing: billing[locale],
26
- datetime: datetime[locale],
27
- error: error[locale],
28
- form: form[locale],
29
- user: user[locale],
30
- } as Record<string, any>;
31
-
32
- for (const key in texts) {
33
- const obj = texts[key][locale];
34
-
35
- if (extendedObj[key]) {
36
- extendedObj[key] = {
37
- ...extendedObj[key],
38
- ...obj
39
- };
40
- } else {
41
- extendedObj[key] = obj;
42
- }
43
- }
44
-
45
- i18n.extend(extendedObj);
46
- };
47
-
48
- /**
49
- * Register environment variables so the package may use it
50
- */
51
-
52
- export function registerENV(env: Record<string, string>) {
53
- // Do not use process.env; because this package is used in client + server
54
-
55
- for (const key in env) {
56
- if (
57
- typeof key !== 'undefined' &&
58
- Object.prototype.hasOwnProperty.call(env, key)
59
- ) {
60
- ENV.set(key, env[key]);
61
- }
62
- }
63
-
64
- // Shim some development commands
65
- console.dev = (
66
- str: string,
67
- ...args: any[]
68
- ) => {
69
- if (ENV.get('NODE_ENV') === 'development') {
70
- const [preset, ...otherArgs] = args;
71
-
72
- let style;
73
- switch (preset) {
74
- case 'em':
75
- style = 'background: #FFF380;';
76
- break;
77
- case 'warning':
78
- style = 'background: #E64545; color: #FFF;';
79
- break;
80
- default:
81
- }
82
-
83
- console.log(`%c${str}`, `${style || 'background: #F2F0DA;'} padding: 3px 5px;`, ...(style ? otherArgs : args));
84
- }
85
- };
86
- }
87
-
88
- /**
89
- * Get environment variables
90
- */
91
-
92
- export function getENVVariable(namespace: string): string | boolean | number | undefined {
93
- return ENV.get(namespace);
94
- }
package/platform.ts DELETED
@@ -1,125 +0,0 @@
1
-
2
- const PLATFORM_HANDLERS: Record<string, any> = {};
3
-
4
- /**
5
- * Get current platform
6
- */
7
-
8
- export function getPlatform(): 'WEB' | 'MOBILE' | 'UNKNOWN' {
9
- return PLATFORM_HANDLERS?.getPlatform?.() || 'UNKNOWN';
10
- }
11
-
12
- /**
13
- * Fetch last used login token
14
- */
15
-
16
- export const fetchAuthToken = (cb: (token: string | null) => void): void => {
17
- return PLATFORM_HANDLERS?.fetchAuthToken?.(cb) || cb(null);
18
- };
19
-
20
- /**
21
- * Delete auth token
22
- */
23
-
24
- export const deleteAuthToken = (): void => {
25
- return PLATFORM_HANDLERS?.deleteAuthToken?.();
26
- };
27
-
28
- /**
29
- * Save token after login
30
- */
31
-
32
- export function saveAuthTokenToPlatform(token: string, cb: () => void) {
33
- return PLATFORM_HANDLERS?.saveAuthTokenToPlatform?.(token, cb) || cb();
34
- }
35
-
36
- /**
37
- * Clear platform and app specific (local API) cache
38
- * Change this based on what the app uses
39
- */
40
-
41
- export function clearAppCache() {
42
- return PLATFORM_HANDLERS?.clearAppCache?.();
43
- }
44
-
45
- /**
46
- * Fetch last used light mode setting
47
- */
48
-
49
- export const fetchLightModeSetting = (
50
- accountId: number | null,
51
- cb: (lightMode: string) => void,
52
- ): void => {
53
- return PLATFORM_HANDLERS?.fetchLightModeSetting?.(accountId, cb) || cb('SYSTEM');
54
- };
55
-
56
- /**
57
- * Get correct platform
58
- */
59
-
60
- export function getOS() {
61
- return PLATFORM_HANDLERS?.getOS?.();
62
- }
63
-
64
- /**
65
- * Update theme
66
- */
67
-
68
- export function updateAppTheme(lightMode: string, theme: string) {
69
- return PLATFORM_HANDLERS?.updateAppTheme?.(lightMode, theme);
70
- }
71
-
72
- /**
73
- * Get the last version of app
74
- */
75
-
76
- export function getLocalLastVersion(accountId: string) {
77
- return PLATFORM_HANDLERS?.getLocalLastVersion?.(accountId);
78
- }
79
-
80
- /**
81
- * Save the last version of app
82
- */
83
-
84
- export function saveLocalLastVersion(accountId: string, version: string) {
85
- return PLATFORM_HANDLERS?.saveLocalLastVersion?.(accountId, version);
86
- }
87
-
88
- /**
89
- * Get the necessary Object data for file input
90
- */
91
-
92
- export function getFileInputObject(fileInput: File) {
93
- return PLATFORM_HANDLERS?.getFileInputObject?.(fileInput) || fileInput;
94
- }
95
-
96
- /**
97
- * Get buffer data from file
98
- */
99
-
100
- export function getBufferDataFromFile(file: any) {
101
- return PLATFORM_HANDLERS?.getBufferDataFromFile?.(file) || file;
102
- }
103
-
104
- /**
105
- * Check if system is dark mode
106
- */
107
-
108
- export function isSystemDarkMode() {
109
- return PLATFORM_HANDLERS?.isSystemDarkMode?.();
110
- }
111
-
112
- /**
113
- * Register platform specific handlers
114
- */
115
-
116
- export function registerPlatformHandlers(handlers: Record<string, any>) {
117
- for (const key in handlers) {
118
- if (
119
- Object.prototype.hasOwnProperty.call(handlers, key) &&
120
- typeof handlers[key] === 'function'
121
- ) {
122
- PLATFORM_HANDLERS[key] = handlers[key];
123
- }
124
- }
125
- }
package/types/ai.d.ts DELETED
@@ -1,30 +0,0 @@
1
-
2
- // AI chat types
3
-
4
- export type AIChatMessageType = 'MESSAGE' | 'SMS' | 'FUNCTION_CALL'| 'FUNCTION_CALL_OUTPUT';
5
-
6
- // AI events
7
-
8
- export type AIEventErrorName =
9
- | 'AI_EVENT_UNKNOWN_ERR'
10
- | 'AI_EVENT_DEVELOPER_ERR'
11
- | 'AI_EVENT_NO_ACCESS'
12
- | 'AI_COULD_NOT_RESOLVE'
13
- | 'AI_CONTEXT_ERR'
14
- | 'AI_ORG_ACL_FAILED'
15
- | 'MISSING_API_KEY'
16
- | 'LLM_PROVIDER_NOT_FOUND'
17
- | 'MODERATION_MISSING'
18
- | 'MODERATION_SERVICE_ERR'
19
- | 'UNKNOWN_LLM_ERR'
20
- | 'UNFINISHED_LOGIC';
21
-
22
- // AI chat
23
-
24
- export interface AIChatObj {
25
- id: string;
26
- calDate: string;
27
- summary: string;
28
- createdAt: string;
29
- updatedAt: string;
30
- }
package/types/app.d.ts DELETED
@@ -1,48 +0,0 @@
1
-
2
- // Modal; App settings
3
-
4
- export interface EditIfaceModalProps {
5
- containerClassName: string;
6
- saveCounter: number;
7
- saving: boolean;
8
- hasChanges: boolean;
9
- openModalPopUp: (opts: any) => void;
10
- onChangeDiff: (diff: boolean) => void;
11
- }
12
-
13
- export interface EditUserModalProps extends EditIfaceModalProps {
14
- user: any;
15
- editUser: (obj: object) => void;
16
- }
17
-
18
- export interface EditUserPlusModalProps extends EditIfaceModalProps {
19
- user: any;
20
- editUserPlus: (obj: object) => void;
21
- }
22
-
23
- // App types
24
-
25
- export type DarkOrLightEnum = 'light' | 'dark';
26
-
27
- export type ColorEnum = 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'slate' | 'zinc' | 'stone';
28
-
29
- // Stripe types
30
-
31
- export type PlatformProductGroupEnum = 'PERKS' | 'PLUS' | 'PRO' | 'COINS';
32
-
33
- // Server/API related types
34
-
35
- export interface ServerErrorObj {
36
- statusCode: number;
37
- errorCode: string;
38
- errorValue?: string;
39
- iconName?: string;
40
- title: string;
41
- message: string;
42
- }
43
-
44
- export interface SimpleErrorType {
45
- iconName?: string;
46
- title?: string;
47
- message: string;
48
- }
package/types/auth.d.ts DELETED
@@ -1,63 +0,0 @@
1
- import type { OrganizationShortData } from './organization.d';
2
-
3
- /**
4
- * Auth enums
5
- */
6
-
7
- export type AuthTypeEnum = 'ID' | 'USERNAME' | 'EMAIL' | 'PHONE';
8
- export type LightModeEnum = 'LIGHT' | 'DARK' | 'SYSTEM';
9
-
10
- /**
11
- * Account
12
- */
13
-
14
- export interface AccountData {
15
- id: string;
16
- deleted: boolean;
17
-
18
- plus: any; // placeholder for later
19
-
20
- profile: {
21
- id: string;
22
- firstName: string;
23
- lastName: string;
24
- photoId: string;
25
- photoUri: string;
26
- };
27
-
28
- email: {
29
- id: string;
30
- address: string;
31
- verified: boolean;
32
- };
33
-
34
- phone: {
35
- id: string;
36
- number: string;
37
- verified: boolean;
38
- };
39
- }
40
-
41
- export interface AccountSettings {
42
- theme: string | null;
43
- lightMode: LightModeEnum;
44
- timeZone: string | null;
45
- showSelfAvatar: boolean;
46
- isBubbleOther: boolean;
47
- showOtherAvatar: boolean;
48
- }
49
-
50
- /**
51
- * Auth context
52
- */
53
-
54
- export interface AuthenticationData {
55
- token: string | null;
56
- timeZone: string | null;
57
- account: AccountData | null;
58
- settings: AccountSettings | null;
59
- primaryOrganizationId: string | null;
60
- activated: boolean;
61
- hasPassword: boolean;
62
- version: string;
63
- }
package/types/form.d.ts DELETED
@@ -1,56 +0,0 @@
1
-
2
- /**
3
- * Types; form schema
4
- */
5
-
6
- interface SchemaItemSetter {
7
- setter?: (currentData?: any, dataForSchema?: any) => any;
8
- }
9
-
10
- export interface FormItemSchemaObj {
11
- __type: 'group' | 'input' | 'password' | 'textarea' | 'select' | string;
12
- autoFocus?: boolean;
13
- disabled?: boolean;
14
- hidden?: boolean | ((dataForSchema: any) => boolean);
15
- locked?: boolean | ((dataForSchema: any) => boolean);
16
- labelClassName?: string;
17
- listenToInput?: boolean;
18
- value?: any;
19
- item: Record<string, any> & SchemaItemSetter;
20
- }
21
-
22
- interface SchemaRule {
23
- for: string;
24
- rule: (value: any, formValues: any) => boolean;
25
- error: any;
26
- };
27
-
28
- export interface FormSchemaObj {
29
- listData: FormItemSchemaObj[];
30
- rules?: SchemaRule[];
31
- isButtonDisabled?: (formValues: any) => boolean;
32
- }
33
-
34
- /**
35
- * Types; form items
36
- */
37
-
38
- interface FormGroupType {
39
- id?: string;
40
- name: string;
41
- label?: string;
42
- value: string | number | null;
43
- items: Array<FormItemIfaceObj>;
44
- }
45
-
46
- export interface FormItemIfaceObj extends FormItemSchemaObj {
47
- name: string;
48
- hidden?: boolean | ((dataForSchema: any) => boolean);
49
- locked?: boolean | ((dataForSchema: any) => boolean);
50
- formValues: any;
51
- setFormValues: (values: any) => void;
52
- onInput?: (e: React.FormEvent, name: string) => void;
53
- onKeyDown?: (e: React.KeyboardEvent, name: string) => void;
54
- onSubmit?: (e: React.MouseEvent, name: string) => void;
55
- onChange?: (e: React.ChangeEvent, name: string) => void;
56
- }
@@ -1,24 +0,0 @@
1
- import { FIELD_LOG_ACTIVITY_ENUMS, HARVEST_LOG_ACTIVITY_ENUMS, JOURNAL_TYPE_ENUMS } from '../constants/journal.ts';
2
-
3
- /**
4
- * Journal entry object
5
- */
6
-
7
- export interface JournalEntryObj {
8
- id: string
9
- accountId: string
10
- type: JournalTypeEnum
11
- notes: string
12
- date: string // ISO date string
13
- editAt: string // ISO date string
14
-
15
- activity: JournalEntryActivityEnum
16
- item: string
17
- quantity: number
18
- unit: string
19
- }
20
-
21
- export type JournalTypeEnum = typeof JOURNAL_TYPE_ENUMS[number];
22
- export type FieldLogActivityEnum = typeof FIELD_LOG_ACTIVITY_ENUMS[number];
23
- export type HarvestLogActivityEnum = typeof HARVEST_LOG_ACTIVITY_ENUMS[number];
24
- export type JournalEntryActivityEnum = FieldLogActivityEnum | HarvestLogActivityEnum;
@@ -1,38 +0,0 @@
1
-
2
- /*
3
- * ACL
4
- */
5
-
6
- export type OrganizationRoleEnum = 'MEMBER' | 'ADMIN' | 'MANAGER' | 'OWNER';
7
-
8
- export interface OrganizationACL {
9
- id: string;
10
- manageBilling: boolean | null;
11
- manageIntegrations: boolean | null;
12
- manageMembers: boolean | null;
13
- manageProducts: boolean | null;
14
- manageSettings: boolean | null;
15
- viewMembers: boolean | null;
16
- role: OrganizationRoleEnum | null;
17
- }
18
-
19
- /**
20
- * Organization object
21
- */
22
-
23
- export interface OrganizationShortData {
24
- id: string;
25
- name: string;
26
- primary: boolean;
27
- acl: OrganizationACL;
28
- }
29
-
30
- export interface OrganizationData {
31
- id: string;
32
- name: string;
33
- primary: boolean;
34
- acl: OrganizationACL;
35
- stripeCustomerId: string | null;
36
- domains: string[] | null;
37
- // members: OrganizationMemberData[] | null;
38
- }
package/types/user.d.ts DELETED
@@ -1,52 +0,0 @@
1
- import type { PersonaObj } from './chat';
2
-
3
- type OnlineStatusEnum = null | 'AWAY' | 'BUSY' | 'APPEAR_OFFLINE';
4
- type PlusStatusEnum = 'PRO' | 'PLUS' | 'PERKS' | 'NORMAL';
5
-
6
- export interface AppUser {
7
- id: string;
8
- username: string;
9
- displayName: string;
10
-
11
- moderator: boolean;
12
- activated: boolean;
13
-
14
- plusStatus: PlusStatusEnum;
15
- onlineStatus: OnlineStatusEnum;
16
-
17
- plus: {
18
- id: string;
19
- expireAt: string;
20
- cancelled: boolean;
21
- type: string;
22
- };
23
-
24
- theme: {
25
- id: string;
26
- name: string;
27
- backgroundPhotoUri: string;
28
- };
29
-
30
- profile: {
31
- id: string;
32
- description: string;
33
- pronouns: string;
34
- photoUri: string;
35
- backgroundPhotoUri: string;
36
- adult: boolean;
37
- };
38
-
39
- email: {
40
- id: string;
41
- address: string;
42
- verified: boolean;
43
- };
44
-
45
- phone: {
46
- id: string;
47
- number: string;
48
- verified: boolean;
49
- };
50
-
51
- personas: PersonaObj[];
52
- }
package/types.d.ts DELETED
@@ -1,31 +0,0 @@
1
-
2
- declare global {
3
- interface Console {
4
- dev: (...args: any[]) => void;
5
- }
6
- }
7
-
8
- /** Declaration file generated by dts-gen */
9
-
10
- declare class NodePolyglot {
11
- constructor(options?: any);
12
-
13
- clear(): void;
14
-
15
- extend(morePhrases: any, prefix?: any): void;
16
-
17
- has(key: any): any;
18
-
19
- locale(newLocale: any): any;
20
-
21
- replace(newPhrases: any): void;
22
-
23
- t(key: any, options?: any): any;
24
-
25
- unset(morePhrases: any, prefix: any): void;
26
-
27
- static transformPhrase(phrase: any, substitutions: any, locale: any): any;
28
-
29
- }
30
-
31
- export = NodePolyglot;