@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.
@@ -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;