piece-signal-cli-rest-api 0.1.0 → 0.1.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.
Files changed (41) hide show
  1. package/package.json +2 -1
  2. package/src/index.d.ts +1 -0
  3. package/src/lib/actions/add-admins-to-group.d.ts +1 -0
  4. package/src/lib/actions/add-device.d.ts +1 -0
  5. package/src/lib/actions/add-members-to-group.d.ts +1 -0
  6. package/src/lib/actions/block-group.d.ts +1 -0
  7. package/src/lib/actions/create-group.d.ts +1 -0
  8. package/src/lib/actions/delete-group.d.ts +1 -0
  9. package/src/lib/actions/get-contact.d.ts +1 -0
  10. package/src/lib/actions/get-group.d.ts +1 -0
  11. package/src/lib/actions/get-qr-code-link.d.ts +1 -0
  12. package/src/lib/actions/join-group.d.ts +1 -0
  13. package/src/lib/actions/list-accounts.d.ts +1 -0
  14. package/src/lib/actions/list-attachments.d.ts +1 -0
  15. package/src/lib/actions/list-contacts.d.ts +1 -0
  16. package/src/lib/actions/list-devices.d.ts +1 -0
  17. package/src/lib/actions/list-groups.d.ts +1 -0
  18. package/src/lib/actions/list-identities.d.ts +1 -0
  19. package/src/lib/actions/quit-group.d.ts +1 -0
  20. package/src/lib/actions/remote-delete-message.d.ts +1 -0
  21. package/src/lib/actions/remove-admins-from-group.d.ts +1 -0
  22. package/src/lib/actions/remove-device.d.ts +1 -0
  23. package/src/lib/actions/remove-members-from-group.d.ts +1 -0
  24. package/src/lib/actions/remove-reaction.d.ts +1 -0
  25. package/src/lib/actions/search-numbers.d.ts +1 -0
  26. package/src/lib/actions/send-message.d.ts +1 -0
  27. package/src/lib/actions/send-reaction.d.ts +1 -0
  28. package/src/lib/actions/send-receipt.d.ts +1 -0
  29. package/src/lib/actions/start-typing.d.ts +1 -0
  30. package/src/lib/actions/stop-typing.d.ts +1 -0
  31. package/src/lib/actions/sync-contacts.d.ts +1 -0
  32. package/src/lib/actions/update-account-settings.d.ts +1 -0
  33. package/src/lib/actions/update-contact.d.ts +1 -0
  34. package/src/lib/actions/update-group.d.ts +1 -0
  35. package/src/lib/actions/update-profile.d.ts +1 -0
  36. package/src/lib/common/auth.d.ts +1 -0
  37. package/src/lib/common/auth.js +22 -0
  38. package/src/lib/common/auth.js.map +1 -1
  39. package/src/lib/triggers/new-message-received.d.ts +4 -0
  40. package/src/lib/triggers/new-message-received.js +133 -6
  41. package/src/lib/triggers/new-message-received.js.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piece-signal-cli-rest-api",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "dependencies": {
5
5
  "@sinclair/typebox": "0.34.11",
6
6
  "ai": "5.0.104",
@@ -13,6 +13,7 @@
13
13
  "nanoid": "3.3.8",
14
14
  "semver": "7.6.0",
15
15
  "socket.io-client": "4.8.1",
16
+ "ws": "^8.18.0",
16
17
  "zod": "4.1.13",
17
18
  "@activepieces/pieces-common": "0.11.2",
18
19
  "@activepieces/pieces-framework": "0.24.0",
