@builder6/sharepoint 0.11.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/README.md +5 -0
- package/dist/microsoft365/index.d.ts +3 -0
- package/dist/microsoft365/index.js +20 -0
- package/dist/microsoft365/index.js.map +1 -0
- package/dist/microsoft365/microsoft365.controller.d.ts +8 -0
- package/dist/microsoft365/microsoft365.controller.js +83 -0
- package/dist/microsoft365/microsoft365.controller.js.map +1 -0
- package/dist/microsoft365/microsoft365.controller.spec.d.ts +1 -0
- package/dist/microsoft365/microsoft365.controller.spec.js +17 -0
- package/dist/microsoft365/microsoft365.controller.spec.js.map +1 -0
- package/dist/microsoft365/microsoft365.module.d.ts +2 -0
- package/dist/microsoft365/microsoft365.module.js +22 -0
- package/dist/microsoft365/microsoft365.module.js.map +1 -0
- package/dist/microsoft365/microsoft365.service.d.ts +3 -0
- package/dist/microsoft365/microsoft365.service.js +32 -0
- package/dist/microsoft365/microsoft365.service.js.map +1 -0
- package/dist/microsoft365/microsoft365.service.spec.d.ts +1 -0
- package/dist/microsoft365/microsoft365.service.spec.js +17 -0
- package/dist/microsoft365/microsoft365.service.spec.js.map +1 -0
- package/dist/plugin.module.d.ts +3 -0
- package/dist/plugin.module.js +22 -0
- package/dist/plugin.module.js.map +1 -0
- package/dist/sharepoint/index.d.ts +3 -0
- package/dist/sharepoint/index.js +20 -0
- package/dist/sharepoint/index.js.map +1 -0
- package/dist/sharepoint/sharepoint.controller.d.ts +2 -0
- package/dist/sharepoint/sharepoint.controller.js +17 -0
- package/dist/sharepoint/sharepoint.controller.js.map +1 -0
- package/dist/sharepoint/sharepoint.controller.spec.d.ts +1 -0
- package/dist/sharepoint/sharepoint.controller.spec.js +17 -0
- package/dist/sharepoint/sharepoint.controller.spec.js.map +1 -0
- package/dist/sharepoint/sharepoint.module.d.ts +2 -0
- package/dist/sharepoint/sharepoint.module.js +22 -0
- package/dist/sharepoint/sharepoint.module.js.map +1 -0
- package/dist/sharepoint/sharepoint.service.d.ts +2 -0
- package/dist/sharepoint/sharepoint.service.js +17 -0
- package/dist/sharepoint/sharepoint.service.js.map +1 -0
- package/dist/sharepoint/sharepoint.service.spec.d.ts +1 -0
- package/dist/sharepoint/sharepoint.service.spec.js +17 -0
- package/dist/sharepoint/sharepoint.service.spec.js.map +1 -0
- package/package.json +23 -0
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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("./microsoft365.controller"), exports);
|
|
18
|
+
__exportStar(require("./microsoft365.module"), exports);
|
|
19
|
+
__exportStar(require("./microsoft365.service"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/microsoft365/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,wDAAsC;AACtC,yDAAuC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Microsoft365Service } from './microsoft365.service';
|
|
2
|
+
export declare class Microsoft365Controller {
|
|
3
|
+
private microsoft365Service;
|
|
4
|
+
constructor(microsoft365Service: Microsoft365Service);
|
|
5
|
+
getUserOneDriveInfo(): Promise<any>;
|
|
6
|
+
getSites(): Promise<any>;
|
|
7
|
+
getSite(siteId?: string): Promise<any>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Microsoft365Controller = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const axios_1 = require("axios");
|
|
18
|
+
const microsoft365_service_1 = require("./microsoft365.service");
|
|
19
|
+
let Microsoft365Controller = class Microsoft365Controller {
|
|
20
|
+
constructor(microsoft365Service) {
|
|
21
|
+
this.microsoft365Service = microsoft365Service;
|
|
22
|
+
}
|
|
23
|
+
async getUserOneDriveInfo() {
|
|
24
|
+
const userPrincipalName = process.env.B6_MICROSOFT365_USERNAME;
|
|
25
|
+
try {
|
|
26
|
+
const accessToken = await this.microsoft365Service.getAccessToken();
|
|
27
|
+
const driveResponse = await axios_1.default.get(`https://graph.microsoft.com/v1.0/users/${userPrincipalName}/drive`, { headers: { Authorization: `Bearer ${accessToken}` } });
|
|
28
|
+
return driveResponse.data;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
const message = error.response ? error.response.data : error.message;
|
|
32
|
+
throw new common_1.HttpException(message, common_1.HttpStatus.INTERNAL_SERVER_ERROR);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async getSites() {
|
|
36
|
+
try {
|
|
37
|
+
const accessToken = await this.microsoft365Service.getAccessToken();
|
|
38
|
+
const driveResponse = await axios_1.default.get(`https://graph.microsoft.com/v1.0/sites`, { headers: { Authorization: `Bearer ${accessToken}` } });
|
|
39
|
+
return driveResponse.data;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
const message = error.response ? error.response.data : error.message;
|
|
43
|
+
throw new common_1.HttpException(message, common_1.HttpStatus.INTERNAL_SERVER_ERROR);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async getSite(siteId = 'd4d4f221-7d18-4ba8-9800-7bbcd77263af') {
|
|
47
|
+
try {
|
|
48
|
+
const accessToken = await this.microsoft365Service.getAccessToken();
|
|
49
|
+
const respose = await axios_1.default.get(`https://graph.microsoft.com/v1.0/sites/${siteId}/drive`, { headers: { Authorization: `Bearer ${accessToken}` } });
|
|
50
|
+
return respose.data;
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.log(error.response);
|
|
54
|
+
const message = error.response ? error.response.data : error.message;
|
|
55
|
+
throw new common_1.HttpException(message, common_1.HttpStatus.INTERNAL_SERVER_ERROR);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, common_1.Get)('onedrive'),
|
|
61
|
+
__metadata("design:type", Function),
|
|
62
|
+
__metadata("design:paramtypes", []),
|
|
63
|
+
__metadata("design:returntype", Promise)
|
|
64
|
+
], Microsoft365Controller.prototype, "getUserOneDriveInfo", null);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, common_1.Get)('sites'),
|
|
67
|
+
__metadata("design:type", Function),
|
|
68
|
+
__metadata("design:paramtypes", []),
|
|
69
|
+
__metadata("design:returntype", Promise)
|
|
70
|
+
], Microsoft365Controller.prototype, "getSites", null);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, common_1.Get)('sites/:siteId'),
|
|
73
|
+
__param(0, (0, common_1.Param)('siteId')),
|
|
74
|
+
__metadata("design:type", Function),
|
|
75
|
+
__metadata("design:paramtypes", [String]),
|
|
76
|
+
__metadata("design:returntype", Promise)
|
|
77
|
+
], Microsoft365Controller.prototype, "getSite", null);
|
|
78
|
+
Microsoft365Controller = __decorate([
|
|
79
|
+
(0, common_1.Controller)('api/v6/microsoft365'),
|
|
80
|
+
__metadata("design:paramtypes", [microsoft365_service_1.Microsoft365Service])
|
|
81
|
+
], Microsoft365Controller);
|
|
82
|
+
exports.Microsoft365Controller = Microsoft365Controller;
|
|
83
|
+
//# sourceMappingURL=microsoft365.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"microsoft365.controller.js","sourceRoot":"","sources":["../../src/microsoft365/microsoft365.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAMwB;AACxB,iCAAyC;AACzC,iEAA6D;AAGtD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAAoB,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAG1D,AAAN,KAAK,CAAC,mBAAmB;QACvB,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;QAC/D,IAAI;YACF,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC;YAEpE,MAAM,aAAa,GAAG,MAAM,eAAK,CAAC,GAAG,CACnC,0CAA0C,iBAAiB,QAAQ,EACnE,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,WAAW,EAAE,EAAE,EAAE,CACxD,CAAC;YAEF,OAAO,aAAa,CAAC,IAAI,CAAC;SAC3B;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;YACrE,MAAM,IAAI,sBAAa,CAAC,OAAO,EAAE,mBAAU,CAAC,qBAAqB,CAAC,CAAC;SACpE;IACH,CAAC;IAGK,AAAN,KAAK,CAAC,QAAQ;QACZ,IAAI;YACF,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC;YAEpE,MAAM,aAAa,GAAG,MAAM,eAAK,CAAC,GAAG,CACnC,wCAAwC,EACxC,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,WAAW,EAAE,EAAE,EAAE,CACxD,CAAC;YAEF,OAAO,aAAa,CAAC,IAAI,CAAC;SAC3B;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;YACrE,MAAM,IAAI,sBAAa,CAAC,OAAO,EAAE,mBAAU,CAAC,qBAAqB,CAAC,CAAC;SACpE;IACH,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CACM,SAAiB,sCAAsC;QAExE,IAAI;YACF,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC;YAEpE,MAAM,OAAO,GAAG,MAAM,eAAK,CAAC,GAAG,CAC7B,0CAA0C,MAAM,QAAQ,EACxD,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,WAAW,EAAE,EAAE,EAAE,CACxD,CAAC;YAEF,OAAO,OAAO,CAAC,IAAI,CAAC;SACrB;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;YACrE,MAAM,IAAI,sBAAa,CAAC,OAAO,EAAE,mBAAU,CAAC,qBAAqB,CAAC,CAAC;SACpE;IACH,CAAC;CACF,CAAA;AArDO;IADL,IAAA,YAAG,EAAC,UAAU,CAAC;;;;iEAgBf;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;;;;sDAeZ;AAGK;IADL,IAAA,YAAG,EAAC,eAAe,CAAC;IAElB,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;;;;qDAgBjB;AAxDU,sBAAsB;IADlC,IAAA,mBAAU,EAAC,qBAAqB,CAAC;qCAES,0CAAmB;GADjD,sBAAsB,CAyDlC;AAzDY,wDAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const testing_1 = require("@nestjs/testing");
|
|
4
|
+
const microsoft365_controller_1 = require("./microsoft365.controller");
|
|
5
|
+
describe('Microsoft365Controller', () => {
|
|
6
|
+
let controller;
|
|
7
|
+
beforeEach(async () => {
|
|
8
|
+
const module = await testing_1.Test.createTestingModule({
|
|
9
|
+
controllers: [microsoft365_controller_1.Microsoft365Controller],
|
|
10
|
+
}).compile();
|
|
11
|
+
controller = module.get(microsoft365_controller_1.Microsoft365Controller);
|
|
12
|
+
});
|
|
13
|
+
it('should be defined', () => {
|
|
14
|
+
expect(controller).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=microsoft365.controller.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"microsoft365.controller.spec.js","sourceRoot":"","sources":["../../src/microsoft365/microsoft365.controller.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,uEAAmE;AAEnE,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,IAAI,UAAkC,CAAC;IAEvC,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,WAAW,EAAE,CAAC,gDAAsB,CAAC;SACtC,CAAC,CAAC,OAAO,EAAE,CAAC;QAEb,UAAU,GAAG,MAAM,CAAC,GAAG,CAAyB,gDAAsB,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Microsoft365Module = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const microsoft365_service_1 = require("./microsoft365.service");
|
|
12
|
+
const microsoft365_controller_1 = require("./microsoft365.controller");
|
|
13
|
+
let Microsoft365Module = class Microsoft365Module {
|
|
14
|
+
};
|
|
15
|
+
Microsoft365Module = __decorate([
|
|
16
|
+
(0, common_1.Module)({
|
|
17
|
+
providers: [microsoft365_service_1.Microsoft365Service],
|
|
18
|
+
controllers: [microsoft365_controller_1.Microsoft365Controller],
|
|
19
|
+
})
|
|
20
|
+
], Microsoft365Module);
|
|
21
|
+
exports.Microsoft365Module = Microsoft365Module;
|
|
22
|
+
//# sourceMappingURL=microsoft365.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"microsoft365.module.js","sourceRoot":"","sources":["../../src/microsoft365/microsoft365.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,iEAA6D;AAC7D,uEAAmE;AAM5D,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,kBAAkB;IAJ9B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,0CAAmB,CAAC;QAChC,WAAW,EAAE,CAAC,gDAAsB,CAAC;KACtC,CAAC;GACW,kBAAkB,CAAG;AAArB,gDAAkB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Microsoft365Service = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const axios_1 = require("axios");
|
|
12
|
+
let Microsoft365Service = class Microsoft365Service {
|
|
13
|
+
async getAccessToken() {
|
|
14
|
+
const tenantId = process.env.B6_MICROSOFT365_TENANT_ID;
|
|
15
|
+
const clientId = process.env.B6_MICROSOFT365_CLIENT_ID;
|
|
16
|
+
const clientSecret = process.env.B6_MICROSOFT365_CLIENT_SECRET;
|
|
17
|
+
const tokenResponse = await axios_1.default.post(`https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/token`, new URLSearchParams({
|
|
18
|
+
client_id: clientId,
|
|
19
|
+
client_secret: clientSecret,
|
|
20
|
+
grant_type: 'client_credentials',
|
|
21
|
+
scope: 'https://graph.microsoft.com/.default',
|
|
22
|
+
}).toString(), { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
|
|
23
|
+
const accessToken = tokenResponse.data.access_token;
|
|
24
|
+
console.log(accessToken);
|
|
25
|
+
return accessToken;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
Microsoft365Service = __decorate([
|
|
29
|
+
(0, common_1.Injectable)()
|
|
30
|
+
], Microsoft365Service);
|
|
31
|
+
exports.Microsoft365Service = Microsoft365Service;
|
|
32
|
+
//# sourceMappingURL=microsoft365.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"microsoft365.service.js","sourceRoot":"","sources":["../../src/microsoft365/microsoft365.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,iCAAyC;AAGlC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,KAAK,CAAC,cAAc;QAClB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC;QACvD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC;QACvD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC;QAG/D,MAAM,aAAa,GAAG,MAAM,eAAK,CAAC,IAAI,CACpC,qCAAqC,QAAQ,oBAAoB,EACjE,IAAI,eAAe,CAAC;YAClB,SAAS,EAAE,QAAQ;YACnB,aAAa,EAAE,YAAY;YAC3B,UAAU,EAAE,oBAAoB;YAChC,KAAK,EAAE,sCAAsC;SAC9C,CAAC,CAAC,QAAQ,EAAE,EACb,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE,EAAE,CACrE,CAAC;QAEF,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACzB,OAAO,WAAW,CAAC;IACrB,CAAC;CACF,CAAA;AAtBY,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;GACA,mBAAmB,CAsB/B;AAtBY,kDAAmB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const testing_1 = require("@nestjs/testing");
|
|
4
|
+
const microsoft365_service_1 = require("./microsoft365.service");
|
|
5
|
+
describe('Microsoft365Service', () => {
|
|
6
|
+
let service;
|
|
7
|
+
beforeEach(async () => {
|
|
8
|
+
const module = await testing_1.Test.createTestingModule({
|
|
9
|
+
providers: [microsoft365_service_1.Microsoft365Service],
|
|
10
|
+
}).compile();
|
|
11
|
+
service = module.get(microsoft365_service_1.Microsoft365Service);
|
|
12
|
+
});
|
|
13
|
+
it('should be defined', () => {
|
|
14
|
+
expect(service).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=microsoft365.service.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"microsoft365.service.spec.js","sourceRoot":"","sources":["../../src/microsoft365/microsoft365.service.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,iEAA6D;AAE7D,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,IAAI,OAA4B,CAAC;IAEjC,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,SAAS,EAAE,CAAC,0CAAmB,CAAC;SACjC,CAAC,CAAC,OAAO,EAAE,CAAC;QAEb,OAAO,GAAG,MAAM,CAAC,GAAG,CAAsB,0CAAmB,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
exports.default = void 0;
|
|
18
|
+
__exportStar(require("./microsoft365"), exports);
|
|
19
|
+
__exportStar(require("./sharepoint"), exports);
|
|
20
|
+
var sharepoint_module_1 = require("./sharepoint/sharepoint.module");
|
|
21
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return sharepoint_module_1.SharepointModule; } });
|
|
22
|
+
//# sourceMappingURL=plugin.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.module.js","sourceRoot":"","sources":["../src/plugin.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,+CAA6B;AAE7B,oEAA6E;AAApE,4GAAA,gBAAgB,OAAW"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./sharepoint.controller"), exports);
|
|
18
|
+
__exportStar(require("./sharepoint.module"), exports);
|
|
19
|
+
__exportStar(require("./sharepoint.service"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sharepoint/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,sDAAoC;AACpC,uDAAqC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SharepointController = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
let SharepointController = class SharepointController {
|
|
12
|
+
};
|
|
13
|
+
SharepointController = __decorate([
|
|
14
|
+
(0, common_1.Controller)('sharepoint')
|
|
15
|
+
], SharepointController);
|
|
16
|
+
exports.SharepointController = SharepointController;
|
|
17
|
+
//# sourceMappingURL=sharepoint.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharepoint.controller.js","sourceRoot":"","sources":["../../src/sharepoint/sharepoint.controller.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAAG,CAAA;AAAvB,oBAAoB;IADhC,IAAA,mBAAU,EAAC,YAAY,CAAC;GACZ,oBAAoB,CAAG;AAAvB,oDAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const testing_1 = require("@nestjs/testing");
|
|
4
|
+
const sharepoint_controller_1 = require("./sharepoint.controller");
|
|
5
|
+
describe('SharepointController', () => {
|
|
6
|
+
let controller;
|
|
7
|
+
beforeEach(async () => {
|
|
8
|
+
const module = await testing_1.Test.createTestingModule({
|
|
9
|
+
controllers: [sharepoint_controller_1.SharepointController],
|
|
10
|
+
}).compile();
|
|
11
|
+
controller = module.get(sharepoint_controller_1.SharepointController);
|
|
12
|
+
});
|
|
13
|
+
it('should be defined', () => {
|
|
14
|
+
expect(controller).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=sharepoint.controller.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharepoint.controller.spec.js","sourceRoot":"","sources":["../../src/sharepoint/sharepoint.controller.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,mEAA+D;AAE/D,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,IAAI,UAAgC,CAAC;IAErC,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,WAAW,EAAE,CAAC,4CAAoB,CAAC;SACpC,CAAC,CAAC,OAAO,EAAE,CAAC;QAEb,UAAU,GAAG,MAAM,CAAC,GAAG,CAAuB,4CAAoB,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SharepointModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const sharepoint_service_1 = require("./sharepoint.service");
|
|
12
|
+
const sharepoint_controller_1 = require("./sharepoint.controller");
|
|
13
|
+
let SharepointModule = class SharepointModule {
|
|
14
|
+
};
|
|
15
|
+
SharepointModule = __decorate([
|
|
16
|
+
(0, common_1.Module)({
|
|
17
|
+
providers: [sharepoint_service_1.SharepointService],
|
|
18
|
+
controllers: [sharepoint_controller_1.SharepointController]
|
|
19
|
+
})
|
|
20
|
+
], SharepointModule);
|
|
21
|
+
exports.SharepointModule = SharepointModule;
|
|
22
|
+
//# sourceMappingURL=sharepoint.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharepoint.module.js","sourceRoot":"","sources":["../../src/sharepoint/sharepoint.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6DAAyD;AACzD,mEAA+D;AAMxD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,gBAAgB;IAJ5B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,sCAAiB,CAAC;QAC9B,WAAW,EAAE,CAAC,4CAAoB,CAAC;KACpC,CAAC;GACW,gBAAgB,CAAG;AAAnB,4CAAgB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SharepointService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
let SharepointService = class SharepointService {
|
|
12
|
+
};
|
|
13
|
+
SharepointService = __decorate([
|
|
14
|
+
(0, common_1.Injectable)()
|
|
15
|
+
], SharepointService);
|
|
16
|
+
exports.SharepointService = SharepointService;
|
|
17
|
+
//# sourceMappingURL=sharepoint.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharepoint.service.js","sourceRoot":"","sources":["../../src/sharepoint/sharepoint.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAAG;AAApB,8CAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const testing_1 = require("@nestjs/testing");
|
|
4
|
+
const sharepoint_service_1 = require("./sharepoint.service");
|
|
5
|
+
describe('SharepointService', () => {
|
|
6
|
+
let service;
|
|
7
|
+
beforeEach(async () => {
|
|
8
|
+
const module = await testing_1.Test.createTestingModule({
|
|
9
|
+
providers: [sharepoint_service_1.SharepointService],
|
|
10
|
+
}).compile();
|
|
11
|
+
service = module.get(sharepoint_service_1.SharepointService);
|
|
12
|
+
});
|
|
13
|
+
it('should be defined', () => {
|
|
14
|
+
expect(service).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=sharepoint.service.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharepoint.service.spec.js","sourceRoot":"","sources":["../../src/sharepoint/sharepoint.service.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,6DAAyD;AAEzD,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,IAAI,OAA0B,CAAC;IAE/B,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,SAAS,EAAE,CAAC,sCAAiB,CAAC;SAC/B,CAAC,CAAC,OAAO,EAAE,CAAC;QAEb,OAAO,GAAG,MAAM,CAAC,GAAG,CAAoB,sCAAiB,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@builder6/sharepoint",
|
|
3
|
+
"version": "0.11.0",
|
|
4
|
+
"main": "dist/plugin.module.js",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
11
|
+
"build": "rimraf dist && tsc",
|
|
12
|
+
"build:watch": "rimraf dist && tsc --watch"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@builder6/core": "^0.11.0",
|
|
16
|
+
"@builder6/files": "^0.11.0",
|
|
17
|
+
"nodemailer": "^6.9.16"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"gitHead": "326edca00fb364840c163d523ca7a700e48500d2"
|
|
23
|
+
}
|