@infrab4a/connect-nestjs 2.3.4-alpha.0 → 2.3.4-alpha.1
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/index.cjs.js +9 -13
- package/index.esm.js +3 -1
- package/package.json +6 -4
package/index.cjs.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var elasticsearch = require('@elastic/elasticsearch');
|
|
6
4
|
var connect = require('@infrab4a/connect');
|
|
7
5
|
var common = require('@nestjs/common');
|
|
@@ -11,10 +9,6 @@ var discoveryengine = require('@google-cloud/discoveryengine');
|
|
|
11
9
|
var v1beta = require('@google-cloud/discoveryengine/build/src/v1beta');
|
|
12
10
|
var nestjsFirebase = require('nestjs-firebase');
|
|
13
11
|
|
|
14
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
-
|
|
16
|
-
var pagarme__default = /*#__PURE__*/_interopDefaultLegacy(pagarme);
|
|
17
|
-
|
|
18
12
|
const ES_CONFIG = 'ES_CONFIG';
|
|
19
13
|
|
|
20
14
|
const HASURA_OPTIONS = 'HASURA_OPTIONS';
|
|
@@ -37,6 +31,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
37
31
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
38
32
|
PERFORMANCE OF THIS SOFTWARE.
|
|
39
33
|
***************************************************************************** */
|
|
34
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
35
|
+
|
|
40
36
|
|
|
41
37
|
function __decorate(decorators, target, key, desc) {
|
|
42
38
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -307,7 +303,7 @@ class PagarmeBankSlipAPIAdapter {
|
|
|
307
303
|
}
|
|
308
304
|
async pay(checkout) {
|
|
309
305
|
try {
|
|
310
|
-
const client = await
|
|
306
|
+
const client = await pagarme.client.connect({ api_key: this.credentials.API_KEY });
|
|
311
307
|
const payload = this.createBoletoPayment(checkout);
|
|
312
308
|
const result = await client.transactions.create(payload);
|
|
313
309
|
console.warn('[PAGARME BOLETO DATA TO SEND]', payload);
|
|
@@ -341,7 +337,7 @@ class PagarmeBankSlipAPIAdapter {
|
|
|
341
337
|
}
|
|
342
338
|
async getBoletoTransaction(paymentId) {
|
|
343
339
|
try {
|
|
344
|
-
const client = await
|
|
340
|
+
const client = await pagarme.client.connect({ api_key: this.credentials.API_KEY });
|
|
345
341
|
const result = await client.transactions.find({ id: paymentId });
|
|
346
342
|
return result;
|
|
347
343
|
}
|
|
@@ -395,7 +391,7 @@ class PagarmeCardAPIAdapter {
|
|
|
395
391
|
}
|
|
396
392
|
}
|
|
397
393
|
async createPagarmeClient() {
|
|
398
|
-
return await
|
|
394
|
+
return await pagarme.client.connect({ api_key: this.credentials.API_KEY });
|
|
399
395
|
}
|
|
400
396
|
async executeCardTransaction(client, checkout, card) {
|
|
401
397
|
const payload = this.createCardPayment(checkout, card);
|
|
@@ -450,7 +446,7 @@ class PagarmeCardAPIAdapter {
|
|
|
450
446
|
}
|
|
451
447
|
async addCard(card) {
|
|
452
448
|
try {
|
|
453
|
-
const client = await
|
|
449
|
+
const client = await pagarme.client.connect({ api_key: this.credentials.API_KEY });
|
|
454
450
|
const result = await client.cards.create({
|
|
455
451
|
card_number: card.number,
|
|
456
452
|
card_expiration_date: card.expirationDate.replace('/', ''),
|
|
@@ -477,7 +473,7 @@ class PagarmeCardAPIAdapter {
|
|
|
477
473
|
}
|
|
478
474
|
async getCardByToken(id) {
|
|
479
475
|
try {
|
|
480
|
-
const client = await
|
|
476
|
+
const client = await pagarme.client.connect({ api_key: this.credentials.API_KEY });
|
|
481
477
|
const result = await client.cards.find({
|
|
482
478
|
id,
|
|
483
479
|
});
|
|
@@ -491,7 +487,7 @@ class PagarmeCardAPIAdapter {
|
|
|
491
487
|
}
|
|
492
488
|
async createTransaction(data) {
|
|
493
489
|
try {
|
|
494
|
-
const client = await
|
|
490
|
+
const client = await pagarme.client.connect({ api_key: this.credentials.API_KEY });
|
|
495
491
|
const result = await client.transactions.create(data);
|
|
496
492
|
return result;
|
|
497
493
|
}
|
|
@@ -559,7 +555,7 @@ class PagarmePixAPIAdapter {
|
|
|
559
555
|
}
|
|
560
556
|
async pay(checkout) {
|
|
561
557
|
try {
|
|
562
|
-
const client = await
|
|
558
|
+
const client = await pagarme.client.connect({ api_key: this.credentials.API_KEY });
|
|
563
559
|
const payload = this.createPixPayment(checkout);
|
|
564
560
|
const result = await client.transactions.create(payload);
|
|
565
561
|
console.warn('[PAGARME PIX DATA TO SEND]', payload);
|
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from '@elastic/elasticsearch';
|
|
2
|
-
import { DebugHelper, isEmpty, NotFoundError, PagarmePaymentStatus, PaymentError, BusinessError, format, addDays, PaymentProviders, Shops, ProductsIndex, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository,
|
|
2
|
+
import { DebugHelper, isEmpty, NotFoundError, PagarmePaymentStatus, PaymentError, BusinessError, format, addDays, PaymentProviders, Shops, ProductsIndex, CategoryFirestoreRepository, ProductFirestoreRepository, ProductVariantFirestoreRepository, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, GroupFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, OrderBlockedFirestoreRepository, LogFirestoreRepository, SequenceFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, ProductReviewHasuraGraphQLRepository, VariantHasuraGraphQLRepository, ProductStockNotificationHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, CategoryProductHasuraGraphQLRepository, ProductErrorsHasuraGraphQLRepository, ProductsVertexSearch, isNil } from '@infrab4a/connect';
|
|
3
3
|
import { Injectable, Inject, Module } from '@nestjs/common';
|
|
4
4
|
import { Firestore } from 'firebase-admin/firestore';
|
|
5
5
|
import pagarme from 'pagarme';
|
|
@@ -29,6 +29,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
29
29
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
30
30
|
PERFORMANCE OF THIS SOFTWARE.
|
|
31
31
|
***************************************************************************** */
|
|
32
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
33
|
+
|
|
32
34
|
|
|
33
35
|
function __decorate(decorators, target, key, desc) {
|
|
34
36
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infrab4a/connect-nestjs",
|
|
3
|
-
"version": "2.3.4-alpha.
|
|
3
|
+
"version": "2.3.4-alpha.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "https://github.com/B4AGroup/b4a-firebase-libs"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@infrab4a/connect": "5.4.0-alpha.
|
|
12
|
+
"@infrab4a/connect": "5.4.0-alpha.1",
|
|
13
13
|
"@nestjs/common": "^10.3.3",
|
|
14
14
|
"@nestjs/core": "^10.3.3",
|
|
15
15
|
"firebase-admin": "^12.0.0"
|
|
@@ -24,10 +24,12 @@
|
|
|
24
24
|
"./package.json": "./package.json",
|
|
25
25
|
".": {
|
|
26
26
|
"module": "./index.esm.js",
|
|
27
|
+
"types": "./index.esm.d.ts",
|
|
27
28
|
"import": "./index.cjs.mjs",
|
|
28
29
|
"default": "./index.cjs.js"
|
|
29
30
|
}
|
|
30
31
|
},
|
|
31
32
|
"module": "./index.esm.js",
|
|
32
|
-
"main": "./index.cjs.js"
|
|
33
|
-
|
|
33
|
+
"main": "./index.cjs.js",
|
|
34
|
+
"types": "./index.esm.d.ts"
|
|
35
|
+
}
|