@blocklet/sdk 1.16.52-beta-20250908-085420-224a58fa → 1.16.52-beta-20250911-023851-d988be85

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.
@@ -77,11 +77,12 @@ interface BlockletService {
77
77
  verifyAccessKey(params: OmitTeamDid<Client.RequestVerifyAccessKeyInput>): Promise<Client.ResponseAccessKey>;
78
78
  getAccessKeys(params: OmitTeamDid<Client.RequestAccessKeysInput>): Promise<Client.ResponseAccessKeys>;
79
79
  getAccessKey(params: OmitTeamDid<Client.RequestAccessKeyInput>): Promise<Client.ResponseAccessKey>;
80
- getUserFollowers(args: OmitTeamDid<Client.RequestUserFollowsInput>, options: RequestHeaders): Promise<Client.ResponseUserFollows>;
81
- getUserFollowing(args: OmitTeamDid<Client.RequestUserFollowsInput>, options: RequestHeaders): Promise<Client.ResponseUserFollows>;
82
- getUserFollowStats(args: OmitTeamDid<Client.RequestUserFollowsStatsInput>, options: RequestHeaders): Promise<Client.ResponseFollowStats>;
80
+ getUserFollowers(args: OmitTeamDid<Client.RequestUserRelationQueryInput>, options: RequestHeaders): Promise<Client.ResponseUserFollows>;
81
+ getUserFollowing(args: OmitTeamDid<Client.RequestUserRelationQueryInput>, options: RequestHeaders): Promise<Client.ResponseUserFollows>;
82
+ getUserFollowStats(args: OmitTeamDid<Client.RequestUserRelationCountInput>, options: RequestHeaders): Promise<Client.ResponseUserRelationCount>;
83
83
  checkFollowing(args: OmitTeamDid<Client.RequestCheckFollowingInput>): Promise<Client.ResponseCheckFollowing>;
84
84
  followUser(args: OmitTeamDid<Client.RequestFollowUserActionInput>): Promise<Client.GeneralResponse>;
85
85
  unfollowUser(args: OmitTeamDid<Client.RequestFollowUserActionInput>): Promise<Client.GeneralResponse>;
86
+ getUserInvites(args: OmitTeamDid<Client.RequestUserRelationQueryInput>, options: RequestHeaders): Promise<Client.ResponseUsers>;
86
87
  }
87
88
  export = BlockletService;
