@misternooblet/squara-types 1.0.5 → 1.0.7

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.
@@ -23,8 +23,8 @@ export interface ExpenseDocument {
23
23
  splitDetails: Record<string, SplitDetail>;
24
24
  category: ExpenseCategory;
25
25
  date: Date;
26
- notes: string | null;
27
- receiptURL: string | null;
26
+ notes?: string;
27
+ receiptURL?: string;
28
28
  createdBy: string;
29
29
  createdAt: Date;
30
30
  updatedAt: Date;
@@ -36,7 +36,7 @@ export interface CreateExpenseInput {
36
36
  paidBy: string;
37
37
  category: ExpenseCategory;
38
38
  date: Date;
39
- notes?: string | null;
39
+ notes?: string;
40
40
  }
41
41
  export interface EditExpenseInput {
42
42
  groupId: string;
@@ -46,5 +46,5 @@ export interface EditExpenseInput {
46
46
  paidBy: string;
47
47
  category: ExpenseCategory;
48
48
  date: Date;
49
- notes?: string | null;
49
+ notes?: string;
50
50
  }
@@ -11,13 +11,13 @@ export declare enum GroupMemberRole {
11
11
  export interface GroupMember {
12
12
  uid: string;
13
13
  displayName: string;
14
- photoURL: string | null;
14
+ photoURL?: string;
15
15
  role: GroupMemberRole;
16
16
  joinedAt: Date;
17
17
  splitRatio: number;
18
18
  }
19
- export interface GroupDocument {
20
- id: string;
19
+ export interface Group {
20
+ _id: string;
21
21
  name: string;
22
22
  type: GroupType;
23
23
  memberIds: string[];
@@ -27,17 +27,9 @@ export interface GroupDocument {
27
27
  currency: string;
28
28
  isSettled: boolean;
29
29
  isArchived: boolean;
30
- tripStartDate: Date | null;
31
- tripEndDate: Date | null;
30
+ tripStartDate?: Date;
31
+ tripEndDate?: Date;
32
32
  createdAt: Date;
33
33
  updatedAt: Date;
34
- lastExpenseAt: Date | null;
35
- }
36
- export interface CreateGroupInput {
37
- name: string;
38
- type: GroupType;
39
- currency: string;
40
- invitedMembers?: string[];
41
- tripStartDate?: Date | null;
42
- tripEndDate?: Date | null;
34
+ lastExpenseAt?: Date;
43
35
  }
@@ -1 +1 @@
1
- export { GroupType, GroupMemberRole, GroupMember, GroupDocument, CreateGroupInput } from './expense';
1
+ export { GroupType, GroupMemberRole, GroupMember, Group } from './group';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GroupMemberRole = exports.GroupType = void 0;
4
- var expense_1 = require("./expense");
5
- Object.defineProperty(exports, "GroupType", { enumerable: true, get: function () { return expense_1.GroupType; } });
6
- Object.defineProperty(exports, "GroupMemberRole", { enumerable: true, get: function () { return expense_1.GroupMemberRole; } });
4
+ var group_1 = require("./group");
5
+ Object.defineProperty(exports, "GroupType", { enumerable: true, get: function () { return group_1.GroupType; } });
6
+ Object.defineProperty(exports, "GroupMemberRole", { enumerable: true, get: function () { return group_1.GroupMemberRole; } });
@@ -3,10 +3,10 @@ export interface User {
3
3
  uid: string;
4
4
  email: string;
5
5
  displayName: string;
6
- photoURL: string | null;
6
+ photoURL?: string;
7
7
  plan: SubscriptionPlan;
8
- planExpiresAt: Date | null;
9
- revenueCatId: string | null;
8
+ planExpiresAt?: Date;
9
+ revenueCatId?: string;
10
10
  scanCount: number;
11
11
  scanResetDate: Date;
12
12
  groupCount: number;
@@ -17,8 +17,8 @@ export interface User {
17
17
  }
18
18
  export declare const DEFAULT_USER_DOCUMENT: {
19
19
  plan: SubscriptionPlan;
20
- planExpiresAt: null;
21
- revenueCatId: null;
20
+ planExpiresAt: undefined;
21
+ revenueCatId: undefined;
22
22
  scanCount: number;
23
23
  groupCount: number;
24
24
  currency: string;
package/dist/user/user.js CHANGED
@@ -4,8 +4,8 @@ exports.DEFAULT_USER_DOCUMENT = void 0;
4
4
  const user_subscription_1 = require("../user-subscription");
5
5
  exports.DEFAULT_USER_DOCUMENT = {
6
6
  plan: user_subscription_1.SubscriptionPlan.Free,
7
- planExpiresAt: null,
8
- revenueCatId: null,
7
+ planExpiresAt: undefined,
8
+ revenueCatId: undefined,
9
9
  scanCount: 0,
10
10
  groupCount: 0,
11
11
  currency: 'USD',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misternooblet/squara-types",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Shared TypeScript types for the Squara app.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
File without changes