@misternooblet/squara-types 1.0.12 → 1.0.14

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.
@@ -22,12 +22,12 @@ export interface Expense {
22
22
  paidBy: string;
23
23
  splitDetails: Record<string, SplitDetail>;
24
24
  category: ExpenseCategory;
25
- date: Date;
25
+ date: string;
26
26
  notes?: string;
27
27
  receiptURL?: string;
28
28
  createdBy: string;
29
- createdAt: Date;
30
- updatedAt: Date;
29
+ createdAt: string;
30
+ updatedAt: string;
31
31
  }
32
32
  export interface CreateExpenseInput {
33
33
  groupId: string;
@@ -35,7 +35,7 @@ export interface CreateExpenseInput {
35
35
  amount: number;
36
36
  paidBy: string;
37
37
  category: ExpenseCategory;
38
- date: Date;
38
+ date: string;
39
39
  notes?: string;
40
40
  }
41
41
  export interface EditExpenseInput {
@@ -45,6 +45,6 @@ export interface EditExpenseInput {
45
45
  amount: number;
46
46
  paidBy: string;
47
47
  category: ExpenseCategory;
48
- date: Date;
48
+ date: string;
49
49
  notes?: string;
50
50
  }
@@ -13,7 +13,7 @@ export interface GroupMember {
13
13
  displayName: string;
14
14
  photoURL?: string;
15
15
  role: GroupMemberRole;
16
- joinedAt: Date;
16
+ joinedAt: string;
17
17
  splitRatio: number;
18
18
  }
19
19
  export interface Group {
@@ -27,10 +27,10 @@ export interface Group {
27
27
  currency: string;
28
28
  isSettled: boolean;
29
29
  isArchived: boolean;
30
- tripStartDate?: Date;
31
- tripEndDate?: Date;
30
+ tripStartDate?: string;
31
+ tripEndDate?: string;
32
32
  inviteToken?: string;
33
- createdAt: Date;
34
- updatedAt: Date;
35
- lastExpenseAt?: Date;
33
+ createdAt: string;
34
+ updatedAt: string;
35
+ lastExpenseAt?: string;
36
36
  }
package/dist/index.d.ts CHANGED
@@ -3,3 +3,5 @@ export * from './user-subscription/index.js';
3
3
  export * from './expense/index.js';
4
4
  export * from './group/index.js';
5
5
  export * from './client-config/index.js';
6
+ export * from './settlement/index.js';
7
+ export * from './recurring-expense/index.js';
package/dist/index.js CHANGED
@@ -19,3 +19,5 @@ __exportStar(require("./user-subscription/index.js"), exports);
19
19
  __exportStar(require("./expense/index.js"), exports);
20
20
  __exportStar(require("./group/index.js"), exports);
21
21
  __exportStar(require("./client-config/index.js"), exports);
22
+ __exportStar(require("./settlement/index.js"), exports);
23
+ __exportStar(require("./recurring-expense/index.js"), exports);
@@ -0,0 +1 @@
1
+ export { RecurringFrequency, RecurringTemplate, CreateRecurringInput, UpdateRecurringInput } from './recurring-expense';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RecurringFrequency = void 0;
4
+ var recurring_expense_1 = require("./recurring-expense");
5
+ Object.defineProperty(exports, "RecurringFrequency", { enumerable: true, get: function () { return recurring_expense_1.RecurringFrequency; } });
@@ -0,0 +1,52 @@
1
+ import { ExpenseCategory } from "../expense";
2
+ export declare enum RecurringFrequency {
3
+ Weekly = "weekly",
4
+ Biweekly = "biweekly",
5
+ Monthly = "monthly",
6
+ Bimonthly = "bimonthly",
7
+ Quarterly = "quarterly",
8
+ Yearly = "yearly"
9
+ }
10
+ export interface RecurringTemplate {
11
+ id: string;
12
+ groupId: string;
13
+ description: string;
14
+ amount: number;
15
+ currency: string;
16
+ category: ExpenseCategory;
17
+ paidBy: string;
18
+ frequency: RecurringFrequency;
19
+ nextDue: string;
20
+ startDate: string;
21
+ endDate?: string;
22
+ splitOverride?: Record<string, number>;
23
+ isActive: boolean;
24
+ lastGeneratedAt?: string;
25
+ lastGeneratedExpenseId?: string;
26
+ createdBy: string;
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ }
30
+ export interface CreateRecurringInput {
31
+ groupId: string;
32
+ description: string;
33
+ amount: number;
34
+ category: ExpenseCategory;
35
+ paidBy: string;
36
+ frequency: RecurringFrequency;
37
+ startDate: string;
38
+ endDate?: string;
39
+ splitOverride?: Record<string, number>;
40
+ }
41
+ export interface UpdateRecurringInput {
42
+ groupId: string;
43
+ recurringId: string;
44
+ description?: string;
45
+ amount?: number;
46
+ category?: ExpenseCategory;
47
+ paidBy?: string;
48
+ frequency?: RecurringFrequency;
49
+ endDate?: string;
50
+ splitOverride?: Record<string, number>;
51
+ isActive?: boolean;
52
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RecurringFrequency = void 0;
4
+ var RecurringFrequency;
5
+ (function (RecurringFrequency) {
6
+ RecurringFrequency["Weekly"] = "weekly";
7
+ RecurringFrequency["Biweekly"] = "biweekly";
8
+ RecurringFrequency["Monthly"] = "monthly";
9
+ RecurringFrequency["Bimonthly"] = "bimonthly";
10
+ RecurringFrequency["Quarterly"] = "quarterly";
11
+ RecurringFrequency["Yearly"] = "yearly";
12
+ })(RecurringFrequency || (exports.RecurringFrequency = RecurringFrequency = {}));
@@ -0,0 +1 @@
1
+ export { SettlementStatus, Settlement, SimplifiedTransfer, SettleUpPlan } from './settlement';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettlementStatus = void 0;
4
+ var settlement_1 = require("./settlement");
5
+ Object.defineProperty(exports, "SettlementStatus", { enumerable: true, get: function () { return settlement_1.SettlementStatus; } });
@@ -0,0 +1,28 @@
1
+ export declare enum SettlementStatus {
2
+ Pending = "pending",
3
+ Confirmed = "confirmed"
4
+ }
5
+ export interface Settlement {
6
+ _id: string;
7
+ groupId: string;
8
+ fromUid: string;
9
+ toUid: string;
10
+ amount: number;
11
+ currency: string;
12
+ status: SettlementStatus;
13
+ note?: string;
14
+ createdBy: string;
15
+ createdAt: string;
16
+ confirmedAt?: string;
17
+ updatedAt: string;
18
+ }
19
+ export interface SimplifiedTransfer {
20
+ fromUid: string;
21
+ toUid: string;
22
+ amount: number;
23
+ }
24
+ export interface SettleUpPlan {
25
+ transfers: SimplifiedTransfer[];
26
+ totalOwed: number;
27
+ isFullySettled: boolean;
28
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SettlementStatus = void 0;
4
+ var SettlementStatus;
5
+ (function (SettlementStatus) {
6
+ SettlementStatus["Pending"] = "pending";
7
+ SettlementStatus["Confirmed"] = "confirmed";
8
+ })(SettlementStatus || (exports.SettlementStatus = SettlementStatus = {}));
@@ -5,15 +5,15 @@ export interface User {
5
5
  displayName: string;
6
6
  photoURL?: string;
7
7
  plan: SubscriptionPlan;
8
- planExpiresAt?: Date;
8
+ planExpiresAt?: string;
9
9
  revenueCatId?: string;
10
10
  scanCount: number;
11
- scanResetDate: Date;
11
+ scanResetDate: string;
12
12
  ownedGroupCount: number;
13
13
  currency: string;
14
- createdAt: Date;
15
- updatedAt: Date;
16
- lastActiveAt: Date;
14
+ createdAt: string;
15
+ updatedAt: string;
16
+ lastActiveAt: string;
17
17
  }
18
18
  export declare const DEFAULT_USER_DOCUMENT: {
19
19
  plan: SubscriptionPlan;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misternooblet/squara-types",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "Shared TypeScript types for the Squara app.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",