@yaoyuanchao/dingtalk 1.3.7 → 1.3.8

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/card-api.ts +11 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaoyuanchao/dingtalk",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "type": "module",
5
5
  "description": "DingTalk channel plugin for Clawdbot with Stream Mode support",
6
6
  "license": "MIT",
package/src/card-api.ts CHANGED
@@ -159,13 +159,24 @@ export async function createCardInstance(
159
159
  body.userIdType = params.userIdType;
160
160
  }
161
161
 
162
+ console.log("[dingtalk-card] createCardInstance request:", JSON.stringify(body, null, 2));
163
+
162
164
  const res = await jsonPost(
163
165
  `${DINGTALK_API_BASE}/card/instances`,
164
166
  body,
165
167
  { "x-acs-dingtalk-access-token": token },
166
168
  );
167
169
 
170
+ console.log("[dingtalk-card] createCardInstance response:", JSON.stringify(res, null, 2));
171
+
168
172
  if (res.code || res.errcode) {
173
+ console.warn("[dingtalk-card] Failed to create card instance:", {
174
+ success: false,
175
+ errcode: res.errcode,
176
+ errmsg: res.errmsg,
177
+ code: res.code,
178
+ message: res.message,
179
+ });
169
180
  return {
170
181
  success: false,
171
182
  errcode: res.errcode,