@auxee/piece-google-chat-custom 0.0.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/package.json +31 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +47 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/add-a-space-member.d.ts +4 -0
- package/src/lib/actions/add-a-space-member.js +33 -0
- package/src/lib/actions/add-a-space-member.js.map +1 -0
- package/src/lib/actions/find-member.d.ts +4 -0
- package/src/lib/actions/find-member.js +52 -0
- package/src/lib/actions/find-member.js.map +1 -0
- package/src/lib/actions/get-direct-message-details.d.ts +3 -0
- package/src/lib/actions/get-direct-message-details.js +30 -0
- package/src/lib/actions/get-direct-message-details.js.map +1 -0
- package/src/lib/actions/get-message.d.ts +3 -0
- package/src/lib/actions/get-message.js +30 -0
- package/src/lib/actions/get-message.js.map +1 -0
- package/src/lib/actions/search-messages.d.ts +5 -0
- package/src/lib/actions/search-messages.js +40 -0
- package/src/lib/actions/search-messages.js.map +1 -0
- package/src/lib/actions/send-a-message.d.ts +8 -0
- package/src/lib/actions/send-a-message.js +103 -0
- package/src/lib/actions/send-a-message.js.map +1 -0
- package/src/lib/common/constants.d.ts +16 -0
- package/src/lib/common/constants.js +35 -0
- package/src/lib/common/constants.js.map +1 -0
- package/src/lib/common/index.d.ts +42 -0
- package/src/lib/common/index.js +20 -0
- package/src/lib/common/index.js.map +1 -0
- package/src/lib/common/props.d.ts +19 -0
- package/src/lib/common/props.js +278 -0
- package/src/lib/common/props.js.map +1 -0
- package/src/lib/common/requests.d.ts +98 -0
- package/src/lib/common/requests.js +358 -0
- package/src/lib/common/requests.js.map +1 -0
- package/src/lib/common/schemas.d.ts +54 -0
- package/src/lib/common/schemas.js +91 -0
- package/src/lib/common/schemas.js.map +1 -0
- package/src/lib/triggers/new-mention.d.ts +14 -0
- package/src/lib/triggers/new-mention.js +96 -0
- package/src/lib/triggers/new-mention.js.map +1 -0
- package/src/lib/triggers/new-message.d.ts +11 -0
- package/src/lib/triggers/new-message.js +80 -0
- package/src/lib/triggers/new-message.js.map +1 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.threadsDropdown = exports.peoplesDropdown = exports.spacesMembersDropdown = exports.directMessagesDropdown = exports.allSpacesDropdown = exports.spacesDropdown = exports.projectsDropdown = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const requests_1 = require("./requests");
|
|
7
|
+
const projectsDropdown = (refreshers) => pieces_framework_1.Property.Dropdown({
|
|
8
|
+
displayName: 'Project',
|
|
9
|
+
description: 'Select a Google Cloud Project',
|
|
10
|
+
required: true,
|
|
11
|
+
refreshers,
|
|
12
|
+
options(_a) {
|
|
13
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
|
|
14
|
+
if (!auth) {
|
|
15
|
+
return {
|
|
16
|
+
disabled: true,
|
|
17
|
+
placeholder: 'Connect your Google account first',
|
|
18
|
+
options: [],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
const projects = yield requests_1.googleChatAPIService.fetchProjects(auth.access_token);
|
|
23
|
+
return {
|
|
24
|
+
options: projects.map((project) => ({
|
|
25
|
+
label: project.name,
|
|
26
|
+
value: project.projectId,
|
|
27
|
+
})),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
catch (e) {
|
|
31
|
+
console.error('Failed to fetch projects', e);
|
|
32
|
+
return {
|
|
33
|
+
options: [],
|
|
34
|
+
placeholder: 'Unable to load projects',
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
exports.projectsDropdown = projectsDropdown;
|
|
41
|
+
const spacesDropdown = ({ refreshers, required = false, }) => pieces_framework_1.Property.Dropdown({
|
|
42
|
+
displayName: 'Space',
|
|
43
|
+
description: `Select a Space${required ? '' : ', leave empty for all spaces'}`,
|
|
44
|
+
required,
|
|
45
|
+
refreshers,
|
|
46
|
+
options(_a) {
|
|
47
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
|
|
48
|
+
if (!auth) {
|
|
49
|
+
return {
|
|
50
|
+
disabled: true,
|
|
51
|
+
placeholder: 'Connect your Google account first',
|
|
52
|
+
options: [],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
const spaces = yield requests_1.googleChatAPIService.fetchSpaces(auth.access_token);
|
|
57
|
+
return {
|
|
58
|
+
options: spaces.map((space) => ({
|
|
59
|
+
label: space.displayName || space.name,
|
|
60
|
+
value: space.name,
|
|
61
|
+
})),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
catch (e) {
|
|
65
|
+
console.error('Failed to fetch spaces', e);
|
|
66
|
+
return {
|
|
67
|
+
options: [],
|
|
68
|
+
placeholder: 'Unable to load spaces',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
exports.spacesDropdown = spacesDropdown;
|
|
75
|
+
const allSpacesDropdown = ({ refreshers, required = false, }) => pieces_framework_1.Property.Dropdown({
|
|
76
|
+
displayName: 'Space',
|
|
77
|
+
description: `Select a Space${required ? '' : ', leave empty for all spaces'}`,
|
|
78
|
+
required,
|
|
79
|
+
refreshers,
|
|
80
|
+
options(_a) {
|
|
81
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
|
|
82
|
+
if (!auth) {
|
|
83
|
+
return {
|
|
84
|
+
disabled: true,
|
|
85
|
+
placeholder: 'Connect your Google account first',
|
|
86
|
+
options: [],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
const spaces = yield requests_1.googleChatAPIService.fetchAllSpaces(auth.access_token);
|
|
91
|
+
return {
|
|
92
|
+
options: spaces.map((space) => ({
|
|
93
|
+
label: space.displayName || space.name,
|
|
94
|
+
value: space.name,
|
|
95
|
+
})),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
catch (e) {
|
|
99
|
+
console.error('Failed to fetch spaces', e);
|
|
100
|
+
return {
|
|
101
|
+
options: [],
|
|
102
|
+
placeholder: 'Unable to load spaces',
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
exports.allSpacesDropdown = allSpacesDropdown;
|
|
109
|
+
const directMessagesDropdown = ({ refreshers, required = false, }) => pieces_framework_1.Property.Dropdown({
|
|
110
|
+
displayName: 'Direct Message',
|
|
111
|
+
description: `Select a Direct Message${required ? '' : ', leave empty for all spaces'}`,
|
|
112
|
+
required,
|
|
113
|
+
refreshers,
|
|
114
|
+
options(_a) {
|
|
115
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
|
|
116
|
+
if (!auth) {
|
|
117
|
+
return {
|
|
118
|
+
disabled: true,
|
|
119
|
+
placeholder: 'Connect your Google account first',
|
|
120
|
+
options: [],
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
try {
|
|
124
|
+
const spaces = yield requests_1.googleChatAPIService.fetchDirectMessages(auth.access_token);
|
|
125
|
+
return {
|
|
126
|
+
options: spaces.map((space) => ({
|
|
127
|
+
label: space.displayName || space.name,
|
|
128
|
+
value: space.name,
|
|
129
|
+
})),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
catch (e) {
|
|
133
|
+
console.error('Failed to fetch spaces', e);
|
|
134
|
+
return {
|
|
135
|
+
options: [],
|
|
136
|
+
placeholder: 'Unable to load spaces',
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
exports.directMessagesDropdown = directMessagesDropdown;
|
|
143
|
+
const spacesMembersDropdown = (refreshers) => pieces_framework_1.Property.Dropdown({
|
|
144
|
+
displayName: 'Space Member',
|
|
145
|
+
description: 'Select a space member, leave empty for all members',
|
|
146
|
+
required: false,
|
|
147
|
+
refreshers,
|
|
148
|
+
options(_a) {
|
|
149
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, spaceId }) {
|
|
150
|
+
if (!auth) {
|
|
151
|
+
return {
|
|
152
|
+
disabled: true,
|
|
153
|
+
placeholder: 'Connect your Google account first',
|
|
154
|
+
options: [],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
if (!spaceId) {
|
|
158
|
+
return {
|
|
159
|
+
disabled: true,
|
|
160
|
+
placeholder: 'Please select a space first',
|
|
161
|
+
options: [],
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
try {
|
|
165
|
+
const members = yield requests_1.googleChatAPIService.fetchSpaceMembers(auth.access_token, spaceId);
|
|
166
|
+
return {
|
|
167
|
+
options: members.map((member) => ({
|
|
168
|
+
label: member.member.name,
|
|
169
|
+
value: member.member.name,
|
|
170
|
+
})),
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
catch (e) {
|
|
174
|
+
console.error('Failed to fetch space members', e);
|
|
175
|
+
return {
|
|
176
|
+
options: [],
|
|
177
|
+
placeholder: 'Unable to load space members',
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
exports.spacesMembersDropdown = spacesMembersDropdown;
|
|
184
|
+
const peoplesDropdown = (refreshers) => pieces_framework_1.Property.Dropdown({
|
|
185
|
+
displayName: 'Select A Person',
|
|
186
|
+
description: 'Select a person',
|
|
187
|
+
required: true,
|
|
188
|
+
refreshers,
|
|
189
|
+
options(_a) {
|
|
190
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
|
|
191
|
+
if (!auth) {
|
|
192
|
+
return {
|
|
193
|
+
disabled: true,
|
|
194
|
+
placeholder: 'Connect your Google account first',
|
|
195
|
+
options: [],
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
try {
|
|
199
|
+
const members = yield requests_1.googleChatAPIService.fetchPeople(auth.access_token);
|
|
200
|
+
return {
|
|
201
|
+
options: members
|
|
202
|
+
.map((member) => {
|
|
203
|
+
var _a, _b;
|
|
204
|
+
const nameObj = ((_a = member.names) === null || _a === void 0 ? void 0 : _a.find((n) => n.metadata.primary)) ||
|
|
205
|
+
((_b = member.names) === null || _b === void 0 ? void 0 : _b[0]);
|
|
206
|
+
if (!nameObj)
|
|
207
|
+
return null;
|
|
208
|
+
return {
|
|
209
|
+
label: nameObj.displayName,
|
|
210
|
+
value: member.resourceName,
|
|
211
|
+
};
|
|
212
|
+
})
|
|
213
|
+
.filter(Boolean),
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
catch (e) {
|
|
217
|
+
console.error('Failed to fetch people', e);
|
|
218
|
+
return {
|
|
219
|
+
options: [],
|
|
220
|
+
placeholder: 'Unable to load people',
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
},
|
|
225
|
+
});
|
|
226
|
+
exports.peoplesDropdown = peoplesDropdown;
|
|
227
|
+
const threadsDropdown = ({ refreshers, required = false, }) => pieces_framework_1.Property.Dropdown({
|
|
228
|
+
displayName: 'Thread',
|
|
229
|
+
description: `Select a thread to reply to${required ? '' : ', leave empty for new thread'}`,
|
|
230
|
+
required,
|
|
231
|
+
refreshers,
|
|
232
|
+
options(_a) {
|
|
233
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, spaceId }) {
|
|
234
|
+
if (!auth) {
|
|
235
|
+
return {
|
|
236
|
+
disabled: true,
|
|
237
|
+
placeholder: 'Connect your Google account first',
|
|
238
|
+
options: [],
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
if (!spaceId) {
|
|
242
|
+
return {
|
|
243
|
+
disabled: true,
|
|
244
|
+
placeholder: 'Please select a space first',
|
|
245
|
+
options: [],
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
if (!spaceId.startsWith('spaces/')) {
|
|
249
|
+
return {
|
|
250
|
+
disabled: true,
|
|
251
|
+
placeholder: 'Invalid space ID format. Please select a valid space.',
|
|
252
|
+
options: [],
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
try {
|
|
256
|
+
const threads = yield requests_1.googleChatAPIService.fetchThreads(auth.access_token, spaceId);
|
|
257
|
+
const options = threads.map((thread) => ({
|
|
258
|
+
label: thread.displayName || thread.name,
|
|
259
|
+
value: thread.name,
|
|
260
|
+
}));
|
|
261
|
+
options.unshift({
|
|
262
|
+
label: 'Start new thread',
|
|
263
|
+
value: '',
|
|
264
|
+
});
|
|
265
|
+
return { options };
|
|
266
|
+
}
|
|
267
|
+
catch (e) {
|
|
268
|
+
console.error('Failed to fetch threads', e);
|
|
269
|
+
return {
|
|
270
|
+
options: [],
|
|
271
|
+
placeholder: 'Unable to load threads',
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
},
|
|
276
|
+
});
|
|
277
|
+
exports.threadsDropdown = threadsDropdown;
|
|
278
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/custom/google-chat-custom/src/lib/common/props.ts"],"names":[],"mappings":";;;;AAAA,qEAA0D;AAC1D,yCAAkD;AAE3C,MAAM,gBAAgB,GAAG,CAAC,UAAoB,EAAE,EAAE,CACvD,2BAAQ,CAAC,QAAQ,CAAC;IAChB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,+BAA+B;IAC5C,QAAQ,EAAE,IAAI;IACd,UAAU;IACJ,OAAO;qEAAC,EAAE,IAAI,EAAO;YACzB,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO;oBACL,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,mCAAmC;oBAChD,OAAO,EAAE,EAAE;iBACZ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C,OAAO;oBACL,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,wBAAwB;iBACtC,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC;AA9DQ,QAAA,eAAe,mBA8DvB"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export declare const googleChatAPIService: {
|
|
2
|
+
fetchProjects(accessToken: string): Promise<any>;
|
|
3
|
+
sendMessage({ accessToken, spaceId, text, thread, messageReplyOption, customMessageId, isPrivate, privateMessageViewer, }: {
|
|
4
|
+
accessToken: string;
|
|
5
|
+
spaceId: string;
|
|
6
|
+
text: string;
|
|
7
|
+
thread?: string;
|
|
8
|
+
messageReplyOption?: string;
|
|
9
|
+
customMessageId?: string;
|
|
10
|
+
isPrivate?: boolean;
|
|
11
|
+
privateMessageViewer?: string;
|
|
12
|
+
}): Promise<any>;
|
|
13
|
+
AddASpaceMember({ accessToken, spaceId, userId, }: {
|
|
14
|
+
accessToken: string;
|
|
15
|
+
spaceId: string;
|
|
16
|
+
userId: string;
|
|
17
|
+
}): Promise<any>;
|
|
18
|
+
getMessage(accessToken: string, messageName: string): Promise<any>;
|
|
19
|
+
getSpace({ accessToken, spaceId, }: {
|
|
20
|
+
accessToken: string;
|
|
21
|
+
spaceId: string;
|
|
22
|
+
}): Promise<any>;
|
|
23
|
+
listMessages(accessToken: string, spaceId: string, pageSize?: number): Promise<any>;
|
|
24
|
+
fetchAllSpaces(accessToken: string): Promise<any>;
|
|
25
|
+
fetchSpaces(accessToken: string): Promise<any>;
|
|
26
|
+
fetchDirectMessages(accessToken: string): Promise<any>;
|
|
27
|
+
fetchThreads(accessToken: string, spaceId: string): Promise<any[]>;
|
|
28
|
+
fetchSpaceMembers(accessToken: string, spaceId: string): Promise<any>;
|
|
29
|
+
fetchPeople(accessToken: string): Promise<any>;
|
|
30
|
+
deleteWorkspaceEventsSubscription({ accessToken, subscriptionName, }: {
|
|
31
|
+
accessToken: string;
|
|
32
|
+
subscriptionName: string;
|
|
33
|
+
}): Promise<any>;
|
|
34
|
+
grantTopicPermissions({ accessToken, projectId, topicName, }: {
|
|
35
|
+
accessToken: string;
|
|
36
|
+
projectId: string;
|
|
37
|
+
topicName: string;
|
|
38
|
+
}): Promise<any>;
|
|
39
|
+
createPubSubTopic({ accessToken, projectId, topicName, }: {
|
|
40
|
+
accessToken: string;
|
|
41
|
+
projectId: string;
|
|
42
|
+
topicName: string;
|
|
43
|
+
}): Promise<any>;
|
|
44
|
+
deletePubSubTopic({ accessToken, projectId, topicName, }: {
|
|
45
|
+
accessToken: string;
|
|
46
|
+
projectId: string;
|
|
47
|
+
topicName: string;
|
|
48
|
+
}): Promise<any>;
|
|
49
|
+
createWorkspaceEventsSubscription({ accessToken, projectId, subscriptionName, targetResource, eventTypes, topicName, includeResource, }: {
|
|
50
|
+
accessToken: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
subscriptionName: string;
|
|
53
|
+
targetResource: string;
|
|
54
|
+
eventTypes: string[];
|
|
55
|
+
topicName: string;
|
|
56
|
+
includeResource?: boolean;
|
|
57
|
+
}): Promise<any>;
|
|
58
|
+
createPubSubSubscription({ accessToken, projectId, subscriptionName, topicName, pushEndpoint, }: {
|
|
59
|
+
accessToken: string;
|
|
60
|
+
projectId: string;
|
|
61
|
+
subscriptionName: string;
|
|
62
|
+
topicName: string;
|
|
63
|
+
pushEndpoint: string;
|
|
64
|
+
}): Promise<any>;
|
|
65
|
+
createWebhookSubscription({ accessToken, projectId, topic, subscriptionName, webhookUrl, eventTypes, targetResource, }: {
|
|
66
|
+
accessToken: string;
|
|
67
|
+
projectId: string;
|
|
68
|
+
topic: string;
|
|
69
|
+
webhookUrl: string;
|
|
70
|
+
subscriptionName: string;
|
|
71
|
+
eventTypes: string[];
|
|
72
|
+
targetResource: string;
|
|
73
|
+
}): Promise<{
|
|
74
|
+
workspaceSubscription: any;
|
|
75
|
+
pubsubSubscription: any;
|
|
76
|
+
}>;
|
|
77
|
+
deletePubSubSubscription({ accessToken, projectId, subscriptionName, }: {
|
|
78
|
+
accessToken: string;
|
|
79
|
+
projectId: string;
|
|
80
|
+
subscriptionName: string;
|
|
81
|
+
}): Promise<any>;
|
|
82
|
+
deleteWebhookSubscription({ accessToken, projectId, subscriptionName, topicName, event_type, }: {
|
|
83
|
+
accessToken: string;
|
|
84
|
+
projectId: string;
|
|
85
|
+
subscriptionName: string;
|
|
86
|
+
topicName: string;
|
|
87
|
+
event_type: string;
|
|
88
|
+
}): Promise<any>;
|
|
89
|
+
fetchWorkSpaceSubscriptions({ accessToken, event_type, }: {
|
|
90
|
+
accessToken: string;
|
|
91
|
+
event_type: string;
|
|
92
|
+
}): Promise<any>;
|
|
93
|
+
cleanupWebhookResources({ accessToken, projectId, event_type, }: {
|
|
94
|
+
accessToken: string;
|
|
95
|
+
projectId: string;
|
|
96
|
+
event_type: string;
|
|
97
|
+
}): Promise<void>;
|
|
98
|
+
};
|