@smartsoft001/fb 2.148.0 → 2.150.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/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@smartsoft001/fb",
3
- "version": "2.148.0",
3
+ "version": "2.150.0",
4
+ "type": "commonjs",
5
+ "main": "./src/index.js",
6
+ "typings": "./src/index.d.ts",
4
7
  "publishConfig": {
5
8
  "access": "public"
6
9
  },
@@ -14,5 +17,6 @@
14
17
  "bugs": {
15
18
  "url": "https://github.com/emiljuchnikowski/smartsoft/issues"
16
19
  },
17
- "homepage": "https://github.com/emiljuchnikowski/smartsoft#readme"
20
+ "homepage": "https://github.com/emiljuchnikowski/smartsoft#readme",
21
+ "types": "./src/index.d.ts"
18
22
  }
package/src/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/fb.service"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/shared/fb/src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FbService = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const axios_1 = require("@nestjs/axios");
6
+ const common_1 = require("@nestjs/common");
7
+ let FbService = class FbService {
8
+ http;
9
+ constructor(http) {
10
+ this.http = http;
11
+ }
12
+ async getUserId(token) {
13
+ const { data } = await this.http
14
+ .get('https://graph.facebook.com/me?access_token=' + token)
15
+ .toPromise();
16
+ return data.id;
17
+ }
18
+ async getData(token) {
19
+ const { data } = await this.http
20
+ .get('https://graph.facebook.com/me?fields=email,id&access_token=' + token)
21
+ .toPromise();
22
+ return data;
23
+ }
24
+ };
25
+ exports.FbService = FbService;
26
+ exports.FbService = FbService = tslib_1.__decorate([
27
+ (0, common_1.Injectable)(),
28
+ tslib_1.__metadata("design:paramtypes", [axios_1.HttpService])
29
+ ], FbService);
30
+ //# sourceMappingURL=fb.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fb.service.js","sourceRoot":"","sources":["../../../../../../packages/shared/fb/src/lib/fb.service.ts"],"names":[],"mappings":";;;;AAAA,yCAA4C;AAC5C,2CAA4C;AAGrC,IAAM,SAAS,GAAf,MAAM,SAAS;IACA;IAApB,YAAoB,IAAiB;QAAjB,SAAI,GAAJ,IAAI,CAAa;IAAG,CAAC;IAEzC,KAAK,CAAC,SAAS,CAAC,KAAa;QAC3B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI;aAC7B,GAAG,CAAC,6CAA6C,GAAG,KAAK,CAAC;aAC1D,SAAS,EAAE,CAAC;QAEf,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAAa;QACzB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI;aAC7B,GAAG,CACF,6DAA6D,GAAG,KAAK,CACtE;aACA,SAAS,EAAE,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AApBY,8BAAS;oBAAT,SAAS;IADrB,IAAA,mBAAU,GAAE;6CAEe,mBAAW;GAD1B,SAAS,CAoBrB"}
package/test-setup.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=test-setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.js","sourceRoot":"","sources":["../../../../packages/shared/fb/test-setup.ts"],"names":[],"mappings":""}
package/index.js DELETED
@@ -1,35 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __decorateClass = (decorators, target, key, kind) => {
4
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
- if (decorator = decorators[i])
7
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
- if (kind && result) __defProp(target, key, result);
9
- return result;
10
- };
11
-
12
- // packages/shared/fb/src/lib/fb.service.ts
13
- import { Injectable } from "@nestjs/common";
14
- var FbService = class {
15
- constructor(http) {
16
- this.http = http;
17
- }
18
- http;
19
- async getUserId(token) {
20
- const { data } = await this.http.get("https://graph.facebook.com/me?access_token=" + token).toPromise();
21
- return data.id;
22
- }
23
- async getData(token) {
24
- const { data } = await this.http.get(
25
- "https://graph.facebook.com/me?fields=email,id&access_token=" + token
26
- ).toPromise();
27
- return data;
28
- }
29
- };
30
- FbService = __decorateClass([
31
- Injectable()
32
- ], FbService);
33
- export {
34
- FbService
35
- };