@byted-apaas/server-sdk-node 1.1.20-beta.1 → 1.1.20-beta.10

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.
@@ -18,6 +18,7 @@ export declare class PushCenter {
18
18
  * @param receiverInfos 接收者信息
19
19
  * @param channelIDs 管道ID
20
20
  * @param template 模版
21
+ * @param msgType 消息类型
21
22
  * @param batchNo 批量编号
22
23
  * @param senderID 发送者ID
23
24
  * @param senderIDType 发送者ID类型
@@ -25,7 +26,7 @@ export declare class PushCenter {
25
26
  * @param tags 标签信息
26
27
  * @param extra 扩展信息
27
28
  */
28
- sendMessageBatch(receiverInfos: _ReceiverInfo[], channelIDs: string[], template: string, batchNo: string, senderID: string, senderIDType: string, subBatchNo?: string, tags?: Map<string, string>, extra?: Map<string, string>): Promise<any>;
29
+ sendMessageBatch(receiverInfos: _ReceiverInfo[], channelIDs: string[], template: string, msgType: string, batchNo: string, senderID: string, senderIDType: string, subBatchNo?: string, tags?: Map<string, string>, extra?: Map<string, string>): Promise<any>;
29
30
  /**
30
31
  * 批量获取消息状态
31
32
  * @param batchNo 批量编号
@@ -37,6 +38,9 @@ export declare class PushCenter {
37
38
  * @param batchNo 批量编号
38
39
  * @param receiverIDs 接收者ID列表
39
40
  * @param tags 标签列表
41
+ * @param withFeedback 是否获取已读反馈
42
+ * @param offset 是否获取已读反馈
43
+ * @param limit 是否获取已读反馈
40
44
  */
41
- getMessageStatus(batchNo: string, receiverIDs?: string[], tags?: Map<string, string>): Promise<any>;
45
+ getMessageStatus(batchNo: string, receiverIDs?: string[], tags?: Map<string, string>, withFeedback?: boolean, offset?: number, limit?: number): Promise<any>;
42
46
  }
@@ -13,6 +13,7 @@ class PushCenter {
13
13
  * @param receiverInfos 接收者信息
14
14
  * @param channelIDs 管道ID
15
15
  * @param template 模版
16
+ * @param msgType 消息类型
16
17
  * @param batchNo 批量编号
17
18
  * @param senderID 发送者ID
18
19
  * @param senderIDType 发送者ID类型
@@ -20,8 +21,8 @@ class PushCenter {
20
21
  * @param tags 标签信息
21
22
  * @param extra 扩展信息
22
23
  */
23
- async sendMessageBatch(receiverInfos, channelIDs, template, batchNo, senderID, senderIDType, subBatchNo, tags, extra) {
24
- return await Request.GetInstance().sendMessageBatch(receiverInfos, channelIDs, template, batchNo, senderID, senderIDType, subBatchNo, tags, extra);
24
+ async sendMessageBatch(receiverInfos, channelIDs, template, msgType, batchNo, senderID, senderIDType, subBatchNo, tags, extra) {
25
+ return await Request.GetInstance().sendMessageBatch(receiverInfos, channelIDs, template, msgType, batchNo, senderID, senderIDType, subBatchNo, tags, extra);
25
26
  }
26
27
  ;
27
28
  /**
@@ -38,9 +39,12 @@ class PushCenter {
38
39
  * @param batchNo 批量编号
39
40
  * @param receiverIDs 接收者ID列表
40
41
  * @param tags 标签列表
42
+ * @param withFeedback 是否获取已读反馈
43
+ * @param offset 是否获取已读反馈
44
+ * @param limit 是否获取已读反馈
41
45
  */
42
- async getMessageStatus(batchNo, receiverIDs, tags) {
43
- return await Request.GetInstance().getMessageStatus(batchNo, receiverIDs, tags);
46
+ async getMessageStatus(batchNo, receiverIDs, tags, withFeedback, offset, limit) {
47
+ return await Request.GetInstance().getMessageStatus(batchNo, receiverIDs, tags, withFeedback, offset, limit);
44
48
  }
45
49
  ;
46
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byted-apaas/server-sdk-node",
3
- "version": "1.1.20-beta.1",
3
+ "version": "1.1.20-beta.10",
4
4
  "description": "aPaaS Server SDK",
5
5
  "author": "zhouwexin <zhouwexin@bytedance.com>",
6
6
  "homepage": "",
@@ -13,7 +13,7 @@
13
13
  "clean": "tsc --build --clean && rm -rf **/*.js.map"
14
14
  },
15
15
  "dependencies": {
16
- "@byted-apaas/server-common-node": "^2.0.19-beta.1",
16
+ "@byted-apaas/server-common-node": "^2.0.20-beta.1",
17
17
  "@jorgeferrero/stream-to-buffer": "^2.0.6",
18
18
  "dayjs": "^1.9.6",
19
19
  "form-data": "^3.0.0",
@@ -69,9 +69,9 @@ export interface IInnerAPIBaseRequest {
69
69
  syncTasks: (tasks: any, cacheDuration: number) => Promise<number>;
70
70
  getTaskDetail: (task: any) => Promise<any>;
71
71
  refreshTasksCache: (tasks: any, cacheDuration: number) => Promise<number>;
72
- sendMessageBatch: (receiverInfos: any, channelIDs: string[], template: string, batchNo: string, senderID: string, senderIDType: string, subBatchNo?: string, tags?: Map<string, string>, extra?: Map<string, string>) => Promise<string>;
72
+ sendMessageBatch: (receiverInfos: any, channelIDs: string[], template: string, msgType: string, batchNo: string, senderID: string, senderIDType: string, subBatchNo?: string, tags?: Map<string, string>, extra?: Map<string, string>) => Promise<string>;
73
73
  getMessageBatchStatus: (batchNo: string, tags?: Map<string, string>) => Promise<any>;
74
- getMessageStatus: (batchNo: string, receiverIDs?: string[], tags?: Map<string, string>) => Promise<any>;
74
+ getMessageStatus: (batchNo: string, receiverIDs?: string[], tags?: Map<string, string>, withFeedback?: boolean, offset?: number, limit?: number) => Promise<any>;
75
75
  getFields: (objectApiName: string) => Promise<any>;
76
76
  getField: (objectApiName: string, fieldApiName: string) => Promise<any>;
77
77
  terminateWorkflowInstance: (workflowInstanceId: number, operator: number, reason: string) => Promise<void>;
@@ -35,9 +35,9 @@ export declare class RequestHttp implements IInnerAPIRequest {
35
35
  updateMessage(msgId: number, msg: any): Promise<void>;
36
36
  syncTasks(tasks: any, cacheDuration: number): Promise<any>;
37
37
  getTaskDetail(task: any): Promise<any>;
38
- sendMessageBatch(receiverInfos: any, channelIDs: string[], template: string, batchNo: string, senderID: string, senderIDType: string, subBatchNo?: string, tags?: Map<string, string>, extra?: Map<string, string>): Promise<string>;
38
+ sendMessageBatch(receiverInfos: any, channelIDs: string[], template: string, msgType: string, batchNo: string, senderID: string, senderIDType: string, subBatchNo?: string, tags?: Map<string, string>, extra?: Map<string, string>): Promise<string>;
39
39
  getMessageBatchStatus(batchNo: string, tags?: Map<string, string>): Promise<any>;
40
- getMessageStatus(batchNo: string, receiverIDs?: string[], tags?: Map<string, string>): Promise<any>;
40
+ getMessageStatus(batchNo: string, receiverIDs?: string[], tags?: Map<string, string>, withFeedback?: boolean, offset?: number, limit?: number): Promise<any>;
41
41
  refreshTasksCache(cacheDuration: number, tasks: any): Promise<any>;
42
42
  getFields(objectApiName: string): any;
43
43
  getField(objectApiName: string, fieldApiName: string): any;
@@ -1109,13 +1109,13 @@ class RequestHttp {
1109
1109
  getTaskDetail(task) {
1110
1110
  return null;
1111
1111
  }
1112
- sendMessageBatch(receiverInfos, channelIDs, template, batchNo, senderID, senderIDType, subBatchNo, tags, extra) {
1112
+ sendMessageBatch(receiverInfos, channelIDs, template, msgType, batchNo, senderID, senderIDType, subBatchNo, tags, extra) {
1113
1113
  return null;
1114
1114
  }
1115
1115
  getMessageBatchStatus(batchNo, tags) {
1116
1116
  return null;
1117
1117
  }
1118
- getMessageStatus(batchNo, receiverIDs, tags) {
1118
+ getMessageStatus(batchNo, receiverIDs, tags, withFeedback, offset, limit) {
1119
1119
  return null;
1120
1120
  }
1121
1121
  refreshTasksCache(cacheDuration, tasks) {
@@ -1572,13 +1572,14 @@ async function refreshTasksCache(tasks, cacheDuration) {
1572
1572
  };
1573
1573
  return await openapi.doRequest(null, urlPath, options);
1574
1574
  }
1575
- async function sendMessageBatch(receiverInfos, channelIDs, template, batchNo, senderID, senderIDType, subBatchNo, tags, extra) {
1575
+ async function sendMessageBatch(receiverInfos, channelIDs, template, msgType, batchNo, senderID, senderIDType, subBatchNo, tags, extra) {
1576
1576
  let options = commonHttp.getOptions(null, openapiHttpPath.pushCenterSendMessageBatch);
1577
1577
  let urlPath = options._reqPath.replace(replaceKeys.namespace, await (0, common_1.getNamespaceForOpenAndFaaSSDK)());
1578
1578
  options.json = {
1579
1579
  'receiver_infos': receiverInfos,
1580
1580
  'channel_ids': channelIDs,
1581
1581
  'template': template,
1582
+ 'msg_type': msgType,
1582
1583
  'batch_no': batchNo,
1583
1584
  'sender_id': senderID,
1584
1585
  'sender_id_type': senderIDType,
@@ -1597,13 +1598,16 @@ async function getMessageBatchStatus(batchNo, tags) {
1597
1598
  };
1598
1599
  return await openapi.doRequest(null, urlPath, options);
1599
1600
  }
1600
- async function getMessageStatus(batchNo, receiverIDs, tags) {
1601
+ async function getMessageStatus(batchNo, receiverIDs, tags, withFeedback, offset, limit) {
1601
1602
  let options = commonHttp.getOptions(null, openapiHttpPath.pushCenterGetMessageStatus);
1602
1603
  let urlPath = options._reqPath.replace(replaceKeys.namespace, await (0, common_1.getNamespaceForOpenAndFaaSSDK)());
1603
1604
  options.json = {
1604
1605
  'batch_no': batchNo,
1605
1606
  'receiver_ids': receiverIDs,
1606
1607
  'tags': tags,
1608
+ 'with_feedback': withFeedback,
1609
+ 'offset': offset,
1610
+ 'limit': limit,
1607
1611
  };
1608
1612
  return await openapi.doRequest(null, urlPath, options);
1609
1613
  }