@actagent/googlechat 2026.6.2
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/README.md +11 -0
- package/actagent.plugin.json +17 -0
- package/api.ts +4 -0
- package/channel-config-api.ts +2 -0
- package/channel-plugin-api.ts +2 -0
- package/config-api.ts +3 -0
- package/contract-api.ts +6 -0
- package/directory-contract-api.ts +7 -0
- package/doctor-contract-api.ts +2 -0
- package/index.ts +21 -0
- package/npm-shrinkwrap.json +314 -0
- package/package.json +88 -0
- package/runtime-api.ts +61 -0
- package/secret-contract-api.ts +6 -0
- package/setup-entry.ts +14 -0
- package/setup-plugin-api.ts +3 -0
- package/src/accounts.ts +185 -0
- package/src/actions.test.ts +312 -0
- package/src/actions.ts +228 -0
- package/src/api.ts +346 -0
- package/src/approval-auth.test.ts +25 -0
- package/src/approval-auth.ts +38 -0
- package/src/approval-card-actions.test.ts +113 -0
- package/src/approval-card-actions.ts +307 -0
- package/src/approval-card-click.test.ts +279 -0
- package/src/approval-card-click.ts +94 -0
- package/src/approval-handler.runtime.test.ts +388 -0
- package/src/approval-handler.runtime.ts +413 -0
- package/src/approval-native.test.ts +399 -0
- package/src/approval-native.ts +246 -0
- package/src/auth.ts +219 -0
- package/src/channel-base.ts +123 -0
- package/src/channel-config.test.ts +174 -0
- package/src/channel.adapters.ts +363 -0
- package/src/channel.deps.runtime.ts +30 -0
- package/src/channel.runtime.ts +18 -0
- package/src/channel.setup.ts +7 -0
- package/src/channel.test.ts +845 -0
- package/src/channel.ts +214 -0
- package/src/config-schema.test.ts +32 -0
- package/src/config-schema.ts +4 -0
- package/src/doctor-contract.test.ts +76 -0
- package/src/doctor-contract.ts +181 -0
- package/src/doctor.ts +58 -0
- package/src/gateway.ts +84 -0
- package/src/google-auth.runtime.test.ts +571 -0
- package/src/google-auth.runtime.ts +570 -0
- package/src/group-policy.ts +18 -0
- package/src/monitor-access.test.ts +492 -0
- package/src/monitor-access.ts +466 -0
- package/src/monitor-durable.test.ts +40 -0
- package/src/monitor-durable.ts +24 -0
- package/src/monitor-reply-delivery.ts +162 -0
- package/src/monitor-routing.ts +66 -0
- package/src/monitor-types.ts +34 -0
- package/src/monitor-webhook.test.ts +670 -0
- package/src/monitor-webhook.ts +361 -0
- package/src/monitor.reply-delivery.test.ts +145 -0
- package/src/monitor.test.ts +389 -0
- package/src/monitor.ts +530 -0
- package/src/monitor.webhook-routing.test.ts +258 -0
- package/src/runtime.ts +10 -0
- package/src/secret-contract.test.ts +61 -0
- package/src/secret-contract.ts +162 -0
- package/src/setup-core.ts +41 -0
- package/src/setup-surface.ts +244 -0
- package/src/setup.test.ts +620 -0
- package/src/targets.test.ts +562 -0
- package/src/targets.ts +67 -0
- package/src/types.config.ts +4 -0
- package/src/types.ts +139 -0
- package/test-api.ts +3 -0
- package/tsconfig.json +16 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// Googlechat type declarations define plugin contracts.
|
|
2
|
+
export type GoogleChatSpace = {
|
|
3
|
+
name?: string;
|
|
4
|
+
displayName?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type GoogleChatUser = {
|
|
9
|
+
name?: string;
|
|
10
|
+
displayName?: string;
|
|
11
|
+
email?: string;
|
|
12
|
+
type?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
type GoogleChatThread = {
|
|
16
|
+
name?: string;
|
|
17
|
+
threadKey?: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
type GoogleChatAttachmentDataRef = {
|
|
21
|
+
resourceName?: string;
|
|
22
|
+
attachmentUploadToken?: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type GoogleChatAttachment = {
|
|
26
|
+
name?: string;
|
|
27
|
+
contentName?: string;
|
|
28
|
+
contentType?: string;
|
|
29
|
+
thumbnailUri?: string;
|
|
30
|
+
downloadUri?: string;
|
|
31
|
+
source?: string;
|
|
32
|
+
attachmentDataRef?: GoogleChatAttachmentDataRef;
|
|
33
|
+
driveDataRef?: Record<string, unknown>;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
type GoogleChatUserMention = {
|
|
37
|
+
user?: GoogleChatUser;
|
|
38
|
+
type?: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type GoogleChatAnnotation = {
|
|
42
|
+
type?: string;
|
|
43
|
+
startIndex?: number;
|
|
44
|
+
length?: number;
|
|
45
|
+
userMention?: GoogleChatUserMention;
|
|
46
|
+
slashCommand?: Record<string, unknown>;
|
|
47
|
+
richLinkMetadata?: Record<string, unknown>;
|
|
48
|
+
customEmojiMetadata?: Record<string, unknown>;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type GoogleChatMessage = {
|
|
52
|
+
name?: string;
|
|
53
|
+
text?: string;
|
|
54
|
+
argumentText?: string;
|
|
55
|
+
sender?: GoogleChatUser;
|
|
56
|
+
thread?: GoogleChatThread;
|
|
57
|
+
cardsV2?: GoogleChatCardV2[];
|
|
58
|
+
attachment?: GoogleChatAttachment[];
|
|
59
|
+
annotations?: GoogleChatAnnotation[];
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export type GoogleChatActionParameter = {
|
|
63
|
+
key?: string;
|
|
64
|
+
value?: string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export type GoogleChatAction = {
|
|
68
|
+
actionMethodName?: string;
|
|
69
|
+
parameters?: GoogleChatActionParameter[];
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type GoogleChatEvent = {
|
|
73
|
+
type?: string;
|
|
74
|
+
eventType?: string;
|
|
75
|
+
eventTime?: string;
|
|
76
|
+
space?: GoogleChatSpace;
|
|
77
|
+
user?: GoogleChatUser;
|
|
78
|
+
message?: GoogleChatMessage;
|
|
79
|
+
action?: GoogleChatAction;
|
|
80
|
+
common?: {
|
|
81
|
+
invokedFunction?: string;
|
|
82
|
+
parameters?: Record<string, string>;
|
|
83
|
+
};
|
|
84
|
+
commonEventObject?: {
|
|
85
|
+
invokedFunction?: string;
|
|
86
|
+
parameters?: Record<string, string>;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type GoogleChatReaction = {
|
|
91
|
+
name?: string;
|
|
92
|
+
user?: GoogleChatUser;
|
|
93
|
+
emoji?: { unicode?: string };
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export type GoogleChatTextParagraphWidget = {
|
|
97
|
+
textParagraph: {
|
|
98
|
+
text: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export type GoogleChatButtonWidget = {
|
|
103
|
+
buttonList: {
|
|
104
|
+
buttons: Array<{
|
|
105
|
+
text: string;
|
|
106
|
+
onClick: {
|
|
107
|
+
action: {
|
|
108
|
+
function: string;
|
|
109
|
+
parameters?: GoogleChatActionParameter[];
|
|
110
|
+
loadIndicator?: "SPINNER" | "NONE";
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
}>;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export type GoogleChatDividerWidget = { divider: Record<string, never> };
|
|
118
|
+
|
|
119
|
+
export type GoogleChatWidget =
|
|
120
|
+
| GoogleChatTextParagraphWidget
|
|
121
|
+
| GoogleChatButtonWidget
|
|
122
|
+
| GoogleChatDividerWidget;
|
|
123
|
+
|
|
124
|
+
export type GoogleChatCardV2 = {
|
|
125
|
+
cardId?: string;
|
|
126
|
+
card: {
|
|
127
|
+
header?: {
|
|
128
|
+
title?: string;
|
|
129
|
+
subtitle?: string;
|
|
130
|
+
imageType?: "SQUARE" | "CIRCLE";
|
|
131
|
+
};
|
|
132
|
+
sections?: Array<{
|
|
133
|
+
header?: string;
|
|
134
|
+
collapsible?: boolean;
|
|
135
|
+
uncollapsibleWidgetsCount?: number;
|
|
136
|
+
widgets?: GoogleChatWidget[];
|
|
137
|
+
}>;
|
|
138
|
+
};
|
|
139
|
+
};
|
package/test-api.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.package-boundary.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"rootDir": "."
|
|
5
|
+
},
|
|
6
|
+
"include": ["./*.ts", "./src/**/*.ts"],
|
|
7
|
+
"exclude": [
|
|
8
|
+
"./**/*.test.ts",
|
|
9
|
+
"./dist/**",
|
|
10
|
+
"./node_modules/**",
|
|
11
|
+
"./src/test-support/**",
|
|
12
|
+
"./src/**/*test-helpers.ts",
|
|
13
|
+
"./src/**/*test-harness.ts",
|
|
14
|
+
"./src/**/*test-support.ts"
|
|
15
|
+
]
|
|
16
|
+
}
|