@@ -115,6 +115,7 @@ class BlockletService {
115
115
  'checkFollowing',
116
116
  'followUser',
117
117
  'unfollowUser',
118
+ 'getUserInvites',
118
119
  // updateUserInfo
119
120
  'updateUserAddress',
120
121
  'updateUserInfo',
@@ -324,6 +325,7 @@ class BlockletService {
324
325
  this.getUserFollowers = (args, options) => callClientMethod('getUserFollowers', args, options);
325
326
  this.getUserFollowing = (args, options) => callClientMethod('getUserFollowing', args, options);
326
327
  this.getUserFollowStats = (args, options) => callClientMethod('getUserFollowStats', args, options);
328
+ this.getUserInvites = (args, options) => callClientMethod('getUserInvites', args, options);
327
329
  this.checkFollowing = (args) => callClientMethod('checkFollowing', args);
328
330
  this.followUser = (args) => callClientMethod('followUser', args);
329
331
  this.unfollowUser = (args) => callClientMethod('unfollowUser', args);
@@ -5,11 +5,13 @@ export interface TActivityTarget {
5
5
  image?: any;
6
6
  name?: any;
7
7
  type: 'discussion' | 'blog' | 'doc' | 'bookmark' | 'comment' | 'user';
8
+ utm?: TUTM;
8
9
  }
9
10
  export type TChannelEvent = string;
10
11
  export interface TDataAsset {
11
12
  chainHost: string;
12
13
  did: unknown;
14
+ utm?: TUTM;
13
15
  }
14
16
  export interface TDataDapp {
15
17
  appDID: unknown;
@@ -17,16 +19,19 @@ export interface TDataDapp {
17
19
  logo: string;
18
20
  title: string;
19
21
  url: string;
22
+ utm?: TUTM;
20
23
  }
21
24
  export interface TDataImage {
22
25
  alt?: string;
23
26
  url: string;
27
+ utm?: TUTM;
24
28
  }
25
29
  export interface TDataLink {
26
30
  description?: string;
27
31
  image?: string;
28
32
  title?: string;
29
33
  url: string;
34
+ utm?: TUTM;
30
35
  }
31
36
  export interface TDataText {
32
37
  color?: string;
@@ -41,6 +46,7 @@ export interface TDataToken {
41
46
  decimal: number;
42
47
  senderDid: unknown;
43
48
  symbol: string;
49
+ utm?: TUTM;
44
50
  }
45
51
  export interface TDataTransaction {
46
52
  chainId: string;
@@ -85,6 +91,7 @@ export interface TNotification {
85
91
  title?: string;
86
92
  type?: 'notification' | 'connect' | 'feed' | 'hi' | 'passthrough';
87
93
  url?: string;
94
+ utm?: TUTM;
88
95
  }
89
96
  export interface TNotificationAction {
90
97
  bgColor?: string;
@@ -92,6 +99,7 @@ export interface TNotificationAction {
92
99
  link?: string;
93
100
  name: string;
94
101
  title?: string;
102
+ utm?: TUTM;
95
103
  }
96
104
  export interface TNotificationActivity {
97
105
  actor: unknown;
@@ -108,6 +116,7 @@ export interface TNotificationConnect {
108
116
  checkUrl?: string;
109
117
  type?: 'connect';
110
118
  url: string;
119
+ utm?: TUTM;
111
120
  }
112
121
  export interface TNotificationFeed {
113
122
  data: object;
@@ -135,3 +144,9 @@ export interface TSendOptions {
135
144
  locale?: string;
136
145
  ttl?: number;
137
146
  }
147
+ export interface TUTM {
148
+ campaign?: string;
149
+ content?: string;
150
+ medium?: string;
151
+ source?: string;
152
+ }
@@ -23,6 +23,7 @@ declare const ACTIVITY_TARGET_TYPES: {
23
23
  COMMENT: string;
24
24
  USER: string;
25
25
  };
26
+ declare const utmSchema: JOI.ObjectSchema<any>;
26
27
  declare const assetSchema: JOI.ObjectSchema<any>;
27
28
  declare const vcSchema: JOI.ObjectSchema<any>;
28
29
  declare const tokenSchema: JOI.ObjectSchema<any>;
@@ -69,6 +70,7 @@ export { inputNotificationSchema, notificationTypeSchema, connectTypeSchema, fee
69
70
  export { ACTIVITY_TYPES, ACTIVITY_TARGET_TYPES };
70
71
  export { notificationActivitySchema };
71
72
  export { activityTargetSchema };
73
+ export { utmSchema };
72
74
  declare const _default: {
73
75
  validateReceiver: any;
74
76
  validateNotification: any;
@@ -116,5 +118,6 @@ declare const _default: {
116
118
  validateActivity: any;
117
119
  notificationActivitySchema: JOI.ObjectSchema<any>;
118
120
  activityTargetSchema: JOI.ObjectSchema<any>;
121
+ utmSchema: JOI.ObjectSchema<any>;
119
122
  };
120
123
  export default _default;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.activityTargetSchema = exports.notificationActivitySchema = exports.ACTIVITY_TARGET_TYPES = exports.ACTIVITY_TYPES = exports.feedTypeSchema = exports.connectTypeSchema = exports.notificationTypeSchema = exports.inputNotificationSchema = exports.NOTIFICATION_TYPES = exports.channelEventSchema = exports.optionSchema = exports.messageSchema = exports.notificationSchema = exports.attachmentSchema = exports.dappSchema = exports.imageSchema = exports.linkSchema = exports.textSchema = exports.transactionSchema = exports.vcSchema = exports.assetSchema = exports.actionSchema = exports.tokenSchema = exports.validateActivity = exports.validateEmail = exports.validateOption = exports.validateChannelEvent = exports.validateMessage = exports.validateNotification = exports.validateReceiver = void 0;
6
+ exports.utmSchema = exports.activityTargetSchema = exports.notificationActivitySchema = exports.ACTIVITY_TARGET_TYPES = exports.ACTIVITY_TYPES = exports.feedTypeSchema = exports.connectTypeSchema = exports.notificationTypeSchema = exports.inputNotificationSchema = exports.NOTIFICATION_TYPES = exports.channelEventSchema = exports.optionSchema = exports.messageSchema = exports.notificationSchema = exports.attachmentSchema = exports.dappSchema = exports.imageSchema = exports.linkSchema = exports.textSchema = exports.transactionSchema = exports.vcSchema = exports.assetSchema = exports.actionSchema = exports.tokenSchema = exports.validateActivity = exports.validateEmail = exports.validateOption = exports.validateChannelEvent = exports.validateMessage = exports.validateNotification = exports.validateReceiver = void 0;
7
7
  const joi_1 = __importDefault(require("joi"));
8
8
  const extension_1 = require("@blocklet/meta/lib/extension");
9
9
  const Joi = joi_1.default.extend(extension_1.didExtension);
@@ -52,9 +52,17 @@ const ACTIVITY_TARGET_TYPES = {
52
52
  USER: 'user',
53
53
  };
54
54
  exports.ACTIVITY_TARGET_TYPES = ACTIVITY_TARGET_TYPES;
55
+ const utmSchema = Joi.object({
56
+ source: Joi.string().optional(),
57
+ medium: Joi.string().optional(),
58
+ campaign: Joi.string().optional(),
59
+ content: Joi.string().optional(),
60
+ }).meta({ className: 'TUTM' });
61
+ exports.utmSchema = utmSchema;
55
62
  const assetSchema = Joi.object({
56
63
  did: Joi.DID().trim().required(),
57
64
  chainHost: Joi.string().uri().required(),
65
+ utm: utmSchema.optional(),
58
66
  })
59
67
  .required()
60
68
  .meta({ className: 'TDataAsset' });
@@ -73,6 +81,7 @@ const tokenSchema = Joi.object({
73
81
  senderDid: Joi.DID().trim().required(),
74
82
  chainHost: Joi.string().uri().required(),
75
83
  decimal: Joi.number().integer().required(),
84
+ utm: utmSchema.optional(),
76
85
  })
77
86
  .required()
78
87
  .meta({ className: 'TDataToken' });
@@ -89,6 +98,7 @@ exports.textSchema = textSchema;
89
98
  const imageSchema = Joi.object({
90
99
  url: Joi.string().uri().required(),
91
100
  alt: Joi.string().min(0),
101
+ utm: utmSchema.optional(),
92
102
  })
93
103
  .required()
94
104
  .meta({ className: 'TDataImage' });
@@ -106,6 +116,7 @@ const dappSchema = Joi.object({
106
116
  logo: Joi.string().uri().required(),
107
117
  title: Joi.string().required(),
108
118
  desc: Joi.string().min(0),
119
+ utm: utmSchema.optional(),
109
120
  })
110
121
  .required()
111
122
  .meta({ className: 'TDataDapp' });
@@ -115,6 +126,7 @@ const linkSchema = Joi.object({
115
126
  description: Joi.string().min(0),
116
127
  title: Joi.string().min(0),
117
128
  image: Joi.string().uri().min(0),
129
+ utm: utmSchema.optional(),
118
130
  })
119
131
  .required()
120
132
  .meta({ className: 'TDataLink' });
@@ -125,6 +137,7 @@ const actionSchema = Joi.object({
125
137
  color: Joi.string(),
126
138
  bgColor: Joi.string(),
127
139
  link: Joi.string().uri(),
140
+ utm: utmSchema.optional(),
128
141
  }).meta({ className: 'TNotificationAction' });
129
142
  exports.actionSchema = actionSchema;
130
143
  const attachmentSchema = Joi.object({
@@ -169,6 +182,7 @@ const connectTypeSchema = Joi.object({
169
182
  type: Joi.string().valid(TYPES.CONNECT),
170
183
  url: Joi.string().uri().required(),
171
184
  checkUrl: Joi.string().uri(),
185
+ utm: utmSchema.optional(),
172
186
  })
173
187
  .required()
174
188
  .meta({ className: 'TNotificationConnect' });
@@ -206,6 +220,7 @@ const activityTargetSchema = Joi.object({
206
220
  then: Joi.forbidden(),
207
221
  otherwise: Joi.string().allow('').optional(),
208
222
  }),
223
+ utm: utmSchema.optional(),
209
224
  }).meta({ className: 'TActivityTarget' });
210
225
  exports.activityTargetSchema = activityTargetSchema;
211
226
  const notificationActivitySchema = Joi.object({
@@ -226,6 +241,7 @@ const notificationActivitySchema = Joi.object({
226
241
  then: Joi.object({
227
242
  id: Joi.string().required(),
228
243
  content: Joi.string().required(),
244
+ utm: utmSchema.optional(),
229
245
  }).required(),
230
246
  otherwise: Joi.object().optional(),
231
247
  }),
@@ -254,6 +270,8 @@ const notificationSchema = Joi.object({
254
270
  poweredBy: Joi.object().optional(),
255
271
  // notification activity v1.16.41
256
272
  activity: notificationActivitySchema.optional(),
273
+ // utm params >= 1.16.52
274
+ utm: utmSchema.optional(),
257
275
  })
258
276
  .required()
259
277
  .meta({ className: 'TNotification' });
@@ -326,4 +344,5 @@ exports.default = {
326
344
  validateActivity: exports.validateActivity,
327
345
  notificationActivitySchema,
328
346
  activityTargetSchema,
347
+ utmSchema,
329
348
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.52-beta-20250908-085420-224a58fa",
6
+ "version": "1.16.52-beta-20250911-023851-d988be85",
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,19 +27,19 @@
27
27
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/constant": "1.16.52-beta-20250908-085420-224a58fa",
31
- "@abtnode/db-cache": "1.16.52-beta-20250908-085420-224a58fa",
32
- "@abtnode/util": "1.16.52-beta-20250908-085420-224a58fa",
30
+ "@abtnode/constant": "1.16.52-beta-20250911-023851-d988be85",
31
+ "@abtnode/db-cache": "1.16.52-beta-20250911-023851-d988be85",
32
+ "@abtnode/util": "1.16.52-beta-20250911-023851-d988be85",
33
33
  "@arcblock/did": "1.24.0",
34
34
  "@arcblock/did-connect-js": "1.24.0",
35
35
  "@arcblock/jwt": "1.24.0",
36
36
  "@arcblock/ws": "1.24.0",
37
- "@blocklet/constant": "1.16.52-beta-20250908-085420-224a58fa",
38
- "@blocklet/env": "1.16.52-beta-20250908-085420-224a58fa",
37
+ "@blocklet/constant": "1.16.52-beta-20250911-023851-d988be85",
38
+ "@blocklet/env": "1.16.52-beta-20250911-023851-d988be85",
39
39
  "@blocklet/error": "^0.2.5",
40
- "@blocklet/meta": "1.16.52-beta-20250908-085420-224a58fa",
41
- "@blocklet/server-js": "1.16.52-beta-20250908-085420-224a58fa",
42
- "@blocklet/theme": "^3.1.36",
40
+ "@blocklet/meta": "1.16.52-beta-20250911-023851-d988be85",
41
+ "@blocklet/server-js": "1.16.52-beta-20250911-023851-d988be85",
42
+ "@blocklet/theme": "^3.1.37",
43
43
  "@did-connect/authenticator": "^2.2.8",
44
44
  "@did-connect/handler": "^2.2.8",
45
45
  "@nedb/core": "^2.1.5",
@@ -85,5 +85,5 @@
85
85
  "ts-node": "^10.9.1",
86
86
  "typescript": "^5.6.3"
87
87
  },
88
- "gitHead": "400eda55fc1058c961fd622907237a649b5c4f86"
88
+ "gitHead": "90c5cf74138797733868312beb5e509c9db3a8f8"
89
89
  }