@demind-inc/core 1.0.0
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/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/constants.d.ts +5 -0
- package/dist/constants.js +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -0
- package/dist/models/Calendar.d.ts +27 -0
- package/dist/models/Calendar.js +2 -0
- package/dist/models/User.d.ts +11 -0
- package/dist/models/User.js +2 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +18 -0
- package/lib/constants.ts +5 -0
- package/lib/index.ts +2 -0
- package/lib/models/Calendar.ts +31 -0
- package/lib/models/User.ts +12 -0
- package/lib/models/index.ts +2 -0
- package/package.json +33 -0
- package/tsconfig.json +10 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 demind-inc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## What is `Core` library
|
|
2
|
+
|
|
3
|
+
In this library, we define the models/types we gonna use in the app lifestack.
|
|
4
|
+
|
|
5
|
+
## How to build
|
|
6
|
+
|
|
7
|
+
1. `npm install`
|
|
8
|
+
2. `npm run build`
|
|
9
|
+
|
|
10
|
+
Make sure to push new changes of `dist` folder generted by building to the github.
|
|
11
|
+
|
|
12
|
+
## How to use the `Core` library
|
|
13
|
+
|
|
14
|
+
Make sure you're the member of the organization `demind-inc` and the target repo you want to install the lib is inside the org.
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
yarn add demind-inc/lifestack-core
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
or
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
npm install demind-inc/lifestack-core
|
|
24
|
+
```
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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("./models"), exports);
|
|
18
|
+
__exportStar(require("./constants"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type CalendarType = 'google' | 'outlook' | 'apple';
|
|
2
|
+
export type CalendarEventStatus = 'confirmed' | 'tentative' | 'cancelled';
|
|
3
|
+
export interface Calendar {
|
|
4
|
+
calendarId: string;
|
|
5
|
+
internalGCalendarId?: string;
|
|
6
|
+
lastFetchedDate?: string;
|
|
7
|
+
calendarType?: CalendarType;
|
|
8
|
+
scope?: string;
|
|
9
|
+
events?: CalendarEvent[];
|
|
10
|
+
}
|
|
11
|
+
export interface CalendarEvent {
|
|
12
|
+
eventId: string;
|
|
13
|
+
summary: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
start: {
|
|
16
|
+
date: string;
|
|
17
|
+
timeZone: string;
|
|
18
|
+
};
|
|
19
|
+
end: {
|
|
20
|
+
date: string;
|
|
21
|
+
timeZone: string;
|
|
22
|
+
};
|
|
23
|
+
location?: string;
|
|
24
|
+
status?: CalendarEventStatus;
|
|
25
|
+
updatedDate: string;
|
|
26
|
+
createdDate: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./Calendar"), exports);
|
|
18
|
+
__exportStar(require("./User"), exports);
|
package/lib/constants.ts
ADDED
package/lib/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Timestamp } from '@google-cloud/firestore';
|
|
2
|
+
|
|
3
|
+
export type CalendarType = 'google' | 'outlook' | 'apple';
|
|
4
|
+
export type CalendarEventStatus = 'confirmed' | 'tentative' | 'cancelled';
|
|
5
|
+
|
|
6
|
+
export interface Calendar {
|
|
7
|
+
calendarId: string;
|
|
8
|
+
internalGCalendarId?: string;
|
|
9
|
+
lastFetchedDate?: string;
|
|
10
|
+
calendarType?: CalendarType;
|
|
11
|
+
scope?: string;
|
|
12
|
+
events?: CalendarEvent[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CalendarEvent {
|
|
16
|
+
eventId: string;
|
|
17
|
+
summary: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
start: {
|
|
20
|
+
date: string;
|
|
21
|
+
timeZone: string;
|
|
22
|
+
};
|
|
23
|
+
end: {
|
|
24
|
+
date: string;
|
|
25
|
+
timeZone: string;
|
|
26
|
+
};
|
|
27
|
+
location?: string;
|
|
28
|
+
status?: CalendarEventStatus;
|
|
29
|
+
updatedDate: string;
|
|
30
|
+
createdDate: string;
|
|
31
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@demind-inc/core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "npm i && tsc"
|
|
8
|
+
},
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"typescript": "^4.9.5"
|
|
11
|
+
},
|
|
12
|
+
"private": false,
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@google-cloud/firestore": "^6.7.0"
|
|
15
|
+
},
|
|
16
|
+
"description": "In this library, we define the models/types we gonna use in the app lifestack.",
|
|
17
|
+
"directories": {
|
|
18
|
+
"lib": "lib"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/demind-inc/lifestack-core.git"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"demind"
|
|
26
|
+
],
|
|
27
|
+
"author": "wakkihaya",
|
|
28
|
+
"license": "ISC",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/demind-inc/lifestack-core/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/demind-inc/lifestack-core#readme"
|
|
33
|
+
}
|