diff --git a/package.json b/package.json index 0f609a7e3..a1a20f455 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ }, "inlinedDependencies": { "iron-webcrypto": "2.0.0", - "jose": "6.2.1", + "jose": "6.2.2", "uint8array-extras": "1.5.0" } } diff --git a/src/actions/actions.spec.ts b/src/actions/actions.spec.ts index 094b54e92..0e1a239cb 100644 --- a/src/actions/actions.spec.ts +++ b/src/actions/actions.spec.ts @@ -128,6 +128,8 @@ describe('Actions', () => { createdAt: '2024-10-22T17:12:50.746Z', updatedAt: '2024-10-22T17:12:50.746Z', externalId: null, + lastSignInAt: undefined, + locale: undefined, metadata: {}, }, ipAddress: '50.141.123.10', @@ -151,6 +153,7 @@ describe('Actions', () => { id: '01JATCNVYCHT1SZGENR4QTXKRK', userId: '01JATCHZVEC5EPANDPEZVM68Y9', organizationId: '01JATCMZJY26PQ59XT9BNT0FNN', + organizationName: '', role: { slug: 'member', }, diff --git a/src/admin-portal/admin-portal.ts b/src/admin-portal/admin-portal.ts index bfcfcf291..1ee17afb2 100644 --- a/src/admin-portal/admin-portal.ts +++ b/src/admin-portal/admin-portal.ts @@ -17,8 +17,9 @@ export class AdminPortal { * * Generate a Portal Link scoped to an Organization. * @param payload - Object containing organization. - * @returns {PortalLinkResponse} + * @returns {Promise} * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 * @throws {NotFoundException} 404 * @throws {UnprocessableEntityException} 422 */ diff --git a/src/admin-portal/fixtures/generate-link.fixture.json b/src/admin-portal/fixtures/generate-link.fixture.json deleted file mode 100644 index f7fd7b0ad..000000000 --- a/src/admin-portal/fixtures/generate-link.fixture.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "return_url": "https://example.com/admin-portal/return", - "success_url": "https://example.com/admin-portal/success", - "organization": "org_01EHZNVPK3SFK441A1RGBFSHRT", - "intent": "sso", - "intent_options": { - "sso": { - "bookmark_slug": "chatgpt", - "provider_type": "GoogleSAML" - } - } -} diff --git a/src/admin-portal/fixtures/intent-options.fixture.json b/src/admin-portal/fixtures/intent-options.fixture.json deleted file mode 100644 index 31bad9130..000000000 --- a/src/admin-portal/fixtures/intent-options.fixture.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sso": { - "bookmark_slug": "chatgpt", - "provider_type": "GoogleSAML" - } -} diff --git a/src/admin-portal/fixtures/sso-intent-options.fixture.json b/src/admin-portal/fixtures/sso-intent-options.fixture.json deleted file mode 100644 index 79ab315ed..000000000 --- a/src/admin-portal/fixtures/sso-intent-options.fixture.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "bookmark_slug": "chatgpt", - "provider_type": "GoogleSAML" -} diff --git a/src/admin-portal/interfaces/generate-link.interface.ts b/src/admin-portal/interfaces/generate-link.interface.ts index 89e47e23f..b76720bf4 100644 --- a/src/admin-portal/interfaces/generate-link.interface.ts +++ b/src/admin-portal/interfaces/generate-link.interface.ts @@ -27,6 +27,8 @@ export interface GenerateLink { intent?: GenerateLinkIntent; /** Options to configure the Admin Portal based on the intent. */ intentOptions?: IntentOptions; + /** The email addresses of the IT admins to grant access to the Admin Portal for the given organization. Accepts up to 20 emails. */ + adminEmails?: string[]; } export interface GenerateLinkResponse { @@ -35,4 +37,5 @@ export interface GenerateLinkResponse { organization: string; intent?: GenerateLinkIntent; intent_options?: IntentOptionsResponse; + admin_emails?: string[]; } diff --git a/src/api-keys/api-keys.ts b/src/api-keys/api-keys.ts index 5883837b3..01c3404d9 100644 --- a/src/api-keys/api-keys.ts +++ b/src/api-keys/api-keys.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { WorkOS } from '../workos'; import { SerializedValidateApiKeyResponse, @@ -9,6 +11,15 @@ import { deserializeValidateApiKeyResponse } from './serializers/validate-api-ke export class ApiKeys { constructor(private readonly workos: WorkOS) {} + /** + * Validate API key + * + * Validate an API key value and return the API key object if valid. + * @param payload - Object containing value. + * @returns {Promise} + * @throws {UnauthorizedException} 401 + * @throws {UnprocessableEntityException} 422 + */ async validateApiKey( payload: ValidateApiKeyOptions, ): Promise { @@ -20,6 +31,15 @@ export class ApiKeys { return deserializeValidateApiKeyResponse(data); } + /** + * Delete an API key + * + * Permanently deletes an API key. This action cannot be undone. Once deleted, any requests using this API key will fail authentication. + * @param id - The unique ID of the API key. + * @example "api_key_01EHZNVPK3SFK441A1RGBFSHRT" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async deleteApiKey(id: string): Promise { await this.workos.delete(`/api_keys/${id}`); } diff --git a/src/api-keys/interfaces/api-key-owner.interface.ts b/src/api-keys/interfaces/api-key-owner.interface.ts new file mode 100644 index 000000000..afd7be3eb --- /dev/null +++ b/src/api-keys/interfaces/api-key-owner.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyWithValueOwner, + ApiKeyWithValueOwnerResponse, +} from '../../organizations/interfaces/api-key-with-value-owner.interface'; + +export type ApiKeyOwner = ApiKeyWithValueOwner; +export type ApiKeyOwnerResponse = ApiKeyWithValueOwnerResponse; diff --git a/src/api-keys/interfaces/api-key-validation-response.interface.ts b/src/api-keys/interfaces/api-key-validation-response.interface.ts new file mode 100644 index 000000000..1cb9a855f --- /dev/null +++ b/src/api-keys/interfaces/api-key-validation-response.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ApiKey, ApiKeyResponse } from './api-key.interface'; + +export interface ApiKeyValidationResponse { + apiKey: ApiKey | null; +} + +export interface ApiKeyValidationResponseWire { + api_key: ApiKeyResponse | null; +} diff --git a/src/api-keys/interfaces/api-key-with-value-owner.interface.ts b/src/api-keys/interfaces/api-key-with-value-owner.interface.ts new file mode 100644 index 000000000..d3638d02a --- /dev/null +++ b/src/api-keys/interfaces/api-key-with-value-owner.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The entity that owns the API Key. */ +export interface ApiKeyWithValueOwner { + /** The type of the API Key owner. */ + type: 'organization'; + /** Unique identifier of the API Key owner. */ + id: string; +} + +export interface ApiKeyWithValueOwnerResponse { + type: 'organization'; + id: string; +} diff --git a/src/api-keys/interfaces/api-key-with-value.interface.ts b/src/api-keys/interfaces/api-key-with-value.interface.ts new file mode 100644 index 000000000..20dd696e4 --- /dev/null +++ b/src/api-keys/interfaces/api-key-with-value.interface.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyWithValueOwner, + ApiKeyWithValueOwnerResponse, +} from './api-key-with-value-owner.interface'; + +export interface ApiKeyWithValue { + /** Distinguishes the API Key object. */ + object: 'api_key'; + /** Unique identifier of the API Key. */ + id: string; + /** The entity that owns the API Key. */ + owner: ApiKeyWithValueOwner; + /** A descriptive name for the API Key. */ + name: string; + /** An obfuscated representation of the API Key value. */ + obfuscatedValue: string; + /** Timestamp of when the API Key was last used. */ + lastUsedAt: string | null; + /** The permission slugs assigned to the API Key. */ + permissions: string[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + /** The full API Key value. Only returned once at creation time. */ + value: string; +} + +export interface ApiKeyWithValueResponse { + object: 'api_key'; + id: string; + owner: ApiKeyWithValueOwnerResponse; + name: string; + obfuscated_value: string; + last_used_at: string | null; + permissions: string[]; + created_at: string; + updated_at: string; + value: string; +} diff --git a/src/api-keys/interfaces/api-key.interface.ts b/src/api-keys/interfaces/api-key.interface.ts index 8aee8403c..0cb2c6b0f 100644 --- a/src/api-keys/interfaces/api-key.interface.ts +++ b/src/api-keys/interfaces/api-key.interface.ts @@ -1,15 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ApiKeyOwnerResponse } from './api-key-owner.interface'; +/** The API Key object if the value is valid, or `null` if invalid. */ export interface ApiKey { + /** Distinguishes the API Key object. */ object: 'api_key'; + /** Unique identifier of the API Key. */ id: string; + /** The entity that owns the API Key. */ owner: { type: 'organization'; id: string; }; + /** A descriptive name for the API Key. */ name: string; + /** An obfuscated representation of the API Key value. */ obfuscatedValue: string; + /** Timestamp of when the API Key was last used. */ lastUsedAt: string | null; + /** The permission slugs assigned to the API Key. */ permissions: string[]; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; } @@ -27,3 +40,15 @@ export interface SerializedApiKey { created_at: string; updated_at: string; } + +export interface ApiKeyResponse { + object: 'api_key'; + id: string; + owner: ApiKeyOwnerResponse; + name: string; + obfuscated_value: string; + last_used_at: string | null; + permissions: string[]; + created_at: string; + updated_at: string; +} diff --git a/src/api-keys/interfaces/create-organization-api-key.interface.ts b/src/api-keys/interfaces/create-organization-api-key.interface.ts new file mode 100644 index 000000000..4f4e4ad28 --- /dev/null +++ b/src/api-keys/interfaces/create-organization-api-key.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateOrganizationApiKey { + /** The name for the API key. */ + name: string; + /** The permission slugs to assign to the API key. */ + permissions?: string[]; +} + +export interface CreateOrganizationApiKeyResponse { + name: string; + permissions?: string[]; +} diff --git a/src/api-keys/interfaces/index.ts b/src/api-keys/interfaces/index.ts index 0b9d16473..63b335777 100644 --- a/src/api-keys/interfaces/index.ts +++ b/src/api-keys/interfaces/index.ts @@ -1,5 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export * from './api-key-owner.interface'; +export * from './api-key-validation-response.interface'; export * from './api-key.interface'; export * from './create-organization-api-key-options.interface'; export * from './created-api-key.interface'; export * from './list-organization-api-keys-options.interface'; +export * from './organizations-api-keys-order.interface'; export * from './validate-api-key.interface'; diff --git a/src/api-keys/interfaces/organizations-api-keys-order.interface.ts b/src/api-keys/interfaces/organizations-api-keys-order.interface.ts new file mode 100644 index 000000000..359f39211 --- /dev/null +++ b/src/api-keys/interfaces/organizations-api-keys-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationsApiKeysOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/api-keys/interfaces/validate-api-key.interface.ts b/src/api-keys/interfaces/validate-api-key.interface.ts index 8e95cdd78..a62e4330f 100644 --- a/src/api-keys/interfaces/validate-api-key.interface.ts +++ b/src/api-keys/interfaces/validate-api-key.interface.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { ApiKey, SerializedApiKey } from './api-key.interface'; export interface ValidateApiKeyOptions { @@ -6,8 +8,14 @@ export interface ValidateApiKeyOptions { export interface ValidateApiKeyResponse { apiKey: ApiKey | null; + value?: string; } export interface SerializedValidateApiKeyResponse { api_key: SerializedApiKey | null; } + +export interface ValidateApiKey { + /** The value for an API key. */ + value?: string; +} diff --git a/src/api-keys/serializers/api-key-owner.serializer.ts b/src/api-keys/serializers/api-key-owner.serializer.ts new file mode 100644 index 000000000..ba3ec1cd7 --- /dev/null +++ b/src/api-keys/serializers/api-key-owner.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeApiKeyCreatedDataOwner as deserializeApiKeyOwner, + serializeApiKeyCreatedDataOwner as serializeApiKeyOwner, +} from '../../common/serializers/api-key-created-data-owner.serializer'; diff --git a/src/api-keys/serializers/api-key-validation-response.serializer.ts b/src/api-keys/serializers/api-key-validation-response.serializer.ts new file mode 100644 index 000000000..5ec8639a3 --- /dev/null +++ b/src/api-keys/serializers/api-key-validation-response.serializer.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyValidationResponse, + ApiKeyValidationResponseWire, +} from '../interfaces/api-key-validation-response.interface'; +import { deserializeApiKey, serializeApiKey } from './api-key.serializer'; + +export const deserializeApiKeyValidationResponse = ( + response: ApiKeyValidationResponseWire, +): ApiKeyValidationResponse => ({ + apiKey: response.api_key != null ? deserializeApiKey(response.api_key) : null, +}); + +export const serializeApiKeyValidationResponse = ( + model: ApiKeyValidationResponse, +): ApiKeyValidationResponseWire => ({ + api_key: model.apiKey != null ? serializeApiKey(model.apiKey) : null, +}); diff --git a/src/api-keys/serializers/api-key-with-value-owner.serializer.ts b/src/api-keys/serializers/api-key-with-value-owner.serializer.ts new file mode 100644 index 000000000..baa795747 --- /dev/null +++ b/src/api-keys/serializers/api-key-with-value-owner.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeApiKeyCreatedDataOwner as deserializeApiKeyWithValueOwner, + serializeApiKeyCreatedDataOwner as serializeApiKeyWithValueOwner, +} from '../../common/serializers/api-key-created-data-owner.serializer'; diff --git a/src/api-keys/serializers/api-key-with-value.serializer.ts b/src/api-keys/serializers/api-key-with-value.serializer.ts new file mode 100644 index 000000000..65ef60b9d --- /dev/null +++ b/src/api-keys/serializers/api-key-with-value.serializer.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyWithValue, + ApiKeyWithValueResponse, +} from '../interfaces/api-key-with-value.interface'; +import { + deserializeApiKeyWithValueOwner, + serializeApiKeyWithValueOwner, +} from './api-key-with-value-owner.serializer'; + +export const deserializeApiKeyWithValue = ( + response: ApiKeyWithValueResponse, +): ApiKeyWithValue => ({ + object: response.object, + id: response.id, + owner: deserializeApiKeyWithValueOwner(response.owner), + name: response.name, + obfuscatedValue: response.obfuscated_value, + lastUsedAt: response.last_used_at ?? null, + permissions: response.permissions, + createdAt: response.created_at, + updatedAt: response.updated_at, + value: response.value, +}); + +export const serializeApiKeyWithValue = ( + model: ApiKeyWithValue, +): ApiKeyWithValueResponse => ({ + object: model.object, + id: model.id, + owner: serializeApiKeyWithValueOwner(model.owner), + name: model.name, + obfuscated_value: model.obfuscatedValue, + last_used_at: model.lastUsedAt, + permissions: model.permissions, + created_at: model.createdAt, + updated_at: model.updatedAt, + value: model.value, +}); diff --git a/src/api-keys/serializers/api-key.serializer.ts b/src/api-keys/serializers/api-key.serializer.ts index 15f39aad1..24d3e2aea 100644 --- a/src/api-keys/serializers/api-key.serializer.ts +++ b/src/api-keys/serializers/api-key.serializer.ts @@ -1,4 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + import { ApiKey, SerializedApiKey } from '../interfaces/api-key.interface'; +import type { ApiKeyResponse } from '../interfaces/api-key.interface'; +import { serializeApiKeyOwner } from './api-key-owner.serializer'; export function deserializeApiKey(apiKey: SerializedApiKey): ApiKey { return { @@ -13,3 +17,15 @@ export function deserializeApiKey(apiKey: SerializedApiKey): ApiKey { updatedAt: apiKey.updated_at, }; } + +export const serializeApiKey = (model: ApiKey): ApiKeyResponse => ({ + object: model.object, + id: model.id, + owner: serializeApiKeyOwner(model.owner), + name: model.name, + obfuscated_value: model.obfuscatedValue, + last_used_at: model.lastUsedAt, + permissions: model.permissions, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/api-keys/serializers/create-organization-api-key.serializer.ts b/src/api-keys/serializers/create-organization-api-key.serializer.ts new file mode 100644 index 000000000..fa3245718 --- /dev/null +++ b/src/api-keys/serializers/create-organization-api-key.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateOrganizationApiKey, + CreateOrganizationApiKeyResponse, +} from '../interfaces/create-organization-api-key.interface'; + +export const deserializeCreateOrganizationApiKey = ( + response: CreateOrganizationApiKeyResponse, +): CreateOrganizationApiKey => ({ + name: response.name, + permissions: response.permissions, +}); + +export const serializeCreateOrganizationApiKey = ( + model: CreateOrganizationApiKey, +): CreateOrganizationApiKeyResponse => ({ + name: model.name, + permissions: model.permissions, +}); diff --git a/src/api-keys/serializers/validate-api-key.serializer.ts b/src/api-keys/serializers/validate-api-key.serializer.ts index 699b939d3..992fcf926 100644 --- a/src/api-keys/serializers/validate-api-key.serializer.ts +++ b/src/api-keys/serializers/validate-api-key.serializer.ts @@ -1,8 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + import { SerializedValidateApiKeyResponse, ValidateApiKeyResponse, } from '../interfaces/validate-api-key.interface'; import { deserializeApiKey } from './api-key.serializer'; +import type { ValidateApiKey } from '../interfaces/validate-api-key.interface'; export function deserializeValidateApiKeyResponse( response: SerializedValidateApiKeyResponse, @@ -11,3 +14,9 @@ export function deserializeValidateApiKeyResponse( apiKey: response.api_key ? deserializeApiKey(response.api_key) : null, }; } + +export const deserializeValidateApiKey = ( + response: ValidateApiKeyResponse, +): ValidateApiKey => ({ + value: response.value, +}); diff --git a/src/audit-logs/audit-logs.ts b/src/audit-logs/audit-logs.ts index 105d72e4d..954c9e3d1 100644 --- a/src/audit-logs/audit-logs.ts +++ b/src/audit-logs/audit-logs.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { WorkOS } from '../workos'; import { CreateAuditLogEventOptions, @@ -25,6 +27,23 @@ import { export class AuditLogs { constructor(private readonly workos: WorkOS) {} + /** + * Create Event + * + * Create an Audit Log Event. + * + * This API supports idempotency which guarantees that performing the same operation multiple times will have the same result as if the operation were performed only once. This is handy in situations where you may need to retry a request due to a failure or prevent accidental duplicate requests from creating more than one resource. + * + * To achieve idempotency, you can add `Idempotency-Key` request header to a Create Event request with a unique string as the value. Each subsequent request matching this unique string will return the same response. We suggest using [v4 UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) for idempotency keys to avoid collisions. + * + * Idempotency keys expire after 24 hours. The API will generate a new response if you submit a request with an expired key. + * @param payload - Object containing organizationId, event. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + * @throws {RateLimitExceededException} 429 + */ async createEvent( organization: string, event: CreateAuditLogEventOptions, @@ -48,6 +67,14 @@ export class AuditLogs { ); } + /** + * Create Export + * + * Create an Audit Log Export. Exports are scoped to a single organization within a specified date range. + * @param payload - Object containing organizationId, rangeStart, rangeEnd. + * @returns {Promise} + * @throws {BadRequestException} 400 + */ async createExport(options: AuditLogExportOptions): Promise { const { data } = await this.workos.post( '/audit_logs/exports', @@ -57,6 +84,15 @@ export class AuditLogs { return deserializeAuditLogExport(data); } + /** + * Get Export + * + * Get an Audit Log Export. The URL will expire after 10 minutes. If the export is needed again at a later time, refetching the export will regenerate the URL. + * @param auditLogExportId - The unique ID of the Audit Log Export. + * @example "audit_log_export_01GBZK5MP7TD1YCFQHFR22180V" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getExport(auditLogExportId: string): Promise { const { data } = await this.workos.get( `/audit_logs/exports/${auditLogExportId}`, @@ -65,6 +101,14 @@ export class AuditLogs { return deserializeAuditLogExport(data); } + /** + * Create Schema + * + * Creates a new Audit Log schema used to validate the payload of incoming Audit Log Events. If the `action` does not exist, it will also be created. + * @param payload - Object containing targets. + * @returns {Promise} + * @throws {UnprocessableEntityException} 422 + */ async createSchema( schema: CreateAuditLogSchemaOptions, options: CreateAuditLogSchemaRequestOptions = {}, diff --git a/src/audit-logs/interfaces/audit-log-action-json.interface.ts b/src/audit-logs/interfaces/audit-log-action-json.interface.ts new file mode 100644 index 000000000..3076fef99 --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-action-json.interface.ts @@ -0,0 +1,27 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogSchemaJson, + AuditLogSchemaJsonResponse, +} from './audit-log-schema-json.interface'; + +export interface AuditLogActionJson { + /** Distinguishes the Audit Log Action object. */ + object: 'audit_log_action'; + /** Identifier of what action was taken. */ + name: string; + /** The schema associated with the action. */ + schema: AuditLogSchemaJson; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface AuditLogActionJsonResponse { + object: 'audit_log_action'; + name: string; + schema: AuditLogSchemaJsonResponse; + created_at: string; + updated_at: string; +} diff --git a/src/audit-logs/interfaces/audit-log-event-actor.interface.ts b/src/audit-logs/interfaces/audit-log-event-actor.interface.ts new file mode 100644 index 000000000..63729822f --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-event-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuditLogEventActor { + /** Actor identifier. */ + id: string; + /** Actor type. */ + type: string; + /** Optional actor name. */ + name?: string; + /** Additional data associated with the event or entity. */ + metadata?: Record; +} + +export interface AuditLogEventActorResponse { + id: string; + type: string; + name?: string; + metadata?: Record; +} diff --git a/src/audit-logs/interfaces/audit-log-event-context.interface.ts b/src/audit-logs/interfaces/audit-log-event-context.interface.ts new file mode 100644 index 000000000..bb0607cd1 --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-event-context.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuditLogEventContext { + /** IP Address or some other geolocation identifier. */ + location: string; + /** User agent string. */ + userAgent?: string; +} + +export interface AuditLogEventContextResponse { + location: string; + user_agent?: string; +} diff --git a/src/audit-logs/interfaces/audit-log-event-create-response.interface.ts b/src/audit-logs/interfaces/audit-log-event-create-response.interface.ts new file mode 100644 index 000000000..1bfff9f0c --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-event-create-response.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuditLogEventCreateResponse { + /** Whether the Audit Log event was created successfully. */ + success: boolean; +} + +export interface AuditLogEventCreateResponseWire { + success: boolean; +} diff --git a/src/audit-logs/interfaces/audit-log-event-ingestion.interface.ts b/src/audit-logs/interfaces/audit-log-event-ingestion.interface.ts new file mode 100644 index 000000000..2f5bb685b --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-event-ingestion.interface.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogEvent, + AuditLogEventResponse, +} from './audit-log-event.interface'; + +export interface AuditLogEventIngestion { + /** The unique ID of the Organization. */ + organizationId: string; + /** The audit log event to create. */ + event: AuditLogEvent; +} + +export interface AuditLogEventIngestionResponse { + organization_id: string; + event: AuditLogEventResponse; +} diff --git a/src/audit-logs/interfaces/audit-log-event-target.interface.ts b/src/audit-logs/interfaces/audit-log-event-target.interface.ts new file mode 100644 index 000000000..87175deec --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-event-target.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogEventActor, + AuditLogEventActorResponse, +} from './audit-log-event-actor.interface'; + +export type AuditLogEventTarget = AuditLogEventActor; +export type AuditLogEventTargetResponse = AuditLogEventActorResponse; diff --git a/src/audit-logs/interfaces/audit-log-event.interface.ts b/src/audit-logs/interfaces/audit-log-event.interface.ts new file mode 100644 index 000000000..f0907daf6 --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-event.interface.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogEventActor, + AuditLogEventActorResponse, +} from './audit-log-event-actor.interface'; +import type { + AuditLogEventTarget, + AuditLogEventTargetResponse, +} from './audit-log-event-target.interface'; +import type { + AuditLogEventContext, + AuditLogEventContextResponse, +} from './audit-log-event-context.interface'; + +export interface AuditLogEvent { + /** Identifier of what happened. */ + action: string; + /** ISO-8601 value of when the action occurred. */ + occurredAt: string; + /** The entity that performed the action. */ + actor: AuditLogEventActor; + /** The resources affected by the action. */ + targets: AuditLogEventTarget[]; + /** Additional context about where and how the action occurred. */ + context: AuditLogEventContext; + /** Additional data associated with the event or entity. */ + metadata?: Record; + /** What schema version the event is associated with. */ + version?: number; +} + +export interface AuditLogEventResponse { + action: string; + occurred_at: string; + actor: AuditLogEventActorResponse; + targets: AuditLogEventTargetResponse[]; + context: AuditLogEventContextResponse; + metadata?: Record; + version?: number; +} diff --git a/src/audit-logs/interfaces/audit-log-export-creation.interface.ts b/src/audit-logs/interfaces/audit-log-export-creation.interface.ts new file mode 100644 index 000000000..010deb4d0 --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-export-creation.interface.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuditLogExportCreation { + /** The unique ID of the Organization. */ + organizationId: string; + /** ISO-8601 value for start of the export range. */ + rangeStart: string; + /** ISO-8601 value for end of the export range. */ + rangeEnd: string; + /** List of actions to filter against. */ + actions?: string[]; + /** + * Deprecated. Use `actor_names` instead. + * @deprecated + */ + actors?: string[]; + /** List of actor names to filter against. */ + actorNames?: string[]; + /** List of actor IDs to filter against. */ + actorIds?: string[]; + /** List of target types to filter against. */ + targets?: string[]; +} + +export interface AuditLogExportCreationResponse { + organization_id: string; + range_start: string; + range_end: string; + actions?: string[]; + actors?: string[]; + actor_names?: string[]; + actor_ids?: string[]; + targets?: string[]; +} diff --git a/src/audit-logs/interfaces/audit-log-export-json.interface.ts b/src/audit-logs/interfaces/audit-log-export-json.interface.ts new file mode 100644 index 000000000..87586a1e2 --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-export-json.interface.ts @@ -0,0 +1,27 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuditLogExportJsonState } from '../../common/interfaces/audit-log-export-json-state.interface'; + +export interface AuditLogExportJson { + /** Distinguishes the Audit Log Export object. */ + object: 'audit_log_export'; + /** The unique ID of the Audit Log Export. */ + id: string; + /** The state of the export. Possible values: pending, ready, error. */ + state: AuditLogExportJsonState; + /** A URL to the CSV file. Only defined when the Audit Log Export is ready. */ + url?: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface AuditLogExportJsonResponse { + object: 'audit_log_export'; + id: string; + state: AuditLogExportJsonState; + url?: string | null; + created_at: string; + updated_at: string; +} diff --git a/src/audit-logs/interfaces/audit-log-schema-actor.interface.ts b/src/audit-logs/interfaces/audit-log-schema-actor.interface.ts new file mode 100644 index 000000000..22a423f7b --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-schema-actor.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuditLogSchemaActor { + /** JSON schema for actor metadata. */ + metadata: Record; +} + +export interface AuditLogSchemaActorResponse { + metadata: Record; +} diff --git a/src/audit-logs/interfaces/audit-log-schema-json-actor.interface.ts b/src/audit-logs/interfaces/audit-log-schema-json-actor.interface.ts new file mode 100644 index 000000000..823ab33ec --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-schema-json-actor.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogSchemaActor, + AuditLogSchemaActorResponse, +} from './audit-log-schema-actor.interface'; + +export type AuditLogSchemaJsonActor = AuditLogSchemaActor; +export type AuditLogSchemaJsonActorResponse = AuditLogSchemaActorResponse; diff --git a/src/audit-logs/interfaces/audit-log-schema-json-target.interface.ts b/src/audit-logs/interfaces/audit-log-schema-json-target.interface.ts new file mode 100644 index 000000000..69746b10c --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-schema-json-target.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogSchemaTarget, + AuditLogSchemaTargetResponse, +} from './audit-log-schema-target.interface'; + +export type AuditLogSchemaJsonTarget = AuditLogSchemaTarget; +export type AuditLogSchemaJsonTargetResponse = AuditLogSchemaTargetResponse; diff --git a/src/audit-logs/interfaces/audit-log-schema-json.interface.ts b/src/audit-logs/interfaces/audit-log-schema-json.interface.ts new file mode 100644 index 000000000..e734482d4 --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-schema-json.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogSchemaJsonActor, + AuditLogSchemaJsonActorResponse, +} from './audit-log-schema-json-actor.interface'; +import type { + AuditLogSchemaJsonTarget, + AuditLogSchemaJsonTargetResponse, +} from './audit-log-schema-json-target.interface'; + +/** The schema associated with the action. */ +export interface AuditLogSchemaJson { + /** Distinguishes the Audit Log Schema object. */ + object: 'audit_log_schema'; + /** The version of the schema. */ + version: number; + /** The metadata schema for the actor. */ + actor?: AuditLogSchemaJsonActor; + /** The list of targets for the schema. */ + targets: AuditLogSchemaJsonTarget[]; + /** Additional data associated with the event or entity. */ + metadata?: Record; + /** The timestamp when the Audit Log Schema was created. */ + createdAt: string; +} + +export interface AuditLogSchemaJsonResponse { + object: 'audit_log_schema'; + version: number; + actor?: AuditLogSchemaJsonActorResponse; + targets: AuditLogSchemaJsonTargetResponse[]; + metadata?: Record; + created_at: string; +} diff --git a/src/audit-logs/interfaces/audit-log-schema-target.interface.ts b/src/audit-logs/interfaces/audit-log-schema-target.interface.ts new file mode 100644 index 000000000..70cd6ed53 --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-schema-target.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuditLogSchemaTarget { + /** The type of the target resource. */ + type: string; + /** Optional JSON schema for target metadata. */ + metadata?: Record; +} + +export interface AuditLogSchemaTargetResponse { + type: string; + metadata?: Record; +} diff --git a/src/audit-logs/interfaces/audit-log-schema.interface.ts b/src/audit-logs/interfaces/audit-log-schema.interface.ts new file mode 100644 index 000000000..2686de069 --- /dev/null +++ b/src/audit-logs/interfaces/audit-log-schema.interface.ts @@ -0,0 +1,25 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogSchemaActor, + AuditLogSchemaActorResponse, +} from './audit-log-schema-actor.interface'; +import type { + AuditLogSchemaTarget, + AuditLogSchemaTargetResponse, +} from './audit-log-schema-target.interface'; + +export interface AuditLogSchema { + /** The metadata schema for the actor. */ + actor?: AuditLogSchemaActor; + /** The list of targets for the schema. */ + targets: AuditLogSchemaTarget[]; + /** Optional JSON schema for event metadata. */ + metadata: Record | undefined; +} + +export interface AuditLogSchemaResponse { + actor?: AuditLogSchemaActorResponse; + targets: AuditLogSchemaTargetResponse[]; + metadata?: Record; +} diff --git a/src/audit-logs/interfaces/audit-logs-order.interface.ts b/src/audit-logs/interfaces/audit-logs-order.interface.ts new file mode 100644 index 000000000..f3c23bf03 --- /dev/null +++ b/src/audit-logs/interfaces/audit-logs-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuditLogsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/audit-logs/interfaces/audit-logs-retention-json.interface.ts b/src/audit-logs/interfaces/audit-logs-retention-json.interface.ts new file mode 100644 index 000000000..2fe7ed49d --- /dev/null +++ b/src/audit-logs/interfaces/audit-logs-retention-json.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuditLogsRetentionJson { + /** The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 and 365. */ + retentionPeriodInDays: number | null; +} + +export interface AuditLogsRetentionJsonResponse { + retention_period_in_days: number | null; +} diff --git a/src/audit-logs/interfaces/index.ts b/src/audit-logs/interfaces/index.ts index c52752fc2..820c361d6 100644 --- a/src/audit-logs/interfaces/index.ts +++ b/src/audit-logs/interfaces/index.ts @@ -1,4 +1,21 @@ +// This file is auto-generated by oagen. Do not edit. + +export * from './audit-log-action-json.interface'; +export * from './audit-log-event-actor.interface'; +export * from './audit-log-event-context.interface'; +export * from './audit-log-event-create-response.interface'; +export * from './audit-log-event-ingestion.interface'; +export * from './audit-log-event-target.interface'; +export * from './audit-log-event.interface'; +export * from './audit-log-export-creation.interface'; +export * from './audit-log-export-json.interface'; export * from './audit-log-export-options.interface'; export * from './audit-log-export.interface'; +export * from './audit-log-schema-actor.interface'; +export * from './audit-log-schema-json-actor.interface'; +export * from './audit-log-schema-json-target.interface'; +export * from './audit-log-schema-json.interface'; +export * from './audit-log-schema-target.interface'; +export * from './audit-logs-order.interface'; export * from './create-audit-log-event-options.interface'; export * from './create-audit-log-schema-options.interface'; diff --git a/src/audit-logs/interfaces/update-audit-logs-retention.interface.ts b/src/audit-logs/interfaces/update-audit-logs-retention.interface.ts new file mode 100644 index 000000000..861ca0636 --- /dev/null +++ b/src/audit-logs/interfaces/update-audit-logs-retention.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface UpdateAuditLogsRetention { + /** The number of days Audit Log events will be retained. Valid values are `30` and `365`. */ + retentionPeriodInDays: number; +} + +export interface UpdateAuditLogsRetentionResponse { + retention_period_in_days: number; +} diff --git a/src/audit-logs/serializers/audit-log-action-json.serializer.ts b/src/audit-logs/serializers/audit-log-action-json.serializer.ts new file mode 100644 index 000000000..f44b865d8 --- /dev/null +++ b/src/audit-logs/serializers/audit-log-action-json.serializer.ts @@ -0,0 +1,30 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogActionJson, + AuditLogActionJsonResponse, +} from '../interfaces/audit-log-action-json.interface'; +import { + deserializeAuditLogSchemaJson, + serializeAuditLogSchemaJson, +} from './audit-log-schema-json.serializer'; + +export const deserializeAuditLogActionJson = ( + response: AuditLogActionJsonResponse, +): AuditLogActionJson => ({ + object: response.object, + name: response.name, + schema: deserializeAuditLogSchemaJson(response.schema), + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeAuditLogActionJson = ( + model: AuditLogActionJson, +): AuditLogActionJsonResponse => ({ + object: model.object, + name: model.name, + schema: serializeAuditLogSchemaJson(model.schema), + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/audit-logs/serializers/audit-log-event-actor.serializer.ts b/src/audit-logs/serializers/audit-log-event-actor.serializer.ts new file mode 100644 index 000000000..68722656a --- /dev/null +++ b/src/audit-logs/serializers/audit-log-event-actor.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogEventActor, + AuditLogEventActorResponse, +} from '../interfaces/audit-log-event-actor.interface'; + +export const deserializeAuditLogEventActor = ( + response: AuditLogEventActorResponse, +): AuditLogEventActor => ({ + id: response.id, + type: response.type, + name: response.name, + metadata: response.metadata, +}); + +export const serializeAuditLogEventActor = ( + model: AuditLogEventActor, +): AuditLogEventActorResponse => ({ + id: model.id, + type: model.type, + name: model.name, + metadata: model.metadata, +}); diff --git a/src/audit-logs/serializers/audit-log-event-context.serializer.ts b/src/audit-logs/serializers/audit-log-event-context.serializer.ts new file mode 100644 index 000000000..fee5f2ff7 --- /dev/null +++ b/src/audit-logs/serializers/audit-log-event-context.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogEventContext, + AuditLogEventContextResponse, +} from '../interfaces/audit-log-event-context.interface'; + +export const deserializeAuditLogEventContext = ( + response: AuditLogEventContextResponse, +): AuditLogEventContext => ({ + location: response.location, + userAgent: response.user_agent, +}); + +export const serializeAuditLogEventContext = ( + model: AuditLogEventContext, +): AuditLogEventContextResponse => ({ + location: model.location, + user_agent: model.userAgent, +}); diff --git a/src/audit-logs/serializers/audit-log-event-create-response.serializer.ts b/src/audit-logs/serializers/audit-log-event-create-response.serializer.ts new file mode 100644 index 000000000..517bf402f --- /dev/null +++ b/src/audit-logs/serializers/audit-log-event-create-response.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogEventCreateResponse, + AuditLogEventCreateResponseWire, +} from '../interfaces/audit-log-event-create-response.interface'; + +export const deserializeAuditLogEventCreateResponse = ( + response: AuditLogEventCreateResponseWire, +): AuditLogEventCreateResponse => ({ + success: response.success, +}); + +export const serializeAuditLogEventCreateResponse = ( + model: AuditLogEventCreateResponse, +): AuditLogEventCreateResponseWire => ({ + success: model.success, +}); diff --git a/src/audit-logs/serializers/audit-log-event-ingestion.serializer.ts b/src/audit-logs/serializers/audit-log-event-ingestion.serializer.ts new file mode 100644 index 000000000..ee8188f17 --- /dev/null +++ b/src/audit-logs/serializers/audit-log-event-ingestion.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogEventIngestion, + AuditLogEventIngestionResponse, +} from '../interfaces/audit-log-event-ingestion.interface'; +import { + deserializeAuditLogEvent, + serializeAuditLogEvent, +} from './audit-log-event.serializer'; + +export const deserializeAuditLogEventIngestion = ( + response: AuditLogEventIngestionResponse, +): AuditLogEventIngestion => ({ + organizationId: response.organization_id, + event: deserializeAuditLogEvent(response.event), +}); + +export const serializeAuditLogEventIngestion = ( + model: AuditLogEventIngestion, +): AuditLogEventIngestionResponse => ({ + organization_id: model.organizationId, + event: serializeAuditLogEvent(model.event), +}); diff --git a/src/audit-logs/serializers/audit-log-event-target.serializer.ts b/src/audit-logs/serializers/audit-log-event-target.serializer.ts new file mode 100644 index 000000000..ac7fb9400 --- /dev/null +++ b/src/audit-logs/serializers/audit-log-event-target.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeAuditLogEventActor as deserializeAuditLogEventTarget, + serializeAuditLogEventActor as serializeAuditLogEventTarget, +} from './audit-log-event-actor.serializer'; diff --git a/src/audit-logs/serializers/audit-log-event.serializer.ts b/src/audit-logs/serializers/audit-log-event.serializer.ts new file mode 100644 index 000000000..bcf60478a --- /dev/null +++ b/src/audit-logs/serializers/audit-log-event.serializer.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogEvent, + AuditLogEventResponse, +} from '../interfaces/audit-log-event.interface'; +import { + deserializeAuditLogEventActor, + serializeAuditLogEventActor, +} from './audit-log-event-actor.serializer'; +import { + deserializeAuditLogEventTarget, + serializeAuditLogEventTarget, +} from './audit-log-event-target.serializer'; +import { + deserializeAuditLogEventContext, + serializeAuditLogEventContext, +} from './audit-log-event-context.serializer'; + +export const deserializeAuditLogEvent = ( + response: AuditLogEventResponse, +): AuditLogEvent => ({ + action: response.action, + occurredAt: response.occurred_at, + actor: deserializeAuditLogEventActor(response.actor), + targets: response.targets.map(deserializeAuditLogEventTarget), + context: deserializeAuditLogEventContext(response.context), + metadata: response.metadata, + version: response.version, +}); + +export const serializeAuditLogEvent = ( + model: AuditLogEvent, +): AuditLogEventResponse => ({ + action: model.action, + occurred_at: model.occurredAt, + actor: serializeAuditLogEventActor(model.actor), + targets: model.targets.map(serializeAuditLogEventTarget), + context: serializeAuditLogEventContext(model.context), + metadata: model.metadata, + version: model.version, +}); diff --git a/src/audit-logs/serializers/audit-log-export-creation.serializer.ts b/src/audit-logs/serializers/audit-log-export-creation.serializer.ts new file mode 100644 index 000000000..28f0a7fd2 --- /dev/null +++ b/src/audit-logs/serializers/audit-log-export-creation.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogExportCreation, + AuditLogExportCreationResponse, +} from '../interfaces/audit-log-export-creation.interface'; + +export const deserializeAuditLogExportCreation = ( + response: AuditLogExportCreationResponse, +): AuditLogExportCreation => ({ + organizationId: response.organization_id, + rangeStart: response.range_start, + rangeEnd: response.range_end, + actions: response.actions, + actors: response.actors, + actorNames: response.actor_names, + actorIds: response.actor_ids, + targets: response.targets, +}); + +export const serializeAuditLogExportCreation = ( + model: AuditLogExportCreation, +): AuditLogExportCreationResponse => ({ + organization_id: model.organizationId, + range_start: model.rangeStart, + range_end: model.rangeEnd, + actions: model.actions, + actors: model.actors, + actor_names: model.actorNames, + actor_ids: model.actorIds, + targets: model.targets, +}); diff --git a/src/audit-logs/serializers/audit-log-export-json.serializer.ts b/src/audit-logs/serializers/audit-log-export-json.serializer.ts new file mode 100644 index 000000000..a229c1097 --- /dev/null +++ b/src/audit-logs/serializers/audit-log-export-json.serializer.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogExportJson, + AuditLogExportJsonResponse, +} from '../interfaces/audit-log-export-json.interface'; + +export const deserializeAuditLogExportJson = ( + response: AuditLogExportJsonResponse, +): AuditLogExportJson => ({ + object: response.object, + id: response.id, + state: response.state, + url: response.url ?? null, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeAuditLogExportJson = ( + model: AuditLogExportJson, +): AuditLogExportJsonResponse => ({ + object: model.object, + id: model.id, + state: model.state, + url: model.url ?? null, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/audit-logs/serializers/audit-log-schema-actor.serializer.ts b/src/audit-logs/serializers/audit-log-schema-actor.serializer.ts new file mode 100644 index 000000000..8a0eaf5b3 --- /dev/null +++ b/src/audit-logs/serializers/audit-log-schema-actor.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogSchemaActor, + AuditLogSchemaActorResponse, +} from '../interfaces/audit-log-schema-actor.interface'; + +export const deserializeAuditLogSchemaActor = ( + response: AuditLogSchemaActorResponse, +): AuditLogSchemaActor => ({ + metadata: response.metadata, +}); + +export const serializeAuditLogSchemaActor = ( + model: AuditLogSchemaActor, +): AuditLogSchemaActorResponse => ({ + metadata: model.metadata, +}); diff --git a/src/audit-logs/serializers/audit-log-schema-json-actor.serializer.ts b/src/audit-logs/serializers/audit-log-schema-json-actor.serializer.ts new file mode 100644 index 000000000..a8e1213ae --- /dev/null +++ b/src/audit-logs/serializers/audit-log-schema-json-actor.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeAuditLogSchemaActor as deserializeAuditLogSchemaJsonActor, + serializeAuditLogSchemaActor as serializeAuditLogSchemaJsonActor, +} from './audit-log-schema-actor.serializer'; diff --git a/src/audit-logs/serializers/audit-log-schema-json-target.serializer.ts b/src/audit-logs/serializers/audit-log-schema-json-target.serializer.ts new file mode 100644 index 000000000..004875282 --- /dev/null +++ b/src/audit-logs/serializers/audit-log-schema-json-target.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeAuditLogSchemaTarget as deserializeAuditLogSchemaJsonTarget, + serializeAuditLogSchemaTarget as serializeAuditLogSchemaJsonTarget, +} from './audit-log-schema-target.serializer'; diff --git a/src/audit-logs/serializers/audit-log-schema-json.serializer.ts b/src/audit-logs/serializers/audit-log-schema-json.serializer.ts new file mode 100644 index 000000000..2cfb0c84b --- /dev/null +++ b/src/audit-logs/serializers/audit-log-schema-json.serializer.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogSchemaJson, + AuditLogSchemaJsonResponse, +} from '../interfaces/audit-log-schema-json.interface'; +import { + deserializeAuditLogSchemaJsonActor, + serializeAuditLogSchemaJsonActor, +} from './audit-log-schema-json-actor.serializer'; +import { + deserializeAuditLogSchemaJsonTarget, + serializeAuditLogSchemaJsonTarget, +} from './audit-log-schema-json-target.serializer'; + +export const deserializeAuditLogSchemaJson = ( + response: AuditLogSchemaJsonResponse, +): AuditLogSchemaJson => ({ + object: response.object, + version: response.version, + actor: + response.actor != null + ? deserializeAuditLogSchemaJsonActor(response.actor) + : undefined, + targets: response.targets.map(deserializeAuditLogSchemaJsonTarget), + metadata: response.metadata, + createdAt: response.created_at, +}); + +export const serializeAuditLogSchemaJson = ( + model: AuditLogSchemaJson, +): AuditLogSchemaJsonResponse => ({ + object: model.object, + version: model.version, + actor: + model.actor != null + ? serializeAuditLogSchemaJsonActor(model.actor) + : undefined, + targets: model.targets.map(serializeAuditLogSchemaJsonTarget), + metadata: model.metadata, + created_at: model.createdAt, +}); diff --git a/src/audit-logs/serializers/audit-log-schema-target.serializer.ts b/src/audit-logs/serializers/audit-log-schema-target.serializer.ts new file mode 100644 index 000000000..92f7d72e9 --- /dev/null +++ b/src/audit-logs/serializers/audit-log-schema-target.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogSchemaTarget, + AuditLogSchemaTargetResponse, +} from '../interfaces/audit-log-schema-target.interface'; + +export const deserializeAuditLogSchemaTarget = ( + response: AuditLogSchemaTargetResponse, +): AuditLogSchemaTarget => ({ + type: response.type, + metadata: response.metadata, +}); + +export const serializeAuditLogSchemaTarget = ( + model: AuditLogSchemaTarget, +): AuditLogSchemaTargetResponse => ({ + type: model.type, + metadata: model.metadata, +}); diff --git a/src/audit-logs/serializers/audit-log-schema.serializer.ts b/src/audit-logs/serializers/audit-log-schema.serializer.ts new file mode 100644 index 000000000..7bf85b007 --- /dev/null +++ b/src/audit-logs/serializers/audit-log-schema.serializer.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogSchema, + AuditLogSchemaResponse, +} from '../interfaces/audit-log-schema.interface'; +import { + deserializeAuditLogSchemaActor, + serializeAuditLogSchemaActor, +} from './audit-log-schema-actor.serializer'; +import { + deserializeAuditLogSchemaTarget, + serializeAuditLogSchemaTarget, +} from './audit-log-schema-target.serializer'; + +export const deserializeAuditLogSchema = ( + response: AuditLogSchemaResponse, +): AuditLogSchema => ({ + actor: + response.actor != null + ? deserializeAuditLogSchemaActor(response.actor) + : undefined, + targets: response.targets.map(deserializeAuditLogSchemaTarget), + metadata: response.metadata, +}); + +export const serializeAuditLogSchema = ( + model: AuditLogSchema, +): AuditLogSchemaResponse => ({ + actor: + model.actor != null ? serializeAuditLogSchemaActor(model.actor) : undefined, + targets: model.targets.map(serializeAuditLogSchemaTarget), + metadata: model.metadata, +}); diff --git a/src/audit-logs/serializers/audit-logs-retention-json.serializer.ts b/src/audit-logs/serializers/audit-logs-retention-json.serializer.ts new file mode 100644 index 000000000..2c0598aee --- /dev/null +++ b/src/audit-logs/serializers/audit-logs-retention-json.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogsRetentionJson, + AuditLogsRetentionJsonResponse, +} from '../interfaces/audit-logs-retention-json.interface'; + +export const deserializeAuditLogsRetentionJson = ( + response: AuditLogsRetentionJsonResponse, +): AuditLogsRetentionJson => ({ + retentionPeriodInDays: response.retention_period_in_days ?? null, +}); + +export const serializeAuditLogsRetentionJson = ( + model: AuditLogsRetentionJson, +): AuditLogsRetentionJsonResponse => ({ + retention_period_in_days: model.retentionPeriodInDays, +}); diff --git a/src/audit-logs/serializers/update-audit-logs-retention.serializer.ts b/src/audit-logs/serializers/update-audit-logs-retention.serializer.ts new file mode 100644 index 000000000..78504c517 --- /dev/null +++ b/src/audit-logs/serializers/update-audit-logs-retention.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateAuditLogsRetention, + UpdateAuditLogsRetentionResponse, +} from '../interfaces/update-audit-logs-retention.interface'; + +export const deserializeUpdateAuditLogsRetention = ( + response: UpdateAuditLogsRetentionResponse, +): UpdateAuditLogsRetention => ({ + retentionPeriodInDays: response.retention_period_in_days, +}); + +export const serializeUpdateAuditLogsRetention = ( + model: UpdateAuditLogsRetention, +): UpdateAuditLogsRetentionResponse => ({ + retention_period_in_days: model.retentionPeriodInDays, +}); diff --git a/src/authorization/authorization.ts b/src/authorization/authorization.ts index 158c060a6..a493f1791 100644 --- a/src/authorization/authorization.ts +++ b/src/authorization/authorization.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { WorkOS } from '../workos'; import { Role, @@ -80,10 +82,24 @@ import { AuthorizationOrganizationMembershipListResponse, } from '../user-management/interfaces/organization-membership.interface'; import { deserializeAuthorizationOrganizationMembership } from '../user-management/serializers/organization-membership.serializer'; +import type { PaginationOptions } from '../common/interfaces/pagination-options.interface'; +import type { AuthorizationAssignment } from './interfaces/authorization-assignment.interface'; export class Authorization { constructor(private readonly workos: WorkOS) {} + /** + * Create an environment role + * + * Create a new environment role. + * @param payload - Object containing slug, name. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ async createEnvironmentRole( options: CreateEnvironmentRoleOptions, ): Promise { @@ -94,6 +110,13 @@ export class Authorization { return deserializeEnvironmentRole(data); } + /** + * List environment roles + * + * List all environment roles in priority order. + * @returns {Promise} + * @throws {AuthorizationException} 403 + */ async listEnvironmentRoles(): Promise { const { data } = await this.workos.get( '/authorization/roles', @@ -104,6 +127,16 @@ export class Authorization { }; } + /** + * Get an environment role + * + * Get an environment role by its slug. + * @param slug - The slug of the environment role. + * @example "admin" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async getEnvironmentRole(slug: string): Promise { const { data } = await this.workos.get( `/authorization/roles/${slug}`, @@ -111,6 +144,19 @@ export class Authorization { return deserializeEnvironmentRole(data); } + /** + * Update an environment role + * + * Update an existing environment role. + * @param slug - The slug of the environment role. + * @example "admin" + * @param payload - The request body. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async updateEnvironmentRole( slug: string, options: UpdateEnvironmentRoleOptions, @@ -122,6 +168,19 @@ export class Authorization { return deserializeEnvironmentRole(data); } + /** + * Set permissions for an environment role + * + * Replace all permissions on an environment role with the provided list. + * @param slug - The slug of the environment role. + * @example "admin" + * @param payload - Object containing permissions. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async setEnvironmentRolePermissions( slug: string, options: SetEnvironmentRolePermissionsOptions, @@ -133,6 +192,19 @@ export class Authorization { return deserializeEnvironmentRole(data); } + /** + * Add a permission to an environment role + * + * Add a single permission to an environment role. If the permission is already assigned to the role, this operation has no effect. + * @param slug - The slug of the environment role. + * @example "admin" + * @param payload - Object containing slug. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async addEnvironmentRolePermission( slug: string, options: AddEnvironmentRolePermissionOptions, @@ -144,6 +216,20 @@ export class Authorization { return deserializeEnvironmentRole(data); } + /** + * Create a custom organization role + * + * Create a new custom organization role. When slug is omitted, it is auto-generated from the role name. + * @param organizationId - The ID of the organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param payload - Object containing name. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ async createOrganizationRole( organizationId: string, options: CreateOrganizationRoleOptions, @@ -155,6 +241,16 @@ export class Authorization { return deserializeOrganizationRole(data); } + /** + * List organization roles + * + * Get a list of all roles that apply to an organization. This includes both environment roles and organization-specific roles, returned in priority order. + * @param organizationId - The ID of the organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async listOrganizationRoles(organizationId: string): Promise { const { data } = await this.workos.get( `/authorization/organizations/${organizationId}/roles`, @@ -165,6 +261,18 @@ export class Authorization { }; } + /** + * Get an organization role + * + * Retrieve a role that applies to an organization by its slug. This can return either an environment role or an organization-specific role. + * @param organizationId - The ID of the organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param slug - The slug of the role. + * @example "org-billing-admin" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async getOrganizationRole( organizationId: string, slug: string, @@ -175,6 +283,21 @@ export class Authorization { return deserializeRole(data); } + /** + * Update an organization role + * + * Update an existing custom organization role. Only the fields provided in the request body will be updated. + * @param organizationId - The ID of the organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param slug - The slug of the role. + * @example "org-billing-admin" + * @param payload - The request body. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async updateOrganizationRole( organizationId: string, slug: string, @@ -187,6 +310,20 @@ export class Authorization { return deserializeOrganizationRole(data); } + /** + * Delete a custom organization role + * + * Delete an existing custom organization role. + * @param organizationId - The ID of the organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param slug - The slug of the role. + * @example "org-admin" + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + */ async deleteOrganizationRole( organizationId: string, slug: string, @@ -196,6 +333,21 @@ export class Authorization { ); } + /** + * Add a permission to an organization role + * + * Add a single permission to an organization role. If the permission is already assigned to the role, this operation has no effect. + * @param organizationId - The ID of the organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param slug - The slug of the role. + * @example "org-admin" + * @param payload - Object containing slug. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async setOrganizationRolePermissions( organizationId: string, slug: string, @@ -208,6 +360,20 @@ export class Authorization { return deserializeOrganizationRole(data); } + /** + * Set permissions for a role + * + * Replace all permissions on a role with the provided list. + * @param organizationId - The ID of the organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param slug - The slug of the role. + * @example "org-admin" + * @param payload - Object containing permissions. + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async addOrganizationRolePermission( organizationId: string, slug: string, @@ -220,6 +386,20 @@ export class Authorization { return deserializeOrganizationRole(data); } + /** + * Remove a permission from an organization role + * + * Remove a single permission from an organization role by its slug. + * @param organizationId - The ID of the organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param slug - The slug of the role. + * @example "org-admin" + * @param permissionSlug - The slug of the permission to remove. + * @example "documents:read" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async removeOrganizationRolePermission( organizationId: string, slug: string, @@ -230,7 +410,17 @@ export class Authorization { ); } - /** @deprecated Use `workos.permissions.create()` instead. */ + /** + * Create a permission + * + * Create a new permission in your WorkOS environment. The permission can then be assigned to environment roles and organization roles. + * @param payload - Object containing slug, name. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ async createPermission( options: CreatePermissionOptions, ): Promise { @@ -241,7 +431,14 @@ export class Authorization { return deserializePermission(data); } - /** @deprecated Use `workos.permissions.list()` instead. */ + /** + * List permissions + * + * Get a list of all permissions in your WorkOS environment. + * @param options - Pagination and filter options. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async listPermissions( options?: ListPermissionsOptions, ): Promise { @@ -259,7 +456,15 @@ export class Authorization { }; } - /** @deprecated Use `workos.permissions.find()` instead. */ + /** + * Get a permission + * + * Retrieve a permission by its unique slug. + * @param slug - A unique key to reference the permission. Must be lowercase and contain only letters, numbers, hyphens, underscores, colons, periods, and asterisks. + * @example "documents:read" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getPermission(slug: string): Promise { const { data } = await this.workos.get( `/authorization/permissions/${slug}`, @@ -267,7 +472,18 @@ export class Authorization { return deserializePermission(data); } - /** @deprecated Use `workos.permissions.update()` instead. */ + /** + * Update a permission + * + * Update an existing permission. Only the fields provided in the request body will be updated. + * @param slug - A unique key to reference the permission. Must be lowercase and contain only letters, numbers, hyphens, underscores, colons, periods, and asterisks. + * @example "documents:read" + * @param payload - The request body. + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async updatePermission( slug: string, options: UpdatePermissionOptions, @@ -279,11 +495,31 @@ export class Authorization { return deserializePermission(data); } - /** @deprecated Use `workos.permissions.delete()` instead. */ + /** + * Delete a permission + * + * Delete an existing permission. System permissions cannot be deleted. + * @param slug - A unique key to reference the permission. Must be lowercase and contain only letters, numbers, hyphens, underscores, colons, periods, and asterisks. + * @example "documents:read" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async deletePermission(slug: string): Promise { await this.workos.delete(`/authorization/permissions/${slug}`); } + /** + * Get a resource + * + * Retrieve the details of an authorization resource by its ID. + * @param resourceId - The ID of the authorization resource. + * @example "authz_resource_01HXYZ123456789ABCDEFGHIJ" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async getResource(resourceId: string): Promise { const { data } = await this.workos.get( `/authorization/resources/${resourceId}`, @@ -291,6 +527,18 @@ export class Authorization { return deserializeAuthorizationResource(data); } + /** + * Create an authorization resource + * + * Create a new authorization resource. + * @param payload - Object containing externalId, name, resourceTypeSlug, organizationId. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ async createResource( options: CreateAuthorizationResourceOptions, ): Promise { @@ -301,6 +549,18 @@ export class Authorization { return deserializeAuthorizationResource(data); } + /** + * Update a resource + * + * Update an existing authorization resource. + * @param payload - The request body. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ async updateResource( options: UpdateAuthorizationResourceOptions, ): Promise { @@ -311,6 +571,20 @@ export class Authorization { return deserializeAuthorizationResource(data); } + /** + * Delete an authorization resource + * + * Delete an authorization resource and all its descendants. + * @param options.cascadeDelete - If true, deletes all descendant resources and role assignments. If not set and the resource has children or assignments, the request will fail. + * @default false + * @example false + * @param options - Additional query options. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + */ async deleteResource( options: DeleteAuthorizationResourceOptions, ): Promise { @@ -324,6 +598,15 @@ export class Authorization { await this.workos.delete(`/authorization/resources/${resourceId}`, query); } + /** + * List resources + * + * Get a paginated list of authorization resources. + * @param options - Pagination and filter options. + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {UnprocessableEntityException} 422 + */ async listResources( options: ListAuthorizationResourcesOptions = {}, ): Promise { @@ -341,6 +624,20 @@ export class Authorization { }; } + /** + * Get a resource by external ID + * + * Retrieve the details of an authorization resource by its external ID, organization, and resource type. This is useful when you only have the external ID from your system and need to fetch the full resource details. + * @param organizationId - The ID of the organization that owns the resource. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param resourceTypeSlug - The slug of the resource type. + * @example "project" + * @param externalId - An identifier you provide to reference the resource in your system. + * @example "proj-456" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async getResourceByExternalId( options: GetAuthorizationResourceByExternalIdOptions, ): Promise { @@ -351,6 +648,24 @@ export class Authorization { return deserializeAuthorizationResource(data); } + /** + * Update a resource by external ID + * + * Update an existing authorization resource using its external ID. + * @param organizationId - The ID of the organization that owns the resource. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param resourceTypeSlug - The slug of the resource type. + * @example "project" + * @param externalId - An identifier you provide to reference the resource in your system. + * @example "proj-456" + * @param payload - The request body. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ async updateResourceByExternalId( options: UpdateAuthorizationResourceByExternalIdOptions, ): Promise { @@ -361,6 +676,23 @@ export class Authorization { ); return deserializeAuthorizationResource(data); } + /** + * Delete an authorization resource by external ID + * + * Delete an authorization resource by organization, resource type, and external ID. This also deletes all descendant resources. + * @param organizationId - The ID of the organization that owns the resource. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param resourceTypeSlug - The slug of the resource type. + * @example "project" + * @param externalId - An identifier you provide to reference the resource in your system. + * @example "proj-456" + * @param options - Additional query options. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + */ async deleteResourceByExternalId( options: DeleteAuthorizationResourceByExternalIdOptions, ): Promise { @@ -378,6 +710,16 @@ export class Authorization { ); } + /** + * Check authorization + * + * Check if an organization membership has a specific permission on a resource. Supports identification by resource_id OR by resource_external_id + resource_type_slug. + * @param payload - Object containing permissionSlug. + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async check( options: AuthorizationCheckOptions, ): Promise { @@ -388,6 +730,17 @@ export class Authorization { return data; } + /** + * List role assignments + * + * List all role assignments for an organization membership. This returns all roles that have been assigned to the user on resources, including organization-level and sub-resource roles. + * @param organizationMembershipId - The ID of the organization membership. + * @example "om_01HXYZ123456789ABCDEFGHIJ" + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async listRoleAssignments( options: ListRoleAssignmentsOptions, ): Promise { @@ -406,6 +759,16 @@ export class Authorization { }; } + /** + * Assign a role + * + * Assign a role to an organization membership on a specific resource. + * @param payload - Object containing roleSlug. + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async assignRole(options: AssignRoleOptions): Promise { const { data } = await this.workos.post( `/authorization/organization_memberships/${options.organizationMembershipId}/role_assignments`, @@ -414,6 +777,16 @@ export class Authorization { return deserializeRoleAssignment(data); } + /** + * Remove a role assignment + * + * Remove a role assignment by role slug and resource. + * @param payload - Object containing roleSlug. + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async removeRole(options: RemoveRoleOptions): Promise { await this.workos.deleteWithBody( `/authorization/organization_memberships/${options.organizationMembershipId}/role_assignments`, @@ -421,6 +794,18 @@ export class Authorization { ); } + /** + * Remove a role assignment by ID + * + * Remove a role assignment using its ID. + * @param organizationMembershipId - The ID of the organization membership. + * @example "om_01HXYZ123456789ABCDEFGHIJ" + * @param roleAssignmentId - The ID of the role assignment to remove. + * @example "role_assignment_01HXYZ123456789ABCDEFGH" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async removeRoleAssignment( options: RemoveRoleAssignmentOptions, ): Promise { @@ -429,6 +814,21 @@ export class Authorization { ); } + /** + * List resources for organization membership + * + * Returns all child resources of a parent resource where the organization membership has a specific permission. This is useful for resource discovery—answering "What projects can this user access in this workspace?" + * + * You must provide either `parent_resource_id` or both `parent_resource_external_id` and `parent_resource_type_slug` to identify the parent resource. + * @param organizationMembershipId - The ID of the organization membership. + * @example "om_01HXYZ123456789ABCDEFGHIJ" + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async listResourcesForMembership( options: ListResourcesForMembershipOptions, ): Promise { @@ -449,6 +849,17 @@ export class Authorization { }; } + /** + * List organization memberships for resource + * + * Returns all organization memberships that have a specific permission on a resource instance. This is useful for answering "Who can access this resource?". + * @param options - Pagination and filter options. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async listMembershipsForResource( options: ListMembershipsForResourceOptions, ): Promise { @@ -470,6 +881,23 @@ export class Authorization { }; } + /** + * List memberships for a resource by external ID + * + * Returns all organization memberships that have a specific permission on a resource, using the resource's external ID. This is useful for answering "Who can access this resource?" when you only have the external ID. + * @param organizationId - The ID of the organization that owns the resource. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param resourceTypeSlug - The slug of the resource type this resource belongs to. + * @example "project" + * @param externalId - An identifier you provide to reference the resource in your system. + * @example "proj-456" + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async listMembershipsForResourceByExternalId( options: ListMembershipsForResourceByExternalIdOptions, ): Promise { @@ -491,3 +919,50 @@ export class Authorization { }; } } + +export interface ListOrganizationMembershipsForResourceByExternalIdOptions extends PaginationOptions { + /** The permission slug to filter by. Only users with this permission on the resource are returned. */ + permissionSlug: string; + /** Filter by assignment type. Use "direct" for direct assignments only, or "indirect" to include inherited assignments. */ + assignment?: 'direct' | 'indirect'; +} + +export interface ListResourcesOptions extends PaginationOptions { + /** Filter resources by organization ID. */ + organizationId?: string; + /** Filter resources by resource type slug. */ + resourceTypeSlug?: string; + /** Filter resources by parent resource ID. */ + parentResourceId?: string; + /** Filter resources by parent resource type slug. */ + parentResourceTypeSlug?: string; + /** Filter resources by parent external ID. */ + parentExternalId?: string; + /** Search resources by name. */ + search?: string; +} + +export interface ListOrganizationMembershipsForResourceOptions extends PaginationOptions { + /** The permission slug to filter by. Only users with this permission on the resource are returned. */ + permissionSlug: string; + /** Filter by assignment type. Use `direct` for direct assignments only, or `indirect` to include inherited assignments. */ + assignment?: 'direct' | 'indirect'; +} + +export interface ListOrganizationMembershipResourcesOptions extends PaginationOptions { + /** The permission slug to filter by. Only child resources where the organization membership has this permission are returned. */ + permissionSlug: string; + /** The WorkOS ID of the parent resource. Provide this or both `parent_resource_external_id` and `parent_resource_type_slug`, but not both. */ + parentResourceId?: string; + /** The slug of the parent resource type. Must be provided together with `parent_resource_external_id`. */ + parentResourceTypeSlug?: string; + /** The application-specific external identifier of the parent resource. Must be provided together with `parent_resource_type_slug`. */ + parentResourceExternalId?: string; +} + +export interface ListResourceOrganizationMembershipsOptions extends PaginationOptions { + /** The permission slug to filter by. Only users with this permission on the resource are returned. */ + permissionSlug: string; + /** Filter by assignment type. Use "direct" for direct assignments only, or "indirect" to include inherited assignments. */ + assignment?: AuthorizationAssignment; +} diff --git a/src/authorization/index.ts b/src/authorization/index.ts deleted file mode 100644 index d7b90839c..000000000 --- a/src/authorization/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './authorization'; -export * from './interfaces'; diff --git a/src/authorization/interfaces/add-role-permission.interface.ts b/src/authorization/interfaces/add-role-permission.interface.ts new file mode 100644 index 000000000..e8fa6aa3d --- /dev/null +++ b/src/authorization/interfaces/add-role-permission.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AddRolePermission { + /** The slug of the permission to add to the role. */ + slug: string; +} + +export interface AddRolePermissionResponse { + slug: string; +} diff --git a/src/authorization/interfaces/assign-role.interface.ts b/src/authorization/interfaces/assign-role.interface.ts new file mode 100644 index 000000000..da05fb5c1 --- /dev/null +++ b/src/authorization/interfaces/assign-role.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AssignRole { + /** The slug of the role to assign. */ + roleSlug: string; + /** The ID of the resource. Use either this or `resource_external_id` and `resource_type_slug`. */ + resourceId?: string; + /** The external ID of the resource. Requires `resource_type_slug`. */ + resourceExternalId?: string; + /** The resource type slug. Required with `resource_external_id`. */ + resourceTypeSlug?: string; +} + +export interface AssignRoleResponse { + role_slug: string; + resource_id?: string; + resource_external_id?: string; + resource_type_slug?: string; +} diff --git a/src/authorization/interfaces/authorization-assignment.interface.ts b/src/authorization/interfaces/authorization-assignment.interface.ts new file mode 100644 index 000000000..4b90a48d7 --- /dev/null +++ b/src/authorization/interfaces/authorization-assignment.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthorizationAssignment = 'direct' | 'indirect'; diff --git a/src/authorization/interfaces/authorization-check.interface.ts b/src/authorization/interfaces/authorization-check.interface.ts new file mode 100644 index 000000000..ac7159d74 --- /dev/null +++ b/src/authorization/interfaces/authorization-check.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuthorizationCheck { + /** Whether the organization membership has the specified permission on the resource. */ + authorized: boolean; +} + +export interface AuthorizationCheckResponse { + authorized: boolean; +} diff --git a/src/authorization/interfaces/authorization-order.interface.ts b/src/authorization/interfaces/authorization-order.interface.ts new file mode 100644 index 000000000..dfdd413a3 --- /dev/null +++ b/src/authorization/interfaces/authorization-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthorizationOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/authorization/interfaces/authorization-organization-roles-list-item.interface.ts b/src/authorization/interfaces/authorization-organization-roles-list-item.interface.ts new file mode 100644 index 000000000..860f379fd --- /dev/null +++ b/src/authorization/interfaces/authorization-organization-roles-list-item.interface.ts @@ -0,0 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthorizationOrganizationRolesType } from '../../common/interfaces/authorization-organization-roles-type.interface'; + +export interface AuthorizationOrganizationRolesListItem { + /** A unique slug for the role. */ + slug: string; + /** Distinguishes the role object. */ + object: 'role'; + /** Unique identifier of the role. */ + id: string; + /** A descriptive name for the role. */ + name: string; + /** An optional description of the role. */ + description: string | null; + /** Whether the role is scoped to the environment or an organization. */ + type: AuthorizationOrganizationRolesType; + /** The slug of the resource type the role is scoped to. */ + resourceTypeSlug: string; + /** The permission slugs assigned to the role. */ + permissions: string[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface AuthorizationOrganizationRolesListItemResponse { + slug: string; + object: 'role'; + id: string; + name: string; + description: string | null; + type: AuthorizationOrganizationRolesType; + resource_type_slug: string; + permissions: string[]; + created_at: string; + updated_at: string; +} diff --git a/src/authorization/interfaces/authorization-organization-roles-update-priority-order-item.interface.ts b/src/authorization/interfaces/authorization-organization-roles-update-priority-order-item.interface.ts new file mode 100644 index 000000000..856e0c12e --- /dev/null +++ b/src/authorization/interfaces/authorization-organization-roles-update-priority-order-item.interface.ts @@ -0,0 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthorizationOrganizationRolesUpdatePriorityOrderItemType } from '../../common/interfaces/authorization-organization-roles-update-priority-order-item-type.interface'; + +export interface AuthorizationOrganizationRolesUpdatePriorityOrderItem { + /** A unique slug for the role. */ + slug: string; + /** Distinguishes the role object. */ + object: 'role'; + /** Unique identifier of the role. */ + id: string; + /** A descriptive name for the role. */ + name: string; + /** An optional description of the role. */ + description: string | null; + /** Whether the role is scoped to the environment or an organization. */ + type: AuthorizationOrganizationRolesUpdatePriorityOrderItemType; + /** The slug of the resource type the role is scoped to. */ + resourceTypeSlug: string; + /** The permission slugs assigned to the role. */ + permissions: string[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface AuthorizationOrganizationRolesUpdatePriorityOrderItemResponse { + slug: string; + object: 'role'; + id: string; + name: string; + description: string | null; + type: AuthorizationOrganizationRolesUpdatePriorityOrderItemType; + resource_type_slug: string; + permissions: string[]; + created_at: string; + updated_at: string; +} diff --git a/src/authorization/interfaces/authorization-permission.interface.ts b/src/authorization/interfaces/authorization-permission.interface.ts new file mode 100644 index 000000000..ac727d924 --- /dev/null +++ b/src/authorization/interfaces/authorization-permission.interface.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuthorizationPermission { + /** Distinguishes the Permission object. */ + object: 'permission'; + /** Unique identifier of the Permission. */ + id: string; + /** A unique key to reference the permission. Must be lowercase and contain only letters, numbers, hyphens, underscores, colons, periods, and asterisks. */ + slug: string; + /** A descriptive name for the Permission. */ + name: string; + /** An optional description of the Permission. */ + description: string | null; + /** Whether the permission is a system permission. System permissions are managed by WorkOS and cannot be deleted. */ + system: boolean; + /** The slug of the resource type associated with the permission. */ + resourceTypeSlug: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface AuthorizationPermissionResponse { + object: 'permission'; + id: string; + slug: string; + name: string; + description: string | null; + system: boolean; + resource_type_slug: string; + created_at: string; + updated_at: string; +} diff --git a/src/authorization/interfaces/authorization-resource.interface.ts b/src/authorization/interfaces/authorization-resource.interface.ts index 51cfc6d0f..a66c2da66 100644 --- a/src/authorization/interfaces/authorization-resource.interface.ts +++ b/src/authorization/interfaces/authorization-resource.interface.ts @@ -1,13 +1,25 @@ +// This file is auto-generated by oagen. Do not edit. + export interface AuthorizationResource { + /** Distinguishes the Resource object. */ object: 'authorization_resource'; + /** The unique ID of the Resource. */ id: string; + /** An identifier you provide to reference the resource in your system. */ externalId: string; + /** A human-readable name for the Resource. */ name: string; + /** An optional description of the Resource. */ description: string | null; + /** The slug of the resource type this resource belongs to. */ resourceTypeSlug: string; + /** The ID of the organization that owns the resource. */ organizationId: string; + /** The ID of the parent resource, if this resource is nested. */ parentResourceId: string | null; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; } diff --git a/src/authorization/interfaces/check-authorization.interface.ts b/src/authorization/interfaces/check-authorization.interface.ts new file mode 100644 index 000000000..39b0ae99d --- /dev/null +++ b/src/authorization/interfaces/check-authorization.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CheckAuthorization { + /** The slug of the permission to check. */ + permissionSlug: string; + /** The ID of the resource. */ + resourceId?: string; + /** The external ID of the resource. */ + resourceExternalId?: string; + /** The slug of the resource type. */ + resourceTypeSlug?: string; +} + +export interface CheckAuthorizationResponse { + permission_slug: string; + resource_id?: string; + resource_external_id?: string; + resource_type_slug?: string; +} diff --git a/src/authorization/interfaces/create-authorization-permission.interface.ts b/src/authorization/interfaces/create-authorization-permission.interface.ts new file mode 100644 index 000000000..ddcfb825e --- /dev/null +++ b/src/authorization/interfaces/create-authorization-permission.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateAuthorizationPermission { + /** A unique key to reference the permission. Must be lowercase and contain only letters, numbers, hyphens, underscores, colons, periods, and asterisks. */ + slug: string; + /** A descriptive name for the Permission. */ + name: string; + /** An optional description of the Permission. */ + description?: string | null; + /** The slug of the resource type this permission is scoped to. */ + resourceTypeSlug?: string; +} + +export interface CreateAuthorizationPermissionResponse { + slug: string; + name: string; + description?: string | null; + resource_type_slug?: string; +} diff --git a/src/authorization/interfaces/create-authorization-resource.interface.ts b/src/authorization/interfaces/create-authorization-resource.interface.ts new file mode 100644 index 000000000..fe5784e00 --- /dev/null +++ b/src/authorization/interfaces/create-authorization-resource.interface.ts @@ -0,0 +1,31 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateAuthorizationResource { + /** An external identifier for the resource. */ + externalId: string; + /** A display name for the resource. */ + name: string; + /** An optional description of the resource. */ + description?: string | null; + /** The slug of the resource type. */ + resourceTypeSlug: string; + /** The ID of the organization this resource belongs to. */ + organizationId: string; + /** The ID of the parent resource. */ + parentResourceId?: string | null; + /** The external ID of the parent resource. */ + parentResourceExternalId?: string; + /** The resource type slug of the parent resource. */ + parentResourceTypeSlug?: string; +} + +export interface CreateAuthorizationResourceResponse { + external_id: string; + name: string; + description?: string | null; + resource_type_slug: string; + organization_id: string; + parent_resource_id?: string | null; + parent_resource_external_id?: string; + parent_resource_type_slug?: string; +} diff --git a/src/authorization/interfaces/create-organization-role.interface.ts b/src/authorization/interfaces/create-organization-role.interface.ts new file mode 100644 index 000000000..dade37e4f --- /dev/null +++ b/src/authorization/interfaces/create-organization-role.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateOrganizationRole { + /** A unique identifier for the role within the organization. When provided, must begin with 'org-' and contain only lowercase letters, numbers, hyphens, and underscores. When omitted, a slug is auto-generated from the role name and a random suffix. */ + slug?: string; + /** A descriptive name for the role. */ + name: string; + /** An optional description of the role's purpose. */ + description?: string | null; + /** The slug of the resource type the role is scoped to. */ + resourceTypeSlug?: string; +} + +export interface CreateOrganizationRoleResponse { + slug?: string; + name: string; + description?: string | null; + resource_type_slug?: string; +} diff --git a/src/authorization/interfaces/create-role.interface.ts b/src/authorization/interfaces/create-role.interface.ts new file mode 100644 index 000000000..c30ffa3f8 --- /dev/null +++ b/src/authorization/interfaces/create-role.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateAuthorizationPermission, + CreateAuthorizationPermissionResponse, +} from '../../permissions/interfaces/create-authorization-permission.interface'; + +export type CreateRole = CreateAuthorizationPermission; +export type CreateRoleResponse = CreateAuthorizationPermissionResponse; diff --git a/src/authorization/interfaces/index.ts b/src/authorization/interfaces/index.ts index a42183cd9..b16f746e8 100644 --- a/src/authorization/interfaces/index.ts +++ b/src/authorization/interfaces/index.ts @@ -1,30 +1,56 @@ -export * from './environment-role.interface'; -export * from './create-environment-role-options.interface'; -export * from './update-environment-role-options.interface'; -export * from './set-environment-role-permissions-options.interface'; +// This file is auto-generated by oagen. Do not edit. + export * from './add-environment-role-permission-options.interface'; -export * from './organization-role.interface'; -export * from './create-organization-role-options.interface'; -export * from './update-organization-role-options.interface'; -export * from './set-organization-role-permissions-options.interface'; export * from './add-organization-role-permission-options.interface'; -export * from './remove-organization-role-permission-options.interface'; -export * from './permission.interface'; -export * from './create-permission-options.interface'; -export * from './update-permission-options.interface'; -export * from './list-permissions-options.interface'; +export * from './add-role-permission.interface'; +export * from './assign-role-options.interface'; +export * from './assign-role.interface'; +export * from './authorization-assignment.interface'; +export * from './authorization-check.interface'; +export * from './authorization-order.interface'; +export * from './authorization-organization-roles-list-item.interface'; +export * from './authorization-organization-roles-update-priority-order-item.interface'; +export * from './authorization-permission.interface'; +export * from './authorization-resource-check.interface'; export * from './authorization-resource.interface'; -export * from './list-authorization-resources-options.interface'; -export * from './get-authorization-resource-by-external-id-options.interface'; -export * from './update-authorization-resource-by-external-id-options.interface'; +export * from './check-authorization.interface'; +export * from './create-authorization-permission.interface'; +export * from './create-authorization-resource.interface'; +export * from './create-environment-role-options.interface'; +export * from './create-organization-role-options.interface'; +export * from './create-organization-role.interface'; +export * from './create-permission-options.interface'; +export * from './create-role.interface'; export * from './delete-authorization-resource-by-external-id-options.interface'; export * from './delete-authorization-resource-options.interface'; -export * from './authorization-resource-check.interface'; -export * from './list-resources-for-membership-options.interface'; -export * from './list-memberships-for-resource-options.interface'; +export * from './environment-role.interface'; +export * from './get-authorization-resource-by-external-id-options.interface'; +export * from './list-authorization-resources-options.interface'; +export * from './list-data.interface'; export * from './list-memberships-for-resource-by-external-id-options.interface'; -export * from './role-assignment.interface'; +export * from './list-memberships-for-resource-options.interface'; +export * from './list-permissions-options.interface'; +export * from './list-resources-for-membership-options.interface'; export * from './list-role-assignments-options.interface'; -export * from './assign-role-options.interface'; -export * from './remove-role-options.interface'; +export * from './organization-role.interface'; +export * from './permission.interface'; +export * from './permissions-order.interface'; +export * from './remove-organization-role-permission-options.interface'; export * from './remove-role-assignment-options.interface'; +export * from './remove-role-options.interface'; +export * from './remove-role.interface'; +export * from './role-assignment.interface'; +export * from './set-environment-role-permissions-options.interface'; +export * from './set-organization-role-permissions-options.interface'; +export * from './set-role-permissions.interface'; +export * from './slim-role.interface'; +export * from './update-authorization-permission.interface'; +export * from './update-authorization-resource-by-external-id-options.interface'; +export * from './update-authorization-resource.interface'; +export * from './update-environment-role-options.interface'; +export * from './update-organization-role-options.interface'; +export * from './update-organization-role-priority-order.interface'; +export * from './update-organization-role.interface'; +export * from './update-permission-options.interface'; +export * from './update-role.interface'; +export * from './user-organization-membership-base-list-data.interface'; diff --git a/src/authorization/interfaces/list-data.interface.ts b/src/authorization/interfaces/list-data.interface.ts new file mode 100644 index 000000000..98e882205 --- /dev/null +++ b/src/authorization/interfaces/list-data.interface.ts @@ -0,0 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ListDataType } from '../../common/interfaces/list-data-type.interface'; + +export interface ListData { + /** A unique slug for the role. */ + slug: string; + /** Distinguishes the role object. */ + object: 'role'; + /** Unique identifier of the role. */ + id: string; + /** A descriptive name for the role. */ + name: string; + /** An optional description of the role. */ + description: string | null; + /** Whether the role is scoped to the environment or an organization. */ + type: ListDataType; + /** The slug of the resource type the role is scoped to. */ + resourceTypeSlug: string; + /** The permission slugs assigned to the role. */ + permissions: string[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface ListDataResponse { + slug: string; + object: 'role'; + id: string; + name: string; + description: string | null; + type: ListDataType; + resource_type_slug: string; + permissions: string[]; + created_at: string; + updated_at: string; +} diff --git a/src/authorization/interfaces/list.interface.ts b/src/authorization/interfaces/list.interface.ts new file mode 100644 index 000000000..5f99f0b25 --- /dev/null +++ b/src/authorization/interfaces/list.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ListData, ListDataResponse } from './list-data.interface'; + +export interface List { + object: 'list'; + /** The list of records for the current page. */ + data: ListData[]; +} + +export interface ListResponse { + object: 'list'; + data: ListDataResponse[]; +} diff --git a/src/authorization/interfaces/permission.interface.ts b/src/authorization/interfaces/permission.interface.ts index 0af2b6da0..3b6ad040b 100644 --- a/src/authorization/interfaces/permission.interface.ts +++ b/src/authorization/interfaces/permission.interface.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + export interface Permission { object: 'permission'; id: string; diff --git a/src/authorization/interfaces/permissions-order.interface.ts b/src/authorization/interfaces/permissions-order.interface.ts new file mode 100644 index 000000000..f3c6ae0b9 --- /dev/null +++ b/src/authorization/interfaces/permissions-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type PermissionsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/authorization/interfaces/remove-role.interface.ts b/src/authorization/interfaces/remove-role.interface.ts new file mode 100644 index 000000000..a6e70889a --- /dev/null +++ b/src/authorization/interfaces/remove-role.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AssignRole, AssignRoleResponse } from './assign-role.interface'; + +export type RemoveRole = AssignRole; +export type RemoveRoleResponse = AssignRoleResponse; diff --git a/src/authorization/interfaces/role-assignment-resource.interface.ts b/src/authorization/interfaces/role-assignment-resource.interface.ts new file mode 100644 index 000000000..2e742a401 --- /dev/null +++ b/src/authorization/interfaces/role-assignment-resource.interface.ts @@ -0,0 +1,17 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The resource to which the role is assigned. */ +export interface RoleAssignmentResource { + /** The unique ID of the Resource. */ + id: string; + /** An identifier you provide to reference the resource in your system. */ + externalId: string; + /** The slug of the resource type this resource belongs to. */ + resourceTypeSlug: string; +} + +export interface RoleAssignmentResourceResponse { + id: string; + external_id: string; + resource_type_slug: string; +} diff --git a/src/authorization/interfaces/role-assignment.interface.ts b/src/authorization/interfaces/role-assignment.interface.ts index 83167ed9c..85eb74721 100644 --- a/src/authorization/interfaces/role-assignment.interface.ts +++ b/src/authorization/interfaces/role-assignment.interface.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + export interface RoleAssignmentRole { slug: string; } @@ -15,11 +17,17 @@ export interface RoleAssignmentResourceResponse { } export interface RoleAssignment { + /** Distinguishes the role assignment object. */ object: 'role_assignment'; + /** Unique identifier of the role assignment. */ id: string; + /** The role included in the assignment. */ role: RoleAssignmentRole; + /** The resource to which the role is assigned. */ resource: RoleAssignmentResource; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; } diff --git a/src/authorization/interfaces/role-list.interface.ts b/src/authorization/interfaces/role-list.interface.ts new file mode 100644 index 000000000..7a90d79da --- /dev/null +++ b/src/authorization/interfaces/role-list.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { Role, RoleResponse } from './role.interface'; + +export interface RoleList { + object: 'list'; + /** The list of records for the current page. */ + data: Role[]; +} + +export interface RoleListResponse { + object: 'list'; + data: RoleResponse[]; +} diff --git a/src/authorization/interfaces/role.interface.ts b/src/authorization/interfaces/role.interface.ts new file mode 100644 index 000000000..d477155f1 --- /dev/null +++ b/src/authorization/interfaces/role.interface.ts @@ -0,0 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { RoleType } from '../../common/interfaces/role-type.interface'; + +export interface Role { + /** A unique slug for the role. */ + slug: string; + /** Distinguishes the role object. */ + object?: 'role'; + /** Unique identifier of the role. */ + id?: string; + /** A descriptive name for the role. */ + name?: string; + /** An optional description of the role. */ + description?: string | null; + /** Whether the role is scoped to the environment or an organization. */ + type?: RoleType; + /** The slug of the resource type the role is scoped to. */ + resourceTypeSlug?: string; + /** The permission slugs assigned to the role. */ + permissions?: string[]; + /** An ISO 8601 timestamp. */ + createdAt?: string; + /** An ISO 8601 timestamp. */ + updatedAt?: string; +} + +export interface RoleResponse { + slug: string; + object?: 'role'; + id?: string; + name?: string; + description?: string | null; + type?: RoleType; + resource_type_slug?: string; + permissions?: string[]; + created_at?: string; + updated_at?: string; +} diff --git a/src/authorization/interfaces/set-role-permissions.interface.ts b/src/authorization/interfaces/set-role-permissions.interface.ts new file mode 100644 index 000000000..04446b1fa --- /dev/null +++ b/src/authorization/interfaces/set-role-permissions.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface SetRolePermissions { + /** The permission slugs to assign to the role. */ + permissions: string[]; +} + +export interface SetRolePermissionsResponse { + permissions: string[]; +} diff --git a/src/authorization/interfaces/slim-role.interface.ts b/src/authorization/interfaces/slim-role.interface.ts new file mode 100644 index 000000000..8782403cf --- /dev/null +++ b/src/authorization/interfaces/slim-role.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AddRolePermission, + AddRolePermissionResponse, +} from './add-role-permission.interface'; + +export type SlimRole = AddRolePermission; +export type SlimRoleResponse = AddRolePermissionResponse; diff --git a/src/authorization/interfaces/update-authorization-permission.interface.ts b/src/authorization/interfaces/update-authorization-permission.interface.ts new file mode 100644 index 000000000..9815a0288 --- /dev/null +++ b/src/authorization/interfaces/update-authorization-permission.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateOrganizationRole, + UpdateOrganizationRoleResponse, +} from './update-organization-role.interface'; + +export type UpdateAuthorizationPermission = UpdateOrganizationRole; +export type UpdateAuthorizationPermissionResponse = + UpdateOrganizationRoleResponse; diff --git a/src/authorization/interfaces/update-authorization-resource.interface.ts b/src/authorization/interfaces/update-authorization-resource.interface.ts new file mode 100644 index 000000000..bfca21b71 --- /dev/null +++ b/src/authorization/interfaces/update-authorization-resource.interface.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface UpdateAuthorizationResource { + /** A display name for the resource. */ + name?: string; + /** An optional description of the resource. */ + description?: string | null; + /** The ID of the parent resource. */ + parentResourceId?: string; + /** The external ID of the parent resource. */ + parentResourceExternalId?: string; + /** The resource type slug of the parent resource. */ + parentResourceTypeSlug?: string; +} + +export interface UpdateAuthorizationResourceResponse { + name?: string; + description?: string | null; + parent_resource_id?: string; + parent_resource_external_id?: string; + parent_resource_type_slug?: string; +} diff --git a/src/authorization/interfaces/update-organization-role-priority-order.interface.ts b/src/authorization/interfaces/update-organization-role-priority-order.interface.ts new file mode 100644 index 000000000..d0cb8a13b --- /dev/null +++ b/src/authorization/interfaces/update-organization-role-priority-order.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface UpdateOrganizationRolePriorityOrder { + /** An ordered list of role slugs defining the priority order. */ + rolePriorityOrder: string[]; +} + +export interface UpdateOrganizationRolePriorityOrderResponse { + role_priority_order: string[]; +} diff --git a/src/authorization/interfaces/update-role.interface.ts b/src/authorization/interfaces/update-role.interface.ts new file mode 100644 index 000000000..f5914c6d8 --- /dev/null +++ b/src/authorization/interfaces/update-role.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateOrganizationRole, + UpdateOrganizationRoleResponse, +} from './update-organization-role.interface'; + +export type UpdateRole = UpdateOrganizationRole; +export type UpdateRoleResponse = UpdateOrganizationRoleResponse; diff --git a/src/authorization/interfaces/user-organization-membership-base-list-data.interface.ts b/src/authorization/interfaces/user-organization-membership-base-list-data.interface.ts new file mode 100644 index 000000000..4847f12b8 --- /dev/null +++ b/src/authorization/interfaces/user-organization-membership-base-list-data.interface.ts @@ -0,0 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { UserOrganizationMembershipBaseListDataStatus } from '../../common/interfaces/user-organization-membership-base-list-data-status.interface'; + +export interface UserOrganizationMembershipBaseListData { + /** Distinguishes the organization membership object. */ + object: 'organization_membership'; + /** The unique ID of the organization membership. */ + id: string; + /** The ID of the user. */ + userId: string; + /** The ID of the organization which the user belongs to. */ + organizationId: string; + /** The status of the organization membership. One of `active`, `inactive`, or `pending`. */ + status: UserOrganizationMembershipBaseListDataStatus; + /** Whether this organization membership is managed by a directory sync connection. */ + directoryManaged: boolean; + /** The name of the organization which the user belongs to. */ + organizationName?: string; + /** An object containing IdP-sourced attributes from the linked [Directory User](https://workos.com/docs/reference/directory-sync/directory-user) or [SSO Profile](https://workos.com/docs/reference/sso/profile). Directory User attributes take precedence when both are linked. */ + customAttributes?: Record; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface UserOrganizationMembershipBaseListDataResponse { + object: 'organization_membership'; + id: string; + user_id: string; + organization_id: string; + status: UserOrganizationMembershipBaseListDataStatus; + directory_managed: boolean; + organization_name?: string; + custom_attributes?: Record; + created_at: string; + updated_at: string; +} diff --git a/src/authorization/serializers/add-role-permission.serializer.ts b/src/authorization/serializers/add-role-permission.serializer.ts new file mode 100644 index 000000000..f43834efd --- /dev/null +++ b/src/authorization/serializers/add-role-permission.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AddRolePermission, + AddRolePermissionResponse, +} from '../interfaces/add-role-permission.interface'; + +export const deserializeAddRolePermission = ( + response: AddRolePermissionResponse, +): AddRolePermission => ({ + slug: response.slug, +}); + +export const serializeAddRolePermission = ( + model: AddRolePermission, +): AddRolePermissionResponse => ({ + slug: model.slug, +}); diff --git a/src/authorization/serializers/assign-role.serializer.ts b/src/authorization/serializers/assign-role.serializer.ts new file mode 100644 index 000000000..a9da1ccfc --- /dev/null +++ b/src/authorization/serializers/assign-role.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AssignRole, + AssignRoleResponse, +} from '../interfaces/assign-role.interface'; + +export const deserializeAssignRole = ( + response: AssignRoleResponse, +): AssignRole => ({ + roleSlug: response.role_slug, + resourceId: response.resource_id, + resourceExternalId: response.resource_external_id, + resourceTypeSlug: response.resource_type_slug, +}); + +export const serializeAssignRole = (model: AssignRole): AssignRoleResponse => ({ + role_slug: model.roleSlug, + resource_id: model.resourceId, + resource_external_id: model.resourceExternalId, + resource_type_slug: model.resourceTypeSlug, +}); diff --git a/src/authorization/serializers/authorization-check.serializer.ts b/src/authorization/serializers/authorization-check.serializer.ts new file mode 100644 index 000000000..91663238e --- /dev/null +++ b/src/authorization/serializers/authorization-check.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthorizationCheck, + AuthorizationCheckResponse, +} from '../interfaces/authorization-check.interface'; + +export const deserializeAuthorizationCheck = ( + response: AuthorizationCheckResponse, +): AuthorizationCheck => ({ + authorized: response.authorized, +}); + +export const serializeAuthorizationCheck = ( + model: AuthorizationCheck, +): AuthorizationCheckResponse => ({ + authorized: model.authorized, +}); diff --git a/src/authorization/serializers/authorization-organization-roles-list-item.serializer.ts b/src/authorization/serializers/authorization-organization-roles-list-item.serializer.ts new file mode 100644 index 000000000..1f1e72571 --- /dev/null +++ b/src/authorization/serializers/authorization-organization-roles-list-item.serializer.ts @@ -0,0 +1,36 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthorizationOrganizationRolesListItem, + AuthorizationOrganizationRolesListItemResponse, +} from '../interfaces/authorization-organization-roles-list-item.interface'; + +export const deserializeAuthorizationOrganizationRolesListItem = ( + response: AuthorizationOrganizationRolesListItemResponse, +): AuthorizationOrganizationRolesListItem => ({ + slug: response.slug, + object: response.object, + id: response.id, + name: response.name, + description: response.description ?? null, + type: response.type, + resourceTypeSlug: response.resource_type_slug, + permissions: response.permissions, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeAuthorizationOrganizationRolesListItem = ( + model: AuthorizationOrganizationRolesListItem, +): AuthorizationOrganizationRolesListItemResponse => ({ + slug: model.slug, + object: model.object, + id: model.id, + name: model.name, + description: model.description, + type: model.type, + resource_type_slug: model.resourceTypeSlug, + permissions: model.permissions, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/authorization/serializers/authorization-organization-roles-update-priority-order-item.serializer.ts b/src/authorization/serializers/authorization-organization-roles-update-priority-order-item.serializer.ts new file mode 100644 index 000000000..0c89cec38 --- /dev/null +++ b/src/authorization/serializers/authorization-organization-roles-update-priority-order-item.serializer.ts @@ -0,0 +1,37 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthorizationOrganizationRolesUpdatePriorityOrderItem, + AuthorizationOrganizationRolesUpdatePriorityOrderItemResponse, +} from '../interfaces/authorization-organization-roles-update-priority-order-item.interface'; + +export const deserializeAuthorizationOrganizationRolesUpdatePriorityOrderItem = + ( + response: AuthorizationOrganizationRolesUpdatePriorityOrderItemResponse, + ): AuthorizationOrganizationRolesUpdatePriorityOrderItem => ({ + slug: response.slug, + object: response.object, + id: response.id, + name: response.name, + description: response.description ?? null, + type: response.type, + resourceTypeSlug: response.resource_type_slug, + permissions: response.permissions, + createdAt: response.created_at, + updatedAt: response.updated_at, + }); + +export const serializeAuthorizationOrganizationRolesUpdatePriorityOrderItem = ( + model: AuthorizationOrganizationRolesUpdatePriorityOrderItem, +): AuthorizationOrganizationRolesUpdatePriorityOrderItemResponse => ({ + slug: model.slug, + object: model.object, + id: model.id, + name: model.name, + description: model.description, + type: model.type, + resource_type_slug: model.resourceTypeSlug, + permissions: model.permissions, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/authorization/serializers/authorization-permission.serializer.ts b/src/authorization/serializers/authorization-permission.serializer.ts new file mode 100644 index 000000000..1f228af35 --- /dev/null +++ b/src/authorization/serializers/authorization-permission.serializer.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthorizationPermission, + AuthorizationPermissionResponse, +} from '../interfaces/authorization-permission.interface'; + +export const deserializeAuthorizationPermission = ( + response: AuthorizationPermissionResponse, +): AuthorizationPermission => ({ + object: response.object, + id: response.id, + slug: response.slug, + name: response.name, + description: response.description ?? null, + system: response.system, + resourceTypeSlug: response.resource_type_slug, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeAuthorizationPermission = ( + model: AuthorizationPermission, +): AuthorizationPermissionResponse => ({ + object: model.object, + id: model.id, + slug: model.slug, + name: model.name, + description: model.description, + system: model.system, + resource_type_slug: model.resourceTypeSlug, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/authorization/serializers/authorization-resource.serializer.ts b/src/authorization/serializers/authorization-resource.serializer.ts index 68b10a508..46d0f0f62 100644 --- a/src/authorization/serializers/authorization-resource.serializer.ts +++ b/src/authorization/serializers/authorization-resource.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { AuthorizationResource, AuthorizationResourceResponse, @@ -17,3 +19,18 @@ export const deserializeAuthorizationResource = ( createdAt: resource.created_at, updatedAt: resource.updated_at, }); + +export const serializeAuthorizationResource = ( + model: AuthorizationResource, +): AuthorizationResourceResponse => ({ + object: model.object, + name: model.name, + description: model.description, + organization_id: model.organizationId, + parent_resource_id: model.parentResourceId, + id: model.id, + external_id: model.externalId, + resource_type_slug: model.resourceTypeSlug, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/authorization/serializers/check-authorization.serializer.ts b/src/authorization/serializers/check-authorization.serializer.ts new file mode 100644 index 000000000..83f5b488a --- /dev/null +++ b/src/authorization/serializers/check-authorization.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CheckAuthorization, + CheckAuthorizationResponse, +} from '../interfaces/check-authorization.interface'; + +export const deserializeCheckAuthorization = ( + response: CheckAuthorizationResponse, +): CheckAuthorization => ({ + permissionSlug: response.permission_slug, + resourceId: response.resource_id, + resourceExternalId: response.resource_external_id, + resourceTypeSlug: response.resource_type_slug, +}); + +export const serializeCheckAuthorization = ( + model: CheckAuthorization, +): CheckAuthorizationResponse => ({ + permission_slug: model.permissionSlug, + resource_id: model.resourceId, + resource_external_id: model.resourceExternalId, + resource_type_slug: model.resourceTypeSlug, +}); diff --git a/src/authorization/serializers/create-authorization-permission.serializer.ts b/src/authorization/serializers/create-authorization-permission.serializer.ts new file mode 100644 index 000000000..1d1346562 --- /dev/null +++ b/src/authorization/serializers/create-authorization-permission.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateAuthorizationPermission, + CreateAuthorizationPermissionResponse, +} from '../interfaces/create-authorization-permission.interface'; + +export const deserializeCreateAuthorizationPermission = ( + response: CreateAuthorizationPermissionResponse, +): CreateAuthorizationPermission => ({ + slug: response.slug, + name: response.name, + description: response.description ?? null, + resourceTypeSlug: response.resource_type_slug, +}); + +export const serializeCreateAuthorizationPermission = ( + model: CreateAuthorizationPermission, +): CreateAuthorizationPermissionResponse => ({ + slug: model.slug, + name: model.name, + description: model.description ?? null, + resource_type_slug: model.resourceTypeSlug, +}); diff --git a/src/authorization/serializers/create-authorization-resource.serializer.ts b/src/authorization/serializers/create-authorization-resource.serializer.ts new file mode 100644 index 000000000..251df9a16 --- /dev/null +++ b/src/authorization/serializers/create-authorization-resource.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateAuthorizationResource, + CreateAuthorizationResourceResponse, +} from '../interfaces/create-authorization-resource.interface'; + +export const deserializeCreateAuthorizationResource = ( + response: CreateAuthorizationResourceResponse, +): CreateAuthorizationResource => ({ + externalId: response.external_id, + name: response.name, + description: response.description ?? null, + resourceTypeSlug: response.resource_type_slug, + organizationId: response.organization_id, + parentResourceId: response.parent_resource_id ?? null, + parentResourceExternalId: response.parent_resource_external_id, + parentResourceTypeSlug: response.parent_resource_type_slug, +}); + +export const serializeCreateAuthorizationResource = ( + model: CreateAuthorizationResource, +): CreateAuthorizationResourceResponse => ({ + external_id: model.externalId, + name: model.name, + description: model.description ?? null, + resource_type_slug: model.resourceTypeSlug, + organization_id: model.organizationId, + parent_resource_id: model.parentResourceId ?? null, + parent_resource_external_id: model.parentResourceExternalId, + parent_resource_type_slug: model.parentResourceTypeSlug, +}); diff --git a/src/authorization/serializers/create-organization-role.serializer.ts b/src/authorization/serializers/create-organization-role.serializer.ts new file mode 100644 index 000000000..16d94730b --- /dev/null +++ b/src/authorization/serializers/create-organization-role.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateOrganizationRole, + CreateOrganizationRoleResponse, +} from '../interfaces/create-organization-role.interface'; + +export const deserializeCreateOrganizationRole = ( + response: CreateOrganizationRoleResponse, +): CreateOrganizationRole => ({ + slug: response.slug, + name: response.name, + description: response.description ?? null, +}); + +export const serializeCreateOrganizationRole = ( + model: CreateOrganizationRole, +): CreateOrganizationRoleResponse => ({ + slug: model.slug, + name: model.name, + description: model.description ?? null, +}); diff --git a/src/authorization/serializers/create-role.serializer.ts b/src/authorization/serializers/create-role.serializer.ts new file mode 100644 index 000000000..3f192b2ca --- /dev/null +++ b/src/authorization/serializers/create-role.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeCreateAuthorizationPermission as deserializeCreateRole, + serializeCreateAuthorizationPermission as serializeCreateRole, +} from '../../permissions/serializers/create-authorization-permission.serializer'; diff --git a/src/authorization/serializers/list-data.serializer.ts b/src/authorization/serializers/list-data.serializer.ts new file mode 100644 index 000000000..917010cae --- /dev/null +++ b/src/authorization/serializers/list-data.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ListData, + ListDataResponse, +} from '../interfaces/list-data.interface'; + +export const deserializeListData = (response: ListDataResponse): ListData => ({ + slug: response.slug, + object: response.object, + id: response.id, + name: response.name, + description: response.description ?? null, + type: response.type, + resourceTypeSlug: response.resource_type_slug, + permissions: response.permissions, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeListData = (model: ListData): ListDataResponse => ({ + slug: model.slug, + object: model.object, + id: model.id, + name: model.name, + description: model.description, + type: model.type, + resource_type_slug: model.resourceTypeSlug, + permissions: model.permissions, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/authorization/serializers/list.serializer.ts b/src/authorization/serializers/list.serializer.ts new file mode 100644 index 000000000..b9550c296 --- /dev/null +++ b/src/authorization/serializers/list.serializer.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { List, ListResponse } from '../interfaces/list.interface'; +import { deserializeListData } from './list-data.serializer'; + +export const deserializeList = (response: ListResponse): List => ({ + object: response.object, + data: response.data.map(deserializeListData), +}); diff --git a/src/authorization/serializers/permission.serializer.ts b/src/authorization/serializers/permission.serializer.ts index 12a360169..78f0d3f24 100644 --- a/src/authorization/serializers/permission.serializer.ts +++ b/src/authorization/serializers/permission.serializer.ts @@ -1,18 +1,6 @@ -import { - Permission, - PermissionResponse, -} from '../interfaces/permission.interface'; +// This file is auto-generated by oagen. Do not edit. -export const deserializePermission = ( - permission: PermissionResponse, -): Permission => ({ - object: permission.object, - id: permission.id, - slug: permission.slug, - name: permission.name, - description: permission.description, - resourceTypeSlug: permission.resource_type_slug, - system: permission.system, - createdAt: permission.created_at, - updatedAt: permission.updated_at, -}); +export { + deserializeAuthorizationPermission as deserializePermission, + serializeAuthorizationPermission as serializePermission, +} from './authorization-permission.serializer'; diff --git a/src/authorization/serializers/remove-role.serializer.ts b/src/authorization/serializers/remove-role.serializer.ts new file mode 100644 index 000000000..0aeb586fe --- /dev/null +++ b/src/authorization/serializers/remove-role.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeAssignRole as deserializeRemoveRole, + serializeAssignRole as serializeRemoveRole, +} from './assign-role.serializer'; diff --git a/src/authorization/serializers/role-assignment-resource.serializer.ts b/src/authorization/serializers/role-assignment-resource.serializer.ts new file mode 100644 index 000000000..63acf39d9 --- /dev/null +++ b/src/authorization/serializers/role-assignment-resource.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RoleAssignmentResource, + RoleAssignmentResourceResponse, +} from '../interfaces/role-assignment-resource.interface'; + +export const deserializeRoleAssignmentResource = ( + response: RoleAssignmentResourceResponse, +): RoleAssignmentResource => ({ + id: response.id, + externalId: response.external_id, + resourceTypeSlug: response.resource_type_slug, +}); + +export const serializeRoleAssignmentResource = ( + model: RoleAssignmentResource, +): RoleAssignmentResourceResponse => ({ + id: model.id, + external_id: model.externalId, + resource_type_slug: model.resourceTypeSlug, +}); diff --git a/src/authorization/serializers/role-assignment.serializer.ts b/src/authorization/serializers/role-assignment.serializer.ts index 395fc722a..789c55f41 100644 --- a/src/authorization/serializers/role-assignment.serializer.ts +++ b/src/authorization/serializers/role-assignment.serializer.ts @@ -1,7 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + import { RoleAssignment, RoleAssignmentResponse, } from '../interfaces/role-assignment.interface'; +import { serializeSlimRole } from './slim-role.serializer'; +import { serializeRoleAssignmentResource } from './role-assignment-resource.serializer'; export const deserializeRoleAssignment = ( response: RoleAssignmentResponse, @@ -17,3 +21,14 @@ export const deserializeRoleAssignment = ( createdAt: response.created_at, updatedAt: response.updated_at, }); + +export const serializeRoleAssignment = ( + model: RoleAssignment, +): RoleAssignmentResponse => ({ + object: model.object, + id: model.id, + role: serializeSlimRole(model.role), + resource: serializeRoleAssignmentResource(model.resource), + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/authorization/serializers/role-list.serializer.ts b/src/authorization/serializers/role-list.serializer.ts new file mode 100644 index 000000000..0b1d83ecd --- /dev/null +++ b/src/authorization/serializers/role-list.serializer.ts @@ -0,0 +1,17 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RoleList, + RoleListResponse, +} from '../interfaces/role-list.interface'; +import { deserializeRole, serializeRole } from './role.serializer'; + +export const deserializeRoleList = (response: RoleListResponse): RoleList => ({ + object: response.object, + data: response.data.map(deserializeRole), +}); + +export const serializeRoleList = (model: RoleList): RoleListResponse => ({ + object: model.object, + data: model.data.map(serializeRole), +}); diff --git a/src/authorization/serializers/role.serializer.ts b/src/authorization/serializers/role.serializer.ts new file mode 100644 index 000000000..fd65a22fe --- /dev/null +++ b/src/authorization/serializers/role.serializer.ts @@ -0,0 +1,29 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { Role, RoleResponse } from '../interfaces/role.interface'; + +export const deserializeRole = (response: RoleResponse): Role => ({ + slug: response.slug, + object: response.object, + id: response.id, + name: response.name, + description: response.description ?? null, + type: response.type, + resourceTypeSlug: response.resource_type_slug, + permissions: response.permissions, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeRole = (model: Role): RoleResponse => ({ + slug: model.slug, + object: model.object, + id: model.id, + name: model.name, + description: model.description, + type: model.type, + resource_type_slug: model.resourceTypeSlug, + permissions: model.permissions, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/authorization/serializers/set-role-permissions.serializer.ts b/src/authorization/serializers/set-role-permissions.serializer.ts new file mode 100644 index 000000000..eac61b32b --- /dev/null +++ b/src/authorization/serializers/set-role-permissions.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SetRolePermissions, + SetRolePermissionsResponse, +} from '../interfaces/set-role-permissions.interface'; + +export const deserializeSetRolePermissions = ( + response: SetRolePermissionsResponse, +): SetRolePermissions => ({ + permissions: response.permissions, +}); + +export const serializeSetRolePermissions = ( + model: SetRolePermissions, +): SetRolePermissionsResponse => ({ + permissions: model.permissions, +}); diff --git a/src/authorization/serializers/slim-role.serializer.ts b/src/authorization/serializers/slim-role.serializer.ts new file mode 100644 index 000000000..3ddd91356 --- /dev/null +++ b/src/authorization/serializers/slim-role.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeAddRolePermission as deserializeSlimRole, + serializeAddRolePermission as serializeSlimRole, +} from './add-role-permission.serializer'; diff --git a/src/authorization/serializers/update-authorization-permission.serializer.ts b/src/authorization/serializers/update-authorization-permission.serializer.ts new file mode 100644 index 000000000..09728dace --- /dev/null +++ b/src/authorization/serializers/update-authorization-permission.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeUpdateOrganizationRole as deserializeUpdateAuthorizationPermission, + serializeUpdateOrganizationRole as serializeUpdateAuthorizationPermission, +} from './update-organization-role.serializer'; diff --git a/src/authorization/serializers/update-authorization-resource.serializer.ts b/src/authorization/serializers/update-authorization-resource.serializer.ts new file mode 100644 index 000000000..334adeabb --- /dev/null +++ b/src/authorization/serializers/update-authorization-resource.serializer.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateAuthorizationResource, + UpdateAuthorizationResourceResponse, +} from '../interfaces/update-authorization-resource.interface'; + +export const deserializeUpdateAuthorizationResource = ( + response: UpdateAuthorizationResourceResponse, +): UpdateAuthorizationResource => ({ + name: response.name, + description: response.description ?? null, + parentResourceId: response.parent_resource_id, + parentResourceExternalId: response.parent_resource_external_id, + parentResourceTypeSlug: response.parent_resource_type_slug, +}); + +export const serializeUpdateAuthorizationResource = ( + model: UpdateAuthorizationResource, +): UpdateAuthorizationResourceResponse => ({ + name: model.name, + description: model.description ?? null, + parent_resource_id: model.parentResourceId, + parent_resource_external_id: model.parentResourceExternalId, + parent_resource_type_slug: model.parentResourceTypeSlug, +}); diff --git a/src/authorization/serializers/update-organization-role-priority-order.serializer.ts b/src/authorization/serializers/update-organization-role-priority-order.serializer.ts new file mode 100644 index 000000000..18d27f5a9 --- /dev/null +++ b/src/authorization/serializers/update-organization-role-priority-order.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateOrganizationRolePriorityOrder, + UpdateOrganizationRolePriorityOrderResponse, +} from '../interfaces/update-organization-role-priority-order.interface'; + +export const deserializeUpdateOrganizationRolePriorityOrder = ( + response: UpdateOrganizationRolePriorityOrderResponse, +): UpdateOrganizationRolePriorityOrder => ({ + rolePriorityOrder: response.role_priority_order, +}); + +export const serializeUpdateOrganizationRolePriorityOrder = ( + model: UpdateOrganizationRolePriorityOrder, +): UpdateOrganizationRolePriorityOrderResponse => ({ + role_priority_order: model.rolePriorityOrder, +}); diff --git a/src/authorization/serializers/update-role.serializer.ts b/src/authorization/serializers/update-role.serializer.ts new file mode 100644 index 000000000..1e2b82646 --- /dev/null +++ b/src/authorization/serializers/update-role.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeUpdateOrganizationRole as deserializeUpdateRole, + serializeUpdateOrganizationRole as serializeUpdateRole, +} from './update-organization-role.serializer'; diff --git a/src/authorization/serializers/user-organization-membership-base-list-data.serializer.ts b/src/authorization/serializers/user-organization-membership-base-list-data.serializer.ts new file mode 100644 index 000000000..dc19e59bd --- /dev/null +++ b/src/authorization/serializers/user-organization-membership-base-list-data.serializer.ts @@ -0,0 +1,36 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserOrganizationMembershipBaseListData, + UserOrganizationMembershipBaseListDataResponse, +} from '../interfaces/user-organization-membership-base-list-data.interface'; + +export const deserializeUserOrganizationMembershipBaseListData = ( + response: UserOrganizationMembershipBaseListDataResponse, +): UserOrganizationMembershipBaseListData => ({ + object: response.object, + id: response.id, + userId: response.user_id, + organizationId: response.organization_id, + status: response.status, + directoryManaged: response.directory_managed, + organizationName: response.organization_name, + customAttributes: response.custom_attributes, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeUserOrganizationMembershipBaseListData = ( + model: UserOrganizationMembershipBaseListData, +): UserOrganizationMembershipBaseListDataResponse => ({ + object: model.object, + id: model.id, + user_id: model.userId, + organization_id: model.organizationId, + status: model.status, + directory_managed: model.directoryManaged, + organization_name: model.organizationName, + custom_attributes: model.customAttributes, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/common/interfaces/action-authentication-denied-context-actor-source.interface.ts b/src/common/interfaces/action-authentication-denied-context-actor-source.interface.ts new file mode 100644 index 000000000..b2400838d --- /dev/null +++ b/src/common/interfaces/action-authentication-denied-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ActionAuthenticationDeniedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/action-authentication-denied-context-actor.interface.ts b/src/common/interfaces/action-authentication-denied-context-actor.interface.ts new file mode 100644 index 000000000..b0dcf3837 --- /dev/null +++ b/src/common/interfaces/action-authentication-denied-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ActionAuthenticationDeniedContextActorSource } from './action-authentication-denied-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface ActionAuthenticationDeniedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: ActionAuthenticationDeniedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface ActionAuthenticationDeniedContextActorResponse { + id: string; + source: ActionAuthenticationDeniedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/action-authentication-denied-context-google-analytics-session.interface.ts b/src/common/interfaces/action-authentication-denied-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..ab5bdbe86 --- /dev/null +++ b/src/common/interfaces/action-authentication-denied-context-google-analytics-session.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface ActionAuthenticationDeniedContextGoogleAnalyticsSession { + /** The Google Analytics container ID. */ + containerId: string; + /** The Google Analytics session ID. */ + sessionId?: string; + /** The Google Analytics session number. */ + sessionNumber?: string; +} + +export interface ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse { + container_id: string; + session_id?: string; + session_number?: string; +} diff --git a/src/common/interfaces/action-authentication-denied-context.interface.ts b/src/common/interfaces/action-authentication-denied-context.interface.ts new file mode 100644 index 000000000..66e064e46 --- /dev/null +++ b/src/common/interfaces/action-authentication-denied-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; +import type { + ActionAuthenticationDeniedContextActor, + ActionAuthenticationDeniedContextActorResponse, +} from './action-authentication-denied-context-actor.interface'; + +/** Additional context about the event. */ +export interface ActionAuthenticationDeniedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: ActionAuthenticationDeniedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: ActionAuthenticationDeniedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface ActionAuthenticationDeniedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: ActionAuthenticationDeniedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/action-authentication-denied-data.interface.ts b/src/common/interfaces/action-authentication-denied-data.interface.ts new file mode 100644 index 000000000..d85f74269 --- /dev/null +++ b/src/common/interfaces/action-authentication-denied-data.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface ActionAuthenticationDeniedData { + /** The ID of the action endpoint. */ + actionEndpointId: string; + /** The ID of the action execution. */ + actionExecutionId: string; + /** The type of action that was denied. */ + type: 'authentication'; + /** The verdict of the action. */ + verdict: 'Deny'; + /** The ID of the user. */ + userId: string; + /** The ID of the organization. */ + organizationId: string | null; + /** The email address of the user. */ + email: string; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; +} + +export interface ActionAuthenticationDeniedDataResponse { + action_endpoint_id: string; + action_execution_id: string; + type: 'authentication'; + verdict: 'Deny'; + user_id: string; + organization_id: string | null; + email: string; + ip_address: string | null; + user_agent: string | null; +} diff --git a/src/common/interfaces/action-authentication-denied.interface.ts b/src/common/interfaces/action-authentication-denied.interface.ts new file mode 100644 index 000000000..6c15fb872 --- /dev/null +++ b/src/common/interfaces/action-authentication-denied.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedData, + ActionAuthenticationDeniedDataResponse, +} from './action-authentication-denied-data.interface'; +import type { + ActionAuthenticationDeniedContext, + ActionAuthenticationDeniedContextResponse, +} from './action-authentication-denied-context.interface'; + +export interface ActionAuthenticationDenied { + /** Unique identifier for the event. */ + id: string; + event: 'action.authentication.denied'; + /** The event payload. */ + data: ActionAuthenticationDeniedData; + /** Additional context about the event. */ + context?: ActionAuthenticationDeniedContext; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface ActionAuthenticationDeniedResponse { + id: string; + event: 'action.authentication.denied'; + data: ActionAuthenticationDeniedDataResponse; + context?: ActionAuthenticationDeniedContextResponse; + created_at: string; + object: 'event'; +} diff --git a/src/common/interfaces/action-user-registration-denied-context-actor-source.interface.ts b/src/common/interfaces/action-user-registration-denied-context-actor-source.interface.ts new file mode 100644 index 000000000..e3c420150 --- /dev/null +++ b/src/common/interfaces/action-user-registration-denied-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ActionUserRegistrationDeniedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/action-user-registration-denied-context-actor.interface.ts b/src/common/interfaces/action-user-registration-denied-context-actor.interface.ts new file mode 100644 index 000000000..386d54c9a --- /dev/null +++ b/src/common/interfaces/action-user-registration-denied-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ActionUserRegistrationDeniedContextActorSource } from './action-user-registration-denied-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface ActionUserRegistrationDeniedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: ActionUserRegistrationDeniedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface ActionUserRegistrationDeniedContextActorResponse { + id: string; + source: ActionUserRegistrationDeniedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/action-user-registration-denied-context-google-analytics-session.interface.ts b/src/common/interfaces/action-user-registration-denied-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..b20e28eb0 --- /dev/null +++ b/src/common/interfaces/action-user-registration-denied-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type ActionUserRegistrationDeniedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type ActionUserRegistrationDeniedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/action-user-registration-denied-context.interface.ts b/src/common/interfaces/action-user-registration-denied-context.interface.ts new file mode 100644 index 000000000..00e03a5cd --- /dev/null +++ b/src/common/interfaces/action-user-registration-denied-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionUserRegistrationDeniedContextGoogleAnalyticsSession, + ActionUserRegistrationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-user-registration-denied-context-google-analytics-session.interface'; +import type { + ActionUserRegistrationDeniedContextActor, + ActionUserRegistrationDeniedContextActorResponse, +} from './action-user-registration-denied-context-actor.interface'; + +/** Additional context about the event. */ +export interface ActionUserRegistrationDeniedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: ActionUserRegistrationDeniedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: ActionUserRegistrationDeniedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface ActionUserRegistrationDeniedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: ActionUserRegistrationDeniedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: ActionUserRegistrationDeniedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/action-user-registration-denied-data.interface.ts b/src/common/interfaces/action-user-registration-denied-data.interface.ts new file mode 100644 index 000000000..ccd4066e1 --- /dev/null +++ b/src/common/interfaces/action-user-registration-denied-data.interface.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface ActionUserRegistrationDeniedData { + /** The ID of the action endpoint. */ + actionEndpointId: string; + /** The ID of the action execution. */ + actionExecutionId: string; + /** The type of action that was denied. */ + type: 'user_registration'; + /** The verdict of the action. */ + verdict: 'Deny'; + /** The ID of the organization. */ + organizationId: string | null; + /** The email address of the user. */ + email: string; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; +} + +export interface ActionUserRegistrationDeniedDataResponse { + action_endpoint_id: string; + action_execution_id: string; + type: 'user_registration'; + verdict: 'Deny'; + organization_id: string | null; + email: string; + ip_address: string | null; + user_agent: string | null; +} diff --git a/src/common/interfaces/action-user-registration-denied.interface.ts b/src/common/interfaces/action-user-registration-denied.interface.ts new file mode 100644 index 000000000..e89f49319 --- /dev/null +++ b/src/common/interfaces/action-user-registration-denied.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionUserRegistrationDeniedData, + ActionUserRegistrationDeniedDataResponse, +} from './action-user-registration-denied-data.interface'; +import type { + ActionUserRegistrationDeniedContext, + ActionUserRegistrationDeniedContextResponse, +} from './action-user-registration-denied-context.interface'; + +export interface ActionUserRegistrationDenied { + /** Unique identifier for the event. */ + id: string; + event: 'action.user_registration.denied'; + /** The event payload. */ + data: ActionUserRegistrationDeniedData; + /** Additional context about the event. */ + context?: ActionUserRegistrationDeniedContext; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface ActionUserRegistrationDeniedResponse { + id: string; + event: 'action.user_registration.denied'; + data: ActionUserRegistrationDeniedDataResponse; + context?: ActionUserRegistrationDeniedContextResponse; + created_at: string; + object: 'event'; +} diff --git a/src/common/interfaces/api-key-created-context-actor-source.interface.ts b/src/common/interfaces/api-key-created-context-actor-source.interface.ts new file mode 100644 index 000000000..77d5db2d6 --- /dev/null +++ b/src/common/interfaces/api-key-created-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ApiKeyCreatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/api-key-created-context-actor.interface.ts b/src/common/interfaces/api-key-created-context-actor.interface.ts new file mode 100644 index 000000000..eec84169c --- /dev/null +++ b/src/common/interfaces/api-key-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ApiKeyCreatedContextActorSource } from './api-key-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface ApiKeyCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: ApiKeyCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface ApiKeyCreatedContextActorResponse { + id: string; + source: ApiKeyCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/api-key-created-context-google-analytics-session.interface.ts b/src/common/interfaces/api-key-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..9f75aeffb --- /dev/null +++ b/src/common/interfaces/api-key-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type ApiKeyCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type ApiKeyCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/api-key-created-context.interface.ts b/src/common/interfaces/api-key-created-context.interface.ts new file mode 100644 index 000000000..fd7644c13 --- /dev/null +++ b/src/common/interfaces/api-key-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyCreatedContextGoogleAnalyticsSession, + ApiKeyCreatedContextGoogleAnalyticsSessionResponse, +} from './api-key-created-context-google-analytics-session.interface'; +import type { + ApiKeyCreatedContextActor, + ApiKeyCreatedContextActorResponse, +} from './api-key-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface ApiKeyCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: ApiKeyCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: ApiKeyCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface ApiKeyCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: ApiKeyCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: ApiKeyCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/api-key-created-data-owner.interface.ts b/src/common/interfaces/api-key-created-data-owner.interface.ts new file mode 100644 index 000000000..ad7fb4bf2 --- /dev/null +++ b/src/common/interfaces/api-key-created-data-owner.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The owner of the API key. */ +export interface ApiKeyCreatedDataOwner { + /** The type of the API key owner. */ + type: 'organization'; + /** The unique identifier of the API key owner. */ + id: string; +} + +export interface ApiKeyCreatedDataOwnerResponse { + type: 'organization'; + id: string; +} diff --git a/src/common/interfaces/api-key-created-data.interface.ts b/src/common/interfaces/api-key-created-data.interface.ts new file mode 100644 index 000000000..b57e3f0ff --- /dev/null +++ b/src/common/interfaces/api-key-created-data.interface.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyCreatedDataOwner, + ApiKeyCreatedDataOwnerResponse, +} from './api-key-created-data-owner.interface'; + +/** The event payload. */ +export interface ApiKeyCreatedData { + /** Distinguishes the API key object. */ + object: 'api_key'; + /** Unique identifier of the API key. */ + id: string; + /** The owner of the API key. */ + owner: ApiKeyCreatedDataOwner; + /** The name of the API key. */ + name: string; + /** The obfuscated value of the API key. */ + obfuscatedValue: string; + /** The timestamp when the API key was last used. */ + lastUsedAt: string | null; + /** The permissions granted to the API key. */ + permissions: string[]; + /** The timestamp when the API key was created. */ + createdAt: string; + /** The timestamp when the API key was last updated. */ + updatedAt: string; +} + +export interface ApiKeyCreatedDataResponse { + object: 'api_key'; + id: string; + owner: ApiKeyCreatedDataOwnerResponse; + name: string; + obfuscated_value: string; + last_used_at: string | null; + permissions: string[]; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/api-key-created.interface.ts b/src/common/interfaces/api-key-created.interface.ts new file mode 100644 index 000000000..2d3d0821d --- /dev/null +++ b/src/common/interfaces/api-key-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyCreatedData, + ApiKeyCreatedDataResponse, +} from './api-key-created-data.interface'; +import type { + ApiKeyCreatedContext, + ApiKeyCreatedContextResponse, +} from './api-key-created-context.interface'; + +export interface ApiKeyCreated { + /** Unique identifier for the event. */ + id: string; + event: 'api_key.created'; + /** The event payload. */ + data: ApiKeyCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: ApiKeyCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface ApiKeyCreatedResponse { + id: string; + event: 'api_key.created'; + data: ApiKeyCreatedDataResponse; + created_at: string; + context?: ApiKeyCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/api-key-revoked-context-actor-source.interface.ts b/src/common/interfaces/api-key-revoked-context-actor-source.interface.ts new file mode 100644 index 000000000..6f99e016c --- /dev/null +++ b/src/common/interfaces/api-key-revoked-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ApiKeyRevokedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/api-key-revoked-context-actor.interface.ts b/src/common/interfaces/api-key-revoked-context-actor.interface.ts new file mode 100644 index 000000000..c1d43618c --- /dev/null +++ b/src/common/interfaces/api-key-revoked-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ApiKeyRevokedContextActorSource } from './api-key-revoked-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface ApiKeyRevokedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: ApiKeyRevokedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface ApiKeyRevokedContextActorResponse { + id: string; + source: ApiKeyRevokedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/api-key-revoked-context-google-analytics-session.interface.ts b/src/common/interfaces/api-key-revoked-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..5e7141425 --- /dev/null +++ b/src/common/interfaces/api-key-revoked-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type ApiKeyRevokedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type ApiKeyRevokedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/api-key-revoked-context.interface.ts b/src/common/interfaces/api-key-revoked-context.interface.ts new file mode 100644 index 000000000..6b3d9a2d6 --- /dev/null +++ b/src/common/interfaces/api-key-revoked-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyRevokedContextGoogleAnalyticsSession, + ApiKeyRevokedContextGoogleAnalyticsSessionResponse, +} from './api-key-revoked-context-google-analytics-session.interface'; +import type { + ApiKeyRevokedContextActor, + ApiKeyRevokedContextActorResponse, +} from './api-key-revoked-context-actor.interface'; + +/** Additional context about the event. */ +export interface ApiKeyRevokedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: ApiKeyRevokedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: ApiKeyRevokedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface ApiKeyRevokedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: ApiKeyRevokedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: ApiKeyRevokedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/api-key-revoked-data-owner.interface.ts b/src/common/interfaces/api-key-revoked-data-owner.interface.ts new file mode 100644 index 000000000..e3d316eb6 --- /dev/null +++ b/src/common/interfaces/api-key-revoked-data-owner.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyCreatedDataOwner, + ApiKeyCreatedDataOwnerResponse, +} from './api-key-created-data-owner.interface'; + +export type ApiKeyRevokedDataOwner = ApiKeyCreatedDataOwner; +export type ApiKeyRevokedDataOwnerResponse = ApiKeyCreatedDataOwnerResponse; diff --git a/src/common/interfaces/api-key-revoked-data.interface.ts b/src/common/interfaces/api-key-revoked-data.interface.ts new file mode 100644 index 000000000..0bf2e74b9 --- /dev/null +++ b/src/common/interfaces/api-key-revoked-data.interface.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyRevokedDataOwner, + ApiKeyRevokedDataOwnerResponse, +} from './api-key-revoked-data-owner.interface'; + +/** The event payload. */ +export interface ApiKeyRevokedData { + /** Distinguishes the API key object. */ + object: 'api_key'; + /** Unique identifier of the API key. */ + id: string; + /** The owner of the API key. */ + owner: ApiKeyRevokedDataOwner; + /** The name of the API key. */ + name: string; + /** The obfuscated value of the API key. */ + obfuscatedValue: string; + /** The timestamp when the API key was last used. */ + lastUsedAt: string | null; + /** The permissions granted to the API key. */ + permissions: string[]; + /** The timestamp when the API key was created. */ + createdAt: string; + /** The timestamp when the API key was last updated. */ + updatedAt: string; +} + +export interface ApiKeyRevokedDataResponse { + object: 'api_key'; + id: string; + owner: ApiKeyRevokedDataOwnerResponse; + name: string; + obfuscated_value: string; + last_used_at: string | null; + permissions: string[]; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/api-key-revoked.interface.ts b/src/common/interfaces/api-key-revoked.interface.ts new file mode 100644 index 000000000..8c74a18da --- /dev/null +++ b/src/common/interfaces/api-key-revoked.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyRevokedData, + ApiKeyRevokedDataResponse, +} from './api-key-revoked-data.interface'; +import type { + ApiKeyRevokedContext, + ApiKeyRevokedContextResponse, +} from './api-key-revoked-context.interface'; + +export interface ApiKeyRevoked { + /** Unique identifier for the event. */ + id: string; + event: 'api_key.revoked'; + /** The event payload. */ + data: ApiKeyRevokedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: ApiKeyRevokedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface ApiKeyRevokedResponse { + id: string; + event: 'api_key.revoked'; + data: ApiKeyRevokedDataResponse; + created_at: string; + context?: ApiKeyRevokedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/audit-log-configuration-log-stream-state.interface.ts b/src/common/interfaces/audit-log-configuration-log-stream-state.interface.ts new file mode 100644 index 000000000..16ebfc443 --- /dev/null +++ b/src/common/interfaces/audit-log-configuration-log-stream-state.interface.ts @@ -0,0 +1,7 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuditLogConfigurationLogStreamState = + | 'active' + | 'inactive' + | 'error' + | 'invalid'; diff --git a/src/common/interfaces/audit-log-configuration-log-stream-type.interface.ts b/src/common/interfaces/audit-log-configuration-log-stream-type.interface.ts new file mode 100644 index 000000000..05004e000 --- /dev/null +++ b/src/common/interfaces/audit-log-configuration-log-stream-type.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuditLogConfigurationLogStreamType = + | 'AzureSentinel' + | 'Datadog' + | 'GenericHttps' + | 'GoogleCloudStorage' + | 'S3' + | 'Splunk'; diff --git a/src/common/interfaces/audit-log-configuration-state.interface.ts b/src/common/interfaces/audit-log-configuration-state.interface.ts new file mode 100644 index 000000000..cac892b55 --- /dev/null +++ b/src/common/interfaces/audit-log-configuration-state.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuditLogConfigurationState = 'active' | 'inactive' | 'disabled'; diff --git a/src/common/interfaces/audit-log-export-json-state.interface.ts b/src/common/interfaces/audit-log-export-json-state.interface.ts new file mode 100644 index 000000000..fa80227d7 --- /dev/null +++ b/src/common/interfaces/audit-log-export-json-state.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuditLogExportJsonState = 'pending' | 'ready' | 'error'; diff --git a/src/common/interfaces/authenticate-response-authentication-method.interface.ts b/src/common/interfaces/authenticate-response-authentication-method.interface.ts new file mode 100644 index 000000000..485e5ed2c --- /dev/null +++ b/src/common/interfaces/authenticate-response-authentication-method.interface.ts @@ -0,0 +1,25 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticateResponseAuthenticationMethod = + | 'SSO' + | 'Password' + | 'Passkey' + | 'AppleOAuth' + | 'BitbucketOAuth' + | 'CrossAppAuth' + | 'DiscordOAuth' + | 'ExternalAuth' + | 'GitHubOAuth' + | 'GitLabOAuth' + | 'GoogleOAuth' + | 'IntuitOAuth' + | 'LinkedInOAuth' + | 'MicrosoftOAuth' + | 'SalesforceOAuth' + | 'SlackOAuth' + | 'VercelMarketplaceOAuth' + | 'VercelOAuth' + | 'XeroOAuth' + | 'MagicAuth' + | 'Impersonation' + | 'MigratedSession'; diff --git a/src/common/interfaces/authentication-email-verification-failed-context-actor-source.interface.ts b/src/common/interfaces/authentication-email-verification-failed-context-actor-source.interface.ts new file mode 100644 index 000000000..89b0e1090 --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-failed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationEmailVerificationFailedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-email-verification-failed-context-actor.interface.ts b/src/common/interfaces/authentication-email-verification-failed-context-actor.interface.ts new file mode 100644 index 000000000..946566c9f --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-failed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationEmailVerificationFailedContextActorSource } from './authentication-email-verification-failed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationEmailVerificationFailedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationEmailVerificationFailedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationEmailVerificationFailedContextActorResponse { + id: string; + source: AuthenticationEmailVerificationFailedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-email-verification-failed-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-email-verification-failed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..ca21ed39d --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-failed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationEmailVerificationFailedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationEmailVerificationFailedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-email-verification-failed-context.interface.ts b/src/common/interfaces/authentication-email-verification-failed-context.interface.ts new file mode 100644 index 000000000..58ee54e9c --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-failed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationFailedContextGoogleAnalyticsSession, + AuthenticationEmailVerificationFailedContextGoogleAnalyticsSessionResponse, +} from './authentication-email-verification-failed-context-google-analytics-session.interface'; +import type { + AuthenticationEmailVerificationFailedContextActor, + AuthenticationEmailVerificationFailedContextActorResponse, +} from './authentication-email-verification-failed-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationEmailVerificationFailedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationEmailVerificationFailedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationEmailVerificationFailedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationEmailVerificationFailedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationEmailVerificationFailedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationEmailVerificationFailedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-email-verification-failed-data-error.interface.ts b/src/common/interfaces/authentication-email-verification-failed-data-error.interface.ts new file mode 100644 index 000000000..da96b44ae --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-failed-data-error.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +/** Details about the authentication error. */ +export interface AuthenticationEmailVerificationFailedDataError { + /** The error code. */ + code: string; + /** A human-readable error message. */ + message: string; +} + +export interface AuthenticationEmailVerificationFailedDataErrorResponse { + code: string; + message: string; +} diff --git a/src/common/interfaces/authentication-email-verification-failed-data.interface.ts b/src/common/interfaces/authentication-email-verification-failed-data.interface.ts new file mode 100644 index 000000000..d8ce86024 --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-failed-data.interface.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationFailedDataError, + AuthenticationEmailVerificationFailedDataErrorResponse, +} from './authentication-email-verification-failed-data-error.interface'; + +/** The event payload. */ +export interface AuthenticationEmailVerificationFailedData { + type: 'email_verification'; + status: 'failed'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string | null; + /** Details about the authentication error. */ + error: AuthenticationEmailVerificationFailedDataError; +} + +export interface AuthenticationEmailVerificationFailedDataResponse { + type: 'email_verification'; + status: 'failed'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string | null; + error: AuthenticationEmailVerificationFailedDataErrorResponse; +} diff --git a/src/common/interfaces/authentication-email-verification-failed.interface.ts b/src/common/interfaces/authentication-email-verification-failed.interface.ts new file mode 100644 index 000000000..40e246420 --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-failed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationFailedData, + AuthenticationEmailVerificationFailedDataResponse, +} from './authentication-email-verification-failed-data.interface'; +import type { + AuthenticationEmailVerificationFailedContext, + AuthenticationEmailVerificationFailedContextResponse, +} from './authentication-email-verification-failed-context.interface'; + +export interface AuthenticationEmailVerificationFailed { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.email_verification_failed'; + /** The event payload. */ + data: AuthenticationEmailVerificationFailedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationEmailVerificationFailedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationEmailVerificationFailedResponse { + id: string; + event: 'authentication.email_verification_failed'; + data: AuthenticationEmailVerificationFailedDataResponse; + created_at: string; + context?: AuthenticationEmailVerificationFailedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-email-verification-succeeded-context-actor-source.interface.ts b/src/common/interfaces/authentication-email-verification-succeeded-context-actor-source.interface.ts new file mode 100644 index 000000000..c4472583f --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-succeeded-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationEmailVerificationSucceededContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-email-verification-succeeded-context-actor.interface.ts b/src/common/interfaces/authentication-email-verification-succeeded-context-actor.interface.ts new file mode 100644 index 000000000..86744e6ab --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-succeeded-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationEmailVerificationSucceededContextActorSource } from './authentication-email-verification-succeeded-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationEmailVerificationSucceededContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationEmailVerificationSucceededContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationEmailVerificationSucceededContextActorResponse { + id: string; + source: AuthenticationEmailVerificationSucceededContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-email-verification-succeeded-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-email-verification-succeeded-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..51ce514fe --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-succeeded-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationEmailVerificationSucceededContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationEmailVerificationSucceededContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-email-verification-succeeded-context.interface.ts b/src/common/interfaces/authentication-email-verification-succeeded-context.interface.ts new file mode 100644 index 000000000..7d9e36f57 --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-succeeded-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationSucceededContextGoogleAnalyticsSession, + AuthenticationEmailVerificationSucceededContextGoogleAnalyticsSessionResponse, +} from './authentication-email-verification-succeeded-context-google-analytics-session.interface'; +import type { + AuthenticationEmailVerificationSucceededContextActor, + AuthenticationEmailVerificationSucceededContextActorResponse, +} from './authentication-email-verification-succeeded-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationEmailVerificationSucceededContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationEmailVerificationSucceededContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationEmailVerificationSucceededContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationEmailVerificationSucceededContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationEmailVerificationSucceededContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationEmailVerificationSucceededContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-email-verification-succeeded-data.interface.ts b/src/common/interfaces/authentication-email-verification-succeeded-data.interface.ts new file mode 100644 index 000000000..53410de04 --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-succeeded-data.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface AuthenticationEmailVerificationSucceededData { + type: 'email_verification'; + status: 'succeeded'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string; + /** The email address of the user. */ + email: string; +} + +export interface AuthenticationEmailVerificationSucceededDataResponse { + type: 'email_verification'; + status: 'succeeded'; + ip_address: string | null; + user_agent: string | null; + user_id: string; + email: string; +} diff --git a/src/common/interfaces/authentication-email-verification-succeeded.interface.ts b/src/common/interfaces/authentication-email-verification-succeeded.interface.ts new file mode 100644 index 000000000..2d41746a1 --- /dev/null +++ b/src/common/interfaces/authentication-email-verification-succeeded.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationSucceededData, + AuthenticationEmailVerificationSucceededDataResponse, +} from './authentication-email-verification-succeeded-data.interface'; +import type { + AuthenticationEmailVerificationSucceededContext, + AuthenticationEmailVerificationSucceededContextResponse, +} from './authentication-email-verification-succeeded-context.interface'; + +export interface AuthenticationEmailVerificationSucceeded { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.email_verification_succeeded'; + /** The event payload. */ + data: AuthenticationEmailVerificationSucceededData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationEmailVerificationSucceededContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationEmailVerificationSucceededResponse { + id: string; + event: 'authentication.email_verification_succeeded'; + data: AuthenticationEmailVerificationSucceededDataResponse; + created_at: string; + context?: AuthenticationEmailVerificationSucceededContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-factor-enrolled-type.interface.ts b/src/common/interfaces/authentication-factor-enrolled-type.interface.ts new file mode 100644 index 000000000..02b857fa7 --- /dev/null +++ b/src/common/interfaces/authentication-factor-enrolled-type.interface.ts @@ -0,0 +1,7 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationFactorEnrolledType = + | 'generic_otp' + | 'sms' + | 'totp' + | 'webauthn'; diff --git a/src/common/interfaces/authentication-factor-type.interface.ts b/src/common/interfaces/authentication-factor-type.interface.ts new file mode 100644 index 000000000..e2d9ebe62 --- /dev/null +++ b/src/common/interfaces/authentication-factor-type.interface.ts @@ -0,0 +1,7 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationFactorType = + | 'generic_otp' + | 'sms' + | 'totp' + | 'webauthn'; diff --git a/src/common/interfaces/authentication-factors-create-request-type.interface.ts b/src/common/interfaces/authentication-factors-create-request-type.interface.ts new file mode 100644 index 000000000..ddd588856 --- /dev/null +++ b/src/common/interfaces/authentication-factors-create-request-type.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationFactorsCreateRequestType = + | 'generic_otp' + | 'sms' + | 'totp'; diff --git a/src/common/interfaces/authentication-magic-auth-failed-context-actor-source.interface.ts b/src/common/interfaces/authentication-magic-auth-failed-context-actor-source.interface.ts new file mode 100644 index 000000000..76f756028 --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-failed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationMagicAuthFailedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-magic-auth-failed-context-actor.interface.ts b/src/common/interfaces/authentication-magic-auth-failed-context-actor.interface.ts new file mode 100644 index 000000000..a64c1e08f --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-failed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationMagicAuthFailedContextActorSource } from './authentication-magic-auth-failed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationMagicAuthFailedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationMagicAuthFailedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationMagicAuthFailedContextActorResponse { + id: string; + source: AuthenticationMagicAuthFailedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-magic-auth-failed-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-magic-auth-failed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..3d41f8088 --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-failed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationMagicAuthFailedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationMagicAuthFailedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-magic-auth-failed-context.interface.ts b/src/common/interfaces/authentication-magic-auth-failed-context.interface.ts new file mode 100644 index 000000000..dde071582 --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-failed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationMagicAuthFailedContextGoogleAnalyticsSession, + AuthenticationMagicAuthFailedContextGoogleAnalyticsSessionResponse, +} from './authentication-magic-auth-failed-context-google-analytics-session.interface'; +import type { + AuthenticationMagicAuthFailedContextActor, + AuthenticationMagicAuthFailedContextActorResponse, +} from './authentication-magic-auth-failed-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationMagicAuthFailedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationMagicAuthFailedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationMagicAuthFailedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationMagicAuthFailedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationMagicAuthFailedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationMagicAuthFailedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-magic-auth-failed-data-error.interface.ts b/src/common/interfaces/authentication-magic-auth-failed-data-error.interface.ts new file mode 100644 index 000000000..61bf894e5 --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-failed-data-error.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationFailedDataError, + AuthenticationEmailVerificationFailedDataErrorResponse, +} from './authentication-email-verification-failed-data-error.interface'; + +export type AuthenticationMagicAuthFailedDataError = + AuthenticationEmailVerificationFailedDataError; +export type AuthenticationMagicAuthFailedDataErrorResponse = + AuthenticationEmailVerificationFailedDataErrorResponse; diff --git a/src/common/interfaces/authentication-magic-auth-failed-data.interface.ts b/src/common/interfaces/authentication-magic-auth-failed-data.interface.ts new file mode 100644 index 000000000..f02be25ef --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-failed-data.interface.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationMagicAuthFailedDataError, + AuthenticationMagicAuthFailedDataErrorResponse, +} from './authentication-magic-auth-failed-data-error.interface'; + +/** The event payload. */ +export interface AuthenticationMagicAuthFailedData { + type: 'magic_auth'; + status: 'failed'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string | null; + /** Details about the authentication error. */ + error: AuthenticationMagicAuthFailedDataError; +} + +export interface AuthenticationMagicAuthFailedDataResponse { + type: 'magic_auth'; + status: 'failed'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string | null; + error: AuthenticationMagicAuthFailedDataErrorResponse; +} diff --git a/src/common/interfaces/authentication-magic-auth-failed.interface.ts b/src/common/interfaces/authentication-magic-auth-failed.interface.ts new file mode 100644 index 000000000..affafdf78 --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-failed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationMagicAuthFailedData, + AuthenticationMagicAuthFailedDataResponse, +} from './authentication-magic-auth-failed-data.interface'; +import type { + AuthenticationMagicAuthFailedContext, + AuthenticationMagicAuthFailedContextResponse, +} from './authentication-magic-auth-failed-context.interface'; + +export interface AuthenticationMagicAuthFailed { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.magic_auth_failed'; + /** The event payload. */ + data: AuthenticationMagicAuthFailedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationMagicAuthFailedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationMagicAuthFailedResponse { + id: string; + event: 'authentication.magic_auth_failed'; + data: AuthenticationMagicAuthFailedDataResponse; + created_at: string; + context?: AuthenticationMagicAuthFailedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-magic-auth-succeeded-context-actor-source.interface.ts b/src/common/interfaces/authentication-magic-auth-succeeded-context-actor-source.interface.ts new file mode 100644 index 000000000..13951531e --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-succeeded-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationMagicAuthSucceededContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-magic-auth-succeeded-context-actor.interface.ts b/src/common/interfaces/authentication-magic-auth-succeeded-context-actor.interface.ts new file mode 100644 index 000000000..61d7089eb --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-succeeded-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationMagicAuthSucceededContextActorSource } from './authentication-magic-auth-succeeded-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationMagicAuthSucceededContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationMagicAuthSucceededContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationMagicAuthSucceededContextActorResponse { + id: string; + source: AuthenticationMagicAuthSucceededContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-magic-auth-succeeded-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-magic-auth-succeeded-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..02ec566c4 --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-succeeded-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationMagicAuthSucceededContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationMagicAuthSucceededContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-magic-auth-succeeded-context.interface.ts b/src/common/interfaces/authentication-magic-auth-succeeded-context.interface.ts new file mode 100644 index 000000000..df8349a62 --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-succeeded-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationMagicAuthSucceededContextGoogleAnalyticsSession, + AuthenticationMagicAuthSucceededContextGoogleAnalyticsSessionResponse, +} from './authentication-magic-auth-succeeded-context-google-analytics-session.interface'; +import type { + AuthenticationMagicAuthSucceededContextActor, + AuthenticationMagicAuthSucceededContextActorResponse, +} from './authentication-magic-auth-succeeded-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationMagicAuthSucceededContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationMagicAuthSucceededContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationMagicAuthSucceededContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationMagicAuthSucceededContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationMagicAuthSucceededContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationMagicAuthSucceededContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-magic-auth-succeeded-data.interface.ts b/src/common/interfaces/authentication-magic-auth-succeeded-data.interface.ts new file mode 100644 index 000000000..62789d7bf --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-succeeded-data.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface AuthenticationMagicAuthSucceededData { + type: 'magic_auth'; + status: 'succeeded'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string; + /** The email address of the user. */ + email: string; +} + +export interface AuthenticationMagicAuthSucceededDataResponse { + type: 'magic_auth'; + status: 'succeeded'; + ip_address: string | null; + user_agent: string | null; + user_id: string; + email: string; +} diff --git a/src/common/interfaces/authentication-magic-auth-succeeded.interface.ts b/src/common/interfaces/authentication-magic-auth-succeeded.interface.ts new file mode 100644 index 000000000..439869fe1 --- /dev/null +++ b/src/common/interfaces/authentication-magic-auth-succeeded.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationMagicAuthSucceededData, + AuthenticationMagicAuthSucceededDataResponse, +} from './authentication-magic-auth-succeeded-data.interface'; +import type { + AuthenticationMagicAuthSucceededContext, + AuthenticationMagicAuthSucceededContextResponse, +} from './authentication-magic-auth-succeeded-context.interface'; + +export interface AuthenticationMagicAuthSucceeded { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.magic_auth_succeeded'; + /** The event payload. */ + data: AuthenticationMagicAuthSucceededData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationMagicAuthSucceededContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationMagicAuthSucceededResponse { + id: string; + event: 'authentication.magic_auth_succeeded'; + data: AuthenticationMagicAuthSucceededDataResponse; + created_at: string; + context?: AuthenticationMagicAuthSucceededContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-mfa-failed-context-actor-source.interface.ts b/src/common/interfaces/authentication-mfa-failed-context-actor-source.interface.ts new file mode 100644 index 000000000..5460c0eac --- /dev/null +++ b/src/common/interfaces/authentication-mfa-failed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationMfaFailedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-mfa-failed-context-actor.interface.ts b/src/common/interfaces/authentication-mfa-failed-context-actor.interface.ts new file mode 100644 index 000000000..d98ddfcf6 --- /dev/null +++ b/src/common/interfaces/authentication-mfa-failed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationMfaFailedContextActorSource } from './authentication-mfa-failed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationMfaFailedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationMfaFailedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationMfaFailedContextActorResponse { + id: string; + source: AuthenticationMfaFailedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-mfa-failed-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-mfa-failed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..bfa67fcca --- /dev/null +++ b/src/common/interfaces/authentication-mfa-failed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationMfaFailedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationMfaFailedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-mfa-failed-context.interface.ts b/src/common/interfaces/authentication-mfa-failed-context.interface.ts new file mode 100644 index 000000000..10a3f12d9 --- /dev/null +++ b/src/common/interfaces/authentication-mfa-failed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationMfaFailedContextGoogleAnalyticsSession, + AuthenticationMfaFailedContextGoogleAnalyticsSessionResponse, +} from './authentication-mfa-failed-context-google-analytics-session.interface'; +import type { + AuthenticationMfaFailedContextActor, + AuthenticationMfaFailedContextActorResponse, +} from './authentication-mfa-failed-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationMfaFailedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationMfaFailedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationMfaFailedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationMfaFailedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationMfaFailedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationMfaFailedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-mfa-failed-data-error.interface.ts b/src/common/interfaces/authentication-mfa-failed-data-error.interface.ts new file mode 100644 index 000000000..2534513b6 --- /dev/null +++ b/src/common/interfaces/authentication-mfa-failed-data-error.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationFailedDataError, + AuthenticationEmailVerificationFailedDataErrorResponse, +} from './authentication-email-verification-failed-data-error.interface'; + +export type AuthenticationMfaFailedDataError = + AuthenticationEmailVerificationFailedDataError; +export type AuthenticationMfaFailedDataErrorResponse = + AuthenticationEmailVerificationFailedDataErrorResponse; diff --git a/src/common/interfaces/authentication-mfa-failed-data.interface.ts b/src/common/interfaces/authentication-mfa-failed-data.interface.ts new file mode 100644 index 000000000..b771f40f6 --- /dev/null +++ b/src/common/interfaces/authentication-mfa-failed-data.interface.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationMfaFailedDataError, + AuthenticationMfaFailedDataErrorResponse, +} from './authentication-mfa-failed-data-error.interface'; + +/** The event payload. */ +export interface AuthenticationMfaFailedData { + type: 'mfa'; + status: 'failed'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string | null; + /** Details about the authentication error. */ + error: AuthenticationMfaFailedDataError; +} + +export interface AuthenticationMfaFailedDataResponse { + type: 'mfa'; + status: 'failed'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string | null; + error: AuthenticationMfaFailedDataErrorResponse; +} diff --git a/src/common/interfaces/authentication-mfa-failed.interface.ts b/src/common/interfaces/authentication-mfa-failed.interface.ts new file mode 100644 index 000000000..e08066abc --- /dev/null +++ b/src/common/interfaces/authentication-mfa-failed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationMfaFailedData, + AuthenticationMfaFailedDataResponse, +} from './authentication-mfa-failed-data.interface'; +import type { + AuthenticationMfaFailedContext, + AuthenticationMfaFailedContextResponse, +} from './authentication-mfa-failed-context.interface'; + +export interface AuthenticationMfaFailed { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.mfa_failed'; + /** The event payload. */ + data: AuthenticationMfaFailedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationMfaFailedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationMfaFailedResponse { + id: string; + event: 'authentication.mfa_failed'; + data: AuthenticationMfaFailedDataResponse; + created_at: string; + context?: AuthenticationMfaFailedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-mfa-succeeded-context-actor-source.interface.ts b/src/common/interfaces/authentication-mfa-succeeded-context-actor-source.interface.ts new file mode 100644 index 000000000..f20c0506d --- /dev/null +++ b/src/common/interfaces/authentication-mfa-succeeded-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationMfaSucceededContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-mfa-succeeded-context-actor.interface.ts b/src/common/interfaces/authentication-mfa-succeeded-context-actor.interface.ts new file mode 100644 index 000000000..e1380df25 --- /dev/null +++ b/src/common/interfaces/authentication-mfa-succeeded-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationMfaSucceededContextActorSource } from './authentication-mfa-succeeded-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationMfaSucceededContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationMfaSucceededContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationMfaSucceededContextActorResponse { + id: string; + source: AuthenticationMfaSucceededContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-mfa-succeeded-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-mfa-succeeded-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..639db574c --- /dev/null +++ b/src/common/interfaces/authentication-mfa-succeeded-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationMfaSucceededContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationMfaSucceededContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-mfa-succeeded-context.interface.ts b/src/common/interfaces/authentication-mfa-succeeded-context.interface.ts new file mode 100644 index 000000000..f0eb303ac --- /dev/null +++ b/src/common/interfaces/authentication-mfa-succeeded-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationMfaSucceededContextGoogleAnalyticsSession, + AuthenticationMfaSucceededContextGoogleAnalyticsSessionResponse, +} from './authentication-mfa-succeeded-context-google-analytics-session.interface'; +import type { + AuthenticationMfaSucceededContextActor, + AuthenticationMfaSucceededContextActorResponse, +} from './authentication-mfa-succeeded-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationMfaSucceededContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationMfaSucceededContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationMfaSucceededContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationMfaSucceededContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationMfaSucceededContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationMfaSucceededContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-mfa-succeeded-data.interface.ts b/src/common/interfaces/authentication-mfa-succeeded-data.interface.ts new file mode 100644 index 000000000..010509a94 --- /dev/null +++ b/src/common/interfaces/authentication-mfa-succeeded-data.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface AuthenticationMfaSucceededData { + type: 'mfa'; + status: 'succeeded'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string; + /** The email address of the user. */ + email: string; +} + +export interface AuthenticationMfaSucceededDataResponse { + type: 'mfa'; + status: 'succeeded'; + ip_address: string | null; + user_agent: string | null; + user_id: string; + email: string; +} diff --git a/src/common/interfaces/authentication-mfa-succeeded.interface.ts b/src/common/interfaces/authentication-mfa-succeeded.interface.ts new file mode 100644 index 000000000..9f8df7dbc --- /dev/null +++ b/src/common/interfaces/authentication-mfa-succeeded.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationMfaSucceededData, + AuthenticationMfaSucceededDataResponse, +} from './authentication-mfa-succeeded-data.interface'; +import type { + AuthenticationMfaSucceededContext, + AuthenticationMfaSucceededContextResponse, +} from './authentication-mfa-succeeded-context.interface'; + +export interface AuthenticationMfaSucceeded { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.mfa_succeeded'; + /** The event payload. */ + data: AuthenticationMfaSucceededData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationMfaSucceededContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationMfaSucceededResponse { + id: string; + event: 'authentication.mfa_succeeded'; + data: AuthenticationMfaSucceededDataResponse; + created_at: string; + context?: AuthenticationMfaSucceededContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-oauth-failed-context-actor-source.interface.ts b/src/common/interfaces/authentication-oauth-failed-context-actor-source.interface.ts new file mode 100644 index 000000000..8a681a1db --- /dev/null +++ b/src/common/interfaces/authentication-oauth-failed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationOAuthFailedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-oauth-failed-context-actor.interface.ts b/src/common/interfaces/authentication-oauth-failed-context-actor.interface.ts new file mode 100644 index 000000000..e6757ed6b --- /dev/null +++ b/src/common/interfaces/authentication-oauth-failed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationOAuthFailedContextActorSource } from './authentication-oauth-failed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationOAuthFailedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationOAuthFailedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationOAuthFailedContextActorResponse { + id: string; + source: AuthenticationOAuthFailedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-oauth-failed-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-oauth-failed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..e39e6abbe --- /dev/null +++ b/src/common/interfaces/authentication-oauth-failed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationOAuthFailedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationOAuthFailedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-oauth-failed-context.interface.ts b/src/common/interfaces/authentication-oauth-failed-context.interface.ts new file mode 100644 index 000000000..f90c7cd0d --- /dev/null +++ b/src/common/interfaces/authentication-oauth-failed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationOAuthFailedContextGoogleAnalyticsSession, + AuthenticationOAuthFailedContextGoogleAnalyticsSessionResponse, +} from './authentication-oauth-failed-context-google-analytics-session.interface'; +import type { + AuthenticationOAuthFailedContextActor, + AuthenticationOAuthFailedContextActorResponse, +} from './authentication-oauth-failed-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationOAuthFailedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationOAuthFailedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationOAuthFailedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationOAuthFailedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationOAuthFailedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationOAuthFailedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-oauth-failed-data-error.interface.ts b/src/common/interfaces/authentication-oauth-failed-data-error.interface.ts new file mode 100644 index 000000000..00e39ab60 --- /dev/null +++ b/src/common/interfaces/authentication-oauth-failed-data-error.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationFailedDataError, + AuthenticationEmailVerificationFailedDataErrorResponse, +} from './authentication-email-verification-failed-data-error.interface'; + +export type AuthenticationOAuthFailedDataError = + AuthenticationEmailVerificationFailedDataError; +export type AuthenticationOAuthFailedDataErrorResponse = + AuthenticationEmailVerificationFailedDataErrorResponse; diff --git a/src/common/interfaces/authentication-oauth-failed-data.interface.ts b/src/common/interfaces/authentication-oauth-failed-data.interface.ts new file mode 100644 index 000000000..100ce088d --- /dev/null +++ b/src/common/interfaces/authentication-oauth-failed-data.interface.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationOAuthFailedDataError, + AuthenticationOAuthFailedDataErrorResponse, +} from './authentication-oauth-failed-data-error.interface'; + +/** The event payload. */ +export interface AuthenticationOAuthFailedData { + type: 'oauth'; + status: 'failed'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string | null; + /** Details about the authentication error. */ + error: AuthenticationOAuthFailedDataError; +} + +export interface AuthenticationOAuthFailedDataResponse { + type: 'oauth'; + status: 'failed'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string | null; + error: AuthenticationOAuthFailedDataErrorResponse; +} diff --git a/src/common/interfaces/authentication-oauth-failed.interface.ts b/src/common/interfaces/authentication-oauth-failed.interface.ts new file mode 100644 index 000000000..c99ea1114 --- /dev/null +++ b/src/common/interfaces/authentication-oauth-failed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationOAuthFailedData, + AuthenticationOAuthFailedDataResponse, +} from './authentication-oauth-failed-data.interface'; +import type { + AuthenticationOAuthFailedContext, + AuthenticationOAuthFailedContextResponse, +} from './authentication-oauth-failed-context.interface'; + +export interface AuthenticationOAuthFailed { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.oauth_failed'; + /** The event payload. */ + data: AuthenticationOAuthFailedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationOAuthFailedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationOAuthFailedResponse { + id: string; + event: 'authentication.oauth_failed'; + data: AuthenticationOAuthFailedDataResponse; + created_at: string; + context?: AuthenticationOAuthFailedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-oauth-succeeded-context-actor-source.interface.ts b/src/common/interfaces/authentication-oauth-succeeded-context-actor-source.interface.ts new file mode 100644 index 000000000..fecf1b581 --- /dev/null +++ b/src/common/interfaces/authentication-oauth-succeeded-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationOAuthSucceededContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-oauth-succeeded-context-actor.interface.ts b/src/common/interfaces/authentication-oauth-succeeded-context-actor.interface.ts new file mode 100644 index 000000000..8918ac15f --- /dev/null +++ b/src/common/interfaces/authentication-oauth-succeeded-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationOAuthSucceededContextActorSource } from './authentication-oauth-succeeded-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationOAuthSucceededContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationOAuthSucceededContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationOAuthSucceededContextActorResponse { + id: string; + source: AuthenticationOAuthSucceededContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-oauth-succeeded-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-oauth-succeeded-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..4b4eb16dd --- /dev/null +++ b/src/common/interfaces/authentication-oauth-succeeded-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationOAuthSucceededContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationOAuthSucceededContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-oauth-succeeded-context.interface.ts b/src/common/interfaces/authentication-oauth-succeeded-context.interface.ts new file mode 100644 index 000000000..95c36b18b --- /dev/null +++ b/src/common/interfaces/authentication-oauth-succeeded-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationOAuthSucceededContextGoogleAnalyticsSession, + AuthenticationOAuthSucceededContextGoogleAnalyticsSessionResponse, +} from './authentication-oauth-succeeded-context-google-analytics-session.interface'; +import type { + AuthenticationOAuthSucceededContextActor, + AuthenticationOAuthSucceededContextActorResponse, +} from './authentication-oauth-succeeded-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationOAuthSucceededContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationOAuthSucceededContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationOAuthSucceededContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationOAuthSucceededContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationOAuthSucceededContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationOAuthSucceededContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-oauth-succeeded-data.interface.ts b/src/common/interfaces/authentication-oauth-succeeded-data.interface.ts new file mode 100644 index 000000000..313bc8a54 --- /dev/null +++ b/src/common/interfaces/authentication-oauth-succeeded-data.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface AuthenticationOAuthSucceededData { + type: 'oauth'; + status: 'succeeded'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string; +} + +export interface AuthenticationOAuthSucceededDataResponse { + type: 'oauth'; + status: 'succeeded'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string; +} diff --git a/src/common/interfaces/authentication-oauth-succeeded.interface.ts b/src/common/interfaces/authentication-oauth-succeeded.interface.ts new file mode 100644 index 000000000..d46b7de90 --- /dev/null +++ b/src/common/interfaces/authentication-oauth-succeeded.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationOAuthSucceededData, + AuthenticationOAuthSucceededDataResponse, +} from './authentication-oauth-succeeded-data.interface'; +import type { + AuthenticationOAuthSucceededContext, + AuthenticationOAuthSucceededContextResponse, +} from './authentication-oauth-succeeded-context.interface'; + +export interface AuthenticationOAuthSucceeded { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.oauth_succeeded'; + /** The event payload. */ + data: AuthenticationOAuthSucceededData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationOAuthSucceededContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationOAuthSucceededResponse { + id: string; + event: 'authentication.oauth_succeeded'; + data: AuthenticationOAuthSucceededDataResponse; + created_at: string; + context?: AuthenticationOAuthSucceededContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-passkey-failed-context-actor-source.interface.ts b/src/common/interfaces/authentication-passkey-failed-context-actor-source.interface.ts new file mode 100644 index 000000000..fe8eddb49 --- /dev/null +++ b/src/common/interfaces/authentication-passkey-failed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationPasskeyFailedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-passkey-failed-context-actor.interface.ts b/src/common/interfaces/authentication-passkey-failed-context-actor.interface.ts new file mode 100644 index 000000000..89b6c2b4e --- /dev/null +++ b/src/common/interfaces/authentication-passkey-failed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationPasskeyFailedContextActorSource } from './authentication-passkey-failed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationPasskeyFailedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationPasskeyFailedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationPasskeyFailedContextActorResponse { + id: string; + source: AuthenticationPasskeyFailedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-passkey-failed-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-passkey-failed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..5da4a0e03 --- /dev/null +++ b/src/common/interfaces/authentication-passkey-failed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationPasskeyFailedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationPasskeyFailedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-passkey-failed-context.interface.ts b/src/common/interfaces/authentication-passkey-failed-context.interface.ts new file mode 100644 index 000000000..d6bce5908 --- /dev/null +++ b/src/common/interfaces/authentication-passkey-failed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationPasskeyFailedContextGoogleAnalyticsSession, + AuthenticationPasskeyFailedContextGoogleAnalyticsSessionResponse, +} from './authentication-passkey-failed-context-google-analytics-session.interface'; +import type { + AuthenticationPasskeyFailedContextActor, + AuthenticationPasskeyFailedContextActorResponse, +} from './authentication-passkey-failed-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationPasskeyFailedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationPasskeyFailedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationPasskeyFailedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationPasskeyFailedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationPasskeyFailedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationPasskeyFailedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-passkey-failed-data-error.interface.ts b/src/common/interfaces/authentication-passkey-failed-data-error.interface.ts new file mode 100644 index 000000000..f63e3d4b7 --- /dev/null +++ b/src/common/interfaces/authentication-passkey-failed-data-error.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationFailedDataError, + AuthenticationEmailVerificationFailedDataErrorResponse, +} from './authentication-email-verification-failed-data-error.interface'; + +export type AuthenticationPasskeyFailedDataError = + AuthenticationEmailVerificationFailedDataError; +export type AuthenticationPasskeyFailedDataErrorResponse = + AuthenticationEmailVerificationFailedDataErrorResponse; diff --git a/src/common/interfaces/authentication-passkey-failed-data.interface.ts b/src/common/interfaces/authentication-passkey-failed-data.interface.ts new file mode 100644 index 000000000..8f2daaec4 --- /dev/null +++ b/src/common/interfaces/authentication-passkey-failed-data.interface.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationPasskeyFailedDataError, + AuthenticationPasskeyFailedDataErrorResponse, +} from './authentication-passkey-failed-data-error.interface'; + +/** The event payload. */ +export interface AuthenticationPasskeyFailedData { + type: 'passkey'; + status: 'failed'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string | null; + /** Details about the authentication error. */ + error: AuthenticationPasskeyFailedDataError; +} + +export interface AuthenticationPasskeyFailedDataResponse { + type: 'passkey'; + status: 'failed'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string | null; + error: AuthenticationPasskeyFailedDataErrorResponse; +} diff --git a/src/common/interfaces/authentication-passkey-failed.interface.ts b/src/common/interfaces/authentication-passkey-failed.interface.ts new file mode 100644 index 000000000..d6e1e0fa2 --- /dev/null +++ b/src/common/interfaces/authentication-passkey-failed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationPasskeyFailedData, + AuthenticationPasskeyFailedDataResponse, +} from './authentication-passkey-failed-data.interface'; +import type { + AuthenticationPasskeyFailedContext, + AuthenticationPasskeyFailedContextResponse, +} from './authentication-passkey-failed-context.interface'; + +export interface AuthenticationPasskeyFailed { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.passkey_failed'; + /** The event payload. */ + data: AuthenticationPasskeyFailedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationPasskeyFailedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationPasskeyFailedResponse { + id: string; + event: 'authentication.passkey_failed'; + data: AuthenticationPasskeyFailedDataResponse; + created_at: string; + context?: AuthenticationPasskeyFailedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-passkey-succeeded-context-actor-source.interface.ts b/src/common/interfaces/authentication-passkey-succeeded-context-actor-source.interface.ts new file mode 100644 index 000000000..091aa88ac --- /dev/null +++ b/src/common/interfaces/authentication-passkey-succeeded-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationPasskeySucceededContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-passkey-succeeded-context-actor.interface.ts b/src/common/interfaces/authentication-passkey-succeeded-context-actor.interface.ts new file mode 100644 index 000000000..546989a2c --- /dev/null +++ b/src/common/interfaces/authentication-passkey-succeeded-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationPasskeySucceededContextActorSource } from './authentication-passkey-succeeded-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationPasskeySucceededContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationPasskeySucceededContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationPasskeySucceededContextActorResponse { + id: string; + source: AuthenticationPasskeySucceededContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-passkey-succeeded-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-passkey-succeeded-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..66e51a490 --- /dev/null +++ b/src/common/interfaces/authentication-passkey-succeeded-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationPasskeySucceededContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationPasskeySucceededContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-passkey-succeeded-context.interface.ts b/src/common/interfaces/authentication-passkey-succeeded-context.interface.ts new file mode 100644 index 000000000..7dfd5e57f --- /dev/null +++ b/src/common/interfaces/authentication-passkey-succeeded-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationPasskeySucceededContextGoogleAnalyticsSession, + AuthenticationPasskeySucceededContextGoogleAnalyticsSessionResponse, +} from './authentication-passkey-succeeded-context-google-analytics-session.interface'; +import type { + AuthenticationPasskeySucceededContextActor, + AuthenticationPasskeySucceededContextActorResponse, +} from './authentication-passkey-succeeded-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationPasskeySucceededContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationPasskeySucceededContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationPasskeySucceededContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationPasskeySucceededContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationPasskeySucceededContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationPasskeySucceededContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-passkey-succeeded-data.interface.ts b/src/common/interfaces/authentication-passkey-succeeded-data.interface.ts new file mode 100644 index 000000000..b6b130877 --- /dev/null +++ b/src/common/interfaces/authentication-passkey-succeeded-data.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface AuthenticationPasskeySucceededData { + type: 'passkey'; + status: 'succeeded'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string; + /** The email address of the user. */ + email: string; +} + +export interface AuthenticationPasskeySucceededDataResponse { + type: 'passkey'; + status: 'succeeded'; + ip_address: string | null; + user_agent: string | null; + user_id: string; + email: string; +} diff --git a/src/common/interfaces/authentication-passkey-succeeded.interface.ts b/src/common/interfaces/authentication-passkey-succeeded.interface.ts new file mode 100644 index 000000000..11d37c31f --- /dev/null +++ b/src/common/interfaces/authentication-passkey-succeeded.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationPasskeySucceededData, + AuthenticationPasskeySucceededDataResponse, +} from './authentication-passkey-succeeded-data.interface'; +import type { + AuthenticationPasskeySucceededContext, + AuthenticationPasskeySucceededContextResponse, +} from './authentication-passkey-succeeded-context.interface'; + +export interface AuthenticationPasskeySucceeded { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.passkey_succeeded'; + /** The event payload. */ + data: AuthenticationPasskeySucceededData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationPasskeySucceededContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationPasskeySucceededResponse { + id: string; + event: 'authentication.passkey_succeeded'; + data: AuthenticationPasskeySucceededDataResponse; + created_at: string; + context?: AuthenticationPasskeySucceededContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-password-failed-context-actor-source.interface.ts b/src/common/interfaces/authentication-password-failed-context-actor-source.interface.ts new file mode 100644 index 000000000..adeaba0df --- /dev/null +++ b/src/common/interfaces/authentication-password-failed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationPasswordFailedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-password-failed-context-actor.interface.ts b/src/common/interfaces/authentication-password-failed-context-actor.interface.ts new file mode 100644 index 000000000..90feb698d --- /dev/null +++ b/src/common/interfaces/authentication-password-failed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationPasswordFailedContextActorSource } from './authentication-password-failed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationPasswordFailedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationPasswordFailedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationPasswordFailedContextActorResponse { + id: string; + source: AuthenticationPasswordFailedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-password-failed-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-password-failed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..fb9a9c6e9 --- /dev/null +++ b/src/common/interfaces/authentication-password-failed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationPasswordFailedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationPasswordFailedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-password-failed-context.interface.ts b/src/common/interfaces/authentication-password-failed-context.interface.ts new file mode 100644 index 000000000..785c13b09 --- /dev/null +++ b/src/common/interfaces/authentication-password-failed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationPasswordFailedContextGoogleAnalyticsSession, + AuthenticationPasswordFailedContextGoogleAnalyticsSessionResponse, +} from './authentication-password-failed-context-google-analytics-session.interface'; +import type { + AuthenticationPasswordFailedContextActor, + AuthenticationPasswordFailedContextActorResponse, +} from './authentication-password-failed-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationPasswordFailedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationPasswordFailedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationPasswordFailedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationPasswordFailedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationPasswordFailedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationPasswordFailedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-password-failed-data-error.interface.ts b/src/common/interfaces/authentication-password-failed-data-error.interface.ts new file mode 100644 index 000000000..a91cedfec --- /dev/null +++ b/src/common/interfaces/authentication-password-failed-data-error.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationFailedDataError, + AuthenticationEmailVerificationFailedDataErrorResponse, +} from './authentication-email-verification-failed-data-error.interface'; + +export type AuthenticationPasswordFailedDataError = + AuthenticationEmailVerificationFailedDataError; +export type AuthenticationPasswordFailedDataErrorResponse = + AuthenticationEmailVerificationFailedDataErrorResponse; diff --git a/src/common/interfaces/authentication-password-failed-data.interface.ts b/src/common/interfaces/authentication-password-failed-data.interface.ts new file mode 100644 index 000000000..e15a9181f --- /dev/null +++ b/src/common/interfaces/authentication-password-failed-data.interface.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationPasswordFailedDataError, + AuthenticationPasswordFailedDataErrorResponse, +} from './authentication-password-failed-data-error.interface'; + +/** The event payload. */ +export interface AuthenticationPasswordFailedData { + type: 'password'; + status: 'failed'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string | null; + /** Details about the authentication error. */ + error: AuthenticationPasswordFailedDataError; +} + +export interface AuthenticationPasswordFailedDataResponse { + type: 'password'; + status: 'failed'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string | null; + error: AuthenticationPasswordFailedDataErrorResponse; +} diff --git a/src/common/interfaces/authentication-password-failed.interface.ts b/src/common/interfaces/authentication-password-failed.interface.ts new file mode 100644 index 000000000..282fa7385 --- /dev/null +++ b/src/common/interfaces/authentication-password-failed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationPasswordFailedData, + AuthenticationPasswordFailedDataResponse, +} from './authentication-password-failed-data.interface'; +import type { + AuthenticationPasswordFailedContext, + AuthenticationPasswordFailedContextResponse, +} from './authentication-password-failed-context.interface'; + +export interface AuthenticationPasswordFailed { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.password_failed'; + /** The event payload. */ + data: AuthenticationPasswordFailedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationPasswordFailedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationPasswordFailedResponse { + id: string; + event: 'authentication.password_failed'; + data: AuthenticationPasswordFailedDataResponse; + created_at: string; + context?: AuthenticationPasswordFailedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-password-succeeded-context-actor-source.interface.ts b/src/common/interfaces/authentication-password-succeeded-context-actor-source.interface.ts new file mode 100644 index 000000000..da00e2aa9 --- /dev/null +++ b/src/common/interfaces/authentication-password-succeeded-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationPasswordSucceededContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-password-succeeded-context-actor.interface.ts b/src/common/interfaces/authentication-password-succeeded-context-actor.interface.ts new file mode 100644 index 000000000..6f147d6d0 --- /dev/null +++ b/src/common/interfaces/authentication-password-succeeded-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationPasswordSucceededContextActorSource } from './authentication-password-succeeded-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationPasswordSucceededContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationPasswordSucceededContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationPasswordSucceededContextActorResponse { + id: string; + source: AuthenticationPasswordSucceededContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-password-succeeded-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-password-succeeded-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..46cbc4a8c --- /dev/null +++ b/src/common/interfaces/authentication-password-succeeded-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationPasswordSucceededContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationPasswordSucceededContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-password-succeeded-context.interface.ts b/src/common/interfaces/authentication-password-succeeded-context.interface.ts new file mode 100644 index 000000000..82db54e5d --- /dev/null +++ b/src/common/interfaces/authentication-password-succeeded-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationPasswordSucceededContextGoogleAnalyticsSession, + AuthenticationPasswordSucceededContextGoogleAnalyticsSessionResponse, +} from './authentication-password-succeeded-context-google-analytics-session.interface'; +import type { + AuthenticationPasswordSucceededContextActor, + AuthenticationPasswordSucceededContextActorResponse, +} from './authentication-password-succeeded-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationPasswordSucceededContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationPasswordSucceededContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationPasswordSucceededContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationPasswordSucceededContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationPasswordSucceededContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationPasswordSucceededContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-password-succeeded-data.interface.ts b/src/common/interfaces/authentication-password-succeeded-data.interface.ts new file mode 100644 index 000000000..7de54d4b2 --- /dev/null +++ b/src/common/interfaces/authentication-password-succeeded-data.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface AuthenticationPasswordSucceededData { + type: 'password'; + status: 'succeeded'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string; + /** The email address of the user. */ + email: string; +} + +export interface AuthenticationPasswordSucceededDataResponse { + type: 'password'; + status: 'succeeded'; + ip_address: string | null; + user_agent: string | null; + user_id: string; + email: string; +} diff --git a/src/common/interfaces/authentication-password-succeeded.interface.ts b/src/common/interfaces/authentication-password-succeeded.interface.ts new file mode 100644 index 000000000..7772dcd00 --- /dev/null +++ b/src/common/interfaces/authentication-password-succeeded.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationPasswordSucceededData, + AuthenticationPasswordSucceededDataResponse, +} from './authentication-password-succeeded-data.interface'; +import type { + AuthenticationPasswordSucceededContext, + AuthenticationPasswordSucceededContextResponse, +} from './authentication-password-succeeded-context.interface'; + +export interface AuthenticationPasswordSucceeded { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.password_succeeded'; + /** The event payload. */ + data: AuthenticationPasswordSucceededData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationPasswordSucceededContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationPasswordSucceededResponse { + id: string; + event: 'authentication.password_succeeded'; + data: AuthenticationPasswordSucceededDataResponse; + created_at: string; + context?: AuthenticationPasswordSucceededContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-radar-risk-detected-context-actor-source.interface.ts b/src/common/interfaces/authentication-radar-risk-detected-context-actor-source.interface.ts new file mode 100644 index 000000000..e2ff9631c --- /dev/null +++ b/src/common/interfaces/authentication-radar-risk-detected-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationRadarRiskDetectedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-radar-risk-detected-context-actor.interface.ts b/src/common/interfaces/authentication-radar-risk-detected-context-actor.interface.ts new file mode 100644 index 000000000..70583e005 --- /dev/null +++ b/src/common/interfaces/authentication-radar-risk-detected-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationRadarRiskDetectedContextActorSource } from './authentication-radar-risk-detected-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationRadarRiskDetectedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationRadarRiskDetectedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationRadarRiskDetectedContextActorResponse { + id: string; + source: AuthenticationRadarRiskDetectedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-radar-risk-detected-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-radar-risk-detected-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..81ee71758 --- /dev/null +++ b/src/common/interfaces/authentication-radar-risk-detected-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationRadarRiskDetectedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationRadarRiskDetectedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-radar-risk-detected-context.interface.ts b/src/common/interfaces/authentication-radar-risk-detected-context.interface.ts new file mode 100644 index 000000000..b215a99ff --- /dev/null +++ b/src/common/interfaces/authentication-radar-risk-detected-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationRadarRiskDetectedContextGoogleAnalyticsSession, + AuthenticationRadarRiskDetectedContextGoogleAnalyticsSessionResponse, +} from './authentication-radar-risk-detected-context-google-analytics-session.interface'; +import type { + AuthenticationRadarRiskDetectedContextActor, + AuthenticationRadarRiskDetectedContextActorResponse, +} from './authentication-radar-risk-detected-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationRadarRiskDetectedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationRadarRiskDetectedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationRadarRiskDetectedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationRadarRiskDetectedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationRadarRiskDetectedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationRadarRiskDetectedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-radar-risk-detected-data-action.interface.ts b/src/common/interfaces/authentication-radar-risk-detected-data-action.interface.ts new file mode 100644 index 000000000..f6c4709a5 --- /dev/null +++ b/src/common/interfaces/authentication-radar-risk-detected-data-action.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationRadarRiskDetectedDataAction = 'signup' | 'login'; diff --git a/src/common/interfaces/authentication-radar-risk-detected-data.interface.ts b/src/common/interfaces/authentication-radar-risk-detected-data.interface.ts new file mode 100644 index 000000000..5e8c22e4f --- /dev/null +++ b/src/common/interfaces/authentication-radar-risk-detected-data.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationRadarRiskDetectedDataAction } from './authentication-radar-risk-detected-data-action.interface'; + +/** The event payload. */ +export interface AuthenticationRadarRiskDetectedData { + /** The authentication method used. */ + authMethod: string; + action: AuthenticationRadarRiskDetectedDataAction; + /** The control action taken for the detected risk. */ + control: string | null; + /** The type of blocklist that triggered the risk detection. */ + blocklistType: string | null; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string; + /** The email address of the user. */ + email: string; +} + +export interface AuthenticationRadarRiskDetectedDataResponse { + auth_method: string; + action: AuthenticationRadarRiskDetectedDataAction; + control: string | null; + blocklist_type: string | null; + ip_address: string | null; + user_agent: string | null; + user_id: string; + email: string; +} diff --git a/src/common/interfaces/authentication-radar-risk-detected.interface.ts b/src/common/interfaces/authentication-radar-risk-detected.interface.ts new file mode 100644 index 000000000..67b9a3264 --- /dev/null +++ b/src/common/interfaces/authentication-radar-risk-detected.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationRadarRiskDetectedData, + AuthenticationRadarRiskDetectedDataResponse, +} from './authentication-radar-risk-detected-data.interface'; +import type { + AuthenticationRadarRiskDetectedContext, + AuthenticationRadarRiskDetectedContextResponse, +} from './authentication-radar-risk-detected-context.interface'; + +export interface AuthenticationRadarRiskDetected { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.radar_risk_detected'; + /** The event payload. */ + data: AuthenticationRadarRiskDetectedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationRadarRiskDetectedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationRadarRiskDetectedResponse { + id: string; + event: 'authentication.radar_risk_detected'; + data: AuthenticationRadarRiskDetectedDataResponse; + created_at: string; + context?: AuthenticationRadarRiskDetectedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-sso-failed-context-actor-source.interface.ts b/src/common/interfaces/authentication-sso-failed-context-actor-source.interface.ts new file mode 100644 index 000000000..32a8cbb6e --- /dev/null +++ b/src/common/interfaces/authentication-sso-failed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationSSOFailedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-sso-failed-context-actor.interface.ts b/src/common/interfaces/authentication-sso-failed-context-actor.interface.ts new file mode 100644 index 000000000..e4c4553bf --- /dev/null +++ b/src/common/interfaces/authentication-sso-failed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationSSOFailedContextActorSource } from './authentication-sso-failed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationSSOFailedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationSSOFailedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationSSOFailedContextActorResponse { + id: string; + source: AuthenticationSSOFailedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-sso-failed-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-sso-failed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..e0db67930 --- /dev/null +++ b/src/common/interfaces/authentication-sso-failed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationSSOFailedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationSSOFailedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-sso-failed-context.interface.ts b/src/common/interfaces/authentication-sso-failed-context.interface.ts new file mode 100644 index 000000000..41c9d43f8 --- /dev/null +++ b/src/common/interfaces/authentication-sso-failed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOFailedContextGoogleAnalyticsSession, + AuthenticationSSOFailedContextGoogleAnalyticsSessionResponse, +} from './authentication-sso-failed-context-google-analytics-session.interface'; +import type { + AuthenticationSSOFailedContextActor, + AuthenticationSSOFailedContextActorResponse, +} from './authentication-sso-failed-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationSSOFailedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationSSOFailedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationSSOFailedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationSSOFailedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationSSOFailedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationSSOFailedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-sso-failed-data-error.interface.ts b/src/common/interfaces/authentication-sso-failed-data-error.interface.ts new file mode 100644 index 000000000..e6f3c628a --- /dev/null +++ b/src/common/interfaces/authentication-sso-failed-data-error.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationFailedDataError, + AuthenticationEmailVerificationFailedDataErrorResponse, +} from './authentication-email-verification-failed-data-error.interface'; + +export type AuthenticationSSOFailedDataError = + AuthenticationEmailVerificationFailedDataError; +export type AuthenticationSSOFailedDataErrorResponse = + AuthenticationEmailVerificationFailedDataErrorResponse; diff --git a/src/common/interfaces/authentication-sso-failed-data-sso.interface.ts b/src/common/interfaces/authentication-sso-failed-data-sso.interface.ts new file mode 100644 index 000000000..e81f6256d --- /dev/null +++ b/src/common/interfaces/authentication-sso-failed-data-sso.interface.ts @@ -0,0 +1,17 @@ +// This file is auto-generated by oagen. Do not edit. + +/** SSO connection details. */ +export interface AuthenticationSSOFailedDataSSO { + /** The ID of the organization. */ + organizationId: string | null; + /** The ID of the SSO connection. */ + connectionId: string | null; + /** The ID of the SSO session. */ + sessionId: string | null; +} + +export interface AuthenticationSSOFailedDataSSOResponse { + organization_id: string | null; + connection_id: string | null; + session_id: string | null; +} diff --git a/src/common/interfaces/authentication-sso-failed-data.interface.ts b/src/common/interfaces/authentication-sso-failed-data.interface.ts new file mode 100644 index 000000000..09452e0d1 --- /dev/null +++ b/src/common/interfaces/authentication-sso-failed-data.interface.ts @@ -0,0 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOFailedDataSSO, + AuthenticationSSOFailedDataSSOResponse, +} from './authentication-sso-failed-data-sso.interface'; +import type { + AuthenticationSSOFailedDataError, + AuthenticationSSOFailedDataErrorResponse, +} from './authentication-sso-failed-data-error.interface'; + +/** The event payload. */ +export interface AuthenticationSSOFailedData { + type: 'sso'; + status: 'failed'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string | null; + /** SSO connection details. */ + sso: AuthenticationSSOFailedDataSSO; + /** Details about the authentication error. */ + error: AuthenticationSSOFailedDataError; +} + +export interface AuthenticationSSOFailedDataResponse { + type: 'sso'; + status: 'failed'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string | null; + sso: AuthenticationSSOFailedDataSSOResponse; + error: AuthenticationSSOFailedDataErrorResponse; +} diff --git a/src/common/interfaces/authentication-sso-failed.interface.ts b/src/common/interfaces/authentication-sso-failed.interface.ts new file mode 100644 index 000000000..d52ebeb57 --- /dev/null +++ b/src/common/interfaces/authentication-sso-failed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOFailedData, + AuthenticationSSOFailedDataResponse, +} from './authentication-sso-failed-data.interface'; +import type { + AuthenticationSSOFailedContext, + AuthenticationSSOFailedContextResponse, +} from './authentication-sso-failed-context.interface'; + +export interface AuthenticationSSOFailed { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.sso_failed'; + /** The event payload. */ + data: AuthenticationSSOFailedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationSSOFailedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationSSOFailedResponse { + id: string; + event: 'authentication.sso_failed'; + data: AuthenticationSSOFailedDataResponse; + created_at: string; + context?: AuthenticationSSOFailedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-sso-started-context-actor-source.interface.ts b/src/common/interfaces/authentication-sso-started-context-actor-source.interface.ts new file mode 100644 index 000000000..3ae1b17c9 --- /dev/null +++ b/src/common/interfaces/authentication-sso-started-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationSSOStartedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-sso-started-context-actor.interface.ts b/src/common/interfaces/authentication-sso-started-context-actor.interface.ts new file mode 100644 index 000000000..5dbefefea --- /dev/null +++ b/src/common/interfaces/authentication-sso-started-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationSSOStartedContextActorSource } from './authentication-sso-started-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationSSOStartedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationSSOStartedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationSSOStartedContextActorResponse { + id: string; + source: AuthenticationSSOStartedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-sso-started-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-sso-started-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..5e6a5e19e --- /dev/null +++ b/src/common/interfaces/authentication-sso-started-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationSSOStartedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationSSOStartedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-sso-started-context.interface.ts b/src/common/interfaces/authentication-sso-started-context.interface.ts new file mode 100644 index 000000000..be5f93677 --- /dev/null +++ b/src/common/interfaces/authentication-sso-started-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOStartedContextGoogleAnalyticsSession, + AuthenticationSSOStartedContextGoogleAnalyticsSessionResponse, +} from './authentication-sso-started-context-google-analytics-session.interface'; +import type { + AuthenticationSSOStartedContextActor, + AuthenticationSSOStartedContextActorResponse, +} from './authentication-sso-started-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationSSOStartedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationSSOStartedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationSSOStartedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationSSOStartedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationSSOStartedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationSSOStartedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-sso-started-data-sso.interface.ts b/src/common/interfaces/authentication-sso-started-data-sso.interface.ts new file mode 100644 index 000000000..e0364dfac --- /dev/null +++ b/src/common/interfaces/authentication-sso-started-data-sso.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOFailedDataSSO, + AuthenticationSSOFailedDataSSOResponse, +} from './authentication-sso-failed-data-sso.interface'; + +export type AuthenticationSSOStartedDataSSO = AuthenticationSSOFailedDataSSO; +export type AuthenticationSSOStartedDataSSOResponse = + AuthenticationSSOFailedDataSSOResponse; diff --git a/src/common/interfaces/authentication-sso-started-data.interface.ts b/src/common/interfaces/authentication-sso-started-data.interface.ts new file mode 100644 index 000000000..e2ca337bb --- /dev/null +++ b/src/common/interfaces/authentication-sso-started-data.interface.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOStartedDataSSO, + AuthenticationSSOStartedDataSSOResponse, +} from './authentication-sso-started-data-sso.interface'; + +/** The event payload. */ +export interface AuthenticationSSOStartedData { + type: 'sso'; + status: 'started'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string | null; + /** SSO connection details. */ + sso: AuthenticationSSOStartedDataSSO; +} + +export interface AuthenticationSSOStartedDataResponse { + type: 'sso'; + status: 'started'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string | null; + sso: AuthenticationSSOStartedDataSSOResponse; +} diff --git a/src/common/interfaces/authentication-sso-started.interface.ts b/src/common/interfaces/authentication-sso-started.interface.ts new file mode 100644 index 000000000..0eab0a533 --- /dev/null +++ b/src/common/interfaces/authentication-sso-started.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOStartedData, + AuthenticationSSOStartedDataResponse, +} from './authentication-sso-started-data.interface'; +import type { + AuthenticationSSOStartedContext, + AuthenticationSSOStartedContextResponse, +} from './authentication-sso-started-context.interface'; + +export interface AuthenticationSSOStarted { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.sso_started'; + /** The event payload. */ + data: AuthenticationSSOStartedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationSSOStartedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationSSOStartedResponse { + id: string; + event: 'authentication.sso_started'; + data: AuthenticationSSOStartedDataResponse; + created_at: string; + context?: AuthenticationSSOStartedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-sso-succeeded-context-actor-source.interface.ts b/src/common/interfaces/authentication-sso-succeeded-context-actor-source.interface.ts new file mode 100644 index 000000000..a68bf4ba5 --- /dev/null +++ b/src/common/interfaces/authentication-sso-succeeded-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationSSOSucceededContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-sso-succeeded-context-actor.interface.ts b/src/common/interfaces/authentication-sso-succeeded-context-actor.interface.ts new file mode 100644 index 000000000..f9d189239 --- /dev/null +++ b/src/common/interfaces/authentication-sso-succeeded-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationSSOSucceededContextActorSource } from './authentication-sso-succeeded-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationSSOSucceededContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationSSOSucceededContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationSSOSucceededContextActorResponse { + id: string; + source: AuthenticationSSOSucceededContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-sso-succeeded-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-sso-succeeded-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..2792c75e2 --- /dev/null +++ b/src/common/interfaces/authentication-sso-succeeded-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationSSOSucceededContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationSSOSucceededContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-sso-succeeded-context.interface.ts b/src/common/interfaces/authentication-sso-succeeded-context.interface.ts new file mode 100644 index 000000000..b17fb6fb8 --- /dev/null +++ b/src/common/interfaces/authentication-sso-succeeded-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOSucceededContextGoogleAnalyticsSession, + AuthenticationSSOSucceededContextGoogleAnalyticsSessionResponse, +} from './authentication-sso-succeeded-context-google-analytics-session.interface'; +import type { + AuthenticationSSOSucceededContextActor, + AuthenticationSSOSucceededContextActorResponse, +} from './authentication-sso-succeeded-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationSSOSucceededContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationSSOSucceededContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationSSOSucceededContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationSSOSucceededContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationSSOSucceededContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationSSOSucceededContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-sso-succeeded-data-sso.interface.ts b/src/common/interfaces/authentication-sso-succeeded-data-sso.interface.ts new file mode 100644 index 000000000..2aea31ada --- /dev/null +++ b/src/common/interfaces/authentication-sso-succeeded-data-sso.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOFailedDataSSO, + AuthenticationSSOFailedDataSSOResponse, +} from './authentication-sso-failed-data-sso.interface'; + +export type AuthenticationSSOSucceededDataSSO = AuthenticationSSOFailedDataSSO; +export type AuthenticationSSOSucceededDataSSOResponse = + AuthenticationSSOFailedDataSSOResponse; diff --git a/src/common/interfaces/authentication-sso-succeeded-data.interface.ts b/src/common/interfaces/authentication-sso-succeeded-data.interface.ts new file mode 100644 index 000000000..6fb5302ba --- /dev/null +++ b/src/common/interfaces/authentication-sso-succeeded-data.interface.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOSucceededDataSSO, + AuthenticationSSOSucceededDataSSOResponse, +} from './authentication-sso-succeeded-data-sso.interface'; + +/** The event payload. */ +export interface AuthenticationSSOSucceededData { + type: 'sso'; + status: 'succeeded'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string; + /** SSO connection details. */ + sso: AuthenticationSSOSucceededDataSSO; +} + +export interface AuthenticationSSOSucceededDataResponse { + type: 'sso'; + status: 'succeeded'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string; + sso: AuthenticationSSOSucceededDataSSOResponse; +} diff --git a/src/common/interfaces/authentication-sso-succeeded.interface.ts b/src/common/interfaces/authentication-sso-succeeded.interface.ts new file mode 100644 index 000000000..64ae40c59 --- /dev/null +++ b/src/common/interfaces/authentication-sso-succeeded.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOSucceededData, + AuthenticationSSOSucceededDataResponse, +} from './authentication-sso-succeeded-data.interface'; +import type { + AuthenticationSSOSucceededContext, + AuthenticationSSOSucceededContextResponse, +} from './authentication-sso-succeeded-context.interface'; + +export interface AuthenticationSSOSucceeded { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.sso_succeeded'; + /** The event payload. */ + data: AuthenticationSSOSucceededData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationSSOSucceededContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationSSOSucceededResponse { + id: string; + event: 'authentication.sso_succeeded'; + data: AuthenticationSSOSucceededDataResponse; + created_at: string; + context?: AuthenticationSSOSucceededContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authentication-sso-timed-out-context-actor-source.interface.ts b/src/common/interfaces/authentication-sso-timed-out-context-actor-source.interface.ts new file mode 100644 index 000000000..c756962bd --- /dev/null +++ b/src/common/interfaces/authentication-sso-timed-out-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthenticationSSOTimedOutContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/authentication-sso-timed-out-context-actor.interface.ts b/src/common/interfaces/authentication-sso-timed-out-context-actor.interface.ts new file mode 100644 index 000000000..338cb20d1 --- /dev/null +++ b/src/common/interfaces/authentication-sso-timed-out-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationSSOTimedOutContextActorSource } from './authentication-sso-timed-out-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface AuthenticationSSOTimedOutContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: AuthenticationSSOTimedOutContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface AuthenticationSSOTimedOutContextActorResponse { + id: string; + source: AuthenticationSSOTimedOutContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/authentication-sso-timed-out-context-google-analytics-session.interface.ts b/src/common/interfaces/authentication-sso-timed-out-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..a882b3aaf --- /dev/null +++ b/src/common/interfaces/authentication-sso-timed-out-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type AuthenticationSSOTimedOutContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type AuthenticationSSOTimedOutContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/authentication-sso-timed-out-context.interface.ts b/src/common/interfaces/authentication-sso-timed-out-context.interface.ts new file mode 100644 index 000000000..c254f9fbe --- /dev/null +++ b/src/common/interfaces/authentication-sso-timed-out-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOTimedOutContextGoogleAnalyticsSession, + AuthenticationSSOTimedOutContextGoogleAnalyticsSessionResponse, +} from './authentication-sso-timed-out-context-google-analytics-session.interface'; +import type { + AuthenticationSSOTimedOutContextActor, + AuthenticationSSOTimedOutContextActorResponse, +} from './authentication-sso-timed-out-context-actor.interface'; + +/** Additional context about the event. */ +export interface AuthenticationSSOTimedOutContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: AuthenticationSSOTimedOutContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: AuthenticationSSOTimedOutContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface AuthenticationSSOTimedOutContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: AuthenticationSSOTimedOutContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: AuthenticationSSOTimedOutContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/authentication-sso-timed-out-data-error.interface.ts b/src/common/interfaces/authentication-sso-timed-out-data-error.interface.ts new file mode 100644 index 000000000..7f44d1d30 --- /dev/null +++ b/src/common/interfaces/authentication-sso-timed-out-data-error.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationEmailVerificationFailedDataError, + AuthenticationEmailVerificationFailedDataErrorResponse, +} from './authentication-email-verification-failed-data-error.interface'; + +export type AuthenticationSSOTimedOutDataError = + AuthenticationEmailVerificationFailedDataError; +export type AuthenticationSSOTimedOutDataErrorResponse = + AuthenticationEmailVerificationFailedDataErrorResponse; diff --git a/src/common/interfaces/authentication-sso-timed-out-data-sso.interface.ts b/src/common/interfaces/authentication-sso-timed-out-data-sso.interface.ts new file mode 100644 index 000000000..14bef2435 --- /dev/null +++ b/src/common/interfaces/authentication-sso-timed-out-data-sso.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOFailedDataSSO, + AuthenticationSSOFailedDataSSOResponse, +} from './authentication-sso-failed-data-sso.interface'; + +export type AuthenticationSSOTimedOutDataSSO = AuthenticationSSOFailedDataSSO; +export type AuthenticationSSOTimedOutDataSSOResponse = + AuthenticationSSOFailedDataSSOResponse; diff --git a/src/common/interfaces/authentication-sso-timed-out-data.interface.ts b/src/common/interfaces/authentication-sso-timed-out-data.interface.ts new file mode 100644 index 000000000..a46c339cb --- /dev/null +++ b/src/common/interfaces/authentication-sso-timed-out-data.interface.ts @@ -0,0 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOTimedOutDataSSO, + AuthenticationSSOTimedOutDataSSOResponse, +} from './authentication-sso-timed-out-data-sso.interface'; +import type { + AuthenticationSSOTimedOutDataError, + AuthenticationSSOTimedOutDataErrorResponse, +} from './authentication-sso-timed-out-data-error.interface'; + +/** The event payload. */ +export interface AuthenticationSSOTimedOutData { + type: 'sso'; + status: 'timed_out'; + /** The IP address of the request. */ + ipAddress: string | null; + /** The user agent of the request. */ + userAgent: string | null; + /** The ID of the user. */ + userId: string | null; + /** The email address of the user. */ + email: string | null; + /** SSO connection details. */ + sso: AuthenticationSSOTimedOutDataSSO; + /** Details about the authentication error. */ + error: AuthenticationSSOTimedOutDataError; +} + +export interface AuthenticationSSOTimedOutDataResponse { + type: 'sso'; + status: 'timed_out'; + ip_address: string | null; + user_agent: string | null; + user_id: string | null; + email: string | null; + sso: AuthenticationSSOTimedOutDataSSOResponse; + error: AuthenticationSSOTimedOutDataErrorResponse; +} diff --git a/src/common/interfaces/authentication-sso-timed-out.interface.ts b/src/common/interfaces/authentication-sso-timed-out.interface.ts new file mode 100644 index 000000000..144c34725 --- /dev/null +++ b/src/common/interfaces/authentication-sso-timed-out.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationSSOTimedOutData, + AuthenticationSSOTimedOutDataResponse, +} from './authentication-sso-timed-out-data.interface'; +import type { + AuthenticationSSOTimedOutContext, + AuthenticationSSOTimedOutContextResponse, +} from './authentication-sso-timed-out-context.interface'; + +export interface AuthenticationSSOTimedOut { + /** Unique identifier for the event. */ + id: string; + event: 'authentication.sso_timed_out'; + /** The event payload. */ + data: AuthenticationSSOTimedOutData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: AuthenticationSSOTimedOutContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface AuthenticationSSOTimedOutResponse { + id: string; + event: 'authentication.sso_timed_out'; + data: AuthenticationSSOTimedOutDataResponse; + created_at: string; + context?: AuthenticationSSOTimedOutContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/authorization-organization-roles-type.interface.ts b/src/common/interfaces/authorization-organization-roles-type.interface.ts new file mode 100644 index 000000000..67881e170 --- /dev/null +++ b/src/common/interfaces/authorization-organization-roles-type.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthorizationOrganizationRolesType = + | 'EnvironmentRole' + | 'OrganizationRole'; diff --git a/src/common/interfaces/authorization-organization-roles-update-priority-order-item-type.interface.ts b/src/common/interfaces/authorization-organization-roles-update-priority-order-item-type.interface.ts new file mode 100644 index 000000000..be8a12db9 --- /dev/null +++ b/src/common/interfaces/authorization-organization-roles-update-priority-order-item-type.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type AuthorizationOrganizationRolesUpdatePriorityOrderItemType = + | 'EnvironmentRole' + | 'OrganizationRole'; diff --git a/src/common/interfaces/connected-account-state.interface.ts b/src/common/interfaces/connected-account-state.interface.ts new file mode 100644 index 000000000..852c4b5cd --- /dev/null +++ b/src/common/interfaces/connected-account-state.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectedAccountState = + | 'connected' + | 'needs_reauthorization' + | 'disconnected'; diff --git a/src/common/interfaces/connection-activated-context-actor-source.interface.ts b/src/common/interfaces/connection-activated-context-actor-source.interface.ts new file mode 100644 index 000000000..495727bb7 --- /dev/null +++ b/src/common/interfaces/connection-activated-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionActivatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/connection-activated-context-actor.interface.ts b/src/common/interfaces/connection-activated-context-actor.interface.ts new file mode 100644 index 000000000..cb374cb5f --- /dev/null +++ b/src/common/interfaces/connection-activated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ConnectionActivatedContextActorSource } from './connection-activated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface ConnectionActivatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: ConnectionActivatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface ConnectionActivatedContextActorResponse { + id: string; + source: ConnectionActivatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/connection-activated-context-google-analytics-session.interface.ts b/src/common/interfaces/connection-activated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..d1f86d744 --- /dev/null +++ b/src/common/interfaces/connection-activated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type ConnectionActivatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type ConnectionActivatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/connection-activated-context.interface.ts b/src/common/interfaces/connection-activated-context.interface.ts new file mode 100644 index 000000000..d9868760f --- /dev/null +++ b/src/common/interfaces/connection-activated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionActivatedContextGoogleAnalyticsSession, + ConnectionActivatedContextGoogleAnalyticsSessionResponse, +} from './connection-activated-context-google-analytics-session.interface'; +import type { + ConnectionActivatedContextActor, + ConnectionActivatedContextActorResponse, +} from './connection-activated-context-actor.interface'; + +/** Additional context about the event. */ +export interface ConnectionActivatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: ConnectionActivatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: ConnectionActivatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface ConnectionActivatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: ConnectionActivatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: ConnectionActivatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/connection-activated-data-connection-type.interface.ts b/src/common/interfaces/connection-activated-data-connection-type.interface.ts new file mode 100644 index 000000000..f48e57d37 --- /dev/null +++ b/src/common/interfaces/connection-activated-data-connection-type.interface.ts @@ -0,0 +1,53 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionActivatedDataConnectionType = + | 'ADFSSAML' + | 'AdpOidc' + | 'AppleOAuth' + | 'Auth0Migration' + | 'Auth0SAML' + | 'AzureSAML' + | 'BitbucketOAuth' + | 'CasSAML' + | 'ClassLinkSAML' + | 'CleverOIDC' + | 'CloudflareSAML' + | 'CyberArkSAML' + | 'DiscordOAuth' + | 'DuoSAML' + | 'EntraIdOIDC' + | 'GenericOIDC' + | 'GenericSAML' + | 'GitHubOAuth' + | 'GitLabOAuth' + | 'GoogleOAuth' + | 'GoogleOIDC' + | 'GoogleSAML' + | 'IntuitOAuth' + | 'JumpCloudSAML' + | 'KeycloakSAML' + | 'LastPassSAML' + | 'LinkedInOAuth' + | 'LoginGovOidc' + | 'MagicLink' + | 'MicrosoftOAuth' + | 'MiniOrangeSAML' + | 'NetIqSAML' + | 'OktaOIDC' + | 'OktaSAML' + | 'OneLoginSAML' + | 'OracleSAML' + | 'PingFederateSAML' + | 'PingOneSAML' + | 'RipplingSAML' + | 'SalesforceSAML' + | 'ShibbolethGenericSAML' + | 'ShibbolethSAML' + | 'SimpleSamlPhpSAML' + | 'SalesforceOAuth' + | 'SlackOAuth' + | 'TestIdp' + | 'VercelMarketplaceOAuth' + | 'VercelOAuth' + | 'VMwareSAML' + | 'XeroOAuth'; diff --git a/src/common/interfaces/connection-activated-data-domain.interface.ts b/src/common/interfaces/connection-activated-data-domain.interface.ts new file mode 100644 index 000000000..e355cacfc --- /dev/null +++ b/src/common/interfaces/connection-activated-data-domain.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface ConnectionActivatedDataDomain { + /** Distinguishes the connection domain object. */ + object: 'connection_domain'; + /** Unique identifier of the connection domain. */ + id: string; + /** The domain value. */ + domain: string; +} + +export interface ConnectionActivatedDataDomainResponse { + object: 'connection_domain'; + id: string; + domain: string; +} diff --git a/src/common/interfaces/connection-activated-data-state.interface.ts b/src/common/interfaces/connection-activated-data-state.interface.ts new file mode 100644 index 000000000..1dce360f6 --- /dev/null +++ b/src/common/interfaces/connection-activated-data-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionActivatedDataState = + | 'draft' + | 'active' + | 'validating' + | 'inactive' + | 'deleting'; diff --git a/src/common/interfaces/connection-activated-data-status.interface.ts b/src/common/interfaces/connection-activated-data-status.interface.ts new file mode 100644 index 000000000..f6c459439 --- /dev/null +++ b/src/common/interfaces/connection-activated-data-status.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionActivatedDataStatus = 'linked' | 'unlinked'; diff --git a/src/common/interfaces/connection-activated-data.interface.ts b/src/common/interfaces/connection-activated-data.interface.ts new file mode 100644 index 000000000..bf94e9ae1 --- /dev/null +++ b/src/common/interfaces/connection-activated-data.interface.ts @@ -0,0 +1,49 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionActivatedDataDomain, + ConnectionActivatedDataDomainResponse, +} from './connection-activated-data-domain.interface'; +import type { ConnectionActivatedDataState } from './connection-activated-data-state.interface'; +import type { ConnectionActivatedDataConnectionType } from './connection-activated-data-connection-type.interface'; +import type { ConnectionActivatedDataStatus } from './connection-activated-data-status.interface'; + +/** The event payload. */ +export interface ConnectionActivatedData { + /** Distinguishes the connection object. */ + object: 'connection'; + /** Unique identifier of the connection. */ + id: string; + /** The current state of the connection. */ + state: ConnectionActivatedDataState; + /** The name of the connection. */ + name: string; + /** The type of the connection. */ + connectionType: ConnectionActivatedDataConnectionType; + /** The ID of the organization the connection belongs to. */ + organizationId?: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + /** The external key of the connection. */ + externalKey: string; + /** Deprecated. Use state instead. */ + status: ConnectionActivatedDataStatus; + /** The domains associated with the connection. */ + domains: ConnectionActivatedDataDomain[]; +} + +export interface ConnectionActivatedDataResponse { + object: 'connection'; + id: string; + state: ConnectionActivatedDataState; + name: string; + connection_type: ConnectionActivatedDataConnectionType; + organization_id?: string; + created_at: string; + updated_at: string; + external_key: string; + status: ConnectionActivatedDataStatus; + domains: ConnectionActivatedDataDomainResponse[]; +} diff --git a/src/common/interfaces/connection-activated.interface.ts b/src/common/interfaces/connection-activated.interface.ts new file mode 100644 index 000000000..d8e19e9ca --- /dev/null +++ b/src/common/interfaces/connection-activated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionActivatedData, + ConnectionActivatedDataResponse, +} from './connection-activated-data.interface'; +import type { + ConnectionActivatedContext, + ConnectionActivatedContextResponse, +} from './connection-activated-context.interface'; + +export interface ConnectionActivated { + /** Unique identifier for the event. */ + id: string; + event: 'connection.activated'; + /** The event payload. */ + data: ConnectionActivatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: ConnectionActivatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface ConnectionActivatedResponse { + id: string; + event: 'connection.activated'; + data: ConnectionActivatedDataResponse; + created_at: string; + context?: ConnectionActivatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/connection-deactivated-context-actor-source.interface.ts b/src/common/interfaces/connection-deactivated-context-actor-source.interface.ts new file mode 100644 index 000000000..63d0a233c --- /dev/null +++ b/src/common/interfaces/connection-deactivated-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionDeactivatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/connection-deactivated-context-actor.interface.ts b/src/common/interfaces/connection-deactivated-context-actor.interface.ts new file mode 100644 index 000000000..29501212b --- /dev/null +++ b/src/common/interfaces/connection-deactivated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ConnectionDeactivatedContextActorSource } from './connection-deactivated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface ConnectionDeactivatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: ConnectionDeactivatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface ConnectionDeactivatedContextActorResponse { + id: string; + source: ConnectionDeactivatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/connection-deactivated-context-google-analytics-session.interface.ts b/src/common/interfaces/connection-deactivated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..42007dd52 --- /dev/null +++ b/src/common/interfaces/connection-deactivated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type ConnectionDeactivatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type ConnectionDeactivatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/connection-deactivated-context.interface.ts b/src/common/interfaces/connection-deactivated-context.interface.ts new file mode 100644 index 000000000..0acc59e4a --- /dev/null +++ b/src/common/interfaces/connection-deactivated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionDeactivatedContextGoogleAnalyticsSession, + ConnectionDeactivatedContextGoogleAnalyticsSessionResponse, +} from './connection-deactivated-context-google-analytics-session.interface'; +import type { + ConnectionDeactivatedContextActor, + ConnectionDeactivatedContextActorResponse, +} from './connection-deactivated-context-actor.interface'; + +/** Additional context about the event. */ +export interface ConnectionDeactivatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: ConnectionDeactivatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: ConnectionDeactivatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface ConnectionDeactivatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: ConnectionDeactivatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: ConnectionDeactivatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/connection-deactivated-data-connection-type.interface.ts b/src/common/interfaces/connection-deactivated-data-connection-type.interface.ts new file mode 100644 index 000000000..95fc20ef7 --- /dev/null +++ b/src/common/interfaces/connection-deactivated-data-connection-type.interface.ts @@ -0,0 +1,53 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionDeactivatedDataConnectionType = + | 'ADFSSAML' + | 'AdpOidc' + | 'AppleOAuth' + | 'Auth0Migration' + | 'Auth0SAML' + | 'AzureSAML' + | 'BitbucketOAuth' + | 'CasSAML' + | 'ClassLinkSAML' + | 'CleverOIDC' + | 'CloudflareSAML' + | 'CyberArkSAML' + | 'DiscordOAuth' + | 'DuoSAML' + | 'EntraIdOIDC' + | 'GenericOIDC' + | 'GenericSAML' + | 'GitHubOAuth' + | 'GitLabOAuth' + | 'GoogleOAuth' + | 'GoogleOIDC' + | 'GoogleSAML' + | 'IntuitOAuth' + | 'JumpCloudSAML' + | 'KeycloakSAML' + | 'LastPassSAML' + | 'LinkedInOAuth' + | 'LoginGovOidc' + | 'MagicLink' + | 'MicrosoftOAuth' + | 'MiniOrangeSAML' + | 'NetIqSAML' + | 'OktaOIDC' + | 'OktaSAML' + | 'OneLoginSAML' + | 'OracleSAML' + | 'PingFederateSAML' + | 'PingOneSAML' + | 'RipplingSAML' + | 'SalesforceSAML' + | 'ShibbolethGenericSAML' + | 'ShibbolethSAML' + | 'SimpleSamlPhpSAML' + | 'SalesforceOAuth' + | 'SlackOAuth' + | 'TestIdp' + | 'VercelMarketplaceOAuth' + | 'VercelOAuth' + | 'VMwareSAML' + | 'XeroOAuth'; diff --git a/src/common/interfaces/connection-deactivated-data-domain.interface.ts b/src/common/interfaces/connection-deactivated-data-domain.interface.ts new file mode 100644 index 000000000..5ebae1d22 --- /dev/null +++ b/src/common/interfaces/connection-deactivated-data-domain.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionActivatedDataDomain, + ConnectionActivatedDataDomainResponse, +} from './connection-activated-data-domain.interface'; + +export type ConnectionDeactivatedDataDomain = ConnectionActivatedDataDomain; +export type ConnectionDeactivatedDataDomainResponse = + ConnectionActivatedDataDomainResponse; diff --git a/src/common/interfaces/connection-deactivated-data-state.interface.ts b/src/common/interfaces/connection-deactivated-data-state.interface.ts new file mode 100644 index 000000000..b361a5c00 --- /dev/null +++ b/src/common/interfaces/connection-deactivated-data-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionDeactivatedDataState = + | 'draft' + | 'active' + | 'validating' + | 'inactive' + | 'deleting'; diff --git a/src/common/interfaces/connection-deactivated-data-status.interface.ts b/src/common/interfaces/connection-deactivated-data-status.interface.ts new file mode 100644 index 000000000..f68ee565f --- /dev/null +++ b/src/common/interfaces/connection-deactivated-data-status.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionDeactivatedDataStatus = 'linked' | 'unlinked'; diff --git a/src/common/interfaces/connection-deactivated-data.interface.ts b/src/common/interfaces/connection-deactivated-data.interface.ts new file mode 100644 index 000000000..2f8933952 --- /dev/null +++ b/src/common/interfaces/connection-deactivated-data.interface.ts @@ -0,0 +1,49 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionDeactivatedDataDomain, + ConnectionDeactivatedDataDomainResponse, +} from './connection-deactivated-data-domain.interface'; +import type { ConnectionDeactivatedDataState } from './connection-deactivated-data-state.interface'; +import type { ConnectionDeactivatedDataConnectionType } from './connection-deactivated-data-connection-type.interface'; +import type { ConnectionDeactivatedDataStatus } from './connection-deactivated-data-status.interface'; + +/** The event payload. */ +export interface ConnectionDeactivatedData { + /** Distinguishes the connection object. */ + object: 'connection'; + /** Unique identifier of the connection. */ + id: string; + /** The current state of the connection. */ + state: ConnectionDeactivatedDataState; + /** The name of the connection. */ + name: string; + /** The type of the connection. */ + connectionType: ConnectionDeactivatedDataConnectionType; + /** The ID of the organization the connection belongs to. */ + organizationId?: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + /** The external key of the connection. */ + externalKey: string; + /** Deprecated. Use state instead. */ + status: ConnectionDeactivatedDataStatus; + /** The domains associated with the connection. */ + domains: ConnectionDeactivatedDataDomain[]; +} + +export interface ConnectionDeactivatedDataResponse { + object: 'connection'; + id: string; + state: ConnectionDeactivatedDataState; + name: string; + connection_type: ConnectionDeactivatedDataConnectionType; + organization_id?: string; + created_at: string; + updated_at: string; + external_key: string; + status: ConnectionDeactivatedDataStatus; + domains: ConnectionDeactivatedDataDomainResponse[]; +} diff --git a/src/common/interfaces/connection-deactivated.interface.ts b/src/common/interfaces/connection-deactivated.interface.ts new file mode 100644 index 000000000..45152d5ea --- /dev/null +++ b/src/common/interfaces/connection-deactivated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionDeactivatedData, + ConnectionDeactivatedDataResponse, +} from './connection-deactivated-data.interface'; +import type { + ConnectionDeactivatedContext, + ConnectionDeactivatedContextResponse, +} from './connection-deactivated-context.interface'; + +export interface ConnectionDeactivated { + /** Unique identifier for the event. */ + id: string; + event: 'connection.deactivated'; + /** The event payload. */ + data: ConnectionDeactivatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: ConnectionDeactivatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface ConnectionDeactivatedResponse { + id: string; + event: 'connection.deactivated'; + data: ConnectionDeactivatedDataResponse; + created_at: string; + context?: ConnectionDeactivatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/connection-deleted-context-actor-source.interface.ts b/src/common/interfaces/connection-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..7e0e352d8 --- /dev/null +++ b/src/common/interfaces/connection-deleted-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionDeletedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/connection-deleted-context-actor.interface.ts b/src/common/interfaces/connection-deleted-context-actor.interface.ts new file mode 100644 index 000000000..ef5c727fe --- /dev/null +++ b/src/common/interfaces/connection-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ConnectionDeletedContextActorSource } from './connection-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface ConnectionDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: ConnectionDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface ConnectionDeletedContextActorResponse { + id: string; + source: ConnectionDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/connection-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/connection-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..8ad731aa8 --- /dev/null +++ b/src/common/interfaces/connection-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type ConnectionDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type ConnectionDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/connection-deleted-context.interface.ts b/src/common/interfaces/connection-deleted-context.interface.ts new file mode 100644 index 000000000..2a47d9651 --- /dev/null +++ b/src/common/interfaces/connection-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionDeletedContextGoogleAnalyticsSession, + ConnectionDeletedContextGoogleAnalyticsSessionResponse, +} from './connection-deleted-context-google-analytics-session.interface'; +import type { + ConnectionDeletedContextActor, + ConnectionDeletedContextActorResponse, +} from './connection-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface ConnectionDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: ConnectionDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: ConnectionDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface ConnectionDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: ConnectionDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: ConnectionDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/connection-deleted-data-connection-type.interface.ts b/src/common/interfaces/connection-deleted-data-connection-type.interface.ts new file mode 100644 index 000000000..a94778b30 --- /dev/null +++ b/src/common/interfaces/connection-deleted-data-connection-type.interface.ts @@ -0,0 +1,53 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionDeletedDataConnectionType = + | 'ADFSSAML' + | 'AdpOidc' + | 'AppleOAuth' + | 'Auth0Migration' + | 'Auth0SAML' + | 'AzureSAML' + | 'BitbucketOAuth' + | 'CasSAML' + | 'ClassLinkSAML' + | 'CleverOIDC' + | 'CloudflareSAML' + | 'CyberArkSAML' + | 'DiscordOAuth' + | 'DuoSAML' + | 'EntraIdOIDC' + | 'GenericOIDC' + | 'GenericSAML' + | 'GitHubOAuth' + | 'GitLabOAuth' + | 'GoogleOAuth' + | 'GoogleOIDC' + | 'GoogleSAML' + | 'IntuitOAuth' + | 'JumpCloudSAML' + | 'KeycloakSAML' + | 'LastPassSAML' + | 'LinkedInOAuth' + | 'LoginGovOidc' + | 'MagicLink' + | 'MicrosoftOAuth' + | 'MiniOrangeSAML' + | 'NetIqSAML' + | 'OktaOIDC' + | 'OktaSAML' + | 'OneLoginSAML' + | 'OracleSAML' + | 'PingFederateSAML' + | 'PingOneSAML' + | 'RipplingSAML' + | 'SalesforceSAML' + | 'ShibbolethGenericSAML' + | 'ShibbolethSAML' + | 'SimpleSamlPhpSAML' + | 'SalesforceOAuth' + | 'SlackOAuth' + | 'TestIdp' + | 'VercelMarketplaceOAuth' + | 'VercelOAuth' + | 'VMwareSAML' + | 'XeroOAuth'; diff --git a/src/common/interfaces/connection-deleted-data-state.interface.ts b/src/common/interfaces/connection-deleted-data-state.interface.ts new file mode 100644 index 000000000..57f487636 --- /dev/null +++ b/src/common/interfaces/connection-deleted-data-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionDeletedDataState = + | 'draft' + | 'active' + | 'validating' + | 'inactive' + | 'deleting'; diff --git a/src/common/interfaces/connection-deleted-data.interface.ts b/src/common/interfaces/connection-deleted-data.interface.ts new file mode 100644 index 000000000..2d10a539d --- /dev/null +++ b/src/common/interfaces/connection-deleted-data.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ConnectionDeletedDataState } from './connection-deleted-data-state.interface'; +import type { ConnectionDeletedDataConnectionType } from './connection-deleted-data-connection-type.interface'; + +/** The event payload. */ +export interface ConnectionDeletedData { + /** Distinguishes the connection object. */ + object: 'connection'; + /** Unique identifier of the connection. */ + id: string; + /** The current state of the connection. */ + state: ConnectionDeletedDataState; + /** The name of the connection. */ + name: string; + /** The type of the connection. */ + connectionType: ConnectionDeletedDataConnectionType; + /** The ID of the organization the connection belongs to. */ + organizationId?: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface ConnectionDeletedDataResponse { + object: 'connection'; + id: string; + state: ConnectionDeletedDataState; + name: string; + connection_type: ConnectionDeletedDataConnectionType; + organization_id?: string; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/connection-deleted.interface.ts b/src/common/interfaces/connection-deleted.interface.ts new file mode 100644 index 000000000..ba900468a --- /dev/null +++ b/src/common/interfaces/connection-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionDeletedData, + ConnectionDeletedDataResponse, +} from './connection-deleted-data.interface'; +import type { + ConnectionDeletedContext, + ConnectionDeletedContextResponse, +} from './connection-deleted-context.interface'; + +export interface ConnectionDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'connection.deleted'; + /** The event payload. */ + data: ConnectionDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: ConnectionDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface ConnectionDeletedResponse { + id: string; + event: 'connection.deleted'; + data: ConnectionDeletedDataResponse; + created_at: string; + context?: ConnectionDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewal-required-context-actor-source.interface.ts b/src/common/interfaces/connection-saml-certificate-renewal-required-context-actor-source.interface.ts new file mode 100644 index 000000000..7104c4744 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewal-required-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionSAMLCertificateRenewalRequiredContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/connection-saml-certificate-renewal-required-context-actor.interface.ts b/src/common/interfaces/connection-saml-certificate-renewal-required-context-actor.interface.ts new file mode 100644 index 000000000..73efa0636 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewal-required-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ConnectionSAMLCertificateRenewalRequiredContextActorSource } from './connection-saml-certificate-renewal-required-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface ConnectionSAMLCertificateRenewalRequiredContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: ConnectionSAMLCertificateRenewalRequiredContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface ConnectionSAMLCertificateRenewalRequiredContextActorResponse { + id: string; + source: ConnectionSAMLCertificateRenewalRequiredContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewal-required-context-google-analytics-session.interface.ts b/src/common/interfaces/connection-saml-certificate-renewal-required-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..4038efe3e --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewal-required-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type ConnectionSAMLCertificateRenewalRequiredContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type ConnectionSAMLCertificateRenewalRequiredContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/connection-saml-certificate-renewal-required-context.interface.ts b/src/common/interfaces/connection-saml-certificate-renewal-required-context.interface.ts new file mode 100644 index 000000000..55f157ec5 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewal-required-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionSAMLCertificateRenewalRequiredContextGoogleAnalyticsSession, + ConnectionSAMLCertificateRenewalRequiredContextGoogleAnalyticsSessionResponse, +} from './connection-saml-certificate-renewal-required-context-google-analytics-session.interface'; +import type { + ConnectionSAMLCertificateRenewalRequiredContextActor, + ConnectionSAMLCertificateRenewalRequiredContextActorResponse, +} from './connection-saml-certificate-renewal-required-context-actor.interface'; + +/** Additional context about the event. */ +export interface ConnectionSAMLCertificateRenewalRequiredContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: ConnectionSAMLCertificateRenewalRequiredContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: ConnectionSAMLCertificateRenewalRequiredContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface ConnectionSAMLCertificateRenewalRequiredContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: ConnectionSAMLCertificateRenewalRequiredContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: ConnectionSAMLCertificateRenewalRequiredContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewal-required-data-certificate-certificate-type.interface.ts b/src/common/interfaces/connection-saml-certificate-renewal-required-data-certificate-certificate-type.interface.ts new file mode 100644 index 000000000..0f140c552 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewal-required-data-certificate-certificate-type.interface.ts @@ -0,0 +1,4 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionSAMLCertificateRenewalRequiredDataCertificateCertificateType = + 'ResponseSigning' | 'RequestSigning' | 'ResponseEncryption'; diff --git a/src/common/interfaces/connection-saml-certificate-renewal-required-data-certificate.interface.ts b/src/common/interfaces/connection-saml-certificate-renewal-required-data-certificate.interface.ts new file mode 100644 index 000000000..49c5c2a2a --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewal-required-data-certificate.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ConnectionSAMLCertificateRenewalRequiredDataCertificateCertificateType } from './connection-saml-certificate-renewal-required-data-certificate-certificate-type.interface'; + +/** The SAML certificate details. */ +export interface ConnectionSAMLCertificateRenewalRequiredDataCertificate { + /** The type of the SAML certificate. */ + certificateType: ConnectionSAMLCertificateRenewalRequiredDataCertificateCertificateType; + /** An ISO 8601 timestamp. */ + expiryDate: string; + /** Whether the certificate has already expired. */ + isExpired: boolean; +} + +export interface ConnectionSAMLCertificateRenewalRequiredDataCertificateResponse { + certificate_type: ConnectionSAMLCertificateRenewalRequiredDataCertificateCertificateType; + expiry_date: string; + is_expired: boolean; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewal-required-data-connection.interface.ts b/src/common/interfaces/connection-saml-certificate-renewal-required-data-connection.interface.ts new file mode 100644 index 000000000..1470bcc23 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewal-required-data-connection.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The connection with the expiring certificate. */ +export interface ConnectionSAMLCertificateRenewalRequiredDataConnection { + /** Unique identifier of the connection. */ + id: string; + /** The ID of the organization the connection belongs to. */ + organizationId?: string; +} + +export interface ConnectionSAMLCertificateRenewalRequiredDataConnectionResponse { + id: string; + organization_id?: string; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewal-required-data.interface.ts b/src/common/interfaces/connection-saml-certificate-renewal-required-data.interface.ts new file mode 100644 index 000000000..869231b75 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewal-required-data.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionSAMLCertificateRenewalRequiredDataConnection, + ConnectionSAMLCertificateRenewalRequiredDataConnectionResponse, +} from './connection-saml-certificate-renewal-required-data-connection.interface'; +import type { + ConnectionSAMLCertificateRenewalRequiredDataCertificate, + ConnectionSAMLCertificateRenewalRequiredDataCertificateResponse, +} from './connection-saml-certificate-renewal-required-data-certificate.interface'; + +/** The event payload. */ +export interface ConnectionSAMLCertificateRenewalRequiredData { + /** The connection with the expiring certificate. */ + connection: ConnectionSAMLCertificateRenewalRequiredDataConnection; + /** The SAML certificate details. */ + certificate: ConnectionSAMLCertificateRenewalRequiredDataCertificate; + /** The number of days until the certificate expires. */ + daysUntilExpiry: number; +} + +export interface ConnectionSAMLCertificateRenewalRequiredDataResponse { + connection: ConnectionSAMLCertificateRenewalRequiredDataConnectionResponse; + certificate: ConnectionSAMLCertificateRenewalRequiredDataCertificateResponse; + days_until_expiry: number; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewal-required.interface.ts b/src/common/interfaces/connection-saml-certificate-renewal-required.interface.ts new file mode 100644 index 000000000..51071be97 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewal-required.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionSAMLCertificateRenewalRequiredData, + ConnectionSAMLCertificateRenewalRequiredDataResponse, +} from './connection-saml-certificate-renewal-required-data.interface'; +import type { + ConnectionSAMLCertificateRenewalRequiredContext, + ConnectionSAMLCertificateRenewalRequiredContextResponse, +} from './connection-saml-certificate-renewal-required-context.interface'; + +export interface ConnectionSAMLCertificateRenewalRequired { + /** Unique identifier for the event. */ + id: string; + event: 'connection.saml_certificate_renewal_required'; + /** The event payload. */ + data: ConnectionSAMLCertificateRenewalRequiredData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: ConnectionSAMLCertificateRenewalRequiredContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface ConnectionSAMLCertificateRenewalRequiredResponse { + id: string; + event: 'connection.saml_certificate_renewal_required'; + data: ConnectionSAMLCertificateRenewalRequiredDataResponse; + created_at: string; + context?: ConnectionSAMLCertificateRenewalRequiredContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewed-context-actor-source.interface.ts b/src/common/interfaces/connection-saml-certificate-renewed-context-actor-source.interface.ts new file mode 100644 index 000000000..be4fc85a4 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionSAMLCertificateRenewedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/connection-saml-certificate-renewed-context-actor.interface.ts b/src/common/interfaces/connection-saml-certificate-renewed-context-actor.interface.ts new file mode 100644 index 000000000..1aa479293 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ConnectionSAMLCertificateRenewedContextActorSource } from './connection-saml-certificate-renewed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface ConnectionSAMLCertificateRenewedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: ConnectionSAMLCertificateRenewedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface ConnectionSAMLCertificateRenewedContextActorResponse { + id: string; + source: ConnectionSAMLCertificateRenewedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewed-context-google-analytics-session.interface.ts b/src/common/interfaces/connection-saml-certificate-renewed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..4108b3b1a --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type ConnectionSAMLCertificateRenewedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type ConnectionSAMLCertificateRenewedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/connection-saml-certificate-renewed-context.interface.ts b/src/common/interfaces/connection-saml-certificate-renewed-context.interface.ts new file mode 100644 index 000000000..0a70ed875 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionSAMLCertificateRenewedContextGoogleAnalyticsSession, + ConnectionSAMLCertificateRenewedContextGoogleAnalyticsSessionResponse, +} from './connection-saml-certificate-renewed-context-google-analytics-session.interface'; +import type { + ConnectionSAMLCertificateRenewedContextActor, + ConnectionSAMLCertificateRenewedContextActorResponse, +} from './connection-saml-certificate-renewed-context-actor.interface'; + +/** Additional context about the event. */ +export interface ConnectionSAMLCertificateRenewedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: ConnectionSAMLCertificateRenewedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: ConnectionSAMLCertificateRenewedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface ConnectionSAMLCertificateRenewedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: ConnectionSAMLCertificateRenewedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: ConnectionSAMLCertificateRenewedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewed-data-certificate-certificate-type.interface.ts b/src/common/interfaces/connection-saml-certificate-renewed-data-certificate-certificate-type.interface.ts new file mode 100644 index 000000000..1703f4120 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewed-data-certificate-certificate-type.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionSAMLCertificateRenewedDataCertificateCertificateType = + | 'ResponseSigning' + | 'RequestSigning' + | 'ResponseEncryption'; diff --git a/src/common/interfaces/connection-saml-certificate-renewed-data-certificate.interface.ts b/src/common/interfaces/connection-saml-certificate-renewed-data-certificate.interface.ts new file mode 100644 index 000000000..95b287ec5 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewed-data-certificate.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ConnectionSAMLCertificateRenewedDataCertificateCertificateType } from './connection-saml-certificate-renewed-data-certificate-certificate-type.interface'; + +/** The renewed SAML certificate details. */ +export interface ConnectionSAMLCertificateRenewedDataCertificate { + /** The type of the SAML certificate. */ + certificateType: ConnectionSAMLCertificateRenewedDataCertificateCertificateType; + /** An ISO 8601 timestamp. */ + expiryDate: string; +} + +export interface ConnectionSAMLCertificateRenewedDataCertificateResponse { + certificate_type: ConnectionSAMLCertificateRenewedDataCertificateCertificateType; + expiry_date: string; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewed-data-connection.interface.ts b/src/common/interfaces/connection-saml-certificate-renewed-data-connection.interface.ts new file mode 100644 index 000000000..43e0c8122 --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewed-data-connection.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionSAMLCertificateRenewalRequiredDataConnection, + ConnectionSAMLCertificateRenewalRequiredDataConnectionResponse, +} from './connection-saml-certificate-renewal-required-data-connection.interface'; + +export type ConnectionSAMLCertificateRenewedDataConnection = + ConnectionSAMLCertificateRenewalRequiredDataConnection; +export type ConnectionSAMLCertificateRenewedDataConnectionResponse = + ConnectionSAMLCertificateRenewalRequiredDataConnectionResponse; diff --git a/src/common/interfaces/connection-saml-certificate-renewed-data.interface.ts b/src/common/interfaces/connection-saml-certificate-renewed-data.interface.ts new file mode 100644 index 000000000..70290c5bf --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewed-data.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionSAMLCertificateRenewedDataConnection, + ConnectionSAMLCertificateRenewedDataConnectionResponse, +} from './connection-saml-certificate-renewed-data-connection.interface'; +import type { + ConnectionSAMLCertificateRenewedDataCertificate, + ConnectionSAMLCertificateRenewedDataCertificateResponse, +} from './connection-saml-certificate-renewed-data-certificate.interface'; + +/** The event payload. */ +export interface ConnectionSAMLCertificateRenewedData { + /** The connection with the renewed certificate. */ + connection: ConnectionSAMLCertificateRenewedDataConnection; + /** The renewed SAML certificate details. */ + certificate: ConnectionSAMLCertificateRenewedDataCertificate; + /** An ISO 8601 timestamp. */ + renewedAt: string; +} + +export interface ConnectionSAMLCertificateRenewedDataResponse { + connection: ConnectionSAMLCertificateRenewedDataConnectionResponse; + certificate: ConnectionSAMLCertificateRenewedDataCertificateResponse; + renewed_at: string; +} diff --git a/src/common/interfaces/connection-saml-certificate-renewed.interface.ts b/src/common/interfaces/connection-saml-certificate-renewed.interface.ts new file mode 100644 index 000000000..ba6cde25b --- /dev/null +++ b/src/common/interfaces/connection-saml-certificate-renewed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionSAMLCertificateRenewedData, + ConnectionSAMLCertificateRenewedDataResponse, +} from './connection-saml-certificate-renewed-data.interface'; +import type { + ConnectionSAMLCertificateRenewedContext, + ConnectionSAMLCertificateRenewedContextResponse, +} from './connection-saml-certificate-renewed-context.interface'; + +export interface ConnectionSAMLCertificateRenewed { + /** Unique identifier for the event. */ + id: string; + event: 'connection.saml_certificate_renewed'; + /** The event payload. */ + data: ConnectionSAMLCertificateRenewedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: ConnectionSAMLCertificateRenewedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface ConnectionSAMLCertificateRenewedResponse { + id: string; + event: 'connection.saml_certificate_renewed'; + data: ConnectionSAMLCertificateRenewedDataResponse; + created_at: string; + context?: ConnectionSAMLCertificateRenewedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/connection-state.interface.ts b/src/common/interfaces/connection-state.interface.ts new file mode 100644 index 000000000..831f64617 --- /dev/null +++ b/src/common/interfaces/connection-state.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionState = + | 'requires_type' + | 'draft' + | 'active' + | 'validating' + | 'inactive' + | 'deleting'; diff --git a/src/common/interfaces/connection-status.interface.ts b/src/common/interfaces/connection-status.interface.ts new file mode 100644 index 000000000..09089c591 --- /dev/null +++ b/src/common/interfaces/connection-status.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionStatus = 'linked' | 'unlinked'; diff --git a/src/common/interfaces/connection-type.interface.ts b/src/common/interfaces/connection-type.interface.ts new file mode 100644 index 000000000..ea59e0a65 --- /dev/null +++ b/src/common/interfaces/connection-type.interface.ts @@ -0,0 +1,55 @@ +// This file is auto-generated by oagen. Do not edit. + +export enum ConnectionType { + ADFSSAML = 'ADFSSAML', + AdpOidc = 'AdpOidc', + AppleOAuth = 'AppleOAuth', + Auth0SAML = 'Auth0SAML', + AzureSAML = 'AzureSAML', + CasSAML = 'CasSAML', + ClassLinkSAML = 'ClassLinkSAML', + CloudflareSAML = 'CloudflareSAML', + CyberArkSAML = 'CyberArkSAML', + DuoSAML = 'DuoSAML', + GenericOIDC = 'GenericOIDC', + GenericSAML = 'GenericSAML', + GitHubOAuth = 'GitHubOAuth', + GoogleOAuth = 'GoogleOAuth', + GoogleSAML = 'GoogleSAML', + JumpCloudSAML = 'JumpCloudSAML', + KeycloakSAML = 'KeycloakSAML', + LastPassSAML = 'LastPassSAML', + LoginGovOidc = 'LoginGovOidc', + MagicLink = 'MagicLink', + MicrosoftOAuth = 'MicrosoftOAuth', + MiniOrangeSAML = 'MiniOrangeSAML', + NetIqSAML = 'NetIqSAML', + OktaSAML = 'OktaSAML', + OneLoginSAML = 'OneLoginSAML', + OracleSAML = 'OracleSAML', + PingFederateSAML = 'PingFederateSAML', + PingOneSAML = 'PingOneSAML', + RipplingSAML = 'RipplingSAML', + SalesforceOAuth = 'SalesforceOAuth', + SalesforceSAML = 'SalesforceSAML', + ShibbolethGenericSAML = 'ShibbolethGenericSAML', + ShibbolethSAML = 'ShibbolethSAML', + SimpleSamlPhpSAML = 'SimpleSamlPhpSAML', + VMwareSAML = 'VMwareSAML', + Pending = 'Pending', + Auth0Migration = 'Auth0Migration', + BitbucketOAuth = 'BitbucketOAuth', + CleverOidc = 'CleverOIDC', + DiscordOAuth = 'DiscordOAuth', + EntraIdOidc = 'EntraIdOIDC', + GitLabOAuth = 'GitLabOAuth', + GoogleOidc = 'GoogleOIDC', + IntuitOAuth = 'IntuitOAuth', + LinkedInOAuth = 'LinkedInOAuth', + OktaOidc = 'OktaOIDC', + SlackOAuth = 'SlackOAuth', + TestIdp = 'TestIdp', + VercelMarketplaceOAuth = 'VercelMarketplaceOAuth', + VercelOAuth = 'VercelOAuth', + XeroOAuth = 'XeroOAuth', +} diff --git a/src/common/interfaces/create-user-invite-options-locale.interface.ts b/src/common/interfaces/create-user-invite-options-locale.interface.ts new file mode 100644 index 000000000..da67c03d6 --- /dev/null +++ b/src/common/interfaces/create-user-invite-options-locale.interface.ts @@ -0,0 +1,93 @@ +// This file is auto-generated by oagen. Do not edit. + +export type CreateUserInviteOptionsLocale = + | 'af' + | 'am' + | 'ar' + | 'bg' + | 'bn' + | 'bs' + | 'ca' + | 'cs' + | 'da' + | 'de' + | 'de-DE' + | 'el' + | 'en' + | 'en-AU' + | 'en-CA' + | 'en-GB' + | 'en-US' + | 'es' + | 'es-419' + | 'es-ES' + | 'es-US' + | 'et' + | 'fa' + | 'fi' + | 'fil' + | 'fr' + | 'fr-BE' + | 'fr-CA' + | 'fr-FR' + | 'fy' + | 'gl' + | 'gu' + | 'ha' + | 'he' + | 'hi' + | 'hr' + | 'hu' + | 'hy' + | 'id' + | 'is' + | 'it' + | 'it-IT' + | 'ja' + | 'jv' + | 'ka' + | 'kk' + | 'km' + | 'kn' + | 'ko' + | 'lt' + | 'lv' + | 'mk' + | 'ml' + | 'mn' + | 'mr' + | 'ms' + | 'my' + | 'nb' + | 'ne' + | 'nl' + | 'nl-BE' + | 'nl-NL' + | 'nn' + | 'no' + | 'pa' + | 'pl' + | 'pt' + | 'pt-BR' + | 'pt-PT' + | 'ro' + | 'ru' + | 'sk' + | 'sl' + | 'sq' + | 'sr' + | 'sv' + | 'sw' + | 'ta' + | 'te' + | 'th' + | 'tr' + | 'uk' + | 'ur' + | 'uz' + | 'vi' + | 'zh' + | 'zh-CN' + | 'zh-HK' + | 'zh-TW' + | 'zu'; diff --git a/src/common/interfaces/create-user-password-hash-type.interface.ts b/src/common/interfaces/create-user-password-hash-type.interface.ts new file mode 100644 index 000000000..9ac4a4b79 --- /dev/null +++ b/src/common/interfaces/create-user-password-hash-type.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +export type CreateUserPasswordHashType = + | 'bcrypt' + | 'firebase-scrypt' + | 'ssha' + | 'scrypt' + | 'pbkdf2' + | 'argon2'; diff --git a/src/common/interfaces/data-integrations-list-response-data-connected-account-state.interface.ts b/src/common/interfaces/data-integrations-list-response-data-connected-account-state.interface.ts new file mode 100644 index 000000000..8d564c281 --- /dev/null +++ b/src/common/interfaces/data-integrations-list-response-data-connected-account-state.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DataIntegrationsListResponseDataConnectedAccountState = + | 'connected' + | 'needs_reauthorization' + | 'disconnected'; diff --git a/src/common/interfaces/data-integrations-list-response-data-ownership.interface.ts b/src/common/interfaces/data-integrations-list-response-data-ownership.interface.ts new file mode 100644 index 000000000..73fa5f897 --- /dev/null +++ b/src/common/interfaces/data-integrations-list-response-data-ownership.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DataIntegrationsListResponseDataOwnership = + | 'userland_user' + | 'organization'; diff --git a/src/common/interfaces/directory-state.interface.ts b/src/common/interfaces/directory-state.interface.ts new file mode 100644 index 000000000..7cc94babd --- /dev/null +++ b/src/common/interfaces/directory-state.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DirectoryState = + | 'requires_type' + | 'linked' + | 'validating' + | 'invalid_credentials' + | 'unlinked' + | 'deleting'; diff --git a/src/common/interfaces/directory-type.interface.ts b/src/common/interfaces/directory-type.interface.ts new file mode 100644 index 000000000..287598a24 --- /dev/null +++ b/src/common/interfaces/directory-type.interface.ts @@ -0,0 +1,27 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DirectoryType = + | 'pending' + | 'azure scim v2.0' + | 'bamboohr' + | 'breathe hr' + | 'cezanne hr' + | 'cyberark scim v2.0' + | 'fourth hr' + | 'generic scim v2.0' + | 'gsuite directory' + | 'hibob' + | 'sailpoint scim v2.0' + | 'jump cloud scim v2.0' + | 'okta scim v2.0' + | 'onelogin scim v2.0' + | 'people hr' + | 'personio' + | 'pingfederate scim v2.0' + | 'rippling scim v2.0' + | 's3' + | 'sftp' + | 'sftp workday' + | 'workday' + | 'gusto' + | 'rippling'; diff --git a/src/common/interfaces/directory-user-email.interface.ts b/src/common/interfaces/directory-user-email.interface.ts new file mode 100644 index 000000000..85740f296 --- /dev/null +++ b/src/common/interfaces/directory-user-email.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserUpdatedDataEmail, + DsyncUserUpdatedDataEmailResponse, +} from './dsync-user-updated-data-email.interface'; + +export type DirectoryUserEmail = DsyncUserUpdatedDataEmail; +export type DirectoryUserEmailResponse = DsyncUserUpdatedDataEmailResponse; diff --git a/src/common/interfaces/directory-user-state.interface.ts b/src/common/interfaces/directory-user-state.interface.ts new file mode 100644 index 000000000..bff177c07 --- /dev/null +++ b/src/common/interfaces/directory-user-state.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DirectoryUserState = 'active' | 'suspended' | 'inactive'; diff --git a/src/common/interfaces/directory-user-with-groups-state.interface.ts b/src/common/interfaces/directory-user-with-groups-state.interface.ts new file mode 100644 index 000000000..383ea33f5 --- /dev/null +++ b/src/common/interfaces/directory-user-with-groups-state.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DirectoryUserWithGroupsState = 'active' | 'suspended' | 'inactive'; diff --git a/src/common/interfaces/directory-user.interface.ts b/src/common/interfaces/directory-user.interface.ts new file mode 100644 index 000000000..a50ccfc8b --- /dev/null +++ b/src/common/interfaces/directory-user.interface.ts @@ -0,0 +1,81 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryUserEmail, + DirectoryUserEmailResponse, +} from './directory-user-email.interface'; +import type { + SlimRole, + SlimRoleResponse, +} from '../../authorization/interfaces/slim-role.interface'; + +export interface DirectoryUser { + /** Distinguishes the Directory User object. */ + object: 'directory_user'; + /** Unique identifier for the Directory User. */ + id: string; + /** The identifier of the Directory the Directory User belongs to. */ + directoryId: string; + /** The identifier for the Organization in which the Directory resides. */ + organizationId: string | null; + /** Unique identifier for the user, assigned by the Directory Provider. Different Directory Providers use different ID formats. */ + idpId: string; + /** The email address of the user. */ + email: string | null; + /** The first name of the user. */ + firstName?: string | null; + /** The last name of the user. */ + lastName?: string | null; + /** + * A list of email addresses for the user. + * @deprecated + */ + emails?: DirectoryUserEmail[]; + /** + * The job title of the user. + * @deprecated + */ + jobTitle?: string | null; + /** + * The username of the user. + * @deprecated + */ + username?: string | null; + /** The state of the user. */ + state: 'active' | 'inactive'; + /** + * The raw attributes received from the directory provider. + * @deprecated + */ + rawAttributes: Record; + /** An object containing the custom attribute mapping for the Directory Provider. */ + customAttributes: Record; + role?: SlimRole; + /** All roles assigned to the user. */ + roles?: SlimRole[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface DirectoryUserResponse { + object: 'directory_user'; + id: string; + directory_id: string; + organization_id: string | null; + idp_id: string; + email: string | null; + first_name?: string | null; + last_name?: string | null; + emails?: DirectoryUserEmailResponse[]; + job_title?: string | null; + username?: string | null; + state: 'active' | 'inactive'; + raw_attributes: Record; + custom_attributes: Record; + role?: SlimRoleResponse; + roles?: SlimRoleResponse[]; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/dsync-activated-context-actor-source.interface.ts b/src/common/interfaces/dsync-activated-context-actor-source.interface.ts new file mode 100644 index 000000000..c16a196cc --- /dev/null +++ b/src/common/interfaces/dsync-activated-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncActivatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/dsync-activated-context-actor.interface.ts b/src/common/interfaces/dsync-activated-context-actor.interface.ts new file mode 100644 index 000000000..1056d1ff5 --- /dev/null +++ b/src/common/interfaces/dsync-activated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncActivatedContextActorSource } from './dsync-activated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncActivatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncActivatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncActivatedContextActorResponse { + id: string; + source: DsyncActivatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-activated-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-activated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..70916bad3 --- /dev/null +++ b/src/common/interfaces/dsync-activated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncActivatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncActivatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-activated-context.interface.ts b/src/common/interfaces/dsync-activated-context.interface.ts new file mode 100644 index 000000000..0d6609c16 --- /dev/null +++ b/src/common/interfaces/dsync-activated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncActivatedContextGoogleAnalyticsSession, + DsyncActivatedContextGoogleAnalyticsSessionResponse, +} from './dsync-activated-context-google-analytics-session.interface'; +import type { + DsyncActivatedContextActor, + DsyncActivatedContextActorResponse, +} from './dsync-activated-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncActivatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncActivatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncActivatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncActivatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncActivatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncActivatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-activated-data-domain.interface.ts b/src/common/interfaces/dsync-activated-data-domain.interface.ts new file mode 100644 index 000000000..10bf05f8e --- /dev/null +++ b/src/common/interfaces/dsync-activated-data-domain.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface DsyncActivatedDataDomain { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** The domain value. */ + domain: string; +} + +export interface DsyncActivatedDataDomainResponse { + object: 'organization_domain'; + id: string; + domain: string; +} diff --git a/src/common/interfaces/dsync-activated-data-state.interface.ts b/src/common/interfaces/dsync-activated-data-state.interface.ts new file mode 100644 index 000000000..30515ab2f --- /dev/null +++ b/src/common/interfaces/dsync-activated-data-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncActivatedDataState = + | 'active' + | 'validating' + | 'invalid_credentials' + | 'inactive' + | 'deleting'; diff --git a/src/common/interfaces/dsync-activated-data-type.interface.ts b/src/common/interfaces/dsync-activated-data-type.interface.ts new file mode 100644 index 000000000..5ca28bf68 --- /dev/null +++ b/src/common/interfaces/dsync-activated-data-type.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncActivatedDataType = + | 'azure scim v2.0' + | 'bamboohr' + | 'breathe hr' + | 'cezanne hr' + | 'cyberark scim v2.0' + | 'fourth hr' + | 'generic scim v2.0' + | 'gsuite directory' + | 'gusto' + | 'hibob' + | 'jump cloud scim v2.0' + | 'okta scim v2.0' + | 'onelogin scim v2.0' + | 'people hr' + | 'personio' + | 'pingfederate scim v2.0' + | 'rippling scim v2.0' + | 'rippling' + | 'sailpoint scim v2.0' + | 's3' + | 'sftp' + | 'sftp workday' + | 'workday'; diff --git a/src/common/interfaces/dsync-activated-data.interface.ts b/src/common/interfaces/dsync-activated-data.interface.ts new file mode 100644 index 000000000..93c1dc8f0 --- /dev/null +++ b/src/common/interfaces/dsync-activated-data.interface.ts @@ -0,0 +1,45 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncActivatedDataDomain, + DsyncActivatedDataDomainResponse, +} from './dsync-activated-data-domain.interface'; +import type { DsyncActivatedDataType } from './dsync-activated-data-type.interface'; +import type { DsyncActivatedDataState } from './dsync-activated-data-state.interface'; + +/** The event payload. */ +export interface DsyncActivatedData { + /** Distinguishes the directory object. */ + object: 'directory'; + /** Unique identifier of the directory. */ + id: string; + /** The ID of the organization the directory belongs to. */ + organizationId?: string; + /** The type of the directory. */ + type: DsyncActivatedDataType; + /** The current state of the directory. */ + state: DsyncActivatedDataState; + /** The name of the directory. */ + name: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + /** The external key of the directory. */ + externalKey: string; + /** The domains associated with the directory. */ + domains: DsyncActivatedDataDomain[]; +} + +export interface DsyncActivatedDataResponse { + object: 'directory'; + id: string; + organization_id?: string; + type: DsyncActivatedDataType; + state: DsyncActivatedDataState; + name: string; + created_at: string; + updated_at: string; + external_key: string; + domains: DsyncActivatedDataDomainResponse[]; +} diff --git a/src/common/interfaces/dsync-activated.interface.ts b/src/common/interfaces/dsync-activated.interface.ts new file mode 100644 index 000000000..cdc74ad01 --- /dev/null +++ b/src/common/interfaces/dsync-activated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncActivatedData, + DsyncActivatedDataResponse, +} from './dsync-activated-data.interface'; +import type { + DsyncActivatedContext, + DsyncActivatedContextResponse, +} from './dsync-activated-context.interface'; + +export interface DsyncActivated { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.activated'; + /** The event payload. */ + data: DsyncActivatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncActivatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncActivatedResponse { + id: string; + event: 'dsync.activated'; + data: DsyncActivatedDataResponse; + created_at: string; + context?: DsyncActivatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/dsync-deactivated-context-actor-source.interface.ts b/src/common/interfaces/dsync-deactivated-context-actor-source.interface.ts new file mode 100644 index 000000000..21db9b2e7 --- /dev/null +++ b/src/common/interfaces/dsync-deactivated-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncDeactivatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/dsync-deactivated-context-actor.interface.ts b/src/common/interfaces/dsync-deactivated-context-actor.interface.ts new file mode 100644 index 000000000..413e2649d --- /dev/null +++ b/src/common/interfaces/dsync-deactivated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncDeactivatedContextActorSource } from './dsync-deactivated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncDeactivatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncDeactivatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncDeactivatedContextActorResponse { + id: string; + source: DsyncDeactivatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-deactivated-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-deactivated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..48bbce408 --- /dev/null +++ b/src/common/interfaces/dsync-deactivated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncDeactivatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncDeactivatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-deactivated-context.interface.ts b/src/common/interfaces/dsync-deactivated-context.interface.ts new file mode 100644 index 000000000..de73c1655 --- /dev/null +++ b/src/common/interfaces/dsync-deactivated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncDeactivatedContextGoogleAnalyticsSession, + DsyncDeactivatedContextGoogleAnalyticsSessionResponse, +} from './dsync-deactivated-context-google-analytics-session.interface'; +import type { + DsyncDeactivatedContextActor, + DsyncDeactivatedContextActorResponse, +} from './dsync-deactivated-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncDeactivatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncDeactivatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncDeactivatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncDeactivatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncDeactivatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncDeactivatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-deactivated-data-domain.interface.ts b/src/common/interfaces/dsync-deactivated-data-domain.interface.ts new file mode 100644 index 000000000..fc38ecf60 --- /dev/null +++ b/src/common/interfaces/dsync-deactivated-data-domain.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncActivatedDataDomain, + DsyncActivatedDataDomainResponse, +} from './dsync-activated-data-domain.interface'; + +export type DsyncDeactivatedDataDomain = DsyncActivatedDataDomain; +export type DsyncDeactivatedDataDomainResponse = + DsyncActivatedDataDomainResponse; diff --git a/src/common/interfaces/dsync-deactivated-data-state.interface.ts b/src/common/interfaces/dsync-deactivated-data-state.interface.ts new file mode 100644 index 000000000..f1b7fcddc --- /dev/null +++ b/src/common/interfaces/dsync-deactivated-data-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncDeactivatedDataState = + | 'active' + | 'validating' + | 'invalid_credentials' + | 'inactive' + | 'deleting'; diff --git a/src/common/interfaces/dsync-deactivated-data-type.interface.ts b/src/common/interfaces/dsync-deactivated-data-type.interface.ts new file mode 100644 index 000000000..5ddfdb378 --- /dev/null +++ b/src/common/interfaces/dsync-deactivated-data-type.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncDeactivatedDataType = + | 'azure scim v2.0' + | 'bamboohr' + | 'breathe hr' + | 'cezanne hr' + | 'cyberark scim v2.0' + | 'fourth hr' + | 'generic scim v2.0' + | 'gsuite directory' + | 'gusto' + | 'hibob' + | 'jump cloud scim v2.0' + | 'okta scim v2.0' + | 'onelogin scim v2.0' + | 'people hr' + | 'personio' + | 'pingfederate scim v2.0' + | 'rippling scim v2.0' + | 'rippling' + | 'sailpoint scim v2.0' + | 's3' + | 'sftp' + | 'sftp workday' + | 'workday'; diff --git a/src/common/interfaces/dsync-deactivated-data.interface.ts b/src/common/interfaces/dsync-deactivated-data.interface.ts new file mode 100644 index 000000000..7deee5996 --- /dev/null +++ b/src/common/interfaces/dsync-deactivated-data.interface.ts @@ -0,0 +1,45 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncDeactivatedDataDomain, + DsyncDeactivatedDataDomainResponse, +} from './dsync-deactivated-data-domain.interface'; +import type { DsyncDeactivatedDataType } from './dsync-deactivated-data-type.interface'; +import type { DsyncDeactivatedDataState } from './dsync-deactivated-data-state.interface'; + +/** The event payload. */ +export interface DsyncDeactivatedData { + /** Distinguishes the directory object. */ + object: 'directory'; + /** Unique identifier of the directory. */ + id: string; + /** The ID of the organization the directory belongs to. */ + organizationId?: string; + /** The type of the directory. */ + type: DsyncDeactivatedDataType; + /** The current state of the directory. */ + state: DsyncDeactivatedDataState; + /** The name of the directory. */ + name: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + /** The external key of the directory. */ + externalKey: string; + /** The domains associated with the directory. */ + domains: DsyncDeactivatedDataDomain[]; +} + +export interface DsyncDeactivatedDataResponse { + object: 'directory'; + id: string; + organization_id?: string; + type: DsyncDeactivatedDataType; + state: DsyncDeactivatedDataState; + name: string; + created_at: string; + updated_at: string; + external_key: string; + domains: DsyncDeactivatedDataDomainResponse[]; +} diff --git a/src/common/interfaces/dsync-deactivated.interface.ts b/src/common/interfaces/dsync-deactivated.interface.ts new file mode 100644 index 000000000..1cf4c2121 --- /dev/null +++ b/src/common/interfaces/dsync-deactivated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncDeactivatedData, + DsyncDeactivatedDataResponse, +} from './dsync-deactivated-data.interface'; +import type { + DsyncDeactivatedContext, + DsyncDeactivatedContextResponse, +} from './dsync-deactivated-context.interface'; + +export interface DsyncDeactivated { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.deactivated'; + /** The event payload. */ + data: DsyncDeactivatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncDeactivatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncDeactivatedResponse { + id: string; + event: 'dsync.deactivated'; + data: DsyncDeactivatedDataResponse; + created_at: string; + context?: DsyncDeactivatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/dsync-deleted-context-actor-source.interface.ts b/src/common/interfaces/dsync-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..fc9912dbe --- /dev/null +++ b/src/common/interfaces/dsync-deleted-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncDeletedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/dsync-deleted-context-actor.interface.ts b/src/common/interfaces/dsync-deleted-context-actor.interface.ts new file mode 100644 index 000000000..68f6a3a40 --- /dev/null +++ b/src/common/interfaces/dsync-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncDeletedContextActorSource } from './dsync-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncDeletedContextActorResponse { + id: string; + source: DsyncDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..620d75ec3 --- /dev/null +++ b/src/common/interfaces/dsync-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-deleted-context.interface.ts b/src/common/interfaces/dsync-deleted-context.interface.ts new file mode 100644 index 000000000..c63a73409 --- /dev/null +++ b/src/common/interfaces/dsync-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncDeletedContextGoogleAnalyticsSession, + DsyncDeletedContextGoogleAnalyticsSessionResponse, +} from './dsync-deleted-context-google-analytics-session.interface'; +import type { + DsyncDeletedContextActor, + DsyncDeletedContextActorResponse, +} from './dsync-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-deleted-data-state.interface.ts b/src/common/interfaces/dsync-deleted-data-state.interface.ts new file mode 100644 index 000000000..7c6ed2702 --- /dev/null +++ b/src/common/interfaces/dsync-deleted-data-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncDeletedDataState = + | 'active' + | 'validating' + | 'invalid_credentials' + | 'inactive' + | 'deleting'; diff --git a/src/common/interfaces/dsync-deleted-data-type.interface.ts b/src/common/interfaces/dsync-deleted-data-type.interface.ts new file mode 100644 index 000000000..96718b6c4 --- /dev/null +++ b/src/common/interfaces/dsync-deleted-data-type.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncDeletedDataType = + | 'azure scim v2.0' + | 'bamboohr' + | 'breathe hr' + | 'cezanne hr' + | 'cyberark scim v2.0' + | 'fourth hr' + | 'generic scim v2.0' + | 'gsuite directory' + | 'gusto' + | 'hibob' + | 'jump cloud scim v2.0' + | 'okta scim v2.0' + | 'onelogin scim v2.0' + | 'people hr' + | 'personio' + | 'pingfederate scim v2.0' + | 'rippling scim v2.0' + | 'rippling' + | 'sailpoint scim v2.0' + | 's3' + | 'sftp' + | 'sftp workday' + | 'workday'; diff --git a/src/common/interfaces/dsync-deleted-data.interface.ts b/src/common/interfaces/dsync-deleted-data.interface.ts new file mode 100644 index 000000000..f4d2eacbc --- /dev/null +++ b/src/common/interfaces/dsync-deleted-data.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncDeletedDataType } from './dsync-deleted-data-type.interface'; +import type { DsyncDeletedDataState } from './dsync-deleted-data-state.interface'; + +/** The event payload. */ +export interface DsyncDeletedData { + /** Distinguishes the directory object. */ + object: 'directory'; + /** Unique identifier of the directory. */ + id: string; + /** The ID of the organization the directory belongs to. */ + organizationId?: string; + /** The type of the directory. */ + type: DsyncDeletedDataType; + /** The current state of the directory. */ + state: DsyncDeletedDataState; + /** The name of the directory. */ + name: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface DsyncDeletedDataResponse { + object: 'directory'; + id: string; + organization_id?: string; + type: DsyncDeletedDataType; + state: DsyncDeletedDataState; + name: string; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/dsync-deleted.interface.ts b/src/common/interfaces/dsync-deleted.interface.ts new file mode 100644 index 000000000..60c65209e --- /dev/null +++ b/src/common/interfaces/dsync-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncDeletedData, + DsyncDeletedDataResponse, +} from './dsync-deleted-data.interface'; +import type { + DsyncDeletedContext, + DsyncDeletedContextResponse, +} from './dsync-deleted-context.interface'; + +export interface DsyncDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.deleted'; + /** The event payload. */ + data: DsyncDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncDeletedResponse { + id: string; + event: 'dsync.deleted'; + data: DsyncDeletedDataResponse; + created_at: string; + context?: DsyncDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/dsync-group-created-context-actor-source.interface.ts b/src/common/interfaces/dsync-group-created-context-actor-source.interface.ts new file mode 100644 index 000000000..d181d8eb9 --- /dev/null +++ b/src/common/interfaces/dsync-group-created-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncGroupCreatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/dsync-group-created-context-actor.interface.ts b/src/common/interfaces/dsync-group-created-context-actor.interface.ts new file mode 100644 index 000000000..0a6e76f8f --- /dev/null +++ b/src/common/interfaces/dsync-group-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncGroupCreatedContextActorSource } from './dsync-group-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncGroupCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncGroupCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncGroupCreatedContextActorResponse { + id: string; + source: DsyncGroupCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-group-created-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-group-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..5565c37e1 --- /dev/null +++ b/src/common/interfaces/dsync-group-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncGroupCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncGroupCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-group-created-context.interface.ts b/src/common/interfaces/dsync-group-created-context.interface.ts new file mode 100644 index 000000000..891bd8507 --- /dev/null +++ b/src/common/interfaces/dsync-group-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupCreatedContextGoogleAnalyticsSession, + DsyncGroupCreatedContextGoogleAnalyticsSessionResponse, +} from './dsync-group-created-context-google-analytics-session.interface'; +import type { + DsyncGroupCreatedContextActor, + DsyncGroupCreatedContextActorResponse, +} from './dsync-group-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncGroupCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncGroupCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncGroupCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncGroupCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncGroupCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncGroupCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-group-created-data.interface.ts b/src/common/interfaces/dsync-group-created-data.interface.ts new file mode 100644 index 000000000..68932ab10 --- /dev/null +++ b/src/common/interfaces/dsync-group-created-data.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryGroup, + DirectoryGroupResponse, +} from '../../directory-sync/interfaces/directory-group.interface'; + +export type DsyncGroupCreatedData = DirectoryGroup; +export type DsyncGroupCreatedDataResponse = DirectoryGroupResponse; diff --git a/src/common/interfaces/dsync-group-created.interface.ts b/src/common/interfaces/dsync-group-created.interface.ts new file mode 100644 index 000000000..f0e983aba --- /dev/null +++ b/src/common/interfaces/dsync-group-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupCreatedData, + DsyncGroupCreatedDataResponse, +} from './dsync-group-created-data.interface'; +import type { + DsyncGroupCreatedContext, + DsyncGroupCreatedContextResponse, +} from './dsync-group-created-context.interface'; + +export interface DsyncGroupCreated { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.group.created'; + /** The event payload. */ + data: DsyncGroupCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncGroupCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncGroupCreatedResponse { + id: string; + event: 'dsync.group.created'; + data: DsyncGroupCreatedDataResponse; + created_at: string; + context?: DsyncGroupCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/dsync-group-deleted-context-actor-source.interface.ts b/src/common/interfaces/dsync-group-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..d9075ff09 --- /dev/null +++ b/src/common/interfaces/dsync-group-deleted-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncGroupDeletedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/dsync-group-deleted-context-actor.interface.ts b/src/common/interfaces/dsync-group-deleted-context-actor.interface.ts new file mode 100644 index 000000000..c0b70e3fc --- /dev/null +++ b/src/common/interfaces/dsync-group-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncGroupDeletedContextActorSource } from './dsync-group-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncGroupDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncGroupDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncGroupDeletedContextActorResponse { + id: string; + source: DsyncGroupDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-group-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-group-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..44a001784 --- /dev/null +++ b/src/common/interfaces/dsync-group-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncGroupDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncGroupDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-group-deleted-context.interface.ts b/src/common/interfaces/dsync-group-deleted-context.interface.ts new file mode 100644 index 000000000..83444114b --- /dev/null +++ b/src/common/interfaces/dsync-group-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupDeletedContextGoogleAnalyticsSession, + DsyncGroupDeletedContextGoogleAnalyticsSessionResponse, +} from './dsync-group-deleted-context-google-analytics-session.interface'; +import type { + DsyncGroupDeletedContextActor, + DsyncGroupDeletedContextActorResponse, +} from './dsync-group-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncGroupDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncGroupDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncGroupDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncGroupDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncGroupDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncGroupDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-group-deleted-data.interface.ts b/src/common/interfaces/dsync-group-deleted-data.interface.ts new file mode 100644 index 000000000..983a6dde6 --- /dev/null +++ b/src/common/interfaces/dsync-group-deleted-data.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryGroup, + DirectoryGroupResponse, +} from '../../directory-sync/interfaces/directory-group.interface'; + +export type DsyncGroupDeletedData = DirectoryGroup; +export type DsyncGroupDeletedDataResponse = DirectoryGroupResponse; diff --git a/src/common/interfaces/dsync-group-deleted.interface.ts b/src/common/interfaces/dsync-group-deleted.interface.ts new file mode 100644 index 000000000..f13b753ec --- /dev/null +++ b/src/common/interfaces/dsync-group-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupDeletedData, + DsyncGroupDeletedDataResponse, +} from './dsync-group-deleted-data.interface'; +import type { + DsyncGroupDeletedContext, + DsyncGroupDeletedContextResponse, +} from './dsync-group-deleted-context.interface'; + +export interface DsyncGroupDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.group.deleted'; + /** The event payload. */ + data: DsyncGroupDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncGroupDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncGroupDeletedResponse { + id: string; + event: 'dsync.group.deleted'; + data: DsyncGroupDeletedDataResponse; + created_at: string; + context?: DsyncGroupDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/dsync-group-updated-context-actor-source.interface.ts b/src/common/interfaces/dsync-group-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..29999385d --- /dev/null +++ b/src/common/interfaces/dsync-group-updated-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncGroupUpdatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/dsync-group-updated-context-actor.interface.ts b/src/common/interfaces/dsync-group-updated-context-actor.interface.ts new file mode 100644 index 000000000..6b30ec200 --- /dev/null +++ b/src/common/interfaces/dsync-group-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncGroupUpdatedContextActorSource } from './dsync-group-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncGroupUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncGroupUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncGroupUpdatedContextActorResponse { + id: string; + source: DsyncGroupUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-group-updated-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-group-updated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..e882e87d2 --- /dev/null +++ b/src/common/interfaces/dsync-group-updated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncGroupUpdatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncGroupUpdatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-group-updated-context.interface.ts b/src/common/interfaces/dsync-group-updated-context.interface.ts new file mode 100644 index 000000000..464e6d72c --- /dev/null +++ b/src/common/interfaces/dsync-group-updated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUpdatedContextGoogleAnalyticsSession, + DsyncGroupUpdatedContextGoogleAnalyticsSessionResponse, +} from './dsync-group-updated-context-google-analytics-session.interface'; +import type { + DsyncGroupUpdatedContextActor, + DsyncGroupUpdatedContextActorResponse, +} from './dsync-group-updated-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncGroupUpdatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncGroupUpdatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncGroupUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncGroupUpdatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncGroupUpdatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncGroupUpdatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-group-updated-data.interface.ts b/src/common/interfaces/dsync-group-updated-data.interface.ts new file mode 100644 index 000000000..e7d96a1e4 --- /dev/null +++ b/src/common/interfaces/dsync-group-updated-data.interface.ts @@ -0,0 +1,37 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface DsyncGroupUpdatedData { + /** Distinguishes the Directory Group object. */ + object: 'directory_group'; + /** Unique identifier for the Directory Group. */ + id: string; + /** Unique identifier for the group, assigned by the Directory Provider. Different Directory Providers use different ID formats. */ + idpId: string; + /** The identifier of the Directory the Directory Group belongs to. */ + directoryId: string; + /** The identifier for the Organization in which the Directory resides. */ + organizationId: string; + /** The name of the Directory Group. */ + name: string; + /** The raw attributes received from the directory provider. */ + rawAttributes?: Record; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + previousAttributes?: Record; +} + +export interface DsyncGroupUpdatedDataResponse { + object: 'directory_group'; + id: string; + idp_id: string; + directory_id: string; + organization_id: string; + name: string; + raw_attributes?: Record; + created_at: string; + updated_at: string; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-group-updated.interface.ts b/src/common/interfaces/dsync-group-updated.interface.ts new file mode 100644 index 000000000..5fece5343 --- /dev/null +++ b/src/common/interfaces/dsync-group-updated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUpdatedData, + DsyncGroupUpdatedDataResponse, +} from './dsync-group-updated-data.interface'; +import type { + DsyncGroupUpdatedContext, + DsyncGroupUpdatedContextResponse, +} from './dsync-group-updated-context.interface'; + +export interface DsyncGroupUpdated { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.group.updated'; + /** The event payload. */ + data: DsyncGroupUpdatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncGroupUpdatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncGroupUpdatedResponse { + id: string; + event: 'dsync.group.updated'; + data: DsyncGroupUpdatedDataResponse; + created_at: string; + context?: DsyncGroupUpdatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/dsync-group-user-added-context-actor-source.interface.ts b/src/common/interfaces/dsync-group-user-added-context-actor-source.interface.ts new file mode 100644 index 000000000..2be1c5a07 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncGroupUserAddedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/dsync-group-user-added-context-actor.interface.ts b/src/common/interfaces/dsync-group-user-added-context-actor.interface.ts new file mode 100644 index 000000000..f288303c0 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncGroupUserAddedContextActorSource } from './dsync-group-user-added-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncGroupUserAddedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncGroupUserAddedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncGroupUserAddedContextActorResponse { + id: string; + source: DsyncGroupUserAddedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-group-user-added-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-group-user-added-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..7fd8c80cd --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncGroupUserAddedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncGroupUserAddedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-group-user-added-context.interface.ts b/src/common/interfaces/dsync-group-user-added-context.interface.ts new file mode 100644 index 000000000..b39ec5ae7 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserAddedContextGoogleAnalyticsSession, + DsyncGroupUserAddedContextGoogleAnalyticsSessionResponse, +} from './dsync-group-user-added-context-google-analytics-session.interface'; +import type { + DsyncGroupUserAddedContextActor, + DsyncGroupUserAddedContextActorResponse, +} from './dsync-group-user-added-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncGroupUserAddedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncGroupUserAddedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncGroupUserAddedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncGroupUserAddedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncGroupUserAddedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncGroupUserAddedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-group-user-added-data-group.interface.ts b/src/common/interfaces/dsync-group-user-added-data-group.interface.ts new file mode 100644 index 000000000..31f8326cb --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added-data-group.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryGroup, + DirectoryGroupResponse, +} from '../../directory-sync/interfaces/directory-group.interface'; + +export type DsyncGroupUserAddedDataGroup = DirectoryGroup; +export type DsyncGroupUserAddedDataGroupResponse = DirectoryGroupResponse; diff --git a/src/common/interfaces/dsync-group-user-added-data-user-email.interface.ts b/src/common/interfaces/dsync-group-user-added-data-user-email.interface.ts new file mode 100644 index 000000000..f91692272 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added-data-user-email.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface DsyncGroupUserAddedDataUserEmail { + /** Whether this is the primary email address. */ + primary?: boolean; + /** The type of email address. */ + type?: string; + /** The email address value. */ + value?: string | null; +} + +export interface DsyncGroupUserAddedDataUserEmailResponse { + primary?: boolean; + type?: string; + value?: string | null; +} diff --git a/src/common/interfaces/dsync-group-user-added-data-user-role.interface.ts b/src/common/interfaces/dsync-group-user-added-data-user-role.interface.ts new file mode 100644 index 000000000..11bf8a057 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added-data-user-role.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AddRolePermission, + AddRolePermissionResponse, +} from '../../authorization/interfaces/add-role-permission.interface'; + +export type DsyncGroupUserAddedDataUserRole = AddRolePermission; +export type DsyncGroupUserAddedDataUserRoleResponse = AddRolePermissionResponse; diff --git a/src/common/interfaces/dsync-group-user-added-data-user-state.interface.ts b/src/common/interfaces/dsync-group-user-added-data-user-state.interface.ts new file mode 100644 index 000000000..744bca5c2 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added-data-user-state.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncGroupUserAddedDataUserState = + | 'active' + | 'suspended' + | 'inactive'; diff --git a/src/common/interfaces/dsync-group-user-added-data-user.interface.ts b/src/common/interfaces/dsync-group-user-added-data-user.interface.ts new file mode 100644 index 000000000..257b2b9dd --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added-data-user.interface.ts @@ -0,0 +1,84 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserAddedDataUserEmail, + DsyncGroupUserAddedDataUserEmailResponse, +} from './dsync-group-user-added-data-user-email.interface'; +import type { + DsyncGroupUserAddedDataUserRole, + DsyncGroupUserAddedDataUserRoleResponse, +} from './dsync-group-user-added-data-user-role.interface'; +import type { DsyncGroupUserAddedDataUserState } from './dsync-group-user-added-data-user-state.interface'; + +/** The directory user added to the group. */ +export interface DsyncGroupUserAddedDataUser { + /** Distinguishes the Directory User object. */ + object: 'directory_user'; + /** Unique identifier for the Directory User. */ + id: string; + /** The identifier of the Directory the Directory User belongs to. */ + directoryId: string; + /** The identifier for the Organization in which the Directory resides. */ + organizationId: string; + /** Unique identifier for the user, assigned by the Directory Provider. Different Directory Providers use different ID formats. */ + idpId: string; + /** The email address of the user. */ + email: string | null; + /** The first name of the user. */ + firstName?: string | null; + /** The last name of the user. */ + lastName?: string | null; + /** + * A list of email addresses for the user. + * @deprecated + */ + emails?: DsyncGroupUserAddedDataUserEmail[]; + /** + * The job title of the user. + * @deprecated + */ + jobTitle?: string | null; + /** + * The username of the user. + * @deprecated + */ + username?: string | null; + /** The state of the user. */ + state: DsyncGroupUserAddedDataUserState; + /** + * The raw attributes received from the directory provider. + * @deprecated + */ + rawAttributes: Record; + /** An object containing the custom attribute mapping for the Directory Provider. */ + customAttributes: Record; + /** The primary role assigned to the user. */ + role?: DsyncGroupUserAddedDataUserRole; + /** All roles assigned to the user. */ + roles?: DsyncGroupUserAddedDataUserRole[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface DsyncGroupUserAddedDataUserResponse { + object: 'directory_user'; + id: string; + directory_id: string; + organization_id: string; + idp_id: string; + email: string | null; + first_name?: string | null; + last_name?: string | null; + emails?: DsyncGroupUserAddedDataUserEmailResponse[]; + job_title?: string | null; + username?: string | null; + state: DsyncGroupUserAddedDataUserState; + raw_attributes: Record; + custom_attributes: Record; + role?: DsyncGroupUserAddedDataUserRoleResponse; + roles?: DsyncGroupUserAddedDataUserRoleResponse[]; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/dsync-group-user-added-data.interface.ts b/src/common/interfaces/dsync-group-user-added-data.interface.ts new file mode 100644 index 000000000..ed7d9f5ec --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added-data.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserAddedDataUser, + DsyncGroupUserAddedDataUserResponse, +} from './dsync-group-user-added-data-user.interface'; +import type { + DsyncGroupUserAddedDataGroup, + DsyncGroupUserAddedDataGroupResponse, +} from './dsync-group-user-added-data-group.interface'; + +/** The event payload. */ +export interface DsyncGroupUserAddedData { + /** The ID of the directory. */ + directoryId: string; + /** The directory user added to the group. */ + user: DsyncGroupUserAddedDataUser; + /** The directory group the user was added to. */ + group: DsyncGroupUserAddedDataGroup; +} + +export interface DsyncGroupUserAddedDataResponse { + directory_id: string; + user: DsyncGroupUserAddedDataUserResponse; + group: DsyncGroupUserAddedDataGroupResponse; +} diff --git a/src/common/interfaces/dsync-group-user-added.interface.ts b/src/common/interfaces/dsync-group-user-added.interface.ts new file mode 100644 index 000000000..1d7bd62cd --- /dev/null +++ b/src/common/interfaces/dsync-group-user-added.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserAddedData, + DsyncGroupUserAddedDataResponse, +} from './dsync-group-user-added-data.interface'; +import type { + DsyncGroupUserAddedContext, + DsyncGroupUserAddedContextResponse, +} from './dsync-group-user-added-context.interface'; + +export interface DsyncGroupUserAdded { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.group.user_added'; + /** The event payload. */ + data: DsyncGroupUserAddedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncGroupUserAddedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncGroupUserAddedResponse { + id: string; + event: 'dsync.group.user_added'; + data: DsyncGroupUserAddedDataResponse; + created_at: string; + context?: DsyncGroupUserAddedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/dsync-group-user-removed-context-actor-source.interface.ts b/src/common/interfaces/dsync-group-user-removed-context-actor-source.interface.ts new file mode 100644 index 000000000..77a063299 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncGroupUserRemovedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/dsync-group-user-removed-context-actor.interface.ts b/src/common/interfaces/dsync-group-user-removed-context-actor.interface.ts new file mode 100644 index 000000000..f57caaf43 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncGroupUserRemovedContextActorSource } from './dsync-group-user-removed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncGroupUserRemovedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncGroupUserRemovedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncGroupUserRemovedContextActorResponse { + id: string; + source: DsyncGroupUserRemovedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-group-user-removed-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-group-user-removed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..d887a718d --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncGroupUserRemovedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncGroupUserRemovedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-group-user-removed-context.interface.ts b/src/common/interfaces/dsync-group-user-removed-context.interface.ts new file mode 100644 index 000000000..613a1543d --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserRemovedContextGoogleAnalyticsSession, + DsyncGroupUserRemovedContextGoogleAnalyticsSessionResponse, +} from './dsync-group-user-removed-context-google-analytics-session.interface'; +import type { + DsyncGroupUserRemovedContextActor, + DsyncGroupUserRemovedContextActorResponse, +} from './dsync-group-user-removed-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncGroupUserRemovedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncGroupUserRemovedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncGroupUserRemovedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncGroupUserRemovedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncGroupUserRemovedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncGroupUserRemovedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-group-user-removed-data-group.interface.ts b/src/common/interfaces/dsync-group-user-removed-data-group.interface.ts new file mode 100644 index 000000000..693b2b4c0 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed-data-group.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryGroup, + DirectoryGroupResponse, +} from '../../directory-sync/interfaces/directory-group.interface'; + +export type DsyncGroupUserRemovedDataGroup = DirectoryGroup; +export type DsyncGroupUserRemovedDataGroupResponse = DirectoryGroupResponse; diff --git a/src/common/interfaces/dsync-group-user-removed-data-user-email.interface.ts b/src/common/interfaces/dsync-group-user-removed-data-user-email.interface.ts new file mode 100644 index 000000000..c07b1ce26 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed-data-user-email.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserAddedDataUserEmail, + DsyncGroupUserAddedDataUserEmailResponse, +} from './dsync-group-user-added-data-user-email.interface'; + +export type DsyncGroupUserRemovedDataUserEmail = + DsyncGroupUserAddedDataUserEmail; +export type DsyncGroupUserRemovedDataUserEmailResponse = + DsyncGroupUserAddedDataUserEmailResponse; diff --git a/src/common/interfaces/dsync-group-user-removed-data-user-role.interface.ts b/src/common/interfaces/dsync-group-user-removed-data-user-role.interface.ts new file mode 100644 index 000000000..eda527334 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed-data-user-role.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AddRolePermission, + AddRolePermissionResponse, +} from '../../authorization/interfaces/add-role-permission.interface'; + +export type DsyncGroupUserRemovedDataUserRole = AddRolePermission; +export type DsyncGroupUserRemovedDataUserRoleResponse = + AddRolePermissionResponse; diff --git a/src/common/interfaces/dsync-group-user-removed-data-user-state.interface.ts b/src/common/interfaces/dsync-group-user-removed-data-user-state.interface.ts new file mode 100644 index 000000000..d14121c4c --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed-data-user-state.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncGroupUserRemovedDataUserState = + | 'active' + | 'suspended' + | 'inactive'; diff --git a/src/common/interfaces/dsync-group-user-removed-data-user.interface.ts b/src/common/interfaces/dsync-group-user-removed-data-user.interface.ts new file mode 100644 index 000000000..05fcc554e --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed-data-user.interface.ts @@ -0,0 +1,84 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserRemovedDataUserEmail, + DsyncGroupUserRemovedDataUserEmailResponse, +} from './dsync-group-user-removed-data-user-email.interface'; +import type { + DsyncGroupUserRemovedDataUserRole, + DsyncGroupUserRemovedDataUserRoleResponse, +} from './dsync-group-user-removed-data-user-role.interface'; +import type { DsyncGroupUserRemovedDataUserState } from './dsync-group-user-removed-data-user-state.interface'; + +/** The directory user removed from the group. */ +export interface DsyncGroupUserRemovedDataUser { + /** Distinguishes the Directory User object. */ + object: 'directory_user'; + /** Unique identifier for the Directory User. */ + id: string; + /** The identifier of the Directory the Directory User belongs to. */ + directoryId: string; + /** The identifier for the Organization in which the Directory resides. */ + organizationId: string; + /** Unique identifier for the user, assigned by the Directory Provider. Different Directory Providers use different ID formats. */ + idpId: string; + /** The email address of the user. */ + email: string | null; + /** The first name of the user. */ + firstName?: string | null; + /** The last name of the user. */ + lastName?: string | null; + /** + * A list of email addresses for the user. + * @deprecated + */ + emails?: DsyncGroupUserRemovedDataUserEmail[]; + /** + * The job title of the user. + * @deprecated + */ + jobTitle?: string | null; + /** + * The username of the user. + * @deprecated + */ + username?: string | null; + /** The state of the user. */ + state: DsyncGroupUserRemovedDataUserState; + /** + * The raw attributes received from the directory provider. + * @deprecated + */ + rawAttributes: Record; + /** An object containing the custom attribute mapping for the Directory Provider. */ + customAttributes: Record; + /** The primary role assigned to the user. */ + role?: DsyncGroupUserRemovedDataUserRole; + /** All roles assigned to the user. */ + roles?: DsyncGroupUserRemovedDataUserRole[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface DsyncGroupUserRemovedDataUserResponse { + object: 'directory_user'; + id: string; + directory_id: string; + organization_id: string; + idp_id: string; + email: string | null; + first_name?: string | null; + last_name?: string | null; + emails?: DsyncGroupUserRemovedDataUserEmailResponse[]; + job_title?: string | null; + username?: string | null; + state: DsyncGroupUserRemovedDataUserState; + raw_attributes: Record; + custom_attributes: Record; + role?: DsyncGroupUserRemovedDataUserRoleResponse; + roles?: DsyncGroupUserRemovedDataUserRoleResponse[]; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/dsync-group-user-removed-data.interface.ts b/src/common/interfaces/dsync-group-user-removed-data.interface.ts new file mode 100644 index 000000000..5bd52e823 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed-data.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserRemovedDataUser, + DsyncGroupUserRemovedDataUserResponse, +} from './dsync-group-user-removed-data-user.interface'; +import type { + DsyncGroupUserRemovedDataGroup, + DsyncGroupUserRemovedDataGroupResponse, +} from './dsync-group-user-removed-data-group.interface'; + +/** The event payload. */ +export interface DsyncGroupUserRemovedData { + /** The ID of the directory. */ + directoryId: string; + /** The directory user removed from the group. */ + user: DsyncGroupUserRemovedDataUser; + /** The directory group the user was removed from. */ + group: DsyncGroupUserRemovedDataGroup; +} + +export interface DsyncGroupUserRemovedDataResponse { + directory_id: string; + user: DsyncGroupUserRemovedDataUserResponse; + group: DsyncGroupUserRemovedDataGroupResponse; +} diff --git a/src/common/interfaces/dsync-group-user-removed.interface.ts b/src/common/interfaces/dsync-group-user-removed.interface.ts new file mode 100644 index 000000000..ed05392a6 --- /dev/null +++ b/src/common/interfaces/dsync-group-user-removed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserRemovedData, + DsyncGroupUserRemovedDataResponse, +} from './dsync-group-user-removed-data.interface'; +import type { + DsyncGroupUserRemovedContext, + DsyncGroupUserRemovedContextResponse, +} from './dsync-group-user-removed-context.interface'; + +export interface DsyncGroupUserRemoved { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.group.user_removed'; + /** The event payload. */ + data: DsyncGroupUserRemovedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncGroupUserRemovedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncGroupUserRemovedResponse { + id: string; + event: 'dsync.group.user_removed'; + data: DsyncGroupUserRemovedDataResponse; + created_at: string; + context?: DsyncGroupUserRemovedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/dsync-user-created-context-actor-source.interface.ts b/src/common/interfaces/dsync-user-created-context-actor-source.interface.ts new file mode 100644 index 000000000..dea2379bf --- /dev/null +++ b/src/common/interfaces/dsync-user-created-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncUserCreatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/dsync-user-created-context-actor.interface.ts b/src/common/interfaces/dsync-user-created-context-actor.interface.ts new file mode 100644 index 000000000..e41faa7bc --- /dev/null +++ b/src/common/interfaces/dsync-user-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncUserCreatedContextActorSource } from './dsync-user-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncUserCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncUserCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncUserCreatedContextActorResponse { + id: string; + source: DsyncUserCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-user-created-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-user-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..c6c96545f --- /dev/null +++ b/src/common/interfaces/dsync-user-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncUserCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncUserCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-user-created-context.interface.ts b/src/common/interfaces/dsync-user-created-context.interface.ts new file mode 100644 index 000000000..a378b6cf5 --- /dev/null +++ b/src/common/interfaces/dsync-user-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserCreatedContextGoogleAnalyticsSession, + DsyncUserCreatedContextGoogleAnalyticsSessionResponse, +} from './dsync-user-created-context-google-analytics-session.interface'; +import type { + DsyncUserCreatedContextActor, + DsyncUserCreatedContextActorResponse, +} from './dsync-user-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncUserCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncUserCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncUserCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncUserCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncUserCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncUserCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-user-created-data-email.interface.ts b/src/common/interfaces/dsync-user-created-data-email.interface.ts new file mode 100644 index 000000000..bec8e21d9 --- /dev/null +++ b/src/common/interfaces/dsync-user-created-data-email.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserAddedDataUserEmail, + DsyncGroupUserAddedDataUserEmailResponse, +} from './dsync-group-user-added-data-user-email.interface'; + +export type DsyncUserCreatedDataEmail = DsyncGroupUserAddedDataUserEmail; +export type DsyncUserCreatedDataEmailResponse = + DsyncGroupUserAddedDataUserEmailResponse; diff --git a/src/common/interfaces/dsync-user-created-data-role.interface.ts b/src/common/interfaces/dsync-user-created-data-role.interface.ts new file mode 100644 index 000000000..cb0c2ed18 --- /dev/null +++ b/src/common/interfaces/dsync-user-created-data-role.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AddRolePermission, + AddRolePermissionResponse, +} from '../../authorization/interfaces/add-role-permission.interface'; + +export type DsyncUserCreatedDataRole = AddRolePermission; +export type DsyncUserCreatedDataRoleResponse = AddRolePermissionResponse; diff --git a/src/common/interfaces/dsync-user-created-data-state.interface.ts b/src/common/interfaces/dsync-user-created-data-state.interface.ts new file mode 100644 index 000000000..5a612ab4a --- /dev/null +++ b/src/common/interfaces/dsync-user-created-data-state.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncUserCreatedDataState = 'active' | 'suspended' | 'inactive'; diff --git a/src/common/interfaces/dsync-user-created-data.interface.ts b/src/common/interfaces/dsync-user-created-data.interface.ts new file mode 100644 index 000000000..d8e81ea67 --- /dev/null +++ b/src/common/interfaces/dsync-user-created-data.interface.ts @@ -0,0 +1,84 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserCreatedDataEmail, + DsyncUserCreatedDataEmailResponse, +} from './dsync-user-created-data-email.interface'; +import type { + DsyncUserCreatedDataRole, + DsyncUserCreatedDataRoleResponse, +} from './dsync-user-created-data-role.interface'; +import type { DsyncUserCreatedDataState } from './dsync-user-created-data-state.interface'; + +/** The event payload. */ +export interface DsyncUserCreatedData { + /** Distinguishes the Directory User object. */ + object: 'directory_user'; + /** Unique identifier for the Directory User. */ + id: string; + /** The identifier of the Directory the Directory User belongs to. */ + directoryId: string; + /** The identifier for the Organization in which the Directory resides. */ + organizationId: string; + /** Unique identifier for the user, assigned by the Directory Provider. Different Directory Providers use different ID formats. */ + idpId: string; + /** The email address of the user. */ + email: string | null; + /** The first name of the user. */ + firstName?: string | null; + /** The last name of the user. */ + lastName?: string | null; + /** + * A list of email addresses for the user. + * @deprecated + */ + emails?: DsyncUserCreatedDataEmail[]; + /** + * The job title of the user. + * @deprecated + */ + jobTitle?: string | null; + /** + * The username of the user. + * @deprecated + */ + username?: string | null; + /** The state of the user. */ + state: DsyncUserCreatedDataState; + /** + * The raw attributes received from the directory provider. + * @deprecated + */ + rawAttributes: Record; + /** An object containing the custom attribute mapping for the Directory Provider. */ + customAttributes: Record; + /** The primary role assigned to the user. */ + role?: DsyncUserCreatedDataRole; + /** All roles assigned to the user. */ + roles?: DsyncUserCreatedDataRole[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface DsyncUserCreatedDataResponse { + object: 'directory_user'; + id: string; + directory_id: string; + organization_id: string; + idp_id: string; + email: string | null; + first_name?: string | null; + last_name?: string | null; + emails?: DsyncUserCreatedDataEmailResponse[]; + job_title?: string | null; + username?: string | null; + state: DsyncUserCreatedDataState; + raw_attributes: Record; + custom_attributes: Record; + role?: DsyncUserCreatedDataRoleResponse; + roles?: DsyncUserCreatedDataRoleResponse[]; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/dsync-user-created.interface.ts b/src/common/interfaces/dsync-user-created.interface.ts new file mode 100644 index 000000000..755fd886d --- /dev/null +++ b/src/common/interfaces/dsync-user-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserCreatedData, + DsyncUserCreatedDataResponse, +} from './dsync-user-created-data.interface'; +import type { + DsyncUserCreatedContext, + DsyncUserCreatedContextResponse, +} from './dsync-user-created-context.interface'; + +export interface DsyncUserCreated { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.user.created'; + /** The event payload. */ + data: DsyncUserCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncUserCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncUserCreatedResponse { + id: string; + event: 'dsync.user.created'; + data: DsyncUserCreatedDataResponse; + created_at: string; + context?: DsyncUserCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/dsync-user-deleted-context-actor-source.interface.ts b/src/common/interfaces/dsync-user-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..1fb4f91c0 --- /dev/null +++ b/src/common/interfaces/dsync-user-deleted-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncUserDeletedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/dsync-user-deleted-context-actor.interface.ts b/src/common/interfaces/dsync-user-deleted-context-actor.interface.ts new file mode 100644 index 000000000..2d2e9e208 --- /dev/null +++ b/src/common/interfaces/dsync-user-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncUserDeletedContextActorSource } from './dsync-user-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncUserDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncUserDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncUserDeletedContextActorResponse { + id: string; + source: DsyncUserDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-user-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-user-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..1114c95d6 --- /dev/null +++ b/src/common/interfaces/dsync-user-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncUserDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncUserDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-user-deleted-context.interface.ts b/src/common/interfaces/dsync-user-deleted-context.interface.ts new file mode 100644 index 000000000..55d82ed33 --- /dev/null +++ b/src/common/interfaces/dsync-user-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserDeletedContextGoogleAnalyticsSession, + DsyncUserDeletedContextGoogleAnalyticsSessionResponse, +} from './dsync-user-deleted-context-google-analytics-session.interface'; +import type { + DsyncUserDeletedContextActor, + DsyncUserDeletedContextActorResponse, +} from './dsync-user-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncUserDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncUserDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncUserDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncUserDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncUserDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncUserDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-user-deleted-data-email.interface.ts b/src/common/interfaces/dsync-user-deleted-data-email.interface.ts new file mode 100644 index 000000000..0077136fd --- /dev/null +++ b/src/common/interfaces/dsync-user-deleted-data-email.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserAddedDataUserEmail, + DsyncGroupUserAddedDataUserEmailResponse, +} from './dsync-group-user-added-data-user-email.interface'; + +export type DsyncUserDeletedDataEmail = DsyncGroupUserAddedDataUserEmail; +export type DsyncUserDeletedDataEmailResponse = + DsyncGroupUserAddedDataUserEmailResponse; diff --git a/src/common/interfaces/dsync-user-deleted-data-role.interface.ts b/src/common/interfaces/dsync-user-deleted-data-role.interface.ts new file mode 100644 index 000000000..a02306967 --- /dev/null +++ b/src/common/interfaces/dsync-user-deleted-data-role.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AddRolePermission, + AddRolePermissionResponse, +} from '../../authorization/interfaces/add-role-permission.interface'; + +export type DsyncUserDeletedDataRole = AddRolePermission; +export type DsyncUserDeletedDataRoleResponse = AddRolePermissionResponse; diff --git a/src/common/interfaces/dsync-user-deleted-data-state.interface.ts b/src/common/interfaces/dsync-user-deleted-data-state.interface.ts new file mode 100644 index 000000000..25d871cf0 --- /dev/null +++ b/src/common/interfaces/dsync-user-deleted-data-state.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncUserDeletedDataState = 'active' | 'suspended' | 'inactive'; diff --git a/src/common/interfaces/dsync-user-deleted-data.interface.ts b/src/common/interfaces/dsync-user-deleted-data.interface.ts new file mode 100644 index 000000000..ed9808d96 --- /dev/null +++ b/src/common/interfaces/dsync-user-deleted-data.interface.ts @@ -0,0 +1,84 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserDeletedDataEmail, + DsyncUserDeletedDataEmailResponse, +} from './dsync-user-deleted-data-email.interface'; +import type { + DsyncUserDeletedDataRole, + DsyncUserDeletedDataRoleResponse, +} from './dsync-user-deleted-data-role.interface'; +import type { DsyncUserDeletedDataState } from './dsync-user-deleted-data-state.interface'; + +/** The event payload. */ +export interface DsyncUserDeletedData { + /** Distinguishes the Directory User object. */ + object: 'directory_user'; + /** Unique identifier for the Directory User. */ + id: string; + /** The identifier of the Directory the Directory User belongs to. */ + directoryId: string; + /** The identifier for the Organization in which the Directory resides. */ + organizationId: string; + /** Unique identifier for the user, assigned by the Directory Provider. Different Directory Providers use different ID formats. */ + idpId: string; + /** The email address of the user. */ + email: string | null; + /** The first name of the user. */ + firstName?: string | null; + /** The last name of the user. */ + lastName?: string | null; + /** + * A list of email addresses for the user. + * @deprecated + */ + emails?: DsyncUserDeletedDataEmail[]; + /** + * The job title of the user. + * @deprecated + */ + jobTitle?: string | null; + /** + * The username of the user. + * @deprecated + */ + username?: string | null; + /** The state of the user. */ + state: DsyncUserDeletedDataState; + /** + * The raw attributes received from the directory provider. + * @deprecated + */ + rawAttributes: Record; + /** An object containing the custom attribute mapping for the Directory Provider. */ + customAttributes: Record; + /** The primary role assigned to the user. */ + role?: DsyncUserDeletedDataRole; + /** All roles assigned to the user. */ + roles?: DsyncUserDeletedDataRole[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface DsyncUserDeletedDataResponse { + object: 'directory_user'; + id: string; + directory_id: string; + organization_id: string; + idp_id: string; + email: string | null; + first_name?: string | null; + last_name?: string | null; + emails?: DsyncUserDeletedDataEmailResponse[]; + job_title?: string | null; + username?: string | null; + state: DsyncUserDeletedDataState; + raw_attributes: Record; + custom_attributes: Record; + role?: DsyncUserDeletedDataRoleResponse; + roles?: DsyncUserDeletedDataRoleResponse[]; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/dsync-user-deleted.interface.ts b/src/common/interfaces/dsync-user-deleted.interface.ts new file mode 100644 index 000000000..2e13ad836 --- /dev/null +++ b/src/common/interfaces/dsync-user-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserDeletedData, + DsyncUserDeletedDataResponse, +} from './dsync-user-deleted-data.interface'; +import type { + DsyncUserDeletedContext, + DsyncUserDeletedContextResponse, +} from './dsync-user-deleted-context.interface'; + +export interface DsyncUserDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.user.deleted'; + /** The event payload. */ + data: DsyncUserDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncUserDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncUserDeletedResponse { + id: string; + event: 'dsync.user.deleted'; + data: DsyncUserDeletedDataResponse; + created_at: string; + context?: DsyncUserDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/dsync-user-updated-context-actor-source.interface.ts b/src/common/interfaces/dsync-user-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..b358ffe89 --- /dev/null +++ b/src/common/interfaces/dsync-user-updated-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncUserUpdatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/dsync-user-updated-context-actor.interface.ts b/src/common/interfaces/dsync-user-updated-context-actor.interface.ts new file mode 100644 index 000000000..d092b51e2 --- /dev/null +++ b/src/common/interfaces/dsync-user-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DsyncUserUpdatedContextActorSource } from './dsync-user-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface DsyncUserUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: DsyncUserUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface DsyncUserUpdatedContextActorResponse { + id: string; + source: DsyncUserUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/dsync-user-updated-context-google-analytics-session.interface.ts b/src/common/interfaces/dsync-user-updated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..a5d84c49c --- /dev/null +++ b/src/common/interfaces/dsync-user-updated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type DsyncUserUpdatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type DsyncUserUpdatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/dsync-user-updated-context.interface.ts b/src/common/interfaces/dsync-user-updated-context.interface.ts new file mode 100644 index 000000000..d97b750fe --- /dev/null +++ b/src/common/interfaces/dsync-user-updated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserUpdatedContextGoogleAnalyticsSession, + DsyncUserUpdatedContextGoogleAnalyticsSessionResponse, +} from './dsync-user-updated-context-google-analytics-session.interface'; +import type { + DsyncUserUpdatedContextActor, + DsyncUserUpdatedContextActorResponse, +} from './dsync-user-updated-context-actor.interface'; + +/** Additional context about the event. */ +export interface DsyncUserUpdatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: DsyncUserUpdatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: DsyncUserUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface DsyncUserUpdatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: DsyncUserUpdatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: DsyncUserUpdatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-user-updated-data-email.interface.ts b/src/common/interfaces/dsync-user-updated-data-email.interface.ts new file mode 100644 index 000000000..4e764f9f9 --- /dev/null +++ b/src/common/interfaces/dsync-user-updated-data-email.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncGroupUserAddedDataUserEmail, + DsyncGroupUserAddedDataUserEmailResponse, +} from './dsync-group-user-added-data-user-email.interface'; + +export type DsyncUserUpdatedDataEmail = DsyncGroupUserAddedDataUserEmail; +export type DsyncUserUpdatedDataEmailResponse = + DsyncGroupUserAddedDataUserEmailResponse; diff --git a/src/common/interfaces/dsync-user-updated-data-role.interface.ts b/src/common/interfaces/dsync-user-updated-data-role.interface.ts new file mode 100644 index 000000000..5f4fd64c3 --- /dev/null +++ b/src/common/interfaces/dsync-user-updated-data-role.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AddRolePermission, + AddRolePermissionResponse, +} from '../../authorization/interfaces/add-role-permission.interface'; + +export type DsyncUserUpdatedDataRole = AddRolePermission; +export type DsyncUserUpdatedDataRoleResponse = AddRolePermissionResponse; diff --git a/src/common/interfaces/dsync-user-updated-data-state.interface.ts b/src/common/interfaces/dsync-user-updated-data-state.interface.ts new file mode 100644 index 000000000..87bc87a6c --- /dev/null +++ b/src/common/interfaces/dsync-user-updated-data-state.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DsyncUserUpdatedDataState = 'active' | 'suspended' | 'inactive'; diff --git a/src/common/interfaces/dsync-user-updated-data.interface.ts b/src/common/interfaces/dsync-user-updated-data.interface.ts new file mode 100644 index 000000000..d3de36e96 --- /dev/null +++ b/src/common/interfaces/dsync-user-updated-data.interface.ts @@ -0,0 +1,86 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserUpdatedDataEmail, + DsyncUserUpdatedDataEmailResponse, +} from './dsync-user-updated-data-email.interface'; +import type { + DsyncUserUpdatedDataRole, + DsyncUserUpdatedDataRoleResponse, +} from './dsync-user-updated-data-role.interface'; +import type { DsyncUserUpdatedDataState } from './dsync-user-updated-data-state.interface'; + +/** The event payload. */ +export interface DsyncUserUpdatedData { + /** Distinguishes the Directory User object. */ + object: 'directory_user'; + /** Unique identifier for the Directory User. */ + id: string; + /** The identifier of the Directory the Directory User belongs to. */ + directoryId: string; + /** The identifier for the Organization in which the Directory resides. */ + organizationId: string; + /** Unique identifier for the user, assigned by the Directory Provider. Different Directory Providers use different ID formats. */ + idpId: string; + /** The email address of the user. */ + email: string | null; + /** The first name of the user. */ + firstName?: string | null; + /** The last name of the user. */ + lastName?: string | null; + /** + * A list of email addresses for the user. + * @deprecated + */ + emails?: DsyncUserUpdatedDataEmail[]; + /** + * The job title of the user. + * @deprecated + */ + jobTitle?: string | null; + /** + * The username of the user. + * @deprecated + */ + username?: string | null; + /** The state of the user. */ + state: DsyncUserUpdatedDataState; + /** + * The raw attributes received from the directory provider. + * @deprecated + */ + rawAttributes: Record; + /** An object containing the custom attribute mapping for the Directory Provider. */ + customAttributes: Record; + /** The primary role assigned to the user. */ + role?: DsyncUserUpdatedDataRole; + /** All roles assigned to the user. */ + roles?: DsyncUserUpdatedDataRole[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + previousAttributes?: Record; +} + +export interface DsyncUserUpdatedDataResponse { + object: 'directory_user'; + id: string; + directory_id: string; + organization_id: string; + idp_id: string; + email: string | null; + first_name?: string | null; + last_name?: string | null; + emails?: DsyncUserUpdatedDataEmailResponse[]; + job_title?: string | null; + username?: string | null; + state: DsyncUserUpdatedDataState; + raw_attributes: Record; + custom_attributes: Record; + role?: DsyncUserUpdatedDataRoleResponse; + roles?: DsyncUserUpdatedDataRoleResponse[]; + created_at: string; + updated_at: string; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/dsync-user-updated.interface.ts b/src/common/interfaces/dsync-user-updated.interface.ts new file mode 100644 index 000000000..f8efb79cc --- /dev/null +++ b/src/common/interfaces/dsync-user-updated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserUpdatedData, + DsyncUserUpdatedDataResponse, +} from './dsync-user-updated-data.interface'; +import type { + DsyncUserUpdatedContext, + DsyncUserUpdatedContextResponse, +} from './dsync-user-updated-context.interface'; + +export interface DsyncUserUpdated { + /** Unique identifier for the event. */ + id: string; + event: 'dsync.user.updated'; + /** The event payload. */ + data: DsyncUserUpdatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: DsyncUserUpdatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface DsyncUserUpdatedResponse { + id: string; + event: 'dsync.user.updated'; + data: DsyncUserUpdatedDataResponse; + created_at: string; + context?: DsyncUserUpdatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/email-verification-created-context-actor-source.interface.ts b/src/common/interfaces/email-verification-created-context-actor-source.interface.ts new file mode 100644 index 000000000..8e918823f --- /dev/null +++ b/src/common/interfaces/email-verification-created-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type EmailVerificationCreatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/email-verification-created-context-actor.interface.ts b/src/common/interfaces/email-verification-created-context-actor.interface.ts new file mode 100644 index 000000000..c4798f7f6 --- /dev/null +++ b/src/common/interfaces/email-verification-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { EmailVerificationCreatedContextActorSource } from './email-verification-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface EmailVerificationCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: EmailVerificationCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface EmailVerificationCreatedContextActorResponse { + id: string; + source: EmailVerificationCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/email-verification-created-context-google-analytics-session.interface.ts b/src/common/interfaces/email-verification-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..955edef76 --- /dev/null +++ b/src/common/interfaces/email-verification-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type EmailVerificationCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type EmailVerificationCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/email-verification-created-context.interface.ts b/src/common/interfaces/email-verification-created-context.interface.ts new file mode 100644 index 000000000..56a671333 --- /dev/null +++ b/src/common/interfaces/email-verification-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + EmailVerificationCreatedContextGoogleAnalyticsSession, + EmailVerificationCreatedContextGoogleAnalyticsSessionResponse, +} from './email-verification-created-context-google-analytics-session.interface'; +import type { + EmailVerificationCreatedContextActor, + EmailVerificationCreatedContextActorResponse, +} from './email-verification-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface EmailVerificationCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: EmailVerificationCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: EmailVerificationCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface EmailVerificationCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: EmailVerificationCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: EmailVerificationCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/email-verification-created-data.interface.ts b/src/common/interfaces/email-verification-created-data.interface.ts new file mode 100644 index 000000000..726c2917b --- /dev/null +++ b/src/common/interfaces/email-verification-created-data.interface.ts @@ -0,0 +1,29 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface EmailVerificationCreatedData { + /** Distinguishes the email verification object. */ + object: 'email_verification'; + /** The unique ID of the email verification code. */ + id: string; + /** The unique ID of the user. */ + userId: string; + /** The email address of the user. */ + email: string; + /** The timestamp when the email verification code expires. */ + expiresAt: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface EmailVerificationCreatedDataResponse { + object: 'email_verification'; + id: string; + user_id: string; + email: string; + expires_at: string; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/email-verification-created.interface.ts b/src/common/interfaces/email-verification-created.interface.ts new file mode 100644 index 000000000..51f6d7542 --- /dev/null +++ b/src/common/interfaces/email-verification-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + EmailVerificationCreatedData, + EmailVerificationCreatedDataResponse, +} from './email-verification-created-data.interface'; +import type { + EmailVerificationCreatedContext, + EmailVerificationCreatedContextResponse, +} from './email-verification-created-context.interface'; + +export interface EmailVerificationCreated { + /** Unique identifier for the event. */ + id: string; + event: 'email_verification.created'; + /** The event payload. */ + data: EmailVerificationCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: EmailVerificationCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface EmailVerificationCreatedResponse { + id: string; + event: 'email_verification.created'; + data: EmailVerificationCreatedDataResponse; + created_at: string; + context?: EmailVerificationCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/event-context-actor-source.interface.ts b/src/common/interfaces/event-context-actor-source.interface.ts new file mode 100644 index 000000000..13a776c3b --- /dev/null +++ b/src/common/interfaces/event-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type EventContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/event-context-actor.interface.ts b/src/common/interfaces/event-context-actor.interface.ts new file mode 100644 index 000000000..f59613bbd --- /dev/null +++ b/src/common/interfaces/event-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { EventContextActorSource } from './event-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface EventContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: EventContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface EventContextActorResponse { + id: string; + source: EventContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/event-context-google-analytics-session.interface.ts b/src/common/interfaces/event-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..837f1adf9 --- /dev/null +++ b/src/common/interfaces/event-context-google-analytics-session.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface EventContextGoogleAnalyticsSession { + /** The Google Analytics container ID. */ + containerId: string; + /** The Google Analytics session ID. */ + sessionId?: string; + /** The Google Analytics session number. */ + sessionNumber?: string; +} + +export interface EventContextGoogleAnalyticsSessionResponse { + container_id: string; + session_id?: string; + session_number?: string; +} diff --git a/src/common/interfaces/event-context.interface.ts b/src/common/interfaces/event-context.interface.ts new file mode 100644 index 000000000..de156e472 --- /dev/null +++ b/src/common/interfaces/event-context.interface.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + EventContextGoogleAnalyticsSession, + EventContextGoogleAnalyticsSessionResponse, +} from './event-context-google-analytics-session.interface'; +import type { + EventContextActor, + EventContextActorResponse, +} from './event-context-actor.interface'; + +/** Additional context about the event. */ +export interface EventContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: EventContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + actor?: EventContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface EventContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: EventContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: EventContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/flag-created-context-actor-source.interface.ts b/src/common/interfaces/flag-created-context-actor-source.interface.ts new file mode 100644 index 000000000..80cbf6c1c --- /dev/null +++ b/src/common/interfaces/flag-created-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type FlagCreatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/flag-created-context-actor.interface.ts b/src/common/interfaces/flag-created-context-actor.interface.ts new file mode 100644 index 000000000..c889c629f --- /dev/null +++ b/src/common/interfaces/flag-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { FlagCreatedContextActorSource } from './flag-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface FlagCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: FlagCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface FlagCreatedContextActorResponse { + id: string; + source: FlagCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/flag-created-context.interface.ts b/src/common/interfaces/flag-created-context.interface.ts new file mode 100644 index 000000000..7b510ba3c --- /dev/null +++ b/src/common/interfaces/flag-created-context.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagCreatedContextActor, + FlagCreatedContextActorResponse, +} from './flag-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface FlagCreatedContext { + /** The client ID associated with the flag event. */ + clientId: string; + /** The actor who performed the action. */ + actor: FlagCreatedContextActor; +} + +export interface FlagCreatedContextResponse { + client_id: string; + actor: FlagCreatedContextActorResponse; +} diff --git a/src/common/interfaces/flag-created-data-owner.interface.ts b/src/common/interfaces/flag-created-data-owner.interface.ts new file mode 100644 index 000000000..4414fd3e7 --- /dev/null +++ b/src/common/interfaces/flag-created-data-owner.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface FlagCreatedDataOwner { + /** The email address of the flag owner. */ + email: string; + /** The first name of the flag owner. */ + firstName: string | null; + /** The last name of the flag owner. */ + lastName: string | null; +} + +export interface FlagCreatedDataOwnerResponse { + email: string; + first_name: string | null; + last_name: string | null; +} diff --git a/src/common/interfaces/flag-created-data.interface.ts b/src/common/interfaces/flag-created-data.interface.ts new file mode 100644 index 000000000..0fe5a1532 --- /dev/null +++ b/src/common/interfaces/flag-created-data.interface.ts @@ -0,0 +1,48 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagCreatedDataOwner, + FlagCreatedDataOwnerResponse, +} from './flag-created-data-owner.interface'; + +/** The event payload. */ +export interface FlagCreatedData { + object: 'feature_flag'; + /** Unique identifier of the Feature Flag. */ + id: string; + /** The ID of the environment the Feature Flag belongs to. */ + environmentId: string; + /** A unique key to reference the Feature Flag. */ + slug: string; + /** A descriptive name for the Feature Flag. */ + name: string; + /** A description for the Feature Flag. */ + description: string | null; + /** The owner of the Feature Flag. */ + owner: FlagCreatedDataOwner | null; + /** Labels assigned to the Feature Flag for categorizing and filtering. */ + tags: string[]; + /** Specifies whether the Feature Flag is active for the current environment. */ + enabled: boolean; + /** The value returned for users and organizations who don't match any configured targeting rules. */ + defaultValue: boolean; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface FlagCreatedDataResponse { + object: 'feature_flag'; + id: string; + environment_id: string; + slug: string; + name: string; + description: string | null; + owner: FlagCreatedDataOwnerResponse | null; + tags: string[]; + enabled: boolean; + default_value: boolean; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/flag-created.interface.ts b/src/common/interfaces/flag-created.interface.ts new file mode 100644 index 000000000..93c8f5f55 --- /dev/null +++ b/src/common/interfaces/flag-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagCreatedData, + FlagCreatedDataResponse, +} from './flag-created-data.interface'; +import type { + FlagCreatedContext, + FlagCreatedContextResponse, +} from './flag-created-context.interface'; + +export interface FlagCreated { + /** Unique identifier for the event. */ + id: string; + event: 'flag.created'; + /** The event payload. */ + data: FlagCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context: FlagCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface FlagCreatedResponse { + id: string; + event: 'flag.created'; + data: FlagCreatedDataResponse; + created_at: string; + context: FlagCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/flag-deleted-context-actor-source.interface.ts b/src/common/interfaces/flag-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..fc917668e --- /dev/null +++ b/src/common/interfaces/flag-deleted-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type FlagDeletedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/flag-deleted-context-actor.interface.ts b/src/common/interfaces/flag-deleted-context-actor.interface.ts new file mode 100644 index 000000000..fdda14286 --- /dev/null +++ b/src/common/interfaces/flag-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { FlagDeletedContextActorSource } from './flag-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface FlagDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: FlagDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface FlagDeletedContextActorResponse { + id: string; + source: FlagDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/flag-deleted-context.interface.ts b/src/common/interfaces/flag-deleted-context.interface.ts new file mode 100644 index 000000000..f46d51a12 --- /dev/null +++ b/src/common/interfaces/flag-deleted-context.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagDeletedContextActor, + FlagDeletedContextActorResponse, +} from './flag-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface FlagDeletedContext { + /** The client ID associated with the flag event. */ + clientId: string; + /** The actor who performed the action. */ + actor: FlagDeletedContextActor; +} + +export interface FlagDeletedContextResponse { + client_id: string; + actor: FlagDeletedContextActorResponse; +} diff --git a/src/common/interfaces/flag-deleted-data-owner.interface.ts b/src/common/interfaces/flag-deleted-data-owner.interface.ts new file mode 100644 index 000000000..bb51d0976 --- /dev/null +++ b/src/common/interfaces/flag-deleted-data-owner.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagCreatedDataOwner, + FlagCreatedDataOwnerResponse, +} from './flag-created-data-owner.interface'; + +export type FlagDeletedDataOwner = FlagCreatedDataOwner; +export type FlagDeletedDataOwnerResponse = FlagCreatedDataOwnerResponse; diff --git a/src/common/interfaces/flag-deleted-data.interface.ts b/src/common/interfaces/flag-deleted-data.interface.ts new file mode 100644 index 000000000..6e9a2d3ae --- /dev/null +++ b/src/common/interfaces/flag-deleted-data.interface.ts @@ -0,0 +1,48 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagDeletedDataOwner, + FlagDeletedDataOwnerResponse, +} from './flag-deleted-data-owner.interface'; + +/** The event payload. */ +export interface FlagDeletedData { + object: 'feature_flag'; + /** Unique identifier of the Feature Flag. */ + id: string; + /** The ID of the environment the Feature Flag belongs to. */ + environmentId: string; + /** A unique key to reference the Feature Flag. */ + slug: string; + /** A descriptive name for the Feature Flag. */ + name: string; + /** A description for the Feature Flag. */ + description: string | null; + /** The owner of the Feature Flag. */ + owner: FlagDeletedDataOwner | null; + /** Labels assigned to the Feature Flag for categorizing and filtering. */ + tags: string[]; + /** Specifies whether the Feature Flag is active for the current environment. */ + enabled: boolean; + /** The value returned for users and organizations who don't match any configured targeting rules. */ + defaultValue: boolean; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface FlagDeletedDataResponse { + object: 'feature_flag'; + id: string; + environment_id: string; + slug: string; + name: string; + description: string | null; + owner: FlagDeletedDataOwnerResponse | null; + tags: string[]; + enabled: boolean; + default_value: boolean; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/flag-deleted.interface.ts b/src/common/interfaces/flag-deleted.interface.ts new file mode 100644 index 000000000..6d5cfb1da --- /dev/null +++ b/src/common/interfaces/flag-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagDeletedData, + FlagDeletedDataResponse, +} from './flag-deleted-data.interface'; +import type { + FlagDeletedContext, + FlagDeletedContextResponse, +} from './flag-deleted-context.interface'; + +export interface FlagDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'flag.deleted'; + /** The event payload. */ + data: FlagDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context: FlagDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface FlagDeletedResponse { + id: string; + event: 'flag.deleted'; + data: FlagDeletedDataResponse; + created_at: string; + context: FlagDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/flag-rule-updated-context-access-type.interface.ts b/src/common/interfaces/flag-rule-updated-context-access-type.interface.ts new file mode 100644 index 000000000..84309ce7c --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-access-type.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type FlagRuleUpdatedContextAccessType = 'none' | 'some' | 'all'; diff --git a/src/common/interfaces/flag-rule-updated-context-actor-source.interface.ts b/src/common/interfaces/flag-rule-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..dc5d11311 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type FlagRuleUpdatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/flag-rule-updated-context-actor.interface.ts b/src/common/interfaces/flag-rule-updated-context-actor.interface.ts new file mode 100644 index 000000000..6df921268 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-actor.interface.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { FlagRuleUpdatedContextActorSource } from './flag-rule-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface FlagRuleUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + source: FlagRuleUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface FlagRuleUpdatedContextActorResponse { + id: string; + source: FlagRuleUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/flag-rule-updated-context-configured-target-organization.interface.ts b/src/common/interfaces/flag-rule-updated-context-configured-target-organization.interface.ts new file mode 100644 index 000000000..2576656d9 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-configured-target-organization.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface FlagRuleUpdatedContextConfiguredTargetOrganization { + /** The ID of the organization. */ + id: string; + /** The name of the organization. */ + name: string; +} + +export interface FlagRuleUpdatedContextConfiguredTargetOrganizationResponse { + id: string; + name: string; +} diff --git a/src/common/interfaces/flag-rule-updated-context-configured-target-user.interface.ts b/src/common/interfaces/flag-rule-updated-context-configured-target-user.interface.ts new file mode 100644 index 000000000..fbf9d2948 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-configured-target-user.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface FlagRuleUpdatedContextConfiguredTargetUser { + /** The ID of the user. */ + id: string; + /** The email of the user. */ + email: string; +} + +export interface FlagRuleUpdatedContextConfiguredTargetUserResponse { + id: string; + email: string; +} diff --git a/src/common/interfaces/flag-rule-updated-context-configured-target.interface.ts b/src/common/interfaces/flag-rule-updated-context-configured-target.interface.ts new file mode 100644 index 000000000..41c1c6d20 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-configured-target.interface.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagRuleUpdatedContextConfiguredTargetOrganization, + FlagRuleUpdatedContextConfiguredTargetOrganizationResponse, +} from './flag-rule-updated-context-configured-target-organization.interface'; +import type { + FlagRuleUpdatedContextConfiguredTargetUser, + FlagRuleUpdatedContextConfiguredTargetUserResponse, +} from './flag-rule-updated-context-configured-target-user.interface'; + +/** The configured targets for the flag rule. */ +export interface FlagRuleUpdatedContextConfiguredTarget { + /** The organizations targeted by the flag rule. */ + organizations: FlagRuleUpdatedContextConfiguredTargetOrganization[]; + /** The users targeted by the flag rule. */ + users: FlagRuleUpdatedContextConfiguredTargetUser[]; +} + +export interface FlagRuleUpdatedContextConfiguredTargetResponse { + organizations: FlagRuleUpdatedContextConfiguredTargetOrganizationResponse[]; + users: FlagRuleUpdatedContextConfiguredTargetUserResponse[]; +} diff --git a/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-access-type.interface.ts b/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-access-type.interface.ts new file mode 100644 index 000000000..1fdfd27b0 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-access-type.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type FlagRuleUpdatedContextPreviousAttributeContextAccessType = + | 'none' + | 'some' + | 'all'; diff --git a/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target-organization.interface.ts b/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target-organization.interface.ts new file mode 100644 index 000000000..49362ab84 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target-organization.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagRuleUpdatedContextConfiguredTargetOrganization, + FlagRuleUpdatedContextConfiguredTargetOrganizationResponse, +} from './flag-rule-updated-context-configured-target-organization.interface'; + +export type FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetOrganization = + FlagRuleUpdatedContextConfiguredTargetOrganization; +export type FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetOrganizationResponse = + FlagRuleUpdatedContextConfiguredTargetOrganizationResponse; diff --git a/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target-user.interface.ts b/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target-user.interface.ts new file mode 100644 index 000000000..ffaff6638 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target-user.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagRuleUpdatedContextConfiguredTargetUser, + FlagRuleUpdatedContextConfiguredTargetUserResponse, +} from './flag-rule-updated-context-configured-target-user.interface'; + +export type FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetUser = + FlagRuleUpdatedContextConfiguredTargetUser; +export type FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetUserResponse = + FlagRuleUpdatedContextConfiguredTargetUserResponse; diff --git a/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target.interface.ts b/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target.interface.ts new file mode 100644 index 000000000..9f3221c1c --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target.interface.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetOrganization, + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetOrganizationResponse, +} from './flag-rule-updated-context-previous-attribute-context-configured-target-organization.interface'; +import type { + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetUser, + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetUserResponse, +} from './flag-rule-updated-context-previous-attribute-context-configured-target-user.interface'; + +/** The previous configured targets for the flag rule. */ +export interface FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget { + /** The organizations targeted by the flag rule. */ + organizations: FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetOrganization[]; + /** The users targeted by the flag rule. */ + users: FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetUser[]; +} + +export interface FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetResponse { + organizations: FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetOrganizationResponse[]; + users: FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetUserResponse[]; +} diff --git a/src/common/interfaces/flag-rule-updated-context-previous-attribute-context.interface.ts b/src/common/interfaces/flag-rule-updated-context-previous-attribute-context.interface.ts new file mode 100644 index 000000000..53d050411 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-previous-attribute-context.interface.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget, + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetResponse, +} from './flag-rule-updated-context-previous-attribute-context-configured-target.interface'; +import type { FlagRuleUpdatedContextPreviousAttributeContextAccessType } from './flag-rule-updated-context-previous-attribute-context-access-type.interface'; + +/** The previous context attributes of the flag rule. */ +export interface FlagRuleUpdatedContextPreviousAttributeContext { + /** The previous access type of the flag rule. */ + accessType?: FlagRuleUpdatedContextPreviousAttributeContextAccessType; + /** The previous configured targets for the flag rule. */ + configuredTargets?: FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget; +} + +export interface FlagRuleUpdatedContextPreviousAttributeContextResponse { + access_type?: FlagRuleUpdatedContextPreviousAttributeContextAccessType; + configured_targets?: FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetResponse; +} diff --git a/src/common/interfaces/flag-rule-updated-context-previous-attribute-data.interface.ts b/src/common/interfaces/flag-rule-updated-context-previous-attribute-data.interface.ts new file mode 100644 index 000000000..018f98fe2 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-previous-attribute-data.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The previous data attributes of the flag. */ +export interface FlagRuleUpdatedContextPreviousAttributeData { + /** Whether the flag was previously enabled. */ + enabled?: boolean; + /** The previous default value of the flag. */ + defaultValue?: boolean; +} + +export interface FlagRuleUpdatedContextPreviousAttributeDataResponse { + enabled?: boolean; + default_value?: boolean; +} diff --git a/src/common/interfaces/flag-rule-updated-context-previous-attribute.interface.ts b/src/common/interfaces/flag-rule-updated-context-previous-attribute.interface.ts new file mode 100644 index 000000000..3d3d2b8b4 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context-previous-attribute.interface.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagRuleUpdatedContextPreviousAttributeData, + FlagRuleUpdatedContextPreviousAttributeDataResponse, +} from './flag-rule-updated-context-previous-attribute-data.interface'; +import type { + FlagRuleUpdatedContextPreviousAttributeContext, + FlagRuleUpdatedContextPreviousAttributeContextResponse, +} from './flag-rule-updated-context-previous-attribute-context.interface'; + +/** Attributes that changed from their previous values. */ +export interface FlagRuleUpdatedContextPreviousAttribute { + /** The previous data attributes of the flag. */ + data?: FlagRuleUpdatedContextPreviousAttributeData; + /** The previous context attributes of the flag rule. */ + context?: FlagRuleUpdatedContextPreviousAttributeContext; +} + +export interface FlagRuleUpdatedContextPreviousAttributeResponse { + data?: FlagRuleUpdatedContextPreviousAttributeDataResponse; + context?: FlagRuleUpdatedContextPreviousAttributeContextResponse; +} diff --git a/src/common/interfaces/flag-rule-updated-context.interface.ts b/src/common/interfaces/flag-rule-updated-context.interface.ts new file mode 100644 index 000000000..3162d5b19 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-context.interface.ts @@ -0,0 +1,37 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagRuleUpdatedContextActor, + FlagRuleUpdatedContextActorResponse, +} from './flag-rule-updated-context-actor.interface'; +import type { + FlagRuleUpdatedContextConfiguredTarget, + FlagRuleUpdatedContextConfiguredTargetResponse, +} from './flag-rule-updated-context-configured-target.interface'; +import type { + FlagRuleUpdatedContextPreviousAttribute, + FlagRuleUpdatedContextPreviousAttributeResponse, +} from './flag-rule-updated-context-previous-attribute.interface'; +import type { FlagRuleUpdatedContextAccessType } from './flag-rule-updated-context-access-type.interface'; + +/** Additional context about the event. */ +export interface FlagRuleUpdatedContext { + /** The client ID associated with the flag event. */ + clientId: string; + /** The actor who performed the action. */ + actor: FlagRuleUpdatedContextActor; + /** The access type of the flag rule. */ + accessType: FlagRuleUpdatedContextAccessType; + /** The configured targets for the flag rule. */ + configuredTargets: FlagRuleUpdatedContextConfiguredTarget; + /** Attributes that changed from their previous values. */ + previousAttributes: FlagRuleUpdatedContextPreviousAttribute; +} + +export interface FlagRuleUpdatedContextResponse { + client_id: string; + actor: FlagRuleUpdatedContextActorResponse; + access_type: FlagRuleUpdatedContextAccessType; + configured_targets: FlagRuleUpdatedContextConfiguredTargetResponse; + previous_attributes: FlagRuleUpdatedContextPreviousAttributeResponse; +} diff --git a/src/common/interfaces/flag-rule-updated-data-owner.interface.ts b/src/common/interfaces/flag-rule-updated-data-owner.interface.ts new file mode 100644 index 000000000..2c482caaa --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-data-owner.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagCreatedDataOwner, + FlagCreatedDataOwnerResponse, +} from './flag-created-data-owner.interface'; + +export type FlagRuleUpdatedDataOwner = FlagCreatedDataOwner; +export type FlagRuleUpdatedDataOwnerResponse = FlagCreatedDataOwnerResponse; diff --git a/src/common/interfaces/flag-rule-updated-data.interface.ts b/src/common/interfaces/flag-rule-updated-data.interface.ts new file mode 100644 index 000000000..078370454 --- /dev/null +++ b/src/common/interfaces/flag-rule-updated-data.interface.ts @@ -0,0 +1,48 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagRuleUpdatedDataOwner, + FlagRuleUpdatedDataOwnerResponse, +} from './flag-rule-updated-data-owner.interface'; + +/** The event payload. */ +export interface FlagRuleUpdatedData { + object: 'feature_flag'; + /** Unique identifier of the Feature Flag. */ + id: string; + /** The ID of the environment the Feature Flag belongs to. */ + environmentId: string; + /** A unique key to reference the Feature Flag. */ + slug: string; + /** A descriptive name for the Feature Flag. */ + name: string; + /** A description for the Feature Flag. */ + description: string | null; + /** The owner of the Feature Flag. */ + owner: FlagRuleUpdatedDataOwner | null; + /** Labels assigned to the Feature Flag for categorizing and filtering. */ + tags: string[]; + /** Specifies whether the Feature Flag is active for the current environment. */ + enabled: boolean; + /** The value returned for users and organizations who don't match any configured targeting rules. */ + defaultValue: boolean; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface FlagRuleUpdatedDataResponse { + object: 'feature_flag'; + id: string; + environment_id: string; + slug: string; + name: string; + description: string | null; + owner: FlagRuleUpdatedDataOwnerResponse | null; + tags: string[]; + enabled: boolean; + default_value: boolean; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/flag-rule-updated.interface.ts b/src/common/interfaces/flag-rule-updated.interface.ts new file mode 100644 index 000000000..abb62d46e --- /dev/null +++ b/src/common/interfaces/flag-rule-updated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagRuleUpdatedData, + FlagRuleUpdatedDataResponse, +} from './flag-rule-updated-data.interface'; +import type { + FlagRuleUpdatedContext, + FlagRuleUpdatedContextResponse, +} from './flag-rule-updated-context.interface'; + +export interface FlagRuleUpdated { + /** Unique identifier for the event. */ + id: string; + event: 'flag.rule_updated'; + /** The event payload. */ + data: FlagRuleUpdatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context: FlagRuleUpdatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface FlagRuleUpdatedResponse { + id: string; + event: 'flag.rule_updated'; + data: FlagRuleUpdatedDataResponse; + created_at: string; + context: FlagRuleUpdatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/flag-updated-context-actor-source.interface.ts b/src/common/interfaces/flag-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..9efc10308 --- /dev/null +++ b/src/common/interfaces/flag-updated-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type FlagUpdatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/flag-updated-context-actor.interface.ts b/src/common/interfaces/flag-updated-context-actor.interface.ts new file mode 100644 index 000000000..00481282c --- /dev/null +++ b/src/common/interfaces/flag-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { FlagUpdatedContextActorSource } from './flag-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface FlagUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: FlagUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface FlagUpdatedContextActorResponse { + id: string; + source: FlagUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/flag-updated-context-previous-attribute-data.interface.ts b/src/common/interfaces/flag-updated-context-previous-attribute-data.interface.ts new file mode 100644 index 000000000..98177e01c --- /dev/null +++ b/src/common/interfaces/flag-updated-context-previous-attribute-data.interface.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The previous data attributes of the flag. */ +export interface FlagUpdatedContextPreviousAttributeData { + /** The previous name of the flag. */ + name?: string; + /** The previous description of the flag. */ + description?: string | null; + /** The previous tags of the flag. */ + tags?: string[]; + /** Whether the flag was previously enabled. */ + enabled?: boolean; + /** The previous default value of the flag. */ + defaultValue?: boolean; +} + +export interface FlagUpdatedContextPreviousAttributeDataResponse { + name?: string; + description?: string | null; + tags?: string[]; + enabled?: boolean; + default_value?: boolean; +} diff --git a/src/common/interfaces/flag-updated-context-previous-attribute.interface.ts b/src/common/interfaces/flag-updated-context-previous-attribute.interface.ts new file mode 100644 index 000000000..b6b366ee1 --- /dev/null +++ b/src/common/interfaces/flag-updated-context-previous-attribute.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagUpdatedContextPreviousAttributeData, + FlagUpdatedContextPreviousAttributeDataResponse, +} from './flag-updated-context-previous-attribute-data.interface'; + +/** Attributes that changed from their previous values. */ +export interface FlagUpdatedContextPreviousAttribute { + /** The previous data attributes of the flag. */ + data?: FlagUpdatedContextPreviousAttributeData; +} + +export interface FlagUpdatedContextPreviousAttributeResponse { + data?: FlagUpdatedContextPreviousAttributeDataResponse; +} diff --git a/src/common/interfaces/flag-updated-context.interface.ts b/src/common/interfaces/flag-updated-context.interface.ts new file mode 100644 index 000000000..619e9b036 --- /dev/null +++ b/src/common/interfaces/flag-updated-context.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagUpdatedContextActor, + FlagUpdatedContextActorResponse, +} from './flag-updated-context-actor.interface'; +import type { + FlagUpdatedContextPreviousAttribute, + FlagUpdatedContextPreviousAttributeResponse, +} from './flag-updated-context-previous-attribute.interface'; + +/** Additional context about the event. */ +export interface FlagUpdatedContext { + /** The client ID associated with the flag event. */ + clientId: string; + /** The actor who performed the action. */ + actor: FlagUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: FlagUpdatedContextPreviousAttribute; +} + +export interface FlagUpdatedContextResponse { + client_id: string; + actor: FlagUpdatedContextActorResponse; + previous_attributes?: FlagUpdatedContextPreviousAttributeResponse; +} diff --git a/src/common/interfaces/flag-updated-data-owner.interface.ts b/src/common/interfaces/flag-updated-data-owner.interface.ts new file mode 100644 index 000000000..993a6d3f1 --- /dev/null +++ b/src/common/interfaces/flag-updated-data-owner.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagCreatedDataOwner, + FlagCreatedDataOwnerResponse, +} from './flag-created-data-owner.interface'; + +export type FlagUpdatedDataOwner = FlagCreatedDataOwner; +export type FlagUpdatedDataOwnerResponse = FlagCreatedDataOwnerResponse; diff --git a/src/common/interfaces/flag-updated-data.interface.ts b/src/common/interfaces/flag-updated-data.interface.ts new file mode 100644 index 000000000..d83def042 --- /dev/null +++ b/src/common/interfaces/flag-updated-data.interface.ts @@ -0,0 +1,48 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagUpdatedDataOwner, + FlagUpdatedDataOwnerResponse, +} from './flag-updated-data-owner.interface'; + +/** The event payload. */ +export interface FlagUpdatedData { + object: 'feature_flag'; + /** Unique identifier of the Feature Flag. */ + id: string; + /** The ID of the environment the Feature Flag belongs to. */ + environmentId: string; + /** A unique key to reference the Feature Flag. */ + slug: string; + /** A descriptive name for the Feature Flag. */ + name: string; + /** A description for the Feature Flag. */ + description: string | null; + /** The owner of the Feature Flag. */ + owner: FlagUpdatedDataOwner | null; + /** Labels assigned to the Feature Flag for categorizing and filtering. */ + tags: string[]; + /** Specifies whether the Feature Flag is active for the current environment. */ + enabled: boolean; + /** The value returned for users and organizations who don't match any configured targeting rules. */ + defaultValue: boolean; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface FlagUpdatedDataResponse { + object: 'feature_flag'; + id: string; + environment_id: string; + slug: string; + name: string; + description: string | null; + owner: FlagUpdatedDataOwnerResponse | null; + tags: string[]; + enabled: boolean; + default_value: boolean; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/flag-updated.interface.ts b/src/common/interfaces/flag-updated.interface.ts new file mode 100644 index 000000000..491b3f412 --- /dev/null +++ b/src/common/interfaces/flag-updated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagUpdatedData, + FlagUpdatedDataResponse, +} from './flag-updated-data.interface'; +import type { + FlagUpdatedContext, + FlagUpdatedContextResponse, +} from './flag-updated-context.interface'; + +export interface FlagUpdated { + /** Unique identifier for the event. */ + id: string; + event: 'flag.updated'; + /** The event payload. */ + data: FlagUpdatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context: FlagUpdatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface FlagUpdatedResponse { + id: string; + event: 'flag.updated'; + data: FlagUpdatedDataResponse; + created_at: string; + context: FlagUpdatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/index.ts b/src/common/interfaces/index.ts index c9abe5235..e61123f24 100644 --- a/src/common/interfaces/index.ts +++ b/src/common/interfaces/index.ts @@ -1,11 +1,677 @@ +// This file is auto-generated by oagen. Do not edit. + +export * from './action-authentication-denied-context-actor-source.interface'; +export * from './action-authentication-denied-context-actor.interface'; +export * from './action-authentication-denied-context-google-analytics-session.interface'; +export * from './action-authentication-denied-context.interface'; +export * from './action-authentication-denied-data.interface'; +export * from './action-authentication-denied.interface'; +export * from './action-user-registration-denied-context-actor-source.interface'; +export * from './action-user-registration-denied-context-actor.interface'; +export * from './action-user-registration-denied-context-google-analytics-session.interface'; +export * from './action-user-registration-denied-context.interface'; +export * from './action-user-registration-denied-data.interface'; +export * from './action-user-registration-denied.interface'; +export * from './api-key-created-context-actor-source.interface'; +export * from './api-key-created-context-actor.interface'; +export * from './api-key-created-context-google-analytics-session.interface'; +export * from './api-key-created-context.interface'; +export * from './api-key-created-data-owner.interface'; +export * from './api-key-created-data.interface'; +export * from './api-key-created.interface'; +export * from './api-key-revoked-context-actor-source.interface'; +export * from './api-key-revoked-context-actor.interface'; +export * from './api-key-revoked-context-google-analytics-session.interface'; +export * from './api-key-revoked-context.interface'; +export * from './api-key-revoked-data-owner.interface'; +export * from './api-key-revoked-data.interface'; +export * from './api-key-revoked.interface'; +export * from './audit-log-configuration-log-stream-state.interface'; +export * from './audit-log-configuration-log-stream-type.interface'; +export * from './audit-log-configuration-state.interface'; +export * from './audit-log-export-json-state.interface'; +export * from './authenticate-response-authentication-method.interface'; +export * from './authentication-email-verification-failed-context-actor-source.interface'; +export * from './authentication-email-verification-failed-context-actor.interface'; +export * from './authentication-email-verification-failed-context-google-analytics-session.interface'; +export * from './authentication-email-verification-failed-context.interface'; +export * from './authentication-email-verification-failed-data-error.interface'; +export * from './authentication-email-verification-failed-data.interface'; +export * from './authentication-email-verification-failed.interface'; +export * from './authentication-email-verification-succeeded-context-actor-source.interface'; +export * from './authentication-email-verification-succeeded-context-actor.interface'; +export * from './authentication-email-verification-succeeded-context-google-analytics-session.interface'; +export * from './authentication-email-verification-succeeded-context.interface'; +export * from './authentication-email-verification-succeeded-data.interface'; +export * from './authentication-email-verification-succeeded.interface'; +export * from './authentication-factor-enrolled-type.interface'; +export * from './authentication-factor-totp-2.interface'; +export * from './authentication-factor-type.interface'; +export * from './authentication-factors-create-request-type.interface'; +export * from './authentication-magic-auth-failed-context-actor-source.interface'; +export * from './authentication-magic-auth-failed-context-actor.interface'; +export * from './authentication-magic-auth-failed-context-google-analytics-session.interface'; +export * from './authentication-magic-auth-failed-context.interface'; +export * from './authentication-magic-auth-failed-data-error.interface'; +export * from './authentication-magic-auth-failed-data.interface'; +export * from './authentication-magic-auth-failed.interface'; +export * from './authentication-magic-auth-succeeded-context-actor-source.interface'; +export * from './authentication-magic-auth-succeeded-context-actor.interface'; +export * from './authentication-magic-auth-succeeded-context-google-analytics-session.interface'; +export * from './authentication-magic-auth-succeeded-context.interface'; +export * from './authentication-magic-auth-succeeded-data.interface'; +export * from './authentication-magic-auth-succeeded.interface'; +export * from './authentication-mfa-failed-context-actor-source.interface'; +export * from './authentication-mfa-failed-context-actor.interface'; +export * from './authentication-mfa-failed-context-google-analytics-session.interface'; +export * from './authentication-mfa-failed-context.interface'; +export * from './authentication-mfa-failed-data-error.interface'; +export * from './authentication-mfa-failed-data.interface'; +export * from './authentication-mfa-failed.interface'; +export * from './authentication-mfa-succeeded-context-actor-source.interface'; +export * from './authentication-mfa-succeeded-context-actor.interface'; +export * from './authentication-mfa-succeeded-context-google-analytics-session.interface'; +export * from './authentication-mfa-succeeded-context.interface'; +export * from './authentication-mfa-succeeded-data.interface'; +export * from './authentication-mfa-succeeded.interface'; +export * from './authentication-oauth-failed-context-actor-source.interface'; +export * from './authentication-oauth-failed-context-actor.interface'; +export * from './authentication-oauth-failed-context-google-analytics-session.interface'; +export * from './authentication-oauth-failed-context.interface'; +export * from './authentication-oauth-failed-data-error.interface'; +export * from './authentication-oauth-failed-data.interface'; +export * from './authentication-oauth-failed.interface'; +export * from './authentication-oauth-succeeded-context-actor-source.interface'; +export * from './authentication-oauth-succeeded-context-actor.interface'; +export * from './authentication-oauth-succeeded-context-google-analytics-session.interface'; +export * from './authentication-oauth-succeeded-context.interface'; +export * from './authentication-oauth-succeeded-data.interface'; +export * from './authentication-oauth-succeeded.interface'; +export * from './authentication-passkey-failed-context-actor-source.interface'; +export * from './authentication-passkey-failed-context-actor.interface'; +export * from './authentication-passkey-failed-context-google-analytics-session.interface'; +export * from './authentication-passkey-failed-context.interface'; +export * from './authentication-passkey-failed-data-error.interface'; +export * from './authentication-passkey-failed-data.interface'; +export * from './authentication-passkey-failed.interface'; +export * from './authentication-passkey-succeeded-context-actor-source.interface'; +export * from './authentication-passkey-succeeded-context-actor.interface'; +export * from './authentication-passkey-succeeded-context-google-analytics-session.interface'; +export * from './authentication-passkey-succeeded-context.interface'; +export * from './authentication-passkey-succeeded-data.interface'; +export * from './authentication-passkey-succeeded.interface'; +export * from './authentication-password-failed-context-actor-source.interface'; +export * from './authentication-password-failed-context-actor.interface'; +export * from './authentication-password-failed-context-google-analytics-session.interface'; +export * from './authentication-password-failed-context.interface'; +export * from './authentication-password-failed-data-error.interface'; +export * from './authentication-password-failed-data.interface'; +export * from './authentication-password-failed.interface'; +export * from './authentication-password-succeeded-context-actor-source.interface'; +export * from './authentication-password-succeeded-context-actor.interface'; +export * from './authentication-password-succeeded-context-google-analytics-session.interface'; +export * from './authentication-password-succeeded-context.interface'; +export * from './authentication-password-succeeded-data.interface'; +export * from './authentication-password-succeeded.interface'; +export * from './authentication-radar-risk-detected-context-actor-source.interface'; +export * from './authentication-radar-risk-detected-context-actor.interface'; +export * from './authentication-radar-risk-detected-context-google-analytics-session.interface'; +export * from './authentication-radar-risk-detected-context.interface'; +export * from './authentication-radar-risk-detected-data-action.interface'; +export * from './authentication-radar-risk-detected-data.interface'; +export * from './authentication-radar-risk-detected.interface'; +export * from './authentication-sso-failed-context-actor-source.interface'; +export * from './authentication-sso-failed-context-actor.interface'; +export * from './authentication-sso-failed-context-google-analytics-session.interface'; +export * from './authentication-sso-failed-context.interface'; +export * from './authentication-sso-failed-data-error.interface'; +export * from './authentication-sso-failed-data-sso.interface'; +export * from './authentication-sso-failed-data.interface'; +export * from './authentication-sso-failed.interface'; +export * from './authentication-sso-started-context-actor-source.interface'; +export * from './authentication-sso-started-context-actor.interface'; +export * from './authentication-sso-started-context-google-analytics-session.interface'; +export * from './authentication-sso-started-context.interface'; +export * from './authentication-sso-started-data-sso.interface'; +export * from './authentication-sso-started-data.interface'; +export * from './authentication-sso-started.interface'; +export * from './authentication-sso-succeeded-context-actor-source.interface'; +export * from './authentication-sso-succeeded-context-actor.interface'; +export * from './authentication-sso-succeeded-context-google-analytics-session.interface'; +export * from './authentication-sso-succeeded-context.interface'; +export * from './authentication-sso-succeeded-data-sso.interface'; +export * from './authentication-sso-succeeded-data.interface'; +export * from './authentication-sso-succeeded.interface'; +export * from './authentication-sso-timed-out-context-actor-source.interface'; +export * from './authentication-sso-timed-out-context-actor.interface'; +export * from './authentication-sso-timed-out-context-google-analytics-session.interface'; +export * from './authentication-sso-timed-out-context.interface'; +export * from './authentication-sso-timed-out-data-error.interface'; +export * from './authentication-sso-timed-out-data-sso.interface'; +export * from './authentication-sso-timed-out-data.interface'; +export * from './authentication-sso-timed-out.interface'; +export * from './authorization-organization-roles-type.interface'; +export * from './authorization-organization-roles-update-priority-order-item-type.interface'; +export * from './connected-account-state.interface'; +export * from './connection-activated-context-actor-source.interface'; +export * from './connection-activated-context-actor.interface'; +export * from './connection-activated-context-google-analytics-session.interface'; +export * from './connection-activated-context.interface'; +export * from './connection-activated-data-connection-type.interface'; +export * from './connection-activated-data-domain.interface'; +export * from './connection-activated-data-state.interface'; +export * from './connection-activated-data-status.interface'; +export * from './connection-activated-data.interface'; +export * from './connection-activated.interface'; +export * from './connection-deactivated-context-actor-source.interface'; +export * from './connection-deactivated-context-actor.interface'; +export * from './connection-deactivated-context-google-analytics-session.interface'; +export * from './connection-deactivated-context.interface'; +export * from './connection-deactivated-data-connection-type.interface'; +export * from './connection-deactivated-data-domain.interface'; +export * from './connection-deactivated-data-state.interface'; +export * from './connection-deactivated-data-status.interface'; +export * from './connection-deactivated-data.interface'; +export * from './connection-deactivated.interface'; +export * from './connection-deleted-context-actor-source.interface'; +export * from './connection-deleted-context-actor.interface'; +export * from './connection-deleted-context-google-analytics-session.interface'; +export * from './connection-deleted-context.interface'; +export * from './connection-deleted-data-connection-type.interface'; +export * from './connection-deleted-data-state.interface'; +export * from './connection-deleted-data.interface'; +export * from './connection-deleted.interface'; +export * from './connection-saml-certificate-renewal-required-context-actor-source.interface'; +export * from './connection-saml-certificate-renewal-required-context-actor.interface'; +export * from './connection-saml-certificate-renewal-required-context-google-analytics-session.interface'; +export * from './connection-saml-certificate-renewal-required-context.interface'; +export * from './connection-saml-certificate-renewal-required-data-certificate-certificate-type.interface'; +export * from './connection-saml-certificate-renewal-required-data-certificate.interface'; +export * from './connection-saml-certificate-renewal-required-data-connection.interface'; +export * from './connection-saml-certificate-renewal-required-data.interface'; +export * from './connection-saml-certificate-renewal-required.interface'; +export * from './connection-saml-certificate-renewed-context-actor-source.interface'; +export * from './connection-saml-certificate-renewed-context-actor.interface'; +export * from './connection-saml-certificate-renewed-context-google-analytics-session.interface'; +export * from './connection-saml-certificate-renewed-context.interface'; +export * from './connection-saml-certificate-renewed-data-certificate-certificate-type.interface'; +export * from './connection-saml-certificate-renewed-data-certificate.interface'; +export * from './connection-saml-certificate-renewed-data-connection.interface'; +export * from './connection-saml-certificate-renewed-data.interface'; +export * from './connection-saml-certificate-renewed.interface'; +export * from './connection-state.interface'; +export * from './connection-status.interface'; +export * from './create-user-invite-options-locale.interface'; +export * from './create-user-password-hash-type.interface'; +export * from './create-webhook-endpoint-events.interface'; +export * from './data-integrations-list-response-data-connected-account-state.interface'; +export * from './data-integrations-list-response-data-ownership.interface'; +export * from './directory-user-email.interface'; +export * from './directory-user-state.interface'; +export * from './directory-user-with-groups-state.interface'; +export * from './dsync-activated-context-actor-source.interface'; +export * from './dsync-activated-context-actor.interface'; +export * from './dsync-activated-context-google-analytics-session.interface'; +export * from './dsync-activated-context.interface'; +export * from './dsync-activated-data-domain.interface'; +export * from './dsync-activated-data-state.interface'; +export * from './dsync-activated-data-type.interface'; +export * from './dsync-activated-data.interface'; +export * from './dsync-activated.interface'; +export * from './dsync-deactivated-context-actor-source.interface'; +export * from './dsync-deactivated-context-actor.interface'; +export * from './dsync-deactivated-context-google-analytics-session.interface'; +export * from './dsync-deactivated-context.interface'; +export * from './dsync-deactivated-data-domain.interface'; +export * from './dsync-deactivated-data-state.interface'; +export * from './dsync-deactivated-data-type.interface'; +export * from './dsync-deactivated-data.interface'; +export * from './dsync-deactivated.interface'; +export * from './dsync-deleted-context-actor-source.interface'; +export * from './dsync-deleted-context-actor.interface'; +export * from './dsync-deleted-context-google-analytics-session.interface'; +export * from './dsync-deleted-context.interface'; +export * from './dsync-deleted-data-state.interface'; +export * from './dsync-deleted-data-type.interface'; +export * from './dsync-deleted-data.interface'; +export * from './dsync-deleted.interface'; +export * from './dsync-group-created-context-actor-source.interface'; +export * from './dsync-group-created-context-actor.interface'; +export * from './dsync-group-created-context-google-analytics-session.interface'; +export * from './dsync-group-created-context.interface'; +export * from './dsync-group-created-data.interface'; +export * from './dsync-group-created.interface'; +export * from './dsync-group-deleted-context-actor-source.interface'; +export * from './dsync-group-deleted-context-actor.interface'; +export * from './dsync-group-deleted-context-google-analytics-session.interface'; +export * from './dsync-group-deleted-context.interface'; +export * from './dsync-group-deleted-data.interface'; +export * from './dsync-group-deleted.interface'; +export * from './dsync-group-updated-context-actor-source.interface'; +export * from './dsync-group-updated-context-actor.interface'; +export * from './dsync-group-updated-context-google-analytics-session.interface'; +export * from './dsync-group-updated-context.interface'; +export * from './dsync-group-updated-data.interface'; +export * from './dsync-group-updated.interface'; +export * from './dsync-group-user-added-context-actor-source.interface'; +export * from './dsync-group-user-added-context-actor.interface'; +export * from './dsync-group-user-added-context-google-analytics-session.interface'; +export * from './dsync-group-user-added-context.interface'; +export * from './dsync-group-user-added-data-group.interface'; +export * from './dsync-group-user-added-data-user-email.interface'; +export * from './dsync-group-user-added-data-user-role.interface'; +export * from './dsync-group-user-added-data-user-state.interface'; +export * from './dsync-group-user-added-data-user.interface'; +export * from './dsync-group-user-added-data.interface'; +export * from './dsync-group-user-added.interface'; +export * from './dsync-group-user-removed-context-actor-source.interface'; +export * from './dsync-group-user-removed-context-actor.interface'; +export * from './dsync-group-user-removed-context-google-analytics-session.interface'; +export * from './dsync-group-user-removed-context.interface'; +export * from './dsync-group-user-removed-data-group.interface'; +export * from './dsync-group-user-removed-data-user-email.interface'; +export * from './dsync-group-user-removed-data-user-role.interface'; +export * from './dsync-group-user-removed-data-user-state.interface'; +export * from './dsync-group-user-removed-data-user.interface'; +export * from './dsync-group-user-removed-data.interface'; +export * from './dsync-group-user-removed.interface'; +export * from './dsync-user-created-context-actor-source.interface'; +export * from './dsync-user-created-context-actor.interface'; +export * from './dsync-user-created-context-google-analytics-session.interface'; +export * from './dsync-user-created-context.interface'; +export * from './dsync-user-created-data-email.interface'; +export * from './dsync-user-created-data-role.interface'; +export * from './dsync-user-created-data-state.interface'; +export * from './dsync-user-created-data.interface'; +export * from './dsync-user-created.interface'; +export * from './dsync-user-deleted-context-actor-source.interface'; +export * from './dsync-user-deleted-context-actor.interface'; +export * from './dsync-user-deleted-context-google-analytics-session.interface'; +export * from './dsync-user-deleted-context.interface'; +export * from './dsync-user-deleted-data-email.interface'; +export * from './dsync-user-deleted-data-role.interface'; +export * from './dsync-user-deleted-data-state.interface'; +export * from './dsync-user-deleted-data.interface'; +export * from './dsync-user-deleted.interface'; +export * from './dsync-user-updated-context-actor-source.interface'; +export * from './dsync-user-updated-context-actor.interface'; +export * from './dsync-user-updated-context-google-analytics-session.interface'; +export * from './dsync-user-updated-context.interface'; +export * from './dsync-user-updated-data-email.interface'; +export * from './dsync-user-updated-data-role.interface'; +export * from './dsync-user-updated-data-state.interface'; +export * from './dsync-user-updated-data.interface'; +export * from './dsync-user-updated.interface'; +export * from './email-verification-created-context-actor-source.interface'; +export * from './email-verification-created-context-actor.interface'; +export * from './email-verification-created-context-google-analytics-session.interface'; +export * from './email-verification-created-context.interface'; +export * from './email-verification-created-data.interface'; +export * from './email-verification-created.interface'; +export * from './event-context-actor-source.interface'; +export * from './event-context-actor.interface'; +export * from './event-context-google-analytics-session.interface'; +export * from './event-context.interface'; export * from './event.interface'; +export * from './flag-created-context-actor-source.interface'; +export * from './flag-created-context-actor.interface'; +export * from './flag-created-context.interface'; +export * from './flag-created-data-owner.interface'; +export * from './flag-created-data.interface'; +export * from './flag-created.interface'; +export * from './flag-deleted-context-actor-source.interface'; +export * from './flag-deleted-context-actor.interface'; +export * from './flag-deleted-context.interface'; +export * from './flag-deleted-data-owner.interface'; +export * from './flag-deleted-data.interface'; +export * from './flag-deleted.interface'; +export * from './flag-rule-updated-context-access-type.interface'; +export * from './flag-rule-updated-context-actor-source.interface'; +export * from './flag-rule-updated-context-actor.interface'; +export * from './flag-rule-updated-context-configured-target-organization.interface'; +export * from './flag-rule-updated-context-configured-target-user.interface'; +export * from './flag-rule-updated-context-configured-target.interface'; +export * from './flag-rule-updated-context-previous-attribute-context-access-type.interface'; +export * from './flag-rule-updated-context-previous-attribute-context-configured-target-organization.interface'; +export * from './flag-rule-updated-context-previous-attribute-context-configured-target-user.interface'; +export * from './flag-rule-updated-context-previous-attribute-context-configured-target.interface'; +export * from './flag-rule-updated-context-previous-attribute-context.interface'; +export * from './flag-rule-updated-context-previous-attribute-data.interface'; +export * from './flag-rule-updated-context-previous-attribute.interface'; +export * from './flag-rule-updated-context.interface'; +export * from './flag-rule-updated-data-owner.interface'; +export * from './flag-rule-updated-data.interface'; +export * from './flag-rule-updated.interface'; +export * from './flag-updated-context-actor-source.interface'; +export * from './flag-updated-context-actor.interface'; +export * from './flag-updated-context-previous-attribute-data.interface'; +export * from './flag-updated-context-previous-attribute.interface'; +export * from './flag-updated-context.interface'; +export * from './flag-updated-data-owner.interface'; +export * from './flag-updated-data.interface'; +export * from './flag-updated.interface'; +export * from './generate-link-intent.interface'; export * from './get-options.interface'; +export * from './http-client.interface'; +export * from './invitation-accepted-context-actor-source.interface'; +export * from './invitation-accepted-context-actor.interface'; +export * from './invitation-accepted-context-google-analytics-session.interface'; +export * from './invitation-accepted-context.interface'; +export * from './invitation-accepted-data-state.interface'; +export * from './invitation-accepted-data.interface'; +export * from './invitation-accepted.interface'; +export * from './invitation-created-context-actor-source.interface'; +export * from './invitation-created-context-actor.interface'; +export * from './invitation-created-context-google-analytics-session.interface'; +export * from './invitation-created-context.interface'; +export * from './invitation-created-data-state.interface'; +export * from './invitation-created-data.interface'; +export * from './invitation-created.interface'; +export * from './invitation-resent-context-actor-source.interface'; +export * from './invitation-resent-context-actor.interface'; +export * from './invitation-resent-context-google-analytics-session.interface'; +export * from './invitation-resent-context.interface'; +export * from './invitation-resent-data-state.interface'; +export * from './invitation-resent-data.interface'; +export * from './invitation-resent.interface'; +export * from './invitation-revoked-context-actor-source.interface'; +export * from './invitation-revoked-context-actor.interface'; +export * from './invitation-revoked-context-google-analytics-session.interface'; +export * from './invitation-revoked-context.interface'; +export * from './invitation-revoked-data-state.interface'; +export * from './invitation-revoked-data.interface'; +export * from './invitation-revoked.interface'; +export * from './invitation-state.interface'; +export * from './list-data-type.interface'; export * from './list.interface'; +export * from './magic-auth-created-context-actor-source.interface'; +export * from './magic-auth-created-context-actor.interface'; +export * from './magic-auth-created-context-google-analytics-session.interface'; +export * from './magic-auth-created-context.interface'; +export * from './magic-auth-created-data.interface'; +export * from './magic-auth-created.interface'; +export * from './organization-created-context-actor-source.interface'; +export * from './organization-created-context-actor.interface'; +export * from './organization-created-context-google-analytics-session.interface'; +export * from './organization-created-context.interface'; +export * from './organization-created-data-domain-state.interface'; +export * from './organization-created-data-domain-verification-strategy.interface'; +export * from './organization-created-data-domain.interface'; +export * from './organization-created-data.interface'; +export * from './organization-deleted-context-actor-source.interface'; +export * from './organization-deleted-context-actor.interface'; +export * from './organization-deleted-context-google-analytics-session.interface'; +export * from './organization-deleted-context.interface'; +export * from './organization-deleted-data-domain-state.interface'; +export * from './organization-deleted-data-domain-verification-strategy.interface'; +export * from './organization-deleted-data-domain.interface'; +export * from './organization-deleted-data.interface'; +export * from './organization-domain-created-context-actor-source.interface'; +export * from './organization-domain-created-context-actor.interface'; +export * from './organization-domain-created-context-google-analytics-session.interface'; +export * from './organization-domain-created-context.interface'; +export * from './organization-domain-created-data-state.interface'; +export * from './organization-domain-created-data-verification-strategy.interface'; +export * from './organization-domain-created-data.interface'; +export * from './organization-domain-created.interface'; +export * from './organization-domain-data-state.interface'; +export * from './organization-domain-deleted-context-actor-source.interface'; +export * from './organization-domain-deleted-context-actor.interface'; +export * from './organization-domain-deleted-context-google-analytics-session.interface'; +export * from './organization-domain-deleted-context.interface'; +export * from './organization-domain-deleted-data-state.interface'; +export * from './organization-domain-deleted-data-verification-strategy.interface'; +export * from './organization-domain-deleted-data.interface'; +export * from './organization-domain-deleted.interface'; +export * from './organization-domain-stand-alone-state.interface'; +export * from './organization-domain-stand-alone-verification-strategy.interface'; +export * from './organization-domain-updated-context-actor-source.interface'; +export * from './organization-domain-updated-context-actor.interface'; +export * from './organization-domain-updated-context-google-analytics-session.interface'; +export * from './organization-domain-updated-context.interface'; +export * from './organization-domain-updated-data-state.interface'; +export * from './organization-domain-updated-data-verification-strategy.interface'; +export * from './organization-domain-updated-data.interface'; +export * from './organization-domain-updated.interface'; +export * from './organization-domain-verification-failed-context-actor-source.interface'; +export * from './organization-domain-verification-failed-context-actor.interface'; +export * from './organization-domain-verification-failed-context-google-analytics-session.interface'; +export * from './organization-domain-verification-failed-context.interface'; +export * from './organization-domain-verification-failed-data-organization-domain-state.interface'; +export * from './organization-domain-verification-failed-data-organization-domain-verification-strategy.interface'; +export * from './organization-domain-verification-failed-data-organization-domain.interface'; +export * from './organization-domain-verification-failed-data-reason.interface'; +export * from './organization-domain-verification-failed-data.interface'; +export * from './organization-domain-verification-failed.interface'; +export * from './organization-domain-verified-context-actor-source.interface'; +export * from './organization-domain-verified-context-actor.interface'; +export * from './organization-domain-verified-context-google-analytics-session.interface'; +export * from './organization-domain-verified-context.interface'; +export * from './organization-domain-verified-data-state.interface'; +export * from './organization-domain-verified-data-verification-strategy.interface'; +export * from './organization-domain-verified-data.interface'; +export * from './organization-domain-verified.interface'; +export * from './organization-membership-created-context-actor-source.interface'; +export * from './organization-membership-created-context-actor.interface'; +export * from './organization-membership-created-context-google-analytics-session.interface'; +export * from './organization-membership-created-context.interface'; +export * from './organization-membership-created-data-status.interface'; +export * from './organization-membership-created-data.interface'; +export * from './organization-membership-deleted-context-actor-source.interface'; +export * from './organization-membership-deleted-context-actor.interface'; +export * from './organization-membership-deleted-context-google-analytics-session.interface'; +export * from './organization-membership-deleted-context.interface'; +export * from './organization-membership-deleted-data-status.interface'; +export * from './organization-membership-deleted-data.interface'; +export * from './organization-membership-updated-context-actor-source.interface'; +export * from './organization-membership-updated-context-actor.interface'; +export * from './organization-membership-updated-context-google-analytics-session.interface'; +export * from './organization-membership-updated-context.interface'; +export * from './organization-membership-updated-data-status.interface'; +export * from './organization-membership-updated-data.interface'; +export * from './organization-role-created-context-actor-source.interface'; +export * from './organization-role-created-context-actor.interface'; +export * from './organization-role-created-context-google-analytics-session.interface'; +export * from './organization-role-created-context.interface'; +export * from './organization-role-created-data.interface'; +export * from './organization-role-created.interface'; +export * from './organization-role-deleted-context-actor-source.interface'; +export * from './organization-role-deleted-context-actor.interface'; +export * from './organization-role-deleted-context-google-analytics-session.interface'; +export * from './organization-role-deleted-context.interface'; +export * from './organization-role-deleted-data.interface'; +export * from './organization-role-deleted.interface'; +export * from './organization-role-updated-context-actor-source.interface'; +export * from './organization-role-updated-context-actor.interface'; +export * from './organization-role-updated-context-google-analytics-session.interface'; +export * from './organization-role-updated-context.interface'; +export * from './organization-role-updated-data.interface'; +export * from './organization-role-updated.interface'; +export * from './organization-updated-context-actor-source.interface'; +export * from './organization-updated-context-actor.interface'; +export * from './organization-updated-context-google-analytics-session.interface'; +export * from './organization-updated-context.interface'; +export * from './organization-updated-data-domain-state.interface'; +export * from './organization-updated-data-domain-verification-strategy.interface'; +export * from './organization-updated-data-domain.interface'; +export * from './organization-updated-data.interface'; +export * from './pagination-options.interface'; +export * from './password-reset-created-context-actor-source.interface'; +export * from './password-reset-created-context-actor.interface'; +export * from './password-reset-created-context-google-analytics-session.interface'; +export * from './password-reset-created-context.interface'; +export * from './password-reset-created-data.interface'; +export * from './password-reset-created.interface'; +export * from './password-reset-succeeded-context-actor-source.interface'; +export * from './password-reset-succeeded-context-actor.interface'; +export * from './password-reset-succeeded-context-google-analytics-session.interface'; +export * from './password-reset-succeeded-context.interface'; +export * from './password-reset-succeeded-data.interface'; +export * from './password-reset-succeeded.interface'; export * from './patch-options.interface'; +export * from './permission-created-context-actor-source.interface'; +export * from './permission-created-context-actor.interface'; +export * from './permission-created-context-google-analytics-session.interface'; +export * from './permission-created-context.interface'; +export * from './permission-created-data.interface'; +export * from './permission-created.interface'; +export * from './permission-deleted-context-actor-source.interface'; +export * from './permission-deleted-context-actor.interface'; +export * from './permission-deleted-context-google-analytics-session.interface'; +export * from './permission-deleted-context.interface'; +export * from './permission-deleted-data.interface'; +export * from './permission-deleted.interface'; +export * from './permission-updated-context-actor-source.interface'; +export * from './permission-updated-context-actor.interface'; +export * from './permission-updated-context-google-analytics-session.interface'; +export * from './permission-updated-context.interface'; +export * from './permission-updated-data.interface'; +export * from './permission-updated.interface'; export * from './post-options.interface'; +export * from './profile-connection-type.interface'; export * from './put-options.interface'; +export * from './radar-standalone-assess-request-action.interface'; +export * from './radar-standalone-assess-request-auth-method.interface'; +export * from './radar-standalone-response-blocklist-type.interface'; +export * from './radar-standalone-response-control.interface'; +export * from './radar-standalone-response-verdict.interface'; +export * from './resend-user-invite-options-locale.interface'; +export * from './role-created-context-actor-source.interface'; +export * from './role-created-context-actor.interface'; +export * from './role-created-context-google-analytics-session.interface'; +export * from './role-created-context.interface'; +export * from './role-created-data.interface'; +export * from './role-created.interface'; +export * from './role-deleted-context-actor-source.interface'; +export * from './role-deleted-context-actor.interface'; +export * from './role-deleted-context-google-analytics-session.interface'; +export * from './role-deleted-context.interface'; +export * from './role-deleted-data.interface'; +export * from './role-deleted.interface'; +export * from './role-type.interface'; +export * from './role-updated-context-actor-source.interface'; +export * from './role-updated-context-actor.interface'; +export * from './role-updated-context-google-analytics-session.interface'; +export * from './role-updated-context.interface'; +export * from './role-updated-data.interface'; +export * from './role-updated.interface'; +export * from './session-created-context-actor-source.interface'; +export * from './session-created-context-actor.interface'; +export * from './session-created-context-google-analytics-session.interface'; +export * from './session-created-context.interface'; +export * from './session-created-data-auth-method.interface'; +export * from './session-created-data-impersonator.interface'; +export * from './session-created-data-status.interface'; +export * from './session-created-data.interface'; +export * from './session-created.interface'; +export * from './session-revoked-context-actor-source.interface'; +export * from './session-revoked-context-actor.interface'; +export * from './session-revoked-context-google-analytics-session.interface'; +export * from './session-revoked-context.interface'; +export * from './session-revoked-data-auth-method.interface'; +export * from './session-revoked-data-impersonator.interface'; +export * from './session-revoked-data-status.interface'; +export * from './session-revoked-data.interface'; +export * from './session-revoked.interface'; export * from './unprocessable-entity-error.interface'; +export * from './update-user-password-hash-type.interface'; +export * from './update-webhook-endpoint-events.interface'; +export * from './update-webhook-endpoint-status.interface'; +export * from './user-created-context-actor-source.interface'; +export * from './user-created-context-actor.interface'; +export * from './user-created-context-google-analytics-session.interface'; +export * from './user-created-context.interface'; +export * from './user-created-data.interface'; +export * from './user-created.interface'; +export * from './user-deleted-context-actor-source.interface'; +export * from './user-deleted-context-actor.interface'; +export * from './user-deleted-context-google-analytics-session.interface'; +export * from './user-deleted-context.interface'; +export * from './user-deleted-data.interface'; +export * from './user-deleted.interface'; +export * from './user-identities-get-item-provider.interface'; +export * from './user-invite-state.interface'; +export * from './user-organization-membership-base-list-data-status.interface'; +export * from './user-organization-membership-status.interface'; +export * from './user-sessions-auth-method.interface'; +export * from './user-sessions-status.interface'; +export * from './user-updated-context-actor-source.interface'; +export * from './user-updated-context-actor.interface'; +export * from './user-updated-context-google-analytics-session.interface'; +export * from './user-updated-context.interface'; +export * from './user-updated-data.interface'; +export * from './user-updated.interface'; +export * from './vault-byok-key-verification-completed-context-actor-source.interface'; +export * from './vault-byok-key-verification-completed-context-actor.interface'; +export * from './vault-byok-key-verification-completed-context-google-analytics-session.interface'; +export * from './vault-byok-key-verification-completed-context.interface'; +export * from './vault-byok-key-verification-completed-data-key-provider.interface'; +export * from './vault-byok-key-verification-completed-data.interface'; +export * from './vault-byok-key-verification-completed.interface'; +export * from './vault-data-created-context-actor-source.interface'; +export * from './vault-data-created-context-actor.interface'; +export * from './vault-data-created-context-google-analytics-session.interface'; +export * from './vault-data-created-context.interface'; +export * from './vault-data-created-data-actor-source.interface'; +export * from './vault-data-created-data.interface'; +export * from './vault-data-created.interface'; +export * from './vault-data-deleted-context-actor-source.interface'; +export * from './vault-data-deleted-context-actor.interface'; +export * from './vault-data-deleted-context-google-analytics-session.interface'; +export * from './vault-data-deleted-context.interface'; +export * from './vault-data-deleted-data-actor-source.interface'; +export * from './vault-data-deleted-data.interface'; +export * from './vault-data-deleted.interface'; +export * from './vault-data-read-context-actor-source.interface'; +export * from './vault-data-read-context-actor.interface'; +export * from './vault-data-read-context-google-analytics-session.interface'; +export * from './vault-data-read-context.interface'; +export * from './vault-data-read-data-actor-source.interface'; +export * from './vault-data-read-data.interface'; +export * from './vault-data-read.interface'; +export * from './vault-data-updated-context-actor-source.interface'; +export * from './vault-data-updated-context-actor.interface'; +export * from './vault-data-updated-context-google-analytics-session.interface'; +export * from './vault-data-updated-context.interface'; +export * from './vault-data-updated-data-actor-source.interface'; +export * from './vault-data-updated-data.interface'; +export * from './vault-data-updated.interface'; +export * from './vault-dek-decrypted-context-actor-source.interface'; +export * from './vault-dek-decrypted-context-actor.interface'; +export * from './vault-dek-decrypted-context-google-analytics-session.interface'; +export * from './vault-dek-decrypted-context.interface'; +export * from './vault-dek-decrypted-data-actor-source.interface'; +export * from './vault-dek-decrypted-data.interface'; +export * from './vault-dek-decrypted.interface'; +export * from './vault-dek-read-context-actor-source.interface'; +export * from './vault-dek-read-context-actor.interface'; +export * from './vault-dek-read-context-google-analytics-session.interface'; +export * from './vault-dek-read-context.interface'; +export * from './vault-dek-read-data-actor-source.interface'; +export * from './vault-dek-read-data.interface'; +export * from './vault-dek-read.interface'; +export * from './vault-kek-created-context-actor-source.interface'; +export * from './vault-kek-created-context-actor.interface'; +export * from './vault-kek-created-context-google-analytics-session.interface'; +export * from './vault-kek-created-context.interface'; +export * from './vault-kek-created-data-actor-source.interface'; +export * from './vault-kek-created-data.interface'; +export * from './vault-kek-created.interface'; +export * from './vault-metadata-read-context-actor-source.interface'; +export * from './vault-metadata-read-context-actor.interface'; +export * from './vault-metadata-read-context-google-analytics-session.interface'; +export * from './vault-metadata-read-context.interface'; +export * from './vault-metadata-read-data-actor-source.interface'; +export * from './vault-metadata-read-data.interface'; +export * from './vault-metadata-read.interface'; +export * from './vault-names-listed-context-actor-source.interface'; +export * from './vault-names-listed-context-actor.interface'; +export * from './vault-names-listed-context-google-analytics-session.interface'; +export * from './vault-names-listed-context.interface'; +export * from './vault-names-listed-data-actor-source.interface'; +export * from './vault-names-listed-data.interface'; +export * from './vault-names-listed.interface'; +export * from './webhook-endpoint-json-status.interface'; +export * from './widget-session-token-scopes.interface'; export * from './workos-options.interface'; export * from './workos-response-error.interface'; -export * from './pagination-options.interface'; -export * from './http-client.interface'; diff --git a/src/common/interfaces/invitation-accepted-context-actor-source.interface.ts b/src/common/interfaces/invitation-accepted-context-actor-source.interface.ts new file mode 100644 index 000000000..6a4891eeb --- /dev/null +++ b/src/common/interfaces/invitation-accepted-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type InvitationAcceptedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/invitation-accepted-context-actor.interface.ts b/src/common/interfaces/invitation-accepted-context-actor.interface.ts new file mode 100644 index 000000000..07e6991d3 --- /dev/null +++ b/src/common/interfaces/invitation-accepted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { InvitationAcceptedContextActorSource } from './invitation-accepted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface InvitationAcceptedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: InvitationAcceptedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface InvitationAcceptedContextActorResponse { + id: string; + source: InvitationAcceptedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/invitation-accepted-context-google-analytics-session.interface.ts b/src/common/interfaces/invitation-accepted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..7f9f20cc4 --- /dev/null +++ b/src/common/interfaces/invitation-accepted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type InvitationAcceptedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type InvitationAcceptedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/invitation-accepted-context.interface.ts b/src/common/interfaces/invitation-accepted-context.interface.ts new file mode 100644 index 000000000..202884a54 --- /dev/null +++ b/src/common/interfaces/invitation-accepted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + InvitationAcceptedContextGoogleAnalyticsSession, + InvitationAcceptedContextGoogleAnalyticsSessionResponse, +} from './invitation-accepted-context-google-analytics-session.interface'; +import type { + InvitationAcceptedContextActor, + InvitationAcceptedContextActorResponse, +} from './invitation-accepted-context-actor.interface'; + +/** Additional context about the event. */ +export interface InvitationAcceptedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: InvitationAcceptedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: InvitationAcceptedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface InvitationAcceptedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: InvitationAcceptedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: InvitationAcceptedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/invitation-accepted-data-state.interface.ts b/src/common/interfaces/invitation-accepted-data-state.interface.ts new file mode 100644 index 000000000..c14be51e3 --- /dev/null +++ b/src/common/interfaces/invitation-accepted-data-state.interface.ts @@ -0,0 +1,7 @@ +// This file is auto-generated by oagen. Do not edit. + +export type InvitationAcceptedDataState = + | 'pending' + | 'accepted' + | 'expired' + | 'revoked'; diff --git a/src/common/interfaces/invitation-accepted-data.interface.ts b/src/common/interfaces/invitation-accepted-data.interface.ts new file mode 100644 index 000000000..c516857f0 --- /dev/null +++ b/src/common/interfaces/invitation-accepted-data.interface.ts @@ -0,0 +1,46 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { InvitationAcceptedDataState } from './invitation-accepted-data-state.interface'; + +/** The event payload. */ +export interface InvitationAcceptedData { + /** Distinguishes the invitation object. */ + object: 'invitation'; + /** The unique ID of the invitation. */ + id: string; + /** The email address of the recipient. */ + email: string; + /** The state of the invitation. */ + state: InvitationAcceptedDataState; + /** The timestamp when the invitation was accepted, or null if not yet accepted. */ + acceptedAt: string | null; + /** The timestamp when the invitation was revoked, or null if not revoked. */ + revokedAt: string | null; + /** The timestamp when the invitation expires. */ + expiresAt: string; + /** The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. */ + organizationId: string | null; + /** The ID of the user who invited the recipient, if provided. */ + inviterUserId: string | null; + /** The ID of the user who accepted the invitation, once accepted. */ + acceptedUserId: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface InvitationAcceptedDataResponse { + object: 'invitation'; + id: string; + email: string; + state: InvitationAcceptedDataState; + accepted_at: string | null; + revoked_at: string | null; + expires_at: string; + organization_id: string | null; + inviter_user_id: string | null; + accepted_user_id: string | null; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/invitation-accepted.interface.ts b/src/common/interfaces/invitation-accepted.interface.ts new file mode 100644 index 000000000..a96252b96 --- /dev/null +++ b/src/common/interfaces/invitation-accepted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + InvitationAcceptedData, + InvitationAcceptedDataResponse, +} from './invitation-accepted-data.interface'; +import type { + InvitationAcceptedContext, + InvitationAcceptedContextResponse, +} from './invitation-accepted-context.interface'; + +export interface InvitationAccepted { + /** Unique identifier for the event. */ + id: string; + event: 'invitation.accepted'; + /** The event payload. */ + data: InvitationAcceptedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: InvitationAcceptedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface InvitationAcceptedResponse { + id: string; + event: 'invitation.accepted'; + data: InvitationAcceptedDataResponse; + created_at: string; + context?: InvitationAcceptedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/invitation-created-context-actor-source.interface.ts b/src/common/interfaces/invitation-created-context-actor-source.interface.ts new file mode 100644 index 000000000..ab272e90e --- /dev/null +++ b/src/common/interfaces/invitation-created-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type InvitationCreatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/invitation-created-context-actor.interface.ts b/src/common/interfaces/invitation-created-context-actor.interface.ts new file mode 100644 index 000000000..0e8e86e0f --- /dev/null +++ b/src/common/interfaces/invitation-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { InvitationCreatedContextActorSource } from './invitation-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface InvitationCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: InvitationCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface InvitationCreatedContextActorResponse { + id: string; + source: InvitationCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/invitation-created-context-google-analytics-session.interface.ts b/src/common/interfaces/invitation-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..ca42f73c5 --- /dev/null +++ b/src/common/interfaces/invitation-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type InvitationCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type InvitationCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/invitation-created-context.interface.ts b/src/common/interfaces/invitation-created-context.interface.ts new file mode 100644 index 000000000..5bf4b9df2 --- /dev/null +++ b/src/common/interfaces/invitation-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + InvitationCreatedContextGoogleAnalyticsSession, + InvitationCreatedContextGoogleAnalyticsSessionResponse, +} from './invitation-created-context-google-analytics-session.interface'; +import type { + InvitationCreatedContextActor, + InvitationCreatedContextActorResponse, +} from './invitation-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface InvitationCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: InvitationCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: InvitationCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface InvitationCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: InvitationCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: InvitationCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/invitation-created-data-state.interface.ts b/src/common/interfaces/invitation-created-data-state.interface.ts new file mode 100644 index 000000000..1716dc8cf --- /dev/null +++ b/src/common/interfaces/invitation-created-data-state.interface.ts @@ -0,0 +1,7 @@ +// This file is auto-generated by oagen. Do not edit. + +export type InvitationCreatedDataState = + | 'pending' + | 'accepted' + | 'expired' + | 'revoked'; diff --git a/src/common/interfaces/invitation-created-data.interface.ts b/src/common/interfaces/invitation-created-data.interface.ts new file mode 100644 index 000000000..1b8c7edd8 --- /dev/null +++ b/src/common/interfaces/invitation-created-data.interface.ts @@ -0,0 +1,46 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { InvitationCreatedDataState } from './invitation-created-data-state.interface'; + +/** The event payload. */ +export interface InvitationCreatedData { + /** Distinguishes the invitation object. */ + object: 'invitation'; + /** The unique ID of the invitation. */ + id: string; + /** The email address of the recipient. */ + email: string; + /** The state of the invitation. */ + state: InvitationCreatedDataState; + /** The timestamp when the invitation was accepted, or null if not yet accepted. */ + acceptedAt: string | null; + /** The timestamp when the invitation was revoked, or null if not revoked. */ + revokedAt: string | null; + /** The timestamp when the invitation expires. */ + expiresAt: string; + /** The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. */ + organizationId: string | null; + /** The ID of the user who invited the recipient, if provided. */ + inviterUserId: string | null; + /** The ID of the user who accepted the invitation, once accepted. */ + acceptedUserId: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface InvitationCreatedDataResponse { + object: 'invitation'; + id: string; + email: string; + state: InvitationCreatedDataState; + accepted_at: string | null; + revoked_at: string | null; + expires_at: string; + organization_id: string | null; + inviter_user_id: string | null; + accepted_user_id: string | null; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/invitation-created.interface.ts b/src/common/interfaces/invitation-created.interface.ts new file mode 100644 index 000000000..89644371c --- /dev/null +++ b/src/common/interfaces/invitation-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + InvitationCreatedData, + InvitationCreatedDataResponse, +} from './invitation-created-data.interface'; +import type { + InvitationCreatedContext, + InvitationCreatedContextResponse, +} from './invitation-created-context.interface'; + +export interface InvitationCreated { + /** Unique identifier for the event. */ + id: string; + event: 'invitation.created'; + /** The event payload. */ + data: InvitationCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: InvitationCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface InvitationCreatedResponse { + id: string; + event: 'invitation.created'; + data: InvitationCreatedDataResponse; + created_at: string; + context?: InvitationCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/invitation-resent-context-actor-source.interface.ts b/src/common/interfaces/invitation-resent-context-actor-source.interface.ts new file mode 100644 index 000000000..bb636f58f --- /dev/null +++ b/src/common/interfaces/invitation-resent-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type InvitationResentContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/invitation-resent-context-actor.interface.ts b/src/common/interfaces/invitation-resent-context-actor.interface.ts new file mode 100644 index 000000000..e61f367b6 --- /dev/null +++ b/src/common/interfaces/invitation-resent-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { InvitationResentContextActorSource } from './invitation-resent-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface InvitationResentContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: InvitationResentContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface InvitationResentContextActorResponse { + id: string; + source: InvitationResentContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/invitation-resent-context-google-analytics-session.interface.ts b/src/common/interfaces/invitation-resent-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..55a9ab716 --- /dev/null +++ b/src/common/interfaces/invitation-resent-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type InvitationResentContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type InvitationResentContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/invitation-resent-context.interface.ts b/src/common/interfaces/invitation-resent-context.interface.ts new file mode 100644 index 000000000..b293e3560 --- /dev/null +++ b/src/common/interfaces/invitation-resent-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + InvitationResentContextGoogleAnalyticsSession, + InvitationResentContextGoogleAnalyticsSessionResponse, +} from './invitation-resent-context-google-analytics-session.interface'; +import type { + InvitationResentContextActor, + InvitationResentContextActorResponse, +} from './invitation-resent-context-actor.interface'; + +/** Additional context about the event. */ +export interface InvitationResentContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: InvitationResentContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: InvitationResentContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface InvitationResentContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: InvitationResentContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: InvitationResentContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/invitation-resent-data-state.interface.ts b/src/common/interfaces/invitation-resent-data-state.interface.ts new file mode 100644 index 000000000..20af74b50 --- /dev/null +++ b/src/common/interfaces/invitation-resent-data-state.interface.ts @@ -0,0 +1,7 @@ +// This file is auto-generated by oagen. Do not edit. + +export type InvitationResentDataState = + | 'pending' + | 'accepted' + | 'expired' + | 'revoked'; diff --git a/src/common/interfaces/invitation-resent-data.interface.ts b/src/common/interfaces/invitation-resent-data.interface.ts new file mode 100644 index 000000000..61a90f055 --- /dev/null +++ b/src/common/interfaces/invitation-resent-data.interface.ts @@ -0,0 +1,46 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { InvitationResentDataState } from './invitation-resent-data-state.interface'; + +/** The event payload. */ +export interface InvitationResentData { + /** Distinguishes the invitation object. */ + object: 'invitation'; + /** The unique ID of the invitation. */ + id: string; + /** The email address of the recipient. */ + email: string; + /** The state of the invitation. */ + state: InvitationResentDataState; + /** The timestamp when the invitation was accepted, or null if not yet accepted. */ + acceptedAt: string | null; + /** The timestamp when the invitation was revoked, or null if not revoked. */ + revokedAt: string | null; + /** The timestamp when the invitation expires. */ + expiresAt: string; + /** The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. */ + organizationId: string | null; + /** The ID of the user who invited the recipient, if provided. */ + inviterUserId: string | null; + /** The ID of the user who accepted the invitation, once accepted. */ + acceptedUserId: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface InvitationResentDataResponse { + object: 'invitation'; + id: string; + email: string; + state: InvitationResentDataState; + accepted_at: string | null; + revoked_at: string | null; + expires_at: string; + organization_id: string | null; + inviter_user_id: string | null; + accepted_user_id: string | null; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/invitation-resent.interface.ts b/src/common/interfaces/invitation-resent.interface.ts new file mode 100644 index 000000000..f3fec7dfe --- /dev/null +++ b/src/common/interfaces/invitation-resent.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + InvitationResentData, + InvitationResentDataResponse, +} from './invitation-resent-data.interface'; +import type { + InvitationResentContext, + InvitationResentContextResponse, +} from './invitation-resent-context.interface'; + +export interface InvitationResent { + /** Unique identifier for the event. */ + id: string; + event: 'invitation.resent'; + /** The event payload. */ + data: InvitationResentData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: InvitationResentContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface InvitationResentResponse { + id: string; + event: 'invitation.resent'; + data: InvitationResentDataResponse; + created_at: string; + context?: InvitationResentContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/invitation-revoked-context-actor-source.interface.ts b/src/common/interfaces/invitation-revoked-context-actor-source.interface.ts new file mode 100644 index 000000000..ae5937a64 --- /dev/null +++ b/src/common/interfaces/invitation-revoked-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type InvitationRevokedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/invitation-revoked-context-actor.interface.ts b/src/common/interfaces/invitation-revoked-context-actor.interface.ts new file mode 100644 index 000000000..a8c160ab0 --- /dev/null +++ b/src/common/interfaces/invitation-revoked-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { InvitationRevokedContextActorSource } from './invitation-revoked-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface InvitationRevokedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: InvitationRevokedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface InvitationRevokedContextActorResponse { + id: string; + source: InvitationRevokedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/invitation-revoked-context-google-analytics-session.interface.ts b/src/common/interfaces/invitation-revoked-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..2779e9bf7 --- /dev/null +++ b/src/common/interfaces/invitation-revoked-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type InvitationRevokedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type InvitationRevokedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/invitation-revoked-context.interface.ts b/src/common/interfaces/invitation-revoked-context.interface.ts new file mode 100644 index 000000000..dd186bb75 --- /dev/null +++ b/src/common/interfaces/invitation-revoked-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + InvitationRevokedContextGoogleAnalyticsSession, + InvitationRevokedContextGoogleAnalyticsSessionResponse, +} from './invitation-revoked-context-google-analytics-session.interface'; +import type { + InvitationRevokedContextActor, + InvitationRevokedContextActorResponse, +} from './invitation-revoked-context-actor.interface'; + +/** Additional context about the event. */ +export interface InvitationRevokedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: InvitationRevokedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: InvitationRevokedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface InvitationRevokedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: InvitationRevokedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: InvitationRevokedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/invitation-revoked-data-state.interface.ts b/src/common/interfaces/invitation-revoked-data-state.interface.ts new file mode 100644 index 000000000..7698b19c7 --- /dev/null +++ b/src/common/interfaces/invitation-revoked-data-state.interface.ts @@ -0,0 +1,7 @@ +// This file is auto-generated by oagen. Do not edit. + +export type InvitationRevokedDataState = + | 'pending' + | 'accepted' + | 'expired' + | 'revoked'; diff --git a/src/common/interfaces/invitation-revoked-data.interface.ts b/src/common/interfaces/invitation-revoked-data.interface.ts new file mode 100644 index 000000000..694186b95 --- /dev/null +++ b/src/common/interfaces/invitation-revoked-data.interface.ts @@ -0,0 +1,46 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { InvitationRevokedDataState } from './invitation-revoked-data-state.interface'; + +/** The event payload. */ +export interface InvitationRevokedData { + /** Distinguishes the invitation object. */ + object: 'invitation'; + /** The unique ID of the invitation. */ + id: string; + /** The email address of the recipient. */ + email: string; + /** The state of the invitation. */ + state: InvitationRevokedDataState; + /** The timestamp when the invitation was accepted, or null if not yet accepted. */ + acceptedAt: string | null; + /** The timestamp when the invitation was revoked, or null if not revoked. */ + revokedAt: string | null; + /** The timestamp when the invitation expires. */ + expiresAt: string; + /** The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. */ + organizationId: string | null; + /** The ID of the user who invited the recipient, if provided. */ + inviterUserId: string | null; + /** The ID of the user who accepted the invitation, once accepted. */ + acceptedUserId: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface InvitationRevokedDataResponse { + object: 'invitation'; + id: string; + email: string; + state: InvitationRevokedDataState; + accepted_at: string | null; + revoked_at: string | null; + expires_at: string; + organization_id: string | null; + inviter_user_id: string | null; + accepted_user_id: string | null; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/invitation-revoked.interface.ts b/src/common/interfaces/invitation-revoked.interface.ts new file mode 100644 index 000000000..39ff0bd84 --- /dev/null +++ b/src/common/interfaces/invitation-revoked.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + InvitationRevokedData, + InvitationRevokedDataResponse, +} from './invitation-revoked-data.interface'; +import type { + InvitationRevokedContext, + InvitationRevokedContextResponse, +} from './invitation-revoked-context.interface'; + +export interface InvitationRevoked { + /** Unique identifier for the event. */ + id: string; + event: 'invitation.revoked'; + /** The event payload. */ + data: InvitationRevokedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: InvitationRevokedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface InvitationRevokedResponse { + id: string; + event: 'invitation.revoked'; + data: InvitationRevokedDataResponse; + created_at: string; + context?: InvitationRevokedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/invitation-state.interface.ts b/src/common/interfaces/invitation-state.interface.ts new file mode 100644 index 000000000..2b1e3f38e --- /dev/null +++ b/src/common/interfaces/invitation-state.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type InvitationState = 'pending' | 'accepted' | 'expired' | 'revoked'; diff --git a/src/common/interfaces/list-data-type.interface.ts b/src/common/interfaces/list-data-type.interface.ts new file mode 100644 index 000000000..1285c20c1 --- /dev/null +++ b/src/common/interfaces/list-data-type.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ListDataType = 'EnvironmentRole' | 'OrganizationRole'; diff --git a/src/common/interfaces/magic-auth-created-context-actor-source.interface.ts b/src/common/interfaces/magic-auth-created-context-actor-source.interface.ts new file mode 100644 index 000000000..e4178b73d --- /dev/null +++ b/src/common/interfaces/magic-auth-created-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type MagicAuthCreatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/magic-auth-created-context-actor.interface.ts b/src/common/interfaces/magic-auth-created-context-actor.interface.ts new file mode 100644 index 000000000..d8252f5d0 --- /dev/null +++ b/src/common/interfaces/magic-auth-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { MagicAuthCreatedContextActorSource } from './magic-auth-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface MagicAuthCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: MagicAuthCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface MagicAuthCreatedContextActorResponse { + id: string; + source: MagicAuthCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/magic-auth-created-context-google-analytics-session.interface.ts b/src/common/interfaces/magic-auth-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..b24ddfdd6 --- /dev/null +++ b/src/common/interfaces/magic-auth-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type MagicAuthCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type MagicAuthCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/magic-auth-created-context.interface.ts b/src/common/interfaces/magic-auth-created-context.interface.ts new file mode 100644 index 000000000..fefc48cd9 --- /dev/null +++ b/src/common/interfaces/magic-auth-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + MagicAuthCreatedContextGoogleAnalyticsSession, + MagicAuthCreatedContextGoogleAnalyticsSessionResponse, +} from './magic-auth-created-context-google-analytics-session.interface'; +import type { + MagicAuthCreatedContextActor, + MagicAuthCreatedContextActorResponse, +} from './magic-auth-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface MagicAuthCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: MagicAuthCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: MagicAuthCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface MagicAuthCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: MagicAuthCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: MagicAuthCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/magic-auth-created-data.interface.ts b/src/common/interfaces/magic-auth-created-data.interface.ts new file mode 100644 index 000000000..07f1df480 --- /dev/null +++ b/src/common/interfaces/magic-auth-created-data.interface.ts @@ -0,0 +1,29 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface MagicAuthCreatedData { + /** Distinguishes the Magic Auth object. */ + object: 'magic_auth'; + /** The unique ID of the Magic Auth code. */ + id: string; + /** The unique ID of the user. */ + userId: string; + /** The email address of the user. */ + email: string; + /** The timestamp when the Magic Auth code expires. */ + expiresAt: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface MagicAuthCreatedDataResponse { + object: 'magic_auth'; + id: string; + user_id: string; + email: string; + expires_at: string; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/magic-auth-created.interface.ts b/src/common/interfaces/magic-auth-created.interface.ts new file mode 100644 index 000000000..2fa6a04ad --- /dev/null +++ b/src/common/interfaces/magic-auth-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + MagicAuthCreatedData, + MagicAuthCreatedDataResponse, +} from './magic-auth-created-data.interface'; +import type { + MagicAuthCreatedContext, + MagicAuthCreatedContextResponse, +} from './magic-auth-created-context.interface'; + +export interface MagicAuthCreated { + /** Unique identifier for the event. */ + id: string; + event: 'magic_auth.created'; + /** The event payload. */ + data: MagicAuthCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: MagicAuthCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface MagicAuthCreatedResponse { + id: string; + event: 'magic_auth.created'; + data: MagicAuthCreatedDataResponse; + created_at: string; + context?: MagicAuthCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/organization-created-context-actor-source.interface.ts b/src/common/interfaces/organization-created-context-actor-source.interface.ts new file mode 100644 index 000000000..88b98d61f --- /dev/null +++ b/src/common/interfaces/organization-created-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationCreatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-created-context-actor.interface.ts b/src/common/interfaces/organization-created-context-actor.interface.ts new file mode 100644 index 000000000..ca1d21c39 --- /dev/null +++ b/src/common/interfaces/organization-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationCreatedContextActorSource } from './organization-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationCreatedContextActorResponse { + id: string; + source: OrganizationCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-created-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..adafd304d --- /dev/null +++ b/src/common/interfaces/organization-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-created-context.interface.ts b/src/common/interfaces/organization-created-context.interface.ts new file mode 100644 index 000000000..11babe5e4 --- /dev/null +++ b/src/common/interfaces/organization-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationCreatedContextGoogleAnalyticsSession, + OrganizationCreatedContextGoogleAnalyticsSessionResponse, +} from './organization-created-context-google-analytics-session.interface'; +import type { + OrganizationCreatedContextActor, + OrganizationCreatedContextActorResponse, +} from './organization-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-created-data-domain-state.interface.ts b/src/common/interfaces/organization-created-data-domain-state.interface.ts new file mode 100644 index 000000000..f10a980fc --- /dev/null +++ b/src/common/interfaces/organization-created-data-domain-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationCreatedDataDomainState = + | 'failed' + | 'legacy_verified' + | 'pending' + | 'unverified' + | 'verified'; diff --git a/src/common/interfaces/organization-created-data-domain-verification-strategy.interface.ts b/src/common/interfaces/organization-created-data-domain-verification-strategy.interface.ts new file mode 100644 index 000000000..a180ede0a --- /dev/null +++ b/src/common/interfaces/organization-created-data-domain-verification-strategy.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationCreatedDataDomainVerificationStrategy = + | 'dns' + | 'manual'; diff --git a/src/common/interfaces/organization-created-data-domain.interface.ts b/src/common/interfaces/organization-created-data-domain.interface.ts new file mode 100644 index 000000000..5f6c064b1 --- /dev/null +++ b/src/common/interfaces/organization-created-data-domain.interface.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationCreatedDataDomainState } from './organization-created-data-domain-state.interface'; +import type { OrganizationCreatedDataDomainVerificationStrategy } from './organization-created-data-domain-verification-strategy.interface'; + +export interface OrganizationCreatedDataDomain { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** ID of the parent Organization. */ + organizationId: string; + /** Domain for the organization domain. */ + domain: string; + /** Verification state of the domain. */ + state?: OrganizationCreatedDataDomainState; + /** The prefix used in DNS verification. */ + verificationPrefix?: string; + /** Validation token to be used in DNS TXT record. */ + verificationToken?: string; + /** Strategy used to verify the domain. */ + verificationStrategy?: OrganizationCreatedDataDomainVerificationStrategy; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationCreatedDataDomainResponse { + object: 'organization_domain'; + id: string; + organization_id: string; + domain: string; + state?: OrganizationCreatedDataDomainState; + verification_prefix?: string; + verification_token?: string; + verification_strategy?: OrganizationCreatedDataDomainVerificationStrategy; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-created-data.interface.ts b/src/common/interfaces/organization-created-data.interface.ts new file mode 100644 index 000000000..270fdb7ad --- /dev/null +++ b/src/common/interfaces/organization-created-data.interface.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationCreatedDataDomain, + OrganizationCreatedDataDomainResponse, +} from './organization-created-data-domain.interface'; + +/** The event payload. */ +export interface OrganizationCreatedData { + /** Distinguishes the Organization object. */ + object: 'organization'; + /** Unique identifier of the Organization. */ + id: string; + /** A descriptive name for the Organization. This field does not need to be unique. */ + name: string; + /** List of Organization Domains. */ + domains: OrganizationCreatedDataDomain[]; + /** Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization. */ + metadata: Record; + /** The external ID of the Organization. */ + externalId: string | null; + /** The Stripe customer ID of the Organization. */ + stripeCustomerId?: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationCreatedDataResponse { + object: 'organization'; + id: string; + name: string; + domains: OrganizationCreatedDataDomainResponse[]; + metadata: Record; + external_id: string | null; + stripe_customer_id?: string; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-deleted-context-actor-source.interface.ts b/src/common/interfaces/organization-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..91aa389c9 --- /dev/null +++ b/src/common/interfaces/organization-deleted-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDeletedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-deleted-context-actor.interface.ts b/src/common/interfaces/organization-deleted-context-actor.interface.ts new file mode 100644 index 000000000..fe0b7cf15 --- /dev/null +++ b/src/common/interfaces/organization-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDeletedContextActorSource } from './organization-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationDeletedContextActorResponse { + id: string; + source: OrganizationDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..008325589 --- /dev/null +++ b/src/common/interfaces/organization-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-deleted-context.interface.ts b/src/common/interfaces/organization-deleted-context.interface.ts new file mode 100644 index 000000000..92db4074c --- /dev/null +++ b/src/common/interfaces/organization-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDeletedContextGoogleAnalyticsSession, + OrganizationDeletedContextGoogleAnalyticsSessionResponse, +} from './organization-deleted-context-google-analytics-session.interface'; +import type { + OrganizationDeletedContextActor, + OrganizationDeletedContextActorResponse, +} from './organization-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-deleted-data-domain-state.interface.ts b/src/common/interfaces/organization-deleted-data-domain-state.interface.ts new file mode 100644 index 000000000..81e1ec791 --- /dev/null +++ b/src/common/interfaces/organization-deleted-data-domain-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDeletedDataDomainState = + | 'failed' + | 'legacy_verified' + | 'pending' + | 'unverified' + | 'verified'; diff --git a/src/common/interfaces/organization-deleted-data-domain-verification-strategy.interface.ts b/src/common/interfaces/organization-deleted-data-domain-verification-strategy.interface.ts new file mode 100644 index 000000000..010c8b941 --- /dev/null +++ b/src/common/interfaces/organization-deleted-data-domain-verification-strategy.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDeletedDataDomainVerificationStrategy = + | 'dns' + | 'manual'; diff --git a/src/common/interfaces/organization-deleted-data-domain.interface.ts b/src/common/interfaces/organization-deleted-data-domain.interface.ts new file mode 100644 index 000000000..35ca0ca6f --- /dev/null +++ b/src/common/interfaces/organization-deleted-data-domain.interface.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDeletedDataDomainState } from './organization-deleted-data-domain-state.interface'; +import type { OrganizationDeletedDataDomainVerificationStrategy } from './organization-deleted-data-domain-verification-strategy.interface'; + +export interface OrganizationDeletedDataDomain { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** ID of the parent Organization. */ + organizationId: string; + /** Domain for the organization domain. */ + domain: string; + /** Verification state of the domain. */ + state?: OrganizationDeletedDataDomainState; + /** The prefix used in DNS verification. */ + verificationPrefix?: string; + /** Validation token to be used in DNS TXT record. */ + verificationToken?: string; + /** Strategy used to verify the domain. */ + verificationStrategy?: OrganizationDeletedDataDomainVerificationStrategy; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationDeletedDataDomainResponse { + object: 'organization_domain'; + id: string; + organization_id: string; + domain: string; + state?: OrganizationDeletedDataDomainState; + verification_prefix?: string; + verification_token?: string; + verification_strategy?: OrganizationDeletedDataDomainVerificationStrategy; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-deleted-data.interface.ts b/src/common/interfaces/organization-deleted-data.interface.ts new file mode 100644 index 000000000..26dc73694 --- /dev/null +++ b/src/common/interfaces/organization-deleted-data.interface.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDeletedDataDomain, + OrganizationDeletedDataDomainResponse, +} from './organization-deleted-data-domain.interface'; + +/** The event payload. */ +export interface OrganizationDeletedData { + /** Distinguishes the Organization object. */ + object: 'organization'; + /** Unique identifier of the Organization. */ + id: string; + /** A descriptive name for the Organization. This field does not need to be unique. */ + name: string; + /** List of Organization Domains. */ + domains: OrganizationDeletedDataDomain[]; + /** Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization. */ + metadata: Record; + /** The external ID of the Organization. */ + externalId: string | null; + /** The Stripe customer ID of the Organization. */ + stripeCustomerId?: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationDeletedDataResponse { + object: 'organization'; + id: string; + name: string; + domains: OrganizationDeletedDataDomainResponse[]; + metadata: Record; + external_id: string | null; + stripe_customer_id?: string; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-domain-created-context-actor-source.interface.ts b/src/common/interfaces/organization-domain-created-context-actor-source.interface.ts new file mode 100644 index 000000000..c70ad0222 --- /dev/null +++ b/src/common/interfaces/organization-domain-created-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainCreatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-domain-created-context-actor.interface.ts b/src/common/interfaces/organization-domain-created-context-actor.interface.ts new file mode 100644 index 000000000..6e093c609 --- /dev/null +++ b/src/common/interfaces/organization-domain-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainCreatedContextActorSource } from './organization-domain-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationDomainCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationDomainCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationDomainCreatedContextActorResponse { + id: string; + source: OrganizationDomainCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-domain-created-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-domain-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..008effb64 --- /dev/null +++ b/src/common/interfaces/organization-domain-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationDomainCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationDomainCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-domain-created-context.interface.ts b/src/common/interfaces/organization-domain-created-context.interface.ts new file mode 100644 index 000000000..4ff881cea --- /dev/null +++ b/src/common/interfaces/organization-domain-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainCreatedContextGoogleAnalyticsSession, + OrganizationDomainCreatedContextGoogleAnalyticsSessionResponse, +} from './organization-domain-created-context-google-analytics-session.interface'; +import type { + OrganizationDomainCreatedContextActor, + OrganizationDomainCreatedContextActorResponse, +} from './organization-domain-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationDomainCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationDomainCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationDomainCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationDomainCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationDomainCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationDomainCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-domain-created-data-state.interface.ts b/src/common/interfaces/organization-domain-created-data-state.interface.ts new file mode 100644 index 000000000..a634b43a3 --- /dev/null +++ b/src/common/interfaces/organization-domain-created-data-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainCreatedDataState = + | 'failed' + | 'legacy_verified' + | 'pending' + | 'unverified' + | 'verified'; diff --git a/src/common/interfaces/organization-domain-created-data-verification-strategy.interface.ts b/src/common/interfaces/organization-domain-created-data-verification-strategy.interface.ts new file mode 100644 index 000000000..0f1ce8956 --- /dev/null +++ b/src/common/interfaces/organization-domain-created-data-verification-strategy.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainCreatedDataVerificationStrategy = + | 'dns' + | 'manual'; diff --git a/src/common/interfaces/organization-domain-created-data.interface.ts b/src/common/interfaces/organization-domain-created-data.interface.ts new file mode 100644 index 000000000..e521e1f80 --- /dev/null +++ b/src/common/interfaces/organization-domain-created-data.interface.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainCreatedDataState } from './organization-domain-created-data-state.interface'; +import type { OrganizationDomainCreatedDataVerificationStrategy } from './organization-domain-created-data-verification-strategy.interface'; + +/** The event payload. */ +export interface OrganizationDomainCreatedData { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** ID of the parent Organization. */ + organizationId: string; + /** Domain for the organization domain. */ + domain: string; + /** Verification state of the domain. */ + state?: OrganizationDomainCreatedDataState; + /** The prefix used in DNS verification. */ + verificationPrefix?: string; + /** Validation token to be used in DNS TXT record. */ + verificationToken?: string; + /** Strategy used to verify the domain. */ + verificationStrategy?: OrganizationDomainCreatedDataVerificationStrategy; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationDomainCreatedDataResponse { + object: 'organization_domain'; + id: string; + organization_id: string; + domain: string; + state?: OrganizationDomainCreatedDataState; + verification_prefix?: string; + verification_token?: string; + verification_strategy?: OrganizationDomainCreatedDataVerificationStrategy; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-domain-created.interface.ts b/src/common/interfaces/organization-domain-created.interface.ts new file mode 100644 index 000000000..ea5b1351a --- /dev/null +++ b/src/common/interfaces/organization-domain-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainCreatedData, + OrganizationDomainCreatedDataResponse, +} from './organization-domain-created-data.interface'; +import type { + OrganizationDomainCreatedContext, + OrganizationDomainCreatedContextResponse, +} from './organization-domain-created-context.interface'; + +export interface OrganizationDomainCreated { + /** Unique identifier for the event. */ + id: string; + event: 'organization_domain.created'; + /** The event payload. */ + data: OrganizationDomainCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: OrganizationDomainCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface OrganizationDomainCreatedResponse { + id: string; + event: 'organization_domain.created'; + data: OrganizationDomainCreatedDataResponse; + created_at: string; + context?: OrganizationDomainCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/organization-domain-data-state.interface.ts b/src/common/interfaces/organization-domain-data-state.interface.ts new file mode 100644 index 000000000..381a2fa7e --- /dev/null +++ b/src/common/interfaces/organization-domain-data-state.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainDataState = 'pending' | 'verified'; diff --git a/src/common/interfaces/organization-domain-deleted-context-actor-source.interface.ts b/src/common/interfaces/organization-domain-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..235f51bc6 --- /dev/null +++ b/src/common/interfaces/organization-domain-deleted-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainDeletedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-domain-deleted-context-actor.interface.ts b/src/common/interfaces/organization-domain-deleted-context-actor.interface.ts new file mode 100644 index 000000000..3811e8145 --- /dev/null +++ b/src/common/interfaces/organization-domain-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainDeletedContextActorSource } from './organization-domain-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationDomainDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationDomainDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationDomainDeletedContextActorResponse { + id: string; + source: OrganizationDomainDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-domain-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-domain-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..a24bd8654 --- /dev/null +++ b/src/common/interfaces/organization-domain-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationDomainDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationDomainDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-domain-deleted-context.interface.ts b/src/common/interfaces/organization-domain-deleted-context.interface.ts new file mode 100644 index 000000000..8b961c8aa --- /dev/null +++ b/src/common/interfaces/organization-domain-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainDeletedContextGoogleAnalyticsSession, + OrganizationDomainDeletedContextGoogleAnalyticsSessionResponse, +} from './organization-domain-deleted-context-google-analytics-session.interface'; +import type { + OrganizationDomainDeletedContextActor, + OrganizationDomainDeletedContextActorResponse, +} from './organization-domain-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationDomainDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationDomainDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationDomainDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationDomainDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationDomainDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationDomainDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-domain-deleted-data-state.interface.ts b/src/common/interfaces/organization-domain-deleted-data-state.interface.ts new file mode 100644 index 000000000..067162bfe --- /dev/null +++ b/src/common/interfaces/organization-domain-deleted-data-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainDeletedDataState = + | 'failed' + | 'legacy_verified' + | 'pending' + | 'unverified' + | 'verified'; diff --git a/src/common/interfaces/organization-domain-deleted-data-verification-strategy.interface.ts b/src/common/interfaces/organization-domain-deleted-data-verification-strategy.interface.ts new file mode 100644 index 000000000..0e7d63978 --- /dev/null +++ b/src/common/interfaces/organization-domain-deleted-data-verification-strategy.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainDeletedDataVerificationStrategy = + | 'dns' + | 'manual'; diff --git a/src/common/interfaces/organization-domain-deleted-data.interface.ts b/src/common/interfaces/organization-domain-deleted-data.interface.ts new file mode 100644 index 000000000..bb5d9cb81 --- /dev/null +++ b/src/common/interfaces/organization-domain-deleted-data.interface.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainDeletedDataState } from './organization-domain-deleted-data-state.interface'; +import type { OrganizationDomainDeletedDataVerificationStrategy } from './organization-domain-deleted-data-verification-strategy.interface'; + +/** The event payload. */ +export interface OrganizationDomainDeletedData { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** ID of the parent Organization. */ + organizationId: string; + /** Domain for the organization domain. */ + domain: string; + /** Verification state of the domain. */ + state?: OrganizationDomainDeletedDataState; + /** The prefix used in DNS verification. */ + verificationPrefix?: string; + /** Validation token to be used in DNS TXT record. */ + verificationToken?: string; + /** Strategy used to verify the domain. */ + verificationStrategy?: OrganizationDomainDeletedDataVerificationStrategy; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationDomainDeletedDataResponse { + object: 'organization_domain'; + id: string; + organization_id: string; + domain: string; + state?: OrganizationDomainDeletedDataState; + verification_prefix?: string; + verification_token?: string; + verification_strategy?: OrganizationDomainDeletedDataVerificationStrategy; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-domain-deleted.interface.ts b/src/common/interfaces/organization-domain-deleted.interface.ts new file mode 100644 index 000000000..5c2b2d48a --- /dev/null +++ b/src/common/interfaces/organization-domain-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainDeletedData, + OrganizationDomainDeletedDataResponse, +} from './organization-domain-deleted-data.interface'; +import type { + OrganizationDomainDeletedContext, + OrganizationDomainDeletedContextResponse, +} from './organization-domain-deleted-context.interface'; + +export interface OrganizationDomainDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'organization_domain.deleted'; + /** The event payload. */ + data: OrganizationDomainDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: OrganizationDomainDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface OrganizationDomainDeletedResponse { + id: string; + event: 'organization_domain.deleted'; + data: OrganizationDomainDeletedDataResponse; + created_at: string; + context?: OrganizationDomainDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/organization-domain-stand-alone-state.interface.ts b/src/common/interfaces/organization-domain-stand-alone-state.interface.ts new file mode 100644 index 000000000..0efea5cba --- /dev/null +++ b/src/common/interfaces/organization-domain-stand-alone-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainStandAloneState = + | 'failed' + | 'legacy_verified' + | 'pending' + | 'unverified' + | 'verified'; diff --git a/src/common/interfaces/organization-domain-stand-alone-verification-strategy.interface.ts b/src/common/interfaces/organization-domain-stand-alone-verification-strategy.interface.ts new file mode 100644 index 000000000..8a00f9556 --- /dev/null +++ b/src/common/interfaces/organization-domain-stand-alone-verification-strategy.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainStandAloneVerificationStrategy = 'dns' | 'manual'; diff --git a/src/common/interfaces/organization-domain-state.interface.ts b/src/common/interfaces/organization-domain-state.interface.ts new file mode 100644 index 000000000..47aa2f46f --- /dev/null +++ b/src/common/interfaces/organization-domain-state.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +export enum OrganizationDomainState { + Failed = 'failed', + Pending = 'pending', + Verified = 'verified', + LegacyVerified = 'legacy_verified', + Unverified = 'unverified', +} diff --git a/src/common/interfaces/organization-domain-updated-context-actor-source.interface.ts b/src/common/interfaces/organization-domain-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..46aed01eb --- /dev/null +++ b/src/common/interfaces/organization-domain-updated-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainUpdatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-domain-updated-context-actor.interface.ts b/src/common/interfaces/organization-domain-updated-context-actor.interface.ts new file mode 100644 index 000000000..5d96194c6 --- /dev/null +++ b/src/common/interfaces/organization-domain-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainUpdatedContextActorSource } from './organization-domain-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationDomainUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationDomainUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationDomainUpdatedContextActorResponse { + id: string; + source: OrganizationDomainUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-domain-updated-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-domain-updated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..67a38b988 --- /dev/null +++ b/src/common/interfaces/organization-domain-updated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationDomainUpdatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationDomainUpdatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-domain-updated-context.interface.ts b/src/common/interfaces/organization-domain-updated-context.interface.ts new file mode 100644 index 000000000..4357d7011 --- /dev/null +++ b/src/common/interfaces/organization-domain-updated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainUpdatedContextGoogleAnalyticsSession, + OrganizationDomainUpdatedContextGoogleAnalyticsSessionResponse, +} from './organization-domain-updated-context-google-analytics-session.interface'; +import type { + OrganizationDomainUpdatedContextActor, + OrganizationDomainUpdatedContextActorResponse, +} from './organization-domain-updated-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationDomainUpdatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationDomainUpdatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationDomainUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationDomainUpdatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationDomainUpdatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationDomainUpdatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-domain-updated-data-state.interface.ts b/src/common/interfaces/organization-domain-updated-data-state.interface.ts new file mode 100644 index 000000000..e95c4ed49 --- /dev/null +++ b/src/common/interfaces/organization-domain-updated-data-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainUpdatedDataState = + | 'failed' + | 'legacy_verified' + | 'pending' + | 'unverified' + | 'verified'; diff --git a/src/common/interfaces/organization-domain-updated-data-verification-strategy.interface.ts b/src/common/interfaces/organization-domain-updated-data-verification-strategy.interface.ts new file mode 100644 index 000000000..38764155d --- /dev/null +++ b/src/common/interfaces/organization-domain-updated-data-verification-strategy.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainUpdatedDataVerificationStrategy = + | 'dns' + | 'manual'; diff --git a/src/common/interfaces/organization-domain-updated-data.interface.ts b/src/common/interfaces/organization-domain-updated-data.interface.ts new file mode 100644 index 000000000..81a561b99 --- /dev/null +++ b/src/common/interfaces/organization-domain-updated-data.interface.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainUpdatedDataState } from './organization-domain-updated-data-state.interface'; +import type { OrganizationDomainUpdatedDataVerificationStrategy } from './organization-domain-updated-data-verification-strategy.interface'; + +/** The event payload. */ +export interface OrganizationDomainUpdatedData { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** ID of the parent Organization. */ + organizationId: string; + /** Domain for the organization domain. */ + domain: string; + /** Verification state of the domain. */ + state?: OrganizationDomainUpdatedDataState; + /** The prefix used in DNS verification. */ + verificationPrefix?: string; + /** Validation token to be used in DNS TXT record. */ + verificationToken?: string; + /** Strategy used to verify the domain. */ + verificationStrategy?: OrganizationDomainUpdatedDataVerificationStrategy; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationDomainUpdatedDataResponse { + object: 'organization_domain'; + id: string; + organization_id: string; + domain: string; + state?: OrganizationDomainUpdatedDataState; + verification_prefix?: string; + verification_token?: string; + verification_strategy?: OrganizationDomainUpdatedDataVerificationStrategy; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-domain-updated.interface.ts b/src/common/interfaces/organization-domain-updated.interface.ts new file mode 100644 index 000000000..0eee2ba6f --- /dev/null +++ b/src/common/interfaces/organization-domain-updated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainUpdatedData, + OrganizationDomainUpdatedDataResponse, +} from './organization-domain-updated-data.interface'; +import type { + OrganizationDomainUpdatedContext, + OrganizationDomainUpdatedContextResponse, +} from './organization-domain-updated-context.interface'; + +export interface OrganizationDomainUpdated { + /** Unique identifier for the event. */ + id: string; + event: 'organization_domain.updated'; + /** The event payload. */ + data: OrganizationDomainUpdatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: OrganizationDomainUpdatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface OrganizationDomainUpdatedResponse { + id: string; + event: 'organization_domain.updated'; + data: OrganizationDomainUpdatedDataResponse; + created_at: string; + context?: OrganizationDomainUpdatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/organization-domain-verification-failed-context-actor-source.interface.ts b/src/common/interfaces/organization-domain-verification-failed-context-actor-source.interface.ts new file mode 100644 index 000000000..d048a5d61 --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-failed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainVerificationFailedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-domain-verification-failed-context-actor.interface.ts b/src/common/interfaces/organization-domain-verification-failed-context-actor.interface.ts new file mode 100644 index 000000000..480d22437 --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-failed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainVerificationFailedContextActorSource } from './organization-domain-verification-failed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationDomainVerificationFailedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationDomainVerificationFailedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationDomainVerificationFailedContextActorResponse { + id: string; + source: OrganizationDomainVerificationFailedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-domain-verification-failed-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-domain-verification-failed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..893a863b7 --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-failed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationDomainVerificationFailedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationDomainVerificationFailedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-domain-verification-failed-context.interface.ts b/src/common/interfaces/organization-domain-verification-failed-context.interface.ts new file mode 100644 index 000000000..729bb594c --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-failed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainVerificationFailedContextGoogleAnalyticsSession, + OrganizationDomainVerificationFailedContextGoogleAnalyticsSessionResponse, +} from './organization-domain-verification-failed-context-google-analytics-session.interface'; +import type { + OrganizationDomainVerificationFailedContextActor, + OrganizationDomainVerificationFailedContextActorResponse, +} from './organization-domain-verification-failed-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationDomainVerificationFailedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationDomainVerificationFailedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationDomainVerificationFailedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationDomainVerificationFailedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationDomainVerificationFailedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationDomainVerificationFailedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-domain-verification-failed-data-organization-domain-state.interface.ts b/src/common/interfaces/organization-domain-verification-failed-data-organization-domain-state.interface.ts new file mode 100644 index 000000000..bd8db33c5 --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-failed-data-organization-domain-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainVerificationFailedDataOrganizationDomainState = + | 'failed' + | 'legacy_verified' + | 'pending' + | 'unverified' + | 'verified'; diff --git a/src/common/interfaces/organization-domain-verification-failed-data-organization-domain-verification-strategy.interface.ts b/src/common/interfaces/organization-domain-verification-failed-data-organization-domain-verification-strategy.interface.ts new file mode 100644 index 000000000..8768376a4 --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-failed-data-organization-domain-verification-strategy.interface.ts @@ -0,0 +1,4 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainVerificationFailedDataOrganizationDomainVerificationStrategy = + 'dns' | 'manual'; diff --git a/src/common/interfaces/organization-domain-verification-failed-data-organization-domain.interface.ts b/src/common/interfaces/organization-domain-verification-failed-data-organization-domain.interface.ts new file mode 100644 index 000000000..9a7ec63c1 --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-failed-data-organization-domain.interface.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainVerificationFailedDataOrganizationDomainState } from './organization-domain-verification-failed-data-organization-domain-state.interface'; +import type { OrganizationDomainVerificationFailedDataOrganizationDomainVerificationStrategy } from './organization-domain-verification-failed-data-organization-domain-verification-strategy.interface'; + +/** The organization domain that failed verification. */ +export interface OrganizationDomainVerificationFailedDataOrganizationDomain { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** ID of the parent Organization. */ + organizationId: string; + /** Domain for the organization domain. */ + domain: string; + /** Verification state of the domain. */ + state?: OrganizationDomainVerificationFailedDataOrganizationDomainState; + /** The prefix used in DNS verification. */ + verificationPrefix?: string; + /** Validation token to be used in DNS TXT record. */ + verificationToken?: string; + /** Strategy used to verify the domain. */ + verificationStrategy?: OrganizationDomainVerificationFailedDataOrganizationDomainVerificationStrategy; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationDomainVerificationFailedDataOrganizationDomainResponse { + object: 'organization_domain'; + id: string; + organization_id: string; + domain: string; + state?: OrganizationDomainVerificationFailedDataOrganizationDomainState; + verification_prefix?: string; + verification_token?: string; + verification_strategy?: OrganizationDomainVerificationFailedDataOrganizationDomainVerificationStrategy; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-domain-verification-failed-data-reason.interface.ts b/src/common/interfaces/organization-domain-verification-failed-data-reason.interface.ts new file mode 100644 index 000000000..24f951856 --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-failed-data-reason.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainVerificationFailedDataReason = + | 'domain_verification_period_expired' + | 'domain_verified_by_other_organization'; diff --git a/src/common/interfaces/organization-domain-verification-failed-data.interface.ts b/src/common/interfaces/organization-domain-verification-failed-data.interface.ts new file mode 100644 index 000000000..65312d998 --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-failed-data.interface.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainVerificationFailedDataOrganizationDomain, + OrganizationDomainVerificationFailedDataOrganizationDomainResponse, +} from './organization-domain-verification-failed-data-organization-domain.interface'; +import type { OrganizationDomainVerificationFailedDataReason } from './organization-domain-verification-failed-data-reason.interface'; + +/** The event payload. */ +export interface OrganizationDomainVerificationFailedData { + /** The reason the domain verification failed. */ + reason: OrganizationDomainVerificationFailedDataReason; + /** The organization domain that failed verification. */ + organizationDomain: OrganizationDomainVerificationFailedDataOrganizationDomain; +} + +export interface OrganizationDomainVerificationFailedDataResponse { + reason: OrganizationDomainVerificationFailedDataReason; + organization_domain: OrganizationDomainVerificationFailedDataOrganizationDomainResponse; +} diff --git a/src/common/interfaces/organization-domain-verification-failed.interface.ts b/src/common/interfaces/organization-domain-verification-failed.interface.ts new file mode 100644 index 000000000..51437fdbb --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-failed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainVerificationFailedData, + OrganizationDomainVerificationFailedDataResponse, +} from './organization-domain-verification-failed-data.interface'; +import type { + OrganizationDomainVerificationFailedContext, + OrganizationDomainVerificationFailedContextResponse, +} from './organization-domain-verification-failed-context.interface'; + +export interface OrganizationDomainVerificationFailed { + /** Unique identifier for the event. */ + id: string; + event: 'organization_domain.verification_failed'; + /** The event payload. */ + data: OrganizationDomainVerificationFailedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: OrganizationDomainVerificationFailedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface OrganizationDomainVerificationFailedResponse { + id: string; + event: 'organization_domain.verification_failed'; + data: OrganizationDomainVerificationFailedDataResponse; + created_at: string; + context?: OrganizationDomainVerificationFailedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/organization-domain-verification-strategy.interface.ts b/src/common/interfaces/organization-domain-verification-strategy.interface.ts new file mode 100644 index 000000000..9a8591f28 --- /dev/null +++ b/src/common/interfaces/organization-domain-verification-strategy.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export enum OrganizationDomainVerificationStrategy { + Dns = 'dns', + Manual = 'manual', +} diff --git a/src/common/interfaces/organization-domain-verified-context-actor-source.interface.ts b/src/common/interfaces/organization-domain-verified-context-actor-source.interface.ts new file mode 100644 index 000000000..b695f1c5a --- /dev/null +++ b/src/common/interfaces/organization-domain-verified-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainVerifiedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-domain-verified-context-actor.interface.ts b/src/common/interfaces/organization-domain-verified-context-actor.interface.ts new file mode 100644 index 000000000..e02b02098 --- /dev/null +++ b/src/common/interfaces/organization-domain-verified-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainVerifiedContextActorSource } from './organization-domain-verified-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationDomainVerifiedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationDomainVerifiedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationDomainVerifiedContextActorResponse { + id: string; + source: OrganizationDomainVerifiedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-domain-verified-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-domain-verified-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..efa735bd1 --- /dev/null +++ b/src/common/interfaces/organization-domain-verified-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationDomainVerifiedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationDomainVerifiedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-domain-verified-context.interface.ts b/src/common/interfaces/organization-domain-verified-context.interface.ts new file mode 100644 index 000000000..cd2d3839a --- /dev/null +++ b/src/common/interfaces/organization-domain-verified-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainVerifiedContextGoogleAnalyticsSession, + OrganizationDomainVerifiedContextGoogleAnalyticsSessionResponse, +} from './organization-domain-verified-context-google-analytics-session.interface'; +import type { + OrganizationDomainVerifiedContextActor, + OrganizationDomainVerifiedContextActorResponse, +} from './organization-domain-verified-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationDomainVerifiedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationDomainVerifiedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationDomainVerifiedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationDomainVerifiedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationDomainVerifiedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationDomainVerifiedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-domain-verified-data-state.interface.ts b/src/common/interfaces/organization-domain-verified-data-state.interface.ts new file mode 100644 index 000000000..91fcbdf5c --- /dev/null +++ b/src/common/interfaces/organization-domain-verified-data-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainVerifiedDataState = + | 'failed' + | 'legacy_verified' + | 'pending' + | 'unverified' + | 'verified'; diff --git a/src/common/interfaces/organization-domain-verified-data-verification-strategy.interface.ts b/src/common/interfaces/organization-domain-verified-data-verification-strategy.interface.ts new file mode 100644 index 000000000..1d07616ba --- /dev/null +++ b/src/common/interfaces/organization-domain-verified-data-verification-strategy.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationDomainVerifiedDataVerificationStrategy = + | 'dns' + | 'manual'; diff --git a/src/common/interfaces/organization-domain-verified-data.interface.ts b/src/common/interfaces/organization-domain-verified-data.interface.ts new file mode 100644 index 000000000..1a2f14fd4 --- /dev/null +++ b/src/common/interfaces/organization-domain-verified-data.interface.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainVerifiedDataState } from './organization-domain-verified-data-state.interface'; +import type { OrganizationDomainVerifiedDataVerificationStrategy } from './organization-domain-verified-data-verification-strategy.interface'; + +/** The event payload. */ +export interface OrganizationDomainVerifiedData { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** ID of the parent Organization. */ + organizationId: string; + /** Domain for the organization domain. */ + domain: string; + /** Verification state of the domain. */ + state?: OrganizationDomainVerifiedDataState; + /** The prefix used in DNS verification. */ + verificationPrefix?: string; + /** Validation token to be used in DNS TXT record. */ + verificationToken?: string; + /** Strategy used to verify the domain. */ + verificationStrategy?: OrganizationDomainVerifiedDataVerificationStrategy; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationDomainVerifiedDataResponse { + object: 'organization_domain'; + id: string; + organization_id: string; + domain: string; + state?: OrganizationDomainVerifiedDataState; + verification_prefix?: string; + verification_token?: string; + verification_strategy?: OrganizationDomainVerifiedDataVerificationStrategy; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-domain-verified.interface.ts b/src/common/interfaces/organization-domain-verified.interface.ts new file mode 100644 index 000000000..6e10de357 --- /dev/null +++ b/src/common/interfaces/organization-domain-verified.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainVerifiedData, + OrganizationDomainVerifiedDataResponse, +} from './organization-domain-verified-data.interface'; +import type { + OrganizationDomainVerifiedContext, + OrganizationDomainVerifiedContextResponse, +} from './organization-domain-verified-context.interface'; + +export interface OrganizationDomainVerified { + /** Unique identifier for the event. */ + id: string; + event: 'organization_domain.verified'; + /** The event payload. */ + data: OrganizationDomainVerifiedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: OrganizationDomainVerifiedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface OrganizationDomainVerifiedResponse { + id: string; + event: 'organization_domain.verified'; + data: OrganizationDomainVerifiedDataResponse; + created_at: string; + context?: OrganizationDomainVerifiedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/organization-membership-created-context-actor-source.interface.ts b/src/common/interfaces/organization-membership-created-context-actor-source.interface.ts new file mode 100644 index 000000000..5f5adf9e3 --- /dev/null +++ b/src/common/interfaces/organization-membership-created-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationMembershipCreatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-membership-created-context-actor.interface.ts b/src/common/interfaces/organization-membership-created-context-actor.interface.ts new file mode 100644 index 000000000..eadd85924 --- /dev/null +++ b/src/common/interfaces/organization-membership-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationMembershipCreatedContextActorSource } from './organization-membership-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationMembershipCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationMembershipCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationMembershipCreatedContextActorResponse { + id: string; + source: OrganizationMembershipCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-membership-created-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-membership-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..fa7604283 --- /dev/null +++ b/src/common/interfaces/organization-membership-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationMembershipCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationMembershipCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-membership-created-context.interface.ts b/src/common/interfaces/organization-membership-created-context.interface.ts new file mode 100644 index 000000000..780ffbfaf --- /dev/null +++ b/src/common/interfaces/organization-membership-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationMembershipCreatedContextGoogleAnalyticsSession, + OrganizationMembershipCreatedContextGoogleAnalyticsSessionResponse, +} from './organization-membership-created-context-google-analytics-session.interface'; +import type { + OrganizationMembershipCreatedContextActor, + OrganizationMembershipCreatedContextActorResponse, +} from './organization-membership-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationMembershipCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationMembershipCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationMembershipCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationMembershipCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationMembershipCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationMembershipCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-membership-created-data-status.interface.ts b/src/common/interfaces/organization-membership-created-data-status.interface.ts new file mode 100644 index 000000000..21a04972c --- /dev/null +++ b/src/common/interfaces/organization-membership-created-data-status.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationMembershipCreatedDataStatus = + | 'active' + | 'inactive' + | 'pending'; diff --git a/src/common/interfaces/organization-membership-created-data.interface.ts b/src/common/interfaces/organization-membership-created-data.interface.ts new file mode 100644 index 000000000..f96178a6a --- /dev/null +++ b/src/common/interfaces/organization-membership-created-data.interface.ts @@ -0,0 +1,43 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationMembershipCreatedDataStatus } from './organization-membership-created-data-status.interface'; + +/** The event payload. */ +export interface OrganizationMembershipCreatedData { + /** Distinguishes the organization membership object. */ + object: 'organization_membership'; + /** Unique identifier of the organization membership. */ + id: string; + /** The ID of the user. */ + userId: string; + /** The ID of the organization. */ + organizationId: string; + /** The status of the organization membership. */ + status: OrganizationMembershipCreatedDataStatus; + /** The role associated with the membership. */ + role: Record; + /** The roles associated with the membership. */ + roles?: Record[]; + /** Custom attributes associated with the membership. */ + customAttributes: Record; + /** Whether the membership is managed by a directory sync provider. */ + directoryManaged: boolean; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationMembershipCreatedDataResponse { + object: 'organization_membership'; + id: string; + user_id: string; + organization_id: string; + status: OrganizationMembershipCreatedDataStatus; + role: Record; + roles?: Record[]; + custom_attributes: Record; + directory_managed: boolean; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-membership-deleted-context-actor-source.interface.ts b/src/common/interfaces/organization-membership-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..e5b2b158e --- /dev/null +++ b/src/common/interfaces/organization-membership-deleted-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationMembershipDeletedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-membership-deleted-context-actor.interface.ts b/src/common/interfaces/organization-membership-deleted-context-actor.interface.ts new file mode 100644 index 000000000..c28654b63 --- /dev/null +++ b/src/common/interfaces/organization-membership-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationMembershipDeletedContextActorSource } from './organization-membership-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationMembershipDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationMembershipDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationMembershipDeletedContextActorResponse { + id: string; + source: OrganizationMembershipDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-membership-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-membership-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..836aa32b5 --- /dev/null +++ b/src/common/interfaces/organization-membership-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationMembershipDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationMembershipDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-membership-deleted-context.interface.ts b/src/common/interfaces/organization-membership-deleted-context.interface.ts new file mode 100644 index 000000000..b04fd4a20 --- /dev/null +++ b/src/common/interfaces/organization-membership-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationMembershipDeletedContextGoogleAnalyticsSession, + OrganizationMembershipDeletedContextGoogleAnalyticsSessionResponse, +} from './organization-membership-deleted-context-google-analytics-session.interface'; +import type { + OrganizationMembershipDeletedContextActor, + OrganizationMembershipDeletedContextActorResponse, +} from './organization-membership-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationMembershipDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationMembershipDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationMembershipDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationMembershipDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationMembershipDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationMembershipDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-membership-deleted-data-status.interface.ts b/src/common/interfaces/organization-membership-deleted-data-status.interface.ts new file mode 100644 index 000000000..aab726dc5 --- /dev/null +++ b/src/common/interfaces/organization-membership-deleted-data-status.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationMembershipDeletedDataStatus = + | 'active' + | 'inactive' + | 'pending'; diff --git a/src/common/interfaces/organization-membership-deleted-data.interface.ts b/src/common/interfaces/organization-membership-deleted-data.interface.ts new file mode 100644 index 000000000..3141bea1e --- /dev/null +++ b/src/common/interfaces/organization-membership-deleted-data.interface.ts @@ -0,0 +1,43 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationMembershipDeletedDataStatus } from './organization-membership-deleted-data-status.interface'; + +/** The event payload. */ +export interface OrganizationMembershipDeletedData { + /** Distinguishes the organization membership object. */ + object: 'organization_membership'; + /** Unique identifier of the organization membership. */ + id: string; + /** The ID of the user. */ + userId: string; + /** The ID of the organization. */ + organizationId: string; + /** The status of the organization membership. */ + status: OrganizationMembershipDeletedDataStatus; + /** The role associated with the membership. */ + role: Record; + /** The roles associated with the membership. */ + roles?: Record[]; + /** Custom attributes associated with the membership. */ + customAttributes: Record; + /** Whether the membership is managed by a directory sync provider. */ + directoryManaged: boolean; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationMembershipDeletedDataResponse { + object: 'organization_membership'; + id: string; + user_id: string; + organization_id: string; + status: OrganizationMembershipDeletedDataStatus; + role: Record; + roles?: Record[]; + custom_attributes: Record; + directory_managed: boolean; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-membership-status.interface.ts b/src/common/interfaces/organization-membership-status.interface.ts new file mode 100644 index 000000000..0e63e8cf2 --- /dev/null +++ b/src/common/interfaces/organization-membership-status.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationMembershipStatus = 'active' | 'inactive' | 'pending'; diff --git a/src/common/interfaces/organization-membership-updated-context-actor-source.interface.ts b/src/common/interfaces/organization-membership-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..19afc30a6 --- /dev/null +++ b/src/common/interfaces/organization-membership-updated-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationMembershipUpdatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-membership-updated-context-actor.interface.ts b/src/common/interfaces/organization-membership-updated-context-actor.interface.ts new file mode 100644 index 000000000..679d03664 --- /dev/null +++ b/src/common/interfaces/organization-membership-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationMembershipUpdatedContextActorSource } from './organization-membership-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationMembershipUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationMembershipUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationMembershipUpdatedContextActorResponse { + id: string; + source: OrganizationMembershipUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-membership-updated-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-membership-updated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..6132902ab --- /dev/null +++ b/src/common/interfaces/organization-membership-updated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationMembershipUpdatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationMembershipUpdatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-membership-updated-context.interface.ts b/src/common/interfaces/organization-membership-updated-context.interface.ts new file mode 100644 index 000000000..deb17dd55 --- /dev/null +++ b/src/common/interfaces/organization-membership-updated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationMembershipUpdatedContextGoogleAnalyticsSession, + OrganizationMembershipUpdatedContextGoogleAnalyticsSessionResponse, +} from './organization-membership-updated-context-google-analytics-session.interface'; +import type { + OrganizationMembershipUpdatedContextActor, + OrganizationMembershipUpdatedContextActorResponse, +} from './organization-membership-updated-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationMembershipUpdatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationMembershipUpdatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationMembershipUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationMembershipUpdatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationMembershipUpdatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationMembershipUpdatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-membership-updated-data-status.interface.ts b/src/common/interfaces/organization-membership-updated-data-status.interface.ts new file mode 100644 index 000000000..151a60d04 --- /dev/null +++ b/src/common/interfaces/organization-membership-updated-data-status.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationMembershipUpdatedDataStatus = + | 'active' + | 'inactive' + | 'pending'; diff --git a/src/common/interfaces/organization-membership-updated-data.interface.ts b/src/common/interfaces/organization-membership-updated-data.interface.ts new file mode 100644 index 000000000..c31d5fb01 --- /dev/null +++ b/src/common/interfaces/organization-membership-updated-data.interface.ts @@ -0,0 +1,43 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationMembershipUpdatedDataStatus } from './organization-membership-updated-data-status.interface'; + +/** The event payload. */ +export interface OrganizationMembershipUpdatedData { + /** Distinguishes the organization membership object. */ + object: 'organization_membership'; + /** Unique identifier of the organization membership. */ + id: string; + /** The ID of the user. */ + userId: string; + /** The ID of the organization. */ + organizationId: string; + /** The status of the organization membership. */ + status: OrganizationMembershipUpdatedDataStatus; + /** The role associated with the membership. */ + role: Record; + /** The roles associated with the membership. */ + roles?: Record[]; + /** Custom attributes associated with the membership. */ + customAttributes: Record; + /** Whether the membership is managed by a directory sync provider. */ + directoryManaged: boolean; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationMembershipUpdatedDataResponse { + object: 'organization_membership'; + id: string; + user_id: string; + organization_id: string; + status: OrganizationMembershipUpdatedDataStatus; + role: Record; + roles?: Record[]; + custom_attributes: Record; + directory_managed: boolean; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-role-created-context-actor-source.interface.ts b/src/common/interfaces/organization-role-created-context-actor-source.interface.ts new file mode 100644 index 000000000..94cba95a1 --- /dev/null +++ b/src/common/interfaces/organization-role-created-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationRoleCreatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-role-created-context-actor.interface.ts b/src/common/interfaces/organization-role-created-context-actor.interface.ts new file mode 100644 index 000000000..de2de354e --- /dev/null +++ b/src/common/interfaces/organization-role-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationRoleCreatedContextActorSource } from './organization-role-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationRoleCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationRoleCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationRoleCreatedContextActorResponse { + id: string; + source: OrganizationRoleCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-role-created-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-role-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..4e6865d6e --- /dev/null +++ b/src/common/interfaces/organization-role-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationRoleCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationRoleCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-role-created-context.interface.ts b/src/common/interfaces/organization-role-created-context.interface.ts new file mode 100644 index 000000000..d866bc248 --- /dev/null +++ b/src/common/interfaces/organization-role-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationRoleCreatedContextGoogleAnalyticsSession, + OrganizationRoleCreatedContextGoogleAnalyticsSessionResponse, +} from './organization-role-created-context-google-analytics-session.interface'; +import type { + OrganizationRoleCreatedContextActor, + OrganizationRoleCreatedContextActorResponse, +} from './organization-role-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationRoleCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationRoleCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationRoleCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationRoleCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationRoleCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationRoleCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-role-created-data.interface.ts b/src/common/interfaces/organization-role-created-data.interface.ts new file mode 100644 index 000000000..99113b57c --- /dev/null +++ b/src/common/interfaces/organization-role-created-data.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface OrganizationRoleCreatedData { + /** Distinguishes the organization role object. */ + object: 'organization_role'; + /** The ID of the organization the role belongs to. */ + organizationId: string; + /** The slug identifier of the role. */ + slug: string; + /** The name of the role. */ + name: string; + /** A description of the role. */ + description: string | null; + /** The slug of the resource type the role applies to. */ + resourceTypeSlug: string; + /** The permissions granted by the role. */ + permissions: string[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationRoleCreatedDataResponse { + object: 'organization_role'; + organization_id: string; + slug: string; + name: string; + description: string | null; + resource_type_slug: string; + permissions: string[]; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-role-created.interface.ts b/src/common/interfaces/organization-role-created.interface.ts new file mode 100644 index 000000000..9db128668 --- /dev/null +++ b/src/common/interfaces/organization-role-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationRoleCreatedData, + OrganizationRoleCreatedDataResponse, +} from './organization-role-created-data.interface'; +import type { + OrganizationRoleCreatedContext, + OrganizationRoleCreatedContextResponse, +} from './organization-role-created-context.interface'; + +export interface OrganizationRoleCreated { + /** Unique identifier for the event. */ + id: string; + event: 'organization_role.created'; + /** The event payload. */ + data: OrganizationRoleCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: OrganizationRoleCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface OrganizationRoleCreatedResponse { + id: string; + event: 'organization_role.created'; + data: OrganizationRoleCreatedDataResponse; + created_at: string; + context?: OrganizationRoleCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/organization-role-deleted-context-actor-source.interface.ts b/src/common/interfaces/organization-role-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..899d561cb --- /dev/null +++ b/src/common/interfaces/organization-role-deleted-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationRoleDeletedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-role-deleted-context-actor.interface.ts b/src/common/interfaces/organization-role-deleted-context-actor.interface.ts new file mode 100644 index 000000000..88059505e --- /dev/null +++ b/src/common/interfaces/organization-role-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationRoleDeletedContextActorSource } from './organization-role-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationRoleDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationRoleDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationRoleDeletedContextActorResponse { + id: string; + source: OrganizationRoleDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-role-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-role-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..6f7e33173 --- /dev/null +++ b/src/common/interfaces/organization-role-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationRoleDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationRoleDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-role-deleted-context.interface.ts b/src/common/interfaces/organization-role-deleted-context.interface.ts new file mode 100644 index 000000000..77ef31a0d --- /dev/null +++ b/src/common/interfaces/organization-role-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationRoleDeletedContextGoogleAnalyticsSession, + OrganizationRoleDeletedContextGoogleAnalyticsSessionResponse, +} from './organization-role-deleted-context-google-analytics-session.interface'; +import type { + OrganizationRoleDeletedContextActor, + OrganizationRoleDeletedContextActorResponse, +} from './organization-role-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationRoleDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationRoleDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationRoleDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationRoleDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationRoleDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationRoleDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-role-deleted-data.interface.ts b/src/common/interfaces/organization-role-deleted-data.interface.ts new file mode 100644 index 000000000..5b46898a6 --- /dev/null +++ b/src/common/interfaces/organization-role-deleted-data.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationRoleCreatedData, + OrganizationRoleCreatedDataResponse, +} from './organization-role-created-data.interface'; + +export type OrganizationRoleDeletedData = OrganizationRoleCreatedData; +export type OrganizationRoleDeletedDataResponse = + OrganizationRoleCreatedDataResponse; diff --git a/src/common/interfaces/organization-role-deleted.interface.ts b/src/common/interfaces/organization-role-deleted.interface.ts new file mode 100644 index 000000000..e77825f50 --- /dev/null +++ b/src/common/interfaces/organization-role-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationRoleDeletedData, + OrganizationRoleDeletedDataResponse, +} from './organization-role-deleted-data.interface'; +import type { + OrganizationRoleDeletedContext, + OrganizationRoleDeletedContextResponse, +} from './organization-role-deleted-context.interface'; + +export interface OrganizationRoleDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'organization_role.deleted'; + /** The event payload. */ + data: OrganizationRoleDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: OrganizationRoleDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface OrganizationRoleDeletedResponse { + id: string; + event: 'organization_role.deleted'; + data: OrganizationRoleDeletedDataResponse; + created_at: string; + context?: OrganizationRoleDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/organization-role-updated-context-actor-source.interface.ts b/src/common/interfaces/organization-role-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..b30111b80 --- /dev/null +++ b/src/common/interfaces/organization-role-updated-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationRoleUpdatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-role-updated-context-actor.interface.ts b/src/common/interfaces/organization-role-updated-context-actor.interface.ts new file mode 100644 index 000000000..d03b77fe4 --- /dev/null +++ b/src/common/interfaces/organization-role-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationRoleUpdatedContextActorSource } from './organization-role-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationRoleUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationRoleUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationRoleUpdatedContextActorResponse { + id: string; + source: OrganizationRoleUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-role-updated-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-role-updated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..b7750d056 --- /dev/null +++ b/src/common/interfaces/organization-role-updated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationRoleUpdatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationRoleUpdatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-role-updated-context.interface.ts b/src/common/interfaces/organization-role-updated-context.interface.ts new file mode 100644 index 000000000..15b952aba --- /dev/null +++ b/src/common/interfaces/organization-role-updated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationRoleUpdatedContextGoogleAnalyticsSession, + OrganizationRoleUpdatedContextGoogleAnalyticsSessionResponse, +} from './organization-role-updated-context-google-analytics-session.interface'; +import type { + OrganizationRoleUpdatedContextActor, + OrganizationRoleUpdatedContextActorResponse, +} from './organization-role-updated-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationRoleUpdatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationRoleUpdatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationRoleUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationRoleUpdatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationRoleUpdatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationRoleUpdatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-role-updated-data.interface.ts b/src/common/interfaces/organization-role-updated-data.interface.ts new file mode 100644 index 000000000..be0b7e27b --- /dev/null +++ b/src/common/interfaces/organization-role-updated-data.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationRoleCreatedData, + OrganizationRoleCreatedDataResponse, +} from './organization-role-created-data.interface'; + +export type OrganizationRoleUpdatedData = OrganizationRoleCreatedData; +export type OrganizationRoleUpdatedDataResponse = + OrganizationRoleCreatedDataResponse; diff --git a/src/common/interfaces/organization-role-updated.interface.ts b/src/common/interfaces/organization-role-updated.interface.ts new file mode 100644 index 000000000..b9b437228 --- /dev/null +++ b/src/common/interfaces/organization-role-updated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationRoleUpdatedData, + OrganizationRoleUpdatedDataResponse, +} from './organization-role-updated-data.interface'; +import type { + OrganizationRoleUpdatedContext, + OrganizationRoleUpdatedContextResponse, +} from './organization-role-updated-context.interface'; + +export interface OrganizationRoleUpdated { + /** Unique identifier for the event. */ + id: string; + event: 'organization_role.updated'; + /** The event payload. */ + data: OrganizationRoleUpdatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: OrganizationRoleUpdatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface OrganizationRoleUpdatedResponse { + id: string; + event: 'organization_role.updated'; + data: OrganizationRoleUpdatedDataResponse; + created_at: string; + context?: OrganizationRoleUpdatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/organization-updated-context-actor-source.interface.ts b/src/common/interfaces/organization-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..bc89c7de1 --- /dev/null +++ b/src/common/interfaces/organization-updated-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationUpdatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/organization-updated-context-actor.interface.ts b/src/common/interfaces/organization-updated-context-actor.interface.ts new file mode 100644 index 000000000..6f8af60d1 --- /dev/null +++ b/src/common/interfaces/organization-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationUpdatedContextActorSource } from './organization-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface OrganizationUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: OrganizationUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface OrganizationUpdatedContextActorResponse { + id: string; + source: OrganizationUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/organization-updated-context-google-analytics-session.interface.ts b/src/common/interfaces/organization-updated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..0ec8e6157 --- /dev/null +++ b/src/common/interfaces/organization-updated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type OrganizationUpdatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type OrganizationUpdatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/organization-updated-context.interface.ts b/src/common/interfaces/organization-updated-context.interface.ts new file mode 100644 index 000000000..f979cae9c --- /dev/null +++ b/src/common/interfaces/organization-updated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationUpdatedContextGoogleAnalyticsSession, + OrganizationUpdatedContextGoogleAnalyticsSessionResponse, +} from './organization-updated-context-google-analytics-session.interface'; +import type { + OrganizationUpdatedContextActor, + OrganizationUpdatedContextActorResponse, +} from './organization-updated-context-actor.interface'; + +/** Additional context about the event. */ +export interface OrganizationUpdatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: OrganizationUpdatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: OrganizationUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface OrganizationUpdatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: OrganizationUpdatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: OrganizationUpdatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/organization-updated-data-domain-state.interface.ts b/src/common/interfaces/organization-updated-data-domain-state.interface.ts new file mode 100644 index 000000000..543a18fec --- /dev/null +++ b/src/common/interfaces/organization-updated-data-domain-state.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationUpdatedDataDomainState = + | 'failed' + | 'legacy_verified' + | 'pending' + | 'unverified' + | 'verified'; diff --git a/src/common/interfaces/organization-updated-data-domain-verification-strategy.interface.ts b/src/common/interfaces/organization-updated-data-domain-verification-strategy.interface.ts new file mode 100644 index 000000000..34d859923 --- /dev/null +++ b/src/common/interfaces/organization-updated-data-domain-verification-strategy.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationUpdatedDataDomainVerificationStrategy = + | 'dns' + | 'manual'; diff --git a/src/common/interfaces/organization-updated-data-domain.interface.ts b/src/common/interfaces/organization-updated-data-domain.interface.ts new file mode 100644 index 000000000..2bd7ee510 --- /dev/null +++ b/src/common/interfaces/organization-updated-data-domain.interface.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationUpdatedDataDomainState } from './organization-updated-data-domain-state.interface'; +import type { OrganizationUpdatedDataDomainVerificationStrategy } from './organization-updated-data-domain-verification-strategy.interface'; + +export interface OrganizationUpdatedDataDomain { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** ID of the parent Organization. */ + organizationId: string; + /** Domain for the organization domain. */ + domain: string; + /** Verification state of the domain. */ + state?: OrganizationUpdatedDataDomainState; + /** The prefix used in DNS verification. */ + verificationPrefix?: string; + /** Validation token to be used in DNS TXT record. */ + verificationToken?: string; + /** Strategy used to verify the domain. */ + verificationStrategy?: OrganizationUpdatedDataDomainVerificationStrategy; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationUpdatedDataDomainResponse { + object: 'organization_domain'; + id: string; + organization_id: string; + domain: string; + state?: OrganizationUpdatedDataDomainState; + verification_prefix?: string; + verification_token?: string; + verification_strategy?: OrganizationUpdatedDataDomainVerificationStrategy; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/organization-updated-data.interface.ts b/src/common/interfaces/organization-updated-data.interface.ts new file mode 100644 index 000000000..af6a6ea53 --- /dev/null +++ b/src/common/interfaces/organization-updated-data.interface.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationUpdatedDataDomain, + OrganizationUpdatedDataDomainResponse, +} from './organization-updated-data-domain.interface'; + +/** The event payload. */ +export interface OrganizationUpdatedData { + /** Distinguishes the Organization object. */ + object: 'organization'; + /** Unique identifier of the Organization. */ + id: string; + /** A descriptive name for the Organization. This field does not need to be unique. */ + name: string; + /** List of Organization Domains. */ + domains: OrganizationUpdatedDataDomain[]; + /** Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization. */ + metadata: Record; + /** The external ID of the Organization. */ + externalId: string | null; + /** The Stripe customer ID of the Organization. */ + stripeCustomerId?: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationUpdatedDataResponse { + object: 'organization'; + id: string; + name: string; + domains: OrganizationUpdatedDataDomainResponse[]; + metadata: Record; + external_id: string | null; + stripe_customer_id?: string; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/password-reset-created-context-actor-source.interface.ts b/src/common/interfaces/password-reset-created-context-actor-source.interface.ts new file mode 100644 index 000000000..7270aa64e --- /dev/null +++ b/src/common/interfaces/password-reset-created-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type PasswordResetCreatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/password-reset-created-context-actor.interface.ts b/src/common/interfaces/password-reset-created-context-actor.interface.ts new file mode 100644 index 000000000..79c6ca300 --- /dev/null +++ b/src/common/interfaces/password-reset-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { PasswordResetCreatedContextActorSource } from './password-reset-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface PasswordResetCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: PasswordResetCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface PasswordResetCreatedContextActorResponse { + id: string; + source: PasswordResetCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/password-reset-created-context-google-analytics-session.interface.ts b/src/common/interfaces/password-reset-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..64c3068ec --- /dev/null +++ b/src/common/interfaces/password-reset-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type PasswordResetCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type PasswordResetCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/password-reset-created-context.interface.ts b/src/common/interfaces/password-reset-created-context.interface.ts new file mode 100644 index 000000000..8e18e1ec8 --- /dev/null +++ b/src/common/interfaces/password-reset-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PasswordResetCreatedContextGoogleAnalyticsSession, + PasswordResetCreatedContextGoogleAnalyticsSessionResponse, +} from './password-reset-created-context-google-analytics-session.interface'; +import type { + PasswordResetCreatedContextActor, + PasswordResetCreatedContextActorResponse, +} from './password-reset-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface PasswordResetCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: PasswordResetCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: PasswordResetCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface PasswordResetCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: PasswordResetCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: PasswordResetCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/password-reset-created-data.interface.ts b/src/common/interfaces/password-reset-created-data.interface.ts new file mode 100644 index 000000000..5c1fe3280 --- /dev/null +++ b/src/common/interfaces/password-reset-created-data.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface PasswordResetCreatedData { + /** Distinguishes the password reset object. */ + object: 'password_reset'; + /** The unique ID of the password reset object. */ + id: string; + /** The unique ID of the user. */ + userId: string; + /** The email address of the user. */ + email: string; + /** The timestamp when the password reset token expires. */ + expiresAt: string; + /** The timestamp when the password reset token was created. */ + createdAt: string; +} + +export interface PasswordResetCreatedDataResponse { + object: 'password_reset'; + id: string; + user_id: string; + email: string; + expires_at: string; + created_at: string; +} diff --git a/src/common/interfaces/password-reset-created.interface.ts b/src/common/interfaces/password-reset-created.interface.ts new file mode 100644 index 000000000..1d7689f47 --- /dev/null +++ b/src/common/interfaces/password-reset-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PasswordResetCreatedData, + PasswordResetCreatedDataResponse, +} from './password-reset-created-data.interface'; +import type { + PasswordResetCreatedContext, + PasswordResetCreatedContextResponse, +} from './password-reset-created-context.interface'; + +export interface PasswordResetCreated { + /** Unique identifier for the event. */ + id: string; + event: 'password_reset.created'; + /** The event payload. */ + data: PasswordResetCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: PasswordResetCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface PasswordResetCreatedResponse { + id: string; + event: 'password_reset.created'; + data: PasswordResetCreatedDataResponse; + created_at: string; + context?: PasswordResetCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/password-reset-succeeded-context-actor-source.interface.ts b/src/common/interfaces/password-reset-succeeded-context-actor-source.interface.ts new file mode 100644 index 000000000..30c0f3300 --- /dev/null +++ b/src/common/interfaces/password-reset-succeeded-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type PasswordResetSucceededContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/password-reset-succeeded-context-actor.interface.ts b/src/common/interfaces/password-reset-succeeded-context-actor.interface.ts new file mode 100644 index 000000000..63dc7e70e --- /dev/null +++ b/src/common/interfaces/password-reset-succeeded-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { PasswordResetSucceededContextActorSource } from './password-reset-succeeded-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface PasswordResetSucceededContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: PasswordResetSucceededContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface PasswordResetSucceededContextActorResponse { + id: string; + source: PasswordResetSucceededContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/password-reset-succeeded-context-google-analytics-session.interface.ts b/src/common/interfaces/password-reset-succeeded-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..9f7b33447 --- /dev/null +++ b/src/common/interfaces/password-reset-succeeded-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type PasswordResetSucceededContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type PasswordResetSucceededContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/password-reset-succeeded-context.interface.ts b/src/common/interfaces/password-reset-succeeded-context.interface.ts new file mode 100644 index 000000000..28511e64a --- /dev/null +++ b/src/common/interfaces/password-reset-succeeded-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PasswordResetSucceededContextGoogleAnalyticsSession, + PasswordResetSucceededContextGoogleAnalyticsSessionResponse, +} from './password-reset-succeeded-context-google-analytics-session.interface'; +import type { + PasswordResetSucceededContextActor, + PasswordResetSucceededContextActorResponse, +} from './password-reset-succeeded-context-actor.interface'; + +/** Additional context about the event. */ +export interface PasswordResetSucceededContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: PasswordResetSucceededContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: PasswordResetSucceededContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface PasswordResetSucceededContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: PasswordResetSucceededContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: PasswordResetSucceededContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/password-reset-succeeded-data.interface.ts b/src/common/interfaces/password-reset-succeeded-data.interface.ts new file mode 100644 index 000000000..5c8854467 --- /dev/null +++ b/src/common/interfaces/password-reset-succeeded-data.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PasswordResetCreatedData, + PasswordResetCreatedDataResponse, +} from './password-reset-created-data.interface'; + +export type PasswordResetSucceededData = PasswordResetCreatedData; +export type PasswordResetSucceededDataResponse = + PasswordResetCreatedDataResponse; diff --git a/src/common/interfaces/password-reset-succeeded.interface.ts b/src/common/interfaces/password-reset-succeeded.interface.ts new file mode 100644 index 000000000..6d08b1a0a --- /dev/null +++ b/src/common/interfaces/password-reset-succeeded.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PasswordResetSucceededData, + PasswordResetSucceededDataResponse, +} from './password-reset-succeeded-data.interface'; +import type { + PasswordResetSucceededContext, + PasswordResetSucceededContextResponse, +} from './password-reset-succeeded-context.interface'; + +export interface PasswordResetSucceeded { + /** Unique identifier for the event. */ + id: string; + event: 'password_reset.succeeded'; + /** The event payload. */ + data: PasswordResetSucceededData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: PasswordResetSucceededContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface PasswordResetSucceededResponse { + id: string; + event: 'password_reset.succeeded'; + data: PasswordResetSucceededDataResponse; + created_at: string; + context?: PasswordResetSucceededContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/permission-created-context-actor-source.interface.ts b/src/common/interfaces/permission-created-context-actor-source.interface.ts new file mode 100644 index 000000000..9658cf4ec --- /dev/null +++ b/src/common/interfaces/permission-created-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type PermissionCreatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/permission-created-context-actor.interface.ts b/src/common/interfaces/permission-created-context-actor.interface.ts new file mode 100644 index 000000000..e7e13edd0 --- /dev/null +++ b/src/common/interfaces/permission-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { PermissionCreatedContextActorSource } from './permission-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface PermissionCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: PermissionCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface PermissionCreatedContextActorResponse { + id: string; + source: PermissionCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/permission-created-context-google-analytics-session.interface.ts b/src/common/interfaces/permission-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..df65e76b1 --- /dev/null +++ b/src/common/interfaces/permission-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type PermissionCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type PermissionCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/permission-created-context.interface.ts b/src/common/interfaces/permission-created-context.interface.ts new file mode 100644 index 000000000..358a7056a --- /dev/null +++ b/src/common/interfaces/permission-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PermissionCreatedContextGoogleAnalyticsSession, + PermissionCreatedContextGoogleAnalyticsSessionResponse, +} from './permission-created-context-google-analytics-session.interface'; +import type { + PermissionCreatedContextActor, + PermissionCreatedContextActorResponse, +} from './permission-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface PermissionCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: PermissionCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: PermissionCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface PermissionCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: PermissionCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: PermissionCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/permission-created-data.interface.ts b/src/common/interfaces/permission-created-data.interface.ts new file mode 100644 index 000000000..cccab843e --- /dev/null +++ b/src/common/interfaces/permission-created-data.interface.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface PermissionCreatedData { + /** Distinguishes the permission object. */ + object: 'permission'; + /** Unique identifier of the permission. */ + id: string; + /** The slug identifier of the permission. */ + slug: string; + /** The name of the permission. */ + name: string; + /** A description of the permission. */ + description: string | null; + /** Whether the permission is a system permission. */ + system: boolean; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface PermissionCreatedDataResponse { + object: 'permission'; + id: string; + slug: string; + name: string; + description: string | null; + system: boolean; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/permission-created.interface.ts b/src/common/interfaces/permission-created.interface.ts new file mode 100644 index 000000000..12081f8f4 --- /dev/null +++ b/src/common/interfaces/permission-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PermissionCreatedData, + PermissionCreatedDataResponse, +} from './permission-created-data.interface'; +import type { + PermissionCreatedContext, + PermissionCreatedContextResponse, +} from './permission-created-context.interface'; + +export interface PermissionCreated { + /** Unique identifier for the event. */ + id: string; + event: 'permission.created'; + /** The event payload. */ + data: PermissionCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: PermissionCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface PermissionCreatedResponse { + id: string; + event: 'permission.created'; + data: PermissionCreatedDataResponse; + created_at: string; + context?: PermissionCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/permission-deleted-context-actor-source.interface.ts b/src/common/interfaces/permission-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..df780a9e7 --- /dev/null +++ b/src/common/interfaces/permission-deleted-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type PermissionDeletedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/permission-deleted-context-actor.interface.ts b/src/common/interfaces/permission-deleted-context-actor.interface.ts new file mode 100644 index 000000000..067842966 --- /dev/null +++ b/src/common/interfaces/permission-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { PermissionDeletedContextActorSource } from './permission-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface PermissionDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: PermissionDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface PermissionDeletedContextActorResponse { + id: string; + source: PermissionDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/permission-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/permission-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..2b7aca95e --- /dev/null +++ b/src/common/interfaces/permission-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type PermissionDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type PermissionDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/permission-deleted-context.interface.ts b/src/common/interfaces/permission-deleted-context.interface.ts new file mode 100644 index 000000000..5e2f6a744 --- /dev/null +++ b/src/common/interfaces/permission-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PermissionDeletedContextGoogleAnalyticsSession, + PermissionDeletedContextGoogleAnalyticsSessionResponse, +} from './permission-deleted-context-google-analytics-session.interface'; +import type { + PermissionDeletedContextActor, + PermissionDeletedContextActorResponse, +} from './permission-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface PermissionDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: PermissionDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: PermissionDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface PermissionDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: PermissionDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: PermissionDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/permission-deleted-data.interface.ts b/src/common/interfaces/permission-deleted-data.interface.ts new file mode 100644 index 000000000..132b86678 --- /dev/null +++ b/src/common/interfaces/permission-deleted-data.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PermissionCreatedData, + PermissionCreatedDataResponse, +} from './permission-created-data.interface'; + +export type PermissionDeletedData = PermissionCreatedData; +export type PermissionDeletedDataResponse = PermissionCreatedDataResponse; diff --git a/src/common/interfaces/permission-deleted.interface.ts b/src/common/interfaces/permission-deleted.interface.ts new file mode 100644 index 000000000..58cad19ea --- /dev/null +++ b/src/common/interfaces/permission-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PermissionDeletedData, + PermissionDeletedDataResponse, +} from './permission-deleted-data.interface'; +import type { + PermissionDeletedContext, + PermissionDeletedContextResponse, +} from './permission-deleted-context.interface'; + +export interface PermissionDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'permission.deleted'; + /** The event payload. */ + data: PermissionDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: PermissionDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface PermissionDeletedResponse { + id: string; + event: 'permission.deleted'; + data: PermissionDeletedDataResponse; + created_at: string; + context?: PermissionDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/permission-updated-context-actor-source.interface.ts b/src/common/interfaces/permission-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..3cf69ae7d --- /dev/null +++ b/src/common/interfaces/permission-updated-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type PermissionUpdatedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/permission-updated-context-actor.interface.ts b/src/common/interfaces/permission-updated-context-actor.interface.ts new file mode 100644 index 000000000..dd79ff450 --- /dev/null +++ b/src/common/interfaces/permission-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { PermissionUpdatedContextActorSource } from './permission-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface PermissionUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: PermissionUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface PermissionUpdatedContextActorResponse { + id: string; + source: PermissionUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/permission-updated-context-google-analytics-session.interface.ts b/src/common/interfaces/permission-updated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..7f6d82ef1 --- /dev/null +++ b/src/common/interfaces/permission-updated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type PermissionUpdatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type PermissionUpdatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/permission-updated-context.interface.ts b/src/common/interfaces/permission-updated-context.interface.ts new file mode 100644 index 000000000..b910b250d --- /dev/null +++ b/src/common/interfaces/permission-updated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PermissionUpdatedContextGoogleAnalyticsSession, + PermissionUpdatedContextGoogleAnalyticsSessionResponse, +} from './permission-updated-context-google-analytics-session.interface'; +import type { + PermissionUpdatedContextActor, + PermissionUpdatedContextActorResponse, +} from './permission-updated-context-actor.interface'; + +/** Additional context about the event. */ +export interface PermissionUpdatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: PermissionUpdatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: PermissionUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface PermissionUpdatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: PermissionUpdatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: PermissionUpdatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/permission-updated-data.interface.ts b/src/common/interfaces/permission-updated-data.interface.ts new file mode 100644 index 000000000..484ca29ae --- /dev/null +++ b/src/common/interfaces/permission-updated-data.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PermissionCreatedData, + PermissionCreatedDataResponse, +} from './permission-created-data.interface'; + +export type PermissionUpdatedData = PermissionCreatedData; +export type PermissionUpdatedDataResponse = PermissionCreatedDataResponse; diff --git a/src/common/interfaces/permission-updated.interface.ts b/src/common/interfaces/permission-updated.interface.ts new file mode 100644 index 000000000..ec0f3068d --- /dev/null +++ b/src/common/interfaces/permission-updated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PermissionUpdatedData, + PermissionUpdatedDataResponse, +} from './permission-updated-data.interface'; +import type { + PermissionUpdatedContext, + PermissionUpdatedContextResponse, +} from './permission-updated-context.interface'; + +export interface PermissionUpdated { + /** Unique identifier for the event. */ + id: string; + event: 'permission.updated'; + /** The event payload. */ + data: PermissionUpdatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: PermissionUpdatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface PermissionUpdatedResponse { + id: string; + event: 'permission.updated'; + data: PermissionUpdatedDataResponse; + created_at: string; + context?: PermissionUpdatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/profile-connection-type.interface.ts b/src/common/interfaces/profile-connection-type.interface.ts new file mode 100644 index 000000000..0b4c41379 --- /dev/null +++ b/src/common/interfaces/profile-connection-type.interface.ts @@ -0,0 +1,54 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ProfileConnectionType = + | 'Pending' + | 'ADFSSAML' + | 'AdpOidc' + | 'AppleOAuth' + | 'Auth0Migration' + | 'Auth0SAML' + | 'AzureSAML' + | 'BitbucketOAuth' + | 'CasSAML' + | 'ClassLinkSAML' + | 'CleverOIDC' + | 'CloudflareSAML' + | 'CyberArkSAML' + | 'DiscordOAuth' + | 'DuoSAML' + | 'EntraIdOIDC' + | 'GenericOIDC' + | 'GenericSAML' + | 'GitHubOAuth' + | 'GitLabOAuth' + | 'GoogleOAuth' + | 'GoogleOIDC' + | 'GoogleSAML' + | 'IntuitOAuth' + | 'JumpCloudSAML' + | 'KeycloakSAML' + | 'LastPassSAML' + | 'LinkedInOAuth' + | 'LoginGovOidc' + | 'MagicLink' + | 'MicrosoftOAuth' + | 'MiniOrangeSAML' + | 'NetIqSAML' + | 'OktaOIDC' + | 'OktaSAML' + | 'OneLoginSAML' + | 'OracleSAML' + | 'PingFederateSAML' + | 'PingOneSAML' + | 'RipplingSAML' + | 'SalesforceSAML' + | 'ShibbolethGenericSAML' + | 'ShibbolethSAML' + | 'SimpleSamlPhpSAML' + | 'SalesforceOAuth' + | 'SlackOAuth' + | 'TestIdp' + | 'VercelMarketplaceOAuth' + | 'VercelOAuth' + | 'VMwareSAML' + | 'XeroOAuth'; diff --git a/src/common/interfaces/resend-user-invite-options-locale.interface.ts b/src/common/interfaces/resend-user-invite-options-locale.interface.ts new file mode 100644 index 000000000..db91c1b97 --- /dev/null +++ b/src/common/interfaces/resend-user-invite-options-locale.interface.ts @@ -0,0 +1,93 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ResendUserInviteOptionsLocale = + | 'af' + | 'am' + | 'ar' + | 'bg' + | 'bn' + | 'bs' + | 'ca' + | 'cs' + | 'da' + | 'de' + | 'de-DE' + | 'el' + | 'en' + | 'en-AU' + | 'en-CA' + | 'en-GB' + | 'en-US' + | 'es' + | 'es-419' + | 'es-ES' + | 'es-US' + | 'et' + | 'fa' + | 'fi' + | 'fil' + | 'fr' + | 'fr-BE' + | 'fr-CA' + | 'fr-FR' + | 'fy' + | 'gl' + | 'gu' + | 'ha' + | 'he' + | 'hi' + | 'hr' + | 'hu' + | 'hy' + | 'id' + | 'is' + | 'it' + | 'it-IT' + | 'ja' + | 'jv' + | 'ka' + | 'kk' + | 'km' + | 'kn' + | 'ko' + | 'lt' + | 'lv' + | 'mk' + | 'ml' + | 'mn' + | 'mr' + | 'ms' + | 'my' + | 'nb' + | 'ne' + | 'nl' + | 'nl-BE' + | 'nl-NL' + | 'nn' + | 'no' + | 'pa' + | 'pl' + | 'pt' + | 'pt-BR' + | 'pt-PT' + | 'ro' + | 'ru' + | 'sk' + | 'sl' + | 'sq' + | 'sr' + | 'sv' + | 'sw' + | 'ta' + | 'te' + | 'th' + | 'tr' + | 'uk' + | 'ur' + | 'uz' + | 'vi' + | 'zh' + | 'zh-CN' + | 'zh-HK' + | 'zh-TW' + | 'zu'; diff --git a/src/common/interfaces/role-created-context-actor-source.interface.ts b/src/common/interfaces/role-created-context-actor-source.interface.ts new file mode 100644 index 000000000..b2c50d2a4 --- /dev/null +++ b/src/common/interfaces/role-created-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type RoleCreatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/role-created-context-actor.interface.ts b/src/common/interfaces/role-created-context-actor.interface.ts new file mode 100644 index 000000000..62c4d374c --- /dev/null +++ b/src/common/interfaces/role-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { RoleCreatedContextActorSource } from './role-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface RoleCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: RoleCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface RoleCreatedContextActorResponse { + id: string; + source: RoleCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/role-created-context-google-analytics-session.interface.ts b/src/common/interfaces/role-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..92c798a66 --- /dev/null +++ b/src/common/interfaces/role-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type RoleCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type RoleCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/role-created-context.interface.ts b/src/common/interfaces/role-created-context.interface.ts new file mode 100644 index 000000000..59c3a5000 --- /dev/null +++ b/src/common/interfaces/role-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RoleCreatedContextGoogleAnalyticsSession, + RoleCreatedContextGoogleAnalyticsSessionResponse, +} from './role-created-context-google-analytics-session.interface'; +import type { + RoleCreatedContextActor, + RoleCreatedContextActorResponse, +} from './role-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface RoleCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: RoleCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: RoleCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface RoleCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: RoleCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: RoleCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/role-created-data.interface.ts b/src/common/interfaces/role-created-data.interface.ts new file mode 100644 index 000000000..18ab440ae --- /dev/null +++ b/src/common/interfaces/role-created-data.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface RoleCreatedData { + /** Distinguishes the role object. */ + object: 'role'; + /** The slug identifier of the role. */ + slug: string; + /** The slug of the resource type the role applies to. */ + resourceTypeSlug: string; + /** The permissions granted by the role. */ + permissions?: string[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface RoleCreatedDataResponse { + object: 'role'; + slug: string; + resource_type_slug: string; + permissions?: string[]; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/role-created.interface.ts b/src/common/interfaces/role-created.interface.ts new file mode 100644 index 000000000..25849cf39 --- /dev/null +++ b/src/common/interfaces/role-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RoleCreatedData, + RoleCreatedDataResponse, +} from './role-created-data.interface'; +import type { + RoleCreatedContext, + RoleCreatedContextResponse, +} from './role-created-context.interface'; + +export interface RoleCreated { + /** Unique identifier for the event. */ + id: string; + event: 'role.created'; + /** The event payload. */ + data: RoleCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: RoleCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface RoleCreatedResponse { + id: string; + event: 'role.created'; + data: RoleCreatedDataResponse; + created_at: string; + context?: RoleCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/role-deleted-context-actor-source.interface.ts b/src/common/interfaces/role-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..44bd5ad91 --- /dev/null +++ b/src/common/interfaces/role-deleted-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type RoleDeletedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/role-deleted-context-actor.interface.ts b/src/common/interfaces/role-deleted-context-actor.interface.ts new file mode 100644 index 000000000..db02a1288 --- /dev/null +++ b/src/common/interfaces/role-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { RoleDeletedContextActorSource } from './role-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface RoleDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: RoleDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface RoleDeletedContextActorResponse { + id: string; + source: RoleDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/role-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/role-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..d9f4233f4 --- /dev/null +++ b/src/common/interfaces/role-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type RoleDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type RoleDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/role-deleted-context.interface.ts b/src/common/interfaces/role-deleted-context.interface.ts new file mode 100644 index 000000000..4e99422a2 --- /dev/null +++ b/src/common/interfaces/role-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RoleDeletedContextGoogleAnalyticsSession, + RoleDeletedContextGoogleAnalyticsSessionResponse, +} from './role-deleted-context-google-analytics-session.interface'; +import type { + RoleDeletedContextActor, + RoleDeletedContextActorResponse, +} from './role-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface RoleDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: RoleDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: RoleDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface RoleDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: RoleDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: RoleDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/role-deleted-data.interface.ts b/src/common/interfaces/role-deleted-data.interface.ts new file mode 100644 index 000000000..9c8b4338f --- /dev/null +++ b/src/common/interfaces/role-deleted-data.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RoleCreatedData, + RoleCreatedDataResponse, +} from './role-created-data.interface'; + +export type RoleDeletedData = RoleCreatedData; +export type RoleDeletedDataResponse = RoleCreatedDataResponse; diff --git a/src/common/interfaces/role-deleted.interface.ts b/src/common/interfaces/role-deleted.interface.ts new file mode 100644 index 000000000..f96966809 --- /dev/null +++ b/src/common/interfaces/role-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RoleDeletedData, + RoleDeletedDataResponse, +} from './role-deleted-data.interface'; +import type { + RoleDeletedContext, + RoleDeletedContextResponse, +} from './role-deleted-context.interface'; + +export interface RoleDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'role.deleted'; + /** The event payload. */ + data: RoleDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: RoleDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface RoleDeletedResponse { + id: string; + event: 'role.deleted'; + data: RoleDeletedDataResponse; + created_at: string; + context?: RoleDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/role-type.interface.ts b/src/common/interfaces/role-type.interface.ts new file mode 100644 index 000000000..0ac4de6d1 --- /dev/null +++ b/src/common/interfaces/role-type.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type RoleType = 'EnvironmentRole' | 'OrganizationRole'; diff --git a/src/common/interfaces/role-updated-context-actor-source.interface.ts b/src/common/interfaces/role-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..d75d6ab49 --- /dev/null +++ b/src/common/interfaces/role-updated-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type RoleUpdatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/role-updated-context-actor.interface.ts b/src/common/interfaces/role-updated-context-actor.interface.ts new file mode 100644 index 000000000..de0f08e39 --- /dev/null +++ b/src/common/interfaces/role-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { RoleUpdatedContextActorSource } from './role-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface RoleUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: RoleUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface RoleUpdatedContextActorResponse { + id: string; + source: RoleUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/role-updated-context-google-analytics-session.interface.ts b/src/common/interfaces/role-updated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..44162c56b --- /dev/null +++ b/src/common/interfaces/role-updated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type RoleUpdatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type RoleUpdatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/role-updated-context.interface.ts b/src/common/interfaces/role-updated-context.interface.ts new file mode 100644 index 000000000..04b6cdca0 --- /dev/null +++ b/src/common/interfaces/role-updated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RoleUpdatedContextGoogleAnalyticsSession, + RoleUpdatedContextGoogleAnalyticsSessionResponse, +} from './role-updated-context-google-analytics-session.interface'; +import type { + RoleUpdatedContextActor, + RoleUpdatedContextActorResponse, +} from './role-updated-context-actor.interface'; + +/** Additional context about the event. */ +export interface RoleUpdatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: RoleUpdatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: RoleUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface RoleUpdatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: RoleUpdatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: RoleUpdatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/role-updated-data.interface.ts b/src/common/interfaces/role-updated-data.interface.ts new file mode 100644 index 000000000..531499bae --- /dev/null +++ b/src/common/interfaces/role-updated-data.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RoleCreatedData, + RoleCreatedDataResponse, +} from './role-created-data.interface'; + +export type RoleUpdatedData = RoleCreatedData; +export type RoleUpdatedDataResponse = RoleCreatedDataResponse; diff --git a/src/common/interfaces/role-updated.interface.ts b/src/common/interfaces/role-updated.interface.ts new file mode 100644 index 000000000..ef41c818b --- /dev/null +++ b/src/common/interfaces/role-updated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RoleUpdatedData, + RoleUpdatedDataResponse, +} from './role-updated-data.interface'; +import type { + RoleUpdatedContext, + RoleUpdatedContextResponse, +} from './role-updated-context.interface'; + +export interface RoleUpdated { + /** Unique identifier for the event. */ + id: string; + event: 'role.updated'; + /** The event payload. */ + data: RoleUpdatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: RoleUpdatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface RoleUpdatedResponse { + id: string; + event: 'role.updated'; + data: RoleUpdatedDataResponse; + created_at: string; + context?: RoleUpdatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/session-created-context-actor-source.interface.ts b/src/common/interfaces/session-created-context-actor-source.interface.ts new file mode 100644 index 000000000..ab4232626 --- /dev/null +++ b/src/common/interfaces/session-created-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type SessionCreatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/session-created-context-actor.interface.ts b/src/common/interfaces/session-created-context-actor.interface.ts new file mode 100644 index 000000000..757887bee --- /dev/null +++ b/src/common/interfaces/session-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { SessionCreatedContextActorSource } from './session-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface SessionCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: SessionCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface SessionCreatedContextActorResponse { + id: string; + source: SessionCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/session-created-context-google-analytics-session.interface.ts b/src/common/interfaces/session-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..c65fb38ac --- /dev/null +++ b/src/common/interfaces/session-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type SessionCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type SessionCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/session-created-context.interface.ts b/src/common/interfaces/session-created-context.interface.ts new file mode 100644 index 000000000..5391c3f2f --- /dev/null +++ b/src/common/interfaces/session-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SessionCreatedContextGoogleAnalyticsSession, + SessionCreatedContextGoogleAnalyticsSessionResponse, +} from './session-created-context-google-analytics-session.interface'; +import type { + SessionCreatedContextActor, + SessionCreatedContextActorResponse, +} from './session-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface SessionCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: SessionCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: SessionCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface SessionCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: SessionCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: SessionCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/session-created-data-auth-method.interface.ts b/src/common/interfaces/session-created-data-auth-method.interface.ts new file mode 100644 index 000000000..8bc11eebc --- /dev/null +++ b/src/common/interfaces/session-created-data-auth-method.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export type SessionCreatedDataAuthMethod = + | 'cross_app_auth' + | 'external_auth' + | 'impersonation' + | 'magic_code' + | 'migrated_session' + | 'oauth' + | 'passkey' + | 'password' + | 'sso' + | 'unknown'; diff --git a/src/common/interfaces/session-created-data-impersonator.interface.ts b/src/common/interfaces/session-created-data-impersonator.interface.ts new file mode 100644 index 000000000..367a049c4 --- /dev/null +++ b/src/common/interfaces/session-created-data-impersonator.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +/** Information about the impersonator if this session was created via impersonation. */ +export interface SessionCreatedDataImpersonator { + /** The email address of the WorkOS Dashboard user who is impersonating the user. */ + email: string; + /** The justification the impersonator gave for impersonating the user. */ + reason: string | null; +} + +export interface SessionCreatedDataImpersonatorResponse { + email: string; + reason: string | null; +} diff --git a/src/common/interfaces/session-created-data-status.interface.ts b/src/common/interfaces/session-created-data-status.interface.ts new file mode 100644 index 000000000..8176ebead --- /dev/null +++ b/src/common/interfaces/session-created-data-status.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type SessionCreatedDataStatus = 'active' | 'expired' | 'revoked'; diff --git a/src/common/interfaces/session-created-data.interface.ts b/src/common/interfaces/session-created-data.interface.ts new file mode 100644 index 000000000..21bd2ddad --- /dev/null +++ b/src/common/interfaces/session-created-data.interface.ts @@ -0,0 +1,54 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SessionCreatedDataImpersonator, + SessionCreatedDataImpersonatorResponse, +} from './session-created-data-impersonator.interface'; +import type { SessionCreatedDataAuthMethod } from './session-created-data-auth-method.interface'; +import type { SessionCreatedDataStatus } from './session-created-data-status.interface'; + +/** The event payload. */ +export interface SessionCreatedData { + /** Distinguishes the session object. */ + object: 'session'; + /** The unique ID of the session. */ + id: string; + /** Information about the impersonator if this session was created via impersonation. */ + impersonator?: SessionCreatedDataImpersonator; + /** The IP address from which the session was created. */ + ipAddress: string | null; + /** The ID of the organization this session is associated with. */ + organizationId?: string; + /** The user agent string from the device that created the session. */ + userAgent: string | null; + /** The ID of the user this session belongs to. */ + userId: string; + /** The authentication method used to create this session. */ + authMethod: SessionCreatedDataAuthMethod; + /** The current status of the session. */ + status: SessionCreatedDataStatus; + /** The timestamp when the session expires. */ + expiresAt: string; + /** The timestamp when the session ended. */ + endedAt: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface SessionCreatedDataResponse { + object: 'session'; + id: string; + impersonator?: SessionCreatedDataImpersonatorResponse; + ip_address: string | null; + organization_id?: string; + user_agent: string | null; + user_id: string; + auth_method: SessionCreatedDataAuthMethod; + status: SessionCreatedDataStatus; + expires_at: string; + ended_at: string | null; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/session-created.interface.ts b/src/common/interfaces/session-created.interface.ts new file mode 100644 index 000000000..1c2a0ed23 --- /dev/null +++ b/src/common/interfaces/session-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SessionCreatedData, + SessionCreatedDataResponse, +} from './session-created-data.interface'; +import type { + SessionCreatedContext, + SessionCreatedContextResponse, +} from './session-created-context.interface'; + +export interface SessionCreated { + /** Unique identifier for the event. */ + id: string; + event: 'session.created'; + /** The event payload. */ + data: SessionCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: SessionCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface SessionCreatedResponse { + id: string; + event: 'session.created'; + data: SessionCreatedDataResponse; + created_at: string; + context?: SessionCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/session-revoked-context-actor-source.interface.ts b/src/common/interfaces/session-revoked-context-actor-source.interface.ts new file mode 100644 index 000000000..a06b8f9af --- /dev/null +++ b/src/common/interfaces/session-revoked-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type SessionRevokedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/session-revoked-context-actor.interface.ts b/src/common/interfaces/session-revoked-context-actor.interface.ts new file mode 100644 index 000000000..9d8c8c2b4 --- /dev/null +++ b/src/common/interfaces/session-revoked-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { SessionRevokedContextActorSource } from './session-revoked-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface SessionRevokedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: SessionRevokedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface SessionRevokedContextActorResponse { + id: string; + source: SessionRevokedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/session-revoked-context-google-analytics-session.interface.ts b/src/common/interfaces/session-revoked-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..589541bb1 --- /dev/null +++ b/src/common/interfaces/session-revoked-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type SessionRevokedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type SessionRevokedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/session-revoked-context.interface.ts b/src/common/interfaces/session-revoked-context.interface.ts new file mode 100644 index 000000000..449eaf91f --- /dev/null +++ b/src/common/interfaces/session-revoked-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SessionRevokedContextGoogleAnalyticsSession, + SessionRevokedContextGoogleAnalyticsSessionResponse, +} from './session-revoked-context-google-analytics-session.interface'; +import type { + SessionRevokedContextActor, + SessionRevokedContextActorResponse, +} from './session-revoked-context-actor.interface'; + +/** Additional context about the event. */ +export interface SessionRevokedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: SessionRevokedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: SessionRevokedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface SessionRevokedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: SessionRevokedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: SessionRevokedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/session-revoked-data-auth-method.interface.ts b/src/common/interfaces/session-revoked-data-auth-method.interface.ts new file mode 100644 index 000000000..2d3ef3500 --- /dev/null +++ b/src/common/interfaces/session-revoked-data-auth-method.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export type SessionRevokedDataAuthMethod = + | 'cross_app_auth' + | 'external_auth' + | 'impersonation' + | 'magic_code' + | 'migrated_session' + | 'oauth' + | 'passkey' + | 'password' + | 'sso' + | 'unknown'; diff --git a/src/common/interfaces/session-revoked-data-impersonator.interface.ts b/src/common/interfaces/session-revoked-data-impersonator.interface.ts new file mode 100644 index 000000000..f9dffcd3b --- /dev/null +++ b/src/common/interfaces/session-revoked-data-impersonator.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SessionCreatedDataImpersonator, + SessionCreatedDataImpersonatorResponse, +} from './session-created-data-impersonator.interface'; + +export type SessionRevokedDataImpersonator = SessionCreatedDataImpersonator; +export type SessionRevokedDataImpersonatorResponse = + SessionCreatedDataImpersonatorResponse; diff --git a/src/common/interfaces/session-revoked-data-status.interface.ts b/src/common/interfaces/session-revoked-data-status.interface.ts new file mode 100644 index 000000000..180232065 --- /dev/null +++ b/src/common/interfaces/session-revoked-data-status.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type SessionRevokedDataStatus = 'active' | 'expired' | 'revoked'; diff --git a/src/common/interfaces/session-revoked-data.interface.ts b/src/common/interfaces/session-revoked-data.interface.ts new file mode 100644 index 000000000..341b16850 --- /dev/null +++ b/src/common/interfaces/session-revoked-data.interface.ts @@ -0,0 +1,54 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SessionRevokedDataImpersonator, + SessionRevokedDataImpersonatorResponse, +} from './session-revoked-data-impersonator.interface'; +import type { SessionRevokedDataAuthMethod } from './session-revoked-data-auth-method.interface'; +import type { SessionRevokedDataStatus } from './session-revoked-data-status.interface'; + +/** The event payload. */ +export interface SessionRevokedData { + /** Distinguishes the session object. */ + object: 'session'; + /** The unique ID of the session. */ + id: string; + /** Information about the impersonator if this session was created via impersonation. */ + impersonator?: SessionRevokedDataImpersonator; + /** The IP address from which the session was created. */ + ipAddress: string | null; + /** The ID of the organization this session is associated with. */ + organizationId?: string; + /** The user agent string from the device that created the session. */ + userAgent: string | null; + /** The ID of the user this session belongs to. */ + userId: string; + /** The authentication method used to create this session. */ + authMethod: SessionRevokedDataAuthMethod; + /** The current status of the session. */ + status: SessionRevokedDataStatus; + /** The timestamp when the session expires. */ + expiresAt: string; + /** The timestamp when the session ended. */ + endedAt: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface SessionRevokedDataResponse { + object: 'session'; + id: string; + impersonator?: SessionRevokedDataImpersonatorResponse; + ip_address: string | null; + organization_id?: string; + user_agent: string | null; + user_id: string; + auth_method: SessionRevokedDataAuthMethod; + status: SessionRevokedDataStatus; + expires_at: string; + ended_at: string | null; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/session-revoked.interface.ts b/src/common/interfaces/session-revoked.interface.ts new file mode 100644 index 000000000..72cdcd6c6 --- /dev/null +++ b/src/common/interfaces/session-revoked.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SessionRevokedData, + SessionRevokedDataResponse, +} from './session-revoked-data.interface'; +import type { + SessionRevokedContext, + SessionRevokedContextResponse, +} from './session-revoked-context.interface'; + +export interface SessionRevoked { + /** Unique identifier for the event. */ + id: string; + event: 'session.revoked'; + /** The event payload. */ + data: SessionRevokedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: SessionRevokedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface SessionRevokedResponse { + id: string; + event: 'session.revoked'; + data: SessionRevokedDataResponse; + created_at: string; + context?: SessionRevokedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/update-user-password-hash-type.interface.ts b/src/common/interfaces/update-user-password-hash-type.interface.ts new file mode 100644 index 000000000..134799953 --- /dev/null +++ b/src/common/interfaces/update-user-password-hash-type.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UpdateUserPasswordHashType = + | 'bcrypt' + | 'firebase-scrypt' + | 'ssha' + | 'scrypt' + | 'pbkdf2' + | 'argon2'; diff --git a/src/common/interfaces/user-created-context-actor-source.interface.ts b/src/common/interfaces/user-created-context-actor-source.interface.ts new file mode 100644 index 000000000..5c471dab9 --- /dev/null +++ b/src/common/interfaces/user-created-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserCreatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/user-created-context-actor.interface.ts b/src/common/interfaces/user-created-context-actor.interface.ts new file mode 100644 index 000000000..baa22142a --- /dev/null +++ b/src/common/interfaces/user-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { UserCreatedContextActorSource } from './user-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface UserCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: UserCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface UserCreatedContextActorResponse { + id: string; + source: UserCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/user-created-context-google-analytics-session.interface.ts b/src/common/interfaces/user-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..c436f6602 --- /dev/null +++ b/src/common/interfaces/user-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type UserCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type UserCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/user-created-context.interface.ts b/src/common/interfaces/user-created-context.interface.ts new file mode 100644 index 000000000..0ef90e42b --- /dev/null +++ b/src/common/interfaces/user-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserCreatedContextGoogleAnalyticsSession, + UserCreatedContextGoogleAnalyticsSessionResponse, +} from './user-created-context-google-analytics-session.interface'; +import type { + UserCreatedContextActor, + UserCreatedContextActorResponse, +} from './user-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface UserCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: UserCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: UserCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface UserCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: UserCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: UserCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/user-created-data.interface.ts b/src/common/interfaces/user-created-data.interface.ts new file mode 100644 index 000000000..9b2c6f151 --- /dev/null +++ b/src/common/interfaces/user-created-data.interface.ts @@ -0,0 +1,47 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The event payload. */ +export interface UserCreatedData { + /** Distinguishes the user object. */ + object: 'user'; + /** The unique ID of the user. */ + id: string; + /** The first name of the user. */ + firstName: string | null; + /** The last name of the user. */ + lastName: string | null; + /** A URL reference to an image representing the user. */ + profilePictureUrl: string | null; + /** The email address of the user. */ + email: string; + /** Whether the user's email has been verified. */ + emailVerified: boolean; + /** The external ID of the user. */ + externalId: string | null; + /** Object containing metadata key/value pairs associated with the user. */ + metadata?: Record; + /** The timestamp when the user last signed in. */ + lastSignInAt: string | null; + /** The user's preferred locale. */ + locale?: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface UserCreatedDataResponse { + object: 'user'; + id: string; + first_name: string | null; + last_name: string | null; + profile_picture_url: string | null; + email: string; + email_verified: boolean; + external_id: string | null; + metadata?: Record; + last_sign_in_at: string | null; + locale?: string | null; + created_at: string; + updated_at: string; +} diff --git a/src/common/interfaces/user-created.interface.ts b/src/common/interfaces/user-created.interface.ts new file mode 100644 index 000000000..600179c66 --- /dev/null +++ b/src/common/interfaces/user-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserCreatedData, + UserCreatedDataResponse, +} from './user-created-data.interface'; +import type { + UserCreatedContext, + UserCreatedContextResponse, +} from './user-created-context.interface'; + +export interface UserCreated { + /** Unique identifier for the event. */ + id: string; + event: 'user.created'; + /** The event payload. */ + data: UserCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: UserCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface UserCreatedResponse { + id: string; + event: 'user.created'; + data: UserCreatedDataResponse; + created_at: string; + context?: UserCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/user-deleted-context-actor-source.interface.ts b/src/common/interfaces/user-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..f3aa4a395 --- /dev/null +++ b/src/common/interfaces/user-deleted-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserDeletedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/user-deleted-context-actor.interface.ts b/src/common/interfaces/user-deleted-context-actor.interface.ts new file mode 100644 index 000000000..22c7b672c --- /dev/null +++ b/src/common/interfaces/user-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { UserDeletedContextActorSource } from './user-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface UserDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: UserDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface UserDeletedContextActorResponse { + id: string; + source: UserDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/user-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/user-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..dec42fbfc --- /dev/null +++ b/src/common/interfaces/user-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type UserDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type UserDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/user-deleted-context.interface.ts b/src/common/interfaces/user-deleted-context.interface.ts new file mode 100644 index 000000000..c98e356f7 --- /dev/null +++ b/src/common/interfaces/user-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserDeletedContextGoogleAnalyticsSession, + UserDeletedContextGoogleAnalyticsSessionResponse, +} from './user-deleted-context-google-analytics-session.interface'; +import type { + UserDeletedContextActor, + UserDeletedContextActorResponse, +} from './user-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface UserDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: UserDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: UserDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface UserDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: UserDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: UserDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/user-deleted-data.interface.ts b/src/common/interfaces/user-deleted-data.interface.ts new file mode 100644 index 000000000..62ed5827f --- /dev/null +++ b/src/common/interfaces/user-deleted-data.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserCreatedData, + UserCreatedDataResponse, +} from './user-created-data.interface'; + +export type UserDeletedData = UserCreatedData; +export type UserDeletedDataResponse = UserCreatedDataResponse; diff --git a/src/common/interfaces/user-deleted.interface.ts b/src/common/interfaces/user-deleted.interface.ts new file mode 100644 index 000000000..30cc58858 --- /dev/null +++ b/src/common/interfaces/user-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserDeletedData, + UserDeletedDataResponse, +} from './user-deleted-data.interface'; +import type { + UserDeletedContext, + UserDeletedContextResponse, +} from './user-deleted-context.interface'; + +export interface UserDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'user.deleted'; + /** The event payload. */ + data: UserDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: UserDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface UserDeletedResponse { + id: string; + event: 'user.deleted'; + data: UserDeletedDataResponse; + created_at: string; + context?: UserDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/user-identities-get-item-provider.interface.ts b/src/common/interfaces/user-identities-get-item-provider.interface.ts new file mode 100644 index 000000000..e7b43064c --- /dev/null +++ b/src/common/interfaces/user-identities-get-item-provider.interface.ts @@ -0,0 +1,17 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserIdentitiesGetItemProvider = + | 'AppleOAuth' + | 'BitbucketOAuth' + | 'DiscordOAuth' + | 'GithubOAuth' + | 'GitLabOAuth' + | 'GoogleOAuth' + | 'IntuitOAuth' + | 'LinkedInOAuth' + | 'MicrosoftOAuth' + | 'SalesforceOAuth' + | 'SlackOAuth' + | 'VercelMarketplaceOAuth' + | 'VercelOAuth' + | 'XeroOAuth'; diff --git a/src/common/interfaces/user-invite-state.interface.ts b/src/common/interfaces/user-invite-state.interface.ts new file mode 100644 index 000000000..c19f01ee1 --- /dev/null +++ b/src/common/interfaces/user-invite-state.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserInviteState = 'pending' | 'accepted' | 'expired' | 'revoked'; diff --git a/src/common/interfaces/user-organization-membership-base-list-data-status.interface.ts b/src/common/interfaces/user-organization-membership-base-list-data-status.interface.ts new file mode 100644 index 000000000..3b7fb7bfe --- /dev/null +++ b/src/common/interfaces/user-organization-membership-base-list-data-status.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserOrganizationMembershipBaseListDataStatus = + | 'active' + | 'inactive' + | 'pending'; diff --git a/src/common/interfaces/user-organization-membership-status.interface.ts b/src/common/interfaces/user-organization-membership-status.interface.ts new file mode 100644 index 000000000..16e2bf25c --- /dev/null +++ b/src/common/interfaces/user-organization-membership-status.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserOrganizationMembershipStatus = + | 'active' + | 'inactive' + | 'pending'; diff --git a/src/common/interfaces/user-sessions-auth-method.interface.ts b/src/common/interfaces/user-sessions-auth-method.interface.ts new file mode 100644 index 000000000..61b0d44c2 --- /dev/null +++ b/src/common/interfaces/user-sessions-auth-method.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserSessionsAuthMethod = + | 'cross_app_auth' + | 'external_auth' + | 'impersonation' + | 'magic_code' + | 'migrated_session' + | 'oauth' + | 'passkey' + | 'password' + | 'sso' + | 'unknown'; diff --git a/src/common/interfaces/user-sessions-status.interface.ts b/src/common/interfaces/user-sessions-status.interface.ts new file mode 100644 index 000000000..b9662955b --- /dev/null +++ b/src/common/interfaces/user-sessions-status.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserSessionsStatus = 'active' | 'expired' | 'revoked'; diff --git a/src/common/interfaces/user-updated-context-actor-source.interface.ts b/src/common/interfaces/user-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..355524bb1 --- /dev/null +++ b/src/common/interfaces/user-updated-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserUpdatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/user-updated-context-actor.interface.ts b/src/common/interfaces/user-updated-context-actor.interface.ts new file mode 100644 index 000000000..35a196571 --- /dev/null +++ b/src/common/interfaces/user-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { UserUpdatedContextActorSource } from './user-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface UserUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: UserUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface UserUpdatedContextActorResponse { + id: string; + source: UserUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/user-updated-context-google-analytics-session.interface.ts b/src/common/interfaces/user-updated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..722b2cc50 --- /dev/null +++ b/src/common/interfaces/user-updated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type UserUpdatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type UserUpdatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/user-updated-context.interface.ts b/src/common/interfaces/user-updated-context.interface.ts new file mode 100644 index 000000000..30ed3b0ff --- /dev/null +++ b/src/common/interfaces/user-updated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserUpdatedContextGoogleAnalyticsSession, + UserUpdatedContextGoogleAnalyticsSessionResponse, +} from './user-updated-context-google-analytics-session.interface'; +import type { + UserUpdatedContextActor, + UserUpdatedContextActorResponse, +} from './user-updated-context-actor.interface'; + +/** Additional context about the event. */ +export interface UserUpdatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: UserUpdatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: UserUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface UserUpdatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: UserUpdatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: UserUpdatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/user-updated-data.interface.ts b/src/common/interfaces/user-updated-data.interface.ts new file mode 100644 index 000000000..0a1727a96 --- /dev/null +++ b/src/common/interfaces/user-updated-data.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserCreatedData, + UserCreatedDataResponse, +} from './user-created-data.interface'; + +export type UserUpdatedData = UserCreatedData; +export type UserUpdatedDataResponse = UserCreatedDataResponse; diff --git a/src/common/interfaces/user-updated.interface.ts b/src/common/interfaces/user-updated.interface.ts new file mode 100644 index 000000000..c75b516a0 --- /dev/null +++ b/src/common/interfaces/user-updated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserUpdatedData, + UserUpdatedDataResponse, +} from './user-updated-data.interface'; +import type { + UserUpdatedContext, + UserUpdatedContextResponse, +} from './user-updated-context.interface'; + +export interface UserUpdated { + /** Unique identifier for the event. */ + id: string; + event: 'user.updated'; + /** The event payload. */ + data: UserUpdatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: UserUpdatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface UserUpdatedResponse { + id: string; + event: 'user.updated'; + data: UserUpdatedDataResponse; + created_at: string; + context?: UserUpdatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/vault-byok-key-verification-completed-context-actor-source.interface.ts b/src/common/interfaces/vault-byok-key-verification-completed-context-actor-source.interface.ts new file mode 100644 index 000000000..201e6d4a8 --- /dev/null +++ b/src/common/interfaces/vault-byok-key-verification-completed-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultByokKeyVerificationCompletedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/vault-byok-key-verification-completed-context-actor.interface.ts b/src/common/interfaces/vault-byok-key-verification-completed-context-actor.interface.ts new file mode 100644 index 000000000..6748162e8 --- /dev/null +++ b/src/common/interfaces/vault-byok-key-verification-completed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultByokKeyVerificationCompletedContextActorSource } from './vault-byok-key-verification-completed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface VaultByokKeyVerificationCompletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: VaultByokKeyVerificationCompletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface VaultByokKeyVerificationCompletedContextActorResponse { + id: string; + source: VaultByokKeyVerificationCompletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/vault-byok-key-verification-completed-context-google-analytics-session.interface.ts b/src/common/interfaces/vault-byok-key-verification-completed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..7b7627e15 --- /dev/null +++ b/src/common/interfaces/vault-byok-key-verification-completed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type VaultByokKeyVerificationCompletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type VaultByokKeyVerificationCompletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/vault-byok-key-verification-completed-context.interface.ts b/src/common/interfaces/vault-byok-key-verification-completed-context.interface.ts new file mode 100644 index 000000000..b4121d99f --- /dev/null +++ b/src/common/interfaces/vault-byok-key-verification-completed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultByokKeyVerificationCompletedContextGoogleAnalyticsSession, + VaultByokKeyVerificationCompletedContextGoogleAnalyticsSessionResponse, +} from './vault-byok-key-verification-completed-context-google-analytics-session.interface'; +import type { + VaultByokKeyVerificationCompletedContextActor, + VaultByokKeyVerificationCompletedContextActorResponse, +} from './vault-byok-key-verification-completed-context-actor.interface'; + +/** Additional context about the event. */ +export interface VaultByokKeyVerificationCompletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: VaultByokKeyVerificationCompletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: VaultByokKeyVerificationCompletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface VaultByokKeyVerificationCompletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: VaultByokKeyVerificationCompletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: VaultByokKeyVerificationCompletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/vault-byok-key-verification-completed-data-key-provider.interface.ts b/src/common/interfaces/vault-byok-key-verification-completed-data-key-provider.interface.ts new file mode 100644 index 000000000..61d413cde --- /dev/null +++ b/src/common/interfaces/vault-byok-key-verification-completed-data-key-provider.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultByokKeyVerificationCompletedDataKeyProvider = + | 'AWS_KMS' + | 'GCP_KMS' + | 'AZURE_KEY_VAULT'; diff --git a/src/common/interfaces/vault-byok-key-verification-completed-data.interface.ts b/src/common/interfaces/vault-byok-key-verification-completed-data.interface.ts new file mode 100644 index 000000000..eefe9ff77 --- /dev/null +++ b/src/common/interfaces/vault-byok-key-verification-completed-data.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultByokKeyVerificationCompletedDataKeyProvider } from './vault-byok-key-verification-completed-data-key-provider.interface'; + +/** The event payload. */ +export interface VaultByokKeyVerificationCompletedData { + /** The unique identifier of the organization. */ + organizationId: string; + /** The external key provider used for BYOK. */ + keyProvider: VaultByokKeyVerificationCompletedDataKeyProvider; + /** Whether the BYOK key verification completed successfully. */ + verified: boolean; +} + +export interface VaultByokKeyVerificationCompletedDataResponse { + organization_id: string; + key_provider: VaultByokKeyVerificationCompletedDataKeyProvider; + verified: boolean; +} diff --git a/src/common/interfaces/vault-byok-key-verification-completed.interface.ts b/src/common/interfaces/vault-byok-key-verification-completed.interface.ts new file mode 100644 index 000000000..577336ad5 --- /dev/null +++ b/src/common/interfaces/vault-byok-key-verification-completed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultByokKeyVerificationCompletedData, + VaultByokKeyVerificationCompletedDataResponse, +} from './vault-byok-key-verification-completed-data.interface'; +import type { + VaultByokKeyVerificationCompletedContext, + VaultByokKeyVerificationCompletedContextResponse, +} from './vault-byok-key-verification-completed-context.interface'; + +export interface VaultByokKeyVerificationCompleted { + /** Unique identifier for the event. */ + id: string; + event: 'vault.byok_key.verification_completed'; + /** The event payload. */ + data: VaultByokKeyVerificationCompletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: VaultByokKeyVerificationCompletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface VaultByokKeyVerificationCompletedResponse { + id: string; + event: 'vault.byok_key.verification_completed'; + data: VaultByokKeyVerificationCompletedDataResponse; + created_at: string; + context?: VaultByokKeyVerificationCompletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/vault-data-created-context-actor-source.interface.ts b/src/common/interfaces/vault-data-created-context-actor-source.interface.ts new file mode 100644 index 000000000..3d95ce0c2 --- /dev/null +++ b/src/common/interfaces/vault-data-created-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDataCreatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/vault-data-created-context-actor.interface.ts b/src/common/interfaces/vault-data-created-context-actor.interface.ts new file mode 100644 index 000000000..8643a7a80 --- /dev/null +++ b/src/common/interfaces/vault-data-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDataCreatedContextActorSource } from './vault-data-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface VaultDataCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: VaultDataCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface VaultDataCreatedContextActorResponse { + id: string; + source: VaultDataCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/vault-data-created-context-google-analytics-session.interface.ts b/src/common/interfaces/vault-data-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..edcbd237b --- /dev/null +++ b/src/common/interfaces/vault-data-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type VaultDataCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type VaultDataCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/vault-data-created-context.interface.ts b/src/common/interfaces/vault-data-created-context.interface.ts new file mode 100644 index 000000000..4b7572394 --- /dev/null +++ b/src/common/interfaces/vault-data-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDataCreatedContextGoogleAnalyticsSession, + VaultDataCreatedContextGoogleAnalyticsSessionResponse, +} from './vault-data-created-context-google-analytics-session.interface'; +import type { + VaultDataCreatedContextActor, + VaultDataCreatedContextActorResponse, +} from './vault-data-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface VaultDataCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: VaultDataCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: VaultDataCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface VaultDataCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: VaultDataCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: VaultDataCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/vault-data-created-data-actor-source.interface.ts b/src/common/interfaces/vault-data-created-data-actor-source.interface.ts new file mode 100644 index 000000000..e9077bf66 --- /dev/null +++ b/src/common/interfaces/vault-data-created-data-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDataCreatedDataActorSource = 'api' | 'dashboard'; diff --git a/src/common/interfaces/vault-data-created-data.interface.ts b/src/common/interfaces/vault-data-created-data.interface.ts new file mode 100644 index 000000000..4ca045adf --- /dev/null +++ b/src/common/interfaces/vault-data-created-data.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDataCreatedDataActorSource } from './vault-data-created-data-actor-source.interface'; + +/** The event payload. */ +export interface VaultDataCreatedData { + /** The unique identifier of the actor. */ + actorId: string; + actorSource: VaultDataCreatedDataActorSource; + /** The name of the actor. */ + actorName: string; + /** The name of the key-value store. */ + kvName: string; + /** The unique identifier of the encryption key. */ + keyId: string; + keyContext: Record; +} + +export interface VaultDataCreatedDataResponse { + actor_id: string; + actor_source: VaultDataCreatedDataActorSource; + actor_name: string; + kv_name: string; + key_id: string; + key_context: Record; +} diff --git a/src/common/interfaces/vault-data-created.interface.ts b/src/common/interfaces/vault-data-created.interface.ts new file mode 100644 index 000000000..a461a70be --- /dev/null +++ b/src/common/interfaces/vault-data-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDataCreatedData, + VaultDataCreatedDataResponse, +} from './vault-data-created-data.interface'; +import type { + VaultDataCreatedContext, + VaultDataCreatedContextResponse, +} from './vault-data-created-context.interface'; + +export interface VaultDataCreated { + /** Unique identifier for the event. */ + id: string; + event: 'vault.data.created'; + /** The event payload. */ + data: VaultDataCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: VaultDataCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface VaultDataCreatedResponse { + id: string; + event: 'vault.data.created'; + data: VaultDataCreatedDataResponse; + created_at: string; + context?: VaultDataCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/vault-data-deleted-context-actor-source.interface.ts b/src/common/interfaces/vault-data-deleted-context-actor-source.interface.ts new file mode 100644 index 000000000..0a83aa6f9 --- /dev/null +++ b/src/common/interfaces/vault-data-deleted-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDataDeletedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/vault-data-deleted-context-actor.interface.ts b/src/common/interfaces/vault-data-deleted-context-actor.interface.ts new file mode 100644 index 000000000..dc7c49209 --- /dev/null +++ b/src/common/interfaces/vault-data-deleted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDataDeletedContextActorSource } from './vault-data-deleted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface VaultDataDeletedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: VaultDataDeletedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface VaultDataDeletedContextActorResponse { + id: string; + source: VaultDataDeletedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/vault-data-deleted-context-google-analytics-session.interface.ts b/src/common/interfaces/vault-data-deleted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..18327c59f --- /dev/null +++ b/src/common/interfaces/vault-data-deleted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type VaultDataDeletedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type VaultDataDeletedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/vault-data-deleted-context.interface.ts b/src/common/interfaces/vault-data-deleted-context.interface.ts new file mode 100644 index 000000000..a96afe669 --- /dev/null +++ b/src/common/interfaces/vault-data-deleted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDataDeletedContextGoogleAnalyticsSession, + VaultDataDeletedContextGoogleAnalyticsSessionResponse, +} from './vault-data-deleted-context-google-analytics-session.interface'; +import type { + VaultDataDeletedContextActor, + VaultDataDeletedContextActorResponse, +} from './vault-data-deleted-context-actor.interface'; + +/** Additional context about the event. */ +export interface VaultDataDeletedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: VaultDataDeletedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: VaultDataDeletedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface VaultDataDeletedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: VaultDataDeletedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: VaultDataDeletedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/vault-data-deleted-data-actor-source.interface.ts b/src/common/interfaces/vault-data-deleted-data-actor-source.interface.ts new file mode 100644 index 000000000..38ef688a1 --- /dev/null +++ b/src/common/interfaces/vault-data-deleted-data-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDataDeletedDataActorSource = 'api' | 'dashboard'; diff --git a/src/common/interfaces/vault-data-deleted-data.interface.ts b/src/common/interfaces/vault-data-deleted-data.interface.ts new file mode 100644 index 000000000..ef733e539 --- /dev/null +++ b/src/common/interfaces/vault-data-deleted-data.interface.ts @@ -0,0 +1,21 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDataDeletedDataActorSource } from './vault-data-deleted-data-actor-source.interface'; + +/** The event payload. */ +export interface VaultDataDeletedData { + /** The unique identifier of the actor. */ + actorId: string; + actorSource: VaultDataDeletedDataActorSource; + /** The name of the actor. */ + actorName: string; + /** The name of the key-value store. */ + kvName: string; +} + +export interface VaultDataDeletedDataResponse { + actor_id: string; + actor_source: VaultDataDeletedDataActorSource; + actor_name: string; + kv_name: string; +} diff --git a/src/common/interfaces/vault-data-deleted.interface.ts b/src/common/interfaces/vault-data-deleted.interface.ts new file mode 100644 index 000000000..2d2d29629 --- /dev/null +++ b/src/common/interfaces/vault-data-deleted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDataDeletedData, + VaultDataDeletedDataResponse, +} from './vault-data-deleted-data.interface'; +import type { + VaultDataDeletedContext, + VaultDataDeletedContextResponse, +} from './vault-data-deleted-context.interface'; + +export interface VaultDataDeleted { + /** Unique identifier for the event. */ + id: string; + event: 'vault.data.deleted'; + /** The event payload. */ + data: VaultDataDeletedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: VaultDataDeletedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface VaultDataDeletedResponse { + id: string; + event: 'vault.data.deleted'; + data: VaultDataDeletedDataResponse; + created_at: string; + context?: VaultDataDeletedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/vault-data-read-context-actor-source.interface.ts b/src/common/interfaces/vault-data-read-context-actor-source.interface.ts new file mode 100644 index 000000000..fc1366ea7 --- /dev/null +++ b/src/common/interfaces/vault-data-read-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDataReadContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/vault-data-read-context-actor.interface.ts b/src/common/interfaces/vault-data-read-context-actor.interface.ts new file mode 100644 index 000000000..2bcd3b024 --- /dev/null +++ b/src/common/interfaces/vault-data-read-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDataReadContextActorSource } from './vault-data-read-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface VaultDataReadContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: VaultDataReadContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface VaultDataReadContextActorResponse { + id: string; + source: VaultDataReadContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/vault-data-read-context-google-analytics-session.interface.ts b/src/common/interfaces/vault-data-read-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..097ee0c87 --- /dev/null +++ b/src/common/interfaces/vault-data-read-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type VaultDataReadContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type VaultDataReadContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/vault-data-read-context.interface.ts b/src/common/interfaces/vault-data-read-context.interface.ts new file mode 100644 index 000000000..9744611a0 --- /dev/null +++ b/src/common/interfaces/vault-data-read-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDataReadContextGoogleAnalyticsSession, + VaultDataReadContextGoogleAnalyticsSessionResponse, +} from './vault-data-read-context-google-analytics-session.interface'; +import type { + VaultDataReadContextActor, + VaultDataReadContextActorResponse, +} from './vault-data-read-context-actor.interface'; + +/** Additional context about the event. */ +export interface VaultDataReadContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: VaultDataReadContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: VaultDataReadContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface VaultDataReadContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: VaultDataReadContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: VaultDataReadContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/vault-data-read-data-actor-source.interface.ts b/src/common/interfaces/vault-data-read-data-actor-source.interface.ts new file mode 100644 index 000000000..c6ace8259 --- /dev/null +++ b/src/common/interfaces/vault-data-read-data-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDataReadDataActorSource = 'api' | 'dashboard'; diff --git a/src/common/interfaces/vault-data-read-data.interface.ts b/src/common/interfaces/vault-data-read-data.interface.ts new file mode 100644 index 000000000..21edcc965 --- /dev/null +++ b/src/common/interfaces/vault-data-read-data.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDataReadDataActorSource } from './vault-data-read-data-actor-source.interface'; + +/** The event payload. */ +export interface VaultDataReadData { + /** The unique identifier of the actor. */ + actorId: string; + actorSource: VaultDataReadDataActorSource; + /** The name of the actor. */ + actorName: string; + /** The name of the key-value store. */ + kvName: string; + /** The unique identifier of the encryption key. */ + keyId: string; +} + +export interface VaultDataReadDataResponse { + actor_id: string; + actor_source: VaultDataReadDataActorSource; + actor_name: string; + kv_name: string; + key_id: string; +} diff --git a/src/common/interfaces/vault-data-read.interface.ts b/src/common/interfaces/vault-data-read.interface.ts new file mode 100644 index 000000000..9dfe25256 --- /dev/null +++ b/src/common/interfaces/vault-data-read.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDataReadData, + VaultDataReadDataResponse, +} from './vault-data-read-data.interface'; +import type { + VaultDataReadContext, + VaultDataReadContextResponse, +} from './vault-data-read-context.interface'; + +export interface VaultDataRead { + /** Unique identifier for the event. */ + id: string; + event: 'vault.data.read'; + /** The event payload. */ + data: VaultDataReadData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: VaultDataReadContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface VaultDataReadResponse { + id: string; + event: 'vault.data.read'; + data: VaultDataReadDataResponse; + created_at: string; + context?: VaultDataReadContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/vault-data-updated-context-actor-source.interface.ts b/src/common/interfaces/vault-data-updated-context-actor-source.interface.ts new file mode 100644 index 000000000..3457d3d24 --- /dev/null +++ b/src/common/interfaces/vault-data-updated-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDataUpdatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/vault-data-updated-context-actor.interface.ts b/src/common/interfaces/vault-data-updated-context-actor.interface.ts new file mode 100644 index 000000000..ccbbe6a9a --- /dev/null +++ b/src/common/interfaces/vault-data-updated-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDataUpdatedContextActorSource } from './vault-data-updated-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface VaultDataUpdatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: VaultDataUpdatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface VaultDataUpdatedContextActorResponse { + id: string; + source: VaultDataUpdatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/vault-data-updated-context-google-analytics-session.interface.ts b/src/common/interfaces/vault-data-updated-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..6581a77d5 --- /dev/null +++ b/src/common/interfaces/vault-data-updated-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type VaultDataUpdatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type VaultDataUpdatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/vault-data-updated-context.interface.ts b/src/common/interfaces/vault-data-updated-context.interface.ts new file mode 100644 index 000000000..e911eaf95 --- /dev/null +++ b/src/common/interfaces/vault-data-updated-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDataUpdatedContextGoogleAnalyticsSession, + VaultDataUpdatedContextGoogleAnalyticsSessionResponse, +} from './vault-data-updated-context-google-analytics-session.interface'; +import type { + VaultDataUpdatedContextActor, + VaultDataUpdatedContextActorResponse, +} from './vault-data-updated-context-actor.interface'; + +/** Additional context about the event. */ +export interface VaultDataUpdatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: VaultDataUpdatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: VaultDataUpdatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface VaultDataUpdatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: VaultDataUpdatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: VaultDataUpdatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/vault-data-updated-data-actor-source.interface.ts b/src/common/interfaces/vault-data-updated-data-actor-source.interface.ts new file mode 100644 index 000000000..efa194a96 --- /dev/null +++ b/src/common/interfaces/vault-data-updated-data-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDataUpdatedDataActorSource = 'api' | 'dashboard'; diff --git a/src/common/interfaces/vault-data-updated-data.interface.ts b/src/common/interfaces/vault-data-updated-data.interface.ts new file mode 100644 index 000000000..8db392f83 --- /dev/null +++ b/src/common/interfaces/vault-data-updated-data.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDataUpdatedDataActorSource } from './vault-data-updated-data-actor-source.interface'; + +/** The event payload. */ +export interface VaultDataUpdatedData { + /** The unique identifier of the actor. */ + actorId: string; + actorSource: VaultDataUpdatedDataActorSource; + /** The name of the actor. */ + actorName: string; + /** The name of the key-value store. */ + kvName: string; + /** The unique identifier of the encryption key. */ + keyId: string; + keyContext: Record; +} + +export interface VaultDataUpdatedDataResponse { + actor_id: string; + actor_source: VaultDataUpdatedDataActorSource; + actor_name: string; + kv_name: string; + key_id: string; + key_context: Record; +} diff --git a/src/common/interfaces/vault-data-updated.interface.ts b/src/common/interfaces/vault-data-updated.interface.ts new file mode 100644 index 000000000..e021ddec9 --- /dev/null +++ b/src/common/interfaces/vault-data-updated.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDataUpdatedData, + VaultDataUpdatedDataResponse, +} from './vault-data-updated-data.interface'; +import type { + VaultDataUpdatedContext, + VaultDataUpdatedContextResponse, +} from './vault-data-updated-context.interface'; + +export interface VaultDataUpdated { + /** Unique identifier for the event. */ + id: string; + event: 'vault.data.updated'; + /** The event payload. */ + data: VaultDataUpdatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: VaultDataUpdatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface VaultDataUpdatedResponse { + id: string; + event: 'vault.data.updated'; + data: VaultDataUpdatedDataResponse; + created_at: string; + context?: VaultDataUpdatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/vault-dek-decrypted-context-actor-source.interface.ts b/src/common/interfaces/vault-dek-decrypted-context-actor-source.interface.ts new file mode 100644 index 000000000..8bb43cbb5 --- /dev/null +++ b/src/common/interfaces/vault-dek-decrypted-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDekDecryptedContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/vault-dek-decrypted-context-actor.interface.ts b/src/common/interfaces/vault-dek-decrypted-context-actor.interface.ts new file mode 100644 index 000000000..33d4c14ff --- /dev/null +++ b/src/common/interfaces/vault-dek-decrypted-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDekDecryptedContextActorSource } from './vault-dek-decrypted-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface VaultDekDecryptedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: VaultDekDecryptedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface VaultDekDecryptedContextActorResponse { + id: string; + source: VaultDekDecryptedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/vault-dek-decrypted-context-google-analytics-session.interface.ts b/src/common/interfaces/vault-dek-decrypted-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..06e206797 --- /dev/null +++ b/src/common/interfaces/vault-dek-decrypted-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type VaultDekDecryptedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type VaultDekDecryptedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/vault-dek-decrypted-context.interface.ts b/src/common/interfaces/vault-dek-decrypted-context.interface.ts new file mode 100644 index 000000000..18e9f5af8 --- /dev/null +++ b/src/common/interfaces/vault-dek-decrypted-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDekDecryptedContextGoogleAnalyticsSession, + VaultDekDecryptedContextGoogleAnalyticsSessionResponse, +} from './vault-dek-decrypted-context-google-analytics-session.interface'; +import type { + VaultDekDecryptedContextActor, + VaultDekDecryptedContextActorResponse, +} from './vault-dek-decrypted-context-actor.interface'; + +/** Additional context about the event. */ +export interface VaultDekDecryptedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: VaultDekDecryptedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: VaultDekDecryptedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface VaultDekDecryptedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: VaultDekDecryptedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: VaultDekDecryptedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/vault-dek-decrypted-data-actor-source.interface.ts b/src/common/interfaces/vault-dek-decrypted-data-actor-source.interface.ts new file mode 100644 index 000000000..c5b447286 --- /dev/null +++ b/src/common/interfaces/vault-dek-decrypted-data-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDekDecryptedDataActorSource = 'api' | 'dashboard'; diff --git a/src/common/interfaces/vault-dek-decrypted-data.interface.ts b/src/common/interfaces/vault-dek-decrypted-data.interface.ts new file mode 100644 index 000000000..9040207a4 --- /dev/null +++ b/src/common/interfaces/vault-dek-decrypted-data.interface.ts @@ -0,0 +1,21 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDekDecryptedDataActorSource } from './vault-dek-decrypted-data-actor-source.interface'; + +/** The event payload. */ +export interface VaultDekDecryptedData { + /** The unique identifier of the actor. */ + actorId: string; + actorSource: VaultDekDecryptedDataActorSource; + /** The name of the actor. */ + actorName: string; + /** The unique identifier of the data encryption key. */ + keyId: string; +} + +export interface VaultDekDecryptedDataResponse { + actor_id: string; + actor_source: VaultDekDecryptedDataActorSource; + actor_name: string; + key_id: string; +} diff --git a/src/common/interfaces/vault-dek-decrypted.interface.ts b/src/common/interfaces/vault-dek-decrypted.interface.ts new file mode 100644 index 000000000..dcfb18f3d --- /dev/null +++ b/src/common/interfaces/vault-dek-decrypted.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDekDecryptedData, + VaultDekDecryptedDataResponse, +} from './vault-dek-decrypted-data.interface'; +import type { + VaultDekDecryptedContext, + VaultDekDecryptedContextResponse, +} from './vault-dek-decrypted-context.interface'; + +export interface VaultDekDecrypted { + /** Unique identifier for the event. */ + id: string; + event: 'vault.dek.decrypted'; + /** The event payload. */ + data: VaultDekDecryptedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: VaultDekDecryptedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface VaultDekDecryptedResponse { + id: string; + event: 'vault.dek.decrypted'; + data: VaultDekDecryptedDataResponse; + created_at: string; + context?: VaultDekDecryptedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/vault-dek-read-context-actor-source.interface.ts b/src/common/interfaces/vault-dek-read-context-actor-source.interface.ts new file mode 100644 index 000000000..ac092587e --- /dev/null +++ b/src/common/interfaces/vault-dek-read-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDekReadContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/vault-dek-read-context-actor.interface.ts b/src/common/interfaces/vault-dek-read-context-actor.interface.ts new file mode 100644 index 000000000..96af5280f --- /dev/null +++ b/src/common/interfaces/vault-dek-read-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDekReadContextActorSource } from './vault-dek-read-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface VaultDekReadContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: VaultDekReadContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface VaultDekReadContextActorResponse { + id: string; + source: VaultDekReadContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/vault-dek-read-context-google-analytics-session.interface.ts b/src/common/interfaces/vault-dek-read-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..86fb3d1ff --- /dev/null +++ b/src/common/interfaces/vault-dek-read-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type VaultDekReadContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type VaultDekReadContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/vault-dek-read-context.interface.ts b/src/common/interfaces/vault-dek-read-context.interface.ts new file mode 100644 index 000000000..cbccca043 --- /dev/null +++ b/src/common/interfaces/vault-dek-read-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDekReadContextGoogleAnalyticsSession, + VaultDekReadContextGoogleAnalyticsSessionResponse, +} from './vault-dek-read-context-google-analytics-session.interface'; +import type { + VaultDekReadContextActor, + VaultDekReadContextActorResponse, +} from './vault-dek-read-context-actor.interface'; + +/** Additional context about the event. */ +export interface VaultDekReadContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: VaultDekReadContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: VaultDekReadContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface VaultDekReadContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: VaultDekReadContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: VaultDekReadContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/vault-dek-read-data-actor-source.interface.ts b/src/common/interfaces/vault-dek-read-data-actor-source.interface.ts new file mode 100644 index 000000000..60bfe67ca --- /dev/null +++ b/src/common/interfaces/vault-dek-read-data-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultDekReadDataActorSource = 'api' | 'dashboard'; diff --git a/src/common/interfaces/vault-dek-read-data.interface.ts b/src/common/interfaces/vault-dek-read-data.interface.ts new file mode 100644 index 000000000..41e3a9362 --- /dev/null +++ b/src/common/interfaces/vault-dek-read-data.interface.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultDekReadDataActorSource } from './vault-dek-read-data-actor-source.interface'; + +/** The event payload. */ +export interface VaultDekReadData { + /** The unique identifier of the actor. */ + actorId: string; + actorSource: VaultDekReadDataActorSource; + /** The name of the actor. */ + actorName: string; + /** The unique identifiers of the data encryption keys. */ + keyIds: string[]; + keyContext: Record; +} + +export interface VaultDekReadDataResponse { + actor_id: string; + actor_source: VaultDekReadDataActorSource; + actor_name: string; + key_ids: string[]; + key_context: Record; +} diff --git a/src/common/interfaces/vault-dek-read.interface.ts b/src/common/interfaces/vault-dek-read.interface.ts new file mode 100644 index 000000000..57d662176 --- /dev/null +++ b/src/common/interfaces/vault-dek-read.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultDekReadData, + VaultDekReadDataResponse, +} from './vault-dek-read-data.interface'; +import type { + VaultDekReadContext, + VaultDekReadContextResponse, +} from './vault-dek-read-context.interface'; + +export interface VaultDekRead { + /** Unique identifier for the event. */ + id: string; + event: 'vault.dek.read'; + /** The event payload. */ + data: VaultDekReadData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: VaultDekReadContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface VaultDekReadResponse { + id: string; + event: 'vault.dek.read'; + data: VaultDekReadDataResponse; + created_at: string; + context?: VaultDekReadContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/vault-kek-created-context-actor-source.interface.ts b/src/common/interfaces/vault-kek-created-context-actor-source.interface.ts new file mode 100644 index 000000000..2ff687632 --- /dev/null +++ b/src/common/interfaces/vault-kek-created-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultKekCreatedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/vault-kek-created-context-actor.interface.ts b/src/common/interfaces/vault-kek-created-context-actor.interface.ts new file mode 100644 index 000000000..b704f3aee --- /dev/null +++ b/src/common/interfaces/vault-kek-created-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultKekCreatedContextActorSource } from './vault-kek-created-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface VaultKekCreatedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: VaultKekCreatedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface VaultKekCreatedContextActorResponse { + id: string; + source: VaultKekCreatedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/vault-kek-created-context-google-analytics-session.interface.ts b/src/common/interfaces/vault-kek-created-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..8caf65b41 --- /dev/null +++ b/src/common/interfaces/vault-kek-created-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type VaultKekCreatedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type VaultKekCreatedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/vault-kek-created-context.interface.ts b/src/common/interfaces/vault-kek-created-context.interface.ts new file mode 100644 index 000000000..93b77d79b --- /dev/null +++ b/src/common/interfaces/vault-kek-created-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultKekCreatedContextGoogleAnalyticsSession, + VaultKekCreatedContextGoogleAnalyticsSessionResponse, +} from './vault-kek-created-context-google-analytics-session.interface'; +import type { + VaultKekCreatedContextActor, + VaultKekCreatedContextActorResponse, +} from './vault-kek-created-context-actor.interface'; + +/** Additional context about the event. */ +export interface VaultKekCreatedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: VaultKekCreatedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: VaultKekCreatedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface VaultKekCreatedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: VaultKekCreatedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: VaultKekCreatedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/vault-kek-created-data-actor-source.interface.ts b/src/common/interfaces/vault-kek-created-data-actor-source.interface.ts new file mode 100644 index 000000000..11f971c61 --- /dev/null +++ b/src/common/interfaces/vault-kek-created-data-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultKekCreatedDataActorSource = 'api' | 'dashboard'; diff --git a/src/common/interfaces/vault-kek-created-data.interface.ts b/src/common/interfaces/vault-kek-created-data.interface.ts new file mode 100644 index 000000000..69426b8a4 --- /dev/null +++ b/src/common/interfaces/vault-kek-created-data.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultKekCreatedDataActorSource } from './vault-kek-created-data-actor-source.interface'; + +/** The event payload. */ +export interface VaultKekCreatedData { + /** The unique identifier of the actor. */ + actorId: string; + actorSource: VaultKekCreatedDataActorSource; + /** The name of the actor. */ + actorName: string; + /** The name of the key encryption key. */ + keyName: string; + /** The unique identifier of the key encryption key. */ + keyId: string; +} + +export interface VaultKekCreatedDataResponse { + actor_id: string; + actor_source: VaultKekCreatedDataActorSource; + actor_name: string; + key_name: string; + key_id: string; +} diff --git a/src/common/interfaces/vault-kek-created.interface.ts b/src/common/interfaces/vault-kek-created.interface.ts new file mode 100644 index 000000000..85a7fcbff --- /dev/null +++ b/src/common/interfaces/vault-kek-created.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultKekCreatedData, + VaultKekCreatedDataResponse, +} from './vault-kek-created-data.interface'; +import type { + VaultKekCreatedContext, + VaultKekCreatedContextResponse, +} from './vault-kek-created-context.interface'; + +export interface VaultKekCreated { + /** Unique identifier for the event. */ + id: string; + event: 'vault.kek.created'; + /** The event payload. */ + data: VaultKekCreatedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: VaultKekCreatedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface VaultKekCreatedResponse { + id: string; + event: 'vault.kek.created'; + data: VaultKekCreatedDataResponse; + created_at: string; + context?: VaultKekCreatedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/vault-metadata-read-context-actor-source.interface.ts b/src/common/interfaces/vault-metadata-read-context-actor-source.interface.ts new file mode 100644 index 000000000..df7d3237d --- /dev/null +++ b/src/common/interfaces/vault-metadata-read-context-actor-source.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultMetadataReadContextActorSource = + | 'api' + | 'dashboard' + | 'system'; diff --git a/src/common/interfaces/vault-metadata-read-context-actor.interface.ts b/src/common/interfaces/vault-metadata-read-context-actor.interface.ts new file mode 100644 index 000000000..ade617601 --- /dev/null +++ b/src/common/interfaces/vault-metadata-read-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultMetadataReadContextActorSource } from './vault-metadata-read-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface VaultMetadataReadContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: VaultMetadataReadContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface VaultMetadataReadContextActorResponse { + id: string; + source: VaultMetadataReadContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/vault-metadata-read-context-google-analytics-session.interface.ts b/src/common/interfaces/vault-metadata-read-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..96e3e1b73 --- /dev/null +++ b/src/common/interfaces/vault-metadata-read-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type VaultMetadataReadContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type VaultMetadataReadContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/vault-metadata-read-context.interface.ts b/src/common/interfaces/vault-metadata-read-context.interface.ts new file mode 100644 index 000000000..0493248f8 --- /dev/null +++ b/src/common/interfaces/vault-metadata-read-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultMetadataReadContextGoogleAnalyticsSession, + VaultMetadataReadContextGoogleAnalyticsSessionResponse, +} from './vault-metadata-read-context-google-analytics-session.interface'; +import type { + VaultMetadataReadContextActor, + VaultMetadataReadContextActorResponse, +} from './vault-metadata-read-context-actor.interface'; + +/** Additional context about the event. */ +export interface VaultMetadataReadContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: VaultMetadataReadContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: VaultMetadataReadContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface VaultMetadataReadContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: VaultMetadataReadContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: VaultMetadataReadContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/vault-metadata-read-data-actor-source.interface.ts b/src/common/interfaces/vault-metadata-read-data-actor-source.interface.ts new file mode 100644 index 000000000..6d57a30c8 --- /dev/null +++ b/src/common/interfaces/vault-metadata-read-data-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultMetadataReadDataActorSource = 'api' | 'dashboard'; diff --git a/src/common/interfaces/vault-metadata-read-data.interface.ts b/src/common/interfaces/vault-metadata-read-data.interface.ts new file mode 100644 index 000000000..4b3155d5b --- /dev/null +++ b/src/common/interfaces/vault-metadata-read-data.interface.ts @@ -0,0 +1,21 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultMetadataReadDataActorSource } from './vault-metadata-read-data-actor-source.interface'; + +/** The event payload. */ +export interface VaultMetadataReadData { + /** The unique identifier of the actor. */ + actorId: string; + actorSource: VaultMetadataReadDataActorSource; + /** The name of the actor. */ + actorName: string; + /** The name of the key-value store. */ + kvName: string; +} + +export interface VaultMetadataReadDataResponse { + actor_id: string; + actor_source: VaultMetadataReadDataActorSource; + actor_name: string; + kv_name: string; +} diff --git a/src/common/interfaces/vault-metadata-read.interface.ts b/src/common/interfaces/vault-metadata-read.interface.ts new file mode 100644 index 000000000..c9b1a2ace --- /dev/null +++ b/src/common/interfaces/vault-metadata-read.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultMetadataReadData, + VaultMetadataReadDataResponse, +} from './vault-metadata-read-data.interface'; +import type { + VaultMetadataReadContext, + VaultMetadataReadContextResponse, +} from './vault-metadata-read-context.interface'; + +export interface VaultMetadataRead { + /** Unique identifier for the event. */ + id: string; + event: 'vault.metadata.read'; + /** The event payload. */ + data: VaultMetadataReadData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: VaultMetadataReadContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface VaultMetadataReadResponse { + id: string; + event: 'vault.metadata.read'; + data: VaultMetadataReadDataResponse; + created_at: string; + context?: VaultMetadataReadContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/vault-names-listed-context-actor-source.interface.ts b/src/common/interfaces/vault-names-listed-context-actor-source.interface.ts new file mode 100644 index 000000000..fe87b2c67 --- /dev/null +++ b/src/common/interfaces/vault-names-listed-context-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultNamesListedContextActorSource = 'api' | 'dashboard' | 'system'; diff --git a/src/common/interfaces/vault-names-listed-context-actor.interface.ts b/src/common/interfaces/vault-names-listed-context-actor.interface.ts new file mode 100644 index 000000000..93c464371 --- /dev/null +++ b/src/common/interfaces/vault-names-listed-context-actor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultNamesListedContextActorSource } from './vault-names-listed-context-actor-source.interface'; + +/** The actor who performed the action. */ +export interface VaultNamesListedContextActor { + /** Unique identifier of the actor. */ + id: string; + /** The source of the actor that performed the action. */ + source: VaultNamesListedContextActorSource; + /** The name of the actor. */ + name: string | null; +} + +export interface VaultNamesListedContextActorResponse { + id: string; + source: VaultNamesListedContextActorSource; + name: string | null; +} diff --git a/src/common/interfaces/vault-names-listed-context-google-analytics-session.interface.ts b/src/common/interfaces/vault-names-listed-context-google-analytics-session.interface.ts new file mode 100644 index 000000000..8366139b6 --- /dev/null +++ b/src/common/interfaces/vault-names-listed-context-google-analytics-session.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './action-authentication-denied-context-google-analytics-session.interface'; + +export type VaultNamesListedContextGoogleAnalyticsSession = + ActionAuthenticationDeniedContextGoogleAnalyticsSession; +export type VaultNamesListedContextGoogleAnalyticsSessionResponse = + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse; diff --git a/src/common/interfaces/vault-names-listed-context.interface.ts b/src/common/interfaces/vault-names-listed-context.interface.ts new file mode 100644 index 000000000..a035fe341 --- /dev/null +++ b/src/common/interfaces/vault-names-listed-context.interface.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultNamesListedContextGoogleAnalyticsSession, + VaultNamesListedContextGoogleAnalyticsSessionResponse, +} from './vault-names-listed-context-google-analytics-session.interface'; +import type { + VaultNamesListedContextActor, + VaultNamesListedContextActorResponse, +} from './vault-names-listed-context-actor.interface'; + +/** Additional context about the event. */ +export interface VaultNamesListedContext { + /** The Google Analytics client ID. */ + googleAnalyticsClientId?: string; + /** The Google Analytics sessions associated with the event. */ + googleAnalyticsSessions?: VaultNamesListedContextGoogleAnalyticsSession[]; + /** The anonymous ID from analytics. */ + ajsAnonymousId?: string; + /** The client ID associated with the event. */ + clientId?: string; + /** The actor who performed the action. */ + actor?: VaultNamesListedContextActor; + /** Attributes that changed from their previous values. */ + previousAttributes?: Record; +} + +export interface VaultNamesListedContextResponse { + google_analytics_client_id?: string; + google_analytics_sessions?: VaultNamesListedContextGoogleAnalyticsSessionResponse[]; + ajs_anonymous_id?: string; + client_id?: string; + actor?: VaultNamesListedContextActorResponse; + previous_attributes?: Record; +} diff --git a/src/common/interfaces/vault-names-listed-data-actor-source.interface.ts b/src/common/interfaces/vault-names-listed-data-actor-source.interface.ts new file mode 100644 index 000000000..2da715321 --- /dev/null +++ b/src/common/interfaces/vault-names-listed-data-actor-source.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type VaultNamesListedDataActorSource = 'api' | 'dashboard'; diff --git a/src/common/interfaces/vault-names-listed-data.interface.ts b/src/common/interfaces/vault-names-listed-data.interface.ts new file mode 100644 index 000000000..dbb44c93d --- /dev/null +++ b/src/common/interfaces/vault-names-listed-data.interface.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { VaultNamesListedDataActorSource } from './vault-names-listed-data-actor-source.interface'; + +/** The event payload. */ +export interface VaultNamesListedData { + /** The unique identifier of the actor. */ + actorId: string; + actorSource: VaultNamesListedDataActorSource; + /** The name of the actor. */ + actorName: string; +} + +export interface VaultNamesListedDataResponse { + actor_id: string; + actor_source: VaultNamesListedDataActorSource; + actor_name: string; +} diff --git a/src/common/interfaces/vault-names-listed.interface.ts b/src/common/interfaces/vault-names-listed.interface.ts new file mode 100644 index 000000000..461fad632 --- /dev/null +++ b/src/common/interfaces/vault-names-listed.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VaultNamesListedData, + VaultNamesListedDataResponse, +} from './vault-names-listed-data.interface'; +import type { + VaultNamesListedContext, + VaultNamesListedContextResponse, +} from './vault-names-listed-context.interface'; + +export interface VaultNamesListed { + /** Unique identifier for the event. */ + id: string; + event: 'vault.names.listed'; + /** The event payload. */ + data: VaultNamesListedData; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: VaultNamesListedContext; + /** Distinguishes the Event object. */ + object: 'event'; +} + +export interface VaultNamesListedResponse { + id: string; + event: 'vault.names.listed'; + data: VaultNamesListedDataResponse; + created_at: string; + context?: VaultNamesListedContextResponse; + object: 'event'; +} diff --git a/src/common/interfaces/widget-session-token-scopes.interface.ts b/src/common/interfaces/widget-session-token-scopes.interface.ts new file mode 100644 index 000000000..39d229102 --- /dev/null +++ b/src/common/interfaces/widget-session-token-scopes.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +export type WidgetSessionTokenScopes = + | 'widgets:users-table:manage' + | 'widgets:domain-verification:manage' + | 'widgets:sso:manage' + | 'widgets:api-keys:manage' + | 'widgets:dsync:manage' + | 'widgets:audit-log-streaming:manage'; diff --git a/src/common/serializers/api-key-created-data-owner.serializer.ts b/src/common/serializers/api-key-created-data-owner.serializer.ts new file mode 100644 index 000000000..bbaa6648c --- /dev/null +++ b/src/common/serializers/api-key-created-data-owner.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyCreatedDataOwner, + ApiKeyCreatedDataOwnerResponse, +} from '../interfaces/api-key-created-data-owner.interface'; + +export const deserializeApiKeyCreatedDataOwner = ( + response: ApiKeyCreatedDataOwnerResponse, +): ApiKeyCreatedDataOwner => ({ + type: response.type, + id: response.id, +}); + +export const serializeApiKeyCreatedDataOwner = ( + model: ApiKeyCreatedDataOwner, +): ApiKeyCreatedDataOwnerResponse => ({ + type: model.type, + id: model.id, +}); diff --git a/src/common/serializers/connection-activated-data-domain.serializer.ts b/src/common/serializers/connection-activated-data-domain.serializer.ts new file mode 100644 index 000000000..2d4ead191 --- /dev/null +++ b/src/common/serializers/connection-activated-data-domain.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionActivatedDataDomain, + ConnectionActivatedDataDomainResponse, +} from '../interfaces/connection-activated-data-domain.interface'; + +export const deserializeConnectionActivatedDataDomain = ( + response: ConnectionActivatedDataDomainResponse, +): ConnectionActivatedDataDomain => ({ + object: response.object, + id: response.id, + domain: response.domain, +}); + +export const serializeConnectionActivatedDataDomain = ( + model: ConnectionActivatedDataDomain, +): ConnectionActivatedDataDomainResponse => ({ + object: model.object, + id: model.id, + domain: model.domain, +}); diff --git a/src/common/serializers/dsync-user-updated-data-email.serializer.ts b/src/common/serializers/dsync-user-updated-data-email.serializer.ts new file mode 100644 index 000000000..7d6ebebaa --- /dev/null +++ b/src/common/serializers/dsync-user-updated-data-email.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DsyncUserUpdatedDataEmail, + DsyncUserUpdatedDataEmailResponse, +} from '../interfaces/dsync-user-updated-data-email.interface'; + +export const deserializeDsyncUserUpdatedDataEmail = ( + response: DsyncUserUpdatedDataEmailResponse, +): DsyncUserUpdatedDataEmail => ({ + primary: response.primary, + type: response.type, + value: response.value ?? null, +}); + +export const serializeDsyncUserUpdatedDataEmail = ( + model: DsyncUserUpdatedDataEmail, +): DsyncUserUpdatedDataEmailResponse => ({ + primary: model.primary, + type: model.type, + value: model.value ?? null, +}); diff --git a/src/common/serializers/flag-created-data-owner.serializer.ts b/src/common/serializers/flag-created-data-owner.serializer.ts new file mode 100644 index 000000000..402bef0f8 --- /dev/null +++ b/src/common/serializers/flag-created-data-owner.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FlagCreatedDataOwner, + FlagCreatedDataOwnerResponse, +} from '../interfaces/flag-created-data-owner.interface'; + +export const deserializeFlagCreatedDataOwner = ( + response: FlagCreatedDataOwnerResponse, +): FlagCreatedDataOwner => ({ + email: response.email, + firstName: response.first_name ?? null, + lastName: response.last_name ?? null, +}); + +export const serializeFlagCreatedDataOwner = ( + model: FlagCreatedDataOwner, +): FlagCreatedDataOwnerResponse => ({ + email: model.email, + first_name: model.firstName, + last_name: model.lastName, +}); diff --git a/src/common/serializers/session-created-data-impersonator.serializer.ts b/src/common/serializers/session-created-data-impersonator.serializer.ts new file mode 100644 index 000000000..bf8b5af48 --- /dev/null +++ b/src/common/serializers/session-created-data-impersonator.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SessionCreatedDataImpersonator, + SessionCreatedDataImpersonatorResponse, +} from '../interfaces/session-created-data-impersonator.interface'; + +export const deserializeSessionCreatedDataImpersonator = ( + response: SessionCreatedDataImpersonatorResponse, +): SessionCreatedDataImpersonator => ({ + email: response.email, + reason: response.reason ?? null, +}); + +export const serializeSessionCreatedDataImpersonator = ( + model: SessionCreatedDataImpersonator, +): SessionCreatedDataImpersonatorResponse => ({ + email: model.email, + reason: model.reason, +}); diff --git a/src/common/serializers/user-created-data.serializer.ts b/src/common/serializers/user-created-data.serializer.ts new file mode 100644 index 000000000..662890047 --- /dev/null +++ b/src/common/serializers/user-created-data.serializer.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserCreatedData, + UserCreatedDataResponse, +} from '../interfaces/user-created-data.interface'; + +export const deserializeUserCreatedData = ( + response: UserCreatedDataResponse, +): UserCreatedData => ({ + object: response.object, + id: response.id, + firstName: response.first_name ?? null, + lastName: response.last_name ?? null, + profilePictureUrl: response.profile_picture_url ?? null, + email: response.email, + emailVerified: response.email_verified, + externalId: response.external_id ?? null, + metadata: response.metadata, + lastSignInAt: response.last_sign_in_at, + locale: response.locale ?? null, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeUserCreatedData = ( + model: UserCreatedData, +): UserCreatedDataResponse => ({ + object: model.object, + id: model.id, + first_name: model.firstName, + last_name: model.lastName, + profile_picture_url: model.profilePictureUrl, + email: model.email, + email_verified: model.emailVerified, + external_id: model.externalId, + metadata: model.metadata, + last_sign_in_at: model.lastSignInAt, + locale: model.locale ?? null, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/connect/connect.ts b/src/connect/connect.ts new file mode 100644 index 000000000..0837e367d --- /dev/null +++ b/src/connect/connect.ts @@ -0,0 +1,280 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { PaginationOptions } from '../common/interfaces/pagination-options.interface'; +import type { AutoPaginatable } from '../common/utils/pagination'; +import { createPaginatedList } from '../common/utils/fetch-and-deserialize'; +import type { + ExternalAuthCompleteResponse, + ExternalAuthCompleteResponseWire, +} from './interfaces/external-auth-complete-response.interface'; +import type { + ConnectApplication, + ConnectApplicationResponse, +} from './interfaces/connect-application.interface'; +import type { + ApplicationCredentialsListItem, + ApplicationCredentialsListItemResponse, +} from './interfaces/application-credentials-list-item.interface'; +import type { + NewConnectApplicationSecret, + NewConnectApplicationSecretResponse, +} from './interfaces/new-connect-application-secret.interface'; +import type { UserManagementLoginRequest } from './interfaces/user-management-login-request.interface'; +import type { CreateOAuthApplication } from './interfaces/create-oauth-application.interface'; +import type { CreateM2MApplication } from './interfaces/create-m2m-application.interface'; +import type { UpdateOAuthApplication } from './interfaces/update-oauth-application.interface'; +import type { CreateApplicationSecret } from './interfaces/create-application-secret.interface'; +import type { RedirectUriInput } from './interfaces/redirect-uri-input.interface'; +import { deserializeExternalAuthCompleteResponse } from './serializers/external-auth-complete-response.serializer'; +import { deserializeConnectApplication } from './serializers/connect-application.serializer'; +import { deserializeApplicationCredentialsListItem } from './serializers/application-credentials-list-item.serializer'; +import { deserializeNewConnectApplicationSecret } from './serializers/new-connect-application-secret.serializer'; +import { serializeUserManagementLoginRequest } from './serializers/user-management-login-request.serializer'; +import { serializeCreateOAuthApplication } from './serializers/create-oauth-application.serializer'; +import { serializeCreateM2MApplication } from './serializers/create-m2m-application.serializer'; +import { serializeUpdateOAuthApplication } from './serializers/update-oauth-application.serializer'; +import { serializeCreateApplicationSecret } from './serializers/create-application-secret.serializer'; + +export interface ListApplicationsOptions extends PaginationOptions { + /** Filter Connect Applications by organization ID. */ + organizationId?: string; +} + +export class Connect { + constructor(private readonly workos: WorkOS) {} + + /** + * Complete external authentication + * + * Completes an external authentication flow and returns control to AuthKit. This endpoint is used with [Standalone Connect](https://workos.com/docs/authkit/connect/standalone) to bridge your existing authentication system with the Connect OAuth API infrastructure. + * + * After successfully authenticating a user in your application, calling this endpoint will: + * + * - Create or update the user in AuthKit, using the given `id` as its `external_id`. + * - Return a `redirect_uri` your application should redirect to in order for AuthKit to complete the flow + * + * Users are automatically created or updated based on the `id` and `email` provided. If a user with the same `id` exists, their information is updated. Otherwise, a new user is created. + * + * If you provide a new `id` with an `email` that already belongs to an existing user, the request will fail with an error as email addresses are unique to a user. + * @param payload - Object containing externalAuthId, user. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ + async completeOAuth2( + payload: UserManagementLoginRequest, + ): Promise { + const { data } = await this.workos.post( + '/authkit/oauth2/complete', + serializeUserManagementLoginRequest(payload), + ); + return deserializeExternalAuthCompleteResponse(data); + } + + /** + * List Connect Applications + * + * List all Connect Applications in the current environment with optional filtering. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {UnprocessableEntityException} 422 + */ + async listApplications( + options?: ListApplicationsOptions, + ): Promise> { + return createPaginatedList< + ConnectApplicationResponse, + ConnectApplication, + ListApplicationsOptions + >( + this.workos, + '/connect/applications', + deserializeConnectApplication, + options, + ); + } + + /** + * Create a Connect Application + * + * Create a new Connect Application. Supports both OAuth and Machine-to-Machine (M2M) application types. + * @param payload - The request body. + * @returns {Promise} + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ + async createApplications( + payload: CreateOAuthApplication | CreateM2MApplication, + ): Promise { + const { data } = await this.workos.post( + '/connect/applications', + (() => { + switch ((payload as any).applicationType) { + case 'oauth': + return serializeCreateOAuthApplication(payload as any); + case 'm2m': + return serializeCreateM2MApplication(payload as any); + default: + return payload; + } + })(), + ); + return deserializeConnectApplication(data); + } + + /** Create oauth application. */ + async createOAuthApplication( + name: string, + isFirstParty: boolean, + description?: string | null, + scopes?: string[] | null, + redirectUris?: RedirectUriInput[] | null, + usesPkce?: boolean | null, + organizationId?: string | null, + ): Promise { + const body: Record = { + application_type: 'oauth', + name: name, + is_first_party: isFirstParty, + }; + if (description !== undefined) body.description = description; + if (scopes !== undefined) body.scopes = scopes; + if (redirectUris !== undefined) body.redirect_uris = redirectUris; + if (usesPkce !== undefined) body.uses_pkce = usesPkce; + if (organizationId !== undefined) body.organization_id = organizationId; + const { data } = await this.workos.post( + '/connect/applications', + body, + ); + return deserializeConnectApplication(data); + } + + /** Create m2m application. */ + async createM2MApplication( + name: string, + organizationId: string, + description?: string | null, + scopes?: string[] | null, + ): Promise { + const body: Record = { + application_type: 'm2m', + name: name, + organization_id: organizationId, + }; + if (description !== undefined) body.description = description; + if (scopes !== undefined) body.scopes = scopes; + const { data } = await this.workos.post( + '/connect/applications', + body, + ); + return deserializeConnectApplication(data); + } + + /** + * Get a Connect Application + * + * Retrieve details for a specific Connect Application by ID or client ID. + * @param id - The application ID or client ID of the Connect Application. + * @example "conn_app_01HXYZ123456789ABCDEFGHIJ" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ + async getApplication(id: string): Promise { + const { data } = await this.workos.get( + `/connect/applications/${id}`, + ); + return deserializeConnectApplication(data); + } + + /** + * Update a Connect Application + * + * Update an existing Connect Application. For OAuth applications, you can update redirect URIs. For all applications, you can update the name, description, and scopes. + * @param id - The application ID or client ID of the Connect Application. + * @example "conn_app_01HXYZ123456789ABCDEFGHIJ" + * @param payload - The request body. + * @returns {Promise} + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ + async updateApplication( + id: string, + payload: UpdateOAuthApplication, + ): Promise { + const { data } = await this.workos.put( + `/connect/applications/${id}`, + serializeUpdateOAuthApplication(payload), + ); + return deserializeConnectApplication(data); + } + + /** + * Delete a Connect Application + * + * Delete an existing Connect Application. + * @param id - The application ID or client ID of the Connect Application. + * @example "conn_app_01HXYZ123456789ABCDEFGHIJ" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ + async deleteApplication(id: string): Promise { + await this.workos.delete(`/connect/applications/${id}`); + } + + /** + * List Client Secrets for a Connect Application + * + * List all client secrets associated with a Connect Application. + * @param id - The application ID or client ID of the Connect Application. + * @example "conn_app_01HXYZ123456789ABCDEFGHIJ" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ + async listApplicationClientSecrets( + id: string, + ): Promise { + const { data } = + await this.workos.get( + `/connect/applications/${id}/client_secrets`, + ); + return deserializeApplicationCredentialsListItem(data); + } + + /** + * Create a new client secret for a Connect Application + * + * Create new secrets for a Connect Application. + * @param id - The application ID or client ID of the Connect Application. + * @example "conn_app_01HXYZ123456789ABCDEFGHIJ" + * @param payload - The request body. + * @returns {Promise} + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ + async createApplicationClientSecrets( + id: string, + payload: CreateApplicationSecret, + ): Promise { + const { data } = + await this.workos.post( + `/connect/applications/${id}/client_secrets`, + serializeCreateApplicationSecret(payload), + ); + return deserializeNewConnectApplicationSecret(data); + } + + /** + * Delete a Client Secret + * + * Delete (revoke) an existing client secret. + * @param id - The unique ID of the client secret. + * @example "secret_01J9Q2Z3X4Y5W6V7U8T9S0R1Q" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ + async deleteClientSecret(id: string): Promise { + await this.workos.delete(`/connect/client_secrets/${id}`); + } +} diff --git a/src/connect/interfaces/application-credentials-list-item.interface.ts b/src/connect/interfaces/application-credentials-list-item.interface.ts new file mode 100644 index 000000000..c06b29616 --- /dev/null +++ b/src/connect/interfaces/application-credentials-list-item.interface.ts @@ -0,0 +1,25 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface ApplicationCredentialsListItem { + /** Distinguishes the connect application secret object. */ + object: 'connect_application_secret'; + /** The unique ID of the client secret. */ + id: string; + /** A hint showing the last few characters of the secret value. */ + secretHint: string; + /** The timestamp when the client secret was last used, or null if never used. */ + lastUsedAt: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface ApplicationCredentialsListItemResponse { + object: 'connect_application_secret'; + id: string; + secret_hint: string; + last_used_at: string | null; + created_at: string; + updated_at: string; +} diff --git a/src/connect/interfaces/applications-order.interface.ts b/src/connect/interfaces/applications-order.interface.ts new file mode 100644 index 000000000..af8e38d5f --- /dev/null +++ b/src/connect/interfaces/applications-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ApplicationsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/connect/interfaces/connect-application.interface.ts b/src/connect/interfaces/connect-application.interface.ts new file mode 100644 index 000000000..26551a22d --- /dev/null +++ b/src/connect/interfaces/connect-application.interface.ts @@ -0,0 +1,31 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface ConnectApplication { + /** Distinguishes the connect application object. */ + object: 'connect_application'; + /** The unique ID of the connect application. */ + id: string; + /** The client ID of the connect application. */ + clientId: string; + /** A description of the connect application. */ + description: string | null; + /** The name of the connect application. */ + name: string; + /** The scopes available for this application. */ + scopes: string[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface ConnectApplicationResponse { + object: 'connect_application'; + id: string; + client_id: string; + description: string | null; + name: string; + scopes: string[]; + created_at: string; + updated_at: string; +} diff --git a/src/connect/interfaces/create-application-secret.interface.ts b/src/connect/interfaces/create-application-secret.interface.ts new file mode 100644 index 000000000..3265d757a --- /dev/null +++ b/src/connect/interfaces/create-application-secret.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type CreateApplicationSecret = object; + +export type CreateApplicationSecretResponse = object; diff --git a/src/connect/interfaces/create-m2m-application.interface.ts b/src/connect/interfaces/create-m2m-application.interface.ts new file mode 100644 index 000000000..307232690 --- /dev/null +++ b/src/connect/interfaces/create-m2m-application.interface.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateM2MApplication { + /** The name of the application. */ + name: string; + /** The type of application to create. */ + applicationType: 'm2m'; + /** A description for the application. */ + description?: string | null; + /** The OAuth scopes granted to the application. */ + scopes?: string[] | null; + /** The organization ID this application belongs to. */ + organizationId: string; +} + +export interface CreateM2MApplicationResponse { + name: string; + application_type: 'm2m'; + description?: string | null; + scopes?: string[] | null; + organization_id: string; +} diff --git a/src/connect/interfaces/create-oauth-application.interface.ts b/src/connect/interfaces/create-oauth-application.interface.ts new file mode 100644 index 000000000..a058feb91 --- /dev/null +++ b/src/connect/interfaces/create-oauth-application.interface.ts @@ -0,0 +1,36 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RedirectUriInput, + RedirectUriInputResponse, +} from './redirect-uri-input.interface'; + +export interface CreateOAuthApplication { + /** The name of the application. */ + name: string; + /** The type of application to create. */ + applicationType: 'oauth'; + /** A description for the application. */ + description?: string | null; + /** The OAuth scopes granted to the application. */ + scopes?: string[] | null; + /** Redirect URIs for the application. */ + redirectUris?: RedirectUriInput[] | null; + /** Whether the application uses PKCE (Proof Key for Code Exchange). */ + usesPkce?: boolean | null; + /** Whether this is a first-party application. Third-party applications require an organization_id. */ + isFirstParty: boolean; + /** The organization ID this application belongs to. Required when is_first_party is false. */ + organizationId?: string | null; +} + +export interface CreateOAuthApplicationResponse { + name: string; + application_type: 'oauth'; + description?: string | null; + scopes?: string[] | null; + redirect_uris?: RedirectUriInputResponse[] | null; + uses_pkce?: boolean | null; + is_first_party: boolean; + organization_id?: string | null; +} diff --git a/src/connect/interfaces/external-auth-complete-response.interface.ts b/src/connect/interfaces/external-auth-complete-response.interface.ts new file mode 100644 index 000000000..67a663e5d --- /dev/null +++ b/src/connect/interfaces/external-auth-complete-response.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface ExternalAuthCompleteResponse { + /** URI to redirect the user back to AuthKit to complete the OAuth flow. */ + redirectUri: string; +} + +export interface ExternalAuthCompleteResponseWire { + redirect_uri: string; +} diff --git a/src/connect/interfaces/index.ts b/src/connect/interfaces/index.ts new file mode 100644 index 000000000..a12995169 --- /dev/null +++ b/src/connect/interfaces/index.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +export * from './applications-order.interface'; +export * from './external-auth-complete-response.interface'; +export * from './redirect-uri-input.interface'; +export * from './user-consent-option-choice.interface'; +export * from './user-consent-option.interface'; +export * from './user-management-login-request.interface'; +export * from './user-object.interface'; diff --git a/src/connect/interfaces/new-connect-application-secret.interface.ts b/src/connect/interfaces/new-connect-application-secret.interface.ts new file mode 100644 index 000000000..3064fd13d --- /dev/null +++ b/src/connect/interfaces/new-connect-application-secret.interface.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface NewConnectApplicationSecret { + /** Distinguishes the connect application secret object. */ + object: 'connect_application_secret'; + /** The unique ID of the client secret. */ + id: string; + /** A hint showing the last few characters of the secret value. */ + secretHint: string; + /** The timestamp when the client secret was last used, or null if never used. */ + lastUsedAt: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + /** The plaintext secret value. Only returned at creation time and cannot be retrieved later. */ + secret: string; +} + +export interface NewConnectApplicationSecretResponse { + object: 'connect_application_secret'; + id: string; + secret_hint: string; + last_used_at: string | null; + created_at: string; + updated_at: string; + secret: string; +} diff --git a/src/connect/interfaces/redirect-uri-input.interface.ts b/src/connect/interfaces/redirect-uri-input.interface.ts new file mode 100644 index 000000000..e6e57595b --- /dev/null +++ b/src/connect/interfaces/redirect-uri-input.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface RedirectUriInput { + /** The redirect URI. */ + uri: string; + /** Whether this is the default redirect URI. */ + default?: boolean | null; +} + +export interface RedirectUriInputResponse { + uri: string; + default?: boolean | null; +} diff --git a/src/connect/interfaces/update-oauth-application.interface.ts b/src/connect/interfaces/update-oauth-application.interface.ts new file mode 100644 index 000000000..041828cab --- /dev/null +++ b/src/connect/interfaces/update-oauth-application.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RedirectUriInput, + RedirectUriInputResponse, +} from './redirect-uri-input.interface'; + +export interface UpdateOAuthApplication { + /** The name of the application. */ + name?: string; + /** A description for the application. */ + description?: string | null; + /** The OAuth scopes granted to the application. */ + scopes?: string[] | null; + /** Updated redirect URIs for the application. OAuth applications only. */ + redirectUris?: RedirectUriInput[] | null; +} + +export interface UpdateOAuthApplicationResponse { + name?: string; + description?: string | null; + scopes?: string[] | null; + redirect_uris?: RedirectUriInputResponse[] | null; +} diff --git a/src/connect/interfaces/user-consent-option-choice.interface.ts b/src/connect/interfaces/user-consent-option-choice.interface.ts new file mode 100644 index 000000000..0e5ef7d54 --- /dev/null +++ b/src/connect/interfaces/user-consent-option-choice.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface UserConsentOptionChoice { + /** The value of this choice. */ + value?: string; + /** A human-readable label for this choice. */ + label?: string; +} + +export interface UserConsentOptionChoiceResponse { + value?: string; + label?: string; +} diff --git a/src/connect/interfaces/user-consent-option.interface.ts b/src/connect/interfaces/user-consent-option.interface.ts new file mode 100644 index 000000000..1a9690b17 --- /dev/null +++ b/src/connect/interfaces/user-consent-option.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserConsentOptionChoice, + UserConsentOptionChoiceResponse, +} from './user-consent-option-choice.interface'; + +export interface UserConsentOption { + /** The claim name for this consent option. */ + claim: string; + /** The type of consent option. */ + type: 'enum'; + /** A human-readable label for this consent option. */ + label: string; + /** The available choices for this consent option. */ + choices: UserConsentOptionChoice[]; +} + +export interface UserConsentOptionResponse { + claim: string; + type: 'enum'; + label: string; + choices: UserConsentOptionChoiceResponse[]; +} diff --git a/src/connect/interfaces/user-management-login-request.interface.ts b/src/connect/interfaces/user-management-login-request.interface.ts new file mode 100644 index 000000000..8f37d4c9d --- /dev/null +++ b/src/connect/interfaces/user-management-login-request.interface.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { UserObject, UserObjectResponse } from './user-object.interface'; +import type { + UserConsentOption, + UserConsentOptionResponse, +} from './user-consent-option.interface'; + +export interface UserManagementLoginRequest { + /** Identifier provided when AuthKit redirected to your login page. */ + externalAuthId: string; + /** The user to create or update in AuthKit. */ + user: UserObject; + /** Array of [User Consent Options](https://workos.com/docs/reference/workos-connect/standalone/user-consent-options) to store with the session. */ + userConsentOptions?: UserConsentOption[]; +} + +export interface UserManagementLoginRequestResponse { + external_auth_id: string; + user: UserObjectResponse; + user_consent_options?: UserConsentOptionResponse[]; +} diff --git a/src/connect/interfaces/user-object.interface.ts b/src/connect/interfaces/user-object.interface.ts new file mode 100644 index 000000000..c28a23e2d --- /dev/null +++ b/src/connect/interfaces/user-object.interface.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface UserObject { + /** Your application's user identifier, which will be stored as an [`external_id`](https://workos.com/docs/authkit/metadata/external-identifiers). Used for upserting and deduplication. */ + id: string; + /** The user's email address. */ + email: string; + /** The user's first name. */ + firstName?: string; + /** The user's last name. */ + lastName?: string; + /** A set of key-value pairs to attach to the user. */ + metadata?: Record; +} + +export interface UserObjectResponse { + id: string; + email: string; + first_name?: string; + last_name?: string; + metadata?: Record; +} diff --git a/src/connect/serializers/application-credentials-list-item.serializer.ts b/src/connect/serializers/application-credentials-list-item.serializer.ts new file mode 100644 index 000000000..0c6dd084f --- /dev/null +++ b/src/connect/serializers/application-credentials-list-item.serializer.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApplicationCredentialsListItem, + ApplicationCredentialsListItemResponse, +} from '../interfaces/application-credentials-list-item.interface'; + +export const deserializeApplicationCredentialsListItem = ( + response: ApplicationCredentialsListItemResponse, +): ApplicationCredentialsListItem => ({ + object: response.object, + id: response.id, + secretHint: response.secret_hint, + lastUsedAt: response.last_used_at ?? null, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeApplicationCredentialsListItem = ( + model: ApplicationCredentialsListItem, +): ApplicationCredentialsListItemResponse => ({ + object: model.object, + id: model.id, + secret_hint: model.secretHint, + last_used_at: model.lastUsedAt, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/connect/serializers/connect-application.serializer.ts b/src/connect/serializers/connect-application.serializer.ts new file mode 100644 index 000000000..0319d485c --- /dev/null +++ b/src/connect/serializers/connect-application.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectApplication, + ConnectApplicationResponse, +} from '../interfaces/connect-application.interface'; + +export const deserializeConnectApplication = ( + response: ConnectApplicationResponse, +): ConnectApplication => ({ + object: response.object, + id: response.id, + clientId: response.client_id, + description: response.description ?? null, + name: response.name, + scopes: response.scopes, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeConnectApplication = ( + model: ConnectApplication, +): ConnectApplicationResponse => ({ + object: model.object, + id: model.id, + client_id: model.clientId, + description: model.description, + name: model.name, + scopes: model.scopes, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/connect/serializers/create-application-secret.serializer.ts b/src/connect/serializers/create-application-secret.serializer.ts new file mode 100644 index 000000000..d55dad86e --- /dev/null +++ b/src/connect/serializers/create-application-secret.serializer.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateApplicationSecret, + CreateApplicationSecretResponse, +} from '../interfaces/create-application-secret.interface'; + +export const deserializeCreateApplicationSecret = ( + _response: CreateApplicationSecretResponse, +): CreateApplicationSecret => ({}); + +export const serializeCreateApplicationSecret = ( + _model: CreateApplicationSecret, +): CreateApplicationSecretResponse => ({}); diff --git a/src/connect/serializers/create-m2m-application.serializer.ts b/src/connect/serializers/create-m2m-application.serializer.ts new file mode 100644 index 000000000..6b219da6d --- /dev/null +++ b/src/connect/serializers/create-m2m-application.serializer.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateM2MApplication, + CreateM2MApplicationResponse, +} from '../interfaces/create-m2m-application.interface'; + +export const deserializeCreateM2MApplication = ( + response: CreateM2MApplicationResponse, +): CreateM2MApplication => ({ + name: response.name, + applicationType: response.application_type, + description: response.description ?? null, + scopes: response.scopes ?? null, + organizationId: response.organization_id, +}); + +export const serializeCreateM2MApplication = ( + model: CreateM2MApplication, +): CreateM2MApplicationResponse => ({ + name: model.name, + application_type: model.applicationType, + description: model.description ?? null, + scopes: model.scopes ?? null, + organization_id: model.organizationId, +}); diff --git a/src/connect/serializers/create-oauth-application.serializer.ts b/src/connect/serializers/create-oauth-application.serializer.ts new file mode 100644 index 000000000..3ff4ff14c --- /dev/null +++ b/src/connect/serializers/create-oauth-application.serializer.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateOAuthApplication, + CreateOAuthApplicationResponse, +} from '../interfaces/create-oauth-application.interface'; +import { + deserializeRedirectUriInput, + serializeRedirectUriInput, +} from './redirect-uri-input.serializer'; + +export const deserializeCreateOAuthApplication = ( + response: CreateOAuthApplicationResponse, +): CreateOAuthApplication => ({ + name: response.name, + applicationType: response.application_type, + description: response.description ?? null, + scopes: response.scopes ?? null, + redirectUris: + response.redirect_uris != null + ? response.redirect_uris.map(deserializeRedirectUriInput) + : null, + usesPkce: response.uses_pkce ?? null, + isFirstParty: response.is_first_party, + organizationId: response.organization_id ?? null, +}); + +export const serializeCreateOAuthApplication = ( + model: CreateOAuthApplication, +): CreateOAuthApplicationResponse => ({ + name: model.name, + application_type: model.applicationType, + description: model.description ?? null, + scopes: model.scopes ?? null, + redirect_uris: + model.redirectUris != null + ? model.redirectUris.map(serializeRedirectUriInput) + : null, + uses_pkce: model.usesPkce ?? null, + is_first_party: model.isFirstParty, + organization_id: model.organizationId ?? null, +}); diff --git a/src/connect/serializers/external-auth-complete-response.serializer.ts b/src/connect/serializers/external-auth-complete-response.serializer.ts new file mode 100644 index 000000000..c74e57d5c --- /dev/null +++ b/src/connect/serializers/external-auth-complete-response.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ExternalAuthCompleteResponse, + ExternalAuthCompleteResponseWire, +} from '../interfaces/external-auth-complete-response.interface'; + +export const deserializeExternalAuthCompleteResponse = ( + response: ExternalAuthCompleteResponseWire, +): ExternalAuthCompleteResponse => ({ + redirectUri: response.redirect_uri, +}); + +export const serializeExternalAuthCompleteResponse = ( + model: ExternalAuthCompleteResponse, +): ExternalAuthCompleteResponseWire => ({ + redirect_uri: model.redirectUri, +}); diff --git a/src/connect/serializers/new-connect-application-secret.serializer.ts b/src/connect/serializers/new-connect-application-secret.serializer.ts new file mode 100644 index 000000000..c1b6fbb36 --- /dev/null +++ b/src/connect/serializers/new-connect-application-secret.serializer.ts @@ -0,0 +1,30 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + NewConnectApplicationSecret, + NewConnectApplicationSecretResponse, +} from '../interfaces/new-connect-application-secret.interface'; + +export const deserializeNewConnectApplicationSecret = ( + response: NewConnectApplicationSecretResponse, +): NewConnectApplicationSecret => ({ + object: response.object, + id: response.id, + secretHint: response.secret_hint, + lastUsedAt: response.last_used_at ?? null, + createdAt: response.created_at, + updatedAt: response.updated_at, + secret: response.secret, +}); + +export const serializeNewConnectApplicationSecret = ( + model: NewConnectApplicationSecret, +): NewConnectApplicationSecretResponse => ({ + object: model.object, + id: model.id, + secret_hint: model.secretHint, + last_used_at: model.lastUsedAt, + created_at: model.createdAt, + updated_at: model.updatedAt, + secret: model.secret, +}); diff --git a/src/connect/serializers/redirect-uri-input.serializer.ts b/src/connect/serializers/redirect-uri-input.serializer.ts new file mode 100644 index 000000000..1135cb65b --- /dev/null +++ b/src/connect/serializers/redirect-uri-input.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RedirectUriInput, + RedirectUriInputResponse, +} from '../interfaces/redirect-uri-input.interface'; + +export const deserializeRedirectUriInput = ( + response: RedirectUriInputResponse, +): RedirectUriInput => ({ + uri: response.uri, + default: response.default ?? null, +}); + +export const serializeRedirectUriInput = ( + model: RedirectUriInput, +): RedirectUriInputResponse => ({ + uri: model.uri, + default: model.default ?? null, +}); diff --git a/src/connect/serializers/update-oauth-application.serializer.ts b/src/connect/serializers/update-oauth-application.serializer.ts new file mode 100644 index 000000000..1d6121314 --- /dev/null +++ b/src/connect/serializers/update-oauth-application.serializer.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateOAuthApplication, + UpdateOAuthApplicationResponse, +} from '../interfaces/update-oauth-application.interface'; +import { + deserializeRedirectUriInput, + serializeRedirectUriInput, +} from './redirect-uri-input.serializer'; + +export const deserializeUpdateOAuthApplication = ( + response: UpdateOAuthApplicationResponse, +): UpdateOAuthApplication => ({ + name: response.name, + description: response.description ?? null, + scopes: response.scopes ?? null, + redirectUris: + response.redirect_uris != null + ? response.redirect_uris.map(deserializeRedirectUriInput) + : null, +}); + +export const serializeUpdateOAuthApplication = ( + model: UpdateOAuthApplication, +): UpdateOAuthApplicationResponse => ({ + name: model.name, + description: model.description ?? null, + scopes: model.scopes ?? null, + redirect_uris: + model.redirectUris != null + ? model.redirectUris.map(serializeRedirectUriInput) + : null, +}); diff --git a/src/connect/serializers/user-consent-option-choice.serializer.ts b/src/connect/serializers/user-consent-option-choice.serializer.ts new file mode 100644 index 000000000..9933a0a18 --- /dev/null +++ b/src/connect/serializers/user-consent-option-choice.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserConsentOptionChoice, + UserConsentOptionChoiceResponse, +} from '../interfaces/user-consent-option-choice.interface'; + +export const deserializeUserConsentOptionChoice = ( + response: UserConsentOptionChoiceResponse, +): UserConsentOptionChoice => ({ + value: response.value, + label: response.label, +}); + +export const serializeUserConsentOptionChoice = ( + model: UserConsentOptionChoice, +): UserConsentOptionChoiceResponse => ({ + value: model.value, + label: model.label, +}); diff --git a/src/connect/serializers/user-consent-option.serializer.ts b/src/connect/serializers/user-consent-option.serializer.ts new file mode 100644 index 000000000..61c03031e --- /dev/null +++ b/src/connect/serializers/user-consent-option.serializer.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserConsentOption, + UserConsentOptionResponse, +} from '../interfaces/user-consent-option.interface'; +import { + deserializeUserConsentOptionChoice, + serializeUserConsentOptionChoice, +} from './user-consent-option-choice.serializer'; + +export const deserializeUserConsentOption = ( + response: UserConsentOptionResponse, +): UserConsentOption => ({ + claim: response.claim, + type: response.type, + label: response.label, + choices: response.choices.map(deserializeUserConsentOptionChoice), +}); + +export const serializeUserConsentOption = ( + model: UserConsentOption, +): UserConsentOptionResponse => ({ + claim: model.claim, + type: model.type, + label: model.label, + choices: model.choices.map(serializeUserConsentOptionChoice), +}); diff --git a/src/connect/serializers/user-management-login-request.serializer.ts b/src/connect/serializers/user-management-login-request.serializer.ts new file mode 100644 index 000000000..81c5b7864 --- /dev/null +++ b/src/connect/serializers/user-management-login-request.serializer.ts @@ -0,0 +1,36 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserManagementLoginRequest, + UserManagementLoginRequestResponse, +} from '../interfaces/user-management-login-request.interface'; +import { + deserializeUserObject, + serializeUserObject, +} from './user-object.serializer'; +import { + deserializeUserConsentOption, + serializeUserConsentOption, +} from './user-consent-option.serializer'; + +export const deserializeUserManagementLoginRequest = ( + response: UserManagementLoginRequestResponse, +): UserManagementLoginRequest => ({ + externalAuthId: response.external_auth_id, + user: deserializeUserObject(response.user), + userConsentOptions: + response.user_consent_options != null + ? response.user_consent_options.map(deserializeUserConsentOption) + : undefined, +}); + +export const serializeUserManagementLoginRequest = ( + model: UserManagementLoginRequest, +): UserManagementLoginRequestResponse => ({ + external_auth_id: model.externalAuthId, + user: serializeUserObject(model.user), + user_consent_options: + model.userConsentOptions != null + ? model.userConsentOptions.map(serializeUserConsentOption) + : undefined, +}); diff --git a/src/connect/serializers/user-object.serializer.ts b/src/connect/serializers/user-object.serializer.ts new file mode 100644 index 000000000..94dbd1409 --- /dev/null +++ b/src/connect/serializers/user-object.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserObject, + UserObjectResponse, +} from '../interfaces/user-object.interface'; + +export const deserializeUserObject = ( + response: UserObjectResponse, +): UserObject => ({ + id: response.id, + email: response.email, + firstName: response.first_name, + lastName: response.last_name, + metadata: response.metadata, +}); + +export const serializeUserObject = (model: UserObject): UserObjectResponse => ({ + id: model.id, + email: model.email, + first_name: model.firstName, + last_name: model.lastName, + metadata: model.metadata, +}); diff --git a/src/directory-sync/directory-sync.ts b/src/directory-sync/directory-sync.ts index fe3110fe7..9ecdb6b46 100644 --- a/src/directory-sync/directory-sync.ts +++ b/src/directory-sync/directory-sync.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { WorkOS } from '../workos'; import { AutoPaginatable } from '../common/utils/pagination'; import { @@ -20,10 +22,20 @@ import { serializeListDirectoriesOptions, } from './serializers'; import { fetchAndDeserialize } from '../common/utils/fetch-and-deserialize'; +import type { PaginationOptions } from '../common/interfaces/pagination-options.interface'; export class DirectorySync { constructor(private readonly workos: WorkOS) {} + /** + * List Directories + * + * Get a list of all of your existing directories matching the criteria specified. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {AuthorizationException} 403 + * @throws {UnprocessableEntityException} 422 + */ async listDirectories( options?: ListDirectoriesOptions, ): Promise> { @@ -45,6 +57,16 @@ export class DirectorySync { ); } + /** + * Get a Directory + * + * Get the details of an existing directory. + * @param id - Unique identifier for the Directory. + * @example "directory_01ECAZ4NV9QMV47GW873HDCX74" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async getDirectory(id: string): Promise { const { data } = await this.workos.get( `/directories/${id}`, @@ -53,10 +75,29 @@ export class DirectorySync { return deserializeDirectory(data); } + /** + * Delete a Directory + * + * Permanently deletes an existing directory. It cannot be undone. + * @param id - Unique identifier for the Directory. + * @example "directory_01ECAZ4NV9QMV47GW873HDCX74" + * @returns {Promise} + * @throws {AuthorizationException} 403 + */ async deleteDirectory(id: string) { await this.workos.delete(`/directories/${id}`); } + /** + * List Directory Groups + * + * Get a list of all of existing directory groups matching the criteria specified. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async listGroups( options: ListDirectoryGroupsOptions, ): Promise> { @@ -78,6 +119,17 @@ export class DirectorySync { ); } + /** + * List Directory Users + * + * Get a list of all of existing Directory Users matching the criteria specified. + * @param options - Pagination and filter options. + * @returns {Promise, ListDirectoryUsersOptions>>} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + * @throws {RateLimitExceededException} 429 + */ async listUsers( options: ListDirectoryUsersOptions, ): Promise< @@ -110,6 +162,14 @@ export class DirectorySync { ); } + /** + * Get a Directory User + * + * Get the details of an existing Directory User. + * @returns {Promise>} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async getUser( user: string, ): Promise> { @@ -120,6 +180,14 @@ export class DirectorySync { return deserializeDirectoryUserWithGroups(data); } + /** + * Get a Directory Group + * + * Get the details of an existing Directory Group. + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async getGroup(group: string): Promise { const { data } = await this.workos.get( `/directory_groups/${group}`, @@ -128,3 +196,17 @@ export class DirectorySync { return deserializeDirectoryGroup(data); } } + +export interface ListGroupsOptions extends PaginationOptions { + /** Unique identifier of the WorkOS Directory. This value can be obtained from the WorkOS dashboard or from the WorkOS API. */ + directory?: string; + /** Unique identifier of the WorkOS Directory User. This value can be obtained from the WorkOS API. */ + user?: string; +} + +export interface ListUsersOptions extends PaginationOptions { + /** Unique identifier of the WorkOS Directory. This value can be obtained from the WorkOS dashboard or from the WorkOS API. */ + directory?: string; + /** Unique identifier of the WorkOS Directory Group. This value can be obtained from the WorkOS API. */ + group?: string; +} diff --git a/src/directory-sync/interfaces/directories-order.interface.ts b/src/directory-sync/interfaces/directories-order.interface.ts new file mode 100644 index 000000000..dfe9930ed --- /dev/null +++ b/src/directory-sync/interfaces/directories-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DirectoriesOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/directory-sync/interfaces/directory-group.interface.ts b/src/directory-sync/interfaces/directory-group.interface.ts index 4a320f6f6..2cc805e61 100644 --- a/src/directory-sync/interfaces/directory-group.interface.ts +++ b/src/directory-sync/interfaces/directory-group.interface.ts @@ -1,12 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + export interface DirectoryGroup { + /** Unique identifier for the Directory Group. */ id: string; + /** Unique identifier for the group, assigned by the Directory Provider. Different Directory Providers use different ID formats. */ idpId: string; + /** The identifier of the Directory the Directory Group belongs to. */ directoryId: string; + /** The identifier for the Organization in which the Directory resides. */ organizationId: string | null; + /** The name of the Directory Group. */ name: string; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; + /** The raw attributes received from the directory provider. */ rawAttributes: any; + /** Distinguishes the Directory Group object. */ + object?: 'directory_group'; } export interface DirectoryGroupResponse { @@ -18,4 +30,5 @@ export interface DirectoryGroupResponse { created_at: string; updated_at: string; raw_attributes: any; + object?: 'directory_group'; } diff --git a/src/directory-sync/interfaces/directory-groups-order.interface.ts b/src/directory-sync/interfaces/directory-groups-order.interface.ts new file mode 100644 index 000000000..0879dc522 --- /dev/null +++ b/src/directory-sync/interfaces/directory-groups-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DirectoryGroupsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/directory-sync/interfaces/directory-metadata-user.interface.ts b/src/directory-sync/interfaces/directory-metadata-user.interface.ts new file mode 100644 index 000000000..ab57b1dd1 --- /dev/null +++ b/src/directory-sync/interfaces/directory-metadata-user.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +/** Counts of active and inactive directory users. */ +export interface DirectoryMetadataUser { + /** Count of active directory users. */ + active: number; + /** Count of inactive directory users. */ + inactive: number; +} + +export interface DirectoryMetadataUserResponse { + active: number; + inactive: number; +} diff --git a/src/directory-sync/interfaces/directory-metadata.interface.ts b/src/directory-sync/interfaces/directory-metadata.interface.ts new file mode 100644 index 000000000..1f6437afe --- /dev/null +++ b/src/directory-sync/interfaces/directory-metadata.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryMetadataUser, + DirectoryMetadataUserResponse, +} from './directory-metadata-user.interface'; + +/** Aggregate counts of directory users and groups synced from the provider. */ +export interface DirectoryMetadata { + /** Counts of active and inactive directory users. */ + users: DirectoryMetadataUser; + /** Count of directory groups. */ + groups: number; +} + +export interface DirectoryMetadataResponse { + users: DirectoryMetadataUserResponse; + groups: number; +} diff --git a/src/directory-sync/interfaces/directory-user-with-groups-email.interface.ts b/src/directory-sync/interfaces/directory-user-with-groups-email.interface.ts new file mode 100644 index 000000000..2f088dea7 --- /dev/null +++ b/src/directory-sync/interfaces/directory-user-with-groups-email.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface DirectoryUserWithGroupsEmail { + /** Whether this is the primary email address. */ + primary?: boolean; + /** The type of email address. */ + type?: string; + /** The email address value. */ + value?: string | null; +} + +export interface DirectoryUserWithGroupsEmailResponse { + primary?: boolean; + type?: string; + value?: string | null; +} diff --git a/src/directory-sync/interfaces/directory-user-with-groups.interface.ts b/src/directory-sync/interfaces/directory-user-with-groups.interface.ts new file mode 100644 index 000000000..f556ee557 --- /dev/null +++ b/src/directory-sync/interfaces/directory-user-with-groups.interface.ts @@ -0,0 +1,88 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryUserWithGroupsEmail, + DirectoryUserWithGroupsEmailResponse, +} from './directory-user-with-groups-email.interface'; +import type { SlimRoleResponse } from '../../authorization/interfaces/slim-role.interface'; +import type { + DirectoryGroup, + DirectoryGroupResponse, +} from './directory-group.interface'; + +type RoleResponse = SlimRoleResponse; + +export interface DirectoryUserWithGroups { + /** Distinguishes the Directory User object. */ + object: 'directory_user'; + /** Unique identifier for the Directory User. */ + id: string; + /** The identifier of the Directory the Directory User belongs to. */ + directoryId: string; + /** The identifier for the Organization in which the Directory resides. */ + organizationId: string | null; + /** Unique identifier for the user, assigned by the Directory Provider. Different Directory Providers use different ID formats. */ + idpId: string; + /** The email address of the user. */ + email: string | null; + /** The first name of the user. */ + firstName?: string | null; + /** The last name of the user. */ + lastName?: string | null; + /** + * A list of email addresses for the user. + * @deprecated + */ + emails?: DirectoryUserWithGroupsEmail[]; + /** + * The job title of the user. + * @deprecated + */ + jobTitle?: string | null; + /** + * The username of the user. + * @deprecated + */ + username?: string | null; + /** The state of the user. */ + state: 'active' | 'inactive'; + /** + * The raw attributes received from the directory provider. + * @deprecated + */ + rawAttributes: any; + /** An object containing the custom attribute mapping for the Directory Provider. */ + customAttributes: Record; + /** The primary role assigned to the user. */ + role?: RoleResponse; + /** All roles assigned to the user. */ + roles?: RoleResponse[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + /** The directory groups the user belongs to. */ + groups: DirectoryGroup[]; +} + +export interface DirectoryUserWithGroupsResponse { + object: 'directory_user'; + id: string; + directory_id: string; + organization_id: string | null; + idp_id: string; + email: string | null; + first_name?: string | null; + last_name?: string | null; + emails?: DirectoryUserWithGroupsEmailResponse[]; + job_title?: string | null; + username?: string | null; + state: 'active' | 'inactive'; + raw_attributes: any; + custom_attributes: Record; + role?: RoleResponse; + roles?: RoleResponse[]; + created_at: string; + updated_at: string; + groups: DirectoryGroupResponse[]; +} diff --git a/src/directory-sync/interfaces/directory-users-order.interface.ts b/src/directory-sync/interfaces/directory-users-order.interface.ts new file mode 100644 index 000000000..714ca37bd --- /dev/null +++ b/src/directory-sync/interfaces/directory-users-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DirectoryUsersOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/directory-sync/interfaces/directory.interface.ts b/src/directory-sync/interfaces/directory.interface.ts index 19f450bb3..e79ea1ce2 100644 --- a/src/directory-sync/interfaces/directory.interface.ts +++ b/src/directory-sync/interfaces/directory.interface.ts @@ -1,3 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryMetadata, + DirectoryMetadataResponse, +} from './directory-metadata.interface'; export type DirectoryType = | 'azure scim v2.0' | 'bamboohr' @@ -34,16 +40,28 @@ export type DirectoryStateResponse = | 'validating'; export interface Directory { + /** Distinguishes the Directory object. */ object: 'directory'; + /** Unique identifier for the Directory. */ id: string; + /** The URL associated with an Enterprise Client. */ domain: string; + /** External Key for the Directory. */ externalKey: string; + /** The name of the directory. */ name: string; + /** The unique identifier for the Organization in which the directory resides. */ organizationId?: string; + /** Describes whether the Directory has been successfully connected to an external provider. */ state: DirectoryState; + /** The type of external Directory Provider integrated with. */ type: DirectoryType; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; + /** Aggregate counts of directory users and groups synced from the provider. */ + metadata?: DirectoryMetadata; } export interface DirectoryResponse { @@ -57,6 +75,7 @@ export interface DirectoryResponse { type: DirectoryType; created_at: string; updated_at: string; + metadata?: DirectoryMetadataResponse; } interface EventDirectoryDomain { object: 'organization_domain'; diff --git a/src/directory-sync/interfaces/index.ts b/src/directory-sync/interfaces/index.ts index 344c60f45..7a9ad79c5 100644 --- a/src/directory-sync/interfaces/index.ts +++ b/src/directory-sync/interfaces/index.ts @@ -1,6 +1,14 @@ -export * from './directory.interface'; +// This file is auto-generated by oagen. Do not edit. + +export * from './directories-order.interface'; export * from './directory-group.interface'; +export * from './directory-groups-order.interface'; +export * from './directory-metadata-user.interface'; +export * from './directory-metadata.interface'; +export * from './directory-user-with-groups-email.interface'; +export * from './directory-user.interface'; +export * from './directory-users-order.interface'; +export * from './directory.interface'; export * from './list-directories-options.interface'; -export * from './list-groups-options.interface'; export * from './list-directory-users-options.interface'; -export * from './directory-user.interface'; +export * from './list-groups-options.interface'; diff --git a/src/directory-sync/serializers/directory-group.serializer.ts b/src/directory-sync/serializers/directory-group.serializer.ts index 1ffe7489a..adcf26107 100644 --- a/src/directory-sync/serializers/directory-group.serializer.ts +++ b/src/directory-sync/serializers/directory-group.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { DirectoryGroup, DirectoryGroupResponse } from '../interfaces'; export const deserializeDirectoryGroup = ( @@ -26,3 +28,17 @@ export const deserializeUpdatedEventDirectoryGroup = ( rawAttributes: directoryGroup.raw_attributes, previousAttributes: directoryGroup.previous_attributes, }); + +export const serializeDirectoryGroup = ( + model: DirectoryGroup, +): DirectoryGroupResponse => ({ + object: model.object!, + id: model.id, + idp_id: model.idpId, + directory_id: model.directoryId, + organization_id: model.organizationId, + name: model.name, + raw_attributes: model.rawAttributes!, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/directory-sync/serializers/directory-metadata-user.serializer.ts b/src/directory-sync/serializers/directory-metadata-user.serializer.ts new file mode 100644 index 000000000..1bf590f6d --- /dev/null +++ b/src/directory-sync/serializers/directory-metadata-user.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryMetadataUser, + DirectoryMetadataUserResponse, +} from '../interfaces/directory-metadata-user.interface'; + +export const deserializeDirectoryMetadataUser = ( + response: DirectoryMetadataUserResponse, +): DirectoryMetadataUser => ({ + active: response.active, + inactive: response.inactive, +}); + +export const serializeDirectoryMetadataUser = ( + model: DirectoryMetadataUser, +): DirectoryMetadataUserResponse => ({ + active: model.active, + inactive: model.inactive, +}); diff --git a/src/directory-sync/serializers/directory-metadata.serializer.ts b/src/directory-sync/serializers/directory-metadata.serializer.ts new file mode 100644 index 000000000..255936de2 --- /dev/null +++ b/src/directory-sync/serializers/directory-metadata.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryMetadata, + DirectoryMetadataResponse, +} from '../interfaces/directory-metadata.interface'; +import { + deserializeDirectoryMetadataUser, + serializeDirectoryMetadataUser, +} from './directory-metadata-user.serializer'; + +export const deserializeDirectoryMetadata = ( + response: DirectoryMetadataResponse, +): DirectoryMetadata => ({ + users: deserializeDirectoryMetadataUser(response.users), + groups: response.groups, +}); + +export const serializeDirectoryMetadata = ( + model: DirectoryMetadata, +): DirectoryMetadataResponse => ({ + users: serializeDirectoryMetadataUser(model.users), + groups: model.groups, +}); diff --git a/src/directory-sync/serializers/directory-user-with-groups-email.serializer.ts b/src/directory-sync/serializers/directory-user-with-groups-email.serializer.ts new file mode 100644 index 000000000..54cbf2254 --- /dev/null +++ b/src/directory-sync/serializers/directory-user-with-groups-email.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryUserWithGroupsEmail, + DirectoryUserWithGroupsEmailResponse, +} from '../interfaces/directory-user-with-groups-email.interface'; + +export const deserializeDirectoryUserWithGroupsEmail = ( + response: DirectoryUserWithGroupsEmailResponse, +): DirectoryUserWithGroupsEmail => ({ + primary: response.primary, + type: response.type, + value: response.value ?? null, +}); + +export const serializeDirectoryUserWithGroupsEmail = ( + model: DirectoryUserWithGroupsEmail, +): DirectoryUserWithGroupsEmailResponse => ({ + primary: model.primary, + type: model.type, + value: model.value ?? null, +}); diff --git a/src/directory-sync/serializers/directory-user-with-groups.serializer.ts b/src/directory-sync/serializers/directory-user-with-groups.serializer.ts new file mode 100644 index 000000000..6dadb1dba --- /dev/null +++ b/src/directory-sync/serializers/directory-user-with-groups.serializer.ts @@ -0,0 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DirectoryUserWithGroups, + DirectoryUserWithGroupsResponse, +} from '../interfaces/directory-user-with-groups.interface'; +import { deserializeDirectoryUserWithGroupsEmail } from './directory-user-with-groups-email.serializer'; +import { deserializeSlimRole } from '../../authorization/serializers/slim-role.serializer'; +import { deserializeDirectoryGroup } from './directory-group.serializer'; + +export const deserializeDirectoryUserWithGroups = ( + response: DirectoryUserWithGroupsResponse, +): DirectoryUserWithGroups => ({ + object: response.object, + id: response.id, + directoryId: response.directory_id, + organizationId: response.organization_id, + idpId: response.idp_id, + email: response.email ?? null, + firstName: response.first_name ?? null, + lastName: response.last_name ?? null, + emails: + response.emails != null + ? response.emails.map(deserializeDirectoryUserWithGroupsEmail) + : undefined, + jobTitle: response.job_title ?? null, + username: response.username ?? null, + state: response.state, + rawAttributes: response.raw_attributes, + customAttributes: response.custom_attributes, + role: response.role != null ? deserializeSlimRole(response.role) : undefined, + roles: + response.roles != null + ? response.roles.map(deserializeSlimRole) + : undefined, + createdAt: response.created_at, + updatedAt: response.updated_at, + groups: response.groups.map(deserializeDirectoryGroup), +}); diff --git a/src/directory-sync/serializers/directory.serializer.ts b/src/directory-sync/serializers/directory.serializer.ts index 91eb45ff6..4361846f3 100644 --- a/src/directory-sync/serializers/directory.serializer.ts +++ b/src/directory-sync/serializers/directory.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { Directory, DirectoryResponse, @@ -6,6 +8,7 @@ import { EventDirectory, EventDirectoryResponse, } from '../interfaces'; +import { serializeDirectoryMetadata } from './directory-metadata.serializer'; export const deserializeDirectory = ( directory: DirectoryResponse, @@ -63,3 +66,20 @@ export const deserializeDeletedEventDirectory = ( createdAt: directory.created_at, updatedAt: directory.updated_at, }); + +export const serializeDirectory = (model: Directory): DirectoryResponse => ({ + object: model.object, + id: model.id, + organization_id: model.organizationId, + external_key: model.externalKey, + type: model.type, + state: model.state as DirectoryStateResponse, + name: model.name, + domain: model.domain!, + metadata: + model.metadata != null + ? serializeDirectoryMetadata(model.metadata) + : undefined, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/events/events.ts b/src/events/events.ts index 22228efcd..7cd143bd4 100644 --- a/src/events/events.ts +++ b/src/events/events.ts @@ -1,12 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + import { WorkOS } from '../workos'; import { ListEventOptions } from './interfaces'; import { deserializeEvent, deserializeList } from '../common/serializers'; import { serializeListEventOptions } from './serializers'; import { Event, EventResponse, List, ListResponse } from '../common/interfaces'; +import type { PaginationOptions } from '../common/interfaces/pagination-options.interface'; export class Events { constructor(private readonly workos: WorkOS) {} + /** + * List events + * + * List events for the current environment. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {BadRequestException} 400 + * @throws {UnprocessableEntityException} 422 + */ async listEvents(options: ListEventOptions): Promise> { const { data } = await this.workos.get>( `/events`, @@ -18,3 +30,14 @@ export class Events { return deserializeList(data, deserializeEvent); } } + +export interface ListEventsOptions extends PaginationOptions { + /** Filter events by one or more event types (e.g. `dsync.user.created`). */ + events?: string[]; + /** ISO-8601 date string to filter events created after this date. */ + rangeStart?: string; + /** ISO-8601 date string to filter events created before this date. */ + rangeEnd?: string; + /** Filter events by the [Organization](https://workos.com/docs/reference/organization) that the event is associated with. */ + organizationId?: string; +} diff --git a/src/events/interfaces/event-list-list-metadata.interface.ts b/src/events/interfaces/event-list-list-metadata.interface.ts new file mode 100644 index 000000000..3c7715192 --- /dev/null +++ b/src/events/interfaces/event-list-list-metadata.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +/** Pagination cursor for navigating to the next page of results. */ +export interface EventListListMetadata { + /** An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. */ + after: string | null; +} + +export interface EventListListMetadataResponse { + after: string | null; +} diff --git a/src/events/interfaces/event-schema.interface.ts b/src/events/interfaces/event-schema.interface.ts new file mode 100644 index 000000000..2cebbb743 --- /dev/null +++ b/src/events/interfaces/event-schema.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +/** An event emitted by WorkOS. */ +export interface EventSchema { + /** Distinguishes the Event object. */ + object: 'event'; + /** Unique identifier for the Event. */ + id: string; + /** The type of event that occurred. */ + event: string; + /** The event payload. */ + data: Record; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: Record; +} + +export interface EventSchemaResponse { + object: 'event'; + id: string; + event: string; + data: Record; + created_at: string; + context?: Record; +} diff --git a/src/events/interfaces/event.interface.ts b/src/events/interfaces/event.interface.ts new file mode 100644 index 000000000..ef97e3ddc --- /dev/null +++ b/src/events/interfaces/event.interface.ts @@ -0,0 +1,25 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface Event { + /** Distinguishes the Event object. */ + object: 'event'; + /** Unique identifier for the Event. */ + id: string; + /** The type of event that occurred. */ + event: string; + /** The event payload. */ + data: Record; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** Additional context about the event. */ + context?: Record; +} + +export interface EventResponse { + object: 'event'; + id: string; + event: string; + data: Record; + created_at: string; + context?: Record; +} diff --git a/src/events/interfaces/events-order.interface.ts b/src/events/interfaces/events-order.interface.ts new file mode 100644 index 000000000..7eb85c071 --- /dev/null +++ b/src/events/interfaces/events-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type EventsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/events/interfaces/index.ts b/src/events/interfaces/index.ts index 347b609c7..6be940de9 100644 --- a/src/events/interfaces/index.ts +++ b/src/events/interfaces/index.ts @@ -1 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export * from './event-list-list-metadata.interface'; +export * from './event-schema.interface'; +export * from './events-order.interface'; export * from './list-events-options.interface'; diff --git a/src/events/serializers/event-schema.serializer.ts b/src/events/serializers/event-schema.serializer.ts new file mode 100644 index 000000000..6a01d9a6f --- /dev/null +++ b/src/events/serializers/event-schema.serializer.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + EventSchema, + EventSchemaResponse, +} from '../interfaces/event-schema.interface'; + +export const deserializeEventSchema = ( + response: EventSchemaResponse, +): EventSchema => ({ + object: response.object, + id: response.id, + event: response.event, + data: response.data, + createdAt: response.created_at, + context: response.context, +}); + +export const serializeEventSchema = ( + model: EventSchema, +): EventSchemaResponse => ({ + object: model.object, + id: model.id, + event: model.event, + data: model.data, + created_at: model.createdAt, + context: model.context, +}); diff --git a/src/events/serializers/event.serializer.ts b/src/events/serializers/event.serializer.ts new file mode 100644 index 000000000..151a6a2b8 --- /dev/null +++ b/src/events/serializers/event.serializer.ts @@ -0,0 +1,21 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { Event, EventResponse } from '../interfaces/event.interface'; + +export const deserializeEvent = (response: EventResponse): Event => ({ + object: response.object, + id: response.id, + event: response.event, + data: response.data, + createdAt: response.created_at, + context: response.context, +}); + +export const serializeEvent = (model: Event): EventResponse => ({ + object: model.object, + id: model.id, + event: model.event, + data: model.data, + created_at: model.createdAt, + context: model.context, +}); diff --git a/src/feature-flags/feature-flags.ts b/src/feature-flags/feature-flags.ts index bf124d58d..9929580b2 100644 --- a/src/feature-flags/feature-flags.ts +++ b/src/feature-flags/feature-flags.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { AutoPaginatable } from '../common/utils/pagination'; import { WorkOS } from '../workos'; import { @@ -13,6 +15,16 @@ import { fetchAndDeserialize } from '../common/utils/fetch-and-deserialize'; export class FeatureFlags { constructor(private readonly workos: WorkOS) {} + /** + * List feature flags + * + * Get a list of all of your existing feature flags matching the criteria specified. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async listFeatureFlags( options?: ListFeatureFlagsOptions, ): Promise> { @@ -34,6 +46,15 @@ export class FeatureFlags { ); } + /** + * Get a feature flag + * + * Get the details of an existing feature flag by its slug. + * @param slug - A unique key to reference the Feature Flag. + * @example "advanced-analytics" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getFeatureFlag(slug: string): Promise { const { data } = await this.workos.get( `/feature-flags/${slug}`, @@ -42,6 +63,15 @@ export class FeatureFlags { return deserializeFeatureFlag(data); } + /** + * Enable a feature flag + * + * Enables a feature flag in the current environment. + * @param slug - A unique key to reference the Feature Flag. + * @example "advanced-analytics" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async enableFeatureFlag(slug: string): Promise { const { data } = await this.workos.put( `/feature-flags/${slug}/enable`, @@ -51,6 +81,15 @@ export class FeatureFlags { return deserializeFeatureFlag(data); } + /** + * Disable a feature flag + * + * Disables a feature flag in the current environment. + * @param slug - A unique key to reference the Feature Flag. + * @example "advanced-analytics" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async disableFeatureFlag(slug: string): Promise { const { data } = await this.workos.put( `/feature-flags/${slug}/disable`, @@ -60,11 +99,29 @@ export class FeatureFlags { return deserializeFeatureFlag(data); } + /** + * Add a feature flag target + * + * Enables a feature flag for a specific target in the current environment. Currently, supported targets include users and organizations. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async addFlagTarget(options: AddFlagTargetOptions): Promise { const { slug, targetId } = options; await this.workos.post(`/feature-flags/${slug}/targets/${targetId}`, {}); } + /** + * Remove a feature flag target + * + * Removes a target from the feature flag's target list in the current environment. Currently, supported targets include users and organizations. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async removeFlagTarget(options: RemoveFlagTargetOptions): Promise { const { slug, targetId } = options; await this.workos.delete(`/feature-flags/${slug}/targets/${targetId}`); diff --git a/src/feature-flags/interfaces/feature-flag-owner.interface.ts b/src/feature-flags/interfaces/feature-flag-owner.interface.ts new file mode 100644 index 000000000..5a230d40c --- /dev/null +++ b/src/feature-flags/interfaces/feature-flag-owner.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { FlagOwner, FlagOwnerResponse } from './flag-owner.interface'; + +export type FeatureFlagOwner = FlagOwner; +export type FeatureFlagOwnerResponse = FlagOwnerResponse; diff --git a/src/feature-flags/interfaces/feature-flag.interface.ts b/src/feature-flags/interfaces/feature-flag.interface.ts index d8430dcc5..1cc3d0b18 100644 --- a/src/feature-flags/interfaces/feature-flag.interface.ts +++ b/src/feature-flags/interfaces/feature-flag.interface.ts @@ -1,14 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + FeatureFlagOwner, + FeatureFlagOwnerResponse, +} from './feature-flag-owner.interface'; export interface FeatureFlag { + /** Distinguishes the Feature Flag object. */ object: 'feature_flag'; + /** Unique identifier of the Feature Flag. */ id: string; + /** A descriptive name for the Feature Flag. This field does not need to be unique. */ name: string; + /** A unique key to reference the Feature Flag. */ slug: string; + /** A description for the Feature Flag. */ description: string; + /** Labels assigned to the Feature Flag for categorizing and filtering. */ tags: string[]; + /** Specifies whether the Feature Flag is active for the current environment. */ enabled: boolean; + /** The value returned for users and organizations who don't match any configured targeting rules. */ defaultValue: boolean; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; + /** The owner of the Feature Flag. */ + owner?: FeatureFlagOwner | null; } export interface FeatureFlagResponse { @@ -22,4 +40,5 @@ export interface FeatureFlagResponse { default_value: boolean; created_at: string; updated_at: string; + owner?: FeatureFlagOwnerResponse | null; } diff --git a/src/feature-flags/interfaces/feature-flags-order.interface.ts b/src/feature-flags/interfaces/feature-flags-order.interface.ts new file mode 100644 index 000000000..d81077237 --- /dev/null +++ b/src/feature-flags/interfaces/feature-flags-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type FeatureFlagsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/feature-flags/interfaces/flag-owner.interface.ts b/src/feature-flags/interfaces/flag-owner.interface.ts new file mode 100644 index 000000000..c9db4d98d --- /dev/null +++ b/src/feature-flags/interfaces/flag-owner.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface FlagOwner { + /** The email address of the flag owner. */ + email: string; + /** The first name of the flag owner. */ + firstName: string | null; + /** The last name of the flag owner. */ + lastName: string | null; +} + +export interface FlagOwnerResponse { + email: string; + first_name: string | null; + last_name: string | null; +} diff --git a/src/feature-flags/interfaces/flag.interface.ts b/src/feature-flags/interfaces/flag.interface.ts new file mode 100644 index 000000000..e40fac82f --- /dev/null +++ b/src/feature-flags/interfaces/flag.interface.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { FlagOwner, FlagOwnerResponse } from './flag-owner.interface'; + +export interface Flag { + /** Distinguishes the Feature Flag object. */ + object: 'feature_flag'; + /** Unique identifier of the Feature Flag. */ + id: string; + /** A unique key to reference the Feature Flag. */ + slug: string; + /** A descriptive name for the Feature Flag. This field does not need to be unique. */ + name: string; + /** A description for the Feature Flag. */ + description: string | null; + /** The owner of the Feature Flag. */ + owner: FlagOwner | null; + /** Labels assigned to the Feature Flag for categorizing and filtering. */ + tags: string[]; + /** Specifies whether the Feature Flag is active for the current environment. */ + enabled: boolean; + /** The value returned for users and organizations who don't match any configured targeting rules. */ + defaultValue: boolean; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface FlagResponse { + object: 'feature_flag'; + id: string; + slug: string; + name: string; + description: string | null; + owner: FlagOwnerResponse | null; + tags: string[]; + enabled: boolean; + default_value: boolean; + created_at: string; + updated_at: string; +} diff --git a/src/feature-flags/interfaces/index.ts b/src/feature-flags/interfaces/index.ts index f3d8acc98..dc5007b09 100644 --- a/src/feature-flags/interfaces/index.ts +++ b/src/feature-flags/interfaces/index.ts @@ -1,4 +1,12 @@ +// This file is auto-generated by oagen. Do not edit. + export * from './add-flag-target-options.interface'; +export * from './feature-flag-owner.interface'; export * from './feature-flag.interface'; +export * from './feature-flags-order.interface'; +export * from './flag-owner.interface'; +export * from './flag.interface'; export * from './list-feature-flags-options.interface'; +export * from './organizations-feature-flags-order.interface'; export * from './remove-flag-target-options.interface'; +export * from './user-management-users-feature-flags-order.interface'; diff --git a/src/feature-flags/interfaces/organizations-feature-flags-order.interface.ts b/src/feature-flags/interfaces/organizations-feature-flags-order.interface.ts new file mode 100644 index 000000000..7f45ea507 --- /dev/null +++ b/src/feature-flags/interfaces/organizations-feature-flags-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationsFeatureFlagsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/feature-flags/interfaces/user-management-users-feature-flags-order.interface.ts b/src/feature-flags/interfaces/user-management-users-feature-flags-order.interface.ts new file mode 100644 index 000000000..661e6e352 --- /dev/null +++ b/src/feature-flags/interfaces/user-management-users-feature-flags-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserManagementUsersFeatureFlagsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/feature-flags/serializers/feature-flag-owner.serializer.ts b/src/feature-flags/serializers/feature-flag-owner.serializer.ts new file mode 100644 index 000000000..d8bf825d3 --- /dev/null +++ b/src/feature-flags/serializers/feature-flag-owner.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeFlagOwner as deserializeFeatureFlagOwner, + serializeFlagOwner as serializeFeatureFlagOwner, +} from './flag-owner.serializer'; diff --git a/src/feature-flags/serializers/feature-flag.serializer.ts b/src/feature-flags/serializers/feature-flag.serializer.ts index 9424889ed..37a4526af 100644 --- a/src/feature-flags/serializers/feature-flag.serializer.ts +++ b/src/feature-flags/serializers/feature-flag.serializer.ts @@ -1,7 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + import { FeatureFlag, FeatureFlagResponse, } from '../interfaces/feature-flag.interface'; +import { serializeFeatureFlagOwner } from './feature-flag-owner.serializer'; export const deserializeFeatureFlag = ( featureFlag: FeatureFlagResponse, @@ -17,3 +20,19 @@ export const deserializeFeatureFlag = ( createdAt: featureFlag.created_at, updatedAt: featureFlag.updated_at, }); + +export const serializeFeatureFlag = ( + model: FeatureFlag, +): FeatureFlagResponse => ({ + object: model.object, + id: model.id, + slug: model.slug, + name: model.name, + description: model.description, + owner: model.owner != null ? serializeFeatureFlagOwner(model.owner) : null, + tags: model.tags, + enabled: model.enabled, + default_value: model.defaultValue, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/feature-flags/serializers/flag-owner.serializer.ts b/src/feature-flags/serializers/flag-owner.serializer.ts new file mode 100644 index 000000000..2e665fec0 --- /dev/null +++ b/src/feature-flags/serializers/flag-owner.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeFlagCreatedDataOwner as deserializeFlagOwner, + serializeFlagCreatedDataOwner as serializeFlagOwner, +} from '../../common/serializers/flag-created-data-owner.serializer'; diff --git a/src/feature-flags/serializers/flag.serializer.ts b/src/feature-flags/serializers/flag.serializer.ts new file mode 100644 index 000000000..9868d67df --- /dev/null +++ b/src/feature-flags/serializers/flag.serializer.ts @@ -0,0 +1,35 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { Flag, FlagResponse } from '../interfaces/flag.interface'; +import { + deserializeFlagOwner, + serializeFlagOwner, +} from './flag-owner.serializer'; + +export const deserializeFlag = (response: FlagResponse): Flag => ({ + object: response.object, + id: response.id, + slug: response.slug, + name: response.name, + description: response.description ?? null, + owner: response.owner != null ? deserializeFlagOwner(response.owner) : null, + tags: response.tags, + enabled: response.enabled, + defaultValue: response.default_value, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeFlag = (model: Flag): FlagResponse => ({ + object: model.object, + id: model.id, + slug: model.slug, + name: model.name, + description: model.description, + owner: model.owner != null ? serializeFlagOwner(model.owner) : null, + tags: model.tags, + enabled: model.enabled, + default_value: model.defaultValue, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/index.ts b/src/index.ts index 32787d7b3..d22770e11 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { SubtleCryptoProvider } from './common/crypto/subtle-crypto-provider'; import { CryptoProvider } from './common/crypto/crypto-provider'; @@ -91,3 +93,3074 @@ class WorkOSNode extends WorkOS { } export { WorkOSNode as WorkOS }; + +export type { PaginationOptions } from './common/interfaces/pagination-options.interface'; + +export type { WorkOSOptions } from './common/interfaces/workos-options.interface'; + +export type { PostOptions } from './common/interfaces/post-options.interface'; + +export type { GetOptions } from './common/interfaces/get-options.interface'; + +export type { + AuthenticationChallenge, + AuthenticationChallengeResponse, +} from './mfa/interfaces/authentication-challenge.interface'; + +export type { + AuthenticationChallengeVerifyResponse, + AuthenticationChallengeVerifyResponseWire, +} from './mfa/interfaces/authentication-challenge-verify-response.interface'; + +export type { + AuthenticationChallengesVerifyRequest, + AuthenticationChallengesVerifyRequestResponse, +} from './mfa/interfaces/authentication-challenges-verify-request.interface'; + +export type { + ChallengeAuthenticationFactor, + ChallengeAuthenticationFactorResponse, +} from './mfa/interfaces/challenge-authentication-factor.interface'; + +export type { + AuthenticationFactor, + AuthenticationFactorResponse, +} from './mfa/interfaces/authentication-factor.interface'; + +export type { + AuthenticationFactorSms, + AuthenticationFactorSmsResponse, +} from './mfa/interfaces/authentication-factor-sms.interface'; + +export type { + AuthenticationFactorTotp, + AuthenticationFactorTotpResponse, +} from './mfa/interfaces/authentication-factor-totp.interface'; + +export type { + AuthenticationFactorsCreateRequest, + AuthenticationFactorsCreateRequestResponse, +} from './mfa/interfaces/authentication-factors-create-request.interface'; + +export * from './workos-connect/interfaces'; + +export { WorkOSConnect } from './workos-connect/work-os-connect'; + +export { Permissions } from './permissions/permissions'; + +export type { + RedirectUri, + RedirectUriResponse, +} from './workos-connect/interfaces/redirect-uri.interface'; + +export type { + CreateOAuthApplication, + CreateOAuthApplicationResponse, +} from './workos-connect/interfaces/create-oauth-application.interface'; + +export type { + CreateM2MApplication, + CreateM2MApplicationResponse, +} from './workos-connect/interfaces/create-m2m-application.interface'; + +export type { + UpdateOAuthApplication, + UpdateOAuthApplicationResponse, +} from './workos-connect/interfaces/update-oauth-application.interface'; + +export type { + ConnectApplication, + ConnectApplicationResponse, +} from './workos-connect/interfaces/connect-application.interface'; + +export { Applications } from './workos-connect/applications'; + +export type { + CreateApplicationSecret, + CreateApplicationSecretResponse, +} from './workos-connect/interfaces/create-application-secret.interface'; + +export type { + NewConnectApplicationSecret, + NewConnectApplicationSecretResponse, +} from './workos-connect/interfaces/new-connect-application-secret.interface'; + +export type { + ApplicationCredentialsListItem, + ApplicationCredentialsListItemResponse, +} from './workos-connect/interfaces/application-credentials-list-item.interface'; + +export { ApplicationClientSecrets } from './workos-connect/application-client-secrets'; + +export * from './pipes/interfaces'; + +export type { + CreateOrganizationApiKey, + CreateOrganizationApiKeyResponse, +} from './organizations/interfaces/create-organization-api-key.interface'; + +export type { + ApiKeyWithValue, + ApiKeyWithValueResponse, +} from './organizations/interfaces/api-key-with-value.interface'; + +export type { + ApiKeyWithValueOwner, + ApiKeyWithValueOwnerResponse, +} from './organizations/interfaces/api-key-with-value-owner.interface'; + +export { OrganizationsFeatureFlags } from './organizations-feature-flags/organizations-feature-flags'; + +export * from './admin-portal/interfaces'; + +export { AdminPortal } from './admin-portal/admin-portal'; + +export * from './radar/interfaces'; + +export { Radar } from './radar/radar'; + +export { UserManagementSessionTokens } from './user-management/user-management-session-tokens'; + +export type { + CreateCorsOrigin, + CreateCorsOriginResponse, +} from './user-management/interfaces/create-cors-origin.interface'; + +export type { + CorsOriginResponse, + CorsOriginResponseWire, +} from './user-management/interfaces/cors-origin-response.interface'; + +export { UserManagementCorsOrigins } from './user-management/user-management-cors-origins'; + +export type { + UpdateJWTTemplate, + UpdateJWTTemplateResponse, +} from './user-management/interfaces/update-jwt-template.interface'; + +export type { + JWTTemplateResponse, + JWTTemplateResponseWire, +} from './user-management/interfaces/jwt-template-response.interface'; + +export { UserManagementJWTTemplate } from './user-management/user-management-jwt-template'; + +export type { + CreateRedirectUri, + CreateRedirectUriResponse, +} from './user-management/interfaces/create-redirect-uri.interface'; + +export { UserManagementRedirectUris } from './user-management/user-management-redirect-uris'; + +export { UserManagementUsersFeatureFlags } from './user-management-users-feature-flags/user-management-users-feature-flags'; + +export type { + AuthorizedConnectApplicationListData, + AuthorizedConnectApplicationListDataResponse, +} from './user-management/interfaces/authorized-connect-application-list-data.interface'; + +export { UserManagementUsersAuthorizedApplications } from './user-management/user-management-users-authorized-applications'; + +export type { + ConnectedAccount, + ConnectedAccountResponse, +} from './user-management/interfaces/connected-account.interface'; + +export type { + DataIntegrationsListResponse, + DataIntegrationsListResponseWire, +} from './user-management/interfaces/data-integrations-list-response.interface'; + +export type { + DataIntegrationsListResponseData, + DataIntegrationsListResponseDataResponse, +} from './user-management/interfaces/data-integrations-list-response-data.interface'; + +export type { + DataIntegrationsListResponseDataConnectedAccount, + DataIntegrationsListResponseDataConnectedAccountResponse, +} from './user-management/interfaces/data-integrations-list-response-data-connected-account.interface'; + +export { UserManagementDataProviders } from './user-management/user-management-data-providers'; + +export type { + EnrollUserAuthenticationFactor, + EnrollUserAuthenticationFactorResponse, +} from './user-management/interfaces/enroll-user-authentication-factor.interface'; + +export type { + UserAuthenticationFactorEnrollResponse, + UserAuthenticationFactorEnrollResponseWire, +} from './user-management/interfaces/user-authentication-factor-enroll-response.interface'; + +export * from './webhooks/interfaces'; + +export { WebhooksEndpoints } from './webhooks/webhooks-endpoints'; + +export * from './widgets/interfaces'; + +export type { + AuthenticationFactorTotp2, + AuthenticationFactorTotp2Response, +} from './common/interfaces/authentication-factor-totp-2.interface'; + +export type { OrganizationDomainDataState } from './common/interfaces/organization-domain-data-state.interface'; + +export type { GenerateLinkIntent } from './common/interfaces/generate-link-intent.interface'; + +export type { CreateUserInviteOptionsLocale } from './common/interfaces/create-user-invite-options-locale.interface'; + +export type { ResendUserInviteOptionsLocale } from './common/interfaces/resend-user-invite-options-locale.interface'; + +export type { CreateUserPasswordHashType } from './common/interfaces/create-user-password-hash-type.interface'; + +export type { UpdateUserPasswordHashType } from './common/interfaces/update-user-password-hash-type.interface'; + +export type { CreateWebhookEndpointEvents } from './common/interfaces/create-webhook-endpoint-events.interface'; + +export type { UpdateWebhookEndpointStatus } from './common/interfaces/update-webhook-endpoint-status.interface'; + +export type { UpdateWebhookEndpointEvents } from './common/interfaces/update-webhook-endpoint-events.interface'; + +export type { WidgetSessionTokenScopes } from './common/interfaces/widget-session-token-scopes.interface'; + +export type { AuditLogExportJsonState } from './common/interfaces/audit-log-export-json-state.interface'; + +export type { AuthenticationFactorType } from './common/interfaces/authentication-factor-type.interface'; + +export type { RoleType } from './common/interfaces/role-type.interface'; + +export type { ConnectionState } from './common/interfaces/connection-state.interface'; + +export type { ConnectionStatus } from './common/interfaces/connection-status.interface'; + +export type { DirectoryUserWithGroupsState } from './common/interfaces/directory-user-with-groups-state.interface'; + +export type { OrganizationDomainStandAloneState } from './common/interfaces/organization-domain-stand-alone-state.interface'; + +export type { OrganizationDomainStandAloneVerificationStrategy } from './common/interfaces/organization-domain-stand-alone-verification-strategy.interface'; + +export type { AuditLogConfigurationState } from './common/interfaces/audit-log-configuration-state.interface'; + +export type { ConnectedAccountState } from './common/interfaces/connected-account-state.interface'; + +export type { RadarStandaloneResponseVerdict } from './common/interfaces/radar-standalone-response-verdict.interface'; + +export type { RadarStandaloneResponseControl } from './common/interfaces/radar-standalone-response-control.interface'; + +export type { RadarStandaloneResponseBlocklistType } from './common/interfaces/radar-standalone-response-blocklist-type.interface'; + +export type { UserInviteState } from './common/interfaces/user-invite-state.interface'; + +export type { UserOrganizationMembershipStatus } from './common/interfaces/user-organization-membership-status.interface'; + +export type { AuthenticateResponseAuthenticationMethod } from './common/interfaces/authenticate-response-authentication-method.interface'; + +export type { WebhookEndpointJsonStatus } from './common/interfaces/webhook-endpoint-json-status.interface'; + +export type { ProfileConnectionType } from './common/interfaces/profile-connection-type.interface'; + +export type { DataIntegrationsListResponseDataOwnership } from './common/interfaces/data-integrations-list-response-data-ownership.interface'; + +export type { AuditLogConfigurationLogStreamType } from './common/interfaces/audit-log-configuration-log-stream-type.interface'; + +export type { AuditLogConfigurationLogStreamState } from './common/interfaces/audit-log-configuration-log-stream-state.interface'; + +export type { UserOrganizationMembershipBaseListDataStatus } from './common/interfaces/user-organization-membership-base-list-data-status.interface'; + +export type { AuthenticationFactorsCreateRequestType } from './common/interfaces/authentication-factors-create-request-type.interface'; + +export type { AuthorizationOrganizationRolesType } from './common/interfaces/authorization-organization-roles-type.interface'; + +export type { AuthorizationOrganizationRolesUpdatePriorityOrderItemType } from './common/interfaces/authorization-organization-roles-update-priority-order-item-type.interface'; + +export type { RadarStandaloneAssessRequestAuthMethod } from './common/interfaces/radar-standalone-assess-request-auth-method.interface'; + +export type { RadarStandaloneAssessRequestAction } from './common/interfaces/radar-standalone-assess-request-action.interface'; + +export type { InvitationState } from './common/interfaces/invitation-state.interface'; + +export type { UserIdentitiesGetItemProvider } from './common/interfaces/user-identities-get-item-provider.interface'; + +export type { UserSessionsAuthMethod } from './common/interfaces/user-sessions-auth-method.interface'; + +export type { UserSessionsStatus } from './common/interfaces/user-sessions-status.interface'; + +export type { DataIntegrationsListResponseDataConnectedAccountState } from './common/interfaces/data-integrations-list-response-data-connected-account-state.interface'; + +export * from './multi-factor-auth/interfaces'; + +export { MultiFactorAuth } from './multi-factor-auth/multi-factor-auth'; + +export type { + UserObject, + UserObjectResponse, +} from './connect/interfaces/user-object.interface'; + +export type { + UserConsentOption, + UserConsentOptionResponse, +} from './connect/interfaces/user-consent-option.interface'; + +export type { + UserManagementLoginRequest, + UserManagementLoginRequestResponse, +} from './connect/interfaces/user-management-login-request.interface'; + +export type { + ExternalAuthCompleteResponse, + ExternalAuthCompleteResponseWire, +} from './connect/interfaces/external-auth-complete-response.interface'; + +export type { + UserConsentOptionChoice, + UserConsentOptionChoiceResponse, +} from './connect/interfaces/user-consent-option-choice.interface'; + +export type { + RedirectUriInput, + RedirectUriInputResponse, +} from './connect/interfaces/redirect-uri-input.interface'; + +export type { + EventSchema, + EventSchemaResponse, +} from './events/interfaces/event-schema.interface'; + +export type { + EventListListMetadata, + EventListListMetadataResponse, +} from './events/interfaces/event-list-list-metadata.interface'; + +export type { + SSOIntentOptions, + SSOIntentOptionsResponse, +} from './admin-portal/interfaces/sso-intent-options.interface'; + +export type { + IntentOptions, + IntentOptionsResponse, +} from './admin-portal/interfaces/intent-options.interface'; + +export type { + GenerateLink, + GenerateLinkResponse, +} from './admin-portal/interfaces/generate-link.interface'; + +export type { + PortalLinkResponse, + PortalLinkResponseWire, +} from './admin-portal/interfaces/portal-link-response.interface'; + +export type { + JwksResponse, + JwksResponseWire, +} from './user-management/interfaces/jwks-response.interface'; + +export type { + JwksResponseKeys, + JwksResponseKeysResponse, +} from './user-management/interfaces/jwks-response-keys.interface'; + +export type { + ActionAuthenticationDenied, + ActionAuthenticationDeniedResponse, +} from './common/interfaces/action-authentication-denied.interface'; + +export type { + ActionAuthenticationDeniedData, + ActionAuthenticationDeniedDataResponse, +} from './common/interfaces/action-authentication-denied-data.interface'; + +export type { + ActionAuthenticationDeniedContext, + ActionAuthenticationDeniedContextResponse, +} from './common/interfaces/action-authentication-denied-context.interface'; + +export type { + ActionAuthenticationDeniedContextGoogleAnalyticsSession, + ActionAuthenticationDeniedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/action-authentication-denied-context-google-analytics-session.interface'; + +export type { + ActionAuthenticationDeniedContextActor, + ActionAuthenticationDeniedContextActorResponse, +} from './common/interfaces/action-authentication-denied-context-actor.interface'; + +export type { + ActionUserRegistrationDenied, + ActionUserRegistrationDeniedResponse, +} from './common/interfaces/action-user-registration-denied.interface'; + +export type { + ActionUserRegistrationDeniedData, + ActionUserRegistrationDeniedDataResponse, +} from './common/interfaces/action-user-registration-denied-data.interface'; + +export type { + ActionUserRegistrationDeniedContext, + ActionUserRegistrationDeniedContextResponse, +} from './common/interfaces/action-user-registration-denied-context.interface'; + +export type { + ActionUserRegistrationDeniedContextGoogleAnalyticsSession, + ActionUserRegistrationDeniedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/action-user-registration-denied-context-google-analytics-session.interface'; + +export type { + ActionUserRegistrationDeniedContextActor, + ActionUserRegistrationDeniedContextActorResponse, +} from './common/interfaces/action-user-registration-denied-context-actor.interface'; + +export type { + ApiKeyCreated, + ApiKeyCreatedResponse, +} from './common/interfaces/api-key-created.interface'; + +export type { + ApiKeyCreatedData, + ApiKeyCreatedDataResponse, +} from './common/interfaces/api-key-created-data.interface'; + +export type { + ApiKeyCreatedDataOwner, + ApiKeyCreatedDataOwnerResponse, +} from './common/interfaces/api-key-created-data-owner.interface'; + +export type { + ApiKeyCreatedContext, + ApiKeyCreatedContextResponse, +} from './common/interfaces/api-key-created-context.interface'; + +export type { + ApiKeyCreatedContextGoogleAnalyticsSession, + ApiKeyCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/api-key-created-context-google-analytics-session.interface'; + +export type { + ApiKeyCreatedContextActor, + ApiKeyCreatedContextActorResponse, +} from './common/interfaces/api-key-created-context-actor.interface'; + +export type { + ApiKeyRevoked, + ApiKeyRevokedResponse, +} from './common/interfaces/api-key-revoked.interface'; + +export type { + ApiKeyRevokedData, + ApiKeyRevokedDataResponse, +} from './common/interfaces/api-key-revoked-data.interface'; + +export type { + ApiKeyRevokedDataOwner, + ApiKeyRevokedDataOwnerResponse, +} from './common/interfaces/api-key-revoked-data-owner.interface'; + +export type { + ApiKeyRevokedContext, + ApiKeyRevokedContextResponse, +} from './common/interfaces/api-key-revoked-context.interface'; + +export type { + ApiKeyRevokedContextGoogleAnalyticsSession, + ApiKeyRevokedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/api-key-revoked-context-google-analytics-session.interface'; + +export type { + ApiKeyRevokedContextActor, + ApiKeyRevokedContextActorResponse, +} from './common/interfaces/api-key-revoked-context-actor.interface'; + +export type { + AuthenticationEmailVerificationFailed, + AuthenticationEmailVerificationFailedResponse, +} from './common/interfaces/authentication-email-verification-failed.interface'; + +export type { + AuthenticationEmailVerificationFailedData, + AuthenticationEmailVerificationFailedDataResponse, +} from './common/interfaces/authentication-email-verification-failed-data.interface'; + +export type { + AuthenticationEmailVerificationFailedDataError, + AuthenticationEmailVerificationFailedDataErrorResponse, +} from './common/interfaces/authentication-email-verification-failed-data-error.interface'; + +export type { + AuthenticationEmailVerificationFailedContext, + AuthenticationEmailVerificationFailedContextResponse, +} from './common/interfaces/authentication-email-verification-failed-context.interface'; + +export type { + AuthenticationEmailVerificationFailedContextGoogleAnalyticsSession, + AuthenticationEmailVerificationFailedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-email-verification-failed-context-google-analytics-session.interface'; + +export type { + AuthenticationEmailVerificationFailedContextActor, + AuthenticationEmailVerificationFailedContextActorResponse, +} from './common/interfaces/authentication-email-verification-failed-context-actor.interface'; + +export type { + AuthenticationEmailVerificationSucceeded, + AuthenticationEmailVerificationSucceededResponse, +} from './common/interfaces/authentication-email-verification-succeeded.interface'; + +export type { + AuthenticationEmailVerificationSucceededData, + AuthenticationEmailVerificationSucceededDataResponse, +} from './common/interfaces/authentication-email-verification-succeeded-data.interface'; + +export type { + AuthenticationEmailVerificationSucceededContext, + AuthenticationEmailVerificationSucceededContextResponse, +} from './common/interfaces/authentication-email-verification-succeeded-context.interface'; + +export type { + AuthenticationEmailVerificationSucceededContextGoogleAnalyticsSession, + AuthenticationEmailVerificationSucceededContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-email-verification-succeeded-context-google-analytics-session.interface'; + +export type { + AuthenticationEmailVerificationSucceededContextActor, + AuthenticationEmailVerificationSucceededContextActorResponse, +} from './common/interfaces/authentication-email-verification-succeeded-context-actor.interface'; + +export type { + AuthenticationMagicAuthFailed, + AuthenticationMagicAuthFailedResponse, +} from './common/interfaces/authentication-magic-auth-failed.interface'; + +export type { + AuthenticationMagicAuthFailedData, + AuthenticationMagicAuthFailedDataResponse, +} from './common/interfaces/authentication-magic-auth-failed-data.interface'; + +export type { + AuthenticationMagicAuthFailedDataError, + AuthenticationMagicAuthFailedDataErrorResponse, +} from './common/interfaces/authentication-magic-auth-failed-data-error.interface'; + +export type { + AuthenticationMagicAuthFailedContext, + AuthenticationMagicAuthFailedContextResponse, +} from './common/interfaces/authentication-magic-auth-failed-context.interface'; + +export type { + AuthenticationMagicAuthFailedContextGoogleAnalyticsSession, + AuthenticationMagicAuthFailedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-magic-auth-failed-context-google-analytics-session.interface'; + +export type { + AuthenticationMagicAuthFailedContextActor, + AuthenticationMagicAuthFailedContextActorResponse, +} from './common/interfaces/authentication-magic-auth-failed-context-actor.interface'; + +export type { + AuthenticationMagicAuthSucceeded, + AuthenticationMagicAuthSucceededResponse, +} from './common/interfaces/authentication-magic-auth-succeeded.interface'; + +export type { + AuthenticationMagicAuthSucceededData, + AuthenticationMagicAuthSucceededDataResponse, +} from './common/interfaces/authentication-magic-auth-succeeded-data.interface'; + +export type { + AuthenticationMagicAuthSucceededContext, + AuthenticationMagicAuthSucceededContextResponse, +} from './common/interfaces/authentication-magic-auth-succeeded-context.interface'; + +export type { + AuthenticationMagicAuthSucceededContextGoogleAnalyticsSession, + AuthenticationMagicAuthSucceededContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-magic-auth-succeeded-context-google-analytics-session.interface'; + +export type { + AuthenticationMagicAuthSucceededContextActor, + AuthenticationMagicAuthSucceededContextActorResponse, +} from './common/interfaces/authentication-magic-auth-succeeded-context-actor.interface'; + +export type { + AuthenticationMfaFailed, + AuthenticationMfaFailedResponse, +} from './common/interfaces/authentication-mfa-failed.interface'; + +export type { + AuthenticationMfaFailedData, + AuthenticationMfaFailedDataResponse, +} from './common/interfaces/authentication-mfa-failed-data.interface'; + +export type { + AuthenticationMfaFailedDataError, + AuthenticationMfaFailedDataErrorResponse, +} from './common/interfaces/authentication-mfa-failed-data-error.interface'; + +export type { + AuthenticationMfaFailedContext, + AuthenticationMfaFailedContextResponse, +} from './common/interfaces/authentication-mfa-failed-context.interface'; + +export type { + AuthenticationMfaFailedContextGoogleAnalyticsSession, + AuthenticationMfaFailedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-mfa-failed-context-google-analytics-session.interface'; + +export type { + AuthenticationMfaFailedContextActor, + AuthenticationMfaFailedContextActorResponse, +} from './common/interfaces/authentication-mfa-failed-context-actor.interface'; + +export type { + AuthenticationMfaSucceeded, + AuthenticationMfaSucceededResponse, +} from './common/interfaces/authentication-mfa-succeeded.interface'; + +export type { + AuthenticationMfaSucceededData, + AuthenticationMfaSucceededDataResponse, +} from './common/interfaces/authentication-mfa-succeeded-data.interface'; + +export type { + AuthenticationMfaSucceededContext, + AuthenticationMfaSucceededContextResponse, +} from './common/interfaces/authentication-mfa-succeeded-context.interface'; + +export type { + AuthenticationMfaSucceededContextGoogleAnalyticsSession, + AuthenticationMfaSucceededContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-mfa-succeeded-context-google-analytics-session.interface'; + +export type { + AuthenticationMfaSucceededContextActor, + AuthenticationMfaSucceededContextActorResponse, +} from './common/interfaces/authentication-mfa-succeeded-context-actor.interface'; + +export type { + AuthenticationOAuthFailed, + AuthenticationOAuthFailedResponse, +} from './common/interfaces/authentication-oauth-failed.interface'; + +export type { + AuthenticationOAuthFailedData, + AuthenticationOAuthFailedDataResponse, +} from './common/interfaces/authentication-oauth-failed-data.interface'; + +export type { + AuthenticationOAuthFailedDataError, + AuthenticationOAuthFailedDataErrorResponse, +} from './common/interfaces/authentication-oauth-failed-data-error.interface'; + +export type { + AuthenticationOAuthFailedContext, + AuthenticationOAuthFailedContextResponse, +} from './common/interfaces/authentication-oauth-failed-context.interface'; + +export type { + AuthenticationOAuthFailedContextGoogleAnalyticsSession, + AuthenticationOAuthFailedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-oauth-failed-context-google-analytics-session.interface'; + +export type { + AuthenticationOAuthFailedContextActor, + AuthenticationOAuthFailedContextActorResponse, +} from './common/interfaces/authentication-oauth-failed-context-actor.interface'; + +export type { + AuthenticationOAuthSucceeded, + AuthenticationOAuthSucceededResponse, +} from './common/interfaces/authentication-oauth-succeeded.interface'; + +export type { + AuthenticationOAuthSucceededData, + AuthenticationOAuthSucceededDataResponse, +} from './common/interfaces/authentication-oauth-succeeded-data.interface'; + +export type { + AuthenticationOAuthSucceededContext, + AuthenticationOAuthSucceededContextResponse, +} from './common/interfaces/authentication-oauth-succeeded-context.interface'; + +export type { + AuthenticationOAuthSucceededContextGoogleAnalyticsSession, + AuthenticationOAuthSucceededContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-oauth-succeeded-context-google-analytics-session.interface'; + +export type { + AuthenticationOAuthSucceededContextActor, + AuthenticationOAuthSucceededContextActorResponse, +} from './common/interfaces/authentication-oauth-succeeded-context-actor.interface'; + +export type { + AuthenticationPasskeyFailed, + AuthenticationPasskeyFailedResponse, +} from './common/interfaces/authentication-passkey-failed.interface'; + +export type { + AuthenticationPasskeyFailedData, + AuthenticationPasskeyFailedDataResponse, +} from './common/interfaces/authentication-passkey-failed-data.interface'; + +export type { + AuthenticationPasskeyFailedDataError, + AuthenticationPasskeyFailedDataErrorResponse, +} from './common/interfaces/authentication-passkey-failed-data-error.interface'; + +export type { + AuthenticationPasskeyFailedContext, + AuthenticationPasskeyFailedContextResponse, +} from './common/interfaces/authentication-passkey-failed-context.interface'; + +export type { + AuthenticationPasskeyFailedContextGoogleAnalyticsSession, + AuthenticationPasskeyFailedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-passkey-failed-context-google-analytics-session.interface'; + +export type { + AuthenticationPasskeyFailedContextActor, + AuthenticationPasskeyFailedContextActorResponse, +} from './common/interfaces/authentication-passkey-failed-context-actor.interface'; + +export type { + AuthenticationPasskeySucceeded, + AuthenticationPasskeySucceededResponse, +} from './common/interfaces/authentication-passkey-succeeded.interface'; + +export type { + AuthenticationPasskeySucceededData, + AuthenticationPasskeySucceededDataResponse, +} from './common/interfaces/authentication-passkey-succeeded-data.interface'; + +export type { + AuthenticationPasskeySucceededContext, + AuthenticationPasskeySucceededContextResponse, +} from './common/interfaces/authentication-passkey-succeeded-context.interface'; + +export type { + AuthenticationPasskeySucceededContextGoogleAnalyticsSession, + AuthenticationPasskeySucceededContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-passkey-succeeded-context-google-analytics-session.interface'; + +export type { + AuthenticationPasskeySucceededContextActor, + AuthenticationPasskeySucceededContextActorResponse, +} from './common/interfaces/authentication-passkey-succeeded-context-actor.interface'; + +export type { + AuthenticationPasswordFailed, + AuthenticationPasswordFailedResponse, +} from './common/interfaces/authentication-password-failed.interface'; + +export type { + AuthenticationPasswordFailedData, + AuthenticationPasswordFailedDataResponse, +} from './common/interfaces/authentication-password-failed-data.interface'; + +export type { + AuthenticationPasswordFailedDataError, + AuthenticationPasswordFailedDataErrorResponse, +} from './common/interfaces/authentication-password-failed-data-error.interface'; + +export type { + AuthenticationPasswordFailedContext, + AuthenticationPasswordFailedContextResponse, +} from './common/interfaces/authentication-password-failed-context.interface'; + +export type { + AuthenticationPasswordFailedContextGoogleAnalyticsSession, + AuthenticationPasswordFailedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-password-failed-context-google-analytics-session.interface'; + +export type { + AuthenticationPasswordFailedContextActor, + AuthenticationPasswordFailedContextActorResponse, +} from './common/interfaces/authentication-password-failed-context-actor.interface'; + +export type { + AuthenticationPasswordSucceeded, + AuthenticationPasswordSucceededResponse, +} from './common/interfaces/authentication-password-succeeded.interface'; + +export type { + AuthenticationPasswordSucceededData, + AuthenticationPasswordSucceededDataResponse, +} from './common/interfaces/authentication-password-succeeded-data.interface'; + +export type { + AuthenticationPasswordSucceededContext, + AuthenticationPasswordSucceededContextResponse, +} from './common/interfaces/authentication-password-succeeded-context.interface'; + +export type { + AuthenticationPasswordSucceededContextGoogleAnalyticsSession, + AuthenticationPasswordSucceededContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-password-succeeded-context-google-analytics-session.interface'; + +export type { + AuthenticationPasswordSucceededContextActor, + AuthenticationPasswordSucceededContextActorResponse, +} from './common/interfaces/authentication-password-succeeded-context-actor.interface'; + +export type { + AuthenticationRadarRiskDetected, + AuthenticationRadarRiskDetectedResponse, +} from './common/interfaces/authentication-radar-risk-detected.interface'; + +export type { + AuthenticationRadarRiskDetectedData, + AuthenticationRadarRiskDetectedDataResponse, +} from './common/interfaces/authentication-radar-risk-detected-data.interface'; + +export type { + AuthenticationRadarRiskDetectedContext, + AuthenticationRadarRiskDetectedContextResponse, +} from './common/interfaces/authentication-radar-risk-detected-context.interface'; + +export type { + AuthenticationRadarRiskDetectedContextGoogleAnalyticsSession, + AuthenticationRadarRiskDetectedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-radar-risk-detected-context-google-analytics-session.interface'; + +export type { + AuthenticationRadarRiskDetectedContextActor, + AuthenticationRadarRiskDetectedContextActorResponse, +} from './common/interfaces/authentication-radar-risk-detected-context-actor.interface'; + +export type { + AuthenticationSSOFailed, + AuthenticationSSOFailedResponse, +} from './common/interfaces/authentication-sso-failed.interface'; + +export type { + AuthenticationSSOFailedData, + AuthenticationSSOFailedDataResponse, +} from './common/interfaces/authentication-sso-failed-data.interface'; + +export type { + AuthenticationSSOFailedDataSSO, + AuthenticationSSOFailedDataSSOResponse, +} from './common/interfaces/authentication-sso-failed-data-sso.interface'; + +export type { + AuthenticationSSOFailedDataError, + AuthenticationSSOFailedDataErrorResponse, +} from './common/interfaces/authentication-sso-failed-data-error.interface'; + +export type { + AuthenticationSSOFailedContext, + AuthenticationSSOFailedContextResponse, +} from './common/interfaces/authentication-sso-failed-context.interface'; + +export type { + AuthenticationSSOFailedContextGoogleAnalyticsSession, + AuthenticationSSOFailedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-sso-failed-context-google-analytics-session.interface'; + +export type { + AuthenticationSSOFailedContextActor, + AuthenticationSSOFailedContextActorResponse, +} from './common/interfaces/authentication-sso-failed-context-actor.interface'; + +export type { + AuthenticationSSOStarted, + AuthenticationSSOStartedResponse, +} from './common/interfaces/authentication-sso-started.interface'; + +export type { + AuthenticationSSOStartedData, + AuthenticationSSOStartedDataResponse, +} from './common/interfaces/authentication-sso-started-data.interface'; + +export type { + AuthenticationSSOStartedDataSSO, + AuthenticationSSOStartedDataSSOResponse, +} from './common/interfaces/authentication-sso-started-data-sso.interface'; + +export type { + AuthenticationSSOStartedContext, + AuthenticationSSOStartedContextResponse, +} from './common/interfaces/authentication-sso-started-context.interface'; + +export type { + AuthenticationSSOStartedContextGoogleAnalyticsSession, + AuthenticationSSOStartedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-sso-started-context-google-analytics-session.interface'; + +export type { + AuthenticationSSOStartedContextActor, + AuthenticationSSOStartedContextActorResponse, +} from './common/interfaces/authentication-sso-started-context-actor.interface'; + +export type { + AuthenticationSSOSucceeded, + AuthenticationSSOSucceededResponse, +} from './common/interfaces/authentication-sso-succeeded.interface'; + +export type { + AuthenticationSSOSucceededData, + AuthenticationSSOSucceededDataResponse, +} from './common/interfaces/authentication-sso-succeeded-data.interface'; + +export type { + AuthenticationSSOSucceededDataSSO, + AuthenticationSSOSucceededDataSSOResponse, +} from './common/interfaces/authentication-sso-succeeded-data-sso.interface'; + +export type { + AuthenticationSSOSucceededContext, + AuthenticationSSOSucceededContextResponse, +} from './common/interfaces/authentication-sso-succeeded-context.interface'; + +export type { + AuthenticationSSOSucceededContextGoogleAnalyticsSession, + AuthenticationSSOSucceededContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-sso-succeeded-context-google-analytics-session.interface'; + +export type { + AuthenticationSSOSucceededContextActor, + AuthenticationSSOSucceededContextActorResponse, +} from './common/interfaces/authentication-sso-succeeded-context-actor.interface'; + +export type { + AuthenticationSSOTimedOut, + AuthenticationSSOTimedOutResponse, +} from './common/interfaces/authentication-sso-timed-out.interface'; + +export type { + AuthenticationSSOTimedOutData, + AuthenticationSSOTimedOutDataResponse, +} from './common/interfaces/authentication-sso-timed-out-data.interface'; + +export type { + AuthenticationSSOTimedOutDataSSO, + AuthenticationSSOTimedOutDataSSOResponse, +} from './common/interfaces/authentication-sso-timed-out-data-sso.interface'; + +export type { + AuthenticationSSOTimedOutDataError, + AuthenticationSSOTimedOutDataErrorResponse, +} from './common/interfaces/authentication-sso-timed-out-data-error.interface'; + +export type { + AuthenticationSSOTimedOutContext, + AuthenticationSSOTimedOutContextResponse, +} from './common/interfaces/authentication-sso-timed-out-context.interface'; + +export type { + AuthenticationSSOTimedOutContextGoogleAnalyticsSession, + AuthenticationSSOTimedOutContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/authentication-sso-timed-out-context-google-analytics-session.interface'; + +export type { + AuthenticationSSOTimedOutContextActor, + AuthenticationSSOTimedOutContextActorResponse, +} from './common/interfaces/authentication-sso-timed-out-context-actor.interface'; + +export type { + ConnectionActivated, + ConnectionActivatedResponse, +} from './common/interfaces/connection-activated.interface'; + +export type { + ConnectionActivatedData, + ConnectionActivatedDataResponse, +} from './common/interfaces/connection-activated-data.interface'; + +export type { + ConnectionActivatedDataDomain, + ConnectionActivatedDataDomainResponse, +} from './common/interfaces/connection-activated-data-domain.interface'; + +export type { + ConnectionActivatedContext, + ConnectionActivatedContextResponse, +} from './common/interfaces/connection-activated-context.interface'; + +export type { + ConnectionActivatedContextGoogleAnalyticsSession, + ConnectionActivatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/connection-activated-context-google-analytics-session.interface'; + +export type { + ConnectionActivatedContextActor, + ConnectionActivatedContextActorResponse, +} from './common/interfaces/connection-activated-context-actor.interface'; + +export type { + ConnectionDeactivated, + ConnectionDeactivatedResponse, +} from './common/interfaces/connection-deactivated.interface'; + +export type { + ConnectionDeactivatedData, + ConnectionDeactivatedDataResponse, +} from './common/interfaces/connection-deactivated-data.interface'; + +export type { + ConnectionDeactivatedDataDomain, + ConnectionDeactivatedDataDomainResponse, +} from './common/interfaces/connection-deactivated-data-domain.interface'; + +export type { + ConnectionDeactivatedContext, + ConnectionDeactivatedContextResponse, +} from './common/interfaces/connection-deactivated-context.interface'; + +export type { + ConnectionDeactivatedContextGoogleAnalyticsSession, + ConnectionDeactivatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/connection-deactivated-context-google-analytics-session.interface'; + +export type { + ConnectionDeactivatedContextActor, + ConnectionDeactivatedContextActorResponse, +} from './common/interfaces/connection-deactivated-context-actor.interface'; + +export type { + ConnectionDeleted, + ConnectionDeletedResponse, +} from './common/interfaces/connection-deleted.interface'; + +export type { + ConnectionDeletedData, + ConnectionDeletedDataResponse, +} from './common/interfaces/connection-deleted-data.interface'; + +export type { + ConnectionDeletedContext, + ConnectionDeletedContextResponse, +} from './common/interfaces/connection-deleted-context.interface'; + +export type { + ConnectionDeletedContextGoogleAnalyticsSession, + ConnectionDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/connection-deleted-context-google-analytics-session.interface'; + +export type { + ConnectionDeletedContextActor, + ConnectionDeletedContextActorResponse, +} from './common/interfaces/connection-deleted-context-actor.interface'; + +export type { + ConnectionSAMLCertificateRenewalRequired, + ConnectionSAMLCertificateRenewalRequiredResponse, +} from './common/interfaces/connection-saml-certificate-renewal-required.interface'; + +export type { + ConnectionSAMLCertificateRenewalRequiredData, + ConnectionSAMLCertificateRenewalRequiredDataResponse, +} from './common/interfaces/connection-saml-certificate-renewal-required-data.interface'; + +export type { + ConnectionSAMLCertificateRenewalRequiredDataConnection, + ConnectionSAMLCertificateRenewalRequiredDataConnectionResponse, +} from './common/interfaces/connection-saml-certificate-renewal-required-data-connection.interface'; + +export type { + ConnectionSAMLCertificateRenewalRequiredDataCertificate, + ConnectionSAMLCertificateRenewalRequiredDataCertificateResponse, +} from './common/interfaces/connection-saml-certificate-renewal-required-data-certificate.interface'; + +export type { + ConnectionSAMLCertificateRenewalRequiredContext, + ConnectionSAMLCertificateRenewalRequiredContextResponse, +} from './common/interfaces/connection-saml-certificate-renewal-required-context.interface'; + +export type { + ConnectionSAMLCertificateRenewalRequiredContextGoogleAnalyticsSession, + ConnectionSAMLCertificateRenewalRequiredContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/connection-saml-certificate-renewal-required-context-google-analytics-session.interface'; + +export type { + ConnectionSAMLCertificateRenewalRequiredContextActor, + ConnectionSAMLCertificateRenewalRequiredContextActorResponse, +} from './common/interfaces/connection-saml-certificate-renewal-required-context-actor.interface'; + +export type { + ConnectionSAMLCertificateRenewed, + ConnectionSAMLCertificateRenewedResponse, +} from './common/interfaces/connection-saml-certificate-renewed.interface'; + +export type { + ConnectionSAMLCertificateRenewedData, + ConnectionSAMLCertificateRenewedDataResponse, +} from './common/interfaces/connection-saml-certificate-renewed-data.interface'; + +export type { + ConnectionSAMLCertificateRenewedDataConnection, + ConnectionSAMLCertificateRenewedDataConnectionResponse, +} from './common/interfaces/connection-saml-certificate-renewed-data-connection.interface'; + +export type { + ConnectionSAMLCertificateRenewedDataCertificate, + ConnectionSAMLCertificateRenewedDataCertificateResponse, +} from './common/interfaces/connection-saml-certificate-renewed-data-certificate.interface'; + +export type { + ConnectionSAMLCertificateRenewedContext, + ConnectionSAMLCertificateRenewedContextResponse, +} from './common/interfaces/connection-saml-certificate-renewed-context.interface'; + +export type { + ConnectionSAMLCertificateRenewedContextGoogleAnalyticsSession, + ConnectionSAMLCertificateRenewedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/connection-saml-certificate-renewed-context-google-analytics-session.interface'; + +export type { + ConnectionSAMLCertificateRenewedContextActor, + ConnectionSAMLCertificateRenewedContextActorResponse, +} from './common/interfaces/connection-saml-certificate-renewed-context-actor.interface'; + +export type { + DsyncActivated, + DsyncActivatedResponse, +} from './common/interfaces/dsync-activated.interface'; + +export type { + DsyncActivatedData, + DsyncActivatedDataResponse, +} from './common/interfaces/dsync-activated-data.interface'; + +export type { + DsyncActivatedDataDomain, + DsyncActivatedDataDomainResponse, +} from './common/interfaces/dsync-activated-data-domain.interface'; + +export type { + DsyncActivatedContext, + DsyncActivatedContextResponse, +} from './common/interfaces/dsync-activated-context.interface'; + +export type { + DsyncActivatedContextGoogleAnalyticsSession, + DsyncActivatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-activated-context-google-analytics-session.interface'; + +export type { + DsyncActivatedContextActor, + DsyncActivatedContextActorResponse, +} from './common/interfaces/dsync-activated-context-actor.interface'; + +export type { + DsyncDeactivated, + DsyncDeactivatedResponse, +} from './common/interfaces/dsync-deactivated.interface'; + +export type { + DsyncDeactivatedData, + DsyncDeactivatedDataResponse, +} from './common/interfaces/dsync-deactivated-data.interface'; + +export type { + DsyncDeactivatedDataDomain, + DsyncDeactivatedDataDomainResponse, +} from './common/interfaces/dsync-deactivated-data-domain.interface'; + +export type { + DsyncDeactivatedContext, + DsyncDeactivatedContextResponse, +} from './common/interfaces/dsync-deactivated-context.interface'; + +export type { + DsyncDeactivatedContextGoogleAnalyticsSession, + DsyncDeactivatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-deactivated-context-google-analytics-session.interface'; + +export type { + DsyncDeactivatedContextActor, + DsyncDeactivatedContextActorResponse, +} from './common/interfaces/dsync-deactivated-context-actor.interface'; + +export type { + DsyncDeleted, + DsyncDeletedResponse, +} from './common/interfaces/dsync-deleted.interface'; + +export type { + DsyncDeletedData, + DsyncDeletedDataResponse, +} from './common/interfaces/dsync-deleted-data.interface'; + +export type { + DsyncDeletedContext, + DsyncDeletedContextResponse, +} from './common/interfaces/dsync-deleted-context.interface'; + +export type { + DsyncDeletedContextGoogleAnalyticsSession, + DsyncDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-deleted-context-google-analytics-session.interface'; + +export type { + DsyncDeletedContextActor, + DsyncDeletedContextActorResponse, +} from './common/interfaces/dsync-deleted-context-actor.interface'; + +export type { + DsyncGroupCreated, + DsyncGroupCreatedResponse, +} from './common/interfaces/dsync-group-created.interface'; + +export type { + DsyncGroupCreatedData, + DsyncGroupCreatedDataResponse, +} from './common/interfaces/dsync-group-created-data.interface'; + +export type { + DsyncGroupCreatedContext, + DsyncGroupCreatedContextResponse, +} from './common/interfaces/dsync-group-created-context.interface'; + +export type { + DsyncGroupCreatedContextGoogleAnalyticsSession, + DsyncGroupCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-group-created-context-google-analytics-session.interface'; + +export type { + DsyncGroupCreatedContextActor, + DsyncGroupCreatedContextActorResponse, +} from './common/interfaces/dsync-group-created-context-actor.interface'; + +export type { + DsyncGroupDeleted, + DsyncGroupDeletedResponse, +} from './common/interfaces/dsync-group-deleted.interface'; + +export type { + DsyncGroupDeletedData, + DsyncGroupDeletedDataResponse, +} from './common/interfaces/dsync-group-deleted-data.interface'; + +export type { + DsyncGroupDeletedContext, + DsyncGroupDeletedContextResponse, +} from './common/interfaces/dsync-group-deleted-context.interface'; + +export type { + DsyncGroupDeletedContextGoogleAnalyticsSession, + DsyncGroupDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-group-deleted-context-google-analytics-session.interface'; + +export type { + DsyncGroupDeletedContextActor, + DsyncGroupDeletedContextActorResponse, +} from './common/interfaces/dsync-group-deleted-context-actor.interface'; + +export type { + DsyncGroupUpdated, + DsyncGroupUpdatedResponse, +} from './common/interfaces/dsync-group-updated.interface'; + +export type { + DsyncGroupUpdatedData, + DsyncGroupUpdatedDataResponse, +} from './common/interfaces/dsync-group-updated-data.interface'; + +export type { + DsyncGroupUpdatedContext, + DsyncGroupUpdatedContextResponse, +} from './common/interfaces/dsync-group-updated-context.interface'; + +export type { + DsyncGroupUpdatedContextGoogleAnalyticsSession, + DsyncGroupUpdatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-group-updated-context-google-analytics-session.interface'; + +export type { + DsyncGroupUpdatedContextActor, + DsyncGroupUpdatedContextActorResponse, +} from './common/interfaces/dsync-group-updated-context-actor.interface'; + +export type { + DsyncGroupUserAdded, + DsyncGroupUserAddedResponse, +} from './common/interfaces/dsync-group-user-added.interface'; + +export type { + DsyncGroupUserAddedData, + DsyncGroupUserAddedDataResponse, +} from './common/interfaces/dsync-group-user-added-data.interface'; + +export type { + DsyncGroupUserAddedDataUser, + DsyncGroupUserAddedDataUserResponse, +} from './common/interfaces/dsync-group-user-added-data-user.interface'; + +export type { + DsyncGroupUserAddedDataUserEmail, + DsyncGroupUserAddedDataUserEmailResponse, +} from './common/interfaces/dsync-group-user-added-data-user-email.interface'; + +export type { + DsyncGroupUserAddedDataUserRole, + DsyncGroupUserAddedDataUserRoleResponse, +} from './common/interfaces/dsync-group-user-added-data-user-role.interface'; + +export type { + DsyncGroupUserAddedDataGroup, + DsyncGroupUserAddedDataGroupResponse, +} from './common/interfaces/dsync-group-user-added-data-group.interface'; + +export type { + DsyncGroupUserAddedContext, + DsyncGroupUserAddedContextResponse, +} from './common/interfaces/dsync-group-user-added-context.interface'; + +export type { + DsyncGroupUserAddedContextGoogleAnalyticsSession, + DsyncGroupUserAddedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-group-user-added-context-google-analytics-session.interface'; + +export type { + DsyncGroupUserAddedContextActor, + DsyncGroupUserAddedContextActorResponse, +} from './common/interfaces/dsync-group-user-added-context-actor.interface'; + +export type { + DsyncUserCreated, + DsyncUserCreatedResponse, +} from './common/interfaces/dsync-user-created.interface'; + +export type { + DsyncUserCreatedData, + DsyncUserCreatedDataResponse, +} from './common/interfaces/dsync-user-created-data.interface'; + +export type { + DsyncUserCreatedDataEmail, + DsyncUserCreatedDataEmailResponse, +} from './common/interfaces/dsync-user-created-data-email.interface'; + +export type { + DsyncUserCreatedDataRole, + DsyncUserCreatedDataRoleResponse, +} from './common/interfaces/dsync-user-created-data-role.interface'; + +export type { + DsyncUserCreatedContext, + DsyncUserCreatedContextResponse, +} from './common/interfaces/dsync-user-created-context.interface'; + +export type { + DsyncUserCreatedContextGoogleAnalyticsSession, + DsyncUserCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-user-created-context-google-analytics-session.interface'; + +export type { + DsyncUserCreatedContextActor, + DsyncUserCreatedContextActorResponse, +} from './common/interfaces/dsync-user-created-context-actor.interface'; + +export type { + DsyncUserDeleted, + DsyncUserDeletedResponse, +} from './common/interfaces/dsync-user-deleted.interface'; + +export type { + DsyncUserDeletedData, + DsyncUserDeletedDataResponse, +} from './common/interfaces/dsync-user-deleted-data.interface'; + +export type { + DsyncUserDeletedDataEmail, + DsyncUserDeletedDataEmailResponse, +} from './common/interfaces/dsync-user-deleted-data-email.interface'; + +export type { + DsyncUserDeletedDataRole, + DsyncUserDeletedDataRoleResponse, +} from './common/interfaces/dsync-user-deleted-data-role.interface'; + +export type { + DsyncUserDeletedContext, + DsyncUserDeletedContextResponse, +} from './common/interfaces/dsync-user-deleted-context.interface'; + +export type { + DsyncUserDeletedContextGoogleAnalyticsSession, + DsyncUserDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-user-deleted-context-google-analytics-session.interface'; + +export type { + DsyncUserDeletedContextActor, + DsyncUserDeletedContextActorResponse, +} from './common/interfaces/dsync-user-deleted-context-actor.interface'; + +export type { + DsyncGroupUserRemoved, + DsyncGroupUserRemovedResponse, +} from './common/interfaces/dsync-group-user-removed.interface'; + +export type { + DsyncGroupUserRemovedData, + DsyncGroupUserRemovedDataResponse, +} from './common/interfaces/dsync-group-user-removed-data.interface'; + +export type { + DsyncGroupUserRemovedDataUser, + DsyncGroupUserRemovedDataUserResponse, +} from './common/interfaces/dsync-group-user-removed-data-user.interface'; + +export type { + DsyncGroupUserRemovedDataUserEmail, + DsyncGroupUserRemovedDataUserEmailResponse, +} from './common/interfaces/dsync-group-user-removed-data-user-email.interface'; + +export type { + DsyncGroupUserRemovedDataUserRole, + DsyncGroupUserRemovedDataUserRoleResponse, +} from './common/interfaces/dsync-group-user-removed-data-user-role.interface'; + +export type { + DsyncGroupUserRemovedDataGroup, + DsyncGroupUserRemovedDataGroupResponse, +} from './common/interfaces/dsync-group-user-removed-data-group.interface'; + +export type { + DsyncGroupUserRemovedContext, + DsyncGroupUserRemovedContextResponse, +} from './common/interfaces/dsync-group-user-removed-context.interface'; + +export type { + DsyncGroupUserRemovedContextGoogleAnalyticsSession, + DsyncGroupUserRemovedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-group-user-removed-context-google-analytics-session.interface'; + +export type { + DsyncGroupUserRemovedContextActor, + DsyncGroupUserRemovedContextActorResponse, +} from './common/interfaces/dsync-group-user-removed-context-actor.interface'; + +export type { + DsyncUserUpdated, + DsyncUserUpdatedResponse, +} from './common/interfaces/dsync-user-updated.interface'; + +export type { + DsyncUserUpdatedData, + DsyncUserUpdatedDataResponse, +} from './common/interfaces/dsync-user-updated-data.interface'; + +export type { + DsyncUserUpdatedDataEmail, + DsyncUserUpdatedDataEmailResponse, +} from './common/interfaces/dsync-user-updated-data-email.interface'; + +export type { + DsyncUserUpdatedDataRole, + DsyncUserUpdatedDataRoleResponse, +} from './common/interfaces/dsync-user-updated-data-role.interface'; + +export type { + DsyncUserUpdatedContext, + DsyncUserUpdatedContextResponse, +} from './common/interfaces/dsync-user-updated-context.interface'; + +export type { + DsyncUserUpdatedContextGoogleAnalyticsSession, + DsyncUserUpdatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/dsync-user-updated-context-google-analytics-session.interface'; + +export type { + DsyncUserUpdatedContextActor, + DsyncUserUpdatedContextActorResponse, +} from './common/interfaces/dsync-user-updated-context-actor.interface'; + +export type { + EmailVerificationCreated, + EmailVerificationCreatedResponse, +} from './common/interfaces/email-verification-created.interface'; + +export type { + EmailVerificationCreatedData, + EmailVerificationCreatedDataResponse, +} from './common/interfaces/email-verification-created-data.interface'; + +export type { + EmailVerificationCreatedContext, + EmailVerificationCreatedContextResponse, +} from './common/interfaces/email-verification-created-context.interface'; + +export type { + EmailVerificationCreatedContextGoogleAnalyticsSession, + EmailVerificationCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/email-verification-created-context-google-analytics-session.interface'; + +export type { + EmailVerificationCreatedContextActor, + EmailVerificationCreatedContextActorResponse, +} from './common/interfaces/email-verification-created-context-actor.interface'; + +export type { + FlagCreated, + FlagCreatedResponse, +} from './common/interfaces/flag-created.interface'; + +export type { + FlagCreatedData, + FlagCreatedDataResponse, +} from './common/interfaces/flag-created-data.interface'; + +export type { + FlagCreatedDataOwner, + FlagCreatedDataOwnerResponse, +} from './common/interfaces/flag-created-data-owner.interface'; + +export type { + FlagCreatedContext, + FlagCreatedContextResponse, +} from './common/interfaces/flag-created-context.interface'; + +export type { + FlagCreatedContextActor, + FlagCreatedContextActorResponse, +} from './common/interfaces/flag-created-context-actor.interface'; + +export type { + FlagDeleted, + FlagDeletedResponse, +} from './common/interfaces/flag-deleted.interface'; + +export type { + FlagDeletedData, + FlagDeletedDataResponse, +} from './common/interfaces/flag-deleted-data.interface'; + +export type { + FlagDeletedDataOwner, + FlagDeletedDataOwnerResponse, +} from './common/interfaces/flag-deleted-data-owner.interface'; + +export type { + FlagDeletedContext, + FlagDeletedContextResponse, +} from './common/interfaces/flag-deleted-context.interface'; + +export type { + FlagDeletedContextActor, + FlagDeletedContextActorResponse, +} from './common/interfaces/flag-deleted-context-actor.interface'; + +export type { + FlagRuleUpdated, + FlagRuleUpdatedResponse, +} from './common/interfaces/flag-rule-updated.interface'; + +export type { + FlagRuleUpdatedData, + FlagRuleUpdatedDataResponse, +} from './common/interfaces/flag-rule-updated-data.interface'; + +export type { + FlagRuleUpdatedDataOwner, + FlagRuleUpdatedDataOwnerResponse, +} from './common/interfaces/flag-rule-updated-data-owner.interface'; + +export type { + FlagRuleUpdatedContext, + FlagRuleUpdatedContextResponse, +} from './common/interfaces/flag-rule-updated-context.interface'; + +export type { + FlagRuleUpdatedContextActor, + FlagRuleUpdatedContextActorResponse, +} from './common/interfaces/flag-rule-updated-context-actor.interface'; + +export type { + FlagRuleUpdatedContextConfiguredTarget, + FlagRuleUpdatedContextConfiguredTargetResponse, +} from './common/interfaces/flag-rule-updated-context-configured-target.interface'; + +export type { + FlagRuleUpdatedContextConfiguredTargetOrganization, + FlagRuleUpdatedContextConfiguredTargetOrganizationResponse, +} from './common/interfaces/flag-rule-updated-context-configured-target-organization.interface'; + +export type { + FlagRuleUpdatedContextConfiguredTargetUser, + FlagRuleUpdatedContextConfiguredTargetUserResponse, +} from './common/interfaces/flag-rule-updated-context-configured-target-user.interface'; + +export type { + FlagRuleUpdatedContextPreviousAttribute, + FlagRuleUpdatedContextPreviousAttributeResponse, +} from './common/interfaces/flag-rule-updated-context-previous-attribute.interface'; + +export type { + FlagRuleUpdatedContextPreviousAttributeData, + FlagRuleUpdatedContextPreviousAttributeDataResponse, +} from './common/interfaces/flag-rule-updated-context-previous-attribute-data.interface'; + +export type { + FlagRuleUpdatedContextPreviousAttributeContext, + FlagRuleUpdatedContextPreviousAttributeContextResponse, +} from './common/interfaces/flag-rule-updated-context-previous-attribute-context.interface'; + +export type { + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget, + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetResponse, +} from './common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target.interface'; + +export type { + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetOrganization, + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetOrganizationResponse, +} from './common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target-organization.interface'; + +export type { + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetUser, + FlagRuleUpdatedContextPreviousAttributeContextConfiguredTargetUserResponse, +} from './common/interfaces/flag-rule-updated-context-previous-attribute-context-configured-target-user.interface'; + +export type { + FlagUpdated, + FlagUpdatedResponse, +} from './common/interfaces/flag-updated.interface'; + +export type { + FlagUpdatedData, + FlagUpdatedDataResponse, +} from './common/interfaces/flag-updated-data.interface'; + +export type { + FlagUpdatedDataOwner, + FlagUpdatedDataOwnerResponse, +} from './common/interfaces/flag-updated-data-owner.interface'; + +export type { + FlagUpdatedContext, + FlagUpdatedContextResponse, +} from './common/interfaces/flag-updated-context.interface'; + +export type { + FlagUpdatedContextActor, + FlagUpdatedContextActorResponse, +} from './common/interfaces/flag-updated-context-actor.interface'; + +export type { + FlagUpdatedContextPreviousAttribute, + FlagUpdatedContextPreviousAttributeResponse, +} from './common/interfaces/flag-updated-context-previous-attribute.interface'; + +export type { + FlagUpdatedContextPreviousAttributeData, + FlagUpdatedContextPreviousAttributeDataResponse, +} from './common/interfaces/flag-updated-context-previous-attribute-data.interface'; + +export type { + InvitationAccepted, + InvitationAcceptedResponse, +} from './common/interfaces/invitation-accepted.interface'; + +export type { + InvitationAcceptedData, + InvitationAcceptedDataResponse, +} from './common/interfaces/invitation-accepted-data.interface'; + +export type { + InvitationAcceptedContext, + InvitationAcceptedContextResponse, +} from './common/interfaces/invitation-accepted-context.interface'; + +export type { + InvitationAcceptedContextGoogleAnalyticsSession, + InvitationAcceptedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/invitation-accepted-context-google-analytics-session.interface'; + +export type { + InvitationAcceptedContextActor, + InvitationAcceptedContextActorResponse, +} from './common/interfaces/invitation-accepted-context-actor.interface'; + +export type { + InvitationCreated, + InvitationCreatedResponse, +} from './common/interfaces/invitation-created.interface'; + +export type { + InvitationCreatedData, + InvitationCreatedDataResponse, +} from './common/interfaces/invitation-created-data.interface'; + +export type { + InvitationCreatedContext, + InvitationCreatedContextResponse, +} from './common/interfaces/invitation-created-context.interface'; + +export type { + InvitationCreatedContextGoogleAnalyticsSession, + InvitationCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/invitation-created-context-google-analytics-session.interface'; + +export type { + InvitationCreatedContextActor, + InvitationCreatedContextActorResponse, +} from './common/interfaces/invitation-created-context-actor.interface'; + +export type { + InvitationResent, + InvitationResentResponse, +} from './common/interfaces/invitation-resent.interface'; + +export type { + InvitationResentData, + InvitationResentDataResponse, +} from './common/interfaces/invitation-resent-data.interface'; + +export type { + InvitationResentContext, + InvitationResentContextResponse, +} from './common/interfaces/invitation-resent-context.interface'; + +export type { + InvitationResentContextGoogleAnalyticsSession, + InvitationResentContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/invitation-resent-context-google-analytics-session.interface'; + +export type { + InvitationResentContextActor, + InvitationResentContextActorResponse, +} from './common/interfaces/invitation-resent-context-actor.interface'; + +export type { + InvitationRevoked, + InvitationRevokedResponse, +} from './common/interfaces/invitation-revoked.interface'; + +export type { + InvitationRevokedData, + InvitationRevokedDataResponse, +} from './common/interfaces/invitation-revoked-data.interface'; + +export type { + InvitationRevokedContext, + InvitationRevokedContextResponse, +} from './common/interfaces/invitation-revoked-context.interface'; + +export type { + InvitationRevokedContextGoogleAnalyticsSession, + InvitationRevokedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/invitation-revoked-context-google-analytics-session.interface'; + +export type { + InvitationRevokedContextActor, + InvitationRevokedContextActorResponse, +} from './common/interfaces/invitation-revoked-context-actor.interface'; + +export type { + MagicAuthCreated, + MagicAuthCreatedResponse, +} from './common/interfaces/magic-auth-created.interface'; + +export type { + MagicAuthCreatedData, + MagicAuthCreatedDataResponse, +} from './common/interfaces/magic-auth-created-data.interface'; + +export type { + MagicAuthCreatedContext, + MagicAuthCreatedContextResponse, +} from './common/interfaces/magic-auth-created-context.interface'; + +export type { + MagicAuthCreatedContextGoogleAnalyticsSession, + MagicAuthCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/magic-auth-created-context-google-analytics-session.interface'; + +export type { + MagicAuthCreatedContextActor, + MagicAuthCreatedContextActorResponse, +} from './common/interfaces/magic-auth-created-context-actor.interface'; + +export type { + OrganizationCreatedData, + OrganizationCreatedDataResponse, +} from './common/interfaces/organization-created-data.interface'; + +export type { + OrganizationCreatedDataDomain, + OrganizationCreatedDataDomainResponse, +} from './common/interfaces/organization-created-data-domain.interface'; + +export type { + OrganizationCreatedContext, + OrganizationCreatedContextResponse, +} from './common/interfaces/organization-created-context.interface'; + +export type { + OrganizationCreatedContextGoogleAnalyticsSession, + OrganizationCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-created-context-google-analytics-session.interface'; + +export type { + OrganizationCreatedContextActor, + OrganizationCreatedContextActorResponse, +} from './common/interfaces/organization-created-context-actor.interface'; + +export type { + OrganizationDeletedData, + OrganizationDeletedDataResponse, +} from './common/interfaces/organization-deleted-data.interface'; + +export type { + OrganizationDeletedDataDomain, + OrganizationDeletedDataDomainResponse, +} from './common/interfaces/organization-deleted-data-domain.interface'; + +export type { + OrganizationDeletedContext, + OrganizationDeletedContextResponse, +} from './common/interfaces/organization-deleted-context.interface'; + +export type { + OrganizationDeletedContextGoogleAnalyticsSession, + OrganizationDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-deleted-context-google-analytics-session.interface'; + +export type { + OrganizationDeletedContextActor, + OrganizationDeletedContextActorResponse, +} from './common/interfaces/organization-deleted-context-actor.interface'; + +export type { + OrganizationDomainCreated, + OrganizationDomainCreatedResponse, +} from './common/interfaces/organization-domain-created.interface'; + +export type { + OrganizationDomainCreatedData, + OrganizationDomainCreatedDataResponse, +} from './common/interfaces/organization-domain-created-data.interface'; + +export type { + OrganizationDomainCreatedContext, + OrganizationDomainCreatedContextResponse, +} from './common/interfaces/organization-domain-created-context.interface'; + +export type { + OrganizationDomainCreatedContextGoogleAnalyticsSession, + OrganizationDomainCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-domain-created-context-google-analytics-session.interface'; + +export type { + OrganizationDomainCreatedContextActor, + OrganizationDomainCreatedContextActorResponse, +} from './common/interfaces/organization-domain-created-context-actor.interface'; + +export type { + OrganizationDomainDeleted, + OrganizationDomainDeletedResponse, +} from './common/interfaces/organization-domain-deleted.interface'; + +export type { + OrganizationDomainDeletedData, + OrganizationDomainDeletedDataResponse, +} from './common/interfaces/organization-domain-deleted-data.interface'; + +export type { + OrganizationDomainDeletedContext, + OrganizationDomainDeletedContextResponse, +} from './common/interfaces/organization-domain-deleted-context.interface'; + +export type { + OrganizationDomainDeletedContextGoogleAnalyticsSession, + OrganizationDomainDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-domain-deleted-context-google-analytics-session.interface'; + +export type { + OrganizationDomainDeletedContextActor, + OrganizationDomainDeletedContextActorResponse, +} from './common/interfaces/organization-domain-deleted-context-actor.interface'; + +export type { + OrganizationDomainUpdated, + OrganizationDomainUpdatedResponse, +} from './common/interfaces/organization-domain-updated.interface'; + +export type { + OrganizationDomainUpdatedData, + OrganizationDomainUpdatedDataResponse, +} from './common/interfaces/organization-domain-updated-data.interface'; + +export type { + OrganizationDomainUpdatedContext, + OrganizationDomainUpdatedContextResponse, +} from './common/interfaces/organization-domain-updated-context.interface'; + +export type { + OrganizationDomainUpdatedContextGoogleAnalyticsSession, + OrganizationDomainUpdatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-domain-updated-context-google-analytics-session.interface'; + +export type { + OrganizationDomainUpdatedContextActor, + OrganizationDomainUpdatedContextActorResponse, +} from './common/interfaces/organization-domain-updated-context-actor.interface'; + +export type { + OrganizationDomainVerificationFailed, + OrganizationDomainVerificationFailedResponse, +} from './common/interfaces/organization-domain-verification-failed.interface'; + +export type { + OrganizationDomainVerificationFailedData, + OrganizationDomainVerificationFailedDataResponse, +} from './common/interfaces/organization-domain-verification-failed-data.interface'; + +export type { + OrganizationDomainVerificationFailedDataOrganizationDomain, + OrganizationDomainVerificationFailedDataOrganizationDomainResponse, +} from './common/interfaces/organization-domain-verification-failed-data-organization-domain.interface'; + +export type { + OrganizationDomainVerificationFailedContext, + OrganizationDomainVerificationFailedContextResponse, +} from './common/interfaces/organization-domain-verification-failed-context.interface'; + +export type { + OrganizationDomainVerificationFailedContextGoogleAnalyticsSession, + OrganizationDomainVerificationFailedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-domain-verification-failed-context-google-analytics-session.interface'; + +export type { + OrganizationDomainVerificationFailedContextActor, + OrganizationDomainVerificationFailedContextActorResponse, +} from './common/interfaces/organization-domain-verification-failed-context-actor.interface'; + +export type { + OrganizationDomainVerified, + OrganizationDomainVerifiedResponse, +} from './common/interfaces/organization-domain-verified.interface'; + +export type { + OrganizationDomainVerifiedData, + OrganizationDomainVerifiedDataResponse, +} from './common/interfaces/organization-domain-verified-data.interface'; + +export type { + OrganizationDomainVerifiedContext, + OrganizationDomainVerifiedContextResponse, +} from './common/interfaces/organization-domain-verified-context.interface'; + +export type { + OrganizationDomainVerifiedContextGoogleAnalyticsSession, + OrganizationDomainVerifiedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-domain-verified-context-google-analytics-session.interface'; + +export type { + OrganizationDomainVerifiedContextActor, + OrganizationDomainVerifiedContextActorResponse, +} from './common/interfaces/organization-domain-verified-context-actor.interface'; + +export type { + OrganizationMembershipCreatedData, + OrganizationMembershipCreatedDataResponse, +} from './common/interfaces/organization-membership-created-data.interface'; + +export type { + OrganizationMembershipCreatedContext, + OrganizationMembershipCreatedContextResponse, +} from './common/interfaces/organization-membership-created-context.interface'; + +export type { + OrganizationMembershipCreatedContextGoogleAnalyticsSession, + OrganizationMembershipCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-membership-created-context-google-analytics-session.interface'; + +export type { + OrganizationMembershipCreatedContextActor, + OrganizationMembershipCreatedContextActorResponse, +} from './common/interfaces/organization-membership-created-context-actor.interface'; + +export type { + OrganizationMembershipDeletedData, + OrganizationMembershipDeletedDataResponse, +} from './common/interfaces/organization-membership-deleted-data.interface'; + +export type { + OrganizationMembershipDeletedContext, + OrganizationMembershipDeletedContextResponse, +} from './common/interfaces/organization-membership-deleted-context.interface'; + +export type { + OrganizationMembershipDeletedContextGoogleAnalyticsSession, + OrganizationMembershipDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-membership-deleted-context-google-analytics-session.interface'; + +export type { + OrganizationMembershipDeletedContextActor, + OrganizationMembershipDeletedContextActorResponse, +} from './common/interfaces/organization-membership-deleted-context-actor.interface'; + +export type { + OrganizationMembershipUpdatedData, + OrganizationMembershipUpdatedDataResponse, +} from './common/interfaces/organization-membership-updated-data.interface'; + +export type { + OrganizationMembershipUpdatedContext, + OrganizationMembershipUpdatedContextResponse, +} from './common/interfaces/organization-membership-updated-context.interface'; + +export type { + OrganizationMembershipUpdatedContextGoogleAnalyticsSession, + OrganizationMembershipUpdatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-membership-updated-context-google-analytics-session.interface'; + +export type { + OrganizationMembershipUpdatedContextActor, + OrganizationMembershipUpdatedContextActorResponse, +} from './common/interfaces/organization-membership-updated-context-actor.interface'; + +export type { + OrganizationRoleCreated, + OrganizationRoleCreatedResponse, +} from './common/interfaces/organization-role-created.interface'; + +export type { + OrganizationRoleCreatedData, + OrganizationRoleCreatedDataResponse, +} from './common/interfaces/organization-role-created-data.interface'; + +export type { + OrganizationRoleCreatedContext, + OrganizationRoleCreatedContextResponse, +} from './common/interfaces/organization-role-created-context.interface'; + +export type { + OrganizationRoleCreatedContextGoogleAnalyticsSession, + OrganizationRoleCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-role-created-context-google-analytics-session.interface'; + +export type { + OrganizationRoleCreatedContextActor, + OrganizationRoleCreatedContextActorResponse, +} from './common/interfaces/organization-role-created-context-actor.interface'; + +export type { + OrganizationRoleDeleted, + OrganizationRoleDeletedResponse, +} from './common/interfaces/organization-role-deleted.interface'; + +export type { + OrganizationRoleDeletedData, + OrganizationRoleDeletedDataResponse, +} from './common/interfaces/organization-role-deleted-data.interface'; + +export type { + OrganizationRoleDeletedContext, + OrganizationRoleDeletedContextResponse, +} from './common/interfaces/organization-role-deleted-context.interface'; + +export type { + OrganizationRoleDeletedContextGoogleAnalyticsSession, + OrganizationRoleDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-role-deleted-context-google-analytics-session.interface'; + +export type { + OrganizationRoleDeletedContextActor, + OrganizationRoleDeletedContextActorResponse, +} from './common/interfaces/organization-role-deleted-context-actor.interface'; + +export type { + OrganizationRoleUpdated, + OrganizationRoleUpdatedResponse, +} from './common/interfaces/organization-role-updated.interface'; + +export type { + OrganizationRoleUpdatedData, + OrganizationRoleUpdatedDataResponse, +} from './common/interfaces/organization-role-updated-data.interface'; + +export type { + OrganizationRoleUpdatedContext, + OrganizationRoleUpdatedContextResponse, +} from './common/interfaces/organization-role-updated-context.interface'; + +export type { + OrganizationRoleUpdatedContextGoogleAnalyticsSession, + OrganizationRoleUpdatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-role-updated-context-google-analytics-session.interface'; + +export type { + OrganizationRoleUpdatedContextActor, + OrganizationRoleUpdatedContextActorResponse, +} from './common/interfaces/organization-role-updated-context-actor.interface'; + +export type { + OrganizationUpdatedData, + OrganizationUpdatedDataResponse, +} from './common/interfaces/organization-updated-data.interface'; + +export type { + OrganizationUpdatedDataDomain, + OrganizationUpdatedDataDomainResponse, +} from './common/interfaces/organization-updated-data-domain.interface'; + +export type { + OrganizationUpdatedContext, + OrganizationUpdatedContextResponse, +} from './common/interfaces/organization-updated-context.interface'; + +export type { + OrganizationUpdatedContextGoogleAnalyticsSession, + OrganizationUpdatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/organization-updated-context-google-analytics-session.interface'; + +export type { + OrganizationUpdatedContextActor, + OrganizationUpdatedContextActorResponse, +} from './common/interfaces/organization-updated-context-actor.interface'; + +export type { + PasswordResetCreated, + PasswordResetCreatedResponse, +} from './common/interfaces/password-reset-created.interface'; + +export type { + PasswordResetCreatedData, + PasswordResetCreatedDataResponse, +} from './common/interfaces/password-reset-created-data.interface'; + +export type { + PasswordResetCreatedContext, + PasswordResetCreatedContextResponse, +} from './common/interfaces/password-reset-created-context.interface'; + +export type { + PasswordResetCreatedContextGoogleAnalyticsSession, + PasswordResetCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/password-reset-created-context-google-analytics-session.interface'; + +export type { + PasswordResetCreatedContextActor, + PasswordResetCreatedContextActorResponse, +} from './common/interfaces/password-reset-created-context-actor.interface'; + +export type { + PasswordResetSucceeded, + PasswordResetSucceededResponse, +} from './common/interfaces/password-reset-succeeded.interface'; + +export type { + PasswordResetSucceededData, + PasswordResetSucceededDataResponse, +} from './common/interfaces/password-reset-succeeded-data.interface'; + +export type { + PasswordResetSucceededContext, + PasswordResetSucceededContextResponse, +} from './common/interfaces/password-reset-succeeded-context.interface'; + +export type { + PasswordResetSucceededContextGoogleAnalyticsSession, + PasswordResetSucceededContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/password-reset-succeeded-context-google-analytics-session.interface'; + +export type { + PasswordResetSucceededContextActor, + PasswordResetSucceededContextActorResponse, +} from './common/interfaces/password-reset-succeeded-context-actor.interface'; + +export type { + PermissionCreated, + PermissionCreatedResponse, +} from './common/interfaces/permission-created.interface'; + +export type { + PermissionCreatedData, + PermissionCreatedDataResponse, +} from './common/interfaces/permission-created-data.interface'; + +export type { + PermissionCreatedContext, + PermissionCreatedContextResponse, +} from './common/interfaces/permission-created-context.interface'; + +export type { + PermissionCreatedContextGoogleAnalyticsSession, + PermissionCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/permission-created-context-google-analytics-session.interface'; + +export type { + PermissionCreatedContextActor, + PermissionCreatedContextActorResponse, +} from './common/interfaces/permission-created-context-actor.interface'; + +export type { + PermissionDeleted, + PermissionDeletedResponse, +} from './common/interfaces/permission-deleted.interface'; + +export type { + PermissionDeletedData, + PermissionDeletedDataResponse, +} from './common/interfaces/permission-deleted-data.interface'; + +export type { + PermissionDeletedContext, + PermissionDeletedContextResponse, +} from './common/interfaces/permission-deleted-context.interface'; + +export type { + PermissionDeletedContextGoogleAnalyticsSession, + PermissionDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/permission-deleted-context-google-analytics-session.interface'; + +export type { + PermissionDeletedContextActor, + PermissionDeletedContextActorResponse, +} from './common/interfaces/permission-deleted-context-actor.interface'; + +export type { + PermissionUpdated, + PermissionUpdatedResponse, +} from './common/interfaces/permission-updated.interface'; + +export type { + PermissionUpdatedData, + PermissionUpdatedDataResponse, +} from './common/interfaces/permission-updated-data.interface'; + +export type { + PermissionUpdatedContext, + PermissionUpdatedContextResponse, +} from './common/interfaces/permission-updated-context.interface'; + +export type { + PermissionUpdatedContextGoogleAnalyticsSession, + PermissionUpdatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/permission-updated-context-google-analytics-session.interface'; + +export type { + PermissionUpdatedContextActor, + PermissionUpdatedContextActorResponse, +} from './common/interfaces/permission-updated-context-actor.interface'; + +export type { + RoleCreated, + RoleCreatedResponse, +} from './common/interfaces/role-created.interface'; + +export type { + RoleCreatedData, + RoleCreatedDataResponse, +} from './common/interfaces/role-created-data.interface'; + +export type { + RoleCreatedContext, + RoleCreatedContextResponse, +} from './common/interfaces/role-created-context.interface'; + +export type { + RoleCreatedContextGoogleAnalyticsSession, + RoleCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/role-created-context-google-analytics-session.interface'; + +export type { + RoleCreatedContextActor, + RoleCreatedContextActorResponse, +} from './common/interfaces/role-created-context-actor.interface'; + +export type { + RoleDeleted, + RoleDeletedResponse, +} from './common/interfaces/role-deleted.interface'; + +export type { + RoleDeletedData, + RoleDeletedDataResponse, +} from './common/interfaces/role-deleted-data.interface'; + +export type { + RoleDeletedContext, + RoleDeletedContextResponse, +} from './common/interfaces/role-deleted-context.interface'; + +export type { + RoleDeletedContextGoogleAnalyticsSession, + RoleDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/role-deleted-context-google-analytics-session.interface'; + +export type { + RoleDeletedContextActor, + RoleDeletedContextActorResponse, +} from './common/interfaces/role-deleted-context-actor.interface'; + +export type { + RoleUpdated, + RoleUpdatedResponse, +} from './common/interfaces/role-updated.interface'; + +export type { + RoleUpdatedData, + RoleUpdatedDataResponse, +} from './common/interfaces/role-updated-data.interface'; + +export type { + RoleUpdatedContext, + RoleUpdatedContextResponse, +} from './common/interfaces/role-updated-context.interface'; + +export type { + RoleUpdatedContextGoogleAnalyticsSession, + RoleUpdatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/role-updated-context-google-analytics-session.interface'; + +export type { + RoleUpdatedContextActor, + RoleUpdatedContextActorResponse, +} from './common/interfaces/role-updated-context-actor.interface'; + +export type { + SessionCreated, + SessionCreatedResponse, +} from './common/interfaces/session-created.interface'; + +export type { + SessionCreatedData, + SessionCreatedDataResponse, +} from './common/interfaces/session-created-data.interface'; + +export type { + SessionCreatedDataImpersonator, + SessionCreatedDataImpersonatorResponse, +} from './common/interfaces/session-created-data-impersonator.interface'; + +export type { + SessionCreatedContext, + SessionCreatedContextResponse, +} from './common/interfaces/session-created-context.interface'; + +export type { + SessionCreatedContextGoogleAnalyticsSession, + SessionCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/session-created-context-google-analytics-session.interface'; + +export type { + SessionCreatedContextActor, + SessionCreatedContextActorResponse, +} from './common/interfaces/session-created-context-actor.interface'; + +export type { + SessionRevoked, + SessionRevokedResponse, +} from './common/interfaces/session-revoked.interface'; + +export type { + SessionRevokedData, + SessionRevokedDataResponse, +} from './common/interfaces/session-revoked-data.interface'; + +export type { + SessionRevokedDataImpersonator, + SessionRevokedDataImpersonatorResponse, +} from './common/interfaces/session-revoked-data-impersonator.interface'; + +export type { + SessionRevokedContext, + SessionRevokedContextResponse, +} from './common/interfaces/session-revoked-context.interface'; + +export type { + SessionRevokedContextGoogleAnalyticsSession, + SessionRevokedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/session-revoked-context-google-analytics-session.interface'; + +export type { + SessionRevokedContextActor, + SessionRevokedContextActorResponse, +} from './common/interfaces/session-revoked-context-actor.interface'; + +export type { + UserCreated, + UserCreatedResponse, +} from './common/interfaces/user-created.interface'; + +export type { + UserCreatedData, + UserCreatedDataResponse, +} from './common/interfaces/user-created-data.interface'; + +export type { + UserCreatedContext, + UserCreatedContextResponse, +} from './common/interfaces/user-created-context.interface'; + +export type { + UserCreatedContextGoogleAnalyticsSession, + UserCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/user-created-context-google-analytics-session.interface'; + +export type { + UserCreatedContextActor, + UserCreatedContextActorResponse, +} from './common/interfaces/user-created-context-actor.interface'; + +export type { + UserDeleted, + UserDeletedResponse, +} from './common/interfaces/user-deleted.interface'; + +export type { + UserDeletedData, + UserDeletedDataResponse, +} from './common/interfaces/user-deleted-data.interface'; + +export type { + UserDeletedContext, + UserDeletedContextResponse, +} from './common/interfaces/user-deleted-context.interface'; + +export type { + UserDeletedContextGoogleAnalyticsSession, + UserDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/user-deleted-context-google-analytics-session.interface'; + +export type { + UserDeletedContextActor, + UserDeletedContextActorResponse, +} from './common/interfaces/user-deleted-context-actor.interface'; + +export type { + UserUpdated, + UserUpdatedResponse, +} from './common/interfaces/user-updated.interface'; + +export type { + UserUpdatedData, + UserUpdatedDataResponse, +} from './common/interfaces/user-updated-data.interface'; + +export type { + UserUpdatedContext, + UserUpdatedContextResponse, +} from './common/interfaces/user-updated-context.interface'; + +export type { + UserUpdatedContextGoogleAnalyticsSession, + UserUpdatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/user-updated-context-google-analytics-session.interface'; + +export type { + UserUpdatedContextActor, + UserUpdatedContextActorResponse, +} from './common/interfaces/user-updated-context-actor.interface'; + +export type { + VaultByokKeyVerificationCompleted, + VaultByokKeyVerificationCompletedResponse, +} from './common/interfaces/vault-byok-key-verification-completed.interface'; + +export type { + VaultByokKeyVerificationCompletedData, + VaultByokKeyVerificationCompletedDataResponse, +} from './common/interfaces/vault-byok-key-verification-completed-data.interface'; + +export type { + VaultByokKeyVerificationCompletedContext, + VaultByokKeyVerificationCompletedContextResponse, +} from './common/interfaces/vault-byok-key-verification-completed-context.interface'; + +export type { + VaultByokKeyVerificationCompletedContextGoogleAnalyticsSession, + VaultByokKeyVerificationCompletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/vault-byok-key-verification-completed-context-google-analytics-session.interface'; + +export type { + VaultByokKeyVerificationCompletedContextActor, + VaultByokKeyVerificationCompletedContextActorResponse, +} from './common/interfaces/vault-byok-key-verification-completed-context-actor.interface'; + +export type { + VaultDataCreated, + VaultDataCreatedResponse, +} from './common/interfaces/vault-data-created.interface'; + +export type { + VaultDataCreatedData, + VaultDataCreatedDataResponse, +} from './common/interfaces/vault-data-created-data.interface'; + +export type { + VaultDataCreatedContext, + VaultDataCreatedContextResponse, +} from './common/interfaces/vault-data-created-context.interface'; + +export type { + VaultDataCreatedContextGoogleAnalyticsSession, + VaultDataCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/vault-data-created-context-google-analytics-session.interface'; + +export type { + VaultDataCreatedContextActor, + VaultDataCreatedContextActorResponse, +} from './common/interfaces/vault-data-created-context-actor.interface'; + +export type { + VaultDataDeleted, + VaultDataDeletedResponse, +} from './common/interfaces/vault-data-deleted.interface'; + +export type { + VaultDataDeletedData, + VaultDataDeletedDataResponse, +} from './common/interfaces/vault-data-deleted-data.interface'; + +export type { + VaultDataDeletedContext, + VaultDataDeletedContextResponse, +} from './common/interfaces/vault-data-deleted-context.interface'; + +export type { + VaultDataDeletedContextGoogleAnalyticsSession, + VaultDataDeletedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/vault-data-deleted-context-google-analytics-session.interface'; + +export type { + VaultDataDeletedContextActor, + VaultDataDeletedContextActorResponse, +} from './common/interfaces/vault-data-deleted-context-actor.interface'; + +export type { + VaultDataRead, + VaultDataReadResponse, +} from './common/interfaces/vault-data-read.interface'; + +export type { + VaultDataReadData, + VaultDataReadDataResponse, +} from './common/interfaces/vault-data-read-data.interface'; + +export type { + VaultDataReadContext, + VaultDataReadContextResponse, +} from './common/interfaces/vault-data-read-context.interface'; + +export type { + VaultDataReadContextGoogleAnalyticsSession, + VaultDataReadContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/vault-data-read-context-google-analytics-session.interface'; + +export type { + VaultDataReadContextActor, + VaultDataReadContextActorResponse, +} from './common/interfaces/vault-data-read-context-actor.interface'; + +export type { + VaultDataUpdated, + VaultDataUpdatedResponse, +} from './common/interfaces/vault-data-updated.interface'; + +export type { + VaultDataUpdatedData, + VaultDataUpdatedDataResponse, +} from './common/interfaces/vault-data-updated-data.interface'; + +export type { + VaultDataUpdatedContext, + VaultDataUpdatedContextResponse, +} from './common/interfaces/vault-data-updated-context.interface'; + +export type { + VaultDataUpdatedContextGoogleAnalyticsSession, + VaultDataUpdatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/vault-data-updated-context-google-analytics-session.interface'; + +export type { + VaultDataUpdatedContextActor, + VaultDataUpdatedContextActorResponse, +} from './common/interfaces/vault-data-updated-context-actor.interface'; + +export type { + VaultDekDecrypted, + VaultDekDecryptedResponse, +} from './common/interfaces/vault-dek-decrypted.interface'; + +export type { + VaultDekDecryptedData, + VaultDekDecryptedDataResponse, +} from './common/interfaces/vault-dek-decrypted-data.interface'; + +export type { + VaultDekDecryptedContext, + VaultDekDecryptedContextResponse, +} from './common/interfaces/vault-dek-decrypted-context.interface'; + +export type { + VaultDekDecryptedContextGoogleAnalyticsSession, + VaultDekDecryptedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/vault-dek-decrypted-context-google-analytics-session.interface'; + +export type { + VaultDekDecryptedContextActor, + VaultDekDecryptedContextActorResponse, +} from './common/interfaces/vault-dek-decrypted-context-actor.interface'; + +export type { + VaultDekRead, + VaultDekReadResponse, +} from './common/interfaces/vault-dek-read.interface'; + +export type { + VaultDekReadData, + VaultDekReadDataResponse, +} from './common/interfaces/vault-dek-read-data.interface'; + +export type { + VaultDekReadContext, + VaultDekReadContextResponse, +} from './common/interfaces/vault-dek-read-context.interface'; + +export type { + VaultDekReadContextGoogleAnalyticsSession, + VaultDekReadContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/vault-dek-read-context-google-analytics-session.interface'; + +export type { + VaultDekReadContextActor, + VaultDekReadContextActorResponse, +} from './common/interfaces/vault-dek-read-context-actor.interface'; + +export type { + VaultKekCreated, + VaultKekCreatedResponse, +} from './common/interfaces/vault-kek-created.interface'; + +export type { + VaultKekCreatedData, + VaultKekCreatedDataResponse, +} from './common/interfaces/vault-kek-created-data.interface'; + +export type { + VaultKekCreatedContext, + VaultKekCreatedContextResponse, +} from './common/interfaces/vault-kek-created-context.interface'; + +export type { + VaultKekCreatedContextGoogleAnalyticsSession, + VaultKekCreatedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/vault-kek-created-context-google-analytics-session.interface'; + +export type { + VaultKekCreatedContextActor, + VaultKekCreatedContextActorResponse, +} from './common/interfaces/vault-kek-created-context-actor.interface'; + +export type { + VaultMetadataRead, + VaultMetadataReadResponse, +} from './common/interfaces/vault-metadata-read.interface'; + +export type { + VaultMetadataReadData, + VaultMetadataReadDataResponse, +} from './common/interfaces/vault-metadata-read-data.interface'; + +export type { + VaultMetadataReadContext, + VaultMetadataReadContextResponse, +} from './common/interfaces/vault-metadata-read-context.interface'; + +export type { + VaultMetadataReadContextGoogleAnalyticsSession, + VaultMetadataReadContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/vault-metadata-read-context-google-analytics-session.interface'; + +export type { + VaultMetadataReadContextActor, + VaultMetadataReadContextActorResponse, +} from './common/interfaces/vault-metadata-read-context-actor.interface'; + +export type { + VaultNamesListed, + VaultNamesListedResponse, +} from './common/interfaces/vault-names-listed.interface'; + +export type { + VaultNamesListedData, + VaultNamesListedDataResponse, +} from './common/interfaces/vault-names-listed-data.interface'; + +export type { + VaultNamesListedContext, + VaultNamesListedContextResponse, +} from './common/interfaces/vault-names-listed-context.interface'; + +export type { + VaultNamesListedContextGoogleAnalyticsSession, + VaultNamesListedContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/vault-names-listed-context-google-analytics-session.interface'; + +export type { + VaultNamesListedContextActor, + VaultNamesListedContextActorResponse, +} from './common/interfaces/vault-names-listed-context-actor.interface'; + +export type { AuthenticationFactorEnrolledType } from './common/interfaces/authentication-factor-enrolled-type.interface'; + +export type { ActionAuthenticationDeniedContextActorSource } from './common/interfaces/action-authentication-denied-context-actor-source.interface'; + +export type { ActionUserRegistrationDeniedContextActorSource } from './common/interfaces/action-user-registration-denied-context-actor-source.interface'; + +export type { ApiKeyCreatedContextActorSource } from './common/interfaces/api-key-created-context-actor-source.interface'; + +export type { ApiKeyRevokedContextActorSource } from './common/interfaces/api-key-revoked-context-actor-source.interface'; + +export type { AuthenticationEmailVerificationFailedContextActorSource } from './common/interfaces/authentication-email-verification-failed-context-actor-source.interface'; + +export type { AuthenticationEmailVerificationSucceededContextActorSource } from './common/interfaces/authentication-email-verification-succeeded-context-actor-source.interface'; + +export type { AuthenticationMagicAuthFailedContextActorSource } from './common/interfaces/authentication-magic-auth-failed-context-actor-source.interface'; + +export type { AuthenticationMagicAuthSucceededContextActorSource } from './common/interfaces/authentication-magic-auth-succeeded-context-actor-source.interface'; + +export type { AuthenticationMfaFailedContextActorSource } from './common/interfaces/authentication-mfa-failed-context-actor-source.interface'; + +export type { AuthenticationMfaSucceededContextActorSource } from './common/interfaces/authentication-mfa-succeeded-context-actor-source.interface'; + +export type { AuthenticationOAuthFailedContextActorSource } from './common/interfaces/authentication-oauth-failed-context-actor-source.interface'; + +export type { AuthenticationOAuthSucceededContextActorSource } from './common/interfaces/authentication-oauth-succeeded-context-actor-source.interface'; + +export type { AuthenticationPasskeyFailedContextActorSource } from './common/interfaces/authentication-passkey-failed-context-actor-source.interface'; + +export type { AuthenticationPasskeySucceededContextActorSource } from './common/interfaces/authentication-passkey-succeeded-context-actor-source.interface'; + +export type { AuthenticationPasswordFailedContextActorSource } from './common/interfaces/authentication-password-failed-context-actor-source.interface'; + +export type { AuthenticationPasswordSucceededContextActorSource } from './common/interfaces/authentication-password-succeeded-context-actor-source.interface'; + +export type { AuthenticationRadarRiskDetectedDataAction } from './common/interfaces/authentication-radar-risk-detected-data-action.interface'; + +export type { AuthenticationRadarRiskDetectedContextActorSource } from './common/interfaces/authentication-radar-risk-detected-context-actor-source.interface'; + +export type { AuthenticationSSOFailedContextActorSource } from './common/interfaces/authentication-sso-failed-context-actor-source.interface'; + +export type { AuthenticationSSOStartedContextActorSource } from './common/interfaces/authentication-sso-started-context-actor-source.interface'; + +export type { AuthenticationSSOSucceededContextActorSource } from './common/interfaces/authentication-sso-succeeded-context-actor-source.interface'; + +export type { AuthenticationSSOTimedOutContextActorSource } from './common/interfaces/authentication-sso-timed-out-context-actor-source.interface'; + +export type { ConnectionActivatedDataState } from './common/interfaces/connection-activated-data-state.interface'; + +export type { ConnectionActivatedDataConnectionType } from './common/interfaces/connection-activated-data-connection-type.interface'; + +export type { ConnectionActivatedDataStatus } from './common/interfaces/connection-activated-data-status.interface'; + +export type { ConnectionActivatedContextActorSource } from './common/interfaces/connection-activated-context-actor-source.interface'; + +export type { ConnectionDeactivatedDataState } from './common/interfaces/connection-deactivated-data-state.interface'; + +export type { ConnectionDeactivatedDataConnectionType } from './common/interfaces/connection-deactivated-data-connection-type.interface'; + +export type { ConnectionDeactivatedDataStatus } from './common/interfaces/connection-deactivated-data-status.interface'; + +export type { ConnectionDeactivatedContextActorSource } from './common/interfaces/connection-deactivated-context-actor-source.interface'; + +export type { ConnectionDeletedDataState } from './common/interfaces/connection-deleted-data-state.interface'; + +export type { ConnectionDeletedDataConnectionType } from './common/interfaces/connection-deleted-data-connection-type.interface'; + +export type { ConnectionDeletedContextActorSource } from './common/interfaces/connection-deleted-context-actor-source.interface'; + +export type { ConnectionSAMLCertificateRenewalRequiredDataCertificateCertificateType } from './common/interfaces/connection-saml-certificate-renewal-required-data-certificate-certificate-type.interface'; + +export type { ConnectionSAMLCertificateRenewalRequiredContextActorSource } from './common/interfaces/connection-saml-certificate-renewal-required-context-actor-source.interface'; + +export type { ConnectionSAMLCertificateRenewedDataCertificateCertificateType } from './common/interfaces/connection-saml-certificate-renewed-data-certificate-certificate-type.interface'; + +export type { ConnectionSAMLCertificateRenewedContextActorSource } from './common/interfaces/connection-saml-certificate-renewed-context-actor-source.interface'; + +export type { DsyncActivatedDataType } from './common/interfaces/dsync-activated-data-type.interface'; + +export type { DsyncActivatedDataState } from './common/interfaces/dsync-activated-data-state.interface'; + +export type { DsyncActivatedContextActorSource } from './common/interfaces/dsync-activated-context-actor-source.interface'; + +export type { DsyncDeactivatedDataType } from './common/interfaces/dsync-deactivated-data-type.interface'; + +export type { DsyncDeactivatedDataState } from './common/interfaces/dsync-deactivated-data-state.interface'; + +export type { DsyncDeactivatedContextActorSource } from './common/interfaces/dsync-deactivated-context-actor-source.interface'; + +export type { DsyncDeletedDataType } from './common/interfaces/dsync-deleted-data-type.interface'; + +export type { DsyncDeletedDataState } from './common/interfaces/dsync-deleted-data-state.interface'; + +export type { DsyncDeletedContextActorSource } from './common/interfaces/dsync-deleted-context-actor-source.interface'; + +export type { DsyncGroupCreatedContextActorSource } from './common/interfaces/dsync-group-created-context-actor-source.interface'; + +export type { DsyncGroupDeletedContextActorSource } from './common/interfaces/dsync-group-deleted-context-actor-source.interface'; + +export type { DsyncGroupUpdatedContextActorSource } from './common/interfaces/dsync-group-updated-context-actor-source.interface'; + +export type { DsyncGroupUserAddedDataUserState } from './common/interfaces/dsync-group-user-added-data-user-state.interface'; + +export type { DsyncGroupUserAddedContextActorSource } from './common/interfaces/dsync-group-user-added-context-actor-source.interface'; + +export type { DsyncUserCreatedDataState } from './common/interfaces/dsync-user-created-data-state.interface'; + +export type { DsyncUserCreatedContextActorSource } from './common/interfaces/dsync-user-created-context-actor-source.interface'; + +export type { DsyncUserDeletedDataState } from './common/interfaces/dsync-user-deleted-data-state.interface'; + +export type { DsyncUserDeletedContextActorSource } from './common/interfaces/dsync-user-deleted-context-actor-source.interface'; + +export type { DsyncGroupUserRemovedDataUserState } from './common/interfaces/dsync-group-user-removed-data-user-state.interface'; + +export type { DsyncGroupUserRemovedContextActorSource } from './common/interfaces/dsync-group-user-removed-context-actor-source.interface'; + +export type { DsyncUserUpdatedDataState } from './common/interfaces/dsync-user-updated-data-state.interface'; + +export type { DsyncUserUpdatedContextActorSource } from './common/interfaces/dsync-user-updated-context-actor-source.interface'; + +export type { EmailVerificationCreatedContextActorSource } from './common/interfaces/email-verification-created-context-actor-source.interface'; + +export type { FlagCreatedContextActorSource } from './common/interfaces/flag-created-context-actor-source.interface'; + +export type { FlagDeletedContextActorSource } from './common/interfaces/flag-deleted-context-actor-source.interface'; + +export type { FlagRuleUpdatedContextAccessType } from './common/interfaces/flag-rule-updated-context-access-type.interface'; + +export type { FlagRuleUpdatedContextActorSource } from './common/interfaces/flag-rule-updated-context-actor-source.interface'; + +export type { FlagRuleUpdatedContextPreviousAttributeContextAccessType } from './common/interfaces/flag-rule-updated-context-previous-attribute-context-access-type.interface'; + +export type { FlagUpdatedContextActorSource } from './common/interfaces/flag-updated-context-actor-source.interface'; + +export type { InvitationAcceptedDataState } from './common/interfaces/invitation-accepted-data-state.interface'; + +export type { InvitationAcceptedContextActorSource } from './common/interfaces/invitation-accepted-context-actor-source.interface'; + +export type { InvitationCreatedDataState } from './common/interfaces/invitation-created-data-state.interface'; + +export type { InvitationCreatedContextActorSource } from './common/interfaces/invitation-created-context-actor-source.interface'; + +export type { InvitationResentDataState } from './common/interfaces/invitation-resent-data-state.interface'; + +export type { InvitationResentContextActorSource } from './common/interfaces/invitation-resent-context-actor-source.interface'; + +export type { InvitationRevokedDataState } from './common/interfaces/invitation-revoked-data-state.interface'; + +export type { InvitationRevokedContextActorSource } from './common/interfaces/invitation-revoked-context-actor-source.interface'; + +export type { MagicAuthCreatedContextActorSource } from './common/interfaces/magic-auth-created-context-actor-source.interface'; + +export type { OrganizationCreatedDataDomainState } from './common/interfaces/organization-created-data-domain-state.interface'; + +export type { OrganizationCreatedDataDomainVerificationStrategy } from './common/interfaces/organization-created-data-domain-verification-strategy.interface'; + +export type { OrganizationCreatedContextActorSource } from './common/interfaces/organization-created-context-actor-source.interface'; + +export type { OrganizationDeletedDataDomainState } from './common/interfaces/organization-deleted-data-domain-state.interface'; + +export type { OrganizationDeletedDataDomainVerificationStrategy } from './common/interfaces/organization-deleted-data-domain-verification-strategy.interface'; + +export type { OrganizationDeletedContextActorSource } from './common/interfaces/organization-deleted-context-actor-source.interface'; + +export type { OrganizationDomainCreatedDataState } from './common/interfaces/organization-domain-created-data-state.interface'; + +export type { OrganizationDomainCreatedDataVerificationStrategy } from './common/interfaces/organization-domain-created-data-verification-strategy.interface'; + +export type { OrganizationDomainCreatedContextActorSource } from './common/interfaces/organization-domain-created-context-actor-source.interface'; + +export type { OrganizationDomainDeletedDataState } from './common/interfaces/organization-domain-deleted-data-state.interface'; + +export type { OrganizationDomainDeletedDataVerificationStrategy } from './common/interfaces/organization-domain-deleted-data-verification-strategy.interface'; + +export type { OrganizationDomainDeletedContextActorSource } from './common/interfaces/organization-domain-deleted-context-actor-source.interface'; + +export type { OrganizationDomainUpdatedDataState } from './common/interfaces/organization-domain-updated-data-state.interface'; + +export type { OrganizationDomainUpdatedDataVerificationStrategy } from './common/interfaces/organization-domain-updated-data-verification-strategy.interface'; + +export type { OrganizationDomainUpdatedContextActorSource } from './common/interfaces/organization-domain-updated-context-actor-source.interface'; + +export type { OrganizationDomainVerificationFailedDataReason } from './common/interfaces/organization-domain-verification-failed-data-reason.interface'; + +export type { OrganizationDomainVerificationFailedDataOrganizationDomainState } from './common/interfaces/organization-domain-verification-failed-data-organization-domain-state.interface'; + +export type { OrganizationDomainVerificationFailedDataOrganizationDomainVerificationStrategy } from './common/interfaces/organization-domain-verification-failed-data-organization-domain-verification-strategy.interface'; + +export type { OrganizationDomainVerificationFailedContextActorSource } from './common/interfaces/organization-domain-verification-failed-context-actor-source.interface'; + +export type { OrganizationDomainVerifiedDataState } from './common/interfaces/organization-domain-verified-data-state.interface'; + +export type { OrganizationDomainVerifiedDataVerificationStrategy } from './common/interfaces/organization-domain-verified-data-verification-strategy.interface'; + +export type { OrganizationDomainVerifiedContextActorSource } from './common/interfaces/organization-domain-verified-context-actor-source.interface'; + +export type { OrganizationMembershipCreatedDataStatus } from './common/interfaces/organization-membership-created-data-status.interface'; + +export type { OrganizationMembershipCreatedContextActorSource } from './common/interfaces/organization-membership-created-context-actor-source.interface'; + +export type { OrganizationMembershipDeletedDataStatus } from './common/interfaces/organization-membership-deleted-data-status.interface'; + +export type { OrganizationMembershipDeletedContextActorSource } from './common/interfaces/organization-membership-deleted-context-actor-source.interface'; + +export type { OrganizationMembershipUpdatedDataStatus } from './common/interfaces/organization-membership-updated-data-status.interface'; + +export type { OrganizationMembershipUpdatedContextActorSource } from './common/interfaces/organization-membership-updated-context-actor-source.interface'; + +export type { OrganizationRoleCreatedContextActorSource } from './common/interfaces/organization-role-created-context-actor-source.interface'; + +export type { OrganizationRoleDeletedContextActorSource } from './common/interfaces/organization-role-deleted-context-actor-source.interface'; + +export type { OrganizationRoleUpdatedContextActorSource } from './common/interfaces/organization-role-updated-context-actor-source.interface'; + +export type { OrganizationUpdatedDataDomainState } from './common/interfaces/organization-updated-data-domain-state.interface'; + +export type { OrganizationUpdatedDataDomainVerificationStrategy } from './common/interfaces/organization-updated-data-domain-verification-strategy.interface'; + +export type { OrganizationUpdatedContextActorSource } from './common/interfaces/organization-updated-context-actor-source.interface'; + +export type { PasswordResetCreatedContextActorSource } from './common/interfaces/password-reset-created-context-actor-source.interface'; + +export type { PasswordResetSucceededContextActorSource } from './common/interfaces/password-reset-succeeded-context-actor-source.interface'; + +export type { PermissionCreatedContextActorSource } from './common/interfaces/permission-created-context-actor-source.interface'; + +export type { PermissionDeletedContextActorSource } from './common/interfaces/permission-deleted-context-actor-source.interface'; + +export type { PermissionUpdatedContextActorSource } from './common/interfaces/permission-updated-context-actor-source.interface'; + +export type { RoleCreatedContextActorSource } from './common/interfaces/role-created-context-actor-source.interface'; + +export type { RoleDeletedContextActorSource } from './common/interfaces/role-deleted-context-actor-source.interface'; + +export type { RoleUpdatedContextActorSource } from './common/interfaces/role-updated-context-actor-source.interface'; + +export type { SessionCreatedDataAuthMethod } from './common/interfaces/session-created-data-auth-method.interface'; + +export type { SessionCreatedDataStatus } from './common/interfaces/session-created-data-status.interface'; + +export type { SessionCreatedContextActorSource } from './common/interfaces/session-created-context-actor-source.interface'; + +export type { SessionRevokedDataAuthMethod } from './common/interfaces/session-revoked-data-auth-method.interface'; + +export type { SessionRevokedDataStatus } from './common/interfaces/session-revoked-data-status.interface'; + +export type { SessionRevokedContextActorSource } from './common/interfaces/session-revoked-context-actor-source.interface'; + +export type { UserCreatedContextActorSource } from './common/interfaces/user-created-context-actor-source.interface'; + +export type { UserDeletedContextActorSource } from './common/interfaces/user-deleted-context-actor-source.interface'; + +export type { UserUpdatedContextActorSource } from './common/interfaces/user-updated-context-actor-source.interface'; + +export type { VaultByokKeyVerificationCompletedDataKeyProvider } from './common/interfaces/vault-byok-key-verification-completed-data-key-provider.interface'; + +export type { VaultByokKeyVerificationCompletedContextActorSource } from './common/interfaces/vault-byok-key-verification-completed-context-actor-source.interface'; + +export type { VaultDataCreatedDataActorSource } from './common/interfaces/vault-data-created-data-actor-source.interface'; + +export type { VaultDataCreatedContextActorSource } from './common/interfaces/vault-data-created-context-actor-source.interface'; + +export type { VaultDataDeletedDataActorSource } from './common/interfaces/vault-data-deleted-data-actor-source.interface'; + +export type { VaultDataDeletedContextActorSource } from './common/interfaces/vault-data-deleted-context-actor-source.interface'; + +export type { VaultDataReadDataActorSource } from './common/interfaces/vault-data-read-data-actor-source.interface'; + +export type { VaultDataReadContextActorSource } from './common/interfaces/vault-data-read-context-actor-source.interface'; + +export type { VaultDataUpdatedDataActorSource } from './common/interfaces/vault-data-updated-data-actor-source.interface'; + +export type { VaultDataUpdatedContextActorSource } from './common/interfaces/vault-data-updated-context-actor-source.interface'; + +export type { VaultDekDecryptedDataActorSource } from './common/interfaces/vault-dek-decrypted-data-actor-source.interface'; + +export type { VaultDekDecryptedContextActorSource } from './common/interfaces/vault-dek-decrypted-context-actor-source.interface'; + +export type { VaultDekReadDataActorSource } from './common/interfaces/vault-dek-read-data-actor-source.interface'; + +export type { VaultDekReadContextActorSource } from './common/interfaces/vault-dek-read-context-actor-source.interface'; + +export type { VaultKekCreatedDataActorSource } from './common/interfaces/vault-kek-created-data-actor-source.interface'; + +export type { VaultKekCreatedContextActorSource } from './common/interfaces/vault-kek-created-context-actor-source.interface'; + +export type { VaultMetadataReadDataActorSource } from './common/interfaces/vault-metadata-read-data-actor-source.interface'; + +export type { VaultMetadataReadContextActorSource } from './common/interfaces/vault-metadata-read-context-actor-source.interface'; + +export type { VaultNamesListedDataActorSource } from './common/interfaces/vault-names-listed-data-actor-source.interface'; + +export type { VaultNamesListedContextActorSource } from './common/interfaces/vault-names-listed-context-actor-source.interface'; + +export type { ListDataType } from './common/interfaces/list-data-type.interface'; + +export type { AuthorizationOrder } from './authorization/interfaces/authorization-order.interface'; + +export type { AuthorizationAssignment } from './authorization/interfaces/authorization-assignment.interface'; + +export type { PermissionsOrder } from './authorization/interfaces/permissions-order.interface'; + +export type { ApplicationsOrder } from './connect/interfaces/applications-order.interface'; + +export type { ConnectionsOrder } from './sso/interfaces/connections-order.interface'; + +export type { ConnectionsConnectionType } from './sso/interfaces/connections-connection-type.interface'; + +export type { DirectoriesOrder } from './directory-sync/interfaces/directories-order.interface'; + +export type { DirectoryGroupsOrder } from './directory-sync/interfaces/directory-groups-order.interface'; + +export type { DirectoryUsersOrder } from './directory-sync/interfaces/directory-users-order.interface'; + +export type { EventsOrder } from './events/interfaces/events-order.interface'; + +export type { FeatureFlagsOrder } from './feature-flags/interfaces/feature-flags-order.interface'; + +export type { OrganizationsOrder } from './organizations/interfaces/organizations-order.interface'; + +export type { OrganizationsApiKeysOrder } from './api-keys/interfaces/organizations-api-keys-order.interface'; + +export type { OrganizationsFeatureFlagsOrder } from './feature-flags/interfaces/organizations-feature-flags-order.interface'; + +export type { SSOProvider } from './sso/interfaces/sso-provider.interface'; + +export type { UserManagementAuthenticationScreenHint } from './user-management/interfaces/user-management-authentication-screen-hint.interface'; + +export type { UserManagementAuthenticationProvider } from './user-management/interfaces/user-management-authentication-provider.interface'; + +export type { UserManagementUsersOrder } from './user-management/interfaces/user-management-users-order.interface'; + +export type { UserManagementInvitationsOrder } from './user-management/interfaces/user-management-invitations-order.interface'; + +export type { UserManagementOrganizationMembershipOrder } from './user-management/interfaces/user-management-organization-membership-order.interface'; + +export type { UserManagementOrganizationMembershipStatuses } from './user-management/interfaces/user-management-organization-membership-statuses.interface'; + +export type { UserManagementUsersFeatureFlagsOrder } from './feature-flags/interfaces/user-management-users-feature-flags-order.interface'; + +export type { UserManagementUsersAuthorizedApplicationsOrder } from './user-management/interfaces/user-management-users-authorized-applications-order.interface'; + +export type { AuditLogsOrder } from './audit-logs/interfaces/audit-logs-order.interface'; + +export type { + EventContextActor, + EventContextActorResponse, +} from './common/interfaces/event-context-actor.interface'; + +export type { + EventContext, + EventContextResponse, +} from './common/interfaces/event-context.interface'; + +export type { + DirectoryUserEmail, + DirectoryUserEmailResponse, +} from './common/interfaces/directory-user-email.interface'; + +export type { + EventContextGoogleAnalyticsSession, + EventContextGoogleAnalyticsSessionResponse, +} from './common/interfaces/event-context-google-analytics-session.interface'; + +export type { EventContextActorSource } from './common/interfaces/event-context-actor-source.interface'; + +export type { DirectoryUserState } from './common/interfaces/directory-user-state.interface'; diff --git a/src/index.worker.ts b/src/index.worker.ts index c7cbfe685..1ecda1682 100644 --- a/src/index.worker.ts +++ b/src/index.worker.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { Actions } from './actions/actions'; import { CryptoProvider } from './common/crypto/crypto-provider'; import { SubtleCryptoProvider } from './common/crypto/subtle-crypto-provider'; @@ -86,3 +88,5 @@ class WorkOSWorker extends WorkOS { } export { WorkOSWorker as WorkOS }; + +export * from './index'; diff --git a/src/mfa/interfaces/authentication-challenge-verify-response.interface.ts b/src/mfa/interfaces/authentication-challenge-verify-response.interface.ts new file mode 100644 index 000000000..b9ccdb5a3 --- /dev/null +++ b/src/mfa/interfaces/authentication-challenge-verify-response.interface.ts @@ -0,0 +1,17 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationChallenge, + AuthenticationChallengeResponse, +} from './authentication-challenge.interface'; + +export interface AuthenticationChallengeVerifyResponse { + challenge: AuthenticationChallenge; + /** Whether the code was valid. */ + valid: boolean; +} + +export interface AuthenticationChallengeVerifyResponseWire { + challenge: AuthenticationChallengeResponse; + valid: boolean; +} diff --git a/src/mfa/interfaces/authentication-challenge.interface.ts b/src/mfa/interfaces/authentication-challenge.interface.ts new file mode 100644 index 000000000..415049846 --- /dev/null +++ b/src/mfa/interfaces/authentication-challenge.interface.ts @@ -0,0 +1,29 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The authentication challenge object. */ +export interface AuthenticationChallenge { + /** Distinguishes the authentication challenge object. */ + object: 'authentication_challenge'; + /** The unique ID of the authentication challenge. */ + id: string; + /** The timestamp when the challenge will expire. Does not apply to TOTP factors. */ + expiresAt?: string; + /** The one-time code for the challenge. */ + code?: string; + /** The unique ID of the authentication factor the challenge belongs to. */ + authenticationFactorId: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface AuthenticationChallengeResponse { + object: 'authentication_challenge'; + id: string; + expires_at?: string; + code?: string; + authentication_factor_id: string; + created_at: string; + updated_at: string; +} diff --git a/src/mfa/interfaces/authentication-challenges-verify-request.interface.ts b/src/mfa/interfaces/authentication-challenges-verify-request.interface.ts new file mode 100644 index 000000000..be147fe0c --- /dev/null +++ b/src/mfa/interfaces/authentication-challenges-verify-request.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VerifyEmailAddress, + VerifyEmailAddressResponse, +} from '../../user-management/interfaces/verify-email-address.interface'; + +export type AuthenticationChallengesVerifyRequest = VerifyEmailAddress; +export type AuthenticationChallengesVerifyRequestResponse = + VerifyEmailAddressResponse; diff --git a/src/mfa/interfaces/authentication-factor-sms.interface.ts b/src/mfa/interfaces/authentication-factor-sms.interface.ts new file mode 100644 index 000000000..404aa35c3 --- /dev/null +++ b/src/mfa/interfaces/authentication-factor-sms.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +/** SMS-based authentication factor details. */ +export interface AuthenticationFactorSms { + /** The user's phone number for SMS-based authentication. */ + phoneNumber: string; +} + +export interface AuthenticationFactorSmsResponse { + phone_number: string; +} diff --git a/src/mfa/interfaces/authentication-factor-totp.interface.ts b/src/mfa/interfaces/authentication-factor-totp.interface.ts new file mode 100644 index 000000000..21940a6cd --- /dev/null +++ b/src/mfa/interfaces/authentication-factor-totp.interface.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuthenticationFactorTotp { + /** Your application or company name displayed in the user's authenticator app. Defaults to your WorkOS team name. */ + issuer: string; + /** The user's account name displayed in their authenticator app. Defaults to the user's email. */ + user: string; + /** TOTP secret that can be manually entered into some authenticator apps in place of scanning a QR code. */ + secret: string; + /** Base64 encoded image containing scannable QR code. */ + qrCode: string; + /** The `otpauth` URI that is encoded by the provided `qr_code`. */ + uri: string; +} + +export interface AuthenticationFactorTotpResponse { + issuer: string; + user: string; + secret: string; + qr_code: string; + uri: string; +} diff --git a/src/mfa/interfaces/authentication-factor.interface.ts b/src/mfa/interfaces/authentication-factor.interface.ts new file mode 100644 index 000000000..f1976e636 --- /dev/null +++ b/src/mfa/interfaces/authentication-factor.interface.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorSms, + AuthenticationFactorSmsResponse, +} from './authentication-factor-sms.interface'; +import type { + AuthenticationFactorTotp, + AuthenticationFactorTotpResponse, +} from './authentication-factor-totp.interface'; +import type { AuthenticationFactorType } from '../../common/interfaces/authentication-factor-type.interface'; + +/** The [authentication factor](https://workos.com/docs/reference/authkit/mfa/authentication-factor) object that represents the additional authentication method used on top of the existing authentication strategy. */ +export interface AuthenticationFactor { + /** Distinguishes the authentication factor object. */ + object: 'authentication_factor'; + /** The unique ID of the factor. */ + id: string; + /** The type of the factor to enroll. */ + type: AuthenticationFactorType; + /** The ID of the [user](https://workos.com/docs/reference/authkit/user). */ + userId?: string; + /** SMS-based authentication factor details. */ + sms?: AuthenticationFactorSms; + /** TOTP-based authentication factor details. */ + totp?: AuthenticationFactorTotp; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface AuthenticationFactorResponse { + object: 'authentication_factor'; + id: string; + type: AuthenticationFactorType; + user_id?: string; + sms?: AuthenticationFactorSmsResponse; + totp?: AuthenticationFactorTotpResponse; + created_at: string; + updated_at: string; +} diff --git a/src/mfa/interfaces/authentication-factors-create-request.interface.ts b/src/mfa/interfaces/authentication-factors-create-request.interface.ts new file mode 100644 index 000000000..f4f5b9bba --- /dev/null +++ b/src/mfa/interfaces/authentication-factors-create-request.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationFactorsCreateRequestType } from '../../common/interfaces/authentication-factors-create-request-type.interface'; + +export interface AuthenticationFactorsCreateRequest { + /** The type of factor to enroll. */ + type: AuthenticationFactorsCreateRequestType; + /** Required when type is 'sms'. */ + phoneNumber?: string; + /** Required when type is 'totp'. */ + totpIssuer?: string; + /** Required when type is 'totp'. */ + totpUser?: string; + /** The ID of the user to associate the factor with. */ + userId?: string; +} + +export interface AuthenticationFactorsCreateRequestResponse { + type: AuthenticationFactorsCreateRequestType; + phone_number?: string; + totp_issuer?: string; + totp_user?: string; + user_id?: string; +} diff --git a/src/mfa/interfaces/challenge-authentication-factor.interface.ts b/src/mfa/interfaces/challenge-authentication-factor.interface.ts new file mode 100644 index 000000000..09bbd3d41 --- /dev/null +++ b/src/mfa/interfaces/challenge-authentication-factor.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface ChallengeAuthenticationFactor { + /** A custom template for the SMS message. Use the {{code}} placeholder to include the verification code. */ + smsTemplate?: string; +} + +export interface ChallengeAuthenticationFactorResponse { + sms_template?: string; +} diff --git a/src/mfa/interfaces/index.ts b/src/mfa/interfaces/index.ts index 5cb81eca5..eb3609f28 100644 --- a/src/mfa/interfaces/index.ts +++ b/src/mfa/interfaces/index.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + export * from './challenge-factor-options'; export * from './challenge.interface'; export * from './enroll-factor-options'; @@ -6,3 +8,19 @@ export * from './sms.interface'; export * from './totp.interface'; export * from './verify-challenge-options'; export * from './verify-challenge-response'; + +export * from './authentication-challenge-verify-response.interface'; + +export * from './authentication-challenge.interface'; + +export * from './authentication-challenges-verify-request.interface'; + +export * from './authentication-factor-sms.interface'; + +export * from './authentication-factor-totp.interface'; + +export * from './authentication-factor.interface'; + +export * from './authentication-factors-create-request.interface'; + +export * from './challenge-authentication-factor.interface'; diff --git a/src/mfa/mfa.ts b/src/mfa/mfa.ts index fc574c44d..aea02318c 100644 --- a/src/mfa/mfa.ts +++ b/src/mfa/mfa.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { WorkOS } from '../workos'; import { Challenge, @@ -22,10 +24,28 @@ import { export class Mfa { constructor(private readonly workos: WorkOS) {} + /** + * Delete Factor + * + * Permanently deletes an Authentication Factor. It cannot be undone. + * @param id - The unique ID of the Factor. + * @example "auth_factor_01FVYZ5QM8N98T9ME5BCB2BBMJ" + * @returns {void} + * @throws {NotFoundException} 404 + */ async deleteFactor(id: string) { await this.workos.delete(`/auth/factors/${id}`); } + /** + * Get Factor + * + * Gets an Authentication Factor. + * @param id - The unique ID of the Factor. + * @example "auth_factor_01FVYZ5QM8N98T9ME5BCB2BBMJ" + * @returns {AuthenticationFactor} + * @throws {NotFoundException} 404 + */ async getFactor(id: string): Promise { const { data } = await this.workos.get( `/auth/factors/${id}`, @@ -34,6 +54,14 @@ export class Mfa { return deserializeFactor(data); } + /** + * Enroll Factor + * + * Enrolls an Authentication Factor to be used as an additional factor of authentication. The returned ID should be used to create an authentication Challenge. + * @param payload - Object containing type. + * @returns {AuthenticationFactor} + * @throws {UnprocessableEntityException} 422 + */ async enrollFactor(options: EnrollFactorOptions): Promise { const { data } = await this.workos.post( '/auth/factors/enroll', @@ -60,6 +88,17 @@ export class Mfa { return deserializeFactorWithSecrets(data); } + /** + * Challenge Factor + * + * Creates a Challenge for an Authentication Factor. + * @param id - The unique ID of the Authentication Factor to be challenged. + * @example "auth_factor_01FVYZ5QM8N98T9ME5BCB2BBMJ" + * @param payload - The request body. + * @returns {AuthenticationChallenge} + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async challengeFactor(options: ChallengeFactorOptions): Promise { const { data } = await this.workos.post( `/auth/factors/${options.authenticationFactorId}/challenge`, @@ -72,6 +111,18 @@ export class Mfa { return deserializeChallenge(data); } + /** + * Verify Challenge + * + * Verifies an Authentication Challenge. + * @param id - The unique ID of the Authentication Challenge. + * @example "auth_challenge_01FVYZ5QM8N98T9ME5BCB2BBMJ" + * @param payload - Object containing code. + * @returns {AuthenticationChallengeVerifyResponse} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async verifyChallenge( options: VerifyChallengeOptions, ): Promise { diff --git a/src/mfa/serializers/authentication-challenge.serializer.ts b/src/mfa/serializers/authentication-challenge.serializer.ts new file mode 100644 index 000000000..6b9bb8ce5 --- /dev/null +++ b/src/mfa/serializers/authentication-challenge.serializer.ts @@ -0,0 +1,30 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationChallenge, + AuthenticationChallengeResponse, +} from '../interfaces/authentication-challenge.interface'; + +export const deserializeAuthenticationChallenge = ( + response: AuthenticationChallengeResponse, +): AuthenticationChallenge => ({ + object: response.object, + id: response.id, + expiresAt: response.expires_at, + code: response.code, + authenticationFactorId: response.authentication_factor_id, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeAuthenticationChallenge = ( + model: AuthenticationChallenge, +): AuthenticationChallengeResponse => ({ + object: model.object, + id: model.id, + expires_at: model.expiresAt, + code: model.code, + authentication_factor_id: model.authenticationFactorId, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/mfa/serializers/authentication-factor-sms.serializer.ts b/src/mfa/serializers/authentication-factor-sms.serializer.ts new file mode 100644 index 000000000..d217ee803 --- /dev/null +++ b/src/mfa/serializers/authentication-factor-sms.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorSms, + AuthenticationFactorSmsResponse, +} from '../interfaces/authentication-factor-sms.interface'; + +export const deserializeAuthenticationFactorSms = ( + response: AuthenticationFactorSmsResponse, +): AuthenticationFactorSms => ({ + phoneNumber: response.phone_number, +}); + +export const serializeAuthenticationFactorSms = ( + model: AuthenticationFactorSms, +): AuthenticationFactorSmsResponse => ({ + phone_number: model.phoneNumber, +}); diff --git a/src/mfa/serializers/authentication-factor-totp.serializer.ts b/src/mfa/serializers/authentication-factor-totp.serializer.ts new file mode 100644 index 000000000..b91c283b0 --- /dev/null +++ b/src/mfa/serializers/authentication-factor-totp.serializer.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorTotp, + AuthenticationFactorTotpResponse, +} from '../interfaces/authentication-factor-totp.interface'; + +export const deserializeAuthenticationFactorTotp = ( + response: AuthenticationFactorTotpResponse, +): AuthenticationFactorTotp => ({ + issuer: response.issuer, + user: response.user, + secret: response.secret, + qrCode: response.qr_code, + uri: response.uri, +}); + +export const serializeAuthenticationFactorTotp = ( + model: AuthenticationFactorTotp, +): AuthenticationFactorTotpResponse => ({ + issuer: model.issuer, + user: model.user, + secret: model.secret, + qr_code: model.qrCode, + uri: model.uri, +}); diff --git a/src/mfa/serializers/authentication-factor.serializer.ts b/src/mfa/serializers/authentication-factor.serializer.ts new file mode 100644 index 000000000..29bcfd413 --- /dev/null +++ b/src/mfa/serializers/authentication-factor.serializer.ts @@ -0,0 +1,50 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactor, + AuthenticationFactorResponse, +} from '../interfaces/authentication-factor.interface'; +import { + deserializeAuthenticationFactorSms, + serializeAuthenticationFactorSms, +} from './authentication-factor-sms.serializer'; +import { + deserializeAuthenticationFactorTotp, + serializeAuthenticationFactorTotp, +} from './authentication-factor-totp.serializer'; + +export const deserializeAuthenticationFactor = ( + response: AuthenticationFactorResponse, +): AuthenticationFactor => ({ + object: response.object, + id: response.id, + type: response.type, + userId: response.user_id, + sms: + response.sms != null + ? deserializeAuthenticationFactorSms(response.sms) + : undefined, + totp: + response.totp != null + ? deserializeAuthenticationFactorTotp(response.totp) + : undefined, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeAuthenticationFactor = ( + model: AuthenticationFactor, +): AuthenticationFactorResponse => ({ + object: model.object, + id: model.id, + type: model.type, + user_id: model.userId, + sms: + model.sms != null ? serializeAuthenticationFactorSms(model.sms) : undefined, + totp: + model.totp != null + ? serializeAuthenticationFactorTotp(model.totp) + : undefined, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/mfa/serializers/authentication-factors-create-request.serializer.ts b/src/mfa/serializers/authentication-factors-create-request.serializer.ts new file mode 100644 index 000000000..e609dcefd --- /dev/null +++ b/src/mfa/serializers/authentication-factors-create-request.serializer.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorsCreateRequest, + AuthenticationFactorsCreateRequestResponse, +} from '../interfaces/authentication-factors-create-request.interface'; + +export const deserializeAuthenticationFactorsCreateRequest = ( + response: AuthenticationFactorsCreateRequestResponse, +): AuthenticationFactorsCreateRequest => ({ + type: response.type, + phoneNumber: response.phone_number, + totpIssuer: response.totp_issuer, + totpUser: response.totp_user, + userId: response.user_id, +}); + +export const serializeAuthenticationFactorsCreateRequest = ( + model: AuthenticationFactorsCreateRequest, +): AuthenticationFactorsCreateRequestResponse => ({ + type: model.type, + phone_number: model.phoneNumber, + totp_issuer: model.totpIssuer, + totp_user: model.totpUser, + user_id: model.userId, +}); diff --git a/src/mfa/serializers/challenge-authentication-factor.serializer.ts b/src/mfa/serializers/challenge-authentication-factor.serializer.ts new file mode 100644 index 000000000..bb7105bb1 --- /dev/null +++ b/src/mfa/serializers/challenge-authentication-factor.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ChallengeAuthenticationFactor, + ChallengeAuthenticationFactorResponse, +} from '../interfaces/challenge-authentication-factor.interface'; + +export const deserializeChallengeAuthenticationFactor = ( + response: ChallengeAuthenticationFactorResponse, +): ChallengeAuthenticationFactor => ({ + smsTemplate: response.sms_template, +}); + +export const serializeChallengeAuthenticationFactor = ( + model: ChallengeAuthenticationFactor, +): ChallengeAuthenticationFactorResponse => ({ + sms_template: model.smsTemplate, +}); diff --git a/src/multi-factor-auth/interfaces/authentication-challenge-verify-response.interface.ts b/src/multi-factor-auth/interfaces/authentication-challenge-verify-response.interface.ts new file mode 100644 index 000000000..0202ae771 --- /dev/null +++ b/src/multi-factor-auth/interfaces/authentication-challenge-verify-response.interface.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationChallenge, + AuthenticationChallengeResponse, +} from './authentication-challenge.interface'; + +export interface AuthenticationChallengeVerifyResponse { + /** The authentication challenge object. */ + challenge: AuthenticationChallenge; + /** Whether the code was valid. */ + valid: boolean; +} + +export interface AuthenticationChallengeVerifyResponseWire { + challenge: AuthenticationChallengeResponse; + valid: boolean; +} diff --git a/src/multi-factor-auth/interfaces/authentication-challenge.interface.ts b/src/multi-factor-auth/interfaces/authentication-challenge.interface.ts new file mode 100644 index 000000000..210b740e4 --- /dev/null +++ b/src/multi-factor-auth/interfaces/authentication-challenge.interface.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuthenticationChallenge { + /** Distinguishes the authentication challenge object. */ + object: 'authentication_challenge'; + /** The unique ID of the authentication challenge. */ + id: string; + /** The timestamp when the challenge will expire. Does not apply to TOTP factors. */ + expiresAt?: string; + /** The one-time code for the challenge. */ + code?: string; + /** The unique ID of the authentication factor the challenge belongs to. */ + authenticationFactorId: string; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface AuthenticationChallengeResponse { + object: 'authentication_challenge'; + id: string; + expires_at?: string; + code?: string; + authentication_factor_id: string; + created_at: string; + updated_at: string; +} diff --git a/src/multi-factor-auth/interfaces/authentication-challenges-verify-request.interface.ts b/src/multi-factor-auth/interfaces/authentication-challenges-verify-request.interface.ts new file mode 100644 index 000000000..be147fe0c --- /dev/null +++ b/src/multi-factor-auth/interfaces/authentication-challenges-verify-request.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VerifyEmailAddress, + VerifyEmailAddressResponse, +} from '../../user-management/interfaces/verify-email-address.interface'; + +export type AuthenticationChallengesVerifyRequest = VerifyEmailAddress; +export type AuthenticationChallengesVerifyRequestResponse = + VerifyEmailAddressResponse; diff --git a/src/multi-factor-auth/interfaces/authentication-factor-enrolled-sms.interface.ts b/src/multi-factor-auth/interfaces/authentication-factor-enrolled-sms.interface.ts new file mode 100644 index 000000000..63ec1a7d9 --- /dev/null +++ b/src/multi-factor-auth/interfaces/authentication-factor-enrolled-sms.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorSms, + AuthenticationFactorSmsResponse, +} from './authentication-factor-sms.interface'; + +export type AuthenticationFactorEnrolledSms = AuthenticationFactorSms; +export type AuthenticationFactorEnrolledSmsResponse = + AuthenticationFactorSmsResponse; diff --git a/src/multi-factor-auth/interfaces/authentication-factor-enrolled-totp.interface.ts b/src/multi-factor-auth/interfaces/authentication-factor-enrolled-totp.interface.ts new file mode 100644 index 000000000..299ec2139 --- /dev/null +++ b/src/multi-factor-auth/interfaces/authentication-factor-enrolled-totp.interface.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by oagen. Do not edit. + +/** TOTP-based authentication factor details. Includes enrollment secrets only available at creation time. */ +export interface AuthenticationFactorEnrolledTotp { + /** Your application or company name displayed in the user's authenticator app. Defaults to your WorkOS team name. */ + issuer: string; + /** The user's account name displayed in their authenticator app. Defaults to the user's email. */ + user: string; + /** TOTP secret that can be manually entered into some authenticator apps in place of scanning a QR code. */ + secret: string; + /** Base64 encoded image containing scannable QR code. */ + qrCode: string; + /** The `otpauth` URI that is encoded by the provided `qr_code`. */ + uri: string; +} + +export interface AuthenticationFactorEnrolledTotpResponse { + issuer: string; + user: string; + secret: string; + qr_code: string; + uri: string; +} diff --git a/src/multi-factor-auth/interfaces/authentication-factor-enrolled.interface.ts b/src/multi-factor-auth/interfaces/authentication-factor-enrolled.interface.ts new file mode 100644 index 000000000..684f33ffd --- /dev/null +++ b/src/multi-factor-auth/interfaces/authentication-factor-enrolled.interface.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorEnrolledSms, + AuthenticationFactorEnrolledSmsResponse, +} from './authentication-factor-enrolled-sms.interface'; +import type { + AuthenticationFactorEnrolledTotp, + AuthenticationFactorEnrolledTotpResponse, +} from './authentication-factor-enrolled-totp.interface'; +import type { AuthenticationFactorEnrolledType } from '../../common/interfaces/authentication-factor-enrolled-type.interface'; + +export interface AuthenticationFactorEnrolled { + /** Distinguishes the authentication factor object. */ + object: 'authentication_factor'; + /** The unique ID of the factor. */ + id: string; + /** The type of the factor to enroll. */ + type: AuthenticationFactorEnrolledType; + /** The ID of the [user](https://workos.com/docs/reference/authkit/user). */ + userId?: string; + /** SMS-based authentication factor details. */ + sms?: AuthenticationFactorEnrolledSms; + /** TOTP-based authentication factor details. Includes enrollment secrets only available at creation time. */ + totp?: AuthenticationFactorEnrolledTotp; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface AuthenticationFactorEnrolledResponse { + object: 'authentication_factor'; + id: string; + type: AuthenticationFactorEnrolledType; + user_id?: string; + sms?: AuthenticationFactorEnrolledSmsResponse; + totp?: AuthenticationFactorEnrolledTotpResponse; + created_at: string; + updated_at: string; +} diff --git a/src/multi-factor-auth/interfaces/authentication-factor-sms.interface.ts b/src/multi-factor-auth/interfaces/authentication-factor-sms.interface.ts new file mode 100644 index 000000000..404aa35c3 --- /dev/null +++ b/src/multi-factor-auth/interfaces/authentication-factor-sms.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +/** SMS-based authentication factor details. */ +export interface AuthenticationFactorSms { + /** The user's phone number for SMS-based authentication. */ + phoneNumber: string; +} + +export interface AuthenticationFactorSmsResponse { + phone_number: string; +} diff --git a/src/multi-factor-auth/interfaces/authentication-factor-totp.interface.ts b/src/multi-factor-auth/interfaces/authentication-factor-totp.interface.ts new file mode 100644 index 000000000..a153e1575 --- /dev/null +++ b/src/multi-factor-auth/interfaces/authentication-factor-totp.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +/** TOTP-based authentication factor details. */ +export interface AuthenticationFactorTotp { + /** Your application or company name displayed in the user's authenticator app. Defaults to your WorkOS team name. */ + issuer: string; + /** The user's account name displayed in their authenticator app. Defaults to the user's email. */ + user: string; +} + +export interface AuthenticationFactorTotpResponse { + issuer: string; + user: string; +} diff --git a/src/multi-factor-auth/interfaces/authentication-factor.interface.ts b/src/multi-factor-auth/interfaces/authentication-factor.interface.ts new file mode 100644 index 000000000..2127f3f20 --- /dev/null +++ b/src/multi-factor-auth/interfaces/authentication-factor.interface.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorSms, + AuthenticationFactorSmsResponse, +} from './authentication-factor-sms.interface'; +import type { + AuthenticationFactorTotp, + AuthenticationFactorTotpResponse, +} from './authentication-factor-totp.interface'; +import type { AuthenticationFactorType } from '../../common/interfaces/authentication-factor-type.interface'; + +export interface AuthenticationFactor { + /** Distinguishes the authentication factor object. */ + object: 'authentication_factor'; + /** The unique ID of the factor. */ + id: string; + /** The type of the factor to enroll. */ + type: AuthenticationFactorType; + /** The ID of the [user](https://workos.com/docs/reference/authkit/user). */ + userId?: string; + /** SMS-based authentication factor details. */ + sms?: AuthenticationFactorSms; + /** TOTP-based authentication factor details. */ + totp?: AuthenticationFactorTotp; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface AuthenticationFactorResponse { + object: 'authentication_factor'; + id: string; + type: AuthenticationFactorType; + user_id?: string; + sms?: AuthenticationFactorSmsResponse; + totp?: AuthenticationFactorTotpResponse; + created_at: string; + updated_at: string; +} diff --git a/src/multi-factor-auth/interfaces/authentication-factors-create-request.interface.ts b/src/multi-factor-auth/interfaces/authentication-factors-create-request.interface.ts new file mode 100644 index 000000000..f4f5b9bba --- /dev/null +++ b/src/multi-factor-auth/interfaces/authentication-factors-create-request.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuthenticationFactorsCreateRequestType } from '../../common/interfaces/authentication-factors-create-request-type.interface'; + +export interface AuthenticationFactorsCreateRequest { + /** The type of factor to enroll. */ + type: AuthenticationFactorsCreateRequestType; + /** Required when type is 'sms'. */ + phoneNumber?: string; + /** Required when type is 'totp'. */ + totpIssuer?: string; + /** Required when type is 'totp'. */ + totpUser?: string; + /** The ID of the user to associate the factor with. */ + userId?: string; +} + +export interface AuthenticationFactorsCreateRequestResponse { + type: AuthenticationFactorsCreateRequestType; + phone_number?: string; + totp_issuer?: string; + totp_user?: string; + user_id?: string; +} diff --git a/src/multi-factor-auth/interfaces/challenge-authentication-factor.interface.ts b/src/multi-factor-auth/interfaces/challenge-authentication-factor.interface.ts new file mode 100644 index 000000000..09bbd3d41 --- /dev/null +++ b/src/multi-factor-auth/interfaces/challenge-authentication-factor.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface ChallengeAuthenticationFactor { + /** A custom template for the SMS message. Use the {{code}} placeholder to include the verification code. */ + smsTemplate?: string; +} + +export interface ChallengeAuthenticationFactorResponse { + sms_template?: string; +} diff --git a/src/multi-factor-auth/interfaces/enroll-user-authentication-factor.interface.ts b/src/multi-factor-auth/interfaces/enroll-user-authentication-factor.interface.ts new file mode 100644 index 000000000..a91fcf532 --- /dev/null +++ b/src/multi-factor-auth/interfaces/enroll-user-authentication-factor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface EnrollUserAuthenticationFactor { + /** The type of the factor to enroll. */ + type: 'totp'; + /** Your application or company name displayed in the user's authenticator app. */ + totpIssuer?: string; + /** The user's account name displayed in their authenticator app. */ + totpUser?: string; + /** The Base32-encoded shared secret for TOTP factors. This can be provided when creating the auth factor, otherwise it will be generated. The algorithm used to derive TOTP codes is SHA-1, the code length is 6 digits, and the timestep is 30 seconds – the secret must be compatible with these parameters. */ + totpSecret?: string; +} + +export interface EnrollUserAuthenticationFactorResponse { + type: 'totp'; + totp_issuer?: string; + totp_user?: string; + totp_secret?: string; +} diff --git a/src/multi-factor-auth/interfaces/index.ts b/src/multi-factor-auth/interfaces/index.ts new file mode 100644 index 000000000..b34ab137b --- /dev/null +++ b/src/multi-factor-auth/interfaces/index.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export * from './authentication-factor-enrolled-sms.interface'; +export * from './authentication-factor-enrolled-totp.interface'; +export * from './authentication-factor-enrolled.interface'; +export * from './user-management-multi-factor-authentication-order.interface'; diff --git a/src/multi-factor-auth/interfaces/user-authentication-factor-enroll-response.interface.ts b/src/multi-factor-auth/interfaces/user-authentication-factor-enroll-response.interface.ts new file mode 100644 index 000000000..a6125dda9 --- /dev/null +++ b/src/multi-factor-auth/interfaces/user-authentication-factor-enroll-response.interface.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorEnrolled, + AuthenticationFactorEnrolledResponse, +} from './authentication-factor-enrolled.interface'; +import type { + AuthenticationChallenge, + AuthenticationChallengeResponse, +} from './authentication-challenge.interface'; + +export interface UserAuthenticationFactorEnrollResponse { + /** The [authentication factor](https://workos.com/docs/reference/authkit/mfa/authentication-factor) object that represents the additional authentication method used on top of the existing authentication strategy. */ + authenticationFactor: AuthenticationFactorEnrolled; + /** The [authentication challenge](https://workos.com/docs/reference/authkit/mfa/authentication-challenge) object that is used to complete the authentication process. */ + authenticationChallenge: AuthenticationChallenge; +} + +export interface UserAuthenticationFactorEnrollResponseWire { + authentication_factor: AuthenticationFactorEnrolledResponse; + authentication_challenge: AuthenticationChallengeResponse; +} diff --git a/src/multi-factor-auth/interfaces/user-management-multi-factor-authentication-order.interface.ts b/src/multi-factor-auth/interfaces/user-management-multi-factor-authentication-order.interface.ts new file mode 100644 index 000000000..f19cf8618 --- /dev/null +++ b/src/multi-factor-auth/interfaces/user-management-multi-factor-authentication-order.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserManagementMultiFactorAuthenticationOrder = + | 'normal' + | 'desc' + | 'asc'; diff --git a/src/multi-factor-auth/multi-factor-auth.ts b/src/multi-factor-auth/multi-factor-auth.ts new file mode 100644 index 000000000..b1e0d7f16 --- /dev/null +++ b/src/multi-factor-auth/multi-factor-auth.ts @@ -0,0 +1,185 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { PaginationOptions } from '../common/interfaces/pagination-options.interface'; +import type { AutoPaginatable } from '../common/utils/pagination'; +import { createPaginatedList } from '../common/utils/fetch-and-deserialize'; +import type { + AuthenticationChallengeVerifyResponse, + AuthenticationChallengeVerifyResponseWire, +} from './interfaces/authentication-challenge-verify-response.interface'; +import type { + AuthenticationFactorEnrolled, + AuthenticationFactorEnrolledResponse, +} from './interfaces/authentication-factor-enrolled.interface'; +import type { + AuthenticationFactor, + AuthenticationFactorResponse, +} from './interfaces/authentication-factor.interface'; +import type { + AuthenticationChallenge, + AuthenticationChallengeResponse, +} from './interfaces/authentication-challenge.interface'; +import type { + UserAuthenticationFactorEnrollResponse, + UserAuthenticationFactorEnrollResponseWire, +} from './interfaces/user-authentication-factor-enroll-response.interface'; +import type { AuthenticationChallengesVerifyRequest } from './interfaces/authentication-challenges-verify-request.interface'; +import type { AuthenticationFactorsCreateRequest } from './interfaces/authentication-factors-create-request.interface'; +import type { ChallengeAuthenticationFactor } from './interfaces/challenge-authentication-factor.interface'; +import type { EnrollUserAuthenticationFactor } from './interfaces/enroll-user-authentication-factor.interface'; +import { deserializeAuthenticationChallengeVerifyResponse } from './serializers/authentication-challenge-verify-response.serializer'; +import { deserializeAuthenticationFactorEnrolled } from './serializers/authentication-factor-enrolled.serializer'; +import { deserializeAuthenticationFactor } from './serializers/authentication-factor.serializer'; +import { deserializeAuthenticationChallenge } from './serializers/authentication-challenge.serializer'; +import { deserializeUserAuthenticationFactorEnrollResponse } from './serializers/user-authentication-factor-enroll-response.serializer'; +import { serializeAuthenticationChallengesVerifyRequest } from './serializers/authentication-challenges-verify-request.serializer'; +import { serializeAuthenticationFactorsCreateRequest } from './serializers/authentication-factors-create-request.serializer'; +import { serializeChallengeAuthenticationFactor } from './serializers/challenge-authentication-factor.serializer'; +import { serializeEnrollUserAuthenticationFactor } from './serializers/enroll-user-authentication-factor.serializer'; + +export class MultiFactorAuth { + constructor(private readonly workos: WorkOS) {} + + /** + * Verify Challenge + * + * Verifies an Authentication Challenge. + * @param id - The unique ID of the Authentication Challenge. + * @example "auth_challenge_01FVYZ5QM8N98T9ME5BCB2BBMJ" + * @param payload - Object containing code. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ + async verifyChallenge( + id: string, + payload: AuthenticationChallengesVerifyRequest, + ): Promise { + const { data } = + await this.workos.post( + `/auth/challenges/${id}/verify`, + serializeAuthenticationChallengesVerifyRequest(payload), + ); + return deserializeAuthenticationChallengeVerifyResponse(data); + } + + /** + * Enroll Factor + * + * Enrolls an Authentication Factor to be used as an additional factor of authentication. The returned ID should be used to create an authentication Challenge. + * @param payload - Object containing type. + * @returns {Promise} + * @throws {UnprocessableEntityException} 422 + */ + async enrollFactor( + payload: AuthenticationFactorsCreateRequest, + ): Promise { + const { data } = + await this.workos.post( + '/auth/factors/enroll', + serializeAuthenticationFactorsCreateRequest(payload), + ); + return deserializeAuthenticationFactorEnrolled(data); + } + + /** + * Get Factor + * + * Gets an Authentication Factor. + * @param id - The unique ID of the Factor. + * @example "auth_factor_01FVYZ5QM8N98T9ME5BCB2BBMJ" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ + async getFactor(id: string): Promise { + const { data } = await this.workos.get( + `/auth/factors/${id}`, + ); + return deserializeAuthenticationFactor(data); + } + + /** + * Delete Factor + * + * Permanently deletes an Authentication Factor. It cannot be undone. + * @param id - The unique ID of the Factor. + * @example "auth_factor_01FVYZ5QM8N98T9ME5BCB2BBMJ" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ + async deleteFactor(id: string): Promise { + await this.workos.delete(`/auth/factors/${id}`); + } + + /** + * Challenge Factor + * + * Creates a Challenge for an Authentication Factor. + * @param id - The unique ID of the Authentication Factor to be challenged. + * @example "auth_factor_01FVYZ5QM8N98T9ME5BCB2BBMJ" + * @param payload - The request body. + * @returns {Promise} + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ + async challengeFactor( + id: string, + payload: ChallengeAuthenticationFactor, + ): Promise { + const { data } = await this.workos.post( + `/auth/factors/${id}/challenge`, + serializeChallengeAuthenticationFactor(payload), + ); + return deserializeAuthenticationChallenge(data); + } + + /** + * List authentication factors + * + * Lists the [authentication factors](https://workos.com/docs/reference/authkit/mfa/authentication-factor) for a user. + * @param userlandUserId - The ID of the [user](https://workos.com/docs/reference/authkit/user). + * @example "user_01E4ZCR3C56J083X43JQXF3JK5" + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {UnprocessableEntityException} 422 + */ + async listUserAuthFactors( + userlandUserId: string, + options?: PaginationOptions, + ): Promise> { + return createPaginatedList< + AuthenticationFactorResponse, + AuthenticationFactor, + PaginationOptions + >( + this.workos, + `/user_management/users/${userlandUserId}/auth_factors`, + deserializeAuthenticationFactor, + options, + ); + } + + /** + * Enroll an authentication factor + * + * Enrolls a user in a new [authentication factor](https://workos.com/docs/reference/authkit/mfa/authentication-factor). + * @param userlandUserId - The ID of the [user](https://workos.com/docs/reference/authkit/user). + * @example "user_01E4ZCR3C56J083X43JQXF3JK5" + * @param payload - Object containing type. + * @returns {Promise} + * @throws {UnprocessableEntityException} 422 + */ + async createUserAuthFactors( + userlandUserId: string, + payload: EnrollUserAuthenticationFactor, + ): Promise { + const { data } = + await this.workos.post( + `/user_management/users/${userlandUserId}/auth_factors`, + serializeEnrollUserAuthenticationFactor(payload), + ); + return deserializeUserAuthenticationFactorEnrollResponse(data); + } +} diff --git a/src/multi-factor-auth/serializers/authentication-challenge-verify-response.serializer.ts b/src/multi-factor-auth/serializers/authentication-challenge-verify-response.serializer.ts new file mode 100644 index 000000000..9a23495f0 --- /dev/null +++ b/src/multi-factor-auth/serializers/authentication-challenge-verify-response.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationChallengeVerifyResponse, + AuthenticationChallengeVerifyResponseWire, +} from '../interfaces/authentication-challenge-verify-response.interface'; +import { + deserializeAuthenticationChallenge, + serializeAuthenticationChallenge, +} from './authentication-challenge.serializer'; + +export const deserializeAuthenticationChallengeVerifyResponse = ( + response: AuthenticationChallengeVerifyResponseWire, +): AuthenticationChallengeVerifyResponse => ({ + challenge: deserializeAuthenticationChallenge(response.challenge), + valid: response.valid, +}); + +export const serializeAuthenticationChallengeVerifyResponse = ( + model: AuthenticationChallengeVerifyResponse, +): AuthenticationChallengeVerifyResponseWire => ({ + challenge: serializeAuthenticationChallenge(model.challenge), + valid: model.valid, +}); diff --git a/src/multi-factor-auth/serializers/authentication-challenge.serializer.ts b/src/multi-factor-auth/serializers/authentication-challenge.serializer.ts new file mode 100644 index 000000000..6b9bb8ce5 --- /dev/null +++ b/src/multi-factor-auth/serializers/authentication-challenge.serializer.ts @@ -0,0 +1,30 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationChallenge, + AuthenticationChallengeResponse, +} from '../interfaces/authentication-challenge.interface'; + +export const deserializeAuthenticationChallenge = ( + response: AuthenticationChallengeResponse, +): AuthenticationChallenge => ({ + object: response.object, + id: response.id, + expiresAt: response.expires_at, + code: response.code, + authenticationFactorId: response.authentication_factor_id, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeAuthenticationChallenge = ( + model: AuthenticationChallenge, +): AuthenticationChallengeResponse => ({ + object: model.object, + id: model.id, + expires_at: model.expiresAt, + code: model.code, + authentication_factor_id: model.authenticationFactorId, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/multi-factor-auth/serializers/authentication-challenges-verify-request.serializer.ts b/src/multi-factor-auth/serializers/authentication-challenges-verify-request.serializer.ts new file mode 100644 index 000000000..4c43b40c0 --- /dev/null +++ b/src/multi-factor-auth/serializers/authentication-challenges-verify-request.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeVerifyEmailAddress as deserializeAuthenticationChallengesVerifyRequest, + serializeVerifyEmailAddress as serializeAuthenticationChallengesVerifyRequest, +} from '../../user-management/serializers/verify-email-address.serializer'; diff --git a/src/multi-factor-auth/serializers/authentication-factor-enrolled-sms.serializer.ts b/src/multi-factor-auth/serializers/authentication-factor-enrolled-sms.serializer.ts new file mode 100644 index 000000000..58dadd972 --- /dev/null +++ b/src/multi-factor-auth/serializers/authentication-factor-enrolled-sms.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeAuthenticationFactorSms as deserializeAuthenticationFactorEnrolledSms, + serializeAuthenticationFactorSms as serializeAuthenticationFactorEnrolledSms, +} from './authentication-factor-sms.serializer'; diff --git a/src/multi-factor-auth/serializers/authentication-factor-enrolled-totp.serializer.ts b/src/multi-factor-auth/serializers/authentication-factor-enrolled-totp.serializer.ts new file mode 100644 index 000000000..bd5e7b42e --- /dev/null +++ b/src/multi-factor-auth/serializers/authentication-factor-enrolled-totp.serializer.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorEnrolledTotp, + AuthenticationFactorEnrolledTotpResponse, +} from '../interfaces/authentication-factor-enrolled-totp.interface'; + +export const deserializeAuthenticationFactorEnrolledTotp = ( + response: AuthenticationFactorEnrolledTotpResponse, +): AuthenticationFactorEnrolledTotp => ({ + issuer: response.issuer, + user: response.user, + secret: response.secret, + qrCode: response.qr_code, + uri: response.uri, +}); + +export const serializeAuthenticationFactorEnrolledTotp = ( + model: AuthenticationFactorEnrolledTotp, +): AuthenticationFactorEnrolledTotpResponse => ({ + issuer: model.issuer, + user: model.user, + secret: model.secret, + qr_code: model.qrCode, + uri: model.uri, +}); diff --git a/src/multi-factor-auth/serializers/authentication-factor-enrolled.serializer.ts b/src/multi-factor-auth/serializers/authentication-factor-enrolled.serializer.ts new file mode 100644 index 000000000..e17be67c7 --- /dev/null +++ b/src/multi-factor-auth/serializers/authentication-factor-enrolled.serializer.ts @@ -0,0 +1,52 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorEnrolled, + AuthenticationFactorEnrolledResponse, +} from '../interfaces/authentication-factor-enrolled.interface'; +import { + deserializeAuthenticationFactorEnrolledSms, + serializeAuthenticationFactorEnrolledSms, +} from './authentication-factor-enrolled-sms.serializer'; +import { + deserializeAuthenticationFactorEnrolledTotp, + serializeAuthenticationFactorEnrolledTotp, +} from './authentication-factor-enrolled-totp.serializer'; + +export const deserializeAuthenticationFactorEnrolled = ( + response: AuthenticationFactorEnrolledResponse, +): AuthenticationFactorEnrolled => ({ + object: response.object, + id: response.id, + type: response.type, + userId: response.user_id, + sms: + response.sms != null + ? deserializeAuthenticationFactorEnrolledSms(response.sms) + : undefined, + totp: + response.totp != null + ? deserializeAuthenticationFactorEnrolledTotp(response.totp) + : undefined, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeAuthenticationFactorEnrolled = ( + model: AuthenticationFactorEnrolled, +): AuthenticationFactorEnrolledResponse => ({ + object: model.object, + id: model.id, + type: model.type, + user_id: model.userId, + sms: + model.sms != null + ? serializeAuthenticationFactorEnrolledSms(model.sms) + : undefined, + totp: + model.totp != null + ? serializeAuthenticationFactorEnrolledTotp(model.totp) + : undefined, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/multi-factor-auth/serializers/authentication-factor-sms.serializer.ts b/src/multi-factor-auth/serializers/authentication-factor-sms.serializer.ts new file mode 100644 index 000000000..d217ee803 --- /dev/null +++ b/src/multi-factor-auth/serializers/authentication-factor-sms.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorSms, + AuthenticationFactorSmsResponse, +} from '../interfaces/authentication-factor-sms.interface'; + +export const deserializeAuthenticationFactorSms = ( + response: AuthenticationFactorSmsResponse, +): AuthenticationFactorSms => ({ + phoneNumber: response.phone_number, +}); + +export const serializeAuthenticationFactorSms = ( + model: AuthenticationFactorSms, +): AuthenticationFactorSmsResponse => ({ + phone_number: model.phoneNumber, +}); diff --git a/src/multi-factor-auth/serializers/authentication-factor-totp.serializer.ts b/src/multi-factor-auth/serializers/authentication-factor-totp.serializer.ts new file mode 100644 index 000000000..9cfdd1f2f --- /dev/null +++ b/src/multi-factor-auth/serializers/authentication-factor-totp.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorTotp, + AuthenticationFactorTotpResponse, +} from '../interfaces/authentication-factor-totp.interface'; + +export const deserializeAuthenticationFactorTotp = ( + response: AuthenticationFactorTotpResponse, +): AuthenticationFactorTotp => ({ + issuer: response.issuer, + user: response.user, +}); + +export const serializeAuthenticationFactorTotp = ( + model: AuthenticationFactorTotp, +): AuthenticationFactorTotpResponse => ({ + issuer: model.issuer, + user: model.user, +}); diff --git a/src/multi-factor-auth/serializers/authentication-factor.serializer.ts b/src/multi-factor-auth/serializers/authentication-factor.serializer.ts new file mode 100644 index 000000000..29bcfd413 --- /dev/null +++ b/src/multi-factor-auth/serializers/authentication-factor.serializer.ts @@ -0,0 +1,50 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactor, + AuthenticationFactorResponse, +} from '../interfaces/authentication-factor.interface'; +import { + deserializeAuthenticationFactorSms, + serializeAuthenticationFactorSms, +} from './authentication-factor-sms.serializer'; +import { + deserializeAuthenticationFactorTotp, + serializeAuthenticationFactorTotp, +} from './authentication-factor-totp.serializer'; + +export const deserializeAuthenticationFactor = ( + response: AuthenticationFactorResponse, +): AuthenticationFactor => ({ + object: response.object, + id: response.id, + type: response.type, + userId: response.user_id, + sms: + response.sms != null + ? deserializeAuthenticationFactorSms(response.sms) + : undefined, + totp: + response.totp != null + ? deserializeAuthenticationFactorTotp(response.totp) + : undefined, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeAuthenticationFactor = ( + model: AuthenticationFactor, +): AuthenticationFactorResponse => ({ + object: model.object, + id: model.id, + type: model.type, + user_id: model.userId, + sms: + model.sms != null ? serializeAuthenticationFactorSms(model.sms) : undefined, + totp: + model.totp != null + ? serializeAuthenticationFactorTotp(model.totp) + : undefined, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/multi-factor-auth/serializers/authentication-factors-create-request.serializer.ts b/src/multi-factor-auth/serializers/authentication-factors-create-request.serializer.ts new file mode 100644 index 000000000..e609dcefd --- /dev/null +++ b/src/multi-factor-auth/serializers/authentication-factors-create-request.serializer.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactorsCreateRequest, + AuthenticationFactorsCreateRequestResponse, +} from '../interfaces/authentication-factors-create-request.interface'; + +export const deserializeAuthenticationFactorsCreateRequest = ( + response: AuthenticationFactorsCreateRequestResponse, +): AuthenticationFactorsCreateRequest => ({ + type: response.type, + phoneNumber: response.phone_number, + totpIssuer: response.totp_issuer, + totpUser: response.totp_user, + userId: response.user_id, +}); + +export const serializeAuthenticationFactorsCreateRequest = ( + model: AuthenticationFactorsCreateRequest, +): AuthenticationFactorsCreateRequestResponse => ({ + type: model.type, + phone_number: model.phoneNumber, + totp_issuer: model.totpIssuer, + totp_user: model.totpUser, + user_id: model.userId, +}); diff --git a/src/multi-factor-auth/serializers/challenge-authentication-factor.serializer.ts b/src/multi-factor-auth/serializers/challenge-authentication-factor.serializer.ts new file mode 100644 index 000000000..bb7105bb1 --- /dev/null +++ b/src/multi-factor-auth/serializers/challenge-authentication-factor.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ChallengeAuthenticationFactor, + ChallengeAuthenticationFactorResponse, +} from '../interfaces/challenge-authentication-factor.interface'; + +export const deserializeChallengeAuthenticationFactor = ( + response: ChallengeAuthenticationFactorResponse, +): ChallengeAuthenticationFactor => ({ + smsTemplate: response.sms_template, +}); + +export const serializeChallengeAuthenticationFactor = ( + model: ChallengeAuthenticationFactor, +): ChallengeAuthenticationFactorResponse => ({ + sms_template: model.smsTemplate, +}); diff --git a/src/multi-factor-auth/serializers/enroll-user-authentication-factor.serializer.ts b/src/multi-factor-auth/serializers/enroll-user-authentication-factor.serializer.ts new file mode 100644 index 000000000..36162be76 --- /dev/null +++ b/src/multi-factor-auth/serializers/enroll-user-authentication-factor.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + EnrollUserAuthenticationFactor, + EnrollUserAuthenticationFactorResponse, +} from '../interfaces/enroll-user-authentication-factor.interface'; + +export const deserializeEnrollUserAuthenticationFactor = ( + response: EnrollUserAuthenticationFactorResponse, +): EnrollUserAuthenticationFactor => ({ + type: response.type, + totpIssuer: response.totp_issuer, + totpUser: response.totp_user, + totpSecret: response.totp_secret, +}); + +export const serializeEnrollUserAuthenticationFactor = ( + model: EnrollUserAuthenticationFactor, +): EnrollUserAuthenticationFactorResponse => ({ + type: model.type, + totp_issuer: model.totpIssuer, + totp_user: model.totpUser, + totp_secret: model.totpSecret, +}); diff --git a/src/multi-factor-auth/serializers/user-authentication-factor-enroll-response.serializer.ts b/src/multi-factor-auth/serializers/user-authentication-factor-enroll-response.serializer.ts new file mode 100644 index 000000000..1189afa5e --- /dev/null +++ b/src/multi-factor-auth/serializers/user-authentication-factor-enroll-response.serializer.ts @@ -0,0 +1,36 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserAuthenticationFactorEnrollResponse, + UserAuthenticationFactorEnrollResponseWire, +} from '../interfaces/user-authentication-factor-enroll-response.interface'; +import { + deserializeAuthenticationFactorEnrolled, + serializeAuthenticationFactorEnrolled, +} from './authentication-factor-enrolled.serializer'; +import { + deserializeAuthenticationChallenge, + serializeAuthenticationChallenge, +} from './authentication-challenge.serializer'; + +export const deserializeUserAuthenticationFactorEnrollResponse = ( + response: UserAuthenticationFactorEnrollResponseWire, +): UserAuthenticationFactorEnrollResponse => ({ + authenticationFactor: deserializeAuthenticationFactorEnrolled( + response.authentication_factor, + ), + authenticationChallenge: deserializeAuthenticationChallenge( + response.authentication_challenge, + ), +}); + +export const serializeUserAuthenticationFactorEnrollResponse = ( + model: UserAuthenticationFactorEnrollResponse, +): UserAuthenticationFactorEnrollResponseWire => ({ + authentication_factor: serializeAuthenticationFactorEnrolled( + model.authenticationFactor, + ), + authentication_challenge: serializeAuthenticationChallenge( + model.authenticationChallenge, + ), +}); diff --git a/src/organization-domains/interfaces/create-organization-domain.interface.ts b/src/organization-domains/interfaces/create-organization-domain.interface.ts new file mode 100644 index 000000000..4a32ea2c1 --- /dev/null +++ b/src/organization-domains/interfaces/create-organization-domain.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateOrganizationDomain { + /** The domain to add to the organization. */ + domain: string; + /** The ID of the organization to add the domain to. */ + organizationId: string; +} + +export interface CreateOrganizationDomainResponse { + domain: string; + organization_id: string; +} diff --git a/src/organization-domains/interfaces/index.ts b/src/organization-domains/interfaces/index.ts index 363d234d6..957632d2e 100644 --- a/src/organization-domains/interfaces/index.ts +++ b/src/organization-domains/interfaces/index.ts @@ -1,2 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + export * from './create-organization-domain-options.interface'; +export * from './create-organization-domain.interface'; +export * from './organization-domain-stand-alone.interface'; export * from './organization-domain.interface'; diff --git a/src/organization-domains/interfaces/organization-domain-stand-alone.interface.ts b/src/organization-domains/interfaces/organization-domain-stand-alone.interface.ts new file mode 100644 index 000000000..f9ec5905d --- /dev/null +++ b/src/organization-domains/interfaces/organization-domain-stand-alone.interface.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainStandAloneState } from '../../common/interfaces/organization-domain-stand-alone-state.interface'; +import type { OrganizationDomainStandAloneVerificationStrategy } from '../../common/interfaces/organization-domain-stand-alone-verification-strategy.interface'; + +export interface OrganizationDomainStandAlone { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** ID of the parent Organization. */ + organizationId: string; + /** Domain for the organization domain. */ + domain: string; + /** Verification state of the domain. */ + state?: OrganizationDomainStandAloneState; + /** The prefix used in DNS verification. */ + verificationPrefix?: string; + /** Validation token to be used in DNS TXT record. */ + verificationToken?: string; + /** Strategy used to verify the domain. */ + verificationStrategy?: OrganizationDomainStandAloneVerificationStrategy; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationDomainStandAloneResponse { + object: 'organization_domain'; + id: string; + organization_id: string; + domain: string; + state?: OrganizationDomainStandAloneState; + verification_prefix?: string; + verification_token?: string; + verification_strategy?: OrganizationDomainStandAloneVerificationStrategy; + created_at: string; + updated_at: string; +} diff --git a/src/organization-domains/interfaces/organization-domain.interface.ts b/src/organization-domains/interfaces/organization-domain.interface.ts index 62e8b2c43..cc756f213 100644 --- a/src/organization-domains/interfaces/organization-domain.interface.ts +++ b/src/organization-domains/interfaces/organization-domain.interface.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + export enum OrganizationDomainState { Verified = 'verified', Pending = 'pending', @@ -10,15 +12,25 @@ export enum OrganizationDomainVerificationStrategy { } export interface OrganizationDomain { + /** Distinguishes the organization domain object. */ object: 'organization_domain'; + /** Unique identifier of the organization domain. */ id: string; + /** Domain for the organization domain. */ domain: string; + /** ID of the parent Organization. */ organizationId: string; + /** Verification state of the domain. */ state: OrganizationDomainState; + /** Validation token to be used in DNS TXT record. */ verificationToken?: string; + /** Strategy used to verify the domain. */ verificationStrategy: OrganizationDomainVerificationStrategy; + /** The prefix used in DNS verification. */ verificationPrefix?: string; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; } diff --git a/src/organization-domains/organization-domains.ts b/src/organization-domains/organization-domains.ts index 921b7a44e..399b75380 100644 --- a/src/organization-domains/organization-domains.ts +++ b/src/organization-domains/organization-domains.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { WorkOS } from '../workos'; import { CreateOrganizationDomainOptions, @@ -10,6 +12,15 @@ import { deserializeOrganizationDomain } from './serializers/organization-domain export class OrganizationDomains { constructor(private readonly workos: WorkOS) {} + /** + * Get an Organization Domain + * + * Get the details of an existing organization domain. + * @param id - Unique identifier of the organization domain. + * @example "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async get(id: string): Promise { const { data } = await this.workos.get( `/organization_domains/${id}`, @@ -18,6 +29,15 @@ export class OrganizationDomains { return deserializeOrganizationDomain(data); } + /** + * Verify an Organization Domain + * + * Initiates verification process for an Organization Domain. + * @param id - Unique identifier of the organization domain. + * @example "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A" + * @returns {Promise} + * @throws {BadRequestException} 400 + */ async verify(id: string): Promise { const { data } = await this.workos.post( `/organization_domains/${id}/verify`, @@ -27,6 +47,14 @@ export class OrganizationDomains { return deserializeOrganizationDomain(data); } + /** + * Create an Organization Domain + * + * Creates a new Organization Domain. + * @param payload - Object containing domain, organizationId. + * @returns {Promise} + * @throws {ConflictException} 409 + */ async create( payload: CreateOrganizationDomainOptions, ): Promise { @@ -38,6 +66,15 @@ export class OrganizationDomains { return deserializeOrganizationDomain(data); } + /** + * Delete an Organization Domain + * + * Permanently deletes an organization domain. It cannot be undone. + * @param id - Unique identifier of the organization domain. + * @example "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async delete(id: string): Promise { await this.workos.delete(`/organization_domains/${id}`); } diff --git a/src/organization-domains/serializers/create-organization-domain.serializer.ts b/src/organization-domains/serializers/create-organization-domain.serializer.ts new file mode 100644 index 000000000..5c26333b3 --- /dev/null +++ b/src/organization-domains/serializers/create-organization-domain.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateOrganizationDomain, + CreateOrganizationDomainResponse, +} from '../interfaces/create-organization-domain.interface'; + +export const deserializeCreateOrganizationDomain = ( + response: CreateOrganizationDomainResponse, +): CreateOrganizationDomain => ({ + domain: response.domain, + organizationId: response.organization_id, +}); + +export const serializeCreateOrganizationDomain = ( + model: CreateOrganizationDomain, +): CreateOrganizationDomainResponse => ({ + domain: model.domain, + organization_id: model.organizationId, +}); diff --git a/src/organization-domains/serializers/organization-domain-stand-alone.serializer.ts b/src/organization-domains/serializers/organization-domain-stand-alone.serializer.ts new file mode 100644 index 000000000..0f5aac6a3 --- /dev/null +++ b/src/organization-domains/serializers/organization-domain-stand-alone.serializer.ts @@ -0,0 +1,36 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainStandAlone, + OrganizationDomainStandAloneResponse, +} from '../interfaces/organization-domain-stand-alone.interface'; + +export const deserializeOrganizationDomainStandAlone = ( + response: OrganizationDomainStandAloneResponse, +): OrganizationDomainStandAlone => ({ + object: response.object, + id: response.id, + organizationId: response.organization_id, + domain: response.domain, + state: response.state, + verificationPrefix: response.verification_prefix, + verificationToken: response.verification_token, + verificationStrategy: response.verification_strategy, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeOrganizationDomainStandAlone = ( + model: OrganizationDomainStandAlone, +): OrganizationDomainStandAloneResponse => ({ + object: model.object, + id: model.id, + organization_id: model.organizationId, + domain: model.domain, + state: model.state, + verification_prefix: model.verificationPrefix, + verification_token: model.verificationToken, + verification_strategy: model.verificationStrategy, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/organization-domains/serializers/organization-domain.serializer.ts b/src/organization-domains/serializers/organization-domain.serializer.ts index dcabaff40..3cbbc67c4 100644 --- a/src/organization-domains/serializers/organization-domain.serializer.ts +++ b/src/organization-domains/serializers/organization-domain.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { OrganizationDomain, OrganizationDomainResponse } from '../interfaces'; export const deserializeOrganizationDomain = ( diff --git a/src/organizations-feature-flags/organizations-feature-flags.ts b/src/organizations-feature-flags/organizations-feature-flags.ts new file mode 100644 index 000000000..d51bdfcae --- /dev/null +++ b/src/organizations-feature-flags/organizations-feature-flags.ts @@ -0,0 +1,37 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { PaginationOptions } from '../common/interfaces/pagination-options.interface'; +import type { AutoPaginatable } from '../common/utils/pagination'; +import { createPaginatedList } from '../common/utils/fetch-and-deserialize'; +import type { + Flag, + FlagResponse, +} from '../feature-flags/interfaces/flag.interface'; +import { deserializeFlag } from '../feature-flags/serializers/flag.serializer'; + +export class OrganizationsFeatureFlags { + constructor(private readonly workos: WorkOS) {} + + /** + * List enabled feature flags for an organization + * + * Get a list of all enabled feature flags for an organization. + * @param organizationId - Unique identifier of the Organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param options - Pagination and filter options. + * @returns {AutoPaginatable} + * @throws {NotFoundException} 404 + */ + async list( + organizationId: string, + options?: PaginationOptions, + ): Promise> { + return createPaginatedList( + this.workos, + `/organizations/${organizationId}/feature-flags`, + deserializeFlag, + options, + ); + } +} diff --git a/src/organizations/interfaces/api-key-with-value-owner.interface.ts b/src/organizations/interfaces/api-key-with-value-owner.interface.ts new file mode 100644 index 000000000..d3638d02a --- /dev/null +++ b/src/organizations/interfaces/api-key-with-value-owner.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The entity that owns the API Key. */ +export interface ApiKeyWithValueOwner { + /** The type of the API Key owner. */ + type: 'organization'; + /** Unique identifier of the API Key owner. */ + id: string; +} + +export interface ApiKeyWithValueOwnerResponse { + type: 'organization'; + id: string; +} diff --git a/src/organizations/interfaces/api-key-with-value.interface.ts b/src/organizations/interfaces/api-key-with-value.interface.ts new file mode 100644 index 000000000..20dd696e4 --- /dev/null +++ b/src/organizations/interfaces/api-key-with-value.interface.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyWithValueOwner, + ApiKeyWithValueOwnerResponse, +} from './api-key-with-value-owner.interface'; + +export interface ApiKeyWithValue { + /** Distinguishes the API Key object. */ + object: 'api_key'; + /** Unique identifier of the API Key. */ + id: string; + /** The entity that owns the API Key. */ + owner: ApiKeyWithValueOwner; + /** A descriptive name for the API Key. */ + name: string; + /** An obfuscated representation of the API Key value. */ + obfuscatedValue: string; + /** Timestamp of when the API Key was last used. */ + lastUsedAt: string | null; + /** The permission slugs assigned to the API Key. */ + permissions: string[]; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + /** The full API Key value. Only returned once at creation time. */ + value: string; +} + +export interface ApiKeyWithValueResponse { + object: 'api_key'; + id: string; + owner: ApiKeyWithValueOwnerResponse; + name: string; + obfuscated_value: string; + last_used_at: string | null; + permissions: string[]; + created_at: string; + updated_at: string; + value: string; +} diff --git a/src/organizations/interfaces/audit-log-configuration-log-stream.interface.ts b/src/organizations/interfaces/audit-log-configuration-log-stream.interface.ts new file mode 100644 index 000000000..9a240786c --- /dev/null +++ b/src/organizations/interfaces/audit-log-configuration-log-stream.interface.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { AuditLogConfigurationLogStreamType } from '../../common/interfaces/audit-log-configuration-log-stream-type.interface'; +import type { AuditLogConfigurationLogStreamState } from '../../common/interfaces/audit-log-configuration-log-stream-state.interface'; + +/** The Audit Log Stream currently configured for the organization, if any. */ +export interface AuditLogConfigurationLogStream { + /** Unique identifier of the Audit Log Stream. */ + id: string; + /** The type of the Audit Log Stream destination. */ + type: AuditLogConfigurationLogStreamType; + /** The current state of the Audit Log Stream. */ + state: AuditLogConfigurationLogStreamState; + /** ISO-8601 timestamp of when the last event was successfully synced, or null if no events have been synced. */ + lastSyncedAt: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; +} + +export interface AuditLogConfigurationLogStreamResponse { + id: string; + type: AuditLogConfigurationLogStreamType; + state: AuditLogConfigurationLogStreamState; + last_synced_at: string | null; + created_at: string; +} diff --git a/src/organizations/interfaces/audit-log-configuration.interface.ts b/src/organizations/interfaces/audit-log-configuration.interface.ts new file mode 100644 index 000000000..93d64ac18 --- /dev/null +++ b/src/organizations/interfaces/audit-log-configuration.interface.ts @@ -0,0 +1,25 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogConfigurationLogStream, + AuditLogConfigurationLogStreamResponse, +} from './audit-log-configuration-log-stream.interface'; +import type { AuditLogConfigurationState } from '../../common/interfaces/audit-log-configuration-state.interface'; + +export interface AuditLogConfiguration { + /** Unique identifier of the Organization. */ + organizationId: string; + /** The number of days Audit Log events will be retained before being permanently deleted. */ + retentionPeriodInDays: number; + /** The current state of the audit log configuration for the organization. */ + state: AuditLogConfigurationState; + /** The Audit Log Stream currently configured for the organization, if any. */ + logStream?: AuditLogConfigurationLogStream; +} + +export interface AuditLogConfigurationResponse { + organization_id: string; + retention_period_in_days: number; + state: AuditLogConfigurationState; + log_stream?: AuditLogConfigurationLogStreamResponse; +} diff --git a/src/organizations/interfaces/audit-logs-retention-json.interface.ts b/src/organizations/interfaces/audit-logs-retention-json.interface.ts new file mode 100644 index 000000000..2fe7ed49d --- /dev/null +++ b/src/organizations/interfaces/audit-logs-retention-json.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuditLogsRetentionJson { + /** The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 and 365. */ + retentionPeriodInDays: number | null; +} + +export interface AuditLogsRetentionJsonResponse { + retention_period_in_days: number | null; +} diff --git a/src/organizations/interfaces/create-organization-api-key.interface.ts b/src/organizations/interfaces/create-organization-api-key.interface.ts new file mode 100644 index 000000000..4f4e4ad28 --- /dev/null +++ b/src/organizations/interfaces/create-organization-api-key.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateOrganizationApiKey { + /** The name for the API key. */ + name: string; + /** The permission slugs to assign to the API key. */ + permissions?: string[]; +} + +export interface CreateOrganizationApiKeyResponse { + name: string; + permissions?: string[]; +} diff --git a/src/organizations/interfaces/create-organization-domain.interface.ts b/src/organizations/interfaces/create-organization-domain.interface.ts new file mode 100644 index 000000000..4a32ea2c1 --- /dev/null +++ b/src/organizations/interfaces/create-organization-domain.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateOrganizationDomain { + /** The domain to add to the organization. */ + domain: string; + /** The ID of the organization to add the domain to. */ + organizationId: string; +} + +export interface CreateOrganizationDomainResponse { + domain: string; + organization_id: string; +} diff --git a/src/organizations/interfaces/index.ts b/src/organizations/interfaces/index.ts index d44e49367..12aabce5c 100644 --- a/src/organizations/interfaces/index.ts +++ b/src/organizations/interfaces/index.ts @@ -1,6 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export * from './api-key-with-value-owner.interface'; +export * from './api-key-with-value.interface'; +export * from './audit-log-configuration-log-stream.interface'; +export * from './audit-log-configuration.interface'; +export * from './audit-logs-retention-json.interface'; +export * from './create-organization-api-key.interface'; export * from './create-organization-options.interface'; export * from './domain-data.interface'; export * from './list-organization-feature-flags-options.interface'; export * from './list-organizations-options.interface'; +export * from './organization-domain-data.interface'; +export * from './organization-input.interface'; export * from './organization.interface'; +export * from './organizations-order.interface'; +export * from './update-audit-logs-retention.interface'; export * from './update-organization-options.interface'; +export * from './update-organization.interface'; diff --git a/src/organizations/interfaces/organization-domain-data.interface.ts b/src/organizations/interfaces/organization-domain-data.interface.ts new file mode 100644 index 000000000..4132f780f --- /dev/null +++ b/src/organizations/interfaces/organization-domain-data.interface.ts @@ -0,0 +1,15 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainDataState } from '../../common/interfaces/organization-domain-data-state.interface'; + +export interface OrganizationDomainData { + /** The domain value. */ + domain: string; + /** The verification state of the domain. */ + state: OrganizationDomainDataState; +} + +export interface OrganizationDomainDataResponse { + domain: string; + state: OrganizationDomainDataState; +} diff --git a/src/organizations/interfaces/organization-domain-stand-alone.interface.ts b/src/organizations/interfaces/organization-domain-stand-alone.interface.ts new file mode 100644 index 000000000..f9ec5905d --- /dev/null +++ b/src/organizations/interfaces/organization-domain-stand-alone.interface.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { OrganizationDomainStandAloneState } from '../../common/interfaces/organization-domain-stand-alone-state.interface'; +import type { OrganizationDomainStandAloneVerificationStrategy } from '../../common/interfaces/organization-domain-stand-alone-verification-strategy.interface'; + +export interface OrganizationDomainStandAlone { + /** Distinguishes the organization domain object. */ + object: 'organization_domain'; + /** Unique identifier of the organization domain. */ + id: string; + /** ID of the parent Organization. */ + organizationId: string; + /** Domain for the organization domain. */ + domain: string; + /** Verification state of the domain. */ + state?: OrganizationDomainStandAloneState; + /** The prefix used in DNS verification. */ + verificationPrefix?: string; + /** Validation token to be used in DNS TXT record. */ + verificationToken?: string; + /** Strategy used to verify the domain. */ + verificationStrategy?: OrganizationDomainStandAloneVerificationStrategy; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface OrganizationDomainStandAloneResponse { + object: 'organization_domain'; + id: string; + organization_id: string; + domain: string; + state?: OrganizationDomainStandAloneState; + verification_prefix?: string; + verification_token?: string; + verification_strategy?: OrganizationDomainStandAloneVerificationStrategy; + created_at: string; + updated_at: string; +} diff --git a/src/organizations/interfaces/organization-input.interface.ts b/src/organizations/interfaces/organization-input.interface.ts new file mode 100644 index 000000000..0e8d290c9 --- /dev/null +++ b/src/organizations/interfaces/organization-input.interface.ts @@ -0,0 +1,30 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainData, + OrganizationDomainDataResponse, +} from './organization-domain-data.interface'; + +export interface OrganizationInput { + /** The name of the organization. */ + name: string; + /** Whether the organization allows profiles from outside the organization to sign in. */ + allowProfilesOutsideOrganization?: boolean; + /** The domains associated with the organization. Deprecated in favor of `domain_data`. */ + domains?: string[]; + /** The domains associated with the organization, including verification state. */ + domainData?: OrganizationDomainData[]; + /** Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization. */ + metadata?: Record | null; + /** An external identifier for the Organization. */ + externalId?: string | null; +} + +export interface OrganizationInputResponse { + name: string; + allow_profiles_outside_organization?: boolean; + domains?: string[]; + domain_data?: OrganizationDomainDataResponse[]; + metadata?: Record | null; + external_id?: string | null; +} diff --git a/src/organizations/interfaces/organization.interface.ts b/src/organizations/interfaces/organization.interface.ts index 74e265472..3ea7dd200 100644 --- a/src/organizations/interfaces/organization.interface.ts +++ b/src/organizations/interfaces/organization.interface.ts @@ -1,18 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + import { OrganizationDomain, OrganizationDomainResponse, } from '../../organization-domains/interfaces/organization-domain.interface'; export interface Organization { + /** Distinguishes the Organization object. */ object: 'organization'; + /** Unique identifier of the Organization. */ id: string; + /** A descriptive name for the Organization. This field does not need to be unique. */ name: string; + /** + * Whether the Organization allows profiles outside of its managed domains. + * @deprecated + */ allowProfilesOutsideOrganization: boolean; + /** List of Organization Domains. */ domains: OrganizationDomain[]; + /** The Stripe customer ID of the Organization. */ stripeCustomerId?: string; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; + /** The external ID of the Organization. */ externalId: string | null; + /** Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization. */ metadata: Record; } diff --git a/src/organizations/interfaces/organizations-order.interface.ts b/src/organizations/interfaces/organizations-order.interface.ts new file mode 100644 index 000000000..51a5b4476 --- /dev/null +++ b/src/organizations/interfaces/organizations-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type OrganizationsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/organizations/interfaces/update-audit-logs-retention.interface.ts b/src/organizations/interfaces/update-audit-logs-retention.interface.ts new file mode 100644 index 000000000..861ca0636 --- /dev/null +++ b/src/organizations/interfaces/update-audit-logs-retention.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface UpdateAuditLogsRetention { + /** The number of days Audit Log events will be retained. Valid values are `30` and `365`. */ + retentionPeriodInDays: number; +} + +export interface UpdateAuditLogsRetentionResponse { + retention_period_in_days: number; +} diff --git a/src/organizations/interfaces/update-organization.interface.ts b/src/organizations/interfaces/update-organization.interface.ts new file mode 100644 index 000000000..566a23293 --- /dev/null +++ b/src/organizations/interfaces/update-organization.interface.ts @@ -0,0 +1,36 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainData, + OrganizationDomainDataResponse, +} from './organization-domain-data.interface'; + +export interface UpdateOrganization { + /** The name of the organization. */ + name?: string; + /** Whether the organization allows profiles from outside the organization to sign in. */ + allowProfilesOutsideOrganization?: boolean; + /** + * The domains associated with the organization. Deprecated in favor of `domain_data`. + * @deprecated + */ + domains?: string[]; + /** The domains associated with the organization, including verification state. */ + domainData?: OrganizationDomainData[]; + /** The Stripe customer ID associated with the organization. */ + stripeCustomerId?: string; + /** Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization. */ + metadata?: Record | null; + /** An external identifier for the Organization. */ + externalId?: string | null; +} + +export interface UpdateOrganizationResponse { + name?: string; + allow_profiles_outside_organization?: boolean; + domains?: string[]; + domain_data?: OrganizationDomainDataResponse[]; + stripe_customer_id?: string; + metadata?: Record | null; + external_id?: string | null; +} diff --git a/src/organizations/organizations.ts b/src/organizations/organizations.ts index c388b9b91..4c43fe156 100644 --- a/src/organizations/organizations.ts +++ b/src/organizations/organizations.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { AutoPaginatable } from '../common/utils/pagination'; import { WorkOS } from '../workos'; import { @@ -42,6 +44,14 @@ import { export class Organizations { constructor(private readonly workos: WorkOS) {} + /** + * List Organizations + * + * Get a list of all of your existing organizations matching the criteria specified. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {UnprocessableEntityException} 422 + */ async listOrganizations( options?: ListOrganizationsOptions, ): Promise> { @@ -63,6 +73,16 @@ export class Organizations { ); } + /** + * Create an Organization + * + * Creates a new organization in the current environment. + * @param payload - Object containing name. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ async createOrganization( payload: CreateOrganizationOptions, requestOptions: CreateOrganizationRequestOptions = {}, @@ -76,10 +96,28 @@ export class Organizations { return deserializeOrganization(data); } + /** + * Delete an Organization + * + * Permanently deletes an organization in the current environment. It cannot be undone. + * @param id - Unique identifier of the Organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @returns {Promise} + * @throws {AuthorizationException} 403 + */ async deleteOrganization(id: string) { await this.workos.delete(`/organizations/${id}`); } + /** + * Get an Organization + * + * Get the details of an existing organization. + * @param id - Unique identifier of the Organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getOrganization(id: string): Promise { const { data } = await this.workos.get( `/organizations/${id}`, @@ -88,6 +126,15 @@ export class Organizations { return deserializeOrganization(data); } + /** + * Get an Organization by External ID + * + * Get the details of an existing organization by an [external identifier](https://workos.com/docs/authkit/metadata/external-identifiers). + * @param externalId - The external ID of the Organization. + * @example "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getOrganizationByExternalId(externalId: string): Promise { const { data } = await this.workos.get( `/organizations/external_id/${externalId}`, @@ -96,6 +143,18 @@ export class Organizations { return deserializeOrganization(data); } + /** + * Update an Organization + * + * Updates an organization in the current environment. + * @param payload - The request body. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ async updateOrganization( options: UpdateOrganizationOptions, ): Promise { @@ -148,6 +207,16 @@ export class Organizations { ); } + /** + * List API keys for an organization + * + * Get a list of all API keys for an organization. + * @param organizationId - Unique identifier of the Organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param options - Pagination and filter options. + * @returns {AutoPaginatable} + * @throws {NotFoundException} 404 + */ async listOrganizationApiKeys( options: ListOrganizationApiKeysOptions, ): Promise> { @@ -171,6 +240,17 @@ export class Organizations { ); } + /** + * Create an API key for an organization + * + * Create a new API key for an organization. + * @param organizationId - Unique identifier of the Organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param payload - Object containing name. + * @returns {ApiKeyWithValue} + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async createOrganizationApiKey( options: CreateOrganizationApiKeyOptions, requestOptions: CreateOrganizationApiKeyRequestOptions = {}, diff --git a/src/organizations/serializers/api-key-with-value-owner.serializer.ts b/src/organizations/serializers/api-key-with-value-owner.serializer.ts new file mode 100644 index 000000000..7a175425f --- /dev/null +++ b/src/organizations/serializers/api-key-with-value-owner.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyWithValueOwner, + ApiKeyWithValueOwnerResponse, +} from '../interfaces/api-key-with-value-owner.interface'; + +export const deserializeApiKeyWithValueOwner = ( + response: ApiKeyWithValueOwnerResponse, +): ApiKeyWithValueOwner => ({ + type: response.type, + id: response.id, +}); + +export const serializeApiKeyWithValueOwner = ( + model: ApiKeyWithValueOwner, +): ApiKeyWithValueOwnerResponse => ({ + type: model.type, + id: model.id, +}); diff --git a/src/organizations/serializers/api-key-with-value.serializer.ts b/src/organizations/serializers/api-key-with-value.serializer.ts new file mode 100644 index 000000000..65ef60b9d --- /dev/null +++ b/src/organizations/serializers/api-key-with-value.serializer.ts @@ -0,0 +1,40 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ApiKeyWithValue, + ApiKeyWithValueResponse, +} from '../interfaces/api-key-with-value.interface'; +import { + deserializeApiKeyWithValueOwner, + serializeApiKeyWithValueOwner, +} from './api-key-with-value-owner.serializer'; + +export const deserializeApiKeyWithValue = ( + response: ApiKeyWithValueResponse, +): ApiKeyWithValue => ({ + object: response.object, + id: response.id, + owner: deserializeApiKeyWithValueOwner(response.owner), + name: response.name, + obfuscatedValue: response.obfuscated_value, + lastUsedAt: response.last_used_at ?? null, + permissions: response.permissions, + createdAt: response.created_at, + updatedAt: response.updated_at, + value: response.value, +}); + +export const serializeApiKeyWithValue = ( + model: ApiKeyWithValue, +): ApiKeyWithValueResponse => ({ + object: model.object, + id: model.id, + owner: serializeApiKeyWithValueOwner(model.owner), + name: model.name, + obfuscated_value: model.obfuscatedValue, + last_used_at: model.lastUsedAt, + permissions: model.permissions, + created_at: model.createdAt, + updated_at: model.updatedAt, + value: model.value, +}); diff --git a/src/organizations/serializers/audit-log-configuration-log-stream.serializer.ts b/src/organizations/serializers/audit-log-configuration-log-stream.serializer.ts new file mode 100644 index 000000000..49a0f6acc --- /dev/null +++ b/src/organizations/serializers/audit-log-configuration-log-stream.serializer.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogConfigurationLogStream, + AuditLogConfigurationLogStreamResponse, +} from '../interfaces/audit-log-configuration-log-stream.interface'; + +export const deserializeAuditLogConfigurationLogStream = ( + response: AuditLogConfigurationLogStreamResponse, +): AuditLogConfigurationLogStream => ({ + id: response.id, + type: response.type, + state: response.state, + lastSyncedAt: response.last_synced_at ?? null, + createdAt: response.created_at, +}); + +export const serializeAuditLogConfigurationLogStream = ( + model: AuditLogConfigurationLogStream, +): AuditLogConfigurationLogStreamResponse => ({ + id: model.id, + type: model.type, + state: model.state, + last_synced_at: model.lastSyncedAt, + created_at: model.createdAt, +}); diff --git a/src/organizations/serializers/audit-log-configuration.serializer.ts b/src/organizations/serializers/audit-log-configuration.serializer.ts new file mode 100644 index 000000000..043d046b5 --- /dev/null +++ b/src/organizations/serializers/audit-log-configuration.serializer.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogConfiguration, + AuditLogConfigurationResponse, +} from '../interfaces/audit-log-configuration.interface'; +import { + deserializeAuditLogConfigurationLogStream, + serializeAuditLogConfigurationLogStream, +} from './audit-log-configuration-log-stream.serializer'; + +export const deserializeAuditLogConfiguration = ( + response: AuditLogConfigurationResponse, +): AuditLogConfiguration => ({ + organizationId: response.organization_id, + retentionPeriodInDays: response.retention_period_in_days, + state: response.state, + logStream: + response.log_stream != null + ? deserializeAuditLogConfigurationLogStream(response.log_stream) + : undefined, +}); + +export const serializeAuditLogConfiguration = ( + model: AuditLogConfiguration, +): AuditLogConfigurationResponse => ({ + organization_id: model.organizationId, + retention_period_in_days: model.retentionPeriodInDays, + state: model.state, + log_stream: + model.logStream != null + ? serializeAuditLogConfigurationLogStream(model.logStream) + : undefined, +}); diff --git a/src/organizations/serializers/audit-logs-retention-json.serializer.ts b/src/organizations/serializers/audit-logs-retention-json.serializer.ts new file mode 100644 index 000000000..2c0598aee --- /dev/null +++ b/src/organizations/serializers/audit-logs-retention-json.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuditLogsRetentionJson, + AuditLogsRetentionJsonResponse, +} from '../interfaces/audit-logs-retention-json.interface'; + +export const deserializeAuditLogsRetentionJson = ( + response: AuditLogsRetentionJsonResponse, +): AuditLogsRetentionJson => ({ + retentionPeriodInDays: response.retention_period_in_days ?? null, +}); + +export const serializeAuditLogsRetentionJson = ( + model: AuditLogsRetentionJson, +): AuditLogsRetentionJsonResponse => ({ + retention_period_in_days: model.retentionPeriodInDays, +}); diff --git a/src/organizations/serializers/create-organization-api-key.serializer.ts b/src/organizations/serializers/create-organization-api-key.serializer.ts new file mode 100644 index 000000000..fa3245718 --- /dev/null +++ b/src/organizations/serializers/create-organization-api-key.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateOrganizationApiKey, + CreateOrganizationApiKeyResponse, +} from '../interfaces/create-organization-api-key.interface'; + +export const deserializeCreateOrganizationApiKey = ( + response: CreateOrganizationApiKeyResponse, +): CreateOrganizationApiKey => ({ + name: response.name, + permissions: response.permissions, +}); + +export const serializeCreateOrganizationApiKey = ( + model: CreateOrganizationApiKey, +): CreateOrganizationApiKeyResponse => ({ + name: model.name, + permissions: model.permissions, +}); diff --git a/src/organizations/serializers/organization-domain-data.serializer.ts b/src/organizations/serializers/organization-domain-data.serializer.ts new file mode 100644 index 000000000..292d06320 --- /dev/null +++ b/src/organizations/serializers/organization-domain-data.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationDomainData, + OrganizationDomainDataResponse, +} from '../interfaces/organization-domain-data.interface'; + +export const deserializeOrganizationDomainData = ( + response: OrganizationDomainDataResponse, +): OrganizationDomainData => ({ + domain: response.domain, + state: response.state, +}); + +export const serializeOrganizationDomainData = ( + model: OrganizationDomainData, +): OrganizationDomainDataResponse => ({ + domain: model.domain, + state: model.state, +}); diff --git a/src/organizations/serializers/organization-input.serializer.ts b/src/organizations/serializers/organization-input.serializer.ts new file mode 100644 index 000000000..55c56163c --- /dev/null +++ b/src/organizations/serializers/organization-input.serializer.ts @@ -0,0 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationInput, + OrganizationInputResponse, +} from '../interfaces/organization-input.interface'; +import { + deserializeOrganizationDomainData, + serializeOrganizationDomainData, +} from './organization-domain-data.serializer'; + +export const deserializeOrganizationInput = ( + response: OrganizationInputResponse, +): OrganizationInput => ({ + name: response.name, + allowProfilesOutsideOrganization: + response.allow_profiles_outside_organization, + domains: response.domains, + domainData: + response.domain_data != null + ? response.domain_data.map(deserializeOrganizationDomainData) + : undefined, + metadata: response.metadata ?? null, + externalId: response.external_id ?? null, +}); + +export const serializeOrganizationInput = ( + model: OrganizationInput, +): OrganizationInputResponse => ({ + name: model.name, + allow_profiles_outside_organization: model.allowProfilesOutsideOrganization, + domains: model.domains, + domain_data: + model.domainData != null + ? model.domainData.map(serializeOrganizationDomainData) + : undefined, + metadata: model.metadata ?? null, + external_id: model.externalId ?? null, +}); diff --git a/src/organizations/serializers/organization.serializer.ts b/src/organizations/serializers/organization.serializer.ts index 1c1761d2d..d931af171 100644 --- a/src/organizations/serializers/organization.serializer.ts +++ b/src/organizations/serializers/organization.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { deserializeOrganizationDomain } from '../../organization-domains/serializers/organization-domain.serializer'; import { Organization, OrganizationResponse } from '../interfaces'; diff --git a/src/organizations/serializers/update-audit-logs-retention.serializer.ts b/src/organizations/serializers/update-audit-logs-retention.serializer.ts new file mode 100644 index 000000000..78504c517 --- /dev/null +++ b/src/organizations/serializers/update-audit-logs-retention.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateAuditLogsRetention, + UpdateAuditLogsRetentionResponse, +} from '../interfaces/update-audit-logs-retention.interface'; + +export const deserializeUpdateAuditLogsRetention = ( + response: UpdateAuditLogsRetentionResponse, +): UpdateAuditLogsRetention => ({ + retentionPeriodInDays: response.retention_period_in_days, +}); + +export const serializeUpdateAuditLogsRetention = ( + model: UpdateAuditLogsRetention, +): UpdateAuditLogsRetentionResponse => ({ + retention_period_in_days: model.retentionPeriodInDays, +}); diff --git a/src/organizations/serializers/update-organization.serializer.ts b/src/organizations/serializers/update-organization.serializer.ts new file mode 100644 index 000000000..c670b526d --- /dev/null +++ b/src/organizations/serializers/update-organization.serializer.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateOrganization, + UpdateOrganizationResponse, +} from '../interfaces/update-organization.interface'; +import { + deserializeOrganizationDomainData, + serializeOrganizationDomainData, +} from './organization-domain-data.serializer'; + +export const deserializeUpdateOrganization = ( + response: UpdateOrganizationResponse, +): UpdateOrganization => ({ + name: response.name, + allowProfilesOutsideOrganization: + response.allow_profiles_outside_organization, + domains: response.domains, + domainData: + response.domain_data != null + ? response.domain_data.map(deserializeOrganizationDomainData) + : undefined, + stripeCustomerId: response.stripe_customer_id, + metadata: response.metadata ?? null, + externalId: response.external_id ?? null, +}); + +export const serializeUpdateOrganization = ( + model: UpdateOrganization, +): UpdateOrganizationResponse => ({ + name: model.name, + allow_profiles_outside_organization: model.allowProfilesOutsideOrganization, + domains: model.domains, + domain_data: + model.domainData != null + ? model.domainData.map(serializeOrganizationDomainData) + : undefined, + stripe_customer_id: model.stripeCustomerId, + metadata: model.metadata ?? null, + external_id: model.externalId ?? null, +}); diff --git a/src/passwordless/serializers/index.ts b/src/passwordless/serializers/index.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/pipes/interfaces/connected-account.interface.ts b/src/pipes/interfaces/connected-account.interface.ts new file mode 100644 index 000000000..6ee27712b --- /dev/null +++ b/src/pipes/interfaces/connected-account.interface.ts @@ -0,0 +1,38 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ConnectedAccountState } from '../../common/interfaces/connected-account-state.interface'; + +export interface ConnectedAccount { + /** Distinguishes the connected account object. */ + object: 'connected_account'; + /** The unique identifier of the connected account. */ + id: string; + /** The [User](https://workos.com/docs/reference/authkit/user) identifier associated with this connection. */ + userId: string | null; + /** The [Organization](https://workos.com/docs/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization. */ + organizationId: string | null; + /** The OAuth scopes granted for this connection. */ + scopes: string[]; + /** + * The state of the connected account: + * - `connected`: The connection is active and tokens are valid. + * - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed. + * - `disconnected`: The connection has been disconnected. + */ + state: ConnectedAccountState; + /** The timestamp when the connection was created. */ + createdAt: string; + /** The timestamp when the connection was last updated. */ + updatedAt: string; +} + +export interface ConnectedAccountResponse { + object: 'connected_account'; + id: string; + user_id: string | null; + organization_id: string | null; + scopes: string[]; + state: ConnectedAccountState; + created_at: string; + updated_at: string; +} diff --git a/src/pipes/interfaces/data-integration-access-token-response.interface.ts b/src/pipes/interfaces/data-integration-access-token-response.interface.ts new file mode 100644 index 000000000..f879b59c4 --- /dev/null +++ b/src/pipes/interfaces/data-integration-access-token-response.interface.ts @@ -0,0 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + +export type DataIntegrationAccessTokenResponse = object; + +export type DataIntegrationAccessTokenResponseWire = object; diff --git a/src/pipes/interfaces/data-integration-authorize-url-response.interface.ts b/src/pipes/interfaces/data-integration-authorize-url-response.interface.ts new file mode 100644 index 000000000..eae80c60d --- /dev/null +++ b/src/pipes/interfaces/data-integration-authorize-url-response.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface DataIntegrationAuthorizeUrlResponse { + /** The OAuth authorization URL to redirect the user to. */ + url: string; +} + +export interface DataIntegrationAuthorizeUrlResponseWire { + url: string; +} diff --git a/src/pipes/interfaces/data-integrations-get-data-integration-authorize-url-request.interface.ts b/src/pipes/interfaces/data-integrations-get-data-integration-authorize-url-request.interface.ts new file mode 100644 index 000000000..d59991717 --- /dev/null +++ b/src/pipes/interfaces/data-integrations-get-data-integration-authorize-url-request.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface DataIntegrationsGetDataIntegrationAuthorizeUrlRequest { + /** The ID of the user to authorize. */ + userId: string; + /** An organization ID to scope the authorization to a specific organization. */ + organizationId?: string; + /** The URL to redirect the user to after authorization. */ + returnTo?: string; +} + +export interface DataIntegrationsGetDataIntegrationAuthorizeUrlRequestResponse { + user_id: string; + organization_id?: string; + return_to?: string; +} diff --git a/src/pipes/interfaces/data-integrations-get-user-token-request.interface.ts b/src/pipes/interfaces/data-integrations-get-user-token-request.interface.ts new file mode 100644 index 000000000..ac7beed34 --- /dev/null +++ b/src/pipes/interfaces/data-integrations-get-user-token-request.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface DataIntegrationsGetUserTokenRequest { + /** A [User](https://workos.com/docs/reference/authkit/user) identifier. */ + userId: string; + /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */ + organizationId?: string; +} + +export interface DataIntegrationsGetUserTokenRequestResponse { + user_id: string; + organization_id?: string; +} diff --git a/src/pipes/interfaces/data-integrations-list-response-data-connected-account.interface.ts b/src/pipes/interfaces/data-integrations-list-response-data-connected-account.interface.ts new file mode 100644 index 000000000..b1cea799f --- /dev/null +++ b/src/pipes/interfaces/data-integrations-list-response-data-connected-account.interface.ts @@ -0,0 +1,44 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DataIntegrationsListResponseDataConnectedAccountState } from '../../common/interfaces/data-integrations-list-response-data-connected-account-state.interface'; + +export interface DataIntegrationsListResponseDataConnectedAccount { + /** Distinguishes the connected account object. */ + object: 'connected_account'; + /** The unique identifier of the connected account. */ + id: string; + /** The [User](https://workos.com/docs/reference/authkit/user) identifier associated with this connection. */ + userId: string | null; + /** The [Organization](https://workos.com/docs/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization. */ + organizationId: string | null; + /** The OAuth scopes granted for this connection. */ + scopes: string[]; + /** + * The state of the connected account: + * - `connected`: The connection is active and tokens are valid. + * - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed. + * - `disconnected`: The connection has been disconnected. + */ + state: DataIntegrationsListResponseDataConnectedAccountState; + /** The timestamp when the connection was created. */ + createdAt: string; + /** The timestamp when the connection was last updated. */ + updatedAt: string; + /** + * Use `user_id` instead. + * @deprecated + */ + userlandUserId: string | null; +} + +export interface DataIntegrationsListResponseDataConnectedAccountResponse { + object: 'connected_account'; + id: string; + user_id: string | null; + organization_id: string | null; + scopes: string[]; + state: DataIntegrationsListResponseDataConnectedAccountState; + created_at: string; + updated_at: string; + userland_user_id: string | null; +} diff --git a/src/pipes/interfaces/data-integrations-list-response-data.interface.ts b/src/pipes/interfaces/data-integrations-list-response-data.interface.ts new file mode 100644 index 000000000..45b41b2e3 --- /dev/null +++ b/src/pipes/interfaces/data-integrations-list-response-data.interface.ts @@ -0,0 +1,49 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsListResponseDataConnectedAccount, + DataIntegrationsListResponseDataConnectedAccountResponse, +} from './data-integrations-list-response-data-connected-account.interface'; +import type { DataIntegrationsListResponseDataOwnership } from '../../common/interfaces/data-integrations-list-response-data-ownership.interface'; + +export interface DataIntegrationsListResponseData { + /** Distinguishes the data provider object. */ + object: 'data_provider'; + /** The unique identifier of the provider. */ + id: string; + /** The display name of the provider (e.g., "GitHub", "Slack"). */ + name: string; + /** A description of the provider explaining how it will be used, if configured. */ + description: string | null; + /** The slug identifier used in API calls (e.g., `github`, `slack`, `notion`). */ + slug: string; + /** The type of integration (e.g., `github`, `slack`). */ + integrationType: string; + /** The type of credentials used by the provider (e.g., `oauth2`). */ + credentialsType: string; + /** The OAuth scopes configured for this provider, or `null` if none are configured. */ + scopes: string[] | null; + /** Whether the provider is owned by a user or organization. */ + ownership: DataIntegrationsListResponseDataOwnership; + /** The timestamp when the provider was created. */ + createdAt: string; + /** The timestamp when the provider was last updated. */ + updatedAt: string; + /** The user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` if the user has not connected. */ + connectedAccount: DataIntegrationsListResponseDataConnectedAccount | null; +} + +export interface DataIntegrationsListResponseDataResponse { + object: 'data_provider'; + id: string; + name: string; + description: string | null; + slug: string; + integration_type: string; + credentials_type: string; + scopes: string[] | null; + ownership: DataIntegrationsListResponseDataOwnership; + created_at: string; + updated_at: string; + connected_account: DataIntegrationsListResponseDataConnectedAccountResponse | null; +} diff --git a/src/pipes/interfaces/data-integrations-list-response.interface.ts b/src/pipes/interfaces/data-integrations-list-response.interface.ts new file mode 100644 index 000000000..5afef10dd --- /dev/null +++ b/src/pipes/interfaces/data-integrations-list-response.interface.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsListResponseData, + DataIntegrationsListResponseDataResponse, +} from './data-integrations-list-response-data.interface'; + +export interface DataIntegrationsListResponse { + /** Indicates this is a list response. */ + object: 'list'; + /** A list of [providers](https://workos.com/docs/reference/pipes/provider), each including a [`connected_account`](https://workos.com/docs/reference/pipes/connected-account) field with the user's connection status. */ + data: DataIntegrationsListResponseData[]; +} + +export interface DataIntegrationsListResponseWire { + object: 'list'; + data: DataIntegrationsListResponseDataResponse[]; +} diff --git a/src/pipes/interfaces/index.ts b/src/pipes/interfaces/index.ts new file mode 100644 index 000000000..6b84bf1eb --- /dev/null +++ b/src/pipes/interfaces/index.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export * from './data-integration-access-token-response.interface'; +export * from './data-integration-authorize-url-response.interface'; +export * from './data-integrations-get-data-integration-authorize-url-request.interface'; +export * from './data-integrations-get-user-token-request.interface'; diff --git a/src/pipes/pipes.ts b/src/pipes/pipes.ts index 0bb23b22e..48bc88cb1 100644 --- a/src/pipes/pipes.ts +++ b/src/pipes/pipes.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import type { WorkOS } from '../workos'; import { GetAccessTokenOptions, @@ -26,3 +28,13 @@ export class Pipes { return deserializeGetAccessTokenResponse(data); } } + +export interface GetUserConnectedAccountOptions { + /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization. */ + organizationId?: string; +} + +export interface ListUserDataProvidersOptions { + /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization. */ + organizationId?: string; +} diff --git a/src/pipes/serializers/connected-account.serializer.ts b/src/pipes/serializers/connected-account.serializer.ts new file mode 100644 index 000000000..97809e5e0 --- /dev/null +++ b/src/pipes/serializers/connected-account.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectedAccount, + ConnectedAccountResponse, +} from '../interfaces/connected-account.interface'; + +export const deserializeConnectedAccount = ( + response: ConnectedAccountResponse, +): ConnectedAccount => ({ + object: response.object, + id: response.id, + userId: response.user_id ?? null, + organizationId: response.organization_id ?? null, + scopes: response.scopes, + state: response.state, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeConnectedAccount = ( + model: ConnectedAccount, +): ConnectedAccountResponse => ({ + object: model.object, + id: model.id, + user_id: model.userId, + organization_id: model.organizationId, + scopes: model.scopes, + state: model.state, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/pipes/serializers/data-integration-access-token-response.serializer.ts b/src/pipes/serializers/data-integration-access-token-response.serializer.ts new file mode 100644 index 000000000..c7a6d343c --- /dev/null +++ b/src/pipes/serializers/data-integration-access-token-response.serializer.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationAccessTokenResponse, + DataIntegrationAccessTokenResponseWire, +} from '../interfaces/data-integration-access-token-response.interface'; + +export const deserializeDataIntegrationAccessTokenResponse = ( + _response: DataIntegrationAccessTokenResponseWire, +): DataIntegrationAccessTokenResponse => ({}); + +export const serializeDataIntegrationAccessTokenResponse = ( + _model: DataIntegrationAccessTokenResponse, +): DataIntegrationAccessTokenResponseWire => ({}); diff --git a/src/pipes/serializers/data-integration-authorize-url-response.serializer.ts b/src/pipes/serializers/data-integration-authorize-url-response.serializer.ts new file mode 100644 index 000000000..b24029e9e --- /dev/null +++ b/src/pipes/serializers/data-integration-authorize-url-response.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationAuthorizeUrlResponse, + DataIntegrationAuthorizeUrlResponseWire, +} from '../interfaces/data-integration-authorize-url-response.interface'; + +export const deserializeDataIntegrationAuthorizeUrlResponse = ( + response: DataIntegrationAuthorizeUrlResponseWire, +): DataIntegrationAuthorizeUrlResponse => ({ + url: response.url, +}); + +export const serializeDataIntegrationAuthorizeUrlResponse = ( + model: DataIntegrationAuthorizeUrlResponse, +): DataIntegrationAuthorizeUrlResponseWire => ({ + url: model.url, +}); diff --git a/src/pipes/serializers/data-integrations-get-data-integration-authorize-url-request.serializer.ts b/src/pipes/serializers/data-integrations-get-data-integration-authorize-url-request.serializer.ts new file mode 100644 index 000000000..384fec109 --- /dev/null +++ b/src/pipes/serializers/data-integrations-get-data-integration-authorize-url-request.serializer.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsGetDataIntegrationAuthorizeUrlRequest, + DataIntegrationsGetDataIntegrationAuthorizeUrlRequestResponse, +} from '../interfaces/data-integrations-get-data-integration-authorize-url-request.interface'; + +export const deserializeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest = + ( + response: DataIntegrationsGetDataIntegrationAuthorizeUrlRequestResponse, + ): DataIntegrationsGetDataIntegrationAuthorizeUrlRequest => ({ + userId: response.user_id, + organizationId: response.organization_id, + returnTo: response.return_to, + }); + +export const serializeDataIntegrationsGetDataIntegrationAuthorizeUrlRequest = ( + model: DataIntegrationsGetDataIntegrationAuthorizeUrlRequest, +): DataIntegrationsGetDataIntegrationAuthorizeUrlRequestResponse => ({ + user_id: model.userId, + organization_id: model.organizationId, + return_to: model.returnTo, +}); diff --git a/src/pipes/serializers/data-integrations-get-user-token-request.serializer.ts b/src/pipes/serializers/data-integrations-get-user-token-request.serializer.ts new file mode 100644 index 000000000..1b6253ffe --- /dev/null +++ b/src/pipes/serializers/data-integrations-get-user-token-request.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsGetUserTokenRequest, + DataIntegrationsGetUserTokenRequestResponse, +} from '../interfaces/data-integrations-get-user-token-request.interface'; + +export const deserializeDataIntegrationsGetUserTokenRequest = ( + response: DataIntegrationsGetUserTokenRequestResponse, +): DataIntegrationsGetUserTokenRequest => ({ + userId: response.user_id, + organizationId: response.organization_id, +}); + +export const serializeDataIntegrationsGetUserTokenRequest = ( + model: DataIntegrationsGetUserTokenRequest, +): DataIntegrationsGetUserTokenRequestResponse => ({ + user_id: model.userId, + organization_id: model.organizationId, +}); diff --git a/src/pipes/serializers/data-integrations-list-response-data-connected-account.serializer.ts b/src/pipes/serializers/data-integrations-list-response-data-connected-account.serializer.ts new file mode 100644 index 000000000..e8423f9d0 --- /dev/null +++ b/src/pipes/serializers/data-integrations-list-response-data-connected-account.serializer.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsListResponseDataConnectedAccount, + DataIntegrationsListResponseDataConnectedAccountResponse, +} from '../interfaces/data-integrations-list-response-data-connected-account.interface'; + +export const deserializeDataIntegrationsListResponseDataConnectedAccount = ( + response: DataIntegrationsListResponseDataConnectedAccountResponse, +): DataIntegrationsListResponseDataConnectedAccount => ({ + object: response.object, + id: response.id, + userId: response.user_id ?? null, + organizationId: response.organization_id ?? null, + scopes: response.scopes, + state: response.state, + createdAt: response.created_at, + updatedAt: response.updated_at, + userlandUserId: response.userland_user_id ?? null, +}); + +export const serializeDataIntegrationsListResponseDataConnectedAccount = ( + model: DataIntegrationsListResponseDataConnectedAccount, +): DataIntegrationsListResponseDataConnectedAccountResponse => ({ + object: model.object, + id: model.id, + user_id: model.userId, + organization_id: model.organizationId, + scopes: model.scopes, + state: model.state, + created_at: model.createdAt, + updated_at: model.updatedAt, + userland_user_id: model.userlandUserId, +}); diff --git a/src/pipes/serializers/data-integrations-list-response-data.serializer.ts b/src/pipes/serializers/data-integrations-list-response-data.serializer.ts new file mode 100644 index 000000000..38e8347af --- /dev/null +++ b/src/pipes/serializers/data-integrations-list-response-data.serializer.ts @@ -0,0 +1,54 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsListResponseData, + DataIntegrationsListResponseDataResponse, +} from '../interfaces/data-integrations-list-response-data.interface'; +import { + deserializeDataIntegrationsListResponseDataConnectedAccount, + serializeDataIntegrationsListResponseDataConnectedAccount, +} from './data-integrations-list-response-data-connected-account.serializer'; + +export const deserializeDataIntegrationsListResponseData = ( + response: DataIntegrationsListResponseDataResponse, +): DataIntegrationsListResponseData => ({ + object: response.object, + id: response.id, + name: response.name, + description: response.description ?? null, + slug: response.slug, + integrationType: response.integration_type, + credentialsType: response.credentials_type, + scopes: response.scopes ?? null, + ownership: response.ownership, + createdAt: response.created_at, + updatedAt: response.updated_at, + connectedAccount: + response.connected_account != null + ? deserializeDataIntegrationsListResponseDataConnectedAccount( + response.connected_account, + ) + : null, +}); + +export const serializeDataIntegrationsListResponseData = ( + model: DataIntegrationsListResponseData, +): DataIntegrationsListResponseDataResponse => ({ + object: model.object, + id: model.id, + name: model.name, + description: model.description, + slug: model.slug, + integration_type: model.integrationType, + credentials_type: model.credentialsType, + scopes: model.scopes, + ownership: model.ownership, + created_at: model.createdAt, + updated_at: model.updatedAt, + connected_account: + model.connectedAccount != null + ? serializeDataIntegrationsListResponseDataConnectedAccount( + model.connectedAccount, + ) + : null, +}); diff --git a/src/pipes/serializers/data-integrations-list-response.serializer.ts b/src/pipes/serializers/data-integrations-list-response.serializer.ts new file mode 100644 index 000000000..ae6a169e3 --- /dev/null +++ b/src/pipes/serializers/data-integrations-list-response.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsListResponse, + DataIntegrationsListResponseWire, +} from '../interfaces/data-integrations-list-response.interface'; +import { + deserializeDataIntegrationsListResponseData, + serializeDataIntegrationsListResponseData, +} from './data-integrations-list-response-data.serializer'; + +export const deserializeDataIntegrationsListResponse = ( + response: DataIntegrationsListResponseWire, +): DataIntegrationsListResponse => ({ + object: response.object, + data: response.data.map(deserializeDataIntegrationsListResponseData), +}); + +export const serializeDataIntegrationsListResponse = ( + model: DataIntegrationsListResponse, +): DataIntegrationsListResponseWire => ({ + object: model.object, + data: model.data.map(serializeDataIntegrationsListResponseData), +}); diff --git a/src/radar/fixtures/radar-standalone-assess-request.fixture.json b/src/radar/fixtures/radar-standalone-assess-request.fixture.json deleted file mode 100644 index 6f3673e82..000000000 --- a/src/radar/fixtures/radar-standalone-assess-request.fixture.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ip_address": "49.78.240.97", - "user_agent": "Mozilla/5.0", - "email": "user@example.com", - "auth_method": "Password", - "action": "login", - "device_fingerprint": "fp_abc123", - "bot_score": "0.1" -} diff --git a/src/radar/fixtures/radar-standalone-delete-radar-list-entry-request.fixture.json b/src/radar/fixtures/radar-standalone-delete-radar-list-entry-request.fixture.json deleted file mode 100644 index a123eb26f..000000000 --- a/src/radar/fixtures/radar-standalone-delete-radar-list-entry-request.fixture.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "entry": "198.51.100.42" -} diff --git a/src/radar/fixtures/radar-standalone-update-radar-attempt-request.fixture.json b/src/radar/fixtures/radar-standalone-update-radar-attempt-request.fixture.json deleted file mode 100644 index b9598708a..000000000 --- a/src/radar/fixtures/radar-standalone-update-radar-attempt-request.fixture.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "challenge_status": "success", - "attempt_status": "success" -} diff --git a/src/radar/fixtures/radar-standalone-update-radar-list-request.fixture.json b/src/radar/fixtures/radar-standalone-update-radar-list-request.fixture.json deleted file mode 100644 index a123eb26f..000000000 --- a/src/radar/fixtures/radar-standalone-update-radar-list-request.fixture.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "entry": "198.51.100.42" -} diff --git a/src/radar/interfaces/index.ts b/src/radar/interfaces/index.ts index 34baa9936..d19dcfbd0 100644 --- a/src/radar/interfaces/index.ts +++ b/src/radar/interfaces/index.ts @@ -1,8 +1,10 @@ // This file is auto-generated by oagen. Do not edit. +export * from './radar-action.interface'; export * from './radar-list-entry-already-present-response.interface'; export * from './radar-standalone-assess-request.interface'; export * from './radar-standalone-delete-radar-list-entry-request.interface'; export * from './radar-standalone-response.interface'; export * from './radar-standalone-update-radar-attempt-request.interface'; export * from './radar-standalone-update-radar-list-request.interface'; +export * from './radar-type.interface'; diff --git a/src/radar/interfaces/radar-action.interface.ts b/src/radar/interfaces/radar-action.interface.ts new file mode 100644 index 000000000..e0f79992d --- /dev/null +++ b/src/radar/interfaces/radar-action.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type RadarAction = 'block' | 'allow'; diff --git a/src/radar/interfaces/radar-type.interface.ts b/src/radar/interfaces/radar-type.interface.ts new file mode 100644 index 000000000..a966bec16 --- /dev/null +++ b/src/radar/interfaces/radar-type.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export type RadarType = + | 'ip_address' + | 'domain' + | 'email' + | 'device' + | 'user_agent' + | 'device_fingerprint' + | 'country'; diff --git a/src/radar/radar.ts b/src/radar/radar.ts index d9749403f..2b8357f3f 100644 --- a/src/radar/radar.ts +++ b/src/radar/radar.ts @@ -28,7 +28,7 @@ export class Radar { * * Assess a request for risk using the Radar engine and receive a verdict. * @param payload - Object containing ipAddress, userAgent, email, authMethod, action. - * @returns {RadarStandaloneResponse} + * @returns {Promise} * @throws {BadRequestException} 400 */ async assess( @@ -48,7 +48,7 @@ export class Radar { * @param id - The unique identifier of the Radar attempt to update. * @example "radar_att_01HZBC6N1EB1ZY7KG32X" * @param payload - The request body. - * @returns {void} + * @returns {Promise} * @throws {BadRequestException} 400 * @throws {NotFoundException} 404 */ @@ -71,7 +71,7 @@ export class Radar { * @param action - The list action indicating whether to add the entry to the allow or block list. * @example "block" * @param payload - Object containing entry. - * @returns {RadarListEntryAlreadyPresentResponse} + * @returns {Promise} * @throws {BadRequestException} 400 */ async updateRadarList( @@ -103,7 +103,7 @@ export class Radar { * @param action - The list action indicating whether to remove the entry from the allow or block list. * @example "block" * @param payload - Object containing entry. - * @returns {void} + * @returns {Promise} * @throws {BadRequestException} 400 * @throws {NotFoundException} 404 */ diff --git a/src/sso/interfaces/connection-domain.interface.ts b/src/sso/interfaces/connection-domain.interface.ts new file mode 100644 index 000000000..1d631652f --- /dev/null +++ b/src/sso/interfaces/connection-domain.interface.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface ConnectionDomain { + /** Unique identifier for the Connection Domain. */ + id: string; + /** Distinguishes the Connection Domain object. */ + object: 'connection_domain'; + /** The domain value. */ + domain: string; +} + +export interface ConnectionDomainResponse { + id: string; + object: 'connection_domain'; + domain: string; +} diff --git a/src/sso/interfaces/connection-option.interface.ts b/src/sso/interfaces/connection-option.interface.ts new file mode 100644 index 000000000..a82f27dea --- /dev/null +++ b/src/sso/interfaces/connection-option.interface.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +/** Configuration options for SAML connections. Only present for SAML connection types. */ +export interface ConnectionOption { + /** The signing certificate of the SAML connection. */ + signingCert: string | null; +} + +export interface ConnectionOptionResponse { + signing_cert: string | null; +} diff --git a/src/sso/interfaces/connection.interface.ts b/src/sso/interfaces/connection.interface.ts index e70bec8a7..8339cb7c1 100644 --- a/src/sso/interfaces/connection.interface.ts +++ b/src/sso/interfaces/connection.interface.ts @@ -1,4 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + import { ConnectionType } from './connection-type.enum'; +import type { + ConnectionOption, + ConnectionOptionResponse, +} from './connection-option.interface'; +import type { ConnectionStatus } from '../../common/interfaces/connection-status.interface'; export interface ConnectionDomain { object: 'connection_domain'; @@ -7,15 +14,32 @@ export interface ConnectionDomain { } export interface Connection { + /** Distinguishes the Connection object. */ object: 'connection'; + /** Unique identifier for the Connection. */ id: string; + /** Unique identifier for the Organization in which the Connection resides. */ organizationId?: string; + /** A human-readable name for the Connection. This will most commonly be the organization's name. */ name: string; + /** Indicates whether a Connection is able to authenticate users. */ state: 'draft' | 'active' | 'inactive' | 'validating'; + /** List of Organization Domains. */ domains: ConnectionDomain[]; type: ConnectionType; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; + /** The type of the SSO Connection used to authenticate the user. The Connection type may be used to dynamically generate authorization URLs. */ + connectionType?: ConnectionType; + /** + * Deprecated. Use `state` instead. + * @deprecated + */ + status?: ConnectionStatus; + /** Configuration options for SAML connections. Only present for SAML connection types. */ + options?: ConnectionOption; } export interface ConnectionResponse { @@ -28,4 +52,6 @@ export interface ConnectionResponse { domains: ConnectionDomain[]; created_at: string; updated_at: string; + status?: ConnectionStatus; + options?: ConnectionOptionResponse; } diff --git a/src/sso/interfaces/connections-connection-type.interface.ts b/src/sso/interfaces/connections-connection-type.interface.ts new file mode 100644 index 000000000..5df0c5fb7 --- /dev/null +++ b/src/sso/interfaces/connections-connection-type.interface.ts @@ -0,0 +1,51 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionsConnectionType = + | 'ADFSSAML' + | 'AdpOidc' + | 'AppleOAuth' + | 'Auth0SAML' + | 'AzureSAML' + | 'BitbucketOAuth' + | 'CasSAML' + | 'CloudflareSAML' + | 'ClassLinkSAML' + | 'CleverOIDC' + | 'CyberArkSAML' + | 'DiscordOAuth' + | 'DuoSAML' + | 'EntraIdOIDC' + | 'GenericOIDC' + | 'GenericSAML' + | 'GithubOAuth' + | 'GitLabOAuth' + | 'GoogleOAuth' + | 'GoogleOIDC' + | 'GoogleSAML' + | 'IntuitOAuth' + | 'JumpCloudSAML' + | 'KeycloakSAML' + | 'LastPassSAML' + | 'LinkedInOAuth' + | 'LoginGovOidc' + | 'MagicLink' + | 'MicrosoftOAuth' + | 'MiniOrangeSAML' + | 'NetIqSAML' + | 'OktaOIDC' + | 'OktaSAML' + | 'OneLoginSAML' + | 'OracleSAML' + | 'PingFederateSAML' + | 'PingOneSAML' + | 'RipplingSAML' + | 'SalesforceSAML' + | 'ShibbolethGenericSAML' + | 'ShibbolethSAML' + | 'SimpleSamlPhpSAML' + | 'SalesforceOAuth' + | 'SlackOAuth' + | 'VercelMarketplaceOAuth' + | 'VercelOAuth' + | 'VMwareSAML' + | 'XeroOAuth'; diff --git a/src/sso/interfaces/connections-order.interface.ts b/src/sso/interfaces/connections-order.interface.ts new file mode 100644 index 000000000..8c4337713 --- /dev/null +++ b/src/sso/interfaces/connections-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type ConnectionsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/sso/interfaces/index.ts b/src/sso/interfaces/index.ts index 6de6bc482..c8464de0f 100644 --- a/src/sso/interfaces/index.ts +++ b/src/sso/interfaces/index.ts @@ -1,9 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + export * from './authorization-url-options.interface'; +export * from './connection-option.interface'; export * from './connection-type.enum'; export * from './connection.interface'; -export * from './get-profile-options.interface'; +export * from './connections-connection-type.interface'; +export * from './connections-order.interface'; export * from './get-profile-and-token-options.interface'; +export * from './get-profile-options.interface'; export * from './list-connections-options.interface'; export * from './profile-and-token.interface'; export * from './profile.interface'; -export type { SSOPKCEAuthorizationURLResult } from './authorization-url-options.interface'; +export * from './sso-authorize-url-response.interface'; +export * from './sso-logout-authorize-request.interface'; +export * from './sso-logout-authorize-response.interface'; +export * from './sso-provider.interface'; +export * from './sso-token-response-oauth-token.interface'; +export * from './sso-token-response.interface'; +export * from './token-query.interface'; diff --git a/src/sso/interfaces/profile.interface.ts b/src/sso/interfaces/profile.interface.ts index 850216e6a..096e420ac 100644 --- a/src/sso/interfaces/profile.interface.ts +++ b/src/sso/interfaces/profile.interface.ts @@ -1,21 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + import { UnknownRecord } from '../../common/interfaces/unknown-record.interface'; import { RoleResponse } from '../../roles/interfaces'; import { ConnectionType } from './connection-type.enum'; +/** The user profile returned by the identity provider. */ export interface Profile { + /** Unique identifier of the profile. */ id: string; + /** The user's unique identifier from the identity provider. */ idpId: string; + /** The ID of the organization the user belongs to. */ organizationId?: string; + /** The ID of the SSO connection used for authentication. */ connectionId: string; + /** The type of SSO connection. */ connectionType: ConnectionType; + /** The user's email address. */ email: string; + /** The user's first name. */ firstName?: string; + /** The user's last name. */ lastName?: string; + /** The role assigned to the user within the organization, if applicable. */ role?: RoleResponse; + /** The roles assigned to the user within the organization, if applicable. */ roles?: RoleResponse[]; + /** The groups the user belongs to, as returned by the identity provider. */ groups?: string[]; + /** Custom attribute mappings defined for the connection, returned as key-value pairs. */ customAttributes?: CustomAttributesType; + /** The complete set of raw attributes returned by the identity provider. */ rawAttributes?: { [key: string]: any }; + /** Distinguishes the profile object. */ + object?: 'profile'; } export interface ProfileResponse { @@ -32,4 +50,5 @@ export interface ProfileResponse { groups?: string[]; custom_attributes?: CustomAttributesType; raw_attributes?: { [key: string]: any }; + object?: 'profile'; } diff --git a/src/sso/interfaces/sso-authorize-url-response.interface.ts b/src/sso/interfaces/sso-authorize-url-response.interface.ts new file mode 100644 index 000000000..bea244a6d --- /dev/null +++ b/src/sso/interfaces/sso-authorize-url-response.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface SSOAuthorizeUrlResponse { + /** An OAuth 2.0 authorization URL. */ + url: string; +} + +export interface SSOAuthorizeUrlResponseWire { + url: string; +} diff --git a/src/sso/interfaces/sso-logout-authorize-request.interface.ts b/src/sso/interfaces/sso-logout-authorize-request.interface.ts new file mode 100644 index 000000000..97409e7a7 --- /dev/null +++ b/src/sso/interfaces/sso-logout-authorize-request.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface SSOLogoutAuthorizeRequest { + /** The unique ID of the profile to log out. */ + profileId: string; +} + +export interface SSOLogoutAuthorizeRequestResponse { + profile_id: string; +} diff --git a/src/sso/interfaces/sso-logout-authorize-response.interface.ts b/src/sso/interfaces/sso-logout-authorize-response.interface.ts new file mode 100644 index 000000000..3bed6a517 --- /dev/null +++ b/src/sso/interfaces/sso-logout-authorize-response.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface SSOLogoutAuthorizeResponse { + /** The URL to redirect the user to in order to log out ([Logout Redirect](https://workos.com/docs/reference/sso/logout) endpoint ready to use). */ + logoutUrl: string; + /** The logout token to be used in the [Logout Redirect](https://workos.com/docs/reference/sso/logout) endpoint. */ + logoutToken: string; +} + +export interface SSOLogoutAuthorizeResponseWire { + logout_url: string; + logout_token: string; +} diff --git a/src/sso/interfaces/sso-provider.interface.ts b/src/sso/interfaces/sso-provider.interface.ts new file mode 100644 index 000000000..2cc8f0413 --- /dev/null +++ b/src/sso/interfaces/sso-provider.interface.ts @@ -0,0 +1,7 @@ +// This file is auto-generated by oagen. Do not edit. + +export type SSOProvider = + | 'AppleOAuth' + | 'GitHubOAuth' + | 'GoogleOAuth' + | 'MicrosoftOAuth'; diff --git a/src/sso/interfaces/sso-token-response-oauth-token.interface.ts b/src/sso/interfaces/sso-token-response-oauth-token.interface.ts new file mode 100644 index 000000000..2a8aff58d --- /dev/null +++ b/src/sso/interfaces/sso-token-response-oauth-token.interface.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by oagen. Do not edit. + +/** OAuth tokens issued by the identity provider, if available. */ +export interface SSOTokenResponseOAuthToken { + /** The OAuth provider used for authentication. */ + provider: string; + /** The refresh token from the OAuth provider. */ + refreshToken: string; + /** The access token from the OAuth provider. */ + accessToken: string; + /** The timestamp at which the access token expires. */ + expiresAt: number; + /** A list of OAuth scopes for which the access token is authorized. */ + scopes: string[]; +} + +export interface SSOTokenResponseOAuthTokenResponse { + provider: string; + refresh_token: string; + access_token: string; + expires_at: number; + scopes: string[]; +} diff --git a/src/sso/interfaces/sso-token-response.interface.ts b/src/sso/interfaces/sso-token-response.interface.ts new file mode 100644 index 000000000..7375d537d --- /dev/null +++ b/src/sso/interfaces/sso-token-response.interface.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { Profile, ProfileResponse } from './profile.interface'; +import type { + SSOTokenResponseOAuthToken, + SSOTokenResponseOAuthTokenResponse, +} from './sso-token-response-oauth-token.interface'; + +export interface SSOTokenResponse { + /** The type of token issued. */ + tokenType: 'Bearer'; + /** An access token that can be exchanged for a user profile. Access tokens are short-lived — see the `expires_in` field for the exact lifetime. */ + accessToken: string; + /** The lifetime of the access token in seconds. */ + expiresIn: number; + /** The user profile returned by the identity provider. */ + profile: Profile>; + /** OAuth tokens issued by the identity provider, if available. */ + oauthTokens?: SSOTokenResponseOAuthToken; +} + +export interface SSOTokenResponseWire { + token_type: 'Bearer'; + access_token: string; + expires_in: number; + profile: ProfileResponse>; + oauth_tokens?: SSOTokenResponseOAuthTokenResponse; +} diff --git a/src/sso/interfaces/token-query.interface.ts b/src/sso/interfaces/token-query.interface.ts new file mode 100644 index 000000000..18d9b3e9d --- /dev/null +++ b/src/sso/interfaces/token-query.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface TokenQuery { + /** The client ID of the WorkOS environment. */ + clientId: string; + /** The client secret of the WorkOS environment. */ + clientSecret: string; + /** The authorization code received from the authorization callback. */ + code: string; + /** The grant type for the token request. */ + grantType: 'authorization_code'; +} + +export interface TokenQueryResponse { + client_id: string; + client_secret: string; + code: string; + grant_type: 'authorization_code'; +} diff --git a/src/sso/serializers/connection-domain.serializer.ts b/src/sso/serializers/connection-domain.serializer.ts new file mode 100644 index 000000000..acbd6648f --- /dev/null +++ b/src/sso/serializers/connection-domain.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionDomain, + ConnectionDomainResponse, +} from '../interfaces/connection-domain.interface'; + +export const deserializeConnectionDomain = ( + response: ConnectionDomainResponse, +): ConnectionDomain => ({ + id: response.id, + object: response.object, + domain: response.domain, +}); + +export const serializeConnectionDomain = ( + model: ConnectionDomain, +): ConnectionDomainResponse => ({ + id: model.id, + object: model.object, + domain: model.domain, +}); diff --git a/src/sso/serializers/connection-option.serializer.ts b/src/sso/serializers/connection-option.serializer.ts new file mode 100644 index 000000000..2cd70432c --- /dev/null +++ b/src/sso/serializers/connection-option.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectionOption, + ConnectionOptionResponse, +} from '../interfaces/connection-option.interface'; + +export const deserializeConnectionOption = ( + response: ConnectionOptionResponse, +): ConnectionOption => ({ + signingCert: response.signing_cert ?? null, +}); + +export const serializeConnectionOption = ( + model: ConnectionOption, +): ConnectionOptionResponse => ({ + signing_cert: model.signingCert, +}); diff --git a/src/sso/serializers/connection.serializer.ts b/src/sso/serializers/connection.serializer.ts index 9848ec06d..1524a4b6d 100644 --- a/src/sso/serializers/connection.serializer.ts +++ b/src/sso/serializers/connection.serializer.ts @@ -1,4 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + import { Connection, ConnectionResponse } from '../interfaces'; +import { serializeConnectionDomain } from './connection-domain.serializer'; +import { serializeConnectionOption } from './connection-option.serializer'; export const deserializeConnection = ( connection: ConnectionResponse, @@ -15,3 +19,20 @@ export const deserializeConnection = ( createdAt: connection.created_at, updatedAt: connection.updated_at, }); + +export const serializeConnection = (model: Connection): ConnectionResponse => ({ + object: model.object, + id: model.id, + organization_id: model.organizationId, + connection_type: model.connectionType!, + name: model.name, + state: model.state, + status: model.status!, + domains: model.domains.map(serializeConnectionDomain), + options: + model.options != null + ? serializeConnectionOption(model.options) + : undefined, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/sso/serializers/profile.serializer.ts b/src/sso/serializers/profile.serializer.ts index 2044d0a10..67e772fdb 100644 --- a/src/sso/serializers/profile.serializer.ts +++ b/src/sso/serializers/profile.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { UnknownRecord } from '../../common/interfaces/unknown-record.interface'; import { Profile, ProfileResponse } from '../interfaces'; diff --git a/src/sso/serializers/sso-authorize-url-response.serializer.ts b/src/sso/serializers/sso-authorize-url-response.serializer.ts new file mode 100644 index 000000000..456b45c0f --- /dev/null +++ b/src/sso/serializers/sso-authorize-url-response.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SSOAuthorizeUrlResponse, + SSOAuthorizeUrlResponseWire, +} from '../interfaces/sso-authorize-url-response.interface'; + +export const deserializeSSOAuthorizeUrlResponse = ( + response: SSOAuthorizeUrlResponseWire, +): SSOAuthorizeUrlResponse => ({ + url: response.url, +}); + +export const serializeSSOAuthorizeUrlResponse = ( + model: SSOAuthorizeUrlResponse, +): SSOAuthorizeUrlResponseWire => ({ + url: model.url, +}); diff --git a/src/sso/serializers/sso-logout-authorize-request.serializer.ts b/src/sso/serializers/sso-logout-authorize-request.serializer.ts new file mode 100644 index 000000000..8e9d3392b --- /dev/null +++ b/src/sso/serializers/sso-logout-authorize-request.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SSOLogoutAuthorizeRequest, + SSOLogoutAuthorizeRequestResponse, +} from '../interfaces/sso-logout-authorize-request.interface'; + +export const deserializeSSOLogoutAuthorizeRequest = ( + response: SSOLogoutAuthorizeRequestResponse, +): SSOLogoutAuthorizeRequest => ({ + profileId: response.profile_id, +}); + +export const serializeSSOLogoutAuthorizeRequest = ( + model: SSOLogoutAuthorizeRequest, +): SSOLogoutAuthorizeRequestResponse => ({ + profile_id: model.profileId, +}); diff --git a/src/sso/serializers/sso-logout-authorize-response.serializer.ts b/src/sso/serializers/sso-logout-authorize-response.serializer.ts new file mode 100644 index 000000000..3bd852575 --- /dev/null +++ b/src/sso/serializers/sso-logout-authorize-response.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SSOLogoutAuthorizeResponse, + SSOLogoutAuthorizeResponseWire, +} from '../interfaces/sso-logout-authorize-response.interface'; + +export const deserializeSSOLogoutAuthorizeResponse = ( + response: SSOLogoutAuthorizeResponseWire, +): SSOLogoutAuthorizeResponse => ({ + logoutUrl: response.logout_url, + logoutToken: response.logout_token, +}); + +export const serializeSSOLogoutAuthorizeResponse = ( + model: SSOLogoutAuthorizeResponse, +): SSOLogoutAuthorizeResponseWire => ({ + logout_url: model.logoutUrl, + logout_token: model.logoutToken, +}); diff --git a/src/sso/serializers/sso-token-response-oauth-token.serializer.ts b/src/sso/serializers/sso-token-response-oauth-token.serializer.ts new file mode 100644 index 000000000..2236ad720 --- /dev/null +++ b/src/sso/serializers/sso-token-response-oauth-token.serializer.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SSOTokenResponseOAuthToken, + SSOTokenResponseOAuthTokenResponse, +} from '../interfaces/sso-token-response-oauth-token.interface'; + +export const deserializeSSOTokenResponseOAuthToken = ( + response: SSOTokenResponseOAuthTokenResponse, +): SSOTokenResponseOAuthToken => ({ + provider: response.provider, + refreshToken: response.refresh_token, + accessToken: response.access_token, + expiresAt: response.expires_at, + scopes: response.scopes, +}); + +export const serializeSSOTokenResponseOAuthToken = ( + model: SSOTokenResponseOAuthToken, +): SSOTokenResponseOAuthTokenResponse => ({ + provider: model.provider, + refresh_token: model.refreshToken, + access_token: model.accessToken, + expires_at: model.expiresAt, + scopes: model.scopes, +}); diff --git a/src/sso/serializers/sso-token-response.serializer.ts b/src/sso/serializers/sso-token-response.serializer.ts new file mode 100644 index 000000000..bc4870d08 --- /dev/null +++ b/src/sso/serializers/sso-token-response.serializer.ts @@ -0,0 +1,21 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SSOTokenResponse, + SSOTokenResponseWire, +} from '../interfaces/sso-token-response.interface'; +import { deserializeProfile } from './profile.serializer'; +import { deserializeSSOTokenResponseOAuthToken } from './sso-token-response-oauth-token.serializer'; + +export const deserializeSSOTokenResponse = ( + response: SSOTokenResponseWire, +): SSOTokenResponse => ({ + tokenType: response.token_type, + accessToken: response.access_token, + expiresIn: response.expires_in, + profile: deserializeProfile(response.profile), + oauthTokens: + response.oauth_tokens != null + ? deserializeSSOTokenResponseOAuthToken(response.oauth_tokens) + : undefined, +}); diff --git a/src/sso/serializers/token-query.serializer.ts b/src/sso/serializers/token-query.serializer.ts new file mode 100644 index 000000000..7c4b0238a --- /dev/null +++ b/src/sso/serializers/token-query.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + TokenQuery, + TokenQueryResponse, +} from '../interfaces/token-query.interface'; + +export const deserializeTokenQuery = ( + response: TokenQueryResponse, +): TokenQuery => ({ + clientId: response.client_id, + clientSecret: response.client_secret, + code: response.code, + grantType: response.grant_type, +}); + +export const serializeTokenQuery = (model: TokenQuery): TokenQueryResponse => ({ + client_id: model.clientId, + client_secret: model.clientSecret, + code: model.code, + grant_type: model.grantType, +}); diff --git a/src/sso/sso.ts b/src/sso/sso.ts index 41925b12d..357cb6a98 100644 --- a/src/sso/sso.ts +++ b/src/sso/sso.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { UnknownRecord } from '../common/interfaces/unknown-record.interface'; import { fetchAndDeserialize } from '../common/utils/fetch-and-deserialize'; import { AutoPaginatable } from '../common/utils/pagination'; @@ -23,10 +25,20 @@ import { deserializeProfileAndToken, serializeListConnectionsOptions, } from './serializers'; +import type { SSOProvider } from './interfaces/sso-provider.interface'; export class SSO { constructor(private readonly workos: WorkOS) {} + /** + * List Connections + * + * Get a list of all of your existing connections matching the criteria specified. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {AuthorizationException} 403 + * @throws {UnprocessableEntityException} 422 + */ async listConnections( options?: ListConnectionsOptions, ): Promise> { @@ -47,10 +59,53 @@ export class SSO { options ? serializeListConnectionsOptions(options) : undefined, ); } + /** + * Delete a Connection + * + * Permanently deletes an existing connection. It cannot be undone. + * @param id - Unique identifier for the Connection. + * @example "conn_01E4ZCR3C56J083X43JQXF3JK5" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async deleteConnection(id: string) { await this.workos.delete(`/connections/${id}`); } + /** + * Initiate SSO + * + * Initiates the single sign-on flow. + * @param options.providerScopes - Additional OAuth scopes to request from the identity provider. Only applicable when using OAuth connections. + * @example ["openid","profile","email"] + * @param options.providerQueryParams - Key/value pairs of query parameters to pass to the OAuth provider. Only applicable when using OAuth connections. + * @example {"hd":"example.com","access_type":"offline"} + * @param options.domain - (deprecated) Deprecated. Use `connection` or `organization` instead. Used to initiate SSO for a connection by domain. The domain must be associated with a connection in your WorkOS environment. + * @example "example.com" + * @param options.provider - Used to initiate OAuth authentication with Google, Microsoft, GitHub, or Apple. + * @example "GoogleOAuth" + * @param options.redirectUri - Where to redirect the user after they complete the authentication process. You must use one of the redirect URIs configured via the [Redirects](https://dashboard.workos.com/redirects) page on the dashboard. + * @example "https://example.com/callback" + * @param options.state - An optional parameter that can be used to encode arbitrary information to help restore application state between redirects. If included, the redirect URI received from WorkOS will contain the exact `state` that was passed. + * @example "dj1kUXc0dzlXZ1hjUQ==" + * @param options.connection - Used to initiate SSO for a connection. The value should be a WorkOS connection ID. + * + * You can persist the WorkOS connection ID with application user or team identifiers. WorkOS will use the connection indicated by the connection parameter to direct the user to the corresponding IdP for authentication. + * @example "conn_01E4ZCR3C56J083X43JQXF3JK5" + * @param options.organization - Used to initiate SSO for an organization. The value should be a WorkOS organization ID. + * + * You can persist the WorkOS organization ID with application user or team identifiers. WorkOS will use the organization ID to determine the appropriate connection and the IdP to direct the user to for authentication. + * @example "org_01EHQMYV6MBK39QC5PZXHY59C3" + * @param options.domainHint - Can be used to pre-fill the domain field when initiating authentication with Microsoft OAuth or with a Google SAML connection type. + * @example "example.com" + * @param options.loginHint - Can be used to pre-fill the username/email address field of the IdP sign-in page for the user, if you know their username ahead of time. Currently supported for OAuth, OpenID Connect, Okta, and Entra ID connections. + * @example "user@example.com" + * @param options.nonce - A random string generated by the client that is used to mitigate replay attacks. + * @example "abc123def456" + * @param options - Additional query options. + * @returns {string} + */ getAuthorizationUrl(options: SSOAuthorizationURLOptions): string { const { codeChallenge, @@ -167,6 +222,16 @@ export class SSO { return { url, state, codeVerifier: pkce.codeVerifier }; } + /** + * Get a Connection + * + * Get the details of an existing connection. + * @param id - Unique identifier for the Connection. + * @example "conn_01E4ZCR3C56J083X43JQXF3JK5" + * @returns {Promise} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + */ async getConnection(id: string): Promise { const { data } = await this.workos.get( `/connections/${id}`, @@ -187,6 +252,7 @@ export class SSO { * in depth and provides additional CSRF protection on the authorization flow. * * @throws Error if neither codeVerifier nor API key is available + * @oagen-ignore */ async getProfileAndToken< CustomAttributesType extends UnknownRecord = UnknownRecord, @@ -237,6 +303,14 @@ export class SSO { return deserializeProfileAndToken(data); } + /** + * Get a User Profile + * + * Exchange an access token for a user's [Profile](https://workos.com/docs/reference/sso/profile). Because this profile is returned in the [Get a Profile and Token endpoint](https://workos.com/docs/reference/sso/profile/get-profile-and-token) your application usually does not need to call this endpoint. It is available for any authentication flows that require an additional endpoint to retrieve a user's profile. + * @returns {Promise>} + * @throws {UnauthorizedException} 401 + * @throws {NotFoundException} 404 + */ async getProfile({ accessToken, }: GetProfileOptions): Promise> { @@ -249,3 +323,101 @@ export class SSO { return deserializeProfile(data); } } + +export interface AuthorizeOptions { + /** Additional OAuth scopes to request from the identity provider. Only applicable when using OAuth connections. */ + providerScopes?: string[]; + /** Key/value pairs of query parameters to pass to the OAuth provider. Only applicable when using OAuth connections. */ + providerQueryParams?: Record; + /** The unique identifier of the WorkOS environment client. */ + clientId: string; + /** + * Deprecated. Use `connection` or `organization` instead. Used to initiate SSO for a connection by domain. The domain must be associated with a connection in your WorkOS environment. + * @deprecated + */ + domain?: string; + /** Used to initiate OAuth authentication with Google, Microsoft, GitHub, or Apple. */ + provider?: 'AppleOAuth' | 'GitHubOAuth' | 'GoogleOAuth' | 'MicrosoftOAuth'; + /** Where to redirect the user after they complete the authentication process. You must use one of the redirect URIs configured via the [Redirects](https://dashboard.workos.com/redirects) page on the dashboard. */ + redirectUri: string; + /** + * The only valid option for the response type parameter is `"code"`. + * + * The `"code"` parameter value initiates an [authorization code grant type](https://tools.ietf.org/html/rfc6749#section-4.1). This grant type allows you to exchange an authorization code for an access token during the redirect that takes place after a user has authenticated with an identity provider. + */ + responseType: 'code'; + /** An optional parameter that can be used to encode arbitrary information to help restore application state between redirects. If included, the redirect URI received from WorkOS will contain the exact `state` that was passed. */ + state?: string; + /** + * Used to initiate SSO for a connection. The value should be a WorkOS connection ID. + * + * You can persist the WorkOS connection ID with application user or team identifiers. WorkOS will use the connection indicated by the connection parameter to direct the user to the corresponding IdP for authentication. + */ + connection?: string; + /** + * Used to initiate SSO for an organization. The value should be a WorkOS organization ID. + * + * You can persist the WorkOS organization ID with application user or team identifiers. WorkOS will use the organization ID to determine the appropriate connection and the IdP to direct the user to for authentication. + */ + organization?: string; + /** Can be used to pre-fill the domain field when initiating authentication with Microsoft OAuth or with a Google SAML connection type. */ + domainHint?: string; + /** Can be used to pre-fill the username/email address field of the IdP sign-in page for the user, if you know their username ahead of time. Currently supported for OAuth, OpenID Connect, Okta, and Entra ID connections. */ + loginHint?: string; + /** A random string generated by the client that is used to mitigate replay attacks. */ + nonce?: string; +} + +export interface LogoutOptions { + /** The logout token returned from the [Logout Authorize](https://workos.com/docs/reference/sso/logout/authorize) endpoint. */ + token: string; +} + +export interface GetAuthorizationUrlOptions { + /** Additional OAuth scopes to request from the identity provider. Only applicable when using OAuth connections. */ + providerScopes?: string[]; + /** Key/value pairs of query parameters to pass to the OAuth provider. Only applicable when using OAuth connections. */ + providerQueryParams?: Record; + /** The unique identifier of the WorkOS environment client. */ + clientId: string; + /** + * Deprecated. Use `connection` or `organization` instead. Used to initiate SSO for a connection by domain. The domain must be associated with a connection in your WorkOS environment. + * @deprecated + */ + domain?: string; + /** Used to initiate OAuth authentication with Google, Microsoft, GitHub, or Apple. */ + provider?: SSOProvider; + /** Where to redirect the user after they complete the authentication process. You must use one of the redirect URIs configured via the [Redirects](https://dashboard.workos.com/redirects) page on the dashboard. */ + redirectUri: string; + /** + * The only valid option for the response type parameter is `"code"`. + * + * The `"code"` parameter value initiates an [authorization code grant type](https://tools.ietf.org/html/rfc6749#section-4.1). This grant type allows you to exchange an authorization code for an access token during the redirect that takes place after a user has authenticated with an identity provider. + */ + responseType: 'code'; + /** An optional parameter that can be used to encode arbitrary information to help restore application state between redirects. If included, the redirect URI received from WorkOS will contain the exact `state` that was passed. */ + state?: string; + /** + * Used to initiate SSO for a connection. The value should be a WorkOS connection ID. + * + * You can persist the WorkOS connection ID with application user or team identifiers. WorkOS will use the connection indicated by the connection parameter to direct the user to the corresponding IdP for authentication. + */ + connection?: string; + /** + * Used to initiate SSO for an organization. The value should be a WorkOS organization ID. + * + * You can persist the WorkOS organization ID with application user or team identifiers. WorkOS will use the organization ID to determine the appropriate connection and the IdP to direct the user to for authentication. + */ + organization?: string; + /** Can be used to pre-fill the domain field when initiating authentication with Microsoft OAuth or with a Google SAML connection type. */ + domainHint?: string; + /** Can be used to pre-fill the username/email address field of the IdP sign-in page for the user, if you know their username ahead of time. Currently supported for OAuth, OpenID Connect, Okta, and Entra ID connections. */ + loginHint?: string; + /** A random string generated by the client that is used to mitigate replay attacks. */ + nonce?: string; +} + +export interface GetLogoutUrlOptions { + /** The logout token returned from the [Logout Authorize](https://workos.com/docs/reference/sso/logout/authorize) endpoint. */ + token: string; +} diff --git a/src/user-management-users-feature-flags/user-management-users-feature-flags.ts b/src/user-management-users-feature-flags/user-management-users-feature-flags.ts new file mode 100644 index 000000000..be92efaf4 --- /dev/null +++ b/src/user-management-users-feature-flags/user-management-users-feature-flags.ts @@ -0,0 +1,37 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { PaginationOptions } from '../common/interfaces/pagination-options.interface'; +import type { AutoPaginatable } from '../common/utils/pagination'; +import { createPaginatedList } from '../common/utils/fetch-and-deserialize'; +import type { + Flag, + FlagResponse, +} from '../feature-flags/interfaces/flag.interface'; +import { deserializeFlag } from '../feature-flags/serializers/flag.serializer'; + +export class UserManagementUsersFeatureFlags { + constructor(private readonly workos: WorkOS) {} + + /** + * List enabled feature flags for a user + * + * Get a list of all enabled feature flags for the provided user. This includes feature flags enabled specifically for the user as well as any organizations that the user is a member of. + * @param userId - The ID of the user. + * @example "user_01E4ZCR3C56J083X43JQXF3JK5" + * @param options - Pagination and filter options. + * @returns {AutoPaginatable} + * @throws {NotFoundException} 404 + */ + async list( + userId: string, + options?: PaginationOptions, + ): Promise> { + return createPaginatedList( + this.workos, + `/user_management/users/${userId}/feature-flags`, + deserializeFlag, + options, + ); + } +} diff --git a/src/user-management/interfaces/authenticate-response-impersonator.interface.ts b/src/user-management/interfaces/authenticate-response-impersonator.interface.ts new file mode 100644 index 000000000..47784773e --- /dev/null +++ b/src/user-management/interfaces/authenticate-response-impersonator.interface.ts @@ -0,0 +1,14 @@ +// This file is auto-generated by oagen. Do not edit. + +/** Information about the impersonator if this session was created via impersonation. */ +export interface AuthenticateResponseImpersonator { + /** The email address of the WorkOS Dashboard user who is impersonating the user. */ + email: string; + /** The justification the impersonator gave for impersonating the user. */ + reason: string | null; +} + +export interface AuthenticateResponseImpersonatorResponse { + email: string; + reason: string | null; +} diff --git a/src/user-management/interfaces/authenticate-response-oauth-token.interface.ts b/src/user-management/interfaces/authenticate-response-oauth-token.interface.ts new file mode 100644 index 000000000..9b7755008 --- /dev/null +++ b/src/user-management/interfaces/authenticate-response-oauth-token.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SSOTokenResponseOAuthToken, + SSOTokenResponseOAuthTokenResponse, +} from '../../sso/interfaces/sso-token-response-oauth-token.interface'; + +export type AuthenticateResponseOAuthToken = SSOTokenResponseOAuthToken; +export type AuthenticateResponseOAuthTokenResponse = + SSOTokenResponseOAuthTokenResponse; diff --git a/src/user-management/interfaces/authenticate-response.interface.ts b/src/user-management/interfaces/authenticate-response.interface.ts new file mode 100644 index 000000000..801342aec --- /dev/null +++ b/src/user-management/interfaces/authenticate-response.interface.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { User, UserResponse } from './user.interface'; +import type { + AuthenticateResponseImpersonator, + AuthenticateResponseImpersonatorResponse, +} from './authenticate-response-impersonator.interface'; +import type { + AuthenticateResponseOAuthToken, + AuthenticateResponseOAuthTokenResponse, +} from './authenticate-response-oauth-token.interface'; +import type { AuthenticateResponseAuthenticationMethod } from '../../common/interfaces/authenticate-response-authentication-method.interface'; + +export interface AuthenticateResponse { + /** The corresponding [user](https://workos.com/docs/reference/authkit/user) object. */ + user: User; + /** The ID of the organization the user selected to sign in to. */ + organizationId?: string; + /** An authorization code that can be exchanged for tokens by a different application. */ + authkitAuthorizationCode?: string; + /** A JWT containing information about the current session. */ + accessToken: string; + /** [Exchange this token](https://workos.com/docs/reference/authkit/authentication/refresh-token) for a new access token. */ + refreshToken: string; + /** The authentication method used to initiate the session. */ + authenticationMethod?: AuthenticateResponseAuthenticationMethod; + /** Information about the impersonator if this session was created via impersonation. */ + impersonator?: AuthenticateResponseImpersonator; + /** The OAuth tokens from the identity provider, if applicable. */ + oauthTokens?: AuthenticateResponseOAuthToken; +} + +export interface AuthenticateResponseWire { + user: UserResponse; + organization_id?: string; + authkit_authorization_code?: string; + access_token: string; + refresh_token: string; + authentication_method?: AuthenticateResponseAuthenticationMethod; + impersonator?: AuthenticateResponseImpersonatorResponse; + oauth_tokens?: AuthenticateResponseOAuthTokenResponse; +} diff --git a/src/user-management/interfaces/authorization-code-session-authenticate-request.interface.ts b/src/user-management/interfaces/authorization-code-session-authenticate-request.interface.ts new file mode 100644 index 000000000..059239981 --- /dev/null +++ b/src/user-management/interfaces/authorization-code-session-authenticate-request.interface.ts @@ -0,0 +1,27 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface AuthorizationCodeSessionAuthenticateRequest { + /** The client ID of the application. */ + clientId: string; + /** The client secret of the application. */ + clientSecret: string; + grantType: 'authorization_code'; + /** The authorization code received from the redirect. */ + code: string; + /** The IP address of the user's request. */ + ipAddress?: string; + /** A unique identifier for the device. */ + deviceId?: string; + /** The user agent string from the user's browser. */ + userAgent?: string; +} + +export interface AuthorizationCodeSessionAuthenticateRequestResponse { + client_id: string; + client_secret: string; + grant_type: 'authorization_code'; + code: string; + ip_address?: string; + device_id?: string; + user_agent?: string; +} diff --git a/src/user-management/interfaces/authorized-connect-application-list-data.interface.ts b/src/user-management/interfaces/authorized-connect-application-list-data.interface.ts new file mode 100644 index 000000000..3ecc2f097 --- /dev/null +++ b/src/user-management/interfaces/authorized-connect-application-list-data.interface.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectApplication, + ConnectApplicationResponse, +} from '../../workos-connect/interfaces/connect-application.interface'; + +export interface AuthorizedConnectApplicationListData { + /** Distinguishes the authorized connect application object. */ + object: 'authorized_connect_application'; + /** The unique ID of the authorized connect application. */ + id: string; + /** The scopes granted by the user to the application. */ + grantedScopes: string[]; + application: ConnectApplication; +} + +export interface AuthorizedConnectApplicationListDataResponse { + object: 'authorized_connect_application'; + id: string; + granted_scopes: string[]; + application: ConnectApplicationResponse; +} diff --git a/src/user-management/interfaces/confirm-email-change.interface.ts b/src/user-management/interfaces/confirm-email-change.interface.ts new file mode 100644 index 000000000..0891ea080 --- /dev/null +++ b/src/user-management/interfaces/confirm-email-change.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VerifyEmailAddress, + VerifyEmailAddressResponse, +} from './verify-email-address.interface'; + +export type ConfirmEmailChange = VerifyEmailAddress; +export type ConfirmEmailChangeResponse = VerifyEmailAddressResponse; diff --git a/src/user-management/interfaces/connected-account.interface.ts b/src/user-management/interfaces/connected-account.interface.ts new file mode 100644 index 000000000..6ee27712b --- /dev/null +++ b/src/user-management/interfaces/connected-account.interface.ts @@ -0,0 +1,38 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ConnectedAccountState } from '../../common/interfaces/connected-account-state.interface'; + +export interface ConnectedAccount { + /** Distinguishes the connected account object. */ + object: 'connected_account'; + /** The unique identifier of the connected account. */ + id: string; + /** The [User](https://workos.com/docs/reference/authkit/user) identifier associated with this connection. */ + userId: string | null; + /** The [Organization](https://workos.com/docs/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization. */ + organizationId: string | null; + /** The OAuth scopes granted for this connection. */ + scopes: string[]; + /** + * The state of the connected account: + * - `connected`: The connection is active and tokens are valid. + * - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed. + * - `disconnected`: The connection has been disconnected. + */ + state: ConnectedAccountState; + /** The timestamp when the connection was created. */ + createdAt: string; + /** The timestamp when the connection was last updated. */ + updatedAt: string; +} + +export interface ConnectedAccountResponse { + object: 'connected_account'; + id: string; + user_id: string | null; + organization_id: string | null; + scopes: string[]; + state: ConnectedAccountState; + created_at: string; + updated_at: string; +} diff --git a/src/user-management/interfaces/cors-origin-response.interface.ts b/src/user-management/interfaces/cors-origin-response.interface.ts new file mode 100644 index 000000000..1e907d1fd --- /dev/null +++ b/src/user-management/interfaces/cors-origin-response.interface.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CorsOriginResponse { + /** Distinguishes the CORS origin object. */ + object: 'cors_origin'; + /** Unique identifier of the CORS origin. */ + id: string; + /** The origin URL. */ + origin: string; + /** Timestamp when the CORS origin was created. */ + createdAt: string; + /** Timestamp when the CORS origin was last updated. */ + updatedAt: string; +} + +export interface CorsOriginResponseWire { + object: 'cors_origin'; + id: string; + origin: string; + created_at: string; + updated_at: string; +} diff --git a/src/user-management/interfaces/create-cors-origin.interface.ts b/src/user-management/interfaces/create-cors-origin.interface.ts new file mode 100644 index 000000000..1c4af70d7 --- /dev/null +++ b/src/user-management/interfaces/create-cors-origin.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateCorsOrigin { + /** The origin URL to allow for CORS requests. */ + origin: string; +} + +export interface CreateCorsOriginResponse { + origin: string; +} diff --git a/src/user-management/interfaces/create-magic-code-and-return.interface.ts b/src/user-management/interfaces/create-magic-code-and-return.interface.ts new file mode 100644 index 000000000..202b5590c --- /dev/null +++ b/src/user-management/interfaces/create-magic-code-and-return.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateMagicCodeAndReturn { + /** The email address to send the magic code to. */ + email: string; + /** The invitation token to associate with this magic code. */ + invitationToken?: string; +} + +export interface CreateMagicCodeAndReturnResponse { + email: string; + invitation_token?: string; +} diff --git a/src/user-management/interfaces/create-password-reset-token.interface.ts b/src/user-management/interfaces/create-password-reset-token.interface.ts new file mode 100644 index 000000000..288213e1c --- /dev/null +++ b/src/user-management/interfaces/create-password-reset-token.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreatePasswordResetToken { + /** The email address of the user requesting a password reset. */ + email: string; +} + +export interface CreatePasswordResetTokenResponse { + email: string; +} diff --git a/src/user-management/interfaces/create-password-reset.interface.ts b/src/user-management/interfaces/create-password-reset.interface.ts new file mode 100644 index 000000000..ba709ccdd --- /dev/null +++ b/src/user-management/interfaces/create-password-reset.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreatePasswordReset { + /** The password reset token. */ + token: string; + /** The new password to set for the user. */ + newPassword: string; +} + +export interface CreatePasswordResetResponse { + token: string; + new_password: string; +} diff --git a/src/user-management/interfaces/create-redirect-uri.interface.ts b/src/user-management/interfaces/create-redirect-uri.interface.ts new file mode 100644 index 000000000..d64e372df --- /dev/null +++ b/src/user-management/interfaces/create-redirect-uri.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateRedirectUri { + /** The redirect URI to create. */ + uri: string; +} + +export interface CreateRedirectUriResponse { + uri: string; +} diff --git a/src/user-management/interfaces/create-user-invite-options.interface.ts b/src/user-management/interfaces/create-user-invite-options.interface.ts new file mode 100644 index 000000000..649b8e3ff --- /dev/null +++ b/src/user-management/interfaces/create-user-invite-options.interface.ts @@ -0,0 +1,27 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { CreateUserInviteOptionsLocale } from '../../common/interfaces/create-user-invite-options-locale.interface'; + +export interface CreateUserInviteOptions { + /** The email address of the recipient. */ + email: string; + /** The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. */ + organizationId?: string; + /** The [role](https://workos.com/docs/authkit/roles) that the recipient will receive when they join the organization in the invitation. */ + roleSlug?: string; + /** How many days the invitations will be valid for. Must be between 1 and 30 days. Defaults to 7 days if not specified. */ + expiresInDays?: number; + /** The ID of the [user](https://workos.com/docs/reference/authkit/user) who invites the recipient. The invitation email will mention the name of this user. */ + inviterUserId?: string; + /** The locale to use when rendering the invitation email. See [supported locales](https://workos.com/docs/authkit/hosted-ui/localization). */ + locale?: CreateUserInviteOptionsLocale; +} + +export interface CreateUserInviteOptionsResponse { + email: string; + organization_id?: string; + role_slug?: string; + expires_in_days?: number; + inviter_user_id?: string; + locale?: CreateUserInviteOptionsLocale; +} diff --git a/src/user-management/interfaces/create-user-organization-membership.interface.ts b/src/user-management/interfaces/create-user-organization-membership.interface.ts new file mode 100644 index 000000000..09a9f7a86 --- /dev/null +++ b/src/user-management/interfaces/create-user-organization-membership.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface CreateUserOrganizationMembership { + /** The ID of the [user](https://workos.com/docs/reference/authkit/user). */ + userId: string; + /** The ID of the [organization](https://workos.com/docs/reference/organization) which the user belongs to. */ + organizationId: string; + /** A single role identifier. Defaults to `member` or the explicit default role. Mutually exclusive with `role_slugs`. */ + roleSlug?: string; + /** An array of role identifiers. Limited to one role when Multiple Roles is disabled. Mutually exclusive with `role_slug`. */ + roleSlugs?: string[]; +} + +export interface CreateUserOrganizationMembershipResponse { + user_id: string; + organization_id: string; + role_slug?: string; + role_slugs?: string[]; +} diff --git a/src/user-management/interfaces/create-user.interface.ts b/src/user-management/interfaces/create-user.interface.ts new file mode 100644 index 000000000..e7d6193f1 --- /dev/null +++ b/src/user-management/interfaces/create-user.interface.ts @@ -0,0 +1,36 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { CreateUserPasswordHashType } from '../../common/interfaces/create-user-password-hash-type.interface'; + +export interface CreateUser { + /** The email address of the user. */ + email: string; + /** The password to set for the user. Mutually exclusive with `password_hash` and `password_hash_type`. */ + password?: string | null; + /** The hashed password to set for the user. Mutually exclusive with `password`. */ + passwordHash?: string; + /** The algorithm originally used to hash the password, used when providing a `password_hash`. */ + passwordHashType?: CreateUserPasswordHashType; + /** The first name of the user. */ + firstName?: string | null; + /** The last name of the user. */ + lastName?: string | null; + /** Whether the user's email has been verified. */ + emailVerified?: boolean | null; + /** Object containing metadata key/value pairs associated with the user. */ + metadata?: Record | null; + /** The external ID of the user. */ + externalId?: string | null; +} + +export interface CreateUserResponse { + email: string; + password?: string | null; + password_hash?: string; + password_hash_type?: CreateUserPasswordHashType; + first_name?: string | null; + last_name?: string | null; + email_verified?: boolean | null; + metadata?: Record | null; + external_id?: string | null; +} diff --git a/src/user-management/interfaces/data-integrations-list-response-data-connected-account.interface.ts b/src/user-management/interfaces/data-integrations-list-response-data-connected-account.interface.ts new file mode 100644 index 000000000..b1cea799f --- /dev/null +++ b/src/user-management/interfaces/data-integrations-list-response-data-connected-account.interface.ts @@ -0,0 +1,44 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { DataIntegrationsListResponseDataConnectedAccountState } from '../../common/interfaces/data-integrations-list-response-data-connected-account-state.interface'; + +export interface DataIntegrationsListResponseDataConnectedAccount { + /** Distinguishes the connected account object. */ + object: 'connected_account'; + /** The unique identifier of the connected account. */ + id: string; + /** The [User](https://workos.com/docs/reference/authkit/user) identifier associated with this connection. */ + userId: string | null; + /** The [Organization](https://workos.com/docs/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization. */ + organizationId: string | null; + /** The OAuth scopes granted for this connection. */ + scopes: string[]; + /** + * The state of the connected account: + * - `connected`: The connection is active and tokens are valid. + * - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed. + * - `disconnected`: The connection has been disconnected. + */ + state: DataIntegrationsListResponseDataConnectedAccountState; + /** The timestamp when the connection was created. */ + createdAt: string; + /** The timestamp when the connection was last updated. */ + updatedAt: string; + /** + * Use `user_id` instead. + * @deprecated + */ + userlandUserId: string | null; +} + +export interface DataIntegrationsListResponseDataConnectedAccountResponse { + object: 'connected_account'; + id: string; + user_id: string | null; + organization_id: string | null; + scopes: string[]; + state: DataIntegrationsListResponseDataConnectedAccountState; + created_at: string; + updated_at: string; + userland_user_id: string | null; +} diff --git a/src/user-management/interfaces/data-integrations-list-response-data.interface.ts b/src/user-management/interfaces/data-integrations-list-response-data.interface.ts new file mode 100644 index 000000000..45b41b2e3 --- /dev/null +++ b/src/user-management/interfaces/data-integrations-list-response-data.interface.ts @@ -0,0 +1,49 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsListResponseDataConnectedAccount, + DataIntegrationsListResponseDataConnectedAccountResponse, +} from './data-integrations-list-response-data-connected-account.interface'; +import type { DataIntegrationsListResponseDataOwnership } from '../../common/interfaces/data-integrations-list-response-data-ownership.interface'; + +export interface DataIntegrationsListResponseData { + /** Distinguishes the data provider object. */ + object: 'data_provider'; + /** The unique identifier of the provider. */ + id: string; + /** The display name of the provider (e.g., "GitHub", "Slack"). */ + name: string; + /** A description of the provider explaining how it will be used, if configured. */ + description: string | null; + /** The slug identifier used in API calls (e.g., `github`, `slack`, `notion`). */ + slug: string; + /** The type of integration (e.g., `github`, `slack`). */ + integrationType: string; + /** The type of credentials used by the provider (e.g., `oauth2`). */ + credentialsType: string; + /** The OAuth scopes configured for this provider, or `null` if none are configured. */ + scopes: string[] | null; + /** Whether the provider is owned by a user or organization. */ + ownership: DataIntegrationsListResponseDataOwnership; + /** The timestamp when the provider was created. */ + createdAt: string; + /** The timestamp when the provider was last updated. */ + updatedAt: string; + /** The user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` if the user has not connected. */ + connectedAccount: DataIntegrationsListResponseDataConnectedAccount | null; +} + +export interface DataIntegrationsListResponseDataResponse { + object: 'data_provider'; + id: string; + name: string; + description: string | null; + slug: string; + integration_type: string; + credentials_type: string; + scopes: string[] | null; + ownership: DataIntegrationsListResponseDataOwnership; + created_at: string; + updated_at: string; + connected_account: DataIntegrationsListResponseDataConnectedAccountResponse | null; +} diff --git a/src/user-management/interfaces/data-integrations-list-response.interface.ts b/src/user-management/interfaces/data-integrations-list-response.interface.ts new file mode 100644 index 000000000..5afef10dd --- /dev/null +++ b/src/user-management/interfaces/data-integrations-list-response.interface.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsListResponseData, + DataIntegrationsListResponseDataResponse, +} from './data-integrations-list-response-data.interface'; + +export interface DataIntegrationsListResponse { + /** Indicates this is a list response. */ + object: 'list'; + /** A list of [providers](https://workos.com/docs/reference/pipes/provider), each including a [`connected_account`](https://workos.com/docs/reference/pipes/connected-account) field with the user's connection status. */ + data: DataIntegrationsListResponseData[]; +} + +export interface DataIntegrationsListResponseWire { + object: 'list'; + data: DataIntegrationsListResponseDataResponse[]; +} diff --git a/src/user-management/interfaces/device-authorization-response.interface.ts b/src/user-management/interfaces/device-authorization-response.interface.ts new file mode 100644 index 000000000..0196e07a8 --- /dev/null +++ b/src/user-management/interfaces/device-authorization-response.interface.ts @@ -0,0 +1,25 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface DeviceAuthorizationResponse { + /** The device verification code. */ + deviceCode: string; + /** The end-user verification code. */ + userCode: string; + /** The end-user verification URI. */ + verificationUri: string; + /** Verification URI that includes the user code. */ + verificationUriComplete?: string; + /** Lifetime in seconds of the codes. */ + expiresIn: number; + /** Minimum polling interval in seconds. */ + interval?: number; +} + +export interface DeviceAuthorizationResponseWire { + device_code: string; + user_code: string; + verification_uri: string; + verification_uri_complete?: string; + expires_in: number; + interval?: number; +} diff --git a/src/user-management/interfaces/device-code-session-authenticate-request.interface.ts b/src/user-management/interfaces/device-code-session-authenticate-request.interface.ts new file mode 100644 index 000000000..ab82fd792 --- /dev/null +++ b/src/user-management/interfaces/device-code-session-authenticate-request.interface.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface DeviceCodeSessionAuthenticateRequest { + /** The client ID of the application. */ + clientId: string; + grantType: 'urn:ietf:params:oauth:grant-type:device_code'; + /** The device verification code. */ + deviceCode: string; + /** The IP address of the user's request. */ + ipAddress?: string; + /** A unique identifier for the device. */ + deviceId?: string; + /** The user agent string from the user's browser. */ + userAgent?: string; +} + +export interface DeviceCodeSessionAuthenticateRequestResponse { + client_id: string; + grant_type: 'urn:ietf:params:oauth:grant-type:device_code'; + device_code: string; + ip_address?: string; + device_id?: string; + user_agent?: string; +} diff --git a/src/user-management/interfaces/email-change-confirmation-user.interface.ts b/src/user-management/interfaces/email-change-confirmation-user.interface.ts new file mode 100644 index 000000000..0b1e581aa --- /dev/null +++ b/src/user-management/interfaces/email-change-confirmation-user.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { User, UserResponse } from './user.interface'; + +export type EmailChangeConfirmationUser = User; +export type EmailChangeConfirmationUserResponse = UserResponse; diff --git a/src/user-management/interfaces/email-change-confirmation.interface.ts b/src/user-management/interfaces/email-change-confirmation.interface.ts new file mode 100644 index 000000000..b2c99e79b --- /dev/null +++ b/src/user-management/interfaces/email-change-confirmation.interface.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + EmailChangeConfirmationUser, + EmailChangeConfirmationUserResponse, +} from './email-change-confirmation-user.interface'; + +export interface EmailChangeConfirmation { + /** Distinguishes the email change confirmation object. */ + object: 'email_change_confirmation'; + /** The user object. */ + user: EmailChangeConfirmationUser; +} + +export interface EmailChangeConfirmationResponse { + object: 'email_change_confirmation'; + user: EmailChangeConfirmationUserResponse; +} diff --git a/src/user-management/interfaces/email-change.interface.ts b/src/user-management/interfaces/email-change.interface.ts new file mode 100644 index 000000000..131d02795 --- /dev/null +++ b/src/user-management/interfaces/email-change.interface.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { User, UserResponse } from './user.interface'; + +export interface EmailChange { + /** Distinguishes the email change object. */ + object: 'email_change'; + user: User; + /** The new email address the user is changing to. */ + newEmail: string; + /** The timestamp when the email change code expires. */ + expiresAt: string; + /** The timestamp when the email change challenge was created. */ + createdAt: string; +} + +export interface EmailChangeResponse { + object: 'email_change'; + user: UserResponse; + new_email: string; + expires_at: string; + created_at: string; +} diff --git a/src/user-management/interfaces/email-verification-code-session-authenticate-request.interface.ts b/src/user-management/interfaces/email-verification-code-session-authenticate-request.interface.ts new file mode 100644 index 000000000..00e337f91 --- /dev/null +++ b/src/user-management/interfaces/email-verification-code-session-authenticate-request.interface.ts @@ -0,0 +1,30 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface EmailVerificationCodeSessionAuthenticateRequest { + /** The client ID of the application. */ + clientId: string; + /** The client secret of the application. */ + clientSecret: string; + grantType: 'urn:workos:oauth:grant-type:email-verification:code'; + /** The email verification code. */ + code: string; + /** The pending authentication token from a previous authentication attempt. */ + pendingAuthenticationToken: string; + /** The IP address of the user's request. */ + ipAddress?: string; + /** A unique identifier for the device. */ + deviceId?: string; + /** The user agent string from the user's browser. */ + userAgent?: string; +} + +export interface EmailVerificationCodeSessionAuthenticateRequestResponse { + client_id: string; + client_secret: string; + grant_type: 'urn:workos:oauth:grant-type:email-verification:code'; + code: string; + pending_authentication_token: string; + ip_address?: string; + device_id?: string; + user_agent?: string; +} diff --git a/src/user-management/interfaces/email-verification.interface.ts b/src/user-management/interfaces/email-verification.interface.ts index 8af6cb8fb..6471fa223 100644 --- a/src/user-management/interfaces/email-verification.interface.ts +++ b/src/user-management/interfaces/email-verification.interface.ts @@ -1,11 +1,21 @@ +// This file is auto-generated by oagen. Do not edit. + export interface EmailVerification { + /** Distinguishes the email verification object. */ object: 'email_verification'; + /** The unique ID of the email verification code. */ id: string; + /** The unique ID of the user. */ userId: string; + /** The email address of the user. */ email: string; + /** The timestamp when the email verification code expires. */ expiresAt: string; + /** The code used to verify the email. */ code: string; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; } diff --git a/src/user-management/interfaces/enroll-user-authentication-factor.interface.ts b/src/user-management/interfaces/enroll-user-authentication-factor.interface.ts new file mode 100644 index 000000000..a91fcf532 --- /dev/null +++ b/src/user-management/interfaces/enroll-user-authentication-factor.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface EnrollUserAuthenticationFactor { + /** The type of the factor to enroll. */ + type: 'totp'; + /** Your application or company name displayed in the user's authenticator app. */ + totpIssuer?: string; + /** The user's account name displayed in their authenticator app. */ + totpUser?: string; + /** The Base32-encoded shared secret for TOTP factors. This can be provided when creating the auth factor, otherwise it will be generated. The algorithm used to derive TOTP codes is SHA-1, the code length is 6 digits, and the timestep is 30 seconds – the secret must be compatible with these parameters. */ + totpSecret?: string; +} + +export interface EnrollUserAuthenticationFactorResponse { + type: 'totp'; + totp_issuer?: string; + totp_user?: string; + totp_secret?: string; +} diff --git a/src/user-management/interfaces/index.ts b/src/user-management/interfaces/index.ts index 4ed2c5f9e..91040d746 100644 --- a/src/user-management/interfaces/index.ts +++ b/src/user-management/interfaces/index.ts @@ -1,5 +1,10 @@ -export * from './authenticate-with-code-options.interface'; +// This file is auto-generated by oagen. Do not edit. + +export * from './authenticate-response-impersonator.interface'; +export * from './authenticate-response-oauth-token.interface'; +export * from './authenticate-response.interface'; export * from './authenticate-with-code-and-verifier-options.interface'; +export * from './authenticate-with-code-options.interface'; export * from './authenticate-with-email-verification-options.interface'; export * from './authenticate-with-magic-auth-options.interface'; export * from './authenticate-with-options-base.interface'; @@ -12,17 +17,43 @@ export * from './authenticate-with-totp-options.interface'; export * from './authentication-event.interface'; export * from './authentication-radar-risk-detected-event.interface'; export * from './authentication-response.interface'; +export * from './authorization-code-session-authenticate-request.interface'; export * from './authorization-url-options.interface'; +export * from './authorized-connect-application-list-data.interface'; +export * from './confirm-email-change.interface'; +export * from './connected-account.interface'; +export * from './cors-origin-response.interface'; +export * from './create-cors-origin.interface'; export * from './create-magic-auth-options.interface'; +export * from './create-magic-code-and-return.interface'; export * from './create-organization-membership-options.interface'; export * from './create-password-reset-options.interface'; +export * from './create-password-reset-token.interface'; +export * from './create-password-reset.interface'; +export * from './create-redirect-uri.interface'; +export * from './create-user-invite-options.interface'; export * from './create-user-options.interface'; +export * from './create-user-organization-membership.interface'; +export * from './create-user.interface'; +export * from './data-integrations-list-response-data-connected-account.interface'; +export * from './data-integrations-list-response-data.interface'; +export * from './data-integrations-list-response.interface'; +export * from './device-authorization-response.interface'; +export * from './device-code-session-authenticate-request.interface'; +export * from './email-change-confirmation-user.interface'; +export * from './email-change-confirmation.interface'; +export * from './email-change.interface'; +export * from './email-verification-code-session-authenticate-request.interface'; export * from './email-verification.interface'; export * from './enroll-auth-factor.interface'; +export * from './enroll-user-authentication-factor.interface'; export * from './factor.interface'; export * from './identity.interface'; export * from './impersonator.interface'; export * from './invitation.interface'; +export * from './jwks-response-keys.interface'; +export * from './jwks-response.interface'; +export * from './jwt-template-response.interface'; export * from './list-auth-factors-options.interface'; export * from './list-invitations-options.interface'; export * from './list-organization-memberships-options.interface'; @@ -31,19 +62,48 @@ export * from './list-user-feature-flags-options.interface'; export * from './list-users-options.interface'; export * from './locale.interface'; export * from './logout-url-options.interface'; +export * from './magic-auth-code-session-authenticate-request.interface'; export * from './magic-auth.interface'; +export * from './mfa-totp-session-authenticate-request.interface'; export * from './oauth-tokens.interface'; export * from './organization-membership.interface'; +export * from './organization-selection-session-authenticate-request.interface'; export * from './password-reset.interface'; +export * from './password-session-authenticate-request.interface'; export * from './refresh-and-seal-session-data.interface'; +export * from './refresh-token-session-authenticate-request.interface'; export * from './resend-invitation-options.interface'; +export * from './resend-user-invite-options.interface'; export * from './reset-password-options.interface'; +export * from './reset-password-response.interface'; export * from './revoke-session-options.interface'; +export * from './revoke-session.interface'; +export * from './send-email-change.interface'; export * from './send-invitation-options.interface'; export * from './send-verification-email-options.interface'; +export * from './send-verification-email-response.interface'; export * from './session.interface'; +export * from './sso-device-authorization-request.interface'; +export * from './update-jwt-template.interface'; export * from './update-organization-membership-options.interface'; export * from './update-user-options.interface'; +export * from './update-user-organization-membership.interface'; export * from './update-user-password-options.interface'; +export * from './update-user.interface'; +export * from './user-authentication-factor-enroll-response.interface'; +export * from './user-identities-get-item.interface'; +export * from './user-invite.interface'; +export * from './user-management-authentication-provider.interface'; +export * from './user-management-authentication-screen-hint.interface'; +export * from './user-management-invitations-order.interface'; +export * from './user-management-organization-membership-order.interface'; +export * from './user-management-organization-membership-statuses.interface'; +export * from './user-management-users-authorized-applications-order.interface'; +export * from './user-management-users-order.interface'; +export * from './user-organization-membership.interface'; +export * from './user-sessions-impersonator.interface'; +export * from './user-sessions-list-item.interface'; export * from './user.interface'; +export * from './verify-email-address.interface'; export * from './verify-email-options.interface'; +export * from './verify-email-response.interface'; diff --git a/src/user-management/interfaces/invitation.interface.ts b/src/user-management/interfaces/invitation.interface.ts index a485e6e40..4f2e19898 100644 --- a/src/user-management/interfaces/invitation.interface.ts +++ b/src/user-management/interfaces/invitation.interface.ts @@ -1,17 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + export interface Invitation { + /** Distinguishes the invitation object. */ object: 'invitation'; + /** The unique ID of the invitation. */ id: string; + /** The email address of the recipient. */ email: string; + /** The state of the invitation. */ state: 'pending' | 'accepted' | 'expired' | 'revoked'; + /** The timestamp when the invitation was accepted, or null if not yet accepted. */ acceptedAt: string | null; + /** The timestamp when the invitation was revoked, or null if not revoked. */ revokedAt: string | null; + /** The timestamp when the invitation expires. */ expiresAt: string; + /** The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. */ organizationId: string | null; + /** The ID of the user who invited the recipient, if provided. */ inviterUserId: string | null; + /** The ID of the user who accepted the invitation, once accepted. */ acceptedUserId: string | null; + /** The token used to accept the invitation. */ token: string; + /** The URL where the recipient can accept the invitation. */ acceptInvitationUrl: string; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; } diff --git a/src/user-management/interfaces/jwks-response-keys.interface.ts b/src/user-management/interfaces/jwks-response-keys.interface.ts new file mode 100644 index 000000000..8cd3ed660 --- /dev/null +++ b/src/user-management/interfaces/jwks-response-keys.interface.ts @@ -0,0 +1,31 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface JwksResponseKeys { + /** Algorithm. */ + alg: 'RS256'; + /** Key type. */ + kty: 'RSA'; + /** Key use (signature). */ + use: 'sig'; + /** X.509 certificate chain. */ + x5C: string[]; + /** RSA modulus. */ + n: string; + /** RSA exponent. */ + e: string; + /** Key ID. */ + kid: string; + /** X.509 certificate SHA-256 thumbprint. */ + x5TS256: string; +} + +export interface JwksResponseKeysResponse { + alg: 'RS256'; + kty: 'RSA'; + use: 'sig'; + x_5_c: string[]; + n: string; + e: string; + kid: string; + x_5_t_s_256: string; +} diff --git a/src/user-management/interfaces/jwks-response.interface.ts b/src/user-management/interfaces/jwks-response.interface.ts new file mode 100644 index 000000000..78d66ef11 --- /dev/null +++ b/src/user-management/interfaces/jwks-response.interface.ts @@ -0,0 +1,15 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + JwksResponseKeys, + JwksResponseKeysResponse, +} from './jwks-response-keys.interface'; + +export interface JwksResponse { + /** The public keys used for verifying access tokens. */ + keys: JwksResponseKeys[]; +} + +export interface JwksResponseWire { + keys: JwksResponseKeysResponse[]; +} diff --git a/src/user-management/interfaces/jwt-template-response.interface.ts b/src/user-management/interfaces/jwt-template-response.interface.ts new file mode 100644 index 000000000..0e9e6b114 --- /dev/null +++ b/src/user-management/interfaces/jwt-template-response.interface.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface JWTTemplateResponse { + /** The object type. */ + object: 'jwt_template'; + /** The JWT template content as a Liquid template string. */ + content: string; + /** The timestamp when the JWT template was created. */ + createdAt: string; + /** The timestamp when the JWT template was last updated. */ + updatedAt: string; +} + +export interface JWTTemplateResponseWire { + object: 'jwt_template'; + content: string; + created_at: string; + updated_at: string; +} diff --git a/src/user-management/interfaces/magic-auth-code-session-authenticate-request.interface.ts b/src/user-management/interfaces/magic-auth-code-session-authenticate-request.interface.ts new file mode 100644 index 000000000..0245fb5e1 --- /dev/null +++ b/src/user-management/interfaces/magic-auth-code-session-authenticate-request.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface MagicAuthCodeSessionAuthenticateRequest { + /** The client ID of the application. */ + clientId: string; + /** The client secret of the application. */ + clientSecret: string; + grantType: 'urn:workos:oauth:grant-type:magic-auth:code'; + /** The one-time code for Magic Auth authentication. */ + code: string; + /** The user's email address. */ + email: string; + /** An invitation token to accept during authentication. */ + invitationToken?: string; + /** The IP address of the user's request. */ + ipAddress?: string; + /** A unique identifier for the device. */ + deviceId?: string; + /** The user agent string from the user's browser. */ + userAgent?: string; +} + +export interface MagicAuthCodeSessionAuthenticateRequestResponse { + client_id: string; + client_secret: string; + grant_type: 'urn:workos:oauth:grant-type:magic-auth:code'; + code: string; + email: string; + invitation_token?: string; + ip_address?: string; + device_id?: string; + user_agent?: string; +} diff --git a/src/user-management/interfaces/magic-auth.interface.ts b/src/user-management/interfaces/magic-auth.interface.ts index 1fc599789..220e9c65a 100644 --- a/src/user-management/interfaces/magic-auth.interface.ts +++ b/src/user-management/interfaces/magic-auth.interface.ts @@ -1,11 +1,21 @@ +// This file is auto-generated by oagen. Do not edit. + export interface MagicAuth { + /** Distinguishes the Magic Auth object. */ object: 'magic_auth'; + /** The unique ID of the Magic Auth code. */ id: string; + /** The unique ID of the user. */ userId: string; + /** The email address of the user. */ email: string; + /** The timestamp when the Magic Auth code expires. */ expiresAt: string; + /** The code used to verify the Magic Auth code. */ code: string; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; } diff --git a/src/user-management/interfaces/mfa-totp-session-authenticate-request.interface.ts b/src/user-management/interfaces/mfa-totp-session-authenticate-request.interface.ts new file mode 100644 index 000000000..b42fab86d --- /dev/null +++ b/src/user-management/interfaces/mfa-totp-session-authenticate-request.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface MfaTotpSessionAuthenticateRequest { + /** The client ID of the application. */ + clientId: string; + /** The client secret of the application. */ + clientSecret: string; + grantType: 'urn:workos:oauth:grant-type:mfa-totp'; + /** The TOTP code from the authenticator app. */ + code: string; + /** The pending authentication token from a previous authentication attempt. */ + pendingAuthenticationToken: string; + /** The ID of the MFA authentication challenge. */ + authenticationChallengeId: string; + /** The IP address of the user's request. */ + ipAddress?: string; + /** A unique identifier for the device. */ + deviceId?: string; + /** The user agent string from the user's browser. */ + userAgent?: string; +} + +export interface MfaTotpSessionAuthenticateRequestResponse { + client_id: string; + client_secret: string; + grant_type: 'urn:workos:oauth:grant-type:mfa-totp'; + code: string; + pending_authentication_token: string; + authentication_challenge_id: string; + ip_address?: string; + device_id?: string; + user_agent?: string; +} diff --git a/src/user-management/interfaces/organization-membership.interface.ts b/src/user-management/interfaces/organization-membership.interface.ts index 287b3d5ca..6a1452d2f 100644 --- a/src/user-management/interfaces/organization-membership.interface.ts +++ b/src/user-management/interfaces/organization-membership.interface.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { RoleResponse } from '../../roles/interfaces/'; export type OrganizationMembershipStatus = 'active' | 'inactive' | 'pending'; @@ -8,16 +10,36 @@ export interface BaseOrganizationMembership { organizationId: string; status: OrganizationMembershipStatus; userId: string; - directoryManaged: boolean; + directoryManaged?: boolean; createdAt: string; updatedAt: string; - customAttributes: Record; + customAttributes?: Record; } export interface OrganizationMembership extends BaseOrganizationMembership { + /** The name of the organization which the user belongs to. */ organizationName: string; + /** The primary role assigned to the user within the organization. */ role: RoleResponse; roles?: RoleResponse[]; + /** Distinguishes the organization membership object. */ + object: 'organization_membership'; + /** The unique ID of the organization membership. */ + id: string; + /** The ID of the user. */ + userId: string; + /** The ID of the organization which the user belongs to. */ + organizationId: string; + /** The status of the organization membership. One of `active`, `inactive`, or `pending`. */ + status: OrganizationMembershipStatus; + /** Whether this organization membership is managed by a directory sync connection. */ + directoryManaged?: boolean; + /** An object containing IdP-sourced attributes from the linked [Directory User](https://workos.com/docs/reference/directory-sync/directory-user) or [SSO Profile](https://workos.com/docs/reference/sso/profile). Directory User attributes take precedence when both are linked. */ + customAttributes?: Record; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; } export type AuthorizationOrganizationMembership = BaseOrganizationMembership; @@ -26,7 +48,7 @@ export interface BaseOrganizationMembershipResponse { object: 'organization_membership'; id: string; organization_id: string; - organization_name: string; + organization_name?: string; status: OrganizationMembershipStatus; user_id: string; directory_managed?: boolean; @@ -38,6 +60,16 @@ export interface BaseOrganizationMembershipResponse { export interface OrganizationMembershipResponse extends BaseOrganizationMembershipResponse { role: RoleResponse; roles?: RoleResponse[]; + object: 'organization_membership'; + id: string; + user_id: string; + organization_id: string; + status: OrganizationMembershipStatus; + directory_managed?: boolean; + organization_name?: string; + custom_attributes?: Record; + created_at: string; + updated_at: string; } export type AuthorizationOrganizationMembershipResponse = diff --git a/src/user-management/interfaces/organization-selection-session-authenticate-request.interface.ts b/src/user-management/interfaces/organization-selection-session-authenticate-request.interface.ts new file mode 100644 index 000000000..361aa56ea --- /dev/null +++ b/src/user-management/interfaces/organization-selection-session-authenticate-request.interface.ts @@ -0,0 +1,30 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface OrganizationSelectionSessionAuthenticateRequest { + /** The client ID of the application. */ + clientId: string; + /** The client secret of the application. */ + clientSecret: string; + grantType: 'urn:workos:oauth:grant-type:organization-selection'; + /** The pending authentication token from a previous authentication attempt. */ + pendingAuthenticationToken: string; + /** The ID of the organization the user selected. */ + organizationId: string; + /** The IP address of the user's request. */ + ipAddress?: string; + /** A unique identifier for the device. */ + deviceId?: string; + /** The user agent string from the user's browser. */ + userAgent?: string; +} + +export interface OrganizationSelectionSessionAuthenticateRequestResponse { + client_id: string; + client_secret: string; + grant_type: 'urn:workos:oauth:grant-type:organization-selection'; + pending_authentication_token: string; + organization_id: string; + ip_address?: string; + device_id?: string; + user_agent?: string; +} diff --git a/src/user-management/interfaces/password-reset.interface.ts b/src/user-management/interfaces/password-reset.interface.ts index 1d9644394..4d70478e3 100644 --- a/src/user-management/interfaces/password-reset.interface.ts +++ b/src/user-management/interfaces/password-reset.interface.ts @@ -1,11 +1,21 @@ +// This file is auto-generated by oagen. Do not edit. + export interface PasswordReset { + /** Distinguishes the password reset object. */ object: 'password_reset'; + /** The unique ID of the password reset object. */ id: string; + /** The unique ID of the user. */ userId: string; + /** The email address of the user. */ email: string; + /** The token used to reset the password. */ passwordResetToken: string; + /** The URL where the user can reset their password. */ passwordResetUrl: string; + /** The timestamp when the password reset token expires. */ expiresAt: string; + /** The timestamp when the password reset token was created. */ createdAt: string; } diff --git a/src/user-management/interfaces/password-session-authenticate-request.interface.ts b/src/user-management/interfaces/password-session-authenticate-request.interface.ts new file mode 100644 index 000000000..cf471f738 --- /dev/null +++ b/src/user-management/interfaces/password-session-authenticate-request.interface.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface PasswordSessionAuthenticateRequest { + /** The client ID of the application. */ + clientId: string; + /** The client secret of the application. */ + clientSecret: string; + grantType: 'password'; + /** The user's email address. */ + email: string; + /** The user's password. */ + password: string; + /** An invitation token to accept during authentication. */ + invitationToken?: string; + /** The IP address of the user's request. */ + ipAddress?: string; + /** A unique identifier for the device. */ + deviceId?: string; + /** The user agent string from the user's browser. */ + userAgent?: string; +} + +export interface PasswordSessionAuthenticateRequestResponse { + client_id: string; + client_secret: string; + grant_type: 'password'; + email: string; + password: string; + invitation_token?: string; + ip_address?: string; + device_id?: string; + user_agent?: string; +} diff --git a/src/user-management/interfaces/redirect-uri.interface.ts b/src/user-management/interfaces/redirect-uri.interface.ts new file mode 100644 index 000000000..d32ed8e25 --- /dev/null +++ b/src/user-management/interfaces/redirect-uri.interface.ts @@ -0,0 +1,25 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface RedirectUri { + /** The object type. */ + object: 'redirect_uri'; + /** The ID of the redirect URI. */ + id: string; + /** The redirect URI. */ + uri: string; + /** Whether this is the default redirect URI. */ + default: boolean; + /** The timestamp when the redirect URI was created. */ + createdAt: string; + /** The timestamp when the redirect URI was last updated. */ + updatedAt: string; +} + +export interface RedirectUriResponse { + object: 'redirect_uri'; + id: string; + uri: string; + default: boolean; + created_at: string; + updated_at: string; +} diff --git a/src/user-management/interfaces/refresh-token-session-authenticate-request.interface.ts b/src/user-management/interfaces/refresh-token-session-authenticate-request.interface.ts new file mode 100644 index 000000000..e99af69b1 --- /dev/null +++ b/src/user-management/interfaces/refresh-token-session-authenticate-request.interface.ts @@ -0,0 +1,30 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface RefreshTokenSessionAuthenticateRequest { + /** The client ID of the application. */ + clientId: string; + /** The client secret of the application. */ + clientSecret: string; + grantType: 'refresh_token'; + /** The refresh token to exchange for new tokens. */ + refreshToken: string; + /** The ID of the organization to scope the session to. */ + organizationId?: string; + /** The IP address of the user's request. */ + ipAddress?: string; + /** A unique identifier for the device. */ + deviceId?: string; + /** The user agent string from the user's browser. */ + userAgent?: string; +} + +export interface RefreshTokenSessionAuthenticateRequestResponse { + client_id: string; + client_secret: string; + grant_type: 'refresh_token'; + refresh_token: string; + organization_id?: string; + ip_address?: string; + device_id?: string; + user_agent?: string; +} diff --git a/src/user-management/interfaces/resend-user-invite-options.interface.ts b/src/user-management/interfaces/resend-user-invite-options.interface.ts new file mode 100644 index 000000000..a882c09ed --- /dev/null +++ b/src/user-management/interfaces/resend-user-invite-options.interface.ts @@ -0,0 +1,12 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { ResendUserInviteOptionsLocale } from '../../common/interfaces/resend-user-invite-options-locale.interface'; + +export interface ResendUserInviteOptions { + /** The locale to use when rendering the invitation email. See [supported locales](https://workos.com/docs/authkit/hosted-ui/localization). */ + locale?: ResendUserInviteOptionsLocale; +} + +export interface ResendUserInviteOptionsResponse { + locale?: ResendUserInviteOptionsLocale; +} diff --git a/src/user-management/interfaces/reset-password-response.interface.ts b/src/user-management/interfaces/reset-password-response.interface.ts new file mode 100644 index 000000000..2fb800fce --- /dev/null +++ b/src/user-management/interfaces/reset-password-response.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SendVerificationEmailResponse, + SendVerificationEmailResponseWire, +} from './send-verification-email-response.interface'; + +export type ResetPasswordResponse = SendVerificationEmailResponse; +export type ResetPasswordResponseWire = SendVerificationEmailResponseWire; diff --git a/src/user-management/interfaces/revoke-session.interface.ts b/src/user-management/interfaces/revoke-session.interface.ts new file mode 100644 index 000000000..14c1df988 --- /dev/null +++ b/src/user-management/interfaces/revoke-session.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface RevokeSession { + /** The ID of the session to revoke. This can be extracted from the `sid` claim of the access token. */ + sessionId: string; + /** The URL to redirect the user to after session revocation. */ + returnTo?: string; +} + +export interface RevokeSessionResponse { + session_id: string; + return_to?: string; +} diff --git a/src/user-management/interfaces/send-email-change.interface.ts b/src/user-management/interfaces/send-email-change.interface.ts new file mode 100644 index 000000000..4ee97c6ce --- /dev/null +++ b/src/user-management/interfaces/send-email-change.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface SendEmailChange { + /** The new email address to change to. */ + newEmail: string; +} + +export interface SendEmailChangeResponse { + new_email: string; +} diff --git a/src/user-management/interfaces/send-verification-email-response.interface.ts b/src/user-management/interfaces/send-verification-email-response.interface.ts new file mode 100644 index 000000000..4286392d8 --- /dev/null +++ b/src/user-management/interfaces/send-verification-email-response.interface.ts @@ -0,0 +1,12 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { User, UserResponse } from './user.interface'; + +export interface SendVerificationEmailResponse { + /** The user to whom the verification email was sent. */ + user: User; +} + +export interface SendVerificationEmailResponseWire { + user: UserResponse; +} diff --git a/src/user-management/interfaces/sso-device-authorization-request.interface.ts b/src/user-management/interfaces/sso-device-authorization-request.interface.ts new file mode 100644 index 000000000..273791d7b --- /dev/null +++ b/src/user-management/interfaces/sso-device-authorization-request.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface SSODeviceAuthorizationRequest { + /** The WorkOS client ID for your application. */ + clientId: string; +} + +export interface SSODeviceAuthorizationRequestResponse { + client_id: string; +} diff --git a/src/user-management/interfaces/update-jwt-template.interface.ts b/src/user-management/interfaces/update-jwt-template.interface.ts new file mode 100644 index 000000000..02d2bc994 --- /dev/null +++ b/src/user-management/interfaces/update-jwt-template.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface UpdateJWTTemplate { + /** The JWT template content as a Liquid template string. */ + content: string; +} + +export interface UpdateJWTTemplateResponse { + content: string; +} diff --git a/src/user-management/interfaces/update-user-organization-membership.interface.ts b/src/user-management/interfaces/update-user-organization-membership.interface.ts new file mode 100644 index 000000000..032fa7ae1 --- /dev/null +++ b/src/user-management/interfaces/update-user-organization-membership.interface.ts @@ -0,0 +1,13 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface UpdateUserOrganizationMembership { + /** A single role identifier. Defaults to `member` or the explicit default role. Mutually exclusive with `role_slugs`. */ + roleSlug?: string; + /** An array of role identifiers. Limited to one role when Multiple Roles is disabled. Mutually exclusive with `role_slug`. */ + roleSlugs?: string[]; +} + +export interface UpdateUserOrganizationMembershipResponse { + role_slug?: string; + role_slugs?: string[]; +} diff --git a/src/user-management/interfaces/update-user.interface.ts b/src/user-management/interfaces/update-user.interface.ts new file mode 100644 index 000000000..ff33a8435 --- /dev/null +++ b/src/user-management/interfaces/update-user.interface.ts @@ -0,0 +1,39 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { UpdateUserPasswordHashType } from '../../common/interfaces/update-user-password-hash-type.interface'; + +export interface UpdateUser { + /** The email address of the user. */ + email?: string; + /** The first name of the user. */ + firstName?: string; + /** The last name of the user. */ + lastName?: string; + /** Whether the user's email has been verified. */ + emailVerified?: boolean; + /** The password to set for the user. */ + password?: string; + /** The hashed password to set for the user. Mutually exclusive with `password`. */ + passwordHash?: string; + /** The algorithm originally used to hash the password, used when providing a `password_hash`. */ + passwordHashType?: UpdateUserPasswordHashType; + /** Object containing metadata key/value pairs associated with the user. */ + metadata?: Record | null; + /** The external ID of the user. */ + externalId?: string | null; + /** The user's preferred locale. */ + locale?: string | null; +} + +export interface UpdateUserResponse { + email?: string; + first_name?: string; + last_name?: string; + email_verified?: boolean; + password?: string; + password_hash?: string; + password_hash_type?: UpdateUserPasswordHashType; + metadata?: Record | null; + external_id?: string | null; + locale?: string | null; +} diff --git a/src/user-management/interfaces/user-authentication-factor-enroll-response.interface.ts b/src/user-management/interfaces/user-authentication-factor-enroll-response.interface.ts new file mode 100644 index 000000000..695cc7131 --- /dev/null +++ b/src/user-management/interfaces/user-authentication-factor-enroll-response.interface.ts @@ -0,0 +1,21 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticationFactor, + AuthenticationFactorResponse, +} from '../../mfa/interfaces/authentication-factor.interface'; +import type { + AuthenticationChallenge, + AuthenticationChallengeResponse, +} from '../../mfa/interfaces/authentication-challenge.interface'; + +export interface UserAuthenticationFactorEnrollResponse { + authenticationFactor: AuthenticationFactor; + /** The [authentication challenge](https://workos.com/docs/reference/authkit/mfa/authentication-challenge) object that is used to complete the authentication process. */ + authenticationChallenge: AuthenticationChallenge; +} + +export interface UserAuthenticationFactorEnrollResponseWire { + authentication_factor: AuthenticationFactorResponse; + authentication_challenge: AuthenticationChallengeResponse; +} diff --git a/src/user-management/interfaces/user-identities-get-item.interface.ts b/src/user-management/interfaces/user-identities-get-item.interface.ts new file mode 100644 index 000000000..c9c37af9d --- /dev/null +++ b/src/user-management/interfaces/user-identities-get-item.interface.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { UserIdentitiesGetItemProvider } from '../../common/interfaces/user-identities-get-item-provider.interface'; + +export interface UserIdentitiesGetItem { + /** The unique ID of the user in the external identity provider. */ + idpId: string; + /** The type of the identity. */ + type: 'OAuth'; + /** The type of OAuth provider for the identity. */ + provider: UserIdentitiesGetItemProvider; +} + +export interface UserIdentitiesGetItemResponse { + idp_id: string; + type: 'OAuth'; + provider: UserIdentitiesGetItemProvider; +} diff --git a/src/user-management/interfaces/user-invite.interface.ts b/src/user-management/interfaces/user-invite.interface.ts new file mode 100644 index 000000000..5b95517c3 --- /dev/null +++ b/src/user-management/interfaces/user-invite.interface.ts @@ -0,0 +1,51 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { UserInviteState } from '../../common/interfaces/user-invite-state.interface'; + +export interface UserInvite { + /** Distinguishes the invitation object. */ + object: 'invitation'; + /** The unique ID of the invitation. */ + id: string; + /** The email address of the recipient. */ + email: string; + /** The state of the invitation. */ + state: UserInviteState; + /** The timestamp when the invitation was accepted, or null if not yet accepted. */ + acceptedAt: string | null; + /** The timestamp when the invitation was revoked, or null if not revoked. */ + revokedAt: string | null; + /** The timestamp when the invitation expires. */ + expiresAt: string; + /** The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. */ + organizationId: string | null; + /** The ID of the user who invited the recipient, if provided. */ + inviterUserId: string | null; + /** The ID of the user who accepted the invitation, once accepted. */ + acceptedUserId: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + /** The token used to accept the invitation. */ + token: string; + /** The URL where the recipient can accept the invitation. */ + acceptInvitationUrl: string; +} + +export interface UserInviteResponse { + object: 'invitation'; + id: string; + email: string; + state: UserInviteState; + accepted_at: string | null; + revoked_at: string | null; + expires_at: string; + organization_id: string | null; + inviter_user_id: string | null; + accepted_user_id: string | null; + created_at: string; + updated_at: string; + token: string; + accept_invitation_url: string; +} diff --git a/src/user-management/interfaces/user-management-authentication-provider.interface.ts b/src/user-management/interfaces/user-management-authentication-provider.interface.ts new file mode 100644 index 000000000..d3eeaab35 --- /dev/null +++ b/src/user-management/interfaces/user-management-authentication-provider.interface.ts @@ -0,0 +1,8 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserManagementAuthenticationProvider = + | 'authkit' + | 'AppleOAuth' + | 'GitHubOAuth' + | 'GoogleOAuth' + | 'MicrosoftOAuth'; diff --git a/src/user-management/interfaces/user-management-authentication-screen-hint.interface.ts b/src/user-management/interfaces/user-management-authentication-screen-hint.interface.ts new file mode 100644 index 000000000..80016780b --- /dev/null +++ b/src/user-management/interfaces/user-management-authentication-screen-hint.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserManagementAuthenticationScreenHint = 'sign-up' | 'sign-in'; diff --git a/src/user-management/interfaces/user-management-invitations-order.interface.ts b/src/user-management/interfaces/user-management-invitations-order.interface.ts new file mode 100644 index 000000000..ebb0240c8 --- /dev/null +++ b/src/user-management/interfaces/user-management-invitations-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserManagementInvitationsOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/user-management/interfaces/user-management-organization-membership-order.interface.ts b/src/user-management/interfaces/user-management-organization-membership-order.interface.ts new file mode 100644 index 000000000..2a2be6fbf --- /dev/null +++ b/src/user-management/interfaces/user-management-organization-membership-order.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserManagementOrganizationMembershipOrder = + | 'normal' + | 'desc' + | 'asc'; diff --git a/src/user-management/interfaces/user-management-organization-membership-statuses.interface.ts b/src/user-management/interfaces/user-management-organization-membership-statuses.interface.ts new file mode 100644 index 000000000..a747ca6d6 --- /dev/null +++ b/src/user-management/interfaces/user-management-organization-membership-statuses.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserManagementOrganizationMembershipStatuses = + | 'active' + | 'inactive' + | 'pending'; diff --git a/src/user-management/interfaces/user-management-users-authorized-applications-order.interface.ts b/src/user-management/interfaces/user-management-users-authorized-applications-order.interface.ts new file mode 100644 index 000000000..f8cb49870 --- /dev/null +++ b/src/user-management/interfaces/user-management-users-authorized-applications-order.interface.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserManagementUsersAuthorizedApplicationsOrder = + | 'normal' + | 'desc' + | 'asc'; diff --git a/src/user-management/interfaces/user-management-users-order.interface.ts b/src/user-management/interfaces/user-management-users-order.interface.ts new file mode 100644 index 000000000..ccbd97720 --- /dev/null +++ b/src/user-management/interfaces/user-management-users-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type UserManagementUsersOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/user-management/interfaces/user-organization-membership.interface.ts b/src/user-management/interfaces/user-organization-membership.interface.ts new file mode 100644 index 000000000..38ae72cea --- /dev/null +++ b/src/user-management/interfaces/user-organization-membership.interface.ts @@ -0,0 +1,46 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SlimRole, + SlimRoleResponse, +} from '../../authorization/interfaces/slim-role.interface'; +import type { UserOrganizationMembershipStatus } from '../../common/interfaces/user-organization-membership-status.interface'; + +export interface UserOrganizationMembership { + /** Distinguishes the organization membership object. */ + object: 'organization_membership'; + /** The unique ID of the organization membership. */ + id: string; + /** The ID of the user. */ + userId: string; + /** The ID of the organization which the user belongs to. */ + organizationId: string; + /** The status of the organization membership. One of `active`, `inactive`, or `pending`. */ + status: UserOrganizationMembershipStatus; + /** Whether this organization membership is managed by a directory sync connection. */ + directoryManaged: boolean; + /** The name of the organization which the user belongs to. */ + organizationName?: string; + /** An object containing IdP-sourced attributes from the linked [Directory User](https://workos.com/docs/reference/directory-sync/directory-user) or [SSO Profile](https://workos.com/docs/reference/sso/profile). Directory User attributes take precedence when both are linked. */ + customAttributes?: Record; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; + /** The primary role assigned to the user within the organization. */ + role: SlimRole; +} + +export interface UserOrganizationMembershipResponse { + object: 'organization_membership'; + id: string; + user_id: string; + organization_id: string; + status: UserOrganizationMembershipStatus; + directory_managed: boolean; + organization_name?: string; + custom_attributes?: Record; + created_at: string; + updated_at: string; + role: SlimRoleResponse; +} diff --git a/src/user-management/interfaces/user-sessions-impersonator.interface.ts b/src/user-management/interfaces/user-sessions-impersonator.interface.ts new file mode 100644 index 000000000..d9eba79ec --- /dev/null +++ b/src/user-management/interfaces/user-sessions-impersonator.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticateResponseImpersonator, + AuthenticateResponseImpersonatorResponse, +} from './authenticate-response-impersonator.interface'; + +export type UserSessionsImpersonator = AuthenticateResponseImpersonator; +export type UserSessionsImpersonatorResponse = + AuthenticateResponseImpersonatorResponse; diff --git a/src/user-management/interfaces/user-sessions-list-item.interface.ts b/src/user-management/interfaces/user-sessions-list-item.interface.ts new file mode 100644 index 000000000..9c88a82bb --- /dev/null +++ b/src/user-management/interfaces/user-sessions-list-item.interface.ts @@ -0,0 +1,53 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserSessionsImpersonator, + UserSessionsImpersonatorResponse, +} from './user-sessions-impersonator.interface'; +import type { UserSessionsAuthMethod } from '../../common/interfaces/user-sessions-auth-method.interface'; +import type { UserSessionsStatus } from '../../common/interfaces/user-sessions-status.interface'; + +export interface UserSessionsListItem { + /** Distinguishes the session object. */ + object: 'session'; + /** The unique ID of the session. */ + id: string; + /** Information about the impersonator if this session was created via impersonation. */ + impersonator?: UserSessionsImpersonator; + /** The IP address from which the session was created. */ + ipAddress: string | null; + /** The ID of the organization this session is associated with. */ + organizationId?: string; + /** The user agent string from the device that created the session. */ + userAgent: string | null; + /** The ID of the user this session belongs to. */ + userId: string; + /** The authentication method used to create this session. */ + authMethod: UserSessionsAuthMethod; + /** The current status of the session. */ + status: UserSessionsStatus; + /** The timestamp when the session expires. */ + expiresAt: string; + /** The timestamp when the session ended. */ + endedAt: string | null; + /** An ISO 8601 timestamp. */ + createdAt: string; + /** An ISO 8601 timestamp. */ + updatedAt: string; +} + +export interface UserSessionsListItemResponse { + object: 'session'; + id: string; + impersonator?: UserSessionsImpersonatorResponse; + ip_address: string | null; + organization_id?: string; + user_agent: string | null; + user_id: string; + auth_method: UserSessionsAuthMethod; + status: UserSessionsStatus; + expires_at: string; + ended_at: string | null; + created_at: string; + updated_at: string; +} diff --git a/src/user-management/interfaces/user.interface.ts b/src/user-management/interfaces/user.interface.ts index 31e68ce66..804ba7b1b 100644 --- a/src/user-management/interfaces/user.interface.ts +++ b/src/user-management/interfaces/user.interface.ts @@ -1,16 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +/** The user object. */ export interface User { + /** Distinguishes the user object. */ object: 'user'; + /** The unique ID of the user. */ id: string; + /** The email address of the user. */ email: string; + /** Whether the user's email has been verified. */ emailVerified: boolean; + /** A URL reference to an image representing the user. */ profilePictureUrl: string | null; + /** The first name of the user. */ firstName: string | null; + /** The last name of the user. */ lastName: string | null; + /** The timestamp when the user last signed in. */ lastSignInAt: string | null; + /** The user's preferred locale. */ locale: string | null; + /** An ISO 8601 timestamp. */ createdAt: string; + /** An ISO 8601 timestamp. */ updatedAt: string; + /** The external ID of the user. */ externalId: string | null; + /** Object containing metadata key/value pairs associated with the user. */ metadata: Record; } diff --git a/src/user-management/interfaces/verify-email-address.interface.ts b/src/user-management/interfaces/verify-email-address.interface.ts new file mode 100644 index 000000000..0ee0544e7 --- /dev/null +++ b/src/user-management/interfaces/verify-email-address.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface VerifyEmailAddress { + /** The one-time email verification code. */ + code: string; +} + +export interface VerifyEmailAddressResponse { + code: string; +} diff --git a/src/user-management/interfaces/verify-email-response.interface.ts b/src/user-management/interfaces/verify-email-response.interface.ts new file mode 100644 index 000000000..c1e07611f --- /dev/null +++ b/src/user-management/interfaces/verify-email-response.interface.ts @@ -0,0 +1,9 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SendVerificationEmailResponse, + SendVerificationEmailResponseWire, +} from './send-verification-email-response.interface'; + +export type VerifyEmailResponse = SendVerificationEmailResponse; +export type VerifyEmailResponseWire = SendVerificationEmailResponseWire; diff --git a/src/user-management/serializers/authenticate-response-impersonator.serializer.ts b/src/user-management/serializers/authenticate-response-impersonator.serializer.ts new file mode 100644 index 000000000..eb710f93a --- /dev/null +++ b/src/user-management/serializers/authenticate-response-impersonator.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeSessionCreatedDataImpersonator as deserializeAuthenticateResponseImpersonator, + serializeSessionCreatedDataImpersonator as serializeAuthenticateResponseImpersonator, +} from '../../common/serializers/session-created-data-impersonator.serializer'; diff --git a/src/user-management/serializers/authenticate-response-oauth-token.serializer.ts b/src/user-management/serializers/authenticate-response-oauth-token.serializer.ts new file mode 100644 index 000000000..81c6ba93d --- /dev/null +++ b/src/user-management/serializers/authenticate-response-oauth-token.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeSSOTokenResponseOAuthToken as deserializeAuthenticateResponseOAuthToken, + serializeSSOTokenResponseOAuthToken as serializeAuthenticateResponseOAuthToken, +} from '../../sso/serializers/sso-token-response-oauth-token.serializer'; diff --git a/src/user-management/serializers/authenticate-response.serializer.ts b/src/user-management/serializers/authenticate-response.serializer.ts new file mode 100644 index 000000000..70973f845 --- /dev/null +++ b/src/user-management/serializers/authenticate-response.serializer.ts @@ -0,0 +1,53 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthenticateResponse, + AuthenticateResponseWire, +} from '../interfaces/authenticate-response.interface'; +import { deserializeUser, serializeUser } from './user.serializer'; +import { + deserializeAuthenticateResponseImpersonator, + serializeAuthenticateResponseImpersonator, +} from './authenticate-response-impersonator.serializer'; +import { + deserializeAuthenticateResponseOAuthToken, + serializeAuthenticateResponseOAuthToken, +} from './authenticate-response-oauth-token.serializer'; + +export const deserializeAuthenticateResponse = ( + response: AuthenticateResponseWire, +): AuthenticateResponse => ({ + user: deserializeUser(response.user), + organizationId: response.organization_id, + authkitAuthorizationCode: response.authkit_authorization_code, + accessToken: response.access_token, + refreshToken: response.refresh_token, + authenticationMethod: response.authentication_method, + impersonator: + response.impersonator != null + ? deserializeAuthenticateResponseImpersonator(response.impersonator) + : undefined, + oauthTokens: + response.oauth_tokens != null + ? deserializeAuthenticateResponseOAuthToken(response.oauth_tokens) + : undefined, +}); + +export const serializeAuthenticateResponse = ( + model: AuthenticateResponse, +): AuthenticateResponseWire => ({ + user: serializeUser(model.user), + organization_id: model.organizationId, + authkit_authorization_code: model.authkitAuthorizationCode, + access_token: model.accessToken, + refresh_token: model.refreshToken, + authentication_method: model.authenticationMethod, + impersonator: + model.impersonator != null + ? serializeAuthenticateResponseImpersonator(model.impersonator) + : undefined, + oauth_tokens: + model.oauthTokens != null + ? serializeAuthenticateResponseOAuthToken(model.oauthTokens) + : undefined, +}); diff --git a/src/user-management/serializers/authorization-code-session-authenticate-request.serializer.ts b/src/user-management/serializers/authorization-code-session-authenticate-request.serializer.ts new file mode 100644 index 000000000..e41ea4ebd --- /dev/null +++ b/src/user-management/serializers/authorization-code-session-authenticate-request.serializer.ts @@ -0,0 +1,30 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthorizationCodeSessionAuthenticateRequest, + AuthorizationCodeSessionAuthenticateRequestResponse, +} from '../interfaces/authorization-code-session-authenticate-request.interface'; + +export const deserializeAuthorizationCodeSessionAuthenticateRequest = ( + response: AuthorizationCodeSessionAuthenticateRequestResponse, +): AuthorizationCodeSessionAuthenticateRequest => ({ + clientId: response.client_id, + clientSecret: response.client_secret, + grantType: response.grant_type, + code: response.code, + ipAddress: response.ip_address, + deviceId: response.device_id, + userAgent: response.user_agent, +}); + +export const serializeAuthorizationCodeSessionAuthenticateRequest = ( + model: AuthorizationCodeSessionAuthenticateRequest, +): AuthorizationCodeSessionAuthenticateRequestResponse => ({ + client_id: model.clientId, + client_secret: model.clientSecret, + grant_type: model.grantType, + code: model.code, + ip_address: model.ipAddress, + device_id: model.deviceId, + user_agent: model.userAgent, +}); diff --git a/src/user-management/serializers/authorized-connect-application-list-data.serializer.ts b/src/user-management/serializers/authorized-connect-application-list-data.serializer.ts new file mode 100644 index 000000000..e737e4053 --- /dev/null +++ b/src/user-management/serializers/authorized-connect-application-list-data.serializer.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + AuthorizedConnectApplicationListData, + AuthorizedConnectApplicationListDataResponse, +} from '../interfaces/authorized-connect-application-list-data.interface'; +import { + deserializeConnectApplication, + serializeConnectApplication, +} from '../../workos-connect/serializers/connect-application.serializer'; + +export const deserializeAuthorizedConnectApplicationListData = ( + response: AuthorizedConnectApplicationListDataResponse, +): AuthorizedConnectApplicationListData => ({ + object: response.object, + id: response.id, + grantedScopes: response.granted_scopes, + application: deserializeConnectApplication(response.application), +}); + +export const serializeAuthorizedConnectApplicationListData = ( + model: AuthorizedConnectApplicationListData, +): AuthorizedConnectApplicationListDataResponse => ({ + object: model.object, + id: model.id, + granted_scopes: model.grantedScopes, + application: serializeConnectApplication(model.application), +}); diff --git a/src/user-management/serializers/confirm-email-change.serializer.ts b/src/user-management/serializers/confirm-email-change.serializer.ts new file mode 100644 index 000000000..3340e79b9 --- /dev/null +++ b/src/user-management/serializers/confirm-email-change.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeVerifyEmailAddress as deserializeConfirmEmailChange, + serializeVerifyEmailAddress as serializeConfirmEmailChange, +} from './verify-email-address.serializer'; diff --git a/src/user-management/serializers/connected-account.serializer.ts b/src/user-management/serializers/connected-account.serializer.ts new file mode 100644 index 000000000..97809e5e0 --- /dev/null +++ b/src/user-management/serializers/connected-account.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ConnectedAccount, + ConnectedAccountResponse, +} from '../interfaces/connected-account.interface'; + +export const deserializeConnectedAccount = ( + response: ConnectedAccountResponse, +): ConnectedAccount => ({ + object: response.object, + id: response.id, + userId: response.user_id ?? null, + organizationId: response.organization_id ?? null, + scopes: response.scopes, + state: response.state, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeConnectedAccount = ( + model: ConnectedAccount, +): ConnectedAccountResponse => ({ + object: model.object, + id: model.id, + user_id: model.userId, + organization_id: model.organizationId, + scopes: model.scopes, + state: model.state, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/user-management/serializers/cors-origin-response.serializer.ts b/src/user-management/serializers/cors-origin-response.serializer.ts new file mode 100644 index 000000000..01ef19463 --- /dev/null +++ b/src/user-management/serializers/cors-origin-response.serializer.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CorsOriginResponse, + CorsOriginResponseWire, +} from '../interfaces/cors-origin-response.interface'; + +export const deserializeCorsOriginResponse = ( + response: CorsOriginResponseWire, +): CorsOriginResponse => ({ + object: response.object, + id: response.id, + origin: response.origin, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeCorsOriginResponse = ( + model: CorsOriginResponse, +): CorsOriginResponseWire => ({ + object: model.object, + id: model.id, + origin: model.origin, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/user-management/serializers/create-cors-origin.serializer.ts b/src/user-management/serializers/create-cors-origin.serializer.ts new file mode 100644 index 000000000..b4db96655 --- /dev/null +++ b/src/user-management/serializers/create-cors-origin.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateCorsOrigin, + CreateCorsOriginResponse, +} from '../interfaces/create-cors-origin.interface'; + +export const deserializeCreateCorsOrigin = ( + response: CreateCorsOriginResponse, +): CreateCorsOrigin => ({ + origin: response.origin, +}); + +export const serializeCreateCorsOrigin = ( + model: CreateCorsOrigin, +): CreateCorsOriginResponse => ({ + origin: model.origin, +}); diff --git a/src/user-management/serializers/create-magic-code-and-return.serializer.ts b/src/user-management/serializers/create-magic-code-and-return.serializer.ts new file mode 100644 index 000000000..6b1feaeb8 --- /dev/null +++ b/src/user-management/serializers/create-magic-code-and-return.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateMagicCodeAndReturn, + CreateMagicCodeAndReturnResponse, +} from '../interfaces/create-magic-code-and-return.interface'; + +export const deserializeCreateMagicCodeAndReturn = ( + response: CreateMagicCodeAndReturnResponse, +): CreateMagicCodeAndReturn => ({ + email: response.email, + invitationToken: response.invitation_token, +}); + +export const serializeCreateMagicCodeAndReturn = ( + model: CreateMagicCodeAndReturn, +): CreateMagicCodeAndReturnResponse => ({ + email: model.email, + invitation_token: model.invitationToken, +}); diff --git a/src/user-management/serializers/create-password-reset-token.serializer.ts b/src/user-management/serializers/create-password-reset-token.serializer.ts new file mode 100644 index 000000000..74ebce461 --- /dev/null +++ b/src/user-management/serializers/create-password-reset-token.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreatePasswordResetToken, + CreatePasswordResetTokenResponse, +} from '../interfaces/create-password-reset-token.interface'; + +export const deserializeCreatePasswordResetToken = ( + response: CreatePasswordResetTokenResponse, +): CreatePasswordResetToken => ({ + email: response.email, +}); + +export const serializeCreatePasswordResetToken = ( + model: CreatePasswordResetToken, +): CreatePasswordResetTokenResponse => ({ + email: model.email, +}); diff --git a/src/user-management/serializers/create-password-reset.serializer.ts b/src/user-management/serializers/create-password-reset.serializer.ts new file mode 100644 index 000000000..0115e66a7 --- /dev/null +++ b/src/user-management/serializers/create-password-reset.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreatePasswordReset, + CreatePasswordResetResponse, +} from '../interfaces/create-password-reset.interface'; + +export const deserializeCreatePasswordReset = ( + response: CreatePasswordResetResponse, +): CreatePasswordReset => ({ + token: response.token, + newPassword: response.new_password, +}); + +export const serializeCreatePasswordReset = ( + model: CreatePasswordReset, +): CreatePasswordResetResponse => ({ + token: model.token, + new_password: model.newPassword, +}); diff --git a/src/user-management/serializers/create-redirect-uri.serializer.ts b/src/user-management/serializers/create-redirect-uri.serializer.ts new file mode 100644 index 000000000..cb3496ce3 --- /dev/null +++ b/src/user-management/serializers/create-redirect-uri.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateRedirectUri, + CreateRedirectUriResponse, +} from '../interfaces/create-redirect-uri.interface'; + +export const deserializeCreateRedirectUri = ( + response: CreateRedirectUriResponse, +): CreateRedirectUri => ({ + uri: response.uri, +}); + +export const serializeCreateRedirectUri = ( + model: CreateRedirectUri, +): CreateRedirectUriResponse => ({ + uri: model.uri, +}); diff --git a/src/user-management/serializers/create-user-invite-options.serializer.ts b/src/user-management/serializers/create-user-invite-options.serializer.ts new file mode 100644 index 000000000..10058bb43 --- /dev/null +++ b/src/user-management/serializers/create-user-invite-options.serializer.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateUserInviteOptions, + CreateUserInviteOptionsResponse, +} from '../interfaces/create-user-invite-options.interface'; + +export const deserializeCreateUserInviteOptions = ( + response: CreateUserInviteOptionsResponse, +): CreateUserInviteOptions => ({ + email: response.email, + organizationId: response.organization_id, + roleSlug: response.role_slug, + expiresInDays: response.expires_in_days, + inviterUserId: response.inviter_user_id, + locale: response.locale, +}); + +export const serializeCreateUserInviteOptions = ( + model: CreateUserInviteOptions, +): CreateUserInviteOptionsResponse => ({ + email: model.email, + organization_id: model.organizationId, + role_slug: model.roleSlug, + expires_in_days: model.expiresInDays, + inviter_user_id: model.inviterUserId, + locale: model.locale, +}); diff --git a/src/user-management/serializers/create-user-organization-membership.serializer.ts b/src/user-management/serializers/create-user-organization-membership.serializer.ts new file mode 100644 index 000000000..3b74a1990 --- /dev/null +++ b/src/user-management/serializers/create-user-organization-membership.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateUserOrganizationMembership, + CreateUserOrganizationMembershipResponse, +} from '../interfaces/create-user-organization-membership.interface'; + +export const deserializeCreateUserOrganizationMembership = ( + response: CreateUserOrganizationMembershipResponse, +): CreateUserOrganizationMembership => ({ + userId: response.user_id, + organizationId: response.organization_id, + roleSlug: response.role_slug, + roleSlugs: response.role_slugs, +}); + +export const serializeCreateUserOrganizationMembership = ( + model: CreateUserOrganizationMembership, +): CreateUserOrganizationMembershipResponse => ({ + user_id: model.userId, + organization_id: model.organizationId, + role_slug: model.roleSlug, + role_slugs: model.roleSlugs, +}); diff --git a/src/user-management/serializers/create-user.serializer.ts b/src/user-management/serializers/create-user.serializer.ts new file mode 100644 index 000000000..84f5ccca0 --- /dev/null +++ b/src/user-management/serializers/create-user.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + CreateUser, + CreateUserResponse, +} from '../interfaces/create-user.interface'; + +export const deserializeCreateUser = ( + response: CreateUserResponse, +): CreateUser => ({ + email: response.email, + password: response.password ?? null, + passwordHash: response.password_hash, + passwordHashType: response.password_hash_type, + firstName: response.first_name ?? null, + lastName: response.last_name ?? null, + emailVerified: response.email_verified ?? null, + metadata: response.metadata ?? null, + externalId: response.external_id ?? null, +}); + +export const serializeCreateUser = (model: CreateUser): CreateUserResponse => ({ + email: model.email, + password: model.password ?? null, + password_hash: model.passwordHash, + password_hash_type: model.passwordHashType, + first_name: model.firstName ?? null, + last_name: model.lastName ?? null, + email_verified: model.emailVerified ?? null, + metadata: model.metadata ?? null, + external_id: model.externalId ?? null, +}); diff --git a/src/user-management/serializers/data-integrations-list-response-data-connected-account.serializer.ts b/src/user-management/serializers/data-integrations-list-response-data-connected-account.serializer.ts new file mode 100644 index 000000000..e8423f9d0 --- /dev/null +++ b/src/user-management/serializers/data-integrations-list-response-data-connected-account.serializer.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsListResponseDataConnectedAccount, + DataIntegrationsListResponseDataConnectedAccountResponse, +} from '../interfaces/data-integrations-list-response-data-connected-account.interface'; + +export const deserializeDataIntegrationsListResponseDataConnectedAccount = ( + response: DataIntegrationsListResponseDataConnectedAccountResponse, +): DataIntegrationsListResponseDataConnectedAccount => ({ + object: response.object, + id: response.id, + userId: response.user_id ?? null, + organizationId: response.organization_id ?? null, + scopes: response.scopes, + state: response.state, + createdAt: response.created_at, + updatedAt: response.updated_at, + userlandUserId: response.userland_user_id ?? null, +}); + +export const serializeDataIntegrationsListResponseDataConnectedAccount = ( + model: DataIntegrationsListResponseDataConnectedAccount, +): DataIntegrationsListResponseDataConnectedAccountResponse => ({ + object: model.object, + id: model.id, + user_id: model.userId, + organization_id: model.organizationId, + scopes: model.scopes, + state: model.state, + created_at: model.createdAt, + updated_at: model.updatedAt, + userland_user_id: model.userlandUserId, +}); diff --git a/src/user-management/serializers/data-integrations-list-response-data.serializer.ts b/src/user-management/serializers/data-integrations-list-response-data.serializer.ts new file mode 100644 index 000000000..38e8347af --- /dev/null +++ b/src/user-management/serializers/data-integrations-list-response-data.serializer.ts @@ -0,0 +1,54 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsListResponseData, + DataIntegrationsListResponseDataResponse, +} from '../interfaces/data-integrations-list-response-data.interface'; +import { + deserializeDataIntegrationsListResponseDataConnectedAccount, + serializeDataIntegrationsListResponseDataConnectedAccount, +} from './data-integrations-list-response-data-connected-account.serializer'; + +export const deserializeDataIntegrationsListResponseData = ( + response: DataIntegrationsListResponseDataResponse, +): DataIntegrationsListResponseData => ({ + object: response.object, + id: response.id, + name: response.name, + description: response.description ?? null, + slug: response.slug, + integrationType: response.integration_type, + credentialsType: response.credentials_type, + scopes: response.scopes ?? null, + ownership: response.ownership, + createdAt: response.created_at, + updatedAt: response.updated_at, + connectedAccount: + response.connected_account != null + ? deserializeDataIntegrationsListResponseDataConnectedAccount( + response.connected_account, + ) + : null, +}); + +export const serializeDataIntegrationsListResponseData = ( + model: DataIntegrationsListResponseData, +): DataIntegrationsListResponseDataResponse => ({ + object: model.object, + id: model.id, + name: model.name, + description: model.description, + slug: model.slug, + integration_type: model.integrationType, + credentials_type: model.credentialsType, + scopes: model.scopes, + ownership: model.ownership, + created_at: model.createdAt, + updated_at: model.updatedAt, + connected_account: + model.connectedAccount != null + ? serializeDataIntegrationsListResponseDataConnectedAccount( + model.connectedAccount, + ) + : null, +}); diff --git a/src/user-management/serializers/data-integrations-list-response.serializer.ts b/src/user-management/serializers/data-integrations-list-response.serializer.ts new file mode 100644 index 000000000..ae6a169e3 --- /dev/null +++ b/src/user-management/serializers/data-integrations-list-response.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DataIntegrationsListResponse, + DataIntegrationsListResponseWire, +} from '../interfaces/data-integrations-list-response.interface'; +import { + deserializeDataIntegrationsListResponseData, + serializeDataIntegrationsListResponseData, +} from './data-integrations-list-response-data.serializer'; + +export const deserializeDataIntegrationsListResponse = ( + response: DataIntegrationsListResponseWire, +): DataIntegrationsListResponse => ({ + object: response.object, + data: response.data.map(deserializeDataIntegrationsListResponseData), +}); + +export const serializeDataIntegrationsListResponse = ( + model: DataIntegrationsListResponse, +): DataIntegrationsListResponseWire => ({ + object: model.object, + data: model.data.map(serializeDataIntegrationsListResponseData), +}); diff --git a/src/user-management/serializers/device-authorization-response.serializer.ts b/src/user-management/serializers/device-authorization-response.serializer.ts new file mode 100644 index 000000000..c856d4c79 --- /dev/null +++ b/src/user-management/serializers/device-authorization-response.serializer.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DeviceAuthorizationResponse, + DeviceAuthorizationResponseWire, +} from '../interfaces/device-authorization-response.interface'; + +export const deserializeDeviceAuthorizationResponse = ( + response: DeviceAuthorizationResponseWire, +): DeviceAuthorizationResponse => ({ + deviceCode: response.device_code, + userCode: response.user_code, + verificationUri: response.verification_uri, + verificationUriComplete: response.verification_uri_complete, + expiresIn: response.expires_in, + interval: response.interval, +}); + +export const serializeDeviceAuthorizationResponse = ( + model: DeviceAuthorizationResponse, +): DeviceAuthorizationResponseWire => ({ + device_code: model.deviceCode, + user_code: model.userCode, + verification_uri: model.verificationUri, + verification_uri_complete: model.verificationUriComplete, + expires_in: model.expiresIn, + interval: model.interval, +}); diff --git a/src/user-management/serializers/device-code-session-authenticate-request.serializer.ts b/src/user-management/serializers/device-code-session-authenticate-request.serializer.ts new file mode 100644 index 000000000..2fa2e7c0e --- /dev/null +++ b/src/user-management/serializers/device-code-session-authenticate-request.serializer.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + DeviceCodeSessionAuthenticateRequest, + DeviceCodeSessionAuthenticateRequestResponse, +} from '../interfaces/device-code-session-authenticate-request.interface'; + +export const deserializeDeviceCodeSessionAuthenticateRequest = ( + response: DeviceCodeSessionAuthenticateRequestResponse, +): DeviceCodeSessionAuthenticateRequest => ({ + clientId: response.client_id, + grantType: response.grant_type, + deviceCode: response.device_code, + ipAddress: response.ip_address, + deviceId: response.device_id, + userAgent: response.user_agent, +}); + +export const serializeDeviceCodeSessionAuthenticateRequest = ( + model: DeviceCodeSessionAuthenticateRequest, +): DeviceCodeSessionAuthenticateRequestResponse => ({ + client_id: model.clientId, + grant_type: model.grantType, + device_code: model.deviceCode, + ip_address: model.ipAddress, + device_id: model.deviceId, + user_agent: model.userAgent, +}); diff --git a/src/user-management/serializers/email-change-confirmation-user.serializer.ts b/src/user-management/serializers/email-change-confirmation-user.serializer.ts new file mode 100644 index 000000000..3c68ef0f7 --- /dev/null +++ b/src/user-management/serializers/email-change-confirmation-user.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeUser as deserializeEmailChangeConfirmationUser, + serializeUser as serializeEmailChangeConfirmationUser, +} from './user.serializer'; diff --git a/src/user-management/serializers/email-change-confirmation.serializer.ts b/src/user-management/serializers/email-change-confirmation.serializer.ts new file mode 100644 index 000000000..733cd6a9c --- /dev/null +++ b/src/user-management/serializers/email-change-confirmation.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + EmailChangeConfirmation, + EmailChangeConfirmationResponse, +} from '../interfaces/email-change-confirmation.interface'; +import { + deserializeEmailChangeConfirmationUser, + serializeEmailChangeConfirmationUser, +} from './email-change-confirmation-user.serializer'; + +export const deserializeEmailChangeConfirmation = ( + response: EmailChangeConfirmationResponse, +): EmailChangeConfirmation => ({ + object: response.object, + user: deserializeEmailChangeConfirmationUser(response.user), +}); + +export const serializeEmailChangeConfirmation = ( + model: EmailChangeConfirmation, +): EmailChangeConfirmationResponse => ({ + object: model.object, + user: serializeEmailChangeConfirmationUser(model.user), +}); diff --git a/src/user-management/serializers/email-change.serializer.ts b/src/user-management/serializers/email-change.serializer.ts new file mode 100644 index 000000000..f4cbd65f9 --- /dev/null +++ b/src/user-management/serializers/email-change.serializer.ts @@ -0,0 +1,27 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + EmailChange, + EmailChangeResponse, +} from '../interfaces/email-change.interface'; +import { deserializeUser, serializeUser } from './user.serializer'; + +export const deserializeEmailChange = ( + response: EmailChangeResponse, +): EmailChange => ({ + object: response.object, + user: deserializeUser(response.user), + newEmail: response.new_email, + expiresAt: response.expires_at, + createdAt: response.created_at, +}); + +export const serializeEmailChange = ( + model: EmailChange, +): EmailChangeResponse => ({ + object: model.object, + user: serializeUser(model.user), + new_email: model.newEmail, + expires_at: model.expiresAt, + created_at: model.createdAt, +}); diff --git a/src/user-management/serializers/email-verification-code-session-authenticate-request.serializer.ts b/src/user-management/serializers/email-verification-code-session-authenticate-request.serializer.ts new file mode 100644 index 000000000..d7be223bb --- /dev/null +++ b/src/user-management/serializers/email-verification-code-session-authenticate-request.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + EmailVerificationCodeSessionAuthenticateRequest, + EmailVerificationCodeSessionAuthenticateRequestResponse, +} from '../interfaces/email-verification-code-session-authenticate-request.interface'; + +export const deserializeEmailVerificationCodeSessionAuthenticateRequest = ( + response: EmailVerificationCodeSessionAuthenticateRequestResponse, +): EmailVerificationCodeSessionAuthenticateRequest => ({ + clientId: response.client_id, + clientSecret: response.client_secret, + grantType: response.grant_type, + code: response.code, + pendingAuthenticationToken: response.pending_authentication_token, + ipAddress: response.ip_address, + deviceId: response.device_id, + userAgent: response.user_agent, +}); + +export const serializeEmailVerificationCodeSessionAuthenticateRequest = ( + model: EmailVerificationCodeSessionAuthenticateRequest, +): EmailVerificationCodeSessionAuthenticateRequestResponse => ({ + client_id: model.clientId, + client_secret: model.clientSecret, + grant_type: model.grantType, + code: model.code, + pending_authentication_token: model.pendingAuthenticationToken, + ip_address: model.ipAddress, + device_id: model.deviceId, + user_agent: model.userAgent, +}); diff --git a/src/user-management/serializers/email-verification.serializer.ts b/src/user-management/serializers/email-verification.serializer.ts index aab606800..f37653b04 100644 --- a/src/user-management/serializers/email-verification.serializer.ts +++ b/src/user-management/serializers/email-verification.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { EmailVerification, EmailVerificationEvent, @@ -29,3 +31,16 @@ export const deserializeEmailVerificationEvent = ( createdAt: emailVerification.created_at, updatedAt: emailVerification.updated_at, }); + +export const serializeEmailVerification = ( + model: EmailVerification, +): EmailVerificationResponse => ({ + object: model.object, + id: model.id, + user_id: model.userId, + email: model.email, + expires_at: model.expiresAt, + created_at: model.createdAt, + updated_at: model.updatedAt, + code: model.code, +}); diff --git a/src/user-management/serializers/enroll-user-authentication-factor.serializer.ts b/src/user-management/serializers/enroll-user-authentication-factor.serializer.ts new file mode 100644 index 000000000..36162be76 --- /dev/null +++ b/src/user-management/serializers/enroll-user-authentication-factor.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + EnrollUserAuthenticationFactor, + EnrollUserAuthenticationFactorResponse, +} from '../interfaces/enroll-user-authentication-factor.interface'; + +export const deserializeEnrollUserAuthenticationFactor = ( + response: EnrollUserAuthenticationFactorResponse, +): EnrollUserAuthenticationFactor => ({ + type: response.type, + totpIssuer: response.totp_issuer, + totpUser: response.totp_user, + totpSecret: response.totp_secret, +}); + +export const serializeEnrollUserAuthenticationFactor = ( + model: EnrollUserAuthenticationFactor, +): EnrollUserAuthenticationFactorResponse => ({ + type: model.type, + totp_issuer: model.totpIssuer, + totp_user: model.totpUser, + totp_secret: model.totpSecret, +}); diff --git a/src/user-management/serializers/invitation.serializer.ts b/src/user-management/serializers/invitation.serializer.ts index fe4c6e30a..ccc08242a 100644 --- a/src/user-management/serializers/invitation.serializer.ts +++ b/src/user-management/serializers/invitation.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { Invitation, InvitationEvent, @@ -40,3 +42,20 @@ export const deserializeInvitationEvent = ( createdAt: invitation.created_at, updatedAt: invitation.updated_at, }); + +export const serializeInvitation = (model: Invitation): InvitationResponse => ({ + object: model.object, + id: model.id, + email: model.email, + state: model.state, + accepted_at: model.acceptedAt, + revoked_at: model.revokedAt, + expires_at: model.expiresAt, + organization_id: model.organizationId, + inviter_user_id: model.inviterUserId, + accepted_user_id: model.acceptedUserId, + created_at: model.createdAt, + updated_at: model.updatedAt, + token: model.token, + accept_invitation_url: model.acceptInvitationUrl, +}); diff --git a/src/user-management/serializers/jwks-response-keys.serializer.ts b/src/user-management/serializers/jwks-response-keys.serializer.ts new file mode 100644 index 000000000..f1f516a79 --- /dev/null +++ b/src/user-management/serializers/jwks-response-keys.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + JwksResponseKeys, + JwksResponseKeysResponse, +} from '../interfaces/jwks-response-keys.interface'; + +export const deserializeJwksResponseKeys = ( + response: JwksResponseKeysResponse, +): JwksResponseKeys => ({ + alg: response.alg, + kty: response.kty, + use: response.use, + x5C: response.x_5_c, + n: response.n, + e: response.e, + kid: response.kid, + x5TS256: response.x_5_t_s_256, +}); + +export const serializeJwksResponseKeys = ( + model: JwksResponseKeys, +): JwksResponseKeysResponse => ({ + alg: model.alg, + kty: model.kty, + use: model.use, + x_5_c: model.x5C, + n: model.n, + e: model.e, + kid: model.kid, + x_5_t_s_256: model.x5TS256, +}); diff --git a/src/user-management/serializers/jwks-response.serializer.ts b/src/user-management/serializers/jwks-response.serializer.ts new file mode 100644 index 000000000..adaf89e74 --- /dev/null +++ b/src/user-management/serializers/jwks-response.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + JwksResponse, + JwksResponseWire, +} from '../interfaces/jwks-response.interface'; +import { + deserializeJwksResponseKeys, + serializeJwksResponseKeys, +} from './jwks-response-keys.serializer'; + +export const deserializeJwksResponse = ( + response: JwksResponseWire, +): JwksResponse => ({ + keys: response.keys.map(deserializeJwksResponseKeys), +}); + +export const serializeJwksResponse = ( + model: JwksResponse, +): JwksResponseWire => ({ + keys: model.keys.map(serializeJwksResponseKeys), +}); diff --git a/src/user-management/serializers/jwt-template-response.serializer.ts b/src/user-management/serializers/jwt-template-response.serializer.ts new file mode 100644 index 000000000..a8bca2605 --- /dev/null +++ b/src/user-management/serializers/jwt-template-response.serializer.ts @@ -0,0 +1,24 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + JWTTemplateResponse, + JWTTemplateResponseWire, +} from '../interfaces/jwt-template-response.interface'; + +export const deserializeJWTTemplateResponse = ( + response: JWTTemplateResponseWire, +): JWTTemplateResponse => ({ + object: response.object, + content: response.content, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeJWTTemplateResponse = ( + model: JWTTemplateResponse, +): JWTTemplateResponseWire => ({ + object: model.object, + content: model.content, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/user-management/serializers/magic-auth-code-session-authenticate-request.serializer.ts b/src/user-management/serializers/magic-auth-code-session-authenticate-request.serializer.ts new file mode 100644 index 000000000..7e4315a55 --- /dev/null +++ b/src/user-management/serializers/magic-auth-code-session-authenticate-request.serializer.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + MagicAuthCodeSessionAuthenticateRequest, + MagicAuthCodeSessionAuthenticateRequestResponse, +} from '../interfaces/magic-auth-code-session-authenticate-request.interface'; + +export const deserializeMagicAuthCodeSessionAuthenticateRequest = ( + response: MagicAuthCodeSessionAuthenticateRequestResponse, +): MagicAuthCodeSessionAuthenticateRequest => ({ + clientId: response.client_id, + clientSecret: response.client_secret, + grantType: response.grant_type, + code: response.code, + email: response.email, + invitationToken: response.invitation_token, + ipAddress: response.ip_address, + deviceId: response.device_id, + userAgent: response.user_agent, +}); + +export const serializeMagicAuthCodeSessionAuthenticateRequest = ( + model: MagicAuthCodeSessionAuthenticateRequest, +): MagicAuthCodeSessionAuthenticateRequestResponse => ({ + client_id: model.clientId, + client_secret: model.clientSecret, + grant_type: model.grantType, + code: model.code, + email: model.email, + invitation_token: model.invitationToken, + ip_address: model.ipAddress, + device_id: model.deviceId, + user_agent: model.userAgent, +}); diff --git a/src/user-management/serializers/magic-auth.serializer.ts b/src/user-management/serializers/magic-auth.serializer.ts index 477977385..8a0c5c59c 100644 --- a/src/user-management/serializers/magic-auth.serializer.ts +++ b/src/user-management/serializers/magic-auth.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { MagicAuth, MagicAuthEvent, @@ -29,3 +31,14 @@ export const deserializeMagicAuthEvent = ( createdAt: magicAuth.created_at, updatedAt: magicAuth.updated_at, }); + +export const serializeMagicAuth = (model: MagicAuth): MagicAuthResponse => ({ + object: model.object, + id: model.id, + user_id: model.userId, + email: model.email, + expires_at: model.expiresAt, + created_at: model.createdAt, + updated_at: model.updatedAt, + code: model.code, +}); diff --git a/src/user-management/serializers/mfa-totp-session-authenticate-request.serializer.ts b/src/user-management/serializers/mfa-totp-session-authenticate-request.serializer.ts new file mode 100644 index 000000000..cf5ccd81f --- /dev/null +++ b/src/user-management/serializers/mfa-totp-session-authenticate-request.serializer.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + MfaTotpSessionAuthenticateRequest, + MfaTotpSessionAuthenticateRequestResponse, +} from '../interfaces/mfa-totp-session-authenticate-request.interface'; + +export const deserializeMfaTotpSessionAuthenticateRequest = ( + response: MfaTotpSessionAuthenticateRequestResponse, +): MfaTotpSessionAuthenticateRequest => ({ + clientId: response.client_id, + clientSecret: response.client_secret, + grantType: response.grant_type, + code: response.code, + pendingAuthenticationToken: response.pending_authentication_token, + authenticationChallengeId: response.authentication_challenge_id, + ipAddress: response.ip_address, + deviceId: response.device_id, + userAgent: response.user_agent, +}); + +export const serializeMfaTotpSessionAuthenticateRequest = ( + model: MfaTotpSessionAuthenticateRequest, +): MfaTotpSessionAuthenticateRequestResponse => ({ + client_id: model.clientId, + client_secret: model.clientSecret, + grant_type: model.grantType, + code: model.code, + pending_authentication_token: model.pendingAuthenticationToken, + authentication_challenge_id: model.authenticationChallengeId, + ip_address: model.ipAddress, + device_id: model.deviceId, + user_agent: model.userAgent, +}); diff --git a/src/user-management/serializers/organization-membership.serializer.ts b/src/user-management/serializers/organization-membership.serializer.ts index cdc594647..1937c9c19 100644 --- a/src/user-management/serializers/organization-membership.serializer.ts +++ b/src/user-management/serializers/organization-membership.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { AuthorizationOrganizationMembership, AuthorizationOrganizationMembershipResponse, @@ -12,7 +14,7 @@ export const deserializeOrganizationMembership = ( id: organizationMembership.id, userId: organizationMembership.user_id, organizationId: organizationMembership.organization_id, - organizationName: organizationMembership.organization_name, + organizationName: organizationMembership.organization_name ?? '', status: organizationMembership.status, directoryManaged: organizationMembership.directory_managed ?? false, createdAt: organizationMembership.created_at, diff --git a/src/user-management/serializers/organization-selection-session-authenticate-request.serializer.ts b/src/user-management/serializers/organization-selection-session-authenticate-request.serializer.ts new file mode 100644 index 000000000..8e7f8a618 --- /dev/null +++ b/src/user-management/serializers/organization-selection-session-authenticate-request.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + OrganizationSelectionSessionAuthenticateRequest, + OrganizationSelectionSessionAuthenticateRequestResponse, +} from '../interfaces/organization-selection-session-authenticate-request.interface'; + +export const deserializeOrganizationSelectionSessionAuthenticateRequest = ( + response: OrganizationSelectionSessionAuthenticateRequestResponse, +): OrganizationSelectionSessionAuthenticateRequest => ({ + clientId: response.client_id, + clientSecret: response.client_secret, + grantType: response.grant_type, + pendingAuthenticationToken: response.pending_authentication_token, + organizationId: response.organization_id, + ipAddress: response.ip_address, + deviceId: response.device_id, + userAgent: response.user_agent, +}); + +export const serializeOrganizationSelectionSessionAuthenticateRequest = ( + model: OrganizationSelectionSessionAuthenticateRequest, +): OrganizationSelectionSessionAuthenticateRequestResponse => ({ + client_id: model.clientId, + client_secret: model.clientSecret, + grant_type: model.grantType, + pending_authentication_token: model.pendingAuthenticationToken, + organization_id: model.organizationId, + ip_address: model.ipAddress, + device_id: model.deviceId, + user_agent: model.userAgent, +}); diff --git a/src/user-management/serializers/password-reset.serializer.ts b/src/user-management/serializers/password-reset.serializer.ts index 38bfaf1bc..0a9025b0a 100644 --- a/src/user-management/serializers/password-reset.serializer.ts +++ b/src/user-management/serializers/password-reset.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { PasswordReset, PasswordResetEvent, @@ -28,3 +30,16 @@ export const deserializePasswordResetEvent = ( expiresAt: passwordReset.expires_at, createdAt: passwordReset.created_at, }); + +export const serializePasswordReset = ( + model: PasswordReset, +): PasswordResetResponse => ({ + object: model.object, + id: model.id, + user_id: model.userId, + email: model.email, + expires_at: model.expiresAt, + created_at: model.createdAt, + password_reset_token: model.passwordResetToken, + password_reset_url: model.passwordResetUrl, +}); diff --git a/src/user-management/serializers/password-session-authenticate-request.serializer.ts b/src/user-management/serializers/password-session-authenticate-request.serializer.ts new file mode 100644 index 000000000..9c1ee8033 --- /dev/null +++ b/src/user-management/serializers/password-session-authenticate-request.serializer.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + PasswordSessionAuthenticateRequest, + PasswordSessionAuthenticateRequestResponse, +} from '../interfaces/password-session-authenticate-request.interface'; + +export const deserializePasswordSessionAuthenticateRequest = ( + response: PasswordSessionAuthenticateRequestResponse, +): PasswordSessionAuthenticateRequest => ({ + clientId: response.client_id, + clientSecret: response.client_secret, + grantType: response.grant_type, + email: response.email, + password: response.password, + invitationToken: response.invitation_token, + ipAddress: response.ip_address, + deviceId: response.device_id, + userAgent: response.user_agent, +}); + +export const serializePasswordSessionAuthenticateRequest = ( + model: PasswordSessionAuthenticateRequest, +): PasswordSessionAuthenticateRequestResponse => ({ + client_id: model.clientId, + client_secret: model.clientSecret, + grant_type: model.grantType, + email: model.email, + password: model.password, + invitation_token: model.invitationToken, + ip_address: model.ipAddress, + device_id: model.deviceId, + user_agent: model.userAgent, +}); diff --git a/src/user-management/serializers/redirect-uri.serializer.ts b/src/user-management/serializers/redirect-uri.serializer.ts new file mode 100644 index 000000000..99fa1b53b --- /dev/null +++ b/src/user-management/serializers/redirect-uri.serializer.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RedirectUri, + RedirectUriResponse, +} from '../interfaces/redirect-uri.interface'; + +export const deserializeRedirectUri = ( + response: RedirectUriResponse, +): RedirectUri => ({ + object: response.object, + id: response.id, + uri: response.uri, + default: response.default, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeRedirectUri = ( + model: RedirectUri, +): RedirectUriResponse => ({ + object: model.object, + id: model.id, + uri: model.uri, + default: model.default, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/user-management/serializers/refresh-token-session-authenticate-request.serializer.ts b/src/user-management/serializers/refresh-token-session-authenticate-request.serializer.ts new file mode 100644 index 000000000..45a0b7747 --- /dev/null +++ b/src/user-management/serializers/refresh-token-session-authenticate-request.serializer.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RefreshTokenSessionAuthenticateRequest, + RefreshTokenSessionAuthenticateRequestResponse, +} from '../interfaces/refresh-token-session-authenticate-request.interface'; + +export const deserializeRefreshTokenSessionAuthenticateRequest = ( + response: RefreshTokenSessionAuthenticateRequestResponse, +): RefreshTokenSessionAuthenticateRequest => ({ + clientId: response.client_id, + clientSecret: response.client_secret, + grantType: response.grant_type, + refreshToken: response.refresh_token, + organizationId: response.organization_id, + ipAddress: response.ip_address, + deviceId: response.device_id, + userAgent: response.user_agent, +}); + +export const serializeRefreshTokenSessionAuthenticateRequest = ( + model: RefreshTokenSessionAuthenticateRequest, +): RefreshTokenSessionAuthenticateRequestResponse => ({ + client_id: model.clientId, + client_secret: model.clientSecret, + grant_type: model.grantType, + refresh_token: model.refreshToken, + organization_id: model.organizationId, + ip_address: model.ipAddress, + device_id: model.deviceId, + user_agent: model.userAgent, +}); diff --git a/src/user-management/serializers/resend-user-invite-options.serializer.ts b/src/user-management/serializers/resend-user-invite-options.serializer.ts new file mode 100644 index 000000000..46932e3f5 --- /dev/null +++ b/src/user-management/serializers/resend-user-invite-options.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + ResendUserInviteOptions, + ResendUserInviteOptionsResponse, +} from '../interfaces/resend-user-invite-options.interface'; + +export const deserializeResendUserInviteOptions = ( + response: ResendUserInviteOptionsResponse, +): ResendUserInviteOptions => ({ + locale: response.locale, +}); + +export const serializeResendUserInviteOptions = ( + model: ResendUserInviteOptions, +): ResendUserInviteOptionsResponse => ({ + locale: model.locale, +}); diff --git a/src/user-management/serializers/reset-password-response.serializer.ts b/src/user-management/serializers/reset-password-response.serializer.ts new file mode 100644 index 000000000..18772289a --- /dev/null +++ b/src/user-management/serializers/reset-password-response.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeSendVerificationEmailResponse as deserializeResetPasswordResponse, + serializeSendVerificationEmailResponse as serializeResetPasswordResponse, +} from './send-verification-email-response.serializer'; diff --git a/src/user-management/serializers/revoke-session.serializer.ts b/src/user-management/serializers/revoke-session.serializer.ts new file mode 100644 index 000000000..297d85a5e --- /dev/null +++ b/src/user-management/serializers/revoke-session.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + RevokeSession, + RevokeSessionResponse, +} from '../interfaces/revoke-session.interface'; + +export const deserializeRevokeSession = ( + response: RevokeSessionResponse, +): RevokeSession => ({ + sessionId: response.session_id, + returnTo: response.return_to, +}); + +export const serializeRevokeSession = ( + model: RevokeSession, +): RevokeSessionResponse => ({ + session_id: model.sessionId, + return_to: model.returnTo, +}); diff --git a/src/user-management/serializers/send-email-change.serializer.ts b/src/user-management/serializers/send-email-change.serializer.ts new file mode 100644 index 000000000..c5989b53d --- /dev/null +++ b/src/user-management/serializers/send-email-change.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SendEmailChange, + SendEmailChangeResponse, +} from '../interfaces/send-email-change.interface'; + +export const deserializeSendEmailChange = ( + response: SendEmailChangeResponse, +): SendEmailChange => ({ + newEmail: response.new_email, +}); + +export const serializeSendEmailChange = ( + model: SendEmailChange, +): SendEmailChangeResponse => ({ + new_email: model.newEmail, +}); diff --git a/src/user-management/serializers/send-verification-email-response.serializer.ts b/src/user-management/serializers/send-verification-email-response.serializer.ts new file mode 100644 index 000000000..677b79667 --- /dev/null +++ b/src/user-management/serializers/send-verification-email-response.serializer.ts @@ -0,0 +1,19 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SendVerificationEmailResponse, + SendVerificationEmailResponseWire, +} from '../interfaces/send-verification-email-response.interface'; +import { deserializeUser, serializeUser } from './user.serializer'; + +export const deserializeSendVerificationEmailResponse = ( + response: SendVerificationEmailResponseWire, +): SendVerificationEmailResponse => ({ + user: deserializeUser(response.user), +}); + +export const serializeSendVerificationEmailResponse = ( + model: SendVerificationEmailResponse, +): SendVerificationEmailResponseWire => ({ + user: serializeUser(model.user), +}); diff --git a/src/user-management/serializers/sso-device-authorization-request.serializer.ts b/src/user-management/serializers/sso-device-authorization-request.serializer.ts new file mode 100644 index 000000000..578a00930 --- /dev/null +++ b/src/user-management/serializers/sso-device-authorization-request.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + SSODeviceAuthorizationRequest, + SSODeviceAuthorizationRequestResponse, +} from '../interfaces/sso-device-authorization-request.interface'; + +export const deserializeSSODeviceAuthorizationRequest = ( + response: SSODeviceAuthorizationRequestResponse, +): SSODeviceAuthorizationRequest => ({ + clientId: response.client_id, +}); + +export const serializeSSODeviceAuthorizationRequest = ( + model: SSODeviceAuthorizationRequest, +): SSODeviceAuthorizationRequestResponse => ({ + client_id: model.clientId, +}); diff --git a/src/user-management/serializers/update-jwt-template.serializer.ts b/src/user-management/serializers/update-jwt-template.serializer.ts new file mode 100644 index 000000000..d22267f38 --- /dev/null +++ b/src/user-management/serializers/update-jwt-template.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateJWTTemplate, + UpdateJWTTemplateResponse, +} from '../interfaces/update-jwt-template.interface'; + +export const deserializeUpdateJWTTemplate = ( + response: UpdateJWTTemplateResponse, +): UpdateJWTTemplate => ({ + content: response.content, +}); + +export const serializeUpdateJWTTemplate = ( + model: UpdateJWTTemplate, +): UpdateJWTTemplateResponse => ({ + content: model.content, +}); diff --git a/src/user-management/serializers/update-user-organization-membership.serializer.ts b/src/user-management/serializers/update-user-organization-membership.serializer.ts new file mode 100644 index 000000000..4515a7966 --- /dev/null +++ b/src/user-management/serializers/update-user-organization-membership.serializer.ts @@ -0,0 +1,20 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateUserOrganizationMembership, + UpdateUserOrganizationMembershipResponse, +} from '../interfaces/update-user-organization-membership.interface'; + +export const deserializeUpdateUserOrganizationMembership = ( + response: UpdateUserOrganizationMembershipResponse, +): UpdateUserOrganizationMembership => ({ + roleSlug: response.role_slug, + roleSlugs: response.role_slugs, +}); + +export const serializeUpdateUserOrganizationMembership = ( + model: UpdateUserOrganizationMembership, +): UpdateUserOrganizationMembershipResponse => ({ + role_slug: model.roleSlug, + role_slugs: model.roleSlugs, +}); diff --git a/src/user-management/serializers/update-user.serializer.ts b/src/user-management/serializers/update-user.serializer.ts new file mode 100644 index 000000000..14aff36bb --- /dev/null +++ b/src/user-management/serializers/update-user.serializer.ts @@ -0,0 +1,34 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UpdateUser, + UpdateUserResponse, +} from '../interfaces/update-user.interface'; + +export const deserializeUpdateUser = ( + response: UpdateUserResponse, +): UpdateUser => ({ + email: response.email, + firstName: response.first_name, + lastName: response.last_name, + emailVerified: response.email_verified, + password: response.password, + passwordHash: response.password_hash, + passwordHashType: response.password_hash_type, + metadata: response.metadata ?? null, + externalId: response.external_id ?? null, + locale: response.locale ?? null, +}); + +export const serializeUpdateUser = (model: UpdateUser): UpdateUserResponse => ({ + email: model.email, + first_name: model.firstName, + last_name: model.lastName, + email_verified: model.emailVerified, + password: model.password, + password_hash: model.passwordHash, + password_hash_type: model.passwordHashType, + metadata: model.metadata ?? null, + external_id: model.externalId ?? null, + locale: model.locale ?? null, +}); diff --git a/src/user-management/serializers/user-authentication-factor-enroll-response.serializer.ts b/src/user-management/serializers/user-authentication-factor-enroll-response.serializer.ts new file mode 100644 index 000000000..36ac26018 --- /dev/null +++ b/src/user-management/serializers/user-authentication-factor-enroll-response.serializer.ts @@ -0,0 +1,36 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserAuthenticationFactorEnrollResponse, + UserAuthenticationFactorEnrollResponseWire, +} from '../interfaces/user-authentication-factor-enroll-response.interface'; +import { + deserializeAuthenticationFactor, + serializeAuthenticationFactor, +} from '../../mfa/serializers/authentication-factor.serializer'; +import { + deserializeAuthenticationChallenge, + serializeAuthenticationChallenge, +} from '../../mfa/serializers/authentication-challenge.serializer'; + +export const deserializeUserAuthenticationFactorEnrollResponse = ( + response: UserAuthenticationFactorEnrollResponseWire, +): UserAuthenticationFactorEnrollResponse => ({ + authenticationFactor: deserializeAuthenticationFactor( + response.authentication_factor, + ), + authenticationChallenge: deserializeAuthenticationChallenge( + response.authentication_challenge, + ), +}); + +export const serializeUserAuthenticationFactorEnrollResponse = ( + model: UserAuthenticationFactorEnrollResponse, +): UserAuthenticationFactorEnrollResponseWire => ({ + authentication_factor: serializeAuthenticationFactor( + model.authenticationFactor, + ), + authentication_challenge: serializeAuthenticationChallenge( + model.authenticationChallenge, + ), +}); diff --git a/src/user-management/serializers/user-identities-get-item.serializer.ts b/src/user-management/serializers/user-identities-get-item.serializer.ts new file mode 100644 index 000000000..51974b11d --- /dev/null +++ b/src/user-management/serializers/user-identities-get-item.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserIdentitiesGetItem, + UserIdentitiesGetItemResponse, +} from '../interfaces/user-identities-get-item.interface'; + +export const deserializeUserIdentitiesGetItem = ( + response: UserIdentitiesGetItemResponse, +): UserIdentitiesGetItem => ({ + idpId: response.idp_id, + type: response.type, + provider: response.provider, +}); + +export const serializeUserIdentitiesGetItem = ( + model: UserIdentitiesGetItem, +): UserIdentitiesGetItemResponse => ({ + idp_id: model.idpId, + type: model.type, + provider: model.provider, +}); diff --git a/src/user-management/serializers/user-invite.serializer.ts b/src/user-management/serializers/user-invite.serializer.ts new file mode 100644 index 000000000..a33954df6 --- /dev/null +++ b/src/user-management/serializers/user-invite.serializer.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserInvite, + UserInviteResponse, +} from '../interfaces/user-invite.interface'; + +export const deserializeUserInvite = ( + response: UserInviteResponse, +): UserInvite => ({ + object: response.object, + id: response.id, + email: response.email, + state: response.state, + acceptedAt: response.accepted_at, + revokedAt: response.revoked_at, + expiresAt: response.expires_at, + organizationId: response.organization_id ?? null, + inviterUserId: response.inviter_user_id ?? null, + acceptedUserId: response.accepted_user_id ?? null, + createdAt: response.created_at, + updatedAt: response.updated_at, + token: response.token, + acceptInvitationUrl: response.accept_invitation_url, +}); + +export const serializeUserInvite = (model: UserInvite): UserInviteResponse => ({ + object: model.object, + id: model.id, + email: model.email, + state: model.state, + accepted_at: model.acceptedAt, + revoked_at: model.revokedAt, + expires_at: model.expiresAt, + organization_id: model.organizationId, + inviter_user_id: model.inviterUserId, + accepted_user_id: model.acceptedUserId, + created_at: model.createdAt, + updated_at: model.updatedAt, + token: model.token, + accept_invitation_url: model.acceptInvitationUrl, +}); diff --git a/src/user-management/serializers/user-organization-membership.serializer.ts b/src/user-management/serializers/user-organization-membership.serializer.ts new file mode 100644 index 000000000..8fe14b035 --- /dev/null +++ b/src/user-management/serializers/user-organization-membership.serializer.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserOrganizationMembership, + UserOrganizationMembershipResponse, +} from '../interfaces/user-organization-membership.interface'; +import { + deserializeSlimRole, + serializeSlimRole, +} from '../../authorization/serializers/slim-role.serializer'; + +export const deserializeUserOrganizationMembership = ( + response: UserOrganizationMembershipResponse, +): UserOrganizationMembership => ({ + object: response.object, + id: response.id, + userId: response.user_id, + organizationId: response.organization_id, + status: response.status, + directoryManaged: response.directory_managed, + organizationName: response.organization_name, + customAttributes: response.custom_attributes, + createdAt: response.created_at, + updatedAt: response.updated_at, + role: deserializeSlimRole(response.role), +}); + +export const serializeUserOrganizationMembership = ( + model: UserOrganizationMembership, +): UserOrganizationMembershipResponse => ({ + object: model.object, + id: model.id, + user_id: model.userId, + organization_id: model.organizationId, + status: model.status, + directory_managed: model.directoryManaged, + organization_name: model.organizationName, + custom_attributes: model.customAttributes, + created_at: model.createdAt, + updated_at: model.updatedAt, + role: serializeSlimRole(model.role), +}); diff --git a/src/user-management/serializers/user-sessions-impersonator.serializer.ts b/src/user-management/serializers/user-sessions-impersonator.serializer.ts new file mode 100644 index 000000000..2ec149ff0 --- /dev/null +++ b/src/user-management/serializers/user-sessions-impersonator.serializer.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeAuthenticateResponseImpersonator as deserializeUserSessionsImpersonator, + serializeAuthenticateResponseImpersonator as serializeUserSessionsImpersonator, +} from './authenticate-response-impersonator.serializer'; + +export { + deserializeSessionCreatedDataImpersonator as deserializeAuthenticateResponseImpersonator, + serializeSessionCreatedDataImpersonator as serializeAuthenticateResponseImpersonator, +} from '../../common/serializers/session-created-data-impersonator.serializer'; diff --git a/src/user-management/serializers/user-sessions-list-item.serializer.ts b/src/user-management/serializers/user-sessions-list-item.serializer.ts new file mode 100644 index 000000000..52863f5d3 --- /dev/null +++ b/src/user-management/serializers/user-sessions-list-item.serializer.ts @@ -0,0 +1,52 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + UserSessionsListItem, + UserSessionsListItemResponse, +} from '../interfaces/user-sessions-list-item.interface'; +import { + deserializeUserSessionsImpersonator, + serializeUserSessionsImpersonator, +} from './user-sessions-impersonator.serializer'; + +export const deserializeUserSessionsListItem = ( + response: UserSessionsListItemResponse, +): UserSessionsListItem => ({ + object: response.object, + id: response.id, + impersonator: + response.impersonator != null + ? deserializeUserSessionsImpersonator(response.impersonator) + : undefined, + ipAddress: response.ip_address ?? null, + organizationId: response.organization_id, + userAgent: response.user_agent ?? null, + userId: response.user_id, + authMethod: response.auth_method, + status: response.status, + expiresAt: response.expires_at, + endedAt: response.ended_at, + createdAt: response.created_at, + updatedAt: response.updated_at, +}); + +export const serializeUserSessionsListItem = ( + model: UserSessionsListItem, +): UserSessionsListItemResponse => ({ + object: model.object, + id: model.id, + impersonator: + model.impersonator != null + ? serializeUserSessionsImpersonator(model.impersonator) + : undefined, + ip_address: model.ipAddress, + organization_id: model.organizationId, + user_agent: model.userAgent, + user_id: model.userId, + auth_method: model.authMethod, + status: model.status, + expires_at: model.expiresAt, + ended_at: model.endedAt, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/user-management/serializers/user.serializer.ts b/src/user-management/serializers/user.serializer.ts index 2ed850c09..7b60bee87 100644 --- a/src/user-management/serializers/user.serializer.ts +++ b/src/user-management/serializers/user.serializer.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { User, UserResponse } from '../interfaces'; export const deserializeUser = (user: UserResponse): User => ({ @@ -15,3 +17,19 @@ export const deserializeUser = (user: UserResponse): User => ({ externalId: user.external_id ?? null, metadata: user.metadata ?? {}, }); + +export const serializeUser = (model: User): UserResponse => ({ + object: model.object, + id: model.id, + first_name: model.firstName, + last_name: model.lastName, + profile_picture_url: model.profilePictureUrl, + email: model.email, + email_verified: model.emailVerified, + external_id: model.externalId ?? undefined, + metadata: model.metadata, + last_sign_in_at: model.lastSignInAt, + locale: model.locale ?? null, + created_at: model.createdAt, + updated_at: model.updatedAt, +}); diff --git a/src/user-management/serializers/verify-email-address.serializer.ts b/src/user-management/serializers/verify-email-address.serializer.ts new file mode 100644 index 000000000..0e377ab11 --- /dev/null +++ b/src/user-management/serializers/verify-email-address.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + VerifyEmailAddress, + VerifyEmailAddressResponse, +} from '../interfaces/verify-email-address.interface'; + +export const deserializeVerifyEmailAddress = ( + response: VerifyEmailAddressResponse, +): VerifyEmailAddress => ({ + code: response.code, +}); + +export const serializeVerifyEmailAddress = ( + model: VerifyEmailAddress, +): VerifyEmailAddressResponse => ({ + code: model.code, +}); diff --git a/src/user-management/serializers/verify-email-response.serializer.ts b/src/user-management/serializers/verify-email-response.serializer.ts new file mode 100644 index 000000000..d3b10bca7 --- /dev/null +++ b/src/user-management/serializers/verify-email-response.serializer.ts @@ -0,0 +1,6 @@ +// This file is auto-generated by oagen. Do not edit. + +export { + deserializeSendVerificationEmailResponse as deserializeVerifyEmailResponse, + serializeSendVerificationEmailResponse as serializeVerifyEmailResponse, +} from './send-verification-email-response.serializer'; diff --git a/src/user-management/user-management-cors-origins.ts b/src/user-management/user-management-cors-origins.ts new file mode 100644 index 000000000..6b2192af1 --- /dev/null +++ b/src/user-management/user-management-cors-origins.ts @@ -0,0 +1,33 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { + CorsOriginResponse, + CorsOriginResponseWire, +} from './interfaces/cors-origin-response.interface'; +import type { CreateCorsOrigin } from './interfaces/create-cors-origin.interface'; +import { deserializeCorsOriginResponse } from './serializers/cors-origin-response.serializer'; +import { serializeCreateCorsOrigin } from './serializers/create-cors-origin.serializer'; + +export class UserManagementCorsOrigins { + constructor(private readonly workos: WorkOS) {} + + /** + * Create a CORS origin + * + * Creates a new CORS origin for the current environment. CORS origins allow browser-based applications to make requests to the WorkOS API. + * @param payload - Object containing origin. + * @returns {CorsOriginResponse} + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ + async createCorsOrigin( + payload: CreateCorsOrigin, + ): Promise { + const { data } = await this.workos.post( + '/user_management/cors_origins', + serializeCreateCorsOrigin(payload), + ); + return deserializeCorsOriginResponse(data); + } +} diff --git a/src/user-management/user-management-data-providers.ts b/src/user-management/user-management-data-providers.ts new file mode 100644 index 000000000..198a1af59 --- /dev/null +++ b/src/user-management/user-management-data-providers.ts @@ -0,0 +1,116 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { + ConnectedAccount, + ConnectedAccountResponse, +} from './interfaces/connected-account.interface'; +import type { + DataIntegrationsListResponse, + DataIntegrationsListResponseWire, +} from './interfaces/data-integrations-list-response.interface'; +import { deserializeConnectedAccount } from './serializers/connected-account.serializer'; +import { deserializeDataIntegrationsListResponse } from './serializers/data-integrations-list-response.serializer'; + +export interface GetUserDataInstallationOptions { + /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization. */ + organizationId?: string; +} + +export interface GetUserDataIntegrationsOptions { + /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization. */ + organizationId?: string; +} + +export class UserManagementDataProviders { + constructor(private readonly workos: WorkOS) {} + + /** + * Get a connected account + * + * Retrieves a user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for a specific provider. + * @param userId - A [User](https://workos.com/docs/reference/authkit/user) identifier. + * @example "user_01EHZNVPK3SFK441A1RGBFSHRT" + * @param slug - The slug identifier of the provider (e.g., `github`, `slack`, `notion`). + * @example "github" + * @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param options - Additional query options. + * @returns {ConnectedAccount} + * @throws {UnauthorizedException} 401 + * @throws {NotFoundException} 404 + */ + async getUserDataInstallation( + userId: string, + slug: string, + options?: GetUserDataInstallationOptions, + ): Promise { + const { data } = await this.workos.get( + `/user_management/users/${userId}/connected_accounts/${slug}`, + { + query: options + ? { + ...(options.organizationId !== undefined && { + organization_id: options.organizationId, + }), + } + : undefined, + }, + ); + return deserializeConnectedAccount(data); + } + + /** + * Delete a connected account + * + * Disconnects WorkOS's account for the user, including removing any stored access and refresh tokens. The user will need to reauthorize if they want to reconnect. This does not revoke access on the provider side. + * @param userId - A [User](https://workos.com/docs/reference/authkit/user) identifier. + * @example "user_01EHZNVPK3SFK441A1RGBFSHRT" + * @param slug - The slug identifier of the provider (e.g., `github`, `slack`, `notion`). + * @example "github" + * @param options - Additional query options. + * @returns {void} + * @throws {UnauthorizedException} 401 + * @throws {NotFoundException} 404 + */ + async deleteUserDataInstallation( + userId: string, + slug: string, + ): Promise { + await this.workos.delete( + `/user_management/users/${userId}/connected_accounts/${slug}`, + ); + } + + /** + * List providers + * + * Retrieves a list of available providers and the user's connection status for each. Returns all providers configured for your environment, along with the user's [connected account](https://workos.com/docs/reference/pipes/connected-account) information where applicable. + * @param userId - A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for. + * @example "user_01EHZNVPK3SFK441A1RGBFSHRT" + * @param options.organizationId - An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization. + * @example "org_01EHZNVPK3SFK441A1RGBFSHRT" + * @param options - Additional query options. + * @returns {DataIntegrationsListResponse} + * @throws {UnauthorizedException} 401 + * @throws {NotFoundException} 404 + */ + async getUserDataIntegrations( + userId: string, + options?: GetUserDataIntegrationsOptions, + ): Promise { + const { data } = await this.workos.get( + `/user_management/users/${userId}/data_providers`, + { + query: options + ? { + ...(options.organizationId !== undefined && { + organization_id: options.organizationId, + }), + } + : undefined, + }, + ); + return deserializeDataIntegrationsListResponse(data); + } +} diff --git a/src/user-management/user-management-jwt-template.ts b/src/user-management/user-management-jwt-template.ts new file mode 100644 index 000000000..d3af2e582 --- /dev/null +++ b/src/user-management/user-management-jwt-template.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { + JWTTemplateResponse, + JWTTemplateResponseWire, +} from './interfaces/jwt-template-response.interface'; +import type { UpdateJWTTemplate } from './interfaces/update-jwt-template.interface'; +import { deserializeJWTTemplateResponse } from './serializers/jwt-template-response.serializer'; +import { serializeUpdateJWTTemplate } from './serializers/update-jwt-template.serializer'; + +export class UserManagementJWTTemplate { + constructor(private readonly workos: WorkOS) {} + + /** + * Update JWT template + * + * Update the JWT template for the current environment. + * @param payload - Object containing content. + * @returns {JWTTemplateResponse} + * @throws {UnprocessableEntityException} 422 + */ + async updateJWTTemplate( + payload: UpdateJWTTemplate, + ): Promise { + const { data } = await this.workos.put( + '/user_management/jwt_template', + serializeUpdateJWTTemplate(payload), + ); + return deserializeJWTTemplateResponse(data); + } +} diff --git a/src/user-management/user-management-redirect-uris.ts b/src/user-management/user-management-redirect-uris.ts new file mode 100644 index 000000000..db130bc9a --- /dev/null +++ b/src/user-management/user-management-redirect-uris.ts @@ -0,0 +1,32 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { + RedirectUri, + RedirectUriResponse, +} from '../workos-connect/interfaces/redirect-uri.interface'; +import type { CreateRedirectUri } from './interfaces/create-redirect-uri.interface'; +import { deserializeRedirectUri } from '../workos-connect/serializers/redirect-uri.serializer'; +import { serializeCreateRedirectUri } from './serializers/create-redirect-uri.serializer'; + +export class UserManagementRedirectUris { + constructor(private readonly workos: WorkOS) {} + + /** + * Create a redirect URI + * + * Creates a new redirect URI for an environment. + * @param payload - Object containing uri. + * @returns {RedirectUri} + * @throws {BadRequestException} 400 + * @throws {UnauthorizedException} 401 + * @throws {UnprocessableEntityException} 422 + */ + async create(payload: CreateRedirectUri): Promise { + const { data } = await this.workos.post( + '/user_management/redirect_uris', + serializeCreateRedirectUri(payload), + ); + return deserializeRedirectUri(data); + } +} diff --git a/src/user-management/user-management-session-tokens.ts b/src/user-management/user-management-session-tokens.ts new file mode 100644 index 000000000..fe9af5bb8 --- /dev/null +++ b/src/user-management/user-management-session-tokens.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { + JwksResponse, + JwksResponseWire, +} from './interfaces/jwks-response.interface'; +import { deserializeJwksResponse } from './serializers/jwks-response.serializer'; + +export class UserManagementSessionTokens { + constructor(private readonly workos: WorkOS) {} + + /** + * Get JWKS + * + * Returns the JSON Web Key Set (JWKS) containing the public keys used for verifying access tokens. + * @param clientId - Identifies the application making the request to the WorkOS server. You can obtain your client ID from the [API Keys](https://dashboard.workos.com/api-keys) page in the dashboard. + * @example "client_01HXYZ123456789ABCDEFGHIJ" + * @returns {JwksResponse} + * @throws {NotFoundException} 404 + */ + async jsonWebKeySet(clientId: string): Promise { + const { data } = await this.workos.get( + `/sso/jwks/${clientId}`, + ); + return deserializeJwksResponse(data); + } +} diff --git a/src/user-management/user-management-users-authorized-applications.ts b/src/user-management/user-management-users-authorized-applications.ts new file mode 100644 index 000000000..9e32f6cfc --- /dev/null +++ b/src/user-management/user-management-users-authorized-applications.ts @@ -0,0 +1,61 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { PaginationOptions } from '../common/interfaces/pagination-options.interface'; +import type { AutoPaginatable } from '../common/utils/pagination'; +import { createPaginatedList } from '../common/utils/fetch-and-deserialize'; +import type { + AuthorizedConnectApplicationListData, + AuthorizedConnectApplicationListDataResponse, +} from './interfaces/authorized-connect-application-list-data.interface'; +import { deserializeAuthorizedConnectApplicationListData } from './serializers/authorized-connect-application-list-data.serializer'; + +export class UserManagementUsersAuthorizedApplications { + constructor(private readonly workos: WorkOS) {} + + /** + * List authorized applications + * + * Get a list of all Connect applications that the user has authorized. + * @param userId - The ID of the user. + * @example "user_01E4ZCR3C56J083X43JQXF3JK5" + * @param options - Pagination and filter options. + * @returns {AutoPaginatable} + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ + async list( + userId: string, + options?: PaginationOptions, + ): Promise< + AutoPaginatable + > { + return createPaginatedList< + AuthorizedConnectApplicationListDataResponse, + AuthorizedConnectApplicationListData, + PaginationOptions + >( + this.workos, + `/user_management/users/${userId}/authorized_applications`, + deserializeAuthorizedConnectApplicationListData, + options, + ); + } + + /** + * Delete an authorized application + * + * Delete an existing Authorized Connect Application. + * @param applicationId - The ID or client ID of the application. + * @example "conn_app_01HXYZ123456789ABCDEFGHIJ" + * @param userId - The ID of the user. + * @example "user_01E4ZCR3C56J083X43JQXF3JK5" + * @returns {void} + * @throws {NotFoundException} 404 + */ + async delete(applicationId: string, userId: string): Promise { + await this.workos.delete( + `/user_management/users/${userId}/authorized_applications/${applicationId}`, + ); + } +} diff --git a/src/user-management/user-management.ts b/src/user-management/user-management.ts index bafa63541..74578b39c 100644 --- a/src/user-management/user-management.ts +++ b/src/user-management/user-management.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { sealData, unsealData } from '../common/crypto/seal'; import { PaginationOptions } from '../common/interfaces/pagination-options.interface'; import { fetchAndDeserialize } from '../common/utils/fetch-and-deserialize'; @@ -163,6 +165,8 @@ import { serializeSendInvitationOptions } from './serializers/send-invitation-op import { serializeUpdateOrganizationMembershipOptions } from './serializers/update-organization-membership-options.serializer'; import { CookieSession } from './session'; import { getJose } from '../utils/jose'; +import type { UserManagementAuthenticationScreenHint } from './interfaces/user-management-authentication-screen-hint.interface'; +import type { UserManagementAuthenticationProvider } from './interfaces/user-management-authentication-provider.interface'; export class UserManagement { private _jwks: @@ -221,6 +225,13 @@ export class UserManagement { return new CookieSession(this, options.sessionData, options.cookiePassword); } + /** + * Get a user + * + * Get the details of an existing user. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getUser(userId: string): Promise { const { data } = await this.workos.get( `/user_management/users/${userId}`, @@ -229,6 +240,15 @@ export class UserManagement { return deserializeUser(data); } + /** + * Get a user by external ID + * + * Get the details of an existing user by an [external identifier](https://workos.com/docs/authkit/metadata/external-identifiers). + * @param externalId - The external ID of the user. + * @example "f1ffa2b2-c20b-4d39-be5c-212726e11222" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getUserByExternalId(externalId: string): Promise { const { data } = await this.workos.get( `/user_management/users/external_id/${externalId}`, @@ -237,6 +257,14 @@ export class UserManagement { return deserializeUser(data); } + /** + * List users + * + * Get a list of all of your existing users matching the criteria specified. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {UnprocessableEntityException} 422 + */ async listUsers( options?: ListUsersOptions, ): Promise> { @@ -258,6 +286,16 @@ export class UserManagement { ); } + /** + * Create a user + * + * Create a new user in the current environment. + * @param payload - Object containing email. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async createUser(payload: CreateUserOptions): Promise { const { data } = await this.workos.post< UserResponse, @@ -267,6 +305,7 @@ export class UserManagement { return deserializeUser(data); } + /** Authenticate with magic auth. */ async authenticateWithMagicAuth( payload: AuthenticateWithMagicAuthOptions, ): Promise { @@ -291,6 +330,7 @@ export class UserManagement { }); } + /** Authenticate with password. */ async authenticateWithPassword( payload: AuthenticateWithPasswordOptions, ): Promise { @@ -315,19 +355,7 @@ export class UserManagement { }); } - /** - * Exchange an authorization code for tokens. - * - * Auto-detects public vs confidential client mode: - * - If codeVerifier is provided: Uses PKCE flow (public client) - * - If no codeVerifier: Uses client_secret from API key (confidential client) - * - If both: Uses both client_secret AND codeVerifier (confidential client with PKCE) - * - * Using PKCE with confidential clients is recommended by OAuth 2.1 for defense - * in depth and provides additional CSRF protection on the authorization flow. - * - * @throws Error if neither codeVerifier nor API key is available - */ + /** Authenticate with code. */ async authenticateWithCode( payload: AuthenticateWithCodeOptions, ): Promise { @@ -373,13 +401,16 @@ export class UserManagement { } /** - * Exchange an authorization code for tokens using PKCE (public client flow). - * Use this instead of authenticateWithCode() when the client cannot securely - * store a client_secret (browser, mobile, CLI, desktop apps). + * Authenticate * - * @param payload.clientId - Your WorkOS client ID - * @param payload.code - The authorization code from the OAuth callback - * @param payload.codeVerifier - The PKCE code verifier used to generate the code challenge + * Authenticate a user with a specified [authentication method](https://workos.com/docs/reference/authkit/authentication). + * @param payload - The request body. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + * @throws {RateLimitExceededException} 429 */ async authenticateWithCodeAndVerifier( payload: AuthenticateWithCodeAndVerifierOptions, @@ -405,11 +436,7 @@ export class UserManagement { }); } - /** - * Refresh an access token using a refresh token. - * Automatically detects public client mode - if no API key is configured, - * omits client_secret from the request. - */ + /** Authenticate with refresh token. */ async authenticateWithRefreshToken( payload: AuthenticateWithRefreshTokenOptions, ): Promise { @@ -442,6 +469,7 @@ export class UserManagement { }); } + /** Authenticate with totp. */ async authenticateWithTotp( payload: AuthenticateWithTotpOptions, ): Promise { @@ -466,6 +494,7 @@ export class UserManagement { }); } + /** Authenticate with email verification. */ async authenticateWithEmailVerification( payload: AuthenticateWithEmailVerificationOptions, ): Promise { @@ -490,6 +519,7 @@ export class UserManagement { }); } + /** Authenticate with organization selection. */ async authenticateWithOrganizationSelection( payload: AuthenticateWithOrganizationSelectionOptions, ): Promise { @@ -686,6 +716,13 @@ export class UserManagement { return undefined; } + /** + * Get an email verification code + * + * Get the details of an existing email verification code that can be used to send an email to a user for verification. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getEmailVerification( emailVerificationId: string, ): Promise { @@ -696,6 +733,15 @@ export class UserManagement { return deserializeEmailVerification(data); } + /** + * Send verification email + * + * Sends an email that contains a one-time code used to verify a user’s email address. + * @returns {Promise<{ user: User; }>} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {RateLimitExceededException} 429 + */ async sendVerificationEmail({ userId, }: SendVerificationEmailOptions): Promise<{ user: User }> { @@ -707,6 +753,13 @@ export class UserManagement { return { user: deserializeUser(data.user) }; } + /** + * Get Magic Auth code details + * + * Get the details of an existing [Magic Auth](https://workos.com/docs/reference/authkit/magic-auth) code that can be used to send an email to a user for authentication. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getMagicAuth(magicAuthId: string): Promise { const { data } = await this.workos.get( `/user_management/magic_auth/${magicAuthId}`, @@ -715,6 +768,16 @@ export class UserManagement { return deserializeMagicAuth(data); } + /** + * Create a Magic Auth code + * + * Creates a one-time authentication code that can be sent to the user's email address. The code expires in 10 minutes. To verify the code, [authenticate the user with Magic Auth](https://workos.com/docs/reference/authkit/authentication/magic-auth). + * @param payload - Object containing email. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {UnprocessableEntityException} 422 + * @throws {RateLimitExceededException} 429 + */ async createMagicAuth(options: CreateMagicAuthOptions): Promise { const { data } = await this.workos.post< MagicAuthResponse, @@ -729,6 +792,16 @@ export class UserManagement { return deserializeMagicAuth(data); } + /** + * Verify email + * + * Verifies an email address using the one-time code received by the user. + * @param payload - Object containing code. + * @returns {Promise<{ user: User; }>} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async verifyEmail({ code, userId, @@ -743,6 +816,13 @@ export class UserManagement { return { user: deserializeUser(data.user) }; } + /** + * Get a password reset token + * + * Get the details of an existing password reset token that can be used to reset a user's password. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getPasswordReset(passwordResetId: string): Promise { const { data } = await this.workos.get( `/user_management/password_reset/${passwordResetId}`, @@ -751,6 +831,17 @@ export class UserManagement { return deserializePasswordReset(data); } + /** + * Create a password reset token + * + * Creates a one-time token that can be used to reset a user's password. + * @param payload - Object containing email. + * @returns {Promise<{ user: User; }>} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + * @throws {RateLimitExceededException} 429 + */ async createPasswordReset( options: CreatePasswordResetOptions, ): Promise { @@ -767,6 +858,17 @@ export class UserManagement { return deserializePasswordReset(data); } + /** + * Create a password reset token + * + * Creates a one-time token that can be used to reset a user's password. + * @param payload - Object containing email. + * @returns {Promise<{ user: User; }>} + * @throws {AuthorizationException} 403 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + * @throws {RateLimitExceededException} 429 + */ async resetPassword(payload: ResetPasswordOptions): Promise<{ user: User }> { const { data } = await this.workos.post< { user: UserResponse }, @@ -779,6 +881,15 @@ export class UserManagement { return { user: deserializeUser(data.user) }; } + /** + * Update a user + * + * Updates properties of a user. The omitted properties will be left unchanged. + * @param payload - The request body. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {UnprocessableEntityException} 422 + */ async updateUser(payload: UpdateUserOptions): Promise { const { data } = await this.workos.put( `/user_management/users/${payload.userId}`, @@ -788,6 +899,11 @@ export class UserManagement { return deserializeUser(data); } + /** + * Enroll an authentication factor for a user. + * + * @param payload - Object containing userId, type, and optional issuer/user fields. + */ async enrollAuthFactor(payload: EnrollAuthFactorOptions): Promise<{ authenticationFactor: FactorWithSecrets; authenticationChallenge: Challenge; @@ -810,6 +926,16 @@ export class UserManagement { }; } + /** + * List authentication factors + * + * Lists the [authentication factors](https://workos.com/docs/reference/authkit/mfa/authentication-factor) for a user. + * @param userlandUserId - The ID of the [user](https://workos.com/docs/reference/authkit/user). + * @example "user_01E4ZCR3C56J083X43JQXF3JK5" + * @param options - Pagination and filter options. + * @returns {AutoPaginatable} + * @throws {UnprocessableEntityException} 422 + */ async listAuthFactors( options: ListAuthFactorsOptions, ): Promise> { @@ -855,6 +981,15 @@ export class UserManagement { ); } + /** + * List sessions + * + * Get a list of all active sessions for a specific user. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async listSessions( userId: string, options?: ListSessionsOptions, @@ -877,10 +1012,24 @@ export class UserManagement { ); } + /** + * Delete a user + * + * Permanently deletes a user in the current environment. It cannot be undone. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async deleteUser(userId: string) { await this.workos.delete(`/user_management/users/${userId}`); } + /** + * Get user identities + * + * Get a list of identities associated with the user. A user can have multiple associated identities after going through [identity linking](https://workos.com/docs/authkit/identity-linking). Currently only OAuth identities are supported. More provider types may be added in the future. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getUserIdentities(userId: string): Promise { if (!userId) { throw new TypeError(`Incomplete arguments. Need to specify 'userId'.`); @@ -893,6 +1042,13 @@ export class UserManagement { return deserializeIdentities(data); } + /** + * Get an organization membership + * + * Get the details of an existing organization membership. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getOrganizationMembership( organizationMembershipId: string, ): Promise { @@ -903,6 +1059,16 @@ export class UserManagement { return deserializeOrganizationMembership(data); } + /** + * List organization memberships + * + * Get a list of all organization memberships matching the criteria specified. At least one of `user_id` or `organization_id` must be provided. By default only active memberships are returned. Use the `statuses` parameter to filter by other statuses. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async listOrganizationMemberships( options: ListOrganizationMembershipsOptions, ): Promise< @@ -938,6 +1104,18 @@ export class UserManagement { ); } + /** + * Create an organization membership + * + * Creates a new `active` organization membership for the given organization and user. + * + * Calling this API with an organization and user that match an `inactive` organization membership will activate the membership with the specified role(s). + * @param payload - Object containing userId, organizationId. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async createOrganizationMembership( options: CreateOrganizationMembershipOptions, ): Promise { @@ -952,6 +1130,15 @@ export class UserManagement { return deserializeOrganizationMembership(data); } + /** + * Update an organization membership + * + * Update the details of an existing organization membership. + * @param payload - The request body. + * @returns {Promise} + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async updateOrganizationMembership( organizationMembershipId: string, options: UpdateOrganizationMembershipOptions, @@ -967,6 +1154,13 @@ export class UserManagement { return deserializeOrganizationMembership(data); } + /** + * Delete an organization membership + * + * Permanently deletes an existing organization membership. It cannot be undone. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async deleteOrganizationMembership( organizationMembershipId: string, ): Promise { @@ -975,6 +1169,20 @@ export class UserManagement { ); } + /** + * Deactivate an organization membership + * + * Deactivates an `active` organization membership. Emits an [organization_membership.updated](https://workos.com/docs/events/organization-membership) event upon successful deactivation. + * + * - Deactivating an `inactive` membership is a no-op and does not emit an event. + * - Deactivating a `pending` membership returns an error. This membership should be [deleted](https://workos.com/docs/reference/authkit/organization-membership/delete) instead. + * + * See the [membership management documentation](https://workos.com/docs/authkit/users-organizations/organizations/membership-management) for additional details. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async deactivateOrganizationMembership( organizationMembershipId: string, ): Promise { @@ -986,6 +1194,20 @@ export class UserManagement { return deserializeOrganizationMembership(data); } + /** + * Reactivate an organization membership + * + * Reactivates an `inactive` organization membership, retaining the pre-existing role(s). Emits an [organization_membership.updated](https://workos.com/docs/events/organization-membership) event upon successful reactivation. + * + * - Reactivating an `active` membership is a no-op and does not emit an event. + * - Reactivating a `pending` membership returns an error. The user needs to [accept the invitation](https://workos.com/docs/authkit/invitations) instead. + * + * See the [membership management documentation](https://workos.com/docs/authkit/users-organizations/organizations/membership-management) for additional details. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async reactivateOrganizationMembership( organizationMembershipId: string, ): Promise { @@ -997,6 +1219,13 @@ export class UserManagement { return deserializeOrganizationMembership(data); } + /** + * Get an invitation + * + * Get the details of an existing invitation. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async getInvitation(invitationId: string): Promise { const { data } = await this.workos.get( `/user_management/invitations/${invitationId}`, @@ -1005,6 +1234,13 @@ export class UserManagement { return deserializeInvitation(data); } + /** + * Find an invitation by token + * + * Retrieve an existing invitation using the token. + * @returns {Promise} + * @throws {NotFoundException} 404 + */ async findInvitationByToken(invitationToken: string): Promise { const { data } = await this.workos.get( `/user_management/invitations/by_token/${invitationToken}`, @@ -1013,6 +1249,14 @@ export class UserManagement { return deserializeInvitation(data); } + /** + * List invitations + * + * Get a list of all of invitations matching the criteria specified. + * @param options - Pagination and filter options. + * @returns {Promise>} + * @throws {UnprocessableEntityException} 422 + */ async listInvitations( options: ListInvitationsOptions, ): Promise> { @@ -1034,6 +1278,16 @@ export class UserManagement { ); } + /** + * Send an invitation + * + * Sends an invitation email to the recipient. + * @param payload - Object containing email. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async sendInvitation(payload: SendInvitationOptions): Promise { const { data } = await this.workos.post< InvitationResponse, @@ -1048,6 +1302,14 @@ export class UserManagement { return deserializeInvitation(data); } + /** + * Accept an invitation + * + * Accepts an invitation and, if linked to an organization, activates the user's membership in that organization. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + */ async acceptInvitation(invitationId: string): Promise { const { data } = await this.workos.post( `/user_management/invitations/${invitationId}/accept`, @@ -1057,6 +1319,13 @@ export class UserManagement { return deserializeInvitation(data); } + /** + * Revoke an invitation + * + * Revokes an existing invitation. + * @returns {Promise} + * @throws {BadRequestException} 400 + */ async revokeInvitation(invitationId: string): Promise { const { data } = await this.workos.post( `/user_management/invitations/${invitationId}/revoke`, @@ -1066,6 +1335,16 @@ export class UserManagement { return deserializeInvitation(data); } + /** + * Resend an invitation + * + * Resends an invitation email to the recipient. The invitation must be in a pending state. + * @param payload - The request body. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async resendInvitation( invitationId: string, options?: ResendInvitationOptions, @@ -1081,6 +1360,14 @@ export class UserManagement { return deserializeInvitation(data); } + /** + * Revoke Session + * + * Revoke a [user session](https://workos.com/docs/reference/authkit/session). + * @param payload - Object containing sessionId. + * @returns {Promise} + * @throws {BadRequestException} 400 + */ async revokeSession(payload: RevokeSessionOptions): Promise { await this.workos.post( '/user_management/sessions/revoke', @@ -1089,14 +1376,40 @@ export class UserManagement { } /** - * Generate an OAuth 2.0 authorization URL. - * - * For public clients (browser, mobile, CLI), include PKCE parameters: - * - Generate PKCE using workos.pkce.generate() - * - Pass codeChallenge and codeChallengeMethod here - * - Store codeVerifier and pass to authenticateWithCode() later + * Get an authorization URL * - * Or use getAuthorizationUrlWithPKCE() which handles PKCE automatically. + * Generates an OAuth 2.0 authorization URL to authenticate a user with AuthKit or SSO. + * @param options.codeChallengeMethod - The only valid PKCE code challenge method is `"S256"`. Required when specifying a `code_challenge`. + * @example "S256" + * @param options.codeChallenge - Code challenge derived from the code verifier used for the PKCE flow. + * @example "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM" + * @param options.domainHint - A domain hint for SSO connection lookup. + * @example "example.com" + * @param options.connectionId - The ID of an SSO connection to use for authentication. + * @example "conn_01EHQMYV6MBK39QC5PZXHY59C3" + * @param options.providerQueryParams - Key/value pairs of query parameters to pass to the OAuth provider. + * @example {"hd":"example.com","access_type":"offline"} + * @param options.providerScopes - Additional OAuth scopes to request from the identity provider. + * @example ["openid","profile","email"] + * @param options.invitationToken - A token representing a user invitation to redeem during authentication. + * @example "inv_token_abc123" + * @param options.screenHint - Used to specify which screen to display when the provider is `authkit`. + * @default "sign-in" + * @example "sign-in" + * @param options.loginHint - A hint to the authorization server about the login identifier the user might use. + * @example "user@example.com" + * @param options.provider - The OAuth provider to authenticate with (e.g., GoogleOAuth, MicrosoftOAuth, GitHubOAuth). + * @example "GoogleOAuth" + * @param options.prompt - Controls the authentication flow behavior for the user. + * @example "login" + * @param options.state - An opaque value used to maintain state between the request and the callback. + * @example "eyJyZXR1cm5UbyI6ICIvZGFzaGJvYXJkIn0=" + * @param options.organizationId - The ID of the organization to authenticate the user against. + * @example "org_01EHQMYV6MBK39QC5PZXHY59C3" + * @param options.redirectUri - The callback URI where the authorization code will be sent after authentication. + * @example "https://example.com/callback" + * @param options - Additional query options. + * @returns {string} */ getAuthorizationUrl(options: UserManagementAuthorizationURLOptions): string { const { @@ -1240,6 +1553,18 @@ export class UserManagement { return { url, state, codeVerifier: pkce.codeVerifier }; } + /** + * Logout + * + * Logout a user from the current [session](https://workos.com/docs/reference/authkit/session). + * @param options.sessionId - The ID of the session to revoke. This can be extracted from the `sid` claim of the access token. + * @example "session_01H93ZY4F80QPBEZ1R5B2SHQG8" + * @param options.returnTo - The URL to redirect the user to after session revocation. + * @example "https://example.com" + * @param options - Additional query options. + * @returns {string} + * @throws {UnprocessableEntityException} 422 + */ getLogoutUrl(options: LogoutURLOptions): string { const { sessionId, returnTo } = options; @@ -1268,3 +1593,99 @@ export class UserManagement { return `${this.workos.baseURL}/sso/jwks/${clientId}`; } } + +export interface GetUserOptions { + /** The only valid PKCE code challenge method is `"S256"`. Required when specifying a `code_challenge`. */ + codeChallengeMethod?: 'S256'; + /** Code challenge derived from the code verifier used for the PKCE flow. */ + codeChallenge?: string; + /** A domain hint for SSO connection lookup. */ + domainHint?: string; + /** The ID of an SSO connection to use for authentication. */ + connectionId?: string; + /** Key/value pairs of query parameters to pass to the OAuth provider. */ + providerQueryParams?: Record; + /** Additional OAuth scopes to request from the identity provider. */ + providerScopes?: string[]; + /** A token representing a user invitation to redeem during authentication. */ + invitationToken?: string; + /** Used to specify which screen to display when the provider is `authkit`. */ + screenHint?: 'sign-up' | 'sign-in'; + /** A hint to the authorization server about the login identifier the user might use. */ + loginHint?: string; + /** The OAuth provider to authenticate with (e.g., GoogleOAuth, MicrosoftOAuth, GitHubOAuth). */ + provider?: + | 'authkit' + | 'AppleOAuth' + | 'GitHubOAuth' + | 'GoogleOAuth' + | 'MicrosoftOAuth'; + /** Controls the authentication flow behavior for the user. */ + prompt?: string; + /** An opaque value used to maintain state between the request and the callback. */ + state?: string; + /** The ID of the organization to authenticate the user against. */ + organizationId?: string; + /** The response type of the application. */ + responseType: 'code'; + /** The callback URI where the authorization code will be sent after authentication. */ + redirectUri: string; + /** The unique identifier of the WorkOS environment client. */ + clientId: string; +} + +export interface LogoutOptions { + /** The ID of the session to revoke. This can be extracted from the `sid` claim of the access token. */ + sessionId: string; + /** The URL to redirect the user to after session revocation. */ + returnTo?: string; +} + +export interface UserManagementListOptions extends PaginationOptions { + /** The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. */ + organizationId?: string; + /** The email address of the recipient. */ + email?: string; +} + +export interface GetAuthorizationUrlOptions { + /** The only valid PKCE code challenge method is `"S256"`. Required when specifying a `code_challenge`. */ + codeChallengeMethod?: 'S256'; + /** Code challenge derived from the code verifier used for the PKCE flow. */ + codeChallenge?: string; + /** A domain hint for SSO connection lookup. */ + domainHint?: string; + /** The ID of an SSO connection to use for authentication. */ + connectionId?: string; + /** Key/value pairs of query parameters to pass to the OAuth provider. */ + providerQueryParams?: Record; + /** Additional OAuth scopes to request from the identity provider. */ + providerScopes?: string[]; + /** A token representing a user invitation to redeem during authentication. */ + invitationToken?: string; + /** Used to specify which screen to display when the provider is `authkit`. */ + screenHint?: UserManagementAuthenticationScreenHint; + /** A hint to the authorization server about the login identifier the user might use. */ + loginHint?: string; + /** The OAuth provider to authenticate with (e.g., GoogleOAuth, MicrosoftOAuth, GitHubOAuth). */ + provider?: UserManagementAuthenticationProvider; + /** Controls the authentication flow behavior for the user. */ + prompt?: string; + /** An opaque value used to maintain state between the request and the callback. */ + state?: string; + /** The ID of the organization to authenticate the user against. */ + organizationId?: string; + /** The response type of the application. */ + responseType: 'code'; + /** The callback URI where the authorization code will be sent after authentication. */ + redirectUri: string; + /** The unique identifier of the WorkOS environment client. */ + clientId: string; +} + +export interface GetLogoutUrlOptions { + /** The ID of the session to revoke. This can be extracted from the `sid` claim of the access token. */ + sessionId: string; + /** The URL to redirect the user to after session revocation. */ + returnTo?: string; +} diff --git a/src/webhooks-endpoints/webhooks-endpoints.ts b/src/webhooks-endpoints/webhooks-endpoints.ts new file mode 100644 index 000000000..a1ba23cfc --- /dev/null +++ b/src/webhooks-endpoints/webhooks-endpoints.ts @@ -0,0 +1,96 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WorkOS } from '../workos'; +import type { PaginationOptions } from '../common/interfaces/pagination-options.interface'; +import type { AutoPaginatable } from '../common/utils/pagination'; +import { createPaginatedList } from '../common/utils/fetch-and-deserialize'; +import type { + WebhookEndpointJson, + WebhookEndpointJsonResponse, +} from '../webhooks/interfaces/webhook-endpoint-json.interface'; +import type { CreateWebhookEndpoint } from '../webhooks/interfaces/create-webhook-endpoint.interface'; +import type { UpdateWebhookEndpoint } from '../webhooks/interfaces/update-webhook-endpoint.interface'; +import { deserializeWebhookEndpointJson } from '../webhooks/serializers/webhook-endpoint-json.serializer'; +import { serializeCreateWebhookEndpoint } from '../webhooks/serializers/create-webhook-endpoint.serializer'; +import { serializeUpdateWebhookEndpoint } from '../webhooks/serializers/update-webhook-endpoint.serializer'; + +export class WebhooksEndpoints { + constructor(private readonly workos: WorkOS) {} + + /** + * List Webhook Endpoints + * + * Get a list of all of your existing webhook endpoints. + * @param options - Pagination and filter options. + * @returns {Promise>} + */ + async listWebhookEndpoints( + options?: PaginationOptions, + ): Promise> { + return createPaginatedList< + WebhookEndpointJsonResponse, + WebhookEndpointJson, + PaginationOptions + >( + this.workos, + '/webhook_endpoints', + deserializeWebhookEndpointJson, + options, + ); + } + + /** + * Create a Webhook Endpoint + * + * Create a new webhook endpoint to receive event notifications. + * @param payload - Object containing endpointUrl, events. + * @returns {Promise} + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ + async createWebhookEndpoints( + payload: CreateWebhookEndpoint, + ): Promise { + const { data } = await this.workos.post( + '/webhook_endpoints', + serializeCreateWebhookEndpoint(payload), + ); + return deserializeWebhookEndpointJson(data); + } + + /** + * Update a Webhook Endpoint + * + * Update the properties of an existing webhook endpoint. + * @param id - Unique identifier of the Webhook Endpoint. + * @example "we_0123456789" + * @param payload - The request body. + * @returns {Promise} + * @throws {NotFoundException} 404 + * @throws {ConflictException} 409 + * @throws {UnprocessableEntityException} 422 + */ + async updateWebhookEndpoint( + id: string, + payload: UpdateWebhookEndpoint, + ): Promise { + const { data } = await this.workos.patch( + `/webhook_endpoints/${id}`, + serializeUpdateWebhookEndpoint(payload), + ); + return deserializeWebhookEndpointJson(data); + } + + /** + * Delete a Webhook Endpoint + * + * Delete an existing webhook endpoint. + * @param id - Unique identifier of the Webhook Endpoint. + * @example "we_0123456789" + * @returns {Promise} + * @throws {NotFoundException} 404 + */ + async deleteWebhookEndpoint(id: string): Promise { + await this.workos.delete(`/webhook_endpoints/${id}`); + } +} diff --git a/src/webhooks/fixtures/create-webhook-endpoint.fixture.json b/src/webhooks/fixtures/create-webhook-endpoint.fixture.json deleted file mode 100644 index 81a07af09..000000000 --- a/src/webhooks/fixtures/create-webhook-endpoint.fixture.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "endpoint_url": "https://example.com/webhooks", - "events": ["user.created", "dsync.user.created"] -} diff --git a/src/webhooks/fixtures/update-webhook-endpoint.fixture.json b/src/webhooks/fixtures/update-webhook-endpoint.fixture.json deleted file mode 100644 index e73642781..000000000 --- a/src/webhooks/fixtures/update-webhook-endpoint.fixture.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "endpoint_url": "https://example.com/webhooks", - "status": "enabled", - "events": ["user.created", "dsync.user.created"] -} diff --git a/src/webhooks/interfaces/index.ts b/src/webhooks/interfaces/index.ts index cb2832263..a49b6b479 100644 --- a/src/webhooks/interfaces/index.ts +++ b/src/webhooks/interfaces/index.ts @@ -3,3 +3,4 @@ export * from './create-webhook-endpoint.interface'; export * from './update-webhook-endpoint.interface'; export * from './webhook-endpoint-json.interface'; +export * from './webhooks-order.interface'; diff --git a/src/webhooks/interfaces/webhooks-order.interface.ts b/src/webhooks/interfaces/webhooks-order.interface.ts new file mode 100644 index 000000000..fc232d715 --- /dev/null +++ b/src/webhooks/interfaces/webhooks-order.interface.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export type WebhooksOrder = 'normal' | 'desc' | 'asc'; diff --git a/src/widgets/interfaces/index.ts b/src/widgets/interfaces/index.ts new file mode 100644 index 000000000..97025e016 --- /dev/null +++ b/src/widgets/interfaces/index.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by oagen. Do not edit. + +export * from './widget-session-token.interface'; diff --git a/src/widgets/interfaces/widget-session-token-response.interface.ts b/src/widgets/interfaces/widget-session-token-response.interface.ts new file mode 100644 index 000000000..919707b8a --- /dev/null +++ b/src/widgets/interfaces/widget-session-token-response.interface.ts @@ -0,0 +1,10 @@ +// This file is auto-generated by oagen. Do not edit. + +export interface WidgetSessionTokenResponse { + /** The widget session token. */ + token: string; +} + +export interface WidgetSessionTokenResponseWire { + token: string; +} diff --git a/src/widgets/interfaces/widget-session-token.interface.ts b/src/widgets/interfaces/widget-session-token.interface.ts new file mode 100644 index 000000000..19169328b --- /dev/null +++ b/src/widgets/interfaces/widget-session-token.interface.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { WidgetSessionTokenScopes } from '../../common/interfaces/widget-session-token-scopes.interface'; + +export interface WidgetSessionToken { + /** The ID of the organization to scope the widget session to. */ + organizationId: string; + /** The ID of the user to issue the widget session token for. */ + userId?: string; + /** The scopes to grant the widget session. */ + scopes?: WidgetSessionTokenScopes[]; +} + +export interface WidgetSessionTokenResponse { + organization_id: string; + user_id?: string; + scopes?: WidgetSessionTokenScopes[]; +} diff --git a/src/widgets/serializers/widget-session-token-response.serializer.ts b/src/widgets/serializers/widget-session-token-response.serializer.ts new file mode 100644 index 000000000..5f0579c3b --- /dev/null +++ b/src/widgets/serializers/widget-session-token-response.serializer.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + WidgetSessionTokenResponse, + WidgetSessionTokenResponseWire, +} from '../interfaces/widget-session-token-response.interface'; + +export const deserializeWidgetSessionTokenResponse = ( + response: WidgetSessionTokenResponseWire, +): WidgetSessionTokenResponse => ({ + token: response.token, +}); + +export const serializeWidgetSessionTokenResponse = ( + model: WidgetSessionTokenResponse, +): WidgetSessionTokenResponseWire => ({ + token: model.token, +}); diff --git a/src/widgets/serializers/widget-session-token.serializer.ts b/src/widgets/serializers/widget-session-token.serializer.ts new file mode 100644 index 000000000..42294f4d7 --- /dev/null +++ b/src/widgets/serializers/widget-session-token.serializer.ts @@ -0,0 +1,22 @@ +// This file is auto-generated by oagen. Do not edit. + +import type { + WidgetSessionToken, + WidgetSessionTokenResponse, +} from '../interfaces/widget-session-token.interface'; + +export const deserializeWidgetSessionToken = ( + response: WidgetSessionTokenResponse, +): WidgetSessionToken => ({ + organizationId: response.organization_id, + userId: response.user_id, + scopes: response.scopes, +}); + +export const serializeWidgetSessionToken = ( + model: WidgetSessionToken, +): WidgetSessionTokenResponse => ({ + organization_id: model.organizationId, + user_id: model.userId, + scopes: model.scopes, +}); diff --git a/src/widgets/widgets.ts b/src/widgets/widgets.ts index 1b6b2ecdd..bbcc6c844 100644 --- a/src/widgets/widgets.ts +++ b/src/widgets/widgets.ts @@ -1,3 +1,5 @@ +// This file is auto-generated by oagen. Do not edit. + import { WorkOS } from '../workos'; import { deserializeGetTokenResponse, @@ -10,6 +12,16 @@ import { export class Widgets { constructor(private readonly workos: WorkOS) {} + /** + * Generate a widget token + * + * Generate a widget token scoped to an organization and user with the specified scopes. + * @param payload - Object containing organizationId. + * @returns {Promise} + * @throws {BadRequestException} 400 + * @throws {NotFoundException} 404 + * @throws {UnprocessableEntityException} 422 + */ async getToken(payload: GetTokenOptions): Promise { const { data } = await this.workos.post< GetTokenResponseResponse, diff --git a/src/workos.ts b/src/workos.ts index d24d82b78..87d7ee5fc 100644 --- a/src/workos.ts +++ b/src/workos.ts @@ -56,6 +56,15 @@ import { WebhooksEndpoints } from './webhooks/webhooks-endpoints'; import { WorkOSConnect } from './workos-connect/work-os-connect'; import { Applications } from './workos-connect/applications'; import { ApplicationClientSecrets } from './workos-connect/application-client-secrets'; +import { OrganizationsFeatureFlags } from './organizations-feature-flags/organizations-feature-flags'; +import { UserManagementSessionTokens } from './user-management/user-management-session-tokens'; +import { UserManagementCorsOrigins } from './user-management/user-management-cors-origins'; +import { UserManagementJWTTemplate } from './user-management/user-management-jwt-template'; +import { UserManagementRedirectUris } from './user-management/user-management-redirect-uris'; +import { UserManagementUsersFeatureFlags } from './user-management-users-feature-flags/user-management-users-feature-flags'; +import { UserManagementUsersAuthorizedApplications } from './user-management/user-management-users-authorized-applications'; +import { UserManagementDataProviders } from './user-management/user-management-data-providers'; +import { MultiFactorAuth } from './multi-factor-auth/multi-factor-auth'; const DEFAULT_HOSTNAME = 'api.workos.com'; @@ -530,4 +539,15 @@ export class WorkOS { static readonly SERVER_PRODUCTION = 'https://api.workos.com'; /** Staging */ static readonly SERVER_STAGING = 'https://api.workos-test.com'; + readonly organizationsFeatureFlags = new OrganizationsFeatureFlags(this); + readonly userManagementSessionTokens = new UserManagementSessionTokens(this); + readonly userManagementCorsOrigins = new UserManagementCorsOrigins(this); + readonly userManagementJWTTemplate = new UserManagementJWTTemplate(this); + readonly userManagementRedirectUris = new UserManagementRedirectUris(this); + readonly userManagementUsersFeatureFlags = + new UserManagementUsersFeatureFlags(this); + readonly userManagementUsersAuthorizedApplications = + new UserManagementUsersAuthorizedApplications(this); + readonly userManagementDataProviders = new UserManagementDataProviders(this); + readonly multiFactorAuth = new MultiFactorAuth(this); }