@fonderie/client 0.15.0 → 0.16.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/brain/signatures.md +41 -0
- package/dist/index.cjs +43 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -1
- package/dist/index.d.ts +41 -1
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -270,6 +270,7 @@ interface IInvoiceDTO {
|
|
|
270
270
|
currency: string;
|
|
271
271
|
status: string;
|
|
272
272
|
created: string;
|
|
273
|
+
dueDate: string | null;
|
|
273
274
|
hostedInvoiceUrl: string | null;
|
|
274
275
|
invoicePdf: string | null;
|
|
275
276
|
}
|
|
@@ -441,6 +442,30 @@ interface IAuditPageResult {
|
|
|
441
442
|
events: IAuditEventDTO[];
|
|
442
443
|
nextCursor: string | null;
|
|
443
444
|
}
|
|
445
|
+
interface ILoginEventDTO {
|
|
446
|
+
id: string;
|
|
447
|
+
method: string;
|
|
448
|
+
outcome: string;
|
|
449
|
+
failureReason: string | null;
|
|
450
|
+
ipAddress: string | null;
|
|
451
|
+
userAgent: string | null;
|
|
452
|
+
createdAt: string;
|
|
453
|
+
}
|
|
454
|
+
interface ILoginHistoryPageResult {
|
|
455
|
+
events: ILoginEventDTO[];
|
|
456
|
+
nextCursor: string | null;
|
|
457
|
+
}
|
|
458
|
+
interface ISessionDTO {
|
|
459
|
+
id: string;
|
|
460
|
+
current: boolean;
|
|
461
|
+
ipAddress: string | null;
|
|
462
|
+
userAgent: string | null;
|
|
463
|
+
createdAt: string;
|
|
464
|
+
expiresAt: string;
|
|
465
|
+
}
|
|
466
|
+
interface ISessionsResult {
|
|
467
|
+
sessions: ISessionDTO[];
|
|
468
|
+
}
|
|
444
469
|
interface IWebhookEndpointDTO {
|
|
445
470
|
id: string;
|
|
446
471
|
url: string;
|
|
@@ -646,6 +671,13 @@ interface IRegisterInput {
|
|
|
646
671
|
firstName?: string;
|
|
647
672
|
lastName?: string;
|
|
648
673
|
}
|
|
674
|
+
interface IGetLoginHistoryInput {
|
|
675
|
+
outcome?: 'success' | 'failed';
|
|
676
|
+
from?: Date;
|
|
677
|
+
to?: Date;
|
|
678
|
+
limit?: number;
|
|
679
|
+
cursor?: string;
|
|
680
|
+
}
|
|
649
681
|
interface ILoginInput {
|
|
650
682
|
email: string;
|
|
651
683
|
password: string;
|
|
@@ -710,6 +742,14 @@ declare class AuthClient {
|
|
|
710
742
|
changePassword(input: IChangePasswordInput): Promise<IApiResponse<undefined>>;
|
|
711
743
|
exportData(): Promise<IApiResponse<unknown>>;
|
|
712
744
|
deleteUser(): Promise<IApiResponse<undefined>>;
|
|
745
|
+
getLoginHistory(input?: IGetLoginHistoryInput, opts?: IReadOptions): Promise<IApiResponse<ILoginHistoryPageResult>>;
|
|
746
|
+
listSessions(opts?: IReadOptions): Promise<IApiResponse<ISessionsResult>>;
|
|
747
|
+
terminateSession(id: string): Promise<IApiResponse<{
|
|
748
|
+
id: string;
|
|
749
|
+
}>>;
|
|
750
|
+
terminateOtherSessions(): Promise<IApiResponse<{
|
|
751
|
+
count: number;
|
|
752
|
+
}>>;
|
|
713
753
|
}
|
|
714
754
|
|
|
715
755
|
interface ICheckoutInput {
|
|
@@ -1103,4 +1143,4 @@ declare class CourierAdminClient {
|
|
|
1103
1143
|
rollback(type: string, input: IRollbackTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
|
|
1104
1144
|
}
|
|
1105
1145
|
|
|
1106
|
-
export { AuditClient, AuthClient, BillingClient, ConfigAdminClient, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, FonderieApiError, FonderieClient, type IAcceptInvitationResult, type IAddAddressInput, type IAddEmailInput, type IAddPhoneInput, type IAddRelationshipInput, type IAddressDTO, type IApiError, type IApiResponse, type IAuditEventDTO, type IAuditPageResult, type IBlacklistCustomerInput, type ICache, type ICancelSubscriptionInput, type IChangePasswordInput, type ICheckoutInput, type ICheckoutUrlResult, type IClientAuthConfig, type IConfigAdminClientOptions, type IConfigEntry, type IConfigRevision, type ICourierAdminClientOptions, type ICreateCustomerInput, type ICreatePlanInput, type ICreateRoleInput, type ICreateWebhookEndpointInput, type ICreateWorkspaceInput, type ICustomerAddressDTO, type ICustomerAddressListResult, type ICustomerAddressResult, type ICustomerDTO, type ICustomerDetailD2DTO, type ICustomerDetailDTO, type ICustomerEmailDTO, type ICustomerEmailListResult, type ICustomerEmailResult, type ICustomerLabelDTO, type ICustomerLabelListResult, type ICustomerListResult, type ICustomerNoteDTO, type ICustomerNoteListResult, type ICustomerNoteResult, type ICustomerPhoneDTO, type ICustomerPhoneListResult, type ICustomerPhoneResult, type ICustomerRelationshipDTO, type ICustomerRelationshipExpandedD2DTO, type ICustomerRelationshipExpandedDTO, type ICustomerRelationshipListResult, type ICustomerRelationshipResult, type ICustomerResult, type ICustomerShallowDTO, type ICustomerTagListResult, type IFonderieClientOptions, type IGetCustomerInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IInvoiceDTO, type IInvoicesResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginInput, type ILoginResult, type IMeResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPaymentMethodDTO, type IPaymentMethodResult, type IPlanDTO, type IPlanFeature, type IPlanListResult, type IPlanResult, type IPortalUrlResult, type IReadOptions, type IRecordUsageInput, type IRefreshResult, type IRegisterInput, type IRegisterResult, type IRequestConfig, type IResendVerificationResult, type IResetPasswordInput, type IRevealSecretResult, type IRoleDTO, type IRoleListResult, type IRolePermission, type IRolePermissionInput, type IRolePermissionsResult, type IRoleResult, type IRollbackInput, type IRollbackTemplateInput, type ISecretEntry, type ISecretRevision, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionChangeResult, type ISubscriptionDTO, type ISubscriptionResult, type ITemplateEntry, type ITemplateRevision, type ITestWebhookResult, type ITokens, type IUpdateCustomerInput, type IUpdatePlanInput, type IUpdatePreferencesInput, type IUpdateProfileInput, type IUpdateRoleInput, type IUpdateSettingsInput, type IUpdateWebhookEndpointInput, type IUpdateWorkspaceInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IVerifyEmailResult, type IWalletCheckoutInput, type IWalletDTO, type IWalletPreferencesInput, type IWalletPurchaseInput, type IWalletPurchaseResult, type IWalletResult, type IWalletTransactionDTO, type IWalletTransactionsResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
|
|
1146
|
+
export { AuditClient, AuthClient, BillingClient, ConfigAdminClient, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, FonderieApiError, FonderieClient, type IAcceptInvitationResult, type IAddAddressInput, type IAddEmailInput, type IAddPhoneInput, type IAddRelationshipInput, type IAddressDTO, type IApiError, type IApiResponse, type IAuditEventDTO, type IAuditPageResult, type IBlacklistCustomerInput, type ICache, type ICancelSubscriptionInput, type IChangePasswordInput, type ICheckoutInput, type ICheckoutUrlResult, type IClientAuthConfig, type IConfigAdminClientOptions, type IConfigEntry, type IConfigRevision, type ICourierAdminClientOptions, type ICreateCustomerInput, type ICreatePlanInput, type ICreateRoleInput, type ICreateWebhookEndpointInput, type ICreateWorkspaceInput, type ICustomerAddressDTO, type ICustomerAddressListResult, type ICustomerAddressResult, type ICustomerDTO, type ICustomerDetailD2DTO, type ICustomerDetailDTO, type ICustomerEmailDTO, type ICustomerEmailListResult, type ICustomerEmailResult, type ICustomerLabelDTO, type ICustomerLabelListResult, type ICustomerListResult, type ICustomerNoteDTO, type ICustomerNoteListResult, type ICustomerNoteResult, type ICustomerPhoneDTO, type ICustomerPhoneListResult, type ICustomerPhoneResult, type ICustomerRelationshipDTO, type ICustomerRelationshipExpandedD2DTO, type ICustomerRelationshipExpandedDTO, type ICustomerRelationshipListResult, type ICustomerRelationshipResult, type ICustomerResult, type ICustomerShallowDTO, type ICustomerTagListResult, type IFonderieClientOptions, type IGetCustomerInput, type IGetLoginHistoryInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IInvoiceDTO, type IInvoicesResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginEventDTO, type ILoginHistoryPageResult, type ILoginInput, type ILoginResult, type IMeResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPaymentMethodDTO, type IPaymentMethodResult, type IPlanDTO, type IPlanFeature, type IPlanListResult, type IPlanResult, type IPortalUrlResult, type IReadOptions, type IRecordUsageInput, type IRefreshResult, type IRegisterInput, type IRegisterResult, type IRequestConfig, type IResendVerificationResult, type IResetPasswordInput, type IRevealSecretResult, type IRoleDTO, type IRoleListResult, type IRolePermission, type IRolePermissionInput, type IRolePermissionsResult, type IRoleResult, type IRollbackInput, type IRollbackTemplateInput, type ISecretEntry, type ISecretRevision, type ISessionDTO, type ISessionsResult, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionChangeResult, type ISubscriptionDTO, type ISubscriptionResult, type ITemplateEntry, type ITemplateRevision, type ITestWebhookResult, type ITokens, type IUpdateCustomerInput, type IUpdatePlanInput, type IUpdatePreferencesInput, type IUpdateProfileInput, type IUpdateRoleInput, type IUpdateSettingsInput, type IUpdateWebhookEndpointInput, type IUpdateWorkspaceInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IVerifyEmailResult, type IWalletCheckoutInput, type IWalletDTO, type IWalletPreferencesInput, type IWalletPurchaseInput, type IWalletPurchaseResult, type IWalletResult, type IWalletTransactionDTO, type IWalletTransactionsResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
|
package/dist/index.d.ts
CHANGED
|
@@ -270,6 +270,7 @@ interface IInvoiceDTO {
|
|
|
270
270
|
currency: string;
|
|
271
271
|
status: string;
|
|
272
272
|
created: string;
|
|
273
|
+
dueDate: string | null;
|
|
273
274
|
hostedInvoiceUrl: string | null;
|
|
274
275
|
invoicePdf: string | null;
|
|
275
276
|
}
|
|
@@ -441,6 +442,30 @@ interface IAuditPageResult {
|
|
|
441
442
|
events: IAuditEventDTO[];
|
|
442
443
|
nextCursor: string | null;
|
|
443
444
|
}
|
|
445
|
+
interface ILoginEventDTO {
|
|
446
|
+
id: string;
|
|
447
|
+
method: string;
|
|
448
|
+
outcome: string;
|
|
449
|
+
failureReason: string | null;
|
|
450
|
+
ipAddress: string | null;
|
|
451
|
+
userAgent: string | null;
|
|
452
|
+
createdAt: string;
|
|
453
|
+
}
|
|
454
|
+
interface ILoginHistoryPageResult {
|
|
455
|
+
events: ILoginEventDTO[];
|
|
456
|
+
nextCursor: string | null;
|
|
457
|
+
}
|
|
458
|
+
interface ISessionDTO {
|
|
459
|
+
id: string;
|
|
460
|
+
current: boolean;
|
|
461
|
+
ipAddress: string | null;
|
|
462
|
+
userAgent: string | null;
|
|
463
|
+
createdAt: string;
|
|
464
|
+
expiresAt: string;
|
|
465
|
+
}
|
|
466
|
+
interface ISessionsResult {
|
|
467
|
+
sessions: ISessionDTO[];
|
|
468
|
+
}
|
|
444
469
|
interface IWebhookEndpointDTO {
|
|
445
470
|
id: string;
|
|
446
471
|
url: string;
|
|
@@ -646,6 +671,13 @@ interface IRegisterInput {
|
|
|
646
671
|
firstName?: string;
|
|
647
672
|
lastName?: string;
|
|
648
673
|
}
|
|
674
|
+
interface IGetLoginHistoryInput {
|
|
675
|
+
outcome?: 'success' | 'failed';
|
|
676
|
+
from?: Date;
|
|
677
|
+
to?: Date;
|
|
678
|
+
limit?: number;
|
|
679
|
+
cursor?: string;
|
|
680
|
+
}
|
|
649
681
|
interface ILoginInput {
|
|
650
682
|
email: string;
|
|
651
683
|
password: string;
|
|
@@ -710,6 +742,14 @@ declare class AuthClient {
|
|
|
710
742
|
changePassword(input: IChangePasswordInput): Promise<IApiResponse<undefined>>;
|
|
711
743
|
exportData(): Promise<IApiResponse<unknown>>;
|
|
712
744
|
deleteUser(): Promise<IApiResponse<undefined>>;
|
|
745
|
+
getLoginHistory(input?: IGetLoginHistoryInput, opts?: IReadOptions): Promise<IApiResponse<ILoginHistoryPageResult>>;
|
|
746
|
+
listSessions(opts?: IReadOptions): Promise<IApiResponse<ISessionsResult>>;
|
|
747
|
+
terminateSession(id: string): Promise<IApiResponse<{
|
|
748
|
+
id: string;
|
|
749
|
+
}>>;
|
|
750
|
+
terminateOtherSessions(): Promise<IApiResponse<{
|
|
751
|
+
count: number;
|
|
752
|
+
}>>;
|
|
713
753
|
}
|
|
714
754
|
|
|
715
755
|
interface ICheckoutInput {
|
|
@@ -1103,4 +1143,4 @@ declare class CourierAdminClient {
|
|
|
1103
1143
|
rollback(type: string, input: IRollbackTemplateInput, locale?: string | null): Promise<IApiResponse<ITemplateEntry>>;
|
|
1104
1144
|
}
|
|
1105
1145
|
|
|
1106
|
-
export { AuditClient, AuthClient, BillingClient, ConfigAdminClient, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, FonderieApiError, FonderieClient, type IAcceptInvitationResult, type IAddAddressInput, type IAddEmailInput, type IAddPhoneInput, type IAddRelationshipInput, type IAddressDTO, type IApiError, type IApiResponse, type IAuditEventDTO, type IAuditPageResult, type IBlacklistCustomerInput, type ICache, type ICancelSubscriptionInput, type IChangePasswordInput, type ICheckoutInput, type ICheckoutUrlResult, type IClientAuthConfig, type IConfigAdminClientOptions, type IConfigEntry, type IConfigRevision, type ICourierAdminClientOptions, type ICreateCustomerInput, type ICreatePlanInput, type ICreateRoleInput, type ICreateWebhookEndpointInput, type ICreateWorkspaceInput, type ICustomerAddressDTO, type ICustomerAddressListResult, type ICustomerAddressResult, type ICustomerDTO, type ICustomerDetailD2DTO, type ICustomerDetailDTO, type ICustomerEmailDTO, type ICustomerEmailListResult, type ICustomerEmailResult, type ICustomerLabelDTO, type ICustomerLabelListResult, type ICustomerListResult, type ICustomerNoteDTO, type ICustomerNoteListResult, type ICustomerNoteResult, type ICustomerPhoneDTO, type ICustomerPhoneListResult, type ICustomerPhoneResult, type ICustomerRelationshipDTO, type ICustomerRelationshipExpandedD2DTO, type ICustomerRelationshipExpandedDTO, type ICustomerRelationshipListResult, type ICustomerRelationshipResult, type ICustomerResult, type ICustomerShallowDTO, type ICustomerTagListResult, type IFonderieClientOptions, type IGetCustomerInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IInvoiceDTO, type IInvoicesResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginInput, type ILoginResult, type IMeResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPaymentMethodDTO, type IPaymentMethodResult, type IPlanDTO, type IPlanFeature, type IPlanListResult, type IPlanResult, type IPortalUrlResult, type IReadOptions, type IRecordUsageInput, type IRefreshResult, type IRegisterInput, type IRegisterResult, type IRequestConfig, type IResendVerificationResult, type IResetPasswordInput, type IRevealSecretResult, type IRoleDTO, type IRoleListResult, type IRolePermission, type IRolePermissionInput, type IRolePermissionsResult, type IRoleResult, type IRollbackInput, type IRollbackTemplateInput, type ISecretEntry, type ISecretRevision, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionChangeResult, type ISubscriptionDTO, type ISubscriptionResult, type ITemplateEntry, type ITemplateRevision, type ITestWebhookResult, type ITokens, type IUpdateCustomerInput, type IUpdatePlanInput, type IUpdatePreferencesInput, type IUpdateProfileInput, type IUpdateRoleInput, type IUpdateSettingsInput, type IUpdateWebhookEndpointInput, type IUpdateWorkspaceInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IVerifyEmailResult, type IWalletCheckoutInput, type IWalletDTO, type IWalletPreferencesInput, type IWalletPurchaseInput, type IWalletPurchaseResult, type IWalletResult, type IWalletTransactionDTO, type IWalletTransactionsResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
|
|
1146
|
+
export { AuditClient, AuthClient, BillingClient, ConfigAdminClient, CourierAdminClient, type CustomerLabelType, type CustomerSex, type CustomerType, CustomersClient, FonderieApiError, FonderieClient, type IAcceptInvitationResult, type IAddAddressInput, type IAddEmailInput, type IAddPhoneInput, type IAddRelationshipInput, type IAddressDTO, type IApiError, type IApiResponse, type IAuditEventDTO, type IAuditPageResult, type IBlacklistCustomerInput, type ICache, type ICancelSubscriptionInput, type IChangePasswordInput, type ICheckoutInput, type ICheckoutUrlResult, type IClientAuthConfig, type IConfigAdminClientOptions, type IConfigEntry, type IConfigRevision, type ICourierAdminClientOptions, type ICreateCustomerInput, type ICreatePlanInput, type ICreateRoleInput, type ICreateWebhookEndpointInput, type ICreateWorkspaceInput, type ICustomerAddressDTO, type ICustomerAddressListResult, type ICustomerAddressResult, type ICustomerDTO, type ICustomerDetailD2DTO, type ICustomerDetailDTO, type ICustomerEmailDTO, type ICustomerEmailListResult, type ICustomerEmailResult, type ICustomerLabelDTO, type ICustomerLabelListResult, type ICustomerListResult, type ICustomerNoteDTO, type ICustomerNoteListResult, type ICustomerNoteResult, type ICustomerPhoneDTO, type ICustomerPhoneListResult, type ICustomerPhoneResult, type ICustomerRelationshipDTO, type ICustomerRelationshipExpandedD2DTO, type ICustomerRelationshipExpandedDTO, type ICustomerRelationshipListResult, type ICustomerRelationshipResult, type ICustomerResult, type ICustomerShallowDTO, type ICustomerTagListResult, type IFonderieClientOptions, type IGetCustomerInput, type IGetLoginHistoryInput, type IInvitationDTO, type IInvitationListResult, type IInviteEntry, type IInviteResult, type IInvoiceDTO, type IInvoicesResult, type IListAuditEventsInput, type IListCustomersInput, type ILoginEventDTO, type ILoginHistoryPageResult, type ILoginInput, type ILoginResult, type IMeResult, type IMemberDTO, type IMemberListResult, type IMemoryCacheOptions, type IMfaEnabledResult, type IMfaRequiredResult, type IMfaSetupResult, type IPaymentMethodDTO, type IPaymentMethodResult, type IPlanDTO, type IPlanFeature, type IPlanListResult, type IPlanResult, type IPortalUrlResult, type IReadOptions, type IRecordUsageInput, type IRefreshResult, type IRegisterInput, type IRegisterResult, type IRequestConfig, type IResendVerificationResult, type IResetPasswordInput, type IRevealSecretResult, type IRoleDTO, type IRoleListResult, type IRolePermission, type IRolePermissionInput, type IRolePermissionsResult, type IRoleResult, type IRollbackInput, type IRollbackTemplateInput, type ISecretEntry, type ISecretRevision, type ISessionDTO, type ISessionsResult, type ISetConfigInput, type ISetSecretInput, type ISetTemplateInput, type ISubscriptionChangeResult, type ISubscriptionDTO, type ISubscriptionResult, type ITemplateEntry, type ITemplateRevision, type ITestWebhookResult, type ITokens, type IUpdateCustomerInput, type IUpdatePlanInput, type IUpdatePreferencesInput, type IUpdateProfileInput, type IUpdateRoleInput, type IUpdateSettingsInput, type IUpdateWebhookEndpointInput, type IUpdateWorkspaceInput, type IUsageResult, type IUserDTO, type IUserPreferences, type IVerifyEmailResult, type IWalletCheckoutInput, type IWalletDTO, type IWalletPreferencesInput, type IWalletPurchaseInput, type IWalletPurchaseResult, type IWalletResult, type IWalletTransactionDTO, type IWalletTransactionsResult, type IWebhookDeliveryDTO, type IWebhookDeliveryListResult, type IWebhookEndpointCreatedDTO, type IWebhookEndpointDTO, type IWebhookEndpointListResult, type IWorkspaceAddressDTO, type IWorkspaceDTO, type IWorkspaceListResult, type IWorkspaceResult, type IWorkspaceSettingsDTO, type IWorkspaceSettingsResult, type SubscriberType, WebhooksClient, WorkspacesClient, createMemoryCache, isMfaRequired };
|
package/dist/index.js
CHANGED
|
@@ -344,6 +344,49 @@ var AuthClient = class {
|
|
|
344
344
|
token: this.tokens.get()
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
|
+
// ── Security surfaces (login history + active sessions) ─────────────────────
|
|
348
|
+
// GET /auth/login-history — the caller's own attempts, newest first,
|
|
349
|
+
// keyset-paginated (pass the previous page's nextCursor to continue).
|
|
350
|
+
getLoginHistory(input = {}, opts) {
|
|
351
|
+
const params = new URLSearchParams();
|
|
352
|
+
if (input.limit !== void 0) params.set("limit", String(input.limit));
|
|
353
|
+
if (input.outcome) params.set("outcome", input.outcome);
|
|
354
|
+
if (input.from) params.set("from", input.from.toISOString());
|
|
355
|
+
if (input.to) params.set("to", input.to.toISOString());
|
|
356
|
+
if (input.cursor) params.set("cursor", input.cursor);
|
|
357
|
+
const qs = params.toString();
|
|
358
|
+
return this.http.request({
|
|
359
|
+
method: "GET",
|
|
360
|
+
path: `/auth/login-history${qs ? "?" + qs : ""}`,
|
|
361
|
+
token: this.tokens.get(),
|
|
362
|
+
bust: opts?.bust
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
// GET /auth/sessions — the caller's live sessions; one is flagged current.
|
|
366
|
+
listSessions(opts) {
|
|
367
|
+
return this.http.request({
|
|
368
|
+
method: "GET",
|
|
369
|
+
path: "/auth/sessions",
|
|
370
|
+
token: this.tokens.get(),
|
|
371
|
+
bust: opts?.bust
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
// DELETE /auth/sessions/:id — revoke one of the caller's sessions.
|
|
375
|
+
terminateSession(id) {
|
|
376
|
+
return this.http.request({
|
|
377
|
+
method: "DELETE",
|
|
378
|
+
path: `/auth/sessions/${encodeURIComponent(id)}`,
|
|
379
|
+
token: this.tokens.get()
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
// DELETE /auth/sessions/others — revoke every session except the current one.
|
|
383
|
+
terminateOtherSessions() {
|
|
384
|
+
return this.http.request({
|
|
385
|
+
method: "DELETE",
|
|
386
|
+
path: "/auth/sessions/others",
|
|
387
|
+
token: this.tokens.get()
|
|
388
|
+
});
|
|
389
|
+
}
|
|
347
390
|
};
|
|
348
391
|
|
|
349
392
|
// src/modules/billing.ts
|