easywork-common-lib 1.0.787 → 1.0.789
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/entities/index.d.ts +1 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/third-party/google-webhooks-config.entity.d.ts +14 -0
- package/dist/entities/third-party/google-webhooks-config.entity.js +72 -0
- package/dist/entities/third-party/google-webhooks-config.entity.js.map +1 -0
- package/dist/entities/third-party/oauth-v2.entity.d.ts +2 -0
- package/dist/entities/third-party/oauth-v2.entity.js +8 -1
- package/dist/entities/third-party/oauth-v2.entity.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/dist/entities/index.d.ts
CHANGED
package/dist/entities/index.js
CHANGED
|
@@ -50,4 +50,5 @@ __exportStar(require("./policy"), exports);
|
|
|
50
50
|
__exportStar(require("./google-oauth-credentials.entity"), exports);
|
|
51
51
|
__exportStar(require("./third-party/google-calendar-config.entity"), exports);
|
|
52
52
|
__exportStar(require("./third-party/oauth-v2.entity"), exports);
|
|
53
|
+
__exportStar(require("./third-party/google-webhooks-config.entity"), exports);
|
|
53
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,mDAAiC;AACjC,yDAAuC;AACvC,sDAAoC;AACpC,iDAA+B;AAC/B,iDAA+B;AAC/B,iEAA+C;AAC/C,uDAAqC;AACrC,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,kDAAgC;AAChC,iDAA+B;AAC/B,+DAA6C;AAC7C,6DAA2C;AAC3C,+DAA6C;AAC7C,6DAA2C;AAC3C,oEAAkD;AAClD,2EAAyD;AACzD,oDAAkC;AAClC,gDAA8B;AAC9B,iDAA+B;AAC/B,4DAA0C;AAC1C,mDAAiC;AACjC,gDAA8B;AAC9B,+EAA6D;AAC7D,2DAAyC;AACzC,mDAAiC;AACjC,4DAA0C;AAC1C,yDAAuC;AACvC,2CAAyB;AACzB,oEAAkD;AAClD,8EAA4D;AAC5D,gEAA8C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,mDAAiC;AACjC,yDAAuC;AACvC,sDAAoC;AACpC,iDAA+B;AAC/B,iDAA+B;AAC/B,iEAA+C;AAC/C,uDAAqC;AACrC,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,kDAAgC;AAChC,iDAA+B;AAC/B,+DAA6C;AAC7C,6DAA2C;AAC3C,+DAA6C;AAC7C,6DAA2C;AAC3C,oEAAkD;AAClD,2EAAyD;AACzD,oDAAkC;AAClC,gDAA8B;AAC9B,iDAA+B;AAC/B,4DAA0C;AAC1C,mDAAiC;AACjC,gDAA8B;AAC9B,+EAA6D;AAC7D,2DAAyC;AACzC,mDAAiC;AACjC,4DAA0C;AAC1C,yDAAuC;AACvC,2CAAyB;AACzB,oEAAkD;AAClD,8EAA4D;AAC5D,gEAA8C;AAC9C,8EAA4D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OauthV2 } from './oauth-v2.entity';
|
|
2
|
+
import { User } from '../user.entity';
|
|
3
|
+
export declare class GoogleWebhooksConfig {
|
|
4
|
+
channelId: string;
|
|
5
|
+
resourceId: string;
|
|
6
|
+
notificationUrl: string;
|
|
7
|
+
expiration: number;
|
|
8
|
+
active: boolean;
|
|
9
|
+
syncToken?: string;
|
|
10
|
+
oauth: OauthV2;
|
|
11
|
+
user: User;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GoogleWebhooksConfig = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const oauth_v2_entity_1 = require("./oauth-v2.entity");
|
|
15
|
+
const user_entity_1 = require("../user.entity");
|
|
16
|
+
let GoogleWebhooksConfig = class GoogleWebhooksConfig {
|
|
17
|
+
channelId;
|
|
18
|
+
resourceId;
|
|
19
|
+
notificationUrl;
|
|
20
|
+
expiration;
|
|
21
|
+
active;
|
|
22
|
+
syncToken;
|
|
23
|
+
oauth;
|
|
24
|
+
user;
|
|
25
|
+
createdAt;
|
|
26
|
+
updatedAt;
|
|
27
|
+
};
|
|
28
|
+
exports.GoogleWebhooksConfig = GoogleWebhooksConfig;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.PrimaryColumn)('uuid'),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], GoogleWebhooksConfig.prototype, "channelId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ unique: true }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], GoogleWebhooksConfig.prototype, "resourceId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], GoogleWebhooksConfig.prototype, "notificationUrl", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'bigint' }),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], GoogleWebhooksConfig.prototype, "expiration", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ default: true }),
|
|
47
|
+
__metadata("design:type", Boolean)
|
|
48
|
+
], GoogleWebhooksConfig.prototype, "active", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], GoogleWebhooksConfig.prototype, "syncToken", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.OneToOne)(() => oauth_v2_entity_1.OauthV2, { nullable: false, onDelete: 'CASCADE' }),
|
|
55
|
+
__metadata("design:type", oauth_v2_entity_1.OauthV2)
|
|
56
|
+
], GoogleWebhooksConfig.prototype, "oauth", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.OneToOne)(() => user_entity_1.User, { nullable: false, onDelete: 'CASCADE' }),
|
|
59
|
+
__metadata("design:type", user_entity_1.User)
|
|
60
|
+
], GoogleWebhooksConfig.prototype, "user", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
63
|
+
__metadata("design:type", Date)
|
|
64
|
+
], GoogleWebhooksConfig.prototype, "createdAt", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
67
|
+
__metadata("design:type", Date)
|
|
68
|
+
], GoogleWebhooksConfig.prototype, "updatedAt", void 0);
|
|
69
|
+
exports.GoogleWebhooksConfig = GoogleWebhooksConfig = __decorate([
|
|
70
|
+
(0, typeorm_1.Entity)()
|
|
71
|
+
], GoogleWebhooksConfig);
|
|
72
|
+
//# sourceMappingURL=google-webhooks-config.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-webhooks-config.entity.js","sourceRoot":"","sources":["../../../src/entities/third-party/google-webhooks-config.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAsG;AACtG,uDAA4C;AAC5C,gDAAsC;AAG/B,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAE/B,SAAS,CAAS;IAGlB,UAAU,CAAS;IAGnB,eAAe,CAAS;IAGxB,UAAU,CAAS;IAGnB,MAAM,CAAU;IAGhB,SAAS,CAAU;IAGnB,KAAK,CAAU;IAGf,IAAI,CAAO;IAGX,SAAS,CAAQ;IAGjB,SAAS,CAAQ;CAClB,CAAA;AA9BY,oDAAoB;AAE/B;IADC,IAAA,uBAAa,EAAC,MAAM,CAAC;;uDACJ;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;wDACN;AAGnB;IADC,IAAA,gBAAM,GAAE;;6DACe;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;wDACR;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;oDACV;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACR;AAGnB;IADC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,yBAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BAC3D,yBAAO;mDAAC;AAGf;IADC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BACzD,kBAAI;kDAAC;AAGX;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;uDAAC;AAGjB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;uDAAC;+BA7BN,oBAAoB;IADhC,IAAA,gBAAM,GAAE;GACI,oBAAoB,CA8BhC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseEntityOnlyEssential } from '../../common/database/base.entity';
|
|
2
|
+
import { User } from '../user.entity';
|
|
2
3
|
export declare enum OAuthProvider {
|
|
3
4
|
Google = "google",
|
|
4
5
|
Microsoft = "microsoft",
|
|
@@ -17,4 +18,5 @@ export declare class OauthV2 extends BaseEntityOnlyEssential {
|
|
|
17
18
|
expiresIn: number;
|
|
18
19
|
scope?: string;
|
|
19
20
|
additionalData?: string;
|
|
21
|
+
user: User;
|
|
20
22
|
}
|
|
@@ -10,8 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.OauthV2 = exports.OAuthServiceType = exports.OAuthProvider = void 0;
|
|
13
|
-
const base_entity_1 = require("../../common/database/base.entity");
|
|
14
13
|
const typeorm_1 = require("typeorm");
|
|
14
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
15
|
+
const user_entity_1 = require("../user.entity");
|
|
15
16
|
var OAuthProvider;
|
|
16
17
|
(function (OAuthProvider) {
|
|
17
18
|
OAuthProvider["Google"] = "google";
|
|
@@ -32,6 +33,7 @@ let OauthV2 = class OauthV2 extends base_entity_1.BaseEntityOnlyEssential {
|
|
|
32
33
|
expiresIn;
|
|
33
34
|
scope;
|
|
34
35
|
additionalData;
|
|
36
|
+
user;
|
|
35
37
|
};
|
|
36
38
|
exports.OauthV2 = OauthV2;
|
|
37
39
|
__decorate([
|
|
@@ -62,6 +64,11 @@ __decorate([
|
|
|
62
64
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
63
65
|
__metadata("design:type", String)
|
|
64
66
|
], OauthV2.prototype, "additionalData", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { onDelete: 'CASCADE' }),
|
|
69
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
70
|
+
__metadata("design:type", user_entity_1.User)
|
|
71
|
+
], OauthV2.prototype, "user", void 0);
|
|
65
72
|
exports.OauthV2 = OauthV2 = __decorate([
|
|
66
73
|
(0, typeorm_1.Entity)()
|
|
67
74
|
], OauthV2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-v2.entity.js","sourceRoot":"","sources":["../../../src/entities/third-party/oauth-v2.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAA4E;AAC5E,
|
|
1
|
+
{"version":3,"file":"oauth-v2.entity.js","sourceRoot":"","sources":["../../../src/entities/third-party/oauth-v2.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,mEAA4E;AAC5E,gDAAsC;AAEtC,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,wCAAuB,CAAA;IACvB,gCAAe,CAAA;AACjB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,iCAAa,CAAA;AACf,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B;AAGM,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,qCAAuB;IAElD,QAAQ,CAAgB;IAGxB,OAAO,CAAmB;IAG1B,YAAY,CAAS;IAGrB,WAAW,CAAS;IAGpB,SAAS,CAAS;IAGlB,KAAK,CAAU;IAGf,cAAc,CAAU;IAIxB,IAAI,CAAO;CACZ,CAAA;AAzBY,0BAAO;AAElB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;;yCACtB;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;;wCACvB;AAG1B;IADC,IAAA,gBAAM,GAAE;;6CACY;AAGrB;IADC,IAAA,gBAAM,GAAE;;4CACW;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;0CACT;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCAC1B;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACjB;AAIxB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC9C,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BAC1B,kBAAI;qCAAC;kBAxBA,OAAO;IADnB,IAAA,gBAAM,GAAE;GACI,OAAO,CAyBnB"}
|