@sinch/conversation 1.2.1 → 1.4.0
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/dist/models/v1/app-message/app-message.d.ts +10 -7
- package/dist/models/v1/audit-record/audit-record.d.ts +18 -0
- package/dist/models/v1/audit-record/audit-record.js +3 -0
- package/dist/models/v1/audit-record/audit-record.js.map +1 -0
- package/dist/models/v1/audit-record/index.d.ts +1 -0
- package/dist/models/v1/audit-record/index.js.map +1 -0
- package/dist/models/v1/audit-records-list/audit-records-list.d.ts +8 -0
- package/dist/models/v1/audit-records-list/audit-records-list.js +3 -0
- package/dist/models/v1/audit-records-list/audit-records-list.js.map +1 -0
- package/dist/models/v1/audit-records-list/index.d.ts +1 -0
- package/dist/models/v1/audit-records-list/index.js.map +1 -0
- package/dist/models/v1/calendar-message/calendar-message.d.ts +14 -0
- package/dist/models/v1/calendar-message/calendar-message.js +3 -0
- package/dist/models/v1/calendar-message/calendar-message.js.map +1 -0
- package/dist/models/v1/calendar-message/index.d.ts +1 -0
- package/dist/models/v1/calendar-message/index.js.map +1 -0
- package/dist/models/v1/callback-settings/callback-settings.d.ts +1 -1
- package/dist/models/v1/card-message/card-message.d.ts +13 -4
- package/dist/models/v1/card-message/index.d.ts +1 -1
- package/dist/models/v1/carousel-message/carousel-message.d.ts +5 -2
- package/dist/models/v1/channel-identity/channel-identity.d.ts +1 -1
- package/dist/models/v1/channel-specific-contact-message/channel-specific-contact-message.d.ts +1 -1
- package/dist/models/v1/channel-specific-message/channel-specific-message.d.ts +40 -5
- package/dist/models/v1/channel-specific-message/index.d.ts +1 -1
- package/dist/models/v1/choice/choice.d.ts +47 -1
- package/dist/models/v1/choice-item/choice-item.d.ts +3 -3
- package/dist/models/v1/choice-message/choice-message.d.ts +8 -2
- package/dist/models/v1/client-credentials/client-credentials.d.ts +6 -0
- package/dist/models/v1/consent-identity/consent-identity.d.ts +7 -0
- package/dist/models/v1/consent-identity/consent-identity.js +3 -0
- package/dist/models/v1/consent-identity/consent-identity.js.map +1 -0
- package/dist/models/v1/consent-identity/index.d.ts +1 -0
- package/dist/models/v1/consent-identity/index.js.map +1 -0
- package/dist/models/v1/contact-create-request/contact-create-request.d.ts +1 -1
- package/dist/models/v1/contact-message/contact-message.d.ts +4 -4
- package/dist/models/v1/contact-message-event/contact-message-event.d.ts +47 -2
- package/dist/models/v1/contact-message-event/index.d.ts +1 -1
- package/dist/models/v1/contact-settings/contact-settings.d.ts +7 -0
- package/dist/models/v1/contact-settings/contact-settings.js +3 -0
- package/dist/models/v1/contact-settings/contact-settings.js.map +1 -0
- package/dist/models/v1/contact-settings/index.d.ts +1 -0
- package/dist/models/v1/contact-settings/index.js.map +1 -0
- package/dist/models/v1/conversation-channel/conversation-channel.d.ts +2 -2
- package/dist/models/v1/conversation-channel-credential/conversation-channel-credential.d.ts +18 -5
- package/dist/models/v1/conversation-channel-credential/index.d.ts +1 -1
- package/dist/models/v1/conversation-event/conversation-event.d.ts +1 -1
- package/dist/models/v1/conversation-message/conversation-message.d.ts +2 -2
- package/dist/models/v1/create-conversation-request/create-conversation-request.d.ts +7 -1
- package/dist/models/v1/delivery-report-based-fallback/delivery-report-based-fallback.d.ts +1 -1
- package/dist/models/v1/dispatch-retention-policy/dispatch-retention-policy.d.ts +2 -2
- package/dist/models/v1/enums.d.ts +29 -14
- package/dist/models/v1/helper.d.ts +5 -5
- package/dist/models/v1/helper.js.map +1 -1
- package/dist/models/v1/identified-by/identified-by.d.ts +4 -2
- package/dist/models/v1/identified-by/index.d.ts +1 -1
- package/dist/models/v1/identity-conflict/identity-conflict.d.ts +8 -0
- package/dist/models/v1/identity-conflict/identity-conflict.js +3 -0
- package/dist/models/v1/identity-conflict/identity-conflict.js.map +1 -0
- package/dist/models/v1/identity-conflict/index.d.ts +1 -0
- package/dist/models/v1/identity-conflict/index.js.map +1 -0
- package/dist/models/v1/index.d.ts +29 -12
- package/dist/models/v1/index.js +29 -12
- package/dist/models/v1/index.js.map +1 -1
- package/dist/models/v1/inject-conversation-event-request/inject-conversation-event-request.d.ts +1 -1
- package/dist/models/v1/inject-message-request/inject-message-request.d.ts +5 -7
- package/dist/models/v1/kakaotalk-button/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-button/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-button/kakaotalk-button.d.ts +27 -0
- package/dist/models/v1/kakaotalk-button/kakaotalk-button.js +3 -0
- package/dist/models/v1/kakaotalk-button/kakaotalk-button.js.map +1 -0
- package/dist/models/v1/kakaotalk-carousel/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-carousel/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-carousel/kakaotalk-carousel.d.ts +38 -0
- package/dist/models/v1/kakaotalk-carousel/kakaotalk-carousel.js +3 -0
- package/dist/models/v1/kakaotalk-carousel/kakaotalk-carousel.js.map +1 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/kakaotalk-carousel-commerce.d.ts +12 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/kakaotalk-carousel-commerce.js +3 -0
- package/dist/models/v1/kakaotalk-carousel-commerce/kakaotalk-carousel-commerce.js.map +1 -0
- package/dist/models/v1/kakaotalk-commerce/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-commerce/index.js +3 -0
- package/dist/models/v1/kakaotalk-commerce/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-commerce/kakaotalk-commerce.d.ts +7 -0
- package/dist/models/v1/kakaotalk-commerce/kakaotalk-commerce.js +3 -0
- package/dist/models/v1/kakaotalk-commerce/kakaotalk-commerce.js.map +1 -0
- package/dist/models/v1/kakaotalk-coupon/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-coupon/index.js +3 -0
- package/dist/models/v1/kakaotalk-coupon/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-coupon/kakaotalk-coupon.d.ts +79 -0
- package/dist/models/v1/kakaotalk-coupon/kakaotalk-coupon.js +3 -0
- package/dist/models/v1/kakaotalk-coupon/kakaotalk-coupon.js.map +1 -0
- package/dist/models/v1/kakaotalk-image/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-image/index.js +3 -0
- package/dist/models/v1/kakaotalk-image/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-image/kakaotalk-image.d.ts +6 -0
- package/dist/models/v1/kakaotalk-image/kakaotalk-image.js +3 -0
- package/dist/models/v1/kakaotalk-image/kakaotalk-image.js.map +1 -0
- package/dist/models/v1/kakaotalk-message/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-message/index.js +3 -0
- package/dist/models/v1/kakaotalk-message/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-message/kakaotalk-message.d.ts +16 -0
- package/dist/models/v1/kakaotalk-message/kakaotalk-message.js +3 -0
- package/dist/models/v1/kakaotalk-message/kakaotalk-message.js.map +1 -0
- package/dist/models/v1/kakaotalk-pricing/index.d.ts +1 -0
- package/dist/models/v1/kakaotalk-pricing/index.js +3 -0
- package/dist/models/v1/kakaotalk-pricing/index.js.map +1 -0
- package/dist/models/v1/kakaotalk-pricing/kakao-talk-pricing.d.ts +33 -0
- package/dist/models/v1/kakaotalk-pricing/kakao-talk-pricing.js +3 -0
- package/dist/models/v1/kakaotalk-pricing/kakao-talk-pricing.js.map +1 -0
- package/dist/models/v1/line-notification-template/index.d.ts +1 -0
- package/dist/models/v1/line-notification-template/index.js +3 -0
- package/dist/models/v1/line-notification-template/index.js.map +1 -0
- package/dist/models/v1/line-notification-template/line-notification-template.d.ts +10 -0
- package/dist/models/v1/line-notification-template/line-notification-template.js +3 -0
- package/dist/models/v1/line-notification-template/line-notification-template.js.map +1 -0
- package/dist/models/v1/line-notification-template-body/index.d.ts +1 -0
- package/dist/models/v1/line-notification-template-body/index.js +3 -0
- package/dist/models/v1/line-notification-template-body/index.js.map +1 -0
- package/dist/models/v1/line-notification-template-body/line-notification-template-body.d.ts +13 -0
- package/dist/models/v1/line-notification-template-body/line-notification-template-body.js +3 -0
- package/dist/models/v1/line-notification-template-body/line-notification-template-body.js.map +1 -0
- package/dist/models/v1/line-notification-template-button/index.d.ts +1 -0
- package/dist/models/v1/line-notification-template-button/index.js +3 -0
- package/dist/models/v1/line-notification-template-button/index.js.map +1 -0
- package/dist/models/v1/line-notification-template-button/line-notification-template-button.d.ts +9 -0
- package/dist/models/v1/line-notification-template-button/line-notification-template-button.js +3 -0
- package/dist/models/v1/line-notification-template-button/line-notification-template-button.js.map +1 -0
- package/dist/models/v1/line-notification-template-item/index.d.ts +1 -0
- package/dist/models/v1/line-notification-template-item/index.js +3 -0
- package/dist/models/v1/line-notification-template-item/index.js.map +1 -0
- package/dist/models/v1/line-notification-template-item/line-notification-template-item.d.ts +9 -0
- package/dist/models/v1/line-notification-template-item/line-notification-template-item.js +3 -0
- package/dist/models/v1/line-notification-template-item/line-notification-template-item.js.map +1 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/index.d.ts +1 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/index.js +3 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/index.js.map +1 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/list-last-messages-by-channel-identity-request.d.ts +29 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/list-last-messages-by-channel-identity-request.js +3 -0
- package/dist/models/v1/list-last-messages-by-channel-identity-request/list-last-messages-by-channel-identity-request.js.map +1 -0
- package/dist/models/v1/list-message/list-message.d.ts +6 -1
- package/dist/models/v1/list-section/list-section.d.ts +1 -1
- package/dist/models/v1/media-message/index.d.ts +1 -1
- package/dist/models/v1/media-message/media-message.d.ts +2 -2
- package/dist/models/v1/mod-callback-events/capability-event/capability-event.d.ts +1 -1
- package/dist/models/v1/mod-callback-events/conversation-callback-event/conversation-callback-event.d.ts +2 -2
- package/dist/models/v1/mod-callback-events/event-inbound/event-inbound.d.ts +30 -3
- package/dist/models/v1/mod-callback-events/event-inbound/index.d.ts +1 -1
- package/dist/models/v1/mod-callback-events/smart-conversations-event/smart-conversations-event.d.ts +6 -3
- package/dist/models/v1/mod-credentials/index.d.ts +1 -0
- package/dist/models/v1/mod-credentials/index.js +1 -0
- package/dist/models/v1/mod-credentials/index.js.map +1 -1
- package/dist/models/v1/mod-credentials/line-credentials/line-credentials.d.ts +3 -1
- package/dist/models/v1/mod-credentials/line-enterprise-credentials/index.d.ts +1 -0
- package/dist/models/v1/mod-credentials/line-enterprise-credentials/index.js +3 -0
- package/dist/models/v1/mod-credentials/line-enterprise-credentials/index.js.map +1 -0
- package/dist/models/v1/mod-credentials/line-enterprise-credentials/line-enterprise-credentials.d.ts +24 -0
- package/dist/models/v1/mod-credentials/line-enterprise-credentials/line-enterprise-credentials.js +3 -0
- package/dist/models/v1/mod-credentials/line-enterprise-credentials/line-enterprise-credentials.js.map +1 -0
- package/dist/models/v1/project-settings/index.d.ts +1 -0
- package/dist/models/v1/project-settings/index.js +3 -0
- package/dist/models/v1/project-settings/index.js.map +1 -0
- package/dist/models/v1/project-settings/project-settings.d.ts +10 -0
- package/dist/models/v1/project-settings/project-settings.js +3 -0
- package/dist/models/v1/project-settings/project-settings.js.map +1 -0
- package/dist/models/v1/project-settings-request/index.d.ts +1 -0
- package/dist/models/v1/project-settings-request/index.js +3 -0
- package/dist/models/v1/project-settings-request/index.js.map +1 -0
- package/dist/models/v1/project-settings-request/project-settings-request.d.ts +10 -0
- package/dist/models/v1/project-settings-request/project-settings-request.js +3 -0
- package/dist/models/v1/project-settings-request/project-settings-request.js.map +1 -0
- package/dist/models/v1/queue-stats/queue-stats.d.ts +2 -2
- package/dist/models/v1/requests/consents/consents-request-data.d.ts +17 -0
- package/dist/models/v1/requests/consents/consents-request-data.js +3 -0
- package/dist/models/v1/requests/consents/consents-request-data.js.map +1 -0
- package/dist/models/v1/requests/contact/contact-request-data.d.ts +9 -3
- package/dist/models/v1/requests/conversation/conversation-request-data.d.ts +1 -1
- package/dist/models/v1/requests/index.d.ts +2 -0
- package/dist/models/v1/requests/index.js +2 -0
- package/dist/models/v1/requests/index.js.map +1 -1
- package/dist/models/v1/requests/messages/messages-request-data.d.ts +9 -2
- package/dist/models/v1/requests/project-settings/project-settings-request-data.d.ts +13 -0
- package/dist/models/v1/{flow-channel-specific-message/flow-channel-specific-message.js → requests/project-settings/project-settings-request-data.js} +1 -1
- package/dist/models/v1/requests/project-settings/project-settings-request-data.js.map +1 -0
- package/dist/models/v1/retention-policy/retention-policy.d.ts +1 -1
- package/dist/models/v1/runtime-error/index.d.ts +1 -1
- package/dist/models/v1/runtime-error/runtime-error.d.ts +3 -1
- package/dist/models/v1/send-message-request/send-message-request.d.ts +6 -4
- package/dist/models/v1/share-location-message/index.d.ts +1 -0
- package/dist/models/v1/share-location-message/index.js +3 -0
- package/dist/models/v1/share-location-message/index.js.map +1 -0
- package/dist/models/v1/share-location-message/share-location-message.d.ts +6 -0
- package/dist/models/v1/{media-carousel-message/media-carousel-message.js → share-location-message/share-location-message.js} +1 -1
- package/dist/models/v1/share-location-message/share-location-message.js.map +1 -0
- package/dist/models/v1/smart-conversation/smart-conversation.d.ts +1 -1
- package/dist/models/v1/template-message/template-message.d.ts +6 -3
- package/dist/models/v1/template-reference/index.d.ts +1 -1
- package/dist/models/v1/template-reference/template-reference.d.ts +15 -3
- package/dist/models/v1/webhook/webhook.d.ts +3 -3
- package/dist/models/v1/webhook-trigger/webhook-trigger.d.ts +1 -0
- package/dist/models/v1/whatsapp-flow/index.d.ts +1 -0
- package/dist/models/v1/whatsapp-flow/index.js +3 -0
- package/dist/models/v1/whatsapp-flow/index.js.map +1 -0
- package/dist/models/v1/whatsapp-flow/whatsapp-flow.d.ts +28 -0
- package/dist/models/v1/whatsapp-flow/whatsapp-flow.js +3 -0
- package/dist/models/v1/whatsapp-flow/whatsapp-flow.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/index.d.ts +5 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/index.js +22 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-document-header/index.js +3 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-document-header/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-document-header/whatsapp-interactive-document-header.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-header-media/index.js +3 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-header-media/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-header-media/whatsapp-interactive-header-media.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-image-header/index.js +3 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-image-header/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-image-header/whatsapp-interactive-image-header.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-text-header/index.js +3 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-text-header/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-text-header/whatsapp-interactive-text-header.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-video-header/index.js +3 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-video-header/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/header/whatsapp-interactive-video-header/whatsapp-interactive-video-header.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/index.d.ts +4 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/index.js +21 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-body/index.js +3 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-body/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-body/whatsapp-interactive-body.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-footer/index.js +3 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-footer/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-footer/whatsapp-interactive-footer.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-header/index.d.ts +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-header/index.js +3 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-header/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-header/whatsapp-interactive-header.d.ts +4 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-header/whatsapp-interactive-header.js +3 -0
- package/dist/models/v1/whatsapp-interactive-message-base/common/whatsapp-interactive-header/whatsapp-interactive-header.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/index.d.ts +2 -0
- package/dist/models/v1/whatsapp-interactive-message-base/index.js +18 -0
- package/dist/models/v1/whatsapp-interactive-message-base/index.js.map +1 -0
- package/dist/models/v1/whatsapp-interactive-message-base/whatsapp-interactive-message-base.d.ts +9 -0
- package/dist/models/v1/whatsapp-interactive-message-base/whatsapp-interactive-message-base.js +3 -0
- package/dist/models/v1/whatsapp-interactive-message-base/whatsapp-interactive-message-base.js.map +1 -0
- package/dist/models/v1/whatsapp-payment-order-details/index.d.ts +1 -0
- package/dist/models/v1/whatsapp-payment-order-details/index.js +3 -0
- package/dist/models/v1/whatsapp-payment-order-details/index.js.map +1 -0
- package/dist/models/v1/whatsapp-payment-order-details/whatsapp-payment-order-details.d.ts +117 -0
- package/dist/models/v1/whatsapp-payment-order-details/whatsapp-payment-order-details.js +3 -0
- package/dist/models/v1/whatsapp-payment-order-details/whatsapp-payment-order-details.js.map +1 -0
- package/dist/models/v1/whatsapp-payment-order-status/index.d.ts +1 -0
- package/dist/models/v1/whatsapp-payment-order-status/index.js +3 -0
- package/dist/models/v1/whatsapp-payment-order-status/index.js.map +1 -0
- package/dist/models/v1/whatsapp-payment-order-status/whatsapp-payment-order-status.d.ts +32 -0
- package/dist/models/v1/whatsapp-payment-order-status/whatsapp-payment-order-status.js +3 -0
- package/dist/models/v1/whatsapp-payment-order-status/whatsapp-payment-order-status.js.map +1 -0
- package/dist/rest/v1/app/app-api.d.ts +4 -9
- package/dist/rest/v1/app/app-api.js +4 -14
- package/dist/rest/v1/app/app-api.js.map +1 -1
- package/dist/rest/v1/callbacks/callbacks-webhook.d.ts +7 -0
- package/dist/rest/v1/callbacks/callbacks-webhook.js +13 -0
- package/dist/rest/v1/callbacks/callbacks-webhook.js.map +1 -1
- package/dist/rest/v1/capability/capability-api.d.ts +2 -7
- package/dist/rest/v1/capability/capability-api.js +2 -8
- package/dist/rest/v1/capability/capability-api.js.map +1 -1
- package/dist/rest/v1/consents/consents-api.d.ts +20 -0
- package/dist/rest/v1/consents/consents-api.jest.fixture.d.ts +13 -0
- package/dist/rest/v1/consents/consents-api.jest.fixture.js +17 -0
- package/dist/rest/v1/consents/consents-api.jest.fixture.js.map +1 -0
- package/dist/rest/v1/consents/consents-api.js +61 -0
- package/dist/rest/v1/consents/consents-api.js.map +1 -0
- package/dist/rest/v1/consents/index.d.ts +2 -0
- package/dist/rest/v1/consents/index.js +19 -0
- package/dist/rest/v1/consents/index.js.map +1 -0
- package/dist/rest/v1/contact/contact-api.d.ts +13 -10
- package/dist/rest/v1/contact/contact-api.jest.fixture.d.ts +5 -1
- package/dist/rest/v1/contact/contact-api.jest.fixture.js +4 -0
- package/dist/rest/v1/contact/contact-api.jest.fixture.js.map +1 -1
- package/dist/rest/v1/contact/contact-api.js +31 -16
- package/dist/rest/v1/contact/contact-api.js.map +1 -1
- package/dist/rest/v1/conversation/conversation-api.d.ts +5 -9
- package/dist/rest/v1/conversation/conversation-api.js +4 -18
- package/dist/rest/v1/conversation/conversation-api.js.map +1 -1
- package/dist/rest/v1/conversation-domain-api.d.ts +13 -14
- package/dist/rest/v1/conversation-domain-api.js +29 -52
- package/dist/rest/v1/conversation-domain-api.js.map +1 -1
- package/dist/rest/v1/conversation-service.d.ts +31 -2
- package/dist/rest/v1/conversation-service.js +126 -32
- package/dist/rest/v1/conversation-service.js.map +1 -1
- package/dist/rest/v1/events/events-api.d.ts +4 -8
- package/dist/rest/v1/events/events-api.js +3 -12
- package/dist/rest/v1/events/events-api.js.map +1 -1
- package/dist/rest/v1/index.d.ts +3 -0
- package/dist/rest/v1/index.js +3 -0
- package/dist/rest/v1/index.js.map +1 -1
- package/dist/rest/v1/messages/messages-api.d.ts +13 -11
- package/dist/rest/v1/messages/messages-api.jest.fixture.d.ts +7 -1
- package/dist/rest/v1/messages/messages-api.jest.fixture.js +4 -0
- package/dist/rest/v1/messages/messages-api.jest.fixture.js.map +1 -1
- package/dist/rest/v1/messages/messages-api.js +33 -16
- package/dist/rest/v1/messages/messages-api.js.map +1 -1
- package/dist/rest/v1/project-settings/index.d.ts +2 -0
- package/dist/rest/v1/project-settings/index.js +19 -0
- package/dist/rest/v1/project-settings/index.js.map +1 -0
- package/dist/rest/v1/project-settings/project-settings-api.d.ts +30 -0
- package/dist/rest/v1/project-settings/project-settings-api.jest.fixture.d.ts +20 -0
- package/dist/rest/v1/project-settings/project-settings-api.jest.fixture.js +25 -0
- package/dist/rest/v1/project-settings/project-settings-api.jest.fixture.js.map +1 -0
- package/dist/rest/v1/project-settings/project-settings-api.js +101 -0
- package/dist/rest/v1/project-settings/project-settings-api.js.map +1 -0
- package/dist/rest/v1/templates-v1/templates-v1-api.d.ts +8 -8
- package/dist/rest/v1/templates-v1/templates-v1-api.js +8 -13
- package/dist/rest/v1/templates-v1/templates-v1-api.js.map +1 -1
- package/dist/rest/v1/templates-v2/templates-v2-api.d.ts +3 -8
- package/dist/rest/v1/templates-v2/templates-v2-api.js +3 -14
- package/dist/rest/v1/templates-v2/templates-v2-api.js.map +1 -1
- package/dist/rest/v1/transcoding/transcoding-api.d.ts +2 -7
- package/dist/rest/v1/transcoding/transcoding-api.js +2 -8
- package/dist/rest/v1/transcoding/transcoding-api.js.map +1 -1
- package/dist/rest/v1/webhooks/webhooks-api.d.ts +2 -7
- package/dist/rest/v1/webhooks/webhooks-api.js +2 -12
- package/dist/rest/v1/webhooks/webhooks-api.js.map +1 -1
- package/package.json +2 -2
- package/dist/models/v1/flow-channel-specific-message/flow-channel-specific-message.d.ts +0 -37
- package/dist/models/v1/flow-channel-specific-message/flow-channel-specific-message.js.map +0 -1
- package/dist/models/v1/flow-channel-specific-message/index.d.ts +0 -1
- package/dist/models/v1/flow-channel-specific-message/index.js.map +0 -1
- package/dist/models/v1/media-carousel-message/index.d.ts +0 -1
- package/dist/models/v1/media-carousel-message/index.js.map +0 -1
- package/dist/models/v1/media-carousel-message/media-carousel-message.d.ts +0 -7
- package/dist/models/v1/media-carousel-message/media-carousel-message.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-body/index.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-body/whatsapp-interactive-body.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-document-header/index.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-document-header/whatsapp-interactive-document-header.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-footer/index.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-footer/whatsapp-interactive-footer.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-header-media/index.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-header-media/whatsapp-interactive-header-media.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-image-header/index.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-image-header/whatsapp-interactive-image-header.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-text-header/index.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-text-header/whatsapp-interactive-text-header.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-video-header/index.js.map +0 -1
- package/dist/models/v1/whatsapp-interactive-video-header/whatsapp-interactive-video-header.js.map +0 -1
- /package/dist/models/v1/{flow-channel-specific-message → audit-record}/index.js +0 -0
- /package/dist/models/v1/{media-carousel-message → audit-records-list}/index.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-body → calendar-message}/index.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-document-header → consent-identity}/index.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-footer → contact-settings}/index.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-header-media → identity-conflict}/index.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-image-header → kakaotalk-button}/index.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-video-header → kakaotalk-carousel}/index.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-text-header → kakaotalk-carousel-commerce}/index.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-document-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-document-header}/index.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-document-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-document-header}/whatsapp-interactive-document-header.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-document-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-document-header}/whatsapp-interactive-document-header.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-header-media → whatsapp-interactive-message-base/common/header/whatsapp-interactive-header-media}/index.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-header-media → whatsapp-interactive-message-base/common/header/whatsapp-interactive-header-media}/whatsapp-interactive-header-media.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-header-media → whatsapp-interactive-message-base/common/header/whatsapp-interactive-header-media}/whatsapp-interactive-header-media.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-image-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-image-header}/index.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-image-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-image-header}/whatsapp-interactive-image-header.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-image-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-image-header}/whatsapp-interactive-image-header.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-text-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-text-header}/index.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-text-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-text-header}/whatsapp-interactive-text-header.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-text-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-text-header}/whatsapp-interactive-text-header.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-video-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-video-header}/index.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-video-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-video-header}/whatsapp-interactive-video-header.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-video-header → whatsapp-interactive-message-base/common/header/whatsapp-interactive-video-header}/whatsapp-interactive-video-header.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-body → whatsapp-interactive-message-base/common/whatsapp-interactive-body}/index.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-body → whatsapp-interactive-message-base/common/whatsapp-interactive-body}/whatsapp-interactive-body.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-body → whatsapp-interactive-message-base/common/whatsapp-interactive-body}/whatsapp-interactive-body.js +0 -0
- /package/dist/models/v1/{whatsapp-interactive-footer → whatsapp-interactive-message-base/common/whatsapp-interactive-footer}/index.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-footer → whatsapp-interactive-message-base/common/whatsapp-interactive-footer}/whatsapp-interactive-footer.d.ts +0 -0
- /package/dist/models/v1/{whatsapp-interactive-footer → whatsapp-interactive-message-base/common/whatsapp-interactive-footer}/whatsapp-interactive-footer.js +0 -0
|
@@ -47,6 +47,9 @@ class ConversationCallbackWebhooks {
|
|
|
47
47
|
* @throws {Error} If the eventBody is not valid or cannot be parsed.
|
|
48
48
|
*/
|
|
49
49
|
parseEvent(eventBody) {
|
|
50
|
+
if (typeof eventBody === 'string') {
|
|
51
|
+
eventBody = JSON.parse(eventBody);
|
|
52
|
+
}
|
|
50
53
|
if ('message' in eventBody) {
|
|
51
54
|
return {
|
|
52
55
|
...eventBody,
|
|
@@ -178,6 +181,16 @@ class ConversationCallbackWebhooks {
|
|
|
178
181
|
}
|
|
179
182
|
}
|
|
180
183
|
;
|
|
184
|
+
/**
|
|
185
|
+
* Static reviver for a Conversation Event.
|
|
186
|
+
* This method ensures the object can be treated as a Conversation Event.
|
|
187
|
+
* @param {any} eventBody - The event body containing the Conversation event notification.
|
|
188
|
+
* @return {ConversationWebhookEventParsed} - The parsed Conversation event object
|
|
189
|
+
*/
|
|
190
|
+
static parseEvent(eventBody) {
|
|
191
|
+
const instance = new ConversationCallbackWebhooks('');
|
|
192
|
+
return instance.parseEvent(eventBody);
|
|
193
|
+
}
|
|
181
194
|
}
|
|
182
195
|
exports.ConversationCallbackWebhooks = ConversationCallbackWebhooks;
|
|
183
196
|
//# sourceMappingURL=callbacks-webhook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbacks-webhook.js","sourceRoot":"","sources":["../../../../src/rest/v1/callbacks/callbacks-webhook.ts"],"names":[],"mappings":";;;AAwBA,kDAAgF;AAQhF,MAAa,4BAA4B;IAGvC,YAAY,SAAiB;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC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AqB,IAAI,SAAS,EAAE,CAAC,CAAC,iDAAiD;YAChG,OAAO;gBACL,GAAG,SAAS;gBACZ,OAAO,EAAE,qBAAqB;aACJ,CAAC;QAC/B,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAAA,CAAC;IAEF;;;;;OAKG;IACI,MAAM,CAAC,UAAU,CAAC,SAAa;QACpC,MAAM,QAAQ,GAAG,IAAI,4BAA4B,CAAC,EAAE,CAAC,CAAC;QACtD,OAAO,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;CACF;AAnLD,oEAmLC"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { SinchClientParameters } from '@sinch/sdk-client';
|
|
2
1
|
import { LookupCapabilityRequestData, LookupCapabilityResponse, Recipient } from '../../../models';
|
|
3
2
|
import { ConversationDomainApi } from '../conversation-domain-api';
|
|
3
|
+
import { LazyConversationApiClient } from '../conversation-service';
|
|
4
4
|
export declare class CapabilityApi extends ConversationDomainApi {
|
|
5
|
-
|
|
6
|
-
* Initialize your interface
|
|
7
|
-
*
|
|
8
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
9
|
-
*/
|
|
10
|
-
constructor(sinchClientParameters: SinchClientParameters);
|
|
5
|
+
constructor(lazyApiClient: LazyConversationApiClient);
|
|
11
6
|
/**
|
|
12
7
|
* Capability lookup
|
|
13
8
|
* This method is asynchronous - it immediately returns the requested Capability registration. Capability check is then delivered as a callback to registered webhooks with trigger CAPABILITY for every reachable channel.
|
|
@@ -3,13 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CapabilityApi = void 0;
|
|
4
4
|
const conversation_domain_api_1 = require("../conversation-domain-api");
|
|
5
5
|
class CapabilityApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
10
|
-
*/
|
|
11
|
-
constructor(sinchClientParameters) {
|
|
12
|
-
super(sinchClientParameters, 'CapabilityApi');
|
|
6
|
+
constructor(lazyApiClient) {
|
|
7
|
+
super(lazyApiClient, 'CapabilityApi');
|
|
13
8
|
}
|
|
14
9
|
/**
|
|
15
10
|
* Capability lookup
|
|
@@ -17,7 +12,6 @@ class CapabilityApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
17
12
|
* @param { LookupCapabilityRequestData<Recipient> } data - The data to provide to the API call.
|
|
18
13
|
*/
|
|
19
14
|
async lookup(data) {
|
|
20
|
-
this.client = this.getSinchClient();
|
|
21
15
|
const getParams = this.client.extractQueryParams(data, []);
|
|
22
16
|
const headers = {
|
|
23
17
|
'Content-Type': 'application/json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/capability/capability-api.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"capability-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/capability/capability-api.ts"],"names":[],"mappings":";;;AAQA,wEAAmE;AAGnE,MAAa,aAAc,SAAQ,+CAAqB;IAEtD,YAAY,aAAwC;QAClD,KAAK,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;IACxC,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,IAA4C;QAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAC9C,IAAI,EAAE,EAAa,CAAC,CAAC;QACvB,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,IAAI,CAAC,6BAA6B,CAAC;YAC3D,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YACrD,CAAC,CAAC,IAAI,CAAC;QACT,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,mBAAmB,CAAC;QAEtI,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QACpH,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAA2B;YACvD,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,iBAAiB;SAC/B,CAAC,CAAC;IACL,CAAC;CAEF;AAnCD,sCAmCC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApiListPromise } from '@sinch/sdk-client';
|
|
2
|
+
import { ListAuditRecordsRequestData, ListIdentitiesRequestData, AuditRecordsList, ConsentIdentity } from '../../../models';
|
|
3
|
+
import { ConversationDomainApi } from '../conversation-domain-api';
|
|
4
|
+
import { LazyConversationApiClient } from '../conversation-service';
|
|
5
|
+
export declare class ConsentsApi extends ConversationDomainApi {
|
|
6
|
+
constructor(lazyApiClient: LazyConversationApiClient);
|
|
7
|
+
/**
|
|
8
|
+
* Get identities from consent list
|
|
9
|
+
* Get all identities contained within a consent list for a given project id, app id, and list type.
|
|
10
|
+
* @param { ListIdentitiesRequestData } data - The data to provide to the API call.
|
|
11
|
+
* @return {ApiListPromise<ConsentIdentity>}
|
|
12
|
+
*/
|
|
13
|
+
listIdentities(data: ListIdentitiesRequestData): ApiListPromise<ConsentIdentity>;
|
|
14
|
+
/**
|
|
15
|
+
* Get audit records from consent lists
|
|
16
|
+
* Get all audit records associated with the given identity from the consent lists within the specified project and app.
|
|
17
|
+
* @param { ListAuditRecordsRequestData } data - The data to provide to the API call.
|
|
18
|
+
*/
|
|
19
|
+
listAuditRecords(data: ListAuditRecordsRequestData): Promise<AuditRecordsList>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConsentsApi } from './consents-api';
|
|
2
|
+
import { ListAuditRecordsRequestData, ListIdentitiesRequestData, AuditRecordsList, ConsentIdentity } from '../../../models';
|
|
3
|
+
import { ApiListPromise } from '@sinch/sdk-client';
|
|
4
|
+
export declare class ConsentsApiFixture implements Partial<Readonly<ConsentsApi>> {
|
|
5
|
+
/**
|
|
6
|
+
* Fixture associated to function listIdentities
|
|
7
|
+
*/
|
|
8
|
+
listIdentities: jest.Mock<ApiListPromise<ConsentIdentity>, [ListIdentitiesRequestData]>;
|
|
9
|
+
/**
|
|
10
|
+
* Fixture associated to function listAuditRecords
|
|
11
|
+
*/
|
|
12
|
+
listAuditRecords: jest.Mock<Promise<AuditRecordsList>, [ListAuditRecordsRequestData]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConsentsApiFixture = void 0;
|
|
4
|
+
class ConsentsApiFixture {
|
|
5
|
+
constructor() {
|
|
6
|
+
/**
|
|
7
|
+
* Fixture associated to function listIdentities
|
|
8
|
+
*/
|
|
9
|
+
this.listIdentities = jest.fn();
|
|
10
|
+
/**
|
|
11
|
+
* Fixture associated to function listAuditRecords
|
|
12
|
+
*/
|
|
13
|
+
this.listAuditRecords = jest.fn();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.ConsentsApiFixture = ConsentsApiFixture;
|
|
17
|
+
//# sourceMappingURL=consents-api.jest.fixture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consents-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/consents/consents-api.jest.fixture.ts"],"names":[],"mappings":";;;AASA,MAAa,kBAAkB;IAA/B;QAEE;;WAEG;QACI,mBAAc,GAA4E,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3G;;WAEG;QACI,qBAAgB,GAAwE,IAAI,CAAC,EAAE,EAAE,CAAC;IAC3G,CAAC;CAAA;AAVD,gDAUC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConsentsApi = void 0;
|
|
4
|
+
const sdk_client_1 = require("@sinch/sdk-client");
|
|
5
|
+
const conversation_domain_api_1 = require("../conversation-domain-api");
|
|
6
|
+
class ConsentsApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
7
|
+
constructor(lazyApiClient) {
|
|
8
|
+
super(lazyApiClient, 'ConsentsApi');
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get identities from consent list
|
|
12
|
+
* Get all identities contained within a consent list for a given project id, app id, and list type.
|
|
13
|
+
* @param { ListIdentitiesRequestData } data - The data to provide to the API call.
|
|
14
|
+
* @return {ApiListPromise<ConsentIdentity>}
|
|
15
|
+
*/
|
|
16
|
+
listIdentities(data) {
|
|
17
|
+
const getParams = this.client.extractQueryParams(data, ['page_size', 'page_token']);
|
|
18
|
+
const headers = {
|
|
19
|
+
'Content-Type': 'application/json',
|
|
20
|
+
'Accept': 'application/json',
|
|
21
|
+
};
|
|
22
|
+
const body = '';
|
|
23
|
+
const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/apps/${data['app_id']}/consents/${data['list_type']}`;
|
|
24
|
+
const requestOptionsPromise = this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
|
|
25
|
+
const operationProperties = {
|
|
26
|
+
pagination: sdk_client_1.PaginationEnum.TOKEN2,
|
|
27
|
+
apiName: this.apiName,
|
|
28
|
+
operationId: 'ListIdentitiesFromConsentsList',
|
|
29
|
+
dataKey: 'identities',
|
|
30
|
+
};
|
|
31
|
+
// Create the promise containing the response wrapped as a PageResult
|
|
32
|
+
const listPromise = (0, sdk_client_1.buildPageResultPromise)(this.client, requestOptionsPromise, operationProperties);
|
|
33
|
+
// Add properties to the Promise to offer the possibility to use it as an iterator
|
|
34
|
+
Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
|
|
35
|
+
return listPromise;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get audit records from consent lists
|
|
39
|
+
* Get all audit records associated with the given identity from the consent lists within the specified project and app.
|
|
40
|
+
* @param { ListAuditRecordsRequestData } data - The data to provide to the API call.
|
|
41
|
+
*/
|
|
42
|
+
async listAuditRecords(data) {
|
|
43
|
+
const getParams = this.client.extractQueryParams(data, []);
|
|
44
|
+
const headers = {
|
|
45
|
+
'Content-Type': 'application/json',
|
|
46
|
+
'Accept': 'application/json',
|
|
47
|
+
};
|
|
48
|
+
const body = '';
|
|
49
|
+
const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/apps/${data['app_id']}/consents/identities/${data['identity']}`;
|
|
50
|
+
const requestOptions = await this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
|
|
51
|
+
const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
|
|
52
|
+
return this.client.processCall({
|
|
53
|
+
url,
|
|
54
|
+
requestOptions,
|
|
55
|
+
apiName: this.apiName,
|
|
56
|
+
operationId: 'ListAuditRecordsFromConsentsList',
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ConsentsApi = ConsentsApi;
|
|
61
|
+
//# sourceMappingURL=consents-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consents-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/cons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CACxE,CAAC;QAEF,OAAO,WAA8C,CAAC;IACxD,CAAC;IAGD;;;;OAIG;IACI,KAAK,CAAC,gBAAgB,CAAC,IAAiC;QAC7D,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAA8B,IAAI,EAAE,EAAa,CAAC,CAAC;QACnG,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,gBAAgB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,SAAS,IAAI,CAAC,QAAQ,CAAC,wBAAwB,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QAEpL,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QACnH,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAmB;YAC/C,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,kCAAkC;SAChD,CAAC,CAAC;IACL,CAAC;CAEF;AA1ED,kCA0EC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./consents-api"), exports);
|
|
18
|
+
__exportStar(require("./consents-api.jest.fixture"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/consents/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,8DAA4C"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { ApiListPromise
|
|
2
|
-
import { Contact, CreateContactRequestData, DeleteContactRequestData, GetChannelProfileRequestData, GetChannelProfileResponse, GetContactRequestData, ListContactsRequestData, MergeContactRequestData, Recipient, UpdateContactRequestData } from '../../../models';
|
|
1
|
+
import { ApiListPromise } from '@sinch/sdk-client';
|
|
2
|
+
import { Contact, CreateContactRequestData, DeleteContactRequestData, GetChannelProfileRequestData, GetChannelProfileResponse, GetContactRequestData, IdentityConflict, ListContactsRequestData, ListIdentityConflictsRequestData, MergeContactRequestData, Recipient, UpdateContactRequestData } from '../../../models';
|
|
3
3
|
import { ConversationDomainApi } from '../conversation-domain-api';
|
|
4
|
+
import { LazyConversationApiClient } from '../conversation-service';
|
|
4
5
|
export declare class ContactApi extends ConversationDomainApi {
|
|
5
|
-
|
|
6
|
-
* Initialize your interface
|
|
7
|
-
*
|
|
8
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
9
|
-
*/
|
|
10
|
-
constructor(sinchClientParameters: SinchClientParameters);
|
|
6
|
+
constructor(lazyApiClient: LazyConversationApiClient);
|
|
11
7
|
/**
|
|
12
8
|
* Create a Contact
|
|
13
|
-
* Most Conversation API contacts are [created automatically](/docs/conversation/contact-management/) when a message is sent to a new recipient. You can also create a new contact manually using this API call.
|
|
9
|
+
* Most Conversation API contacts are [created automatically](https://developers.sinch.com/docs/conversation/contact-management/) when a message is sent to a new recipient. You can also create a new contact manually using this API call.
|
|
14
10
|
* @param { CreateContactRequestData } data - The data to provide to the API call.
|
|
15
11
|
*/
|
|
16
12
|
create(data: CreateContactRequestData): Promise<Contact>;
|
|
@@ -41,7 +37,14 @@ export declare class ContactApi extends ConversationDomainApi {
|
|
|
41
37
|
* @param { ListContactsRequestData } data - The data to provide to the API call.
|
|
42
38
|
* @return {ApiListPromise<Contact>}
|
|
43
39
|
*/
|
|
44
|
-
list(data
|
|
40
|
+
list(data?: ListContactsRequestData): ApiListPromise<Contact>;
|
|
41
|
+
/**
|
|
42
|
+
* Lists Contact Identity Conflicts
|
|
43
|
+
* Lists contact identity conflicts across supported SIM-based channels (SMS, MMS, RCS). Use this to identify contact records sharing the same identity (e.g., phone number), which must be resolved before enabling the Unified Contact ID feature.
|
|
44
|
+
* @param { ListIdentityConflictsRequestData } data - The data to provide to the API call.
|
|
45
|
+
* @return {ApiListPromise<IdentityConflict>}
|
|
46
|
+
*/
|
|
47
|
+
listIdentityConflicts(data: ListIdentityConflictsRequestData): ApiListPromise<IdentityConflict>;
|
|
45
48
|
/**
|
|
46
49
|
* Merge two Contacts
|
|
47
50
|
* The remaining contact will contain all conversations that the removed contact did. If both contacts had conversations within the same App, messages from the removed contact will be merged into corresponding active conversations in the destination contact. Channel identities will be moved from the source contact to the destination contact only for channels that weren\'t present there before. Moved channel identities will be placed at the bottom of the channel priority list. Optional fields from the source contact will be copied only if corresponding fields in the destination contact are empty The contact being removed cannot be referenced after this call.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiListPromise } from '@sinch/sdk-client';
|
|
2
2
|
import { ContactApi } from './contact-api';
|
|
3
|
-
import { Contact, Recipient, CreateContactRequestData, DeleteContactRequestData, GetChannelProfileRequestData, GetContactRequestData, ListContactsRequestData, MergeContactRequestData, UpdateContactRequestData, GetChannelProfileResponse } from '../../../models';
|
|
3
|
+
import { Contact, Recipient, CreateContactRequestData, DeleteContactRequestData, GetChannelProfileRequestData, GetContactRequestData, ListContactsRequestData, MergeContactRequestData, UpdateContactRequestData, GetChannelProfileResponse, IdentityConflict, ListIdentityConflictsRequestData } from '../../../models';
|
|
4
4
|
export declare class ContactApiFixture implements Partial<Readonly<ContactApi>> {
|
|
5
5
|
/**
|
|
6
6
|
* Fixture associated to function create
|
|
@@ -24,6 +24,10 @@ export declare class ContactApiFixture implements Partial<Readonly<ContactApi>>
|
|
|
24
24
|
* Fixture associated to function list
|
|
25
25
|
*/
|
|
26
26
|
list: jest.Mock<ApiListPromise<Contact>, [ListContactsRequestData]>;
|
|
27
|
+
/**
|
|
28
|
+
* Fixture associated to function listIdentityConflicts
|
|
29
|
+
*/
|
|
30
|
+
listIdentityConflicts: jest.Mock<ApiListPromise<IdentityConflict>, [ListIdentityConflictsRequestData]>;
|
|
27
31
|
/**
|
|
28
32
|
* Fixture associated to function mergeContact
|
|
29
33
|
*/
|
|
@@ -23,6 +23,10 @@ class ContactApiFixture {
|
|
|
23
23
|
* Fixture associated to function list
|
|
24
24
|
*/
|
|
25
25
|
this.list = jest.fn();
|
|
26
|
+
/**
|
|
27
|
+
* Fixture associated to function listIdentityConflicts
|
|
28
|
+
*/
|
|
29
|
+
this.listIdentityConflicts = jest.fn();
|
|
26
30
|
/**
|
|
27
31
|
* Fixture associated to function mergeContact
|
|
28
32
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.jest.fixture.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"contact-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.jest.fixture.ts"],"names":[],"mappings":";;;AAiBA,MAAa,iBAAiB;IAA9B;QAEE;;WAEG;QACI,WAAM,GAA4D,IAAI,CAAC,EAAE,EAAE,CAAC;QACnF;;WAEG;QACI,WAAM,GAAwD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC/E;;WAEG;QACI,sBAAiB,GAGpB,IAAI,CAAC,EAAE,EAAE,CAAC;QACd;;WAEG;QACI,QAAG,GAAyD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC7E;;WAEG;QACI,SAAI,GAAkE,IAAI,CAAC,EAAE,EAAE,CAAC;QACvF;;WAEG;QACI,0BAAqB,GAC8C,IAAI,CAAC,EAAE,EAAE,CAAC;QACpF;;WAEG;QACI,iBAAY,GAA2D,IAAI,CAAC,EAAE,EAAE,CAAC;QACxF;;WAEG;QACI,WAAM,GAA4D,IAAI,CAAC,EAAE,EAAE,CAAC;IACrF,CAAC;CAAA;AAtCD,8CAsCC"}
|
|
@@ -4,21 +4,15 @@ exports.ContactApi = void 0;
|
|
|
4
4
|
const sdk_client_1 = require("@sinch/sdk-client");
|
|
5
5
|
const conversation_domain_api_1 = require("../conversation-domain-api");
|
|
6
6
|
class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
11
|
-
*/
|
|
12
|
-
constructor(sinchClientParameters) {
|
|
13
|
-
super(sinchClientParameters, 'ContactApi');
|
|
7
|
+
constructor(lazyApiClient) {
|
|
8
|
+
super(lazyApiClient, 'ContactApi');
|
|
14
9
|
}
|
|
15
10
|
/**
|
|
16
11
|
* Create a Contact
|
|
17
|
-
* Most Conversation API contacts are [created automatically](/docs/conversation/contact-management/) when a message is sent to a new recipient. You can also create a new contact manually using this API call.
|
|
12
|
+
* Most Conversation API contacts are [created automatically](https://developers.sinch.com/docs/conversation/contact-management/) when a message is sent to a new recipient. You can also create a new contact manually using this API call.
|
|
18
13
|
* @param { CreateContactRequestData } data - The data to provide to the API call.
|
|
19
14
|
*/
|
|
20
15
|
async create(data) {
|
|
21
|
-
this.client = this.getSinchClient();
|
|
22
16
|
const getParams = this.client.extractQueryParams(data, []);
|
|
23
17
|
const headers = {
|
|
24
18
|
'Content-Type': 'application/json',
|
|
@@ -41,7 +35,6 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
41
35
|
* @param { DeleteContactRequestData } data - The data to provide to the API call.
|
|
42
36
|
*/
|
|
43
37
|
async delete(data) {
|
|
44
|
-
this.client = this.getSinchClient();
|
|
45
38
|
const getParams = this.client.extractQueryParams(data, []);
|
|
46
39
|
const headers = {
|
|
47
40
|
'Content-Type': 'application/json',
|
|
@@ -65,7 +58,6 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
65
58
|
* @param { GetChannelProfileRequestData<Recipient> } data - The data to provide to the API call.
|
|
66
59
|
*/
|
|
67
60
|
async getChannelProfile(data) {
|
|
68
|
-
this.client = this.getSinchClient();
|
|
69
61
|
const getParams = this.client.extractQueryParams(data, []);
|
|
70
62
|
const headers = {
|
|
71
63
|
'Content-Type': 'application/json',
|
|
@@ -90,7 +82,6 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
90
82
|
* @param { GetContactRequestData } data - The data to provide to the API call.
|
|
91
83
|
*/
|
|
92
84
|
async get(data) {
|
|
93
|
-
this.client = this.getSinchClient();
|
|
94
85
|
const getParams = this.client.extractQueryParams(data, []);
|
|
95
86
|
const headers = {
|
|
96
87
|
'Content-Type': 'application/json',
|
|
@@ -114,8 +105,7 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
114
105
|
* @return {ApiListPromise<Contact>}
|
|
115
106
|
*/
|
|
116
107
|
list(data) {
|
|
117
|
-
|
|
118
|
-
const getParams = this.client.extractQueryParams(data, ['page_size', 'page_token', 'external_id', 'channel', 'identity']);
|
|
108
|
+
const getParams = this.client.extractQueryParams(data ?? {}, ['page_size', 'page_token', 'external_id', 'channel', 'identity']);
|
|
119
109
|
const headers = {
|
|
120
110
|
'Content-Type': 'application/json',
|
|
121
111
|
'Accept': 'application/json',
|
|
@@ -135,13 +125,39 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
135
125
|
Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
|
|
136
126
|
return listPromise;
|
|
137
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Lists Contact Identity Conflicts
|
|
130
|
+
* Lists contact identity conflicts across supported SIM-based channels (SMS, MMS, RCS). Use this to identify contact records sharing the same identity (e.g., phone number), which must be resolved before enabling the Unified Contact ID feature.
|
|
131
|
+
* @param { ListIdentityConflictsRequestData } data - The data to provide to the API call.
|
|
132
|
+
* @return {ApiListPromise<IdentityConflict>}
|
|
133
|
+
*/
|
|
134
|
+
listIdentityConflicts(data) {
|
|
135
|
+
const getParams = this.client.extractQueryParams(data, ['page_size', 'page_token']);
|
|
136
|
+
const headers = {
|
|
137
|
+
'Content-Type': 'application/json',
|
|
138
|
+
'Accept': 'application/json',
|
|
139
|
+
};
|
|
140
|
+
const body = '';
|
|
141
|
+
const basePathUrl = `${this.client.apiClientOptions.hostname}/v1/projects/${this.client.apiClientOptions.projectId}/contacts:identityConflicts`;
|
|
142
|
+
const requestOptionsPromise = this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined);
|
|
143
|
+
const operationProperties = {
|
|
144
|
+
pagination: sdk_client_1.PaginationEnum.TOKEN2,
|
|
145
|
+
apiName: this.apiName,
|
|
146
|
+
operationId: 'ListIdentityConflicts',
|
|
147
|
+
dataKey: 'conflicts',
|
|
148
|
+
};
|
|
149
|
+
// Create the promise containing the response wrapped as a PageResult
|
|
150
|
+
const listPromise = (0, sdk_client_1.buildPageResultPromise)(this.client, requestOptionsPromise, operationProperties);
|
|
151
|
+
// Add properties to the Promise to offer the possibility to use it as an iterator
|
|
152
|
+
Object.assign(listPromise, (0, sdk_client_1.createIteratorMethodsForPagination)(this.client, requestOptionsPromise, listPromise, operationProperties));
|
|
153
|
+
return listPromise;
|
|
154
|
+
}
|
|
138
155
|
/**
|
|
139
156
|
* Merge two Contacts
|
|
140
157
|
* The remaining contact will contain all conversations that the removed contact did. If both contacts had conversations within the same App, messages from the removed contact will be merged into corresponding active conversations in the destination contact. Channel identities will be moved from the source contact to the destination contact only for channels that weren\'t present there before. Moved channel identities will be placed at the bottom of the channel priority list. Optional fields from the source contact will be copied only if corresponding fields in the destination contact are empty The contact being removed cannot be referenced after this call.
|
|
141
158
|
* @param { MergeContactRequestData } data - The data to provide to the API call.
|
|
142
159
|
*/
|
|
143
160
|
async mergeContact(data) {
|
|
144
|
-
this.client = this.getSinchClient();
|
|
145
161
|
const getParams = this.client.extractQueryParams(data, []);
|
|
146
162
|
const headers = {
|
|
147
163
|
'Content-Type': 'application/json',
|
|
@@ -164,7 +180,6 @@ class ContactApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
164
180
|
* @param { UpdateContactRequestData } data - The data to provide to the API call.
|
|
165
181
|
*/
|
|
166
182
|
async update(data) {
|
|
167
|
-
this.client = this.getSinchClient();
|
|
168
183
|
const getParams = this.client.extractQueryParams(data, ['update_mask']);
|
|
169
184
|
const headers = {
|
|
170
185
|
'Content-Type': 'application/json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"contact-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/contact/contact-api.ts"],"names":[],"mappings":";;;AAAA,kDAO2B;AAe3B,wEAAmE;AA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IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,aAAa,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAEpJ,MAAM,cAAc,GAChB,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QAClG,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAU;YACtC,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,eAAe;SAC7B,CAAC,CAAC;IACL,CAAC;CAEF;AAlQD,gCAkQC"}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { ApiListPromise
|
|
1
|
+
import { ApiListPromise } from '@sinch/sdk-client';
|
|
2
2
|
import { Conversation, ConversationRecentMessage, CreateConversationRequestData, DeleteConversationRequestData, GetConversationRequestData, InjectEventRequestData, InjectEventResponse, InjectMessageRequestData, ListConversationsRequestData, ListRecentConversationsRequestData, StopActiveConversationRequestData, UpdateConversationRequestData } from '../../../models';
|
|
3
3
|
import { ConversationDomainApi } from '../conversation-domain-api';
|
|
4
|
+
import { LazyConversationApiClient } from '../conversation-service';
|
|
4
5
|
export declare class ConversationApi extends ConversationDomainApi {
|
|
5
|
-
|
|
6
|
-
* Initialize your interface
|
|
7
|
-
*
|
|
8
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
9
|
-
*/
|
|
10
|
-
constructor(sinchClientParameters: SinchClientParameters);
|
|
6
|
+
constructor(lazyApiClient: LazyConversationApiClient);
|
|
11
7
|
/**
|
|
12
8
|
* Create a conversation
|
|
13
9
|
* Creates a new empty conversation. It is generally not needed to create a conversation explicitly since sending or receiving a message automatically creates a new conversation if it does not already exist between the given app and contact. Creating empty conversation is useful if the metadata of the conversation should be populated when the first message in the conversation is a contact message or the first message in the conversation comes out-of-band and needs to be injected with InjectMessage endpoint.
|
|
@@ -34,7 +30,7 @@ export declare class ConversationApi extends ConversationDomainApi {
|
|
|
34
30
|
injectEvent(data: InjectEventRequestData): Promise<InjectEventResponse>;
|
|
35
31
|
/**
|
|
36
32
|
* Inject a message
|
|
37
|
-
* This operation injects a conversation message
|
|
33
|
+
* This operation injects a conversation message into a specific conversation.
|
|
38
34
|
* @param { InjectMessageRequestData } data - The data to provide to the API call.
|
|
39
35
|
*/
|
|
40
36
|
injectMessage(data: InjectMessageRequestData): Promise<any>;
|
|
@@ -44,7 +40,7 @@ export declare class ConversationApi extends ConversationDomainApi {
|
|
|
44
40
|
* @param { ListConversationsRequestData } data - The data to provide to the API call.
|
|
45
41
|
* @return {ApiListPromise<Conversation>}
|
|
46
42
|
*/
|
|
47
|
-
list(data
|
|
43
|
+
list(data?: ListConversationsRequestData): ApiListPromise<Conversation>;
|
|
48
44
|
/**
|
|
49
45
|
* List recent conversations
|
|
50
46
|
* This operation lists conversations and their most recent message, ordered by when the most recent message was sent for that conversation.
|
|
@@ -4,13 +4,8 @@ exports.ConversationApi = void 0;
|
|
|
4
4
|
const sdk_client_1 = require("@sinch/sdk-client");
|
|
5
5
|
const conversation_domain_api_1 = require("../conversation-domain-api");
|
|
6
6
|
class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
* @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
|
|
11
|
-
*/
|
|
12
|
-
constructor(sinchClientParameters) {
|
|
13
|
-
super(sinchClientParameters, 'ConversationApi');
|
|
7
|
+
constructor(lazyApiClient) {
|
|
8
|
+
super(lazyApiClient, 'ConversationApi');
|
|
14
9
|
}
|
|
15
10
|
/**
|
|
16
11
|
* Create a conversation
|
|
@@ -18,7 +13,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
18
13
|
* @param { CreateConversationRequestData } data - The data to provide to the API call.
|
|
19
14
|
*/
|
|
20
15
|
async create(data) {
|
|
21
|
-
this.client = this.getSinchClient();
|
|
22
16
|
const getParams = this.client.extractQueryParams(data, []);
|
|
23
17
|
const headers = {
|
|
24
18
|
'Content-Type': 'application/json',
|
|
@@ -41,7 +35,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
41
35
|
* @param { DeleteConversationRequestData } data - The data to provide to the API call.
|
|
42
36
|
*/
|
|
43
37
|
async delete(data) {
|
|
44
|
-
this.client = this.getSinchClient();
|
|
45
38
|
const getParams = this.client.extractQueryParams(data, []);
|
|
46
39
|
const headers = {
|
|
47
40
|
'Content-Type': 'application/json',
|
|
@@ -64,7 +57,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
64
57
|
* @param { GetConversationRequestData } data - The data to provide to the API call.
|
|
65
58
|
*/
|
|
66
59
|
async get(data) {
|
|
67
|
-
this.client = this.getSinchClient();
|
|
68
60
|
const getParams = this.client.extractQueryParams(data, []);
|
|
69
61
|
const headers = {
|
|
70
62
|
'Content-Type': 'application/json',
|
|
@@ -87,7 +79,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
87
79
|
* @param { InjectEventRequestData } data - The data to provide to the API call.
|
|
88
80
|
*/
|
|
89
81
|
async injectEvent(data) {
|
|
90
|
-
this.client = this.getSinchClient();
|
|
91
82
|
const getParams = this.client.extractQueryParams(data, []);
|
|
92
83
|
const headers = {
|
|
93
84
|
'Content-Type': 'application/json',
|
|
@@ -108,11 +99,10 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
108
99
|
}
|
|
109
100
|
/**
|
|
110
101
|
* Inject a message
|
|
111
|
-
* This operation injects a conversation message
|
|
102
|
+
* This operation injects a conversation message into a specific conversation.
|
|
112
103
|
* @param { InjectMessageRequestData } data - The data to provide to the API call.
|
|
113
104
|
*/
|
|
114
105
|
async injectMessage(data) {
|
|
115
|
-
this.client = this.getSinchClient();
|
|
116
106
|
const getParams = this.client.extractQueryParams(data, []);
|
|
117
107
|
const headers = {
|
|
118
108
|
'Content-Type': 'application/json',
|
|
@@ -136,8 +126,7 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
136
126
|
* @return {ApiListPromise<Conversation>}
|
|
137
127
|
*/
|
|
138
128
|
list(data) {
|
|
139
|
-
|
|
140
|
-
const getParams = this.client.extractQueryParams(data, [
|
|
129
|
+
const getParams = this.client.extractQueryParams(data ?? {}, [
|
|
141
130
|
'app_id',
|
|
142
131
|
'contact_id',
|
|
143
132
|
'only_active',
|
|
@@ -171,7 +160,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
171
160
|
* @return {ApiListPromise<ConversationRecentMessage>}
|
|
172
161
|
*/
|
|
173
162
|
listRecent(data) {
|
|
174
|
-
this.client = this.getSinchClient();
|
|
175
163
|
const getParams = this.client.extractQueryParams(data, [
|
|
176
164
|
'app_id',
|
|
177
165
|
'only_active',
|
|
@@ -206,7 +194,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
206
194
|
* @param { StopActiveConversationRequestData } data - The data to provide to the API call.
|
|
207
195
|
*/
|
|
208
196
|
async stopActive(data) {
|
|
209
|
-
this.client = this.getSinchClient();
|
|
210
197
|
const getParams = this.client.extractQueryParams(data, []);
|
|
211
198
|
const headers = {
|
|
212
199
|
'Content-Type': 'application/json',
|
|
@@ -229,7 +216,6 @@ class ConversationApi extends conversation_domain_api_1.ConversationDomainApi {
|
|
|
229
216
|
* @param { UpdateConversationRequestData } data - The data to provide to the API call.
|
|
230
217
|
*/
|
|
231
218
|
async update(data) {
|
|
232
|
-
this.client = this.getSinchClient();
|
|
233
219
|
data['metadata_update_strategy'] = data['metadata_update_strategy'] !== undefined
|
|
234
220
|
? data['metadata_update_strategy']
|
|
235
221
|
: 'REPLACE';
|