@misternooblet/squara-types 1.0.3
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/expense/expense.d.ts +50 -0
- package/dist/expense/expense.js +15 -0
- package/dist/expense/index.d.ts +1 -0
- package/dist/expense/index.js +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/user/index.d.ts +1 -0
- package/dist/user/index.js +5 -0
- package/dist/user/user.d.ts +24 -0
- package/dist/user/user.js +12 -0
- package/dist/user-subscription/index.d.ts +1 -0
- package/dist/user-subscription/index.js +5 -0
- package/dist/user-subscription/user-subscription.d.ts +6 -0
- package/dist/user-subscription/user-subscription.js +10 -0
- package/package.json +30 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare enum ExpenseCategory {
|
|
2
|
+
Food = "food",
|
|
3
|
+
Transport = "transport",
|
|
4
|
+
Housing = "housing",
|
|
5
|
+
Entertainment = "entertainment",
|
|
6
|
+
Shopping = "shopping",
|
|
7
|
+
Health = "health",
|
|
8
|
+
Travel = "travel",
|
|
9
|
+
Utilities = "utilities",
|
|
10
|
+
Other = "other"
|
|
11
|
+
}
|
|
12
|
+
export interface SplitDetail {
|
|
13
|
+
ratio: number;
|
|
14
|
+
amount: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ExpenseDocument {
|
|
17
|
+
id: string;
|
|
18
|
+
groupId: string;
|
|
19
|
+
title: string;
|
|
20
|
+
amount: number;
|
|
21
|
+
currency: string;
|
|
22
|
+
paidBy: string;
|
|
23
|
+
splitDetails: Record<string, SplitDetail>;
|
|
24
|
+
category: ExpenseCategory;
|
|
25
|
+
date: Date;
|
|
26
|
+
notes: string | null;
|
|
27
|
+
receiptURL: string | null;
|
|
28
|
+
createdBy: string;
|
|
29
|
+
createdAt: Date;
|
|
30
|
+
updatedAt: Date;
|
|
31
|
+
}
|
|
32
|
+
export interface CreateExpenseInput {
|
|
33
|
+
groupId: string;
|
|
34
|
+
title: string;
|
|
35
|
+
amount: number;
|
|
36
|
+
paidBy: string;
|
|
37
|
+
category: ExpenseCategory;
|
|
38
|
+
date: Date;
|
|
39
|
+
notes?: string | null;
|
|
40
|
+
}
|
|
41
|
+
export interface EditExpenseInput {
|
|
42
|
+
groupId: string;
|
|
43
|
+
expenseId: string;
|
|
44
|
+
title: string;
|
|
45
|
+
amount: number;
|
|
46
|
+
paidBy: string;
|
|
47
|
+
category: ExpenseCategory;
|
|
48
|
+
date: Date;
|
|
49
|
+
notes?: string | null;
|
|
50
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExpenseCategory = void 0;
|
|
4
|
+
var ExpenseCategory;
|
|
5
|
+
(function (ExpenseCategory) {
|
|
6
|
+
ExpenseCategory["Food"] = "food";
|
|
7
|
+
ExpenseCategory["Transport"] = "transport";
|
|
8
|
+
ExpenseCategory["Housing"] = "housing";
|
|
9
|
+
ExpenseCategory["Entertainment"] = "entertainment";
|
|
10
|
+
ExpenseCategory["Shopping"] = "shopping";
|
|
11
|
+
ExpenseCategory["Health"] = "health";
|
|
12
|
+
ExpenseCategory["Travel"] = "travel";
|
|
13
|
+
ExpenseCategory["Utilities"] = "utilities";
|
|
14
|
+
ExpenseCategory["Other"] = "other";
|
|
15
|
+
})(ExpenseCategory || (exports.ExpenseCategory = ExpenseCategory = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExpenseCategory, SplitDetail, ExpenseDocument, CreateExpenseInput, EditExpenseInput } from './expense';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExpenseCategory = void 0;
|
|
4
|
+
var expense_1 = require("./expense");
|
|
5
|
+
Object.defineProperty(exports, "ExpenseCategory", { enumerable: true, get: function () { return expense_1.ExpenseCategory; } });
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./user/index.js"), exports);
|
|
18
|
+
__exportStar(require("./user-subscription/index.js"), exports);
|
|
19
|
+
__exportStar(require("./expense/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { User, DEFAULT_USER_DOCUMENT } from './user';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_USER_DOCUMENT = void 0;
|
|
4
|
+
var user_1 = require("./user");
|
|
5
|
+
Object.defineProperty(exports, "DEFAULT_USER_DOCUMENT", { enumerable: true, get: function () { return user_1.DEFAULT_USER_DOCUMENT; } });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SubscriptionPlan } from "../user-subscription";
|
|
2
|
+
export interface User {
|
|
3
|
+
email: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
photoURL: string | null;
|
|
6
|
+
plan: SubscriptionPlan;
|
|
7
|
+
planExpiresAt: Date | null;
|
|
8
|
+
revenueCatId: string | null;
|
|
9
|
+
scanCount: number;
|
|
10
|
+
scanResetDate: Date;
|
|
11
|
+
groupCount: number;
|
|
12
|
+
currency: string;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
lastActiveAt: Date;
|
|
16
|
+
}
|
|
17
|
+
export declare const DEFAULT_USER_DOCUMENT: {
|
|
18
|
+
plan: SubscriptionPlan;
|
|
19
|
+
planExpiresAt: null;
|
|
20
|
+
revenueCatId: null;
|
|
21
|
+
scanCount: number;
|
|
22
|
+
groupCount: number;
|
|
23
|
+
currency: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_USER_DOCUMENT = void 0;
|
|
4
|
+
const user_subscription_1 = require("../user-subscription");
|
|
5
|
+
exports.DEFAULT_USER_DOCUMENT = {
|
|
6
|
+
plan: user_subscription_1.SubscriptionPlan.Free,
|
|
7
|
+
planExpiresAt: null,
|
|
8
|
+
revenueCatId: null,
|
|
9
|
+
scanCount: 0,
|
|
10
|
+
groupCount: 0,
|
|
11
|
+
currency: 'USD',
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SubscriptionPlan } from './user-subscription';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscriptionPlan = void 0;
|
|
4
|
+
var user_subscription_1 = require("./user-subscription");
|
|
5
|
+
Object.defineProperty(exports, "SubscriptionPlan", { enumerable: true, get: function () { return user_subscription_1.SubscriptionPlan; } });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscriptionPlan = void 0;
|
|
4
|
+
var SubscriptionPlan;
|
|
5
|
+
(function (SubscriptionPlan) {
|
|
6
|
+
SubscriptionPlan["Free"] = "free";
|
|
7
|
+
SubscriptionPlan["Monthly"] = "monthly";
|
|
8
|
+
SubscriptionPlan["Yearly"] = "yearly";
|
|
9
|
+
SubscriptionPlan["Lifetime"] = "lifetime";
|
|
10
|
+
})(SubscriptionPlan || (exports.SubscriptionPlan = SubscriptionPlan = {}));
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@misternooblet/squara-types",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Shared TypeScript types for the Squara app.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"prepublishOnly": "npm run build"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/**/*"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/MisterNooblet/squara-types.git"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"typescript",
|
|
20
|
+
"types"
|
|
21
|
+
],
|
|
22
|
+
"author": "MisterNooblet",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"typescript": "^5.0.0"
|
|
29
|
+
}
|
|
30
|
+
}
|