@jsb188/app 1.0.4 → 1.1.1
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/constants/app.ts +2 -2
- package/constants/emoji.ts +16 -16
- package/constants/journal.ts +74 -0
- package/i18n/app.ts +2 -0
- package/i18n/auth.ts +12 -6
- package/i18n/datetime.ts +0 -1
- package/i18n/error.ts +11 -6
- package/i18n/form.ts +1 -0
- package/i18n/index.ts +0 -1
- package/i18n/user.ts +6 -3
- package/main.ts +36 -4
- package/package.json +10 -5
- package/platform.ts +125 -0
- package/types/ai.d.ts +30 -0
- package/types/app.d.ts +2 -0
- package/types/auth.d.ts +63 -0
- package/types/journal.d.ts +24 -0
- package/types/organization.d.ts +38 -0
- package/types.d.ts +8 -0
- package/utils/datetime.ts +473 -289
- package/utils/journal.ts +17 -0
- package/utils/logic.ts +81 -78
- package/utils/number.ts +92 -68
- package/utils/object.ts +277 -219
- package/utils/string.ts +219 -107
- package/utils/timeZone.ts +2369 -0
- package/types/datetime.d.ts +0 -10
|
@@ -0,0 +1,24 @@
|
|
|
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;
|
|
@@ -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;
|