piece-signal-cli-rest-api 0.2.0 → 0.2.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 +26 -4
- package/src/index.d.ts +8 -0
- package/src/index.js +90 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/add-admins-to-group.d.ts +12 -0
- package/src/lib/actions/add-admins-to-group.js +45 -0
- package/src/lib/actions/add-admins-to-group.js.map +1 -0
- package/src/lib/actions/add-device.d.ts +11 -0
- package/src/lib/actions/add-device.js +40 -0
- package/src/lib/actions/add-device.js.map +1 -0
- package/src/lib/actions/add-members-to-group.d.ts +12 -0
- package/src/lib/actions/add-members-to-group.js +45 -0
- package/src/lib/actions/add-members-to-group.js.map +1 -0
- package/src/lib/actions/block-group.d.ts +11 -0
- package/src/lib/actions/block-group.js +37 -0
- package/src/lib/actions/block-group.js.map +1 -0
- package/src/lib/actions/create-group.d.ts +18 -0
- package/src/lib/actions/create-group.js +117 -0
- package/src/lib/actions/create-group.js.map +1 -0
- package/src/lib/actions/delete-group.d.ts +11 -0
- package/src/lib/actions/delete-group.js +37 -0
- package/src/lib/actions/delete-group.js.map +1 -0
- package/src/lib/actions/get-contact.d.ts +11 -0
- package/src/lib/actions/get-contact.js +37 -0
- package/src/lib/actions/get-contact.js.map +1 -0
- package/src/lib/actions/get-group.d.ts +11 -0
- package/src/lib/actions/get-group.js +37 -0
- package/src/lib/actions/get-group.js.map +1 -0
- package/src/lib/actions/get-qr-code-link.d.ts +11 -0
- package/src/lib/actions/get-qr-code-link.js +60 -0
- package/src/lib/actions/get-qr-code-link.js.map +1 -0
- package/src/lib/actions/join-group.d.ts +11 -0
- package/src/lib/actions/join-group.js +37 -0
- package/src/lib/actions/join-group.js.map +1 -0
- package/src/lib/actions/list-accounts.d.ts +8 -0
- package/src/lib/actions/list-accounts.js +23 -0
- package/src/lib/actions/list-accounts.js.map +1 -0
- package/src/lib/actions/list-attachments.d.ts +8 -0
- package/src/lib/actions/list-attachments.js +23 -0
- package/src/lib/actions/list-attachments.js.map +1 -0
- package/src/lib/actions/list-contacts.d.ts +10 -0
- package/src/lib/actions/list-contacts.js +32 -0
- package/src/lib/actions/list-contacts.js.map +1 -0
- package/src/lib/actions/list-devices.d.ts +10 -0
- package/src/lib/actions/list-devices.js +32 -0
- package/src/lib/actions/list-devices.js.map +1 -0
- package/src/lib/actions/list-groups.d.ts +10 -0
- package/src/lib/actions/list-groups.js +32 -0
- package/src/lib/actions/list-groups.js.map +1 -0
- package/src/lib/actions/list-identities.d.ts +10 -0
- package/src/lib/actions/list-identities.js +32 -0
- package/src/lib/actions/list-identities.js.map +1 -0
- package/src/lib/actions/quit-group.d.ts +11 -0
- package/src/lib/actions/quit-group.js +37 -0
- package/src/lib/actions/quit-group.js.map +1 -0
- package/src/lib/actions/receive-messages.d.ts +15 -0
- package/src/lib/actions/receive-messages.js +100 -0
- package/src/lib/actions/receive-messages.js.map +1 -0
- package/src/lib/actions/remote-delete-message.d.ts +12 -0
- package/src/lib/actions/remote-delete-message.js +46 -0
- package/src/lib/actions/remote-delete-message.js.map +1 -0
- package/src/lib/actions/remove-admins-from-group.d.ts +12 -0
- package/src/lib/actions/remove-admins-from-group.js +45 -0
- package/src/lib/actions/remove-admins-from-group.js.map +1 -0
- package/src/lib/actions/remove-device.d.ts +11 -0
- package/src/lib/actions/remove-device.js +37 -0
- package/src/lib/actions/remove-device.js.map +1 -0
- package/src/lib/actions/remove-members-from-group.d.ts +12 -0
- package/src/lib/actions/remove-members-from-group.js +45 -0
- package/src/lib/actions/remove-members-from-group.js.map +1 -0
- package/src/lib/actions/remove-reaction.d.ts +13 -0
- package/src/lib/actions/remove-reaction.js +52 -0
- package/src/lib/actions/remove-reaction.js.map +1 -0
- package/src/lib/actions/request-approval-message.d.ts +15 -0
- package/src/lib/actions/request-approval-message.js +184 -0
- package/src/lib/actions/request-approval-message.js.map +1 -0
- package/src/lib/actions/resume-approval-flow.d.ts +11 -0
- package/src/lib/actions/resume-approval-flow.js +181 -0
- package/src/lib/actions/resume-approval-flow.js.map +1 -0
- package/src/lib/actions/search-numbers.d.ts +11 -0
- package/src/lib/actions/search-numbers.js +42 -0
- package/src/lib/actions/search-numbers.js.map +1 -0
- package/src/lib/actions/send-message.d.ts +27 -0
- package/src/lib/actions/send-message.js +176 -0
- package/src/lib/actions/send-message.js.map +1 -0
- package/src/lib/actions/send-reaction.d.ts +14 -0
- package/src/lib/actions/send-reaction.js +58 -0
- package/src/lib/actions/send-reaction.js.map +1 -0
- package/src/lib/actions/send-receipt.d.ts +13 -0
- package/src/lib/actions/send-receipt.js +58 -0
- package/src/lib/actions/send-receipt.js.map +1 -0
- package/src/lib/actions/start-typing.d.ts +11 -0
- package/src/lib/actions/start-typing.js +40 -0
- package/src/lib/actions/start-typing.js.map +1 -0
- package/src/lib/actions/stop-typing.d.ts +11 -0
- package/src/lib/actions/stop-typing.js +40 -0
- package/src/lib/actions/stop-typing.js.map +1 -0
- package/src/lib/actions/sync-contacts.d.ts +10 -0
- package/src/lib/actions/sync-contacts.js +32 -0
- package/src/lib/actions/sync-contacts.js.map +1 -0
- package/src/lib/actions/update-account-settings.d.ts +12 -0
- package/src/lib/actions/update-account-settings.js +49 -0
- package/src/lib/actions/update-account-settings.js.map +1 -0
- package/src/lib/actions/update-contact.d.ts +13 -0
- package/src/lib/actions/update-contact.js +56 -0
- package/src/lib/actions/update-contact.js.map +1 -0
- package/src/lib/actions/update-group.d.ts +19 -0
- package/src/lib/actions/update-group.js +125 -0
- package/src/lib/actions/update-group.js.map +1 -0
- package/src/lib/actions/update-profile.d.ts +13 -0
- package/src/lib/actions/update-profile.js +56 -0
- package/src/lib/actions/update-profile.js.map +1 -0
- package/src/lib/common/api-client.d.ts +24 -0
- package/src/lib/common/api-client.js +103 -0
- package/src/lib/common/api-client.js.map +1 -0
- package/src/lib/common/auth.d.ts +8 -0
- package/src/lib/common/auth.js +68 -0
- package/src/lib/common/auth.js.map +1 -0
- package/src/lib/common/message-utils.d.ts +81 -0
- package/src/lib/common/message-utils.js +327 -0
- package/src/lib/common/message-utils.js.map +1 -0
- package/src/lib/common/types.d.ts +65 -0
- package/src/lib/common/types.js +3 -0
- package/src/lib/common/types.js.map +1 -0
- package/src/lib/common/utils.d.ts +23 -0
- package/src/lib/common/utils.js +105 -0
- package/src/lib/common/utils.js.map +1 -0
- package/src/lib/triggers/new-group-member.d.ts +50 -0
- package/src/lib/triggers/new-group-member.js +155 -0
- package/src/lib/triggers/new-group-member.js.map +1 -0
- package/src/lib/triggers/new-message-received.d.ts +58 -0
- package/src/lib/triggers/new-message-received.js +469 -0
- package/src/lib/triggers/new-message-received.js.map +1 -0
- package/project.json +0 -58
- package/src/index.ts +0 -87
- package/src/lib/actions/add-admins-to-group.ts +0 -50
- package/src/lib/actions/add-device.ts +0 -45
- package/src/lib/actions/add-members-to-group.ts +0 -50
- package/src/lib/actions/block-group.ts +0 -36
- package/src/lib/actions/create-group.ts +0 -139
- package/src/lib/actions/delete-group.ts +0 -36
- package/src/lib/actions/get-contact.ts +0 -42
- package/src/lib/actions/get-group.ts +0 -37
- package/src/lib/actions/get-qr-code-link.ts +0 -62
- package/src/lib/actions/join-group.ts +0 -36
- package/src/lib/actions/list-accounts.ts +0 -20
- package/src/lib/actions/list-attachments.ts +0 -20
- package/src/lib/actions/list-contacts.ts +0 -37
- package/src/lib/actions/list-devices.ts +0 -38
- package/src/lib/actions/list-groups.ts +0 -32
- package/src/lib/actions/list-identities.ts +0 -32
- package/src/lib/actions/quit-group.ts +0 -36
- package/src/lib/actions/receive-messages.ts +0 -108
- package/src/lib/actions/remote-delete-message.ts +0 -56
- package/src/lib/actions/remove-admins-from-group.ts +0 -50
- package/src/lib/actions/remove-device.ts +0 -36
- package/src/lib/actions/remove-members-from-group.ts +0 -50
- package/src/lib/actions/remove-reaction.ts +0 -59
- package/src/lib/actions/request-approval-message.ts +0 -215
- package/src/lib/actions/search-numbers.ts +0 -47
- package/src/lib/actions/send-message.ts +0 -189
- package/src/lib/actions/send-reaction.ts +0 -66
- package/src/lib/actions/send-receipt.ts +0 -65
- package/src/lib/actions/start-typing.ts +0 -45
- package/src/lib/actions/stop-typing.ts +0 -45
- package/src/lib/actions/sync-contacts.ts +0 -31
- package/src/lib/actions/update-account-settings.ts +0 -57
- package/src/lib/actions/update-contact.ts +0 -65
- package/src/lib/actions/update-group.ts +0 -145
- package/src/lib/actions/update-profile.ts +0 -65
- package/src/lib/common/api-client.ts +0 -150
- package/src/lib/common/auth.ts +0 -66
- package/src/lib/common/message-utils.ts +0 -449
- package/src/lib/common/types.ts +0 -73
- package/src/lib/common/utils.ts +0 -106
- package/src/lib/triggers/new-group-member.ts +0 -176
- package/src/lib/triggers/new-message-received.ts +0 -618
- package/tsconfig.json +0 -19
- package/tsconfig.lib.json +0 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-contact.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/get-contact.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAsD;AACtD,qDAA0D;AAC1D,2CAAoD;AAQvC,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,mCAAmC;IAChD,KAAK,EAAE;QACN,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC5C,+CAA+C;YAE/C,MAAM,SAAS,GAAG,IAAI,+BAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAC;YAElD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CACnC,gBAAgB,kBAAkB,CAAC,eAAe,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE,CACjF,CAAC;YAEF,OAAO,QAAQ,CAAC;QACjB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const getGroup: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {
|
|
9
|
+
number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGroup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const api_client_1 = require("../common/api-client");
|
|
8
|
+
const utils_1 = require("../common/utils");
|
|
9
|
+
exports.getGroup = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.signalCliRestApiAuth,
|
|
11
|
+
name: 'getGroup',
|
|
12
|
+
displayName: 'Get Group',
|
|
13
|
+
description: 'Get details of a specific Signal group',
|
|
14
|
+
props: {
|
|
15
|
+
number: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Phone Number',
|
|
17
|
+
description: 'Registered phone number in international format',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
groupid: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'Group ID',
|
|
22
|
+
description: 'Group ID (base64 encoded)',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
run(context) {
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const { number, groupid } = context.propsValue;
|
|
29
|
+
// Auth props are passed directly to API client
|
|
30
|
+
const apiClient = new api_client_1.SignalCliApiClient(context.auth.props);
|
|
31
|
+
const formattedNumber = (0, utils_1.formatPhoneNumber)(number);
|
|
32
|
+
const response = yield apiClient.get(`/v1/groups/${encodeURIComponent(formattedNumber)}/${encodeURIComponent(groupid)}`);
|
|
33
|
+
return response;
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=get-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-group.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/get-group.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAsD;AACtD,qDAA0D;AAE1D,2CAAoD;AAEvC,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,wCAAwC;IACrD,KAAK,EAAE;QACN,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC/C,+CAA+C;YAE/C,MAAM,SAAS,GAAG,IAAI,+BAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAC;YAElD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CACnC,cAAc,kBAAkB,CAAC,eAAe,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAClF,CAAC;YAEF,OAAO,QAAQ,CAAC;QACjB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const getQrCodeLink: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {
|
|
9
|
+
device_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
qrcode_version: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getQrCodeLink = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const auth_1 = require("../common/auth");
|
|
8
|
+
exports.getQrCodeLink = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: auth_1.signalCliRestApiAuth,
|
|
10
|
+
name: 'getQrCodeLink',
|
|
11
|
+
displayName: 'Get QR Code Link',
|
|
12
|
+
description: 'Generate a QR code for linking a device',
|
|
13
|
+
props: {
|
|
14
|
+
device_name: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Device Name',
|
|
16
|
+
description: 'Name for the device to link',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
qrcode_version: pieces_framework_1.Property.Number({
|
|
20
|
+
displayName: 'QR Code Version',
|
|
21
|
+
description: 'QR code version (default: 10)',
|
|
22
|
+
required: false,
|
|
23
|
+
}),
|
|
24
|
+
},
|
|
25
|
+
run(context) {
|
|
26
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const { device_name, qrcode_version } = context.propsValue;
|
|
28
|
+
const { baseUrl, useBasicAuth, basicAuthUsername, basicAuthPassword } = context.auth.props;
|
|
29
|
+
const queryParams = new URLSearchParams();
|
|
30
|
+
queryParams.append('device_name', device_name);
|
|
31
|
+
if (qrcode_version) {
|
|
32
|
+
queryParams.append('qrcode_version', qrcode_version.toString());
|
|
33
|
+
}
|
|
34
|
+
const headers = {
|
|
35
|
+
Accept: 'image/png',
|
|
36
|
+
};
|
|
37
|
+
// Add Basic Auth header if configured
|
|
38
|
+
if (useBasicAuth && basicAuthUsername && basicAuthPassword) {
|
|
39
|
+
const credentials = Buffer.from(`${basicAuthUsername}:${basicAuthPassword}`).toString('base64');
|
|
40
|
+
headers['Authorization'] = `Basic ${credentials}`;
|
|
41
|
+
}
|
|
42
|
+
// The API returns a PNG image, so we need to handle it as binary
|
|
43
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
44
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
45
|
+
url: `${baseUrl.replace(/\/$/, '')}/v1/qrcodelink?${queryParams.toString()}`,
|
|
46
|
+
headers,
|
|
47
|
+
});
|
|
48
|
+
// Return base64 encoded image
|
|
49
|
+
if (response.body instanceof ArrayBuffer || response.body instanceof Buffer) {
|
|
50
|
+
const base64 = Buffer.from(response.body).toString('base64');
|
|
51
|
+
return {
|
|
52
|
+
qr_code_base64: `data:image/png;base64,${base64}`,
|
|
53
|
+
device_name,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return response.body;
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=get-qr-code-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-qr-code-link.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/get-qr-code-link.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,yCAAsD;AAEzC,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,yCAAyC;IACtD,KAAK,EAAE;QACN,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC/B,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,KAAK;SACf,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC3D,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAE3F,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;YAC1C,WAAW,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;YAC/C,IAAI,cAAc,EAAE,CAAC;gBACpB,WAAW,CAAC,MAAM,CAAC,gBAAgB,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;YACjE,CAAC;YAED,MAAM,OAAO,GAA2B;gBACvC,MAAM,EAAE,WAAW;aACnB,CAAC;YAEF,sCAAsC;YACtC,IAAI,YAAY,IAAI,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;gBAC5D,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAC9B,GAAG,iBAAiB,IAAI,iBAAiB,EAAE,CAC3C,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBACrB,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,WAAW,EAAE,CAAC;YACnD,CAAC;YAED,iEAAiE;YACjE,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC7C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,kBAAkB,WAAW,CAAC,QAAQ,EAAE,EAAE;gBAC5E,OAAO;aACP,CAAC,CAAC;YAEH,8BAA8B;YAC9B,IAAI,QAAQ,CAAC,IAAI,YAAY,WAAW,IAAI,QAAQ,CAAC,IAAI,YAAY,MAAM,EAAE,CAAC;gBAC7E,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBAC7D,OAAO;oBACN,cAAc,EAAE,yBAAyB,MAAM,EAAE;oBACjD,WAAW;iBACX,CAAC;YACH,CAAC;YAED,OAAO,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const joinGroup: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {
|
|
9
|
+
number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.joinGroup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const api_client_1 = require("../common/api-client");
|
|
8
|
+
const utils_1 = require("../common/utils");
|
|
9
|
+
exports.joinGroup = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.signalCliRestApiAuth,
|
|
11
|
+
name: 'joinGroup',
|
|
12
|
+
displayName: 'Join Group',
|
|
13
|
+
description: 'Join a Signal group',
|
|
14
|
+
props: {
|
|
15
|
+
number: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Phone Number',
|
|
17
|
+
description: 'Registered phone number in international format',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
groupid: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'Group ID',
|
|
22
|
+
description: 'Group ID (base64 encoded)',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
run(context) {
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const { number, groupid } = context.propsValue;
|
|
29
|
+
// Auth props are passed directly to API client
|
|
30
|
+
const apiClient = new api_client_1.SignalCliApiClient(context.auth.props);
|
|
31
|
+
const formattedNumber = (0, utils_1.formatPhoneNumber)(number);
|
|
32
|
+
yield apiClient.post(`/v1/groups/${encodeURIComponent(formattedNumber)}/${encodeURIComponent(groupid)}/join`);
|
|
33
|
+
return { success: true };
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=join-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"join-group.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/join-group.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAsD;AACtD,qDAA0D;AAC1D,2CAAoD;AAEvC,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,qBAAqB;IAClC,KAAK,EAAE;QACN,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC/C,+CAA+C;YAE/C,MAAM,SAAS,GAAG,IAAI,+BAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAC;YAElD,MAAM,SAAS,CAAC,IAAI,CACnB,cAAc,kBAAkB,CAAC,eAAe,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,OAAO,CACvF,CAAC;YAEF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC1B,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const listAccounts: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listAccounts = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const api_client_1 = require("../common/api-client");
|
|
8
|
+
exports.listAccounts = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: auth_1.signalCliRestApiAuth,
|
|
10
|
+
name: 'listAccounts',
|
|
11
|
+
displayName: 'List Accounts',
|
|
12
|
+
description: 'List all registered and linked accounts',
|
|
13
|
+
props: {},
|
|
14
|
+
run(context) {
|
|
15
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
// Auth props are passed directly to API client
|
|
17
|
+
const apiClient = new api_client_1.SignalCliApiClient(context.auth.props);
|
|
18
|
+
const response = yield apiClient.get('/v1/accounts');
|
|
19
|
+
return response;
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=list-accounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-accounts.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/list-accounts.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,yCAAsD;AACtD,qDAA0D;AAE7C,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,yCAAyC;IACtD,KAAK,EAAE,EAAE;IACH,GAAG,CAAC,OAAO;;YAChB,+CAA+C;YAE/C,MAAM,SAAS,GAAG,IAAI,+BAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAE7D,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CAAW,cAAc,CAAC,CAAC;YAE/D,OAAO,QAAQ,CAAC;QACjB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const listAttachments: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listAttachments = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const api_client_1 = require("../common/api-client");
|
|
8
|
+
exports.listAttachments = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: auth_1.signalCliRestApiAuth,
|
|
10
|
+
name: 'listAttachments',
|
|
11
|
+
displayName: 'List Attachments',
|
|
12
|
+
description: 'List all downloaded attachments',
|
|
13
|
+
props: {},
|
|
14
|
+
run(context) {
|
|
15
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
// Auth props are passed directly to API client
|
|
17
|
+
const apiClient = new api_client_1.SignalCliApiClient(context.auth.props);
|
|
18
|
+
const response = yield apiClient.get('/v1/attachments');
|
|
19
|
+
return response;
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=list-attachments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-attachments.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/list-attachments.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,yCAAsD;AACtD,qDAA0D;AAE7C,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,iCAAiC;IAC9C,KAAK,EAAE,EAAE;IACH,GAAG,CAAC,OAAO;;YAChB,+CAA+C;YAE/C,MAAM,SAAS,GAAG,IAAI,+BAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAE7D,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CAAW,iBAAiB,CAAC,CAAC;YAElE,OAAO,QAAQ,CAAC;QACjB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const listContacts: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {
|
|
9
|
+
number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listContacts = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const api_client_1 = require("../common/api-client");
|
|
8
|
+
const utils_1 = require("../common/utils");
|
|
9
|
+
exports.listContacts = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.signalCliRestApiAuth,
|
|
11
|
+
name: 'listContacts',
|
|
12
|
+
displayName: 'List Contacts',
|
|
13
|
+
description: 'List all contacts for a registered number',
|
|
14
|
+
props: {
|
|
15
|
+
number: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Phone Number',
|
|
17
|
+
description: 'Registered phone number in international format',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const { number } = context.propsValue;
|
|
24
|
+
// Auth props are passed directly to API client
|
|
25
|
+
const apiClient = new api_client_1.SignalCliApiClient(context.auth.props);
|
|
26
|
+
const formattedNumber = (0, utils_1.formatPhoneNumber)(number);
|
|
27
|
+
const response = yield apiClient.get(`/v1/contacts/${encodeURIComponent(formattedNumber)}`);
|
|
28
|
+
return response;
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=list-contacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-contacts.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/list-contacts.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAsD;AACtD,qDAA0D;AAC1D,2CAAoD;AAQvC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,2CAA2C;IACxD,KAAK,EAAE;QACN,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACtC,+CAA+C;YAE/C,MAAM,SAAS,GAAG,IAAI,+BAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAC;YAElD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CACnC,gBAAgB,kBAAkB,CAAC,eAAe,CAAC,EAAE,CACrD,CAAC;YAEF,OAAO,QAAQ,CAAC;QACjB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const listDevices: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {
|
|
9
|
+
number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listDevices = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const api_client_1 = require("../common/api-client");
|
|
8
|
+
const utils_1 = require("../common/utils");
|
|
9
|
+
exports.listDevices = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.signalCliRestApiAuth,
|
|
11
|
+
name: 'listDevices',
|
|
12
|
+
displayName: 'List Devices',
|
|
13
|
+
description: 'List all linked devices for a registered number',
|
|
14
|
+
props: {
|
|
15
|
+
number: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Phone Number',
|
|
17
|
+
description: 'Registered phone number in international format',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const { number } = context.propsValue;
|
|
24
|
+
// Auth props are passed directly to API client
|
|
25
|
+
const apiClient = new api_client_1.SignalCliApiClient(context.auth.props);
|
|
26
|
+
const formattedNumber = (0, utils_1.formatPhoneNumber)(number);
|
|
27
|
+
const response = yield apiClient.get(`/v1/devices/${encodeURIComponent(formattedNumber)}`);
|
|
28
|
+
return response;
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=list-devices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-devices.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/list-devices.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAsD;AACtD,qDAA0D;AAC1D,2CAAoD;AASvC,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,iDAAiD;IAC9D,KAAK,EAAE;QACN,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACtC,+CAA+C;YAE/C,MAAM,SAAS,GAAG,IAAI,+BAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAC;YAElD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CACnC,eAAe,kBAAkB,CAAC,eAAe,CAAC,EAAE,CACpD,CAAC;YAEF,OAAO,QAAQ,CAAC;QACjB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const listGroups: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {
|
|
9
|
+
number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listGroups = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const api_client_1 = require("../common/api-client");
|
|
8
|
+
const utils_1 = require("../common/utils");
|
|
9
|
+
exports.listGroups = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.signalCliRestApiAuth,
|
|
11
|
+
name: 'listGroups',
|
|
12
|
+
displayName: 'List Groups',
|
|
13
|
+
description: 'List all Signal groups for a registered number',
|
|
14
|
+
props: {
|
|
15
|
+
number: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Phone Number',
|
|
17
|
+
description: 'Registered phone number in international format',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const { number } = context.propsValue;
|
|
24
|
+
// Auth props are passed directly to API client
|
|
25
|
+
const apiClient = new api_client_1.SignalCliApiClient(context.auth.props);
|
|
26
|
+
const formattedNumber = (0, utils_1.formatPhoneNumber)(number);
|
|
27
|
+
const response = yield apiClient.get(`/v1/groups/${encodeURIComponent(formattedNumber)}`);
|
|
28
|
+
return response;
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=list-groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-groups.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/list-groups.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAsD;AACtD,qDAA0D;AAE1D,2CAAoD;AAEvC,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,gDAAgD;IAC7D,KAAK,EAAE;QACN,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACtC,+CAA+C;YAE/C,MAAM,SAAS,GAAG,IAAI,+BAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAC;YAElD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CACnC,cAAc,kBAAkB,CAAC,eAAe,CAAC,EAAE,CACnD,CAAC;YAEF,OAAO,QAAQ,CAAC;QACjB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const listIdentities: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {
|
|
9
|
+
number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listIdentities = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const api_client_1 = require("../common/api-client");
|
|
8
|
+
const utils_1 = require("../common/utils");
|
|
9
|
+
exports.listIdentities = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.signalCliRestApiAuth,
|
|
11
|
+
name: 'listIdentities',
|
|
12
|
+
displayName: 'List Identities',
|
|
13
|
+
description: 'List all identities for a registered number',
|
|
14
|
+
props: {
|
|
15
|
+
number: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Phone Number',
|
|
17
|
+
description: 'Registered phone number in international format',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const { number } = context.propsValue;
|
|
24
|
+
// Auth props are passed directly to API client
|
|
25
|
+
const apiClient = new api_client_1.SignalCliApiClient(context.auth.props);
|
|
26
|
+
const formattedNumber = (0, utils_1.formatPhoneNumber)(number);
|
|
27
|
+
const response = yield apiClient.get(`/v1/identities/${encodeURIComponent(formattedNumber)}`);
|
|
28
|
+
return response;
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=list-identities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-identities.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/list-identities.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAsD;AACtD,qDAA0D;AAE1D,2CAAoD;AAEvC,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,6CAA6C;IAC1D,KAAK,EAAE;QACN,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YACtC,+CAA+C;YAE/C,MAAM,SAAS,GAAG,IAAI,+BAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAC;YAElD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CACnC,kBAAkB,kBAAkB,CAAC,eAAe,CAAC,EAAE,CACvD,CAAC;YAEF,OAAO,QAAQ,CAAC;QACjB,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const quitGroup: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {
|
|
9
|
+
number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.quitGroup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const api_client_1 = require("../common/api-client");
|
|
8
|
+
const utils_1 = require("../common/utils");
|
|
9
|
+
exports.quitGroup = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.signalCliRestApiAuth,
|
|
11
|
+
name: 'quitGroup',
|
|
12
|
+
displayName: 'Quit Group',
|
|
13
|
+
description: 'Quit a Signal group',
|
|
14
|
+
props: {
|
|
15
|
+
number: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Phone Number',
|
|
17
|
+
description: 'Registered phone number in international format',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
groupid: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'Group ID',
|
|
22
|
+
description: 'Group ID (base64 encoded)',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
run(context) {
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const { number, groupid } = context.propsValue;
|
|
29
|
+
// Auth props are passed directly to API client
|
|
30
|
+
const apiClient = new api_client_1.SignalCliApiClient(context.auth.props);
|
|
31
|
+
const formattedNumber = (0, utils_1.formatPhoneNumber)(number);
|
|
32
|
+
yield apiClient.post(`/v1/groups/${encodeURIComponent(formattedNumber)}/${encodeURIComponent(groupid)}/quit`);
|
|
33
|
+
return { success: true };
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=quit-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quit-group.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/actions/quit-group.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAsD;AACtD,qDAA0D;AAC1D,2CAAoD;AAEvC,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,2BAAoB;IAC1B,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,qBAAqB;IAClC,KAAK,EAAE;QACN,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACd,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE,IAAI;SACd,CAAC;KACF;IACK,GAAG,CAAC,OAAO;;YAChB,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAC/C,+CAA+C;YAE/C,MAAM,SAAS,GAAG,IAAI,+BAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAC;YAElD,MAAM,SAAS,CAAC,IAAI,CACnB,cAAc,kBAAkB,CAAC,eAAe,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,OAAO,CACvF,CAAC;YAEF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC1B,CAAC;KAAA;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const receiveMessages: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
useBasicAuth: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
4
|
+
basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
+
basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
|
|
6
|
+
defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
8
|
+
}>, {
|
|
9
|
+
number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
10
|
+
timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
11
|
+
ignore_attachments: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
12
|
+
ignore_stories: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
13
|
+
max_messages: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
14
|
+
send_read_receipts: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
15
|
+
}>;
|