@keystrokehq/spoki 0.1.4 → 0.1.6
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/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/add-contact-operator.cjs +1 -0
- package/dist/actions/add-contact-operator.cjs.map +1 -1
- package/dist/actions/add-contact-operator.d.cts +3 -4
- package/dist/actions/add-contact-operator.d.cts.map +1 -1
- package/dist/actions/add-contact-operator.d.mts +3 -4
- package/dist/actions/add-contact-operator.d.mts.map +1 -1
- package/dist/actions/add-contact-operator.mjs +1 -0
- package/dist/actions/add-contact-operator.mjs.map +1 -1
- package/dist/actions/add-service-user.cjs +1 -0
- package/dist/actions/add-service-user.cjs.map +1 -1
- package/dist/actions/add-service-user.d.cts +3 -4
- package/dist/actions/add-service-user.d.cts.map +1 -1
- package/dist/actions/add-service-user.d.mts +3 -4
- package/dist/actions/add-service-user.d.mts.map +1 -1
- package/dist/actions/add-service-user.mjs +1 -0
- package/dist/actions/add-service-user.mjs.map +1 -1
- package/dist/actions/check-role-private-key.cjs +1 -0
- package/dist/actions/check-role-private-key.cjs.map +1 -1
- package/dist/actions/check-role-private-key.d.cts +3 -3
- package/dist/actions/check-role-private-key.d.cts.map +1 -1
- package/dist/actions/check-role-private-key.d.mts +3 -3
- package/dist/actions/check-role-private-key.d.mts.map +1 -1
- package/dist/actions/check-role-private-key.mjs +1 -0
- package/dist/actions/check-role-private-key.mjs.map +1 -1
- package/dist/actions/clone-template.cjs +1 -0
- package/dist/actions/clone-template.cjs.map +1 -1
- package/dist/actions/clone-template.d.cts +3 -3
- package/dist/actions/clone-template.d.cts.map +1 -1
- package/dist/actions/clone-template.d.mts +3 -3
- package/dist/actions/clone-template.d.mts.map +1 -1
- package/dist/actions/clone-template.mjs +1 -0
- package/dist/actions/clone-template.mjs.map +1 -1
- package/dist/actions/create-account-onboarding-link.cjs +1 -0
- package/dist/actions/create-account-onboarding-link.cjs.map +1 -1
- package/dist/actions/create-account-onboarding-link.d.cts +3 -3
- package/dist/actions/create-account-onboarding-link.d.cts.map +1 -1
- package/dist/actions/create-account-onboarding-link.d.mts +3 -3
- package/dist/actions/create-account-onboarding-link.d.mts.map +1 -1
- package/dist/actions/create-account-onboarding-link.mjs +1 -0
- package/dist/actions/create-account-onboarding-link.mjs.map +1 -1
- package/dist/actions/create-custom-field.cjs +1 -0
- package/dist/actions/create-custom-field.cjs.map +1 -1
- package/dist/actions/create-custom-field.d.cts +3 -6
- package/dist/actions/create-custom-field.d.cts.map +1 -1
- package/dist/actions/create-custom-field.d.mts +3 -6
- package/dist/actions/create-custom-field.d.mts.map +1 -1
- package/dist/actions/create-custom-field.mjs +1 -0
- package/dist/actions/create-custom-field.mjs.map +1 -1
- package/dist/actions/create-list.cjs +1 -0
- package/dist/actions/create-list.cjs.map +1 -1
- package/dist/actions/create-list.d.cts +3 -3
- package/dist/actions/create-list.d.cts.map +1 -1
- package/dist/actions/create-list.d.mts +3 -3
- package/dist/actions/create-list.d.mts.map +1 -1
- package/dist/actions/create-list.mjs +1 -0
- package/dist/actions/create-list.mjs.map +1 -1
- package/dist/actions/create-media.cjs +1 -0
- package/dist/actions/create-media.cjs.map +1 -1
- package/dist/actions/create-media.d.cts +3 -6
- package/dist/actions/create-media.d.cts.map +1 -1
- package/dist/actions/create-media.d.mts +3 -6
- package/dist/actions/create-media.d.mts.map +1 -1
- package/dist/actions/create-media.mjs +1 -0
- package/dist/actions/create-media.mjs.map +1 -1
- package/dist/actions/create-or-update-contact.cjs +1 -0
- package/dist/actions/create-or-update-contact.cjs.map +1 -1
- package/dist/actions/create-or-update-contact.d.cts +3 -8
- package/dist/actions/create-or-update-contact.d.cts.map +1 -1
- package/dist/actions/create-or-update-contact.d.mts +3 -8
- package/dist/actions/create-or-update-contact.d.mts.map +1 -1
- package/dist/actions/create-or-update-contact.mjs +1 -0
- package/dist/actions/create-or-update-contact.mjs.map +1 -1
- package/dist/actions/create-template.cjs +1 -0
- package/dist/actions/create-template.cjs.map +1 -1
- package/dist/actions/create-template.d.cts +3 -20
- package/dist/actions/create-template.d.cts.map +1 -1
- package/dist/actions/create-template.d.mts +3 -20
- package/dist/actions/create-template.d.mts.map +1 -1
- package/dist/actions/create-template.mjs +1 -0
- package/dist/actions/create-template.mjs.map +1 -1
- package/dist/actions/create-ticket.cjs +1 -0
- package/dist/actions/create-ticket.cjs.map +1 -1
- package/dist/actions/create-ticket.d.cts +3 -8
- package/dist/actions/create-ticket.d.cts.map +1 -1
- package/dist/actions/create-ticket.d.mts +3 -8
- package/dist/actions/create-ticket.d.mts.map +1 -1
- package/dist/actions/create-ticket.mjs +1 -0
- package/dist/actions/create-ticket.mjs.map +1 -1
- package/dist/actions/delete-contact.cjs +1 -0
- package/dist/actions/delete-contact.cjs.map +1 -1
- package/dist/actions/delete-contact.d.cts +3 -3
- package/dist/actions/delete-contact.d.cts.map +1 -1
- package/dist/actions/delete-contact.d.mts +3 -3
- package/dist/actions/delete-contact.d.mts.map +1 -1
- package/dist/actions/delete-contact.mjs +1 -0
- package/dist/actions/delete-contact.mjs.map +1 -1
- package/dist/actions/delete-custom-field.cjs +1 -0
- package/dist/actions/delete-custom-field.cjs.map +1 -1
- package/dist/actions/delete-custom-field.d.cts +3 -3
- package/dist/actions/delete-custom-field.d.cts.map +1 -1
- package/dist/actions/delete-custom-field.d.mts +3 -3
- package/dist/actions/delete-custom-field.d.mts.map +1 -1
- package/dist/actions/delete-custom-field.mjs +1 -0
- package/dist/actions/delete-custom-field.mjs.map +1 -1
- package/dist/actions/delete-list.cjs +1 -0
- package/dist/actions/delete-list.cjs.map +1 -1
- package/dist/actions/delete-list.d.cts +3 -3
- package/dist/actions/delete-list.d.cts.map +1 -1
- package/dist/actions/delete-list.d.mts +3 -3
- package/dist/actions/delete-list.d.mts.map +1 -1
- package/dist/actions/delete-list.mjs +1 -0
- package/dist/actions/delete-list.mjs.map +1 -1
- package/dist/actions/delete-media.cjs +1 -0
- package/dist/actions/delete-media.cjs.map +1 -1
- package/dist/actions/delete-media.d.cts +3 -3
- package/dist/actions/delete-media.d.cts.map +1 -1
- package/dist/actions/delete-media.d.mts +3 -3
- package/dist/actions/delete-media.d.mts.map +1 -1
- package/dist/actions/delete-media.mjs +1 -0
- package/dist/actions/delete-media.mjs.map +1 -1
- package/dist/actions/delete-role.cjs +1 -0
- package/dist/actions/delete-role.cjs.map +1 -1
- package/dist/actions/delete-role.d.cts +3 -3
- package/dist/actions/delete-role.d.cts.map +1 -1
- package/dist/actions/delete-role.d.mts +3 -3
- package/dist/actions/delete-role.d.mts.map +1 -1
- package/dist/actions/delete-role.mjs +1 -0
- package/dist/actions/delete-role.mjs.map +1 -1
- package/dist/actions/delete-template.cjs +1 -0
- package/dist/actions/delete-template.cjs.map +1 -1
- package/dist/actions/delete-template.d.cts +3 -4
- package/dist/actions/delete-template.d.cts.map +1 -1
- package/dist/actions/delete-template.d.mts +3 -4
- package/dist/actions/delete-template.d.mts.map +1 -1
- package/dist/actions/delete-template.mjs +1 -0
- package/dist/actions/delete-template.mjs.map +1 -1
- package/dist/actions/delete-ticket.cjs +1 -0
- package/dist/actions/delete-ticket.cjs.map +1 -1
- package/dist/actions/delete-ticket.d.cts +3 -3
- package/dist/actions/delete-ticket.d.cts.map +1 -1
- package/dist/actions/delete-ticket.d.mts +3 -3
- package/dist/actions/delete-ticket.d.mts.map +1 -1
- package/dist/actions/delete-ticket.mjs +1 -0
- package/dist/actions/delete-ticket.mjs.map +1 -1
- package/dist/actions/generate-role-private-key.cjs +1 -0
- package/dist/actions/generate-role-private-key.cjs.map +1 -1
- package/dist/actions/generate-role-private-key.d.cts +3 -3
- package/dist/actions/generate-role-private-key.d.cts.map +1 -1
- package/dist/actions/generate-role-private-key.d.mts +3 -3
- package/dist/actions/generate-role-private-key.d.mts.map +1 -1
- package/dist/actions/generate-role-private-key.mjs +1 -0
- package/dist/actions/generate-role-private-key.mjs.map +1 -1
- package/dist/actions/get-account-current-report.cjs +1 -0
- package/dist/actions/get-account-current-report.cjs.map +1 -1
- package/dist/actions/get-account-current-report.d.cts +3 -3
- package/dist/actions/get-account-current-report.d.cts.map +1 -1
- package/dist/actions/get-account-current-report.d.mts +3 -3
- package/dist/actions/get-account-current-report.d.mts.map +1 -1
- package/dist/actions/get-account-current-report.mjs +1 -0
- package/dist/actions/get-account-current-report.mjs.map +1 -1
- package/dist/actions/list-accounts.cjs +1 -0
- package/dist/actions/list-accounts.cjs.map +1 -1
- package/dist/actions/list-accounts.d.cts +3 -4
- package/dist/actions/list-accounts.d.cts.map +1 -1
- package/dist/actions/list-accounts.d.mts +3 -4
- package/dist/actions/list-accounts.d.mts.map +1 -1
- package/dist/actions/list-accounts.mjs +1 -0
- package/dist/actions/list-accounts.mjs.map +1 -1
- package/dist/actions/list-agencies.cjs +1 -0
- package/dist/actions/list-agencies.cjs.map +1 -1
- package/dist/actions/list-agencies.d.cts +3 -1
- package/dist/actions/list-agencies.d.cts.map +1 -1
- package/dist/actions/list-agencies.d.mts +3 -1
- package/dist/actions/list-agencies.d.mts.map +1 -1
- package/dist/actions/list-agencies.mjs +1 -0
- package/dist/actions/list-agencies.mjs.map +1 -1
- package/dist/actions/list-automations.cjs +1 -0
- package/dist/actions/list-automations.cjs.map +1 -1
- package/dist/actions/list-automations.d.cts +3 -5
- package/dist/actions/list-automations.d.cts.map +1 -1
- package/dist/actions/list-automations.d.mts +3 -5
- package/dist/actions/list-automations.d.mts.map +1 -1
- package/dist/actions/list-automations.mjs +1 -0
- package/dist/actions/list-automations.mjs.map +1 -1
- package/dist/actions/list-campaigns.cjs +1 -0
- package/dist/actions/list-campaigns.cjs.map +1 -1
- package/dist/actions/list-campaigns.d.cts +3 -6
- package/dist/actions/list-campaigns.d.cts.map +1 -1
- package/dist/actions/list-campaigns.d.mts +3 -6
- package/dist/actions/list-campaigns.d.mts.map +1 -1
- package/dist/actions/list-campaigns.mjs +1 -0
- package/dist/actions/list-campaigns.mjs.map +1 -1
- package/dist/actions/list-contacts.cjs +1 -0
- package/dist/actions/list-contacts.cjs.map +1 -1
- package/dist/actions/list-contacts.d.cts +3 -12
- package/dist/actions/list-contacts.d.cts.map +1 -1
- package/dist/actions/list-contacts.d.mts +3 -12
- package/dist/actions/list-contacts.d.mts.map +1 -1
- package/dist/actions/list-contacts.mjs +1 -0
- package/dist/actions/list-contacts.mjs.map +1 -1
- package/dist/actions/list-custom-fields.cjs +1 -0
- package/dist/actions/list-custom-fields.cjs.map +1 -1
- package/dist/actions/list-custom-fields.d.cts +3 -4
- package/dist/actions/list-custom-fields.d.cts.map +1 -1
- package/dist/actions/list-custom-fields.d.mts +3 -4
- package/dist/actions/list-custom-fields.d.mts.map +1 -1
- package/dist/actions/list-custom-fields.mjs +1 -0
- package/dist/actions/list-custom-fields.mjs.map +1 -1
- package/dist/actions/list-lists.cjs +1 -0
- package/dist/actions/list-lists.cjs.map +1 -1
- package/dist/actions/list-lists.d.cts +3 -5
- package/dist/actions/list-lists.d.cts.map +1 -1
- package/dist/actions/list-lists.d.mts +3 -5
- package/dist/actions/list-lists.d.mts.map +1 -1
- package/dist/actions/list-lists.mjs +1 -0
- package/dist/actions/list-lists.mjs.map +1 -1
- package/dist/actions/list-media.cjs +1 -0
- package/dist/actions/list-media.cjs.map +1 -1
- package/dist/actions/list-media.d.cts +3 -4
- package/dist/actions/list-media.d.cts.map +1 -1
- package/dist/actions/list-media.d.mts +3 -4
- package/dist/actions/list-media.d.mts.map +1 -1
- package/dist/actions/list-media.mjs +1 -0
- package/dist/actions/list-media.mjs.map +1 -1
- package/dist/actions/list-partners.cjs +1 -0
- package/dist/actions/list-partners.cjs.map +1 -1
- package/dist/actions/list-partners.d.cts +3 -1
- package/dist/actions/list-partners.d.cts.map +1 -1
- package/dist/actions/list-partners.d.mts +3 -1
- package/dist/actions/list-partners.d.mts.map +1 -1
- package/dist/actions/list-partners.mjs +1 -0
- package/dist/actions/list-partners.mjs.map +1 -1
- package/dist/actions/list-reports.cjs +1 -0
- package/dist/actions/list-reports.cjs.map +1 -1
- package/dist/actions/list-reports.d.cts +3 -7
- package/dist/actions/list-reports.d.cts.map +1 -1
- package/dist/actions/list-reports.d.mts +3 -7
- package/dist/actions/list-reports.d.mts.map +1 -1
- package/dist/actions/list-reports.mjs +1 -0
- package/dist/actions/list-reports.mjs.map +1 -1
- package/dist/actions/list-roles.cjs +1 -0
- package/dist/actions/list-roles.cjs.map +1 -1
- package/dist/actions/list-roles.d.cts +3 -1
- package/dist/actions/list-roles.d.cts.map +1 -1
- package/dist/actions/list-roles.d.mts +3 -1
- package/dist/actions/list-roles.d.mts.map +1 -1
- package/dist/actions/list-roles.mjs +1 -0
- package/dist/actions/list-roles.mjs.map +1 -1
- package/dist/actions/list-tags.cjs +1 -0
- package/dist/actions/list-tags.cjs.map +1 -1
- package/dist/actions/list-tags.d.cts +3 -1
- package/dist/actions/list-tags.d.cts.map +1 -1
- package/dist/actions/list-tags.d.mts +3 -1
- package/dist/actions/list-tags.d.mts.map +1 -1
- package/dist/actions/list-tags.mjs +1 -0
- package/dist/actions/list-tags.mjs.map +1 -1
- package/dist/actions/list-templates.cjs +1 -0
- package/dist/actions/list-templates.cjs.map +1 -1
- package/dist/actions/list-templates.d.cts +3 -3
- package/dist/actions/list-templates.d.cts.map +1 -1
- package/dist/actions/list-templates.d.mts +3 -3
- package/dist/actions/list-templates.d.mts.map +1 -1
- package/dist/actions/list-templates.mjs +1 -0
- package/dist/actions/list-templates.mjs.map +1 -1
- package/dist/actions/list-tickets.cjs +1 -0
- package/dist/actions/list-tickets.cjs.map +1 -1
- package/dist/actions/list-tickets.d.cts +3 -6
- package/dist/actions/list-tickets.d.cts.map +1 -1
- package/dist/actions/list-tickets.d.mts +3 -6
- package/dist/actions/list-tickets.d.mts.map +1 -1
- package/dist/actions/list-tickets.mjs +1 -0
- package/dist/actions/list-tickets.mjs.map +1 -1
- package/dist/actions/remove-all-list-contacts.cjs +1 -0
- package/dist/actions/remove-all-list-contacts.cjs.map +1 -1
- package/dist/actions/remove-all-list-contacts.d.cts +3 -3
- package/dist/actions/remove-all-list-contacts.d.cts.map +1 -1
- package/dist/actions/remove-all-list-contacts.d.mts +3 -3
- package/dist/actions/remove-all-list-contacts.d.mts.map +1 -1
- package/dist/actions/remove-all-list-contacts.mjs +1 -0
- package/dist/actions/remove-all-list-contacts.mjs.map +1 -1
- package/dist/actions/remove-contact-operator.cjs +1 -0
- package/dist/actions/remove-contact-operator.cjs.map +1 -1
- package/dist/actions/remove-contact-operator.d.cts +3 -4
- package/dist/actions/remove-contact-operator.d.cts.map +1 -1
- package/dist/actions/remove-contact-operator.d.mts +3 -4
- package/dist/actions/remove-contact-operator.d.mts.map +1 -1
- package/dist/actions/remove-contact-operator.mjs +1 -0
- package/dist/actions/remove-contact-operator.mjs.map +1 -1
- package/dist/actions/remove-list-contacts.cjs +1 -0
- package/dist/actions/remove-list-contacts.cjs.map +1 -1
- package/dist/actions/remove-list-contacts.d.cts +3 -4
- package/dist/actions/remove-list-contacts.d.cts.map +1 -1
- package/dist/actions/remove-list-contacts.d.mts +3 -4
- package/dist/actions/remove-list-contacts.d.mts.map +1 -1
- package/dist/actions/remove-list-contacts.mjs +1 -0
- package/dist/actions/remove-list-contacts.mjs.map +1 -1
- package/dist/actions/resend-invitation.cjs +1 -0
- package/dist/actions/resend-invitation.cjs.map +1 -1
- package/dist/actions/resend-invitation.d.cts +3 -3
- package/dist/actions/resend-invitation.d.cts.map +1 -1
- package/dist/actions/resend-invitation.d.mts +3 -3
- package/dist/actions/resend-invitation.d.mts.map +1 -1
- package/dist/actions/resend-invitation.mjs +1 -0
- package/dist/actions/resend-invitation.mjs.map +1 -1
- package/dist/actions/retrieve-account.cjs +1 -0
- package/dist/actions/retrieve-account.cjs.map +1 -1
- package/dist/actions/retrieve-account.d.cts +3 -3
- package/dist/actions/retrieve-account.d.cts.map +1 -1
- package/dist/actions/retrieve-account.d.mts +3 -3
- package/dist/actions/retrieve-account.d.mts.map +1 -1
- package/dist/actions/retrieve-account.mjs +1 -0
- package/dist/actions/retrieve-account.mjs.map +1 -1
- package/dist/actions/retrieve-automation.cjs +1 -0
- package/dist/actions/retrieve-automation.cjs.map +1 -1
- package/dist/actions/retrieve-automation.d.cts +3 -3
- package/dist/actions/retrieve-automation.d.cts.map +1 -1
- package/dist/actions/retrieve-automation.d.mts +3 -3
- package/dist/actions/retrieve-automation.d.mts.map +1 -1
- package/dist/actions/retrieve-automation.mjs +1 -0
- package/dist/actions/retrieve-automation.mjs.map +1 -1
- package/dist/actions/retrieve-contact.cjs +1 -0
- package/dist/actions/retrieve-contact.cjs.map +1 -1
- package/dist/actions/retrieve-contact.d.cts +3 -3
- package/dist/actions/retrieve-contact.d.cts.map +1 -1
- package/dist/actions/retrieve-contact.d.mts +3 -3
- package/dist/actions/retrieve-contact.d.mts.map +1 -1
- package/dist/actions/retrieve-contact.mjs +1 -0
- package/dist/actions/retrieve-contact.mjs.map +1 -1
- package/dist/actions/retrieve-custom-field.cjs +1 -0
- package/dist/actions/retrieve-custom-field.cjs.map +1 -1
- package/dist/actions/retrieve-custom-field.d.cts +3 -3
- package/dist/actions/retrieve-custom-field.d.cts.map +1 -1
- package/dist/actions/retrieve-custom-field.d.mts +3 -3
- package/dist/actions/retrieve-custom-field.d.mts.map +1 -1
- package/dist/actions/retrieve-custom-field.mjs +1 -0
- package/dist/actions/retrieve-custom-field.mjs.map +1 -1
- package/dist/actions/retrieve-list.cjs +1 -0
- package/dist/actions/retrieve-list.cjs.map +1 -1
- package/dist/actions/retrieve-list.d.cts +3 -3
- package/dist/actions/retrieve-list.d.cts.map +1 -1
- package/dist/actions/retrieve-list.d.mts +3 -3
- package/dist/actions/retrieve-list.d.mts.map +1 -1
- package/dist/actions/retrieve-list.mjs +1 -0
- package/dist/actions/retrieve-list.mjs.map +1 -1
- package/dist/actions/retrieve-media.cjs +1 -0
- package/dist/actions/retrieve-media.cjs.map +1 -1
- package/dist/actions/retrieve-media.d.cts +3 -3
- package/dist/actions/retrieve-media.d.cts.map +1 -1
- package/dist/actions/retrieve-media.d.mts +3 -3
- package/dist/actions/retrieve-media.d.mts.map +1 -1
- package/dist/actions/retrieve-media.mjs +1 -0
- package/dist/actions/retrieve-media.mjs.map +1 -1
- package/dist/actions/retrieve-role.cjs +1 -0
- package/dist/actions/retrieve-role.cjs.map +1 -1
- package/dist/actions/retrieve-role.d.cts +3 -3
- package/dist/actions/retrieve-role.d.cts.map +1 -1
- package/dist/actions/retrieve-role.d.mts +3 -3
- package/dist/actions/retrieve-role.d.mts.map +1 -1
- package/dist/actions/retrieve-role.mjs +1 -0
- package/dist/actions/retrieve-role.mjs.map +1 -1
- package/dist/actions/retrieve-tag.cjs +1 -0
- package/dist/actions/retrieve-tag.cjs.map +1 -1
- package/dist/actions/retrieve-tag.d.cts +3 -3
- package/dist/actions/retrieve-tag.d.cts.map +1 -1
- package/dist/actions/retrieve-tag.d.mts +3 -3
- package/dist/actions/retrieve-tag.d.mts.map +1 -1
- package/dist/actions/retrieve-tag.mjs +1 -0
- package/dist/actions/retrieve-tag.mjs.map +1 -1
- package/dist/actions/retrieve-template.cjs +1 -0
- package/dist/actions/retrieve-template.cjs.map +1 -1
- package/dist/actions/retrieve-template.d.cts +3 -3
- package/dist/actions/retrieve-template.d.cts.map +1 -1
- package/dist/actions/retrieve-template.d.mts +3 -3
- package/dist/actions/retrieve-template.d.mts.map +1 -1
- package/dist/actions/retrieve-template.mjs +1 -0
- package/dist/actions/retrieve-template.mjs.map +1 -1
- package/dist/actions/revert-template-to-draft.cjs +1 -0
- package/dist/actions/revert-template-to-draft.cjs.map +1 -1
- package/dist/actions/revert-template-to-draft.d.cts +3 -3
- package/dist/actions/revert-template-to-draft.d.cts.map +1 -1
- package/dist/actions/revert-template-to-draft.d.mts +3 -3
- package/dist/actions/revert-template-to-draft.d.mts.map +1 -1
- package/dist/actions/revert-template-to-draft.mjs +1 -0
- package/dist/actions/revert-template-to-draft.mjs.map +1 -1
- package/dist/actions/sync-contacts-bulk.cjs +1 -0
- package/dist/actions/sync-contacts-bulk.cjs.map +1 -1
- package/dist/actions/sync-contacts-bulk.d.cts +3 -11
- package/dist/actions/sync-contacts-bulk.d.cts.map +1 -1
- package/dist/actions/sync-contacts-bulk.d.mts +3 -11
- package/dist/actions/sync-contacts-bulk.d.mts.map +1 -1
- package/dist/actions/sync-contacts-bulk.mjs +1 -0
- package/dist/actions/sync-contacts-bulk.mjs.map +1 -1
- package/dist/actions/sync-list-contacts.cjs +1 -0
- package/dist/actions/sync-list-contacts.cjs.map +1 -1
- package/dist/actions/sync-list-contacts.d.cts +3 -12
- package/dist/actions/sync-list-contacts.d.cts.map +1 -1
- package/dist/actions/sync-list-contacts.d.mts +3 -12
- package/dist/actions/sync-list-contacts.d.mts.map +1 -1
- package/dist/actions/sync-list-contacts.mjs +1 -0
- package/dist/actions/sync-list-contacts.mjs.map +1 -1
- package/dist/actions/update-campaign.cjs +1 -0
- package/dist/actions/update-campaign.cjs.map +1 -1
- package/dist/actions/update-campaign.d.cts +3 -6
- package/dist/actions/update-campaign.d.cts.map +1 -1
- package/dist/actions/update-campaign.d.mts +3 -6
- package/dist/actions/update-campaign.d.mts.map +1 -1
- package/dist/actions/update-campaign.mjs +1 -0
- package/dist/actions/update-campaign.mjs.map +1 -1
- package/dist/actions/update-contact.cjs +1 -0
- package/dist/actions/update-contact.cjs.map +1 -1
- package/dist/actions/update-contact.d.cts +3 -9
- package/dist/actions/update-contact.d.cts.map +1 -1
- package/dist/actions/update-contact.d.mts +3 -9
- package/dist/actions/update-contact.d.mts.map +1 -1
- package/dist/actions/update-contact.mjs +1 -0
- package/dist/actions/update-contact.mjs.map +1 -1
- package/dist/actions/update-custom-field.cjs +1 -0
- package/dist/actions/update-custom-field.cjs.map +1 -1
- package/dist/actions/update-custom-field.d.cts +3 -4
- package/dist/actions/update-custom-field.d.cts.map +1 -1
- package/dist/actions/update-custom-field.d.mts +3 -4
- package/dist/actions/update-custom-field.d.mts.map +1 -1
- package/dist/actions/update-custom-field.mjs +1 -0
- package/dist/actions/update-custom-field.mjs.map +1 -1
- package/dist/actions/update-invitation-role.cjs +1 -0
- package/dist/actions/update-invitation-role.cjs.map +1 -1
- package/dist/actions/update-invitation-role.d.cts +3 -4
- package/dist/actions/update-invitation-role.d.cts.map +1 -1
- package/dist/actions/update-invitation-role.d.mts +3 -4
- package/dist/actions/update-invitation-role.d.mts.map +1 -1
- package/dist/actions/update-invitation-role.mjs +1 -0
- package/dist/actions/update-invitation-role.mjs.map +1 -1
- package/dist/actions/update-media.cjs +1 -0
- package/dist/actions/update-media.cjs.map +1 -1
- package/dist/actions/update-media.d.cts +3 -4
- package/dist/actions/update-media.d.cts.map +1 -1
- package/dist/actions/update-media.d.mts +3 -4
- package/dist/actions/update-media.d.mts.map +1 -1
- package/dist/actions/update-media.mjs +1 -0
- package/dist/actions/update-media.mjs.map +1 -1
- package/dist/actions/update-role.cjs +1 -0
- package/dist/actions/update-role.cjs.map +1 -1
- package/dist/actions/update-role.d.cts +3 -4
- package/dist/actions/update-role.d.cts.map +1 -1
- package/dist/actions/update-role.d.mts +3 -4
- package/dist/actions/update-role.d.mts.map +1 -1
- package/dist/actions/update-role.mjs +1 -0
- package/dist/actions/update-role.mjs.map +1 -1
- package/dist/actions/update-template.cjs +1 -0
- package/dist/actions/update-template.cjs.map +1 -1
- package/dist/actions/update-template.d.cts +3 -34
- package/dist/actions/update-template.d.cts.map +1 -1
- package/dist/actions/update-template.d.mts +3 -34
- package/dist/actions/update-template.d.mts.map +1 -1
- package/dist/actions/update-template.mjs +1 -0
- package/dist/actions/update-template.mjs.map +1 -1
- package/dist/app.cjs +5 -2
- package/dist/app.cjs.map +1 -1
- package/dist/app.d.cts +7 -1
- package/dist/app.d.cts.map +1 -1
- package/dist/app.d.mts +7 -1
- package/dist/app.d.mts.map +1 -1
- package/dist/app.mjs +3 -2
- package/dist/app.mjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-custom-field.mjs","names":[],"sources":["../../src/actions/create-custom-field.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SpokiCreateCustomFieldInput = z.object({\n code: z.string().describe(\"Programmatic identifier for the custom field. Must be uppercase with underscores, unique across all custom fields, and not use reserved keywords. Use this code when referencing the field in API calls.\"),\n label: z.string().describe(\"Human-readable label for the custom field. Must be uppercase, unique across all custom fields, and not use reserved keywords. This label will be visible in the Spoki UI.\"),\n example: z.string().describe(\"Example or default value for the custom field. Should match the field_type: plain text for TEXT, date format 'YYYY-MM-DD' for DATE, datetime format 'YYYY-MM-DD HH:MM:SS' for DATETIME.\"),\n field_type: z.union([z.literal(1), z.literal(2), z.literal(3)]).describe(\"Data type for the custom field. 1 = TEXT (string values), 2 = DATE (date-only values like '2024-01-15'), 3 = DATETIME (date and time values like '2024-01-15 10:30:00').\"),\n}).describe(\"Request model to create a new custom field in Spoki.\\nCustom fields allow you to store additional structured data on contacts.\");\nexport const SpokiCreateCustomFieldOutput = z.object({\n id: z.number().int().describe(\"Unique identifier assigned to the custom field by Spoki.\").nullable(),\n code: z.string().describe(\"Programmatic identifier of the custom field.\").nullable(),\n label: z.string().describe(\"Human-readable label of the custom field.\").nullable(),\n example: z.string().describe(\"Example or default value for the custom field.\").nullable(),\n is_linked: z.boolean().describe(\"Indicates whether this custom field is linked/active in the system.\").nullable(),\n field_type: z.number().int().describe(\"Data type: 1=TEXT, 2=DATE, 3=DATETIME.\").nullable(),\n}).passthrough().describe(\"Response containing details of the newly created custom field.\\nReturns HTTP 201 Created on success with the created field information.\");\n\nexport const spokiCreateCustomField = action(\"SPOKI_CREATE_CUSTOM_FIELD\", {\n slug: \"spoki-create-custom-field\",\n name: \"Create Custom Field\",\n description: \"Creates a new custom field in Spoki for storing additional contact data. Use this action when you need to define extra data points that can be stored on contacts beyond the standard fields. Custom fields are useful for tracking business-specific information like customer IDs, preferences, subscription dates, or any other structured data. The custom field will be available for use immediately after creation across contact management, automation workflows, and API operations. Ensure the label and code are unique and descriptive for easy identification and usage.\",\n input: SpokiCreateCustomFieldInput,\n output: SpokiCreateCustomFieldOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-custom-field.mjs","names":[],"sources":["../../src/actions/create-custom-field.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { spoki } from \"../app\";\n\nexport const SpokiCreateCustomFieldInput = z.object({\n code: z.string().describe(\"Programmatic identifier for the custom field. Must be uppercase with underscores, unique across all custom fields, and not use reserved keywords. Use this code when referencing the field in API calls.\"),\n label: z.string().describe(\"Human-readable label for the custom field. Must be uppercase, unique across all custom fields, and not use reserved keywords. This label will be visible in the Spoki UI.\"),\n example: z.string().describe(\"Example or default value for the custom field. Should match the field_type: plain text for TEXT, date format 'YYYY-MM-DD' for DATE, datetime format 'YYYY-MM-DD HH:MM:SS' for DATETIME.\"),\n field_type: z.union([z.literal(1), z.literal(2), z.literal(3)]).describe(\"Data type for the custom field. 1 = TEXT (string values), 2 = DATE (date-only values like '2024-01-15'), 3 = DATETIME (date and time values like '2024-01-15 10:30:00').\"),\n}).describe(\"Request model to create a new custom field in Spoki.\\nCustom fields allow you to store additional structured data on contacts.\");\nexport const SpokiCreateCustomFieldOutput = z.object({\n id: z.number().int().describe(\"Unique identifier assigned to the custom field by Spoki.\").nullable(),\n code: z.string().describe(\"Programmatic identifier of the custom field.\").nullable(),\n label: z.string().describe(\"Human-readable label of the custom field.\").nullable(),\n example: z.string().describe(\"Example or default value for the custom field.\").nullable(),\n is_linked: z.boolean().describe(\"Indicates whether this custom field is linked/active in the system.\").nullable(),\n field_type: z.number().int().describe(\"Data type: 1=TEXT, 2=DATE, 3=DATETIME.\").nullable(),\n}).passthrough().describe(\"Response containing details of the newly created custom field.\\nReturns HTTP 201 Created on success with the created field information.\");\n\nexport const spokiCreateCustomField: AppAction<\n typeof SpokiCreateCustomFieldInput,\n typeof SpokiCreateCustomFieldOutput,\n typeof spoki.credential\n> = action(\"SPOKI_CREATE_CUSTOM_FIELD\", {\n slug: \"spoki-create-custom-field\",\n name: \"Create Custom Field\",\n description: \"Creates a new custom field in Spoki for storing additional contact data. Use this action when you need to define extra data points that can be stored on contacts beyond the standard fields. Custom fields are useful for tracking business-specific information like customer IDs, preferences, subscription dates, or any other structured data. The custom field will be available for use immediately after creation across contact management, automation workflows, and API operations. Ensure the label and code are unique and descriptive for easy identification and usage.\",\n input: SpokiCreateCustomFieldInput,\n output: SpokiCreateCustomFieldOutput,\n});\n"],"mappings":";;;AAqBA,MAAa,yBAIT,OAAO,6BAA6B;CACtC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAvByC,EAAE,OAAO;EAClD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,0MAA0M;EACpO,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,2KAA2K;EACtM,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yLAAyL;EACtN,YAAY,EAAE,MAAM;GAAC,EAAE,QAAQ,CAAC;GAAG,EAAE,QAAQ,CAAC;GAAG,EAAE,QAAQ,CAAC;EAAC,CAAC,CAAC,CAAC,SAAS,0KAA0K;CACrP,CAAC,CAAC,CAAC,SAAS,gIAkBH;CACP,QAlB0C,EAAE,OAAO;EACnD,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;EACnG,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;EACnF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;EACjF,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;EACxF,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;EAChH,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CAC3F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,yIAWhB;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-list.cjs","names":["z","action"],"sources":["../../src/actions/create-list.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SpokiCreateListInput = z.object({\n name: z.string().describe(\"Name of the contact list to create. This should be a descriptive name that helps identify the purpose or contents of the list (e.g., 'Newsletter Subscribers', 'VIP Customers', 'Marketing Campaign Q1 2024').\"),\n}).describe(\"Request model for creating a new contact list in Spoki.\");\nexport const SpokiCreateListOutput = z.object({\n id: z.number().int().describe(\"Unique identifier assigned to the list by Spoki.\").nullable(),\n name: z.string().describe(\"Name of the contact list.\").nullable(),\n color: z.string().describe(\"Display color for the list, if assigned (e.g., '#16d46d').\").nullable().optional(),\n contacts_count: z.number().int().describe(\"Number of contacts in the list (0 for newly created lists).\").nullable(),\n created_datetime: z.string().describe(\"Timestamp when the list was created in ISO 8601 format.\").nullable(),\n}).passthrough().describe(\"Response containing details of the newly created contact list.\");\n\nexport const spokiCreateList = action(\"SPOKI_CREATE_LIST\", {\n slug: \"spoki-create-list\",\n name: \"Create Contact List\",\n description: \"Creates a new contact list in Spoki for organizing and managing contacts. Use this action when you need to create a new list for grouping contacts by campaigns, segments, or any other organizational criteria. Lists are essential for targeted messaging, automation workflows, and campaign management. Rate limit: 10 requests per minute.\",\n input: SpokiCreateListInput,\n output: SpokiCreateListOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-list.cjs","names":["z","action"],"sources":["../../src/actions/create-list.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { spoki } from \"../app\";\n\nexport const SpokiCreateListInput = z.object({\n name: z.string().describe(\"Name of the contact list to create. This should be a descriptive name that helps identify the purpose or contents of the list (e.g., 'Newsletter Subscribers', 'VIP Customers', 'Marketing Campaign Q1 2024').\"),\n}).describe(\"Request model for creating a new contact list in Spoki.\");\nexport const SpokiCreateListOutput = z.object({\n id: z.number().int().describe(\"Unique identifier assigned to the list by Spoki.\").nullable(),\n name: z.string().describe(\"Name of the contact list.\").nullable(),\n color: z.string().describe(\"Display color for the list, if assigned (e.g., '#16d46d').\").nullable().optional(),\n contacts_count: z.number().int().describe(\"Number of contacts in the list (0 for newly created lists).\").nullable(),\n created_datetime: z.string().describe(\"Timestamp when the list was created in ISO 8601 format.\").nullable(),\n}).passthrough().describe(\"Response containing details of the newly created contact list.\");\n\nexport const spokiCreateList: AppAction<\n typeof SpokiCreateListInput,\n typeof SpokiCreateListOutput,\n typeof spoki.credential\n> = action(\"SPOKI_CREATE_LIST\", {\n slug: \"spoki-create-list\",\n name: \"Create Contact List\",\n description: \"Creates a new contact list in Spoki for organizing and managing contacts. Use this action when you need to create a new list for grouping contacts by campaigns, segments, or any other organizational criteria. Lists are essential for targeted messaging, automation workflows, and campaign management. Rate limit: 10 requests per minute.\",\n input: SpokiCreateListInput,\n output: SpokiCreateListOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,uBAAuBA,IAAAA,EAAE,OAAO,EAC3C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gNAAgN,EAC5O,CAAC,CAAC,CAAC,SAAS,yDAAyD;AACrE,MAAa,wBAAwBA,IAAAA,EAAE,OAAO;CAC5C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC3F,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CAChE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7G,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CAClH,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;AAC5G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,gEAAgE;AAE1F,MAAa,kBAITC,eAAAA,OAAO,qBAAqB;CAC9B,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { spoki } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-list.d.ts
|
|
@@ -11,9 +13,7 @@ declare const SpokiCreateListOutput: z.ZodObject<{
|
|
|
11
13
|
contacts_count: z.ZodNullable<z.ZodNumber>;
|
|
12
14
|
created_datetime: z.ZodNullable<z.ZodString>;
|
|
13
15
|
}, z.core.$loose>;
|
|
14
|
-
declare const spokiCreateList:
|
|
15
|
-
name: string;
|
|
16
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
16
|
+
declare const spokiCreateList: AppAction<typeof SpokiCreateListInput, typeof SpokiCreateListOutput, typeof spoki.credential>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { spokiCreateList };
|
|
19
19
|
//# sourceMappingURL=create-list.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-list.d.cts","names":[],"sources":["../../src/actions/create-list.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-list.d.cts","names":[],"sources":["../../src/actions/create-list.ts"],"mappings":";;;;;cAMa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;cAGpB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;cAQrB,eAAA,EAAiB,SAAA,QACrB,oBAAA,SACA,qBAAA,SACA,KAAA,CAAM,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { spoki } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-list.d.ts
|
|
@@ -11,9 +13,7 @@ declare const SpokiCreateListOutput: z.ZodObject<{
|
|
|
11
13
|
contacts_count: z.ZodNullable<z.ZodNumber>;
|
|
12
14
|
created_datetime: z.ZodNullable<z.ZodString>;
|
|
13
15
|
}, z.core.$loose>;
|
|
14
|
-
declare const spokiCreateList:
|
|
15
|
-
name: string;
|
|
16
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
16
|
+
declare const spokiCreateList: AppAction<typeof SpokiCreateListInput, typeof SpokiCreateListOutput, typeof spoki.credential>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { spokiCreateList };
|
|
19
19
|
//# sourceMappingURL=create-list.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-list.d.mts","names":[],"sources":["../../src/actions/create-list.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-list.d.mts","names":[],"sources":["../../src/actions/create-list.ts"],"mappings":";;;;;cAMa,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;cAGpB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;cAQrB,eAAA,EAAiB,SAAA,QACrB,oBAAA,SACA,qBAAA,SACA,KAAA,CAAM,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-list.mjs","names":[],"sources":["../../src/actions/create-list.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SpokiCreateListInput = z.object({\n name: z.string().describe(\"Name of the contact list to create. This should be a descriptive name that helps identify the purpose or contents of the list (e.g., 'Newsletter Subscribers', 'VIP Customers', 'Marketing Campaign Q1 2024').\"),\n}).describe(\"Request model for creating a new contact list in Spoki.\");\nexport const SpokiCreateListOutput = z.object({\n id: z.number().int().describe(\"Unique identifier assigned to the list by Spoki.\").nullable(),\n name: z.string().describe(\"Name of the contact list.\").nullable(),\n color: z.string().describe(\"Display color for the list, if assigned (e.g., '#16d46d').\").nullable().optional(),\n contacts_count: z.number().int().describe(\"Number of contacts in the list (0 for newly created lists).\").nullable(),\n created_datetime: z.string().describe(\"Timestamp when the list was created in ISO 8601 format.\").nullable(),\n}).passthrough().describe(\"Response containing details of the newly created contact list.\");\n\nexport const spokiCreateList = action(\"SPOKI_CREATE_LIST\", {\n slug: \"spoki-create-list\",\n name: \"Create Contact List\",\n description: \"Creates a new contact list in Spoki for organizing and managing contacts. Use this action when you need to create a new list for grouping contacts by campaigns, segments, or any other organizational criteria. Lists are essential for targeted messaging, automation workflows, and campaign management. Rate limit: 10 requests per minute.\",\n input: SpokiCreateListInput,\n output: SpokiCreateListOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-list.mjs","names":[],"sources":["../../src/actions/create-list.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { spoki } from \"../app\";\n\nexport const SpokiCreateListInput = z.object({\n name: z.string().describe(\"Name of the contact list to create. This should be a descriptive name that helps identify the purpose or contents of the list (e.g., 'Newsletter Subscribers', 'VIP Customers', 'Marketing Campaign Q1 2024').\"),\n}).describe(\"Request model for creating a new contact list in Spoki.\");\nexport const SpokiCreateListOutput = z.object({\n id: z.number().int().describe(\"Unique identifier assigned to the list by Spoki.\").nullable(),\n name: z.string().describe(\"Name of the contact list.\").nullable(),\n color: z.string().describe(\"Display color for the list, if assigned (e.g., '#16d46d').\").nullable().optional(),\n contacts_count: z.number().int().describe(\"Number of contacts in the list (0 for newly created lists).\").nullable(),\n created_datetime: z.string().describe(\"Timestamp when the list was created in ISO 8601 format.\").nullable(),\n}).passthrough().describe(\"Response containing details of the newly created contact list.\");\n\nexport const spokiCreateList: AppAction<\n typeof SpokiCreateListInput,\n typeof SpokiCreateListOutput,\n typeof spoki.credential\n> = action(\"SPOKI_CREATE_LIST\", {\n slug: \"spoki-create-list\",\n name: \"Create Contact List\",\n description: \"Creates a new contact list in Spoki for organizing and managing contacts. Use this action when you need to create a new list for grouping contacts by campaigns, segments, or any other organizational criteria. Lists are essential for targeted messaging, automation workflows, and campaign management. Rate limit: 10 requests per minute.\",\n input: SpokiCreateListInput,\n output: SpokiCreateListOutput,\n});\n"],"mappings":";;;AAiBA,MAAa,kBAIT,OAAO,qBAAqB;CAC9B,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAnBkC,EAAE,OAAO,EAC3C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,gNAAgN,EAC5O,CAAC,CAAC,CAAC,SAAS,yDAiBH;CACP,QAjBmC,EAAE,OAAO;EAC5C,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;EAC3F,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;EAChE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7G,gBAAgB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;EAClH,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;CAC5G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,gEAWhB;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-media.cjs","names":["z","action"],"sources":["../../src/actions/create-media.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SpokiCreateMediaInput = z.object({\n title: z.string().describe(\"Title or name of the media file. This will be used to identify the media in the Spoki interface\"),\n format_type: z.string().describe(\"Format type of the media file. Common values include 'image', 'video', 'audio', or 'document'\"),\n content_type: z.string().describe(\"MIME type of the media file. Must match the actual file type (e.g., 'image/jpeg', 'image/png', 'video/mp4', 'application/pdf')\"),\n external_url: z.string().describe(\"External URL where the media file is hosted. Must be a valid, publicly accessible URL (e.g., 'https://example.com/image.jpg')\"),\n}).describe(\"Request parameters for creating a new media file entry in Spoki.\");\nexport const SpokiCreateMediaOutput = z.object({\n id: z.number().int().describe(\"Unique identifier assigned to the media file by Spoki\").nullable().optional(),\n title: z.string().describe(\"Title of the media file\").nullable().optional(),\n format_type: z.string().describe(\"Format type of the media file\").nullable().optional(),\n content_type: z.string().describe(\"MIME type of the media file\").nullable().optional(),\n external_url: z.string().describe(\"External URL of the media file\").nullable().optional(),\n}).passthrough().describe(\"Response containing details of the newly created media entry.\");\n\nexport const spokiCreateMedia = action(\"SPOKI_CREATE_MEDIA\", {\n slug: \"spoki-create-media\",\n name: \"Create Media File\",\n description: \"Tool to create a new media file entry in Spoki. Use when you need to register external media files (images, videos, documents) that can be used in campaigns, messages, or other Spoki features. Rate limit: 120 requests per minute.\",\n input: SpokiCreateMediaInput,\n output: SpokiCreateMediaOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-media.cjs","names":["z","action"],"sources":["../../src/actions/create-media.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { spoki } from \"../app\";\n\nexport const SpokiCreateMediaInput = z.object({\n title: z.string().describe(\"Title or name of the media file. This will be used to identify the media in the Spoki interface\"),\n format_type: z.string().describe(\"Format type of the media file. Common values include 'image', 'video', 'audio', or 'document'\"),\n content_type: z.string().describe(\"MIME type of the media file. Must match the actual file type (e.g., 'image/jpeg', 'image/png', 'video/mp4', 'application/pdf')\"),\n external_url: z.string().describe(\"External URL where the media file is hosted. Must be a valid, publicly accessible URL (e.g., 'https://example.com/image.jpg')\"),\n}).describe(\"Request parameters for creating a new media file entry in Spoki.\");\nexport const SpokiCreateMediaOutput = z.object({\n id: z.number().int().describe(\"Unique identifier assigned to the media file by Spoki\").nullable().optional(),\n title: z.string().describe(\"Title of the media file\").nullable().optional(),\n format_type: z.string().describe(\"Format type of the media file\").nullable().optional(),\n content_type: z.string().describe(\"MIME type of the media file\").nullable().optional(),\n external_url: z.string().describe(\"External URL of the media file\").nullable().optional(),\n}).passthrough().describe(\"Response containing details of the newly created media entry.\");\n\nexport const spokiCreateMedia: AppAction<\n typeof SpokiCreateMediaInput,\n typeof SpokiCreateMediaOutput,\n typeof spoki.credential\n> = action(\"SPOKI_CREATE_MEDIA\", {\n slug: \"spoki-create-media\",\n name: \"Create Media File\",\n description: \"Tool to create a new media file entry in Spoki. Use when you need to register external media files (images, videos, documents) that can be used in campaigns, messages, or other Spoki features. Rate limit: 120 requests per minute.\",\n input: SpokiCreateMediaInput,\n output: SpokiCreateMediaOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,wBAAwBA,IAAAA,EAAE,OAAO;CAC5C,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iGAAiG;CAC5H,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+FAA+F;CAChI,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gIAAgI;CAClK,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+HAA+H;AACnK,CAAC,CAAC,CAAC,SAAS,kEAAkE;AAC9E,MAAa,yBAAyBA,IAAAA,EAAE,OAAO;CAC7C,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3G,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtF,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrF,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC1F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+DAA+D;AAEzF,MAAa,mBAITC,eAAAA,OAAO,sBAAsB;CAC/B,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { spoki } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-media.d.ts
|
|
@@ -14,12 +16,7 @@ declare const SpokiCreateMediaOutput: z.ZodObject<{
|
|
|
14
16
|
content_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
17
|
external_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
18
|
}, z.core.$loose>;
|
|
17
|
-
declare const spokiCreateMedia:
|
|
18
|
-
title: string;
|
|
19
|
-
format_type: string;
|
|
20
|
-
content_type: string;
|
|
21
|
-
external_url: string;
|
|
22
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
19
|
+
declare const spokiCreateMedia: AppAction<typeof SpokiCreateMediaInput, typeof SpokiCreateMediaOutput, typeof spoki.credential>;
|
|
23
20
|
//#endregion
|
|
24
21
|
export { spokiCreateMedia };
|
|
25
22
|
//# sourceMappingURL=create-media.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-media.d.cts","names":[],"sources":["../../src/actions/create-media.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-media.d.cts","names":[],"sources":["../../src/actions/create-media.ts"],"mappings":";;;;;cAMa,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;cAMrB,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;cAQtB,gBAAA,EAAkB,SAAA,QACtB,qBAAA,SACA,sBAAA,SACA,KAAA,CAAM,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { spoki } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-media.d.ts
|
|
@@ -14,12 +16,7 @@ declare const SpokiCreateMediaOutput: z.ZodObject<{
|
|
|
14
16
|
content_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
17
|
external_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
18
|
}, z.core.$loose>;
|
|
17
|
-
declare const spokiCreateMedia:
|
|
18
|
-
title: string;
|
|
19
|
-
format_type: string;
|
|
20
|
-
content_type: string;
|
|
21
|
-
external_url: string;
|
|
22
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
19
|
+
declare const spokiCreateMedia: AppAction<typeof SpokiCreateMediaInput, typeof SpokiCreateMediaOutput, typeof spoki.credential>;
|
|
23
20
|
//#endregion
|
|
24
21
|
export { spokiCreateMedia };
|
|
25
22
|
//# sourceMappingURL=create-media.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-media.d.mts","names":[],"sources":["../../src/actions/create-media.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-media.d.mts","names":[],"sources":["../../src/actions/create-media.ts"],"mappings":";;;;;cAMa,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;cAMrB,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;cAQtB,gBAAA,EAAkB,SAAA,QACtB,qBAAA,SACA,sBAAA,SACA,KAAA,CAAM,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-media.mjs","names":[],"sources":["../../src/actions/create-media.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SpokiCreateMediaInput = z.object({\n title: z.string().describe(\"Title or name of the media file. This will be used to identify the media in the Spoki interface\"),\n format_type: z.string().describe(\"Format type of the media file. Common values include 'image', 'video', 'audio', or 'document'\"),\n content_type: z.string().describe(\"MIME type of the media file. Must match the actual file type (e.g., 'image/jpeg', 'image/png', 'video/mp4', 'application/pdf')\"),\n external_url: z.string().describe(\"External URL where the media file is hosted. Must be a valid, publicly accessible URL (e.g., 'https://example.com/image.jpg')\"),\n}).describe(\"Request parameters for creating a new media file entry in Spoki.\");\nexport const SpokiCreateMediaOutput = z.object({\n id: z.number().int().describe(\"Unique identifier assigned to the media file by Spoki\").nullable().optional(),\n title: z.string().describe(\"Title of the media file\").nullable().optional(),\n format_type: z.string().describe(\"Format type of the media file\").nullable().optional(),\n content_type: z.string().describe(\"MIME type of the media file\").nullable().optional(),\n external_url: z.string().describe(\"External URL of the media file\").nullable().optional(),\n}).passthrough().describe(\"Response containing details of the newly created media entry.\");\n\nexport const spokiCreateMedia = action(\"SPOKI_CREATE_MEDIA\", {\n slug: \"spoki-create-media\",\n name: \"Create Media File\",\n description: \"Tool to create a new media file entry in Spoki. Use when you need to register external media files (images, videos, documents) that can be used in campaigns, messages, or other Spoki features. Rate limit: 120 requests per minute.\",\n input: SpokiCreateMediaInput,\n output: SpokiCreateMediaOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-media.mjs","names":[],"sources":["../../src/actions/create-media.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { spoki } from \"../app\";\n\nexport const SpokiCreateMediaInput = z.object({\n title: z.string().describe(\"Title or name of the media file. This will be used to identify the media in the Spoki interface\"),\n format_type: z.string().describe(\"Format type of the media file. Common values include 'image', 'video', 'audio', or 'document'\"),\n content_type: z.string().describe(\"MIME type of the media file. Must match the actual file type (e.g., 'image/jpeg', 'image/png', 'video/mp4', 'application/pdf')\"),\n external_url: z.string().describe(\"External URL where the media file is hosted. Must be a valid, publicly accessible URL (e.g., 'https://example.com/image.jpg')\"),\n}).describe(\"Request parameters for creating a new media file entry in Spoki.\");\nexport const SpokiCreateMediaOutput = z.object({\n id: z.number().int().describe(\"Unique identifier assigned to the media file by Spoki\").nullable().optional(),\n title: z.string().describe(\"Title of the media file\").nullable().optional(),\n format_type: z.string().describe(\"Format type of the media file\").nullable().optional(),\n content_type: z.string().describe(\"MIME type of the media file\").nullable().optional(),\n external_url: z.string().describe(\"External URL of the media file\").nullable().optional(),\n}).passthrough().describe(\"Response containing details of the newly created media entry.\");\n\nexport const spokiCreateMedia: AppAction<\n typeof SpokiCreateMediaInput,\n typeof SpokiCreateMediaOutput,\n typeof spoki.credential\n> = action(\"SPOKI_CREATE_MEDIA\", {\n slug: \"spoki-create-media\",\n name: \"Create Media File\",\n description: \"Tool to create a new media file entry in Spoki. Use when you need to register external media files (images, videos, documents) that can be used in campaigns, messages, or other Spoki features. Rate limit: 120 requests per minute.\",\n input: SpokiCreateMediaInput,\n output: SpokiCreateMediaOutput,\n});\n"],"mappings":";;;AAoBA,MAAa,mBAIT,OAAO,sBAAsB;CAC/B,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAtBmC,EAAE,OAAO;EAC5C,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,iGAAiG;EAC5H,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,+FAA+F;EAChI,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,gIAAgI;EAClK,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,+HAA+H;CACnK,CAAC,CAAC,CAAC,SAAS,kEAiBH;CACP,QAjBoC,EAAE,OAAO;EAC7C,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3G,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1E,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtF,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACrF,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,+DAWhB;AACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-contact.cjs","names":["z","action"],"sources":["../../src/actions/create-or-update-contact.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SpokiCreateOrUpdateContactInput = z.object({\n email: z.string().describe(\"Email address of the contact. Must be a valid email format\").optional(),\n phone: z.string().describe(\"Contact phone number in E.164 international format (must include country code with + prefix). Examples: '+393331234567' (Italy), '+14155552671' (USA), '+447700900123' (UK)\"),\n language: z.string().describe(\"ISO 639-1 two-letter language code for the contact's preferred language. Common values: 'en' (English), 'it' (Italian), 'es' (Spanish), 'de' (German), 'pt' (Portuguese), 'fr' (French). Defaults to 'en' if not specified\").optional(),\n last_name: z.string().describe(\"Last name of the contact. Supports Unicode characters and special characters like hyphens and apostrophes (e.g., 'O'Brien-Müller')\").optional(),\n first_name: z.string().describe(\"First name of the contact. Supports Unicode characters for international names (e.g., 'François', 'María', 'João')\").optional(),\n custom_fields: z.record(z.string(), z.unknown()).describe(\"Dictionary of custom field names and their values. Use this to store additional contact information beyond standard fields (e.g., {'company': 'Acme Corp', 'employee_id': 'EMP-12345'})\").optional(),\n});\nexport const SpokiCreateOrUpdateContactOutput = z.object({\n id: z.number().int().describe(\"Unique ID of the contact\").nullable(),\n email: z.string().describe(\"Email address of the contact\").nullable().optional(),\n phone: z.string().describe(\"Contact phone number in E.164 format\").nullable(),\n language: z.string().describe(\"Language code of the contact (e.g., 'en', 'it', 'es')\").nullable(),\n role_set: z.array(z.string()).describe(\"List of roles assigned to the contact\").nullable().optional(),\n chat_link: z.string().describe(\"Direct link to chat with this contact on Spoki platform\").nullable(),\n last_name: z.string().describe(\"Last name of the contact\").nullable().optional(),\n first_name: z.string().describe(\"First name of the contact\").nullable().optional(),\n is_blocked: z.boolean().describe(\"Whether the contact is blocked\").nullable(),\n is_restricted: z.boolean().describe(\"Whether the contact is restricted\").nullable(),\n has_invalid_phone: z.boolean().describe(\"Whether the phone number is invalid\").nullable(),\n is_first_message_sent: z.boolean().describe(\"Whether the first message has been sent to this contact\").nullable(),\n}).passthrough();\n\nexport const spokiCreateOrUpdateContact = action(\"SPOKI_CREATE_OR_UPDATE_CONTACT\", {\n slug: \"spoki-create-or-update-contact\",\n name: \"Create or Update Contact\",\n description: \"Creates a new contact or updates an existing contact in Spoki using the phone number as the unique identifier. This action performs an \\\"upsert\\\" operation: - If a contact with the provided phone number exists, it will be updated with the new information - If no contact exists with that phone number, a new contact will be created Use this when you need to: - Add new contacts to your Spoki account - Update existing contact information (name, email, language, custom fields) - Ensure contact records are synchronized with external systems The phone number must be in E.164 format (international format with country code).\",\n input: SpokiCreateOrUpdateContactInput,\n output: SpokiCreateOrUpdateContactOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-or-update-contact.cjs","names":["z","action"],"sources":["../../src/actions/create-or-update-contact.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { spoki } from \"../app\";\n\nexport const SpokiCreateOrUpdateContactInput = z.object({\n email: z.string().describe(\"Email address of the contact. Must be a valid email format\").optional(),\n phone: z.string().describe(\"Contact phone number in E.164 international format (must include country code with + prefix). Examples: '+393331234567' (Italy), '+14155552671' (USA), '+447700900123' (UK)\"),\n language: z.string().describe(\"ISO 639-1 two-letter language code for the contact's preferred language. Common values: 'en' (English), 'it' (Italian), 'es' (Spanish), 'de' (German), 'pt' (Portuguese), 'fr' (French). Defaults to 'en' if not specified\").optional(),\n last_name: z.string().describe(\"Last name of the contact. Supports Unicode characters and special characters like hyphens and apostrophes (e.g., 'O'Brien-Müller')\").optional(),\n first_name: z.string().describe(\"First name of the contact. Supports Unicode characters for international names (e.g., 'François', 'María', 'João')\").optional(),\n custom_fields: z.record(z.string(), z.unknown()).describe(\"Dictionary of custom field names and their values. Use this to store additional contact information beyond standard fields (e.g., {'company': 'Acme Corp', 'employee_id': 'EMP-12345'})\").optional(),\n});\nexport const SpokiCreateOrUpdateContactOutput = z.object({\n id: z.number().int().describe(\"Unique ID of the contact\").nullable(),\n email: z.string().describe(\"Email address of the contact\").nullable().optional(),\n phone: z.string().describe(\"Contact phone number in E.164 format\").nullable(),\n language: z.string().describe(\"Language code of the contact (e.g., 'en', 'it', 'es')\").nullable(),\n role_set: z.array(z.string()).describe(\"List of roles assigned to the contact\").nullable().optional(),\n chat_link: z.string().describe(\"Direct link to chat with this contact on Spoki platform\").nullable(),\n last_name: z.string().describe(\"Last name of the contact\").nullable().optional(),\n first_name: z.string().describe(\"First name of the contact\").nullable().optional(),\n is_blocked: z.boolean().describe(\"Whether the contact is blocked\").nullable(),\n is_restricted: z.boolean().describe(\"Whether the contact is restricted\").nullable(),\n has_invalid_phone: z.boolean().describe(\"Whether the phone number is invalid\").nullable(),\n is_first_message_sent: z.boolean().describe(\"Whether the first message has been sent to this contact\").nullable(),\n}).passthrough();\n\nexport const spokiCreateOrUpdateContact: AppAction<\n typeof SpokiCreateOrUpdateContactInput,\n typeof SpokiCreateOrUpdateContactOutput,\n typeof spoki.credential\n> = action(\"SPOKI_CREATE_OR_UPDATE_CONTACT\", {\n slug: \"spoki-create-or-update-contact\",\n name: \"Create or Update Contact\",\n description: \"Creates a new contact or updates an existing contact in Spoki using the phone number as the unique identifier. This action performs an \\\"upsert\\\" operation: - If a contact with the provided phone number exists, it will be updated with the new information - If no contact exists with that phone number, a new contact will be created Use this when you need to: - Add new contacts to your Spoki account - Update existing contact information (name, email, language, custom fields) - Ensure contact records are synchronized with external systems The phone number must be in E.164 format (international format with country code).\",\n input: SpokiCreateOrUpdateContactInput,\n output: SpokiCreateOrUpdateContactOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,kCAAkCA,IAAAA,EAAE,OAAO;CACtD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;CAClG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6KAA6K;CACxM,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4NAA4N,CAAC,CAAC,SAAS;CACrQ,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS;CAC9K,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oHAAoH,CAAC,CAAC,SAAS;CAC/J,eAAeA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,yLAAyL,CAAC,CAAC,SAAS;AAChQ,CAAC;AACD,MAAa,mCAAmCA,IAAAA,EAAE,OAAO;CACvD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CACnE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/E,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CAC5E,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CAChG,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpG,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;CACnG,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/E,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjF,YAAYA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;CAC5E,eAAeA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CAClF,mBAAmBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;CACxF,uBAAuBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;AAClH,CAAC,CAAC,CAAC,YAAY;AAEf,MAAa,6BAITC,eAAAA,OAAO,kCAAkC;CAC3C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { spoki } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-or-update-contact.d.ts
|
|
@@ -23,14 +25,7 @@ declare const SpokiCreateOrUpdateContactOutput: z.ZodObject<{
|
|
|
23
25
|
has_invalid_phone: z.ZodNullable<z.ZodBoolean>;
|
|
24
26
|
is_first_message_sent: z.ZodNullable<z.ZodBoolean>;
|
|
25
27
|
}, z.core.$loose>;
|
|
26
|
-
declare const spokiCreateOrUpdateContact:
|
|
27
|
-
phone: string;
|
|
28
|
-
email?: string | undefined;
|
|
29
|
-
language?: string | undefined;
|
|
30
|
-
last_name?: string | undefined;
|
|
31
|
-
first_name?: string | undefined;
|
|
32
|
-
custom_fields?: Record<string, unknown> | undefined;
|
|
33
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
28
|
+
declare const spokiCreateOrUpdateContact: AppAction<typeof SpokiCreateOrUpdateContactInput, typeof SpokiCreateOrUpdateContactOutput, typeof spoki.credential>;
|
|
34
29
|
//#endregion
|
|
35
30
|
export { spokiCreateOrUpdateContact };
|
|
36
31
|
//# sourceMappingURL=create-or-update-contact.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-contact.d.cts","names":[],"sources":["../../src/actions/create-or-update-contact.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-or-update-contact.d.cts","names":[],"sources":["../../src/actions/create-or-update-contact.ts"],"mappings":";;;;;cAMa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;cAQ/B,gCAAA,EAAgC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAehC,0BAAA,EAA4B,SAAA,QAChC,+BAAA,SACA,gCAAA,SACA,KAAA,CAAM,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { spoki } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-or-update-contact.d.ts
|
|
@@ -23,14 +25,7 @@ declare const SpokiCreateOrUpdateContactOutput: z.ZodObject<{
|
|
|
23
25
|
has_invalid_phone: z.ZodNullable<z.ZodBoolean>;
|
|
24
26
|
is_first_message_sent: z.ZodNullable<z.ZodBoolean>;
|
|
25
27
|
}, z.core.$loose>;
|
|
26
|
-
declare const spokiCreateOrUpdateContact:
|
|
27
|
-
phone: string;
|
|
28
|
-
email?: string | undefined;
|
|
29
|
-
language?: string | undefined;
|
|
30
|
-
last_name?: string | undefined;
|
|
31
|
-
first_name?: string | undefined;
|
|
32
|
-
custom_fields?: Record<string, unknown> | undefined;
|
|
33
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
28
|
+
declare const spokiCreateOrUpdateContact: AppAction<typeof SpokiCreateOrUpdateContactInput, typeof SpokiCreateOrUpdateContactOutput, typeof spoki.credential>;
|
|
34
29
|
//#endregion
|
|
35
30
|
export { spokiCreateOrUpdateContact };
|
|
36
31
|
//# sourceMappingURL=create-or-update-contact.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-contact.d.mts","names":[],"sources":["../../src/actions/create-or-update-contact.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-or-update-contact.d.mts","names":[],"sources":["../../src/actions/create-or-update-contact.ts"],"mappings":";;;;;cAMa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;cAQ/B,gCAAA,EAAgC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAehC,0BAAA,EAA4B,SAAA,QAChC,+BAAA,SACA,gCAAA,SACA,KAAA,CAAM,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-contact.mjs","names":[],"sources":["../../src/actions/create-or-update-contact.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SpokiCreateOrUpdateContactInput = z.object({\n email: z.string().describe(\"Email address of the contact. Must be a valid email format\").optional(),\n phone: z.string().describe(\"Contact phone number in E.164 international format (must include country code with + prefix). Examples: '+393331234567' (Italy), '+14155552671' (USA), '+447700900123' (UK)\"),\n language: z.string().describe(\"ISO 639-1 two-letter language code for the contact's preferred language. Common values: 'en' (English), 'it' (Italian), 'es' (Spanish), 'de' (German), 'pt' (Portuguese), 'fr' (French). Defaults to 'en' if not specified\").optional(),\n last_name: z.string().describe(\"Last name of the contact. Supports Unicode characters and special characters like hyphens and apostrophes (e.g., 'O'Brien-Müller')\").optional(),\n first_name: z.string().describe(\"First name of the contact. Supports Unicode characters for international names (e.g., 'François', 'María', 'João')\").optional(),\n custom_fields: z.record(z.string(), z.unknown()).describe(\"Dictionary of custom field names and their values. Use this to store additional contact information beyond standard fields (e.g., {'company': 'Acme Corp', 'employee_id': 'EMP-12345'})\").optional(),\n});\nexport const SpokiCreateOrUpdateContactOutput = z.object({\n id: z.number().int().describe(\"Unique ID of the contact\").nullable(),\n email: z.string().describe(\"Email address of the contact\").nullable().optional(),\n phone: z.string().describe(\"Contact phone number in E.164 format\").nullable(),\n language: z.string().describe(\"Language code of the contact (e.g., 'en', 'it', 'es')\").nullable(),\n role_set: z.array(z.string()).describe(\"List of roles assigned to the contact\").nullable().optional(),\n chat_link: z.string().describe(\"Direct link to chat with this contact on Spoki platform\").nullable(),\n last_name: z.string().describe(\"Last name of the contact\").nullable().optional(),\n first_name: z.string().describe(\"First name of the contact\").nullable().optional(),\n is_blocked: z.boolean().describe(\"Whether the contact is blocked\").nullable(),\n is_restricted: z.boolean().describe(\"Whether the contact is restricted\").nullable(),\n has_invalid_phone: z.boolean().describe(\"Whether the phone number is invalid\").nullable(),\n is_first_message_sent: z.boolean().describe(\"Whether the first message has been sent to this contact\").nullable(),\n}).passthrough();\n\nexport const spokiCreateOrUpdateContact = action(\"SPOKI_CREATE_OR_UPDATE_CONTACT\", {\n slug: \"spoki-create-or-update-contact\",\n name: \"Create or Update Contact\",\n description: \"Creates a new contact or updates an existing contact in Spoki using the phone number as the unique identifier. This action performs an \\\"upsert\\\" operation: - If a contact with the provided phone number exists, it will be updated with the new information - If no contact exists with that phone number, a new contact will be created Use this when you need to: - Add new contacts to your Spoki account - Update existing contact information (name, email, language, custom fields) - Ensure contact records are synchronized with external systems The phone number must be in E.164 format (international format with country code).\",\n input: SpokiCreateOrUpdateContactInput,\n output: SpokiCreateOrUpdateContactOutput,\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-or-update-contact.mjs","names":[],"sources":["../../src/actions/create-or-update-contact.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { spoki } from \"../app\";\n\nexport const SpokiCreateOrUpdateContactInput = z.object({\n email: z.string().describe(\"Email address of the contact. Must be a valid email format\").optional(),\n phone: z.string().describe(\"Contact phone number in E.164 international format (must include country code with + prefix). Examples: '+393331234567' (Italy), '+14155552671' (USA), '+447700900123' (UK)\"),\n language: z.string().describe(\"ISO 639-1 two-letter language code for the contact's preferred language. Common values: 'en' (English), 'it' (Italian), 'es' (Spanish), 'de' (German), 'pt' (Portuguese), 'fr' (French). Defaults to 'en' if not specified\").optional(),\n last_name: z.string().describe(\"Last name of the contact. Supports Unicode characters and special characters like hyphens and apostrophes (e.g., 'O'Brien-Müller')\").optional(),\n first_name: z.string().describe(\"First name of the contact. Supports Unicode characters for international names (e.g., 'François', 'María', 'João')\").optional(),\n custom_fields: z.record(z.string(), z.unknown()).describe(\"Dictionary of custom field names and their values. Use this to store additional contact information beyond standard fields (e.g., {'company': 'Acme Corp', 'employee_id': 'EMP-12345'})\").optional(),\n});\nexport const SpokiCreateOrUpdateContactOutput = z.object({\n id: z.number().int().describe(\"Unique ID of the contact\").nullable(),\n email: z.string().describe(\"Email address of the contact\").nullable().optional(),\n phone: z.string().describe(\"Contact phone number in E.164 format\").nullable(),\n language: z.string().describe(\"Language code of the contact (e.g., 'en', 'it', 'es')\").nullable(),\n role_set: z.array(z.string()).describe(\"List of roles assigned to the contact\").nullable().optional(),\n chat_link: z.string().describe(\"Direct link to chat with this contact on Spoki platform\").nullable(),\n last_name: z.string().describe(\"Last name of the contact\").nullable().optional(),\n first_name: z.string().describe(\"First name of the contact\").nullable().optional(),\n is_blocked: z.boolean().describe(\"Whether the contact is blocked\").nullable(),\n is_restricted: z.boolean().describe(\"Whether the contact is restricted\").nullable(),\n has_invalid_phone: z.boolean().describe(\"Whether the phone number is invalid\").nullable(),\n is_first_message_sent: z.boolean().describe(\"Whether the first message has been sent to this contact\").nullable(),\n}).passthrough();\n\nexport const spokiCreateOrUpdateContact: AppAction<\n typeof SpokiCreateOrUpdateContactInput,\n typeof SpokiCreateOrUpdateContactOutput,\n typeof spoki.credential\n> = action(\"SPOKI_CREATE_OR_UPDATE_CONTACT\", {\n slug: \"spoki-create-or-update-contact\",\n name: \"Create or Update Contact\",\n description: \"Creates a new contact or updates an existing contact in Spoki using the phone number as the unique identifier. This action performs an \\\"upsert\\\" operation: - If a contact with the provided phone number exists, it will be updated with the new information - If no contact exists with that phone number, a new contact will be created Use this when you need to: - Add new contacts to your Spoki account - Update existing contact information (name, email, language, custom fields) - Ensure contact records are synchronized with external systems The phone number must be in E.164 format (international format with country code).\",\n input: SpokiCreateOrUpdateContactInput,\n output: SpokiCreateOrUpdateContactOutput,\n});\n"],"mappings":";;;AA6BA,MAAa,6BAIT,OAAO,kCAAkC;CAC3C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA/B6C,EAAE,OAAO;EACtD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;EAClG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,6KAA6K;EACxM,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,4NAA4N,CAAC,CAAC,SAAS;EACrQ,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS;EAC9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-
{"version":3,"file":"create-template.cjs","names":["z","action"],"sources":["../../src/actions/create-template.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SpokiCreateTemplateInput = z.object({\n name: z.string().describe(\"Internal template name/identifier. Must be unique, lowercase with underscores (e.g., 'promo_summer_2024'). This is not shown to end users\"),\n category: z.enum([\"MARKETING\", \"ACCOUNT_UPDATE\", \"PAYMENT_UPDATE\", \"PERSONAL_FINANCE_UPDATE\", \"SHIPPING_UPDATE\", \"RESERVATION_UPDATE\", \"ISSUE_RESOLUTION\", \"APPOINTMENT_UPDATE\", \"TRANSPORTATION_UPDATE\", \"TICKET_UPDATE\", \"ALERT_UPDATE\", \"AUTO_REPLY\"]).describe(\"Template category: MARKETING for promotional content, or specific utility categories like ACCOUNT_UPDATE, PAYMENT_UPDATE, SHIPPING_UPDATE, APPOINTMENT_UPDATE, etc. for transactional messages\"),\n subcategory: z.string().describe(\"Optional template subcategory for additional classification\").optional(),\n templatelocalization_set: z.array(z.object({\n body: z.string().describe(\"Message body text. Can include variables using {{1}}, {{2}}, etc. for dynamic content\"),\n footer: z.string().describe(\"Optional footer text (plain text, no variables allowed)\").optional(),\n header: z.string().describe(\"Optional header text. Can include one variable {{1}} for dynamic content\").optional(),\n language: z.string().describe(\"ISO 639-1 two-letter language code (e.g., 'en', 'it', 'es', 'de', 'pt', 'fr')\"),\n templatebuttoncomponent_set: z.array(z.object({\n url: z.string().describe(\"URL for url button type (can include variables like {{1}})\").optional(),\n text: z.string().describe(\"Display text shown on the button\").optional(),\n order: z.number().int().describe(\"Order index of the button in the template (0-based)\").optional(),\n button_type: z.string().describe(\"Type of button: 'quick_reply', 'url', or 'phone_number' (lowercase)\").optional(),\n phone_number: z.string().describe(\"Phone number for phone_number button type (E.164 format)\").optional(),\n}).passthrough().describe(\"Button component for a template localization\")).describe(\"Array of button components for this localization. Required field - use empty array [] for templates without buttons\"),\n}).passthrough().describe(\"Localization for a specific language in the template\")).describe(\"Array of localizations - at least one required. Each localization defines the template content for a specific language\"),\n});\nconst SpokiCreateTemplate_TemplateComponentResponseSchema = z.object({\n text: z.string().describe(\"Text content of the component\").nullable().optional(),\n format: z.string().describe(\"Format of the component (TEXT, IMAGE, VIDEO, DOCUMENT)\").nullable().optional(),\n component_type: z.string().describe(\"Type of component (HEADER, BODY, FOOTER)\").nullable().optional(),\n}).passthrough().describe(\"Component in the template response\");\nconst SpokiCreateTemplate_TemplateButtonComponentResponseSchema = z.object({\n id: z.number().int().describe(\"Button ID\").nullable().optional(),\n url: z.string().describe(\"URL for URL buttons\").nullable().optional(),\n text: z.string().describe(\"Button display text\").nullable().optional(),\n order: z.number().int().describe(\"Button order index\").nullable().optional(),\n button_type: z.string().describe(\"Button type\").nullable().optional(),\n phone_number: z.string().describe(\"Phone number for call buttons\").nullable().optional(),\n}).passthrough().describe(\"Button component in the response\");\nconst SpokiCreateTemplate_TemplateLocalizationResponseSchema = z.object({\n id: z.number().int().describe(\"Unique ID of this localization\").nullable(),\n status: z.string().describe(\"Template status: DRAFT, APPROVED, REJECTED, PENDING\").nullable(),\n language: z.string().describe(\"Language code\").nullable(),\n rejection_reason: z.string().describe(\"Reason for rejection if status is REJECTED\").nullable().optional(),\n default_header_media: z.string().describe(\"Default header media URL or ID\").nullable().optional(),\n example_header_media: z.string().describe(\"Example header media URL or ID\").nullable().optional(),\n example_custom_fields: z.string().describe(\"Example values for custom fields/variables\").nullable().optional(),\n body_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n footer_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n header_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n templatebuttoncomponent_set: z.array(SpokiCreateTemplate_TemplateButtonComponentResponseSchema).describe(\"Array of button components\").nullable().optional(),\n templatecarouselcomponent_set: z.array(z.record(z.string(), z.unknown())).describe(\"Array of carousel components\").nullable().optional(),\n}).passthrough().describe(\"Localization in the template response\");\nexport const SpokiCreateTemplateOutput = z.object({\n id: z.number().int().describe(\"Unique identifier for the created template\").nullable(),\n name: z.string().describe(\"Template name\").nullable(),\n category: z.string().describe(\"Template category (MARKETING, UTILITY, or AUTHENTICATION)\").nullable(),\n integration: z.number().int().describe(\"Integration ID\").nullable(),\n is_approved: z.boolean().describe(\"Whether the template is approved by WhatsApp (initially false for DRAFT templates)\").nullable(),\n is_favorite: z.boolean().describe(\"Whether the template is marked as favorite\").nullable(),\n subcategory: z.string().describe(\"Template subcategory\").nullable().optional(),\n customfield_set: z.array(z.string()).describe(\"Array of custom field placeholders used in the template\").nullable().optional(),\n template_groups: z.array(z.number().int()).describe(\"Array of template group IDs this template belongs to\").nullable().optional(),\n templatelocalization_set: z.array(SpokiCreateTemplate_TemplateLocalizationResponseSchema).describe(\"Array of template localizations with language-specific content and status\"),\n}).passthrough();\n\nexport const spokiCreateTemplate = action(\"SPOKI_CREATE_TEMPLATE\", {\n slug: \"spoki-create-template\",\n name: \"Create Template\",\n description: \"Creates a new WhatsApp message template with localizations, buttons, and media headers. Use when you need to define a reusable template for marketing campaigns, transactional notifications, or authentication messages. Templates must be approved by WhatsApp before use (created in DRAFT status). Rate limit: 10 requests per minute.\",\n input: SpokiCreateTemplateInput,\n output: SpokiCreateTemplateOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAA2BA,IAAAA,EAAE,OAAO;CAC/C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2IAA2I;CACrK,UAAUA,IAAAA,EAAE,KAAK;EAAC;EAAa;EAAkB;EAAkB;EAA2B;EAAmB;EAAsB;EAAoB;EAAsB;EAAyB;EAAiB;EAAgB;CAAY,CAAC,CAAC,CAAC,SAAS,gMAAgM;CACnc,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CACzG,0BAA0BA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC3C,MAAMA,IAAAA,EAAE,OAAO,CA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AA,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7E,iBAAiBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7H,iBAAiBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChI,0BAA0BA,IAAAA,EAAE,MAAM,sDAAsD,CAAC,CAAC,SAAS,2EAA2E;AAChL,CAAC,CAAC,CAAC,YAAY;AAEf,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"create-template.cjs","names":["z","action"],"sources":["../../src/actions/create-template.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { spoki } from \"../app\";\n\nexport const SpokiCreateTemplateInput = z.object({\n name: z.string().describe(\"Internal template name/identifier. Must be unique, lowercase with underscores (e.g., 'promo_summer_2024'). This is not shown to end users\"),\n category: z.enum([\"MARKETING\", \"ACCOUNT_UPDATE\", \"PAYMENT_UPDATE\", \"PERSONAL_FINANCE_UPDATE\", \"SHIPPING_UPDATE\", \"RESERVATION_UPDATE\", \"ISSUE_RESOLUTION\", \"APPOINTMENT_UPDATE\", \"TRANSPORTATION_UPDATE\", \"TICKET_UPDATE\", \"ALERT_UPDATE\", \"AUTO_REPLY\"]).describe(\"Template category: MARKETING for promotional content, or specific utility categories like ACCOUNT_UPDATE, PAYMENT_UPDATE, SHIPPING_UPDATE, APPOINTMENT_UPDATE, etc. for transactional messages\"),\n subcategory: z.string().describe(\"Optional template subcategory for additional classification\").optional(),\n templatelocalization_set: z.array(z.object({\n body: z.string().describe(\"Message body text. Can include variables using {{1}}, {{2}}, etc. for dynamic content\"),\n footer: z.string().describe(\"Optional footer text (plain text, no variables allowed)\").optional(),\n header: z.string().describe(\"Optional header text. Can include one variable {{1}} for dynamic content\").optional(),\n language: z.string().describe(\"ISO 639-1 two-letter language code (e.g., 'en', 'it', 'es', 'de', 'pt', 'fr')\"),\n templatebuttoncomponent_set: z.array(z.object({\n url: z.string().describe(\"URL for url button type (can include variables like {{1}})\").optional(),\n text: z.string().describe(\"Display text shown on the button\").optional(),\n order: z.number().int().describe(\"Order index of the button in the template (0-based)\").optional(),\n button_type: z.string().describe(\"Type of button: 'quick_reply', 'url', or 'phone_number' (lowercase)\").optional(),\n phone_number: z.string().describe(\"Phone number for phone_number button type (E.164 format)\").optional(),\n}).passthrough().describe(\"Button component for a template localization\")).describe(\"Array of button components for this localization. Required field - use empty array [] for templates without buttons\"),\n}).passthrough().describe(\"Localization for a specific language in the template\")).describe(\"Array of localizations - at least one required. Each localization defines the template content for a specific language\"),\n});\nconst SpokiCreateTemplate_TemplateComponentResponseSchema = z.object({\n text: z.string().describe(\"Text content of the component\").nullable().optional(),\n format: z.string().describe(\"Format of the component (TEXT, IMAGE, VIDEO, DOCUMENT)\").nullable().optional(),\n component_type: z.string().describe(\"Type of component (HEADER, BODY, FOOTER)\").nullable().optional(),\n}).passthrough().describe(\"Component in the template response\");\nconst SpokiCreateTemplate_TemplateButtonComponentResponseSchema = z.object({\n id: z.number().int().describe(\"Button ID\").nullable().optional(),\n url: z.string().describe(\"URL for URL buttons\").nullable().optional(),\n text: z.string().describe(\"Button display text\").nullable().optional(),\n order: z.number().int().describe(\"Button order index\").nullable().optional(),\n button_type: z.string().describe(\"Button type\").nullable().optional(),\n phone_number: z.string().describe(\"Phone number for call buttons\").nullable().optional(),\n}).passthrough().describe(\"Button component in the response\");\nconst SpokiCreateTemplate_TemplateLocalizationResponseSchema = z.object({\n id: z.number().int().describe(\"Unique ID of this localization\").nullable(),\n status: z.string().describe(\"Template status: DRAFT, APPROVED, REJECTED, PENDING\").nullable(),\n language: z.string().describe(\"Language code\").nullable(),\n rejection_reason: z.string().describe(\"Reason for rejection if status is REJECTED\").nullable().optional(),\n default_header_media: z.string().describe(\"Default header media URL or ID\").nullable().optional(),\n example_header_media: z.string().describe(\"Example header media URL or ID\").nullable().optional(),\n example_custom_fields: z.string().describe(\"Example values for custom fields/variables\").nullable().optional(),\n body_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n footer_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n header_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n templatebuttoncomponent_set: z.array(SpokiCreateTemplate_TemplateButtonComponentResponseSchema).describe(\"Array of button components\").nullable().optional(),\n templatecarouselcomponent_set: z.array(z.record(z.string(), z.unknown())).describe(\"Array of carousel components\").nullable().optional(),\n}).passthrough().describe(\"Localization in the template response\");\nexport const SpokiCreateTemplateOutput = z.object({\n id: z.number().int().describe(\"Unique identifier for the created template\").nullable(),\n name: z.string().describe(\"Template name\").nullable(),\n category: z.string().describe(\"Template category (MARKETING, UTILITY, or AUTHENTICATION)\").nullable(),\n integration: z.number().int().describe(\"Integration ID\").nullable(),\n is_approved: z.boolean().describe(\"Whether the template is approved by WhatsApp (initially false for DRAFT templates)\").nullable(),\n is_favorite: z.boolean().describe(\"Whether the template is marked as favorite\").nullable(),\n subcategory: z.string().describe(\"Template subcategory\").nullable().optional(),\n customfield_set: z.array(z.string()).describe(\"Array of custom field placeholders used in the template\").nullable().optional(),\n template_groups: z.array(z.number().int()).describe(\"Array of template group IDs this template belongs to\").nullable().optional(),\n templatelocalization_set: z.array(SpokiCreateTemplate_TemplateLocalizationResponseSchema).describe(\"Array of template localizations with language-specific content and status\"),\n}).passthrough();\n\nexport const spokiCreateTemplate: AppAction<\n typeof SpokiCreateTemplateInput,\n typeof SpokiCreateTemplateOutput,\n typeof spoki.credential\n> = action(\"SPOKI_CREATE_TEMPLATE\", {\n slug: \"spoki-create-template\",\n name: \"Create Template\",\n description: \"Creates a new WhatsApp message template with localizations, buttons, and media headers. Use when you need to define a reusable template for marketing campaigns, transactional notifications, or authentication messages. Templates must be approved by WhatsApp before use (created in DRAFT status). Rate limit: 10 requests per minute.\",\n input: SpokiCreateTemplateInput,\n output: SpokiCreateTemplateOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,2BAA2BA,IAAAA,EAAE,OAAO;CAC/C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2IAA2I;CACrK,UAAUA,IAAAA,EAAE,KAAK;EAAC;EAAa;EAAkB;EAAkB;EAA2B;EAAmB;EAAsB;EAAoB;EAAsB;EAAyB;EAAiB;EAAgB;CAAY,CAAC,CAAC,CAAC,SAAS,gMAAgM;CACnc,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CACzG,0BAA0BA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC3C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF;EACjH,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;EAChG,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;EACjH,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+EAA+E;EAC7G,6BAA6BA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;GAC9C,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;GAChG,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;GACvE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAA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,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { spoki } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-template.d.ts
|
|
@@ -76,26 +78,7 @@ declare const SpokiCreateTemplateOutput: z.ZodObject<{
|
|
|
76
78
|
templatecarouselcomponent_set: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
77
79
|
}, z.core.$loose>>;
|
|
78
80
|
}, z.core.$loose>;
|
|
79
|
-
declare const spokiCreateTemplate:
|
|
80
|
-
name: string;
|
|
81
|
-
category: "MARKETING" | "ACCOUNT_UPDATE" | "PAYMENT_UPDATE" | "PERSONAL_FINANCE_UPDATE" | "SHIPPING_UPDATE" | "RESERVATION_UPDATE" | "ISSUE_RESOLUTION" | "APPOINTMENT_UPDATE" | "TRANSPORTATION_UPDATE" | "TICKET_UPDATE" | "ALERT_UPDATE" | "AUTO_REPLY";
|
|
82
|
-
templatelocalization_set: {
|
|
83
|
-
[x: string]: unknown;
|
|
84
|
-
body: string;
|
|
85
|
-
language: string;
|
|
86
|
-
templatebuttoncomponent_set: {
|
|
87
|
-
[x: string]: unknown;
|
|
88
|
-
url?: string | undefined;
|
|
89
|
-
text?: string | undefined;
|
|
90
|
-
order?: number | undefined;
|
|
91
|
-
button_type?: string | undefined;
|
|
92
|
-
phone_number?: string | undefined;
|
|
93
|
-
}[];
|
|
94
|
-
footer?: string | undefined;
|
|
95
|
-
header?: string | undefined;
|
|
96
|
-
}[];
|
|
97
|
-
subcategory?: string | undefined;
|
|
98
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
81
|
+
declare const spokiCreateTemplate: AppAction<typeof SpokiCreateTemplateInput, typeof SpokiCreateTemplateOutput, typeof spoki.credential>;
|
|
99
82
|
//#endregion
|
|
100
83
|
export { spokiCreateTemplate };
|
|
101
84
|
//# sourceMappingURL=create-template.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-template.d.cts","names":[],"sources":["../../src/actions/create-template.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-template.d.cts","names":[],"sources":["../../src/actions/create-template.ts"],"mappings":";;;;;cAMa,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6CxB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAazB,mBAAA,EAAqB,SAAA,QACzB,wBAAA,SACA,yBAAA,SACA,KAAA,CAAM,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { spoki } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-template.d.ts
|
|
@@ -76,26 +78,7 @@ declare const SpokiCreateTemplateOutput: z.ZodObject<{
|
|
|
76
78
|
templatecarouselcomponent_set: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
77
79
|
}, z.core.$loose>>;
|
|
78
80
|
}, z.core.$loose>;
|
|
79
|
-
declare const spokiCreateTemplate:
|
|
80
|
-
name: string;
|
|
81
|
-
category: "MARKETING" | "ACCOUNT_UPDATE" | "PAYMENT_UPDATE" | "PERSONAL_FINANCE_UPDATE" | "SHIPPING_UPDATE" | "RESERVATION_UPDATE" | "ISSUE_RESOLUTION" | "APPOINTMENT_UPDATE" | "TRANSPORTATION_UPDATE" | "TICKET_UPDATE" | "ALERT_UPDATE" | "AUTO_REPLY";
|
|
82
|
-
templatelocalization_set: {
|
|
83
|
-
[x: string]: unknown;
|
|
84
|
-
body: string;
|
|
85
|
-
language: string;
|
|
86
|
-
templatebuttoncomponent_set: {
|
|
87
|
-
[x: string]: unknown;
|
|
88
|
-
url?: string | undefined;
|
|
89
|
-
text?: string | undefined;
|
|
90
|
-
order?: number | undefined;
|
|
91
|
-
button_type?: string | undefined;
|
|
92
|
-
phone_number?: string | undefined;
|
|
93
|
-
}[];
|
|
94
|
-
footer?: string | undefined;
|
|
95
|
-
header?: string | undefined;
|
|
96
|
-
}[];
|
|
97
|
-
subcategory?: string | undefined;
|
|
98
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
81
|
+
declare const spokiCreateTemplate: AppAction<typeof SpokiCreateTemplateInput, typeof SpokiCreateTemplateOutput, typeof spoki.credential>;
|
|
99
82
|
//#endregion
|
|
100
83
|
export { spokiCreateTemplate };
|
|
101
84
|
//# sourceMappingURL=create-template.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-template.d.mts","names":[],"sources":["../../src/actions/create-template.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-template.d.mts","names":[],"sources":["../../src/actions/create-template.ts"],"mappings":";;;;;cAMa,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6CxB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAazB,mBAAA,EAAqB,SAAA,QACzB,wBAAA,SACA,yBAAA,SACA,KAAA,CAAM,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-template.mjs","names":[],"sources":["../../src/actions/create-template.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SpokiCreateTemplateInput = z.object({\n name: z.string().describe(\"Internal template name/identifier. Must be unique, lowercase with underscores (e.g., 'promo_summer_2024'). This is not shown to end users\"),\n category: z.enum([\"MARKETING\", \"ACCOUNT_UPDATE\", \"PAYMENT_UPDATE\", \"PERSONAL_FINANCE_UPDATE\", \"SHIPPING_UPDATE\", \"RESERVATION_UPDATE\", \"ISSUE_RESOLUTION\", \"APPOINTMENT_UPDATE\", \"TRANSPORTATION_UPDATE\", \"TICKET_UPDATE\", \"ALERT_UPDATE\", \"AUTO_REPLY\"]).describe(\"Template category: MARKETING for promotional content, or specific utility categories like ACCOUNT_UPDATE, PAYMENT_UPDATE, SHIPPING_UPDATE, APPOINTMENT_UPDATE, etc. for transactional messages\"),\n subcategory: z.string().describe(\"Optional template subcategory for additional classification\").optional(),\n templatelocalization_set: z.array(z.object({\n body: z.string().describe(\"Message body text. Can include variables using {{1}}, {{2}}, etc. for dynamic content\"),\n footer: z.string().describe(\"Optional footer text (plain text, no variables allowed)\").optional(),\n header: z.string().describe(\"Optional header text. Can include one variable {{1}} for dynamic content\").optional(),\n language: z.string().describe(\"ISO 639-1 two-letter language code (e.g., 'en', 'it', 'es', 'de', 'pt', 'fr')\"),\n templatebuttoncomponent_set: z.array(z.object({\n url: z.string().describe(\"URL for url button type (can include variables like {{1}})\").optional(),\n text: z.string().describe(\"Display text shown on the button\").optional(),\n order: z.number().int().describe(\"Order index of the button in the template (0-based)\").optional(),\n button_type: z.string().describe(\"Type of button: 'quick_reply', 'url', or 'phone_number' (lowercase)\").optional(),\n phone_number: z.string().describe(\"Phone number for phone_number button type (E.164 format)\").optional(),\n}).passthrough().describe(\"Button component for a template localization\")).describe(\"Array of button components for this localization. Required field - use empty array [] for templates without buttons\"),\n}).passthrough().describe(\"Localization for a specific language in the template\")).describe(\"Array of localizations - at least one required. Each localization defines the template content for a specific language\"),\n});\nconst SpokiCreateTemplate_TemplateComponentResponseSchema = z.object({\n text: z.string().describe(\"Text content of the component\").nullable().optional(),\n format: z.string().describe(\"Format of the component (TEXT, IMAGE, VIDEO, DOCUMENT)\").nullable().optional(),\n component_type: z.string().describe(\"Type of component (HEADER, BODY, FOOTER)\").nullable().optional(),\n}).passthrough().describe(\"Component in the template response\");\nconst SpokiCreateTemplate_TemplateButtonComponentResponseSchema = z.object({\n id: z.number().int().describe(\"Button ID\").nullable().optional(),\n url: z.string().describe(\"URL for URL buttons\").nullable().optional(),\n text: z.string().describe(\"Button display text\").nullable().optional(),\n order: z.number().int().describe(\"Button order index\").nullable().optional(),\n button_type: z.string().describe(\"Button type\").nullable().optional(),\n phone_number: z.string().describe(\"Phone number for call buttons\").nullable().optional(),\n}).passthrough().describe(\"Button component in the response\");\nconst SpokiCreateTemplate_TemplateLocalizationResponseSchema = z.object({\n id: z.number().int().describe(\"Unique ID of this localization\").nullable(),\n status: z.string().describe(\"Template status: DRAFT, APPROVED, REJECTED, PENDING\").nullable(),\n language: z.string().describe(\"Language code\").nullable(),\n rejection_reason: z.string().describe(\"Reason for rejection if status is REJECTED\").nullable().optional(),\n default_header_media: z.string().describe(\"Default header media URL or ID\").nullable().optional(),\n example_header_media: z.string().describe(\"Example header media URL or ID\").nullable().optional(),\n example_custom_fields: z.string().describe(\"Example values for custom fields/variables\").nullable().optional(),\n body_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n footer_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n header_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n templatebuttoncomponent_set: z.array(SpokiCreateTemplate_TemplateButtonComponentResponseSchema).describe(\"Array of button components\").nullable().optional(),\n templatecarouselcomponent_set: z.array(z.record(z.string(), z.unknown())).describe(\"Array of carousel components\").nullable().optional(),\n}).passthrough().describe(\"Localization in the template response\");\nexport const SpokiCreateTemplateOutput = z.object({\n id: z.number().int().describe(\"Unique identifier for the created template\").nullable(),\n name: z.string().describe(\"Template name\").nullable(),\n category: z.string().describe(\"Template category (MARKETING, UTILITY, or AUTHENTICATION)\").nullable(),\n integration: z.number().int().describe(\"Integration ID\").nullable(),\n is_approved: z.boolean().describe(\"Whether the template is approved by WhatsApp (initially false for DRAFT templates)\").nullable(),\n is_favorite: z.boolean().describe(\"Whether the template is marked as favorite\").nullable(),\n subcategory: z.string().describe(\"Template subcategory\").nullable().optional(),\n customfield_set: z.array(z.string()).describe(\"Array of custom field placeholders used in the template\").nullable().optional(),\n template_groups: z.array(z.number().int()).describe(\"Array of template group IDs this template belongs to\").nullable().optional(),\n templatelocalization_set: z.array(SpokiCreateTemplate_TemplateLocalizationResponseSchema).describe(\"Array of template localizations with language-specific content and status\"),\n}).passthrough();\n\nexport const spokiCreateTemplate = action(\"SPOKI_CREATE_TEMPLATE\", {\n slug: \"spoki-create-template\",\n name: \"Create Template\",\n description: \"Creates a new WhatsApp message template with localizations, buttons, and media headers. Use when you need to define a reusable template for marketing campaigns, transactional notifications, or authentication messages. Templates must be approved by WhatsApp before use (created in DRAFT status). Rate limit: 10 requests per minute.\",\n input: SpokiCreateTemplateInput,\n output: SpokiCreateTemplateOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAA2B,EAAE,OAAO;CAC/C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2IAA2I;CACrK,UAAU,EAAE,KAAK;EAAC;EAAa;EAAkB;EAAkB;EAA2B;EAAmB;EAAsB;EAAoB;EAAsB;EAAyB;EAAiB;EAAgB;CAAY,CAAC,CAAC,CAAC,SAAS,gMAAgM;CACnc,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CACzG,0BAA0B,EAAE,MAAM,EAAE,OAAO;EAC3C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF;EACjH,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;EAChG,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;EACjH,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,+EAA+E;EAC7G,6BAA6B,EAAE,MAAM,EA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GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACzI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,uCAAuC;AAcjE,MAAa,sBAAsB,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAlBuC,EAAE,OAAO;EAChD,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;EACrF,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,SAAS;EACpD,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS;EACpG,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gBAAgB,CAAC,CAAC,SAAS;EAClE,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,oFAAoF,CAAC,CAAC,SAAS;EACjI,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;EACzF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7E,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7H,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChI,0BAA0B,EAAE,MAAM,sDAAsD,CAAC,CAAC,SAAS,2EAA2E;CAChL,CAAC,CAAC,CAAC,YAOO;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"create-template.mjs","names":[],"sources":["../../src/actions/create-template.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { spoki } from \"../app\";\n\nexport const SpokiCreateTemplateInput = z.object({\n name: z.string().describe(\"Internal template name/identifier. Must be unique, lowercase with underscores (e.g., 'promo_summer_2024'). This is not shown to end users\"),\n category: z.enum([\"MARKETING\", \"ACCOUNT_UPDATE\", \"PAYMENT_UPDATE\", \"PERSONAL_FINANCE_UPDATE\", \"SHIPPING_UPDATE\", \"RESERVATION_UPDATE\", \"ISSUE_RESOLUTION\", \"APPOINTMENT_UPDATE\", \"TRANSPORTATION_UPDATE\", \"TICKET_UPDATE\", \"ALERT_UPDATE\", \"AUTO_REPLY\"]).describe(\"Template category: MARKETING for promotional content, or specific utility categories like ACCOUNT_UPDATE, PAYMENT_UPDATE, SHIPPING_UPDATE, APPOINTMENT_UPDATE, etc. for transactional messages\"),\n subcategory: z.string().describe(\"Optional template subcategory for additional classification\").optional(),\n templatelocalization_set: z.array(z.object({\n body: z.string().describe(\"Message body text. Can include variables using {{1}}, {{2}}, etc. for dynamic content\"),\n footer: z.string().describe(\"Optional footer text (plain text, no variables allowed)\").optional(),\n header: z.string().describe(\"Optional header text. Can include one variable {{1}} for dynamic content\").optional(),\n language: z.string().describe(\"ISO 639-1 two-letter language code (e.g., 'en', 'it', 'es', 'de', 'pt', 'fr')\"),\n templatebuttoncomponent_set: z.array(z.object({\n url: z.string().describe(\"URL for url button type (can include variables like {{1}})\").optional(),\n text: z.string().describe(\"Display text shown on the button\").optional(),\n order: z.number().int().describe(\"Order index of the button in the template (0-based)\").optional(),\n button_type: z.string().describe(\"Type of button: 'quick_reply', 'url', or 'phone_number' (lowercase)\").optional(),\n phone_number: z.string().describe(\"Phone number for phone_number button type (E.164 format)\").optional(),\n}).passthrough().describe(\"Button component for a template localization\")).describe(\"Array of button components for this localization. Required field - use empty array [] for templates without buttons\"),\n}).passthrough().describe(\"Localization for a specific language in the template\")).describe(\"Array of localizations - at least one required. Each localization defines the template content for a specific language\"),\n});\nconst SpokiCreateTemplate_TemplateComponentResponseSchema = z.object({\n text: z.string().describe(\"Text content of the component\").nullable().optional(),\n format: z.string().describe(\"Format of the component (TEXT, IMAGE, VIDEO, DOCUMENT)\").nullable().optional(),\n component_type: z.string().describe(\"Type of component (HEADER, BODY, FOOTER)\").nullable().optional(),\n}).passthrough().describe(\"Component in the template response\");\nconst SpokiCreateTemplate_TemplateButtonComponentResponseSchema = z.object({\n id: z.number().int().describe(\"Button ID\").nullable().optional(),\n url: z.string().describe(\"URL for URL buttons\").nullable().optional(),\n text: z.string().describe(\"Button display text\").nullable().optional(),\n order: z.number().int().describe(\"Button order index\").nullable().optional(),\n button_type: z.string().describe(\"Button type\").nullable().optional(),\n phone_number: z.string().describe(\"Phone number for call buttons\").nullable().optional(),\n}).passthrough().describe(\"Button component in the response\");\nconst SpokiCreateTemplate_TemplateLocalizationResponseSchema = z.object({\n id: z.number().int().describe(\"Unique ID of this localization\").nullable(),\n status: z.string().describe(\"Template status: DRAFT, APPROVED, REJECTED, PENDING\").nullable(),\n language: z.string().describe(\"Language code\").nullable(),\n rejection_reason: z.string().describe(\"Reason for rejection if status is REJECTED\").nullable().optional(),\n default_header_media: z.string().describe(\"Default header media URL or ID\").nullable().optional(),\n example_header_media: z.string().describe(\"Example header media URL or ID\").nullable().optional(),\n example_custom_fields: z.string().describe(\"Example values for custom fields/variables\").nullable().optional(),\n body_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n footer_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n header_template_component: SpokiCreateTemplate_TemplateComponentResponseSchema.nullable().optional(),\n templatebuttoncomponent_set: z.array(SpokiCreateTemplate_TemplateButtonComponentResponseSchema).describe(\"Array of button components\").nullable().optional(),\n templatecarouselcomponent_set: z.array(z.record(z.string(), z.unknown())).describe(\"Array of carousel components\").nullable().optional(),\n}).passthrough().describe(\"Localization in the template response\");\nexport const SpokiCreateTemplateOutput = z.object({\n id: z.number().int().describe(\"Unique identifier for the created template\").nullable(),\n name: z.string().describe(\"Template name\").nullable(),\n category: z.string().describe(\"Template category (MARKETING, UTILITY, or AUTHENTICATION)\").nullable(),\n integration: z.number().int().describe(\"Integration ID\").nullable(),\n is_approved: z.boolean().describe(\"Whether the template is approved by WhatsApp (initially false for DRAFT templates)\").nullable(),\n is_favorite: z.boolean().describe(\"Whether the template is marked as favorite\").nullable(),\n subcategory: z.string().describe(\"Template subcategory\").nullable().optional(),\n customfield_set: z.array(z.string()).describe(\"Array of custom field placeholders used in the template\").nullable().optional(),\n template_groups: z.array(z.number().int()).describe(\"Array of template group IDs this template belongs to\").nullable().optional(),\n templatelocalization_set: z.array(SpokiCreateTemplate_TemplateLocalizationResponseSchema).describe(\"Array of template localizations with language-specific content and status\"),\n}).passthrough();\n\nexport const spokiCreateTemplate: AppAction<\n typeof SpokiCreateTemplateInput,\n typeof SpokiCreateTemplateOutput,\n typeof spoki.credential\n> = action(\"SPOKI_CREATE_TEMPLATE\", {\n slug: \"spoki-create-template\",\n name: \"Create Template\",\n description: \"Creates a new WhatsApp message template with localizations, buttons, and media headers. Use when you need to define a reusable template for marketing campaigns, transactional notifications, or authentication messages. Templates must be approved by WhatsApp before use (created in DRAFT status). Rate limit: 10 requests per minute.\",\n input: SpokiCreateTemplateInput,\n output: SpokiCreateTemplateOutput,\n});\n"],"mappings":";;;;AAMA,MAAa,2BAA2B,EAAE,OAAO;CAC/C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2IAA2I;CACrK,UAAU,EAAE,KAAK;EAAC;EAAa;EAAkB;EAAkB;EAA2B;EAAmB;EAAsB;EAAoB;EAAsB;EAAyB;EAAiB;EAAgB;CAAY,CAAC,CAAC,CAAC,SAAS,gMAAgM;CACnc,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CACzG,0BAA0B,EAAE,MAAM,EAAE,OAAO;EAC3C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uFAAuF;EACjH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