@accon/connect 0.8.0 → 0.8.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/.idea/codeStyles/Project.xml +5 -0
- package/.idea/codeStyles/codeStyleConfig.xml +1 -1
- package/.idea/inspectionProfiles/Project_Default.xml +5 -0
- package/dist/core/interfaces/webhook-input-integration.interface.d.ts +1 -1
- package/dist/core/types/flags.type.d.ts +1 -0
- package/dist/core/types/flags.type.js +1 -0
- package/dist/core/types/flags.type.js.map +1 -1
- package/dist/logistics/voa-delivery/dto/create-voa-delivery-order.dto.d.ts +1 -1
- package/dist/logistics/voa-delivery/dto/create-voa-delivery-order.dto.js.map +1 -1
- package/dist/order/saipos/dto/create-order.dto.d.ts +1 -1
- package/dist/order/saipos/dto/create-order.dto.js.map +1 -1
- package/dist/order/saipos/saipos.order-output.d.ts +8 -8
- package/dist/order/saipos/saipos.order-output.js +11 -12
- package/dist/order/saipos/saipos.order-output.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<component name="ProjectCodeStyleConfiguration">
|
|
2
2
|
<code_scheme name="Project" version="173">
|
|
3
|
+
<option name="DO_NOT_FORMAT">
|
|
4
|
+
<list>
|
|
5
|
+
<fileSet type="globPattern" pattern="migrations/*" />
|
|
6
|
+
</list>
|
|
7
|
+
</option>
|
|
3
8
|
<HTMLCodeStyleSettings>
|
|
4
9
|
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
5
10
|
</HTMLCodeStyleSettings>
|
|
@@ -2,5 +2,10 @@
|
|
|
2
2
|
<profile version="1.0">
|
|
3
3
|
<option name="myName" value="Project Default" />
|
|
4
4
|
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
5
|
+
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
|
6
|
+
<option name="processCode" value="true" />
|
|
7
|
+
<option name="processLiterals" value="true" />
|
|
8
|
+
<option name="processComments" value="true" />
|
|
9
|
+
</inspection_tool>
|
|
5
10
|
</profile>
|
|
6
11
|
</component>
|
|
@@ -2,6 +2,6 @@ export type WebhookCallbackEntity = 'IntegrationEvent' | 'OrderEvent';
|
|
|
2
2
|
export type WebhookCallbackAction = 'create' | 'read' | 'update' | 'delete';
|
|
3
3
|
export type WebhookCallback = (entity: WebhookCallbackEntity, action: WebhookCallbackAction, payload: unknown) => Promise<void>;
|
|
4
4
|
export interface WebhookInputIntegration<B = unknown, Q = Record<string, unknown>, H = Record<string, string | string[]>> {
|
|
5
|
-
readonly usesWebhook:
|
|
5
|
+
readonly usesWebhook: boolean;
|
|
6
6
|
onWebhookData(callback: WebhookCallback, body: B, queryParams?: Q, headers?: H): Promise<void>;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flags.type.js","sourceRoot":"","sources":["../../../lib/core/types/flags.type.ts"],"names":[],"mappings":";;;AAAA,MAAa,KAAK;IAChB,qBAAqB,CAAY;
|
|
1
|
+
{"version":3,"file":"flags.type.js","sourceRoot":"","sources":["../../../lib/core/types/flags.type.ts"],"names":[],"mappings":";;;AAAA,MAAa,KAAK;IAChB,qBAAqB,CAAY;IACjC,sBAAsB,CAAY;CACnC;AAHD,sBAGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-voa-delivery-order.dto.js","sourceRoot":"","sources":["../../../../lib/logistics/voa-delivery/dto/create-voa-delivery-order.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IACzB,WAAW,CAAS;IACpB,UAAU,CAAU;IACpB,QAAQ,CAGN;IACF,OAAO,CAaL;IACF,OAAO,CAIL;IACF,MAAM,CAAmB;IACzB,aAAa,
|
|
1
|
+
{"version":3,"file":"create-voa-delivery-order.dto.js","sourceRoot":"","sources":["../../../../lib/logistics/voa-delivery/dto/create-voa-delivery-order.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IACzB,WAAW,CAAS;IACpB,UAAU,CAAU;IACpB,QAAQ,CAGN;IACF,OAAO,CAaL;IACF,OAAO,CAIL;IACF,MAAM,CAAmB;IACzB,aAAa,CAAU;CACxB;AA5BD,wCA4BC;AAED,MAAa,SAAS;IACpB,MAAM,CAAS;IACf,SAAS,CAAS;IAClB,OAAO,CAAS;CACjB;AAJD,8BAIC;AAED,MAAa,SAAS;IACpB,KAAK,CAAS;IACd,MAAM,CAAoC;IAC1C,IAAI,CAAuB;IAC3B,IAAI,CAEF;CACH;AAPD,8BAOC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-order.dto.js","sourceRoot":"","sources":["../../../../lib/order/saipos/dto/create-order.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,kBAAkB;IAC7B,OAAO,CAAO;IACd,KAAK,CAAS;IACd,IAAI,CAAS;IACb,QAAQ,CAAS;IACjB,WAAW,CAAS;IACpB,aAAa,CAAS;IACtB,WAAW,CAAS;IACpB,SAAS,CAAU;IACnB,UAAU,CAAU;IACpB,WAAW,CAGT;CACH;AAdD,gDAcC;AAWD,MAAa,cAAc;IACzB,IAAI,CAAkB;IACtB,MAAM,CAAS;IACf,UAAU,CAAS;IACnB,UAAU,
|
|
1
|
+
{"version":3,"file":"create-order.dto.js","sourceRoot":"","sources":["../../../../lib/order/saipos/dto/create-order.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,kBAAkB;IAC7B,OAAO,CAAO;IACd,KAAK,CAAS;IACd,IAAI,CAAS;IACb,QAAQ,CAAS;IACjB,WAAW,CAAS;IACpB,aAAa,CAAS;IACtB,WAAW,CAAS;IACpB,SAAS,CAAU;IACnB,UAAU,CAAU;IACpB,WAAW,CAGT;CACH;AAdD,gDAcC;AAWD,MAAa,cAAc;IACzB,IAAI,CAAkB;IACtB,MAAM,CAAS;IACf,UAAU,CAAS;IACnB,UAAU,CAAU;IACpB,IAAI,CAAuB;CAC5B;AAND,wCAMC;AAED,MAAa,SAAS;IACpB,gBAAgB,CAAS;IACzB,gBAAgB,CAAS;IACzB,eAAe,CAAS;IACxB,QAAQ,CAAS;IACjB,KAAK,CAAU;CAChB;AAND,8BAMC;AAED,MAAa,OAAO;IAClB,gBAAgB,CAAS;IACzB,SAAS,CAAS;IAClB,QAAQ,CAAS;IACjB,UAAU,CAAS;IACnB,KAAK,CAAU;IACf,YAAY,CAAmB;CAChC;AAPD,0BAOC;AAED,MAAa,cAAc;IACzB,QAAQ,CAAS;IACjB,UAAU,CAAS;IACnB,SAAS,CAAS;IAClB,UAAU,CAAS;IACnB,cAAc,CAAS;IACvB,YAAY,CAAS;IACrB,QAAQ,CAIN;IACF,YAAY,CAMV;IACF,KAAK,CAAiB;IACtB,aAAa,CAAwB;IACrC,gBAAgB,CAAsB;CACvC;AAtBD,wCAsBC"}
|
|
@@ -4,24 +4,24 @@ import { HttpService } from '@nestjs/axios';
|
|
|
4
4
|
import { CreateOrderDto, ItemDto, PaymentTypeDto } from './dto/create-order.dto';
|
|
5
5
|
import { WebhookBodyDto } from './dto/webhook-body.dto';
|
|
6
6
|
import { WebhookCallback, WebhookInputIntegration } from '../../core/interfaces/webhook-input-integration.interface';
|
|
7
|
+
import { Flags } from '../../core/types/flags.type';
|
|
7
8
|
export declare class SaiposOrderOutput implements OrderOutputIntegration<SaiposConfig>, WebhookInputIntegration<WebhookBodyDto> {
|
|
8
9
|
readonly eventsService: EventsService;
|
|
9
10
|
private readonly httpService;
|
|
10
11
|
private readonly logger;
|
|
11
|
-
private readonly SAIPOS_BASE_URL
|
|
12
|
-
private readonly SAIPOS_SECRET
|
|
12
|
+
private readonly SAIPOS_BASE_URL?;
|
|
13
|
+
private readonly SAIPOS_SECRET?;
|
|
13
14
|
private readonly ALLOWED_ORDER_TYPES;
|
|
14
15
|
private readonly dispatchEvent;
|
|
15
|
-
usesWebhook:
|
|
16
|
+
usesWebhook: boolean;
|
|
16
17
|
constructor(eventsService: EventsService, httpService: HttpService);
|
|
17
|
-
authenticate(idPartner: string): Promise<
|
|
18
|
+
authenticate(idPartner: string): Promise<string>;
|
|
18
19
|
onOrderCreated(payload: IntegrationPayload, config: SaiposConfig): Promise<void>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
transformPayment(order: Order): Array<PaymentTypeDto>;
|
|
20
|
+
onOrderCanceled(payload: IntegrationPayload, config: SaiposConfig): Promise<void>;
|
|
21
|
+
transformPayment(order: Order, externalPaymentCodes?: string[]): Array<PaymentTypeDto>;
|
|
22
22
|
transformItems(order: Order): Array<ItemDto>;
|
|
23
23
|
getDeliveryDateTime(order: Order): string;
|
|
24
|
-
transformOrder(order: Order): CreateOrderDto;
|
|
24
|
+
transformOrder(order: Order, flags?: Flags): CreateOrderDto;
|
|
25
25
|
private transformEvent;
|
|
26
26
|
onWebhookData(callback: WebhookCallback, body: WebhookBodyDto): Promise<void>;
|
|
27
27
|
}
|
|
@@ -32,8 +32,9 @@ let SaiposOrderOutput = SaiposOrderOutput_1 = class SaiposOrderOutput {
|
|
|
32
32
|
this.eventsService = eventsService;
|
|
33
33
|
this.httpService = httpService;
|
|
34
34
|
this.SAIPOS_SECRET = process.env.SAIPOS_SECRET;
|
|
35
|
-
if (!this.SAIPOS_SECRET)
|
|
35
|
+
if (!this.SAIPOS_SECRET) {
|
|
36
36
|
this.logger.error('SAIPOS_SECRET não fornecido via ambiente');
|
|
37
|
+
}
|
|
37
38
|
this.SAIPOS_BASE_URL =
|
|
38
39
|
process.env.SAIPOS_BASE_URL || 'https://order-api.saipos.com';
|
|
39
40
|
this.dispatchEvent = eventsService.createDispatcherFor('Saipos', 'OrderOutput');
|
|
@@ -47,7 +48,7 @@ let SaiposOrderOutput = SaiposOrderOutput_1 = class SaiposOrderOutput {
|
|
|
47
48
|
}
|
|
48
49
|
async onOrderCreated(payload, config) {
|
|
49
50
|
this.logger.verbose('onOrderCreated: iniciando integração');
|
|
50
|
-
const { order } = payload;
|
|
51
|
+
const { order, flags } = payload;
|
|
51
52
|
if (!this.ALLOWED_ORDER_TYPES.includes(order.type)) {
|
|
52
53
|
this.logger.verbose(`Ignorando tipo de pedido não permitido: ${order.type} [${this.ALLOWED_ORDER_TYPES.join(',')}]`);
|
|
53
54
|
return;
|
|
@@ -62,7 +63,7 @@ let SaiposOrderOutput = SaiposOrderOutput_1 = class SaiposOrderOutput {
|
|
|
62
63
|
orderId,
|
|
63
64
|
});
|
|
64
65
|
try {
|
|
65
|
-
const body = this.transformOrder(order);
|
|
66
|
+
const body = this.transformOrder(order, flags);
|
|
66
67
|
const token = await this.authenticate(config.idPartner);
|
|
67
68
|
if (!token) {
|
|
68
69
|
throw new Error('Não foi possível autenticar com a Saipos');
|
|
@@ -100,9 +101,6 @@ let SaiposOrderOutput = SaiposOrderOutput_1 = class SaiposOrderOutput {
|
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
|
-
async onOrderUpdated(payload, config) {
|
|
104
|
-
throw new Error('Method not implemented.');
|
|
105
|
-
}
|
|
106
104
|
async onOrderCanceled(payload, config) {
|
|
107
105
|
this.logger.verbose('onOrderCanceled: iniciando integração');
|
|
108
106
|
const { order } = payload;
|
|
@@ -124,7 +122,7 @@ let SaiposOrderOutput = SaiposOrderOutput_1 = class SaiposOrderOutput {
|
|
|
124
122
|
if (!token) {
|
|
125
123
|
throw new Error('Não foi possível autenticar com a Saipos');
|
|
126
124
|
}
|
|
127
|
-
const { data } = await (0, rxjs_1.firstValueFrom)(this.httpService.post(`${this.SAIPOS_BASE_URL}/cancel-order`, { order_id: order.id, cod_store:
|
|
125
|
+
const { data } = await (0, rxjs_1.firstValueFrom)(this.httpService.post(`${this.SAIPOS_BASE_URL}/cancel-order`, { order_id: order.id, cod_store: order.merchant?.id }, {
|
|
128
126
|
headers: {
|
|
129
127
|
Authorization: token,
|
|
130
128
|
},
|
|
@@ -156,8 +154,8 @@ let SaiposOrderOutput = SaiposOrderOutput_1 = class SaiposOrderOutput {
|
|
|
156
154
|
}
|
|
157
155
|
}
|
|
158
156
|
}
|
|
159
|
-
transformPayment(order) {
|
|
160
|
-
return order.payments.methods.map((method) => {
|
|
157
|
+
transformPayment(order, externalPaymentCodes) {
|
|
158
|
+
return order.payments.methods.map((method, index) => {
|
|
161
159
|
let code;
|
|
162
160
|
switch (method.method) {
|
|
163
161
|
case 'CREDIT':
|
|
@@ -193,12 +191,13 @@ let SaiposOrderOutput = SaiposOrderOutput_1 = class SaiposOrderOutput {
|
|
|
193
191
|
if (!code) {
|
|
194
192
|
throw new core_1.InvalidOrderException(`Forma de pagamento inválida: ${method.method}`, 'payments');
|
|
195
193
|
}
|
|
194
|
+
const externalCode = externalPaymentCodes?.[index] || undefined;
|
|
196
195
|
return {
|
|
197
196
|
code,
|
|
198
197
|
amount: method.value,
|
|
199
198
|
change_for: method.changeFor || 0,
|
|
200
199
|
type: method.type === 'PREPAID' ? 'ONLINE' : 'OFFLINE',
|
|
201
|
-
complement: method.method === 'PIX' ? 'pix' :
|
|
200
|
+
complement: method.method === 'PIX' ? 'pix' : externalCode,
|
|
202
201
|
};
|
|
203
202
|
});
|
|
204
203
|
}
|
|
@@ -237,7 +236,7 @@ let SaiposOrderOutput = SaiposOrderOutput_1 = class SaiposOrderOutput {
|
|
|
237
236
|
}
|
|
238
237
|
return moment(order.createdAt).add(30, 'minutes').toISOString();
|
|
239
238
|
}
|
|
240
|
-
transformOrder(order) {
|
|
239
|
+
transformOrder(order, flags) {
|
|
241
240
|
if (!order.customer) {
|
|
242
241
|
throw new core_1.InvalidOrderException('Pedido sem cliente', 'customer');
|
|
243
242
|
}
|
|
@@ -265,7 +264,7 @@ let SaiposOrderOutput = SaiposOrderOutput_1 = class SaiposOrderOutput {
|
|
|
265
264
|
delivery_date_time: this.getDeliveryDateTime(order),
|
|
266
265
|
},
|
|
267
266
|
items: this.transformItems(order),
|
|
268
|
-
payment_types: this.transformPayment(order),
|
|
267
|
+
payment_types: this.transformPayment(order, flags?.EXTERNAL_PAYMENT_CODES),
|
|
269
268
|
};
|
|
270
269
|
if (order.type === 'DELIVERY') {
|
|
271
270
|
if (!order.delivery) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saipos.order-output.js","sourceRoot":"","sources":["../../../lib/order/saipos/saipos.order-output.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oCAQmB;AACnB,2CAAoD;AACpD,mDAAqE;AACrE,yCAA4C;AAC5C,+BAAsC;AAQtC,iCAAqC;AACrC,iCAAiC;AAMjC,uEAAkE;
|
|
1
|
+
{"version":3,"file":"saipos.order-output.js","sourceRoot":"","sources":["../../../lib/order/saipos/saipos.order-output.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,oCAQmB;AACnB,2CAAoD;AACpD,mDAAqE;AACrE,yCAA4C;AAC5C,+BAAsC;AAQtC,iCAAqC;AACrC,iCAAiC;AAMjC,uEAAkE;AAe3D,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAajB;IACQ;IATF,MAAM,GAAW,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,CAAC;IACpD,eAAe,CAAU;IACzB,aAAa,CAAU;IACvB,mBAAmB,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC9C,aAAa,CAA6B;IAC3D,WAAW,GAAY,IAAI,CAAC;IAE5B,YACW,aAA4B,EACpB,WAAwB;QADhC,kBAAa,GAAb,aAAa,CAAe;QACpB,gBAAW,GAAX,WAAW,CAAa;QAEzC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;QAC/C,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,CAAC,eAAe;YAClB,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,8BAA8B,CAAC;QAEhE,IAAI,CAAC,aAAa,GAAG,aAAa,CAA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