@venturialstd/bitbucket 0.0.2 → 0.0.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"bitbucket.module.d.ts","sourceRoot":"","sources":["../src/bitbucket.module.ts"],"names":[],"mappings":"AAMA,qBAMa,eAAe;CAAG"}
1
+ {"version":3,"file":"bitbucket.module.d.ts","sourceRoot":"","sources":["../src/bitbucket.module.ts"],"names":[],"mappings":"AAKA,qBAKa,eAAe;CAAG"}
@@ -10,7 +10,6 @@ exports.BitbucketModule = void 0;
10
10
  const axios_1 = require("@nestjs/axios");
11
11
  const common_1 = require("@nestjs/common");
12
12
  const core_1 = require("@venturialstd/core");
13
- const bitbucket_oauth_controller_1 = require("./controllers/bitbucket-oauth.controller");
14
13
  const bitbucket_oauth_service_1 = require("./services/bitbucket-oauth.service");
15
14
  let BitbucketModule = class BitbucketModule {
16
15
  };
@@ -18,7 +17,6 @@ exports.BitbucketModule = BitbucketModule;
18
17
  exports.BitbucketModule = BitbucketModule = __decorate([
19
18
  (0, common_1.Module)({
20
19
  imports: [axios_1.HttpModule, core_1.AppLoggerModule, core_1.SettingsModule],
21
- controllers: [bitbucket_oauth_controller_1.BitbucketOAuthController],
22
20
  providers: [bitbucket_oauth_service_1.BitbucketOAuthService],
23
21
  exports: [bitbucket_oauth_service_1.BitbucketOAuthService],
24
22
  })
@@ -1 +1 @@
1
- {"version":3,"file":"bitbucket.module.js","sourceRoot":"","sources":["../src/bitbucket.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yCAA2C;AAC3C,2CAAwC;AACxC,6CAAqE;AAErE,yFAAoF;AACpF,gFAA2E;AAOpE,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAN3B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,kBAAU,EAAE,sBAAe,EAAE,qBAAc,CAAC;QACtD,WAAW,EAAE,CAAC,qDAAwB,CAAC;QACvC,SAAS,EAAE,CAAC,+CAAqB,CAAC;QAClC,OAAO,EAAE,CAAC,+CAAqB,CAAC;KACjC,CAAC;GACW,eAAe,CAAG"}
1
+ {"version":3,"file":"bitbucket.module.js","sourceRoot":"","sources":["../src/bitbucket.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yCAA2C;AAC3C,2CAAwC;AACxC,6CAAqE;AAErE,gFAA2E;AAMpE,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAL3B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,kBAAU,EAAE,sBAAe,EAAE,qBAAc,CAAC;QACtD,SAAS,EAAE,CAAC,+CAAqB,CAAC;QAClC,OAAO,EAAE,CAAC,+CAAqB,CAAC;KACjC,CAAC;GACW,eAAe,CAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venturialstd/bitbucket",
3
- "version": "0.0.2",
3
+ "version": "0.0.5",
4
4
  "description": "Bitbucket API Venturial",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,19 +0,0 @@
1
- import { BitbucketOAuthService } from '../services/bitbucket-oauth.service';
2
- export declare class BitbucketOAuthController {
3
- private readonly bitbucketOAuth;
4
- constructor(bitbucketOAuth: BitbucketOAuthService);
5
- exchangeCode(body: {
6
- code: string;
7
- }): Promise<{
8
- error: string;
9
- access_token?: undefined;
10
- refresh_token?: undefined;
11
- expires_in?: undefined;
12
- } | {
13
- access_token: any;
14
- refresh_token: any;
15
- expires_in: any;
16
- error?: undefined;
17
- }>;
18
- }
19
- //# sourceMappingURL=bitbucket-oauth.controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bitbucket-oauth.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/bitbucket-oauth.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,qBACa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,qBAAqB;IAI5D,YAAY,CAAS,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;CAalD"}
@@ -1,48 +0,0 @@
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.BitbucketOAuthController = void 0;
16
- const common_1 = require("@nestjs/common");
17
- const bitbucket_oauth_service_1 = require("../services/bitbucket-oauth.service");
18
- let BitbucketOAuthController = class BitbucketOAuthController {
19
- bitbucketOAuth;
20
- constructor(bitbucketOAuth) {
21
- this.bitbucketOAuth = bitbucketOAuth;
22
- }
23
- async exchangeCode(body) {
24
- if (!body.code) {
25
- return { error: 'Missing code' };
26
- }
27
- const token = await this.bitbucketOAuth.exchangeCode(body.code);
28
- return {
29
- access_token: token.access_token,
30
- refresh_token: token.refresh_token,
31
- expires_in: token.expires_in,
32
- };
33
- }
34
- };
35
- exports.BitbucketOAuthController = BitbucketOAuthController;
36
- __decorate([
37
- (0, common_1.Post)('exchange'),
38
- (0, common_1.HttpCode)(common_1.HttpStatus.OK),
39
- __param(0, (0, common_1.Body)()),
40
- __metadata("design:type", Function),
41
- __metadata("design:paramtypes", [Object]),
42
- __metadata("design:returntype", Promise)
43
- ], BitbucketOAuthController.prototype, "exchangeCode", null);
44
- exports.BitbucketOAuthController = BitbucketOAuthController = __decorate([
45
- (0, common_1.Controller)('auth/bitbucket'),
46
- __metadata("design:paramtypes", [bitbucket_oauth_service_1.BitbucketOAuthService])
47
- ], BitbucketOAuthController);
48
- //# sourceMappingURL=bitbucket-oauth.controller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bitbucket-oauth.controller.js","sourceRoot":"","sources":["../../src/controllers/bitbucket-oauth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA8E;AAE9E,iFAA4E;AAGrE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACN;IAA7B,YAA6B,cAAqC;QAArC,mBAAc,GAAd,cAAc,CAAuB;IAAG,CAAC;IAIhE,AAAN,KAAK,CAAC,YAAY,CAAS,IAAsB;QAC/C,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;QACnC,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEhE,OAAO;YACL,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAC;IACJ,CAAC;CACF,CAAA;AAlBY,4DAAwB;AAK7B;IAFL,IAAA,aAAI,EAAC,UAAU,CAAC;IAChB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACJ,WAAA,IAAA,aAAI,GAAE,CAAA;;;;4DAYzB;mCAjBU,wBAAwB;IADpC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;qCAEkB,+CAAqB;GADvD,wBAAwB,CAkBpC"}