@misternooblet/squara-types 1.0.3 → 1.0.4
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/dist/group/expense.d.ts +43 -0
- package/dist/group/expense.js +15 -0
- package/dist/group/index.d.ts +1 -0
- package/dist/group/index.js +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare enum GroupType {
|
|
2
|
+
Couple = "couple",
|
|
3
|
+
Roommate = "roommate",
|
|
4
|
+
Friends = "friends",
|
|
5
|
+
Trip = "trip"
|
|
6
|
+
}
|
|
7
|
+
export declare enum GroupMemberRole {
|
|
8
|
+
Owner = "owner",
|
|
9
|
+
Member = "member"
|
|
10
|
+
}
|
|
11
|
+
export interface GroupMember {
|
|
12
|
+
uid: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
photoURL: string | null;
|
|
15
|
+
role: GroupMemberRole;
|
|
16
|
+
joinedAt: Date;
|
|
17
|
+
splitRatio: number;
|
|
18
|
+
}
|
|
19
|
+
export interface GroupDocument {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
type: GroupType;
|
|
23
|
+
memberIds: string[];
|
|
24
|
+
members: Record<string, GroupMember>;
|
|
25
|
+
createdBy: string;
|
|
26
|
+
balances: Record<string, number>;
|
|
27
|
+
currency: string;
|
|
28
|
+
isSettled: boolean;
|
|
29
|
+
isArchived: boolean;
|
|
30
|
+
tripStartDate: Date | null;
|
|
31
|
+
tripEndDate: Date | null;
|
|
32
|
+
createdAt: Date;
|
|
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;
|
|
43
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupMemberRole = exports.GroupType = void 0;
|
|
4
|
+
var GroupType;
|
|
5
|
+
(function (GroupType) {
|
|
6
|
+
GroupType["Couple"] = "couple";
|
|
7
|
+
GroupType["Roommate"] = "roommate";
|
|
8
|
+
GroupType["Friends"] = "friends";
|
|
9
|
+
GroupType["Trip"] = "trip";
|
|
10
|
+
})(GroupType || (exports.GroupType = GroupType = {}));
|
|
11
|
+
var GroupMemberRole;
|
|
12
|
+
(function (GroupMemberRole) {
|
|
13
|
+
GroupMemberRole["Owner"] = "owner";
|
|
14
|
+
GroupMemberRole["Member"] = "member";
|
|
15
|
+
})(GroupMemberRole || (exports.GroupMemberRole = GroupMemberRole = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GroupType, GroupMemberRole, GroupMember, GroupDocument, CreateGroupInput } from './expense';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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; } });
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./user/index.js"), exports);
|
|
18
18
|
__exportStar(require("./user-subscription/index.js"), exports);
|
|
19
19
|
__exportStar(require("./expense/index.js"), exports);
|
|
20
|
+
__exportStar(require("./group/index.js"), exports);
|