@be-link/ecommerce-promotion-service-node-sdk 0.1.16 → 0.1.18

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.
@@ -102,6 +102,8 @@ export declare namespace Service {
102
102
  couponId: string;
103
103
  /** 用户ID */
104
104
  userId: string;
105
+ /** 数量 */
106
+ quantity?: number;
105
107
  }
106
108
  }
107
109
  namespace Response {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-promotion-service-node-sdk",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "EcommercePromotionService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/utils/http.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module '@fastify/request-context' {
2
2
  interface RequestContextData {
3
- requestId: string;
3
+ requestId?: string;
4
4
  traceMessageId?: string;
5
5
  pandoraUserId?: string;
6
6
  beLinkUserId?: string;
package/utils/http.js CHANGED
@@ -89,7 +89,7 @@ async function callApi(url, request) {
89
89
  const beLinkUserId = ctx?.get('beLinkUserId') || '';
90
90
  const pandoraRoleId = ctx?.get('pandoraRoleId') || '';
91
91
  const realIp = ctx?.get('realIp') || '';
92
- const response = await axios_1.default.post(url, request, {
92
+ const response = await axios_1.default.post(url, request || {}, {
93
93
  headers: {
94
94
  'x-request-id': requestId,
95
95
  'x-belink-pandora-userid': pandoraUserId,
@@ -97,6 +97,7 @@ async function callApi(url, request) {
97
97
  'x-belink-pandora-roleid': pandoraRoleId,
98
98
  'x-real-ip': realIp,
99
99
  Connection: 'keep-alive',
100
+ 'Content-Type': 'application/json;charset=utf-8',
100
101
  },
101
102
  timeout: HTTP_CONFIG.requestTimeout,
102
103
  httpAgent,