@unlimited-messaging/sdk 0.1.18 → 0.1.20
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 +1 -1
- package/src/api/index.d.ts +1 -0
- package/src/api/index.js +1 -0
- package/src/api/resources/accounts/client/Client.d.ts +68 -6
- package/src/api/resources/accounts/client/Client.js +272 -9
- package/src/api/resources/accounts/client/requests/AccountGetGroupRequest.d.ts +9 -0
- package/src/api/resources/accounts/client/requests/AccountGetGroupRequest.js +5 -0
- package/src/api/resources/accounts/client/requests/AccountLinkAccountRequest.d.ts +3 -0
- package/src/api/resources/accounts/client/requests/AccountListGroupsRequest.d.ts +9 -0
- package/src/api/resources/accounts/client/requests/AccountListGroupsRequest.js +5 -0
- package/src/api/resources/accounts/client/requests/AccountRequestHistoryRequest.d.ts +15 -0
- package/src/api/resources/accounts/client/requests/AccountRequestHistoryRequest.js +5 -0
- package/src/api/resources/accounts/client/requests/AccountUpdateAccountRequest.d.ts +10 -4
- package/src/api/resources/accounts/client/requests/index.d.ts +3 -0
- package/src/api/resources/accounts/types/AccountGetAccountResponse.d.ts +8 -0
- package/src/api/resources/accounts/types/AccountGetGroupResponse.d.ts +12 -0
- package/src/api/resources/accounts/types/AccountGetGroupResponse.js +5 -0
- package/src/api/resources/accounts/types/AccountGetGroupResponseMembersItem.d.ts +13 -0
- package/src/api/resources/accounts/types/AccountGetGroupResponseMembersItem.js +5 -0
- package/src/api/resources/accounts/types/AccountListAccountsResponseItem.d.ts +8 -0
- package/src/api/resources/accounts/types/AccountListGroupsResponse.d.ts +7 -0
- package/src/api/resources/accounts/types/AccountListGroupsResponse.js +5 -0
- package/src/api/resources/accounts/types/AccountListGroupsResponseDataItem.d.ts +9 -0
- package/src/api/resources/accounts/types/AccountListGroupsResponseDataItem.js +5 -0
- package/src/api/resources/accounts/types/AccountRequestHistoryResponse.d.ts +6 -0
- package/src/api/resources/accounts/types/AccountRequestHistoryResponse.js +5 -0
- package/src/api/resources/accounts/types/AccountUpdateAccountResponse.d.ts +8 -0
- package/src/api/resources/accounts/types/index.d.ts +5 -0
- package/src/api/resources/accounts/types/index.js +5 -0
- package/src/api/resources/messages/client/Client.d.ts +1 -1
- package/src/api/resources/messages/client/Client.js +1 -1
- package/src/api/resources/messages/client/requests/MessageSendRequest.d.ts +4 -0
- package/src/api/resources/messages/types/MessageFindAllResponseDataItem.d.ts +7 -0
- package/src/api/resources/messages/types/MessageFindOneResponse.d.ts +7 -0
- package/src/api/resources/messages/types/MessageSendRequestPriority.d.ts +11 -0
- package/src/api/resources/messages/types/MessageSendRequestPriority.js +10 -0
- package/src/api/resources/messages/types/MessageSendResponse.d.ts +7 -0
- package/src/api/resources/messages/types/index.d.ts +1 -0
- package/src/api/resources/messages/types/index.js +1 -0
- package/src/api/resources/webhooks/client/Client.d.ts +138 -3
- package/src/api/resources/webhooks/client/Client.js +138 -3
- package/src/api/resources/webhooks/client/requests/WebhookEndpointCreateRequest.d.ts +1 -0
- package/src/api/resources/webhooks/client/requests/WebhookEndpointUpdateRequest.d.ts +1 -0
- package/src/api/resources/webhooks/types/WebhookEndpointCreateRequestEventTypesItem.d.ts +9 -1
- package/src/api/resources/webhooks/types/WebhookEndpointCreateRequestEventTypesItem.js +8 -0
- package/src/api/resources/webhooks/types/WebhookEndpointCreateResponse.d.ts +1 -0
- package/src/api/resources/webhooks/types/WebhookEndpointCreateResponseEventTypesItem.d.ts +9 -1
- package/src/api/resources/webhooks/types/WebhookEndpointCreateResponseEventTypesItem.js +8 -0
- package/src/api/resources/webhooks/types/WebhookEndpointFindOneResponse.d.ts +1 -0
- package/src/api/resources/webhooks/types/WebhookEndpointFindOneResponseEventTypesItem.d.ts +9 -1
- package/src/api/resources/webhooks/types/WebhookEndpointFindOneResponseEventTypesItem.js +8 -0
- package/src/api/resources/webhooks/types/WebhookEndpointListResponseDataItem.d.ts +1 -0
- package/src/api/resources/webhooks/types/WebhookEndpointListResponseDataItemEventTypesItem.d.ts +9 -1
- package/src/api/resources/webhooks/types/WebhookEndpointListResponseDataItemEventTypesItem.js +8 -0
- package/src/api/resources/webhooks/types/WebhookEndpointUpdateRequestEventTypesItem.d.ts +9 -1
- package/src/api/resources/webhooks/types/WebhookEndpointUpdateRequestEventTypesItem.js +8 -0
- package/src/api/resources/webhooks/types/WebhookEndpointUpdateResponse.d.ts +1 -0
- package/src/api/resources/webhooks/types/WebhookEndpointUpdateResponseEventTypesItem.d.ts +9 -1
- package/src/api/resources/webhooks/types/WebhookEndpointUpdateResponseEventTypesItem.js +8 -0
- package/src/api/types/WebhookEventAccountStatusChanged.d.ts +10 -0
- package/src/api/types/WebhookEventAccountStatusChanged.js +5 -0
- package/src/api/types/WebhookEventAccountStatusChangedData.d.ts +7 -0
- package/src/api/types/WebhookEventAccountStatusChangedData.js +5 -0
- package/src/api/types/WebhookEventAccountStatusChangedDataAccount.d.ts +14 -0
- package/src/api/types/WebhookEventAccountStatusChangedDataAccount.js +5 -0
- package/src/api/types/WebhookEventAccountStatusChangedDataAccountPreviousStatus.d.ts +12 -0
- package/src/api/types/WebhookEventAccountStatusChangedDataAccountPreviousStatus.js +14 -0
- package/src/api/types/WebhookEventAccountStatusChangedDataAccountStatus.d.ts +12 -0
- package/src/api/types/WebhookEventAccountStatusChangedDataAccountStatus.js +14 -0
- package/src/api/types/WebhookEventAccountStatusChangedType.d.ts +7 -0
- package/src/api/types/WebhookEventAccountStatusChangedType.js +9 -0
- package/src/api/types/WebhookEventGroupUpdated.d.ts +10 -0
- package/src/api/types/WebhookEventGroupUpdated.js +5 -0
- package/src/api/types/WebhookEventGroupUpdatedData.d.ts +16 -0
- package/src/api/types/WebhookEventGroupUpdatedData.js +5 -0
- package/src/api/types/WebhookEventGroupUpdatedDataChannel.d.ts +8 -0
- package/src/api/types/WebhookEventGroupUpdatedDataChannel.js +5 -0
- package/src/api/types/WebhookEventGroupUpdatedDataChannelAccount.d.ts +7 -0
- package/src/api/types/WebhookEventGroupUpdatedDataChannelAccount.js +5 -0
- package/src/api/types/WebhookEventGroupUpdatedDataChannelType.d.ts +9 -0
- package/src/api/types/WebhookEventGroupUpdatedDataChannelType.js +11 -0
- package/src/api/types/WebhookEventGroupUpdatedDataGroup.d.ts +6 -0
- package/src/api/types/WebhookEventGroupUpdatedDataGroup.js +5 -0
- package/src/api/types/WebhookEventGroupUpdatedType.d.ts +7 -0
- package/src/api/types/WebhookEventGroupUpdatedType.js +9 -0
- package/src/api/types/WebhookEventMessageDeleted.d.ts +10 -0
- package/src/api/types/WebhookEventMessageDeleted.js +5 -0
- package/src/api/types/WebhookEventMessageDeletedData.d.ts +8 -0
- package/src/api/types/WebhookEventMessageDeletedData.js +5 -0
- package/src/api/types/WebhookEventMessageDeletedDataChannel.d.ts +9 -0
- package/src/api/types/WebhookEventMessageDeletedDataChannel.js +5 -0
- package/src/api/types/WebhookEventMessageDeletedDataChannelAccount.d.ts +7 -0
- package/src/api/types/WebhookEventMessageDeletedDataChannelAccount.js +5 -0
- package/src/api/types/WebhookEventMessageDeletedDataChannelConversation.d.ts +9 -0
- package/src/api/types/WebhookEventMessageDeletedDataChannelConversation.js +5 -0
- package/src/api/types/WebhookEventMessageDeletedDataChannelType.d.ts +9 -0
- package/src/api/types/WebhookEventMessageDeletedDataChannelType.js +11 -0
- package/src/api/types/WebhookEventMessageDeletedDataDeletion.d.ts +12 -0
- package/src/api/types/WebhookEventMessageDeletedDataDeletion.js +5 -0
- package/src/api/types/WebhookEventMessageDeletedType.d.ts +7 -0
- package/src/api/types/WebhookEventMessageDeletedType.js +9 -0
- package/src/api/types/WebhookEventMessageEdited.d.ts +10 -0
- package/src/api/types/WebhookEventMessageEdited.js +5 -0
- package/src/api/types/WebhookEventMessageEditedData.d.ts +8 -0
- package/src/api/types/WebhookEventMessageEditedData.js +5 -0
- package/src/api/types/WebhookEventMessageEditedDataChannel.d.ts +9 -0
- package/src/api/types/WebhookEventMessageEditedDataChannel.js +5 -0
- package/src/api/types/WebhookEventMessageEditedDataChannelAccount.d.ts +7 -0
- package/src/api/types/WebhookEventMessageEditedDataChannelAccount.js +5 -0
- package/src/api/types/WebhookEventMessageEditedDataChannelConversation.d.ts +9 -0
- package/src/api/types/WebhookEventMessageEditedDataChannelConversation.js +5 -0
- package/src/api/types/WebhookEventMessageEditedDataChannelType.d.ts +9 -0
- package/src/api/types/WebhookEventMessageEditedDataChannelType.js +11 -0
- package/src/api/types/WebhookEventMessageEditedDataEdit.d.ts +16 -0
- package/src/api/types/WebhookEventMessageEditedDataEdit.js +5 -0
- package/src/api/types/WebhookEventMessageEditedDataEditError.d.ts +8 -0
- package/src/api/types/WebhookEventMessageEditedDataEditError.js +10 -0
- package/src/api/types/WebhookEventMessageEditedDataEditKind.d.ts +8 -0
- package/src/api/types/WebhookEventMessageEditedDataEditKind.js +10 -0
- package/src/api/types/WebhookEventMessageEditedType.d.ts +7 -0
- package/src/api/types/WebhookEventMessageEditedType.js +9 -0
- package/src/api/types/WebhookEventMessageHistory.d.ts +10 -0
- package/src/api/types/WebhookEventMessageHistory.js +5 -0
- package/src/api/types/WebhookEventMessageHistoryData.d.ts +12 -0
- package/src/api/types/WebhookEventMessageHistoryData.js +5 -0
- package/src/api/types/WebhookEventMessageHistoryDataChannel.d.ts +8 -0
- package/src/api/types/WebhookEventMessageHistoryDataChannel.js +5 -0
- package/src/api/types/WebhookEventMessageHistoryDataChannelAccount.d.ts +7 -0
- package/src/api/types/WebhookEventMessageHistoryDataChannelAccount.js +5 -0
- package/src/api/types/WebhookEventMessageHistoryDataChannelType.d.ts +9 -0
- package/src/api/types/WebhookEventMessageHistoryDataChannelType.js +11 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItem.d.ts +27 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItem.js +5 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItemConversation.d.ts +9 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItemConversation.js +5 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItemDirection.d.ts +8 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItemDirection.js +10 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItemReplyTo.d.ts +7 -0
- package/src/api/types/WebhookEventMessageHistoryDataMessagesItemReplyTo.js +5 -0
- package/src/api/types/WebhookEventMessageHistoryType.d.ts +7 -0
- package/src/api/types/WebhookEventMessageHistoryType.js +9 -0
- package/src/api/types/WebhookEventMessageReaction.d.ts +10 -0
- package/src/api/types/WebhookEventMessageReaction.js +5 -0
- package/src/api/types/WebhookEventMessageReactionData.d.ts +8 -0
- package/src/api/types/WebhookEventMessageReactionData.js +5 -0
- package/src/api/types/WebhookEventMessageReactionDataChannel.d.ts +9 -0
- package/src/api/types/WebhookEventMessageReactionDataChannel.js +5 -0
- package/src/api/types/WebhookEventMessageReactionDataChannelAccount.d.ts +7 -0
- package/src/api/types/WebhookEventMessageReactionDataChannelAccount.js +5 -0
- package/src/api/types/WebhookEventMessageReactionDataChannelConversation.d.ts +9 -0
- package/src/api/types/WebhookEventMessageReactionDataChannelConversation.js +5 -0
- package/src/api/types/WebhookEventMessageReactionDataChannelType.d.ts +9 -0
- package/src/api/types/WebhookEventMessageReactionDataChannelType.js +11 -0
- package/src/api/types/WebhookEventMessageReactionDataReaction.d.ts +15 -0
- package/src/api/types/WebhookEventMessageReactionDataReaction.js +5 -0
- package/src/api/types/WebhookEventMessageReactionType.d.ts +7 -0
- package/src/api/types/WebhookEventMessageReactionType.js +9 -0
- package/src/api/types/WebhookEventMessageReceived.d.ts +10 -0
- package/src/api/types/WebhookEventMessageReceived.js +5 -0
- package/src/api/types/WebhookEventMessageReceivedData.d.ts +8 -0
- package/src/api/types/WebhookEventMessageReceivedData.js +5 -0
- package/src/api/types/WebhookEventMessageReceivedDataChannel.d.ts +9 -0
- package/src/api/types/WebhookEventMessageReceivedDataChannel.js +5 -0
- package/src/api/types/WebhookEventMessageReceivedDataChannelAccount.d.ts +7 -0
- package/src/api/types/WebhookEventMessageReceivedDataChannelAccount.js +5 -0
- package/src/api/types/WebhookEventMessageReceivedDataChannelConversation.d.ts +9 -0
- package/src/api/types/WebhookEventMessageReceivedDataChannelConversation.js +5 -0
- package/src/api/types/WebhookEventMessageReceivedDataChannelType.d.ts +9 -0
- package/src/api/types/WebhookEventMessageReceivedDataChannelType.js +11 -0
- package/src/api/types/WebhookEventMessageReceivedDataMessage.d.ts +26 -0
- package/src/api/types/WebhookEventMessageReceivedDataMessage.js +5 -0
- package/src/api/types/WebhookEventMessageReceivedDataMessageDirection.d.ts +8 -0
- package/src/api/types/WebhookEventMessageReceivedDataMessageDirection.js +10 -0
- package/src/api/types/WebhookEventMessageReceivedDataMessageReplyTo.d.ts +7 -0
- package/src/api/types/WebhookEventMessageReceivedDataMessageReplyTo.js +5 -0
- package/src/api/types/WebhookEventMessageReceivedType.d.ts +7 -0
- package/src/api/types/WebhookEventMessageReceivedType.js +9 -0
- package/src/api/types/WebhookEventMessageSelfSent.d.ts +10 -0
- package/src/api/types/WebhookEventMessageSelfSent.js +5 -0
- package/src/api/types/WebhookEventMessageSelfSentData.d.ts +8 -0
- package/src/api/types/WebhookEventMessageSelfSentData.js +5 -0
- package/src/api/types/WebhookEventMessageSelfSentDataChannel.d.ts +9 -0
- package/src/api/types/WebhookEventMessageSelfSentDataChannel.js +5 -0
- package/src/api/types/WebhookEventMessageSelfSentDataChannelAccount.d.ts +7 -0
- package/src/api/types/WebhookEventMessageSelfSentDataChannelAccount.js +5 -0
- package/src/api/types/WebhookEventMessageSelfSentDataChannelConversation.d.ts +9 -0
- package/src/api/types/WebhookEventMessageSelfSentDataChannelConversation.js +5 -0
- package/src/api/types/WebhookEventMessageSelfSentDataChannelType.d.ts +9 -0
- package/src/api/types/WebhookEventMessageSelfSentDataChannelType.js +11 -0
- package/src/api/types/WebhookEventMessageSelfSentDataMessage.d.ts +26 -0
- package/src/api/types/WebhookEventMessageSelfSentDataMessage.js +5 -0
- package/src/api/types/WebhookEventMessageSelfSentDataMessageDirection.d.ts +8 -0
- package/src/api/types/WebhookEventMessageSelfSentDataMessageDirection.js +10 -0
- package/src/api/types/WebhookEventMessageSelfSentDataMessageReplyTo.d.ts +7 -0
- package/src/api/types/WebhookEventMessageSelfSentDataMessageReplyTo.js +5 -0
- package/src/api/types/WebhookEventMessageSelfSentType.d.ts +7 -0
- package/src/api/types/WebhookEventMessageSelfSentType.js +9 -0
- package/src/api/types/WebhookEventMessageStatus.d.ts +10 -0
- package/src/api/types/WebhookEventMessageStatus.js +5 -0
- package/src/api/types/WebhookEventMessageStatusData.d.ts +8 -0
- package/src/api/types/WebhookEventMessageStatusData.js +5 -0
- package/src/api/types/WebhookEventMessageStatusDataChannel.d.ts +9 -0
- package/src/api/types/WebhookEventMessageStatusDataChannel.js +5 -0
- package/src/api/types/WebhookEventMessageStatusDataChannelAccount.d.ts +7 -0
- package/src/api/types/WebhookEventMessageStatusDataChannelAccount.js +5 -0
- package/src/api/types/WebhookEventMessageStatusDataChannelConversation.d.ts +9 -0
- package/src/api/types/WebhookEventMessageStatusDataChannelConversation.js +5 -0
- package/src/api/types/WebhookEventMessageStatusDataChannelType.d.ts +9 -0
- package/src/api/types/WebhookEventMessageStatusDataChannelType.js +11 -0
- package/src/api/types/WebhookEventMessageStatusDataMessage.d.ts +13 -0
- package/src/api/types/WebhookEventMessageStatusDataMessage.js +5 -0
- package/src/api/types/WebhookEventMessageStatusDataMessagePreviousStatus.d.ts +13 -0
- package/src/api/types/WebhookEventMessageStatusDataMessagePreviousStatus.js +15 -0
- package/src/api/types/WebhookEventMessageStatusDataMessageStatus.d.ts +13 -0
- package/src/api/types/WebhookEventMessageStatusDataMessageStatus.js +15 -0
- package/src/api/types/WebhookEventMessageStatusType.d.ts +7 -0
- package/src/api/types/WebhookEventMessageStatusType.js +9 -0
- package/src/api/types/index.d.ts +79 -0
- package/src/api/types/index.js +95 -0
- package/src/serialization/index.d.ts +1 -0
- package/src/serialization/index.js +1 -0
- package/src/serialization/resources/accounts/client/requests/AccountRequestHistoryRequest.d.ts +13 -0
- package/src/serialization/resources/accounts/client/requests/AccountRequestHistoryRequest.js +44 -0
- package/src/serialization/resources/accounts/client/requests/AccountUpdateAccountRequest.d.ts +5 -1
- package/src/serialization/resources/accounts/client/requests/AccountUpdateAccountRequest.js +5 -1
- package/src/serialization/resources/accounts/client/requests/index.d.ts +1 -0
- package/src/serialization/resources/accounts/client/requests/index.js +3 -1
- package/src/serialization/resources/accounts/types/AccountGetAccountResponse.d.ts +4 -0
- package/src/serialization/resources/accounts/types/AccountGetAccountResponse.js +4 -0
- package/src/serialization/resources/accounts/types/AccountGetGroupResponse.d.ts +17 -0
- package/src/serialization/resources/accounts/types/AccountGetGroupResponse.js +48 -0
- package/src/serialization/resources/accounts/types/AccountGetGroupResponseMembersItem.d.ts +17 -0
- package/src/serialization/resources/accounts/types/AccountGetGroupResponseMembersItem.js +48 -0
- package/src/serialization/resources/accounts/types/AccountListAccountsResponseItem.d.ts +4 -0
- package/src/serialization/resources/accounts/types/AccountListAccountsResponseItem.js +4 -0
- package/src/serialization/resources/accounts/types/AccountListGroupsResponse.d.ts +13 -0
- package/src/serialization/resources/accounts/types/AccountListGroupsResponse.js +44 -0
- package/src/serialization/resources/accounts/types/AccountListGroupsResponseDataItem.d.ts +14 -0
- package/src/serialization/resources/accounts/types/AccountListGroupsResponseDataItem.js +45 -0
- package/src/serialization/resources/accounts/types/AccountRequestHistoryResponse.d.ts +12 -0
- package/src/serialization/resources/accounts/types/AccountRequestHistoryResponse.js +43 -0
- package/src/serialization/resources/accounts/types/AccountUpdateAccountResponse.d.ts +4 -0
- package/src/serialization/resources/accounts/types/AccountUpdateAccountResponse.js +4 -0
- package/src/serialization/resources/accounts/types/index.d.ts +5 -0
- package/src/serialization/resources/accounts/types/index.js +5 -0
- package/src/serialization/resources/messages/client/requests/MessageSendRequest.d.ts +3 -0
- package/src/serialization/resources/messages/client/requests/MessageSendRequest.js +3 -0
- package/src/serialization/resources/messages/types/MessageFindAllResponseDataItem.d.ts +3 -0
- package/src/serialization/resources/messages/types/MessageFindAllResponseDataItem.js +3 -0
- package/src/serialization/resources/messages/types/MessageFindOneResponse.d.ts +3 -0
- package/src/serialization/resources/messages/types/MessageFindOneResponse.js +3 -0
- package/src/serialization/resources/messages/types/MessageSendRequestPriority.d.ts +10 -0
- package/src/serialization/resources/messages/types/MessageSendRequestPriority.js +41 -0
- package/src/serialization/resources/messages/types/MessageSendResponse.d.ts +3 -0
- package/src/serialization/resources/messages/types/MessageSendResponse.js +3 -0
- package/src/serialization/resources/messages/types/index.d.ts +1 -0
- package/src/serialization/resources/messages/types/index.js +1 -0
- package/src/serialization/resources/webhooks/client/requests/WebhookEndpointCreateRequest.d.ts +1 -0
- package/src/serialization/resources/webhooks/client/requests/WebhookEndpointCreateRequest.js +1 -0
- package/src/serialization/resources/webhooks/client/requests/WebhookEndpointUpdateRequest.d.ts +1 -0
- package/src/serialization/resources/webhooks/client/requests/WebhookEndpointUpdateRequest.js +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointCreateRequestEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointCreateRequestEventTypesItem.js +11 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointCreateResponse.d.ts +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointCreateResponse.js +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointCreateResponseEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointCreateResponseEventTypesItem.js +11 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointFindOneResponse.d.ts +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointFindOneResponse.js +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointFindOneResponseEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointFindOneResponseEventTypesItem.js +11 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointListResponseDataItem.d.ts +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointListResponseDataItem.js +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointListResponseDataItemEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointListResponseDataItemEventTypesItem.js +11 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateRequestEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateRequestEventTypesItem.js +11 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateResponse.d.ts +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateResponse.js +1 -0
- package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateResponseEventTypesItem.d.ts +1 -1
- package/src/serialization/resources/webhooks/types/WebhookEndpointUpdateResponseEventTypesItem.js +11 -1
- package/src/serialization/types/WebhookEventAccountStatusChanged.d.ts +17 -0
- package/src/serialization/types/WebhookEventAccountStatusChanged.js +48 -0
- package/src/serialization/types/WebhookEventAccountStatusChangedData.d.ts +13 -0
- package/src/serialization/types/WebhookEventAccountStatusChangedData.js +44 -0
- package/src/serialization/types/WebhookEventAccountStatusChangedDataAccount.d.ts +21 -0
- package/src/serialization/types/WebhookEventAccountStatusChangedDataAccount.js +52 -0
- package/src/serialization/types/WebhookEventAccountStatusChangedDataAccountPreviousStatus.d.ts +10 -0
- package/src/serialization/types/WebhookEventAccountStatusChangedDataAccountPreviousStatus.js +41 -0
- package/src/serialization/types/WebhookEventAccountStatusChangedDataAccountStatus.d.ts +10 -0
- package/src/serialization/types/WebhookEventAccountStatusChangedDataAccountStatus.js +41 -0
- package/src/serialization/types/WebhookEventAccountStatusChangedType.d.ts +10 -0
- package/src/serialization/types/WebhookEventAccountStatusChangedType.js +41 -0
- package/src/serialization/types/WebhookEventGroupUpdated.d.ts +17 -0
- package/src/serialization/types/WebhookEventGroupUpdated.js +48 -0
- package/src/serialization/types/WebhookEventGroupUpdatedData.d.ts +23 -0
- package/src/serialization/types/WebhookEventGroupUpdatedData.js +54 -0
- package/src/serialization/types/WebhookEventGroupUpdatedDataChannel.d.ts +15 -0
- package/src/serialization/types/WebhookEventGroupUpdatedDataChannel.js +46 -0
- package/src/serialization/types/WebhookEventGroupUpdatedDataChannelAccount.d.ts +13 -0
- package/src/serialization/types/WebhookEventGroupUpdatedDataChannelAccount.js +44 -0
- package/src/serialization/types/WebhookEventGroupUpdatedDataChannelType.d.ts +10 -0
- package/src/serialization/types/WebhookEventGroupUpdatedDataChannelType.js +41 -0
- package/src/serialization/types/WebhookEventGroupUpdatedDataGroup.d.ts +12 -0
- package/src/serialization/types/WebhookEventGroupUpdatedDataGroup.js +43 -0
- package/src/serialization/types/WebhookEventGroupUpdatedType.d.ts +10 -0
- package/src/serialization/types/WebhookEventGroupUpdatedType.js +41 -0
- package/src/serialization/types/WebhookEventMessageDeleted.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageDeleted.js +48 -0
- package/src/serialization/types/WebhookEventMessageDeletedData.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageDeletedData.js +46 -0
- package/src/serialization/types/WebhookEventMessageDeletedDataChannel.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageDeletedDataChannel.js +48 -0
- package/src/serialization/types/WebhookEventMessageDeletedDataChannelAccount.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageDeletedDataChannelAccount.js +44 -0
- package/src/serialization/types/WebhookEventMessageDeletedDataChannelConversation.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageDeletedDataChannelConversation.js +46 -0
- package/src/serialization/types/WebhookEventMessageDeletedDataChannelType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageDeletedDataChannelType.js +41 -0
- package/src/serialization/types/WebhookEventMessageDeletedDataDeletion.d.ts +18 -0
- package/src/serialization/types/WebhookEventMessageDeletedDataDeletion.js +49 -0
- package/src/serialization/types/WebhookEventMessageDeletedType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageDeletedType.js +41 -0
- package/src/serialization/types/WebhookEventMessageEdited.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageEdited.js +48 -0
- package/src/serialization/types/WebhookEventMessageEditedData.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageEditedData.js +46 -0
- package/src/serialization/types/WebhookEventMessageEditedDataChannel.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageEditedDataChannel.js +48 -0
- package/src/serialization/types/WebhookEventMessageEditedDataChannelAccount.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageEditedDataChannelAccount.js +44 -0
- package/src/serialization/types/WebhookEventMessageEditedDataChannelConversation.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageEditedDataChannelConversation.js +46 -0
- package/src/serialization/types/WebhookEventMessageEditedDataChannelType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageEditedDataChannelType.js +41 -0
- package/src/serialization/types/WebhookEventMessageEditedDataEdit.d.ts +23 -0
- package/src/serialization/types/WebhookEventMessageEditedDataEdit.js +54 -0
- package/src/serialization/types/WebhookEventMessageEditedDataEditError.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageEditedDataEditError.js +41 -0
- package/src/serialization/types/WebhookEventMessageEditedDataEditKind.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageEditedDataEditKind.js +41 -0
- package/src/serialization/types/WebhookEventMessageEditedType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageEditedType.js +41 -0
- package/src/serialization/types/WebhookEventMessageHistory.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageHistory.js +48 -0
- package/src/serialization/types/WebhookEventMessageHistoryData.d.ts +19 -0
- package/src/serialization/types/WebhookEventMessageHistoryData.js +50 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataChannel.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataChannel.js +46 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataChannelAccount.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataChannelAccount.js +44 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataChannelType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataChannelType.js +41 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItem.d.ts +35 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItem.js +66 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItemConversation.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItemConversation.js +46 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItemDirection.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItemDirection.js +41 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItemReplyTo.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageHistoryDataMessagesItemReplyTo.js +44 -0
- package/src/serialization/types/WebhookEventMessageHistoryType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageHistoryType.js +41 -0
- package/src/serialization/types/WebhookEventMessageReaction.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageReaction.js +48 -0
- package/src/serialization/types/WebhookEventMessageReactionData.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageReactionData.js +46 -0
- package/src/serialization/types/WebhookEventMessageReactionDataChannel.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageReactionDataChannel.js +48 -0
- package/src/serialization/types/WebhookEventMessageReactionDataChannelAccount.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageReactionDataChannelAccount.js +44 -0
- package/src/serialization/types/WebhookEventMessageReactionDataChannelConversation.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageReactionDataChannelConversation.js +46 -0
- package/src/serialization/types/WebhookEventMessageReactionDataChannelType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageReactionDataChannelType.js +41 -0
- package/src/serialization/types/WebhookEventMessageReactionDataReaction.d.ts +21 -0
- package/src/serialization/types/WebhookEventMessageReactionDataReaction.js +52 -0
- package/src/serialization/types/WebhookEventMessageReactionType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageReactionType.js +41 -0
- package/src/serialization/types/WebhookEventMessageReceived.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageReceived.js +48 -0
- package/src/serialization/types/WebhookEventMessageReceivedData.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageReceivedData.js +46 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataChannel.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataChannel.js +48 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataChannelAccount.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataChannelAccount.js +44 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataChannelConversation.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataChannelConversation.js +46 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataChannelType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataChannelType.js +41 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataMessage.d.ts +33 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataMessage.js +64 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataMessageDirection.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataMessageDirection.js +41 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataMessageReplyTo.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageReceivedDataMessageReplyTo.js +44 -0
- package/src/serialization/types/WebhookEventMessageReceivedType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageReceivedType.js +41 -0
- package/src/serialization/types/WebhookEventMessageSelfSent.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageSelfSent.js +48 -0
- package/src/serialization/types/WebhookEventMessageSelfSentData.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageSelfSentData.js +46 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataChannel.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataChannel.js +48 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataChannelAccount.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataChannelAccount.js +44 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataChannelConversation.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataChannelConversation.js +46 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataChannelType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataChannelType.js +41 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataMessage.d.ts +33 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataMessage.js +64 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataMessageDirection.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataMessageDirection.js +41 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataMessageReplyTo.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageSelfSentDataMessageReplyTo.js +44 -0
- package/src/serialization/types/WebhookEventMessageSelfSentType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageSelfSentType.js +41 -0
- package/src/serialization/types/WebhookEventMessageStatus.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageStatus.js +48 -0
- package/src/serialization/types/WebhookEventMessageStatusData.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageStatusData.js +46 -0
- package/src/serialization/types/WebhookEventMessageStatusDataChannel.d.ts +17 -0
- package/src/serialization/types/WebhookEventMessageStatusDataChannel.js +48 -0
- package/src/serialization/types/WebhookEventMessageStatusDataChannelAccount.d.ts +13 -0
- package/src/serialization/types/WebhookEventMessageStatusDataChannelAccount.js +44 -0
- package/src/serialization/types/WebhookEventMessageStatusDataChannelConversation.d.ts +15 -0
- package/src/serialization/types/WebhookEventMessageStatusDataChannelConversation.js +46 -0
- package/src/serialization/types/WebhookEventMessageStatusDataChannelType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageStatusDataChannelType.js +41 -0
- package/src/serialization/types/WebhookEventMessageStatusDataMessage.d.ts +20 -0
- package/src/serialization/types/WebhookEventMessageStatusDataMessage.js +51 -0
- package/src/serialization/types/WebhookEventMessageStatusDataMessagePreviousStatus.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageStatusDataMessagePreviousStatus.js +41 -0
- package/src/serialization/types/WebhookEventMessageStatusDataMessageStatus.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageStatusDataMessageStatus.js +41 -0
- package/src/serialization/types/WebhookEventMessageStatusType.d.ts +10 -0
- package/src/serialization/types/WebhookEventMessageStatusType.js +41 -0
- package/src/serialization/types/index.d.ts +79 -0
- package/src/serialization/types/index.js +95 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unlimited-messaging/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "TypeScript / Node.js SDK for the Unlimited Messaging API — send and receive WhatsApp messages programmatically",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
package/src/api/index.d.ts
CHANGED
package/src/api/index.js
CHANGED
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./resources"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
18
19
|
__exportStar(require("./errors"), exports);
|
|
@@ -43,7 +43,7 @@ export declare class Accounts {
|
|
|
43
43
|
/**
|
|
44
44
|
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
45
45
|
*
|
|
46
|
-
* Creates a new account in Linking status and starts a WhatsApp session. Poll GET /account/:accountId/challenge every second to get the QR code to scan. `mode` picks the connection method: `stable` (default) is the long-standing one, `beta` is newer and keeps the connection alive noticeably better.
|
|
46
|
+
* Creates a new account in Linking status and starts a WhatsApp session. Poll GET /account/:accountId/challenge every second to get the QR code to scan. `mode` picks the connection method: `stable` (default) is the long-standing one, `beta` is newer and keeps the connection alive noticeably better. A pending attempt is resumed rather than duplicated. When you link numbers on behalf of several customers, pass `externalRef` (your own id for the customer, stored on the account and returned with it) so only that customer's pending attempt is resumed, or `new=true` to always start a fresh one.
|
|
47
47
|
*
|
|
48
48
|
* @param {UnlimitedMessagingApi.AccountLinkAccountRequest} request
|
|
49
49
|
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -95,6 +95,70 @@ export declare class Accounts {
|
|
|
95
95
|
*/
|
|
96
96
|
accountGetQrCode(accountId: string, request?: UnlimitedMessagingApi.AccountGetQrCodeRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<UnlimitedMessagingApi.AccountGetQrCodeResponse>;
|
|
97
97
|
private __accountGetQrCode;
|
|
98
|
+
/**
|
|
99
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
100
|
+
*
|
|
101
|
+
* Asks the phone for the messages that precede `externalId` in its conversation. The answer is not in this response: the messages arrive a few seconds later as a `message.history` webhook batch (`syncType: "on_demand"`), stored like any other. Pass the oldest message you hold and repeat to go further back. Requires `syncHistory` on the account (`409` otherwise), a connected account (`409`), and a beta (whatsmeow) WhatsApp account (`422`).
|
|
102
|
+
*
|
|
103
|
+
* @param {string} accountId
|
|
104
|
+
* @param {UnlimitedMessagingApi.AccountRequestHistoryRequest} request
|
|
105
|
+
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
106
|
+
*
|
|
107
|
+
* @throws {@link UnlimitedMessagingApi.BadRequestError}
|
|
108
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
109
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
110
|
+
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
111
|
+
* @throws {@link UnlimitedMessagingApi.ConflictError}
|
|
112
|
+
* @throws {@link UnlimitedMessagingApi.UnprocessableEntityError}
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* await client.accounts.accountRequestHistory("accountId", {
|
|
116
|
+
* externalId: "externalId"
|
|
117
|
+
* })
|
|
118
|
+
*/
|
|
119
|
+
accountRequestHistory(accountId: string, request: UnlimitedMessagingApi.AccountRequestHistoryRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<UnlimitedMessagingApi.AccountRequestHistoryResponse>;
|
|
120
|
+
private __accountRequestHistory;
|
|
121
|
+
/**
|
|
122
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
123
|
+
*
|
|
124
|
+
* Returns every WhatsApp group the account is a member of, with its id, name and member count. Beta (whatsmeow) WhatsApp accounts only for now: other accounts get a `422`. Returns `409` when the account is not connected, since the list is read live from WhatsApp.
|
|
125
|
+
*
|
|
126
|
+
* @param {string} accountId
|
|
127
|
+
* @param {UnlimitedMessagingApi.AccountListGroupsRequest} request
|
|
128
|
+
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
|
+
*
|
|
130
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
131
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
132
|
+
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
133
|
+
* @throws {@link UnlimitedMessagingApi.ConflictError}
|
|
134
|
+
* @throws {@link UnlimitedMessagingApi.UnprocessableEntityError}
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* await client.accounts.accountListGroups("accountId")
|
|
138
|
+
*/
|
|
139
|
+
accountListGroups(accountId: string, request?: UnlimitedMessagingApi.AccountListGroupsRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<UnlimitedMessagingApi.AccountListGroupsResponse>;
|
|
140
|
+
private __accountListGroups;
|
|
141
|
+
/**
|
|
142
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
143
|
+
*
|
|
144
|
+
* Returns one group the account belongs to with its members: their phone number (E.164) when WhatsApp discloses it, and whether they are an admin. `groupId` is the id from the group list, with or without its `@g.us` suffix. Returns `404` when the group does not exist or the account is not in it, `409` when the account is not connected. Beta (whatsmeow) WhatsApp accounts only for now.
|
|
145
|
+
*
|
|
146
|
+
* @param {string} accountId
|
|
147
|
+
* @param {string} groupId
|
|
148
|
+
* @param {UnlimitedMessagingApi.AccountGetGroupRequest} request
|
|
149
|
+
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
150
|
+
*
|
|
151
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
152
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
153
|
+
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
154
|
+
* @throws {@link UnlimitedMessagingApi.ConflictError}
|
|
155
|
+
* @throws {@link UnlimitedMessagingApi.UnprocessableEntityError}
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* await client.accounts.accountGetGroup("accountId", "groupId")
|
|
159
|
+
*/
|
|
160
|
+
accountGetGroup(accountId: string, groupId: string, request?: UnlimitedMessagingApi.AccountGetGroupRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<UnlimitedMessagingApi.AccountGetGroupResponse>;
|
|
161
|
+
private __accountGetGroup;
|
|
98
162
|
/**
|
|
99
163
|
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
100
164
|
*
|
|
@@ -134,7 +198,7 @@ export declare class Accounts {
|
|
|
134
198
|
/**
|
|
135
199
|
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
136
200
|
*
|
|
137
|
-
* Updates the custom display name of a linked messaging account.
|
|
201
|
+
* Updates the custom display name of a linked messaging account, `externalRef` (your own reference for it, `null` clears it) and/or `sendIntervalSeconds`, the pause kept between two sends (2 to 120 s, default 5 s, `null` restores it).
|
|
138
202
|
*
|
|
139
203
|
* @param {string} accountId
|
|
140
204
|
* @param {UnlimitedMessagingApi.AccountUpdateAccountRequest} request
|
|
@@ -146,11 +210,9 @@ export declare class Accounts {
|
|
|
146
210
|
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
147
211
|
*
|
|
148
212
|
* @example
|
|
149
|
-
* await client.accounts.accountUpdateAccount("accountId"
|
|
150
|
-
* name: "name"
|
|
151
|
-
* })
|
|
213
|
+
* await client.accounts.accountUpdateAccount("accountId")
|
|
152
214
|
*/
|
|
153
|
-
accountUpdateAccount(accountId: string, request
|
|
215
|
+
accountUpdateAccount(accountId: string, request?: UnlimitedMessagingApi.AccountUpdateAccountRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<UnlimitedMessagingApi.AccountUpdateAccountResponse>;
|
|
154
216
|
private __accountUpdateAccount;
|
|
155
217
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
156
218
|
}
|
|
@@ -134,7 +134,7 @@ class Accounts {
|
|
|
134
134
|
/**
|
|
135
135
|
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
136
136
|
*
|
|
137
|
-
* Creates a new account in Linking status and starts a WhatsApp session. Poll GET /account/:accountId/challenge every second to get the QR code to scan. `mode` picks the connection method: `stable` (default) is the long-standing one, `beta` is newer and keeps the connection alive noticeably better.
|
|
137
|
+
* Creates a new account in Linking status and starts a WhatsApp session. Poll GET /account/:accountId/challenge every second to get the QR code to scan. `mode` picks the connection method: `stable` (default) is the long-standing one, `beta` is newer and keeps the connection alive noticeably better. A pending attempt is resumed rather than duplicated. When you link numbers on behalf of several customers, pass `externalRef` (your own id for the customer, stored on the account and returned with it) so only that customer's pending attempt is resumed, or `new=true` to always start a fresh one.
|
|
138
138
|
*
|
|
139
139
|
* @param {UnlimitedMessagingApi.AccountLinkAccountRequest} request
|
|
140
140
|
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -152,13 +152,22 @@ class Accounts {
|
|
|
152
152
|
__accountLinkAccount() {
|
|
153
153
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
154
154
|
var _a, _b;
|
|
155
|
-
const { mode } = request;
|
|
155
|
+
const { mode, new: new_, syncHistory, externalRef } = request;
|
|
156
156
|
const _queryParams = {};
|
|
157
157
|
if (mode != null) {
|
|
158
158
|
_queryParams["mode"] = serializers.AccountLinkAccountRequestMode.jsonOrThrow(mode, {
|
|
159
159
|
unrecognizedObjectKeys: "strip",
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
+
if (new_ != null) {
|
|
163
|
+
_queryParams["new"] = new_.toString();
|
|
164
|
+
}
|
|
165
|
+
if (syncHistory != null) {
|
|
166
|
+
_queryParams["syncHistory"] = syncHistory.toString();
|
|
167
|
+
}
|
|
168
|
+
if (externalRef != null) {
|
|
169
|
+
_queryParams["externalRef"] = externalRef;
|
|
170
|
+
}
|
|
162
171
|
const _response = yield core.fetcher({
|
|
163
172
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.UnlimitedMessagingApiEnvironment.Production, "account/link"),
|
|
164
173
|
method: "GET",
|
|
@@ -371,6 +380,262 @@ class Accounts {
|
|
|
371
380
|
}
|
|
372
381
|
});
|
|
373
382
|
}
|
|
383
|
+
/**
|
|
384
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
385
|
+
*
|
|
386
|
+
* Asks the phone for the messages that precede `externalId` in its conversation. The answer is not in this response: the messages arrive a few seconds later as a `message.history` webhook batch (`syncType: "on_demand"`), stored like any other. Pass the oldest message you hold and repeat to go further back. Requires `syncHistory` on the account (`409` otherwise), a connected account (`409`), and a beta (whatsmeow) WhatsApp account (`422`).
|
|
387
|
+
*
|
|
388
|
+
* @param {string} accountId
|
|
389
|
+
* @param {UnlimitedMessagingApi.AccountRequestHistoryRequest} request
|
|
390
|
+
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
391
|
+
*
|
|
392
|
+
* @throws {@link UnlimitedMessagingApi.BadRequestError}
|
|
393
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
394
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
395
|
+
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
396
|
+
* @throws {@link UnlimitedMessagingApi.ConflictError}
|
|
397
|
+
* @throws {@link UnlimitedMessagingApi.UnprocessableEntityError}
|
|
398
|
+
*
|
|
399
|
+
* @example
|
|
400
|
+
* await client.accounts.accountRequestHistory("accountId", {
|
|
401
|
+
* externalId: "externalId"
|
|
402
|
+
* })
|
|
403
|
+
*/
|
|
404
|
+
accountRequestHistory(accountId, request, requestOptions) {
|
|
405
|
+
return core.HttpResponsePromise.fromPromise(this.__accountRequestHistory(accountId, request, requestOptions));
|
|
406
|
+
}
|
|
407
|
+
__accountRequestHistory(accountId, request, requestOptions) {
|
|
408
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
409
|
+
var _a, _b;
|
|
410
|
+
const _response = yield core.fetcher({
|
|
411
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.UnlimitedMessagingApiEnvironment.Production, `account/${encodeURIComponent(accountId)}/history`),
|
|
412
|
+
method: "POST",
|
|
413
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
414
|
+
contentType: "application/json",
|
|
415
|
+
requestType: "json",
|
|
416
|
+
body: serializers.AccountRequestHistoryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
417
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
418
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
419
|
+
withCredentials: true,
|
|
420
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
421
|
+
});
|
|
422
|
+
if (_response.ok) {
|
|
423
|
+
return {
|
|
424
|
+
data: serializers.AccountRequestHistoryResponse.parseOrThrow(_response.body, {
|
|
425
|
+
unrecognizedObjectKeys: "passthrough",
|
|
426
|
+
allowUnrecognizedUnionMembers: true,
|
|
427
|
+
allowUnrecognizedEnumValues: true,
|
|
428
|
+
breadcrumbsPrefix: ["response"],
|
|
429
|
+
}),
|
|
430
|
+
rawResponse: _response.rawResponse,
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
if (_response.error.reason === "status-code") {
|
|
434
|
+
switch (_response.error.statusCode) {
|
|
435
|
+
case 400:
|
|
436
|
+
throw new UnlimitedMessagingApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
437
|
+
case 401:
|
|
438
|
+
throw new UnlimitedMessagingApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
439
|
+
case 403:
|
|
440
|
+
throw new UnlimitedMessagingApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
441
|
+
case 404:
|
|
442
|
+
throw new UnlimitedMessagingApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
443
|
+
case 409:
|
|
444
|
+
throw new UnlimitedMessagingApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
445
|
+
case 422:
|
|
446
|
+
throw new UnlimitedMessagingApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
447
|
+
default:
|
|
448
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
449
|
+
statusCode: _response.error.statusCode,
|
|
450
|
+
body: _response.error.body,
|
|
451
|
+
rawResponse: _response.rawResponse,
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
switch (_response.error.reason) {
|
|
456
|
+
case "non-json":
|
|
457
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
458
|
+
statusCode: _response.error.statusCode,
|
|
459
|
+
body: _response.error.rawBody,
|
|
460
|
+
rawResponse: _response.rawResponse,
|
|
461
|
+
});
|
|
462
|
+
case "timeout":
|
|
463
|
+
throw new errors.UnlimitedMessagingApiTimeoutError("Timeout exceeded when calling POST /account/{accountId}/history.");
|
|
464
|
+
case "unknown":
|
|
465
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
466
|
+
message: _response.error.errorMessage,
|
|
467
|
+
rawResponse: _response.rawResponse,
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
474
|
+
*
|
|
475
|
+
* Returns every WhatsApp group the account is a member of, with its id, name and member count. Beta (whatsmeow) WhatsApp accounts only for now: other accounts get a `422`. Returns `409` when the account is not connected, since the list is read live from WhatsApp.
|
|
476
|
+
*
|
|
477
|
+
* @param {string} accountId
|
|
478
|
+
* @param {UnlimitedMessagingApi.AccountListGroupsRequest} request
|
|
479
|
+
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
480
|
+
*
|
|
481
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
482
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
483
|
+
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
484
|
+
* @throws {@link UnlimitedMessagingApi.ConflictError}
|
|
485
|
+
* @throws {@link UnlimitedMessagingApi.UnprocessableEntityError}
|
|
486
|
+
*
|
|
487
|
+
* @example
|
|
488
|
+
* await client.accounts.accountListGroups("accountId")
|
|
489
|
+
*/
|
|
490
|
+
accountListGroups(accountId, request = {}, requestOptions) {
|
|
491
|
+
return core.HttpResponsePromise.fromPromise(this.__accountListGroups(accountId, request, requestOptions));
|
|
492
|
+
}
|
|
493
|
+
__accountListGroups(accountId_1) {
|
|
494
|
+
return __awaiter(this, arguments, void 0, function* (accountId, request = {}, requestOptions) {
|
|
495
|
+
var _a, _b;
|
|
496
|
+
const _response = yield core.fetcher({
|
|
497
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.UnlimitedMessagingApiEnvironment.Production, `account/${encodeURIComponent(accountId)}/groups`),
|
|
498
|
+
method: "GET",
|
|
499
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
500
|
+
contentType: "application/json",
|
|
501
|
+
requestType: "json",
|
|
502
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
503
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
504
|
+
withCredentials: true,
|
|
505
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
506
|
+
});
|
|
507
|
+
if (_response.ok) {
|
|
508
|
+
return {
|
|
509
|
+
data: serializers.AccountListGroupsResponse.parseOrThrow(_response.body, {
|
|
510
|
+
unrecognizedObjectKeys: "passthrough",
|
|
511
|
+
allowUnrecognizedUnionMembers: true,
|
|
512
|
+
allowUnrecognizedEnumValues: true,
|
|
513
|
+
breadcrumbsPrefix: ["response"],
|
|
514
|
+
}),
|
|
515
|
+
rawResponse: _response.rawResponse,
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
if (_response.error.reason === "status-code") {
|
|
519
|
+
switch (_response.error.statusCode) {
|
|
520
|
+
case 401:
|
|
521
|
+
throw new UnlimitedMessagingApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
522
|
+
case 403:
|
|
523
|
+
throw new UnlimitedMessagingApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
524
|
+
case 404:
|
|
525
|
+
throw new UnlimitedMessagingApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
526
|
+
case 409:
|
|
527
|
+
throw new UnlimitedMessagingApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
528
|
+
case 422:
|
|
529
|
+
throw new UnlimitedMessagingApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
530
|
+
default:
|
|
531
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
532
|
+
statusCode: _response.error.statusCode,
|
|
533
|
+
body: _response.error.body,
|
|
534
|
+
rawResponse: _response.rawResponse,
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
switch (_response.error.reason) {
|
|
539
|
+
case "non-json":
|
|
540
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
541
|
+
statusCode: _response.error.statusCode,
|
|
542
|
+
body: _response.error.rawBody,
|
|
543
|
+
rawResponse: _response.rawResponse,
|
|
544
|
+
});
|
|
545
|
+
case "timeout":
|
|
546
|
+
throw new errors.UnlimitedMessagingApiTimeoutError("Timeout exceeded when calling GET /account/{accountId}/groups.");
|
|
547
|
+
case "unknown":
|
|
548
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
549
|
+
message: _response.error.errorMessage,
|
|
550
|
+
rawResponse: _response.rawResponse,
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
557
|
+
*
|
|
558
|
+
* Returns one group the account belongs to with its members: their phone number (E.164) when WhatsApp discloses it, and whether they are an admin. `groupId` is the id from the group list, with or without its `@g.us` suffix. Returns `404` when the group does not exist or the account is not in it, `409` when the account is not connected. Beta (whatsmeow) WhatsApp accounts only for now.
|
|
559
|
+
*
|
|
560
|
+
* @param {string} accountId
|
|
561
|
+
* @param {string} groupId
|
|
562
|
+
* @param {UnlimitedMessagingApi.AccountGetGroupRequest} request
|
|
563
|
+
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
564
|
+
*
|
|
565
|
+
* @throws {@link UnlimitedMessagingApi.UnauthorizedError}
|
|
566
|
+
* @throws {@link UnlimitedMessagingApi.ForbiddenError}
|
|
567
|
+
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
568
|
+
* @throws {@link UnlimitedMessagingApi.ConflictError}
|
|
569
|
+
* @throws {@link UnlimitedMessagingApi.UnprocessableEntityError}
|
|
570
|
+
*
|
|
571
|
+
* @example
|
|
572
|
+
* await client.accounts.accountGetGroup("accountId", "groupId")
|
|
573
|
+
*/
|
|
574
|
+
accountGetGroup(accountId, groupId, request = {}, requestOptions) {
|
|
575
|
+
return core.HttpResponsePromise.fromPromise(this.__accountGetGroup(accountId, groupId, request, requestOptions));
|
|
576
|
+
}
|
|
577
|
+
__accountGetGroup(accountId_1, groupId_1) {
|
|
578
|
+
return __awaiter(this, arguments, void 0, function* (accountId, groupId, request = {}, requestOptions) {
|
|
579
|
+
var _a, _b;
|
|
580
|
+
const _response = yield core.fetcher({
|
|
581
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.UnlimitedMessagingApiEnvironment.Production, `account/${encodeURIComponent(accountId)}/groups/${encodeURIComponent(groupId)}`),
|
|
582
|
+
method: "GET",
|
|
583
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
584
|
+
contentType: "application/json",
|
|
585
|
+
requestType: "json",
|
|
586
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
587
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
588
|
+
withCredentials: true,
|
|
589
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
590
|
+
});
|
|
591
|
+
if (_response.ok) {
|
|
592
|
+
return {
|
|
593
|
+
data: serializers.AccountGetGroupResponse.parseOrThrow(_response.body, {
|
|
594
|
+
unrecognizedObjectKeys: "passthrough",
|
|
595
|
+
allowUnrecognizedUnionMembers: true,
|
|
596
|
+
allowUnrecognizedEnumValues: true,
|
|
597
|
+
breadcrumbsPrefix: ["response"],
|
|
598
|
+
}),
|
|
599
|
+
rawResponse: _response.rawResponse,
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
if (_response.error.reason === "status-code") {
|
|
603
|
+
switch (_response.error.statusCode) {
|
|
604
|
+
case 401:
|
|
605
|
+
throw new UnlimitedMessagingApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
606
|
+
case 403:
|
|
607
|
+
throw new UnlimitedMessagingApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
608
|
+
case 404:
|
|
609
|
+
throw new UnlimitedMessagingApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
610
|
+
case 409:
|
|
611
|
+
throw new UnlimitedMessagingApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
612
|
+
case 422:
|
|
613
|
+
throw new UnlimitedMessagingApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
614
|
+
default:
|
|
615
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
616
|
+
statusCode: _response.error.statusCode,
|
|
617
|
+
body: _response.error.body,
|
|
618
|
+
rawResponse: _response.rawResponse,
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
switch (_response.error.reason) {
|
|
623
|
+
case "non-json":
|
|
624
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
625
|
+
statusCode: _response.error.statusCode,
|
|
626
|
+
body: _response.error.rawBody,
|
|
627
|
+
rawResponse: _response.rawResponse,
|
|
628
|
+
});
|
|
629
|
+
case "timeout":
|
|
630
|
+
throw new errors.UnlimitedMessagingApiTimeoutError("Timeout exceeded when calling GET /account/{accountId}/groups/{groupId}.");
|
|
631
|
+
case "unknown":
|
|
632
|
+
throw new errors.UnlimitedMessagingApiError({
|
|
633
|
+
message: _response.error.errorMessage,
|
|
634
|
+
rawResponse: _response.rawResponse,
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
}
|
|
374
639
|
/**
|
|
375
640
|
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
376
641
|
*
|
|
@@ -520,7 +785,7 @@ class Accounts {
|
|
|
520
785
|
/**
|
|
521
786
|
* **Protection**: Protected endpoint. Allowed roles: USER, ADMIN. Required scopes: OTHER:READ, OTHER:WRITE
|
|
522
787
|
*
|
|
523
|
-
* Updates the custom display name of a linked messaging account.
|
|
788
|
+
* Updates the custom display name of a linked messaging account, `externalRef` (your own reference for it, `null` clears it) and/or `sendIntervalSeconds`, the pause kept between two sends (2 to 120 s, default 5 s, `null` restores it).
|
|
524
789
|
*
|
|
525
790
|
* @param {string} accountId
|
|
526
791
|
* @param {UnlimitedMessagingApi.AccountUpdateAccountRequest} request
|
|
@@ -532,15 +797,13 @@ class Accounts {
|
|
|
532
797
|
* @throws {@link UnlimitedMessagingApi.NotFoundError}
|
|
533
798
|
*
|
|
534
799
|
* @example
|
|
535
|
-
* await client.accounts.accountUpdateAccount("accountId"
|
|
536
|
-
* name: "name"
|
|
537
|
-
* })
|
|
800
|
+
* await client.accounts.accountUpdateAccount("accountId")
|
|
538
801
|
*/
|
|
539
|
-
accountUpdateAccount(accountId, request, requestOptions) {
|
|
802
|
+
accountUpdateAccount(accountId, request = {}, requestOptions) {
|
|
540
803
|
return core.HttpResponsePromise.fromPromise(this.__accountUpdateAccount(accountId, request, requestOptions));
|
|
541
804
|
}
|
|
542
|
-
__accountUpdateAccount(
|
|
543
|
-
return __awaiter(this,
|
|
805
|
+
__accountUpdateAccount(accountId_1) {
|
|
806
|
+
return __awaiter(this, arguments, void 0, function* (accountId, request = {}, requestOptions) {
|
|
544
807
|
var _a, _b;
|
|
545
808
|
const _response = yield core.fetcher({
|
|
546
809
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.UnlimitedMessagingApiEnvironment.Production, `account/${encodeURIComponent(accountId)}`),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* externalId: "externalId"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface AccountRequestHistoryRequest {
|
|
11
|
+
/** The `externalId` of the oldest message you hold in the conversation: the messages before it are requested. */
|
|
12
|
+
externalId: string;
|
|
13
|
+
/** How many earlier messages to ask for, 1 to 50. */
|
|
14
|
+
count?: number;
|
|
15
|
+
}
|
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
|
-
* {
|
|
7
|
-
* name: "name"
|
|
8
|
-
* }
|
|
6
|
+
* {}
|
|
9
7
|
*/
|
|
10
8
|
export interface AccountUpdateAccountRequest {
|
|
11
|
-
name
|
|
9
|
+
name?: string;
|
|
10
|
+
/** Your own reference for this account. `null` clears it. */
|
|
11
|
+
externalRef?: string | null;
|
|
12
|
+
/** Receive the message history WhatsApp hands over from now on (`message.history`). The phone's full history is only requested when the number is linked: pass `syncHistory` to GET /account/link for that. */
|
|
13
|
+
syncHistory?: boolean;
|
|
14
|
+
/** Require an API key (or a dashboard session) of the owner, on top of the URL, to fetch this account's stored media. Off by default: the unguessable URL alone gives access. */
|
|
15
|
+
mediaUrlRequiresAuth?: boolean;
|
|
16
|
+
/** Pause between two sends of this account, in seconds (2 to 120). Spacing sends protects the number from being flagged by WhatsApp: lower it with care. `null` restores the default (5 s). */
|
|
17
|
+
sendIntervalSeconds?: number | null;
|
|
12
18
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { type AccountLinkAccountRequest } from "./AccountLinkAccountRequest";
|
|
2
2
|
export { type AccountGetChallengeRequest } from "./AccountGetChallengeRequest";
|
|
3
3
|
export { type AccountGetQrCodeRequest } from "./AccountGetQrCodeRequest";
|
|
4
|
+
export { type AccountRequestHistoryRequest } from "./AccountRequestHistoryRequest";
|
|
5
|
+
export { type AccountListGroupsRequest } from "./AccountListGroupsRequest";
|
|
6
|
+
export { type AccountGetGroupRequest } from "./AccountGetGroupRequest";
|
|
4
7
|
export { type AccountGetAccountRequest } from "./AccountGetAccountRequest";
|
|
5
8
|
export { type AccountUnlinkAccountRequest } from "./AccountUnlinkAccountRequest";
|
|
6
9
|
export { type AccountUpdateAccountRequest } from "./AccountUpdateAccountRequest";
|
|
@@ -9,7 +9,15 @@ export interface AccountGetAccountResponse {
|
|
|
9
9
|
status: UnlimitedMessagingApi.AccountGetAccountResponseStatus;
|
|
10
10
|
phone: string | null;
|
|
11
11
|
name: string | null;
|
|
12
|
+
/** Your own reference for this account, as set at linking or with PATCH. */
|
|
13
|
+
externalRef: string | null;
|
|
12
14
|
blockedUntil: Date | null;
|
|
15
|
+
/** Whether fetching a stored media also requires authenticating as its owner. */
|
|
16
|
+
mediaUrlRequiresAuth: boolean;
|
|
17
|
+
/** Whether the account's message history is stored and announced. */
|
|
18
|
+
syncHistory: boolean;
|
|
19
|
+
/** The pause this account keeps between two sends, in seconds. */
|
|
20
|
+
sendIntervalSeconds: number;
|
|
13
21
|
createdAt: Date;
|
|
14
22
|
updatedAt: Date;
|
|
15
23
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as UnlimitedMessagingApi from "../../../index";
|
|
5
|
+
export interface AccountGetGroupResponse {
|
|
6
|
+
/** The group id on the channel (a WhatsApp group JID, `...@g.us`). Pass it as `recipient` to POST /message to write to the group. */
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
memberCount: number;
|
|
10
|
+
topic: string | null;
|
|
11
|
+
members: UnlimitedMessagingApi.AccountGetGroupResponseMembersItem[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface AccountGetGroupResponseMembersItem {
|
|
5
|
+
/** The member's id on the channel: a phone-number JID when known, a LID when WhatsApp hides the number. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** The member phone number in E.164 format, null when WhatsApp hides it (then `id` is the only identifier). */
|
|
8
|
+
address: string | null;
|
|
9
|
+
lid: string | null;
|
|
10
|
+
displayName: string | null;
|
|
11
|
+
isAdmin: boolean;
|
|
12
|
+
isSuperAdmin: boolean;
|
|
13
|
+
}
|
|
@@ -9,7 +9,15 @@ export interface AccountListAccountsResponseItem {
|
|
|
9
9
|
status: UnlimitedMessagingApi.AccountListAccountsResponseItemStatus;
|
|
10
10
|
phone: string | null;
|
|
11
11
|
name: string | null;
|
|
12
|
+
/** Your own reference for this account, as set at linking or with PATCH. */
|
|
13
|
+
externalRef: string | null;
|
|
12
14
|
blockedUntil: Date | null;
|
|
15
|
+
/** Whether fetching a stored media also requires authenticating as its owner. */
|
|
16
|
+
mediaUrlRequiresAuth: boolean;
|
|
17
|
+
/** Whether the account's message history is stored and announced. */
|
|
18
|
+
syncHistory: boolean;
|
|
19
|
+
/** The pause this account keeps between two sends, in seconds. */
|
|
20
|
+
sendIntervalSeconds: number;
|
|
13
21
|
createdAt: Date;
|
|
14
22
|
updatedAt: Date;
|
|
15
23
|
}
|