@native-engagement/sdk 0.8.2 → 0.9.1
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.
- package/LICENSE +202 -0
- package/dist/index.d.ts +1452 -31
- package/dist/index.js +1 -1
- package/package.json +3 -9
- package/release.json +2 -2
- package/README.md +0 -91
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
export type ContractRisk = "READ_ONLY" | "DOMAIN_WRITE" | "REVIEW_REQUIRED" | "EXTERNAL_ACTION" | "ADMINISTRATION";
|
|
4
|
+
export type ContractKind = "SCHEMA" | "QUERY" | "COMMAND" | "SEARCH" | "ENQUIRY" | "EVENT" | "CAPABILITY";
|
|
5
|
+
export type ContractAvailability = "AVAILABLE" | "PLANNED";
|
|
6
|
+
export type TenantRequirement = "SYSTEM" | "REQUIRED";
|
|
7
|
+
export type SideEffectClass = "NONE" | "DOMAIN_WRITE" | "EXTERNAL_ACTION";
|
|
8
|
+
export type IdempotencyRequirement = "NONE" | "REQUIRED";
|
|
9
|
+
export type HumanInLoopRequirement = "NONE" | "REVIEW" | "HUMAN_REQUIRED" | "POLICY_REQUIRED";
|
|
10
|
+
export type JsonSchema = Readonly<Record<string, unknown>>;
|
|
11
|
+
export interface ContractDescriptor {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly version: string;
|
|
14
|
+
readonly kind: ContractKind;
|
|
15
|
+
readonly availability: ContractAvailability;
|
|
16
|
+
readonly description: string;
|
|
17
|
+
readonly tenantRequirement: TenantRequirement;
|
|
18
|
+
readonly authorizationScopes: readonly string[];
|
|
19
|
+
readonly sideEffect: SideEffectClass;
|
|
20
|
+
readonly idempotency: IdempotencyRequirement;
|
|
21
|
+
readonly identifierSemantics?: string | undefined;
|
|
22
|
+
readonly humanInLoop?: HumanInLoopRequirement | undefined;
|
|
23
|
+
readonly policyClass?: string | undefined;
|
|
24
|
+
readonly inputSchema: JsonSchema;
|
|
25
|
+
readonly outputSchema: JsonSchema;
|
|
26
|
+
readonly errorCodes?: readonly string[] | undefined;
|
|
27
|
+
readonly riskClass?: ContractRisk;
|
|
28
|
+
}
|
|
29
|
+
export interface ContractRegistrySnapshot {
|
|
30
|
+
readonly registryVersion: string;
|
|
31
|
+
readonly contracts: readonly ContractDescriptor[];
|
|
32
|
+
}
|
|
33
|
+
/** 合同发现只投影 canonical 元数据;完整约束由原合同名按需读取。 */
|
|
34
|
+
export type ContractSummary = Omit<ContractDescriptor, "inputSchema" | "outputSchema">;
|
|
35
|
+
export interface ContractDiscoveryOptions {
|
|
36
|
+
readonly query?: string;
|
|
37
|
+
readonly kind?: ContractKind;
|
|
38
|
+
readonly limit?: number;
|
|
39
|
+
readonly cursor?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ContractDiscoveryPage {
|
|
42
|
+
readonly registryVersion: string;
|
|
43
|
+
readonly catalogRevision: string;
|
|
44
|
+
readonly contracts: readonly ContractSummary[];
|
|
45
|
+
readonly total: number;
|
|
46
|
+
readonly hasMore: boolean;
|
|
47
|
+
readonly nextCursor: string | null;
|
|
48
|
+
}
|
|
49
|
+
export type ContractSchemaView = "input" | "output" | "full";
|
|
50
|
+
/** 工具目录只描述当前任务的展示选择,不能表达身份、权限或业务状态。 */
|
|
51
|
+
export interface McpToolSelection {
|
|
52
|
+
readonly mode?: "minimal" | "selected" | "full";
|
|
53
|
+
readonly task?: string;
|
|
54
|
+
readonly groups?: readonly string[];
|
|
55
|
+
readonly names?: readonly string[];
|
|
56
|
+
}
|
|
57
|
+
export interface McpToolDefinition {
|
|
58
|
+
readonly name: string;
|
|
59
|
+
readonly description?: string | undefined;
|
|
60
|
+
readonly inputSchema: {
|
|
61
|
+
readonly type: "object";
|
|
62
|
+
readonly [key: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
readonly annotations?: unknown;
|
|
65
|
+
readonly _meta?: unknown;
|
|
66
|
+
}
|
|
3
67
|
/** Public DTOs shared by the Agent SDK; runtime validation is the canonical JSON Schema. */
|
|
4
68
|
export type ProspectTemporalStatus = "CURRENT" | "HISTORICAL";
|
|
5
69
|
export interface ProspectObservation {
|
|
@@ -121,6 +185,11 @@ export interface ProspectEngagementInput {
|
|
|
121
185
|
whyFit: string;
|
|
122
186
|
whyNow: string;
|
|
123
187
|
}
|
|
188
|
+
declare const BROWSER_SOCIAL_PLATFORMS: readonly [
|
|
189
|
+
"XIAOHONGSHU",
|
|
190
|
+
"DOUYIN",
|
|
191
|
+
"TIKTOK"
|
|
192
|
+
];
|
|
124
193
|
export interface AgentStackScope {
|
|
125
194
|
readonly authorityRef: string;
|
|
126
195
|
readonly sourcePrincipal: Readonly<{
|
|
@@ -149,37 +218,42 @@ export interface TenantContextInput {
|
|
|
149
218
|
/** 只由验证签名的 Agent Stack 适配器产生,HTTP 业务 payload 不得提供。 */
|
|
150
219
|
readonly agentStack?: AgentStackScope | undefined;
|
|
151
220
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
readonly
|
|
155
|
-
readonly
|
|
156
|
-
readonly
|
|
157
|
-
readonly
|
|
158
|
-
readonly
|
|
159
|
-
readonly
|
|
160
|
-
readonly
|
|
161
|
-
readonly
|
|
162
|
-
readonly assigneeRef?: string;
|
|
163
|
-
readonly controlledBy?: string;
|
|
164
|
-
readonly controlledAt?: string;
|
|
165
|
-
readonly resumedBy?: string;
|
|
166
|
-
readonly resumedAt?: string;
|
|
167
|
-
readonly sessionCorrelationRef?: string;
|
|
221
|
+
/** The exact accessible display belongs to its outer source row, without author or parent identity. */
|
|
222
|
+
export interface NativeQuotedDisplay {
|
|
223
|
+
readonly schemaVersion: 1;
|
|
224
|
+
readonly text: string;
|
|
225
|
+
readonly basis: "WECHAT_NATIVE_QUOTE_ROW" | "WECHAT_DESKTOP_CLIPBOARD_QUOTE" | "WECHAT_DESKTOP_RENDERED_QUOTE";
|
|
226
|
+
readonly displayCoverage: "CURRENT_ACCESSIBLE_DISPLAY" | "CURRENT_CLIPBOARD_DISPLAY" | "CURRENT_RENDERED_VIEW";
|
|
227
|
+
readonly displayTruncated: false;
|
|
228
|
+
readonly originalContentCompleteness: "NOT_ATTESTED";
|
|
229
|
+
readonly authorIdentity: "NOT_ATTESTED";
|
|
230
|
+
readonly parentMessageIdentity: "NOT_ATTESTED";
|
|
168
231
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
232
|
+
/** The occurrence is observed; its human identity has not been established.
|
|
233
|
+
* This is never a Participant, membership proof or permission to act for a person. */
|
|
234
|
+
export interface NativeGroupAuthorResolution {
|
|
235
|
+
readonly schemaVersion: 1;
|
|
236
|
+
readonly state: "UNRESOLVED";
|
|
237
|
+
readonly basis: "CURRENT_RENDERED_OCCURRENCE";
|
|
238
|
+
readonly evidenceDigest: string;
|
|
239
|
+
}
|
|
240
|
+
/** Accessible card/quote text is an observation, never a filename, MIME, URL or original bytes. */
|
|
241
|
+
export interface NativeRenderedMedia {
|
|
242
|
+
readonly schemaVersion: 1;
|
|
243
|
+
readonly kind: "SHARED_VIDEO_CARD" | "QUOTED_MEDIA_DISPLAY" | "NATIVE_FILE_DISPLAY" | "NATIVE_IMAGE_DISPLAY" | "NATIVE_VIDEO_DISPLAY" | "NATIVE_INBOUND_VOICE_DISPLAY";
|
|
244
|
+
readonly displayText: string;
|
|
245
|
+
readonly coverage: "RENDERED_CARD_ONLY" | "RENDERED_QUOTE_ONLY" | "RENDERED_NATIVE_MEDIA_ONLY";
|
|
246
|
+
readonly originalBytes: "NOT_ACQUIRED";
|
|
247
|
+
readonly originalContentCompleteness: "NOT_ATTESTED";
|
|
248
|
+
readonly authorIdentity: "NOT_ATTESTED";
|
|
249
|
+
readonly parentMessageIdentity: "NOT_ATTESTED";
|
|
250
|
+
}
|
|
251
|
+
export interface CommunicationPolicyBasis {
|
|
252
|
+
readonly policyRef: string;
|
|
253
|
+
readonly version: number;
|
|
254
|
+
readonly digest: string;
|
|
255
|
+
readonly matchedRuleRefs: readonly string[];
|
|
256
|
+
readonly basisDigest: string;
|
|
183
257
|
}
|
|
184
258
|
export interface CommunicationOwnership {
|
|
185
259
|
readonly kind: "COMMUNICATION";
|
|
@@ -211,6 +285,946 @@ export interface CommunicationOwnership {
|
|
|
211
285
|
readonly policyDigest: string;
|
|
212
286
|
};
|
|
213
287
|
}
|
|
288
|
+
export interface SocialMediaCaptureFailure {
|
|
289
|
+
readonly contentRef: string;
|
|
290
|
+
readonly sourceDigest: string;
|
|
291
|
+
readonly mediaRef: string;
|
|
292
|
+
readonly reasonCode: string;
|
|
293
|
+
}
|
|
294
|
+
/** Browser-backed Xiaohongshu scopes are separate from official API capabilities. */
|
|
295
|
+
export interface XiaohongshuScope {
|
|
296
|
+
readonly platform: "XIAOHONGSHU";
|
|
297
|
+
readonly surface: "SEARCH" | "NOTE" | "PROFILE" | "DIRECT" | "NOTIFICATIONS" | "INBOX";
|
|
298
|
+
readonly rootRef: string;
|
|
299
|
+
readonly audience: "PUBLIC" | "ACCOUNT_OWNED" | "PRIVATE";
|
|
300
|
+
readonly query?: string;
|
|
301
|
+
readonly peerRef?: string;
|
|
302
|
+
}
|
|
303
|
+
export interface XiaohongshuMediaSelection {
|
|
304
|
+
readonly assetRef: string;
|
|
305
|
+
readonly digest: string;
|
|
306
|
+
readonly sourceVersion: string;
|
|
307
|
+
readonly mediaType: string;
|
|
308
|
+
readonly byteLength: number;
|
|
309
|
+
readonly filename: string;
|
|
310
|
+
}
|
|
311
|
+
export interface XiaohongshuPublicationComponent {
|
|
312
|
+
readonly kind: "LOCATION" | "COLLECTION" | "MENTION" | "ACTIVITY" | "COMMERCIAL";
|
|
313
|
+
/** Identity observed from the normal platform UI, never a URL or a display-name guess. */
|
|
314
|
+
readonly id: string;
|
|
315
|
+
readonly name: string;
|
|
316
|
+
}
|
|
317
|
+
/** Current creator UI choices are part of the reviewed content, not local execution defaults. */
|
|
318
|
+
export interface XiaohongshuPublicationSettings {
|
|
319
|
+
readonly aiAssisted: boolean;
|
|
320
|
+
readonly original: boolean;
|
|
321
|
+
readonly allowCopy: boolean | null;
|
|
322
|
+
readonly scheduledAt: string | null;
|
|
323
|
+
/** NONE remains valid for existing reviewed messages and retained effects. */
|
|
324
|
+
readonly extras: "NONE" | {
|
|
325
|
+
readonly components: readonly XiaohongshuPublicationComponent[];
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
export type XiaohongshuIntent = {
|
|
329
|
+
readonly kind: "COMMENT" | "REPLY";
|
|
330
|
+
} | {
|
|
331
|
+
readonly kind: "DIRECT";
|
|
332
|
+
readonly assets?: readonly XiaohongshuMediaSelection[];
|
|
333
|
+
readonly presentation?: "VOICE_NOTE";
|
|
334
|
+
} | {
|
|
335
|
+
readonly kind: "LIKE" | "FAVORITE";
|
|
336
|
+
readonly value: boolean;
|
|
337
|
+
} | {
|
|
338
|
+
readonly kind: "SCHEDULE_CANCEL";
|
|
339
|
+
} | {
|
|
340
|
+
readonly kind: "SCHEDULE_RESCHEDULE";
|
|
341
|
+
readonly scheduledAt: string;
|
|
342
|
+
} | {
|
|
343
|
+
readonly kind: "PUBLISH";
|
|
344
|
+
readonly title: string;
|
|
345
|
+
readonly tags: readonly string[];
|
|
346
|
+
readonly visibility: "PUBLIC" | "SELF_ONLY" | "MUTUAL";
|
|
347
|
+
readonly assets: readonly XiaohongshuMediaSelection[];
|
|
348
|
+
readonly format?: "TEXT" | "IMAGE" | "VIDEO";
|
|
349
|
+
readonly settings?: XiaohongshuPublicationSettings;
|
|
350
|
+
};
|
|
351
|
+
export interface XiaohongshuNotification {
|
|
352
|
+
readonly kind: "LIKE" | "FAVORITE" | "FOLLOW" | "MENTION" | "COMMENT" | "REPLY";
|
|
353
|
+
readonly subjectRef: string;
|
|
354
|
+
readonly noteRef?: string;
|
|
355
|
+
readonly subjectKind?: "POST" | "COMMENT" | "REPLY";
|
|
356
|
+
readonly occurredAt?: string;
|
|
357
|
+
}
|
|
358
|
+
export interface XiaohongshuContentEvidence {
|
|
359
|
+
readonly accountRef: string;
|
|
360
|
+
readonly peerRef?: string;
|
|
361
|
+
readonly title?: string;
|
|
362
|
+
readonly media?: readonly {
|
|
363
|
+
readonly mediaRef: string;
|
|
364
|
+
readonly kind: "IMAGE" | "VIDEO" | "AUDIO";
|
|
365
|
+
readonly objectRef?: string;
|
|
366
|
+
readonly presentation?: "VOICE_NOTE";
|
|
367
|
+
}[];
|
|
368
|
+
readonly visibility?: "PUBLIC" | "SELF_ONLY" | "MUTUAL";
|
|
369
|
+
readonly tags?: readonly string[];
|
|
370
|
+
readonly settings?: XiaohongshuPublicationSettings;
|
|
371
|
+
readonly notification?: XiaohongshuNotification;
|
|
372
|
+
readonly card?: {
|
|
373
|
+
readonly kind: "NOTE";
|
|
374
|
+
readonly title: string;
|
|
375
|
+
readonly authorLabel: string;
|
|
376
|
+
readonly detail: "NOT_OBSERVED";
|
|
377
|
+
readonly cover: "PREVIEW_ONLY";
|
|
378
|
+
};
|
|
379
|
+
readonly unsupported?: {
|
|
380
|
+
readonly platformType: string;
|
|
381
|
+
readonly detail: "NOT_READ";
|
|
382
|
+
readonly reasonCode: "XIAOHONGSHU_MESSAGE_TYPE_NOT_MAPPED";
|
|
383
|
+
};
|
|
384
|
+
readonly replyTo?: {
|
|
385
|
+
readonly targetRef: string;
|
|
386
|
+
readonly authorRef: string;
|
|
387
|
+
readonly rootCommentRef: string;
|
|
388
|
+
};
|
|
389
|
+
readonly publicationOption?: XiaohongshuPublicationComponent;
|
|
390
|
+
readonly scheduledPublication?: {
|
|
391
|
+
readonly state: "PENDING" | "CANCELLED" | "PUBLISHED";
|
|
392
|
+
readonly scheduledAt: string | null;
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
export interface XiaohongshuTraversal {
|
|
396
|
+
readonly pagesVisited: number;
|
|
397
|
+
readonly expansions: number;
|
|
398
|
+
readonly scrolls?: number;
|
|
399
|
+
readonly stoppedBy: "EXHAUSTED" | "PAGE_LIMIT" | "ITEM_LIMIT" | "NO_PROGRESS" | "CURRENT_VIEW" | "TIME_LIMIT" | "CONTROL_LIMIT";
|
|
400
|
+
readonly nextAfterContentRef: string | null;
|
|
401
|
+
readonly nextPageCursor?: string | null;
|
|
402
|
+
readonly direction?: "FORWARD" | "BACKWARD";
|
|
403
|
+
readonly nextBeforeContentRef?: string | null;
|
|
404
|
+
readonly beforeContentRef?: string | null;
|
|
405
|
+
readonly startedAt: string;
|
|
406
|
+
readonly finishedAt: string;
|
|
407
|
+
}
|
|
408
|
+
export type BrowserSocialPlatform = typeof BROWSER_SOCIAL_PLATFORMS[number];
|
|
409
|
+
export interface BrowserAccountActivityView {
|
|
410
|
+
readonly tenantId: string;
|
|
411
|
+
readonly profileRef: string;
|
|
412
|
+
readonly revision: number;
|
|
413
|
+
readonly state: "READY" | "WAITING" | "PAUSED";
|
|
414
|
+
readonly nextAllowedAt: string;
|
|
415
|
+
readonly pauseRef: string | null;
|
|
416
|
+
readonly reasonCode: string | null;
|
|
417
|
+
}
|
|
418
|
+
export interface BrowserAccountView extends BrowserAccountActivityView {
|
|
419
|
+
readonly platform: BrowserSocialPlatform;
|
|
420
|
+
readonly externalAccountRef: string;
|
|
421
|
+
}
|
|
422
|
+
export interface EngagementControl {
|
|
423
|
+
readonly tenantId: string;
|
|
424
|
+
readonly engagementRef: string;
|
|
425
|
+
readonly version: number;
|
|
426
|
+
readonly state: "AGENT_CONTROLLED" | "HANDOFF_REQUESTED" | "HUMAN_CONTROLLED";
|
|
427
|
+
readonly controlScope: "ENGAGEMENT_OUTBOUND_AUTOMATION";
|
|
428
|
+
readonly handoffRef?: string;
|
|
429
|
+
readonly requestedBy?: string;
|
|
430
|
+
readonly requestedAt?: string;
|
|
431
|
+
readonly reason?: string;
|
|
432
|
+
readonly assigneeRef?: string;
|
|
433
|
+
readonly controlledBy?: string;
|
|
434
|
+
readonly controlledAt?: string;
|
|
435
|
+
readonly resumedBy?: string;
|
|
436
|
+
readonly resumedAt?: string;
|
|
437
|
+
readonly sessionCorrelationRef?: string;
|
|
438
|
+
}
|
|
439
|
+
export interface WechatAutonomy {
|
|
440
|
+
readonly enabled: boolean;
|
|
441
|
+
readonly version: number;
|
|
442
|
+
readonly delegatePrincipalRef: string;
|
|
443
|
+
readonly expiresAt?: string;
|
|
444
|
+
readonly configuredBy: string;
|
|
445
|
+
}
|
|
446
|
+
export interface SocialAutonomy extends WechatAutonomy {
|
|
447
|
+
readonly expiresAt: string;
|
|
448
|
+
readonly maxReplies: number;
|
|
449
|
+
readonly factRef: string;
|
|
450
|
+
}
|
|
451
|
+
export interface WechatChannelsFeedObservation {
|
|
452
|
+
readonly protocol: 1;
|
|
453
|
+
readonly authorIdentity: "NOT_ATTESTED";
|
|
454
|
+
readonly contentIdentity: "NOT_ATTESTED";
|
|
455
|
+
readonly directReplyTarget: "NOT_ATTESTED";
|
|
456
|
+
readonly ownReaction: "NOT_ATTESTED";
|
|
457
|
+
readonly following: "NOT_ATTESTED";
|
|
458
|
+
readonly visibleText: readonly {
|
|
459
|
+
readonly captureKey: string;
|
|
460
|
+
readonly text: string;
|
|
461
|
+
}[];
|
|
462
|
+
readonly dynamicRead: {
|
|
463
|
+
readonly basis: "EXACT_FINDER_PROGRESS_ONLY";
|
|
464
|
+
readonly firstObservedAt: string;
|
|
465
|
+
readonly secondObservedAt: string;
|
|
466
|
+
readonly firstRawDigest: string;
|
|
467
|
+
readonly secondRawDigest: string;
|
|
468
|
+
readonly firstTreeDigest: string;
|
|
469
|
+
readonly secondTreeDigest: string;
|
|
470
|
+
readonly comparisonDigest: string;
|
|
471
|
+
readonly firstValue: string;
|
|
472
|
+
readonly secondValue: string;
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
export type WechatObservationIntent = "CURRENT_VIEW" | "REFRESH_CURRENT_OFFICIAL_ARTICLE";
|
|
476
|
+
export type WechatOfficialPage = "OFFICIAL_DIRECTORY" | "OFFICIAL_ACCOUNT_LIST" | "OFFICIAL_ACCOUNT_HOME" | "OFFICIAL_ACCOUNT_PROFILE" | "OFFICIAL_ARTICLE" | "OFFICIAL_ARTICLE_FAILED" | "OFFICIAL_ARTICLE_COMMENTS" | "OFFICIAL_ARTICLE_UNEXPOSED";
|
|
477
|
+
export type WechatOfficialReason = "CURRENT_VIEW_OBSERVED" | "ARTICLE_DNS_FAILED" | "ARTICLE_LOAD_FAILED" | "ARTICLE_LOADING" | "ARTICLE_CONTENT_NOT_EXPOSED" | "OFFICIAL_STRUCTURE_UNSUPPORTED" | "OFFICIAL_SAFE_DOMAIN_NOT_PROVEN";
|
|
478
|
+
export interface WechatOfficialRow {
|
|
479
|
+
readonly captureKey: string;
|
|
480
|
+
readonly kind: "ACCOUNT_LABEL" | "NEWS_PREVIEW" | "ARTICLE_PREVIEW" | "SECTION_LABEL" | "PROFILE_FIELD" | "TEXT_BLOCK" | "INLINE_FRAGMENT" | "INTERACTION_LABEL" | "COMMENT_COMPOSITE";
|
|
481
|
+
readonly text: string;
|
|
482
|
+
readonly label: string | null;
|
|
483
|
+
readonly timeLabel: string | null;
|
|
484
|
+
readonly parentKey: string | null;
|
|
485
|
+
readonly visibility: "FULLY_VISIBLE" | "CLIPPED";
|
|
486
|
+
readonly partial: boolean;
|
|
487
|
+
readonly rowNumber: number | null;
|
|
488
|
+
}
|
|
489
|
+
export interface WechatOfficialObservation {
|
|
490
|
+
readonly observationIntent: WechatObservationIntent;
|
|
491
|
+
readonly viewer: "NOT_ATTESTED";
|
|
492
|
+
readonly status: "OBSERVED" | "GAP";
|
|
493
|
+
readonly reasonCode: WechatOfficialReason;
|
|
494
|
+
readonly safeDomain: "mp.weixin.qq.com" | null;
|
|
495
|
+
readonly refreshPerformed: boolean;
|
|
496
|
+
readonly accountSelection: "NOT_ATTESTED";
|
|
497
|
+
readonly accountLabel: string | null;
|
|
498
|
+
readonly domainExposure: "EXPOSED" | "NOT_EXPOSED";
|
|
499
|
+
readonly refreshQualification: "NOT_REQUESTED" | "SAFE_DOMAIN_NATIVE_MENU" | "OFFICIAL_ACCOUNT_NATIVE_MENU";
|
|
500
|
+
readonly article: {
|
|
501
|
+
readonly title: string | null;
|
|
502
|
+
readonly byline: string | null;
|
|
503
|
+
readonly publisherLabel: string | null;
|
|
504
|
+
readonly publishedLabel: string | null;
|
|
505
|
+
};
|
|
506
|
+
readonly identityClue: {
|
|
507
|
+
readonly namespace: "OFFICIAL_ACCOUNT";
|
|
508
|
+
readonly clueKind: "OFFICIAL_ACCOUNT_ID";
|
|
509
|
+
readonly value: string;
|
|
510
|
+
readonly basis: "VISIBLE_PROFILE_FIELD";
|
|
511
|
+
readonly verification: "UI_DISPLAY_ONLY";
|
|
512
|
+
} | null;
|
|
513
|
+
readonly rows: readonly WechatOfficialRow[];
|
|
514
|
+
readonly commentCountLabel: string | null;
|
|
515
|
+
readonly coverage: {
|
|
516
|
+
readonly fullText: "NOT_ATTESTED";
|
|
517
|
+
readonly comments: "NOT_ATTESTED";
|
|
518
|
+
readonly excludedUnderlay: boolean;
|
|
519
|
+
readonly excludedOffscreen: boolean;
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
/** A transient display observation, never a SocialContent, Participant or write target. */
|
|
523
|
+
export interface WechatSocialWindowContent {
|
|
524
|
+
readonly captureKey: string;
|
|
525
|
+
readonly kind: "MOMENT_CARD" | "CHANNELS_SNIPPET" | "CHANNELS_AUTHOR_DESCRIPTION";
|
|
526
|
+
readonly authorLabel: string | null;
|
|
527
|
+
readonly text: string;
|
|
528
|
+
readonly timeLabel: string | null;
|
|
529
|
+
readonly expandable: boolean;
|
|
530
|
+
readonly partial: boolean;
|
|
531
|
+
readonly plane: "FOREGROUND" | "UNDERLAY";
|
|
532
|
+
readonly visibleMediaItems: number;
|
|
533
|
+
readonly declaredMediaTotal: number | null;
|
|
534
|
+
}
|
|
535
|
+
export interface WechatSocialWindowComment {
|
|
536
|
+
readonly captureKey: string;
|
|
537
|
+
readonly kind: "ROOT_COMMENT" | "THREAD_REPLY";
|
|
538
|
+
readonly authorLabel: string;
|
|
539
|
+
readonly text: string;
|
|
540
|
+
readonly timeLabel: string;
|
|
541
|
+
readonly authorBadgeObserved: boolean;
|
|
542
|
+
readonly threadRootKey: string | null;
|
|
543
|
+
readonly relationBasis: "ROOT_ROW_STRUCTURE" | "VISIBLE_GROUPED_REPLY_ROW";
|
|
544
|
+
readonly directReplyTarget: "NOT_ATTESTED";
|
|
545
|
+
}
|
|
546
|
+
export interface WechatSocialRenderedWindow {
|
|
547
|
+
/** v1 remains the original feed/Channels/Works shape; v2 is the closed current Moments detail preview. */
|
|
548
|
+
readonly schemaVersion: 1 | 2 | 3 | 4;
|
|
549
|
+
readonly channelsFeed?: WechatChannelsFeedObservation;
|
|
550
|
+
readonly official?: WechatOfficialObservation;
|
|
551
|
+
readonly observationRef: string;
|
|
552
|
+
readonly observedAt: string;
|
|
553
|
+
readonly page: WechatOfficialPage | "MOMENTS_FEED" | "MOMENTS_DETAIL" | "CHANNELS_COMMENTS" | "CHANNELS_FEED" | "WORKS_ENTRY" | "WORKS_MEDIA_PERMISSION_NOTICE" | "WORKS_TEXT_COVER_PREVIEW";
|
|
554
|
+
readonly identityBasis: "UNBOUND_UI_LABELS_ONLY";
|
|
555
|
+
readonly referenceLifetime: "CURRENT_OBSERVATION_ONLY";
|
|
556
|
+
readonly coverage: "BOUNDED_CURRENT_RENDERED_VIEW";
|
|
557
|
+
readonly completeness: "NOT_ATTESTED";
|
|
558
|
+
readonly publicationAudience: "NOT_ATTESTED";
|
|
559
|
+
readonly businessActionsPermitted: false;
|
|
560
|
+
readonly partial: boolean;
|
|
561
|
+
readonly truncated: boolean;
|
|
562
|
+
readonly commentsCoverage: "NOT_OBSERVED" | "CURRENT_VISIBLE_ROWS_ONLY";
|
|
563
|
+
readonly commentCountLabel: string | null;
|
|
564
|
+
readonly content: readonly WechatSocialWindowContent[];
|
|
565
|
+
readonly comments: readonly WechatSocialWindowComment[];
|
|
566
|
+
readonly partialRows: readonly {
|
|
567
|
+
readonly captureKey: string;
|
|
568
|
+
readonly reasonCode: "ANDROID_WECHAT_SOCIAL_MOMENT_CONTINUES_OUTSIDE_VIEW" | "ANDROID_WECHAT_SOCIAL_COMMENT_BODY_NOT_RENDERED";
|
|
569
|
+
}[];
|
|
570
|
+
readonly notices: readonly string[];
|
|
571
|
+
}
|
|
572
|
+
/** Added only to the existing authorized WeChat Social query; no independent submission authority. */
|
|
573
|
+
export interface WechatSocialReadAttemptView {
|
|
574
|
+
readonly dispatchRef: string;
|
|
575
|
+
readonly state: "QUEUED" | "CLAIMED" | "RESOURCE_READY" | "RUNNING" | "RESULT_RECORDED" | "NEEDS_RECONCILIATION" | "ABORTED";
|
|
576
|
+
readonly physicalIdle: boolean;
|
|
577
|
+
readonly createdAt: string;
|
|
578
|
+
readonly reasonCode?: string;
|
|
579
|
+
readonly renderedObservation?: {
|
|
580
|
+
readonly observationRef: string;
|
|
581
|
+
readonly observedAt: string;
|
|
582
|
+
readonly evidenceDigest: string;
|
|
583
|
+
readonly renderedWindow: WechatSocialRenderedWindow;
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
export type WechatSocialSurface = "MOMENTS" | "CHANNELS" | "OFFICIAL_ARTICLE" | "WORKS";
|
|
587
|
+
export interface WechatSocialContentScope {
|
|
588
|
+
readonly platform: "WECHAT";
|
|
589
|
+
readonly surface: WechatSocialSurface;
|
|
590
|
+
/** 原 Owner 登记的视图内定位引用,不是昵称摘要或永久平台对象 ID。 */
|
|
591
|
+
readonly rootRef: string;
|
|
592
|
+
readonly audience: "CURRENT_ACCOUNT_VISIBLE" | "FRIENDS" | "MUTUAL_FRIENDS" | "SELECTED_PARTICIPANTS" | "SELF_ONLY";
|
|
593
|
+
readonly audienceParticipantRefs?: readonly string[];
|
|
594
|
+
}
|
|
595
|
+
export interface WechatSocialAuthorEvidence {
|
|
596
|
+
readonly identitySpace: "PERSONAL_WECHAT" | "CHANNELS" | "OFFICIAL_ACCOUNT" | "WORKS";
|
|
597
|
+
readonly externalRef: string;
|
|
598
|
+
readonly evidenceDigest: string;
|
|
599
|
+
/** Explicit current Owner clue snapshot; never a platform authentication claim. */
|
|
600
|
+
readonly ownerIdentity?: {
|
|
601
|
+
readonly schemaVersion: 1;
|
|
602
|
+
readonly identityVersion: number;
|
|
603
|
+
readonly externalIdentityVersion: number;
|
|
604
|
+
readonly clueRef: string;
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
/** 原 Owner 内部端口的受信读取依据;公共请求不能提交此 authority。 */
|
|
608
|
+
export interface SocialRenderedReadAuthority {
|
|
609
|
+
readonly tenantId: string;
|
|
610
|
+
readonly engagementRef: string;
|
|
611
|
+
readonly conversationRef: string;
|
|
612
|
+
readonly profileRef: string;
|
|
613
|
+
readonly accountRef: string;
|
|
614
|
+
readonly hostRef: string;
|
|
615
|
+
readonly hostBindingDigest: string;
|
|
616
|
+
readonly runtimeKind: "MOBILE";
|
|
617
|
+
readonly conversationRevision: number;
|
|
618
|
+
readonly membershipDigest: string;
|
|
619
|
+
}
|
|
620
|
+
export interface WechatSocialVisibility {
|
|
621
|
+
readonly basis: "CURRENT_ACCOUNT_RENDERED_VIEW";
|
|
622
|
+
readonly comments: "CURRENT_VISIBLE_ONLY" | "MUTUAL_FRIENDS_VISIBLE";
|
|
623
|
+
/** 看见内容或部分共同好友评论不证明发表时的完整受众。 */
|
|
624
|
+
readonly publicationAudience: "NOT_ATTESTED";
|
|
625
|
+
}
|
|
626
|
+
export interface WechatSocialReadEvidence {
|
|
627
|
+
readonly schemaVersion: 1;
|
|
628
|
+
readonly observationRef: string;
|
|
629
|
+
readonly binding: SocialRenderedReadAuthority;
|
|
630
|
+
readonly evidenceKind: "ANDROID_UI_AUTOMATION";
|
|
631
|
+
readonly targetIdentity: "OWNER_SELECTED_VIEW";
|
|
632
|
+
readonly coverage: "BOUNDED_CURRENT_RENDERED_VIEW";
|
|
633
|
+
readonly contentCoverage: "RENDERED_TEXT_AND_STRUCTURE_ONLY";
|
|
634
|
+
readonly evidenceDigest: string;
|
|
635
|
+
readonly visibility: WechatSocialVisibility;
|
|
636
|
+
}
|
|
637
|
+
export type XiaohongshuActivityView = BrowserAccountActivityView;
|
|
638
|
+
export interface XiaohongshuScheduleHistory {
|
|
639
|
+
readonly coverage: "RETAINED_OWNER_EXACT_OBJECT_ASSOCIATIONS";
|
|
640
|
+
readonly platformCurrentness: "NOT_ATTESTED";
|
|
641
|
+
readonly truncated: boolean;
|
|
642
|
+
/** SQL history uses original outbox sequence, newest first, independent of observed clock. */
|
|
643
|
+
readonly items: readonly {
|
|
644
|
+
readonly messageRef: string;
|
|
645
|
+
readonly requestRef: string | null;
|
|
646
|
+
readonly kind: "PUBLISH" | "SCHEDULE_CANCEL" | "SCHEDULE_RESCHEDULE";
|
|
647
|
+
readonly status: string;
|
|
648
|
+
readonly approvedScheduledAt: string | null;
|
|
649
|
+
readonly objectRef: string | null;
|
|
650
|
+
readonly originalPublicationRequestRef: string | null;
|
|
651
|
+
readonly association: "EXACT_OBJECT" | "MISSING_PROOF" | "CONFLICT";
|
|
652
|
+
readonly currentObservation: {
|
|
653
|
+
readonly factRef: string;
|
|
654
|
+
readonly observedAt: string;
|
|
655
|
+
readonly state: "PENDING" | "CANCELLED" | "PUBLISHED";
|
|
656
|
+
readonly scheduledAt: string | null;
|
|
657
|
+
} | null;
|
|
658
|
+
}[];
|
|
659
|
+
}
|
|
660
|
+
export interface FacebookSocialScope {
|
|
661
|
+
readonly platform: "FACEBOOK";
|
|
662
|
+
readonly surface: "OWN_POSTS";
|
|
663
|
+
readonly rootRef: string;
|
|
664
|
+
readonly audience: "ACCOUNT_OWNED";
|
|
665
|
+
}
|
|
666
|
+
/** 只保留正文片段的实际覆盖,不推定公开范围、完整历史或平台最终状态。 */
|
|
667
|
+
export interface FacebookPostContent {
|
|
668
|
+
readonly accountRef: string;
|
|
669
|
+
readonly profileUrl: string;
|
|
670
|
+
readonly postUrl: string;
|
|
671
|
+
readonly textDigest: string;
|
|
672
|
+
readonly truncated: boolean;
|
|
673
|
+
readonly coverage: "BOUNDED_RENDERED_POST_TEXT";
|
|
674
|
+
readonly completeness: "NOT_ATTESTED";
|
|
675
|
+
readonly media: "NOT_CAPTURED";
|
|
676
|
+
}
|
|
677
|
+
/** 评论作者只绑定已观察 Profile 链接;父帖固定到同一 Source Owner 的已保留事实版本。 */
|
|
678
|
+
export interface FacebookCommentContent extends Omit<FacebookPostContent, "coverage"> {
|
|
679
|
+
readonly coverage: "BOUNDED_RENDERED_ROOT_COMMENT_TEXT";
|
|
680
|
+
readonly commentRef: string;
|
|
681
|
+
readonly commentUrl: string;
|
|
682
|
+
readonly authorUrl: string;
|
|
683
|
+
readonly authorIdentity: "OBSERVED_PROFILE_LINK_ONLY";
|
|
684
|
+
readonly postTextDigest: string;
|
|
685
|
+
readonly postTruncated: boolean;
|
|
686
|
+
readonly postSourceFactRef: string;
|
|
687
|
+
}
|
|
688
|
+
/** 原签名 Node 报告的去敏引用;Work/Invocation 关联另由原 Work receipt 保留。 */
|
|
689
|
+
export interface FacebookPostCapture {
|
|
690
|
+
readonly protocol: 1;
|
|
691
|
+
readonly profileRef: string;
|
|
692
|
+
readonly accountRef: string;
|
|
693
|
+
readonly externalAccountRef: string;
|
|
694
|
+
readonly dispatchRef: string;
|
|
695
|
+
readonly reportDigest: string;
|
|
696
|
+
readonly hostBindingDigest: string;
|
|
697
|
+
readonly moduleDigest: string;
|
|
698
|
+
readonly observedAt: string;
|
|
699
|
+
}
|
|
700
|
+
export interface FacebookReplyWaiting {
|
|
701
|
+
kind: "ACCOUNT_PAUSED" | "ACCOUNT_BUDGET" | "NODE_UNAVAILABLE" | "NODE_POLICY" | "CLIENT_RELAY" | "PLACEMENT_CHANGED" | "RESOURCE_BUSY" | "PHYSICAL_RECOVERY";
|
|
702
|
+
reasonCode: string;
|
|
703
|
+
nextCheckAt: string | null;
|
|
704
|
+
effect: "NONE";
|
|
705
|
+
}
|
|
706
|
+
export type SocialApiPlatform = "YOUTUBE" | "TIKTOK";
|
|
707
|
+
export interface SocialApiContentScope {
|
|
708
|
+
platform: SocialApiPlatform;
|
|
709
|
+
rootRef: string;
|
|
710
|
+
audience: "PUBLIC" | "ACCOUNT_OWNED";
|
|
711
|
+
}
|
|
712
|
+
export type SocialContentScope = SocialApiContentScope | WechatSocialContentScope | XiaohongshuScope | BrowserSocialScope | FacebookSocialScope;
|
|
713
|
+
export interface SocialContentRecord {
|
|
714
|
+
contentRef: string;
|
|
715
|
+
rootRef: string;
|
|
716
|
+
parentRef: string | null;
|
|
717
|
+
threadRef?: string;
|
|
718
|
+
authorRef: string;
|
|
719
|
+
text: string;
|
|
720
|
+
kind: "POST" | "COMMENT" | "REPLY" | "MESSAGE" | "ACCOUNT" | "THREAD" | "NOTIFICATION" | "OPTION";
|
|
721
|
+
xiaohongshu?: XiaohongshuContentEvidence;
|
|
722
|
+
browser?: BrowserSocialEvidence;
|
|
723
|
+
facebook?: FacebookPostContent | FacebookCommentContent;
|
|
724
|
+
sourceVersion: string;
|
|
725
|
+
contentDigest: string;
|
|
726
|
+
observedAt: string;
|
|
727
|
+
/** 仅原生微信内容使用,authorRef 指向原 Participant;API 作者引用原样保留。 */
|
|
728
|
+
wechatAuthor?: WechatSocialAuthorEvidence;
|
|
729
|
+
replyToAuthorRef?: string;
|
|
730
|
+
}
|
|
731
|
+
export interface SocialReadFrameBase {
|
|
732
|
+
profileRef: string;
|
|
733
|
+
externalAccountRef: string;
|
|
734
|
+
observedAt: string;
|
|
735
|
+
contents: readonly SocialContentRecord[];
|
|
736
|
+
completeness: "NOT_ATTESTED";
|
|
737
|
+
}
|
|
738
|
+
export interface WechatSocialReadFrame extends SocialReadFrameBase, WechatSocialReadEvidence {
|
|
739
|
+
scope: WechatSocialContentScope;
|
|
740
|
+
readonly renderedWindow?: WechatSocialRenderedWindow;
|
|
741
|
+
}
|
|
742
|
+
export interface SocialOperationView {
|
|
743
|
+
tenantId: string;
|
|
744
|
+
profileRef: string;
|
|
745
|
+
engagementRef: string;
|
|
746
|
+
conversationRef: string;
|
|
747
|
+
dispatchRef: string;
|
|
748
|
+
action: string;
|
|
749
|
+
state: string;
|
|
750
|
+
physicalIdle: boolean;
|
|
751
|
+
requestRef: string | null;
|
|
752
|
+
reasonCode: string | null;
|
|
753
|
+
browserActivity?: XiaohongshuActivityView;
|
|
754
|
+
installedCapabilities?: BrowserInstalledCapabilities;
|
|
755
|
+
browserRead?: BrowserSocialReadWindow;
|
|
756
|
+
facebookWaiting?: FacebookReplyWaiting;
|
|
757
|
+
}
|
|
758
|
+
export interface SocialContentProjection extends SocialContentRecord {
|
|
759
|
+
revision: number;
|
|
760
|
+
factRef: string;
|
|
761
|
+
source: SourceObservation;
|
|
762
|
+
historicalContext?: true;
|
|
763
|
+
messageOrder?: {
|
|
764
|
+
previousRef: string | null;
|
|
765
|
+
nextRef: string | null;
|
|
766
|
+
};
|
|
767
|
+
renderedEvidence?: WechatSocialReadEvidence;
|
|
768
|
+
}
|
|
769
|
+
export interface SocialContentPage {
|
|
770
|
+
tenantId: string;
|
|
771
|
+
engagementRef: string;
|
|
772
|
+
conversationRef: string;
|
|
773
|
+
profileRef: string;
|
|
774
|
+
items: readonly Omit<SocialContentProjection, "source">[];
|
|
775
|
+
nextCursor: string | null;
|
|
776
|
+
consistency: "SNAPSHOT" | "LIVE";
|
|
777
|
+
coverage: "RETAINED_CANONICAL_OBSERVATIONS";
|
|
778
|
+
platformCurrentness: "NOT_ATTESTED";
|
|
779
|
+
}
|
|
780
|
+
export interface SocialTextMessage extends TextChannelMessage {
|
|
781
|
+
readonly acceptedScheduleObjectRef?: string;
|
|
782
|
+
readonly externalObjectRef?: string;
|
|
783
|
+
readonly delegation?: {
|
|
784
|
+
readonly version: number;
|
|
785
|
+
readonly factRef: string;
|
|
786
|
+
};
|
|
787
|
+
readonly channel: "SOCIAL";
|
|
788
|
+
readonly executionPlacementDigest?: string;
|
|
789
|
+
readonly conversationRef: string;
|
|
790
|
+
readonly senderParticipantRef: string;
|
|
791
|
+
readonly xiaohongshuIntent?: XiaohongshuIntent;
|
|
792
|
+
readonly browserIntent?: BrowserSocialIntent;
|
|
793
|
+
readonly browserPublication?: BrowserPublicationObservation;
|
|
794
|
+
readonly socialTarget: (SocialApiContentScope | XiaohongshuScope | BrowserSocialScope | FacebookSocialScope) & {
|
|
795
|
+
targetRef: string;
|
|
796
|
+
sourceFactRef: string;
|
|
797
|
+
sourceVersion: string;
|
|
798
|
+
sourceDigest: string;
|
|
799
|
+
conversationRevision: number;
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
export interface SocialConversationView {
|
|
803
|
+
readonly xiaohongshuScheduleHistory?: XiaohongshuScheduleHistory;
|
|
804
|
+
tenantId: string;
|
|
805
|
+
conversationRef: string;
|
|
806
|
+
profileRef: string;
|
|
807
|
+
scope: SocialContentScope;
|
|
808
|
+
revision: number;
|
|
809
|
+
contents: readonly Omit<SocialContentProjection, "source">[];
|
|
810
|
+
messages: readonly (Pick<SocialTextMessage, "messageRef" | "version" | "contentDigest" | "text" | "socialTarget" | "xiaohongshuIntent" | "browserIntent" | "browserPublication" | "externalObjectRef" | "acceptedScheduleObjectRef" | "status"> & {
|
|
811
|
+
requestRef: string | null;
|
|
812
|
+
})[];
|
|
813
|
+
dispatches: readonly {
|
|
814
|
+
dispatchRef: string;
|
|
815
|
+
action: string;
|
|
816
|
+
state: string;
|
|
817
|
+
physicalIdle: boolean;
|
|
818
|
+
createdAt: string;
|
|
819
|
+
requestRef: string | null;
|
|
820
|
+
reasonCode?: string | null;
|
|
821
|
+
}[];
|
|
822
|
+
controlVersion: number;
|
|
823
|
+
readonly autonomy?: SocialAutonomy;
|
|
824
|
+
readonly xiaohongshuRead?: {
|
|
825
|
+
dispatchRef: string;
|
|
826
|
+
traversal: XiaohongshuTraversal;
|
|
827
|
+
contentRefs?: readonly string[];
|
|
828
|
+
captureFailures?: readonly SocialMediaCaptureFailure[];
|
|
829
|
+
};
|
|
830
|
+
readonly browserRead?: BrowserSocialReadWindow & {
|
|
831
|
+
readonly dispatchRef: string;
|
|
832
|
+
};
|
|
833
|
+
readonly browserCapture?: {
|
|
834
|
+
readonly basis: "INSTALLED_NODE_PORT";
|
|
835
|
+
readonly available: boolean;
|
|
836
|
+
readonly reasonCode: string | null;
|
|
837
|
+
};
|
|
838
|
+
readonly registrationContext?: SocialRegistrationContext;
|
|
839
|
+
readonly targetRegistration?: SocialTargetRegistrationView;
|
|
840
|
+
readonly socialRegistration?: SocialRegistrationMetadata;
|
|
841
|
+
readonly publicationRegistration?: SocialPublicationRegistration;
|
|
842
|
+
readonly readAttempt?: WechatSocialReadAttemptView;
|
|
843
|
+
}
|
|
844
|
+
/** transport 为必填判别项,旧 TIKTOK API scope 不会被重新解释成网页授权。 */
|
|
845
|
+
export interface BrowserSocialScope {
|
|
846
|
+
readonly platform: Exclude<BrowserSocialPlatform, "XIAOHONGSHU">;
|
|
847
|
+
readonly transport: "BROWSER";
|
|
848
|
+
readonly surface: "SEARCH" | "VIDEO" | "PROFILE" | "DIRECT" | "NOTIFICATIONS" | "INBOX";
|
|
849
|
+
readonly rootRef: string;
|
|
850
|
+
readonly audience: "PUBLIC" | "ACCOUNT_OWNED" | "PRIVATE";
|
|
851
|
+
readonly query?: string;
|
|
852
|
+
readonly peerRef?: string;
|
|
853
|
+
}
|
|
854
|
+
export interface BrowserMediaSelection {
|
|
855
|
+
readonly assetRef: string;
|
|
856
|
+
readonly digest: string;
|
|
857
|
+
readonly sourceVersion: string;
|
|
858
|
+
readonly mediaType: string;
|
|
859
|
+
readonly byteLength: number;
|
|
860
|
+
readonly filename: string;
|
|
861
|
+
}
|
|
862
|
+
export interface BrowserPublicationSettings {
|
|
863
|
+
readonly aiAssisted: boolean | null;
|
|
864
|
+
readonly original: boolean | null;
|
|
865
|
+
readonly commercial: boolean | null;
|
|
866
|
+
readonly allowComments: boolean | null;
|
|
867
|
+
readonly scheduledAt: string | null;
|
|
868
|
+
readonly timeZone: string;
|
|
869
|
+
}
|
|
870
|
+
export type BrowserSocialIntent = {
|
|
871
|
+
readonly kind: "COMMENT" | "REPLY";
|
|
872
|
+
} | {
|
|
873
|
+
readonly kind: "SCHEDULE_CANCEL";
|
|
874
|
+
} | {
|
|
875
|
+
readonly kind: "SCHEDULE_RESCHEDULE";
|
|
876
|
+
readonly scheduledAt: string;
|
|
877
|
+
readonly timeZone: string;
|
|
878
|
+
} | {
|
|
879
|
+
readonly kind: "DIRECT";
|
|
880
|
+
readonly assets?: readonly BrowserMediaSelection[];
|
|
881
|
+
} | {
|
|
882
|
+
readonly kind: "PUBLISH";
|
|
883
|
+
readonly title: string;
|
|
884
|
+
readonly tags: readonly string[];
|
|
885
|
+
readonly visibility: "PUBLIC" | "SELF_ONLY" | "FRIENDS";
|
|
886
|
+
readonly video: BrowserMediaSelection;
|
|
887
|
+
readonly cover?: BrowserMediaSelection;
|
|
888
|
+
readonly settings: BrowserPublicationSettings;
|
|
889
|
+
};
|
|
890
|
+
export interface BrowserSocialEvidence {
|
|
891
|
+
readonly accountRef: string;
|
|
892
|
+
readonly peerRef?: string;
|
|
893
|
+
readonly title?: string;
|
|
894
|
+
readonly media?: readonly {
|
|
895
|
+
readonly mediaRef: string;
|
|
896
|
+
readonly kind: "IMAGE" | "VIDEO" | "AUDIO";
|
|
897
|
+
}[];
|
|
898
|
+
readonly replyTo?: {
|
|
899
|
+
readonly targetRef: string;
|
|
900
|
+
readonly authorRef: string;
|
|
901
|
+
readonly rootCommentRef: string;
|
|
902
|
+
};
|
|
903
|
+
readonly unsupported?: {
|
|
904
|
+
readonly platformType: string;
|
|
905
|
+
readonly detail: "NOT_READ";
|
|
906
|
+
readonly reasonCode: "BROWSER_MESSAGE_TYPE_NOT_MAPPED";
|
|
907
|
+
};
|
|
908
|
+
readonly notification?: {
|
|
909
|
+
readonly kind: "COMMENT" | "REPLY" | "MENTION";
|
|
910
|
+
readonly subjectRef: string;
|
|
911
|
+
readonly videoRef: string;
|
|
912
|
+
readonly occurredAt: string;
|
|
913
|
+
readonly visibility?: "PUBLIC" | "SELF_ONLY" | "FRIENDS" | "UNKNOWN";
|
|
914
|
+
};
|
|
915
|
+
readonly publication?: {
|
|
916
|
+
readonly state: "PROCESSING" | "REVIEW_PENDING" | "PUBLISHED" | "REJECTED" | "SCHEDULED" | "CANCELLED";
|
|
917
|
+
readonly scheduledAt: string | null;
|
|
918
|
+
readonly visibility?: "PUBLIC" | "SELF_ONLY" | "FRIENDS" | "UNKNOWN";
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
export type BrowserPublicationObservation = NonNullable<BrowserSocialEvidence["publication"]> & {
|
|
922
|
+
readonly objectRef: string;
|
|
923
|
+
readonly observedAt: string;
|
|
924
|
+
readonly reviewRequired: boolean;
|
|
925
|
+
};
|
|
926
|
+
export interface BrowserSocialReadOptions {
|
|
927
|
+
readonly view?: "CONTENT" | "CAPABILITIES" | "PUBLICATIONS" | "SCHEDULED";
|
|
928
|
+
readonly pageLimit?: number;
|
|
929
|
+
readonly maxItems?: number;
|
|
930
|
+
readonly maxExpansions?: number;
|
|
931
|
+
readonly maxScrolls?: number;
|
|
932
|
+
readonly direction?: "FORWARD" | "BACKWARD";
|
|
933
|
+
readonly resumeBeforeContentRef?: string;
|
|
934
|
+
readonly resumeAfterContentRef?: string;
|
|
935
|
+
readonly captureMedia?: boolean;
|
|
936
|
+
}
|
|
937
|
+
export interface BrowserSocialTraversal {
|
|
938
|
+
readonly pagesVisited: number;
|
|
939
|
+
readonly expansions: number;
|
|
940
|
+
readonly scrolls: number;
|
|
941
|
+
readonly stoppedBy: "EXHAUSTED" | "PAGE_LIMIT" | "ITEM_LIMIT" | "NO_PROGRESS" | "CURRENT_VIEW" | "TIME_LIMIT" | "CONTROL_LIMIT";
|
|
942
|
+
readonly nextAfterContentRef: string | null;
|
|
943
|
+
readonly nextBeforeContentRef: string | null;
|
|
944
|
+
readonly direction: "FORWARD" | "BACKWARD";
|
|
945
|
+
readonly beforeContentRef: string | null;
|
|
946
|
+
readonly afterContentRef: string | null;
|
|
947
|
+
readonly startedAt: string;
|
|
948
|
+
readonly finishedAt: string;
|
|
949
|
+
}
|
|
950
|
+
export interface BrowserInstalledCapabilities {
|
|
951
|
+
readonly basis: "INSTALLED_MAPPING";
|
|
952
|
+
readonly capabilities: readonly {
|
|
953
|
+
readonly name: string;
|
|
954
|
+
readonly available: boolean;
|
|
955
|
+
readonly reasonCode: string | null;
|
|
956
|
+
}[];
|
|
957
|
+
}
|
|
958
|
+
export interface BrowserSocialReadWindow {
|
|
959
|
+
readonly view: NonNullable<BrowserSocialReadOptions["view"]>;
|
|
960
|
+
readonly observedAt: string;
|
|
961
|
+
readonly contentRefs: readonly string[];
|
|
962
|
+
readonly traversal?: BrowserSocialTraversal;
|
|
963
|
+
readonly captureFailures?: readonly SocialMediaCaptureFailure[];
|
|
964
|
+
}
|
|
965
|
+
export interface SocialRegistrationIdentity {
|
|
966
|
+
readonly participantRef: string;
|
|
967
|
+
readonly identityVersion: number;
|
|
968
|
+
readonly externalIdentityVersion: number;
|
|
969
|
+
readonly clueRef: string;
|
|
970
|
+
}
|
|
971
|
+
export interface SocialRegistrationSource {
|
|
972
|
+
readonly dispatchRef: string;
|
|
973
|
+
readonly observationRef: string;
|
|
974
|
+
readonly captureKey: string;
|
|
975
|
+
}
|
|
976
|
+
export interface SocialTargetPreview {
|
|
977
|
+
readonly schemaVersion: 1;
|
|
978
|
+
readonly registrationRef: string;
|
|
979
|
+
readonly previewRef: string;
|
|
980
|
+
readonly observedAt: string;
|
|
981
|
+
readonly expiresAt: string;
|
|
982
|
+
readonly evidenceDigest: string;
|
|
983
|
+
readonly renderedWindow: WechatSocialRenderedWindow;
|
|
984
|
+
}
|
|
985
|
+
export interface SocialTargetQualified {
|
|
986
|
+
readonly schemaVersion: 1;
|
|
987
|
+
readonly registrationRef: string;
|
|
988
|
+
readonly state: "QUALIFIED";
|
|
989
|
+
readonly previewRef: string;
|
|
990
|
+
readonly previewDigest: string;
|
|
991
|
+
readonly captureKey: string;
|
|
992
|
+
readonly selectionReceiptRef: string;
|
|
993
|
+
readonly frame: WechatSocialReadFrame;
|
|
994
|
+
readonly authorObservation: SocialRegistrationIdentity & {
|
|
995
|
+
readonly wechatId: string;
|
|
996
|
+
readonly observedAt: string;
|
|
997
|
+
readonly evidenceDigest: string;
|
|
998
|
+
readonly basis: "CURRENT_DETAIL_AUTHOR_PROFILE_RETURN";
|
|
999
|
+
readonly verification: "VISIBLE_UI_ID_MATCH";
|
|
1000
|
+
};
|
|
1001
|
+
readonly roundTrip: {
|
|
1002
|
+
readonly enteredAt: string;
|
|
1003
|
+
readonly returnedAt: string;
|
|
1004
|
+
readonly evidenceDigest: string;
|
|
1005
|
+
readonly basis: "CURRENT_DETAIL_RETURN";
|
|
1006
|
+
};
|
|
1007
|
+
readonly viewer: "NOT_ATTESTED";
|
|
1008
|
+
}
|
|
1009
|
+
export interface SocialRegistrationMetadata {
|
|
1010
|
+
readonly protocol: 1;
|
|
1011
|
+
readonly identityBasis: "UI_INSTANCE";
|
|
1012
|
+
readonly registrationRef: string;
|
|
1013
|
+
readonly source: SocialRegistrationSource;
|
|
1014
|
+
readonly sourceRelation: "CURRENT_INSTANCE_RECONFIRMED";
|
|
1015
|
+
readonly previewRef: string;
|
|
1016
|
+
readonly previewDigest: string;
|
|
1017
|
+
readonly selectionReceiptRef: string;
|
|
1018
|
+
readonly author: SocialRegistrationIdentity;
|
|
1019
|
+
readonly local: SocialRegistrationIdentity;
|
|
1020
|
+
readonly authorObservation: SocialTargetQualified["authorObservation"];
|
|
1021
|
+
readonly roundTrip: SocialTargetQualified["roundTrip"];
|
|
1022
|
+
readonly viewer: "NOT_ATTESTED";
|
|
1023
|
+
readonly contentCoverage: "VISIBLE_SHARE_TITLE_ONLY";
|
|
1024
|
+
readonly writeEligible: false;
|
|
1025
|
+
}
|
|
1026
|
+
export interface SocialRegistrationContext {
|
|
1027
|
+
readonly schemaVersion: 1;
|
|
1028
|
+
readonly engagementRef: string;
|
|
1029
|
+
readonly conversationRef: string;
|
|
1030
|
+
readonly profileRef: string;
|
|
1031
|
+
readonly accountRef: string;
|
|
1032
|
+
readonly conversationRevision: number;
|
|
1033
|
+
readonly membershipDigest: string;
|
|
1034
|
+
readonly local: SocialRegistrationIdentity | null;
|
|
1035
|
+
readonly authors: readonly (SocialRegistrationIdentity & {
|
|
1036
|
+
readonly label: string;
|
|
1037
|
+
})[];
|
|
1038
|
+
readonly eligibility: "ELIGIBLE" | "BLOCKED";
|
|
1039
|
+
readonly reasonCodes: readonly ("LOCAL_CURRENT_SLOT_REQUIRED" | "AUTHOR_CURRENT_SLOT_REQUIRED" | "BOUNDED_MOMENTS_VIEW_REQUIRED" | "TARGET_PROTOCOL_REQUIRED")[];
|
|
1040
|
+
}
|
|
1041
|
+
export interface SocialTargetRegistrationView {
|
|
1042
|
+
readonly schemaVersion: 1;
|
|
1043
|
+
readonly registrationRef: string;
|
|
1044
|
+
readonly createdAt: string;
|
|
1045
|
+
readonly state: string;
|
|
1046
|
+
readonly physicalIdle: boolean;
|
|
1047
|
+
readonly phase: "QUEUED" | "WAITING_CONFIRMATION" | "QUALIFYING" | "REGISTERED" | "GAP" | "UNKNOWN";
|
|
1048
|
+
readonly expiresAt: string | null;
|
|
1049
|
+
readonly reasonCode?: string;
|
|
1050
|
+
readonly preview?: SocialTargetPreview & {
|
|
1051
|
+
readonly previewDigest: string;
|
|
1052
|
+
};
|
|
1053
|
+
readonly confirmationRecorded: boolean;
|
|
1054
|
+
readonly registered?: {
|
|
1055
|
+
readonly conversationRef: string;
|
|
1056
|
+
readonly rootRef: string;
|
|
1057
|
+
readonly routeRef: string;
|
|
1058
|
+
readonly receipt: ActionReceipt;
|
|
1059
|
+
};
|
|
1060
|
+
}
|
|
1061
|
+
export type SocialPublisher = SocialRegistrationIdentity & {
|
|
1062
|
+
readonly wechatId: string;
|
|
1063
|
+
};
|
|
1064
|
+
export interface SocialPublicationRegistration {
|
|
1065
|
+
readonly protocol: 1;
|
|
1066
|
+
readonly publicationRef: string;
|
|
1067
|
+
readonly requestRef: string;
|
|
1068
|
+
readonly contentDigest: string;
|
|
1069
|
+
readonly resultDigest: string;
|
|
1070
|
+
readonly publisher: SocialPublisher;
|
|
1071
|
+
readonly observedAt: string;
|
|
1072
|
+
}
|
|
1073
|
+
/** 受保护宿主原操作日志的准确引用,不是外部平台消息 ID。 */
|
|
1074
|
+
export interface NativeExecutionSourceReference {
|
|
1075
|
+
readonly requestRef: string;
|
|
1076
|
+
readonly operationRef: string;
|
|
1077
|
+
readonly messageRef: string;
|
|
1078
|
+
readonly version: number;
|
|
1079
|
+
readonly contentDigest: string;
|
|
1080
|
+
readonly attemptRef: string;
|
|
1081
|
+
readonly evidenceDigest: string;
|
|
1082
|
+
/** 原消息的准确部件;缺省保留旧纯文字整条回执语义。 */
|
|
1083
|
+
readonly partRef?: string;
|
|
1084
|
+
}
|
|
1085
|
+
/** 原服务器回执关联;receiptRef 必须由原执行账本解析,不接收客户端声明。 */
|
|
1086
|
+
export interface NativeExecutionSourceCorrelation extends NativeExecutionSourceReference {
|
|
1087
|
+
readonly receiptRef: string;
|
|
1088
|
+
}
|
|
1089
|
+
/** 群内逐条作者证据;外部身份仅在当前 Profile 账号范围内比较。 */
|
|
1090
|
+
export interface NativeSourceGroupAuthor {
|
|
1091
|
+
readonly participantRef: string;
|
|
1092
|
+
readonly externalRef: string;
|
|
1093
|
+
readonly basis: "MEMBER_PROFILE_UI" | "BOUND_LOCAL_ACCOUNT";
|
|
1094
|
+
readonly evidenceDigest: string;
|
|
1095
|
+
}
|
|
1096
|
+
/** 原 Interaction 的渠道来源,不是另一份 Message 或平台消息身份。 */
|
|
1097
|
+
export interface NativeWechatContactIdentity {
|
|
1098
|
+
/** 原 Participant 的当前账号范围微信号核对依据;不是平台认证结论。 */
|
|
1099
|
+
readonly wechatContactParticipantRef?: string;
|
|
1100
|
+
readonly wechatContactExternalRef?: string;
|
|
1101
|
+
readonly wechatContactIdentityVersion?: number;
|
|
1102
|
+
}
|
|
1103
|
+
/** Declared LOCAL Owner comparison values; no platform authentication is implied. */
|
|
1104
|
+
export interface NativeWechatLocalIdentity {
|
|
1105
|
+
readonly participantRef: string;
|
|
1106
|
+
readonly wechatId: string;
|
|
1107
|
+
readonly identityVersion: number;
|
|
1108
|
+
readonly externalIdentityVersion: number;
|
|
1109
|
+
readonly clueRef: string;
|
|
1110
|
+
}
|
|
1111
|
+
export interface NativeWechatLocalBinding {
|
|
1112
|
+
readonly wechatLocalIdentity?: NativeWechatLocalIdentity;
|
|
1113
|
+
}
|
|
1114
|
+
export interface NativeInteractionSource extends NativeWechatContactIdentity, NativeWechatLocalBinding {
|
|
1115
|
+
readonly nativeVoiceObservationDigest?: string;
|
|
1116
|
+
readonly nativeVoiceObservation?: NativeVoiceObservation;
|
|
1117
|
+
readonly nativeMedia?: NativeRenderedMedia;
|
|
1118
|
+
readonly nativeOutboundDisplayDigest?: string;
|
|
1119
|
+
readonly nativeOutboundDisplay?: NativeOutboundDisplay;
|
|
1120
|
+
readonly nativeQuote?: NativeQuotedDisplay;
|
|
1121
|
+
/** Explicit original v2 negotiation; omission retains the old outbound-only source. */
|
|
1122
|
+
readonly wechatQuotedHistoryProtocol?: 2;
|
|
1123
|
+
readonly schemaVersion: 1 | 2;
|
|
1124
|
+
/** V2: 原摘要只证明原生行观察,尚无正文/原文件字节;V1 不接收此字段。 */
|
|
1125
|
+
readonly contentState?: "UNREAD_RENDERED_CONTENT";
|
|
1126
|
+
readonly channel: Extract<CommunicationChannel, "WECHAT" | "WHATSAPP">;
|
|
1127
|
+
readonly profileRef: string;
|
|
1128
|
+
readonly accountRef: string;
|
|
1129
|
+
readonly hostRef: string;
|
|
1130
|
+
readonly hostBindingDigest: string;
|
|
1131
|
+
readonly routeRef: string;
|
|
1132
|
+
readonly routeAssociationVersion: number;
|
|
1133
|
+
readonly targetRef: string;
|
|
1134
|
+
readonly conversationRevision: number;
|
|
1135
|
+
readonly membershipDigest: string;
|
|
1136
|
+
readonly observationRef: string;
|
|
1137
|
+
readonly streamRef: string;
|
|
1138
|
+
readonly sequence: number;
|
|
1139
|
+
readonly observedAt: string;
|
|
1140
|
+
readonly contentDigest: string;
|
|
1141
|
+
readonly evidenceKind: "ANDROID_UI_AUTOMATION";
|
|
1142
|
+
readonly targetIdentity: "OWNER_SELECTED_VIEW";
|
|
1143
|
+
readonly groupAuthor?: NativeSourceGroupAuthor;
|
|
1144
|
+
readonly authorResolution?: NativeGroupAuthorResolution;
|
|
1145
|
+
readonly wechatGroupAuthorProtocol?: 1;
|
|
1146
|
+
}
|
|
1147
|
+
/** 来源观察描述实际证据,不把屏幕序号或本地关联解释为平台身份。 */
|
|
1148
|
+
export interface SourceObservation {
|
|
1149
|
+
readonly facebookPostCapture?: FacebookPostCapture;
|
|
1150
|
+
readonly authorResolution?: NativeGroupAuthorResolution;
|
|
1151
|
+
readonly displayedAuthor?: string;
|
|
1152
|
+
readonly textAcquisition?: "CLIENT_CLIPBOARD" | "RENDERED_OCR" | "NATIVE_ACCESSIBILITY";
|
|
1153
|
+
/** Native rendered type clue; actual bytes and understanding remain separate. */
|
|
1154
|
+
readonly renderedContentKind?: "FILE" | "IMAGE" | "AUDIO" | "VIDEO";
|
|
1155
|
+
readonly nativeObservationRef?: string;
|
|
1156
|
+
readonly wechatGroupAuthorProtocol?: 1;
|
|
1157
|
+
readonly nativeVoiceObservationDigest?: string;
|
|
1158
|
+
readonly nativeVoiceObservation?: NativeVoiceObservation;
|
|
1159
|
+
readonly nativeMedia?: NativeRenderedMedia;
|
|
1160
|
+
readonly nativeOutboundDisplayDigest?: string;
|
|
1161
|
+
readonly nativeOutboundDisplay?: NativeOutboundDisplay;
|
|
1162
|
+
readonly nativeQuote?: NativeQuotedDisplay;
|
|
1163
|
+
/** Explicit original v2 negotiation; omission retains the old outbound-only source. */
|
|
1164
|
+
readonly wechatQuotedHistoryProtocol?: 2;
|
|
1165
|
+
readonly contentState?: "UNREAD_RENDERED_CONTENT" | "CONTENT_CAPTURED";
|
|
1166
|
+
readonly nativeExecution?: NativeExecutionSourceCorrelation;
|
|
1167
|
+
readonly lifecycle?: SourceLifecycleState;
|
|
1168
|
+
readonly previousFactRef?: string;
|
|
1169
|
+
readonly evidenceDigest?: string;
|
|
1170
|
+
readonly observationRef: string;
|
|
1171
|
+
readonly factRef: string;
|
|
1172
|
+
readonly profileRef: string | null;
|
|
1173
|
+
readonly externalMessageRef: string | null;
|
|
1174
|
+
readonly sourceVersion: string;
|
|
1175
|
+
readonly observedAt: string;
|
|
1176
|
+
readonly evidenceKind: "MAIL_CLIENT" | "NATIVE_ACCESSIBILITY" | "RENDERED_OCR" | "HOST_BROWSER_DOM" | "NATIVE_RECORDED" | "ANDROID_UI_AUTOMATION" | "PLATFORM_API";
|
|
1177
|
+
readonly coverage: "LINKED_MESSAGE" | "CURRENT_RENDERED_VIEW" | "NATIVE_FACT" | "BOUNDED_API_RESPONSE";
|
|
1178
|
+
readonly identityBasis: "PROFILE_MESSAGE_ID" | "NATIVE_STREAM_SEQUENCE" | "HOST_EXTERNAL_REFERENCE" | "PROTOCOL_EXTERNAL_REFERENCE" | "NATIVE_FACT" | "PLATFORM_OBJECT_ID" | "OWNER_SELECTED_VIEW";
|
|
1179
|
+
readonly versionBasis: "HOST_REPORTED_VERSION" | "CONTENT_DIGEST" | "VISUAL_DIGEST" | "NATIVE_EVENT_SEQUENCE" | "PROTOCOL_RESPONSE_DIGEST" | "NATIVE_UI_WITNESS_DIGEST" | "PLATFORM_ETAG_OR_DIGEST";
|
|
1180
|
+
readonly sourceLocatorRef: string;
|
|
1181
|
+
readonly changeTracking: "ON_REREAD_CONTENT_CONFLICT" | "NOT_TRACKED";
|
|
1182
|
+
}
|
|
1183
|
+
export interface CommunicationMessage {
|
|
1184
|
+
readonly channel: "EMAIL" | "WECHAT" | "WHATSAPP" | "BROWSER" | "AGENT_PROTOCOL" | "NATIVE" | "SOCIAL";
|
|
1185
|
+
readonly direction: "INBOUND" | "OUTBOUND" | "INTERNAL";
|
|
1186
|
+
readonly state: string;
|
|
1187
|
+
readonly emailThread?: {
|
|
1188
|
+
readonly inReplyTo: readonly string[];
|
|
1189
|
+
readonly references: readonly string[];
|
|
1190
|
+
};
|
|
1191
|
+
readonly eventSequence: string;
|
|
1192
|
+
readonly occurredAt: string;
|
|
1193
|
+
readonly message: MessageProjection;
|
|
1194
|
+
readonly source: SourceObservation;
|
|
1195
|
+
}
|
|
1196
|
+
/** Browser-safe shared approval representation; no host paths, locators or bytes. */
|
|
1197
|
+
export interface MessageAttachment {
|
|
1198
|
+
readonly assetRef: string;
|
|
1199
|
+
readonly sourceVersion: string;
|
|
1200
|
+
readonly digest: string;
|
|
1201
|
+
readonly mediaType: string;
|
|
1202
|
+
readonly byteLength: number;
|
|
1203
|
+
readonly filename: string;
|
|
1204
|
+
readonly presentation?: "VOICE_NOTE" | "IMAGE" | "VIDEO";
|
|
1205
|
+
}
|
|
1206
|
+
export type SourceMessagePart = {
|
|
1207
|
+
readonly partRef: string;
|
|
1208
|
+
readonly kind: "TEXT";
|
|
1209
|
+
readonly text: string;
|
|
1210
|
+
} | {
|
|
1211
|
+
readonly partRef: string;
|
|
1212
|
+
readonly kind: "FILE" | "IMAGE" | "AUDIO" | "VIDEO";
|
|
1213
|
+
readonly sourceAttachmentRef: string;
|
|
1214
|
+
readonly filename: string;
|
|
1215
|
+
readonly mediaType: string;
|
|
1216
|
+
readonly byteLength: number;
|
|
1217
|
+
readonly assetRef?: string;
|
|
1218
|
+
readonly digest?: string;
|
|
1219
|
+
readonly sourceVersion?: string;
|
|
1220
|
+
};
|
|
1221
|
+
/** 出站资产没有外部来源部件 ID;不以 AssetRef 冒充 sourceAttachmentRef。 */
|
|
1222
|
+
export type AssetMessagePart = MessageAttachment & {
|
|
1223
|
+
readonly partRef: string;
|
|
1224
|
+
readonly kind: "FILE" | "AUDIO" | "IMAGE" | "VIDEO";
|
|
1225
|
+
readonly sourceAttachmentRef?: never;
|
|
1226
|
+
};
|
|
1227
|
+
export type MessagePart = SourceMessagePart | AssetMessagePart;
|
|
214
1228
|
export interface ProspectEngagementBasis {
|
|
215
1229
|
readonly whyFit: string;
|
|
216
1230
|
readonly whyNow: string;
|
|
@@ -220,6 +1234,18 @@ export interface ProspectEngagementBasis {
|
|
|
220
1234
|
readonly observedAt: string;
|
|
221
1235
|
}
|
|
222
1236
|
export type InteractionOutcome = "CONFIRMED" | "UNCERTAIN" | "FAILED";
|
|
1237
|
+
export interface MessageProjection {
|
|
1238
|
+
readonly tenantId: string;
|
|
1239
|
+
readonly messageRef: string;
|
|
1240
|
+
readonly conversationRef: string;
|
|
1241
|
+
readonly senderParticipantRef: string | null;
|
|
1242
|
+
readonly recipientParticipantRefs: readonly string[];
|
|
1243
|
+
readonly text?: string | undefined;
|
|
1244
|
+
readonly parts?: readonly MessagePart[];
|
|
1245
|
+
readonly replyToMessageRef?: string | undefined;
|
|
1246
|
+
readonly causationId?: string | undefined;
|
|
1247
|
+
readonly correlationId?: string | undefined;
|
|
1248
|
+
}
|
|
223
1249
|
export interface ActionReceipt {
|
|
224
1250
|
readonly tenantId: string;
|
|
225
1251
|
readonly receiptRef: string;
|
|
@@ -252,6 +1278,121 @@ export interface NextAction {
|
|
|
252
1278
|
readonly policyRequirements?: readonly string[];
|
|
253
1279
|
readonly missingPrerequisites?: readonly string[];
|
|
254
1280
|
}
|
|
1281
|
+
/** Native UI observation only. Neither value attests network delivery or a physical request. */
|
|
1282
|
+
export interface NativeOutboundDisplay {
|
|
1283
|
+
readonly schemaVersion: 1;
|
|
1284
|
+
readonly state: "FAILED" | "NO_FAILURE_INDICATOR";
|
|
1285
|
+
readonly basis: "WECHAT_NATIVE_OUTBOUND_TEXT_ROW";
|
|
1286
|
+
readonly delivery: "NOT_ATTESTED";
|
|
1287
|
+
}
|
|
1288
|
+
export interface NativeOutboundDisplayWitness {
|
|
1289
|
+
readonly observationRef: string;
|
|
1290
|
+
readonly observedAt: string;
|
|
1291
|
+
}
|
|
1292
|
+
export interface NativeOutboundDisplayState {
|
|
1293
|
+
readonly schemaVersion: 1;
|
|
1294
|
+
readonly latest: NativeOutboundDisplayWitness & {
|
|
1295
|
+
readonly state: NativeOutboundDisplay["state"] | "UNQUALIFIED";
|
|
1296
|
+
};
|
|
1297
|
+
readonly lastFailure?: NativeOutboundDisplayWitness;
|
|
1298
|
+
}
|
|
1299
|
+
export type NativeSourceBinding = Pick<NativeInteractionSource, "channel" | "profileRef" | "accountRef" | "hostRef" | "hostBindingDigest" | "routeRef" | "routeAssociationVersion" | "targetRef" | "conversationRevision" | "membershipDigest" | "wechatContactParticipantRef" | "wechatContactExternalRef" | "wechatContactIdentityVersion" | "wechatLocalIdentity">;
|
|
1300
|
+
/** Client representation only; neither original audio bytes nor an AX transcript. */
|
|
1301
|
+
export interface NativeVoiceObservation {
|
|
1302
|
+
readonly schemaVersion: 1;
|
|
1303
|
+
readonly durationSeconds: number;
|
|
1304
|
+
readonly playbackLabel: "UNPLAYED" | "NOT_EXPOSED";
|
|
1305
|
+
readonly playbackCompletion: "NOT_ATTESTED";
|
|
1306
|
+
readonly clientTranscript: "COLLAPSED" | "RENDERED_NOT_ACCESSIBLE";
|
|
1307
|
+
readonly transcriptText: "NOT_EXPOSED";
|
|
1308
|
+
readonly originalAudio: "NOT_ACQUIRED";
|
|
1309
|
+
}
|
|
1310
|
+
export type SourceChangeKind = "UNCHANGED" | "CONTENT_CONFLICT" | "CONTENT_REVISED" | "CONTENT_RECONCILED" | "CONTENT_CAPTURED" | "DELETED" | "RETRACTED" | "RESTORED" | "NOT_VISIBLE" | "NOT_SUPPORTED" | "HISTORICAL_RECORDED" | "NATIVE_DISPLAY_OBSERVED" | "NATIVE_VOICE_OBSERVED";
|
|
1311
|
+
export interface SourceLifecycleState {
|
|
1312
|
+
readonly nativeVoiceObservationDigest?: string;
|
|
1313
|
+
readonly nativeVoiceObservedAt?: string;
|
|
1314
|
+
readonly nativeVoiceObservation?: NativeVoiceObservation;
|
|
1315
|
+
readonly nativeOutboundDisplay?: NativeOutboundDisplayState;
|
|
1316
|
+
readonly nativeExecutionFactRef?: string;
|
|
1317
|
+
readonly headFactRef: string;
|
|
1318
|
+
readonly contentFactRef: string;
|
|
1319
|
+
readonly revision: number;
|
|
1320
|
+
readonly availability: "AVAILABLE" | "UNAVAILABLE" | "UNRESOLVED";
|
|
1321
|
+
readonly changeKind: SourceChangeKind | "LEGACY_OBSERVATION";
|
|
1322
|
+
readonly reasonCode: string;
|
|
1323
|
+
readonly observedAt: string;
|
|
1324
|
+
readonly candidateFactRef: string | null;
|
|
1325
|
+
readonly lastInspectionRef: string | null;
|
|
1326
|
+
}
|
|
1327
|
+
export interface SourceBasis {
|
|
1328
|
+
readonly channel: CommunicationMessage["channel"];
|
|
1329
|
+
readonly conversationRef: string;
|
|
1330
|
+
readonly messageRef: string;
|
|
1331
|
+
readonly headFactRef: string;
|
|
1332
|
+
}
|
|
1333
|
+
/** 原文本消息模型;旧 WechatMessage 继续作为兼容名称。 */
|
|
1334
|
+
export type TextMessageStatus = "DRAFT" | "APPROVED" | "REJECTED" | "QUEUED" | "CLIENT_VISIBLE" | "UNCERTAIN" | "FAILED" | "CANCELLED";
|
|
1335
|
+
export interface TaskCommunicationOrigin {
|
|
1336
|
+
readonly handoffRef?: string;
|
|
1337
|
+
readonly workRef: string;
|
|
1338
|
+
readonly invocationRef: string;
|
|
1339
|
+
readonly callId: string;
|
|
1340
|
+
readonly inputDigest: string;
|
|
1341
|
+
}
|
|
1342
|
+
export interface TextChannelMessage {
|
|
1343
|
+
readonly attachments?: readonly MessageAttachment[];
|
|
1344
|
+
readonly taskOrigin?: TaskCommunicationOrigin;
|
|
1345
|
+
readonly communicationPolicyBasis?: CommunicationPolicyBasis;
|
|
1346
|
+
readonly channel?: "WECHAT" | "WHATSAPP" | "SOCIAL";
|
|
1347
|
+
readonly nativeBinding?: NativeSourceBinding;
|
|
1348
|
+
readonly senderParticipantRef?: string;
|
|
1349
|
+
readonly recipientParticipantRefs?: readonly string[];
|
|
1350
|
+
readonly sourceBasis?: SourceBasis;
|
|
1351
|
+
readonly humanIntent?: {
|
|
1352
|
+
readonly kind: "HUMAN";
|
|
1353
|
+
readonly authoredBy: string;
|
|
1354
|
+
readonly contextDigest: string;
|
|
1355
|
+
};
|
|
1356
|
+
readonly conversationRef?: string;
|
|
1357
|
+
readonly tenantId: string;
|
|
1358
|
+
readonly engagementRef: string;
|
|
1359
|
+
readonly messageRef: string;
|
|
1360
|
+
readonly profileRef: string;
|
|
1361
|
+
readonly version: number;
|
|
1362
|
+
readonly text: string;
|
|
1363
|
+
readonly contentDigest: string;
|
|
1364
|
+
readonly status: TextMessageStatus;
|
|
1365
|
+
readonly createdBy: string;
|
|
1366
|
+
readonly createdAt: string;
|
|
1367
|
+
readonly updatedAt: string;
|
|
1368
|
+
readonly replyToMessageRef?: string;
|
|
1369
|
+
readonly followUpOfMessageRef?: string;
|
|
1370
|
+
readonly followUpPlanVersion?: number;
|
|
1371
|
+
readonly reviewRef?: string;
|
|
1372
|
+
readonly reviewedBy?: string;
|
|
1373
|
+
readonly approvalExpiresAt?: string;
|
|
1374
|
+
readonly reviewSourceRef?: string;
|
|
1375
|
+
readonly authorizationBasis?: "HUMAN_MESSAGE_REVIEW" | "HUMAN_CONVERSATION_DELEGATION" | "ENGAGEMENT_CONTROL";
|
|
1376
|
+
readonly authorizationControlVersion?: number;
|
|
1377
|
+
readonly requestRef?: string;
|
|
1378
|
+
readonly hostEvidenceDigest?: string;
|
|
1379
|
+
}
|
|
1380
|
+
export type CommunicationChannel = "EMAIL" | "WECHAT" | "WHATSAPP" | "SOCIAL";
|
|
1381
|
+
declare const EXECUTION_NODE_PROTOCOL = "ne-execution-node/1.0";
|
|
1382
|
+
export interface NodeProof {
|
|
1383
|
+
protocol: typeof EXECUTION_NODE_PROTOCOL;
|
|
1384
|
+
tenantId: string;
|
|
1385
|
+
serviceOrigin: string;
|
|
1386
|
+
installationRef: string;
|
|
1387
|
+
keyFingerprint: string;
|
|
1388
|
+
nodeRef: string | null;
|
|
1389
|
+
nodeGeneration: number;
|
|
1390
|
+
nodeSessionRef: string | null;
|
|
1391
|
+
sessionGeneration: number;
|
|
1392
|
+
requestNonce: string;
|
|
1393
|
+
bodyDigest: string;
|
|
1394
|
+
signature: string;
|
|
1395
|
+
}
|
|
255
1396
|
export type WorkbenchSummary = ({
|
|
256
1397
|
readonly prospectRef: string;
|
|
257
1398
|
readonly ownership?: never;
|
|
@@ -285,6 +1426,54 @@ export interface ContractExecutionRequest {
|
|
|
285
1426
|
readonly payload?: Readonly<Record<string, unknown>> | undefined;
|
|
286
1427
|
readonly context?: TenantContextInput | undefined;
|
|
287
1428
|
}
|
|
1429
|
+
/** 固定的输入错误可在 HTTP/SDK 边界映射,避免把解析细节带进业务错误。 */
|
|
1430
|
+
export declare class ContractDiscoveryInputError extends Error {
|
|
1431
|
+
constructor();
|
|
1432
|
+
}
|
|
1433
|
+
/** 先验证闭合、有界的发现请求,再进行网络 IO 或目录扫描。 */
|
|
1434
|
+
export declare function contractDiscoveryOptions(value: unknown): ContractDiscoveryOptions;
|
|
1435
|
+
/** 只保存公开、静态且与 canonical 脱离引用的元数据,绝不保存授权或 Tenant 状态。 */
|
|
1436
|
+
export declare class ContractDiscoveryCatalog {
|
|
1437
|
+
#private;
|
|
1438
|
+
constructor(snapshot: ContractRegistrySnapshot);
|
|
1439
|
+
page(input?: ContractDiscoveryOptions): ContractDiscoveryPage;
|
|
1440
|
+
}
|
|
1441
|
+
/** 按需选择输入或输出约束;full 保持原 descriptor 的字段及校验语义。 */
|
|
1442
|
+
export declare function contractSchemaView(value: unknown, fallback?: ContractSchemaView): ContractSchemaView;
|
|
1443
|
+
/** 投影只省略未请求的 schema,权限、版本、幂等与风险等原元数据全部保留。 */
|
|
1444
|
+
export declare function projectContractSchema(descriptor: ContractDescriptor, view: ContractSchemaView): ContractDescriptor | {
|
|
1445
|
+
inputSchema: Readonly<Record<string, unknown>>;
|
|
1446
|
+
name: string;
|
|
1447
|
+
version: string;
|
|
1448
|
+
kind: ContractKind;
|
|
1449
|
+
availability: ContractAvailability;
|
|
1450
|
+
description: string;
|
|
1451
|
+
tenantRequirement: TenantRequirement;
|
|
1452
|
+
authorizationScopes: readonly string[];
|
|
1453
|
+
sideEffect: SideEffectClass;
|
|
1454
|
+
idempotency: IdempotencyRequirement;
|
|
1455
|
+
identifierSemantics?: string | undefined;
|
|
1456
|
+
humanInLoop?: HumanInLoopRequirement | undefined;
|
|
1457
|
+
policyClass?: string | undefined;
|
|
1458
|
+
errorCodes?: readonly string[] | undefined;
|
|
1459
|
+
riskClass?: ContractRisk;
|
|
1460
|
+
} | {
|
|
1461
|
+
outputSchema: Readonly<Record<string, unknown>>;
|
|
1462
|
+
name: string;
|
|
1463
|
+
version: string;
|
|
1464
|
+
kind: ContractKind;
|
|
1465
|
+
availability: ContractAvailability;
|
|
1466
|
+
description: string;
|
|
1467
|
+
tenantRequirement: TenantRequirement;
|
|
1468
|
+
authorizationScopes: readonly string[];
|
|
1469
|
+
sideEffect: SideEffectClass;
|
|
1470
|
+
idempotency: IdempotencyRequirement;
|
|
1471
|
+
identifierSemantics?: string | undefined;
|
|
1472
|
+
humanInLoop?: HumanInLoopRequirement | undefined;
|
|
1473
|
+
policyClass?: string | undefined;
|
|
1474
|
+
errorCodes?: readonly string[] | undefined;
|
|
1475
|
+
riskClass?: ContractRisk;
|
|
1476
|
+
};
|
|
288
1477
|
export type TokenProvider = () => string | Promise<string>;
|
|
289
1478
|
export interface RemoteSdkOptions {
|
|
290
1479
|
readonly nodeProof?: (method: string, route: string, payload: Readonly<Record<string, unknown>>) => NodeProof;
|
|
@@ -315,13 +1504,85 @@ export declare class RemoteNativeEngagementSdk {
|
|
|
315
1504
|
#private;
|
|
316
1505
|
constructor(options: RemoteSdkOptions);
|
|
317
1506
|
contracts(): Promise<unknown>;
|
|
318
|
-
|
|
1507
|
+
/** 发现页只传输元数据;旧服务回传完整 registry 时在客户端边界进行兼容投影。 */
|
|
1508
|
+
discoverContracts(input?: ContractDiscoveryOptions): Promise<ContractDiscoveryPage>;
|
|
1509
|
+
/** 省略 view 保留原完整合同;输入/输出投影可兼容尚未升级的 HTTP 服务。 */
|
|
1510
|
+
schema(name: string, requestedView?: ContractSchemaView): Promise<ContractDescriptor | {
|
|
1511
|
+
inputSchema: Readonly<Record<string, unknown>>;
|
|
1512
|
+
name: string;
|
|
1513
|
+
version: string;
|
|
1514
|
+
kind: ContractKind;
|
|
1515
|
+
availability: ContractAvailability;
|
|
1516
|
+
description: string;
|
|
1517
|
+
tenantRequirement: TenantRequirement;
|
|
1518
|
+
authorizationScopes: readonly string[];
|
|
1519
|
+
sideEffect: SideEffectClass;
|
|
1520
|
+
idempotency: IdempotencyRequirement;
|
|
1521
|
+
identifierSemantics?: string | undefined;
|
|
1522
|
+
humanInLoop?: HumanInLoopRequirement | undefined;
|
|
1523
|
+
policyClass?: string | undefined;
|
|
1524
|
+
errorCodes?: readonly string[] | undefined;
|
|
1525
|
+
riskClass?: ContractRisk;
|
|
1526
|
+
} | {
|
|
1527
|
+
outputSchema: Readonly<Record<string, unknown>>;
|
|
1528
|
+
name: string;
|
|
1529
|
+
version: string;
|
|
1530
|
+
kind: ContractKind;
|
|
1531
|
+
availability: ContractAvailability;
|
|
1532
|
+
description: string;
|
|
1533
|
+
tenantRequirement: TenantRequirement;
|
|
1534
|
+
authorizationScopes: readonly string[];
|
|
1535
|
+
sideEffect: SideEffectClass;
|
|
1536
|
+
idempotency: IdempotencyRequirement;
|
|
1537
|
+
identifierSemantics?: string | undefined;
|
|
1538
|
+
humanInLoop?: HumanInLoopRequirement | undefined;
|
|
1539
|
+
policyClass?: string | undefined;
|
|
1540
|
+
errorCodes?: readonly string[] | undefined;
|
|
1541
|
+
riskClass?: ContractRisk;
|
|
1542
|
+
}>;
|
|
319
1543
|
query(request: Pick<ContractExecutionRequest, "name" | "payload">, signal?: AbortSignal): Promise<unknown>;
|
|
320
1544
|
command(request: Pick<ContractExecutionRequest, "name" | "payload">, signal?: AbortSignal): Promise<unknown>;
|
|
321
1545
|
search(payload: Readonly<Record<string, unknown>>): Promise<unknown>;
|
|
322
1546
|
enquiry(payload: Readonly<Record<string, unknown>>): Promise<unknown>;
|
|
323
1547
|
agentStackPreflight(payload: Readonly<Record<string, unknown>>): Promise<unknown>;
|
|
324
1548
|
}
|
|
1549
|
+
export declare const MCP_CATALOG_META_KEY = "native-engagement/toolCatalog";
|
|
1550
|
+
/** 结构化 MCP 端口不依赖具体客户端包,保持公开 SDK 的便携依赖边界。 */
|
|
1551
|
+
export interface McpCatalogClient {
|
|
1552
|
+
listTools(params?: {
|
|
1553
|
+
cursor?: string;
|
|
1554
|
+
_meta?: Record<string, unknown>;
|
|
1555
|
+
}): Promise<{
|
|
1556
|
+
tools: readonly McpToolDefinition[];
|
|
1557
|
+
_meta?: Record<string, unknown> | undefined;
|
|
1558
|
+
}>;
|
|
1559
|
+
callTool(params: {
|
|
1560
|
+
name: string;
|
|
1561
|
+
arguments?: Record<string, unknown>;
|
|
1562
|
+
}): Promise<{
|
|
1563
|
+
isError?: boolean | undefined;
|
|
1564
|
+
structuredContent?: unknown;
|
|
1565
|
+
content?: readonly unknown[] | undefined;
|
|
1566
|
+
}>;
|
|
1567
|
+
}
|
|
1568
|
+
/** 每个宿主任务各建一个目录,只缓存静态定义;实际调用永远走原 MCP 授权入口。 */
|
|
1569
|
+
export declare class NativeMcpToolCatalog {
|
|
1570
|
+
#private;
|
|
1571
|
+
readonly client: McpCatalogClient;
|
|
1572
|
+
constructor(client: McpCatalogClient);
|
|
1573
|
+
get tools(): readonly McpToolDefinition[];
|
|
1574
|
+
get selection(): McpToolSelection;
|
|
1575
|
+
/** 空 cursor 绕过客户端无参数 list 缓存,显式选择才不会读到上一个任务的公告。 */
|
|
1576
|
+
initialize(): Promise<readonly McpToolDefinition[]>;
|
|
1577
|
+
refresh(): Promise<readonly McpToolDefinition[]>;
|
|
1578
|
+
load(selection: McpToolSelection): Promise<readonly McpToolDefinition[]>;
|
|
1579
|
+
/** 只帮助宿主调用已加载的原类型化名称;不重写参数、幂等键或业务错误。 */
|
|
1580
|
+
call(name: string, args: Record<string, unknown>): Promise<{
|
|
1581
|
+
isError?: boolean | undefined;
|
|
1582
|
+
structuredContent?: unknown;
|
|
1583
|
+
content?: readonly unknown[] | undefined;
|
|
1584
|
+
}>;
|
|
1585
|
+
}
|
|
325
1586
|
export type WorkClient = Pick<RemoteNativeEngagementSdk, "query" | "command">;
|
|
326
1587
|
/** Authenticated API parity; the service resolves identity and enforces every contract. */
|
|
327
1588
|
export declare function prospectClient(client: WorkClient): {
|
|
@@ -339,6 +1600,166 @@ export declare function prospectClient(client: WorkClient): {
|
|
|
339
1600
|
cursor?: string;
|
|
340
1601
|
}) => Promise<EngagementCatalogPage>;
|
|
341
1602
|
};
|
|
1603
|
+
export interface BrowserProfileAccountOwner {
|
|
1604
|
+
readonly profileRef: string;
|
|
1605
|
+
readonly platform: BrowserSocialPlatform;
|
|
1606
|
+
}
|
|
1607
|
+
export interface BrowserAccountOwner extends BrowserProfileAccountOwner {
|
|
1608
|
+
readonly engagementRef: string;
|
|
1609
|
+
readonly conversationRef: string;
|
|
1610
|
+
}
|
|
1611
|
+
/** 原 Owner 的账号状态与精确暂停恢复;不读取网页、不登录或发送消息。 */
|
|
1612
|
+
export declare function browserAccountClient(sdk: Pick<RemoteNativeEngagementSdk, "query" | "command">, owner: BrowserAccountOwner): {
|
|
1613
|
+
activity: () => Promise<BrowserAccountView>;
|
|
1614
|
+
resume: (idempotencyKey: string, view: BrowserAccountView) => Promise<ActionReceipt>;
|
|
1615
|
+
reviewLoginPause: (idempotencyKey: string, review: {
|
|
1616
|
+
externalAccountRef: string;
|
|
1617
|
+
pauseRef: string;
|
|
1618
|
+
sourceDigest: string;
|
|
1619
|
+
}) => Promise<ActionReceipt>;
|
|
1620
|
+
};
|
|
1621
|
+
/** 公共登录/安装不需要伪造业务会话;仍读取原账号状态和相同的暂停账本。 */
|
|
1622
|
+
export declare function browserProfileAccountClient(sdk: Pick<RemoteNativeEngagementSdk, "query" | "command">, owner: BrowserProfileAccountOwner): {
|
|
1623
|
+
activity: () => Promise<BrowserAccountView>;
|
|
1624
|
+
resume: (idempotencyKey: string, view: BrowserAccountView) => Promise<ActionReceipt>;
|
|
1625
|
+
reviewLoginPause: (idempotencyKey: string, review: {
|
|
1626
|
+
externalAccountRef: string;
|
|
1627
|
+
pauseRef: string;
|
|
1628
|
+
sourceDigest: string;
|
|
1629
|
+
}) => Promise<ActionReceipt>;
|
|
1630
|
+
};
|
|
1631
|
+
export interface BrowserSocialOwner extends BrowserAccountOwner {
|
|
1632
|
+
readonly platform: "DOUYIN" | "TIKTOK";
|
|
1633
|
+
}
|
|
1634
|
+
export type BrowserSocialMessage = SocialConversationView["messages"][number];
|
|
1635
|
+
export interface BrowserAutonomyOptions {
|
|
1636
|
+
readonly expectedVersion: number;
|
|
1637
|
+
readonly expectedControlVersion: number;
|
|
1638
|
+
readonly enabled: boolean;
|
|
1639
|
+
readonly delegatePrincipalRef: string;
|
|
1640
|
+
readonly expiresAt: string;
|
|
1641
|
+
readonly maxReplies: number;
|
|
1642
|
+
}
|
|
1643
|
+
export declare function browserSearchScope(platform: BrowserSocialOwner["platform"], query: string): BrowserSocialScope;
|
|
1644
|
+
/** 类型入口沿原合同、草稿和请求工作;等待或超时不自动换幂等键重发。 */
|
|
1645
|
+
export declare function browserSocialClient(sdk: Pick<RemoteNativeEngagementSdk, "query" | "command">, owner: BrowserSocialOwner): {
|
|
1646
|
+
create: (idempotencyKey: string, scope: BrowserSocialScope, participantRefs: readonly string[], routeRefs: readonly string[]) => Promise<ActionReceipt>;
|
|
1647
|
+
get: () => Promise<SocialConversationView>;
|
|
1648
|
+
autonomy: (idempotencyKey: string, options: BrowserAutonomyOptions) => Promise<ActionReceipt>;
|
|
1649
|
+
read: (idempotencyKey: string, browserRead?: BrowserSocialReadOptions) => Promise<ActionReceipt>;
|
|
1650
|
+
capabilities: (idempotencyKey: string) => Promise<ActionReceipt>;
|
|
1651
|
+
search: (idempotencyKey: string, query: string) => Promise<ActionReceipt>;
|
|
1652
|
+
adoptTarget: (idempotencyKey: string, source: Pick<SocialContentProjection, "contentRef" | "factRef" | "revision">, surface: "VIDEO" | "PROFILE") => Promise<ActionReceipt>;
|
|
1653
|
+
adoptDirect: (idempotencyKey: string, source: Pick<SocialContentProjection, "contentRef" | "factRef" | "revision">) => Promise<ActionReceipt>;
|
|
1654
|
+
authorizeRecovery: (idempotencyKey: string, message: BrowserSocialMessage, expectedControlVersion: number) => Promise<ActionReceipt>;
|
|
1655
|
+
operation: (dispatchRef: string) => Promise<SocialOperationView>;
|
|
1656
|
+
contents: (limit?: number, cursor?: string, consistency?: "SNAPSHOT" | "LIVE") => Promise<SocialContentPage>;
|
|
1657
|
+
draft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">, text: string, browserIntent: BrowserSocialIntent) => Promise<ActionReceipt>;
|
|
1658
|
+
scheduleCancelDraft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">) => Promise<ActionReceipt>;
|
|
1659
|
+
scheduleRescheduleDraft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">, scheduledAt: string, timeZone: string) => Promise<ActionReceipt>;
|
|
1660
|
+
queue: (idempotencyKey: string, message: BrowserSocialMessage, expectedControlVersion: number) => Promise<ActionReceipt>;
|
|
1661
|
+
execute: (idempotencyKey: string, message: BrowserSocialMessage) => Promise<ActionReceipt>;
|
|
1662
|
+
verify: (idempotencyKey: string, message: BrowserSocialMessage) => Promise<ActionReceipt>;
|
|
1663
|
+
cancel: (idempotencyKey: string, message: BrowserSocialMessage) => Promise<ActionReceipt>;
|
|
1664
|
+
activity: () => Promise<BrowserAccountView>;
|
|
1665
|
+
resume: (idempotencyKey: string, view: BrowserAccountView) => Promise<ActionReceipt>;
|
|
1666
|
+
reviewLoginPause: (idempotencyKey: string, review: {
|
|
1667
|
+
externalAccountRef: string;
|
|
1668
|
+
pauseRef: string;
|
|
1669
|
+
sourceDigest: string;
|
|
1670
|
+
}) => Promise<ActionReceipt>;
|
|
1671
|
+
};
|
|
1672
|
+
export type Message = SocialConversationView["messages"][number];
|
|
1673
|
+
/** 原请求、独立观察和已完成的原作品管理只作投影;不浏览、不计时派发、不授予发送。 */
|
|
1674
|
+
export declare function browserPublicationLifecycle(message: Message, operation: SocialOperationView | null, view?: SocialConversationView, now?: number): {
|
|
1675
|
+
state: "CLIENT_VISIBLE";
|
|
1676
|
+
nextAction: "NONE";
|
|
1677
|
+
messageRef: string;
|
|
1678
|
+
requestRef: string | null;
|
|
1679
|
+
dispatchRef: string | null;
|
|
1680
|
+
objectRef: string | null;
|
|
1681
|
+
originalScheduledAt: string | null;
|
|
1682
|
+
scheduledAt: string | null;
|
|
1683
|
+
observed: BrowserPublicationObservation | null;
|
|
1684
|
+
publicDelivery: "NOT_ATTESTED";
|
|
1685
|
+
} | {
|
|
1686
|
+
state: "LOCAL_REQUEST_CANCELLED";
|
|
1687
|
+
nextAction: "NONE";
|
|
1688
|
+
messageRef: string;
|
|
1689
|
+
requestRef: string | null;
|
|
1690
|
+
dispatchRef: string | null;
|
|
1691
|
+
objectRef: string | null;
|
|
1692
|
+
originalScheduledAt: string | null;
|
|
1693
|
+
scheduledAt: string | null;
|
|
1694
|
+
observed: BrowserPublicationObservation | null;
|
|
1695
|
+
publicDelivery: "NOT_ATTESTED";
|
|
1696
|
+
} | {
|
|
1697
|
+
state: "DRAFT";
|
|
1698
|
+
nextAction: "ORIGINAL_REVIEW";
|
|
1699
|
+
messageRef: string;
|
|
1700
|
+
requestRef: string | null;
|
|
1701
|
+
dispatchRef: string | null;
|
|
1702
|
+
objectRef: string | null;
|
|
1703
|
+
originalScheduledAt: string | null;
|
|
1704
|
+
scheduledAt: string | null;
|
|
1705
|
+
observed: BrowserPublicationObservation | null;
|
|
1706
|
+
publicDelivery: "NOT_ATTESTED";
|
|
1707
|
+
} | {
|
|
1708
|
+
state: "CANCELLED" | "REJECTED";
|
|
1709
|
+
nextAction: "HUMAN_REVIEW_ORIGINAL";
|
|
1710
|
+
messageRef: string;
|
|
1711
|
+
requestRef: string | null;
|
|
1712
|
+
dispatchRef: string | null;
|
|
1713
|
+
objectRef: string | null;
|
|
1714
|
+
originalScheduledAt: string | null;
|
|
1715
|
+
scheduledAt: string | null;
|
|
1716
|
+
observed: BrowserPublicationObservation | null;
|
|
1717
|
+
publicDelivery: "NOT_ATTESTED";
|
|
1718
|
+
} | {
|
|
1719
|
+
state: "PUBLICATION_REVIEW_REQUIRED";
|
|
1720
|
+
nextAction: "HUMAN_REVIEW_ORIGINAL";
|
|
1721
|
+
messageRef: string;
|
|
1722
|
+
requestRef: string | null;
|
|
1723
|
+
dispatchRef: string | null;
|
|
1724
|
+
objectRef: string | null;
|
|
1725
|
+
originalScheduledAt: string | null;
|
|
1726
|
+
scheduledAt: string | null;
|
|
1727
|
+
observed: BrowserPublicationObservation | null;
|
|
1728
|
+
publicDelivery: "NOT_ATTESTED";
|
|
1729
|
+
} | {
|
|
1730
|
+
state: "PROCESSING" | "REVIEW_PENDING";
|
|
1731
|
+
nextAction: "WAIT_ORIGINAL";
|
|
1732
|
+
messageRef: string;
|
|
1733
|
+
requestRef: string | null;
|
|
1734
|
+
dispatchRef: string | null;
|
|
1735
|
+
objectRef: string | null;
|
|
1736
|
+
originalScheduledAt: string | null;
|
|
1737
|
+
scheduledAt: string | null;
|
|
1738
|
+
observed: BrowserPublicationObservation | null;
|
|
1739
|
+
publicDelivery: "NOT_ATTESTED";
|
|
1740
|
+
} | {
|
|
1741
|
+
state: "SCHEDULE_ACCEPTED_PENDING" | "DUE_VERIFICATION_REQUIRED";
|
|
1742
|
+
nextAction: "VERIFY_ORIGINAL" | "WAIT_UNTIL_DUE";
|
|
1743
|
+
messageRef: string;
|
|
1744
|
+
requestRef: string | null;
|
|
1745
|
+
dispatchRef: string | null;
|
|
1746
|
+
objectRef: string | null;
|
|
1747
|
+
originalScheduledAt: string | null;
|
|
1748
|
+
scheduledAt: string | null;
|
|
1749
|
+
observed: BrowserPublicationObservation | null;
|
|
1750
|
+
publicDelivery: "NOT_ATTESTED";
|
|
1751
|
+
} | {
|
|
1752
|
+
state: "QUEUED" | "OUTCOME_NOT_PROVEN";
|
|
1753
|
+
nextAction: "INSPECT_ORIGINAL";
|
|
1754
|
+
messageRef: string;
|
|
1755
|
+
requestRef: string | null;
|
|
1756
|
+
dispatchRef: string | null;
|
|
1757
|
+
objectRef: string | null;
|
|
1758
|
+
originalScheduledAt: string | null;
|
|
1759
|
+
scheduledAt: string | null;
|
|
1760
|
+
observed: BrowserPublicationObservation | null;
|
|
1761
|
+
publicDelivery: "NOT_ATTESTED";
|
|
1762
|
+
};
|
|
342
1763
|
export interface NativeLoginConfiguration {
|
|
343
1764
|
issuer: string;
|
|
344
1765
|
clientId: string;
|