@jsb188/app 1.0.4 → 1.1.3

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.
package/types/ai.d.ts ADDED
@@ -0,0 +1,30 @@
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 CHANGED
@@ -24,6 +24,8 @@ export interface EditUserPlusModalProps extends EditIfaceModalProps {
24
24
 
25
25
  export type DarkOrLightEnum = 'light' | 'dark';
26
26
 
27
+ export type ColorEnum = 'red' | 'orange' | 'brown' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'slate' | 'zinc' | 'stone';
28
+
27
29
  // Stripe types
28
30
 
29
31
  export type PlatformProductGroupEnum = 'PERKS' | 'PLUS' | 'PRO' | 'COINS';
@@ -0,0 +1,63 @@
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
+ }
@@ -0,0 +1,35 @@
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;
25
+
26
+ /**
27
+ * Filters for search
28
+ */
29
+
30
+ export interface FilterJournalEntriesArgs {
31
+ type?: JournalTypeEnum | null;
32
+ startDate?: string | null;
33
+ endDate?: string | null;
34
+ query?: string;
35
+ }
@@ -0,0 +1,38 @@
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.d.ts CHANGED
@@ -1,3 +1,10 @@
1
+
2
+ declare global {
3
+ interface Console {
4
+ dev: (...args: any[]) => void;
5
+ }
6
+ }
7
+
1
8
  /** Declaration file generated by dts-gen */
2
9
 
3
10
  declare class NodePolyglot {
@@ -20,4 +27,5 @@ declare class NodePolyglot {
20
27
  static transformPhrase(phrase: any, substitutions: any, locale: any): any;
21
28
 
22
29
  }
30
+
23
31
  export = NodePolyglot;