@blocklet/sdk 1.16.42-beta-20250402-131159-7647e64d → 1.16.42-beta-20250407-220350-e3782a91

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.
@@ -131,4 +131,5 @@ export interface TSendOptions {
131
131
  channels?: ('app' | 'email' | 'push' | 'webhook')[];
132
132
  keepForOfflineUser?: boolean;
133
133
  locale?: string;
134
+ ttl?: number;
134
135
  }
@@ -20,6 +20,7 @@ declare const sendToUser: (receiver: string | string[], notification: TNotificat
20
20
  locale?: string;
21
21
  channels?: ("app" | "email" | "push" | "webhook")[];
22
22
  raw?: boolean;
23
+ ttl?: number;
23
24
  }, pathname?: string, port?: string) => Promise<any>;
24
25
  declare const sendToAppChannel: (channel: string, event: string, notification: TNotificationInput, { appDid, appSk }: TNotificationSender, options?: TSendOptions, port?: string) => Promise<any>;
25
26
  declare const sendToRelay: (topic: string, event: string, data: any, { appDid, appSk }: TNotificationSender, port?: string) => Promise<any>;
@@ -31,6 +32,7 @@ declare const _default: {
31
32
  locale?: string;
32
33
  channels?: ("app" | "email" | "push" | "webhook")[];
33
34
  raw?: boolean;
35
+ ttl?: number;
34
36
  }, pathname?: string, port?: string) => Promise<any>;
35
37
  sendToAppChannel: (channel: string, event: string, notification: TNotificationInput, { appDid, appSk }: TNotificationSender, options?: TSendOptions, port?: string) => Promise<any>;
36
38
  sendToRelay: (topic: string, event: string, data: any, { appDid, appSk }: TNotificationSender, port?: string) => Promise<any>;
@@ -71,7 +71,7 @@ const sendToUser = async (receiver, notification, { appDid, appSk, type }, optio
71
71
  if (pathname === 'send-to-mail') {
72
72
  await (0, index_1.validateEmail)(receiver);
73
73
  }
74
- const opt = (0, pick_1.default)(options, ['keepForOfflineUser', 'locale', 'channels', 'raw']);
74
+ const opt = (0, pick_1.default)(options, ['keepForOfflineUser', 'locale', 'channels', 'raw', 'ttl']);
75
75
  await (0, index_1.validateOption)(opt);
76
76
  if (SERVER_MODE !== NODE_MODES.DEBUG) {
77
77
  await (0, index_1.validateNotification)(notification);
@@ -278,6 +278,7 @@ const optionSchema = Joi.object({
278
278
  channels: Joi.array()
279
279
  .items(Joi.allow('app', 'email', 'push', 'webhook'))
280
280
  .optional(),
281
+ ttl: Joi.number().integer().min(0).max(7200).optional(), // 0-7200 分钟
281
282
  })
282
283
  .unknown()
283
284
  .meta({ className: 'TSendOptions', unknownType: 'any' });
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.42-beta-20250402-131159-7647e64d",
6
+ "version": "1.16.42-beta-20250407-220350-e3782a91",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
@@ -27,22 +27,22 @@
27
27
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/client": "1.16.42-beta-20250402-131159-7647e64d",
31
- "@abtnode/constant": "1.16.42-beta-20250402-131159-7647e64d",
32
- "@abtnode/util": "1.16.42-beta-20250402-131159-7647e64d",
33
- "@arcblock/did": "1.19.15",
34
- "@arcblock/did-auth": "1.19.15",
35
- "@arcblock/jwt": "1.19.15",
36
- "@arcblock/ws": "1.19.15",
37
- "@blocklet/constant": "1.16.42-beta-20250402-131159-7647e64d",
38
- "@blocklet/env": "1.16.42-beta-20250402-131159-7647e64d",
39
- "@blocklet/meta": "1.16.42-beta-20250402-131159-7647e64d",
30
+ "@abtnode/client": "1.16.42-beta-20250407-220350-e3782a91",
31
+ "@abtnode/constant": "1.16.42-beta-20250407-220350-e3782a91",
32
+ "@abtnode/util": "1.16.42-beta-20250407-220350-e3782a91",
33
+ "@arcblock/did": "1.19.18",
34
+ "@arcblock/did-auth": "1.19.18",
35
+ "@arcblock/jwt": "1.19.18",
36
+ "@arcblock/ws": "1.19.18",
37
+ "@blocklet/constant": "1.16.42-beta-20250407-220350-e3782a91",
38
+ "@blocklet/env": "1.16.42-beta-20250407-220350-e3782a91",
39
+ "@blocklet/meta": "1.16.42-beta-20250407-220350-e3782a91",
40
40
  "@did-connect/authenticator": "^2.2.7",
41
41
  "@did-connect/handler": "^2.2.7",
42
42
  "@nedb/core": "^2.1.5",
43
- "@ocap/mcrypto": "1.19.15",
44
- "@ocap/util": "1.19.15",
45
- "@ocap/wallet": "1.19.15",
43
+ "@ocap/mcrypto": "1.19.18",
44
+ "@ocap/util": "1.19.18",
45
+ "@ocap/wallet": "1.19.18",
46
46
  "axios": "^1.7.9",
47
47
  "cheerio": "1.0.0-rc.12",
48
48
  "debug": "^4.3.7",
@@ -82,5 +82,5 @@
82
82
  "ts-node": "^10.9.1",
83
83
  "typescript": "^5.6.3"
84
84
  },
85
- "gitHead": "f90e7dc430b14d99a8861d972967fb4b4c83c8ea"
85
+ "gitHead": "e897c72af748f25cccde2e595410d1a2fb672289"
86
86
  }