package/src/index.d.ts CHANGED
@@ -4,4 +4,5 @@ export declare const signalCliRestApi: import("@activepieces/pieces-framework").
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>>;
@@ -4,6 +4,7 @@ export declare const addAdminsToGroup: import("@activepieces/pieces-framework").
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const addDevice: import("@activepieces/pieces-framework").IAction
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  uri: import("@activepieces/pieces-framework").LongTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const addMembersToGroup: import("@activepieces/pieces-framework")
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const blockGroup: import("@activepieces/pieces-framework").IActio
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const createGroup: import("@activepieces/pieces-framework").IActi
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const deleteGroup: import("@activepieces/pieces-framework").IActi
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const getContact: import("@activepieces/pieces-framework").IActio
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  uuid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const getGroup: import("@activepieces/pieces-framework").IAction<
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const getQrCodeLink: import("@activepieces/pieces-framework").IAc
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  device_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  qrcode_version: import("@activepieces/pieces-framework").NumberProperty<false>;
@@ -4,6 +4,7 @@ export declare const joinGroup: import("@activepieces/pieces-framework").IAction
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,4 +4,5 @@ export declare const listAccounts: import("@activepieces/pieces-framework").IAct
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {}>;
@@ -4,4 +4,5 @@ export declare const listAttachments: import("@activepieces/pieces-framework").I
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {}>;
@@ -4,6 +4,7 @@ export declare const listContacts: import("@activepieces/pieces-framework").IAct
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  }>;
@@ -4,6 +4,7 @@ export declare const listDevices: import("@activepieces/pieces-framework").IActi
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  }>;
@@ -4,6 +4,7 @@ export declare const listGroups: import("@activepieces/pieces-framework").IActio
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  }>;
@@ -4,6 +4,7 @@ export declare const listIdentities: import("@activepieces/pieces-framework").IA
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  }>;
@@ -4,6 +4,7 @@ export declare const quitGroup: import("@activepieces/pieces-framework").IAction
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const remoteDeleteMessage: import("@activepieces/pieces-framework
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  recipient: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const removeAdminsFromGroup: import("@activepieces/pieces-framewo
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const removeDevice: import("@activepieces/pieces-framework").IAct
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  deviceId: import("@activepieces/pieces-framework").NumberProperty<true>;
@@ -4,6 +4,7 @@ export declare const removeMembersFromGroup: import("@activepieces/pieces-framew
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const removeReaction: import("@activepieces/pieces-framework").IA
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  recipient: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const searchNumbers: import("@activepieces/pieces-framework").IAc
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  numbers: import("@activepieces/pieces-framework").ArrayProperty<true>;
@@ -4,6 +4,7 @@ export declare const sendMessage: import("@activepieces/pieces-framework").IActi
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
10
  recipients: import("@activepieces/pieces-framework").ArrayProperty<true>;
@@ -4,6 +4,7 @@ export declare const sendReaction: import("@activepieces/pieces-framework").IAct
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  recipient: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const sendReceipt: import("@activepieces/pieces-framework").IActi
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  recipient: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const startTyping: import("@activepieces/pieces-framework").IActi
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  recipient: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const stopTyping: import("@activepieces/pieces-framework").IActio
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  recipient: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const syncContacts: import("@activepieces/pieces-framework").IAct
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  }>;
@@ -4,6 +4,7 @@ export declare const updateAccountSettings: import("@activepieces/pieces-framewo
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  discoverable_by_number: import("@activepieces/pieces-framework").CheckboxProperty<false>;
@@ -4,6 +4,7 @@ export declare const updateContact: import("@activepieces/pieces-framework").IAc
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  recipient: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const updateGroup: import("@activepieces/pieces-framework").IActi
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  groupid: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,6 +4,7 @@ export declare const updateProfile: import("@activepieces/pieces-framework").IAc
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>, {
8
9
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
10
  name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
@@ -4,4 +4,5 @@ export declare const signalCliRestApiAuth: import("@activepieces/pieces-framewor
4
4
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
5
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
6
6
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
8
  }>;
@@ -41,6 +41,28 @@ exports.signalCliRestApiAuth = pieces_framework_1.PieceAuth.CustomAuth({
41
41
  description: 'Default Signal phone number for this connection (can be overridden in actions)',
42
42
  required: false,
43
43
  }),
44
+ mode: pieces_framework_1.Property.StaticDropdown({
45
+ displayName: 'Execution Mode',
46
+ description: 'The execution mode of your signal-cli-rest-api instance. json-rpc requires WebSocket, normal/native use HTTP GET.',
47
+ required: true,
48
+ defaultValue: 'normal',
49
+ options: {
50
+ options: [
51
+ {
52
+ label: 'Normal (HTTP GET)',
53
+ value: 'normal',
54
+ },
55
+ {
56
+ label: 'Native (HTTP GET)',
57
+ value: 'native',
58
+ },
59
+ {
60
+ label: 'JSON-RPC (WebSocket)',
61
+ value: 'json-rpc',
62
+ },
63
+ ],
64
+ },
65
+ }),
44
66
  },
45
67
  });
46
68
  //# sourceMappingURL=auth.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/common/auth.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AAErE,MAAM,QAAQ,GAAG;;;;;;;CAOhB,CAAC;AAEW,QAAA,oBAAoB,GAAG,4BAAS,CAAC,UAAU,CAAC;IACxD,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,QAAQ;IACrB,KAAK,EAAE;QACN,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,6EAA6E;YAC1F,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,uBAAuB;SACrC,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC/B,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,mEAAmE;YAChF,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACnB,CAAC;QACF,iBAAiB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrC,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,kEAAkE;YAC/E,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,iBAAiB,EAAE,4BAAS,CAAC,UAAU,CAAC;YACvC,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,kEAAkE;YAC/E,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACjC,WAAW,EAAE,iCAAiC;YAC9C,WAAW,EAAE,gFAAgF;YAC7F,QAAQ,EAAE,KAAK;SACf,CAAC;KACF;CACD,CAAC,CAAC"}
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/common/auth.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AAErE,MAAM,QAAQ,GAAG;;;;;;;CAOhB,CAAC;AAEW,QAAA,oBAAoB,GAAG,4BAAS,CAAC,UAAU,CAAC;IACxD,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,QAAQ;IACrB,KAAK,EAAE;QACN,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,6EAA6E;YAC1F,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,uBAAuB;SACrC,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC/B,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,mEAAmE;YAChF,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACnB,CAAC;QACF,iBAAiB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrC,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,kEAAkE;YAC/E,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,iBAAiB,EAAE,4BAAS,CAAC,UAAU,CAAC;YACvC,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,kEAAkE;YAC/E,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACjC,WAAW,EAAE,iCAAiC;YAC9C,WAAW,EAAE,gFAAgF;YAC7F,QAAQ,EAAE,KAAK;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC7B,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,mHAAmH;YAChI,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,QAAQ;YACtB,OAAO,EAAE;gBACR,OAAO,EAAE;oBACR;wBACC,KAAK,EAAE,mBAAmB;wBAC1B,KAAK,EAAE,QAAQ;qBACf;oBACD;wBACC,KAAK,EAAE,mBAAmB;wBAC1B,KAAK,EAAE,QAAQ;qBACf;oBACD;wBACC,KAAK,EAAE,sBAAsB;wBAC7B,KAAK,EAAE,UAAU;qBACjB;iBACD;aACD;SACD,CAAC;KACF;CACD,CAAC,CAAC"}
@@ -5,6 +5,7 @@ export declare const newMessageReceived: import("@activepieces/pieces-framework"
5
5
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
6
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
7
7
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
8
9
  }>, {
9
10
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
10
11
  timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
@@ -18,6 +19,7 @@ export declare const newMessageReceived: import("@activepieces/pieces-framework"
18
19
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
19
20
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
20
21
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
22
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
21
23
  }>, {
22
24
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
23
25
  timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
@@ -31,6 +33,7 @@ export declare const newMessageReceived: import("@activepieces/pieces-framework"
31
33
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
32
34
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
33
35
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
36
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
34
37
  }>, {
35
38
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
36
39
  timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
@@ -44,6 +47,7 @@ export declare const newMessageReceived: import("@activepieces/pieces-framework"
44
47
  basicAuthUsername: import("@activepieces/pieces-framework").ShortTextProperty<false>;
45
48
  basicAuthPassword: import("@activepieces/pieces-framework").SecretTextProperty<false>;
46
49
  defaultNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
50
+ mode: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
47
51
  }>, {
48
52
  number: import("@activepieces/pieces-framework").ShortTextProperty<true>;
49
53
  timeout: import("@activepieces/pieces-framework").NumberProperty<false>;
@@ -6,10 +6,11 @@ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
6
  const pieces_common_1 = require("@activepieces/pieces-common");
7
7
  const auth_1 = require("../common/auth");
8
8
  const utils_1 = require("../common/utils");
9
+ const ws_1 = tslib_1.__importDefault(require("ws"));
9
10
  const polling = {
10
11
  strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
11
12
  items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue, lastFetchEpochMS }) {
12
- const { baseUrl, useBasicAuth, basicAuthUsername, basicAuthPassword } = auth.props;
13
+ const { baseUrl, useBasicAuth, basicAuthUsername, basicAuthPassword, mode = 'normal' } = auth.props;
13
14
  const { number, timeout = 1, ignore_attachments = false, ignore_stories = false, max_messages, send_read_receipts = false } = propsValue;
14
15
  const formattedNumber = (0, utils_1.formatPhoneNumber)(number);
15
16
  // Build query parameters
@@ -21,17 +22,143 @@ const polling = {
21
22
  queryParams.append('max_messages', max_messages.toString());
22
23
  }
23
24
  queryParams.append('send_read_receipts', send_read_receipts.toString());
24
- const url = `${baseUrl.replace(/\/$/, '')}/v1/receive/${encodeURIComponent(formattedNumber)}?${queryParams.toString()}`;
25
+ const baseUrlClean = baseUrl.replace(/\/$/, '');
26
+ const httpUrl = `${baseUrlClean}/v1/receive/${encodeURIComponent(formattedNumber)}?${queryParams.toString()}`;
27
+ // Build headers
25
28
  const headers = {};
26
29
  // Add Basic Auth header if configured
27
30
  if (useBasicAuth && basicAuthUsername && basicAuthPassword) {
28
31
  const credentials = Buffer.from(`${basicAuthUsername}:${basicAuthPassword}`).toString('base64');
29
32
  headers['Authorization'] = `Basic ${credentials}`;
30
33
  }
34
+ // Use the configured mode to determine which method to use
35
+ if (mode === 'json-rpc') {
36
+ // Use WebSocket for json-rpc mode
37
+ return tryWebSocketReceive(httpUrl, headers, timeout, max_messages);
38
+ }
39
+ else {
40
+ // Use HTTP GET for normal/native mode
41
+ return tryHttpReceive(httpUrl, headers);
42
+ }
43
+ }),
44
+ };
45
+ // WebSocket receive function (for json-rpc mode)
46
+ function tryWebSocketReceive(httpUrl, headers, timeout, max_messages) {
47
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
+ const wsUrl = httpUrl.replace(/^http:/, 'ws:').replace(/^https:/, 'wss:');
49
+ const wsHeaders = Object.assign(Object.assign({}, headers), { 'Connection': 'Upgrade', 'Upgrade': 'websocket' });
50
+ return new Promise((resolve, reject) => {
51
+ const messages = [];
52
+ let messageCount = 0;
53
+ const maxMessagesToCollect = max_messages || Infinity;
54
+ const timeoutMs = timeout * 1000;
55
+ let resolved = false;
56
+ const resolveOnce = (result) => {
57
+ if (!resolved) {
58
+ resolved = true;
59
+ resolve(result);
60
+ }
61
+ };
62
+ const rejectOnce = (error) => {
63
+ if (!resolved) {
64
+ resolved = true;
65
+ reject(error);
66
+ }
67
+ };
68
+ const processMessages = () => {
69
+ // Filter messages that have dataMessage (actual message content)
70
+ const dataMessages = messages.filter((msg) => { var _a; return (_a = msg.envelope) === null || _a === void 0 ? void 0 : _a.dataMessage; });
71
+ // Map to polling format with timestamp
72
+ return dataMessages.map((message) => {
73
+ var _a;
74
+ const timestamp = ((_a = message.envelope.dataMessage) === null || _a === void 0 ? void 0 : _a.timestamp) || message.envelope.timestamp || Date.now();
75
+ return {
76
+ epochMilliSeconds: timestamp * 1000, // Convert to milliseconds
77
+ data: message,
78
+ };
79
+ });
80
+ };
81
+ const ws = new ws_1.default(wsUrl, {
82
+ headers: wsHeaders,
83
+ });
84
+ const timeoutId = setTimeout(() => {
85
+ if (!resolved) {
86
+ ws.close();
87
+ resolveOnce(processMessages());
88
+ }
89
+ }, timeoutMs);
90
+ ws.on('open', () => {
91
+ // WebSocket connection opened successfully
92
+ // The server will send messages as they arrive
93
+ });
94
+ ws.on('message', (data) => {
95
+ try {
96
+ const messageText = data.toString();
97
+ // Check if it's an error message
98
+ if (messageText.includes('"error"') || messageText.includes('"Msg"')) {
99
+ try {
100
+ const errorObj = JSON.parse(messageText);
101
+ if (errorObj.error || errorObj.Msg) {
102
+ clearTimeout(timeoutId);
103
+ ws.close();
104
+ // If it's a "no messages" type error, return empty array
105
+ if (errorObj.Msg && errorObj.Msg.includes('No new messages')) {
106
+ resolveOnce([]);
107
+ }
108
+ else {
109
+ rejectOnce(new Error(errorObj.error || errorObj.Msg));
110
+ }
111
+ return;
112
+ }
113
+ }
114
+ catch (_a) {
115
+ // Not a JSON error, continue processing
116
+ }
117
+ }
118
+ // Try to parse as JSON message
119
+ try {
120
+ const message = JSON.parse(messageText);
121
+ messages.push(message);
122
+ messageCount++;
123
+ // If we've reached max_messages, close the connection
124
+ if (messageCount >= maxMessagesToCollect) {
125
+ clearTimeout(timeoutId);
126
+ ws.close();
127
+ resolveOnce(processMessages());
128
+ }
129
+ }
130
+ catch (parseError) {
131
+ // If parsing fails, ignore this message
132
+ // The server might send non-JSON data
133
+ }
134
+ }
135
+ catch (error) {
136
+ // Ignore individual message errors
137
+ }
138
+ });
139
+ ws.on('error', (error) => {
140
+ clearTimeout(timeoutId);
141
+ ws.close();
142
+ // Reject to trigger fallback to HTTP GET
143
+ rejectOnce(error);
144
+ });
145
+ ws.on('close', () => {
146
+ clearTimeout(timeoutId);
147
+ // If we haven't resolved yet, resolve with collected messages
148
+ if (!resolved) {
149
+ resolveOnce(processMessages());
150
+ }
151
+ });
152
+ });
153
+ });
154
+ }
155
+ // HTTP GET receive function (for normal/native mode)
156
+ function tryHttpReceive(httpUrl, headers) {
157
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
31
158
  try {
32
159
  const response = yield pieces_common_1.httpClient.sendRequest({
33
160
  method: pieces_common_1.HttpMethod.GET,
34
- url,
161
+ url: httpUrl,
35
162
  headers,
36
163
  });
37
164
  // The API returns either a JSON array of messages or a JSON string
@@ -40,7 +167,7 @@ const polling = {
40
167
  try {
41
168
  messages = JSON.parse(response.body);
42
169
  }
43
- catch (_b) {
170
+ catch (_a) {
44
171
  // If parsing fails, try to parse as array
45
172
  messages = [];
46
173
  }
@@ -70,8 +197,8 @@ const polling = {
70
197
  }
71
198
  throw error;
72
199
  }
73
- }),
74
- };
200
+ });
201
+ }
75
202
  exports.newMessageReceived = (0, pieces_framework_1.createTrigger)({
76
203
  auth: auth_1.signalCliRestApiAuth,
77
204
  name: 'newMessageReceived',
@@ -1 +1 @@
1
- {"version":3,"file":"new-message-received.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/triggers/new-message-received.ts"],"names":[],"mappings":";;;;AAAA,qEAKwC;AACxC,+DAMqC;AACrC,yCAAsD;AACtD,2CAAoD;AA8EpD,MAAM,OAAO,GAUT;IACH,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAA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Q,EAAE,KAAK;SACf,CAAC;QACF,kBAAkB,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACrC,WAAW,EAAE,oBAAoB;YACjC,WAAW,EAAE,0DAA0D;YACvE,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACnB,CAAC;KACF;IACD,UAAU,EAAE;QACX,QAAQ,EAAE;YACT,MAAM,EAAE,cAAc;YACtB,YAAY,EAAE,cAAc;YAC5B,YAAY,EAAE,CAAC;YACf,SAAS,EAAE,UAAU;YACrB,WAAW,EAAE;gBACZ,OAAO,EAAE,+BAA+B;gBACxC,SAAS,EAAE,UAAU;aACrB;SACD;QACD,OAAO,EAAE,cAAc;KACvB;IACK,IAAI,CAAC,OAAO;;YACjB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACnD,CAAC;KAAA;IACK,QAAQ,CAAC,OAAO;;YACrB,MAAM,6BAAa,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;KAAA;IACK,SAAS,CAAC,OAAO;;YACtB,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;KAAA;IACK,GAAG,CAAC,OAAO;;YAChB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACnD,CAAC;KAAA;CACD,CAAC,CAAC"}
1
+ {"version":3,"file":"new-message-received.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/signal-cli-rest-api/src/lib/triggers/new-message-received.ts"],"names":[],"mappings":";;;;AAAA,qEAKwC;AACxC,+DAMqC;AACrC,yCAAsD;AACtD,2CAAoD;AACpD,oDAA2B;AA8E3B,MAAM,OAAO,GAUT;IACH,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAA+C,EAAE,oDAA1C,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB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