magicbell-js 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/commonjs/project-client/http/errors/throwable-error.d.ts +7 -0
- package/dist/commonjs/project-client/http/errors/throwable-error.d.ts.map +1 -0
- package/dist/commonjs/project-client/http/errors/throwable-error.js +25 -0
- package/dist/commonjs/project-client/http/errors/throwable-error.js.map +1 -0
- package/dist/commonjs/project-client/http/handlers/hook-handler.d.ts.map +1 -1
- package/dist/commonjs/project-client/http/handlers/hook-handler.js +2 -2
- package/dist/commonjs/project-client/http/handlers/hook-handler.js.map +1 -1
- package/dist/commonjs/project-client/http/transport/types.d.ts +2 -1
- package/dist/commonjs/project-client/http/transport/types.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/broadcasts/broadcasts-service.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/broadcasts/broadcasts-service.js.map +1 -1
- package/dist/commonjs/project-client/services/channels/channels-service.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/channels/channels-service.js.map +1 -1
- package/dist/commonjs/project-client/services/events/events-service.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/events/events-service.js.map +1 -1
- package/dist/commonjs/project-client/services/integrations/integrations-service.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/integrations/integrations-service.js.map +1 -1
- package/dist/commonjs/project-client/services/jwt/jwt-service.d.ts +1 -25
- package/dist/commonjs/project-client/services/jwt/jwt-service.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/jwt/jwt-service.js +0 -103
- package/dist/commonjs/project-client/services/jwt/jwt-service.js.map +1 -1
- package/dist/commonjs/project-client/services/jwt/models/index.d.ts +0 -1
- package/dist/commonjs/project-client/services/jwt/models/index.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/jwt/request-params.d.ts +0 -5
- package/dist/commonjs/project-client/services/jwt/request-params.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/notifications/notifications-service.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/notifications/notifications-service.js.map +1 -1
- package/dist/commonjs/project-client/services/users/users-service.d.ts.map +1 -1
- package/dist/commonjs/project-client/services/users/users-service.js.map +1 -1
- package/dist/commonjs/user-client/http/errors/throwable-error.d.ts +7 -0
- package/dist/commonjs/user-client/http/errors/throwable-error.d.ts.map +1 -0
- package/dist/commonjs/user-client/http/errors/throwable-error.js +25 -0
- package/dist/commonjs/user-client/http/errors/throwable-error.js.map +1 -0
- package/dist/commonjs/user-client/http/handlers/hook-handler.d.ts.map +1 -1
- package/dist/commonjs/user-client/http/handlers/hook-handler.js +2 -2
- package/dist/commonjs/user-client/http/handlers/hook-handler.js.map +1 -1
- package/dist/commonjs/user-client/http/transport/types.d.ts +2 -1
- package/dist/commonjs/user-client/http/transport/types.d.ts.map +1 -1
- package/dist/commonjs/user-client/services/channels/channels-service.d.ts.map +1 -1
- package/dist/commonjs/user-client/services/channels/channels-service.js.map +1 -1
- package/dist/commonjs/user-client/services/integrations/integrations-service.d.ts.map +1 -1
- package/dist/commonjs/user-client/services/integrations/integrations-service.js.map +1 -1
- package/dist/commonjs/user-client/services/notifications/notifications-service.d.ts +26 -1
- package/dist/commonjs/user-client/services/notifications/notifications-service.d.ts.map +1 -1
- package/dist/commonjs/user-client/services/notifications/notifications-service.js +106 -0
- package/dist/commonjs/user-client/services/notifications/notifications-service.js.map +1 -1
- package/dist/commonjs/user-client/services/notifications/request-params.d.ts +9 -0
- package/dist/commonjs/user-client/services/notifications/request-params.d.ts.map +1 -1
- package/dist/esm/project-client/http/errors/throwable-error.d.ts +7 -0
- package/dist/esm/project-client/http/errors/throwable-error.d.ts.map +1 -0
- package/dist/esm/project-client/http/errors/throwable-error.js +21 -0
- package/dist/esm/project-client/http/errors/throwable-error.js.map +1 -0
- package/dist/esm/project-client/http/handlers/hook-handler.d.ts.map +1 -1
- package/dist/esm/project-client/http/handlers/hook-handler.js +2 -2
- package/dist/esm/project-client/http/handlers/hook-handler.js.map +1 -1
- package/dist/esm/project-client/http/transport/types.d.ts +2 -1
- package/dist/esm/project-client/http/transport/types.d.ts.map +1 -1
- package/dist/esm/project-client/services/broadcasts/broadcasts-service.d.ts.map +1 -1
- package/dist/esm/project-client/services/broadcasts/broadcasts-service.js.map +1 -1
- package/dist/esm/project-client/services/channels/channels-service.d.ts.map +1 -1
- package/dist/esm/project-client/services/channels/channels-service.js.map +1 -1
- package/dist/esm/project-client/services/events/events-service.d.ts.map +1 -1
- package/dist/esm/project-client/services/events/events-service.js.map +1 -1
- package/dist/esm/project-client/services/integrations/integrations-service.d.ts.map +1 -1
- package/dist/esm/project-client/services/integrations/integrations-service.js.map +1 -1
- package/dist/esm/project-client/services/jwt/jwt-service.d.ts +1 -25
- package/dist/esm/project-client/services/jwt/jwt-service.d.ts.map +1 -1
- package/dist/esm/project-client/services/jwt/jwt-service.js +0 -103
- package/dist/esm/project-client/services/jwt/jwt-service.js.map +1 -1
- package/dist/esm/project-client/services/jwt/models/index.d.ts +0 -1
- package/dist/esm/project-client/services/jwt/models/index.d.ts.map +1 -1
- package/dist/esm/project-client/services/jwt/request-params.d.ts +0 -5
- package/dist/esm/project-client/services/jwt/request-params.d.ts.map +1 -1
- package/dist/esm/project-client/services/notifications/notifications-service.d.ts.map +1 -1
- package/dist/esm/project-client/services/notifications/notifications-service.js.map +1 -1
- package/dist/esm/project-client/services/users/users-service.d.ts.map +1 -1
- package/dist/esm/project-client/services/users/users-service.js.map +1 -1
- package/dist/esm/user-client/http/errors/throwable-error.d.ts +7 -0
- package/dist/esm/user-client/http/errors/throwable-error.d.ts.map +1 -0
- package/dist/esm/user-client/http/errors/throwable-error.js +21 -0
- package/dist/esm/user-client/http/errors/throwable-error.js.map +1 -0
- package/dist/esm/user-client/http/handlers/hook-handler.d.ts.map +1 -1
- package/dist/esm/user-client/http/handlers/hook-handler.js +2 -2
- package/dist/esm/user-client/http/handlers/hook-handler.js.map +1 -1
- package/dist/esm/user-client/http/transport/types.d.ts +2 -1
- package/dist/esm/user-client/http/transport/types.d.ts.map +1 -1
- package/dist/esm/user-client/services/channels/channels-service.d.ts.map +1 -1
- package/dist/esm/user-client/services/channels/channels-service.js.map +1 -1
- package/dist/esm/user-client/services/integrations/integrations-service.d.ts.map +1 -1
- package/dist/esm/user-client/services/integrations/integrations-service.js.map +1 -1
- package/dist/esm/user-client/services/notifications/notifications-service.d.ts +26 -1
- package/dist/esm/user-client/services/notifications/notifications-service.d.ts.map +1 -1
- package/dist/esm/user-client/services/notifications/notifications-service.js +106 -0
- package/dist/esm/user-client/services/notifications/notifications-service.js.map +1 -1
- package/dist/esm/user-client/services/notifications/request-params.d.ts +9 -0
- package/dist/esm/user-client/services/notifications/request-params.d.ts.map +1 -1
- package/package.json +3 -1
- package/src/project-client/http/client.ts +71 -0
- package/src/project-client/http/environment.ts +3 -0
- package/src/project-client/http/error.ts +14 -0
- package/src/project-client/http/errors/throwable-error.ts +9 -0
- package/src/project-client/http/errors/validation-error.ts +25 -0
- package/src/project-client/http/handlers/handler-chain.ts +30 -0
- package/src/project-client/http/handlers/hook-handler.ts +80 -0
- package/src/project-client/http/handlers/request-validation-handler.ts +111 -0
- package/src/project-client/http/handlers/response-validation-handler.ts +203 -0
- package/src/project-client/http/handlers/retry-handler.ts +60 -0
- package/src/project-client/http/handlers/terminating-handler.ts +14 -0
- package/src/project-client/http/hooks/custom-hook.ts +25 -0
- package/src/project-client/http/hooks/hook.ts +41 -0
- package/src/project-client/http/index.ts +11 -0
- package/src/project-client/http/serialization/base-serializer.ts +139 -0
- package/src/project-client/http/serialization/header-serializer.ts +19 -0
- package/src/project-client/http/serialization/path-serializer.ts +12 -0
- package/src/project-client/http/serialization/query-serializer.ts +18 -0
- package/src/project-client/http/transport/request-builder.ts +242 -0
- package/src/project-client/http/transport/request-fetch-adapter.ts +131 -0
- package/src/project-client/http/transport/request.ts +222 -0
- package/src/project-client/http/transport/transport-hook-adapter.ts +91 -0
- package/src/project-client/http/transport/types.ts +51 -0
- package/src/project-client/http/types.ts +74 -0
- package/src/project-client/http/utils/content-type.ts +33 -0
- package/src/project-client/http/utils/line-decoder.ts +35 -0
- package/src/project-client/http/utils/response-matcher.ts +25 -0
- package/src/project-client/index.ts +94 -0
- package/src/project-client/services/base-service.ts +27 -0
- package/src/project-client/services/broadcasts/broadcasts-service.ts +116 -0
- package/src/project-client/services/broadcasts/index.ts +2 -0
- package/src/project-client/services/broadcasts/models/broadcast-collection.ts +54 -0
- package/src/project-client/services/broadcasts/models/broadcast-status.ts +60 -0
- package/src/project-client/services/broadcasts/models/broadcast.ts +143 -0
- package/src/project-client/services/broadcasts/models/email.ts +57 -0
- package/src/project-client/services/broadcasts/models/errors.ts +45 -0
- package/src/project-client/services/broadcasts/models/in-app.ts +57 -0
- package/src/project-client/services/broadcasts/models/index.ts +15 -0
- package/src/project-client/services/broadcasts/models/mobile-push.ts +57 -0
- package/src/project-client/services/broadcasts/models/overrides-channels.ts +82 -0
- package/src/project-client/services/broadcasts/models/overrides.ts +59 -0
- package/src/project-client/services/broadcasts/models/providers.ts +81 -0
- package/src/project-client/services/broadcasts/models/slack.ts +57 -0
- package/src/project-client/services/broadcasts/models/sms.ts +57 -0
- package/src/project-client/services/broadcasts/models/status-status.ts +7 -0
- package/src/project-client/services/broadcasts/models/summary.ts +51 -0
- package/src/project-client/services/broadcasts/models/web-push.ts +57 -0
- package/src/project-client/services/broadcasts/request-params.ts +5 -0
- package/src/project-client/services/channels/channels-service.ts +1018 -0
- package/src/project-client/services/channels/index.ts +2 -0
- package/src/project-client/services/channels/models/apns-token-collection.ts +54 -0
- package/src/project-client/services/channels/models/apns-token-installation-id.ts +6 -0
- package/src/project-client/services/channels/models/apns-token.ts +90 -0
- package/src/project-client/services/channels/models/category-delivery-config-channels.ts +57 -0
- package/src/project-client/services/channels/models/category-delivery-config.ts +73 -0
- package/src/project-client/services/channels/models/channel.ts +11 -0
- package/src/project-client/services/channels/models/discard-result.ts +51 -0
- package/src/project-client/services/channels/models/expo-token-collection.ts +54 -0
- package/src/project-client/services/channels/models/expo-token.ts +69 -0
- package/src/project-client/services/channels/models/fcm-token-collection.ts +54 -0
- package/src/project-client/services/channels/models/fcm-token-installation-id.ts +6 -0
- package/src/project-client/services/channels/models/fcm-token.ts +75 -0
- package/src/project-client/services/channels/models/inbox-token-response-collection.ts +59 -0
- package/src/project-client/services/channels/models/inbox-token-response.ts +75 -0
- package/src/project-client/services/channels/models/index.ts +24 -0
- package/src/project-client/services/channels/models/keys.ts +51 -0
- package/src/project-client/services/channels/models/oauth.ts +57 -0
- package/src/project-client/services/channels/models/slack-token-collection.ts +54 -0
- package/src/project-client/services/channels/models/slack-token-webhook.ts +45 -0
- package/src/project-client/services/channels/models/slack-token.ts +83 -0
- package/src/project-client/services/channels/models/teams-token-collection.ts +54 -0
- package/src/project-client/services/channels/models/teams-token-webhook.ts +45 -0
- package/src/project-client/services/channels/models/teams-token.ts +76 -0
- package/src/project-client/services/channels/models/web-push-token-collection.ts +54 -0
- package/src/project-client/services/channels/models/web-push-token.ts +77 -0
- package/src/project-client/services/channels/request-params.ts +45 -0
- package/src/project-client/services/common/index.ts +1 -0
- package/src/project-client/services/common/links.ts +57 -0
- package/src/project-client/services/events/events-service.ts +85 -0
- package/src/project-client/services/events/index.ts +2 -0
- package/src/project-client/services/events/models/event-collection.ts +54 -0
- package/src/project-client/services/events/models/event.ts +81 -0
- package/src/project-client/services/events/models/index.ts +2 -0
- package/src/project-client/services/events/request-params.ts +5 -0
- package/src/project-client/services/integrations/index.ts +2 -0
- package/src/project-client/services/integrations/integrations-service.ts +1966 -0
- package/src/project-client/services/integrations/models/apns-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/apns-config-payload.ts +81 -0
- package/src/project-client/services/integrations/models/apns-config.ts +64 -0
- package/src/project-client/services/integrations/models/awssns-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/awssns-config-payload.ts +45 -0
- package/src/project-client/services/integrations/models/awssns-config.ts +64 -0
- package/src/project-client/services/integrations/models/badge.ts +6 -0
- package/src/project-client/services/integrations/models/banner.ts +63 -0
- package/src/project-client/services/integrations/models/default-hover.ts +45 -0
- package/src/project-client/services/integrations/models/default-state.ts +45 -0
- package/src/project-client/services/integrations/models/default_.ts +90 -0
- package/src/project-client/services/integrations/models/dialog.ts +57 -0
- package/src/project-client/services/integrations/models/event-source-config-collection.ts +59 -0
- package/src/project-client/services/integrations/models/event-source-config-payload.ts +45 -0
- package/src/project-client/services/integrations/models/event-source-config.ts +64 -0
- package/src/project-client/services/integrations/models/expo-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/expo-config-payload.ts +45 -0
- package/src/project-client/services/integrations/models/expo-config.ts +64 -0
- package/src/project-client/services/integrations/models/fcm-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/fcm-config-payload.ts +105 -0
- package/src/project-client/services/integrations/models/fcm-config.ts +64 -0
- package/src/project-client/services/integrations/models/footer.ts +63 -0
- package/src/project-client/services/integrations/models/github-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/github-config-payload.ts +45 -0
- package/src/project-client/services/integrations/models/github-config.ts +64 -0
- package/src/project-client/services/integrations/models/header.ts +69 -0
- package/src/project-client/services/integrations/models/icon.ts +51 -0
- package/src/project-client/services/integrations/models/images.ts +45 -0
- package/src/project-client/services/integrations/models/inbox-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/inbox-config-payload.ts +60 -0
- package/src/project-client/services/integrations/models/inbox-config.ts +64 -0
- package/src/project-client/services/integrations/models/index.ts +75 -0
- package/src/project-client/services/integrations/models/integration-config-collection.ts +59 -0
- package/src/project-client/services/integrations/models/integration-config.ts +57 -0
- package/src/project-client/services/integrations/models/mailgun-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/mailgun-config-payload-from.ts +51 -0
- package/src/project-client/services/integrations/models/mailgun-config-payload.ts +70 -0
- package/src/project-client/services/integrations/models/mailgun-config.ts +64 -0
- package/src/project-client/services/integrations/models/notification.ts +61 -0
- package/src/project-client/services/integrations/models/payload-version.ts +6 -0
- package/src/project-client/services/integrations/models/ping-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/ping-config-payload.ts +45 -0
- package/src/project-client/services/integrations/models/ping-config.ts +64 -0
- package/src/project-client/services/integrations/models/region.ts +6 -0
- package/src/project-client/services/integrations/models/reply-to.ts +51 -0
- package/src/project-client/services/integrations/models/sendgrid-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/sendgrid-config-payload-from.ts +51 -0
- package/src/project-client/services/integrations/models/sendgrid-config-payload.ts +65 -0
- package/src/project-client/services/integrations/models/sendgrid-config.ts +64 -0
- package/src/project-client/services/integrations/models/ses-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/ses-config-payload-from.ts +51 -0
- package/src/project-client/services/integrations/models/ses-config-payload.ts +70 -0
- package/src/project-client/services/integrations/models/ses-config.ts +64 -0
- package/src/project-client/services/integrations/models/slack-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/slack-config-payload.ts +63 -0
- package/src/project-client/services/integrations/models/slack-config.ts +64 -0
- package/src/project-client/services/integrations/models/stripe-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/stripe-config-payload.ts +45 -0
- package/src/project-client/services/integrations/models/stripe-config.ts +64 -0
- package/src/project-client/services/integrations/models/templates-config-collection.ts +59 -0
- package/src/project-client/services/integrations/models/templates-config.ts +57 -0
- package/src/project-client/services/integrations/models/theme.ts +89 -0
- package/src/project-client/services/integrations/models/twilio-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/twilio-config-payload.ts +75 -0
- package/src/project-client/services/integrations/models/twilio-config.ts +64 -0
- package/src/project-client/services/integrations/models/type_.ts +5 -0
- package/src/project-client/services/integrations/models/unread-hover.ts +45 -0
- package/src/project-client/services/integrations/models/unread-state.ts +45 -0
- package/src/project-client/services/integrations/models/unread.ts +66 -0
- package/src/project-client/services/integrations/models/unseen-badge.ts +45 -0
- package/src/project-client/services/integrations/models/unseen-hover.ts +45 -0
- package/src/project-client/services/integrations/models/unseen-state.ts +45 -0
- package/src/project-client/services/integrations/models/unseen.ts +66 -0
- package/src/project-client/services/integrations/models/webpush-config-collection.ts +54 -0
- package/src/project-client/services/integrations/models/webpush-config-payload.ts +51 -0
- package/src/project-client/services/integrations/models/webpush-config.ts +64 -0
- package/src/project-client/services/integrations/request-params.ts +5 -0
- package/src/project-client/services/jwt/index.ts +2 -0
- package/src/project-client/services/jwt/jwt-service.ts +121 -0
- package/src/project-client/services/jwt/models/access-token-collection.ts +54 -0
- package/src/project-client/services/jwt/models/access-token.ts +69 -0
- package/src/project-client/services/jwt/models/create-project-token-request.ts +51 -0
- package/src/project-client/services/jwt/models/create-token-response.ts +63 -0
- package/src/project-client/services/jwt/models/discard-token-response.ts +51 -0
- package/src/project-client/services/jwt/models/index.ts +5 -0
- package/src/project-client/services/jwt/request-params.ts +5 -0
- package/src/project-client/services/notifications/index.ts +2 -0
- package/src/project-client/services/notifications/models/delivery-plan-collection.ts +54 -0
- package/src/project-client/services/notifications/models/delivery-plan.ts +93 -0
- package/src/project-client/services/notifications/models/index.ts +2 -0
- package/src/project-client/services/notifications/notifications-service.ts +45 -0
- package/src/project-client/services/users/index.ts +2 -0
- package/src/project-client/services/users/models/index.ts +2 -0
- package/src/project-client/services/users/models/user-collection.ts +54 -0
- package/src/project-client/services/users/models/user.ts +99 -0
- package/src/project-client/services/users/request-params.ts +6 -0
- package/src/project-client/services/users/users-service.ts +118 -0
- package/src/project-client.ts +1 -0
- package/src/user-client/http/client.ts +71 -0
- package/src/user-client/http/environment.ts +3 -0
- package/src/user-client/http/error.ts +14 -0
- package/src/user-client/http/errors/throwable-error.ts +9 -0
- package/src/user-client/http/errors/validation-error.ts +25 -0
- package/src/user-client/http/handlers/handler-chain.ts +30 -0
- package/src/user-client/http/handlers/hook-handler.ts +80 -0
- package/src/user-client/http/handlers/request-validation-handler.ts +111 -0
- package/src/user-client/http/handlers/response-validation-handler.ts +203 -0
- package/src/user-client/http/handlers/retry-handler.ts +60 -0
- package/src/user-client/http/handlers/terminating-handler.ts +14 -0
- package/src/user-client/http/hooks/custom-hook.ts +25 -0
- package/src/user-client/http/hooks/hook.ts +41 -0
- package/src/user-client/http/index.ts +11 -0
- package/src/user-client/http/serialization/base-serializer.ts +139 -0
- package/src/user-client/http/serialization/header-serializer.ts +19 -0
- package/src/user-client/http/serialization/path-serializer.ts +12 -0
- package/src/user-client/http/serialization/query-serializer.ts +18 -0
- package/src/user-client/http/transport/request-builder.ts +242 -0
- package/src/user-client/http/transport/request-fetch-adapter.ts +131 -0
- package/src/user-client/http/transport/request.ts +222 -0
- package/src/user-client/http/transport/transport-hook-adapter.ts +91 -0
- package/src/user-client/http/transport/types.ts +51 -0
- package/src/user-client/http/types.ts +74 -0
- package/src/user-client/http/utils/content-type.ts +33 -0
- package/src/user-client/http/utils/line-decoder.ts +35 -0
- package/src/user-client/http/utils/response-matcher.ts +25 -0
- package/src/user-client/index.ts +54 -0
- package/src/user-client/services/base-service.ts +27 -0
- package/src/user-client/services/channels/channels-service.ts +1021 -0
- package/src/user-client/services/channels/index.ts +2 -0
- package/src/user-client/services/channels/models/apns-token-collection.ts +54 -0
- package/src/user-client/services/channels/models/apns-token-installation-id.ts +6 -0
- package/src/user-client/services/channels/models/apns-token-payload-installation-id.ts +6 -0
- package/src/user-client/services/channels/models/apns-token-payload.ts +66 -0
- package/src/user-client/services/channels/models/apns-token.ts +90 -0
- package/src/user-client/services/channels/models/discard-result.ts +51 -0
- package/src/user-client/services/channels/models/expo-token-collection.ts +54 -0
- package/src/user-client/services/channels/models/expo-token-payload.ts +45 -0
- package/src/user-client/services/channels/models/expo-token.ts +69 -0
- package/src/user-client/services/channels/models/fcm-token-collection.ts +54 -0
- package/src/user-client/services/channels/models/fcm-token-installation-id.ts +6 -0
- package/src/user-client/services/channels/models/fcm-token-payload-installation-id.ts +6 -0
- package/src/user-client/services/channels/models/fcm-token-payload.ts +51 -0
- package/src/user-client/services/channels/models/fcm-token.ts +75 -0
- package/src/user-client/services/channels/models/inbox-token-response-collection.ts +59 -0
- package/src/user-client/services/channels/models/inbox-token-response.ts +75 -0
- package/src/user-client/services/channels/models/inbox-token.ts +51 -0
- package/src/user-client/services/channels/models/index.ts +33 -0
- package/src/user-client/services/channels/models/slack-token-collection.ts +54 -0
- package/src/user-client/services/channels/models/slack-token-oauth.ts +57 -0
- package/src/user-client/services/channels/models/slack-token-payload-oauth.ts +57 -0
- package/src/user-client/services/channels/models/slack-token-payload-webhook.ts +45 -0
- package/src/user-client/services/channels/models/slack-token-payload.ts +64 -0
- package/src/user-client/services/channels/models/slack-token-webhook.ts +45 -0
- package/src/user-client/services/channels/models/slack-token.ts +88 -0
- package/src/user-client/services/channels/models/teams-token-collection.ts +54 -0
- package/src/user-client/services/channels/models/teams-token-payload-webhook.ts +45 -0
- package/src/user-client/services/channels/models/teams-token-payload.ts +52 -0
- package/src/user-client/services/channels/models/teams-token-webhook.ts +45 -0
- package/src/user-client/services/channels/models/teams-token.ts +76 -0
- package/src/user-client/services/channels/models/web-push-token-collection.ts +54 -0
- package/src/user-client/services/channels/models/web-push-token-keys.ts +51 -0
- package/src/user-client/services/channels/models/web-push-token-payload-keys.ts +51 -0
- package/src/user-client/services/channels/models/web-push-token.ts +82 -0
- package/src/user-client/services/channels/request-params.ts +41 -0
- package/src/user-client/services/common/index.ts +2 -0
- package/src/user-client/services/common/links.ts +57 -0
- package/src/user-client/services/common/web-push-token-payload.ts +58 -0
- package/src/user-client/services/integrations/index.ts +2 -0
- package/src/user-client/services/integrations/integrations-service.ts +279 -0
- package/src/user-client/services/integrations/models/authed-user.ts +75 -0
- package/src/user-client/services/integrations/models/banner.ts +63 -0
- package/src/user-client/services/integrations/models/default-hover.ts +45 -0
- package/src/user-client/services/integrations/models/default-state.ts +45 -0
- package/src/user-client/services/integrations/models/default_.ts +90 -0
- package/src/user-client/services/integrations/models/dialog.ts +57 -0
- package/src/user-client/services/integrations/models/enterprise.ts +51 -0
- package/src/user-client/services/integrations/models/footer.ts +63 -0
- package/src/user-client/services/integrations/models/header.ts +69 -0
- package/src/user-client/services/integrations/models/icon.ts +51 -0
- package/src/user-client/services/integrations/models/images.ts +45 -0
- package/src/user-client/services/integrations/models/inbox-config-payload.ts +60 -0
- package/src/user-client/services/integrations/models/incoming-webhook.ts +57 -0
- package/src/user-client/services/integrations/models/index.ts +29 -0
- package/src/user-client/services/integrations/models/slack-finish-install-response.ts +57 -0
- package/src/user-client/services/integrations/models/slack-installation.ts +136 -0
- package/src/user-client/services/integrations/models/slack-start-install-response-content.ts +57 -0
- package/src/user-client/services/integrations/models/slack-start-install.ts +63 -0
- package/src/user-client/services/integrations/models/team.ts +51 -0
- package/src/user-client/services/integrations/models/templates-installation.ts +57 -0
- package/src/user-client/services/integrations/models/theme-notification.ts +61 -0
- package/src/user-client/services/integrations/models/theme.ts +94 -0
- package/src/user-client/services/integrations/models/unread-hover.ts +45 -0
- package/src/user-client/services/integrations/models/unread-state.ts +45 -0
- package/src/user-client/services/integrations/models/unread.ts +66 -0
- package/src/user-client/services/integrations/models/unseen-badge.ts +45 -0
- package/src/user-client/services/integrations/models/unseen-hover.ts +45 -0
- package/src/user-client/services/integrations/models/unseen-state.ts +45 -0
- package/src/user-client/services/integrations/models/unseen.ts +66 -0
- package/src/user-client/services/integrations/models/web-push-start-installation-response.ts +51 -0
- package/src/user-client/services/notifications/index.ts +2 -0
- package/src/user-client/services/notifications/models/index.ts +2 -0
- package/src/user-client/services/notifications/models/notification-collection.ts +54 -0
- package/src/user-client/services/notifications/models/notification.ts +129 -0
- package/src/user-client/services/notifications/notifications-service.ts +305 -0
- package/src/user-client/services/notifications/request-params.ts +18 -0
- package/src/user-client.ts +1 -0
- package/dist/commonjs/project-client/services/jwt/models/create-user-token-request.d.ts +0 -90
- package/dist/commonjs/project-client/services/jwt/models/create-user-token-request.d.ts.map +0 -1
- package/dist/commonjs/project-client/services/jwt/models/create-user-token-request.js +0 -54
- package/dist/commonjs/project-client/services/jwt/models/create-user-token-request.js.map +0 -1
- package/dist/esm/project-client/services/jwt/models/create-user-token-request.d.ts +0 -90
- package/dist/esm/project-client/services/jwt/models/create-user-token-request.d.ts.map +0 -1
- package/dist/esm/project-client/services/jwt/models/create-user-token-request.js +0 -51
- package/dist/esm/project-client/services/jwt/models/create-user-token-request.js.map +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import { Links, links, linksRequest, linksResponse } from '../../common/links.js';
|
|
4
|
+
import { MailgunConfig, mailgunConfig, mailgunConfigRequest, mailgunConfigResponse } from './mailgun-config.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The shape of the model inside the application code - what the users use
|
|
8
|
+
*/
|
|
9
|
+
export const mailgunConfigCollection = z.lazy(() => {
|
|
10
|
+
return z.object({
|
|
11
|
+
data: z.array(mailgunConfig).optional(),
|
|
12
|
+
links: links.optional(),
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @typedef {MailgunConfigCollection} mailgunConfigCollection
|
|
19
|
+
* @property {MailgunConfig[]}
|
|
20
|
+
* @property {Links}
|
|
21
|
+
*/
|
|
22
|
+
export type MailgunConfigCollection = z.infer<typeof mailgunConfigCollection>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
26
|
+
* Is equal to application shape if all property names match the api schema
|
|
27
|
+
*/
|
|
28
|
+
export const mailgunConfigCollectionResponse = z.lazy(() => {
|
|
29
|
+
return z
|
|
30
|
+
.object({
|
|
31
|
+
data: z.array(mailgunConfigResponse).optional(),
|
|
32
|
+
links: linksResponse.optional(),
|
|
33
|
+
})
|
|
34
|
+
.transform((data) => ({
|
|
35
|
+
data: data['data'],
|
|
36
|
+
links: data['links'],
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
42
|
+
* Is equal to application shape if all property names match the api schema
|
|
43
|
+
*/
|
|
44
|
+
export const mailgunConfigCollectionRequest = z.lazy(() => {
|
|
45
|
+
return z
|
|
46
|
+
.object({
|
|
47
|
+
data: z.array(mailgunConfigRequest).optional(),
|
|
48
|
+
links: linksRequest.optional(),
|
|
49
|
+
})
|
|
50
|
+
.transform((data) => ({
|
|
51
|
+
data: data['data'],
|
|
52
|
+
links: data['links'],
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The shape of the model inside the application code - what the users use
|
|
5
|
+
*/
|
|
6
|
+
export const mailgunConfigPayloadFrom = z.lazy(() => {
|
|
7
|
+
return z.object({
|
|
8
|
+
email: z.string(),
|
|
9
|
+
name: z.string().optional().nullable(),
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @typedef {MailgunConfigPayloadFrom} mailgunConfigPayloadFrom
|
|
16
|
+
* @property {string} - The email address to send from
|
|
17
|
+
* @property {string} - The name to send from
|
|
18
|
+
*/
|
|
19
|
+
export type MailgunConfigPayloadFrom = z.infer<typeof mailgunConfigPayloadFrom>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
23
|
+
* Is equal to application shape if all property names match the api schema
|
|
24
|
+
*/
|
|
25
|
+
export const mailgunConfigPayloadFromResponse = z.lazy(() => {
|
|
26
|
+
return z
|
|
27
|
+
.object({
|
|
28
|
+
email: z.string(),
|
|
29
|
+
name: z.string().optional().nullable(),
|
|
30
|
+
})
|
|
31
|
+
.transform((data) => ({
|
|
32
|
+
email: data['email'],
|
|
33
|
+
name: data['name'],
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
39
|
+
* Is equal to application shape if all property names match the api schema
|
|
40
|
+
*/
|
|
41
|
+
export const mailgunConfigPayloadFromRequest = z.lazy(() => {
|
|
42
|
+
return z
|
|
43
|
+
.object({
|
|
44
|
+
email: z.string(),
|
|
45
|
+
name: z.string().optional().nullable(),
|
|
46
|
+
})
|
|
47
|
+
.transform((data) => ({
|
|
48
|
+
email: data['email'],
|
|
49
|
+
name: data['name'],
|
|
50
|
+
}));
|
|
51
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
MailgunConfigPayloadFrom,
|
|
5
|
+
mailgunConfigPayloadFrom,
|
|
6
|
+
mailgunConfigPayloadFromRequest,
|
|
7
|
+
mailgunConfigPayloadFromResponse,
|
|
8
|
+
} from './mailgun-config-payload-from.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The shape of the model inside the application code - what the users use
|
|
12
|
+
*/
|
|
13
|
+
export const mailgunConfigPayload = z.lazy(() => {
|
|
14
|
+
return z.object({
|
|
15
|
+
apiKey: z.string().min(1),
|
|
16
|
+
domain: z.string().min(1),
|
|
17
|
+
from: mailgunConfigPayloadFrom.optional(),
|
|
18
|
+
region: z.string(),
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @typedef {MailgunConfigPayload} mailgunConfigPayload
|
|
25
|
+
* @property {string}
|
|
26
|
+
* @property {string}
|
|
27
|
+
* @property {MailgunConfigPayloadFrom}
|
|
28
|
+
* @property {Region}
|
|
29
|
+
*/
|
|
30
|
+
export type MailgunConfigPayload = z.infer<typeof mailgunConfigPayload>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
34
|
+
* Is equal to application shape if all property names match the api schema
|
|
35
|
+
*/
|
|
36
|
+
export const mailgunConfigPayloadResponse = z.lazy(() => {
|
|
37
|
+
return z
|
|
38
|
+
.object({
|
|
39
|
+
api_key: z.string().min(1),
|
|
40
|
+
domain: z.string().min(1),
|
|
41
|
+
from: mailgunConfigPayloadFromResponse.optional(),
|
|
42
|
+
region: z.string(),
|
|
43
|
+
})
|
|
44
|
+
.transform((data) => ({
|
|
45
|
+
apiKey: data['api_key'],
|
|
46
|
+
domain: data['domain'],
|
|
47
|
+
from: data['from'],
|
|
48
|
+
region: data['region'],
|
|
49
|
+
}));
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
54
|
+
* Is equal to application shape if all property names match the api schema
|
|
55
|
+
*/
|
|
56
|
+
export const mailgunConfigPayloadRequest = z.lazy(() => {
|
|
57
|
+
return z
|
|
58
|
+
.object({
|
|
59
|
+
apiKey: z.string().min(1),
|
|
60
|
+
domain: z.string().min(1),
|
|
61
|
+
from: mailgunConfigPayloadFromRequest.optional(),
|
|
62
|
+
region: z.string(),
|
|
63
|
+
})
|
|
64
|
+
.transform((data) => ({
|
|
65
|
+
api_key: data['apiKey'],
|
|
66
|
+
domain: data['domain'],
|
|
67
|
+
from: data['from'],
|
|
68
|
+
region: data['region'],
|
|
69
|
+
}));
|
|
70
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
MailgunConfigPayload,
|
|
5
|
+
mailgunConfigPayload,
|
|
6
|
+
mailgunConfigPayloadRequest,
|
|
7
|
+
mailgunConfigPayloadResponse,
|
|
8
|
+
} from './mailgun-config-payload.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The shape of the model inside the application code - what the users use
|
|
12
|
+
*/
|
|
13
|
+
export const mailgunConfig = z.lazy(() => {
|
|
14
|
+
return z.object({
|
|
15
|
+
config: mailgunConfigPayload,
|
|
16
|
+
id: z.string(),
|
|
17
|
+
name: z.string(),
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @typedef {MailgunConfig} mailgunConfig
|
|
24
|
+
* @property {MailgunConfigPayload}
|
|
25
|
+
* @property {string}
|
|
26
|
+
* @property {string}
|
|
27
|
+
*/
|
|
28
|
+
export type MailgunConfig = z.infer<typeof mailgunConfig>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
32
|
+
* Is equal to application shape if all property names match the api schema
|
|
33
|
+
*/
|
|
34
|
+
export const mailgunConfigResponse = z.lazy(() => {
|
|
35
|
+
return z
|
|
36
|
+
.object({
|
|
37
|
+
config: mailgunConfigPayloadResponse,
|
|
38
|
+
id: z.string(),
|
|
39
|
+
name: z.string(),
|
|
40
|
+
})
|
|
41
|
+
.transform((data) => ({
|
|
42
|
+
config: data['config'],
|
|
43
|
+
id: data['id'],
|
|
44
|
+
name: data['name'],
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
50
|
+
* Is equal to application shape if all property names match the api schema
|
|
51
|
+
*/
|
|
52
|
+
export const mailgunConfigRequest = z.lazy(() => {
|
|
53
|
+
return z
|
|
54
|
+
.object({
|
|
55
|
+
config: mailgunConfigPayloadRequest,
|
|
56
|
+
id: z.string(),
|
|
57
|
+
name: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.transform((data) => ({
|
|
60
|
+
config: data['config'],
|
|
61
|
+
id: data['id'],
|
|
62
|
+
name: data['name'],
|
|
63
|
+
}));
|
|
64
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import { Default_, default_, defaultRequest, defaultResponse } from './default_.js';
|
|
4
|
+
import { Unread, unread, unreadRequest, unreadResponse } from './unread.js';
|
|
5
|
+
import { Unseen, unseen, unseenRequest, unseenResponse } from './unseen.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The shape of the model inside the application code - what the users use
|
|
9
|
+
*/
|
|
10
|
+
export const notification = z.lazy(() => {
|
|
11
|
+
return z.object({
|
|
12
|
+
default: default_,
|
|
13
|
+
unread: unread,
|
|
14
|
+
unseen: unseen,
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @typedef {Notification} notification
|
|
21
|
+
* @property {Default_}
|
|
22
|
+
* @property {Unread}
|
|
23
|
+
* @property {Unseen}
|
|
24
|
+
*/
|
|
25
|
+
export type Notification = z.infer<typeof notification>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
29
|
+
* Is equal to application shape if all property names match the api schema
|
|
30
|
+
*/
|
|
31
|
+
export const notificationResponse = z.lazy(() => {
|
|
32
|
+
return z
|
|
33
|
+
.object({
|
|
34
|
+
default: defaultResponse,
|
|
35
|
+
unread: unreadResponse,
|
|
36
|
+
unseen: unseenResponse,
|
|
37
|
+
})
|
|
38
|
+
.transform((data) => ({
|
|
39
|
+
default: data['default'],
|
|
40
|
+
unread: data['unread'],
|
|
41
|
+
unseen: data['unseen'],
|
|
42
|
+
}));
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
47
|
+
* Is equal to application shape if all property names match the api schema
|
|
48
|
+
*/
|
|
49
|
+
export const notificationRequest = z.lazy(() => {
|
|
50
|
+
return z
|
|
51
|
+
.object({
|
|
52
|
+
default: defaultRequest,
|
|
53
|
+
unread: unreadRequest,
|
|
54
|
+
unseen: unseenRequest,
|
|
55
|
+
})
|
|
56
|
+
.transform((data) => ({
|
|
57
|
+
default: data['default'],
|
|
58
|
+
unread: data['unread'],
|
|
59
|
+
unseen: data['unseen'],
|
|
60
|
+
}));
|
|
61
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import { Links, links, linksRequest, linksResponse } from '../../common/links.js';
|
|
4
|
+
import { PingConfig, pingConfig, pingConfigRequest, pingConfigResponse } from './ping-config.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The shape of the model inside the application code - what the users use
|
|
8
|
+
*/
|
|
9
|
+
export const pingConfigCollection = z.lazy(() => {
|
|
10
|
+
return z.object({
|
|
11
|
+
data: z.array(pingConfig).optional(),
|
|
12
|
+
links: links.optional(),
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @typedef {PingConfigCollection} pingConfigCollection
|
|
19
|
+
* @property {PingConfig[]}
|
|
20
|
+
* @property {Links}
|
|
21
|
+
*/
|
|
22
|
+
export type PingConfigCollection = z.infer<typeof pingConfigCollection>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
26
|
+
* Is equal to application shape if all property names match the api schema
|
|
27
|
+
*/
|
|
28
|
+
export const pingConfigCollectionResponse = z.lazy(() => {
|
|
29
|
+
return z
|
|
30
|
+
.object({
|
|
31
|
+
data: z.array(pingConfigResponse).optional(),
|
|
32
|
+
links: linksResponse.optional(),
|
|
33
|
+
})
|
|
34
|
+
.transform((data) => ({
|
|
35
|
+
data: data['data'],
|
|
36
|
+
links: data['links'],
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
42
|
+
* Is equal to application shape if all property names match the api schema
|
|
43
|
+
*/
|
|
44
|
+
export const pingConfigCollectionRequest = z.lazy(() => {
|
|
45
|
+
return z
|
|
46
|
+
.object({
|
|
47
|
+
data: z.array(pingConfigRequest).optional(),
|
|
48
|
+
links: linksRequest.optional(),
|
|
49
|
+
})
|
|
50
|
+
.transform((data) => ({
|
|
51
|
+
data: data['data'],
|
|
52
|
+
links: data['links'],
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The shape of the model inside the application code - what the users use
|
|
5
|
+
*/
|
|
6
|
+
export const pingConfigPayload = z.lazy(() => {
|
|
7
|
+
return z.object({
|
|
8
|
+
url: z.string().min(1).max(100),
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @typedef {PingConfigPayload} pingConfigPayload
|
|
15
|
+
* @property {string} - URL to ping
|
|
16
|
+
*/
|
|
17
|
+
export type PingConfigPayload = z.infer<typeof pingConfigPayload>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
21
|
+
* Is equal to application shape if all property names match the api schema
|
|
22
|
+
*/
|
|
23
|
+
export const pingConfigPayloadResponse = z.lazy(() => {
|
|
24
|
+
return z
|
|
25
|
+
.object({
|
|
26
|
+
url: z.string().min(1).max(100),
|
|
27
|
+
})
|
|
28
|
+
.transform((data) => ({
|
|
29
|
+
url: data['url'],
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
35
|
+
* Is equal to application shape if all property names match the api schema
|
|
36
|
+
*/
|
|
37
|
+
export const pingConfigPayloadRequest = z.lazy(() => {
|
|
38
|
+
return z
|
|
39
|
+
.object({
|
|
40
|
+
url: z.string().min(1).max(100),
|
|
41
|
+
})
|
|
42
|
+
.transform((data) => ({
|
|
43
|
+
url: data['url'],
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
PingConfigPayload,
|
|
5
|
+
pingConfigPayload,
|
|
6
|
+
pingConfigPayloadRequest,
|
|
7
|
+
pingConfigPayloadResponse,
|
|
8
|
+
} from './ping-config-payload.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The shape of the model inside the application code - what the users use
|
|
12
|
+
*/
|
|
13
|
+
export const pingConfig = z.lazy(() => {
|
|
14
|
+
return z.object({
|
|
15
|
+
config: pingConfigPayload,
|
|
16
|
+
id: z.string(),
|
|
17
|
+
name: z.string(),
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @typedef {PingConfig} pingConfig
|
|
24
|
+
* @property {PingConfigPayload}
|
|
25
|
+
* @property {string}
|
|
26
|
+
* @property {string}
|
|
27
|
+
*/
|
|
28
|
+
export type PingConfig = z.infer<typeof pingConfig>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
32
|
+
* Is equal to application shape if all property names match the api schema
|
|
33
|
+
*/
|
|
34
|
+
export const pingConfigResponse = z.lazy(() => {
|
|
35
|
+
return z
|
|
36
|
+
.object({
|
|
37
|
+
config: pingConfigPayloadResponse,
|
|
38
|
+
id: z.string(),
|
|
39
|
+
name: z.string(),
|
|
40
|
+
})
|
|
41
|
+
.transform((data) => ({
|
|
42
|
+
config: data['config'],
|
|
43
|
+
id: data['id'],
|
|
44
|
+
name: data['name'],
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
50
|
+
* Is equal to application shape if all property names match the api schema
|
|
51
|
+
*/
|
|
52
|
+
export const pingConfigRequest = z.lazy(() => {
|
|
53
|
+
return z
|
|
54
|
+
.object({
|
|
55
|
+
config: pingConfigPayloadRequest,
|
|
56
|
+
id: z.string(),
|
|
57
|
+
name: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.transform((data) => ({
|
|
60
|
+
config: data['config'],
|
|
61
|
+
id: data['id'],
|
|
62
|
+
name: data['name'],
|
|
63
|
+
}));
|
|
64
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The shape of the model inside the application code - what the users use
|
|
5
|
+
*/
|
|
6
|
+
export const replyTo = z.lazy(() => {
|
|
7
|
+
return z.object({
|
|
8
|
+
email: z.string(),
|
|
9
|
+
name: z.string().optional().nullable(),
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @typedef {ReplyTo} replyTo
|
|
16
|
+
* @property {string} - The email address to reply to
|
|
17
|
+
* @property {string} - The name to reply to
|
|
18
|
+
*/
|
|
19
|
+
export type ReplyTo = z.infer<typeof replyTo>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
23
|
+
* Is equal to application shape if all property names match the api schema
|
|
24
|
+
*/
|
|
25
|
+
export const replyToResponse = z.lazy(() => {
|
|
26
|
+
return z
|
|
27
|
+
.object({
|
|
28
|
+
email: z.string(),
|
|
29
|
+
name: z.string().optional().nullable(),
|
|
30
|
+
})
|
|
31
|
+
.transform((data) => ({
|
|
32
|
+
email: data['email'],
|
|
33
|
+
name: data['name'],
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
39
|
+
* Is equal to application shape if all property names match the api schema
|
|
40
|
+
*/
|
|
41
|
+
export const replyToRequest = z.lazy(() => {
|
|
42
|
+
return z
|
|
43
|
+
.object({
|
|
44
|
+
email: z.string(),
|
|
45
|
+
name: z.string().optional().nullable(),
|
|
46
|
+
})
|
|
47
|
+
.transform((data) => ({
|
|
48
|
+
email: data['email'],
|
|
49
|
+
name: data['name'],
|
|
50
|
+
}));
|
|
51
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
import { Links, links, linksRequest, linksResponse } from '../../common/links.js';
|
|
4
|
+
import { SendgridConfig, sendgridConfig, sendgridConfigRequest, sendgridConfigResponse } from './sendgrid-config.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The shape of the model inside the application code - what the users use
|
|
8
|
+
*/
|
|
9
|
+
export const sendgridConfigCollection = z.lazy(() => {
|
|
10
|
+
return z.object({
|
|
11
|
+
data: z.array(sendgridConfig).optional(),
|
|
12
|
+
links: links.optional(),
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @typedef {SendgridConfigCollection} sendgridConfigCollection
|
|
19
|
+
* @property {SendgridConfig[]}
|
|
20
|
+
* @property {Links}
|
|
21
|
+
*/
|
|
22
|
+
export type SendgridConfigCollection = z.infer<typeof sendgridConfigCollection>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
26
|
+
* Is equal to application shape if all property names match the api schema
|
|
27
|
+
*/
|
|
28
|
+
export const sendgridConfigCollectionResponse = z.lazy(() => {
|
|
29
|
+
return z
|
|
30
|
+
.object({
|
|
31
|
+
data: z.array(sendgridConfigResponse).optional(),
|
|
32
|
+
links: linksResponse.optional(),
|
|
33
|
+
})
|
|
34
|
+
.transform((data) => ({
|
|
35
|
+
data: data['data'],
|
|
36
|
+
links: data['links'],
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
42
|
+
* Is equal to application shape if all property names match the api schema
|
|
43
|
+
*/
|
|
44
|
+
export const sendgridConfigCollectionRequest = z.lazy(() => {
|
|
45
|
+
return z
|
|
46
|
+
.object({
|
|
47
|
+
data: z.array(sendgridConfigRequest).optional(),
|
|
48
|
+
links: linksRequest.optional(),
|
|
49
|
+
})
|
|
50
|
+
.transform((data) => ({
|
|
51
|
+
data: data['data'],
|
|
52
|
+
links: data['links'],
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The shape of the model inside the application code - what the users use
|
|
5
|
+
*/
|
|
6
|
+
export const sendgridConfigPayloadFrom = z.lazy(() => {
|
|
7
|
+
return z.object({
|
|
8
|
+
email: z.string(),
|
|
9
|
+
name: z.string().optional().nullable(),
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @typedef {SendgridConfigPayloadFrom} sendgridConfigPayloadFrom
|
|
16
|
+
* @property {string} - The email address to send from
|
|
17
|
+
* @property {string} - The name to send from
|
|
18
|
+
*/
|
|
19
|
+
export type SendgridConfigPayloadFrom = z.infer<typeof sendgridConfigPayloadFrom>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The shape of the model mapping from the api schema into the application shape.
|
|
23
|
+
* Is equal to application shape if all property names match the api schema
|
|
24
|
+
*/
|
|
25
|
+
export const sendgridConfigPayloadFromResponse = z.lazy(() => {
|
|
26
|
+
return z
|
|
27
|
+
.object({
|
|
28
|
+
email: z.string(),
|
|
29
|
+
name: z.string().optional().nullable(),
|
|
30
|
+
})
|
|
31
|
+
.transform((data) => ({
|
|
32
|
+
email: data['email'],
|
|
33
|
+
name: data['name'],
|
|
34
|
+
}));
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The shape of the model mapping from the application shape into the api schema.
|
|
39
|
+
* Is equal to application shape if all property names match the api schema
|
|
40
|
+
*/
|
|
41
|
+
export const sendgridConfigPayloadFromRequest = z.lazy(() => {
|
|
42
|
+
return z
|
|
43
|
+
.object({
|
|
44
|
+
email: z.string(),
|
|
45
|
+
name: z.string().optional().nullable(),
|
|
46
|
+
})
|
|
47
|
+
.transform((data) => ({
|
|
48
|
+
email: data['email'],
|
|
49
|
+
name: data['name'],
|
|
50
|
+
}));
|
|
51
|
+
});
|