@zyphr-dev/node-sdk 0.1.36 → 0.1.38
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 +39 -0
- package/dist/index.cjs +773 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1193 -522
- package/dist/index.d.ts +1193 -522
- package/dist/index.js +737 -47
- package/dist/index.js.map +1 -1
- package/package.json +8 -3
- package/src/.openapi-generator/FILES +7 -0
- package/src/clientAuth.ts +182 -0
- package/src/errors.ts +29 -16
- package/src/index.ts +4 -1
- package/src/src/apis/AuthEmailOTPApi.ts +1 -1
- package/src/src/apis/AuthEmailTemplatesApi.ts +1 -1
- package/src/src/apis/AuthEmailVerificationApi.ts +1 -1
- package/src/src/apis/AuthLoginApi.ts +1 -1
- package/src/src/apis/AuthMFAApi.ts +1 -1
- package/src/src/apis/AuthMagicLinksApi.ts +1 -1
- package/src/src/apis/AuthOAuthApi.ts +28 -25
- package/src/src/apis/AuthOrganizationsApi.ts +1 -1
- package/src/src/apis/AuthPasswordResetApi.ts +1 -1
- package/src/src/apis/AuthPhoneApi.ts +1 -1
- package/src/src/apis/AuthRegistrationApi.ts +70 -5
- package/src/src/apis/AuthSessionsApi.ts +1 -1
- package/src/src/apis/AuthUserDirectoryApi.ts +596 -0
- package/src/src/apis/AuthUserProfileApi.ts +1 -63
- package/src/src/apis/AuthWebAuthnApi.ts +1 -1
- package/src/src/apis/DevicesApi.ts +1 -1
- package/src/src/apis/DomainsApi.ts +1 -1
- package/src/src/apis/EmailsApi.ts +1 -1
- package/src/src/apis/ExecutionsApi.ts +1 -1
- package/src/src/apis/InboundEmailApi.ts +1 -1
- package/src/src/apis/InboxApi.ts +1 -1
- package/src/src/apis/MuseApi.ts +1 -1
- package/src/src/apis/PushApi.ts +1 -1
- package/src/src/apis/SMSApi.ts +1 -1
- package/src/src/apis/SlackApi.ts +1 -1
- package/src/src/apis/SubscribersApi.ts +1 -1
- package/src/src/apis/TemplatesApi.ts +78 -1
- package/src/src/apis/TopicsApi.ts +1 -1
- package/src/src/apis/UtilityApi.ts +1 -1
- package/src/src/apis/WaaSApplicationsApi.ts +1 -1
- package/src/src/apis/WaaSDeliveriesApi.ts +1 -1
- package/src/src/apis/WaaSEndpointsApi.ts +1 -1
- package/src/src/apis/WaaSEventTypesApi.ts +1 -1
- package/src/src/apis/WaaSEventsApi.ts +1 -1
- package/src/src/apis/WaaSPortalApi.ts +1 -1
- package/src/src/apis/WebhooksApi.ts +1 -1
- package/src/src/apis/index.ts +1 -0
- package/src/src/models/AddDomain200Response.ts +1 -1
- package/src/src/models/AddDomain200ResponseMeta.ts +1 -1
- package/src/src/models/AddDomainRequest.ts +1 -1
- package/src/src/models/AddOrganizationMemberRequest.ts +1 -1
- package/src/src/models/AddTopicSubscribersRequest.ts +1 -1
- package/src/src/models/ApiError.ts +1 -1
- package/src/src/models/ApiErrorError.ts +1 -1
- package/src/src/models/ApiErrorMeta.ts +1 -1
- package/src/src/models/AuthEmailTemplate.ts +1 -1
- package/src/src/models/AuthEmailTemplateDefault.ts +1 -1
- package/src/src/models/AuthEmailTemplateDefaultResponse.ts +1 -1
- package/src/src/models/AuthEmailTemplateDeleteResponse.ts +1 -1
- package/src/src/models/AuthEmailTemplateDeleteResponseData.ts +1 -1
- package/src/src/models/AuthEmailTemplateListResponse.ts +1 -1
- package/src/src/models/AuthEmailTemplatePreviewDraft.ts +1 -1
- package/src/src/models/AuthEmailTemplatePreviewRequest.ts +1 -1
- package/src/src/models/AuthEmailTemplatePreviewResponse.ts +1 -1
- package/src/src/models/AuthEmailTemplatePreviewResult.ts +1 -1
- package/src/src/models/AuthEmailTemplateResponse.ts +1 -1
- package/src/src/models/AuthEmailTemplateTestRequest.ts +1 -1
- package/src/src/models/AuthEmailTemplateTestResponse.ts +1 -1
- package/src/src/models/AuthEmailTemplateTestResult.ts +1 -1
- package/src/src/models/AuthEmailTemplateVersion.ts +1 -1
- package/src/src/models/AuthEmailTemplateVersionsResponse.ts +1 -1
- package/src/src/models/AuthEmailType.ts +1 -1
- package/src/src/models/AuthLoginResponse.ts +1 -1
- package/src/src/models/AuthLoginResult.ts +1 -1
- package/src/src/models/AuthLoginResultMfaChallenge.ts +1 -1
- package/src/src/models/AuthResult.ts +1 -1
- package/src/src/models/AuthResultResponse.ts +1 -1
- package/src/src/models/AuthSession.ts +1 -1
- package/src/src/models/AuthTokens.ts +1 -1
- package/src/src/models/AuthUser.ts +1 -1
- package/src/src/models/AuthUserResponse.ts +1 -1
- package/src/src/models/AuthUserResponseData.ts +1 -1
- package/src/src/models/BatchPublishWaaSEvents201Response.ts +1 -1
- package/src/src/models/BatchRecipient.ts +1 -1
- package/src/src/models/BulkRetryWebhookDeliveriesRequest.ts +1 -1
- package/src/src/models/BulkUpsertAuthEmailTemplatesRequest.ts +1 -1
- package/src/src/models/BulkUpsertAuthEmailTemplatesResponse.ts +1 -1
- package/src/src/models/Category.ts +1 -1
- package/src/src/models/CategoryListResponse.ts +1 -1
- package/src/src/models/CategoryResponse.ts +1 -1
- package/src/src/models/ConfirmEmailVerificationRequest.ts +1 -1
- package/src/src/models/ConfirmEmailVerificationResponse.ts +1 -1
- package/src/src/models/ConfirmEmailVerificationResponseData.ts +1 -1
- package/src/src/models/ConsentHistoryEntry.ts +1 -1
- package/src/src/models/ConsentHistoryResponse.ts +1 -1
- package/src/src/models/ConsentRecordResponse.ts +1 -1
- package/src/src/models/ConsentRecordResponseData.ts +1 -1
- package/src/src/models/ConsentStatus.ts +1 -1
- package/src/src/models/ConsentStatusResponse.ts +1 -1
- package/src/src/models/ConsentWithdrawResponse.ts +1 -1
- package/src/src/models/ConvertAnonymousUserRequest.ts +1 -1
- package/src/src/models/ConvertAnonymousUserRequestOneOf.ts +1 -1
- package/src/src/models/ConvertAnonymousUserRequestOneOf1.ts +1 -1
- package/src/src/models/ConvertAnonymousUserRequestOneOf1AppleUser.ts +1 -1
- package/src/src/models/ConvertAnonymousUserRequestOneOf1AppleUserName.ts +1 -1
- package/src/src/models/CreateCategoryRequest.ts +1 -1
- package/src/src/models/CreateOrganizationRequest.ts +1 -1
- package/src/src/models/CreateSubscriberRequest.ts +1 -1
- package/src/src/models/CreateTemplateRequest.ts +1 -1
- package/src/src/models/CreateTopicRequest.ts +1 -1
- package/src/src/models/CreateWaaSApplication201Response.ts +1 -1
- package/src/src/models/CreateWaaSApplicationRequest.ts +1 -1
- package/src/src/models/CreateWaaSEndpoint201Response.ts +1 -1
- package/src/src/models/CreateWaaSEndpointRequest.ts +1 -1
- package/src/src/models/CreateWaaSEndpointResponse.ts +1 -1
- package/src/src/models/CreateWaaSEventType201Response.ts +1 -1
- package/src/src/models/CreateWaaSEventTypeRequest.ts +1 -1
- package/src/src/models/CreateWebhookRequest.ts +1 -1
- package/src/src/models/DeleteDomainResponse.ts +1 -1
- package/src/src/models/DeleteDomainResponseData.ts +1 -1
- package/src/src/models/DeleteResult.ts +1 -1
- package/src/src/models/DeleteResultData.ts +1 -1
- package/src/src/models/Device.ts +1 -1
- package/src/src/models/DeviceListResponse.ts +1 -1
- package/src/src/models/DevicePushTopic.ts +1 -1
- package/src/src/models/DevicePushTopicListResponse.ts +1 -1
- package/src/src/models/DevicePushTopicListResponseMeta.ts +1 -1
- package/src/src/models/DeviceResponse.ts +1 -1
- package/src/src/models/DeviceStats.ts +1 -1
- package/src/src/models/DeviceStatsResponse.ts +1 -1
- package/src/src/models/DnsRecord.ts +1 -1
- package/src/src/models/DomainListResponse.ts +1 -1
- package/src/src/models/DomainListResponseMeta.ts +1 -1
- package/src/src/models/DomainResponse.ts +1 -1
- package/src/src/models/EmailAddress.ts +1 -1
- package/src/src/models/EmailAttachment.ts +1 -1
- package/src/src/models/EmailEvent.ts +1 -1
- package/src/src/models/EmailEventsResponse.ts +1 -1
- package/src/src/models/EmailListResponse.ts +1 -1
- package/src/src/models/EmailMessage.ts +1 -1
- package/src/src/models/EmailResponse.ts +1 -1
- package/src/src/models/EmailTrackingClickLink.ts +1 -1
- package/src/src/models/EmailTrackingClicks.ts +1 -1
- package/src/src/models/EmailTrackingData.ts +1 -1
- package/src/src/models/EmailTrackingOpens.ts +1 -1
- package/src/src/models/EmailTrackingResponse.ts +1 -1
- package/src/src/models/EndUserDeleteResponse.ts +1 -1
- package/src/src/models/EndUserDeleteResponseData.ts +1 -1
- package/src/src/models/ExecutionCancelResponse.ts +1 -1
- package/src/src/models/ExecutionCancelResponseData.ts +1 -1
- package/src/src/models/ExecutionResponse.ts +1 -1
- package/src/src/models/ExecutionRetryResponse.ts +1 -1
- package/src/src/models/ExecutionRetryResponseData.ts +1 -1
- package/src/src/models/ForgotPasswordRequest.ts +1 -1
- package/src/src/models/GenerateSubscriberToken200Response.ts +1 -1
- package/src/src/models/GenerateSubscriberToken200ResponseData.ts +1 -1
- package/src/src/models/GenerateSubscriberTokenRequest.ts +1 -1
- package/src/src/models/GenerateWaaSPortalToken201Response.ts +1 -1
- package/src/src/models/GetDomain200Response.ts +1 -1
- package/src/src/models/GetDomain200ResponseMeta.ts +1 -1
- package/src/src/models/GetWaaSEndpoint200Response.ts +1 -1
- package/src/src/models/GetWaaSUsage200Response.ts +1 -1
- package/src/src/models/InAppNotification.ts +1 -1
- package/src/src/models/InboundAttachmentUrlResponse.ts +1 -1
- package/src/src/models/InboundAttachmentUrlResponseData.ts +1 -1
- package/src/src/models/InboundEmail.ts +1 -1
- package/src/src/models/InboundEmailAttachment.ts +1 -1
- package/src/src/models/InboundEmailFrom.ts +1 -1
- package/src/src/models/InboundEmailListResponse.ts +1 -1
- package/src/src/models/InboundEmailListResponseMeta.ts +1 -1
- package/src/src/models/InboundEmailResponse.ts +1 -1
- package/src/src/models/InboxListMeta.ts +1 -1
- package/src/src/models/InboxListResponse.ts +1 -1
- package/src/src/models/InboxNotificationResponse.ts +1 -1
- package/src/src/models/InviteEndUserRequest.ts +110 -0
- package/src/src/models/ListWaaSApplications200Response.ts +1 -1
- package/src/src/models/ListWaaSEndpointDeliveries200Response.ts +1 -1
- package/src/src/models/ListWaaSEndpoints200Response.ts +1 -1
- package/src/src/models/ListWaaSEventTypes200Response.ts +1 -1
- package/src/src/models/LoginRequest.ts +1 -1
- package/src/src/models/MagicLinkSendRequest.ts +1 -1
- package/src/src/models/MagicLinkVerifyRequest.ts +1 -1
- package/src/src/models/MagicLinkVerifyResponse.ts +1 -1
- package/src/src/models/MagicLinkVerifyResponseData.ts +1 -1
- package/src/src/models/MarkAllInboxReadRequest.ts +1 -1
- package/src/src/models/MarkAllReadData.ts +1 -1
- package/src/src/models/MarkAllReadResponse.ts +1 -1
- package/src/src/models/MarkAllSubscriberNotificationsReadRequest.ts +1 -1
- package/src/src/models/MarkInboxReadRequest.ts +1 -1
- package/src/src/models/MfaBackupCodesResponse.ts +1 -1
- package/src/src/models/MfaBackupCodesResponseData.ts +1 -1
- package/src/src/models/MfaDisableRequest.ts +1 -1
- package/src/src/models/MfaDisableResponse.ts +1 -1
- package/src/src/models/MfaDisableResponseData.ts +1 -1
- package/src/src/models/MfaEnrollRequest.ts +1 -1
- package/src/src/models/MfaEnrollmentResponse.ts +1 -1
- package/src/src/models/MfaEnrollmentResponseData.ts +1 -1
- package/src/src/models/MfaRegenerateBackupCodesRequest.ts +1 -1
- package/src/src/models/MfaStatusResponse.ts +1 -1
- package/src/src/models/MfaStatusResponseData.ts +1 -1
- package/src/src/models/MfaVerifyBackupRequest.ts +1 -1
- package/src/src/models/MfaVerifyBackupResponse.ts +1 -1
- package/src/src/models/MfaVerifyBackupResponseData.ts +1 -1
- package/src/src/models/MfaVerifyEnrollmentRequest.ts +1 -1
- package/src/src/models/MfaVerifyEnrollmentResponse.ts +1 -1
- package/src/src/models/MfaVerifyEnrollmentResponseData.ts +1 -1
- package/src/src/models/MfaVerifyRequest.ts +1 -1
- package/src/src/models/OAuthAuthorizationUrlResponse.ts +1 -1
- package/src/src/models/OAuthAuthorizationUrlResponseData.ts +1 -1
- package/src/src/models/OAuthCallbackRequest.ts +1 -1
- package/src/src/models/OAuthCallbackResponse.ts +1 -1
- package/src/src/models/OAuthCallbackResponseData.ts +1 -1
- package/src/src/models/OAuthConnection.ts +1 -1
- package/src/src/models/OAuthConnectionInfoResponse.ts +1 -1
- package/src/src/models/OAuthConnectionInfoResponseData.ts +1 -1
- package/src/src/models/OAuthConnectionsResponse.ts +1 -1
- package/src/src/models/OAuthConnectionsResponseData.ts +1 -1
- package/src/src/models/OAuthProvider.ts +1 -1
- package/src/src/models/OAuthProviderInfo.ts +1 -1
- package/src/src/models/OAuthProviderName.ts +56 -0
- package/src/src/models/OAuthProvidersResponse.ts +1 -1
- package/src/src/models/OAuthProvidersResponseData.ts +1 -1
- package/src/src/models/OAuthTokensRefreshResponse.ts +1 -1
- package/src/src/models/OAuthTokensRefreshResponseData.ts +1 -1
- package/src/src/models/OAuthTokensResponse.ts +1 -1
- package/src/src/models/OAuthTokensResponseData.ts +1 -1
- package/src/src/models/Organization.ts +1 -1
- package/src/src/models/OrganizationListResponse.ts +1 -1
- package/src/src/models/OrganizationListResponseMeta.ts +1 -1
- package/src/src/models/OrganizationMembersListResponse.ts +1 -1
- package/src/src/models/OrganizationMembership.ts +1 -1
- package/src/src/models/OrganizationMembershipResponse.ts +1 -1
- package/src/src/models/OrganizationMembershipWithUser.ts +1 -1
- package/src/src/models/OrganizationResponse.ts +1 -1
- package/src/src/models/PaginationMeta.ts +1 -1
- package/src/src/models/PasswordRequirements.ts +1 -1
- package/src/src/models/PasswordRequirementsResponse.ts +1 -1
- package/src/src/models/PasswordRequirementsResponseData.ts +1 -1
- package/src/src/models/PayloadTooLargeError.ts +1 -1
- package/src/src/models/PayloadTooLargeErrorError.ts +1 -1
- package/src/src/models/PayloadTooLargeErrorErrorDetails.ts +1 -1
- package/src/src/models/PhoneAuthAvailabilityResponse.ts +1 -1
- package/src/src/models/PhoneAuthAvailabilityResponseData.ts +1 -1
- package/src/src/models/PhoneLoginVerifyRequest.ts +1 -1
- package/src/src/models/PhoneOtpSendRequest.ts +1 -1
- package/src/src/models/PhoneOtpSentResponse.ts +1 -1
- package/src/src/models/PhoneOtpSentResponseData.ts +1 -1
- package/src/src/models/PhoneRegisterVerifyRequest.ts +1 -1
- package/src/src/models/PreferenceListResponse.ts +1 -1
- package/src/src/models/PublishWaaSEvent201Response.ts +1 -1
- package/src/src/models/PushDetailResponse.ts +1 -1
- package/src/src/models/PushEvent.ts +1 -1
- package/src/src/models/PushListResponse.ts +1 -1
- package/src/src/models/PushMessage.ts +1 -1
- package/src/src/models/PushMessageDetail.ts +1 -1
- package/src/src/models/PushMessageDetailAllOfActionButtons.ts +1 -1
- package/src/src/models/PushStatsData.ts +1 -1
- package/src/src/models/PushStatsResponse.ts +1 -1
- package/src/src/models/PushTopicDevice.ts +1 -1
- package/src/src/models/PushTopicDeviceListResponse.ts +1 -1
- package/src/src/models/PushTopicSubscribeData.ts +1 -1
- package/src/src/models/PushTopicSubscribeResponse.ts +1 -1
- package/src/src/models/PushTopicUnsubscribeData.ts +1 -1
- package/src/src/models/PushTopicUnsubscribeResponse.ts +1 -1
- package/src/src/models/RefreshOAuthTokensRequest.ts +1 -1
- package/src/src/models/RefreshSessionRequest.ts +1 -1
- package/src/src/models/RefreshTokenResponse.ts +1 -1
- package/src/src/models/RefreshTokenResponseData.ts +1 -1
- package/src/src/models/RegisterDeviceRequest.ts +1 -1
- package/src/src/models/RegisterRequest.ts +1 -1
- package/src/src/models/RemoveTopicSubscribersRequest.ts +1 -1
- package/src/src/models/RenameWebAuthnCredentialRequest.ts +1 -1
- package/src/src/models/RenderTemplateRequest.ts +1 -1
- package/src/src/models/ReplayWebhookEventsRequest.ts +1 -1
- package/src/src/models/RequestMeta.ts +1 -1
- package/src/src/models/ResetPasswordRequest.ts +1 -1
- package/src/src/models/ResetPasswordResponse.ts +1 -1
- package/src/src/models/ResubscribeRequest.ts +1 -1
- package/src/src/models/ResubscribeResponse.ts +1 -1
- package/src/src/models/RevokeAllSessionsResponse.ts +1 -1
- package/src/src/models/RevokeAllSessionsResponseData.ts +1 -1
- package/src/src/models/RevokeSessionRequest.ts +1 -1
- package/src/src/models/SendBatchEmailRequest.ts +1 -1
- package/src/src/models/SendBatchEmailResponse.ts +1 -1
- package/src/src/models/SendBatchEmailResult.ts +1 -1
- package/src/src/models/SendBatchEmailResultItem.ts +1 -1
- package/src/src/models/SendBatchInAppMeta.ts +1 -1
- package/src/src/models/SendBatchInAppRequest.ts +1 -1
- package/src/src/models/SendBatchInAppResponse.ts +1 -1
- package/src/src/models/SendBatchSmsData.ts +1 -1
- package/src/src/models/SendBatchSmsRequest.ts +1 -1
- package/src/src/models/SendBatchSmsResponse.ts +1 -1
- package/src/src/models/SendEmailOtpRegistrationRequest.ts +1 -1
- package/src/src/models/SendEmailRequest.ts +1 -1
- package/src/src/models/SendEmailResponse.ts +1 -1
- package/src/src/models/SendEmailResponseData.ts +1 -1
- package/src/src/models/SendEmailResponseMeta.ts +1 -1
- package/src/src/models/SendEmailVerificationRequest.ts +1 -1
- package/src/src/models/SendInAppMeta.ts +1 -1
- package/src/src/models/SendInAppRequest.ts +1 -1
- package/src/src/models/SendInAppResponse.ts +1 -1
- package/src/src/models/SendPushRequest.ts +1 -1
- package/src/src/models/SendPushRequestActionButtonsInner.ts +1 -1
- package/src/src/models/SendPushResponse.ts +1 -1
- package/src/src/models/SendPushResponseData.ts +1 -1
- package/src/src/models/SendPushToTopicData.ts +1 -1
- package/src/src/models/SendPushToTopicRequest.ts +1 -1
- package/src/src/models/SendPushToTopicResponse.ts +1 -1
- package/src/src/models/SendSlackMessageRequest.ts +1 -1
- package/src/src/models/SendSlackMessageResponse.ts +1 -1
- package/src/src/models/SendSlackMessageResult.ts +1 -1
- package/src/src/models/SendSmsData.ts +1 -1
- package/src/src/models/SendSmsRequest.ts +1 -1
- package/src/src/models/SendSmsResponse.ts +1 -1
- package/src/src/models/SendTemplateTestEmailRequest.ts +74 -0
- package/src/src/models/SendTestSmsData.ts +1 -1
- package/src/src/models/SendTestSmsRequest.ts +1 -1
- package/src/src/models/SendTestSmsResponse.ts +1 -1
- package/src/src/models/SendWebhookTestEventRequest.ts +1 -1
- package/src/src/models/SessionListResponse.ts +1 -1
- package/src/src/models/SessionListResponseData.ts +1 -1
- package/src/src/models/SessionListResponseDataSessionInfo.ts +1 -1
- package/src/src/models/SetDomainInboundRequest.ts +1 -1
- package/src/src/models/SetEndUserClaimsRequest.ts +65 -0
- package/src/src/models/SetPreferencesRequest.ts +1 -1
- package/src/src/models/SetPreferencesRequestPreferencesInner.ts +1 -1
- package/src/src/models/SignInAnonymouslyRequest.ts +17 -1
- package/src/src/models/SignInWithGameCenterRequest.ts +111 -0
- package/src/src/models/SlackMessage.ts +1 -1
- package/src/src/models/SlackMessageListResponse.ts +1 -1
- package/src/src/models/SlackMessageListResponseMeta.ts +1 -1
- package/src/src/models/SlackMessageResponse.ts +1 -1
- package/src/src/models/SlackMessageStatus.ts +1 -1
- package/src/src/models/SlackMessageSummary.ts +1 -1
- package/src/src/models/SmsBatchResultMessage.ts +1 -1
- package/src/src/models/SmsBatchResultSummary.ts +1 -1
- package/src/src/models/SmsConfig.ts +1 -1
- package/src/src/models/SmsConfigDeleteResponse.ts +1 -1
- package/src/src/models/SmsConfigDeleteResponseData.ts +1 -1
- package/src/src/models/SmsConfigResponse.ts +1 -1
- package/src/src/models/SmsDetailResponse.ts +1 -1
- package/src/src/models/SmsListResponse.ts +1 -1
- package/src/src/models/SmsListResponseMeta.ts +1 -1
- package/src/src/models/SmsMessage.ts +1 -1
- package/src/src/models/SmsMessageDetail.ts +1 -1
- package/src/src/models/SubscribePushTopicRequest.ts +1 -1
- package/src/src/models/Subscriber.ts +1 -1
- package/src/src/models/SubscriberListResponse.ts +1 -1
- package/src/src/models/SubscriberPreference.ts +1 -1
- package/src/src/models/SubscriberResponse.ts +1 -1
- package/src/src/models/SuccessResult.ts +1 -1
- package/src/src/models/SwitchOrganizationRequest.ts +1 -1
- package/src/src/models/SwitchOrganizationResponse.ts +1 -1
- package/src/src/models/SwitchOrganizationResponseData.ts +1 -1
- package/src/src/models/SwitchOrganizationResponseDataTokens.ts +1 -1
- package/src/src/models/SwitchOrganizationResponseDataUser.ts +1 -1
- package/src/src/models/Template.ts +1 -1
- package/src/src/models/TemplateListResponse.ts +1 -1
- package/src/src/models/TemplateRenderResponse.ts +1 -1
- package/src/src/models/TemplateRenderedContent.ts +1 -1
- package/src/src/models/TemplateResponse.ts +1 -1
- package/src/src/models/TestWebhookTransformRequest.ts +1 -1
- package/src/src/models/Topic.ts +1 -1
- package/src/src/models/TopicDeleteResponse.ts +1 -1
- package/src/src/models/TopicDeleteResponseData.ts +1 -1
- package/src/src/models/TopicListResponse.ts +1 -1
- package/src/src/models/TopicResponse.ts +1 -1
- package/src/src/models/TopicStatsData.ts +1 -1
- package/src/src/models/TopicStatsDataTopicsBySubscriberCountInner.ts +1 -1
- package/src/src/models/TopicStatsResponse.ts +1 -1
- package/src/src/models/TopicSubscriber.ts +1 -1
- package/src/src/models/TopicSubscriberListResponse.ts +1 -1
- package/src/src/models/TopicSubscribersAddResponse.ts +1 -1
- package/src/src/models/TopicSubscribersAddResult.ts +1 -1
- package/src/src/models/TopicSubscribersRemoveResponse.ts +1 -1
- package/src/src/models/TopicSubscribersRemoveResult.ts +1 -1
- package/src/src/models/UnreadCountData.ts +1 -1
- package/src/src/models/UnreadCountResponse.ts +1 -1
- package/src/src/models/Unsubscribe.ts +1 -1
- package/src/src/models/UnsubscribeListResponse.ts +1 -1
- package/src/src/models/UnsubscribeRequest.ts +1 -1
- package/src/src/models/UnsubscribeResponse.ts +1 -1
- package/src/src/models/UpdateCategoryRequest.ts +1 -1
- package/src/src/models/UpdateEndUserByApplicationRequest.ts +97 -0
- package/src/src/models/UpdateEndUserRequest.ts +1 -1
- package/src/src/models/UpdateOrganizationMemberRoleRequest.ts +1 -1
- package/src/src/models/UpdateOrganizationRequest.ts +1 -1
- package/src/src/models/UpdateSubscriberPreferencesRequest.ts +1 -1
- package/src/src/models/UpdateSubscriberPreferencesRequestPreferencesInner.ts +1 -1
- package/src/src/models/UpdateSubscriberRequest.ts +1 -1
- package/src/src/models/UpdateTemplateRequest.ts +1 -1
- package/src/src/models/UpdateTopicRequest.ts +1 -1
- package/src/src/models/UpdateWaaSApplicationRequest.ts +1 -1
- package/src/src/models/UpdateWaaSEndpointRequest.ts +1 -1
- package/src/src/models/UpdateWaaSEventTypeRequest.ts +1 -1
- package/src/src/models/UpdateWebhookRequest.ts +1 -1
- package/src/src/models/UpsertAuthEmailTemplateRequest.ts +1 -1
- package/src/src/models/UpsertSmsConfigRequest.ts +1 -1
- package/src/src/models/UserDevicesDeleteResponse.ts +1 -1
- package/src/src/models/UserDevicesDeleteResponseData.ts +1 -1
- package/src/src/models/V1MuseSubjectsSuggestPostRequest.ts +1 -1
- package/src/src/models/ValidateResetTokenRequest.ts +1 -1
- package/src/src/models/ValidateResetTokenResponse.ts +1 -1
- package/src/src/models/ValidateResetTokenResponseData.ts +1 -1
- package/src/src/models/VerificationStatusResponse.ts +1 -1
- package/src/src/models/VerificationStatusResponseData.ts +1 -1
- package/src/src/models/VerifyDomainResponse.ts +1 -1
- package/src/src/models/VerifyDomainResponseData.ts +1 -1
- package/src/src/models/VerifyEmailOtpLoginRequest.ts +1 -1
- package/src/src/models/VerifyEmailOtpRegistrationRequest.ts +1 -1
- package/src/src/models/VerifySmsConfigData.ts +1 -1
- package/src/src/models/VerifySmsConfigResponse.ts +1 -1
- package/src/src/models/WaaSApplication.ts +1 -1
- package/src/src/models/WaaSBatchPublishRequest.ts +1 -1
- package/src/src/models/WaaSBatchPublishResponse.ts +1 -1
- package/src/src/models/WaaSDelivery.ts +1 -1
- package/src/src/models/WaaSEndpoint.ts +1 -1
- package/src/src/models/WaaSEventType.ts +1 -1
- package/src/src/models/WaaSPortalTokenRequest.ts +1 -1
- package/src/src/models/WaaSPortalTokenRequestTheme.ts +1 -1
- package/src/src/models/WaaSPortalTokenResponse.ts +1 -1
- package/src/src/models/WaaSPublishEventRequest.ts +1 -1
- package/src/src/models/WaaSPublishEventResponse.ts +1 -1
- package/src/src/models/WaaSUsageResponse.ts +1 -1
- package/src/src/models/WebAuthnChallengeOptions.ts +1 -1
- package/src/src/models/WebAuthnCredential.ts +1 -1
- package/src/src/models/WebAuthnCredentialListResponse.ts +1 -1
- package/src/src/models/WebAuthnCredentialListResponseData.ts +1 -1
- package/src/src/models/WebAuthnCredentialResponse.ts +1 -1
- package/src/src/models/WebAuthnStartAuthRequest.ts +1 -1
- package/src/src/models/WebAuthnStartAuthResponse.ts +1 -1
- package/src/src/models/WebAuthnStartRegistrationRequest.ts +1 -1
- package/src/src/models/WebAuthnStartRegistrationResponse.ts +1 -1
- package/src/src/models/WebAuthnStatusResponse.ts +1 -1
- package/src/src/models/WebAuthnStatusResponseData.ts +1 -1
- package/src/src/models/WebAuthnVerifyAuthRequest.ts +1 -1
- package/src/src/models/WebAuthnVerifyRegistrationRequest.ts +1 -1
- package/src/src/models/WebAuthnVerifyRegistrationResponse.ts +1 -1
- package/src/src/models/WebAuthnVerifyRegistrationResponseData.ts +1 -1
- package/src/src/models/Webhook.ts +1 -1
- package/src/src/models/WebhookAccountMetricsResponse.ts +1 -1
- package/src/src/models/WebhookBulkRetryResponse.ts +1 -1
- package/src/src/models/WebhookCircuitState.ts +1 -1
- package/src/src/models/WebhookCircuitStateResponse.ts +1 -1
- package/src/src/models/WebhookCreateResponse.ts +1 -1
- package/src/src/models/WebhookCreateResponseData.ts +1 -1
- package/src/src/models/WebhookDeleteResponse.ts +1 -1
- package/src/src/models/WebhookDeleteResponseData.ts +1 -1
- package/src/src/models/WebhookDelivery.ts +1 -1
- package/src/src/models/WebhookDeliveryDetail.ts +1 -1
- package/src/src/models/WebhookDeliveryListResponse.ts +1 -1
- package/src/src/models/WebhookDeliveryResponse.ts +1 -1
- package/src/src/models/WebhookDeliveryRetryResponse.ts +1 -1
- package/src/src/models/WebhookDeliveryRetryResponseData.ts +1 -1
- package/src/src/models/WebhookEventTypesResponse.ts +1 -1
- package/src/src/models/WebhookEventTypesResponseData.ts +1 -1
- package/src/src/models/WebhookIpsResponse.ts +1 -1
- package/src/src/models/WebhookIpsResponseData.ts +1 -1
- package/src/src/models/WebhookJobResponse.ts +1 -1
- package/src/src/models/WebhookListResponse.ts +1 -1
- package/src/src/models/WebhookMetricsResponse.ts +1 -1
- package/src/src/models/WebhookRegion.ts +1 -1
- package/src/src/models/WebhookRegionsResponse.ts +1 -1
- package/src/src/models/WebhookRegionsResponseData.ts +1 -1
- package/src/src/models/WebhookReplayResponse.ts +1 -1
- package/src/src/models/WebhookResponse.ts +1 -1
- package/src/src/models/WebhookSecretRotateResponse.ts +1 -1
- package/src/src/models/WebhookSecretRotateResponseData.ts +1 -1
- package/src/src/models/WebhookTestEventResponse.ts +1 -1
- package/src/src/models/WebhookTestEventResponseData.ts +1 -1
- package/src/src/models/WebhookTransformTestResponse.ts +1 -1
- package/src/src/models/WebhookUsageResponse.ts +1 -1
- package/src/src/models/WebhookVersion.ts +1 -1
- package/src/src/models/WebhookVersionsResponse.ts +1 -1
- package/src/src/models/WebhookVersionsResponseData.ts +1 -1
- package/src/src/models/WithdrawSubscriberConsentRequest.ts +1 -1
- package/src/src/models/WorkflowExecution.ts +1 -1
- package/src/src/models/WorkflowExecutionStatus.ts +1 -1
- package/src/src/models/WorkflowStepExecution.ts +1 -1
- package/src/src/models/WorkflowStepExecutionStatus.ts +1 -1
- package/src/src/models/index.ts +6 -0
- package/src/src/runtime.ts +1 -1
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Zyphr API
|
|
5
|
+
* Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account\'s current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@zyphr.dev
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
InviteEndUserRequest,
|
|
19
|
+
SetEndUserClaimsRequest,
|
|
20
|
+
UpdateEndUserByApplicationRequest,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
InviteEndUserRequestFromJSON,
|
|
24
|
+
InviteEndUserRequestToJSON,
|
|
25
|
+
SetEndUserClaimsRequestFromJSON,
|
|
26
|
+
SetEndUserClaimsRequestToJSON,
|
|
27
|
+
UpdateEndUserByApplicationRequestFromJSON,
|
|
28
|
+
UpdateEndUserByApplicationRequestToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface AuthUserDirectoryApiDeleteEndUserByApplicationRequest {
|
|
32
|
+
userId: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface AuthUserDirectoryApiGetEndUserByEmailRequest {
|
|
36
|
+
email: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface AuthUserDirectoryApiGetEndUserByIdRequest {
|
|
40
|
+
userId: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface AuthUserDirectoryApiGetEndUserClaimsRequest {
|
|
44
|
+
userId: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface AuthUserDirectoryApiInviteEndUserOperationRequest {
|
|
48
|
+
inviteEndUserRequest: InviteEndUserRequest;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface AuthUserDirectoryApiListEndUsersRequest {
|
|
52
|
+
page?: number;
|
|
53
|
+
perPage?: number;
|
|
54
|
+
search?: string;
|
|
55
|
+
environment?: ListEndUsersEnvironmentEnum;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface AuthUserDirectoryApiSetEndUserClaimsOperationRequest {
|
|
59
|
+
userId: string;
|
|
60
|
+
setEndUserClaimsRequest: SetEndUserClaimsRequest;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface AuthUserDirectoryApiUpdateEndUserByApplicationOperationRequest {
|
|
64
|
+
userId: string;
|
|
65
|
+
updateEndUserByApplicationRequest: UpdateEndUserByApplicationRequest;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* AuthUserDirectoryApi - interface
|
|
70
|
+
*
|
|
71
|
+
* @export
|
|
72
|
+
* @interface AuthUserDirectoryApiInterface
|
|
73
|
+
*/
|
|
74
|
+
export interface AuthUserDirectoryApiInterface {
|
|
75
|
+
/**
|
|
76
|
+
* Secret-key-scoped admin soft-delete for an arbitrary end user in the authenticating application. Works in both test and live environments. Scoped to the application via the application_id filter — a caller can never delete a user belonging to another application. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status=\'deleted\'), and emits a `user.deleted` webhook with `method=\'application_admin\'`. The audit log row survives (no FK to end_users), so org-history queries still resolve.
|
|
77
|
+
* @summary Delete an end user (server-side admin)
|
|
78
|
+
* @param {string} userId
|
|
79
|
+
* @param {*} [options] Override http request option.
|
|
80
|
+
* @throws {RequiredError}
|
|
81
|
+
* @memberof AuthUserDirectoryApiInterface
|
|
82
|
+
*/
|
|
83
|
+
deleteEndUserByApplicationRaw(requestParameters: AuthUserDirectoryApiDeleteEndUserByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Secret-key-scoped admin soft-delete for an arbitrary end user in the authenticating application. Works in both test and live environments. Scoped to the application via the application_id filter — a caller can never delete a user belonging to another application. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status=\'deleted\'), and emits a `user.deleted` webhook with `method=\'application_admin\'`. The audit log row survives (no FK to end_users), so org-history queries still resolve.
|
|
87
|
+
* Delete an end user (server-side admin)
|
|
88
|
+
*/
|
|
89
|
+
deleteEndUserByApplication(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Secret-key-scoped lookup of a single end user by email address within the authenticating application. Scoped to the application — never resolves a user from another application. Does not return the password hash.
|
|
93
|
+
* @summary Look up an end user by email (server-side admin)
|
|
94
|
+
* @param {string} email
|
|
95
|
+
* @param {*} [options] Override http request option.
|
|
96
|
+
* @throws {RequiredError}
|
|
97
|
+
* @memberof AuthUserDirectoryApiInterface
|
|
98
|
+
*/
|
|
99
|
+
getEndUserByEmailRaw(requestParameters: AuthUserDirectoryApiGetEndUserByEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Secret-key-scoped lookup of a single end user by email address within the authenticating application. Scoped to the application — never resolves a user from another application. Does not return the password hash.
|
|
103
|
+
* Look up an end user by email (server-side admin)
|
|
104
|
+
*/
|
|
105
|
+
getEndUserByEmail(email: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Secret-key-scoped fetch of a single end user by id within the authenticating application. Scoped to the application — a caller can never read a user belonging to another application.
|
|
109
|
+
* @summary Get an end user by id (server-side admin)
|
|
110
|
+
* @param {string} userId
|
|
111
|
+
* @param {*} [options] Override http request option.
|
|
112
|
+
* @throws {RequiredError}
|
|
113
|
+
* @memberof AuthUserDirectoryApiInterface
|
|
114
|
+
*/
|
|
115
|
+
getEndUserByIdRaw(requestParameters: AuthUserDirectoryApiGetEndUserByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Secret-key-scoped fetch of a single end user by id within the authenticating application. Scoped to the application — a caller can never read a user belonging to another application.
|
|
119
|
+
* Get an end user by id (server-side admin)
|
|
120
|
+
*/
|
|
121
|
+
getEndUserById(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Secret-key-scoped read of the authoritative custom_claims stored for an end user. These are the TRUSTED claims embedded into the user\'s JWTs on login/refresh — use them (not the client-writable `metadata` field) for authorization decisions. Returns an empty object when none are set.
|
|
125
|
+
* @summary Get an end user\'s stored custom claims (server-side admin)
|
|
126
|
+
* @param {string} userId
|
|
127
|
+
* @param {*} [options] Override http request option.
|
|
128
|
+
* @throws {RequiredError}
|
|
129
|
+
* @memberof AuthUserDirectoryApiInterface
|
|
130
|
+
*/
|
|
131
|
+
getEndUserClaimsRaw(requestParameters: AuthUserDirectoryApiGetEndUserClaimsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Secret-key-scoped read of the authoritative custom_claims stored for an end user. These are the TRUSTED claims embedded into the user\'s JWTs on login/refresh — use them (not the client-writable `metadata` field) for authorization decisions. Returns an empty object when none are set.
|
|
135
|
+
* Get an end user\'s stored custom claims (server-side admin)
|
|
136
|
+
*/
|
|
137
|
+
getEndUserClaims(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
|
|
141
|
+
* @summary Pre-provision (invite) an end user (server-side admin)
|
|
142
|
+
* @param {InviteEndUserRequest} inviteEndUserRequest
|
|
143
|
+
* @param {*} [options] Override http request option.
|
|
144
|
+
* @throws {RequiredError}
|
|
145
|
+
* @memberof AuthUserDirectoryApiInterface
|
|
146
|
+
*/
|
|
147
|
+
inviteEndUserRaw(requestParameters: AuthUserDirectoryApiInviteEndUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
|
|
151
|
+
* Pre-provision (invite) an end user (server-side admin)
|
|
152
|
+
*/
|
|
153
|
+
inviteEndUser(inviteEndUserRequest: InviteEndUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Secret-key-scoped directory listing of end users in the authenticating application. Supports substring search over email, name, and phone, an optional environment filter (test/live), and pagination. Scoped to the application — never returns users from another application.
|
|
157
|
+
* @summary List / search end users (server-side admin)
|
|
158
|
+
* @param {number} [page]
|
|
159
|
+
* @param {number} [perPage]
|
|
160
|
+
* @param {string} [search] Substring match against email, name, or phone number.
|
|
161
|
+
* @param {'test' | 'live'} [environment]
|
|
162
|
+
* @param {*} [options] Override http request option.
|
|
163
|
+
* @throws {RequiredError}
|
|
164
|
+
* @memberof AuthUserDirectoryApiInterface
|
|
165
|
+
*/
|
|
166
|
+
listEndUsersRaw(requestParameters: AuthUserDirectoryApiListEndUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Secret-key-scoped directory listing of end users in the authenticating application. Supports substring search over email, name, and phone, an optional environment filter (test/live), and pagination. Scoped to the application — never returns users from another application.
|
|
170
|
+
* List / search end users (server-side admin)
|
|
171
|
+
*/
|
|
172
|
+
listEndUsers(page?: number, perPage?: number, search?: string, environment?: ListEndUsersEnvironmentEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Secret-key-scoped upsert of the authoritative custom_claims for an end user. Set server-side only — clients cannot write these, which is what makes them safe for authorization (e.g. an account-type/admin flag). Claims are embedded into the user\'s JWTs on the next login/refresh. Max 4KB; reserved JWT/Zyphr claim names are rejected. To make a change take effect immediately on already-issued tokens (e.g. revoking admin), call POST /auth/sessions/revoke-all for the user after updating claims — that bumps the revocation epoch so outstanding access tokens stop verifying.
|
|
176
|
+
* @summary Set an end user\'s stored custom claims (server-side admin)
|
|
177
|
+
* @param {string} userId
|
|
178
|
+
* @param {SetEndUserClaimsRequest} setEndUserClaimsRequest
|
|
179
|
+
* @param {*} [options] Override http request option.
|
|
180
|
+
* @throws {RequiredError}
|
|
181
|
+
* @memberof AuthUserDirectoryApiInterface
|
|
182
|
+
*/
|
|
183
|
+
setEndUserClaimsRaw(requestParameters: AuthUserDirectoryApiSetEndUserClaimsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Secret-key-scoped upsert of the authoritative custom_claims for an end user. Set server-side only — clients cannot write these, which is what makes them safe for authorization (e.g. an account-type/admin flag). Claims are embedded into the user\'s JWTs on the next login/refresh. Max 4KB; reserved JWT/Zyphr claim names are rejected. To make a change take effect immediately on already-issued tokens (e.g. revoking admin), call POST /auth/sessions/revoke-all for the user after updating claims — that bumps the revocation epoch so outstanding access tokens stop verifying.
|
|
187
|
+
* Set an end user\'s stored custom claims (server-side admin)
|
|
188
|
+
*/
|
|
189
|
+
setEndUserClaims(userId: string, setEndUserClaimsRequest: SetEndUserClaimsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Secret-key-scoped update of an arbitrary end user in the authenticating application. Updatable fields: email, name, avatar_url, metadata, status. Scoped to the application — a caller can never modify a user belonging to another application.
|
|
193
|
+
* @summary Update an end user (server-side admin)
|
|
194
|
+
* @param {string} userId
|
|
195
|
+
* @param {UpdateEndUserByApplicationRequest} updateEndUserByApplicationRequest
|
|
196
|
+
* @param {*} [options] Override http request option.
|
|
197
|
+
* @throws {RequiredError}
|
|
198
|
+
* @memberof AuthUserDirectoryApiInterface
|
|
199
|
+
*/
|
|
200
|
+
updateEndUserByApplicationRaw(requestParameters: AuthUserDirectoryApiUpdateEndUserByApplicationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Secret-key-scoped update of an arbitrary end user in the authenticating application. Updatable fields: email, name, avatar_url, metadata, status. Scoped to the application — a caller can never modify a user belonging to another application.
|
|
204
|
+
* Update an end user (server-side admin)
|
|
205
|
+
*/
|
|
206
|
+
updateEndUserByApplication(userId: string, updateEndUserByApplicationRequest: UpdateEndUserByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
*/
|
|
213
|
+
export class AuthUserDirectoryApi extends runtime.BaseAPI implements AuthUserDirectoryApiInterface {
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Secret-key-scoped admin soft-delete for an arbitrary end user in the authenticating application. Works in both test and live environments. Scoped to the application via the application_id filter — a caller can never delete a user belonging to another application. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status=\'deleted\'), and emits a `user.deleted` webhook with `method=\'application_admin\'`. The audit log row survives (no FK to end_users), so org-history queries still resolve.
|
|
217
|
+
* Delete an end user (server-side admin)
|
|
218
|
+
*/
|
|
219
|
+
async deleteEndUserByApplicationRaw(requestParameters: AuthUserDirectoryApiDeleteEndUserByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
220
|
+
if (requestParameters['userId'] == null) {
|
|
221
|
+
throw new runtime.RequiredError(
|
|
222
|
+
'userId',
|
|
223
|
+
'Required parameter "userId" was null or undefined when calling deleteEndUserByApplication().'
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const queryParameters: any = {};
|
|
228
|
+
|
|
229
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
230
|
+
|
|
231
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
232
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
236
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const response = await this.request({
|
|
240
|
+
path: `/auth/users/{user_id}`.replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
241
|
+
method: 'DELETE',
|
|
242
|
+
headers: headerParameters,
|
|
243
|
+
query: queryParameters,
|
|
244
|
+
}, initOverrides);
|
|
245
|
+
|
|
246
|
+
return new runtime.VoidApiResponse(response);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Secret-key-scoped admin soft-delete for an arbitrary end user in the authenticating application. Works in both test and live environments. Scoped to the application via the application_id filter — a caller can never delete a user belonging to another application. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status=\'deleted\'), and emits a `user.deleted` webhook with `method=\'application_admin\'`. The audit log row survives (no FK to end_users), so org-history queries still resolve.
|
|
251
|
+
* Delete an end user (server-side admin)
|
|
252
|
+
*/
|
|
253
|
+
async deleteEndUserByApplication(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
254
|
+
await this.deleteEndUserByApplicationRaw({ userId: userId }, initOverrides);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Secret-key-scoped lookup of a single end user by email address within the authenticating application. Scoped to the application — never resolves a user from another application. Does not return the password hash.
|
|
259
|
+
* Look up an end user by email (server-side admin)
|
|
260
|
+
*/
|
|
261
|
+
async getEndUserByEmailRaw(requestParameters: AuthUserDirectoryApiGetEndUserByEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
262
|
+
if (requestParameters['email'] == null) {
|
|
263
|
+
throw new runtime.RequiredError(
|
|
264
|
+
'email',
|
|
265
|
+
'Required parameter "email" was null or undefined when calling getEndUserByEmail().'
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const queryParameters: any = {};
|
|
270
|
+
|
|
271
|
+
if (requestParameters['email'] != null) {
|
|
272
|
+
queryParameters['email'] = requestParameters['email'];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
276
|
+
|
|
277
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
278
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
282
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const response = await this.request({
|
|
286
|
+
path: `/auth/users/by-email`,
|
|
287
|
+
method: 'GET',
|
|
288
|
+
headers: headerParameters,
|
|
289
|
+
query: queryParameters,
|
|
290
|
+
}, initOverrides);
|
|
291
|
+
|
|
292
|
+
return new runtime.VoidApiResponse(response);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Secret-key-scoped lookup of a single end user by email address within the authenticating application. Scoped to the application — never resolves a user from another application. Does not return the password hash.
|
|
297
|
+
* Look up an end user by email (server-side admin)
|
|
298
|
+
*/
|
|
299
|
+
async getEndUserByEmail(email: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
300
|
+
await this.getEndUserByEmailRaw({ email: email }, initOverrides);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Secret-key-scoped fetch of a single end user by id within the authenticating application. Scoped to the application — a caller can never read a user belonging to another application.
|
|
305
|
+
* Get an end user by id (server-side admin)
|
|
306
|
+
*/
|
|
307
|
+
async getEndUserByIdRaw(requestParameters: AuthUserDirectoryApiGetEndUserByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
308
|
+
if (requestParameters['userId'] == null) {
|
|
309
|
+
throw new runtime.RequiredError(
|
|
310
|
+
'userId',
|
|
311
|
+
'Required parameter "userId" was null or undefined when calling getEndUserById().'
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const queryParameters: any = {};
|
|
316
|
+
|
|
317
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
318
|
+
|
|
319
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
320
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
324
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const response = await this.request({
|
|
328
|
+
path: `/auth/users/{user_id}`.replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
329
|
+
method: 'GET',
|
|
330
|
+
headers: headerParameters,
|
|
331
|
+
query: queryParameters,
|
|
332
|
+
}, initOverrides);
|
|
333
|
+
|
|
334
|
+
return new runtime.VoidApiResponse(response);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Secret-key-scoped fetch of a single end user by id within the authenticating application. Scoped to the application — a caller can never read a user belonging to another application.
|
|
339
|
+
* Get an end user by id (server-side admin)
|
|
340
|
+
*/
|
|
341
|
+
async getEndUserById(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
342
|
+
await this.getEndUserByIdRaw({ userId: userId }, initOverrides);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Secret-key-scoped read of the authoritative custom_claims stored for an end user. These are the TRUSTED claims embedded into the user\'s JWTs on login/refresh — use them (not the client-writable `metadata` field) for authorization decisions. Returns an empty object when none are set.
|
|
347
|
+
* Get an end user\'s stored custom claims (server-side admin)
|
|
348
|
+
*/
|
|
349
|
+
async getEndUserClaimsRaw(requestParameters: AuthUserDirectoryApiGetEndUserClaimsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
350
|
+
if (requestParameters['userId'] == null) {
|
|
351
|
+
throw new runtime.RequiredError(
|
|
352
|
+
'userId',
|
|
353
|
+
'Required parameter "userId" was null or undefined when calling getEndUserClaims().'
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const queryParameters: any = {};
|
|
358
|
+
|
|
359
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
360
|
+
|
|
361
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
362
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
366
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
const response = await this.request({
|
|
370
|
+
path: `/auth/users/{user_id}/claims`.replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
371
|
+
method: 'GET',
|
|
372
|
+
headers: headerParameters,
|
|
373
|
+
query: queryParameters,
|
|
374
|
+
}, initOverrides);
|
|
375
|
+
|
|
376
|
+
return new runtime.VoidApiResponse(response);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Secret-key-scoped read of the authoritative custom_claims stored for an end user. These are the TRUSTED claims embedded into the user\'s JWTs on login/refresh — use them (not the client-writable `metadata` field) for authorization decisions. Returns an empty object when none are set.
|
|
381
|
+
* Get an end user\'s stored custom claims (server-side admin)
|
|
382
|
+
*/
|
|
383
|
+
async getEndUserClaims(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
384
|
+
await this.getEndUserClaimsRaw({ userId: userId }, initOverrides);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
|
|
389
|
+
* Pre-provision (invite) an end user (server-side admin)
|
|
390
|
+
*/
|
|
391
|
+
async inviteEndUserRaw(requestParameters: AuthUserDirectoryApiInviteEndUserOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
392
|
+
if (requestParameters['inviteEndUserRequest'] == null) {
|
|
393
|
+
throw new runtime.RequiredError(
|
|
394
|
+
'inviteEndUserRequest',
|
|
395
|
+
'Required parameter "inviteEndUserRequest" was null or undefined when calling inviteEndUser().'
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
const queryParameters: any = {};
|
|
400
|
+
|
|
401
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
402
|
+
|
|
403
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
404
|
+
|
|
405
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
406
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
410
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
const response = await this.request({
|
|
414
|
+
path: `/auth/users/invite`,
|
|
415
|
+
method: 'POST',
|
|
416
|
+
headers: headerParameters,
|
|
417
|
+
query: queryParameters,
|
|
418
|
+
body: InviteEndUserRequestToJSON(requestParameters['inviteEndUserRequest']),
|
|
419
|
+
}, initOverrides);
|
|
420
|
+
|
|
421
|
+
return new runtime.VoidApiResponse(response);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Secret-key-scoped pre-provisioning for an end user. Creates a passwordless user in the authenticating application (idempotent on email — an existing, non-deleted user is reused, not duplicated) and, when `send_link` is set, sends a first-login link so the user can set up their account without self-registration. - `send_link: \"magic\"` sends a magic-link sign-in email. - `send_link: \"password_reset\"` sends a set-password email. - `send_link: \"none\"` (default) creates the user with no email. A `redirect_url` is required when `send_link` is \"magic\" or \"password_reset\"; it must match the application\'s redirect_uris allowlist (custom schemes such as yourapp://path are permitted).
|
|
426
|
+
* Pre-provision (invite) an end user (server-side admin)
|
|
427
|
+
*/
|
|
428
|
+
async inviteEndUser(inviteEndUserRequest: InviteEndUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
429
|
+
await this.inviteEndUserRaw({ inviteEndUserRequest: inviteEndUserRequest }, initOverrides);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Secret-key-scoped directory listing of end users in the authenticating application. Supports substring search over email, name, and phone, an optional environment filter (test/live), and pagination. Scoped to the application — never returns users from another application.
|
|
434
|
+
* List / search end users (server-side admin)
|
|
435
|
+
*/
|
|
436
|
+
async listEndUsersRaw(requestParameters: AuthUserDirectoryApiListEndUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
437
|
+
const queryParameters: any = {};
|
|
438
|
+
|
|
439
|
+
if (requestParameters['page'] != null) {
|
|
440
|
+
queryParameters['page'] = requestParameters['page'];
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (requestParameters['perPage'] != null) {
|
|
444
|
+
queryParameters['per_page'] = requestParameters['perPage'];
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
if (requestParameters['search'] != null) {
|
|
448
|
+
queryParameters['search'] = requestParameters['search'];
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
if (requestParameters['environment'] != null) {
|
|
452
|
+
queryParameters['environment'] = requestParameters['environment'];
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
456
|
+
|
|
457
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
458
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
462
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
const response = await this.request({
|
|
466
|
+
path: `/auth/users`,
|
|
467
|
+
method: 'GET',
|
|
468
|
+
headers: headerParameters,
|
|
469
|
+
query: queryParameters,
|
|
470
|
+
}, initOverrides);
|
|
471
|
+
|
|
472
|
+
return new runtime.VoidApiResponse(response);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Secret-key-scoped directory listing of end users in the authenticating application. Supports substring search over email, name, and phone, an optional environment filter (test/live), and pagination. Scoped to the application — never returns users from another application.
|
|
477
|
+
* List / search end users (server-side admin)
|
|
478
|
+
*/
|
|
479
|
+
async listEndUsers(page?: number, perPage?: number, search?: string, environment?: ListEndUsersEnvironmentEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
480
|
+
await this.listEndUsersRaw({ page: page, perPage: perPage, search: search, environment: environment }, initOverrides);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Secret-key-scoped upsert of the authoritative custom_claims for an end user. Set server-side only — clients cannot write these, which is what makes them safe for authorization (e.g. an account-type/admin flag). Claims are embedded into the user\'s JWTs on the next login/refresh. Max 4KB; reserved JWT/Zyphr claim names are rejected. To make a change take effect immediately on already-issued tokens (e.g. revoking admin), call POST /auth/sessions/revoke-all for the user after updating claims — that bumps the revocation epoch so outstanding access tokens stop verifying.
|
|
485
|
+
* Set an end user\'s stored custom claims (server-side admin)
|
|
486
|
+
*/
|
|
487
|
+
async setEndUserClaimsRaw(requestParameters: AuthUserDirectoryApiSetEndUserClaimsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
488
|
+
if (requestParameters['userId'] == null) {
|
|
489
|
+
throw new runtime.RequiredError(
|
|
490
|
+
'userId',
|
|
491
|
+
'Required parameter "userId" was null or undefined when calling setEndUserClaims().'
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
if (requestParameters['setEndUserClaimsRequest'] == null) {
|
|
496
|
+
throw new runtime.RequiredError(
|
|
497
|
+
'setEndUserClaimsRequest',
|
|
498
|
+
'Required parameter "setEndUserClaimsRequest" was null or undefined when calling setEndUserClaims().'
|
|
499
|
+
);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
const queryParameters: any = {};
|
|
503
|
+
|
|
504
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
505
|
+
|
|
506
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
507
|
+
|
|
508
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
509
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
513
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
const response = await this.request({
|
|
517
|
+
path: `/auth/users/{user_id}/claims`.replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
518
|
+
method: 'PUT',
|
|
519
|
+
headers: headerParameters,
|
|
520
|
+
query: queryParameters,
|
|
521
|
+
body: SetEndUserClaimsRequestToJSON(requestParameters['setEndUserClaimsRequest']),
|
|
522
|
+
}, initOverrides);
|
|
523
|
+
|
|
524
|
+
return new runtime.VoidApiResponse(response);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Secret-key-scoped upsert of the authoritative custom_claims for an end user. Set server-side only — clients cannot write these, which is what makes them safe for authorization (e.g. an account-type/admin flag). Claims are embedded into the user\'s JWTs on the next login/refresh. Max 4KB; reserved JWT/Zyphr claim names are rejected. To make a change take effect immediately on already-issued tokens (e.g. revoking admin), call POST /auth/sessions/revoke-all for the user after updating claims — that bumps the revocation epoch so outstanding access tokens stop verifying.
|
|
529
|
+
* Set an end user\'s stored custom claims (server-side admin)
|
|
530
|
+
*/
|
|
531
|
+
async setEndUserClaims(userId: string, setEndUserClaimsRequest: SetEndUserClaimsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
532
|
+
await this.setEndUserClaimsRaw({ userId: userId, setEndUserClaimsRequest: setEndUserClaimsRequest }, initOverrides);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Secret-key-scoped update of an arbitrary end user in the authenticating application. Updatable fields: email, name, avatar_url, metadata, status. Scoped to the application — a caller can never modify a user belonging to another application.
|
|
537
|
+
* Update an end user (server-side admin)
|
|
538
|
+
*/
|
|
539
|
+
async updateEndUserByApplicationRaw(requestParameters: AuthUserDirectoryApiUpdateEndUserByApplicationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
540
|
+
if (requestParameters['userId'] == null) {
|
|
541
|
+
throw new runtime.RequiredError(
|
|
542
|
+
'userId',
|
|
543
|
+
'Required parameter "userId" was null or undefined when calling updateEndUserByApplication().'
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
if (requestParameters['updateEndUserByApplicationRequest'] == null) {
|
|
548
|
+
throw new runtime.RequiredError(
|
|
549
|
+
'updateEndUserByApplicationRequest',
|
|
550
|
+
'Required parameter "updateEndUserByApplicationRequest" was null or undefined when calling updateEndUserByApplication().'
|
|
551
|
+
);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
const queryParameters: any = {};
|
|
555
|
+
|
|
556
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
557
|
+
|
|
558
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
559
|
+
|
|
560
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
561
|
+
headerParameters["X-Application-Secret"] = await this.configuration.apiKey("X-Application-Secret"); // ApplicationSecret authentication
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
565
|
+
headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
const response = await this.request({
|
|
569
|
+
path: `/auth/users/{user_id}`.replace(`{${"user_id"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
570
|
+
method: 'PATCH',
|
|
571
|
+
headers: headerParameters,
|
|
572
|
+
query: queryParameters,
|
|
573
|
+
body: UpdateEndUserByApplicationRequestToJSON(requestParameters['updateEndUserByApplicationRequest']),
|
|
574
|
+
}, initOverrides);
|
|
575
|
+
|
|
576
|
+
return new runtime.VoidApiResponse(response);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Secret-key-scoped update of an arbitrary end user in the authenticating application. Updatable fields: email, name, avatar_url, metadata, status. Scoped to the application — a caller can never modify a user belonging to another application.
|
|
581
|
+
* Update an end user (server-side admin)
|
|
582
|
+
*/
|
|
583
|
+
async updateEndUserByApplication(userId: string, updateEndUserByApplicationRequest: UpdateEndUserByApplicationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
584
|
+
await this.updateEndUserByApplicationRaw({ userId: userId, updateEndUserByApplicationRequest: updateEndUserByApplicationRequest }, initOverrides);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* @export
|
|
591
|
+
*/
|
|
592
|
+
export const ListEndUsersEnvironmentEnum = {
|
|
593
|
+
TEST: 'test',
|
|
594
|
+
LIVE: 'live'
|
|
595
|
+
} as const;
|
|
596
|
+
export type ListEndUsersEnvironmentEnum = typeof ListEndUsersEnvironmentEnum[keyof typeof ListEndUsersEnvironmentEnum];
|