diff --git a/.gitignore b/.gitignore index 1dac84e..9d0caef 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ build/ *.pyc # Generation scripts are dev-only — not shipped with the SDK. Generated -# outputs (src/norbix_python/api/, hub/, references/*.dtos.ts) ARE +# outputs (src/norbix_python/api/, hub/) ARE # committed and used by CI and consumers. scripts/sync_types.py scripts/generate_endpoints.py diff --git a/docs/database-rules.md b/docs/database-rules.md index 78adc79..6fb2a45 100644 --- a/docs/database-rules.md +++ b/docs/database-rules.md @@ -133,8 +133,8 @@ except NorbixError as err: ## Schema fields `get_database_schema` returns the fields typed per kind (`$fieldType`). The -SDK hands the JSON back as it arrives; the reference DTOs are in -`references/api_dtos.py` (`JsonSchemaFieldDto` and its subclasses). New in this +SDK hands the JSON back as it arrives; the field shapes are in the +[API reference](https://docs.norbix.ai/api-reference/) (`JsonSchemaFieldDto` and its subclasses). New in this contract: - `ObjectFieldDto` (`$fieldType: object`) — a nested form: `properties` diff --git a/docs/hub/database.md b/docs/hub/database.md index 69cb4dd..9f92529 100644 --- a/docs/hub/database.md +++ b/docs/hub/database.md @@ -267,8 +267,8 @@ norbix.hub.database.delete_collection_import(created["id"]) ``` The request fields are listed under `RequestImportUploadUrlRequest`, -`AnalyzeImportFileRequest` and `CreateCollectionImport` in -`references/hub_dtos.py`. +`AnalyzeImportFileRequest` and `CreateCollectionImport` in the +[API reference](https://docs.norbix.ai/api-reference/). ## Trees, list settings, embed and bundles diff --git a/pyproject.toml b/pyproject.toml index 4cade96..50fc2cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ addopts = "-q" target-version = "py310" line-length = 100 src = ["src", "tests", "scripts"] -exclude = [".venv", "references"] +exclude = [".venv"] force-exclude = true [tool.ruff.lint] diff --git a/references/api2.dtos.ts b/references/api2.dtos.ts deleted file mode 100644 index 3ec3c4c..0000000 --- a/references/api2.dtos.ts +++ /dev/null @@ -1,4489 +0,0 @@ -/* Options: -Date: 2026-10-19 11:26:13 -Version: 10.20 -Tip: To override a DTO option, remove "//" prefix before updating -BaseUrl: http://localhost:5002 - -GlobalNamespace: CodeMashApi2 -//MakePropertiesOptional: False -AddServiceStackTypes: True -AddResponseStatus: False -//AddImplicitVersion: -AddDescriptionAsComments: True -//IncludeTypes: -//ExcludeTypes: -//DefaultImports: -*/ - - -export module CodeMashApi2 -{ - // @ts-nocheck - - export interface IReturn - { - createResponse(): T; - } - - export interface IReturnVoid - { - createResponse(): void; - } - - export interface IHasSessionId - { - sessionId?: string; - } - - export interface IHasBearerToken - { - bearerToken?: string; - } - - export interface IPost - { - } - - export class JsonSchemaFieldDto - { - // @DataMember - public fieldName: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class StringFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public format?: string; - - // @DataMember - public pattern?: string; - - // @DataMember - public minLength?: number; - - // @DataMember - public maxLength?: number; - - // @DataMember - public translateOptions?: IReadOnlyDictionary; - - // @DataMember - public default?: string; - - // @DataMember - public unique?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class DecimalFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public minimum?: number; - - // @DataMember - public maximum?: number; - - // @DataMember - public multipleOf?: number; - - // @DataMember - public default?: number; - - // @DataMember - public unique?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class CurrencyDefaultDto - { - // @DataMember - public value: number; - - // @DataMember - public currency: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class CurrencyFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public allowedCurrencies?: IReadOnlyList; - - // @DataMember - public multipleOf?: number; - - // @DataMember - public minimum?: number; - - // @DataMember - public maximum?: number; - - // @DataMember - public default?: CurrencyDefaultDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class BooleanFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public default?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class DateFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public minimum?: number; - - // @DataMember - public maximum?: number; - - // @DataMember - public default?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class IntegerFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public minimum?: number; - - // @DataMember - public maximum?: number; - - // @DataMember - public default?: number; - - // @DataMember - public unique?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GeolocationFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public allowedTypes?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class TagsFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public minItems?: number; - - // @DataMember - public maxItems?: number; - - // @DataMember - public default?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class FileFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public storages?: IReadOnlyList; - - // @DataMember - public minItems?: number; - - // @DataMember - public maxItems?: number; - - // @DataMember - public allowedFileType?: string; - - // @DataMember - public maxSizeMb?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class TaxonomySelectionFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public taxonomyId?: string; - - // @DataMember - public multiple: boolean; - - // @DataMember - public displayField?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class CollectionSelectionFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public collectionId?: string; - - // @DataMember - public displayField?: string; - - // @DataMember - public multiple: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class UserSelectionFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public multiple: boolean; - - // @DataMember - public displayField?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class RoleSelectionFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public multiple: boolean; - - // @DataMember - public displayField?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class EnumSelectionFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public values?: IReadOnlyList; - - // @DataMember - public multiple: boolean; - - // @DataMember - public default?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class ObjectFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public properties: IReadOnlyList; - - // @DataMember - public required?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class ArrayFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public items: JsonSchemaFieldDto; - - // @DataMember - public minItems?: number; - - // @DataMember - public maxItems?: number; - - // @DataMember - public uniqueItems?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class JsonFieldDto extends JsonSchemaFieldDto - { - // @DataMember - public maxBytes?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - // @DataContract(Namespace="http://codemash.io/types/") - export class RequestBase implements IVersionBasedRequest, IHasCorrelationIdRequest - { - /** @description TimeZone */ - // @DataMember - // @ApiMember(DataType="string", Description="TimeZone", Name="TimeZoneId", ParameterType="header") - public timeZoneId?: string; - - /** @description The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v3 */ - // @DataMember - // @ApiMember(DataType="string", Description="The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v3", IsRequired=true, Name="version", ParameterType="path") - public version: string; - - /** @description CorrelationId for each request */ - // @DataMember - // @ApiMember(DataType="string", Description="CorrelationId for each request", Name="CorrelationId", ParameterType="header") - public correlationId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export interface IVersionBasedRequest - { - version: string; - } - - export interface IHasCorrelationIdRequest - { - correlationId?: string; - } - - // @DataContract(Namespace="http://codemash.io/types/") - export class CodeMashRequestBase extends RequestBase implements IHasProjectId, IHasEnv - { - /** @description ID of your project. Can be passed in a header as norbix-project-id. */ - // @DataMember - // @ApiMember(DataType="string", Description="ID of your project. Can be passed in a header as norbix-project-id.", IsRequired=true, Name="norbix-project-id", ParameterType="header") - public projectId: string; - - /** @description Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env. */ - // @DataMember - // @ApiMember(DataType="string", Description="Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env.", Name="norbix-env", ParameterType="header") - public env?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export interface IHasProjectId - { - projectId: string; - } - - export interface IHasEnv - { - env?: string; - } - - export enum Gender - { - Male = 'Male', - Female = 'Female', - Other = 'Other', - } - - export enum MarketingBlockReason - { - Unspecified = 'Unspecified', - Unsubscribed = 'Unsubscribed', - Complaint = 'Complaint', - HardBounce = 'HardBounce', - InvalidEmail = 'InvalidEmail', - AdminBlock = 'AdminBlock', - } - - export class UserGeneralInfoDto - { - public phone?: string; - public primaryEmail?: string; - public displayName?: string; - public firstName?: string; - public lastName?: string; - public fullName?: string; - public addressLine1?: string; - public addressLine2?: string; - public country?: string; - public city?: string; - public state?: string; - public postalCode?: string; - public company?: string; - public gender?: Gender; - public birthDate?: number; - public timeZone?: string; - public language?: string; - public blockAllMarketingMessages: boolean; - public blockedTags?: { [index:string]: HashSet; }; - public blockReasons?: MarketingBlockReason[]; - public extraMetadata?: string; - public notes?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class SaveUser extends CodeMashRequestBase - { - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - /** @description User Info */ - // @DataMember - // @ApiMember(DataType="object", Description="User Info", Name="UserGeneralInfo", ParameterType="body") - public userGeneralInfo?: UserGeneralInfoDto; - - /** @description Attach this login to an existing user id. Optional. */ - // @DataMember - // @ApiMember(Description="Attach this login to an existing user id. Optional.") - public userId?: string; - - /** @description Ignore UserRegistersAsRole from Membership Settings */ - // @DataMember - // @ApiMember(DataType="boolean", Description="Ignore UserRegistersAsRole from Membership Settings", Name="IgnoreUserRegistersAsRole", ParameterType="body") - public ignoreUserRegistersAsRole: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - // @DataContract - export class SaveUserWithRolesBase extends SaveUser - { - // @DataMember - public roles: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export interface IPublicRegistrationRequest - { - roles?: string[]; - } - - export class CodeMashListPaginationRequestBase extends RequestBase implements IHasProjectId, IHasEnv - { - /** @description ID of your project. Can be passed in a header as norbix-project-id. */ - // @DataMember - // @ApiMember(DataType="string", Description="ID of your project. Can be passed in a header as norbix-project-id.", IsRequired=true, Name="norbix-project-id", ParameterType="header") - public projectId: string; - - /** @description Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env. */ - // @DataMember - // @ApiMember(DataType="string", Description="Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env.", Name="norbix-env", ParameterType="header") - public env?: string; - - /** @description Cursor token — fetch the page AFTER this item. */ - // @DataMember - // @ApiMember(DataType="string", Description="Cursor token — fetch the page AFTER this item.", Name="startingAfter", ParameterType="query") - public startingAfter?: string; - - /** @description Cursor token — fetch the page BEFORE this item. */ - // @DataMember - // @ApiMember(DataType="string", Description="Cursor token — fetch the page BEFORE this item.", Name="endingBefore", ParameterType="query") - public endingBefore?: string; - - /** @description Amount of records to return. */ - // @DataMember - // @ApiMember(DataType="integer", Description="Amount of records to return.", Format="int32", Name="pageSize", ParameterType="query") - public pageSize?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export interface IPasskeyCeremonyRequest - { - } - - export class CursorArgs implements ICursorArgs - { - public field: string; - public order: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class PagingArgs - { - public cursorArgs?: CursorArgs; - public pageSize?: number; - public startingAfter?: string; - public endingBefore?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class PaymentOrderLineInput - { - // @DataMember - public sku?: string; - - // @DataMember - public title?: string; - - // @DataMember - public quantity: number; - - // @DataMember - public unitAmountMinor: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export enum CodeMashRelease - { - NotSet = 'NotSet', - Community = 'Community', - ManagedService = 'ManagedService', - Enterprise = 'Enterprise', - } - - export enum CodeMashRuntime - { - Development = 'Development', - CI = 'CI', - Staging = 'Staging', - Production = 'Production', - } - - export class EchoRegionDto - { - public code: string; - public displayName: string; - public apiUrl: string; - public hubUrl: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class EchoAgentSnippetDto - { - public client: string; - public kind: string; - public recommended: boolean; - public auth: string; - public config: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class EchoAgentDto - { - public mcpUrl: string; - public oAuthMetadataUrl?: string; - public installationType: string; - public onboardingDocsUrl: string; - public toolsUrl: string; - public cliPackage: string; - public cliInstallCommand: string; - public deviceAuthorizationUrl: string; - public deviceTokenUrl: string; - public snippets: EchoAgentSnippetDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class EchoHostingPlatformDto - { - public provider: string; - public isAws: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class PublicBrandDto - { - public displayName: string; - public mainColor?: string; - public accentColor?: string; - public logoUrl?: string; - public iconUrl?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class PublicPasswordPolicyDto - { - public minLength: number; - public maxLength?: number; - public minNumbers?: number; - public minUpper?: number; - public minLower?: number; - public minSpecial?: number; - public allowedSpecial?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class PublicAuthDto - { - public socialProviders: string[] = []; - public passkey: boolean; - public methods?: string[]; - public passwordPolicy?: PublicPasswordPolicyDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class PublicAiAssistantDto - { - public id: string; - public name: string; - public welcome?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class PublicAiChatDto - { - public enabled: boolean; - public assistants: PublicAiAssistantDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class ErrorDto - { - public message: string; - public errorCode?: string; - public context?: { [index:string]: string; }; - public stackTrace?: ErrorDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class CodeMashResponseStatus - { - public isSuccess: boolean; - public errors?: ErrorDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class ResponseBase - { - // @DataMember - public responseStatus: CodeMashResponseStatus; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class EndUserChatAttachment - { - public id: string; - public sessionId: string; - public fileName: string; - public contentType: string; - public kind: string; - public size: number; - public summary?: string; - public createdAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class EndUserChatMemoryNote - { - public id: string; - public sessionId: string; - public kind: string; - public text: string; - public createdAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class EndUserChatAssistant - { - public id: string; - public name: string; - public welcomeMessage?: string; - public isDefault: boolean; - public memoryEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class EndUserChatPlan - { - public id: string; - public name: string; - public quotaUnit: string; - public monthlyQuota: number; - public used: number; - public remaining: number; - public attachments: boolean; - public rag: boolean; - public memory: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class EndUserChatSession - { - public id: string; - public assistantId?: string; - public title?: string; - public isPinned: boolean; - public isArchived: boolean; - public lastSeq: number; - public createdAtUtc: string; - public updatedAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class AiChatEntryWireDto - { - public kind: string; - public id: string; - public seq: number; - public atUtc: string; - public refEntryId?: string; - public workItemId?: string; - public feedback?: string; - public feedbackAtUtc?: string; - public feedbackByUserAuthId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class EndUserAiToolParameter - { - public name: string; - public type: string; - public required: boolean; - public description?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class EndUserAiTool - { - public name: string; - public description: string; - public toolsets: string[] = []; - public requiresConfirmation: boolean; - public parameters: EndUserAiToolParameter[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export enum AuthType - { - Service = 'Service', - Email = 'Email', - UserName = 'UserName', - Phone = 'Phone', - Guest = 'Guest', - Social = 'Social', - } - - export class AccessInformationDto - { - public ip?: string; - public date?: string; - public timeZone?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class RegistrationDto - { - public registrationInformation: AccessInformationDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class LoginDto - { - public needChangePasswordOnNextLogin: boolean; - public lastAccessInformation?: AccessInformationDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export enum AuthStatus - { - Registered = 0, - PendingValidation = 2, - Invited = 4, - Active = 8, - Unregistered = 16, - Suspended = 32, - InActive = 64, - Blocked = 128, - } - - export class AuthDto implements IBindableContract - { - public id: string; - public type: AuthType; - public email?: string; - public userName?: string; - public registration?: RegistrationDto; - public login?: LoginDto; - public generalInfo?: UserGeneralInfoDto; - public roles?: string[]; - public pushDevices?: string[]; - public tags?: string[]; - public status: AuthStatus; - public createdOn: string; - public modifiedOn: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class PaginatedResponse - { - public items: IList; - public hasMore: boolean; - public hasPrevious: boolean; - public startingAfter?: string; - public endingBefore?: string; - - public constructor(init?: Partial>) { (Object as any).assign(this, init); } - } - - export class UserMarketingPreferencesDto - { - public blockAllMarketingMessages: boolean; - public blockedTags?: { [index:string]: HashSet; }; - public blockReasons?: MarketingBlockReason[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class PasskeyListItemDto - { - public credentialId: string; - public friendlyName: string; - public registeredOnUtc: string; - public lastUsedOnUtc: string; - public isRevoked: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class TermMultiParentDto - { - // @DataMember - public taxonomyId: string; - - // @DataMember - public parentId: string; - - // @DataMember - public name?: string; - - // @DataMember - public names?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class TermTreeDto - { - // @DataMember - public id: string; - - // @DataMember - public taxonomyId?: string; - - // @DataMember - public taxonomyName?: string; - - // @DataMember - public parentId?: string; - - // @DataMember - public order?: number; - - // @DataMember - public name?: string; - - // @DataMember - public names?: { [index:string]: string; }; - - // @DataMember - public slug?: string; - - // @DataMember - public description?: string; - - // @DataMember - public descriptions?: { [index:string]: string; }; - - // @DataMember - public multiParents?: TermMultiParentDto[]; - - // @DataMember - public meta?: Object; - - // @DataMember - public children?: TermTreeDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class TaxonomyTreeDto - { - // @DataMember - public viewId: string; - - // @DataMember - public taxonomyName: string; - - // @DataMember - public taxonomySlug: string; - - // @DataMember - public parentId?: string; - - // @DataMember - public children?: TaxonomyTreeDto[]; - - // @DataMember - public terms?: TermTreeDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class TermDto - { - // @DataMember - public id: string; - - // @DataMember - public taxonomyId?: string; - - // @DataMember - public taxonomyName?: string; - - // @DataMember - public parentId?: string; - - // @DataMember - public order?: number; - - // @DataMember - public name?: string; - - // @DataMember - public names?: { [index:string]: string; }; - - // @DataMember - public slug?: string; - - // @DataMember - public description?: string; - - // @DataMember - public descriptions?: { [index:string]: string; }; - - // @DataMember - public multiParents?: TermMultiParentDto[]; - - // @DataMember - public meta?: Object; - - // @DataMember - public origin?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class DataSchemaDto - { - // @DataMember - public json: string; - - // @DataMember - public fields: JsonSchemaFieldDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class VisualSchemaDto - { - // @DataMember - public json: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class SchemaUniqueIndexDto - { - // @DataMember - public fields: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class SchemaSettingsDto - { - // @DataMember - public softDelete: boolean; - - // @DataMember - public hasRecordOwner: boolean; - - // @DataMember - public description?: string; - - // @DataMember - public uniqueIndexes?: SchemaUniqueIndexDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class SchemaEmbedSettingsDto - { - // @DataMember - public enabled: boolean; - - // @DataMember - public fields: string[] = []; - - // @DataMember - public embeddingIntegrationId?: string; - - // @DataMember - public perUser: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export enum TriggerType - { - Membership = 'Membership', - Schema = 'Schema', - Files = 'Files', - Payments = 'Payments', - Ai = 'Ai', - } - - export enum TriggerActionType - { - Code = 'Code', - Push = 'Push', - Sms = 'Sms', - Email = 'Email', - WebhookCall = 'WebhookCall', - SseCall = 'SseCall', - Marketplace = 'Marketplace', - } - - // @DataContract - export class TriggerActionDto - { - // @DataMember - public type: TriggerActionType; - - // @DataMember - public integrationId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class TriggerDto implements IHasViewId, IQueuedTrigger - { - // @DataMember - public type: TriggerType; - - // @DataMember - public viewId: string; - - // @DataMember - public name: string; - - // @DataMember - public thenAction: TriggerActionDto; - - // @DataMember - public description?: string; - - // @DataMember - public isEnabled: boolean; - - // @DataMember - public activationCode?: string; - - // @DataMember - public order?: number; - - // @DataMember - public breakOnError: boolean; - - // @DataMember - public savedByAuthId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class SchemaDto implements IHasViewId - { - // @DataMember - public viewId: string; - - // @DataMember - public schemaName: string; - - // @DataMember - public schemaSlug?: string; - - // @DataMember - public version: number; - - // @DataMember - public metaSchemaVersion: number; - - // @DataMember - public dataSchema: DataSchemaDto; - - // @DataMember - public visualSchema: VisualSchemaDto; - - // @DataMember - public publishedAt: string; - - // @DataMember - public settings?: SchemaSettingsDto; - - // @DataMember - public embed?: SchemaEmbedSettingsDto; - - // @DataMember - public triggers?: TriggerDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class SchemaListProjection implements IHasViewId - { - // @DataMember - public viewId: string; - - // @DataMember - public schemaName: string; - - // @DataMember - public schemaTitle: string; - - // @DataMember - public latestVersion?: number; - - // @DataMember - public hasDraft: boolean; - - // @DataMember - public metaSchemaVersion: number; - - // @DataMember - public description?: string; - - // @DataMember - public env?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class FileChecksumDto - { - // @DataMember(Order=1) - public algorithm: string; - - // @DataMember(Order=2) - public hash: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class FileResourceDto - { - // @DataMember(Order=1) - public id?: string; - - // @DataMember(Order=2) - public originalFileName: string; - - // @DataMember(Order=3) - public extension: string; - - // @DataMember(Order=4) - public storedFileName: string; - - // @DataMember(Order=5) - public sizeBytes?: number; - - // @DataMember(Order=6) - public checksum?: FileChecksumDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export enum FileProvider - { - Local = 'Local', - AwsS3 = 'AwsS3', - AzureBlobStorage = 'AzureBlobStorage', - GoogleCloudStorage = 'GoogleCloudStorage', - Ftp = 'Ftp', - AppleICloud = 'AppleICloud', - DropBox = 'DropBox', - GoogleDrive = 'GoogleDrive', - } - - // @DataContract - export class FileResourceRefDto - { - // @DataMember(Order=1) - public resource: FileResourceDto; - - // @DataMember(Order=2) - public integrationId: string; - - // @DataMember(Order=3) - public provider: FileProvider; - - // @DataMember(Order=4) - public path: string; - - // @DataMember(Order=5) - public publicUrl?: string; - - // @DataMember(Order=6) - public isPublic: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class PublicFolderDto - { - // @DataMember(Order=1) - public path: string; - - // @DataMember(Order=2) - public publicId: string; - - // @DataMember(Order=3) - public publicUrl?: string; - - // @DataMember(Order=4) - public inherited: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class IntegrationTestResultItemDto - { - // @DataMember - public operation: string; - - // @DataMember - public result: string; - - // @DataMember - public errors?: IReadOnlyList; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class OwnPushDeviceDto - { - // @DataMember - public id: string; - - // @DataMember - public provider: string; - - // @DataMember - public token: string; - - // @DataMember - public platform?: string; - - // @DataMember - public osName?: string; - - // @DataMember - public osVersion?: string; - - // @DataMember - public appVersion?: string; - - // @DataMember - public deviceName?: string; - - // @DataMember - public modelName?: string; - - // @DataMember - public brand?: string; - - // @DataMember - public installationId?: string; - - // @DataMember - public locale?: string; - - // @DataMember - public timeZone?: string; - - // @DataMember - public updatedAtUtc?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class OwnPushMessageDto - { - // @DataMember - public id: string; - - // @DataMember - public campaignId: string; - - // @DataMember - public title?: string; - - // @DataMember - public body?: string; - - // @DataMember - public sentAtUtc?: string; - - // @DataMember - public isRead: boolean; - - // @DataMember - public readAtUtc?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class PaymentOrderLineDto - { - // @DataMember - public sku: string; - - // @DataMember - public title: string; - - // @DataMember - public quantity: number; - - // @DataMember - public unitAmountMinor: number; - - // @DataMember - public amountMinor: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class PaymentOrderCheckoutDto - { - // @DataMember - public attempt: number; - - // @DataMember - public integrationId: string; - - // @DataMember - public provider: string; - - // @DataMember - public providerOrderId: string; - - // @DataMember - public providerReference: string; - - // @DataMember - public paymentUrl: string; - - // @DataMember - public method: string; - - // @DataMember - public startedOnUtc: string; - - // @DataMember - public expiresAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class PaymentOrderDto - { - // @DataMember - public id: string; - - // @DataMember - public env: string; - - // @DataMember - public buyerUserId: string; - - // @DataMember - public merchantReference: string; - - // @DataMember - public currency: string; - - // @DataMember - public priceVersion: string; - - // @DataMember - public lines: PaymentOrderLineDto[] = []; - - // @DataMember - public totalMinor: number; - - // @DataMember - public metadata: { [index:string]: string; } = {}; - - // @DataMember - public status: string; - - // @DataMember - public createdOnUtc: string; - - // @DataMember - public updatedOnUtc: string; - - // @DataMember - public checkouts: PaymentOrderCheckoutDto[] = []; - - // @DataMember - public settledMinor?: number; - - // @DataMember - public refundedMinor: number; - - // @DataMember - public paidOnUtc?: string; - - // @DataMember - public providerPaymentId?: string; - - // @DataMember - public mismatches: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class InAppNotificationDto - { - public id: string; - public projectId: string; - public userId: string; - public channel: string; - public eventName: string; - public payloadJson?: string; - public isRead: boolean; - public seenAtUtc?: string; - public readAtUtc?: string; - public createdAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class ResponseError - { - // @DataMember(Order=1) - public errorCode: string; - - // @DataMember(Order=2) - public fieldName: string; - - // @DataMember(Order=3) - public message: string; - - // @DataMember(Order=4) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class ResponseStatus - { - // @DataMember(Order=1) - public errorCode: string; - - // @DataMember(Order=2) - public message?: string; - - // @DataMember(Order=3) - public stackTrace?: string; - - // @DataMember(Order=4) - public errors?: ResponseError[]; - - // @DataMember(Order=5) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export interface IBindableContract - { - } - - export interface IHasViewId - { - viewId: string; - } - - export interface ICursorArgs - { - field: string; - order: number; - } - - export interface IQueuedTrigger - { - viewId: string; - name: string; - order?: number; - breakOnError: boolean; - } - - export class EchoResponse - { - public release: CodeMashRelease; - public runtime: CodeMashRuntime; - public managedServiceHubUrl: string; - public managedServiceApiUrl: string; - public hubUrl: string; - public apiUrl: string; - public apiVersion: string; - public hubVersion: string; - public adminUrlTemplate?: string; - public emailServiceConfigured: boolean; - public rootBootstrapPasswordSource?: string; - public regions?: EchoRegionDto[]; - public agent?: EchoAgentDto; - public hostingPlatform?: EchoHostingPlatformDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class PublicProjectConfigDto - { - public displayName: string; - public adminPortalEnabled: boolean; - public branding?: PublicBrandDto; - public auth: PublicAuthDto; - public aiChat: PublicAiChatDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class PublicLegalDocumentDto - { - public kind: string; - public title?: string; - public body: string; - public available: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class IdResponse extends ResponseBase - { - // @DataMember - public id?: string; - - // @DataMember - public status?: string; - - // @DataMember - public warnings?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class ListEndUserChatAttachmentsResponse extends ResponseBase - { - public attachments: EndUserChatAttachment[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class EmptyResponse extends ResponseBase - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class ListEndUserChatMemoryResponse extends ResponseBase - { - public notes: EndUserChatMemoryNote[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetEndUserChatAvailabilityResponse extends ResponseBase - { - public enabled: boolean; - public available: boolean; - public reason?: string; - public defaultAssistantId?: string; - public assistants: EndUserChatAssistant[] = []; - public plan?: EndUserChatPlan; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class ListEndUserChatSessionsResponse extends ResponseBase - { - public sessions: EndUserChatSession[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetEndUserChatSessionResponse extends ResponseBase - { - public session?: EndUserChatSession; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetEndUserChatEntriesResponse extends ResponseBase - { - public sessionId?: string; - public entries: AiChatEntryWireDto[] = []; - public lastSeq: number; - public hasMore: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class StartEndUserChatTurnResponse extends ResponseBase - { - public turnId?: string; - public sessionId?: string; - public channel?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetEndUserAiToolsResponse extends ResponseBase - { - public tools?: EndUserAiTool[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class InvokeEndUserAiToolResponse extends ResponseBase - { - public result?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetUserResponse extends ResponseBase - { - public user?: AuthDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetUsersResponse extends ResponseBase - { - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetUserPreferencesResponse extends ResponseBase - { - public preferences?: UserMarketingPreferencesDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class PasskeyOkResponse extends ResponseBase - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class PasskeyCeremonyOptionsResponse extends ResponseBase - { - public ceremonyId: string; - public optionsJson: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class PasskeyAuthTokensResponse extends ResponseBase - { - public accessToken: string; - public refreshToken: string; - public expiresInSeconds: number; - public recoveryCodes?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class PasskeyListResponse extends ResponseBase - { - public passkeys: PasskeyListItemDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class PasskeyRecoveryResponse extends ResponseBase - { - public accessToken: string; - public refreshToken: string; - public expiresInSeconds: number; - public remainingCodes: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class PasskeyVerificationTokenResponse extends ResponseBase - { - public verificationToken: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class FindMergedTermTreeResponse extends ResponseBase - { - public tree?: TermTreeDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class FindTaxonomyTreeResponse extends ResponseBase - { - public tree?: TaxonomyTreeDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class FindTermsResponse extends ResponseBase - { - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class FindTermsChildrenResponse extends ResponseBase - { - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class FindTermTreeResponse extends ResponseBase - { - public tree?: TermTreeDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetDatabaseSchemaResponse extends ResponseBase - { - public item?: SchemaDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetDatabaseSchemasResponse extends ResponseBase - { - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class AggregateResponse extends ResponseBase - { - public result?: Object[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class CountResponse extends ResponseBase - { - public count: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class DistinctResponse extends ResponseBase - { - public values?: Object[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class ExecuteAggregateResponse extends ResponseBase - { - public result?: Object[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class FindResponse extends ResponseBase - { - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class FindOneResponse extends ResponseBase - { - public result?: Object; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetFileByIdResponse extends ResponseBase - { - public file?: FileResourceRefDto; - public isPublic?: boolean; - public publicUrl?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetFileInfoResponse extends ResponseBase - { - public file?: FileResourceRefDto; - public isPublic?: boolean; - public publicUrl?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetSignedUrlResponse extends ResponseBase - { - public url?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class ListFilesResponse extends ResponseBase - { - public list?: PaginatedResponse; - public folders?: IList; - public publicFolders?: IList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class RequestUploadUrlResponse extends ResponseBase - { - public url?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - // @DataContract - export class TestFilesIntegrationResponse extends ResponseBase - { - // @DataMember - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetOwnPushDevicesResponse extends ResponseBase - { - public items: OwnPushDeviceDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetOwnPushMessagesResponse extends ResponseBase - { - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetPaymentOrderResponse extends ResponseBase - { - public item?: PaymentOrderDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetPaymentOrdersResponse extends ResponseBase - { - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class StartPaymentCheckoutResponse extends ResponseBase - { - public checkout?: PaymentOrderCheckoutDto; - public reused: boolean; - public order?: PaymentOrderDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetNotificationInboxResponse extends ResponseBase - { - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class GetUnreadCountResponse extends ResponseBase - { - public count: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class MarkNotificationReadResponse extends ResponseBase - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - export class MarkAllNotificationsReadResponse extends ResponseBase - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - } - - // @DataContract - export class AuthenticateResponse implements IHasSessionId, IHasBearerToken - { - // @DataMember(Order=1) - public userId?: string; - - // @DataMember(Order=2) - public sessionId?: string; - - // @DataMember(Order=3) - public userName?: string; - - // @DataMember(Order=4) - public displayName?: string; - - // @DataMember(Order=5) - public referrerUrl?: string; - - // @DataMember(Order=6) - public bearerToken?: string; - - // @DataMember(Order=7) - public refreshToken?: string; - - // @DataMember(Order=8) - public refreshTokenExpiry?: string; - - // @DataMember(Order=9) - public profileUrl?: string; - - // @DataMember(Order=10) - public roles?: string[]; - - // @DataMember(Order=11) - public permissions?: string[]; - - // @DataMember(Order=12) - public authProvider?: string; - - // @DataMember(Order=13) - public responseStatus?: ResponseStatus; - - // @DataMember(Order=14) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - // @DataContract - export class GetAccessTokenResponse - { - // @DataMember(Order=1) - public accessToken?: string; - - // @DataMember(Order=2) - public meta?: { [index:string]: string; }; - - // @DataMember(Order=3) - public responseStatus?: ResponseStatus; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - } - - export class SharedTypeGen - { - public typegen_StringFieldDto?: StringFieldDto; - public typegen_DecimalFieldDto?: DecimalFieldDto; - public typegen_CurrencyFieldDto?: CurrencyFieldDto; - public typegen_BooleanFieldDto?: BooleanFieldDto; - public typegen_DateFieldDto?: DateFieldDto; - public typegen_IntegerFieldDto?: IntegerFieldDto; - public typegen_GeolocationFieldDto?: GeolocationFieldDto; - public typegen_TagsFieldDto?: TagsFieldDto; - public typegen_FileFieldDto?: FileFieldDto; - public typegen_TaxonomySelectionFieldDto?: TaxonomySelectionFieldDto; - public typegen_CollectionSelectionFieldDto?: CollectionSelectionFieldDto; - public typegen_UserSelectionFieldDto?: UserSelectionFieldDto; - public typegen_RoleSelectionFieldDto?: RoleSelectionFieldDto; - public typegen_EnumSelectionFieldDto?: EnumSelectionFieldDto; - public typegen_ObjectFieldDto?: ObjectFieldDto; - public typegen_ArrayFieldDto?: ArrayFieldDto; - public typegen_JsonFieldDto?: JsonFieldDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'SharedTypeGen'; } - public getMethod() { return 'POST'; } - public createResponse() {} - } - - // @Route("/{version}/echo", "GET") - export class Echo extends RequestBase implements IReturn - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'Echo'; } - public getMethod() { return 'GET'; } - public createResponse() { return new EchoResponse(); } - } - - // @Route("/{version}/public/projects/{ProjectId}/brand/{Kind}", "GET") - export class GetPublicProjectBrandAsset extends RequestBase implements IReturn - { - public projectId?: string; - public kind?: string; - public v?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPublicProjectBrandAsset'; } - public getMethod() { return 'GET'; } - public createResponse() { return new Blob(); } - } - - // @Route("/{version}/public/projects/{ProjectId}/config", "GET") - export class GetPublicProjectConfig extends RequestBase implements IReturn - { - public projectId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPublicProjectConfig'; } - public getMethod() { return 'GET'; } - public createResponse() { return new PublicProjectConfigDto(); } - } - - // @Route("/{version}/public/projects/{ProjectId}/legal/{Kind}", "GET") - export class GetPublicProjectLegal extends RequestBase implements IReturn - { - public projectId?: string; - public kind?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPublicProjectLegal'; } - public getMethod() { return 'GET'; } - public createResponse() { return new PublicLegalDocumentDto(); } - } - - /** @description Adds a file to one of the caller's own AI chats. */ - // @Route("/{version}/ai/chat/sessions/{SessionId}/attachments", "POST") - // @Api(Description="Adds a file to one of the caller's own AI chats.") - export class UploadEndUserChatAttachmentRequest extends CodeMashRequestBase implements IReturn - { - public sessionId: string; - public fileName: string; - public contentType: string; - public base64Content: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UploadEndUserChatAttachmentRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Lists the files in one of the caller's own AI chats. */ - // @Route("/{version}/ai/chat/sessions/{SessionId}/attachments", "GET") - // @Api(Description="Lists the files in one of the caller's own AI chats.") - export class ListEndUserChatAttachmentsRequest extends CodeMashRequestBase implements IReturn - { - public sessionId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ListEndUserChatAttachmentsRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new ListEndUserChatAttachmentsResponse(); } - } - - /** @description Removes a file from one of the caller's own AI chats. */ - // @Route("/{version}/ai/chat/attachments/{AttachmentId}", "DELETE") - // @Api(Description="Removes a file from one of the caller's own AI chats.") - export class DeleteEndUserChatAttachmentRequest extends CodeMashRequestBase implements IReturn - { - public attachmentId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteEndUserChatAttachmentRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Likes, dislikes or clears one message of the caller's own AI chat. */ - // @Route("/{version}/ai/chat/sessions/{SessionId}/entries/{EntryId}/feedback", "PUT") - // @Api(Description="Likes, dislikes or clears one message of the caller's own AI chat.") - export class SetEndUserChatEntryFeedbackRequest extends CodeMashRequestBase implements IReturn - { - public sessionId: string; - public entryId: string; - public feedback?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetEndUserChatEntryFeedbackRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Lists what the AI chat remembers about the caller. */ - // @Route("/{version}/ai/chat/memory", "GET") - // @Api(Description="Lists what the AI chat remembers about the caller.") - export class ListEndUserChatMemoryRequest extends CodeMashRequestBase implements IReturn - { - public take?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ListEndUserChatMemoryRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new ListEndUserChatMemoryResponse(); } - } - - /** @description Forgets one thing the AI chat remembers about the caller. */ - // @Route("/{version}/ai/chat/memory/{NoteId}", "DELETE") - // @Api(Description="Forgets one thing the AI chat remembers about the caller.") - export class ForgetEndUserChatMemoryRequest extends CodeMashRequestBase implements IReturn - { - public noteId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ForgetEndUserChatMemoryRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Whether the AI chat can run for the caller, and which assistants it offers. */ - // @Route("/{version}/ai/chat/availability", "GET") - // @Api(Description="Whether the AI chat can run for the caller, and which assistants it offers.") - export class GetEndUserChatAvailabilityRequest extends CodeMashRequestBase implements IReturn - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEndUserChatAvailabilityRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEndUserChatAvailabilityResponse(); } - } - - /** @description Lists the caller's own AI chats. */ - // @Route("/{version}/ai/chat/sessions", "GET") - // @Api(Description="Lists the caller's own AI chats.") - export class ListEndUserChatSessionsRequest extends CodeMashRequestBase implements IReturn - { - public take?: number; - public includeArchived: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ListEndUserChatSessionsRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new ListEndUserChatSessionsResponse(); } - } - - /** @description Opens a new AI chat for the caller. */ - // @Route("/{version}/ai/chat/sessions", "POST") - // @Api(Description="Opens a new AI chat for the caller.") - export class CreateEndUserChatSessionRequest extends CodeMashRequestBase implements IReturn - { - public assistantId?: string; - public title?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateEndUserChatSessionRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Returns one of the caller's own AI chats. */ - // @Route("/{version}/ai/chat/sessions/{SessionId}", "GET") - // @Api(Description="Returns one of the caller's own AI chats.") - export class GetEndUserChatSessionRequest extends CodeMashRequestBase implements IReturn - { - public sessionId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEndUserChatSessionRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEndUserChatSessionResponse(); } - } - - /** @description Renames one of the caller's own AI chats. */ - // @Route("/{version}/ai/chat/sessions/{SessionId}", "PATCH") - // @Api(Description="Renames one of the caller's own AI chats.") - export class RenameEndUserChatSessionRequest extends CodeMashRequestBase implements IReturn - { - public sessionId: string; - public title?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RenameEndUserChatSessionRequest'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Pins or unpins one of the caller's own AI chats. */ - // @Route("/{version}/ai/chat/sessions/{SessionId}/pin", "PUT") - // @Api(Description="Pins or unpins one of the caller's own AI chats.") - export class PinEndUserChatSessionRequest extends CodeMashRequestBase implements IReturn - { - public sessionId: string; - public pinned: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PinEndUserChatSessionRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Archives or unarchives one of the caller's own AI chats. */ - // @Route("/{version}/ai/chat/sessions/{SessionId}/archive", "PUT") - // @Api(Description="Archives or unarchives one of the caller's own AI chats.") - export class ArchiveEndUserChatSessionRequest extends CodeMashRequestBase implements IReturn - { - public sessionId: string; - public archived: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ArchiveEndUserChatSessionRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Deletes one of the caller's own AI chats. */ - // @Route("/{version}/ai/chat/sessions/{SessionId}", "DELETE") - // @Api(Description="Deletes one of the caller's own AI chats.") - export class DeleteEndUserChatSessionRequest extends CodeMashRequestBase implements IReturn - { - public sessionId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteEndUserChatSessionRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Returns a page of one of the caller's own AI chat transcripts. */ - // @Route("/{version}/ai/chat/sessions/{SessionId}/entries", "GET") - // @Api(Description="Returns a page of one of the caller's own AI chat transcripts.") - export class GetEndUserChatEntriesRequest extends CodeMashRequestBase implements IReturn - { - public sessionId: string; - public afterSeq?: number; - public take?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEndUserChatEntriesRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEndUserChatEntriesResponse(); } - } - - /** @description Sends a message to the AI chat; the answer streams on the caller's channel. */ - // @Route("/{version}/ai/chat/turn", "POST") - // @Api(Description="Sends a message to the AI chat; the answer streams on the caller's channel.") - export class StartEndUserChatTurnRequest extends CodeMashRequestBase implements IReturn - { - public sessionId?: string; - public assistantId?: string; - public message: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'StartEndUserChatTurnRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new StartEndUserChatTurnResponse(); } - } - - /** @description Lists the AI tools a project user may use: only their own data (own:* toolsets). */ - // @Route("/{version}/ai/tools", "GET") - // @Api(Description="Lists the AI tools a project user may use: only their own data (own:* toolsets).") - export class GetEndUserAiToolsRequest extends RequestBase implements IReturn - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEndUserAiToolsRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEndUserAiToolsResponse(); } - } - - /** @description Invokes one own-scope AI tool as the calling project user. */ - // @Route("/{version}/ai/tools/{ToolName}", "POST") - // @Api(Description="Invokes one own-scope AI tool as the calling project user.") - export class InvokeEndUserAiToolRequest extends RequestBase implements IReturn - { - public toolName: string; - public argumentsJson?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'InvokeEndUserAiToolRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new InvokeEndUserAiToolResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/block", "PATCH") - // @Api(Description="Membership") - // @DataContract - export class BlockUserRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the user to block, from get_users. */ - // @DataMember - // @ApiMember(Description="Id of the user to block, from get_users.", IsRequired=true) - public id: string; - - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'BlockUserRequest'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/register/service", "POST") - // @Api(Description="Membership") - // @DataContract - export class SaveSystemUserWithPermissions extends SaveUserWithRolesBase implements IReturn - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveSystemUserWithPermissions'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/register/guest", "POST") - // @Api(Description="Membership") - // @DataContract - export class SaveGuestUser extends SaveUser implements IReturn - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveGuestUser'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/register/phone", "POST") - // @Api(Description="Membership") - // @DataContract - export class SavePhoneUser extends SaveUser implements IReturn - { - /** @description Phone number for the new user, in E.164 format. */ - // @DataMember - // @ApiMember(Description="Phone number for the new user, in E.164 format.", IsRequired=true) - public phone: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SavePhoneUser'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/register/user-name", "POST") - // @Api(Description="Membership") - // @DataContract - export class SaveUserNameUser extends SaveUser implements IReturn, IPublicRegistrationRequest - { - // @DataMember - public password: string; - - // @DataMember - public userName: string; - - /** @description Optional roles from the project's "Permitted user registration roles". Empty = the default registration role. */ - // @DataMember - // @ApiMember(Description="Optional roles from the project's \"Permitted user registration roles\". Empty = the default registration role.") - public roles?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveUserNameUser'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/register/email", "POST") - // @Api(Description="Membership") - // @DataContract - export class SaveEmailUser extends SaveUser implements IReturn, IPublicRegistrationRequest - { - // @DataMember - public password: string; - - // @DataMember - public email: string; - - /** @description Optional roles from the project's "Permitted user registration roles". Empty = the default registration role. */ - // @DataMember - // @ApiMember(Description="Optional roles from the project's \"Permitted user registration roles\". Empty = the default registration role.") - public roles?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveEmailUser'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/register/phone-with-permissions", "POST") - // @Api(Description="Membership") - // @DataContract - export class SavePhoneUserNameWithPermissions extends SaveUserWithRolesBase implements IReturn - { - // @DataMember - public phone: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SavePhoneUserNameWithPermissions'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/register/email-with-permissions", "POST") - // @Api(Description="Membership") - // @DataContract - export class SaveEmailUserNameWithPermissions extends SaveUserWithRolesBase implements IReturn - { - // @DataMember - public password: string; - - // @DataMember - public email: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveEmailUserNameWithPermissions'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/register/user-name-with-permissions", "POST") - // @Api(Description="Membership") - // @DataContract - export class SaveUserNameWithPermissions extends SaveUserWithRolesBase implements IReturn - { - // @DataMember - public password: string; - - // @DataMember - public userName: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveUserNameWithPermissions'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth", "DELETE") - // @Api(Description="Membership") - // @DataContract - export class DeleteUserRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the user to delete, from get_users. */ - // @DataMember - // @ApiMember(Description="Id of the user to delete, from get_users.", IsRequired=true) - public id: string; - - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteUserRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/{id}", "GET") - // @Api(Description="Membership") - // @DataContract - export class GetUserRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the user to fetch, from get_users. */ - // @DataMember - // @ApiMember(Description="Id of the user to fetch, from get_users.", IsRequired=true) - public id: string; - - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetUserRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetUserResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth", "GET") - // @Api(Description="Membership") - // @DataContract - export class GetUsersRequest extends CodeMashListPaginationRequestBase implements IReturn - { - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - /** @description Include each user's effective permissions in the result. */ - // @DataMember - // @ApiMember(Description="Include each user's effective permissions in the result.") - public includePermissions: boolean; - - /** @description Only return users that have a registered push device. */ - // @DataMember - // @ApiMember(Description="Only return users that have a registered push device.") - public userShouldHavePushDevice: boolean; - - /** @description Only return users that have an email address. */ - // @DataMember - // @ApiMember(Description="Only return users that have an email address.") - public userShouldHaveEmail: boolean; - - /** @description Include each user's metadata in the result. */ - // @DataMember - // @ApiMember(Description="Include each user's metadata in the result.") - public includeMeta: boolean; - - /** @description Filter to users that have any of these role names. */ - // @DataMember - // @ApiMember(Description="Filter to users that have any of these role names.") - public roleNames?: string[]; - - /** @description Filter to these specific user ids. */ - // @DataMember - // @ApiMember(Description="Filter to these specific user ids.") - public userIds?: string[]; - - /** @description Free text, case-insensitive: matches email, user name, display / first / last name or phone. */ - // @DataMember - // @ApiMember(Description="Free text, case-insensitive: matches email, user name, display / first / last name or phone.") - public search?: string; - - /** @description Case-insensitive part of the email. */ - // @DataMember - // @ApiMember(Description="Case-insensitive part of the email.") - public email?: string; - - /** @description Case-insensitive part of the user name. */ - // @DataMember - // @ApiMember(Description="Case-insensitive part of the user name.") - public userName?: string; - - /** @description Status names, any of: Registered, PendingValidation, Active, Unregistered, Suspended, InActive, Blocked. */ - // @DataMember - // @ApiMember(Description="Status names, any of: Registered, PendingValidation, Active, Unregistered, Suspended, InActive, Blocked.") - public statuses?: string[]; - - /** @description Login type names, any of: Service, Email, UserName, Phone, Guest, Social. */ - // @DataMember - // @ApiMember(Description="Login type names, any of: Service, Email, UserName, Phone, Guest, Social.") - public types?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetUsersRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetUsersResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/{id}/preferences", "GET") - // @Api(Description="Membership") - // @DataContract - export class GetUserPreferencesRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the user whose preferences to fetch, from get_users. */ - // @DataMember - // @ApiMember(Description="Id of the user whose preferences to fetch, from get_users.", IsRequired=true) - public id: string; - - /** @description Database integration id. Optional — defaults to the project's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the project's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetUserPreferencesRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetUserPreferencesResponse(); } - } - - // @Route("/{version}/membership/users/{contactId}/marketing-state/{channel}/consent", "POST") - export class GrantContactConsentRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the user (contact) to grant consent for. */ - // @ApiMember(Description="Id of the user (contact) to grant consent for.", IsRequired=true) - public contactId: string; - - /** @description Delivery channel to grant consent on: Email, Sms, or Push. */ - // @ApiMember(Description="Delivery channel to grant consent on: Email, Sms, or Push.", IsRequired=true) - public channel: string; - - /** @description Lawful basis for the consent, e.g. Consent. Defaults to Consent. */ - // @ApiMember(Description="Lawful basis for the consent, e.g. Consent. Defaults to Consent.") - public lawfulBasis: string; - - /** @description Source of the consent, e.g. UserOptIn. Defaults to UserOptIn. */ - // @ApiMember(Description="Source of the consent, e.g. UserOptIn. Defaults to UserOptIn.") - public source: string; - - /** @description Optional free-text reference to evidence of consent (e.g. a form submission id). */ - // @ApiMember(Description="Optional free-text reference to evidence of consent (e.g. a form submission id).") - public evidenceRef?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GrantContactConsentRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/invite", "POST") - // @Api(Description="Membership") - // @DataContract - export class InviteUserRequest extends CodeMashRequestBase implements IReturn - { - /** @description Email address the invitation is sent to. It cannot be changed later. */ - // @DataMember - // @ApiMember(Description="Email address the invitation is sent to. It cannot be changed later.", IsRequired=true) - public email: string; - - /** @description The invited person's full name, e.g. "Rūta Petraitė". Stored as the full name, first name (first word) and last name (the rest). The user may change it when finishing. */ - // @DataMember - // @ApiMember(Description="The invited person's full name, e.g. \"Rūta Petraitė\". Stored as the full name, first name (first word) and last name (the rest). The user may change it when finishing.") - public fullName?: string; - - /** @description Optional. How e-mails greet the person ("Hi {salutation},"), e.g. "Rūta". Stored as the display name. When empty the full name is used. The user may change it when finishing. */ - // @DataMember - // @ApiMember(Description="Optional. How e-mails greet the person (\"Hi {salutation},\"), e.g. \"Rūta\". Stored as the display name. When empty the full name is used. The user may change it when finishing.") - public salutation?: string; - - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'InviteUserRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/invitation/finish", "POST") - // @Api(Description="Membership") - // @DataContract - export class FinishInvitationRequest extends CodeMashRequestBase implements IReturn - { - /** @description One-time invitation token from the e-mail link (the #token= fragment). */ - // @DataMember - // @ApiMember(Description="One-time invitation token from the e-mail link (the #token= fragment).", IsRequired=true) - public token: string; - - /** @description The user's password. Validated against the project's complexity policy. */ - // @DataMember - // @ApiMember(Description="The user's password. Validated against the project's complexity policy.", IsRequired=true) - public password: string; - - /** @description Optional. The user's full name; replaces the one the admin entered (full name, first name = first word, last name = the rest). Empty = keep the admin's. */ - // @DataMember - // @ApiMember(Description="Optional. The user's full name; replaces the one the admin entered (full name, first name = first word, last name = the rest). Empty = keep the admin's.") - public fullName?: string; - - /** @description Optional. How e-mails greet the user (stored as the display name). Empty = keep the admin's, or the full name when the admin gave none. */ - // @DataMember - // @ApiMember(Description="Optional. How e-mails greet the user (stored as the display name). Empty = keep the admin's, or the full name when the admin gave none.") - public salutation?: string; - - /** @description Optional. Older form of Salutation (the display name); Salutation wins when both are sent. */ - // @DataMember - // @ApiMember(Description="Optional. Older form of Salutation (the display name); Salutation wins when both are sent.") - public displayName?: string; - - /** @description Optional first name; wins over the one taken from FullName. */ - // @DataMember - // @ApiMember(Description="Optional first name; wins over the one taken from FullName.") - public firstName?: string; - - /** @description Optional last name; wins over the one taken from FullName. */ - // @DataMember - // @ApiMember(Description="Optional last name; wins over the one taken from FullName.") - public lastName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FinishInvitationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/{userId}/link-identity", "POST") - // @Api(Description="Membership") - // @DataContract - export class LinkIdentityRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public userId: string; - - // @DataMember - public provider: string; - - // @DataMember - public providerToken: string; - - // @DataMember - public emailToVerify?: string; - - // @DataMember - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'LinkIdentityRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/users/{userId}/map-auth", "POST") - // @Api(Description="Membership") - export class MapAuthToUserRequest extends CodeMashRequestBase implements IReturn - { - public userId: string; - public authId: string; - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MapAuthToUserRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/assign-roles", "PUT") - // @Api(Description="Membership") - // @DataContract - export class AssignRolePermissionsRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the user login to assign roles to, from get_users. */ - // @DataMember - // @ApiMember(Description="Id of the user login to assign roles to, from get_users.", IsRequired=true) - public id: string; - - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - /** @description The complete new list of role names (full replacement), from get_roles. */ - // @DataMember - // @ApiMember(Description="The complete new list of role names (full replacement), from get_roles.") - public roles?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AssignRolePermissionsRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/users/{userId}/roles", "PUT") - // @Api(Description="Membership") - // @DataContract - export class SetContactRolesRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the human user to assign roles to. */ - // @DataMember - // @ApiMember(Description="Id of the human user to assign roles to.", IsRequired=true) - public userId: string; - - /** @description The complete new list of role ids (full replacement), from get_roles. Empty/omitted clears all roles. */ - // @DataMember - // @ApiMember(Description="The complete new list of role ids (full replacement), from get_roles. Empty/omitted clears all roles.") - public roles?: string[]; - - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetContactRolesRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - // @Route("/{version}/membership/users/{contactId}/marketing-state/{commChannel}/{channel}/tags/{tag}", "PUT") - export class SetContactTagSubscriptionRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the user (contact) to update. */ - // @ApiMember(Description="Id of the user (contact) to update.", IsRequired=true) - public contactId: string; - - /** @description Communication channel type: Marketing or Transactional. */ - // @ApiMember(Description="Communication channel type: Marketing or Transactional.", IsRequired=true) - public commChannel: string; - - /** @description Delivery channel: Email, Sms, or Push. */ - // @ApiMember(Description="Delivery channel: Email, Sms, or Push.", IsRequired=true) - public channel: string; - - /** @description The tag name; must already exist for the communication channel. */ - // @ApiMember(Description="The tag name; must already exist for the communication channel.", IsRequired=true) - public tag: string; - - /** @description True to subscribe (unblock) the tag, false to block it. */ - // @ApiMember(Description="True to subscribe (unblock) the tag, false to block it.") - public subscribed: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetContactTagSubscriptionRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/unblock", "PATCH") - // @Api(Description="Membership") - // @DataContract - export class UnblockUserRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the user to unblock, from get_users. */ - // @DataMember - // @ApiMember(Description="Id of the user to unblock, from get_users.", IsRequired=true) - public id: string; - - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UnblockUserRequest'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } - } - - // @Route("/{version}/membership/users/{contactId}/marketing-state/{channel}/unsubscribe", "POST") - export class UnsubscribeContactRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the user (contact) to unsubscribe. */ - // @ApiMember(Description="Id of the user (contact) to unsubscribe.", IsRequired=true) - public contactId: string; - - /** @description Delivery channel to unsubscribe from: Email, Sms, or Push. */ - // @ApiMember(Description="Delivery channel to unsubscribe from: Email, Sms, or Push.", IsRequired=true) - public channel: string; - - /** @description Optional suppression reason name explaining why consent was revoked. */ - // @ApiMember(Description="Optional suppression reason name explaining why consent was revoked.") - public reason?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UnsubscribeContactRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth", "PUT") - // @Api(Description="Membership") - // @DataContract - export class UpdateUserRequest extends SaveUser implements IReturn - { - /** @description Id of the user to update, from get_users. */ - // @DataMember - // @ApiMember(Description="Id of the user to update, from get_users.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateUserRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Membership */ - // @Route("/{version}/membership/auth/{id}/preferences", "PUT") - // @Api(Description="Membership") - // @DataContract - export class UpdateUserPreferencesRequest extends CodeMashRequestBase implements IReturn - { - /** @description Id of the user to update, from get_users. */ - // @DataMember - // @ApiMember(Description="Id of the user to update, from get_users.", IsRequired=true) - public id: string; - - /** @description When true, blocks all marketing messages to this user. */ - // @DataMember - // @ApiMember(Description="When true, blocks all marketing messages to this user.") - public blockAllMarketingMessages: boolean; - - /** @description Per communication channel, the set of tags blocked for this user. Full replacement. */ - // @DataMember - // @ApiMember(Description="Per communication channel, the set of tags blocked for this user. Full replacement.") - public blockedTags?: { [index:string]: HashSet; }; - - /** @description Database integration id. Optional — defaults to the project's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the project's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateUserPreferencesRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Membership · Password */ - // @Route("/{version}/membership/userauth/password/change", "POST") - // @Api(Description="Membership · Password") - // @DataContract - export class ChangePasswordRequest extends CodeMashRequestBase implements IReturn - { - /** @description The member's current password. */ - // @DataMember - // @ApiMember(Description="The member's current password.", IsRequired=true) - public currentPassword: string; - - /** @description The new password. Validated against the project's complexity policy. */ - // @DataMember - // @ApiMember(Description="The new password. Validated against the project's complexity policy.", IsRequired=true) - public newPassword: string; - - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ChangePasswordRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyOkResponse(); } - } - - /** @description Membership · Password */ - // @Route("/{version}/membership/userauth/password/reset/request", "POST") - // @Api(Description="Membership · Password") - // @DataContract - export class RequestPasswordResetRequest extends CodeMashRequestBase implements IReturn - { - /** @description Email address to send the reset link to. */ - // @DataMember - // @ApiMember(Description="Email address to send the reset link to.", IsRequired=true) - public email: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RequestPasswordResetRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyOkResponse(); } - } - - /** @description Membership · Password */ - // @Route("/{version}/membership/userauth/password/reset/confirm", "POST") - // @Api(Description="Membership · Password") - // @DataContract - export class ConfirmPasswordResetRequest extends CodeMashRequestBase implements IReturn - { - /** @description One-time reset token from the email link. */ - // @DataMember - // @ApiMember(Description="One-time reset token from the email link.", IsRequired=true) - public token: string; - - /** @description The new password. Validated against the project's complexity policy. */ - // @DataMember - // @ApiMember(Description="The new password. Validated against the project's complexity policy.", IsRequired=true) - public newPassword: string; - - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @DataMember - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ConfirmPasswordResetRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyOkResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/passkey/authentication-options", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class PasskeyAuthenticationOptionsRequest extends CodeMashRequestBase implements IReturn, IPasskeyCeremonyRequest - { - // @DataMember - public email: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PasskeyAuthenticationOptionsRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyCeremonyOptionsResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/passkey/verify-authentication", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class VerifyPasskeyAuthenticationRequest extends CodeMashRequestBase implements IReturn, IPasskeyCeremonyRequest - { - // @DataMember - public ceremonyId: string; - - // @DataMember - public assertionResponse: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'VerifyPasskeyAuthenticationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyAuthTokensResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/passkeys", "GET") - // @Api(Description="Membership · Passkey") - // @DataContract - export class ListPasskeysRequest extends CodeMashRequestBase implements IReturn - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ListPasskeysRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new PasskeyListResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/passkeys/{CredentialId}/rename", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class RenamePasskeyRequest extends CodeMashRequestBase implements IReturn - { - /** @description Base64 credential id of the passkey to rename, from list_passkeys. */ - // @DataMember - // @ApiMember(Description="Base64 credential id of the passkey to rename, from list_passkeys.", IsRequired=true) - public credentialId: string; - - /** @description The new friendly name for the passkey. */ - // @DataMember - // @ApiMember(Description="The new friendly name for the passkey.", IsRequired=true) - public friendlyName: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RenamePasskeyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyOkResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/passkeys/{CredentialId}/revoke", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class RevokePasskeyRequest extends CodeMashRequestBase implements IReturn - { - /** @description Base64 credential id of the passkey to revoke, from list_passkeys. */ - // @DataMember - // @ApiMember(Description="Base64 credential id of the passkey to revoke, from list_passkeys.", IsRequired=true) - public credentialId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RevokePasskeyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyOkResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/recovery/use-code", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class UseRecoveryCodeRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public email: string; - - // @DataMember - public recoveryCode: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UseRecoveryCodeRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyRecoveryResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/recovery/magic-link/request", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class RequestMagicLinkRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public email: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RequestMagicLinkRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyOkResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/recovery/magic-link/consume", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class ConsumeMagicLinkRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public token: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ConsumeMagicLinkRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyRecoveryResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/has-passkey", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class HasPasskeyRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public email: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'HasPasskeyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyOkResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/email/start-verification", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class StartEmailVerificationRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public email: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'StartEmailVerificationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyOkResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/email/confirm-verification", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class ConfirmEmailVerificationRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public email: string; - - // @DataMember - public code: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ConfirmEmailVerificationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyVerificationTokenResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/passkey/registration-options", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class PasskeyRegistrationOptionsRequest extends CodeMashRequestBase implements IReturn, IPasskeyCeremonyRequest - { - // @DataMember - public verificationToken: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PasskeyRegistrationOptionsRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyCeremonyOptionsResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/passkey/verify-registration", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class VerifyPasskeyRegistrationRequest extends CodeMashRequestBase implements IReturn, IPasskeyCeremonyRequest - { - // @DataMember - public verificationToken: string; - - // @DataMember - public ceremonyId: string; - - // @DataMember - public attestationResponse: string; - - // @DataMember - public friendlyName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'VerifyPasskeyRegistrationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyAuthTokensResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/token/refresh", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class RefreshPasskeyTokenRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public refreshToken?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RefreshPasskeyTokenRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyAuthTokensResponse(); } - } - - /** @description Membership · Passkey */ - // @Route("/{version}/membership/userauth/logout", "POST") - // @Api(Description="Membership · Passkey") - // @DataContract - export class PasskeyLogoutRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public refreshToken?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PasskeyLogoutRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PasskeyOkResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/taxonomies/{taxonomyName}/merged-tree", "GET") - // @Api(Description="Database") - // @DataContract - export class FindMergedTermTreeRequest extends CodeMashRequestBase implements IReturn - { - /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ - // @DataMember - // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - public allLanguages: boolean; - - /** @description The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…). */ - // @DataMember - // @ApiMember(Description="The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…).", IsRequired=true) - public taxonomyName: string; - - // @DataMember - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FindMergedTermTreeRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new FindMergedTermTreeResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/taxonomies/tree", "GET") - // @Api(Description="Database") - // @DataContract - export class FindTaxonomyTreeRequest extends CodeMashRequestBase implements IReturn - { - /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ - // @DataMember - // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - public allLanguages: boolean; - - // @DataMember - public includeTerms: boolean; - - // @DataMember - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FindTaxonomyTreeRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new FindTaxonomyTreeResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/taxonomies/{taxonomyName}/terms", "GET") - // @Api(Description="Database") - // @DataContract - export class FindTermsRequest extends CodeMashListPaginationRequestBase implements IReturn - { - /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ - // @DataMember - // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - public allLanguages: boolean; - - /** @description The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…). */ - // @DataMember - // @ApiMember(Description="The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…).", IsRequired=true) - public taxonomyName: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public filter?: string; - - // @DataMember - public sortDescending: boolean; - - // @DataMember - public pagingArgs?: PagingArgs; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FindTermsRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new FindTermsResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/taxonomies/{taxonomyName}/terms/{parentId}/children", "GET") - // @Api(Description="Database") - // @DataContract - export class FindTermsChildrenRequest extends CodeMashListPaginationRequestBase implements IReturn - { - /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ - // @DataMember - // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - public allLanguages: boolean; - - /** @description The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…). */ - // @DataMember - // @ApiMember(Description="The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…).", IsRequired=true) - public taxonomyName: string; - - // @DataMember - public parentId: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public filter?: string; - - // @DataMember - public pagingArgs?: PagingArgs; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FindTermsChildrenRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new FindTermsChildrenResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/taxonomies/{taxonomyName}/terms/tree", "GET") - // @Api(Description="Database") - // @DataContract - export class FindTermTreeRequest extends CodeMashRequestBase implements IReturn - { - /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ - // @DataMember - // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - public allLanguages: boolean; - - /** @description The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…). */ - // @DataMember - // @ApiMember(Description="The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…).", IsRequired=true) - public taxonomyName: string; - - // @DataMember - public rootTermId?: string; - - // @DataMember - public depth?: number; - - // @DataMember - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FindTermTreeRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new FindTermTreeResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/schemas/{id}", "GET") - // @Api(Description="Database") - // @DataContract - export class GetDatabaseSchemaRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseSchemaRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseSchemaResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/schemas", "GET") - // @Api(Description="Database") - // @DataContract - export class GetDatabaseSchemasRequest extends CodeMashListPaginationRequestBase implements IReturn - { - // @DataMember - public pagingArgs?: PagingArgs; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseSchemasRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseSchemasResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/aggregate", "POST") - // @Api(Description="Database") - // @DataContract - export class AggregateRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public pipeline: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AggregateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AggregateResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/{id}/responsibility", "PUT") - // @Api(Description="Database") - // @DataContract - export class ChangeResponsibilityRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public id: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public newResponsibleUserId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ChangeResponsibilityRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/count", "GET") - // @Api(Description="Database") - // @DataContract - export class CountRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public filter?: string; - - // @DataMember - public schemaVersion?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CountRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new CountResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/many", "DELETE") - // @Api(Description="Database") - // @DataContract - export class DeleteManyRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public filter: string; - - // @DataMember - public allRecords?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteManyRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/{id}", "DELETE") - // @Api(Description="Database") - // @DataContract - export class DeleteOneRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public id: string; - - // @DataMember - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteOneRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/distinct", "GET") - // @Api(Description="Database") - // @DataContract - export class DistinctRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public field: string; - - // @DataMember - public filter?: string; - - // @DataMember - public schemaVersion?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DistinctRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new DistinctResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/aggregates/{aggregateId}/execute", "POST") - // @Api(Description="Database") - // @DataContract - export class ExecuteAggregateRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public aggregateId: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public tokens?: { [index:string]: string; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ExecuteAggregateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new ExecuteAggregateResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}", "GET") - // @Api(Description="Database") - // @DataContract - export class FindRequest extends CodeMashListPaginationRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public filter?: string; - - // @DataMember - public schemaVersion?: number; - - // @DataMember - public pagingArgs?: PagingArgs; - - // @DataMember - public sortBy?: string; - - // @DataMember - public sortOrder?: number; - - // @DataMember - public expandReferences: boolean; - - // @DataMember - public allLanguages: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FindRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new FindResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/{id}", "GET") - // @Api(Description="Database") - // @DataContract - export class FindOneRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public id: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public expandReferences: boolean; - - // @DataMember - public allLanguages: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FindOneRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new FindOneResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/own", "GET") - // @Api(Description="Database") - // @DataContract - export class FindOwnRequest extends CodeMashListPaginationRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public filter?: string; - - // @DataMember - public schemaVersion?: number; - - // @DataMember - public pagingArgs?: PagingArgs; - - /** @description Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids. */ - // @DataMember - // @ApiMember(Description="Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids.") - public expandReferences: boolean; - - // @DataMember - public allLanguages: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FindOwnRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new FindResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/many", "POST") - // @Api(Description="Database") - // @DataContract - export class InsertManyRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public documents: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'InsertManyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}", "POST") - // @Api(Description="Database") - // @DataContract - export class InsertOneRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public document: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'InsertOneRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/{id}/replace", "PUT") - // @Api(Description="Database") - // @DataContract - export class ReplaceOneRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public id: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public replacement: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ReplaceOneRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/many", "PUT") - // @Api(Description="Database") - // @DataContract - export class UpdateManyRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public filter: string; - - // @DataMember - public allRecords?: boolean; - - // @DataMember - public update: string; - - // @DataMember - public arrayFilters?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateManyRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Database */ - // @Route("/{version}/database/collections/{collectionName}/{id}", "PUT") - // @Api(Description="Database") - // @DataContract - export class UpdateOneRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public collectionName: string; - - // @DataMember - public id: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public update: string; - - // @DataMember - public arrayFilters?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateOneRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/commit", "POST") - // @Api(Description="Files") - // @DataContract - export class CommitUploadRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public path: string; - - // @DataMember - public contentType?: string; - - // @DataMember - public sizeBytes?: number; - - // @DataMember - public fileName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CommitUploadRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/content", "GET") - // @Api(Description="Files") - // @DataContract - export class GetFileContentRequest extends RequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public path: string; - - // @DataMember - public token?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetFileContentRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new Blob(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/content", "PUT") - // @Api(Description="Files") - // @DataContract - export class PutFileContentRequest extends RequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public path: string; - - // @DataMember - public token?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PutFileContentRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}", "DELETE") - // @Api(Description="Files") - // @DataContract - export class DeleteFileApiRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public path: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteFileApiRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/bulk", "DELETE") - // @Api(Description="Files") - // @DataContract - export class DeleteManyFilesApiRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember(Name="paths[]") - public paths__: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteManyFilesApiRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/download", "GET") - // @Api(Description="Files") - // @DataContract - export class DownloadFileApiRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public path: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DownloadFileApiRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new Blob(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/by-id/{id}", "GET") - // @Api(Description="Files") - // @DataContract - export class GetFileByIdRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetFileByIdRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetFileByIdResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/info", "GET") - // @Api(Description="Files") - // @DataContract - export class GetFileInfoRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public path: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetFileInfoRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetFileInfoResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/sign", "GET") - // @Api(Description="Files") - // @DataContract - export class GetSignedUrlRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public path: string; - - // @DataMember - public expirationSeconds?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSignedUrlRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSignedUrlResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}", "GET") - // @Api(Description="Files") - // @DataContract - export class ListFilesRequest extends CodeMashListPaginationRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public path?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ListFilesRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new ListFilesResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/public/{PublicId}/{Name*}", "GET") - // @Api(Description="Files") - // @DataContract - export class GetPublicFileRequest extends RequestBase implements IReturn - { - // @DataMember - public publicId?: string; - - // @DataMember - public name?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPublicFileRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new Blob(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/upload-url", "POST") - // @Api(Description="Files") - // @DataContract - export class RequestUploadUrlRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public path: string; - - // @DataMember - public contentType: string; - - // @DataMember - public expirationSeconds?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RequestUploadUrlRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RequestUploadUrlResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/test", "POST") - // @Api(Description="Files") - // @DataContract - export class TestFilesIntegrationRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestFilesIntegrationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestFilesIntegrationResponse(); } - } - - /** @description Files */ - // @Route("/{version}/files/{filesIntegrationId}/use", "POST") - // @Api(Description="Files") - // @DataContract - export class UseFileRequest extends CodeMashRequestBase implements IReturn - { - // @DataMember - public filesIntegrationId: string; - - // @DataMember - public path: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UseFileRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Registers or refreshes a push device for the signed-in user. */ - // @Route("/{version}/notifications/push/devices", "POST") - // @Api(Description="Registers or refreshes a push device for the signed-in user.") - export class RegisterOwnPushDeviceRequest extends CodeMashRequestBase implements IReturn - { - /** @description Who issued the token: fcm (Android / Firebase) or apns (iOS). The NATIVE device token — in an Expo app use getDevicePushTokenAsync(). Expo push tokens (provider 'expo') are refused. */ - // @ApiMember(Description="Who issued the token: fcm (Android / Firebase) or apns (iOS). The NATIVE device token — in an Expo app use getDevicePushTokenAsync(). Expo push tokens (provider 'expo') are refused.", IsRequired=true) - public provider: string; - - /** @description The push token, exactly as the provider gave it. */ - // @ApiMember(Description="The push token, exactly as the provider gave it.", IsRequired=true) - public token: string; - - /** @description The app's platform: ios, android or web. */ - // @ApiMember(Description="The app's platform: ios, android or web.") - public platform?: string; - - /** @description Operating system name, e.g. iOS. */ - // @ApiMember(Description="Operating system name, e.g. iOS.") - public osName?: string; - - /** @description Operating system version, e.g. 18.1. */ - // @ApiMember(Description="Operating system version, e.g. 18.1.") - public osVersion?: string; - - /** @description The app version, e.g. 2.4.1. */ - // @ApiMember(Description="The app version, e.g. 2.4.1.") - public appVersion?: string; - - /** @description The device name the user sees, e.g. Anna's iPhone. */ - // @ApiMember(Description="The device name the user sees, e.g. Anna's iPhone.") - public deviceName?: string; - - /** @description The device model, e.g. iPhone 15. */ - // @ApiMember(Description="The device model, e.g. iPhone 15.") - public modelName?: string; - - public brand?: string; - public manufacturer?: string; - /** @description A stable id the app keeps for this installation (not the token). */ - // @ApiMember(Description="A stable id the app keeps for this installation (not the token).") - public installationId?: string; - - /** @description The device locale, e.g. lt-LT. */ - // @ApiMember(Description="The device locale, e.g. lt-LT.") - public locale?: string; - - /** @description The device time zone (IANA), e.g. Europe/Vilnius. */ - // @ApiMember(Description="The device time zone (IANA), e.g. Europe/Vilnius.") - public timeZone?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RegisterOwnPushDeviceRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Lists the signed-in user's own push devices. */ - // @Route("/{version}/notifications/push/devices", "GET") - // @Api(Description="Lists the signed-in user's own push devices.") - export class GetOwnPushDevicesRequest extends CodeMashRequestBase implements IReturn - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetOwnPushDevicesRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetOwnPushDevicesResponse(); } - } - - /** @description Removes one of the signed-in user's own push devices by id. */ - // @Route("/{version}/notifications/push/devices/{Id}", "DELETE") - // @Api(Description="Removes one of the signed-in user's own push devices by id.") - export class DeleteOwnPushDeviceRequest extends CodeMashRequestBase implements IReturn - { - /** @description The device id (pnd_…) from the devices list or the register answer. */ - // @ApiMember(Description="The device id (pnd_…) from the devices list or the register answer.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteOwnPushDeviceRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Removes the signed-in user's push device registered with a token (sign-out). */ - // @Route("/{version}/notifications/push/devices", "DELETE") - // @Api(Description="Removes the signed-in user's push device registered with a token (sign-out).") - export class DeleteOwnPushDeviceByTokenRequest extends CodeMashRequestBase implements IReturn - { - /** @description The push token the device was registered with. */ - // @ApiMember(Description="The push token the device was registered with.", IsRequired=true) - public token: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteOwnPushDeviceByTokenRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Lists the push messages sent to the signed-in user. */ - // @Route("/{version}/notifications/push/messages", "GET") - // @Api(Description="Lists the push messages sent to the signed-in user.") - export class GetOwnPushMessagesRequest extends CodeMashListPaginationRequestBase implements IReturn - { - /** @description Only messages the caller has not marked read. */ - // @ApiMember(Description="Only messages the caller has not marked read.") - public unreadOnly: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetOwnPushMessagesRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetOwnPushMessagesResponse(); } - } - - /** @description Marks one push message sent to the signed-in user read. */ - // @Route("/{version}/notifications/push/messages/{Id}/read", "POST") - // @Api(Description="Marks one push message sent to the signed-in user read.") - export class MarkOwnPushMessageReadRequest extends CodeMashRequestBase implements IReturn - { - /** @description The message id (ntf_…) from the messages list. */ - // @ApiMember(Description="The message id (ntf_…) from the messages list.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MarkOwnPushMessageReadRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Marks every push message sent to the signed-in user read. */ - // @Route("/{version}/notifications/push/messages/read", "POST") - // @Api(Description="Marks every push message sent to the signed-in user read.") - export class MarkAllOwnPushMessagesReadRequest extends CodeMashRequestBase implements IReturn - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MarkAllOwnPushMessagesReadRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } - } - - /** @description Stores a payment order with a fixed price for one of the project's users. Server only (service user API key). */ - // @Route("/{version}/payments/orders", "POST") - // @Api(Description="Stores a payment order with a fixed price for one of the project's users. Server only (service user API key).") - export class CreatePaymentOrderRequest extends CodeMashRequestBase implements IReturn - { - /** @description The user the order is for (usr_…). */ - // @ApiMember(Description="The user the order is for (usr_…).", IsRequired=true) - public buyerUserId: string; - - /** @description The project's own order reference, unique per project and environment (1–64 of A–Z a–z 0–9 . _ : -). */ - // @ApiMember(Description="The project's own order reference, unique per project and environment (1–64 of A–Z a–z 0–9 . _ : -).", IsRequired=true) - public merchantReference: string; - - /** @description 8–128 characters. Same key + same body = the stored order; same key + other body = 409. May be sent as the Idempotency-Key header instead. */ - // @ApiMember(Description="8–128 characters. Same key + same body = the stored order; same key + other body = 409. May be sent as the Idempotency-Key header instead.") - public idempotencyKey?: string; - - /** @description EUR. */ - // @ApiMember(Description="EUR.", IsRequired=true) - public currency: string; - - /** @description The version of the price list the server priced the lines with. */ - // @ApiMember(Description="The version of the price list the server priced the lines with.", IsRequired=true) - public priceVersion: string; - - /** @description 1–50 lines: sku, title, quantity, unitAmountMinor (cents). Norbix computes the amounts and the total. */ - // @ApiMember(Description="1–50 lines: sku, title, quantity, unitAmountMinor (cents). Norbix computes the amounts and the total.", IsRequired=true) - public lines: PaymentOrderLineInput[] = []; - - /** @description Up to 20 project values (e.g. adId). No personal or billing data. */ - // @ApiMember(Description="Up to 20 project values (e.g. adId). No personal or billing data.") - public metadata?: { [index:string]: string; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreatePaymentOrderRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } - } - - /** @description Reads one payment order. A buyer reads only their own orders. */ - // @Route("/{version}/payments/orders/{Id}", "GET") - // @Api(Description="Reads one payment order. A buyer reads only their own orders.") - export class GetPaymentOrderRequest extends CodeMashRequestBase implements IReturn - { - /** @description The order id (ord_…). */ - // @ApiMember(Description="The order id (ord_…).", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPaymentOrderRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPaymentOrderResponse(); } - } - - /** @description Lists payment orders, newest first. A buyer gets only their own orders. */ - // @Route("/{version}/payments/orders", "GET") - // @Api(Description="Lists payment orders, newest first. A buyer gets only their own orders.") - export class GetPaymentOrdersRequest extends CodeMashListPaginationRequestBase implements IReturn - { - /** @description Server only: one buyer's orders (usr_…). A buyer always gets their own. */ - // @ApiMember(Description="Server only: one buyer's orders (usr_…). A buyer always gets their own.") - public buyerUserId?: string; - - /** @description Only the order with this merchant reference. */ - // @ApiMember(Description="Only the order with this merchant reference.") - public merchantReference?: string; - - /** @description Only orders in this status (Created, CheckoutStarted, Paid, …). */ - // @ApiMember(Description="Only orders in this status (Created, CheckoutStarted, Paid, …).") - public status?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPaymentOrdersRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPaymentOrdersResponse(); } - } - - /** @description Opens a Montonio checkout for a stored order and answers where the buyer pays. The buyer (own order) or the server. */ - // @Route("/{version}/payments/orders/{Id}/checkout", "POST") - // @Api(Description="Opens a Montonio checkout for a stored order and answers where the buyer pays. The buyer (own order) or the server.") - export class StartPaymentCheckoutRequest extends CodeMashRequestBase implements IReturn - { - /** @description The order id (ord_…). */ - // @ApiMember(Description="The order id (ord_…).", IsRequired=true) - public id: string; - - /** @description The Montonio integration (int_…) of the project in the request's environment. */ - // @ApiMember(Description="The Montonio integration (int_…) of the project in the request's environment.", IsRequired=true) - public integrationId: string; - - /** @description bankLink (default), card, applePay or googlePay. */ - // @ApiMember(Description="bankLink (default), card, applePay or googlePay.") - public method?: string; - - /** @description Where the buyer comes back after paying; its origin must be one of the project's allowed origins. */ - // @ApiMember(Description="Where the buyer comes back after paying; its origin must be one of the project's allowed origins.", IsRequired=true) - public returnUrl: string; - - /** @description Bank links only: the country whose banks are shown first (default LT). */ - // @ApiMember(Description="Bank links only: the country whose banks are shown first (default LT).") - public preferredCountry?: string; - - /** @description Bank links only: one bank to open directly (the provider's bank code). */ - // @ApiMember(Description="Bank links only: one bank to open directly (the provider's bank code).") - public preferredProvider?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'StartPaymentCheckoutRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new StartPaymentCheckoutResponse(); } - } - - // @Route("/{version}/notifications/inbox", "GET") - export class GetNotificationInboxRequest extends CodeMashListPaginationRequestBase implements IReturn - { - public unreadOnly: boolean; - public channel?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetNotificationInboxRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetNotificationInboxResponse(); } - } - - // @Route("/{version}/notifications/inbox/unread-count", "GET") - export class GetUnreadCountRequest extends CodeMashRequestBase implements IReturn - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetUnreadCountRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetUnreadCountResponse(); } - } - - // @Route("/{version}/notifications/inbox/{notificationId}/read", "POST") - export class MarkNotificationReadRequest extends CodeMashRequestBase implements IReturn - { - public notificationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MarkNotificationReadRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new MarkNotificationReadResponse(); } - } - - // @Route("/{version}/notifications/inbox/read-all", "POST") - export class MarkAllNotificationsReadRequest extends CodeMashRequestBase implements IReturn - { - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MarkAllNotificationsReadRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new MarkAllNotificationsReadResponse(); } - } - - /** @description Sign In */ - // @Route("/auth", "GET,POST") - // @Route("/auth/{provider}", "GET,POST") - // @Route("/v3/auth", "POST,GET,OPTIONS") - // @Route("/v3/auth/{provider}", "POST,GET,OPTIONS") - // @Api(Description="Sign In") - // @DataContract - export class Authenticate implements IReturn, IPost - { - /** @description AuthProvider, e.g. credentials */ - // @DataMember(Order=1) - public provider?: string; - - // @DataMember(Order=2) - public userName?: string; - - // @DataMember(Order=3) - public password?: string; - - // @DataMember(Order=4) - public rememberMe?: boolean; - - // @DataMember(Order=5) - public accessToken?: string; - - // @DataMember(Order=6) - public accessTokenSecret?: string; - - // @DataMember(Order=7) - public returnUrl?: string; - - // @DataMember(Order=8) - public errorView?: string; - - // @DataMember(Order=9) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'Authenticate'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AuthenticateResponse(); } - } - - // @Route("/access-token") - // @DataContract - export class GetAccessToken implements IReturn, IPost - { - // @DataMember(Order=1) - public refreshToken?: string; - - // @DataMember(Order=2) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccessToken'; } - public getMethod() { return 'POST'; } - public createResponse() { return new GetAccessTokenResponse(); } - } - -} - diff --git a/references/api_dtos.py b/references/api_dtos.py deleted file mode 100644 index 7693132..0000000 --- a/references/api_dtos.py +++ /dev/null @@ -1,3535 +0,0 @@ -""" Options: -Date: 2026-10-19 11:26:14 -Version: 10.20 -Tip: To override a DTO option, remove "#" prefix before updating -BaseUrl: http://localhost:5002 - -#GlobalNamespace: -#AddServiceStackTypes: True -#AddResponseStatus: False -#AddImplicitVersion: -#AddDescriptionAsComments: True -#IncludeTypes: -#ExcludeTypes: -#DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum -#DataClass: -#DataClassJson: -""" - -import datetime -import decimal -from marshmallow.fields import * -from servicestack import * -from typing import * -from dataclasses import dataclass, field -from dataclasses_json import dataclass_json, LetterCase, Undefined, config -from enum import Enum, IntEnum -Object = TypeVar('Object') - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class JsonSchemaFieldDto: - field_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StringFieldDto(JsonSchemaFieldDto): - format: Optional[str] = None - pattern: Optional[str] = None - min_length: Optional[int] = None - max_length: Optional[int] = None - translate_options: Optional[IReadOnlyDictionary[str, str]] = None - default: Optional[str] = None - unique: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DecimalFieldDto(JsonSchemaFieldDto): - minimum: Optional[Decimal] = None - maximum: Optional[Decimal] = None - multiple_of: Optional[Decimal] = None - default: Optional[Decimal] = None - unique: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CurrencyDefaultDto: - value: Decimal = decimal.Decimal(0) - currency: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CurrencyFieldDto(JsonSchemaFieldDto): - allowed_currencies: Optional[IReadOnlyList[str]] = None - multiple_of: Optional[Decimal] = None - minimum: Optional[Decimal] = None - maximum: Optional[Decimal] = None - default: Optional[CurrencyDefaultDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class BooleanFieldDto(JsonSchemaFieldDto): - default: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DateFieldDto(JsonSchemaFieldDto): - minimum: Optional[int] = None - maximum: Optional[int] = None - default: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class IntegerFieldDto(JsonSchemaFieldDto): - minimum: Optional[int] = None - maximum: Optional[int] = None - default: Optional[int] = None - unique: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GeolocationFieldDto(JsonSchemaFieldDto): - allowed_types: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TagsFieldDto(JsonSchemaFieldDto): - min_items: Optional[int] = None - max_items: Optional[int] = None - default: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FileFieldDto(JsonSchemaFieldDto): - storages: Optional[IReadOnlyList[str]] = None - min_items: Optional[int] = None - max_items: Optional[int] = None - allowed_file_type: Optional[str] = None - max_size_mb: Optional[Decimal] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TaxonomySelectionFieldDto(JsonSchemaFieldDto): - taxonomy_id: Optional[str] = None - multiple: bool = False - display_field: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CollectionSelectionFieldDto(JsonSchemaFieldDto): - collection_id: Optional[str] = None - display_field: Optional[str] = None - multiple: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserSelectionFieldDto(JsonSchemaFieldDto): - multiple: bool = False - display_field: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RoleSelectionFieldDto(JsonSchemaFieldDto): - multiple: bool = False - display_field: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnumSelectionFieldDto(JsonSchemaFieldDto): - values: Optional[IReadOnlyList[str]] = None - multiple: bool = False - default: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ObjectFieldDto(JsonSchemaFieldDto): - properties: Optional[IReadOnlyList[JsonSchemaFieldDto]] = None - required: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ArrayFieldDto(JsonSchemaFieldDto): - items: Optional[JsonSchemaFieldDto] = None - min_items: Optional[int] = None - max_items: Optional[int] = None - unique_items: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class JsonFieldDto(JsonSchemaFieldDto): - max_bytes: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RequestBase(IVersionBasedRequest, IHasCorrelationIdRequest): - # @ApiMember(DataType="string", Description="TimeZone", Name="TimeZoneId", ParameterType="header") - time_zone_id: Optional[str] = None - """ - TimeZone - """ - - - # @ApiMember(DataType="string", Description="The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v3", IsRequired=true, Name="version", ParameterType="path") - version: Optional[str] = None - """ - The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v3 - """ - - - # @ApiMember(DataType="string", Description="CorrelationId for each request", Name="CorrelationId", ParameterType="header") - correlation_id: Optional[str] = None - """ - CorrelationId for each request - """ - - -class IVersionBasedRequest: - version: Optional[str] = None - - -class IHasCorrelationIdRequest: - correlation_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeMashRequestBase(RequestBase, IHasProjectId, IHasEnv): - # @ApiMember(DataType="string", Description="ID of your project. Can be passed in a header as norbix-project-id.", IsRequired=true, Name="norbix-project-id", ParameterType="header") - project_id: Optional[str] = None - """ - ID of your project. Can be passed in a header as norbix-project-id. - """ - - - # @ApiMember(DataType="string", Description="Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env.", Name="norbix-env", ParameterType="header") - env: Optional[str] = None - """ - Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env. - """ - - -class IHasProjectId: - project_id: Optional[str] = None - - -class IHasEnv: - env: Optional[str] = None - - -class Gender(str, Enum): - MALE = 'Male' - FEMALE = 'Female' - OTHER = 'Other' - - -class MarketingBlockReason(str, Enum): - UNSPECIFIED = 'Unspecified' - UNSUBSCRIBED = 'Unsubscribed' - COMPLAINT = 'Complaint' - HARD_BOUNCE = 'HardBounce' - INVALID_EMAIL = 'InvalidEmail' - ADMIN_BLOCK = 'AdminBlock' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserGeneralInfoDto: - phone: Optional[str] = None - primary_email: Optional[str] = None - display_name: Optional[str] = None - first_name: Optional[str] = None - last_name: Optional[str] = None - full_name: Optional[str] = None - address_line1: Optional[str] = None - address_line2: Optional[str] = None - country: Optional[str] = None - city: Optional[str] = None - state: Optional[str] = None - postal_code: Optional[str] = None - company: Optional[str] = None - gender: Optional[Gender] = None - birth_date: Optional[int] = None - time_zone: Optional[str] = None - language: Optional[str] = None - block_all_marketing_messages: bool = False - blocked_tags: Optional[Dict[str, HashSet[str]]] = None - block_reasons: Optional[List[MarketingBlockReason]] = None - extra_metadata: Optional[str] = None - notes: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveUser(CodeMashRequestBase, IReturn[IdResponse]): - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - - # @ApiMember(DataType="object", Description="User Info", Name="UserGeneralInfo", ParameterType="body") - user_general_info: Optional[UserGeneralInfoDto] = None - """ - User Info - """ - - - # @ApiMember(Description="Attach this login to an existing user id. Optional.") - user_id: Optional[str] = None - """ - Attach this login to an existing user id. Optional. - """ - - - # @ApiMember(DataType="boolean", Description="Ignore UserRegistersAsRole from Membership Settings", Name="IgnoreUserRegistersAsRole", ParameterType="body") - ignore_user_registers_as_role: bool = False - """ - Ignore UserRegistersAsRole from Membership Settings - """ - @staticmethod - def response_type(): return IdResponse - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveUserWithRolesBase(SaveUser): - roles: List[str] = field(default_factory=list) - - -class IPublicRegistrationRequest: - roles: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeMashListPaginationRequestBase(RequestBase, IHasProjectId, IHasEnv): - # @ApiMember(DataType="string", Description="ID of your project. Can be passed in a header as norbix-project-id.", IsRequired=true, Name="norbix-project-id", ParameterType="header") - project_id: Optional[str] = None - """ - ID of your project. Can be passed in a header as norbix-project-id. - """ - - - # @ApiMember(DataType="string", Description="Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env.", Name="norbix-env", ParameterType="header") - env: Optional[str] = None - """ - Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env. - """ - - - # @ApiMember(DataType="string", Description="Cursor token — fetch the page AFTER this item.", Name="startingAfter", ParameterType="query") - starting_after: Optional[str] = None - """ - Cursor token — fetch the page AFTER this item. - """ - - - # @ApiMember(DataType="string", Description="Cursor token — fetch the page BEFORE this item.", Name="endingBefore", ParameterType="query") - ending_before: Optional[str] = None - """ - Cursor token — fetch the page BEFORE this item. - """ - - - # @ApiMember(DataType="integer", Description="Amount of records to return.", Format="int32", Name="pageSize", ParameterType="query") - page_size: Optional[int] = None - """ - Amount of records to return. - """ - - -class IPasskeyCeremonyRequest: - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CursorArgs(ICursorArgs): - field: Optional[str] = None - order: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PagingArgs: - cursor_args: Optional[CursorArgs] = None - page_size: Optional[int] = None - starting_after: Optional[str] = None - ending_before: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentOrderLineInput: - sku: Optional[str] = None - title: Optional[str] = None - quantity: int = 0 - unit_amount_minor: int = 0 - - -class CodeMashRelease(str, Enum): - NOT_SET = 'NotSet' - COMMUNITY = 'Community' - MANAGED_SERVICE = 'ManagedService' - ENTERPRISE = 'Enterprise' - - -class CodeMashRuntime(str, Enum): - DEVELOPMENT = 'Development' - CI = 'CI' - STAGING = 'Staging' - PRODUCTION = 'Production' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoRegionDto: - code: Optional[str] = None - display_name: Optional[str] = None - api_url: Optional[str] = None - hub_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoAgentSnippetDto: - client: Optional[str] = None - kind: Optional[str] = None - recommended: bool = False - auth: Optional[str] = None - config: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoAgentDto: - mcp_url: Optional[str] = None - o_auth_metadata_url: Optional[str] = None - installation_type: Optional[str] = None - onboarding_docs_url: Optional[str] = None - tools_url: Optional[str] = None - cli_package: Optional[str] = None - cli_install_command: Optional[str] = None - device_authorization_url: Optional[str] = None - device_token_url: Optional[str] = None - snippets: List[EchoAgentSnippetDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoHostingPlatformDto: - provider: Optional[str] = None - is_aws: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicBrandDto: - display_name: Optional[str] = None - main_color: Optional[str] = None - accent_color: Optional[str] = None - logo_url: Optional[str] = None - icon_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicPasswordPolicyDto: - min_length: int = 0 - max_length: Optional[int] = None - min_numbers: Optional[int] = None - min_upper: Optional[int] = None - min_lower: Optional[int] = None - min_special: Optional[int] = None - allowed_special: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicAuthDto: - social_providers: List[str] = field(default_factory=list) - passkey: bool = False - methods: Optional[List[str]] = None - password_policy: Optional[PublicPasswordPolicyDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicAiAssistantDto: - id: Optional[str] = None - name: Optional[str] = None - welcome: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicAiChatDto: - enabled: bool = False - assistants: List[PublicAiAssistantDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ErrorDto: - message: Optional[str] = None - error_code: Optional[str] = None - context: Optional[Dict[str, str]] = None - stack_trace: Optional[List[ErrorDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeMashResponseStatus: - is_success: bool = False - errors: Optional[List[ErrorDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ResponseBase: - response_status: Optional[CodeMashResponseStatus] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EndUserChatAttachment: - id: Optional[str] = None - session_id: Optional[str] = None - file_name: Optional[str] = None - content_type: Optional[str] = None - kind: Optional[str] = None - size: int = 0 - summary: Optional[str] = None - created_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EndUserChatMemoryNote: - id: Optional[str] = None - session_id: Optional[str] = None - kind: Optional[str] = None - text: Optional[str] = None - created_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EndUserChatAssistant: - id: Optional[str] = None - name: Optional[str] = None - welcome_message: Optional[str] = None - is_default: bool = False - memory_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EndUserChatPlan: - id: Optional[str] = None - name: Optional[str] = None - quota_unit: Optional[str] = None - monthly_quota: int = 0 - used: int = 0 - remaining: int = 0 - attachments: bool = False - rag: bool = False - memory: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EndUserChatSession: - id: Optional[str] = None - assistant_id: Optional[str] = None - title: Optional[str] = None - is_pinned: bool = False - is_archived: bool = False - last_seq: int = 0 - created_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - updated_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatEntryWireDto: - kind: Optional[str] = None - id: Optional[str] = None - seq: int = 0 - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - ref_entry_id: Optional[str] = None - work_item_id: Optional[str] = None - feedback: Optional[str] = None - feedback_at_utc: Optional[datetime.datetime] = None - feedback_by_user_auth_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EndUserAiToolParameter: - name: Optional[str] = None - type: Optional[str] = None - required: bool = False - description: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EndUserAiTool: - name: Optional[str] = None - description: Optional[str] = None - toolsets: List[str] = field(default_factory=list) - requires_confirmation: bool = False - parameters: List[EndUserAiToolParameter] = field(default_factory=list) - - -class AuthType(str, Enum): - SERVICE = 'Service' - EMAIL = 'Email' - USER_NAME = 'UserName' - PHONE = 'Phone' - GUEST = 'Guest' - SOCIAL = 'Social' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccessInformationDto: - ip: Optional[str] = None - date: Optional[datetime.datetime] = None - time_zone: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RegistrationDto: - registration_information: Optional[AccessInformationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LoginDto: - need_change_password_on_next_login: bool = False - last_access_information: Optional[AccessInformationDto] = None - - -class AuthStatus(IntEnum): - REGISTERED = 0 - PENDING_VALIDATION = 2 - INVITED = 4 - ACTIVE = 8 - UNREGISTERED = 16 - SUSPENDED = 32 - IN_ACTIVE = 64 - BLOCKED = 128 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthDto(IBindableContract): - id: Optional[str] = None - type: Optional[AuthType] = None - email: Optional[str] = None - user_name: Optional[str] = None - registration: Optional[RegistrationDto] = None - login: Optional[LoginDto] = None - general_info: Optional[UserGeneralInfoDto] = None - roles: Optional[List[str]] = None - push_devices: Optional[List[str]] = None - tags: Optional[List[str]] = None - status: Optional[AuthStatus] = None - created_on: datetime.datetime = datetime.datetime(1, 1, 1) - modified_on: datetime.datetime = datetime.datetime(1, 1, 1) - - -TViewModelProjection = TypeVar('TViewModelProjection') - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaginatedResponse(Generic[TViewModelProjection]): - items: Optional[IList[TViewModelProjection]] = None - has_more: bool = False - has_previous: bool = False - starting_after: Optional[str] = None - ending_before: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserMarketingPreferencesDto: - block_all_marketing_messages: bool = False - blocked_tags: Optional[Dict[str, HashSet[str]]] = None - block_reasons: Optional[List[MarketingBlockReason]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeyListItemDto: - credential_id: Optional[str] = None - friendly_name: Optional[str] = None - registered_on_utc: datetime.datetime = datetime.datetime(1, 1, 1) - last_used_on_utc: datetime.datetime = datetime.datetime(1, 1, 1) - is_revoked: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TermMultiParentDto: - taxonomy_id: Optional[str] = None - parent_id: Optional[str] = None - name: Optional[str] = None - names: Optional[Dict[str, str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TermTreeDto: - id: Optional[str] = None - taxonomy_id: Optional[str] = None - taxonomy_name: Optional[str] = None - parent_id: Optional[str] = None - order: Optional[int] = None - name: Optional[str] = None - names: Optional[Dict[str, str]] = None - slug: Optional[str] = None - description: Optional[str] = None - descriptions: Optional[Dict[str, str]] = None - multi_parents: Optional[List[TermMultiParentDto]] = None - meta: Optional[Object] = None - children: Optional[List[TermTreeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TaxonomyTreeDto: - view_id: Optional[str] = None - taxonomy_name: Optional[str] = None - taxonomy_slug: Optional[str] = None - parent_id: Optional[str] = None - children: Optional[List[TaxonomyTreeDto]] = None - terms: Optional[List[TermTreeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TermDto: - id: Optional[str] = None - taxonomy_id: Optional[str] = None - taxonomy_name: Optional[str] = None - parent_id: Optional[str] = None - order: Optional[int] = None - name: Optional[str] = None - names: Optional[Dict[str, str]] = None - slug: Optional[str] = None - description: Optional[str] = None - descriptions: Optional[Dict[str, str]] = None - multi_parents: Optional[List[TermMultiParentDto]] = None - meta: Optional[Object] = None - origin: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DataSchemaDto: - json: Optional[str] = None - fields: List[JsonSchemaFieldDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class VisualSchemaDto: - json: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaUniqueIndexDto: - fields: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaSettingsDto: - soft_delete: bool = False - has_record_owner: bool = False - description: Optional[str] = None - unique_indexes: Optional[List[SchemaUniqueIndexDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaEmbedSettingsDto: - enabled: bool = False - fields: List[str] = field(default_factory=list) - embedding_integration_id: Optional[str] = None - per_user: bool = False - - -class TriggerType(str, Enum): - MEMBERSHIP = 'Membership' - SCHEMA = 'Schema' - FILES = 'Files' - PAYMENTS = 'Payments' - AI = 'Ai' - - -class TriggerActionType(str, Enum): - CODE = 'Code' - PUSH = 'Push' - SMS = 'Sms' - EMAIL = 'Email' - WEBHOOK_CALL = 'WebhookCall' - SSE_CALL = 'SseCall' - MARKETPLACE = 'Marketplace' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerActionDto: - type: Optional[TriggerActionType] = None - integration_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerDto(IHasViewId, IQueuedTrigger): - type: Optional[TriggerType] = None - view_id: Optional[str] = None - name: Optional[str] = None - then_action: Optional[TriggerActionDto] = None - description: Optional[str] = None - is_enabled: bool = False - activation_code: Optional[str] = None - order: Optional[int] = None - break_on_error: bool = False - saved_by_auth_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaDto(IHasViewId): - view_id: Optional[str] = None - schema_name: Optional[str] = None - schema_slug: Optional[str] = None - version: int = 0 - meta_schema_version: int = 0 - data_schema: Optional[DataSchemaDto] = None - visual_schema: Optional[VisualSchemaDto] = None - published_at: datetime.datetime = datetime.datetime(1, 1, 1) - settings: Optional[SchemaSettingsDto] = None - embed: Optional[SchemaEmbedSettingsDto] = None - triggers: Optional[List[TriggerDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaListProjection(IHasViewId): - view_id: Optional[str] = None - schema_name: Optional[str] = None - schema_title: Optional[str] = None - latest_version: Optional[int] = None - has_draft: bool = False - meta_schema_version: int = 0 - description: Optional[str] = None - env: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FileChecksumDto: - algorithm: Optional[str] = None - hash: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FileResourceDto: - id: Optional[str] = None - original_file_name: Optional[str] = None - extension: Optional[str] = None - stored_file_name: Optional[str] = None - size_bytes: Optional[int] = None - checksum: Optional[FileChecksumDto] = None - - -class FileProvider(str, Enum): - LOCAL = 'Local' - AWS_S3 = 'AwsS3' - AZURE_BLOB_STORAGE = 'AzureBlobStorage' - GOOGLE_CLOUD_STORAGE = 'GoogleCloudStorage' - FTP = 'Ftp' - APPLE_I_CLOUD = 'AppleICloud' - DROP_BOX = 'DropBox' - GOOGLE_DRIVE = 'GoogleDrive' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FileResourceRefDto: - resource: Optional[FileResourceDto] = None - integration_id: Optional[str] = None - provider: Optional[FileProvider] = None - path: Optional[str] = None - public_url: Optional[str] = None - is_public: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicFolderDto: - path: Optional[str] = None - public_id: Optional[str] = None - public_url: Optional[str] = None - inherited: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class IntegrationTestResultItemDto: - operation: Optional[str] = None - result: Optional[str] = None - errors: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OwnPushDeviceDto: - id: Optional[str] = None - provider: Optional[str] = None - token: Optional[str] = None - platform: Optional[str] = None - os_name: Optional[str] = None - os_version: Optional[str] = None - app_version: Optional[str] = None - device_name: Optional[str] = None - model_name: Optional[str] = None - brand: Optional[str] = None - installation_id: Optional[str] = None - locale: Optional[str] = None - time_zone: Optional[str] = None - updated_at_utc: Optional[datetime.datetime] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OwnPushMessageDto: - id: Optional[str] = None - campaign_id: Optional[str] = None - title: Optional[str] = None - body: Optional[str] = None - sent_at_utc: Optional[datetime.datetime] = None - is_read: bool = False - read_at_utc: Optional[datetime.datetime] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentOrderLineDto: - sku: Optional[str] = None - title: Optional[str] = None - quantity: int = 0 - unit_amount_minor: int = 0 - amount_minor: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentOrderCheckoutDto: - attempt: int = 0 - integration_id: Optional[str] = None - provider: Optional[str] = None - provider_order_id: Optional[str] = None - provider_reference: Optional[str] = None - payment_url: Optional[str] = None - method: Optional[str] = None - started_on_utc: datetime.datetime = datetime.datetime(1, 1, 1) - expires_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentOrderDto: - id: Optional[str] = None - env: Optional[str] = None - buyer_user_id: Optional[str] = None - merchant_reference: Optional[str] = None - currency: Optional[str] = None - price_version: Optional[str] = None - lines: List[PaymentOrderLineDto] = field(default_factory=list) - total_minor: int = 0 - metadata: Dict[str, str] = field(default_factory=dict) - status: Optional[str] = None - created_on_utc: datetime.datetime = datetime.datetime(1, 1, 1) - updated_on_utc: datetime.datetime = datetime.datetime(1, 1, 1) - checkouts: List[PaymentOrderCheckoutDto] = field(default_factory=list) - settled_minor: Optional[int] = None - refunded_minor: int = 0 - paid_on_utc: Optional[datetime.datetime] = None - provider_payment_id: Optional[str] = None - mismatches: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InAppNotificationDto: - id: Optional[str] = None - project_id: Optional[str] = None - user_id: Optional[str] = None - channel: Optional[str] = None - event_name: Optional[str] = None - payload_json: Optional[str] = None - is_read: bool = False - seen_at_utc: Optional[datetime.datetime] = None - read_at_utc: Optional[datetime.datetime] = None - created_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -class IBindableContract: - pass - - -class IHasViewId: - view_id: Optional[str] = None - - -class ICursorArgs: - field: Optional[str] = None - order: int = 0 - - -class IQueuedTrigger: - view_id: Optional[str] = None - name: Optional[str] = None - order: Optional[int] = None - break_on_error: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoResponse: - release: Optional[CodeMashRelease] = None - runtime: Optional[CodeMashRuntime] = None - managed_service_hub_url: Optional[str] = None - managed_service_api_url: Optional[str] = None - hub_url: Optional[str] = None - api_url: Optional[str] = None - api_version: Optional[str] = None - hub_version: Optional[str] = None - admin_url_template: Optional[str] = None - email_service_configured: bool = False - root_bootstrap_password_source: Optional[str] = None - regions: Optional[List[EchoRegionDto]] = None - agent: Optional[EchoAgentDto] = None - hosting_platform: Optional[EchoHostingPlatformDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicProjectConfigDto: - display_name: Optional[str] = None - admin_portal_enabled: bool = False - branding: Optional[PublicBrandDto] = None - auth: Optional[PublicAuthDto] = None - ai_chat: Optional[PublicAiChatDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicLegalDocumentDto: - kind: Optional[str] = None - title: Optional[str] = None - body: Optional[str] = None - available: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListEndUserChatAttachmentsResponse(ResponseBase): - attachments: List[EndUserChatAttachment] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListEndUserChatMemoryResponse(ResponseBase): - notes: List[EndUserChatMemoryNote] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEndUserChatAvailabilityResponse(ResponseBase): - enabled: bool = False - available: bool = False - reason: Optional[str] = None - default_assistant_id: Optional[str] = None - assistants: List[EndUserChatAssistant] = field(default_factory=list) - plan: Optional[EndUserChatPlan] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListEndUserChatSessionsResponse(ResponseBase): - sessions: List[EndUserChatSession] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEndUserChatSessionResponse(ResponseBase): - session: Optional[EndUserChatSession] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEndUserChatEntriesResponse(ResponseBase): - session_id: Optional[str] = None - entries: List[AiChatEntryWireDto] = field(default_factory=list) - last_seq: int = 0 - has_more: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StartEndUserChatTurnResponse(ResponseBase): - turn_id: Optional[str] = None - session_id: Optional[str] = None - channel: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEndUserAiToolsResponse(ResponseBase): - tools: Optional[List[EndUserAiTool]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InvokeEndUserAiToolResponse(ResponseBase): - result: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetUserResponse(ResponseBase): - user: Optional[AuthDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetUsersResponse(ResponseBase): - list: Optional[PaginatedResponse[AuthDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetUserPreferencesResponse(ResponseBase): - preferences: Optional[UserMarketingPreferencesDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeyOkResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeyCeremonyOptionsResponse(ResponseBase): - ceremony_id: Optional[str] = None - options_json: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeyAuthTokensResponse(ResponseBase): - access_token: Optional[str] = None - refresh_token: Optional[str] = None - expires_in_seconds: int = 0 - recovery_codes: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeyListResponse(ResponseBase): - passkeys: List[PasskeyListItemDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeyRecoveryResponse(ResponseBase): - access_token: Optional[str] = None - refresh_token: Optional[str] = None - expires_in_seconds: int = 0 - remaining_codes: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeyVerificationTokenResponse(ResponseBase): - verification_token: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindMergedTermTreeResponse(ResponseBase): - tree: Optional[List[TermTreeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindTaxonomyTreeResponse(ResponseBase): - tree: Optional[List[TaxonomyTreeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindTermsResponse(ResponseBase): - list: Optional[PaginatedResponse[TermDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindTermsChildrenResponse(ResponseBase): - list: Optional[PaginatedResponse[TermDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindTermTreeResponse(ResponseBase): - tree: Optional[List[TermTreeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaResponse(ResponseBase): - item: Optional[SchemaDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemasResponse(ResponseBase): - list: Optional[PaginatedResponse[SchemaListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AggregateResponse(ResponseBase): - result: Optional[List[Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CountResponse(ResponseBase): - count: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DistinctResponse(ResponseBase): - values: Optional[List[Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ExecuteAggregateResponse(ResponseBase): - result: Optional[List[Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindResponse(ResponseBase): - list: Optional[PaginatedResponse[Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindOneResponse(ResponseBase): - result: Optional[Object] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFileByIdResponse(ResponseBase): - file: Optional[FileResourceRefDto] = None - is_public: Optional[bool] = None - public_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFileInfoResponse(ResponseBase): - file: Optional[FileResourceRefDto] = None - is_public: Optional[bool] = None - public_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSignedUrlResponse(ResponseBase): - url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListFilesResponse(ResponseBase): - list: Optional[PaginatedResponse[FileResourceRefDto]] = None - folders: Optional[IList[str]] = None - public_folders: Optional[IList[PublicFolderDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RequestUploadUrlResponse(ResponseBase): - url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestFilesIntegrationResponse(ResponseBase): - items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetOwnPushDevicesResponse(ResponseBase): - items: List[OwnPushDeviceDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetOwnPushMessagesResponse(ResponseBase): - list: Optional[PaginatedResponse[OwnPushMessageDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentOrderResponse(ResponseBase): - item: Optional[PaymentOrderDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentOrdersResponse(ResponseBase): - list: Optional[PaginatedResponse[PaymentOrderDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StartPaymentCheckoutResponse(ResponseBase): - checkout: Optional[PaymentOrderCheckoutDto] = None - reused: bool = False - order: Optional[PaymentOrderDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetNotificationInboxResponse(ResponseBase): - list: Optional[PaginatedResponse[InAppNotificationDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetUnreadCountResponse(ResponseBase): - count: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkNotificationReadResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkAllNotificationsReadResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SharedTypeGen: - typegen__string_field_dto: Optional[StringFieldDto] = None - typegen__decimal_field_dto: Optional[DecimalFieldDto] = None - typegen__currency_field_dto: Optional[CurrencyFieldDto] = None - typegen__boolean_field_dto: Optional[BooleanFieldDto] = None - typegen__date_field_dto: Optional[DateFieldDto] = None - typegen__integer_field_dto: Optional[IntegerFieldDto] = None - typegen__geolocation_field_dto: Optional[GeolocationFieldDto] = None - typegen__tags_field_dto: Optional[TagsFieldDto] = None - typegen__file_field_dto: Optional[FileFieldDto] = None - typegen__taxonomy_selection_field_dto: Optional[TaxonomySelectionFieldDto] = None - typegen__collection_selection_field_dto: Optional[CollectionSelectionFieldDto] = None - typegen__user_selection_field_dto: Optional[UserSelectionFieldDto] = None - typegen__role_selection_field_dto: Optional[RoleSelectionFieldDto] = None - typegen__enum_selection_field_dto: Optional[EnumSelectionFieldDto] = None - typegen__object_field_dto: Optional[ObjectFieldDto] = None - typegen__array_field_dto: Optional[ArrayFieldDto] = None - typegen__json_field_dto: Optional[JsonFieldDto] = None - - -# @Route("/{version}/echo", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class Echo(RequestBase, IReturn[EchoResponse]): - pass - - -# @Route("/{version}/public/projects/{ProjectId}/brand/{Kind}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPublicProjectBrandAsset(RequestBase, IReturn[bytes]): - project_id: Optional[str] = None - kind: Optional[str] = None - v: Optional[str] = None - - -# @Route("/{version}/public/projects/{ProjectId}/config", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPublicProjectConfig(RequestBase, IReturn[PublicProjectConfigDto]): - project_id: Optional[str] = None - - -# @Route("/{version}/public/projects/{ProjectId}/legal/{Kind}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPublicProjectLegal(RequestBase, IReturn[PublicLegalDocumentDto]): - project_id: Optional[str] = None - kind: Optional[str] = None - - -# @Route("/{version}/ai/chat/sessions/{SessionId}/attachments", "POST") -# @Api(Description="Adds a file to one of the caller's own AI chats.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UploadEndUserChatAttachmentRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Adds a file to one of the caller's own AI chats. - """ - - session_id: Optional[str] = None - file_name: Optional[str] = None - content_type: Optional[str] = None - base64_content: Optional[str] = None - - -# @Route("/{version}/ai/chat/sessions/{SessionId}/attachments", "GET") -# @Api(Description="Lists the files in one of the caller's own AI chats.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListEndUserChatAttachmentsRequest(CodeMashRequestBase, IReturn[ListEndUserChatAttachmentsResponse]): - """ - Lists the files in one of the caller's own AI chats. - """ - - session_id: Optional[str] = None - - -# @Route("/{version}/ai/chat/attachments/{AttachmentId}", "DELETE") -# @Api(Description="Removes a file from one of the caller's own AI chats.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteEndUserChatAttachmentRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Removes a file from one of the caller's own AI chats. - """ - - attachment_id: Optional[str] = None - - -# @Route("/{version}/ai/chat/sessions/{SessionId}/entries/{EntryId}/feedback", "PUT") -# @Api(Description="Likes, dislikes or clears one message of the caller's own AI chat.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetEndUserChatEntryFeedbackRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Likes, dislikes or clears one message of the caller's own AI chat. - """ - - session_id: Optional[str] = None - entry_id: Optional[str] = None - feedback: Optional[str] = None - - -# @Route("/{version}/ai/chat/memory", "GET") -# @Api(Description="Lists what the AI chat remembers about the caller.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListEndUserChatMemoryRequest(CodeMashRequestBase, IReturn[ListEndUserChatMemoryResponse]): - """ - Lists what the AI chat remembers about the caller. - """ - - take: Optional[int] = None - - -# @Route("/{version}/ai/chat/memory/{NoteId}", "DELETE") -# @Api(Description="Forgets one thing the AI chat remembers about the caller.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ForgetEndUserChatMemoryRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Forgets one thing the AI chat remembers about the caller. - """ - - note_id: Optional[str] = None - - -# @Route("/{version}/ai/chat/availability", "GET") -# @Api(Description="Whether the AI chat can run for the caller, and which assistants it offers.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEndUserChatAvailabilityRequest(CodeMashRequestBase, IReturn[GetEndUserChatAvailabilityResponse]): - """ - Whether the AI chat can run for the caller, and which assistants it offers. - """ - - pass - - -# @Route("/{version}/ai/chat/sessions", "GET") -# @Api(Description="Lists the caller's own AI chats.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListEndUserChatSessionsRequest(CodeMashRequestBase, IReturn[ListEndUserChatSessionsResponse]): - """ - Lists the caller's own AI chats. - """ - - take: Optional[int] = None - include_archived: bool = False - - -# @Route("/{version}/ai/chat/sessions", "POST") -# @Api(Description="Opens a new AI chat for the caller.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateEndUserChatSessionRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Opens a new AI chat for the caller. - """ - - assistant_id: Optional[str] = None - title: Optional[str] = None - - -# @Route("/{version}/ai/chat/sessions/{SessionId}", "GET") -# @Api(Description="Returns one of the caller's own AI chats.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEndUserChatSessionRequest(CodeMashRequestBase, IReturn[GetEndUserChatSessionResponse]): - """ - Returns one of the caller's own AI chats. - """ - - session_id: Optional[str] = None - - -# @Route("/{version}/ai/chat/sessions/{SessionId}", "PATCH") -# @Api(Description="Renames one of the caller's own AI chats.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RenameEndUserChatSessionRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Renames one of the caller's own AI chats. - """ - - session_id: Optional[str] = None - title: Optional[str] = None - - -# @Route("/{version}/ai/chat/sessions/{SessionId}/pin", "PUT") -# @Api(Description="Pins or unpins one of the caller's own AI chats.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PinEndUserChatSessionRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Pins or unpins one of the caller's own AI chats. - """ - - session_id: Optional[str] = None - pinned: bool = False - - -# @Route("/{version}/ai/chat/sessions/{SessionId}/archive", "PUT") -# @Api(Description="Archives or unarchives one of the caller's own AI chats.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ArchiveEndUserChatSessionRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Archives or unarchives one of the caller's own AI chats. - """ - - session_id: Optional[str] = None - archived: bool = False - - -# @Route("/{version}/ai/chat/sessions/{SessionId}", "DELETE") -# @Api(Description="Deletes one of the caller's own AI chats.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteEndUserChatSessionRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Deletes one of the caller's own AI chats. - """ - - session_id: Optional[str] = None - - -# @Route("/{version}/ai/chat/sessions/{SessionId}/entries", "GET") -# @Api(Description="Returns a page of one of the caller's own AI chat transcripts.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEndUserChatEntriesRequest(CodeMashRequestBase, IReturn[GetEndUserChatEntriesResponse]): - """ - Returns a page of one of the caller's own AI chat transcripts. - """ - - session_id: Optional[str] = None - after_seq: Optional[int] = None - take: Optional[int] = None - - -# @Route("/{version}/ai/chat/turn", "POST") -# @Api(Description="Sends a message to the AI chat; the answer streams on the caller's channel.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StartEndUserChatTurnRequest(CodeMashRequestBase, IReturn[StartEndUserChatTurnResponse]): - """ - Sends a message to the AI chat; the answer streams on the caller's channel. - """ - - session_id: Optional[str] = None - assistant_id: Optional[str] = None - message: Optional[str] = None - - -# @Route("/{version}/ai/tools", "GET") -# @Api(Description="Lists the AI tools a project user may use: only their own data (own:* toolsets).") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEndUserAiToolsRequest(RequestBase, IReturn[GetEndUserAiToolsResponse]): - """ - Lists the AI tools a project user may use: only their own data (own:* toolsets). - """ - - pass - - -# @Route("/{version}/ai/tools/{ToolName}", "POST") -# @Api(Description="Invokes one own-scope AI tool as the calling project user.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InvokeEndUserAiToolRequest(RequestBase, IReturn[InvokeEndUserAiToolResponse]): - """ - Invokes one own-scope AI tool as the calling project user. - """ - - tool_name: Optional[str] = None - arguments_json: Optional[str] = None - - -# @Route("/{version}/membership/auth/block", "PATCH") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class BlockUserRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - # @ApiMember(Description="Id of the user to block, from get_users.", IsRequired=true) - id: Optional[str] = None - """ - Id of the user to block, from get_users. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - -# @Route("/{version}/membership/auth/register/service", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveSystemUserWithPermissions(SaveUserWithRolesBase, IReturn[IdResponse]): - """ - Membership - """ - - pass - - -# @Route("/{version}/membership/auth/register/guest", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveGuestUser(SaveUser, IReturn[IdResponse]): - """ - Membership - """ - - pass - - -# @Route("/{version}/membership/auth/register/phone", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SavePhoneUser(SaveUser, IReturn[IdResponse]): - """ - Membership - """ - - # @ApiMember(Description="Phone number for the new user, in E.164 format.", IsRequired=true) - phone: Optional[str] = None - """ - Phone number for the new user, in E.164 format. - """ - - -# @Route("/{version}/membership/auth/register/user-name", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveUserNameUser(SaveUser, IReturn[IdResponse], IPublicRegistrationRequest): - """ - Membership - """ - - password: Optional[str] = None - user_name: Optional[str] = None - # @ApiMember(Description="Optional roles from the project's \"Permitted user registration roles\". Empty = the default registration role.") - roles: Optional[List[str]] = None - """ - Optional roles from the project's "Permitted user registration roles". Empty = the default registration role. - """ - - -# @Route("/{version}/membership/auth/register/email", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveEmailUser(SaveUser, IReturn[IdResponse], IPublicRegistrationRequest): - """ - Membership - """ - - password: Optional[str] = None - email: Optional[str] = None - # @ApiMember(Description="Optional roles from the project's \"Permitted user registration roles\". Empty = the default registration role.") - roles: Optional[List[str]] = None - """ - Optional roles from the project's "Permitted user registration roles". Empty = the default registration role. - """ - - -# @Route("/{version}/membership/auth/register/phone-with-permissions", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SavePhoneUserNameWithPermissions(SaveUserWithRolesBase, IReturn[IdResponse]): - """ - Membership - """ - - phone: Optional[str] = None - - -# @Route("/{version}/membership/auth/register/email-with-permissions", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveEmailUserNameWithPermissions(SaveUserWithRolesBase, IReturn[IdResponse]): - """ - Membership - """ - - password: Optional[str] = None - email: Optional[str] = None - - -# @Route("/{version}/membership/auth/register/user-name-with-permissions", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveUserNameWithPermissions(SaveUserWithRolesBase, IReturn[IdResponse]): - """ - Membership - """ - - password: Optional[str] = None - user_name: Optional[str] = None - - -# @Route("/{version}/membership/auth", "DELETE") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteUserRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - # @ApiMember(Description="Id of the user to delete, from get_users.", IsRequired=true) - id: Optional[str] = None - """ - Id of the user to delete, from get_users. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - -# @Route("/{version}/membership/auth/{id}", "GET") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetUserRequest(CodeMashRequestBase, IReturn[GetUserResponse]): - """ - Membership - """ - - # @ApiMember(Description="Id of the user to fetch, from get_users.", IsRequired=true) - id: Optional[str] = None - """ - Id of the user to fetch, from get_users. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - -# @Route("/{version}/membership/auth", "GET") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetUsersRequest(CodeMashListPaginationRequestBase, IReturn[GetUsersResponse]): - """ - Membership - """ - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - - # @ApiMember(Description="Include each user's effective permissions in the result.") - include_permissions: bool = False - """ - Include each user's effective permissions in the result. - """ - - - # @ApiMember(Description="Only return users that have a registered push device.") - user_should_have_push_device: bool = False - """ - Only return users that have a registered push device. - """ - - - # @ApiMember(Description="Only return users that have an email address.") - user_should_have_email: bool = False - """ - Only return users that have an email address. - """ - - - # @ApiMember(Description="Include each user's metadata in the result.") - include_meta: bool = False - """ - Include each user's metadata in the result. - """ - - - # @ApiMember(Description="Filter to users that have any of these role names.") - role_names: Optional[List[str]] = None - """ - Filter to users that have any of these role names. - """ - - - # @ApiMember(Description="Filter to these specific user ids.") - user_ids: Optional[List[str]] = None - """ - Filter to these specific user ids. - """ - - - # @ApiMember(Description="Free text, case-insensitive: matches email, user name, display / first / last name or phone.") - search: Optional[str] = None - """ - Free text, case-insensitive: matches email, user name, display / first / last name or phone. - """ - - - # @ApiMember(Description="Case-insensitive part of the email.") - email: Optional[str] = None - """ - Case-insensitive part of the email. - """ - - - # @ApiMember(Description="Case-insensitive part of the user name.") - user_name: Optional[str] = None - """ - Case-insensitive part of the user name. - """ - - - # @ApiMember(Description="Status names, any of: Registered, PendingValidation, Active, Unregistered, Suspended, InActive, Blocked.") - statuses: Optional[List[str]] = None - """ - Status names, any of: Registered, PendingValidation, Active, Unregistered, Suspended, InActive, Blocked. - """ - - - # @ApiMember(Description="Login type names, any of: Service, Email, UserName, Phone, Guest, Social.") - types: Optional[List[str]] = None - """ - Login type names, any of: Service, Email, UserName, Phone, Guest, Social. - """ - - -# @Route("/{version}/membership/auth/{id}/preferences", "GET") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetUserPreferencesRequest(CodeMashRequestBase, IReturn[GetUserPreferencesResponse]): - """ - Membership - """ - - # @ApiMember(Description="Id of the user whose preferences to fetch, from get_users.", IsRequired=true) - id: Optional[str] = None - """ - Id of the user whose preferences to fetch, from get_users. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the project's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the project's default integration. - """ - - -# @Route("/{version}/membership/users/{contactId}/marketing-state/{channel}/consent", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GrantContactConsentRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the user (contact) to grant consent for.", IsRequired=true) - contact_id: Optional[str] = None - """ - Id of the user (contact) to grant consent for. - """ - - - # @ApiMember(Description="Delivery channel to grant consent on: Email, Sms, or Push.", IsRequired=true) - channel: Optional[str] = None - """ - Delivery channel to grant consent on: Email, Sms, or Push. - """ - - - # @ApiMember(Description="Lawful basis for the consent, e.g. Consent. Defaults to Consent.") - lawful_basis: Optional[str] = None - """ - Lawful basis for the consent, e.g. Consent. Defaults to Consent. - """ - - - # @ApiMember(Description="Source of the consent, e.g. UserOptIn. Defaults to UserOptIn.") - source: Optional[str] = None - """ - Source of the consent, e.g. UserOptIn. Defaults to UserOptIn. - """ - - - # @ApiMember(Description="Optional free-text reference to evidence of consent (e.g. a form submission id).") - evidence_ref: Optional[str] = None - """ - Optional free-text reference to evidence of consent (e.g. a form submission id). - """ - - -# @Route("/{version}/membership/auth/invite", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InviteUserRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - # @ApiMember(Description="Email address the invitation is sent to. It cannot be changed later.", IsRequired=true) - email: Optional[str] = None - """ - Email address the invitation is sent to. It cannot be changed later. - """ - - - # @ApiMember(Description="The invited person's full name, e.g. \"Rūta Petraitė\". Stored as the full name, first name (first word) and last name (the rest). The user may change it when finishing.") - full_name: Optional[str] = None - """ - The invited person's full name, e.g. "Rūta Petraitė". Stored as the full name, first name (first word) and last name (the rest). The user may change it when finishing. - """ - - - # @ApiMember(Description="Optional. How e-mails greet the person (\"Hi {salutation},\"), e.g. \"Rūta\". Stored as the display name. When empty the full name is used. The user may change it when finishing.") - salutation: Optional[str] = None - """ - Optional. How e-mails greet the person ("Hi {salutation},"), e.g. "Rūta". Stored as the display name. When empty the full name is used. The user may change it when finishing. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - -# @Route("/{version}/membership/auth/invitation/finish", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FinishInvitationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - # @ApiMember(Description="One-time invitation token from the e-mail link (the #token= fragment).", IsRequired=true) - token: Optional[str] = None - """ - One-time invitation token from the e-mail link (the #token= fragment). - """ - - - # @ApiMember(Description="The user's password. Validated against the project's complexity policy.", IsRequired=true) - password: Optional[str] = None - """ - The user's password. Validated against the project's complexity policy. - """ - - - # @ApiMember(Description="Optional. The user's full name; replaces the one the admin entered (full name, first name = first word, last name = the rest). Empty = keep the admin's.") - full_name: Optional[str] = None - """ - Optional. The user's full name; replaces the one the admin entered (full name, first name = first word, last name = the rest). Empty = keep the admin's. - """ - - - # @ApiMember(Description="Optional. How e-mails greet the user (stored as the display name). Empty = keep the admin's, or the full name when the admin gave none.") - salutation: Optional[str] = None - """ - Optional. How e-mails greet the user (stored as the display name). Empty = keep the admin's, or the full name when the admin gave none. - """ - - - # @ApiMember(Description="Optional. Older form of Salutation (the display name); Salutation wins when both are sent.") - display_name: Optional[str] = None - """ - Optional. Older form of Salutation (the display name); Salutation wins when both are sent. - """ - - - # @ApiMember(Description="Optional first name; wins over the one taken from FullName.") - first_name: Optional[str] = None - """ - Optional first name; wins over the one taken from FullName. - """ - - - # @ApiMember(Description="Optional last name; wins over the one taken from FullName.") - last_name: Optional[str] = None - """ - Optional last name; wins over the one taken from FullName. - """ - - -# @Route("/{version}/membership/auth/{userId}/link-identity", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LinkIdentityRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - user_id: Optional[str] = None - provider: Optional[str] = None - provider_token: Optional[str] = None - email_to_verify: Optional[str] = None - database_integration_id: Optional[str] = None - - -# @Route("/{version}/membership/users/{userId}/map-auth", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MapAuthToUserRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - user_id: Optional[str] = None - auth_id: Optional[str] = None - database_integration_id: Optional[str] = None - - -# @Route("/{version}/membership/auth/assign-roles", "PUT") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AssignRolePermissionsRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - # @ApiMember(Description="Id of the user login to assign roles to, from get_users.", IsRequired=true) - id: Optional[str] = None - """ - Id of the user login to assign roles to, from get_users. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - - # @ApiMember(Description="The complete new list of role names (full replacement), from get_roles.") - roles: Optional[List[str]] = None - """ - The complete new list of role names (full replacement), from get_roles. - """ - - -# @Route("/{version}/membership/users/{userId}/roles", "PUT") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetContactRolesRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - # @ApiMember(Description="Id of the human user to assign roles to.", IsRequired=true) - user_id: Optional[str] = None - """ - Id of the human user to assign roles to. - """ - - - # @ApiMember(Description="The complete new list of role ids (full replacement), from get_roles. Empty/omitted clears all roles.") - roles: Optional[List[str]] = None - """ - The complete new list of role ids (full replacement), from get_roles. Empty/omitted clears all roles. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - -# @Route("/{version}/membership/users/{contactId}/marketing-state/{commChannel}/{channel}/tags/{tag}", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetContactTagSubscriptionRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the user (contact) to update.", IsRequired=true) - contact_id: Optional[str] = None - """ - Id of the user (contact) to update. - """ - - - # @ApiMember(Description="Communication channel type: Marketing or Transactional.", IsRequired=true) - comm_channel: Optional[str] = None - """ - Communication channel type: Marketing or Transactional. - """ - - - # @ApiMember(Description="Delivery channel: Email, Sms, or Push.", IsRequired=true) - channel: Optional[str] = None - """ - Delivery channel: Email, Sms, or Push. - """ - - - # @ApiMember(Description="The tag name; must already exist for the communication channel.", IsRequired=true) - tag: Optional[str] = None - """ - The tag name; must already exist for the communication channel. - """ - - - # @ApiMember(Description="True to subscribe (unblock) the tag, false to block it.") - subscribed: bool = False - """ - True to subscribe (unblock) the tag, false to block it. - """ - - -# @Route("/{version}/membership/auth/unblock", "PATCH") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UnblockUserRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - # @ApiMember(Description="Id of the user to unblock, from get_users.", IsRequired=true) - id: Optional[str] = None - """ - Id of the user to unblock, from get_users. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - -# @Route("/{version}/membership/users/{contactId}/marketing-state/{channel}/unsubscribe", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UnsubscribeContactRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the user (contact) to unsubscribe.", IsRequired=true) - contact_id: Optional[str] = None - """ - Id of the user (contact) to unsubscribe. - """ - - - # @ApiMember(Description="Delivery channel to unsubscribe from: Email, Sms, or Push.", IsRequired=true) - channel: Optional[str] = None - """ - Delivery channel to unsubscribe from: Email, Sms, or Push. - """ - - - # @ApiMember(Description="Optional suppression reason name explaining why consent was revoked.") - reason: Optional[str] = None - """ - Optional suppression reason name explaining why consent was revoked. - """ - - -# @Route("/{version}/membership/auth", "PUT") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateUserRequest(SaveUser, IReturn[IdResponse]): - """ - Membership - """ - - # @ApiMember(Description="Id of the user to update, from get_users.", IsRequired=true) - id: Optional[str] = None - """ - Id of the user to update, from get_users. - """ - - -# @Route("/{version}/membership/auth/{id}/preferences", "PUT") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateUserPreferencesRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - # @ApiMember(Description="Id of the user to update, from get_users.", IsRequired=true) - id: Optional[str] = None - """ - Id of the user to update, from get_users. - """ - - - # @ApiMember(Description="When true, blocks all marketing messages to this user.") - block_all_marketing_messages: bool = False - """ - When true, blocks all marketing messages to this user. - """ - - - # @ApiMember(Description="Per communication channel, the set of tags blocked for this user. Full replacement.") - blocked_tags: Optional[Dict[str, HashSet[str]]] = None - """ - Per communication channel, the set of tags blocked for this user. Full replacement. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the project's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the project's default integration. - """ - - -# @Route("/{version}/membership/userauth/password/change", "POST") -# @Api(Description="Membership · Password") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChangePasswordRequest(CodeMashRequestBase, IReturn[PasskeyOkResponse]): - """ - Membership · Password - """ - - # @ApiMember(Description="The member's current password.", IsRequired=true) - current_password: Optional[str] = None - """ - The member's current password. - """ - - - # @ApiMember(Description="The new password. Validated against the project's complexity policy.", IsRequired=true) - new_password: Optional[str] = None - """ - The new password. Validated against the project's complexity policy. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - -# @Route("/{version}/membership/userauth/password/reset/request", "POST") -# @Api(Description="Membership · Password") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RequestPasswordResetRequest(CodeMashRequestBase, IReturn[PasskeyOkResponse]): - """ - Membership · Password - """ - - # @ApiMember(Description="Email address to send the reset link to.", IsRequired=true) - email: Optional[str] = None - """ - Email address to send the reset link to. - """ - - -# @Route("/{version}/membership/userauth/password/reset/confirm", "POST") -# @Api(Description="Membership · Password") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ConfirmPasswordResetRequest(CodeMashRequestBase, IReturn[PasskeyOkResponse]): - """ - Membership · Password - """ - - # @ApiMember(Description="One-time reset token from the email link.", IsRequired=true) - token: Optional[str] = None - """ - One-time reset token from the email link. - """ - - - # @ApiMember(Description="The new password. Validated against the project's complexity policy.", IsRequired=true) - new_password: Optional[str] = None - """ - The new password. Validated against the project's complexity policy. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - -# @Route("/{version}/membership/userauth/passkey/authentication-options", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeyAuthenticationOptionsRequest(CodeMashRequestBase, IReturn[PasskeyCeremonyOptionsResponse], IPasskeyCeremonyRequest): - """ - Membership · Passkey - """ - - email: Optional[str] = None - - -# @Route("/{version}/membership/userauth/passkey/verify-authentication", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class VerifyPasskeyAuthenticationRequest(CodeMashRequestBase, IReturn[PasskeyAuthTokensResponse], IPasskeyCeremonyRequest): - """ - Membership · Passkey - """ - - ceremony_id: Optional[str] = None - assertion_response: Optional[str] = None - - -# @Route("/{version}/membership/userauth/passkeys", "GET") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListPasskeysRequest(CodeMashRequestBase, IReturn[PasskeyListResponse]): - """ - Membership · Passkey - """ - - pass - - -# @Route("/{version}/membership/userauth/passkeys/{CredentialId}/rename", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RenamePasskeyRequest(CodeMashRequestBase, IReturn[PasskeyOkResponse]): - """ - Membership · Passkey - """ - - # @ApiMember(Description="Base64 credential id of the passkey to rename, from list_passkeys.", IsRequired=true) - credential_id: Optional[str] = None - """ - Base64 credential id of the passkey to rename, from list_passkeys. - """ - - - # @ApiMember(Description="The new friendly name for the passkey.", IsRequired=true) - friendly_name: Optional[str] = None - """ - The new friendly name for the passkey. - """ - - -# @Route("/{version}/membership/userauth/passkeys/{CredentialId}/revoke", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RevokePasskeyRequest(CodeMashRequestBase, IReturn[PasskeyOkResponse]): - """ - Membership · Passkey - """ - - # @ApiMember(Description="Base64 credential id of the passkey to revoke, from list_passkeys.", IsRequired=true) - credential_id: Optional[str] = None - """ - Base64 credential id of the passkey to revoke, from list_passkeys. - """ - - -# @Route("/{version}/membership/userauth/recovery/use-code", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UseRecoveryCodeRequest(CodeMashRequestBase, IReturn[PasskeyRecoveryResponse]): - """ - Membership · Passkey - """ - - email: Optional[str] = None - recovery_code: Optional[str] = None - - -# @Route("/{version}/membership/userauth/recovery/magic-link/request", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RequestMagicLinkRequest(CodeMashRequestBase, IReturn[PasskeyOkResponse]): - """ - Membership · Passkey - """ - - email: Optional[str] = None - - -# @Route("/{version}/membership/userauth/recovery/magic-link/consume", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ConsumeMagicLinkRequest(CodeMashRequestBase, IReturn[PasskeyRecoveryResponse]): - """ - Membership · Passkey - """ - - token: Optional[str] = None - - -# @Route("/{version}/membership/userauth/has-passkey", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class HasPasskeyRequest(CodeMashRequestBase, IReturn[PasskeyOkResponse]): - """ - Membership · Passkey - """ - - email: Optional[str] = None - - -# @Route("/{version}/membership/userauth/email/start-verification", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StartEmailVerificationRequest(CodeMashRequestBase, IReturn[PasskeyOkResponse]): - """ - Membership · Passkey - """ - - email: Optional[str] = None - - -# @Route("/{version}/membership/userauth/email/confirm-verification", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ConfirmEmailVerificationRequest(CodeMashRequestBase, IReturn[PasskeyVerificationTokenResponse]): - """ - Membership · Passkey - """ - - email: Optional[str] = None - code: Optional[str] = None - - -# @Route("/{version}/membership/userauth/passkey/registration-options", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeyRegistrationOptionsRequest(CodeMashRequestBase, IReturn[PasskeyCeremonyOptionsResponse], IPasskeyCeremonyRequest): - """ - Membership · Passkey - """ - - verification_token: Optional[str] = None - - -# @Route("/{version}/membership/userauth/passkey/verify-registration", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class VerifyPasskeyRegistrationRequest(CodeMashRequestBase, IReturn[PasskeyAuthTokensResponse], IPasskeyCeremonyRequest): - """ - Membership · Passkey - """ - - verification_token: Optional[str] = None - ceremony_id: Optional[str] = None - attestation_response: Optional[str] = None - friendly_name: Optional[str] = None - - -# @Route("/{version}/membership/userauth/token/refresh", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RefreshPasskeyTokenRequest(CodeMashRequestBase, IReturn[PasskeyAuthTokensResponse]): - """ - Membership · Passkey - """ - - refresh_token: Optional[str] = None - - -# @Route("/{version}/membership/userauth/logout", "POST") -# @Api(Description="Membership · Passkey") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeyLogoutRequest(CodeMashRequestBase, IReturn[PasskeyOkResponse]): - """ - Membership · Passkey - """ - - refresh_token: Optional[str] = None - - -# @Route("/{version}/database/taxonomies/{taxonomyName}/merged-tree", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindMergedTermTreeRequest(CodeMashRequestBase, IReturn[FindMergedTermTreeResponse]): - """ - Database - """ - - # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - all_languages: bool = False - """ - Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. - """ - - - # @ApiMember(Description="The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…).", IsRequired=true) - taxonomy_name: Optional[str] = None - """ - The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…). - """ - - - database_integration_id: Optional[str] = None - - -# @Route("/{version}/database/taxonomies/tree", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindTaxonomyTreeRequest(CodeMashRequestBase, IReturn[FindTaxonomyTreeResponse]): - """ - Database - """ - - # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - all_languages: bool = False - """ - Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. - """ - - - include_terms: bool = False - database_integration_id: Optional[str] = None - - -# @Route("/{version}/database/taxonomies/{taxonomyName}/terms", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindTermsRequest(CodeMashListPaginationRequestBase, IReturn[FindTermsResponse]): - """ - Database - """ - - # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - all_languages: bool = False - """ - Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. - """ - - - # @ApiMember(Description="The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…).", IsRequired=true) - taxonomy_name: Optional[str] = None - """ - The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…). - """ - - - database_integration_id: Optional[str] = None - filter: Optional[str] = None - sort_descending: bool = False - paging_args: Optional[PagingArgs] = None - - -# @Route("/{version}/database/taxonomies/{taxonomyName}/terms/{parentId}/children", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindTermsChildrenRequest(CodeMashListPaginationRequestBase, IReturn[FindTermsChildrenResponse]): - """ - Database - """ - - # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - all_languages: bool = False - """ - Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. - """ - - - # @ApiMember(Description="The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…).", IsRequired=true) - taxonomy_name: Optional[str] = None - """ - The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…). - """ - - - parent_id: Optional[str] = None - database_integration_id: Optional[str] = None - filter: Optional[str] = None - paging_args: Optional[PagingArgs] = None - - -# @Route("/{version}/database/taxonomies/{taxonomyName}/terms/tree", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindTermTreeRequest(CodeMashRequestBase, IReturn[FindTermTreeResponse]): - """ - Database - """ - - # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - all_languages: bool = False - """ - Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. - """ - - - # @ApiMember(Description="The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…).", IsRequired=true) - taxonomy_name: Optional[str] = None - """ - The taxonomy: its name (slug or title; URL-encode spaces) or its id (txn_…). - """ - - - root_term_id: Optional[str] = None - depth: Optional[int] = None - database_integration_id: Optional[str] = None - - -# @Route("/{version}/database/schemas/{id}", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaRequest(CodeMashRequestBase, IReturn[GetDatabaseSchemaResponse]): - """ - Database - """ - - id: Optional[str] = None - - -# @Route("/{version}/database/schemas", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemasRequest(CodeMashListPaginationRequestBase, IReturn[GetDatabaseSchemasResponse]): - """ - Database - """ - - paging_args: Optional[PagingArgs] = None - - -# @Route("/{version}/database/collections/{collectionName}/aggregate", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AggregateRequest(CodeMashRequestBase, IReturn[AggregateResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - database_integration_id: Optional[str] = None - pipeline: Optional[str] = None - - -# @Route("/{version}/database/collections/{collectionName}/{id}/responsibility", "PUT") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChangeResponsibilityRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - id: Optional[str] = None - database_integration_id: Optional[str] = None - new_responsible_user_id: Optional[str] = None - - -# @Route("/{version}/database/collections/{collectionName}/count", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CountRequest(CodeMashRequestBase, IReturn[CountResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - database_integration_id: Optional[str] = None - filter: Optional[str] = None - schema_version: Optional[int] = None - - -# @Route("/{version}/database/collections/{collectionName}/many", "DELETE") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteManyRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - database_integration_id: Optional[str] = None - filter: Optional[str] = None - all_records: Optional[bool] = None - - -# @Route("/{version}/database/collections/{collectionName}/{id}", "DELETE") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteOneRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - id: Optional[str] = None - database_integration_id: Optional[str] = None - - -# @Route("/{version}/database/collections/{collectionName}/distinct", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DistinctRequest(CodeMashRequestBase, IReturn[DistinctResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - database_integration_id: Optional[str] = None - field: Optional[str] = None - filter: Optional[str] = None - schema_version: Optional[int] = None - - -# @Route("/{version}/database/collections/{collectionName}/aggregates/{aggregateId}/execute", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ExecuteAggregateRequest(CodeMashRequestBase, IReturn[ExecuteAggregateResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - aggregate_id: Optional[str] = None - database_integration_id: Optional[str] = None - tokens: Optional[Dict[str, str]] = None - - -# @Route("/{version}/database/collections/{collectionName}", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindRequest(CodeMashListPaginationRequestBase, IReturn[FindResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - database_integration_id: Optional[str] = None - filter: Optional[str] = None - schema_version: Optional[int] = None - paging_args: Optional[PagingArgs] = None - sort_by: Optional[str] = None - sort_order: Optional[int] = None - expand_references: bool = False - all_languages: bool = False - - -# @Route("/{version}/database/collections/{collectionName}/{id}", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindOneRequest(CodeMashRequestBase, IReturn[FindOneResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - id: Optional[str] = None - database_integration_id: Optional[str] = None - expand_references: bool = False - all_languages: bool = False - - -# @Route("/{version}/database/collections/{collectionName}/own", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindOwnRequest(CodeMashListPaginationRequestBase, IReturn[FindResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - database_integration_id: Optional[str] = None - filter: Optional[str] = None - schema_version: Optional[int] = None - paging_args: Optional[PagingArgs] = None - # @ApiMember(Description="Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids.") - expand_references: bool = False - """ - Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids. - """ - - - all_languages: bool = False - - -# @Route("/{version}/database/collections/{collectionName}/many", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InsertManyRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - database_integration_id: Optional[str] = None - documents: Optional[str] = None - - -# @Route("/{version}/database/collections/{collectionName}", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InsertOneRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - database_integration_id: Optional[str] = None - document: Optional[str] = None - - -# @Route("/{version}/database/collections/{collectionName}/{id}/replace", "PUT") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ReplaceOneRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - id: Optional[str] = None - database_integration_id: Optional[str] = None - replacement: Optional[str] = None - - -# @Route("/{version}/database/collections/{collectionName}/many", "PUT") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateManyRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - database_integration_id: Optional[str] = None - filter: Optional[str] = None - all_records: Optional[bool] = None - update: Optional[str] = None - array_filters: Optional[str] = None - - -# @Route("/{version}/database/collections/{collectionName}/{id}", "PUT") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateOneRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - collection_name: Optional[str] = None - id: Optional[str] = None - database_integration_id: Optional[str] = None - update: Optional[str] = None - array_filters: Optional[str] = None - - -# @Route("/{version}/files/{filesIntegrationId}/commit", "POST") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CommitUploadRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - path: Optional[str] = None - content_type: Optional[str] = None - size_bytes: Optional[int] = None - file_name: Optional[str] = None - - -# @Route("/{version}/files/{filesIntegrationId}/content", "GET") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFileContentRequest(RequestBase, IReturn[bytes]): - """ - Files - """ - - files_integration_id: Optional[str] = None - path: Optional[str] = None - token: Optional[str] = None - - -# @Route("/{version}/files/{filesIntegrationId}/content", "PUT") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PutFileContentRequest(RequestBase, IReturn[EmptyResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - path: Optional[str] = None - token: Optional[str] = None - - -# @Route("/{version}/files/{filesIntegrationId}", "DELETE") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteFileApiRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - path: Optional[str] = None - - -# @Route("/{version}/files/{filesIntegrationId}/bulk", "DELETE") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteManyFilesApiRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - paths: List[str] = field(default_factory=list) - - -# @Route("/{version}/files/{filesIntegrationId}/download", "GET") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DownloadFileApiRequest(CodeMashRequestBase, IReturn[bytes]): - """ - Files - """ - - files_integration_id: Optional[str] = None - path: Optional[str] = None - - -# @Route("/{version}/files/{filesIntegrationId}/by-id/{id}", "GET") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFileByIdRequest(CodeMashRequestBase, IReturn[GetFileByIdResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - id: Optional[str] = None - - -# @Route("/{version}/files/{filesIntegrationId}/info", "GET") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFileInfoRequest(CodeMashRequestBase, IReturn[GetFileInfoResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - path: Optional[str] = None - - -# @Route("/{version}/files/{filesIntegrationId}/sign", "GET") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSignedUrlRequest(CodeMashRequestBase, IReturn[GetSignedUrlResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - path: Optional[str] = None - expiration_seconds: Optional[int] = None - - -# @Route("/{version}/files/{filesIntegrationId}", "GET") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListFilesRequest(CodeMashListPaginationRequestBase, IReturn[ListFilesResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - path: Optional[str] = None - - -# @Route("/{version}/files/public/{PublicId}/{Name*}", "GET") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPublicFileRequest(RequestBase, IReturn[bytes]): - """ - Files - """ - - public_id: Optional[str] = None - name: Optional[str] = None - - -# @Route("/{version}/files/{filesIntegrationId}/upload-url", "POST") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RequestUploadUrlRequest(CodeMashRequestBase, IReturn[RequestUploadUrlResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - path: Optional[str] = None - content_type: Optional[str] = None - expiration_seconds: Optional[int] = None - - -# @Route("/{version}/files/{filesIntegrationId}/test", "POST") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestFilesIntegrationRequest(CodeMashRequestBase, IReturn[TestFilesIntegrationResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - - -# @Route("/{version}/files/{filesIntegrationId}/use", "POST") -# @Api(Description="Files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UseFileRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Files - """ - - files_integration_id: Optional[str] = None - path: Optional[str] = None - - -# @Route("/{version}/notifications/push/devices", "POST") -# @Api(Description="Registers or refreshes a push device for the signed-in user.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RegisterOwnPushDeviceRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Registers or refreshes a push device for the signed-in user. - """ - - # @ApiMember(Description="Who issued the token: fcm (Android / Firebase) or apns (iOS). The NATIVE device token — in an Expo app use getDevicePushTokenAsync(). Expo push tokens (provider 'expo') are refused.", IsRequired=true) - provider: Optional[str] = None - """ - Who issued the token: fcm (Android / Firebase) or apns (iOS). The NATIVE device token — in an Expo app use getDevicePushTokenAsync(). Expo push tokens (provider 'expo') are refused. - """ - - - # @ApiMember(Description="The push token, exactly as the provider gave it.", IsRequired=true) - token: Optional[str] = None - """ - The push token, exactly as the provider gave it. - """ - - - # @ApiMember(Description="The app's platform: ios, android or web.") - platform: Optional[str] = None - """ - The app's platform: ios, android or web. - """ - - - # @ApiMember(Description="Operating system name, e.g. iOS.") - os_name: Optional[str] = None - """ - Operating system name, e.g. iOS. - """ - - - # @ApiMember(Description="Operating system version, e.g. 18.1.") - os_version: Optional[str] = None - """ - Operating system version, e.g. 18.1. - """ - - - # @ApiMember(Description="The app version, e.g. 2.4.1.") - app_version: Optional[str] = None - """ - The app version, e.g. 2.4.1. - """ - - - # @ApiMember(Description="The device name the user sees, e.g. Anna's iPhone.") - device_name: Optional[str] = None - """ - The device name the user sees, e.g. Anna's iPhone. - """ - - - # @ApiMember(Description="The device model, e.g. iPhone 15.") - model_name: Optional[str] = None - """ - The device model, e.g. iPhone 15. - """ - - - brand: Optional[str] = None - manufacturer: Optional[str] = None - # @ApiMember(Description="A stable id the app keeps for this installation (not the token).") - installation_id: Optional[str] = None - """ - A stable id the app keeps for this installation (not the token). - """ - - - # @ApiMember(Description="The device locale, e.g. lt-LT.") - locale: Optional[str] = None - """ - The device locale, e.g. lt-LT. - """ - - - # @ApiMember(Description="The device time zone (IANA), e.g. Europe/Vilnius.") - time_zone: Optional[str] = None - """ - The device time zone (IANA), e.g. Europe/Vilnius. - """ - - -# @Route("/{version}/notifications/push/devices", "GET") -# @Api(Description="Lists the signed-in user's own push devices.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetOwnPushDevicesRequest(CodeMashRequestBase, IReturn[GetOwnPushDevicesResponse]): - """ - Lists the signed-in user's own push devices. - """ - - pass - - -# @Route("/{version}/notifications/push/devices/{Id}", "DELETE") -# @Api(Description="Removes one of the signed-in user's own push devices by id.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteOwnPushDeviceRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Removes one of the signed-in user's own push devices by id. - """ - - # @ApiMember(Description="The device id (pnd_…) from the devices list or the register answer.", IsRequired=true) - id: Optional[str] = None - """ - The device id (pnd_…) from the devices list or the register answer. - """ - - -# @Route("/{version}/notifications/push/devices", "DELETE") -# @Api(Description="Removes the signed-in user's push device registered with a token (sign-out).") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteOwnPushDeviceByTokenRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Removes the signed-in user's push device registered with a token (sign-out). - """ - - # @ApiMember(Description="The push token the device was registered with.", IsRequired=true) - token: Optional[str] = None - """ - The push token the device was registered with. - """ - - -# @Route("/{version}/notifications/push/messages", "GET") -# @Api(Description="Lists the push messages sent to the signed-in user.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetOwnPushMessagesRequest(CodeMashListPaginationRequestBase, IReturn[GetOwnPushMessagesResponse]): - """ - Lists the push messages sent to the signed-in user. - """ - - # @ApiMember(Description="Only messages the caller has not marked read.") - unread_only: bool = False - """ - Only messages the caller has not marked read. - """ - - -# @Route("/{version}/notifications/push/messages/{Id}/read", "POST") -# @Api(Description="Marks one push message sent to the signed-in user read.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkOwnPushMessageReadRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Marks one push message sent to the signed-in user read. - """ - - # @ApiMember(Description="The message id (ntf_…) from the messages list.", IsRequired=true) - id: Optional[str] = None - """ - The message id (ntf_…) from the messages list. - """ - - -# @Route("/{version}/notifications/push/messages/read", "POST") -# @Api(Description="Marks every push message sent to the signed-in user read.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkAllOwnPushMessagesReadRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Marks every push message sent to the signed-in user read. - """ - - pass - - -# @Route("/{version}/payments/orders", "POST") -# @Api(Description="Stores a payment order with a fixed price for one of the project's users. Server only (service user API key).") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreatePaymentOrderRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Stores a payment order with a fixed price for one of the project's users. Server only (service user API key). - """ - - # @ApiMember(Description="The user the order is for (usr_…).", IsRequired=true) - buyer_user_id: Optional[str] = None - """ - The user the order is for (usr_…). - """ - - - # @ApiMember(Description="The project's own order reference, unique per project and environment (1–64 of A–Z a–z 0–9 . _ : -).", IsRequired=true) - merchant_reference: Optional[str] = None - """ - The project's own order reference, unique per project and environment (1–64 of A–Z a–z 0–9 . _ : -). - """ - - - # @ApiMember(Description="8–128 characters. Same key + same body = the stored order; same key + other body = 409. May be sent as the Idempotency-Key header instead.") - idempotency_key: Optional[str] = None - """ - 8–128 characters. Same key + same body = the stored order; same key + other body = 409. May be sent as the Idempotency-Key header instead. - """ - - - # @ApiMember(Description="EUR.", IsRequired=true) - currency: Optional[str] = None - """ - EUR. - """ - - - # @ApiMember(Description="The version of the price list the server priced the lines with.", IsRequired=true) - price_version: Optional[str] = None - """ - The version of the price list the server priced the lines with. - """ - - - # @ApiMember(Description="1–50 lines: sku, title, quantity, unitAmountMinor (cents). Norbix computes the amounts and the total.", IsRequired=true) - lines: List[PaymentOrderLineInput] = field(default_factory=list) - """ - 1–50 lines: sku, title, quantity, unitAmountMinor (cents). Norbix computes the amounts and the total. - """ - - - # @ApiMember(Description="Up to 20 project values (e.g. adId). No personal or billing data.") - metadata: Optional[Dict[str, str]] = None - """ - Up to 20 project values (e.g. adId). No personal or billing data. - """ - - -# @Route("/{version}/payments/orders/{Id}", "GET") -# @Api(Description="Reads one payment order. A buyer reads only their own orders.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentOrderRequest(CodeMashRequestBase, IReturn[GetPaymentOrderResponse]): - """ - Reads one payment order. A buyer reads only their own orders. - """ - - # @ApiMember(Description="The order id (ord_…).", IsRequired=true) - id: Optional[str] = None - """ - The order id (ord_…). - """ - - -# @Route("/{version}/payments/orders", "GET") -# @Api(Description="Lists payment orders, newest first. A buyer gets only their own orders.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentOrdersRequest(CodeMashListPaginationRequestBase, IReturn[GetPaymentOrdersResponse]): - """ - Lists payment orders, newest first. A buyer gets only their own orders. - """ - - # @ApiMember(Description="Server only: one buyer's orders (usr_…). A buyer always gets their own.") - buyer_user_id: Optional[str] = None - """ - Server only: one buyer's orders (usr_…). A buyer always gets their own. - """ - - - # @ApiMember(Description="Only the order with this merchant reference.") - merchant_reference: Optional[str] = None - """ - Only the order with this merchant reference. - """ - - - # @ApiMember(Description="Only orders in this status (Created, CheckoutStarted, Paid, …).") - status: Optional[str] = None - """ - Only orders in this status (Created, CheckoutStarted, Paid, …). - """ - - -# @Route("/{version}/payments/orders/{Id}/checkout", "POST") -# @Api(Description="Opens a Montonio checkout for a stored order and answers where the buyer pays. The buyer (own order) or the server.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StartPaymentCheckoutRequest(CodeMashRequestBase, IReturn[StartPaymentCheckoutResponse]): - """ - Opens a Montonio checkout for a stored order and answers where the buyer pays. The buyer (own order) or the server. - """ - - # @ApiMember(Description="The order id (ord_…).", IsRequired=true) - id: Optional[str] = None - """ - The order id (ord_…). - """ - - - # @ApiMember(Description="The Montonio integration (int_…) of the project in the request's environment.", IsRequired=true) - integration_id: Optional[str] = None - """ - The Montonio integration (int_…) of the project in the request's environment. - """ - - - # @ApiMember(Description="bankLink (default), card, applePay or googlePay.") - method: Optional[str] = None - """ - bankLink (default), card, applePay or googlePay. - """ - - - # @ApiMember(Description="Where the buyer comes back after paying; its origin must be one of the project's allowed origins.", IsRequired=true) - return_url: Optional[str] = None - """ - Where the buyer comes back after paying; its origin must be one of the project's allowed origins. - """ - - - # @ApiMember(Description="Bank links only: the country whose banks are shown first (default LT).") - preferred_country: Optional[str] = None - """ - Bank links only: the country whose banks are shown first (default LT). - """ - - - # @ApiMember(Description="Bank links only: one bank to open directly (the provider's bank code).") - preferred_provider: Optional[str] = None - """ - Bank links only: one bank to open directly (the provider's bank code). - """ - - -# @Route("/{version}/notifications/inbox", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetNotificationInboxRequest(CodeMashListPaginationRequestBase, IReturn[GetNotificationInboxResponse]): - unread_only: bool = False - channel: Optional[str] = None - - -# @Route("/{version}/notifications/inbox/unread-count", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetUnreadCountRequest(CodeMashRequestBase, IReturn[GetUnreadCountResponse]): - pass - - -# @Route("/{version}/notifications/inbox/{notificationId}/read", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkNotificationReadRequest(CodeMashRequestBase, IReturn[MarkNotificationReadResponse]): - notification_id: Optional[str] = None - - -# @Route("/{version}/notifications/inbox/read-all", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkAllNotificationsReadRequest(CodeMashRequestBase, IReturn[MarkAllNotificationsReadResponse]): - pass - diff --git a/references/hub2.dtos.ts b/references/hub2.dtos.ts deleted file mode 100644 index b13c5e9..0000000 --- a/references/hub2.dtos.ts +++ /dev/null @@ -1,23645 +0,0 @@ -/* Options: -Date: 2026-10-19 11:26:14 -Version: 10.20 -Tip: To override a DTO option, remove "//" prefix before updating -BaseUrl: http://localhost:5001 - -//GlobalNamespace: -//MakePropertiesOptional: False -//AddServiceStackTypes: True -//AddResponseStatus: False -//AddImplicitVersion: -//AddDescriptionAsComments: True -//IncludeTypes: -//ExcludeTypes: -//DefaultImports: -*/ - -// @ts-nocheck - -export interface IReturn -{ - createResponse(): T; -} - -export interface IReturnVoid -{ - createResponse(): void; -} - -export interface IHasSessionId -{ - sessionId?: string; -} - -export interface IHasBearerToken -{ - bearerToken?: string; -} - -export interface IPost -{ -} - -// @DataContract -export enum EmailProvider -{ - Smtp = 'Smtp', - SendGrid = 'SendGrid', - MailGun = 'MailGun', - AwsSes = 'AwsSes', - Fake = 'Fake', -} - -export class EmailIntegrationRequest -{ - public integrationId?: string; - public provider: EmailProvider; - public integrationName: string; - public isEnabled: boolean; - public emailAddress: string; - public emailSenderName?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum SmtpPorts -{ - Default = 25, - Ssl = 465, - Tls = 587, - Fallback = 2525, -} - -export class SmtpEmailIntegrationRequest extends EmailIntegrationRequest -{ - public provider: EmailProvider; - public domain: string; - public port: SmtpPorts; - public userName: string; - public password: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum AwsIntegrationType -{ - Iam = 'Iam', - CrossAccountRole = 'CrossAccountRole', -} - -export class AwsSesEmailIntegrationRequest extends EmailIntegrationRequest -{ - public provider: EmailProvider; - public integrationType: AwsIntegrationType; - public awsRegion: string; - public emailIdentityArn: string; - public configurationSet?: string; - public roleArn?: string; - public externalId?: string; - public accessKey?: string; - public secretKey?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SendGridEmailIntegrationRequest extends EmailIntegrationRequest -{ - public provider: EmailProvider; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum MailGunRegion -{ - Us = 'Us', - Eu = 'Eu', -} - -export class MailGunEmailIntegrationRequest extends EmailIntegrationRequest -{ - public provider: EmailProvider; - public domain: string; - public apiKey: string; - public webhookSigningKey: string; - public region: MailGunRegion; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum EmailCampaignRecipientsSourceTypes -{ - AllUsers = 'AllUsers', - SpecifiedUsers = 'SpecifiedUsers', - AccountUsers = 'AccountUsers', - Email = 'Email', - Collection = 'Collection', -} - -export enum TokenMappingResolverType -{ - NotSet = 'NotSet', - Custom = 'Custom', - Project = 'Project', - ProjectSocials = 'ProjectSocials', - Initiator = 'Initiator', - Recipient = 'Recipient', - SchemaRecord = 'SchemaRecord', - TargetUser = 'TargetUser', - TagDefinitions = 'TagDefinitions', - EmailSignatures = 'EmailSignatures', - Campaign = 'Campaign', - Template = 'Template', - EmailFooters = 'EmailFooters', - Old = 'Old', - New = 'New', - RequestInput = 'RequestInput', - IntegrationConfig = 'IntegrationConfig', - IntegrationSecret = 'IntegrationSecret', -} - -export enum SecretValueFormat -{ - Raw = 'Raw', - Bearer = 'Bearer', - Basic = 'Basic', - Prefixed = 'Prefixed', -} - -// @DataContract -export class TokenMappingDto -{ - // @DataMember - public key: string; - - // @DataMember - public value: string; - - // @DataMember - public resolver: TokenMappingResolverType; - - // @DataMember - public secretKeys?: string[]; - - // @DataMember - public secretFormat?: SecretValueFormat; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class EmailCampaignRequest -{ - public source: EmailCampaignRecipientsSourceTypes; - public templateId: string; - public integrationId?: string; - public validationIntegrationId?: string; - public language?: string; - public initiatorId?: string; - public notes?: string; - // @DataMember - public mappedTokens?: TokenMappingDto[]; - - // @DataMember - public campaignTime?: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class EmailToAllUsersDeliverySettingsRequest extends EmailCampaignRequest -{ - public source: EmailCampaignRecipientsSourceTypes; - public rolesNames?: string[]; - public userTags?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EmailToAccountUsersDeliverySettingsRequest extends EmailCampaignRequest -{ - public source: EmailCampaignRecipientsSourceTypes; - public userRecipients: string[] = []; - public userCc?: string[]; - public userBcc?: string[]; - public singleEmailStrategy: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum CollectionEmailCampaignRecipientField -{ - User = 'User', - Email = 'Email', -} - -export class EmailToCollectionRecordsDeliverySettingsRequest extends EmailCampaignRequest -{ - public source: EmailCampaignRecipientsSourceTypes; - public fields: string[] = []; - public schemaName: string; - public fieldType: CollectionEmailCampaignRecipientField; - public roleNames?: string[]; - public languages?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EmailToEmailsDeliverySettingsRequest extends EmailCampaignRequest -{ - public source: EmailCampaignRecipientsSourceTypes; - public recipients: string[] = []; - public recipientsCc?: string[]; - public recipientsBcc?: string[]; - public singleEmailStrategy: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EmailToUsersDeliverySettingsRequest extends EmailCampaignRequest -{ - public source: EmailCampaignRecipientsSourceTypes; - public userRecipients: string[] = []; - public userCc?: string[]; - public userBcc?: string[]; - public singleEmailStrategy: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum TriggerType -{ - Membership = 'Membership', - Schema = 'Schema', - Files = 'Files', - Payments = 'Payments', - Ai = 'Ai', -} - -export enum TriggerActionType -{ - Code = 'Code', - Push = 'Push', - Sms = 'Sms', - Email = 'Email', - WebhookCall = 'WebhookCall', - SseCall = 'SseCall', - Marketplace = 'Marketplace', -} - -// @DataContract -export class TriggerActionDto -{ - // @DataMember - public type: TriggerActionType; - - // @DataMember - public integrationId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SaveTriggerRequest -{ - public type: TriggerType; - public triggerId?: string; - public name: string; - public description?: string; - public isEnabled: boolean; - public preExecuteCode?: string; - public order?: number; - public breakOnError: boolean; - public action: TriggerActionDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum MembershipTriggerType -{ - OnRegistered = 'OnRegistered', - OnInvited = 'OnInvited', - OnVerified = 'OnVerified', - OnUpdated = 'OnUpdated', - OnDeleted = 'OnDeleted', - OnBlocked = 'OnBlocked', - OnReactivated = 'OnReactivated', - OnUserCreated = 'OnUserCreated', -} - -export class MembershipTriggerRequest extends SaveTriggerRequest -{ - public type: TriggerType; - public when: MembershipTriggerType; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum SchemaTriggerType -{ - OnInserted = 'OnInserted', - OnDeleted = 'OnDeleted', - OnUpdated = 'OnUpdated', - OnInsertedMany = 'OnInsertedMany', - OnUpdatedMany = 'OnUpdatedMany', - OnDeletedMany = 'OnDeletedMany', -} - -export class SchemaTriggerRequest extends SaveTriggerRequest -{ - public type: TriggerType; - public schemaId: string; - public when: SchemaTriggerType; - public configurationCode?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum FilesTriggerType -{ - OnFileUploaded = 'OnFileUploaded', - OnFileDeleted = 'OnFileDeleted', -} - -export class FilesTriggerRequest extends SaveTriggerRequest -{ - public type: TriggerType; - public when: FilesTriggerType; - public folder?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum PaymentTriggerType -{ - OnOrderCreated = 'OnOrderCreated', - OnOrderPaid = 'OnOrderPaid', - OnWebhookCallReceived = 'OnWebhookCallReceived', - OnOrderPaymentChanged = 'OnOrderPaymentChanged', -} - -export class PaymentTriggerRequest extends SaveTriggerRequest -{ - public type: TriggerType; - public when: PaymentTriggerType; - public integrations?: string[]; - public events?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum DatabaseProvider -{ - MongoDbConnectionString = 'MongoDbConnectionString', - CodeMashMongoDbAtlasFlexManaged = 'CodeMashMongoDbAtlasFlexManaged', -} - -export class DatabaseIntegrationRequest -{ - public integrationId?: string; - public provider: DatabaseProvider; - public integrationName: string; - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class MongoDbConnectionStringDatabaseIntegrationRequest extends DatabaseIntegrationRequest -{ - public provider: DatabaseProvider; - public databaseName?: string; - public connectionString: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MongoDbAtlasFlexManagedDatabaseIntegrationRequest extends DatabaseIntegrationRequest -{ - public provider: DatabaseProvider; - public norbixRegionCode: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum FileProvider -{ - Local = 'Local', - AwsS3 = 'AwsS3', - AzureBlobStorage = 'AzureBlobStorage', - GoogleCloudStorage = 'GoogleCloudStorage', - Ftp = 'Ftp', - AppleICloud = 'AppleICloud', - DropBox = 'DropBox', - GoogleDrive = 'GoogleDrive', -} - -export class FilesIntegrationRequest -{ - public integrationId?: string; - public provider: FileProvider; - public integrationName: string; - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class GoogleDriveFilesIntegrationRequest extends FilesIntegrationRequest -{ - public provider: FileProvider; - public rootFolderId?: string; - public serviceAccountJsonKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FtpFilesIntegrationRequest extends FilesIntegrationRequest -{ - public provider: FileProvider; - public host: string; - public port: number; - public rootPath?: string; - public useSsl: boolean; - public username: string; - public password: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DropBoxFilesIntegrationRequest extends FilesIntegrationRequest -{ - public provider: FileProvider; - public rootPath?: string; - public accessToken: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AppleICloudFilesIntegrationRequest extends FilesIntegrationRequest -{ - public provider: FileProvider; - public containerIdentifier: string; - public relativePath?: string; - public keyId: string; - public teamId: string; - public bundleId: string; - public p8PrivateKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum AwsS3IntegrationType -{ - Iam = 'Iam', - CrossAccountRole = 'CrossAccountRole', -} - -export class AwsS3FilesIntegrationRequest extends FilesIntegrationRequest -{ - public provider: FileProvider; - public integrationType: AwsS3IntegrationType; - public bucketName: string; - public region: string; - public roleArn?: string; - public externalId?: string; - public accessKey?: string; - public secretKey?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleCloudFilesIntegrationRequest extends FilesIntegrationRequest -{ - public provider: FileProvider; - public bucketName: string; - public serviceAccountJsonKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AzureBlobFilesIntegrationRequest extends FilesIntegrationRequest -{ - public provider: FileProvider; - public blobName: string; - public connectionString: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class LocalFilesIntegrationRequest extends FilesIntegrationRequest -{ - public provider: FileProvider; - public rootPath?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum LoggingProvider -{ - Console = 'Console', - NorbixLogging = 'NorbixLogging', - DataDog = 'DataDog', - NewRelic = 'NewRelic', - Sentry = 'Sentry', - GrafanaLoki = 'GrafanaLoki', - Axiom = 'Axiom', - ElasticCloud = 'ElasticCloud', - AWSCloudWatch = 'AWSCloudWatch', - GCPCloudLogging = 'GCPCloudLogging', - AzureMonitorLogs = 'AzureMonitorLogs', - GenericHttp = 'GenericHttp', - Kafka = 'Kafka', - AMQP = 'AMQP', - Prometheus = 'Prometheus', - AzureOTel = 'AzureOTel', - Splunk = 'Splunk', - ElasticSearch = 'ElasticSearch', - Kibana = 'Kibana', - LocalFile = 'LocalFile', - AWSS3 = 'AWSS3', - AWSKinesis = 'AWSKinesis', - MongoDB = 'MongoDB', - InternalKafka = 'InternalKafka', -} - -export class LoggingIntegrationRequest -{ - public integrationId?: string; - public provider: LoggingProvider; - public integrationName: string; - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AmqpLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public host: string; - public port: number; - public virtualHost: string; - public exchange: string; - public routingKey: string; - public username: string; - public password: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsKinesisLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public streamName: string; - public region: string; - public accessKey: string; - public secretKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum AwsS3LoggingIntegrationType -{ - Iam = 'Iam', - CrossAccountRole = 'CrossAccountRole', -} - -export class AwsS3LoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public integrationType: AwsS3LoggingIntegrationType; - public bucketName: string; - public region: string; - public roleArn?: string; - public externalId?: string; - public accessKey?: string; - public secretKey?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class NewRelicLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public region: string; - public serviceName: string; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MongoDbLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public databaseName?: string; - public connectionString: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class KafkaLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public bootstrapServers: string; - public topic: string; - public securityProtocol?: string; - public saslUsername?: string; - public saslPassword?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PrometheusLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public endpointUrl: string; - public jobName?: string; - public bearerToken?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DataDogLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public site: string; - public serviceName: string; - public environment: string; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class InternalKafkaLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public bootstrapServers: string; - public topic: string; - public securityProtocol?: string; - public saslUsername?: string; - public saslPassword?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ElasticSearchLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public uri: string; - public index: string; - public username?: string; - public password?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SplunkLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public hecEndpointUrl: string; - public index: string; - public hecToken: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AzureOtelLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public endpointUrl: string; - public resourceName: string; - public connectionString: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class KibanaLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public uri: string; - public spaceId?: string; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class LocalFileLoggingIntegrationRequest extends LoggingIntegrationRequest -{ - public provider: LoggingProvider; - public rootPath?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum MembershipProvider -{ - AppleSignIn = 'AppleSignIn', - GoogleSignIn = 'GoogleSignIn', - Google = 'Google', - Facebook = 'Facebook', - X = 'X', - GitHub = 'GitHub', - LinkedIn = 'LinkedIn', - Okta = 'Okta', - Microsoft = 'Microsoft', -} - -export class MembershipIntegrationRequest -{ - public integrationId?: string; - public provider: MembershipProvider; - public integrationName: string; - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class DisplayName -{ - public value: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class RoleName -{ - public name: string; - public displayName: string; - // @Ignore() - public isAdministrator: boolean; - - // @Ignore() - public isAuthenticated: boolean; - - // @Ignore() - public isGuest: boolean; - - // @Ignore() - public isRootRole: boolean; - - // @Ignore() - public isCollaboratorRole: boolean; - - // @Ignore() - public isProjectSystemRole: boolean; - - // @Ignore() - public isAccountSystemRole: boolean; - - // @Ignore() - public isSystemRole: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class OAuthModeConfig -{ - public name: DisplayName; - public callbackUrl: string; - public logoutUrl?: string; - public failureRedirectUrl?: string; - public roleName?: RoleName; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class OktaMembershipIntegrationRequest extends MembershipIntegrationRequest -{ - public provider: MembershipProvider; - public domain: string; - public clientId: string; - public clientSecret: string; - public oAuthModes?: OAuthModeConfig[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class XMembershipIntegrationRequest extends MembershipIntegrationRequest -{ - public provider: MembershipProvider; - public apiKey: string; - public apiSecretKey: string; - public oAuthModes?: OAuthModeConfig[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleMembershipIntegrationRequest extends MembershipIntegrationRequest -{ - public provider: MembershipProvider; - public clientId: string; - public clientSecret: string; - public oAuthModes?: OAuthModeConfig[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MicrosoftMembershipIntegrationRequest extends MembershipIntegrationRequest -{ - public provider: MembershipProvider; - public tenantId: string; - public clientId: string; - public clientSecret: string; - public oAuthModes?: OAuthModeConfig[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GitHubMembershipIntegrationRequest extends MembershipIntegrationRequest -{ - public provider: MembershipProvider; - public clientId: string; - public clientSecret: string; - public oAuthModes?: OAuthModeConfig[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MetaMembershipIntegrationRequest extends MembershipIntegrationRequest -{ - public provider: MembershipProvider; - public appId: string; - public appSecret: string; - public oAuthModes?: OAuthModeConfig[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AppleMembershipIntegrationRequest extends MembershipIntegrationRequest -{ - public provider: MembershipProvider; - public teamId: string; - public appBundleId: string; - public serviceId: string; - public keyId: string; - public privateKey: string; - public isProduction: boolean; - public oAuthModes?: OAuthModeConfig[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum PaymentGatewayPlatform -{ - Stripe = 'Stripe', - Adyen = 'Adyen', - Paddle = 'Paddle', - LemonSqueezy = 'LemonSqueezy', - AppleInApp = 'AppleInApp', - GoogleInApp = 'GoogleInApp', - Shopify = 'Shopify', - WooCommerce = 'WooCommerce', - Magento = 'Magento', - PayPal = 'PayPal', - Braintree = 'Braintree', - AuthorizeNet = 'AuthorizeNet', - CheckOutCom = 'CheckOutCom', - Mollie = 'Mollie', - Worldpay = 'Worldpay', - Montonio = 'Montonio', -} - -export class PaymentIntegrationRequest -{ - public integrationId?: string; - public provider: PaymentGatewayPlatform; - public integrationName: string; - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class LemonSqueezyPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public storeId: string; - public apiKey: string; - public webhookSigningSecret: string; - public isTestMode: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AdyenPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public merchantAccount: string; - public apiKey: string; - public environment: string; - public webhookId?: string; - public webhookHmacKey?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MolliePaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public profileId: string; - public apiKey: string; - public isTestMode: boolean; - public webhookSigningSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PaddlePaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public apiKey: string; - public webhookEndpointSecretKey: string; - public environment: string; - public clientSideToken?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PayPalPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public clientId: string; - public clientSecret: string; - public environment: string; - public brandName?: string; - public webhookId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class StripePaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public publishableKey: string; - public secretKey: string; - public webhookSigningSecret: string; - public webhookEndpointId?: string; - public defaultCurrency?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AppleInAppPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public merchantIdentifier: string; - public merchantDomain: string; - public displayName: string; - public merchantIdentityCertificateP12Base64: string; - public merchantIdentityCertificatePassword: string; - public paymentProcessingCertificateP12Base64: string; - public paymentProcessingCertificatePassword: string; - public webhookBundleId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleInAppPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public merchantId: string; - public merchantName: string; - public gateway: string; - public privateKeyOrToken: string; - public gatewayMerchantId?: string; - public webhookPackageName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MontonioPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public accessKey: string; - public secretKey: string; - public isSandbox: boolean; - public locale?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ShopifyPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public shopDomain: string; - public webhookSecret: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class WooCommercePaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public storeUrl: string; - public webhookSecret: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MagentoPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public storeUrl: string; - public webhookSecret: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class BraintreePaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public merchantId: string; - public environment: string; - public privateKey: string; - public webhookSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AuthorizeNetPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public merchantLoginId: string; - public environment: string; - public transactionKey: string; - public webhookSignatureKey?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class CheckOutComPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public merchantAccount: string; - public environment: string; - public secretKey: string; - public webhookSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class WorldpayPaymentIntegrationRequest extends PaymentIntegrationRequest -{ - public provider: PaymentGatewayPlatform; - public merchantCode: string; - public environment: string; - public apiKey: string; - public webhookSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export enum PushProvider -{ - AppleApns = 'AppleApns', - SafariWeb = 'SafariWeb', - SafariPush = 'SafariPush', - AndroidFirebase = 'AndroidFirebase', - ChromeWeb = 'ChromeWeb', - FirefoxWeb = 'FirefoxWeb', - EdgeWeb = 'EdgeWeb', - ChromePush = 'ChromePush', - CodeMashIosApp = 'CodeMashIosApp', - CodeMashAndroidApp = 'CodeMashAndroidApp', - CodeMashSafariPlugin = 'CodeMashSafariPlugin', - CodeMashSafariWeb = 'CodeMashSafariWeb', - CodeMashChromePlugin = 'CodeMashChromePlugin', - CodeMashChromeWeb = 'CodeMashChromeWeb', - Expo = 'Expo', - Fake = 'Fake', -} - -export class PushIntegrationRequest -{ - public integrationId?: string; - public provider: PushProvider; - public integrationName: string; - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class EdgeWebPushIntegrationRequest extends PushIntegrationRequest -{ - public provider: PushProvider; - /** @description VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. */ - // @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) - public vapidPublicKey: string; - - /** @description VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. */ - // @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) - public vapidPrivateKey: string; - - /** @description Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. */ - // @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") - public subject?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ChromePluginPushIntegrationRequest extends PushIntegrationRequest -{ - public provider: PushProvider; - /** @description The extension's Chrome id: 32 lower-case letters a–p, as shown on chrome://extensions. */ - // @ApiMember(Description="The extension's Chrome id: 32 lower-case letters a–p, as shown on chrome://extensions.", IsRequired=true) - public extensionId: string; - - /** @description VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. */ - // @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) - public vapidPublicKey: string; - - /** @description VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. */ - // @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) - public vapidPrivateKey: string; - - /** @description Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. */ - // @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") - public subject?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SafariPushIntegrationRequest extends PushIntegrationRequest -{ - public provider: PushProvider; - public websitePushId: string; - public certificateP12Base64: string; - public certificatePassword: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ChromeWebPushIntegrationRequest extends PushIntegrationRequest -{ - public provider: PushProvider; - /** @description VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. */ - // @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) - public vapidPublicKey: string; - - /** @description VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. */ - // @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) - public vapidPrivateKey: string; - - /** @description Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. */ - // @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") - public subject?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FirefoxWebPushIntegrationRequest extends PushIntegrationRequest -{ - public provider: PushProvider; - /** @description VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. */ - // @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) - public vapidPublicKey: string; - - /** @description VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. */ - // @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) - public vapidPrivateKey: string; - - /** @description Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. */ - // @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") - public subject?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AndroidFirebasePushIntegrationRequest extends PushIntegrationRequest -{ - public provider: PushProvider; - public projectId: string; - public clientEmail: string; - public serviceAccountJson: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AppleApnsPushIntegrationRequest extends PushIntegrationRequest -{ - public provider: PushProvider; - public teamId: string; - public appBundleId: string; - public keyId: string; - public privateKey: string; - public isProduction: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum CodeProvider -{ - AwsLambda = 'AwsLambda', - AzureFunctions = 'AzureFunctions', - GoogleCloudFunctions = 'GoogleCloudFunctions', - Pipedream = 'Pipedream', - Zapier = 'Zapier', - CloudflareWorkers = 'CloudflareWorkers', - Vercel = 'Vercel', - Netlify = 'Netlify', - SupabaseEdge = 'SupabaseEdge', - Modal = 'Modal', - Fake = 'Fake', -} - -export class CodeIntegrationRequest -{ - public integrationId?: string; - public provider: CodeProvider; - public integrationName: string; - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum AwsLambdaIntegrationType -{ - Iam = 'Iam', - CrossAccountRole = 'CrossAccountRole', -} - -export class AwsLambdaCodeIntegrationRequest extends CodeIntegrationRequest -{ - public provider: CodeProvider; - public integrationType: AwsLambdaIntegrationType; - public region: string; - public roleArn?: string; - public externalId?: string; - public accessKey?: string; - public secretKey?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AzureFunctionsCodeIntegrationRequest extends CodeIntegrationRequest -{ - public provider: CodeProvider; - public functionAppName: string; - public resourceGroup?: string; - public connectionStringOrKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleCloudFunctionsCodeIntegrationRequest extends CodeIntegrationRequest -{ - public provider: CodeProvider; - public projectId: string; - public region?: string; - public serviceAccountJsonKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum LlmProvider -{ - OpenAI = 'OpenAI', - Anthropic = 'Anthropic', - Ollama = 'Ollama', - Groq = 'Groq', - Google = 'Google', - Mistral = 'Mistral', - OpenRouter = 'OpenRouter', - Grok = 'Grok', - NorbixHosted = 'NorbixHosted', -} - -export class LlmModelOptionRequest -{ - public id: string; - public displayName?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class LlmIntegrationRequest -{ - public integrationId?: string; - public provider: LlmProvider; - public integrationName: string; - public isEnabled: boolean; - public endpoint?: string; - public defaultModel?: string; - public isDefault: boolean; - public models?: LlmModelOptionRequest[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class OllamaLlmIntegrationRequest extends LlmIntegrationRequest -{ - public provider: LlmProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class OpenRouterLlmIntegrationRequest extends LlmIntegrationRequest implements ILlmApiKeyRequest -{ - public provider: LlmProvider; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MistralLlmIntegrationRequest extends LlmIntegrationRequest implements ILlmApiKeyRequest -{ - public provider: LlmProvider; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GrokLlmIntegrationRequest extends LlmIntegrationRequest implements ILlmApiKeyRequest -{ - public provider: LlmProvider; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GroqLlmIntegrationRequest extends LlmIntegrationRequest implements ILlmApiKeyRequest -{ - public provider: LlmProvider; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleLlmIntegrationRequest extends LlmIntegrationRequest implements ILlmApiKeyRequest -{ - public provider: LlmProvider; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AnthropicLlmIntegrationRequest extends LlmIntegrationRequest implements ILlmApiKeyRequest -{ - public provider: LlmProvider; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class OpenAiLlmIntegrationRequest extends LlmIntegrationRequest implements ILlmApiKeyRequest -{ - public provider: LlmProvider; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum McpProvider -{ - Docker = 'Docker', - Obsidian = 'Obsidian', - GoogleCalendar = 'GoogleCalendar', - Stripe = 'Stripe', - GitHub = 'GitHub', - MongoDb = 'MongoDb', - Playwright = 'Playwright', - BraveSearch = 'BraveSearch', -} - -export enum McpTransport -{ - Sse = 'Sse', - HttpStream = 'HttpStream', - Stdio = 'Stdio', -} - -export class McpIntegrationRequest -{ - public integrationId?: string; - public provider: McpProvider; - public transport: McpTransport; - public integrationName: string; - public isEnabled: boolean; - public name: string; - public category: string; - public description: string; - public icon: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PlaywrightMcpIntegrationRequest extends McpIntegrationRequest -{ - public provider: McpProvider; - public transport: McpTransport; - public command?: string; - public args?: string[]; - public headless: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MongoDbMcpIntegrationRequest extends McpIntegrationRequest -{ - public provider: McpProvider; - public transport: McpTransport; - public command?: string; - public args?: string[]; - public connectionString: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GitHubMcpIntegrationRequest extends McpIntegrationRequest -{ - public provider: McpProvider; - public transport: McpTransport; - public serverUrl: string; - public accessToken: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class StripeMcpIntegrationRequest extends McpIntegrationRequest -{ - public provider: McpProvider; - public transport: McpTransport; - public serverUrl: string; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class BraveSearchMcpIntegrationRequest extends McpIntegrationRequest -{ - public provider: McpProvider; - public transport: McpTransport; - public serverUrl: string; - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ObsidianMcpIntegrationRequest extends McpIntegrationRequest -{ - public provider: McpProvider; - public transport: McpTransport; - public command?: string; - public args?: string[]; - public environmentVariables?: { [index:string]: string; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum CommunicationChannel -{ - Transactional = 'Transactional', - Marketing = 'Marketing', - System = 'System', -} - -export enum NotificationMedium -{ - Email = 'Email', - Sms = 'Sms', - Push = 'Push', -} - -// @DataContract -export class TemplateDto implements IHasViewId, IHasDatabaseId -{ - // @DataMember - public id?: string; - - // @DataMember - public viewId: string; - - // @DataMember - public templateName: string; - - // @DataMember - public description?: string; - - // @DataMember - public communicationChannel: CommunicationChannel; - - // @DataMember - public medium: NotificationMedium; - - // @DataMember - public isActive: boolean; - - // @DataMember - public tags?: string[]; - - // @DataMember - public env?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum EmailTemplateEngine -{ - NotSet = 'NotSet', - Handlebars = 'Handlebars', - Mjml = 'Mjml', - Liquid = 'Liquid', - Razor = 'Razor', - Mustache = 'Mustache', -} - -// @DataContract -export class EmailBodyDto implements IHasRazorTemplateCode -{ - // @DataMember - public structure?: string; - - // @DataMember - public code: string; - - // @DataMember - public templateEngine: EmailTemplateEngine; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class FileChecksumDto -{ - // @DataMember(Order=1) - public algorithm: string; - - // @DataMember(Order=2) - public hash: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class FileResourceDto -{ - // @DataMember(Order=1) - public id?: string; - - // @DataMember(Order=2) - public originalFileName: string; - - // @DataMember(Order=3) - public extension: string; - - // @DataMember(Order=4) - public storedFileName: string; - - // @DataMember(Order=5) - public sizeBytes?: number; - - // @DataMember(Order=6) - public checksum?: FileChecksumDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class FileResourceRefDto -{ - // @DataMember(Order=1) - public resource: FileResourceDto; - - // @DataMember(Order=2) - public integrationId: string; - - // @DataMember(Order=3) - public provider: FileProvider; - - // @DataMember(Order=4) - public path: string; - - // @DataMember(Order=5) - public publicUrl?: string; - - // @DataMember(Order=6) - public isPublic: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailMessageContentDto implements IHasRazorTemplateCode -{ - // @DataMember - public subject: string; - - // @DataMember - public body: EmailBodyDto; - - // @DataMember - public staticAttachments?: FileResourceRefDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailMessageTranslationDto implements IHasRazorTemplateCode -{ - // @DataMember - public language: string; - - // @DataMember - public content: EmailMessageContentDto; - - // @DataMember - public staticAttachments?: FileResourceRefDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailTemplateDto extends TemplateDto implements IBindableContract -{ - // @DataMember - public translations: EmailMessageTranslationDto[] = []; - - // @DataMember - public staticAttachments?: FileResourceRefDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PushMessageContentDto implements IHasRazorTemplateCode -{ - // @DataMember - public title: string; - - // @DataMember - public body: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PushMessageTranslationDto implements IHasRazorTemplateCode -{ - // @DataMember - public language: string; - - // @DataMember - public content: PushMessageContentDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PushTemplateDto extends TemplateDto implements IHasRazorTemplateCode, IBindableContract -{ - // @DataMember - public translations: PushMessageTranslationDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsMessageContentDto implements IHasRazorTemplateCode -{ - // @DataMember - public body: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsMessageTranslationDto implements IHasRazorTemplateCode -{ - // @DataMember - public language: string; - - // @DataMember - public content: SmsMessageContentDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsTemplateDto extends TemplateDto implements IHasRazorTemplateCode, IBindableContract -{ - // @DataMember - public translations: SmsMessageTranslationDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum SystemEmailTemplateTheme -{ - Text = 'Text', - Branded = 'Branded', - Creative = 'Creative', -} - -// @DataContract -export class SystemEmailTemplateDto extends EmailTemplateDto -{ - // @DataMember - public imagePreview: string; - - // @DataMember - public theme: SystemEmailTemplateTheme; - - // @DataMember - public systemGroup: string; - - // @DataMember - public systemTags?: string[]; - - // @DataMember - public forTrigger?: TriggerType; - - // @DataMember - public hiddenSystemEmailTemplate: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @Flags() -export enum RespectTimeZoneSettings -{ - RespectToLastLoginZone = 1, - RespectToRegistrationZone = 2, - RespectToRegistrationProjectZone = 4, -} - -export class EmailCampaignDeliverySettingsDto -{ - // @DataMember - public recipientsSourceType: EmailCampaignRecipientsSourceTypes; - - // @DataMember - public mappedTokens?: TokenMappingDto[]; - - // @DataMember - public campaignTime?: number; - - // @DataMember - public respectTimeZoneSettings?: RespectTimeZoneSettings; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TriggerActionEmailDto extends TriggerActionDto -{ - // @DataMember - public templateId: string; - - // @DataMember - public deliverySettings: EmailCampaignDeliverySettingsDto; - - // @DataMember - public language?: string; - - // @DataMember - public initiatorId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum PushCampaignRecipientsSourceTypes -{ - AllUsers = 'AllUsers', - SpecifiedUsers = 'SpecifiedUsers', - Collection = 'Collection', - Devices = 'Devices', - AccountUsers = 'AccountUsers', -} - -// @DataContract -export class PushCampaignDeliverySettingsDto -{ - // @DataMember - public recipientsSourceType: PushCampaignRecipientsSourceTypes; - - // @DataMember - public mappedTokens?: TokenMappingDto[]; - - // @DataMember - public campaignTime?: number; - - // @DataMember - public respectTimeZoneSettings?: RespectTimeZoneSettings; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TriggerActionPushDto extends TriggerActionDto -{ - // @DataMember - public templateId: string; - - // @DataMember - public deliverySettings: PushCampaignDeliverySettingsDto; - - // @DataMember - public language?: string; - - // @DataMember - public initiatorId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class FunctionRefDto -{ - // @DataMember - public integrationId: string; - - // @DataMember - public provider?: CodeProvider; - - // @DataMember - public functionId: string; - - // @DataMember - public qualifier?: string; - - // @DataMember - public displayName?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum CodeInvocationType -{ - Sync = 'Sync', - Async = 'Async', -} - -// @DataContract -export class CodeDeliverySettingsDto -{ - // @DataMember - public mappedTokens?: TokenMappingDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TriggerActionCodeDto extends TriggerActionDto -{ - // @DataMember - public functionRef?: FunctionRefDto; - - // @DataMember - public runAsUserId?: string; - - // @DataMember - public invocationType: CodeInvocationType; - - // @DataMember - public config?: string; - - // @DataMember - public deliverySettings?: CodeDeliverySettingsDto; - - // @DataMember - public functionId?: string; - - // @DataMember - public activationCode?: string; - - // @DataMember - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class WebhookDeliverySettingsDto -{ - // @DataMember - public destinationIds?: string[]; - - // @DataMember - public eventName?: string; - - // @DataMember - public contentType?: string; - - // @DataMember - public includeRawPayload: boolean; - - // @DataMember - public mappedTokens?: TokenMappingDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TriggerActionWebhookDto extends TriggerActionDto -{ - // @DataMember - public deliverySettings?: WebhookDeliverySettingsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum SmsCampaignRecipientsSourceTypes -{ - AllUsers = 'AllUsers', - SpecifiedUsers = 'SpecifiedUsers', - AccountUsers = 'AccountUsers', - PhoneNumbers = 'PhoneNumbers', - Collection = 'Collection', -} - -// @DataContract -export class SmsCampaignDeliverySettingsDto -{ - // @DataMember - public recipientsSourceType: SmsCampaignRecipientsSourceTypes; - - // @DataMember - public mappedTokens?: TokenMappingDto[]; - - // @DataMember - public campaignTime?: number; - - // @DataMember - public respectTimeZoneSettings?: RespectTimeZoneSettings; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TriggerActionSmsDto extends TriggerActionDto -{ - // @DataMember - public templateId: string; - - // @DataMember - public deliverySettings: SmsCampaignDeliverySettingsDto; - - // @DataMember - public language?: string; - - // @DataMember - public initiatorId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SseDeliverySettingsDto -{ - // @DataMember - public audience: string; - - // @DataMember - public userAuthIds?: string[]; - - // @DataMember - public eventName?: string; - - // @DataMember - public payloadType?: string; - - // @DataMember - public payloadTemplate?: string; - - // @DataMember - public persist: boolean; - - // @DataMember - public mappedTokens?: TokenMappingDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TriggerActionSseDto extends TriggerActionDto -{ - // @DataMember - public deliverySettings: SseDeliverySettingsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TriggerActionMarketplaceDto extends TriggerActionDto -{ - // @DataMember - public functionId: string; - - // @DataMember - public payload?: { [index:string]: string; }; - - // @DataMember - public runAsUserId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract(Namespace="http://codemash.io/types/") -export class RequestBase implements IVersionBasedRequest, IHasCorrelationIdRequest -{ - /** @description TimeZone */ - // @DataMember - // @ApiMember(DataType="string", Description="TimeZone", Name="TimeZoneId", ParameterType="header") - public timeZoneId?: string; - - /** @description The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v3 */ - // @DataMember - // @ApiMember(DataType="string", Description="The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v3", IsRequired=true, Name="version", ParameterType="path") - public version: string; - - /** @description CorrelationId for each request */ - // @DataMember - // @ApiMember(DataType="string", Description="CorrelationId for each request", Name="CorrelationId", ParameterType="header") - public correlationId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class CodeMashListPaginationRequestBase extends RequestBase implements IHasProjectId, IHasEnv -{ - /** @description ID of your project. Can be passed in a header as norbix-project-id. */ - // @DataMember - // @ApiMember(DataType="string", Description="ID of your project. Can be passed in a header as norbix-project-id.", IsRequired=true, Name="norbix-project-id", ParameterType="header") - public projectId: string; - - /** @description Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env. */ - // @DataMember - // @ApiMember(DataType="string", Description="Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env.", Name="norbix-env", ParameterType="header") - public env?: string; - - /** @description Cursor token — fetch the page AFTER this item. */ - // @DataMember - // @ApiMember(DataType="string", Description="Cursor token — fetch the page AFTER this item.", Name="startingAfter", ParameterType="query") - public startingAfter?: string; - - /** @description Cursor token — fetch the page BEFORE this item. */ - // @DataMember - // @ApiMember(DataType="string", Description="Cursor token — fetch the page BEFORE this item.", Name="endingBefore", ParameterType="query") - public endingBefore?: string; - - /** @description Amount of records to return. */ - // @DataMember - // @ApiMember(DataType="integer", Description="Amount of records to return.", Format="int32", Name="pageSize", ParameterType="query") - public pageSize?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class GetTriggers extends CodeMashListPaginationRequestBase -{ - // @DataMember - public schemaId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ErrorDto -{ - public message: string; - public errorCode?: string; - public context?: { [index:string]: string; }; - public stackTrace?: ErrorDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class CodeMashResponseStatus -{ - public isSuccess: boolean; - public errors?: ErrorDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ResponseBase -{ - // @DataMember - public responseStatus: CodeMashResponseStatus; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class GetTriggersResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailToAllUsersDeliverySettingsDto extends EmailCampaignDeliverySettingsDto -{ - // @DataMember - public rolesNames?: string[]; - - // @DataMember - public userTags?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailToAccountUsersDeliverySettingsDto extends EmailCampaignDeliverySettingsDto -{ - // @DataMember - public userRecipients: string[] = []; - - // @DataMember - public userCc?: string[]; - - // @DataMember - public userBcc?: string[]; - - // @DataMember - public singleEmailStrategy: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailToUsersDeliverySettingsDto extends EmailCampaignDeliverySettingsDto -{ - // @DataMember - public userRecipients: string[] = []; - - // @DataMember - public userCc?: string[]; - - // @DataMember - public userBcc?: string[]; - - // @DataMember - public singleEmailStrategy: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailToEmailAddressesDeliverySettingsDto extends EmailCampaignDeliverySettingsDto -{ - // @DataMember - public recipients: string[] = []; - - // @DataMember - public recipientsCc?: string[]; - - // @DataMember - public recipientsBcc?: string[]; - - // @DataMember - public singleEmailStrategy: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailToCollectionRecordsDeliverySettingsDto extends EmailCampaignDeliverySettingsDto -{ - // @DataMember - public fields: string[] = []; - - // @DataMember - public schemaName: string; - - // @DataMember - public fieldType: CollectionEmailCampaignRecipientField; - - // @DataMember - public roleNames?: string[]; - - // @DataMember - public languages?: string[]; - - // @DataMember - public recordIds?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum PushDeviceDeliveryFamily -{ - Ios = 'Ios', - Android = 'Android', - Chrome = 'Chrome', - Safari = 'Safari', - Expo = 'Expo', -} - -// @DataContract -export class PushToAllUsersDeliverySettingsDto extends PushCampaignDeliverySettingsDto -{ - // @DataMember - public rolesNames?: string[]; - - // @DataMember - public userTags?: string[]; - - // @DataMember - public platforms?: PushDeviceDeliveryFamily[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PushToUsersDeliverySettingsDto extends PushCampaignDeliverySettingsDto -{ - // @DataMember - public recipients: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PushToAccountUsersDeliverySettingsDto extends PushCampaignDeliverySettingsDto -{ - // @DataMember - public recipients: string[] = []; - - // @DataMember - public platforms?: PushDeviceDeliveryFamily[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PushToCollectionRecordsDeliverySettingsDto extends PushCampaignDeliverySettingsDto -{ - // @DataMember - public fields: string[] = []; - - // @DataMember - public fieldType: CollectionEmailCampaignRecipientField; - - // @DataMember - public schemaName: string; - - // @DataMember - public roleNames?: string[]; - - // @DataMember - public languages?: string[]; - - // @DataMember - public recordIds?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PushDeviceDeliveryTokenDto -{ - // @DataMember - public pushDeviceToken: string; - - // @DataMember - public deliveryFamily: PushDeviceDeliveryFamily; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PushToDevicesDeliverySettingsDto extends PushCampaignDeliverySettingsDto -{ - // @DataMember - public devices: PushDeviceDeliveryTokenDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsToAllUsersDeliverySettingsDto extends SmsCampaignDeliverySettingsDto -{ - // @DataMember - public rolesNames?: string[]; - - // @DataMember - public userTags?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsToUsersDeliverySettingsDto extends SmsCampaignDeliverySettingsDto -{ - // @DataMember - public recipients: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsToAccountUsersDeliverySettingsDto extends SmsCampaignDeliverySettingsDto -{ - // @DataMember - public recipients: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsToCollectionRecordsDeliverySettingsDto extends SmsCampaignDeliverySettingsDto -{ - // @DataMember - public fields: string[] = []; - - // @DataMember - public fieldType: CollectionEmailCampaignRecipientField; - - // @DataMember - public schemaName: string; - - // @DataMember - public roleNames?: string[]; - - // @DataMember - public languages?: string[]; - - // @DataMember - public recordIds?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsToPhoneNumbersDeliverySettingsDto extends SmsCampaignDeliverySettingsDto -{ - // @DataMember - public phoneNumbers: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class IntegrationDto implements IHasViewId -{ - public viewId: string; - public integrationName: string; - public isEnabled: boolean; - public env?: string; - public lastIntegrationTestAtUtc?: string; - public lastIntegrationTestSucceeded?: boolean; - public lastIntegrationTestErrors: IReadOnlyList; - public humanDeliveryConfirmedAtUtc?: string; - public requiresHumanDeliveryConfirmation: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class LlmModelOptionDto -{ - public id: string; - public displayName: string; - public inputCreditRate: number; - public outputCreditRate: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class LlmIntegrationDto extends IntegrationDto -{ - public provider: LlmProvider; - public baseUrl?: string; - public defaultModel?: string; - public isConfigured: boolean; - public isSystemOwned: boolean; - public isDefault: boolean; - public models: LlmModelOptionDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class OpenAiLlmIntegrationDto extends LlmIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AnthropicLlmIntegrationDto extends LlmIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class OllamaLlmIntegrationDto extends LlmIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GroqLlmIntegrationDto extends LlmIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleLlmIntegrationDto extends LlmIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MistralLlmIntegrationDto extends LlmIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class OpenRouterLlmIntegrationDto extends LlmIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GrokLlmIntegrationDto extends LlmIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class McpMetadata -{ - public name: string; - public category: string; - public description: string; - public icon: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum McpAuth -{ - OAuth2 = 'OAuth2', - ApiKey = 'ApiKey', - None = 'None', -} - -export class McpIntegrationDto extends IntegrationDto -{ - public provider: McpProvider; - public transport: McpTransport; - public metadata: McpMetadata; - public isConfigured: boolean; - public isSystemOwned: boolean; - public command?: string; - public args?: string[]; - public serverUrl?: string; - public auth?: McpAuth; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DockerMcpIntegrationDto extends McpIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleCalendarMcpIntegrationDto extends McpIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ObsidianMcpIntegrationDto extends McpIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class CodeIntegrationDto extends IntegrationDto -{ - public provider: CodeProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsLambdaCrossAccountRoleCodeIntegrationDto extends CodeIntegrationDto -{ - public region: string; - public roleArn: string; - public externalId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsLambdaIamCodeIntegrationDto extends CodeIntegrationDto -{ - public region: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AzureFunctionsCodeIntegrationDto extends CodeIntegrationDto -{ - public functionAppName: string; - public resourceGroup?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleCloudFunctionsCodeIntegrationDto extends CodeIntegrationDto -{ - public projectId: string; - public region?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PaymentsIntegrationDto extends IntegrationDto -{ - public gatewayPlatform: PaymentGatewayPlatform; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AdyenPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public merchantAccount: string; - public environment: string; - public webhookId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AppleInAppPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public merchantIdentifier: string; - public merchantDomain: string; - public displayName: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleInAppPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public merchantId: string; - public merchantName: string; - public gateway: string; - public gatewayMerchantId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class LemonSqueezyPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public storeId: string; - public isTestMode: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MolliePaymentIntegrationDto extends PaymentsIntegrationDto -{ - public profileId: string; - public isTestMode: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PaddlePaymentIntegrationDto extends PaymentsIntegrationDto -{ - public environment: string; - public clientSideToken?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PayPalPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public clientId: string; - public environment: string; - public brandName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class StripePaymentIntegrationDto extends PaymentsIntegrationDto -{ - public publishableKey: string; - public webhookEndpointId?: string; - public defaultCurrency?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ShopifyPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public shopDomain: string; - public webhookSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class WooCommercePaymentIntegrationDto extends PaymentsIntegrationDto -{ - public storeUrl: string; - public webhookSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MagentoPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public storeUrl: string; - public webhookSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class BraintreePaymentIntegrationDto extends PaymentsIntegrationDto -{ - public merchantId: string; - public environment: string; - public webhookSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AuthorizeNetPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public merchantLoginId: string; - public environment: string; - public webhookSignatureKey?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class CheckOutComPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public merchantAccount: string; - public environment: string; - public webhookSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class WorldpayPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public merchantCode: string; - public environment: string; - public webhookSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MontonioPaymentIntegrationDto extends PaymentsIntegrationDto -{ - public accessKey: string; - public isSandbox: boolean; - public locale?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PaymentOrderLineDto -{ - // @DataMember - public sku: string; - - // @DataMember - public title: string; - - // @DataMember - public quantity: number; - - // @DataMember - public unitAmountMinor: number; - - // @DataMember - public amountMinor: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PaymentOrderCheckoutDto -{ - // @DataMember - public attempt: number; - - // @DataMember - public integrationId: string; - - // @DataMember - public provider: string; - - // @DataMember - public providerOrderId: string; - - // @DataMember - public providerReference: string; - - // @DataMember - public paymentUrl: string; - - // @DataMember - public method: string; - - // @DataMember - public startedOnUtc: string; - - // @DataMember - public expiresAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PaymentOrderDto -{ - // @DataMember - public id: string; - - // @DataMember - public env: string; - - // @DataMember - public buyerUserId: string; - - // @DataMember - public merchantReference: string; - - // @DataMember - public currency: string; - - // @DataMember - public priceVersion: string; - - // @DataMember - public lines: PaymentOrderLineDto[] = []; - - // @DataMember - public totalMinor: number; - - // @DataMember - public metadata: { [index:string]: string; } = {}; - - // @DataMember - public status: string; - - // @DataMember - public createdOnUtc: string; - - // @DataMember - public updatedOnUtc: string; - - // @DataMember - public checkouts: PaymentOrderCheckoutDto[] = []; - - // @DataMember - public settledMinor?: number; - - // @DataMember - public refundedMinor: number; - - // @DataMember - public paidOnUtc?: string; - - // @DataMember - public providerPaymentId?: string; - - // @DataMember - public mismatches: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PaymentEventDto -{ - public integrationId: string; - public provider: string; - public providerEventId: string; - public orderId?: string; - public eventName: string; - public status: string; - public amountMinor?: number; - public currency?: string; - public externalIds?: { [index:string]: string; }; - public occurredOn?: string; - public receivedOn: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PaymentOrderEventDto -{ - // @DataMember - public orderEventId: string; - - // @DataMember - public event: string; - - // @DataMember - public from: string; - - // @DataMember - public to: string; - - // @DataMember - public reason: string; - - // @DataMember - public order: PaymentOrderDto; - - // @DataMember - public payment: PaymentEventDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class MembershipIntegrationDto extends IntegrationDto -{ - public provider: MembershipProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AppleSignInMembershipIntegrationDto extends MembershipIntegrationDto -{ - public teamId: string; - public appBundleId: string; - public serviceId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GitHubMembershipIntegrationDto extends MembershipIntegrationDto -{ - public clientId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleMembershipIntegrationDto extends MembershipIntegrationDto -{ - public clientId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MetaMembershipIntegrationDto extends MembershipIntegrationDto -{ - public appId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MicrosoftMembershipIntegrationDto extends MembershipIntegrationDto -{ - public tenantId: string; - public clientId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class OktaMembershipIntegrationDto extends MembershipIntegrationDto -{ - public domain: string; - public clientId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class XMembershipIntegrationDto extends MembershipIntegrationDto -{ - public apiKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class LoggingIntegrationDto extends IntegrationDto -{ - public provider: LoggingProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AmqpLoggingIntegrationDto extends LoggingIntegrationDto -{ - public host: string; - public port: number; - public virtualHost: string; - public exchange: string; - public routingKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsKinesisLoggingIntegrationDto extends LoggingIntegrationDto -{ - public streamName: string; - public region: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsS3CrossAccountRoleLoggingIntegrationDto extends LoggingIntegrationDto -{ - public bucketName: string; - public region: string; - public roleArn: string; - public externalId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsS3IamLoggingIntegrationDto extends LoggingIntegrationDto -{ - public bucketName: string; - public region: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AzureOtelLoggingIntegrationDto extends LoggingIntegrationDto -{ - public endpointUrl: string; - public resourceName: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DataDogLoggingIntegrationDto extends LoggingIntegrationDto -{ - public site: string; - public serviceName: string; - public environment: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ElasticSearchLoggingIntegrationDto extends LoggingIntegrationDto -{ - public uri: string; - public index: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class InternalKafkaLoggingIntegrationDto extends LoggingIntegrationDto -{ - public bootstrapServers: string; - public topic: string; - public securityProtocol?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class KafkaLoggingIntegrationDto extends LoggingIntegrationDto -{ - public bootstrapServers: string; - public topic: string; - public securityProtocol?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class KibanaLoggingIntegrationDto extends LoggingIntegrationDto -{ - public uri: string; - public spaceId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class LocalFileLoggingIntegrationDto extends LoggingIntegrationDto -{ - public rootPath?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MongoDbLoggingIntegrationDto extends LoggingIntegrationDto -{ - public databaseName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class NewRelicLoggingIntegrationDto extends LoggingIntegrationDto -{ - public region: string; - public serviceName: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PrometheusLoggingIntegrationDto extends LoggingIntegrationDto -{ - public endpointUrl: string; - public jobName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SplunkLoggingIntegrationDto extends LoggingIntegrationDto -{ - public hecEndpointUrl: string; - public index: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FilesIntegrationDto extends IntegrationDto -{ - public provider: FileProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AppleICloudFilesIntegrationDto extends FilesIntegrationDto -{ - public containerIdentifier: string; - public relativePath?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsS3CrossAccountRoleFilesIntegrationDto extends FilesIntegrationDto -{ - public bucketName: string; - public region: string; - public roleArn: string; - public externalId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsS3IamFilesIntegrationDto extends FilesIntegrationDto -{ - public bucketName: string; - public region: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AzureBlobFilesIntegrationDto extends FilesIntegrationDto -{ - public blobName: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DropBoxFilesIntegrationDto extends FilesIntegrationDto -{ - public rootPath?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FtpFilesIntegrationDto extends FilesIntegrationDto -{ - public host: string; - public port: number; - public rootPath?: string; - public useSsl: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleCloudFilesIntegrationDto extends FilesIntegrationDto -{ - public bucketName: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GoogleDriveFilesIntegrationDto extends FilesIntegrationDto -{ - public rootFolderId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class LocalFilesIntegrationDto extends FilesIntegrationDto -{ - public rootPath?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DatabaseIntegrationDto extends IntegrationDto -{ - public provider: DatabaseProvider; - public isSystemOwned: boolean; - public canManageIndexes?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MongoDbConnectionStringIntegrationDto extends DatabaseIntegrationDto -{ - public databaseName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum IntegrationStatus -{ - Unknown = 'Unknown', - Pending = 'Pending', - Provisioning = 'Provisioning', - Active = 'Active', - Failed = 'Failed', - Deprovisioning = 'Deprovisioning', -} - -export class MongoDbAtlasFlexManagedIntegrationDto extends DatabaseIntegrationDto -{ - public databaseName?: string; - public norbixRegionCode: string; - public flexTierCode: string; - public status: IntegrationStatus; - public atlasProjectId?: string; - public atlasClusterName?: string; - public failureReason?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum SmsProvider -{ - Twilio = 'Twilio', - Vonage = 'Vonage', - Plivo = 'Plivo', - Telnyx = 'Telnyx', - Bird = 'Bird', - Telesign = 'Telesign', - Sinch = 'Sinch', - Fake = 'Fake', -} - -export class SmsIntegrationDto extends IntegrationDto -{ - public provider: SmsProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class BirdSmsIntegrationDto extends SmsIntegrationDto -{ - public originator: string; - public region: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PlivoSmsIntegrationDto extends SmsIntegrationDto -{ - public authId: string; - public fromPhoneNumber: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SinchSmsIntegrationDto extends SmsIntegrationDto -{ - public servicePlanId: string; - public fromPhoneNumber: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class TelesignSmsIntegrationDto extends SmsIntegrationDto -{ - public customerId: string; - public fromSender: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class TelnyxSmsIntegrationDto extends SmsIntegrationDto -{ - public messagingProfileId: string; - public fromPhoneNumber: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class TwilioSmsIntegrationDto extends SmsIntegrationDto -{ - public accountSid: string; - public fromPhoneNumber: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class VonageSmsIntegrationDto extends SmsIntegrationDto -{ - public apiKey: string; - public fromSender: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FakeSmsIntegrationDto extends SmsIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PushIntegrationDto extends IntegrationDto -{ - public provider: PushProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AndroidFirebasePushIntegrationDto extends PushIntegrationDto -{ - public projectId: string; - public clientEmail: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AppleApnsPushIntegrationDto extends PushIntegrationDto -{ - public teamId: string; - public appBundleId: string; - public keyId?: string; - public isProduction: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ChromePluginPushIntegrationDto extends PushIntegrationDto -{ - public extensionId: string; - public vapidPublicKey: string; - public subject?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ChromeWebPushIntegrationDto extends PushIntegrationDto -{ - public vapidPublicKey: string; - public subject?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EdgeWebPushIntegrationDto extends PushIntegrationDto -{ - public vapidPublicKey: string; - public subject?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FirefoxWebPushIntegrationDto extends PushIntegrationDto -{ - public vapidPublicKey: string; - public subject?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SafariPushIntegrationDto extends PushIntegrationDto -{ - public websitePushId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FakePushIntegrationDto extends PushIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EmailIntegrationDto extends IntegrationDto -{ - public provider: EmailProvider; - public emailAddress: string; - public emailSenderName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsSesEmailIntegrationDto extends EmailIntegrationDto -{ - public region: string; - public identityArn: string; - public configurationSetName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsCrossAccountRoleEmailIntegrationDto extends AwsSesEmailIntegrationDto -{ - public roleArn: string; - public externalId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AwsIamEmailIntegrationDto extends AwsSesEmailIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MailGunEmailIntegrationDto extends EmailIntegrationDto -{ - public domain: string; - public region: MailGunRegion; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SendGridEmailIntegrationDto extends EmailIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SmtpEmailIntegrationDto extends EmailIntegrationDto -{ - public hostName: string; - public port: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FakeEmailIntegrationDto extends EmailIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class WebhookDestinationDto -{ - // @DataMember - public viewId: string; - - // @DataMember - public destinationName: string; - - // @DataMember - public endpointUrl: string; - - // @DataMember - public selectedEvents: IReadOnlyList; - - // @DataMember - public extraHeaders?: IReadOnlyDictionary; - - // @DataMember - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class WebhookIntegrationDto extends IntegrationDto -{ - public isConfigured: boolean; - public destinations: IReadOnlyList; - public extraHeaders?: IReadOnlyDictionary; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum SchedulerTaskType -{ - EmailCampaign = 'EmailCampaign', - PushCampaign = 'PushCampaign', - SmsCampaign = 'SmsCampaign', - CodeFunctionalCall = 'CodeFunctionalCall', - WebhookCall = 'WebhookCall', - MarketplaceFunctionCall = 'MarketplaceFunctionCall', -} - -// @DataContract -export class SchedulerTaskDto -{ - // @DataMember - public projectId: string; - - // @DataMember - public taskId: string; - - // @DataMember - public name: string; - - // @DataMember - public description?: string; - - // @DataMember - public cron: string; - - // @DataMember - public type: SchedulerTaskType; - - // @DataMember - public payloadJson: string; - - // @DataMember - public initiatorId: string; - - // @DataMember - public isEnabled: boolean; - - // @DataMember - public stopOnError: boolean; - - // @DataMember - public env?: string; - - // @DataMember - public createdAtUnix?: number; - - // @DataMember - public updatedAtUnix?: number; - - // @DataMember - public endsAtUnix?: number; - - // @DataMember - public hasEnded: boolean; - - // @DataMember - public isFailing: boolean; - - // @DataMember - public lastFailureReason?: string; - - // @DataMember - public lastFailedAtUnix?: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchedulerTaskRequest -{ - public type: SchedulerTaskType; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class EmailCampaignSchedulerTaskRequest extends SchedulerTaskRequest -{ - public type: SchedulerTaskType; - public campaign?: EmailCampaignRequest; - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class IdResponse extends ResponseBase -{ - // @DataMember - public id?: string; - - // @DataMember - public status?: string; - - // @DataMember - public warnings?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract(Namespace="http://codemash.io/types/") -export class CodeMashRequestBase extends RequestBase implements IHasProjectId, IHasEnv -{ - /** @description ID of your project. Can be passed in a header as norbix-project-id. */ - // @DataMember - // @ApiMember(DataType="string", Description="ID of your project. Can be passed in a header as norbix-project-id.", IsRequired=true, Name="norbix-project-id", ParameterType="header") - public projectId: string; - - /** @description Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env. */ - // @DataMember - // @ApiMember(DataType="string", Description="Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env.", Name="norbix-env", ParameterType="header") - public env?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -/** @description Create SMS campaign */ -// @Route("/{version}/notifications/sms/campaigns", "POST") -// @Api(Description="Create SMS campaign") -// @DataContract -export class CreateSmsCampaignRequest extends CodeMashRequestBase implements IReturn -{ - /** @description SMS template id to send — pick one with get_sms_templates. Never invent it. */ - // @DataMember - // @ApiMember(Description="SMS template id to send — pick one with get_sms_templates. Never invent it.") - public templateId: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @DataMember - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - /** @description SMS provider integration id the campaign sends through — pick one with get_sms_integrations (the project default unless the user named another). Required; never invent it. */ - // @DataMember - // @ApiMember(Description="SMS provider integration id the campaign sends through — pick one with get_sms_integrations (the project default unless the user named another). Required; never invent it.", IsRequired=true) - public integrationId: string; - - /** @description Optional language code forcing one template translation for every recipient. */ - // @DataMember - // @ApiMember(Description="Optional language code forcing one template translation for every recipient.") - public language?: string; - - // @DataMember - public initiatorId?: string; - - /** @description Audience type: 'AllUsers' (every project member subscribed to the SMS channel — role-based delivery can address MILLIONS of contacts), 'SpecifiedUsers' (exact member ids), or 'PhoneNumbers' (raw phone numbers). Fill EXACTLY the settings object matching this value. 'Collection' delivery is not available from chat. */ - // @DataMember - // @ApiMember(Description="Audience type: 'AllUsers' (every project member subscribed to the SMS channel — role-based delivery can address MILLIONS of contacts), 'SpecifiedUsers' (exact member ids), or 'PhoneNumbers' (raw phone numbers). Fill EXACTLY the settings object matching this value. 'Collection' delivery is not available from chat.") - public deliveryType: SmsCampaignRecipientsSourceTypes; - - /** @description For deliveryType 'AllUsers'. JSON object: {"recipientsSourceType":"AllUsers","rolesNames":["authenticated"],"userTags":[],"campaignTime":}. rolesNames/userTags are optional narrowing filters — verify exact role names with get_roles. */ - // @DataMember - // @ApiMember(Description="For deliveryType 'AllUsers'. JSON object: {\"recipientsSourceType\":\"AllUsers\",\"rolesNames\":[\"authenticated\"],\"userTags\":[],\"campaignTime\":}. rolesNames/userTags are optional narrowing filters — verify exact role names with get_roles.") - public allUsers?: SmsToAllUsersDeliverySettingsDto; - - /** @description For deliveryType 'SpecifiedUsers'. JSON object: {"recipientsSourceType":"SpecifiedUsers","recipients":[],"campaignTime":}. */ - // @DataMember - // @ApiMember(Description="For deliveryType 'SpecifiedUsers'. JSON object: {\"recipientsSourceType\":\"SpecifiedUsers\",\"recipients\":[],\"campaignTime\":}.") - public specifiedUsers?: SmsToUsersDeliverySettingsDto; - - /** @description For deliveryType 'AccountUsers'. JSON object: {"recipientsSourceType":"AccountUsers","recipients":[],"campaignTime":}. Members without a phone number are skipped. */ - // @DataMember - // @ApiMember(Description="For deliveryType 'AccountUsers'. JSON object: {\"recipientsSourceType\":\"AccountUsers\",\"recipients\":[],\"campaignTime\":}. Members without a phone number are skipped.") - public accountUsers?: SmsToAccountUsersDeliverySettingsDto; - - // @DataMember - public collection?: SmsToCollectionRecordsDeliverySettingsDto; - - /** @description For deliveryType 'PhoneNumbers'. JSON object: {"recipientsSourceType":"PhoneNumbers","phoneNumbers":["+37060000000"],"campaignTime":}. Numbers in international format. */ - // @DataMember - // @ApiMember(Description="For deliveryType 'PhoneNumbers'. JSON object: {\"recipientsSourceType\":\"PhoneNumbers\",\"phoneNumbers\":[\"+37060000000\"],\"campaignTime\":}. Numbers in international format.") - public phoneNumbers?: SmsToPhoneNumbersDeliverySettingsDto; - - /** @description Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now. */ - // @DataMember - // @ApiMember(Description="Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now.") - public sendNow?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateSmsCampaignRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -export class SmsCampaignSchedulerTaskRequest extends SchedulerTaskRequest -{ - public type: SchedulerTaskType; - public campaign?: CreateSmsCampaignRequest; - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PushCampaignRequest -{ - public source: PushCampaignRecipientsSourceTypes; - public templateId: string; - public integrationId?: string; - public language?: string; - public initiatorId?: string; - public notes?: string; - // @DataMember - public mappedTokens?: TokenMappingDto[]; - - // @DataMember - public campaignTime?: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PushCampaignSchedulerTaskRequest extends SchedulerTaskRequest -{ - public type: SchedulerTaskType; - public campaign?: PushCampaignRequest; - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MongoDbAggregateDto implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public displayName: string; - - // @DataMember - public description?: string; - - // @DataMember - public schemaViewId: string; - - // @DataMember - public pipeline: string; - - // @DataMember - public joinedCollections?: string[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum MarketplaceTransport -{ - Mcp = 'Mcp', - Rest = 'Rest', - Code = 'Code', - Internal = 'Internal', - Sdk = 'Sdk', -} - -export enum MarketplaceCategory -{ - Other = 'Other', - Crm = 'Crm', - Erp = 'Erp', - Marketing = 'Marketing', - Communication = 'Communication', - Productivity = 'Productivity', - Storage = 'Storage', - Analytics = 'Analytics', - Identity = 'Identity', - Payments = 'Payments', - DevTools = 'DevTools', - Ai = 'Ai', - Files = 'Files', - Database = 'Database', - Calendar = 'Calendar', -} - -// @DataContract -export class MarketplaceValidationStepResultDto -{ - // @DataMember - public key: string; - - // @DataMember - public label: string; - - // @DataMember - public requiredForFunctions: boolean; - - // @DataMember - public succeeded: boolean; - - // @DataMember - public skipped: boolean; - - // @DataMember - public message?: string; - - // @DataMember - public errorCode?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceIntegrationDto extends IntegrationDto -{ - // @DataMember - public listingViewId: string; - - // @DataMember - public transport: MarketplaceTransport; - - // @DataMember - public vendor: string; - - // @DataMember - public category: MarketplaceCategory; - - // @DataMember - public description?: string; - - // @DataMember - public config: IReadOnlyDictionary; - - // @DataMember - public lastValidationSteps?: MarketplaceValidationStepResultDto[]; - - // @DataMember - public signedIn: boolean; - - // @DataMember - public signedInBy?: string; - - // @DataMember - public signedInAt?: string; - - // @DataMember - public tokenExpiresAt?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceFunctionParameterDto -{ - // @DataMember - public name: string; - - // @DataMember - public type: string; - - // @DataMember - public description?: string; - - // @DataMember - public isRequired: boolean; - - // @DataMember - public defaultValue?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceFunctionDto implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public integrationViewId: string; - - // @DataMember - public functionKey: string; - - // @DataMember - public displayName: string; - - // @DataMember - public description?: string; - - // @DataMember - public isEnabled: boolean; - - // @DataMember - public requestTemplate?: string; - - // @DataMember - public arguments: { [index:string]: string; } = {}; - - // @DataMember - public inputs: MarketplaceFunctionParameterDto[] = []; - - // @DataMember - public mappedTokens: TokenMappingDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum MarketplaceAvailability -{ - Development = 'Development', - Staging = 'Staging', - Production = 'Production', -} - -export enum MarketplaceFieldType -{ - String = 'String', - Number = 'Number', - Boolean = 'Boolean', - Url = 'Url', - Email = 'Email', - Json = 'Json', - MultilineText = 'MultilineText', -} - -// @DataContract -export class MarketplaceFieldDefinitionDto -{ - // @DataMember - public key: string; - - // @DataMember - public label: string; - - // @DataMember - public description?: string; - - // @DataMember - public documentationUrl?: string; - - // @DataMember - public type: MarketplaceFieldType; - - // @DataMember - public isRequired: boolean; - - // @DataMember - public defaultValue?: string; - - // @DataMember - public placeholder?: string; - - // @DataMember - public validationPattern?: string; - - // @DataMember - public allowedValues?: IReadOnlyList; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceInstallFormDto -{ - // @DataMember - public dataSchema: string; - - // @DataMember - public uiSchema: string; - - // @DataMember - public secretKeys: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum MarketplaceParameterLocation -{ - Body = 'Body', - Header = 'Header', - Query = 'Query', - Path = 'Path', -} - -// @DataContract -export class MarketplaceParameterSpecDto -{ - // @DataMember - public name: string; - - // @DataMember - public location: MarketplaceParameterLocation; - - // @DataMember - public valueTemplate?: string; - - // @DataMember - public label?: string; - - // @DataMember - public description?: string; - - // @DataMember - public documentationUrl?: string; - - // @DataMember - public type?: string; - - // @DataMember - public isRequired: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceHttpRequestSpecDto -{ - // @DataMember - public method: string; - - // @DataMember - public pathTemplate: string; - - // @DataMember - public parameters: IReadOnlyList; - - // @DataMember - public contentType?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceValidationStepDto -{ - // @DataMember - public key: string; - - // @DataMember - public label: string; - - // @DataMember - public description?: string; - - // @DataMember - public requiredForFunctions: boolean; - - // @DataMember - public probe?: MarketplaceHttpRequestSpecDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum MarketplaceFormKind -{ - Generic = 'Generic', - DatabaseQuery = 'DatabaseQuery', - DatabaseWrite = 'DatabaseWrite', - Message = 'Message', - Prompt = 'Prompt', - Web = 'Web', -} - -// @DataContract -export class MarketplaceFunctionDefinitionDto -{ - // @DataMember - public definitionId?: string; - - // @DataMember - public functionKey: string; - - // @DataMember - public displayName: string; - - // @DataMember - public description?: string; - - // @DataMember - public group?: string; - - // @DataMember - public formKind: MarketplaceFormKind; - - // @DataMember - public inputs: IReadOnlyList; - - // @DataMember - public parameters: IReadOnlyList; - - // @DataMember - public requestSchema?: string; - - // @DataMember - public requestTemplate?: string; - - // @DataMember - public request?: MarketplaceHttpRequestSpecDto; - - // @DataMember - public defaultTokenMappings: TokenMappingDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceListingDto implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public slug: string; - - // @DataMember - public displayName: string; - - // @DataMember - public vendor: string; - - // @DataMember - public category: MarketplaceCategory; - - // @DataMember - public transport: MarketplaceTransport; - - // @DataMember - public description?: string; - - // @DataMember - public iconUrl?: string; - - // @DataMember - public documentationUrl?: string; - - // @DataMember - public videoUrl?: string; - - // @DataMember - public availability: MarketplaceAvailability; - - // @DataMember - public connectSteps: IReadOnlyList; - - // @DataMember - public oAuthRedirectUrl?: string; - - // @DataMember - public isOfficial: boolean; - - // @DataMember - public tags: IReadOnlyList; - - // @DataMember - public specVersion: number; - - // @DataMember - public configFields: IReadOnlyList; - - // @DataMember - public secretFields: IReadOnlyList; - - // @DataMember - public installForm?: MarketplaceInstallFormDto; - - // @DataMember - public validationSteps: IReadOnlyList; - - // @DataMember - public functions: IReadOnlyList; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AdminPortalModuleDto -{ - public key: string; - public displayName: string; - public enabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiChatEntryWireDto -{ - public kind: string; - public id: string; - public seq: number; - public atUtc: string; - public refEntryId?: string; - public workItemId?: string; - public feedback?: string; - public feedbackAtUtc?: string; - public feedbackByUserAuthId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiChatEntryAttachmentWireDto -{ - public id: string; - public name: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class UserMessageEntryWireDto extends AiChatEntryWireDto -{ - public kind: string; - public text: string; - public attachments: AiChatEntryAttachmentWireDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AiChatEntrySourceWireDto -{ - public kind: string; - public requirementId?: string; - public sessionId?: string; - public entryId?: string; - public entrySeq?: number; - public artifactId?: string; - public label?: string; - public step?: number; - public number?: number; - public sourceKind?: string; - public sourceId?: string; - public score?: number; - public cited?: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AssistantTextEntryWireDto extends AiChatEntryWireDto -{ - public kind: string; - public text: string; - public isStreaming: boolean; - public sources: AiChatEntrySourceWireDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AiChatQuestionOptionWireDto -{ - public value: string; - public label: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiChatQuestionWireDto -{ - public id: string; - public text: string; - public options: AiChatQuestionOptionWireDto[] = []; - public default?: string; - public allowFreeText: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiChatGateResultWireDto -{ - public class: string; - public reason: string; - public affectedRequirementIds: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AssistantQuestionEntryWireDto extends AiChatEntryWireDto -{ - public kind: string; - public questions: AiChatQuestionWireDto[] = []; - public status: string; - public scope: string; - public gate?: AiChatGateResultWireDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class UserAnswerEntryWireDto extends AiChatEntryWireDto -{ - public kind: string; - public answers: { [index:string]: string; } = {}; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AiChatPlanStepInputsWireDto -{ - public artifacts: string[] = []; - public requirements: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiChatPlanStepDoneCheckWireDto -{ - public check: string; - public argsJson: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiChatPlanStepLoopWireDto -{ - public maxIterations?: number; - public maxToolCalls: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiChatPlanStepWireDto -{ - public n: number; - public tool: string; - public title: string; - public goal?: string; - public inputs: AiChatPlanStepInputsWireDto; - public dependsOn: number[] = []; - public replaces?: number; - public done: AiChatPlanStepDoneCheckWireDto[] = []; - public loop: AiChatPlanStepLoopWireDto; - public difficulty?: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PlanEntryWireDto extends AiChatEntryWireDto -{ - public kind: string; - public goal: string; - public steps: AiChatPlanStepWireDto[] = []; - public status: string; - public gate?: AiChatGateResultWireDto; - public difficulty?: number; - public difficultyReason?: string; - public deltaOf?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class UserDecisionEntryWireDto extends AiChatEntryWireDto -{ - public kind: string; - public decision: string; - public comment?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AiChatStepLogLineWireDto -{ - public seq: number; - public tool: string; - public agent?: string; - public status: string; - public detail?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class RunStepEntryWireDto extends AiChatEntryWireDto -{ - public kind: string; - public n: number; - public tool: string; - public title: string; - public status: string; - public resultSummary?: string; - public error?: string; - public log: AiChatStepLogLineWireDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ActionPendingEntryWireDto extends AiChatEntryWireDto -{ - public kind: string; - public tool: string; - public argumentsJson: string; - public status: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class NoticeEntryWireDto extends AiChatEntryWireDto -{ - public kind: string; - public text: string; - public level: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ConversationSnapshotEntryWireDto extends AiChatEntryWireDto -{ - public kind: string; - public snapshotId: string; - public coversUpToSeq: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum CodeFunctionSource -{ - Database = 'Database', - Membership = 'Membership', - Files = 'Files', - Payments = 'Payments', - Ai = 'Ai', - Scheduler = 'Scheduler', - Manual = 'Manual', -} - -export enum CodeFunctionCallerKind -{ - User = 'User', - ApiKey = 'ApiKey', - System = 'System', -} - -// @DataContract -export class CodeFunctionCallerDto -{ - // @DataMember - public userId: string; - - // @DataMember - public email?: string; - - // @DataMember - public kind: CodeFunctionCallerKind; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class CodeFunctionRunAsDto -{ - // @DataMember - public userId: string; - - // @DataMember - public accessToken?: string; - - // @DataMember - public expiresAt?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class CodeFunctionContextDto -{ - // @DataMember - public accountId: string; - - // @DataMember - public projectId: string; - - // @DataMember - public environment: string; - - // @DataMember - public region?: string; - - // @DataMember - public hubUrl: string; - - // @DataMember - public apiUrl: string; - - // @DataMember - public echoUrl: string; - - // @DataMember - public triggerId?: string; - - // @DataMember - public taskId?: string; - - // @DataMember - public correlationId?: string; - - // @DataMember - public caller?: CodeFunctionCallerDto; - - // @DataMember - public runAs?: CodeFunctionRunAsDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum ResourceKindDto -{ - Contact = 'contact', - Document = 'document', - File = 'file', - PaymentCustomer = 'paymentCustomer', - Order = 'order', - Payment = 'payment', - Product = 'product', - Integration = 'integration', -} - -export class ResourceRefDto -{ - public projectId: string; - public integrationId?: string; - public kind: ResourceKindDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class DocumentRefDto extends ResourceRefDto -{ - public kind: ResourceKindDto; - public databaseIntegrationId: string; - public schemaId: string; - public externalId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class DatabaseRecordsBatchDto -{ - // @DataMember - public ids: string[] = []; - - // @DataMember - public count: number; - - // @DataMember - public truncated: boolean; - - // @DataMember - public documents?: { [index:string]: Object; }[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DatabaseRecordChangeDto -{ - // @DataMember - public collection: string; - - // @DataMember - public schemaId: string; - - // @DataMember - public schemaVersion?: number; - - // @DataMember - public recordId?: string; - - // @DataMember - public old?: { [index:string]: Object; }; - - // @DataMember - public new?: { [index:string]: Object; }; - - // @DataMember - public truncated: boolean; - - // @DataMember - public oldRef?: DocumentRefDto; - - // @DataMember - public newRef?: DocumentRefDto; - - // @DataMember - public records?: DatabaseRecordsBatchDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class UserChangeDto -{ - // @DataMember - public userId: string; - - // @DataMember - public old?: { [index:string]: Object; }; - - // @DataMember - public new?: { [index:string]: Object; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class FileChangeDto -{ - // @DataMember - public old?: { [index:string]: Object; }; - - // @DataMember - public new?: { [index:string]: Object; }; - - // @DataMember - public path?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PaymentFactDto -{ - // @DataMember - public integrationId: string; - - // @DataMember - public provider: string; - - // @DataMember - public providerEventId: string; - - // @DataMember - public orderId?: string; - - // @DataMember - public eventName: string; - - // @DataMember - public status: string; - - // @DataMember - public amountMinor?: number; - - // @DataMember - public currency?: string; - - // @DataMember - public externalIds?: { [index:string]: string; }; - - // @DataMember - public occurredOn?: string; - - // @DataMember - public receivedOn: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiUsageEventDto -{ - // @DataMember - public payload: { [index:string]: Object; } = {}; - - // @DataMember - public targetUserId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ScheduledTaskInfoDto -{ - // @DataMember - public taskId: string; - - // @DataMember - public name: string; - - // @DataMember - public firedAt: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceFunctionCallDto -{ - // @DataMember - public functionId: string; - - // @DataMember - public functionKey: string; - - // @DataMember - public integrationId: string; - - // @DataMember - public payload: { [index:string]: Object; } = {}; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class CodeFunctionDataDto -{ - // @DataMember - public database?: DatabaseRecordChangeDto; - - // @DataMember - public user?: UserChangeDto; - - // @DataMember - public file?: FileChangeDto; - - // @DataMember - public payment?: PaymentFactDto; - - // @DataMember - public order?: PaymentOrderEventDto; - - // @DataMember - public ai?: AiUsageEventDto; - - // @DataMember - public task?: ScheduledTaskInfoDto; - - // @DataMember - public payload?: { [index:string]: Object; }; - - // @DataMember - public marketplace?: MarketplaceFunctionCallDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class CodeFunctionEventDto -{ - // @DataMember - public specVersion: string; - - // @DataMember - public id: string; - - // @DataMember - public eventId: string; - - // @DataMember - public event: string; - - // @DataMember - public source: CodeFunctionSource; - - // @DataMember - public createdOn: string; - - // @DataMember - public context: CodeFunctionContextDto; - - // @DataMember - public data: CodeFunctionDataDto; - - // @DataMember - public config?: { [index:string]: Object; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class FakeCodeIntegrationDto extends CodeIntegrationDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FakeCodeIntegrationRequest extends CodeIntegrationRequest -{ - public provider: CodeProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class CodeFunctionSchedulerTaskRequest extends SchedulerTaskRequest -{ - public type: SchedulerTaskType; - public functionRef?: FunctionRefDto; - public invocationType: CodeInvocationType; - public config?: string; - public mappedTokens?: TokenMappingDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MarketplaceFunctionSchedulerTaskRequest extends SchedulerTaskRequest -{ - public type: SchedulerTaskType; - public functionId?: string; - public payload?: { [index:string]: string; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class JsonSchemaFieldDto -{ - // @DataMember - public fieldName: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class StringFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public format?: string; - - // @DataMember - public pattern?: string; - - // @DataMember - public minLength?: number; - - // @DataMember - public maxLength?: number; - - // @DataMember - public translateOptions?: IReadOnlyDictionary; - - // @DataMember - public default?: string; - - // @DataMember - public unique?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DecimalFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public minimum?: number; - - // @DataMember - public maximum?: number; - - // @DataMember - public multipleOf?: number; - - // @DataMember - public default?: number; - - // @DataMember - public unique?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class CurrencyDefaultDto -{ - // @DataMember - public value: number; - - // @DataMember - public currency: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class CurrencyFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public allowedCurrencies?: IReadOnlyList; - - // @DataMember - public multipleOf?: number; - - // @DataMember - public minimum?: number; - - // @DataMember - public maximum?: number; - - // @DataMember - public default?: CurrencyDefaultDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class BooleanFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public default?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DateFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public minimum?: number; - - // @DataMember - public maximum?: number; - - // @DataMember - public default?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class IntegerFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public minimum?: number; - - // @DataMember - public maximum?: number; - - // @DataMember - public default?: number; - - // @DataMember - public unique?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GeolocationFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public allowedTypes?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class TagsFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public minItems?: number; - - // @DataMember - public maxItems?: number; - - // @DataMember - public default?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FileFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public storages?: IReadOnlyList; - - // @DataMember - public minItems?: number; - - // @DataMember - public maxItems?: number; - - // @DataMember - public allowedFileType?: string; - - // @DataMember - public maxSizeMb?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class TaxonomySelectionFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public taxonomyId?: string; - - // @DataMember - public multiple: boolean; - - // @DataMember - public displayField?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class CollectionSelectionFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public collectionId?: string; - - // @DataMember - public displayField?: string; - - // @DataMember - public multiple: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class UserSelectionFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public multiple: boolean; - - // @DataMember - public displayField?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RoleSelectionFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public multiple: boolean; - - // @DataMember - public displayField?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EnumSelectionFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public values?: IReadOnlyList; - - // @DataMember - public multiple: boolean; - - // @DataMember - public default?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ObjectFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public properties: IReadOnlyList; - - // @DataMember - public required?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ArrayFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public items: JsonSchemaFieldDto; - - // @DataMember - public minItems?: number; - - // @DataMember - public maxItems?: number; - - // @DataMember - public uniqueItems?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class JsonFieldDto extends JsonSchemaFieldDto -{ - // @DataMember - public maxBytes?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export interface IVersionBasedRequest -{ - version: string; -} - -export interface IHasCorrelationIdRequest -{ - correlationId?: string; -} - -export interface IHasProjectId -{ - projectId: string; -} - -export interface IHasEnv -{ - env?: string; -} - -export enum SubscriptionType -{ - ManagedService = 'ManagedService', - License = 'License', -} - -export interface IHasAccountId -{ - accountId: string; -} - -// @DataContract -export class TagDescriptionDto -{ - // @DataMember - public title: string; - - // @DataMember - public description?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TagTranslationDto -{ - // @DataMember - public language: string; - - // @DataMember - public content: TagDescriptionDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TagDefinitionBaseDto -{ - // @DataMember - public tag: string; - - // @DataMember - public translations: TagTranslationDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class GroupDefinitionDto extends TagDefinitionBaseDto -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum DeliveryChannel -{ - Email = 'Email', - Push = 'Push', - Sms = 'Sms', - WebPush = 'WebPush', - InApp = 'InApp', - ChatBot = 'ChatBot', - ChatPlatform = 'ChatPlatform', -} - -// @DataContract -export class TagDefinitionDto extends TagDefinitionBaseDto -{ - // @DataMember - public defaultDelivery: { [index:string]: boolean; } = {}; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class AiPlanModelDto -{ - // @DataMember - public llmIntegrationId: string; - - // @DataMember - public model?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum AiPlanQuotaUnit -{ - None = 'None', - Credits = 'Credits', - Tokens = 'Tokens', -} - -// @DataContract -export class AiPlanFeaturesDto -{ - // @DataMember - public attachments: boolean; - - // @DataMember - public rag: boolean; - - // @DataMember - public memory: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiPlanDto -{ - // @DataMember - public id?: string; - - // @DataMember - public name: string; - - // @DataMember - public allowedAssistantIds: string[] = []; - - // @DataMember - public allowedModels: AiPlanModelDto[] = []; - - // @DataMember - public quotaUnit: AiPlanQuotaUnit; - - // @DataMember - public monthlyQuota: number; - - // @DataMember - public features: AiPlanFeaturesDto; - - // @DataMember - public quotaReachedMessage?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiPlanRoleAssignmentDto -{ - // @DataMember - public roleId: string; - - // @DataMember - public planId: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ProjectAiAssistantRequestBase extends CodeMashRequestBase -{ - /** @description Name shown to end users. Required, at most 100 characters, unique in the project. */ - // @ApiMember(Description="Name shown to end users. Required, at most 100 characters, unique in the project.") - public name?: string; - - /** @description First message end users see. Public. At most 2 000 characters. */ - // @ApiMember(Description="First message end users see. Public. At most 2 000 characters.") - public welcomeMessage?: string; - - /** @description Instructions for the model. Never shown to end users. At most 20 000 characters. */ - // @ApiMember(Description="Instructions for the model. Never shown to end users. At most 20 000 characters.") - public systemPrompt?: string; - - /** @description Own-scope toolsets the assistant may use: own:records (the user's own database records), own:profile (their profile), own:preferences (their marketing preferences), own:knowledge (search_knowledge — the user's own and the project-wide knowledge). Any other name is refused. */ - // @ApiMember(Description="Own-scope toolsets the assistant may use: own:records (the user's own database records), own:profile (their profile), own:preferences (their marketing preferences), own:knowledge (search_knowledge — the user's own and the project-wide knowledge). Any other name is refused.") - public toolsets?: string[]; - - /** @description The assistant's own LLM integration id (int_…). Empty = the project's default LLM. */ - // @ApiMember(Description="The assistant's own LLM integration id (int_…). Empty = the project's default LLM.") - public llmIntegrationId?: string; - - /** @description Model name. Empty = the integration's default model. */ - // @ApiMember(Description="Model name. Empty = the integration's default model.") - public model?: string; - - /** @description True to let the assistant remember facts about the end user across chats. */ - // @ApiMember(Description="True to let the assistant remember facts about the end user across chats.") - public memoryEnabled: boolean; - - /** @description Knowledge the assistant retrieves from before each answer and cites as [n]: record (records of schemas with embed on), file (uploaded files, when the project embeds them), message (the user's earlier chats, assistants with memory). Empty = no automatic retrieval. */ - // @ApiMember(Description="Knowledge the assistant retrieves from before each answer and cites as [n]: record (records of schemas with embed on), file (uploaded files, when the project embeds them), message (the user's earlier chats, assistants with memory). Empty = no automatic retrieval.") - public ragSourceIds?: string[]; - - /** @description Best relevance (0–1) below which the answer says the knowledge does not match strongly. Empty = 0.5; 0 = never. */ - // @ApiMember(Description="Best relevance (0–1) below which the answer says the knowledge does not match strongly. Empty = 0.5; 0 = never.") - public weakMatchThreshold?: number; - - /** @description AI plan (quota) id. Optional. */ - // @ApiMember(Description="AI plan (quota) id. Optional.") - public planId?: string; - - /** @description True to make this the project's default assistant; the previous default stops being default. */ - // @ApiMember(Description="True to make this the project's default assistant; the previous default stops being default.") - public isDefault: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class AiProjectRoleIdsDto -{ - // @DataMember - public projectId: string; - - // @DataMember - public roleIds: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum Gender -{ - Male = 'Male', - Female = 'Female', - Other = 'Other', -} - -export enum MarketingBlockReason -{ - Unspecified = 'Unspecified', - Unsubscribed = 'Unsubscribed', - Complaint = 'Complaint', - HardBounce = 'HardBounce', - InvalidEmail = 'InvalidEmail', - AdminBlock = 'AdminBlock', -} - -export class UserGeneralInfoDto -{ - public phone?: string; - public primaryEmail?: string; - public displayName?: string; - public firstName?: string; - public lastName?: string; - public fullName?: string; - public addressLine1?: string; - public addressLine2?: string; - public country?: string; - public city?: string; - public state?: string; - public postalCode?: string; - public company?: string; - public gender?: Gender; - public birthDate?: number; - public timeZone?: string; - public language?: string; - public blockAllMarketingMessages: boolean; - public blockedTags?: { [index:string]: HashSet; }; - public blockReasons?: MarketingBlockReason[]; - public extraMetadata?: string; - public notes?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ImportUserRowDto -{ - // @DataMember(Name="email") - public email?: string; - - // @DataMember(Name="userName") - public userName?: string; - - // @DataMember(Name="userGeneralInfo") - public userGeneralInfo?: UserGeneralInfoDto; - - // @DataMember(Name="roles") - public roles?: string[]; - - // @DataMember(Name="createdOn") - public createdOn?: number; - - // @DataMember(Name="hashFormat") - public hashFormat?: string; - - // @DataMember(Name="passwordHash") - public passwordHash?: string; - - // @DataMember(Name="passwordSalt") - public passwordSalt?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DeleteTrigger extends CodeMashRequestBase -{ - // @DataMember - public triggerId: string; - - // @DataMember - public triggerType: TriggerType; - - // @DataMember - public schemaId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class DisableTrigger extends CodeMashRequestBase -{ - // @DataMember - public triggerId: string; - - // @DataMember - public triggerType: TriggerType; - - // @DataMember - public schemaId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class EnableTrigger extends CodeMashRequestBase -{ - // @DataMember - public triggerId: string; - - // @DataMember - public triggerType: TriggerType; - - // @DataMember - public schemaId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetTrigger extends CodeMashRequestBase -{ - public id: string; - public schemaId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SaveTrigger extends CodeMashRequestBase -{ - // @DataMember - public trigger: SaveTriggerRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class CredentialsSettingsModeDto -{ - public name?: string; - public logoutUrl?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class CursorArgs implements ICursorArgs -{ - public field: string; - public order: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PagingArgs -{ - public cursorArgs?: CursorArgs; - public pageSize?: number; - public startingAfter?: string; - public endingBefore?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaUniqueIndexDto -{ - // @DataMember - public fields: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaSettingsDto -{ - // @DataMember - public softDelete: boolean; - - // @DataMember - public hasRecordOwner: boolean; - - // @DataMember - public description?: string; - - // @DataMember - public uniqueIndexes?: SchemaUniqueIndexDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaEmbedSettingsDto -{ - // @DataMember - public enabled: boolean; - - // @DataMember - public fields: string[] = []; - - // @DataMember - public embeddingIntegrationId?: string; - - // @DataMember - public perUser: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaListColumnDto -{ - // @DataMember - public field: string; - - // @DataMember - public primary: boolean; - - // @DataMember - public linkReference: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaListSortDto -{ - // @DataMember - public field: string; - - // @DataMember - public order: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaListSettingsDto -{ - // @DataMember - public columns: SchemaListColumnDto[] = []; - - // @DataMember - public defaultSort?: SchemaListSortDto; - - // @DataMember - public filters: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ImportColumnMappingDto -{ - // @DataMember - public csvColumnIndex: number; - - // @DataMember - public csvHeader?: string; - - // @DataMember - public propertyName?: string; - - // @DataMember - public dontImportOnError: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export enum EmailValidationProvider -{ - ZeroBounce = 1, - NeverBounce = 2, - Bouncer = 3, - MailgunValidate = 4, -} - -export class EmailValidationIntegrationRequest -{ - public integrationId?: string; - public provider: EmailValidationProvider; - public integrationName: string; - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SaveEmailTemplate extends CodeMashRequestBase -{ - /** @description The display name of the email template. */ - // @ApiMember(Description="The display name of the email template.", IsRequired=true) - public templateName: string; - - /** @description Optional free-text description of what the template is used for. */ - // @ApiMember(Description="Optional free-text description of what the template is used for.") - public description?: string; - - /** @description The communication channel the template is intended for (e.g. Transactional, Marketing). */ - // @ApiMember(Description="The communication channel the template is intended for (e.g. Transactional, Marketing).") - public communicationChannel: CommunicationChannel; - - /** @description Optional tags to organize/filter the template by. */ - // @ApiMember(Description="Optional tags to organize/filter the template by.") - public tags?: string[]; - - /** @description Optional static file attachments to send with every email using this template. */ - // @DataMember - // @ApiMember(Description="Optional static file attachments to send with every email using this template.") - public staticAttachments?: FileResourceRefDto[]; - - /** @description The per-language content translations (subject/body) for this template. */ - // @ApiMember(Description="The per-language content translations (subject/body) for this template.", IsRequired=true) - public translations: EmailMessageTranslationDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TranslationDto -{ - // @DataMember - public language: string; - - // @DataMember - public content: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SaveSmsTemplate extends CodeMashRequestBase -{ - /** @description Display name for the SMS template. */ - // @ApiMember(Description="Display name for the SMS template.", IsRequired=true) - public templateName: string; - - /** @description Optional free-text description of the template's purpose. */ - // @ApiMember(Description="Optional free-text description of the template's purpose.") - public description?: string; - - /** @description Whether this template is Transactional or Marketing SMS. */ - // @ApiMember(Description="Whether this template is Transactional or Marketing SMS.", IsRequired=true) - public communicationChannel: CommunicationChannel; - - /** @description Optional tags to organize/filter templates. */ - // @ApiMember(Description="Optional tags to organize/filter templates.") - public tags?: string[]; - - /** @description The template's per-language translations (each with its own SMS body). */ - // @ApiMember(Description="The template's per-language translations (each with its own SMS body).", IsRequired=true) - public translations: SmsMessageTranslationDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SmsIntegrationRequest -{ - public integrationId?: string; - public provider: SmsProvider; - public integrationName: string; - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum MarketplaceAccessLevel -{ - None = 'None', - Viewer = 'Viewer', - FunctionsOnly = 'FunctionsOnly', - ReadOnly = 'ReadOnly', - FullAccess = 'FullAccess', - Manage = 'Manage', -} - -export class SavePushTemplate extends CodeMashRequestBase -{ - /** @description The template's display name. */ - // @ApiMember(Description="The template's display name.", IsRequired=true) - public templateName: string; - - /** @description Optional free-text description of the template's purpose. */ - // @ApiMember(Description="Optional free-text description of the template's purpose.") - public description?: string; - - /** @description Whether the template is Transactional or Marketing. */ - // @ApiMember(Description="Whether the template is Transactional or Marketing.") - public communicationChannel: CommunicationChannel; - - /** @description Optional tags for organizing/filtering templates. */ - // @ApiMember(Description="Optional tags for organizing/filtering templates.") - public tags?: string[]; - - /** @description The per-locale translations (title/body/subtitle) that make up the template content. */ - // @ApiMember(Description="The per-locale translations (title/body/subtitle) that make up the template content.", IsRequired=true) - public translations: PushMessageTranslationDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum DeviceType -{ - Unknown = 'Unknown', - Phone = 'Phone', - Tablet = 'Tablet', - Desktop = 'Desktop', - Tv = 'Tv', -} - -// @DataContract -export class PushDeviceDto -{ - // @DataMember - public deviceId?: string; - - // @DataMember - public deviceOs: string; - - // @DataMember - public token: string; - - // @DataMember - public brand?: string; - - // @DataMember - public manufacturer?: string; - - // @DataMember - public modelName?: string; - - // @DataMember - public deviceName?: string; - - // @DataMember - public deviceType?: DeviceType; - - // @DataMember - public osName?: string; - - // @DataMember - public osVersion?: string; - - // @DataMember - public platformApiLevel?: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ChatScreenContextDto -{ - public kind: string; - public viewId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export interface INoSessionCookies -{ -} - -export enum EmbeddingProvider -{ - Voyage = 'Voyage', - OpenAI = 'OpenAI', -} - -export class EmbeddingIntegrationRequest -{ - public integrationId?: string; - public provider: EmbeddingProvider; - public integrationName: string; - public isEnabled: boolean; - public endpoint?: string; - public model: string; - public dimension: number; - public apiKey: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum CaseResolutionFixKind -{ - CodeFix = 'CodeFix', - ConfigChange = 'ConfigChange', - CustomerInstruction = 'CustomerInstruction', - KnownLimitation = 'KnownLimitation', - Duplicate = 'Duplicate', -} - -// @DataContract -export class CaseResolutionDto -{ - // @DataMember - public problem: string; - - // @DataMember - public symptoms: string[] = []; - - // @DataMember - public rootCause: string; - - // @DataMember - public fix: CaseResolutionFixKind; - - // @DataMember - public fixDetail?: string; - - // @DataMember - public affectedVersions?: string[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export enum CodeMashRelease -{ - NotSet = 'NotSet', - Community = 'Community', - ManagedService = 'ManagedService', - Enterprise = 'Enterprise', -} - -export enum CodeMashRuntime -{ - Development = 'Development', - CI = 'CI', - Staging = 'Staging', - Production = 'Production', -} - -export class EchoRegionDto -{ - public code: string; - public displayName: string; - public apiUrl: string; - public hubUrl: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class EchoAgentSnippetDto -{ - public client: string; - public kind: string; - public recommended: boolean; - public auth: string; - public config: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class EchoAgentDto -{ - public mcpUrl: string; - public oAuthMetadataUrl?: string; - public installationType: string; - public onboardingDocsUrl: string; - public toolsUrl: string; - public cliPackage: string; - public cliInstallCommand: string; - public deviceAuthorizationUrl: string; - public deviceTokenUrl: string; - public snippets: EchoAgentSnippetDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class EchoHostingPlatformDto -{ - public provider: string; - public isAws: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PublicBrandDto -{ - public displayName: string; - public mainColor?: string; - public accentColor?: string; - public logoUrl?: string; - public iconUrl?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PublicPasswordPolicyDto -{ - public minLength: number; - public maxLength?: number; - public minNumbers?: number; - public minUpper?: number; - public minLower?: number; - public minSpecial?: number; - public allowedSpecial?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PublicAuthDto -{ - public socialProviders: string[] = []; - public passkey: boolean; - public methods?: string[]; - public passwordPolicy?: PublicPasswordPolicyDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PublicAiAssistantDto -{ - public id: string; - public name: string; - public welcome?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PublicAiChatDto -{ - public enabled: boolean; - public assistants: PublicAiAssistantDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TriggerAttentionDto -{ - // @DataMember - public triggerId: string; - - // @DataMember - public triggerType: TriggerType; - - // @DataMember - public reason: string; - - // @DataMember - public atUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class TriggerActivationTestProblem -{ - public code: string; - public message: string; - public line: number; - public column: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AccountOwnerDto -{ - // @DataMember - public email: string; - - // @DataMember - public displayName: string; - - // @DataMember - public billingEmail?: string; - - // @DataMember - public operationsEmail?: string; - - // @DataMember - public securityEmail?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @Flags() -export enum AccountStatus -{ - Registered = 1, - PendingValidation = 2, - Active = 8, - InActive = 16, - Blocked = 32, - Unregistered = 64, -} - -// @DataContract -export class AccountStatusDto -{ - // @DataMember - public accountId: string; - - // @DataMember - public accountIdAsGuid: string; - - // @DataMember - public userId: string; - - // @DataMember - public loggedInUserId: string; - - // @DataMember - public loggedInUserEmail?: string; - - // @DataMember - public status: AccountStatus; - - // @DataMember - public projectCap: number; - - // @DataMember - public permissions: string[] = []; - - // @DataMember - public roles: string[] = []; - - // @DataMember - public allowedProjects?: string[]; - - // @DataMember - public trialWasIssued: boolean; - - // @DataMember - public emailVerified: boolean; - - // @DataMember - public joinedByInvitation: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class UsageBillingClusterChargeDto -{ - // @DataMember - public atlasProjectId: string; - - // @DataMember - public atlasClusterName: string; - - // @DataMember - public cents: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class UsageBillingPeriodDto -{ - // @DataMember - public period: string; - - // @DataMember - public totalCents: number; - - // @DataMember - public perCluster: UsageBillingClusterChargeDto[] = []; - - // @DataMember - public recordedAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class UsageBillingIngestionFailureDto -{ - // @DataMember - public reason: string; - - // @DataMember - public period?: string; - - // @DataMember - public stripeEventId: string; - - // @DataMember - public message: string; - - // @DataMember - public reportedAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class UsageBillingDto -{ - // @DataMember - public accountId: string; - - // @DataMember - public atlas: { [index:string]: UsageBillingPeriodDto; } = {}; - - // @DataMember - public ingestionFailures: UsageBillingIngestionFailureDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PromotionItemDto -{ - // @DataMember - public type: string; - - // @DataMember - public id: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PromotionBlockerDto -{ - // @DataMember - public contentType: string; - - // @DataMember - public contentId: string; - - // @DataMember - public refKind: string; - - // @DataMember - public unresolvedRef: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PromotionTermChangeDto -{ - // @DataMember - public taxonomyId: string; - - // @DataMember - public termId: string; - - // @DataMember - public slug?: string; - - // @DataMember - public change: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PromotionResultDto -{ - // @DataMember - public contentMirrored: PromotionItemDto[] = []; - - // @DataMember - public contentDeleted: PromotionItemDto[] = []; - - // @DataMember - public integrationsSeeded: PromotionItemDto[] = []; - - // @DataMember - public integrationsToProvision: PromotionItemDto[] = []; - - // @DataMember - public integrationsSkipped: PromotionItemDto[] = []; - - // @DataMember - public blockers: PromotionBlockerDto[] = []; - - // @DataMember - public termChanges: PromotionTermChangeDto[] = []; - - // @DataMember - public warnings: PromotionBlockerDto[] = []; - - // @DataMember - public fromVersion?: number; - - // @DataMember - public wasDryRun: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ProjectEnvironmentsDto -{ - // @DataMember - public environments: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum ProjectStatus -{ - Active = 'Active', - Provisioning = 'Provisioning', - ProvisioningFailed = 'ProvisioningFailed', - NoDatabase = 'NoDatabase', - Disabled = 'Disabled', - Suspended = 'Suspended', - Removed = 'Removed', -} - -export enum Continent -{ - Africa = 'Africa', - Antarctica = 'Antarctica', - Asia = 'Asia', - Europe = 'Europe', - NorthAmerica = 'NorthAmerica', - Oceania = 'Oceania', - SouthAmerica = 'SouthAmerica', -} - -export class ProjectRegionDto -{ - public id: string; - public continent?: Continent; - public name?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ProjectBrandDto -{ - // @DataMember - public mainColor?: string; - - // @DataMember - public accentColor?: string; - - // @DataMember - public logo?: FileResourceRefDto; - - // @DataMember - public icon?: FileResourceRefDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class NotificationsSettingsGroupDto -{ - public tag: string; - public tags: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class NotificationSettingsChannelDto -{ - public channel: CommunicationChannel; - public groups: NotificationsSettingsGroupDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class NotificationSettingsDto -{ - public channels: NotificationSettingsChannelDto[] = []; - public allGroups: GroupDefinitionDto[] = []; - public allTags: TagDefinitionDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AuthenticationFlowPasswordPolicyDto -{ - // @DataMember - public minLength: number; - - // @DataMember - public maxLength?: number; - - // @DataMember - public minNumbers?: number; - - // @DataMember - public minUpper?: number; - - // @DataMember - public minLower?: number; - - // @DataMember - public minSpecial?: number; - - // @DataMember - public allowedSpecial?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AuthenticationFlowSummaryDto -{ - // @DataMember - public type: string; - - // @DataMember - public provider?: string; - - // @DataMember - public passwordComplexity?: AuthenticationFlowPasswordPolicyDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiAssistantDto -{ - // @DataMember - public id: string; - - // @DataMember - public name: string; - - // @DataMember - public welcomeMessage?: string; - - // @DataMember - public systemPrompt?: string; - - // @DataMember - public toolsets: string[] = []; - - // @DataMember - public llmIntegrationId?: string; - - // @DataMember - public model?: string; - - // @DataMember - public memoryEnabled: boolean; - - // @DataMember - public ragSourceIds: string[] = []; - - // @DataMember - public weakMatchThreshold?: number; - - // @DataMember - public planId?: string; - - // @DataMember - public isDefault: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ProjectAiSettingsDto -{ - // @DataMember - public enabled: boolean; - - // @DataMember - public defaultLlmIntegrationId?: string; - - // @DataMember - public defaultModel?: string; - - // @DataMember - public assistants: AiAssistantDto[] = []; - - // @DataMember - public embedFiles: boolean; - - // @DataMember - public plans: AiPlanDto[] = []; - - // @DataMember - public planRoleAssignments: AiPlanRoleAssignmentDto[] = []; - - // @DataMember - public defaultPlanId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TriggerDto implements IHasViewId, IQueuedTrigger -{ - // @DataMember - public type: TriggerType; - - // @DataMember - public viewId: string; - - // @DataMember - public name: string; - - // @DataMember - public thenAction: TriggerActionDto; - - // @DataMember - public description?: string; - - // @DataMember - public isEnabled: boolean; - - // @DataMember - public activationCode?: string; - - // @DataMember - public order?: number; - - // @DataMember - public breakOnError: boolean; - - // @DataMember - public savedByAuthId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SchemaTriggerDto extends TriggerDto -{ - // @DataMember - public schemaId: string; - - // @DataMember - public when: SchemaTriggerType; - - // @DataMember - public configurationCode?: string; - - // @DataMember - public env?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class DatabaseDto -{ - // @DataMember - public isEnabled: boolean; - - // @DataMember - public triggers?: SchemaTriggerDto[]; - - // @DataMember - public defaultIntegrationViewIds: { [index:string]: string; } = {}; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailDto -{ - // @DataMember - public isEnabled: boolean; - - // @DataMember - public defaultIntegrationViewIds: { [index:string]: string; } = {}; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiDto -{ - // @DataMember - public isEnabled: boolean; - - // @DataMember - public defaultIntegrationViewIds: { [index:string]: string; } = {}; - - // @DataMember - public defaultIntegrationViewId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MembershipTriggerDto extends TriggerDto -{ - // @DataMember - public when: MembershipTriggerType; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RoleItemDto -{ - public id: string; - public name: string; - public displayName?: string; - public description?: string; - public isSystem: boolean; - public attachedPolicies?: string[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum PermissionEffect -{ - Allow = 'Allow', - Deny = 'Deny', -} - -export class PermissionDto -{ - public sid?: string; - public effect: PermissionEffect; - public actions: string[] = []; - public resources: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PolicyItemDto -{ - public id: string; - public name: string; - public description?: string; - public isSystem: boolean; - public version: string; - public permissions?: PermissionDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AuthorizationDto -{ - // @DataMember - public userRegistersAsRole?: string; - - // @DataMember - public allowedRegisterRoles?: string[]; - - // @DataMember - public allowedProviderRegisterRoles?: string[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MembershipDto -{ - // @DataMember - public isEnabled: boolean; - - // @DataMember - public triggers?: MembershipTriggerDto[]; - - // @DataMember - public customRoles?: RoleItemDto[]; - - // @DataMember - public customPolicies?: PolicyItemDto[]; - - // @DataMember - public systemRoleAttachments?: RoleItemDto[]; - - // @DataMember - public authorization?: AuthorizationDto; - - // @DataMember - public requireEmailValidation: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class LoggingDto -{ - // @DataMember - public isEnabled: boolean; - - // @DataMember - public isEstablished: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ServerEventsDto -{ - // @DataMember - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PushDto -{ - // @DataMember - public isEnabled: boolean; - - // @DataMember - public defaultIntegrationViewIds: { [index:string]: string; } = {}; - - // @DataMember - public marketingTags?: TagDefinitionDto[]; - - // @DataMember - public transactionalTags?: TagDefinitionDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SchedulerDto -{ - // @DataMember - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class CodeDto -{ - // @DataMember - public isEnabled: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class FilesTriggerDto extends TriggerDto -{ - // @DataMember - public when: FilesTriggerType; - - // @DataMember - public folder?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class FilesDto -{ - // @DataMember - public isEnabled: boolean; - - // @DataMember - public triggers?: FilesTriggerDto[]; - - // @DataMember - public defaultIntegrationViewIds: { [index:string]: string; } = {}; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PaymentTriggerDto extends TriggerDto -{ - // @DataMember - public when: PaymentTriggerType; - - // @DataMember - public integrations?: string[]; - - // @DataMember - public events?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PaymentsDto -{ - // @DataMember - public isEnabled: boolean; - - // @DataMember - public triggers?: PaymentTriggerDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsDto -{ - // @DataMember - public isEnabled: boolean; - - // @DataMember - public defaultIntegrationViewIds: { [index:string]: string; } = {}; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ProjectDto implements IHasViewId, IBindableContract -{ - // @DataMember - public accountViewId: string; - - // @DataMember - public projectStatus: ProjectStatus; - - // @DataMember - public isActive: boolean; - - // @DataMember - public viewId: string; - - // @DataMember - public name: string; - - // @DataMember - public uniqueName: string; - - // @DataMember - public hostLabel?: string; - - // @DataMember - public apiHost?: string; - - // @DataMember - public description?: string; - - // @DataMember - public marketingUrl?: string; - - // @DataMember - public canonicalAdminUrl?: string; - - // @DataMember - public adminUrl?: string; - - // @DataMember - public effectiveAdminUrl?: string; - - // @DataMember - public defaultLanguage: string; - - // @DataMember - public languages: string[] = []; - - // @DataMember - public primaryRegion?: ProjectRegionDto; - - // @DataMember - public additionalRegions?: ProjectRegionDto[]; - - // @DataMember - public isMultiRegionEligible: boolean; - - // @DataMember - public brand?: ProjectBrandDto; - - // @DataMember - public notificationSettings?: NotificationSettingsDto; - - // @DataMember - public allowedOrigins?: string[]; - - // @DataMember - public exposeBrandToAdminPortal: boolean; - - // @DataMember - public exposeAuthToAdminPortal: boolean; - - // @DataMember - public adminPortalEnabled: boolean; - - // @DataMember - public adminPortalServiceUserId?: string; - - // @DataMember - public membershipAuthenticationFlows?: AuthenticationFlowSummaryDto[]; - - // @DataMember - public exposeLegalToAdminPortal: boolean; - - // @DataMember - public aiChat?: ProjectAiSettingsDto; - - // @DataMember - public legalTermsMarkdown?: string; - - // @DataMember - public legalPrivacyMarkdown?: string; - - // @DataMember - public environments: string[] = []; - - // @DataMember - public environmentRanks: { [index:string]: number; } = {}; - - // @DataMember - public database?: DatabaseDto; - - // @DataMember - public email?: EmailDto; - - // @DataMember - public ai?: AiDto; - - // @DataMember - public membership?: MembershipDto; - - // @DataMember - public logging?: LoggingDto; - - // @DataMember - public serverEvents?: ServerEventsDto; - - // @DataMember - public push?: PushDto; - - // @DataMember - public scheduler?: SchedulerDto; - - // @DataMember - public code?: CodeDto; - - // @DataMember - public files?: FilesDto; - - // @DataMember - public payments?: PaymentsDto; - - // @DataMember - public sms?: SmsDto; - - // @DataMember - public databaseEnabled: boolean; - - // @DataMember - public emailEnabled: boolean; - - // @DataMember - public membershipEnabled: boolean; - - // @DataMember - public loggingEnabled: boolean; - - // @DataMember - public serverEventsEnabled: boolean; - - // @DataMember - public pushEnabled: boolean; - - // @DataMember - public schedulerEnabled: boolean; - - // @DataMember - public codeEnabled: boolean; - - // @DataMember - public filesEnabled: boolean; - - // @DataMember - public paymentsEnabled: boolean; - - // @DataMember - public smsEnabled: boolean; - - // @DataMember - public defaultLlmIntegrationViewId?: string; - - // @DataMember - public connections: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ProjectListItemDto -{ - // @DataMember - public viewId: string; - - // @DataMember - public isActive: boolean; - - // @DataMember - public projectStatus: ProjectStatus; - - // @DataMember - public name: string; - - // @DataMember - public uniqueName: string; - - // @DataMember - public primaryRegion?: ProjectRegionDto; - - // @DataMember - public additionalRegions?: ProjectRegionDto[]; - - // @DataMember - public modulesCount: number; - - // @DataMember - public usersCount: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiCreditPackCheckoutDto -{ - // @DataMember - public url: string; - - // @DataMember - public sessionId: string; - - // @DataMember - public pack: string; - - // @DataMember - public credits: number; - - // @DataMember - public priceEuroCents: number; - - // @DataMember - public purchaseId: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ProjectAiPlansDto -{ - // @DataMember - public plans: AiPlanDto[] = []; - - // @DataMember - public roles: AiPlanRoleAssignmentDto[] = []; - - // @DataMember - public defaultPlanId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiUserPlanAssignmentDto -{ - // @DataMember - public userId: string; - - // @DataMember - public planId: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiUserPlansDto -{ - // @DataMember - public users: AiUserPlanAssignmentDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiUsageGroupDto -{ - // @DataMember - public id: string; - - // @DataMember - public llmInputTokens: number; - - // @DataMember - public llmOutputTokens: number; - - // @DataMember - public embeddingTokens: number; - - // @DataMember - public rerankCalls: number; - - // @DataMember - public totalTokens: number; - - // @DataMember - public chargeableTokens: number; - - // @DataMember - public chargeableRerankCalls: number; - - // @DataMember - public credits: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiWalletLineDto -{ - // @DataMember - public kind: string; - - // @DataMember - public credits: number; - - // @DataMember - public reference?: string; - - // @DataMember - public purchasedBalance: number; - - // @DataMember - public includedUsed?: number; - - // @DataMember - public purchasedUsed?: number; - - // @DataMember - public atUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ProjectAiWalletDto -{ - // @DataMember - public period: string; - - // @DataMember - public includedCredits: number; - - // @DataMember - public purchasedCredits: number; - - // @DataMember - public consumedCredits: number; - - // @DataMember - public remainingCredits: number; - - // @DataMember - public status: string; - - // @DataMember - public lines: AiWalletLineDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ProjectAiUsageDto -{ - // @DataMember - public period: string; - - // @DataMember - public totals: AiUsageGroupDto; - - // @DataMember - public assistants: AiUsageGroupDto[] = []; - - // @DataMember - public topUsers: AiUsageGroupDto[] = []; - - // @DataMember - public models: AiUsageGroupDto[] = []; - - // @DataMember - public wallet: ProjectAiWalletDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @Flags() -export enum ApplicationModule -{ - Account = 0, - Membership = 1, - Database = 2, - Files = 4, - Code = 8, - Email = 16, - Push = 32, - Payment = 64, - Scheduler = 128, - Logging = 256, - ServerEvents = 512, - Ai = 1024, - Sms = 2048, - Project = 4096, - Compliance = 8192, - Contacts = 16384, - Marketplace = 32768, - Diagnostics = 65536, -} - -export enum LanguageGapKind -{ - Template = 'Template', - Footer = 'Footer', - Signature = 'Signature', -} - -// @DataContract -export class TemplateLanguageGapDto -{ - // @DataMember - public module: ApplicationModule; - - // @DataMember - public kind: LanguageGapKind; - - // @DataMember - public templateId: string; - - // @DataMember - public templateName: string; - - // @DataMember - public missingLanguages: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PaginatedResponse -{ - public items: IList; - public hasMore: boolean; - public hasPrevious: boolean; - public startingAfter?: string; - public endingBefore?: string; - - public constructor(init?: Partial>) { (Object as any).assign(this, init); } -} - -export enum AuthType -{ - Service = 'Service', - Email = 'Email', - UserName = 'UserName', - Phone = 'Phone', - Guest = 'Guest', - Social = 'Social', -} - -export class AccessInformationDto -{ - public ip?: string; - public date?: string; - public timeZone?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class RegistrationDto -{ - public registrationInformation: AccessInformationDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class LoginDto -{ - public needChangePasswordOnNextLogin: boolean; - public lastAccessInformation?: AccessInformationDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum AuthStatus -{ - Registered = 0, - PendingValidation = 2, - Invited = 4, - Active = 8, - Unregistered = 16, - Suspended = 32, - InActive = 64, - Blocked = 128, -} - -export class AuthDto implements IBindableContract -{ - public id: string; - public type: AuthType; - public email?: string; - public userName?: string; - public registration?: RegistrationDto; - public login?: LoginDto; - public generalInfo?: UserGeneralInfoDto; - public roles?: string[]; - public pushDevices?: string[]; - public tags?: string[]; - public status: AuthStatus; - public createdOn: string; - public modifiedOn: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AccountPasswordPolicyDto -{ - public minLength: number; - public maxLength?: number; - public minNumbers?: number; - public maxNumbers?: number; - public minUpper?: number; - public maxUpper?: number; - public minLower?: number; - public maxLower?: number; - public minSpecial?: number; - public maxSpecial?: number; - public allowedSpecial?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AccountTeamRoleDto -{ - public id: string; - public name: string; - public description: string; - public isSystem: boolean; - public policies?: string[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AccountPasskeyListItemDto -{ - public credentialId: string; - public friendlyName: string; - public registeredOnUtc: string; - public lastUsedOnUtc: string; - public isRevoked: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class LicenseDomainDnsRecordDto -{ - // @DataMember - public host: string; - - // @DataMember - public recordType: string; - - // @DataMember - public resolved: boolean; - - // @DataMember - public required: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class LicenseDomainDnsStatusDto -{ - // @DataMember - public domain: string; - - // @DataMember - public allRequiredResolved: boolean; - - // @DataMember - public records: LicenseDomainDnsRecordDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class LicenseDomainVerificationChallengeDto -{ - // @DataMember - public domain: string; - - // @DataMember - public txtHost: string; - - // @DataMember - public txtValue: string; - - // @DataMember - public expiresAtUtc: string; - - // @DataMember - public verified: boolean; - - // @DataMember - public verifiedAtUtc?: string; - - // @DataMember - public skipped: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class LicenseDomainVerificationStatusDto -{ - // @DataMember - public domain: string; - - // @DataMember - public verified: boolean; - - // @DataMember - public skipped: boolean; - - // @DataMember - public txtHost?: string; - - // @DataMember - public expectedTxtValue?: string; - - // @DataMember - public observedTxtValue?: string; - - // @DataMember - public expiresAtUtc?: string; - - // @DataMember - public verifiedAtUtc?: string; - - // @DataMember - public message?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class CodeMashSubscriptionDto -{ - public viewId: string; - public domain: string; - public willExpireOn: string; - public issuedOn: string; - public isTrial: boolean; - public subscriptionRefId: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class LicenseDto extends CodeMashSubscriptionDto -{ - public isEnterprise: boolean; - public projectCap: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class LicenseHeartbeatVerdictDto -{ - // @DataMember(Name="status") - public status: string; - - // @DataMember(Name="proofToken") - public proofToken?: string; - - // @DataMember(Name="serverTimeUtc") - public serverTimeUtc: string; - - // @DataMember(Name="graceUntilUtc") - public graceUntilUtc?: string; - - // @DataMember(Name="installationId") - public installationId: string; - - // @DataMember(Name="licenseAccountId") - public licenseAccountId?: string; - - // @DataMember(Name="domain") - public domain?: string; - - // @DataMember(Name="signature") - public signature?: string; - - // @DataMember(Name="message") - public message?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class InstallationLicenseDetailsDto -{ - // @DataMember(Name="domain") - public domain?: string; - - // @DataMember(Name="accountId") - public accountId?: string; - - // @DataMember(Name="email") - public email?: string; - - // @DataMember(Name="release") - public release?: string; - - // @DataMember(Name="expire") - public expire: number; - - // @DataMember(Name="isTrial") - public isTrial: boolean; - - // @DataMember(Name="cap") - public cap: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class InstallationLicenseStatusDto -{ - // @DataMember(Name="storedMode") - public storedMode: string; - - // @DataMember(Name="effectiveMode") - public effectiveMode: string; - - // @DataMember(Name="isProduction") - public isProduction: boolean; - - // @DataMember(Name="graceDaysLeft") - public graceDaysLeft?: number; - - // @DataMember(Name="graceUntilUtc") - public graceUntilUtc?: string; - - // @DataMember(Name="lastProvenAtUtc") - public lastProvenAtUtc?: string; - - // @DataMember(Name="lastHeartbeatAtUtc") - public lastHeartbeatAtUtc?: string; - - // @DataMember(Name="installationDomain") - public installationDomain?: string; - - // @DataMember(Name="licensedDomain") - public licensedDomain?: string; - - // @DataMember(Name="hostKind") - public hostKind?: string; - - // @DataMember(Name="isTrialLicense") - public isTrialLicense: boolean; - - // @DataMember(Name="licenseExpireUtc") - public licenseExpireUtc?: string; - - // @DataMember(Name="lastHeartbeatOutcome") - public lastHeartbeatOutcome?: string; - - // @DataMember(Name="lastHeartbeatError") - public lastHeartbeatError?: string; - - // @DataMember(Name="message") - public message?: string; - - // @DataMember(Name="license") - public license?: InstallationLicenseDetailsDto; - - // @DataMember(Name="licensingDocsUrl") - public licensingDocsUrl?: string; - - // @DataMember(Name="askForEnterpriseLicenseEmail") - public askForEnterpriseLicenseEmail?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiRoleDto -{ - // @DataMember - public id: string; - - // @DataMember - public name: string; - - // @DataMember - public description: string; - - // @DataMember - public isSystem: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiProjectRolesDto -{ - // @DataMember - public id: string; - - // @DataMember - public name: string; - - // @DataMember - public roles: AiRoleDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiServiceUserKeyDto -{ - // @DataMember - public id: string; - - // @DataMember - public hint: string; - - // @DataMember - public issuedAt: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AiServiceUserDto -{ - // @DataMember - public id: string; - - // @DataMember - public name: string; - - // @DataMember - public accountRoles: AiRoleDto[] = []; - - // @DataMember - public projects: AiProjectRolesDto[] = []; - - // @DataMember - public createdAt: string; - - // @DataMember - public keys: AiServiceUserKeyDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ImportUserErrorDto -{ - // @DataMember(Name="code") - public code?: string; - - // @DataMember(Name="message") - public message: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ImportUserOutcomeDto -{ - // @DataMember(Name="row") - public row: number; - - // @DataMember(Name="login") - public login?: string; - - // @DataMember(Name="outcome") - public outcome: string; - - // @DataMember(Name="userId") - public userId?: string; - - // @DataMember(Name="errors") - public errors: ImportUserErrorDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class UsersImportDto -{ - // @DataMember(Name="dryRun") - public dryRun: boolean; - - // @DataMember(Name="received") - public received: number; - - // @DataMember(Name="imported") - public imported: number; - - // @DataMember(Name="valid") - public valid: number; - - // @DataMember(Name="existing") - public existing: number; - - // @DataMember(Name="invalid") - public invalid: number; - - // @DataMember(Name="failed") - public failed: number; - - // @DataMember(Name="rows") - public rows: ImportUserOutcomeDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class LoginProjectRepairDto -{ - // @DataMember(Name="dryRun") - public dryRun: boolean; - - // @DataMember(Name="loginsWithoutProject") - public loginsWithoutProject: number; - - // @DataMember(Name="loginsToRepair") - public loginsToRepair: number; - - // @DataMember(Name="loginsRepaired") - public loginsRepaired: number; - - // @DataMember(Name="accountLoginsSkipped") - public accountLoginsSkipped: number; - - // @DataMember(Name="otherProjectLoginsSkipped") - public otherProjectLoginsSkipped: number; - - // @DataMember(Name="loginsWithoutEvidence") - public loginsWithoutEvidence: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ServiceUserApiKeyDto -{ - public id: number; - public name: string; - public visibleKey?: string; - public scopes: string[] = []; - public environment?: string; - public createdDate: string; - public expiryDate?: string; - public cancelledDate?: string; - public active: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class GetTriggerResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TriggerProjectionList implements IHasViewId, IQueuedTrigger -{ - // @DataMember - public viewId: string; - - // @DataMember - public name: string; - - // @DataMember - public actionType: TriggerActionType; - - // @DataMember - public hasPreExecuteCode: boolean; - - // @DataMember - public isEnabled: boolean; - - // @DataMember - public order?: number; - - // @DataMember - public breakOnError: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MembershipTriggerProjectionList extends TriggerProjectionList -{ - // @DataMember - public type: MembershipTriggerType; - - // @DataMember - public destinationIds?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RoleListProjectionDto -{ - public viewId: string; - public name: string; - public displayName?: string; - public isSystem: boolean; - public policyCount: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PasskeySettingsDto -{ - public enabled: boolean; - public codeTtlMinutes: number; - public maxCredentialsPerUser: number; - public recoveryCodeCount: number; - public generateRecoveryCodesAtSignup: boolean; - public authenticatorAttachment: string; - public allowMagicLinkRecovery: boolean; - public refreshTokenTtlDays: number; - public rpId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class IntegrationListProjection implements IHasViewId -{ - public viewId: string; - public integrationName: string; - public isEnabled: boolean; - public lastIntegrationTestAtUtc?: string; - public lastIntegrationTestSucceeded?: boolean; - public lastIntegrationTestErrors: IReadOnlyList; - public humanDeliveryConfirmedAtUtc?: string; - public requiresHumanDeliveryConfirmation: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class MembershipIntegrationListProjection extends IntegrationListProjection -{ - // @DataMember - public provider: MembershipProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class MembershipMessageTemplateDto -{ - // @DataMember - public id?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MembershipEmailActionSettingsDto -{ - // @DataMember - public sendEmail: boolean; - - // @DataMember - public template?: MembershipMessageTemplateDto; - - // @DataMember - public callback?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MembershipEmailPreferencesDto -{ - // @DataMember - public registrationViaEmail?: MembershipEmailActionSettingsDto; - - // @DataMember - public verificationViaEmail?: MembershipEmailActionSettingsDto; - - // @DataMember - public passwordResetViaEmail?: MembershipEmailActionSettingsDto; - - // @DataMember - public invitationViaEmail?: MembershipEmailActionSettingsDto; - - // @DataMember - public deactivationViaEmail?: MembershipEmailActionSettingsDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PasswordComplexityDto -{ - // @DataMember - public minLength: number; - - // @DataMember - public maxLength?: number; - - // @DataMember - public minNumbers?: number; - - // @DataMember - public maxNumbers?: number; - - // @DataMember - public minUpper?: number; - - // @DataMember - public maxUpper?: number; - - // @DataMember - public minLower?: number; - - // @DataMember - public maxLower?: number; - - // @DataMember - public minSpecial?: number; - - // @DataMember - public maxSpecial?: number; - - // @DataMember - public allowedSpecial?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MembershipAuthorizationViewDto -{ - // @DataMember - public emailPreferences?: MembershipEmailPreferencesDto; - - // @DataMember - public userRegistersAsRole?: string; - - // @DataMember - public guestRegistersAsRole?: string; - - // @DataMember - public allowedRegisterRoles?: string[]; - - // @DataMember - public allowedProviderRegisterRoles?: string[]; - - // @DataMember - public resetPasswordTokenExpiration?: number; - - // @DataMember - public invitationExpiration?: number; - - // @DataMember - public emailVerificationExpiration?: number; - - // @DataMember - public deactivationExpiration?: number; - - // @DataMember - public defaultSubscribeToNews: boolean; - - // @DataMember - public passwordComplexity?: PasswordComplexityDto; - - // @DataMember - public defaultRoles?: string[]; - - // @DataMember - public allowedRegistrationRoles?: string[]; - - // @DataMember - public allowGuestUsers: boolean; - - // @DataMember - public guestCleanupPeriodDays?: number; - - // @DataMember - public allowEmailRegistration: boolean; - - // @DataMember - public allowUsernameRegistration: boolean; - - // @DataMember - public inviteOnly: boolean; - - // @DataMember - public allowAnyoneToSignUp: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MembershipCredentialsSettingsModeDto -{ - // @DataMember - public name?: string; - - // @DataMember - public logoutUrl?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MembershipCredentialsSettingsDto -{ - // @DataMember - public logoutUrl?: string; - - // @DataMember - public allowUsernames: boolean; - - // @DataMember - public modes?: MembershipCredentialsSettingsModeDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MembershipAuthenticationViewDto -{ - // @DataMember - public credentialsSettings?: MembershipCredentialsSettingsDto; - - // @DataMember - public flows: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SchemaTriggerProjectionList extends TriggerProjectionList -{ - // @DataMember - public type: SchemaTriggerType; - - // @DataMember - public env?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DataSchemaDto -{ - // @DataMember - public json: string; - - // @DataMember - public fields: JsonSchemaFieldDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class VisualSchemaDto -{ - // @DataMember - public json: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class TaxonomyDto implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public name: string; - - // @DataMember - public slug?: string; - - // @DataMember - public parentId?: string; - - // @DataMember - public description?: string; - - // @DataMember - public env?: string; - - // @DataMember - public termsMetaDataSchema?: DataSchemaDto; - - // @DataMember - public termsMetaVisualSchema?: VisualSchemaDto; - - // @DataMember - public dependencies?: string[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class TaxonomyRef -{ - // @DataMember - public id: string; - - // @DataMember - public name?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class TaxonomyListProjection implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public taxonomyName: string; - - // @DataMember - public taxonomySlug: string; - - // @DataMember - public parentId?: string; - - // @DataMember - public description?: string; - - // @DataMember - public dependencies?: string[]; - - // @DataMember - public parentName?: string; - - // @DataMember - public dependencyRefs?: TaxonomyRef[]; - - // @DataMember - public env?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class TermMultiParentDto -{ - // @DataMember - public taxonomyId: string; - - // @DataMember - public parentId: string; - - // @DataMember - public name?: string; - - // @DataMember - public names?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class TermTreeDto -{ - // @DataMember - public id: string; - - // @DataMember - public taxonomyId?: string; - - // @DataMember - public taxonomyName?: string; - - // @DataMember - public parentId?: string; - - // @DataMember - public order?: number; - - // @DataMember - public name?: string; - - // @DataMember - public names?: { [index:string]: string; }; - - // @DataMember - public slug?: string; - - // @DataMember - public description?: string; - - // @DataMember - public descriptions?: { [index:string]: string; }; - - // @DataMember - public multiParents?: TermMultiParentDto[]; - - // @DataMember - public meta?: Object; - - // @DataMember - public children?: TermTreeDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class TaxonomyTreeDto -{ - // @DataMember - public viewId: string; - - // @DataMember - public taxonomyName: string; - - // @DataMember - public taxonomySlug: string; - - // @DataMember - public parentId?: string; - - // @DataMember - public children?: TaxonomyTreeDto[]; - - // @DataMember - public terms?: TermTreeDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class TermDto -{ - // @DataMember - public id: string; - - // @DataMember - public taxonomyId?: string; - - // @DataMember - public taxonomyName?: string; - - // @DataMember - public parentId?: string; - - // @DataMember - public order?: number; - - // @DataMember - public name?: string; - - // @DataMember - public names?: { [index:string]: string; }; - - // @DataMember - public slug?: string; - - // @DataMember - public description?: string; - - // @DataMember - public descriptions?: { [index:string]: string; }; - - // @DataMember - public multiParents?: TermMultiParentDto[]; - - // @DataMember - public meta?: Object; - - // @DataMember - public origin?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AppliedTaxonomyDto -{ - // @DataMember - public catalogId: string; - - // @DataMember - public id?: string; - - // @DataMember - public slug: string; - - // @DataMember - public title: string; - - // @DataMember - public action: string; - - // @DataMember - public termsCreated: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class AppliedCollectionDto -{ - // @DataMember - public entity: string; - - // @DataMember - public id?: string; - - // @DataMember - public name: string; - - // @DataMember - public title: string; - - // @DataMember - public action: string; - - // @DataMember - public published: boolean; - - // @DataMember - public linkedFields: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaDto implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public schemaName: string; - - // @DataMember - public schemaSlug?: string; - - // @DataMember - public version: number; - - // @DataMember - public metaSchemaVersion: number; - - // @DataMember - public dataSchema: DataSchemaDto; - - // @DataMember - public visualSchema: VisualSchemaDto; - - // @DataMember - public publishedAt: string; - - // @DataMember - public settings?: SchemaSettingsDto; - - // @DataMember - public embed?: SchemaEmbedSettingsDto; - - // @DataMember - public triggers?: TriggerDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaListProjection implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public schemaName: string; - - // @DataMember - public schemaTitle: string; - - // @DataMember - public latestVersion?: number; - - // @DataMember - public hasDraft: boolean; - - // @DataMember - public metaSchemaVersion: number; - - // @DataMember - public description?: string; - - // @DataMember - public env?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaDraftDto -{ - // @DataMember - public dataSchema: DataSchemaDto; - - // @DataMember - public visualSchema: VisualSchemaDto; - - // @DataMember - public updatedAt: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaIndexDto -{ - // @DataMember - public name: string; - - // @DataMember - public keys: string[] = []; - - // @DataMember - public unique: boolean; - - // @DataMember - public reason: string; - - // @DataMember - public field: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaIndexIntegrationStatusDto -{ - // @DataMember - public integrationId: string; - - // @DataMember - public state: string; - - // @DataMember - public wanted: SchemaIndexDto[] = []; - - // @DataMember - public created: string[] = []; - - // @DataMember - public dropped: string[] = []; - - // @DataMember - public overCap: SchemaIndexDto[] = []; - - // @DataMember - public refusedReason?: string; - - // @DataMember - public lastRunUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaIndexStatusDto -{ - // @DataMember - public schemaId: string; - - // @DataMember - public env: string; - - // @DataMember - public collection: string; - - // @DataMember - public state: string; - - // @DataMember - public integrations: SchemaIndexIntegrationStatusDto[] = []; - - // @DataMember - public lastRunUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaDiffDto -{ - // @DataMember - public fromVersion: number; - - // @DataMember - public toVersion: number; - - // @DataMember - public added: string[] = []; - - // @DataMember - public removed: string[] = []; - - // @DataMember - public typeChanged: string[] = []; - - // @DataMember - public validatorTightened: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SchemaVersionSummaryDto -{ - // @DataMember - public version: number; - - // @DataMember - public metaSchemaVersion: number; - - // @DataMember - public publishedAt: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class CollectionIndexKeyDto -{ - // @DataMember - public field: string; - - // @DataMember - public order: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class CollectionIndexDto -{ - // @DataMember - public name: string; - - // @DataMember - public keys: CollectionIndexKeyDto[] = []; - - // @DataMember - public createdByNorbix: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SeedCollectionReportItemDto -{ - // @DataMember - public collectionName: string; - - // @DataMember - public requested: number; - - // @DataMember - public inserted: number; - - // @DataMember - public ids: string[] = []; - - // @DataMember - public errors: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SeedCollectionRecordsResultDto -{ - // @DataMember - public insertOrder: string[] = []; - - // @DataMember - public report: SeedCollectionReportItemDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class DatabaseIntegrationListProjection extends IntegrationListProjection -{ - // @DataMember - public provider: DatabaseProvider; - - // @DataMember - public env?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class FlexTierDto -{ - // @DataMember - public code: string; - - // @DataMember - public step: number; - - // @DataMember - public displayName: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class IntegrationTestResultItemDto -{ - // @DataMember - public operation: string; - - // @DataMember - public result: string; - - // @DataMember - public errors?: IReadOnlyList; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SchemaRefDto -{ - // @DataMember(Order=1) - public schemaId: string; - - // @DataMember(Order=2) - public schemaName: string; - - // @DataMember(Order=3) - public databaseIntegrationId: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class CollectionImportDto -{ - // @DataMember - public id: string; - - // @DataMember - public schema: SchemaRefDto; - - // @DataMember - public file: FileResourceRefDto; - - // @DataMember - public errorFile?: FileResourceRefDto; - - // @DataMember - public delimiter: string; - - // @DataMember - public hasHeader: boolean; - - // @DataMember - public status: string; - - // @DataMember - public totalRows: number; - - // @DataMember - public totalImported: number; - - // @DataMember - public totalErrors: number; - - // @DataMember - public failureReason?: string; - - // @DataMember - public mapping?: ImportColumnMappingDto[]; - - // @DataMember - public createdOn: string; - - // @DataMember - public startedOn?: string; - - // @DataMember - public completedOn?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ImportUploadTargetDto -{ - // @DataMember - public url: string; - - // @DataMember - public contentType: string; - - // @DataMember - public file: FileResourceRefDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ImportFileColumnDto -{ - // @DataMember - public index: number; - - // @DataMember - public header: string; - - // @DataMember - public samples: string[] = []; - - // @DataMember - public detectedType: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ImportFileAnalysisDto -{ - // @DataMember - public file: FileResourceRefDto; - - // @DataMember - public columns: ImportFileColumnDto[] = []; - - // @DataMember - public sampleRowCount: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class MongoDbAggregateListProjection implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public displayName: string; - - // @DataMember - public schemaViewId: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class FilesTriggerProjectionList extends TriggerProjectionList -{ - // @DataMember - public type: FilesTriggerType; - - // @DataMember - public folder?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FilesIntegrationListProjection extends IntegrationListProjection -{ - // @DataMember - public provider: FileProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PublicFolderDto -{ - // @DataMember(Order=1) - public path: string; - - // @DataMember(Order=2) - public publicId: string; - - // @DataMember(Order=3) - public publicUrl?: string; - - // @DataMember(Order=4) - public inherited: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class NotificationModuleDependencyItemDto -{ - // @DataMember - public name: string; - - // @DataMember - public viewId?: string; - - // @DataMember - public category?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class NotificationModuleDisableDependenciesDto -{ - // @DataMember - public triggers: NotificationModuleDependencyItemDto[] = []; - - // @DataMember - public schedulerTasks: NotificationModuleDependencyItemDto[] = []; - - // @DataMember - public inFlightCampaigns: NotificationModuleDependencyItemDto[] = []; - - // @DataMember - public membershipSettings: NotificationModuleDependencyItemDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TestEmailValidationItemDto -{ - // @DataMember - public address: string; - - // @DataMember - public verdict: string; - - // @DataMember - public reason?: string; - - // @DataMember - public score?: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TemplateListProjection implements IHasViewId, IHasDatabaseId -{ - // @DataMember - public id?: string; - - // @DataMember - public viewId: string; - - // @DataMember - public templateName: string; - - // @DataMember - public isActive: boolean; - - // @DataMember - public type: CommunicationChannel; - - // @DataMember - public tags?: string[]; - - // @DataMember - public env?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class EmailTemplateListProjection extends TemplateListProjection -{ - public hasAttachments: boolean; - public languages: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class MjmlParseError -{ - // @DataMember(Name="line") - public line: number; - - // @DataMember(Name="message") - public message?: string; - - // @DataMember(Name="tagName") - public tagName?: string; - - // @DataMember(Name="formattedMessage") - public formattedMessage?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class HtmlFromMjmlResponse -{ - // @DataMember(Name="html") - public html: string; - - // @DataMember(Name="errors") - public errors: MjmlParseError[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SystemEmailTemplateListProjection extends EmailTemplateListProjection -{ - // @DataMember - public imagePreview?: string; - - // @DataMember - public description?: string; - - // @DataMember - public theme?: SystemEmailTemplateTheme; - - // @DataMember - public systemTags?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailSignatureDto implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public displayName?: string; - - // @DataMember - public translations: TranslationDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ListItemProjection implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public displayName?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ListItemWithTranslationsProjection extends ListItemProjection -{ - // @DataMember - public translations: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailFooterDto implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public displayName?: string; - - // @DataMember - public translations: TranslationDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class EmailSettings implements IBindableContract -{ - public signatures?: IList; - public footers?: IList; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DomainHealthRecordItemDto -{ - // @DataMember - public record: string; - - // @DataMember - public value: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class EmailIntegrationListProjection extends IntegrationListProjection -{ - public emailProvider: EmailProvider; - public senderEmailAddress: string; - public senderDisplayName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EmailLinkPreferencesDto -{ - public emailAddress?: string; - public unsubscribedFromMarketing: boolean; - public blockReasons: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum CampaignStatus -{ - Pending = 'Pending', - Registered = 'Registered', - Scheduled = 'Scheduled', - Started = 'Started', - Stopped = 'Stopped', - Processing = 'Processing', - Completed = 'Completed', - Failed = 'Failed', -} - -export class CampaignStatusChangeEntryDto -{ - public time: string; - public status: CampaignStatus; - public errors?: ErrorDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class CampaignDto implements IHasResponsibleUserId, IHasDatabaseId -{ - // @DataMember - public viewId: string; - - // @DataMember - public createdOn: string; - - // @DataMember - public language: string; - - // @DataMember - public forceCampaignLanguage: boolean; - - // @DataMember - public campaignProcessingIntegrationId?: string; - - // @DataMember - public statusHistory: CampaignStatusChangeEntryDto[] = []; - - // @DataMember - public status?: CampaignStatusChangeEntryDto; - - // @DataMember - public tokenMappingValues?: TokenMappingDto[]; - - // @DataMember - public notes?: string; - - // @DataMember - public createdById?: string; - - // @DataMember - public timeZoneId?: string; - - // @DataMember - public userId: string; - - // @DataMember - public id?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailCampaignDto extends CampaignDto -{ - // @DataMember - public deliverySettings: EmailCampaignDeliverySettingsDto; - - // @DataMember - public template: EmailTemplateDto; - - // @DataMember - public validationIntegrationId?: string; - - // @DataMember - public templateIsSystem: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailCampaignListProjection -{ - // @DataMember - public viewId: string; - - // @DataMember - public templateName: string; - - // @DataMember - public templateId: string; - - // @DataMember - public integrationId?: string; - - // @DataMember - public language: string; - - // @DataMember - public strategy: string; - - // @DataMember - public latestStatus?: CampaignStatus; - - // @DataMember - public createdOn: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum CampaignBatchStatus -{ - Registered = 'Registered', - Processing = 'Processing', - Completed = 'Completed', - Failed = 'Failed', -} - -export class BatchStatusChangeEntryDto -{ - public time: string; - public status: CampaignBatchStatus; - public errors?: ErrorDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class CampaignBatchDto implements IHasDatabaseId -{ - // @DataMember - public campaignId: string; - - // @DataMember - public batchId: string; - - // @DataMember - public startAfter?: string; - - // @DataMember - public statusHistory: BatchStatusChangeEntryDto[] = []; - - // @DataMember - public id: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailRecipientDto -{ - // @DataMember - public emailAddress: string; - - // @DataMember - public language?: string; - - // @DataMember - public timeZoneId?: string; - - // @DataMember - public userTokenMappings?: TokenMappingDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailRecipientsDto -{ - // @DataMember - public to?: EmailRecipientDto[]; - - // @DataMember - public cc?: EmailRecipientDto[]; - - // @DataMember - public bcc?: EmailRecipientDto[]; - - // @DataMember - public startingAfter?: string; - - // @DataMember - public hasMore: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailCampaignBatchDto extends CampaignBatchDto -{ - // @DataMember - public recipients?: EmailRecipientsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export enum CampaignNotificationStatus -{ - Completed = 'Completed', - BlockedByUserPreferenceBlockAll = 'BlockedByUserPreferenceBlockAll', - BlockedByUserPreferenceBlockByTag = 'BlockedByUserPreferenceBlockByTag', - Failed = 'Failed', - Viewed = 'Viewed', - Clicked = 'Clicked', - BlockedByValidation = 'BlockedByValidation', -} - -export class NotificationStatusChangeEntryDto -{ - public time: string; - public status: CampaignNotificationStatus; - public sourceId?: string; - public errors?: ErrorDto[]; - public tags?: string[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class CampaignBatchNotificationDto implements IHasDatabaseId -{ - // @DataMember - public campaignId: string; - - // @DataMember - public batchId: string; - - // @DataMember - public notificationId: string; - - // @DataMember - public refNotificationId?: string; - - // @DataMember - public body?: string; - - // @DataMember - public model?: { [index:string]: string; }; - - // @DataMember - public statusHistory: NotificationStatusChangeEntryDto[] = []; - - // @DataMember - public id: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class EmailCampaignBatchNotificationDto extends CampaignBatchNotificationDto -{ - // @DataMember - public subject?: string; - - // @DataMember - public recipients: EmailRecipientsDto; - - // @DataMember - public content?: EmailMessageContentDto; - - // @DataMember - public transactionalKind?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class CampaignStatsDto -{ - // @DataMember - public batches: number; - - // @DataMember - public sent: number; - - // @DataMember - public failed: number; - - // @DataMember - public successRate: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsTemplateListProjection extends TemplateListProjection -{ - // @DataMember - public languages: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SmsSettings implements IBindableContract -{ - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SmsIntegrationListProjection extends IntegrationListProjection -{ - // @DataMember - public provider: SmsProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsCampaignDto extends CampaignDto -{ - // @DataMember - public recipients: SmsCampaignDeliverySettingsDto; - - // @DataMember - public template: SmsTemplateDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsRecipientDto -{ - // @DataMember - public phoneNumber: string; - - // @DataMember - public userId: string; - - // @DataMember - public language?: string; - - // @DataMember - public userTokenMappings?: TokenMappingDto[]; - - // @DataMember - public timeZoneId?: string; - - // @DataMember - public record?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsRecipientsDto -{ - // @DataMember - public to?: SmsRecipientDto[]; - - // @DataMember - public startingAfter?: string; - - // @DataMember - public hasMore: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsCampaignBatchDto extends CampaignBatchDto -{ - // @DataMember - public recipients: SmsRecipientsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SmsCampaignBatchNotificationDto extends CampaignBatchNotificationDto -{ - // @DataMember - public recipients: SmsRecipientsDto; - - // @DataMember - public content?: SmsMessageContentDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceListingProjection implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public slug: string; - - // @DataMember - public displayName: string; - - // @DataMember - public vendor: string; - - // @DataMember - public category: MarketplaceCategory; - - // @DataMember - public transport: MarketplaceTransport; - - // @DataMember - public iconUrl?: string; - - // @DataMember - public isOfficial: boolean; - - // @DataMember - public tags: IReadOnlyList; - - // @DataMember - public functionCount: number; - - // @DataMember - public availability: MarketplaceAvailability; - - // @DataMember - public videoUrl?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceAccessCustomPolicyDto -{ - // @DataMember - public policyId: string; - - // @DataMember - public name: string; - - // @DataMember - public usedByRoles: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceAccessRoleDto -{ - // @DataMember - public roleId: string; - - // @DataMember - public name: string; - - // @DataMember - public scope: string; - - // @DataMember - public isSystem: boolean; - - // @DataMember - public fixed: boolean; - - // @DataMember - public package: MarketplaceAccessLevel; - - // @DataMember - public isCustom: boolean; - - // @DataMember - public manage: boolean; - - // @DataMember - public custom: IReadOnlyList; - - // @DataMember - public defaultNotApplied?: string; - - // @DataMember - public canChange: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceAccessPackageDto -{ - // @DataMember - public kind: MarketplaceAccessLevel; - - // @DataMember - public policyId: string; - - // @DataMember - public name: string; - - // @DataMember - public exists: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceAccessToolDto -{ - // @DataMember - public name: string; - - // @DataMember - public readOnly: boolean; - - // @DataMember - public grantable: boolean; - - // @DataMember - public curated: boolean; - - // @DataMember - public excludedFromFullAccess: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceAccessFunctionDto -{ - // @DataMember - public functionId: string; - - // @DataMember - public name: string; - - // @DataMember - public functionKey: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceIntegrationListProjection implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public integrationName: string; - - // @DataMember - public isEnabled: boolean; - - // @DataMember - public listingViewId: string; - - // @DataMember - public vendor: string; - - // @DataMember - public category: MarketplaceCategory; - - // @DataMember - public transport: MarketplaceTransport; - - // @DataMember - public lastIntegrationTestAtUtc?: string; - - // @DataMember - public lastIntegrationTestSucceeded?: boolean; - - // @DataMember - public lastIntegrationTestErrors: IReadOnlyList; - - // @DataMember - public humanDeliveryConfirmedAtUtc?: string; - - // @DataMember - public requiresHumanDeliveryConfirmation: boolean; - - // @DataMember - public signedIn: boolean; - - // @DataMember - public signedInAt?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceMcpToolDto -{ - // @DataMember - public name: string; - - // @DataMember - public title?: string; - - // @DataMember - public description?: string; - - // @DataMember - public inputSchema: string; - - // @DataMember - public readOnlyHint?: boolean; - - // @DataMember - public destructiveHint?: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceAccessChangesDto -{ - // @DataMember - public readOnlyAdded: IReadOnlyList; - - // @DataMember - public readOnlyRemoved: IReadOnlyList; - - // @DataMember - public notGrantable: IReadOnlyList; - - // @DataMember - public readOnlyHintOverridden: IReadOnlyList; - - // @DataMember - public excludedFromFullAccess: IReadOnlyList; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceFunctionProjection implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public integrationViewId: string; - - // @DataMember - public functionKey: string; - - // @DataMember - public displayName: string; - - // @DataMember - public isEnabled: boolean; - - // @DataMember - public mappingCount: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class MarketplaceFunctionRunDto -{ - // @DataMember - public firedAt: string; - - // @DataMember - public event: string; - - // @DataMember - public source: string; - - // @DataMember - public functionId: string; - - // @DataMember - public runAsUserId?: string; - - // @DataMember - public succeeded: boolean; - - // @DataMember - public status?: string; - - // @DataMember - public durationMs?: number; - - // @DataMember - public error?: string; - - // @DataMember - public vendorRequestId?: string; - - // @DataMember - public correlationId?: string; - - // @DataMember - public hasDetails: boolean; - - // @DataMember - public triggerId?: string; - - // @DataMember - public taskId?: string; - - // @DataMember - public input?: string; - - // @DataMember - public integrationId?: string; - - // @DataMember - public toolName?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class CodeIntegrationListProjection extends IntegrationListProjection -{ - // @DataMember - public provider: CodeProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class CodeFunctionDescriptorDto -{ - // @DataMember - public functionId: string; - - // @DataMember - public displayName: string; - - // @DataMember - public runtime?: string; - - // @DataMember - public region?: string; - - // @DataMember - public description?: string; - - // @DataMember - public lastModified?: string; - - // @DataMember - public tags?: { [index:string]: string; }; - - // @DataMember - public arn?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum CodeFunctionQualifierKindDto -{ - Alias = 'Alias', - Version = 'Version', -} - -// @DataContract -export class CodeFunctionQualifierDto -{ - // @DataMember - public name: string; - - // @DataMember - public kind: CodeFunctionQualifierKindDto; - - // @DataMember - public description?: string; - - // @DataMember - public targetVersion?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class CodeFunctionRunDto -{ - // @DataMember - public firedAt: string; - - // @DataMember - public event: string; - - // @DataMember - public source: string; - - // @DataMember - public succeeded: boolean; - - // @DataMember - public statusCode?: number; - - // @DataMember - public durationMs?: number; - - // @DataMember - public error?: string; - - // @DataMember - public requestId?: string; - - // @DataMember - public input?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PushTemplateListProjection extends TemplateListProjection -{ - // @DataMember - public languages: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PushSettings -{ - public marketingTags?: TagDefinitionDto[]; - public transactionalTags?: TagDefinitionDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PushIntegrationListProjection extends IntegrationListProjection -{ - // @DataMember - public provider: PushProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PushDeviceListProjection -{ - // @DataMember - public id: string; - - // @DataMember - public userId: string; - - // @DataMember - public deviceOs: string; - - // @DataMember - public token: string; - - // @DataMember - public brand?: string; - - // @DataMember - public manufacturer?: string; - - // @DataMember - public modelName?: string; - - // @DataMember - public deviceName?: string; - - // @DataMember - public deviceType?: string; - - // @DataMember - public osName?: string; - - // @DataMember - public osVersion?: string; - - // @DataMember - public platformApiLevel?: number; - - // @DataMember - public platform?: string; - - // @DataMember - public appVersion?: string; - - // @DataMember - public installationId?: string; - - // @DataMember - public locale?: string; - - // @DataMember - public timeZone?: string; - - // @DataMember - public updatedAtUtc?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class TeamPushDeviceListProjection extends PushDeviceListProjection -{ - // @DataMember - public ownerKind: string; - - // @DataMember - public ownerName?: string; - - // @DataMember - public ownerEmail?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PushAudienceCountDto -{ - // @DataMember - public devices: number; - - // @DataMember - public recipients: number; - - // @DataMember - public skippedUserIds: number; - - // @DataMember - public isCapped: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PushCampaignDto extends CampaignDto -{ - // @DataMember - public recipients: PushCampaignDeliverySettingsDto; - - // @DataMember - public template: PushTemplateDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class PushRecipientDto -{ - // @DataMember - public deviceTokens: PushDeviceDeliveryTokenDto[] = []; - - // @DataMember - public userId: string; - - // @DataMember - public language?: string; - - // @DataMember - public userTokenMappings?: TokenMappingDto[]; - - // @DataMember - public timeZoneId?: string; - - // @DataMember - public record?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PushRecipientsDto -{ - // @DataMember - public to?: PushRecipientDto[]; - - // @DataMember - public startingAfter?: string; - - // @DataMember - public hasMore: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PushCampaignBatchDto extends CampaignBatchDto -{ - // @DataMember - public recipients: PushRecipientsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class NotificationReadMarkDto -{ - // @DataMember - public userId: string; - - // @DataMember - public readAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PushCampaignBatchNotificationDto extends CampaignBatchNotificationDto -{ - // @DataMember - public subject?: string; - - // @DataMember - public recipients: PushRecipientsDto; - - // @DataMember - public content?: PushMessageContentDto; - - // @DataMember - public readBy?: NotificationReadMarkDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class InAppNotificationDto -{ - public id: string; - public projectId: string; - public userId: string; - public channel: string; - public eventName: string; - public payloadJson?: string; - public isRead: boolean; - public seenAtUtc?: string; - public readAtUtc?: string; - public createdAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PaymentsWebhookLogEntry -{ - public integrationId: string; - public source: string; - public env?: string; - public eventName?: string; - public providerEventId?: string; - public statusCode: number; - public description: string; - public receivedOn: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class PaymentTriggerProjectionList extends TriggerProjectionList -{ - // @DataMember - public type: PaymentTriggerType; - - // @DataMember - public integrations?: string[]; - - // @DataMember - public events?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PaymentsIntegrationListProjection extends IntegrationListProjection -{ - // @DataMember - public gatewayPlatform: PaymentGatewayPlatform; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class LoggingIntegrationListProjection extends IntegrationListProjection -{ - // @DataMember - public provider: LoggingProvider; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TenantLogEntryDto -{ - // @DataMember - public id: string; - - // @DataMember - public timestamp: string; - - // @DataMember - public module: string; - - // @DataMember - public level: string; - - // @DataMember - public eventCode: string; - - // @DataMember - public title: string; - - // @DataMember - public message: string; - - // @DataMember - public correlationId?: string; - - // @DataMember - public traceId?: string; - - // @DataMember - public spanId?: string; - - // @DataMember - public env: string; - - // @DataMember - public meta?: IReadOnlyDictionary; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AgentOnboardingSnippet -{ - public client: string; - public config: string; - public auth: string; - public kind: string; - public recommended: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiProjectContextCallerWireDto -{ - public kind: string; - public name?: string; - public accountId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiProjectContextIntegrationWireDto -{ - public id: string; - public name?: string; - public kind?: string; - public enabled?: boolean; - public defaultIn: string[] = []; - public env?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiProjectContextModuleWireDto -{ - public name: string; - public integrationsReadable?: boolean; - public integrations?: AiProjectContextIntegrationWireDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiProjectContextProjectWireDto -{ - public id: string; - public name: string; - public uniqueName?: string; - public access: string; - public description?: string; - public defaultLanguage?: string; - public languages: string[] = []; - public environments?: string[]; - public primaryRegion?: string; - public additionalRegions?: string[]; - public corsOrigins?: string[]; - public apiHost?: string; - public adminUrl?: string; - public marketingUrl?: string; - public adminPortalEnabled?: boolean; - public modules?: AiProjectContextModuleWireDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiProjectContextWireDto -{ - public version: string; - public caller: AiProjectContextCallerWireDto; - public projects: AiProjectContextProjectWireDto[] = []; - public hints: string[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiToolManifestParameter -{ - public name: string; - public type: string; - public required: boolean; - public description?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AiToolManifestItem -{ - public name: string; - public description: string; - public toolsets: string[] = []; - public requiresConfirmation: boolean; - public parameters: AiToolManifestParameter[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ChatModelOption -{ - public llmIntegrationId?: string; - public kind: string; - public provider: string; - public model: string; - public label: string; - public isDefault: boolean; - public isAuto: boolean; - public contextWindow: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ChatMemoryNote -{ - public id: string; - public kind: string; - public text: string; - public projectId?: string; - public createdAtUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ChatSessionListItem -{ - public sessionId: string; - public profile: string; - public projectId?: string; - public env?: string; - public title?: string; - public updatedAtUtc: string; - public isArchived: boolean; - public isPinned: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ScaffoldStep -{ - public order: number; - public kind: string; - public title: string; - public tool: string; - public arguments: JsonObject; - public checkTool?: string; - public templateRef?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ScaffoldIssue -{ - public where: string; - public code: string; - public message: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ScaffoldStepReportWithLink -{ - public order: number; - public title: string; - public tool: string; - public status: string; - public id?: string; - public dashboardUrl?: string; - public note?: string; - public errors?: IReadOnlyList; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ScaffoldApplyReport -{ - public completed: boolean; - public projectId?: string; - public projectUrl?: string; - public summary?: string; - public steps: ScaffoldStepReportWithLink[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class TemplatePreviewPartResult -{ - public name: string; - public rendered?: string; - public errors: IReadOnlyList; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class TemplatePreview -{ - public channel: string; - public ok: boolean; - public parts: IReadOnlyList; - public errors: IReadOnlyList; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ProjectBriefSourceWireDto -{ - public kind: string; - public sessionId?: string; - public entryId?: string; - public entrySeq?: number; - public eventId?: string; - public userAuthId?: string; - public atUtc: string; - public surface?: string; - public quote?: string; - public workItemId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ProjectBriefSatisfiedByWireDto -{ - public artifactId: string; - public tool: string; - public orphaned: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ProjectBriefRequirementWireDto -{ - public id: string; - public text: string; - public status: string; - public confidence: number; - public isAssumption: boolean; - public sources: ProjectBriefSourceWireDto[] = []; - public satisfiedBy: ProjectBriefSatisfiedByWireDto[] = []; - public sinceEventId: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ProjectBriefDecisionWireDto -{ - public eventId: string; - public text: string; - public confidence: number; - public atUtc: string; - public sources: ProjectBriefSourceWireDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ProjectBriefAssumptionWireDto -{ - public requirementId: string; - public eventId: string; - public text: string; - public confidence: number; - public atUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ProjectBriefSnapshotWireDto -{ - public projectId: string; - public upToSeq: number; - public atUtc: string; - public requirements: ProjectBriefRequirementWireDto[] = []; - public decisions: ProjectBriefDecisionWireDto[] = []; - public openAssumptions: ProjectBriefAssumptionWireDto[] = []; - public summary?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ProjectBriefEventWireDto -{ - public id: string; - public projectId: string; - public seq: number; - public atUtc: string; - public kind: string; - public requirementId?: string; - public supersedesEventId?: string; - public text: string; - public confidence: number; - public sources: ProjectBriefSourceWireDto[] = []; - public origin: string; - public satisfiedBy: ProjectBriefSatisfiedByWireDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class WorkItemEntryRefWireDto -{ - public sessionId: string; - public entryId: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class WorkItemRunRefWireDto -{ - public sessionId: string; - public planEntryId: string; - public runId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class WorkItemArtifactWireDto -{ - public artifactId: string; - public what: string; - public step: number; - public planEntryId?: string; - public kind?: string; - public name?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class WorkItemMovedOutWireDto -{ - public text: string; - public reason: string; - public movedTo?: string; - public source: string; - public entryRef?: WorkItemEntryRefWireDto; - public atUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class WorkItemNeedsYouWireDto -{ - public text: string; - public kind: string; - public entryRef?: WorkItemEntryRefWireDto; - public done: boolean; - public doneAtUtc?: string; - public doneByUserAuthId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class WorkItemOpenQuestionWireDto -{ - public entryRef: WorkItemEntryRefWireDto; - public blocking: boolean; - public text: string; - public atUtc: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class WorkItemDoneConditionWireDto -{ - public condition: number; - public holds: boolean; - public reason: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class WorkItemWireDto -{ - public id: string; - public projectId?: string; - public status: string; - public goal: string; - public notInScope: string[] = []; - public scopeRequirementIds: string[] = []; - public difficulty?: number; - public difficultyReason?: string; - public planEntryRefs: WorkItemEntryRefWireDto[] = []; - public runRefs: WorkItemRunRefWireDto[] = []; - public artifacts: WorkItemArtifactWireDto[] = []; - public movedOut: WorkItemMovedOutWireDto[] = []; - public needsYou: WorkItemNeedsYouWireDto[] = []; - public openQuestions: WorkItemOpenQuestionWireDto[] = []; - public sessionIds: string[] = []; - public parentId?: string; - public children: string[] = []; - public summaryEntryRef?: WorkItemEntryRefWireDto; - public createdBy?: string; - public createdAtUtc: string; - public updatedAtUtc: string; - public doneVerdict?: string; - public doneConditions: WorkItemDoneConditionWireDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum AiTriggerType -{ - OnCreditsWarning = 'OnCreditsWarning', - OnCreditsExhausted = 'OnCreditsExhausted', - OnQuotaWarning = 'OnQuotaWarning', - OnQuotaExhausted = 'OnQuotaExhausted', -} - -// @DataContract -export class AiTriggerProjectionList extends TriggerProjectionList -{ - // @DataMember - public type: AiTriggerType; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class AiTriggerDto extends TriggerDto -{ - // @DataMember - public when: AiTriggerType; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EmbeddingIntegrationDto extends IntegrationDto -{ - public provider: EmbeddingProvider; - public model: string; - public dimension: number; - public baseUrl?: string; - public isConfigured: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EmbeddingIntegrationListProjection extends IntegrationListProjection -{ - public embeddingProvider: EmbeddingProvider; - public model: string; - public dimension: number; - public isConfigured: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class LlmIntegrationListProjection extends IntegrationListProjection -{ - public llmProvider: LlmProvider; - public baseUrl?: string; - public defaultModel?: string; - public isDefault: boolean; - public models: LlmModelOptionDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class McpIntegrationListProjection extends IntegrationListProjection -{ - public mcpProvider: McpProvider; - public transport: McpTransport; - public category?: string; - public description?: string; - public icon?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export interface IVirtualDirectory -{ -} - -export interface IVirtualPathProvider -{ - rootDirectory?: IVirtualDirectory; - virtualPathSeparator?: string; - realPathSeparator?: string; -} - -export interface IVirtualFile -{ - virtualPathProvider?: IVirtualPathProvider; - extension?: string; - length: number; -} - -// @Flags() -export enum CacheControl -{ - None = 0, - Public = 1, - Private = 2, - MustRevalidate = 4, - NoCache = 8, - NoStore = 16, - NoTransform = 32, - ProxyRevalidate = 64, -} - -export interface IContentTypeWriter -{ -} - -// @Flags() -export enum RequestAttributes -{ - None = 0, - Localhost = 1, - LocalSubnet = 2, - External = 4, - Secure = 8, - InSecure = 16, - AnySecurityMode = 24, - HttpHead = 32, - HttpGet = 64, - HttpPost = 128, - HttpPut = 256, - HttpDelete = 512, - HttpPatch = 1024, - HttpOptions = 2048, - HttpOther = 4096, - AnyHttpMethod = 8160, - OneWay = 8192, - Reply = 16384, - AnyCallStyle = 24576, - Soap11 = 32768, - Soap12 = 65536, - Xml = 131072, - Json = 262144, - Jsv = 524288, - ProtoBuf = 1048576, - Csv = 2097152, - Html = 4194304, - Jsonl = 8388608, - MsgPack = 16777216, - FormatOther = 33554432, - AnyFormat = 67076096, - Http = 67108864, - MessageQueue = 134217728, - Tcp = 268435456, - Grpc = 536870912, - EndpointOther = 1073741824, - AnyEndpoint = 2080374784, - InProcess = -2147483648, - InternalNetworkAccess = -2147483645, - AnyNetworkAccessType = -2147483641, - Any = -1, -} - -export interface IRequestPreferences -{ - acceptsBrotli: boolean; - acceptsDeflate: boolean; - acceptsGzip: boolean; -} - -export interface IHttpFile -{ - name?: string; - fileName?: string; - contentLength: number; - contentType?: string; - inputStream?: string; -} - -export interface IRequest -{ - originalRequest?: Object; - response?: IResponse; - operationName?: string; - verb?: string; - requestAttributes: RequestAttributes; - requestPreferences?: IRequestPreferences; - dto?: Object; - contentType?: string; - isLocal: boolean; - userAgent?: string; - cookies?: { [index:string]: Cookie; }; - responseContentType?: string; - hasExplicitResponseContentType: boolean; - items?: { [index:string]: Object; }; - headers?: NameValueCollection; - queryString?: NameValueCollection; - formData?: NameValueCollection; - useBufferedStream: boolean; - rawUrl?: string; - absoluteUri?: string; - userHostAddress?: string; - remoteIp?: string; - authorization?: string; - isSecureConnection: boolean; - acceptTypes?: string[]; - pathInfo?: string; - originalPathInfo?: string; - inputStream?: string; - contentLength: number; - files?: IHttpFile[]; - urlReferrer?: string; - requestAborted: CancellationToken; -} - -export interface IResponse -{ - originalResponse?: Object; - request?: IRequest; - statusCode: number; - statusDescription?: string; - contentType?: string; - outputStream?: string; - dto?: Object; - useBufferedStream: boolean; - isClosed: boolean; - keepAlive: boolean; - hasStarted: boolean; - items?: { [index:string]: Object; }; -} - -// @DataContract -export class SchedulerTaskListProjection implements IHasViewId -{ - // @DataMember - public taskId: string; - - // @DataMember - public name: string; - - // @DataMember - public cron: string; - - // @DataMember - public type: SchedulerTaskType; - - // @DataMember - public isEnabled: boolean; - - // @DataMember - public isFailing: boolean; - - // @DataMember - public lastFailureReason?: string; - - // @DataMember - public lastFailedAtUnix?: number; - - // @DataMember - public endsAtUnix?: number; - - // @DataMember - public hasEnded: boolean; - - // @DataMember - public viewId: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum SchedulerTaskRunOutcome -{ - Fired = 1, - Failed = 2, - Skipped = 3, -} - -// @DataContract -export class SchedulerTaskRunDto -{ - // @DataMember - public logId: string; - - // @DataMember - public atUtc: string; - - // @DataMember - public atUnix: number; - - // @DataMember - public outcome: SchedulerTaskRunOutcome; - - // @DataMember - public reason?: string; - - // @DataMember - public detail?: string; - - // @DataMember - public correlationId?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum ResolvedRefStatus -{ - Ok = 'ok', - NotFound = 'notFound', - Unauthorized = 'unauthorized', - SourceError = 'sourceError', - Erased = 'erased', -} - -export class ResolvedResourceEntry -{ - public ref: ResourceRefDto; - public status: ResolvedRefStatus; - public resolved?: Object; - public diagnostic?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ChannelSubscriptionStateDto -{ - // @DataMember - public unsubscribed: boolean; - - // @DataMember - public blockedTags: { [index:string]: string[]; } = {}; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class UserDto -{ - // @DataMember - public id: string; - - // @DataMember - public projectId: string; - - // @DataMember - public primaryEmail?: string; - - // @DataMember - public primaryPhone?: string; - - // @DataMember - public displayName?: string; - - // @DataMember - public firstName?: string; - - // @DataMember - public lastName?: string; - - // @DataMember - public fullName?: string; - - // @DataMember - public company?: string; - - // @DataMember - public locale?: string; - - // @DataMember - public timeZone?: string; - - // @DataMember - public gender?: string; - - // @DataMember - public birthDate?: number; - - // @DataMember - public addressLine1?: string; - - // @DataMember - public addressLine2?: string; - - // @DataMember - public country?: string; - - // @DataMember - public city?: string; - - // @DataMember - public state?: string; - - // @DataMember - public postalCode?: string; - - // @DataMember - public tags?: string[]; - - // @DataMember - public roles?: string[]; - - // @DataMember - public lifecycle: string; - - // @DataMember - public sourceOfCreation: string; - - // @DataMember - public mergedIntoContactId?: string; - - // @DataMember - public createdOn: string; - - // @DataMember - public modifiedOn: string; - - // @DataMember - public auths?: AuthDto[]; - - // @DataMember - public marketingPreferences?: { [index:string]: ChannelSubscriptionStateDto; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ContactRolesRepairDto -{ - // @DataMember(Name="dryRun") - public dryRun: boolean; - - // @DataMember(Name="contactsWithoutRoles") - public contactsWithoutRoles: number; - - // @DataMember(Name="contactsToRepair") - public contactsToRepair: number; - - // @DataMember(Name="contactsRepaired") - public contactsRepaired: number; - - // @DataMember(Name="contactsWithoutLoginRoleIds") - public contactsWithoutLoginRoleIds: number; - - // @DataMember(Name="legacyRoleNamesIgnored") - public legacyRoleNamesIgnored: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ConsentPurposeDto -{ - public key: string; - public name: string; - public channel: string; - public mappedTags: string[] = []; - public regulatoryBasis: string[] = []; - public description?: string; - public isDeprecated: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class RetentionWindowDto -{ - public dataKind: string; - public days: number; - public action: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ProjectComplianceDto -{ - public regimes: string[] = []; - public consentPurposes: ConsentPurposeDto[] = []; - public retentionWindows: RetentionWindowDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class LegalHoldDto -{ - public id: string; - public subjectKind: string; - public subjectId: string; - public reason: string; - public placedAt: string; - public placedBy?: string; - public releasedAt?: string; - public releasedBy?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class DsarRequestDto -{ - public id: string; - public subjectKind: string; - public subjectId: string; - public status: string; - public receivedAt: string; - public slaDeadline: string; - public autoApproveAt?: string; - public decidedAt?: string; - public decidedBy?: string; - public rejectionReason?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ComplianceAuditEntryDto -{ - public id: string; - public timestamp: string; - public action: string; - public subjectKind?: string; - public subjectId?: string; - public reason?: string; - public metadata?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class AccountComplianceDto -{ - public dsarMode: string; - public dsarDelayDays: number; - public autoForwardAdvisories: boolean; - public securityContact?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum SupportCaseKind -{ - Question = 'Question', - Bug = 'Bug', - Incident = 'Incident', - Billing = 'Billing', - Security = 'Security', - FeatureRequest = 'FeatureRequest', -} - -export enum SupportCaseSeverity -{ - S1 = 1, - S2 = 2, - S3 = 3, - S4 = 4, -} - -export enum SupportCaseStatus -{ - Open = 'Open', - Triaged = 'Triaged', - InProgress = 'InProgress', - WaitingOnCustomer = 'WaitingOnCustomer', - Resolved = 'Resolved', - Closed = 'Closed', -} - -export enum SupportCustomerStatus -{ - Pending = 'Pending', - Open = 'Open', - Solved = 'Solved', - Closed = 'Closed', -} - -export enum DeploymentMode -{ - Managed = 'Managed', - SelfHosted = 'SelfHosted', - Enterprise = 'Enterprise', -} - -// @DataContract -export class SupportCaseDto implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public accountId: string; - - // @DataMember - public projectId?: string; - - // @DataMember - public reporterId?: string; - - // @DataMember - public kind: SupportCaseKind; - - // @DataMember - public severity: SupportCaseSeverity; - - // @DataMember - public status: SupportCaseStatus; - - // @DataMember - public customerStatus: SupportCustomerStatus; - - // @DataMember - public subject: string; - - // @DataMember - public affectedModule?: string; - - // @DataMember - public deploymentMode: DeploymentMode; - - // @DataMember - public gatewayVersion?: string; - - // @DataMember - public region?: string; - - // @DataMember - public planTier?: string; - - // @DataMember - public openedOn: number; - - // @DataMember - public firstResponseOn?: number; - - // @DataMember - public resolvedOn?: number; - - // @DataMember - public closedOn?: number; - - // @DataMember - public resolution?: string; - - // @DataMember - public messageCount: number; - - // @DataMember - public lastMessageOn?: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export enum SupportMessageAuthorKind -{ - Customer = 'Customer', - Staff = 'Staff', - Ai = 'Ai', - System = 'System', -} - -// @DataContract -export class SupportCaseMessageDto -{ - // @DataMember - public id: string; - - // @DataMember - public caseId: string; - - // @DataMember - public authorKind: SupportMessageAuthorKind; - - // @DataMember - public authorId?: string; - - // @DataMember - public authorDisplayName?: string; - - // @DataMember - public body: string; - - // @DataMember - public sentOn: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SupportCaseDetailDto -{ - // @DataMember - public case: SupportCaseDto; - - // @DataMember - public messages: SupportCaseMessageDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class SupportCaseListProjection implements IHasViewId -{ - // @DataMember - public viewId: string; - - // @DataMember - public projectId?: string; - - // @DataMember - public kind: SupportCaseKind; - - // @DataMember - public severity: SupportCaseSeverity; - - // @DataMember - public status: SupportCaseStatus; - - // @DataMember - public customerStatus: SupportCustomerStatus; - - // @DataMember - public subject: string; - - // @DataMember - public openedOn: number; - - // @DataMember - public messageCount: number; - - // @DataMember - public lastMessageOn?: number; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticPackStepDescriptorDto -{ - // @DataMember - public stepId: string; - - // @DataMember - public kind: string; - - // @DataMember - public description: string; - - // @DataMember - public parameters: { [index:string]: string; } = {}; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticPackDescriptorDto -{ - // @DataMember - public name: string; - - // @DataMember - public version: number; - - // @DataMember - public summary: string; - - // @DataMember - public steps: DiagnosticPackStepDescriptorDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticPackStepResultDto -{ - // @DataMember - public stepId: string; - - // @DataMember - public kind: string; - - // @DataMember - public isSuccess: boolean; - - // @DataMember - public result?: Object; - - // @DataMember - public errorMessage?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticPackRunResultDto -{ - // @DataMember - public packName: string; - - // @DataMember - public packVersion: number; - - // @DataMember - public caseId?: string; - - // @DataMember - public steps: DiagnosticPackStepResultDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticEchoRegionDto -{ - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticEchoDto -{ - // @DataMember - public containerName?: string; - - // @DataMember - public isManagedService: boolean; - - // @DataMember - public apiVersion: string; - - // @DataMember - public hubVersion: string; - - // @DataMember - public release: string; - - // @DataMember - public runtime: string; - - // @DataMember - public hubUrl: string; - - // @DataMember - public apiUrl: string; - - // @DataMember - public licensePresent: boolean; - - // @DataMember - public regions?: DiagnosticEchoRegionDto[]; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticEventItemDto -{ - // @DataMember - public position: number; - - // @DataMember - public eventType: string; - - // @DataMember - public payload?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticEventsPageDto -{ - // @DataMember - public stream: string; - - // @DataMember - public from: number; - - // @DataMember - public count: number; - - // @DataMember - public hasMore: boolean; - - // @DataMember - public nextFrom: number; - - // @DataMember - public items: DiagnosticEventItemDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticLogsResponse -{ - // @DataMember - public list?: PaginatedResponse; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticRedisListItemDto -{ - // @DataMember - public viewId: string; - - // @DataMember - public name?: string; - - // @DataMember - public status?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticRedisInspectDto -{ - // @DataMember - public keyPattern: string; - - // @DataMember - public cacheKey: string; - - // @DataMember - public isList: boolean; - - // @DataMember - public item?: { [index:string]: Object; }; - - // @DataMember - public listItems?: DiagnosticRedisListItemDto[]; - - // @DataMember - public hasMore: boolean; - - // @DataMember - public startingAfter?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class DiagnosticHealthCheckDto -{ - // @DataMember - public checkId: string; - - // @DataMember - public isHealthy: boolean; - - // @DataMember - public statusCode: number; - - // @DataMember - public detail?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ResponseError -{ - // @DataMember(Order=1) - public errorCode: string; - - // @DataMember(Order=2) - public fieldName: string; - - // @DataMember(Order=3) - public message: string; - - // @DataMember(Order=4) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class ResponseStatus -{ - // @DataMember(Order=1) - public errorCode: string; - - // @DataMember(Order=2) - public message?: string; - - // @DataMember(Order=3) - public stackTrace?: string; - - // @DataMember(Order=4) - public errors?: ResponseError[]; - - // @DataMember(Order=5) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export interface ILlmApiKeyRequest -{ - apiKey: string; -} - -export interface IHasViewId -{ - viewId: string; -} - -export interface IHasDatabaseId -{ - id?: string; -} - -export interface IBindableContract -{ -} - -export interface IHasRazorTemplateCode -{ -} - -export interface IQueuedTrigger -{ - viewId: string; - name: string; - order?: number; - breakOnError: boolean; -} - -export interface IHasResponsibleUserId -{ - userId: string; -} - -export interface ICursorArgs -{ - field: string; - order: number; -} - -export class EchoResponse -{ - public release: CodeMashRelease; - public runtime: CodeMashRuntime; - public managedServiceHubUrl: string; - public managedServiceApiUrl: string; - public hubUrl: string; - public apiUrl: string; - public apiVersion: string; - public hubVersion: string; - public adminUrlTemplate?: string; - public emailServiceConfigured: boolean; - public rootBootstrapPasswordSource?: string; - public regions?: EchoRegionDto[]; - public agent?: EchoAgentDto; - public hostingPlatform?: EchoHostingPlatformDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PublicProjectConfigDto -{ - public displayName: string; - public adminPortalEnabled: boolean; - public branding?: PublicBrandDto; - public auth: PublicAuthDto; - public aiChat: PublicAiChatDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class PublicLegalDocumentDto -{ - public kind: string; - public title?: string; - public body: string; - public available: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class GetTriggerDefinitionResponse extends ResponseBase -{ - // @DataMember - public trigger?: SaveTriggerRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class GetTriggersNeedingAttentionResponse extends ResponseBase -{ - // @DataMember - public items: TriggerAttentionDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestTriggerPreExecuteCodeResponse extends ResponseBase -{ - // @DataMember - public outcome: string; - - // @DataMember - public triggerRuns: boolean; - - // @DataMember - public problems: TriggerActivationTestProblem[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAccountProfileResponse extends ResponseBase -{ - public item?: AccountOwnerDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EmptyResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAccountStatusResponse extends ResponseBase -{ - public item?: AccountStatusDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class CreateStripeCheckoutSessionResponse extends IdResponse -{ - // @DataMember - public trialIncluded: boolean; - - // @DataMember - public noTrialReason?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class GetStripeBillingPortalUrlResponse extends IdResponse -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class CreateTeamMemberFromInvitationResponse extends IdResponse -{ - // @DataMember - public token?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAccountUsageBillingResponse extends ResponseBase -{ - public item?: UsageBillingDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PromoteEnvironmentResponse extends ResponseBase -{ - public item?: PromotionResultDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetProjectEnvironmentsResponse extends ResponseBase -{ - public item?: ProjectEnvironmentsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetProjectResponse extends ResponseBase -{ - public item?: ProjectDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetProjectsResponse extends ResponseBase -{ - public list?: ProjectListItemDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAccountRegionsResponse extends ResponseBase -{ - public items?: ProjectRegionDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class WaitForProjectActiveResponse extends ResponseBase -{ - public status?: string; - public isActive: boolean; - public waitedSeconds: number; - public message?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetProjectTokensResponse extends ResponseBase -{ - public tokens?: TokenMappingDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AdminPortalStructureDto -{ - public projectId: string; - public adminPortalEnabled: boolean; - public displayName: string; - public modules: AdminPortalModuleDto[] = []; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class CreateAiCreditPackCheckoutResponse extends ResponseBase -{ - public result?: AiCreditPackCheckoutDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetProjectAiPlansResponse extends ResponseBase -{ - public result?: ProjectAiPlansDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class UpdateProjectAiPlansResponse extends ResponseBase -{ - public planIds: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetProjectAiUserPlansResponse extends ResponseBase -{ - public result?: AiUserPlansDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetProjectAiSettingsResponse extends ResponseBase -{ - public result?: ProjectAiSettingsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetProjectAiUsageResponse extends ResponseBase -{ - public result?: ProjectAiUsageDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class CheckProjectLanguagesResponse extends ResponseBase -{ - // @DataMember - public templates: TemplateLanguageGapDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class CreateAccountResponse extends IdResponse -{ - // @DataMember - public token?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAccountCollaboratorsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAccountPasswordPolicyResponse extends ResponseBase -{ - public policy?: AccountPasswordPolicyDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAccountTeamPoliciesResponse extends ResponseBase -{ - public policies?: PolicyItemDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAccountTeamRolesResponse extends ResponseBase -{ - public roles?: AccountTeamRoleDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AccountPasskeyOkResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AccountPasskeyVerificationTokenResponse extends ResponseBase -{ - public verificationToken: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AccountPasskeyCeremonyOptionsResponse extends ResponseBase -{ - public ceremonyId: string; - public optionsJson: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AccountPasskeyAuthTokensResponse extends ResponseBase -{ - public accessToken: string; - public refreshToken: string; - public expiresInSeconds: number; - public recoveryCodes?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AccountPasskeyListResponse extends ResponseBase -{ - public passkeys: AccountPasskeyListItemDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AccountPasskeyEnrollmentResponse extends ResponseBase -{ - public recoveryCodes?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMyAccountUserProfileResponse extends ResponseBase -{ - public item?: AuthDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLicenseDomainDnsStatusResponse extends ResponseBase -{ - public status?: LicenseDomainDnsStatusDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class StartLicenseDomainVerificationResponse extends ResponseBase -{ - public challenge?: LicenseDomainVerificationChallengeDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLicenseDomainVerificationStatusResponse extends ResponseBase -{ - public status?: LicenseDomainVerificationStatusDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLicensesResponse extends ResponseBase -{ - public list?: LicenseDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PostLicenseHeartbeatResponse extends ResponseBase -{ - public verdict?: LicenseHeartbeatVerdictDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetInstallationLicenseStatusResponse extends ResponseBase -{ - public status?: InstallationLicenseStatusDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLicenseKeyResponse extends ResponseBase -{ - public key?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class CreateAiServiceUserResponse extends ResponseBase -{ - // @DataMember - public id: string; - - // @DataMember - public keyId: string; - - // @DataMember - public key: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class ListAiServiceUsersResponse extends ResponseBase -{ - // @DataMember - public items: AiServiceUserDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class RotateAiServiceUserKeyResponse extends ResponseBase -{ - // @DataMember - public keyId: string; - - // @DataMember - public key: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ImportUsersResponse extends ResponseBase -{ - public result?: UsersImportDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RepairLoginProjectIdsResponse extends ResponseBase -{ - public result?: LoginProjectRepairDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class IssueServiceUserApiKeyResponse -{ - public id: number; - public name: string; - public key: string; - public environment?: string; - public responseStatus?: CodeMashResponseStatus; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class ListServiceUserApiKeysResponse -{ - public keys: ServiceUserApiKeyDto[] = []; - public responseStatus?: CodeMashResponseStatus; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class GetMembershipTriggerResponse extends GetTriggerResponse -{ - public trigger?: MembershipTriggerDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class GetMembershipTriggersResponse extends GetTriggersResponse -{ - // @DataMember - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetRoleResponse extends ResponseBase -{ - public role?: RoleItemDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetRolesResponse extends ResponseBase -{ - public roles: RoleListProjectionDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPolicyResponse extends ResponseBase -{ - public policy?: PolicyItemDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPoliciesResponse extends ResponseBase -{ - public policies: PolicyItemDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPasskeySettingsResponse extends ResponseBase -{ - public result?: PasskeySettingsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMembershipIntegrationResponse extends ResponseBase -{ - public item?: MembershipIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMembershipIntegrationsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAuthorizationSettingsResponse extends ResponseBase -{ - public result?: MembershipAuthorizationViewDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class UpdatePasswordComplexityResponse extends ResponseBase -{ - public result: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAuthenticationSettingsResponse extends ResponseBase -{ - public result?: MembershipAuthenticationViewDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSchemaTriggerResponse extends GetTriggerResponse -{ - public trigger?: SchemaTriggerDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSchemaTriggersResponse extends GetTriggersResponse -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseTaxonomyResponse extends ResponseBase -{ - public item?: TaxonomyDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseTaxonomiesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseTaxonomyTreeResponse extends ResponseBase -{ - public tree?: TaxonomyTreeDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseTaxonomyTermResponse extends ResponseBase -{ - public item?: TermDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseMergedTermTreeResponse extends ResponseBase -{ - public tree?: TermTreeDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseTaxonomyTermTreeResponse extends ResponseBase -{ - public tree?: TermTreeDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class ApplyDatabaseSchemaBundleResponse extends ResponseBase -{ - // @DataMember - public tier?: string; - - // @DataMember - public taxonomies: AppliedTaxonomyDto[] = []; - - // @DataMember - public collections: AppliedCollectionDto[] = []; - - // @DataMember - public decisions: string[] = []; - - // @DataMember - public errors: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseSchemaResponse extends ResponseBase -{ - public item?: SchemaDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseSchemasResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseSchemaDraftResponse extends ResponseBase -{ - public item?: SchemaDraftDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseSchemaIndexStatusResponse extends ResponseBase -{ - public status?: SchemaIndexStatusDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseSchemaListSettingsResponse extends ResponseBase -{ - public settings?: SchemaListSettingsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseSchemaVersionDiffResponse extends ResponseBase -{ - public item?: SchemaDiffDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseSchemaVersionsResponse extends ResponseBase -{ - public items?: SchemaVersionSummaryDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AggregateRecordsResponse extends ResponseBase -{ - public result?: Object[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class CountRecordsResponse extends ResponseBase -{ - public count: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class DistinctRecordValuesResponse extends ResponseBase -{ - public values?: Object[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ExecuteRecordsAggregateResponse extends ResponseBase -{ - public result?: Object[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FindRecordsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class FindOneRecordResponse extends ResponseBase -{ - public result?: Object; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetCollectionIndexesResponse extends ResponseBase -{ - public indexes?: CollectionIndexDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SeedCollectionRecordsResponse extends ResponseBase -{ - // @DataMember - public result?: SeedCollectionRecordsResultDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseIntegrationResponse extends ResponseBase -{ - public item?: DatabaseIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseIntegrationsResponse extends ResponseBase -{ - public defaultIntegrationId?: string; - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAllowedFlexTiersResponse extends ResponseBase -{ - public tiers?: FlexTierDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RevealManagedFlexConnectionStringResponse extends ResponseBase -{ - public connectionString?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestDatabaseIntegrationResponse extends ResponseBase -{ - // @DataMember - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetCollectionImportResponse extends ResponseBase -{ - public result?: CollectionImportDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetCollectionImportsResponse extends ResponseBase -{ - public result?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RequestImportUploadUrlResponse extends ResponseBase -{ - public result?: ImportUploadTargetDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AnalyzeImportFileResponse extends ResponseBase -{ - public result?: ImportFileAnalysisDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseAggregateResponse extends ResponseBase -{ - public item?: MongoDbAggregateDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDatabaseAggregatesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class TestDatabaseAggregateResponse extends ResponseBase -{ - public result?: Object[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetFilesTriggerResponse extends GetTriggerResponse -{ - public trigger?: FilesTriggerDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetFilesTriggersResponse extends GetTriggersResponse -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetFilesIntegrationResponse extends ResponseBase -{ - public item?: FilesIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetFilesIntegrationsResponse extends ResponseBase -{ - public defaultIntegrationId?: string; - public list?: PaginatedResponse; - public availableProviders: FileProvider[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestFilesIntegrationResponse extends ResponseBase -{ - // @DataMember - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetFileResponse extends ResponseBase -{ - public file?: FileResourceRefDto; - public isPublic?: boolean; - public publicUrl?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetFileByIdResponse extends ResponseBase -{ - public file?: FileResourceRefDto; - public isPublic?: boolean; - public publicUrl?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetFolderFilesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - public folders?: IList; - public publicFolders?: IList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetNotificationModuleDisableDependenciesResponse extends ResponseBase -{ - public dependencies?: NotificationModuleDisableDependenciesDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestEmailValidationIntegrationResponse extends ResponseBase -{ - // @DataMember - public items: TestEmailValidationItemDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailTemplateResponse extends ResponseBase -{ - public item?: EmailTemplateDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailTemplatesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetHtmlFromMjmlResponse extends ResponseBase -{ - public variables?: string[]; - public htmlFromMjmlResponse?: HtmlFromMjmlResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSystemEmailTemplateResponse extends ResponseBase -{ - public item?: SystemEmailTemplateDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSystemEmailTemplatesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailTemplateAvailableTokensResponse extends ResponseBase -{ - public tokens?: { [index:string]: string[]; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailSignatureResponse extends ResponseBase -{ - public item?: EmailSignatureDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailSignaturesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailSettingsResponse extends ResponseBase -{ - public settings?: EmailSettings; - public systemTags?: GroupDefinitionDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class CheckEmailIntegrationDomainHealthResponse extends ResponseBase -{ - // @DataMember - public domain?: string; - - // @DataMember - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailIntegrationResponse extends ResponseBase -{ - public item?: EmailIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailIntegrationsResponse extends ResponseBase -{ - public defaultIntegrationId?: string; - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestEmailIntegrationResponse extends ResponseBase -{ - // @DataMember - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailFooterResponse extends ResponseBase -{ - public item?: EmailFooterDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailFootersResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailPreferencesByLinkResponse extends ResponseBase -{ - public item?: EmailLinkPreferencesDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailCampaignResponse extends ResponseBase -{ - public item?: EmailCampaignDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailCampaignsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailCampaignBatchesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailCampaignBatchNotificationResponse extends ResponseBase -{ - public campaignNotification?: EmailCampaignBatchNotificationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailCampaignBatchNotificationsResponse extends ResponseBase -{ - public batchStatusHistory?: BatchStatusChangeEntryDto[]; - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailCampaignStatisticsResponse extends ResponseBase -{ - public stats?: CampaignStatsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PreviewEmailNotificationResponse extends ResponseBase -{ - public subject?: string; - public body?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmailCampaignMessagesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsTemplateResponse extends ResponseBase -{ - public item?: SmsTemplateDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsTemplatesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsMessageContentTokensResponse extends ResponseBase -{ - public tokens?: { [index:string]: string[]; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RenderSmsTextResponse extends ResponseBase -{ - public variables?: string[]; - public text?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsSettingsResponse extends ResponseBase -{ - public settings?: SmsSettings; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsIntegrationResponse extends ResponseBase -{ - public item?: SmsIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsIntegrationsResponse extends ResponseBase -{ - public defaultIntegrationId?: string; - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestSmsIntegrationResponse extends ResponseBase -{ - // @DataMember - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsCampaignResponse extends ResponseBase -{ - public smsCampaign?: SmsCampaignDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsCampaignsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsCampaignBatchesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsCampaignBatchNotificationResponse extends ResponseBase -{ - public campaignNotification?: SmsCampaignBatchNotificationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsCampaignBatchNotificationsResponse extends ResponseBase -{ - public batchStatusHistory?: BatchStatusChangeEntryDto[]; - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsCampaignStatisticsResponse extends ResponseBase -{ - public stats?: CampaignStatsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PreviewSmsNotificationResponse extends ResponseBase -{ - public body?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSmsCampaignMessagesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMarketplaceListingResponse extends ResponseBase -{ - public listing?: MarketplaceListingDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMarketplaceTokensResponse extends ResponseBase -{ - public tokens?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMarketplaceListingsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class GetMarketplaceIntegrationAccessResponse extends ResponseBase -{ - // @DataMember - public roles: IReadOnlyList; - - // @DataMember - public packages: IReadOnlyList; - - // @DataMember - public tools: IReadOnlyList; - - // @DataMember - public functions: IReadOnlyList; - - // @DataMember - public canManage: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class SaveMarketplaceIntegrationCustomAccessResponse extends ResponseBase -{ - // @DataMember - public policyId?: string; - - // @DataMember - public created: boolean; - - // @DataMember - public usedByRoles: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMarketplaceIntegrationResponse extends ResponseBase -{ - public integration?: MarketplaceIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMarketplaceIntegrationsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMarketplaceIntegrationToolsResponse extends ResponseBase -{ - public tools: IReadOnlyList; - public listedAt?: string; - public catalogHash?: string; - public truncated: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class StartMarketplaceIntegrationSignInResponse extends ResponseBase -{ - public authorizeUrl?: string; - public redirectUrl?: string; - public expiresAt?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SignOutMarketplaceIntegrationResponse extends ResponseBase -{ - public wasSignedIn: boolean; - public revoke?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class EmptyMarketplaceSecretsResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RevealMarketplaceIntegrationSecretsResponse extends ResponseBase -{ - public secrets?: IReadOnlyDictionary; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestMarketplaceIntegrationResponse extends ResponseBase -{ - // @DataMember - public items?: IReadOnlyList; - - // @DataMember - public steps?: IReadOnlyList; - - // @DataMember - public accessChanges?: MarketplaceAccessChangesDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SetMarketplaceIntegrationTokenMappingsResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMarketplaceFunctionResponse extends ResponseBase -{ - public function?: MarketplaceFunctionDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMarketplaceFunctionsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMarketplaceFunctionCatalogResponse extends ResponseBase -{ - public functions: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMarketplaceFunctionRunsResponse extends ResponseBase -{ - public runs: MarketplaceFunctionRunDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class InvokeMarketplaceFunctionResponse extends ResponseBase -{ - public isSuccess: boolean; - public output?: Object; - public vendorRequestId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetCodeIntegrationResponse extends ResponseBase -{ - public item?: CodeIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetCodeIntegrationsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestCodeIntegrationResponse extends ResponseBase -{ - // @DataMember - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetCodeFunctionsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetCodeFunctionEventSampleResponse extends ResponseBase -{ - public sample?: CodeFunctionEventDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetCodeFunctionQualifiersResponse extends ResponseBase -{ - public qualifiers?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetCodeFunctionRunsResponse extends ResponseBase -{ - public runs: CodeFunctionRunDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class InvokeCodeFunctionResponse extends ResponseBase -{ - public statusCode: number; - public output?: Object; - public durationMs: number; - public requestId?: string; - public logs?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushTemplateResponse extends ResponseBase -{ - public item?: PushTemplateDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushTemplatesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushMessageContentTokensResponse extends ResponseBase -{ - public tokens?: { [index:string]: string[]; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RenderPushResponse extends ResponseBase -{ - public variables?: string[]; - public title?: string; - public body?: string; - public subtitle?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushSettingsResponse extends ResponseBase -{ - public settings?: PushSettings; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushIntegrationResponse extends ResponseBase -{ - public item?: PushIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushIntegrationsResponse extends ResponseBase -{ - public defaultIntegrationId?: string; - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushDeviceResponse extends ResponseBase -{ - public item?: PushDeviceDto; - public userId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushDevicesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - public teamDevices: TeamPushDeviceListProjection[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushCampaignAudienceCountResponse extends ResponseBase -{ - public result?: PushAudienceCountDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushCampaignResponse extends ResponseBase -{ - public item?: PushCampaignDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushCampaignsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushCampaignBatchesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushCampaignBatchNotificationResponse extends ResponseBase -{ - public campaignNotification?: PushCampaignBatchNotificationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushCampaignBatchNotificationsResponse extends ResponseBase -{ - public batchStatusHistory?: BatchStatusChangeEntryDto[]; - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushCampaignStatisticsResponse extends ResponseBase -{ - public stats?: CampaignStatsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class PreviewPushNotificationResponse extends ResponseBase -{ - public title?: string; - public body?: string; - public subtitle?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPushCampaignMessagesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetNotificationInboxResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetUnreadCountResponse extends ResponseBase -{ - public count: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MarkNotificationReadResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class MarkAllNotificationsReadResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPaymentsWebhookLogResponse extends ResponseBase -{ - public list?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPaymentsTriggerResponse extends GetTriggerResponse -{ - public trigger?: PaymentTriggerDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPaymentsTriggersResponse extends GetTriggersResponse -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPaymentsIntegrationResponse extends ResponseBase -{ - public item?: PaymentsIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetPaymentsIntegrationsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestPaymentsIntegrationResponse extends ResponseBase -{ - // @DataMember - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLoggingIntegrationResponse extends ResponseBase -{ - public item?: LoggingIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLoggingIntegrationsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestLoggingIntegrationResponse extends ResponseBase -{ - // @DataMember - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class CleanLogsResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLogsByCorrelationIdResponse extends ResponseBase -{ - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLogsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLogSettingsResponse extends ResponseBase -{ - public skipCloudDashboardLogs: boolean; - public skipHttpBodyMeta: boolean; - public aiChatLoggingEnabled: boolean; - public hasNorbixLogging: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class SaveLogSettingsResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAgentOnboardingResponse extends ResponseBase -{ - public prompt?: string; - public hubUrl?: string; - public apiUrl?: string; - public mcpUrl?: string; - public docsUrl?: string; - public installationType?: string; - public snippets?: AgentOnboardingSnippet[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAiContextResponse extends ResponseBase -{ - public version?: string; - public unchanged: boolean; - public context?: AiProjectContextWireDto; - public markdown?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAiToolsResponse extends ResponseBase -{ - public tools?: AiToolManifestItem[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class InvokeAiToolResponse extends ResponseBase -{ - public result?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class UploadChatAttachmentResponse extends ResponseBase -{ - public id?: string; - public sessionId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ChatAvailabilityResponse extends ResponseBase -{ - public available: boolean; - public reason?: string; - public profiles?: string[]; - public models?: ChatModelOption[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetChatMemoryResponse extends ResponseBase -{ - public notes?: ChatMemoryNote[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetChatSessionsResponse extends ResponseBase -{ - public sessions?: ChatSessionListItem[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetChatSessionEntriesResponse extends ResponseBase -{ - public sessionId?: string; - public profile?: string; - public projectId?: string; - public env?: string; - public entries?: AiChatEntryWireDto[]; - public lastSeq: number; - public activeWorkItemIds?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ChatTurnResponse extends ResponseBase -{ - public sessionId?: string; - public reply?: string; - public screenPatch?: ChatScreenContextDto; - public toolTrace?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ScaffoldProjectResponse extends ResponseBase -{ - public mode?: string; - public env?: string; - public valid: boolean; - public plan?: ScaffoldStep[]; - public defaults?: string[]; - public issues?: ScaffoldIssue[]; - public report?: ScaffoldApplyReport; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ValidateSchemaResponse extends ResponseBase -{ - public valid: boolean; - public issues?: ScaffoldIssue[]; - public collections?: string[]; - public warnings?: ScaffoldIssue[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RenderTemplatePreviewResponse extends ResponseBase -{ - public preview?: TemplatePreview; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetProjectBriefResponse extends ResponseBase -{ - public projectId?: string; - public snapshot?: ProjectBriefSnapshotWireDto; - public events?: ProjectBriefEventWireDto[]; - public lastSeq: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetWorkItemsResponse extends ResponseBase -{ - public projectId?: string; - public workItems?: WorkItemWireDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetWorkItemResponse extends ResponseBase -{ - public workItem?: WorkItemWireDto; - public plans?: AiChatEntryWireDto[]; - public steps?: AiChatEntryWireDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ExportWorkItemResponse extends ResponseBase -{ - public workItemId?: string; - public markdown?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAiTriggersResponse extends GetTriggersResponse -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAiTriggerResponse extends GetTriggerResponse -{ - public trigger?: AiTriggerDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AuthDeviceStartResponse extends ResponseBase -{ - public deviceCode?: string; - public userCode?: string; - public verificationUri?: string; - public verificationUriComplete?: string; - public expiresIn: number; - public interval: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AuthDeviceTokenResponse extends ResponseBase -{ - public error?: string; - public errorDescription?: string; - public errorCode?: string; - public reason?: string; - public bearerToken?: string; - public refreshToken?: string; - public expiresIn?: number; - public clientId?: string; - public userId?: string; - public userName?: string; - public displayName?: string; - public accountId?: string; - public projectId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AuthDeviceConsentResponse extends ResponseBase -{ - public clientName: string; - public deviceName: string; - public userCode: string; - public projectId?: string; - public accountRoles: AiRoleDto[] = []; - public projects: AiProjectRolesDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class AuthDeviceConsentDecisionResponse extends ResponseBase -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class OAuthConsentResponse extends ResponseBase -{ - public clientName: string; - public redirectHost: string; - public clientHost: string; - public redirectIsLoopback: boolean; - public consentTicket: string; - public accountRoles: AiRoleDto[] = []; - public projects: AiProjectRolesDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class OAuthConsentDecisionResponse extends ResponseBase -{ - public redirectUrl?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmbeddingIntegrationResponse extends ResponseBase -{ - public item?: EmbeddingIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetEmbeddingIntegrationsResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestEmbeddingIntegrationResponse extends ResponseBase -{ - // @DataMember - public dimension?: number; - - // @DataMember - public latencyMs?: number; - - // @DataMember - public totalTokens?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLlmIntegrationResponse extends ResponseBase -{ - public item?: LlmIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLlmIntegrationsResponse extends ResponseBase -{ - public defaultIntegrationId?: string; - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class TestLlmIntegrationResponse extends ResponseBase -{ - // @DataMember - public items?: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMcpIntegrationResponse extends ResponseBase -{ - public item?: McpIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetMcpIntegrationsResponse extends ResponseBase -{ - public defaultIntegrationId?: string; - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetWebhookIntegrationResponse extends ResponseBase -{ - public item?: WebhookIntegrationDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RevealWebhookIntegrationSecretResponse extends ResponseBase -{ - public signingSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RotateWebhookIntegrationSecretResponse extends ResponseBase -{ - public signingSecret?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class HttpResult -{ - public responseText?: string; - public responseStream?: string; - public fileInfo?: FileInfo; - public virtualFile?: IVirtualFile; - public contentType?: string; - public headers?: { [index:string]: string; }; - public cookies?: Cookie[]; - public eTag?: string; - public age?: string; - public maxAge?: string; - public expires?: string; - public lastModified?: string; - public cacheControl: CacheControl; - public resultScope?: Func; - public allowsPartialResponse: boolean; - public options?: { [index:string]: string; }; - public status: number; - public statusCode: HttpStatusCode; - public statusDescription?: string; - public response?: Object; - public responseFilter?: IContentTypeWriter; - public requestContext?: IRequest; - public view?: string; - public template?: string; - public paddingLength: number; - public isPartialRequest: boolean; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -export class SaveWebhookDestinationResponse extends ResponseBase -{ - public destinationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSchedulerTaskResponse extends ResponseBase -{ - public item?: SchedulerTaskDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSchedulerTasksResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSchedulerTaskRunsResponse extends ResponseBase -{ - public logsEnabled: boolean; - public runs: SchedulerTaskRunDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ResolveResourcesResponse extends ResponseBase -{ - public resolved: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetContactResponse extends ResponseBase -{ - public item?: UserDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAllContactsResponse extends ResponseBase -{ - public items?: IReadOnlyList; - public nextCursor?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RepairContactRolesResponse extends ResponseBase -{ - public result?: ContactRolesRepairDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetComplianceSettingsResponse extends ResponseBase -{ - public settings?: ProjectComplianceDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetLegalHoldsResponse extends ResponseBase -{ - public holds: LegalHoldDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDsarRequestsResponse extends ResponseBase -{ - public requests: DsarRequestDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetComplianceAuditLogResponse extends ResponseBase -{ - public entries: ComplianceAuditEntryDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetAccountComplianceResponse extends ResponseBase -{ - public settings?: AccountComplianceDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSupportCaseResponse extends ResponseBase -{ - public result?: SupportCaseDetailDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetSupportCasesResponse extends ResponseBase -{ - public list?: PaginatedResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDiagnosticPacksResponse extends ResponseBase -{ - public packs?: DiagnosticPackDescriptorDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RunDiagnosticPackResponse extends ResponseBase -{ - public result?: DiagnosticPackRunResultDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class GetDiagnosticEchoResponse extends ResponseBase -{ - public result?: DiagnosticEchoDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class ReadDiagnosticEventsResponse extends ResponseBase -{ - public result?: DiagnosticEventsPageDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class QueryDiagnosticLogsResponse extends ResponseBase -{ - public result?: DiagnosticLogsResponse; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class InspectDiagnosticRedisResponse extends ResponseBase -{ - public result?: DiagnosticRedisInspectDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -export class RunDiagnosticHealthCheckResponse extends ResponseBase -{ - public result?: DiagnosticHealthCheckDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } -} - -// @DataContract -export class AuthenticateResponse implements IHasSessionId, IHasBearerToken -{ - // @DataMember(Order=1) - public userId?: string; - - // @DataMember(Order=2) - public sessionId?: string; - - // @DataMember(Order=3) - public userName?: string; - - // @DataMember(Order=4) - public displayName?: string; - - // @DataMember(Order=5) - public referrerUrl?: string; - - // @DataMember(Order=6) - public bearerToken?: string; - - // @DataMember(Order=7) - public refreshToken?: string; - - // @DataMember(Order=8) - public refreshTokenExpiry?: string; - - // @DataMember(Order=9) - public profileUrl?: string; - - // @DataMember(Order=10) - public roles?: string[]; - - // @DataMember(Order=11) - public permissions?: string[]; - - // @DataMember(Order=12) - public authProvider?: string; - - // @DataMember(Order=13) - public responseStatus?: ResponseStatus; - - // @DataMember(Order=14) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @DataContract -export class GetAccessTokenResponse -{ - // @DataMember(Order=1) - public accessToken?: string; - - // @DataMember(Order=2) - public meta?: { [index:string]: string; }; - - // @DataMember(Order=3) - public responseStatus?: ResponseStatus; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } -} - -// @Route("/{version}/code/enable", "PUT") -export class EnableCode extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableCode'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/code/disable", "PUT") -export class DisableCode extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableCode'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/code/integrations", "GET") -export class GetCodeIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetCodeIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetCodeIntegrationsResponse(); } -} - -// @Route("/{version}/code/integrations/{id}", "GET") -export class GetCodeIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_code_integrations. */ - // @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetCodeIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetCodeIntegrationResponse(); } -} - -// @Route("/{version}/code/integrations", "POST") -// @DataContract -export class SaveCodeIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: CodeIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveCodeIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/code/integrations/test", "POST") -export class TestCodeIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_code_integrations. */ - // @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestCodeIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestCodeIntegrationResponse(); } -} - -// @Route("/{version}/code/integrations/confirm-human-delivery", "POST") -// @DataContract -export class ConfirmCodeIntegrationHumanDeliveryRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_code_integrations. */ - // @DataMember - // @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ConfirmCodeIntegrationHumanDeliveryRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/code/integrations/{Id}", "DELETE") -export class DeleteCodeIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_code_integrations. */ - // @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteCodeIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/code/integrations/{Id}/enable", "PUT") -export class EnableCodeIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_code_integrations. */ - // @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableCodeIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/code/integrations/{Id}/disable", "PUT") -export class DisableCodeIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_code_integrations. */ - // @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableCodeIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/code/marketplace/listings", "GET") -export class GetMarketplaceListings extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Filter by one or more categories (Crm, Erp, Communication, etc.). */ - // @ApiMember(Description="Filter by one or more categories (Crm, Erp, Communication, etc.).") - public categories?: MarketplaceCategory[]; - - /** @description Filter by transport (Mcp, Rest, Code). */ - // @ApiMember(Description="Filter by transport (Mcp, Rest, Code).") - public transports?: MarketplaceTransport[]; - - /** @description Free-text search over the listing's display name, vendor, and description. */ - // @ApiMember(Description="Free-text search over the listing's display name, vendor, and description.") - public search?: string; - - /** @description If true, return only listings curated and verified by Norbix. */ - // @ApiMember(Description="If true, return only listings curated and verified by Norbix.") - public officialOnly?: boolean; - - /** @description Filter by curated tag slugs (e.g. ai-llm, messaging, crm). Matches listings carrying any of the given tags. */ - // @ApiMember(Description="Filter by curated tag slugs (e.g. ai-llm, messaging, crm). Matches listings carrying any of the given tags.") - public tags?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceListings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceListingsResponse(); } -} - -// @Route("/{version}/code/marketplace/listings/{ListingViewId}/functions/{FunctionKey}/tokens", "GET") -export class GetMarketplaceListingFunctionTokens extends CodeMashRequestBase implements IReturn -{ - /** @description Marketplace listing view id, from get_marketplace_listings. */ - // @ApiMember(Description="Marketplace listing view id, from get_marketplace_listings.", IsRequired=true) - public listingViewId: string; - - /** @description Function key on the listing, from get_marketplace_listings. */ - // @ApiMember(Description="Function key on the listing, from get_marketplace_listings.", IsRequired=true) - public functionKey: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceListingFunctionTokens'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceTokensResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations", "GET") -export class GetMarketplaceIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceIntegrationsResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}", "GET") -export class GetMarketplaceIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceIntegrationResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations", "POST") -// @DataContract -export class SaveMarketplaceIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The marketplace integration to install, from a get_marketplace_listings entry. */ - // @DataMember - // @ApiMember(Description="The marketplace integration to install, from a get_marketplace_listings entry.", IsRequired=true) - public integration: MarketplaceIntegrationDto; - - // @DataMember - public secrets: { [index:string]: string; } = {}; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveMarketplaceIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}", "DELETE") -export class DeleteMarketplaceIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteMarketplaceIntegration'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/enable", "POST") -export class EnableMarketplaceIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableMarketplaceIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/disable", "POST") -export class DisableMarketplaceIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableMarketplaceIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions", "GET") -export class GetMarketplaceFunctions extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceFunctions'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceFunctionsResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions/{FunctionViewId}", "GET") -export class GetMarketplaceFunction extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - /** @description Function view id, from get_marketplace_functions. */ - // @ApiMember(Description="Function view id, from get_marketplace_functions.", IsRequired=true) - public functionViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceFunction'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceFunctionResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions", "POST") -// @DataContract -export class SaveMarketplaceFunction extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @DataMember - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - /** @description The function to create: functionKey, displayName, description, and one mapping per vendor function parameter. */ - // @DataMember - // @ApiMember(Description="The function to create: functionKey, displayName, description, and one mapping per vendor function parameter.", IsRequired=true) - public function: MarketplaceFunctionDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveMarketplaceFunction'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions/{FunctionViewId}", "DELETE") -export class DeleteMarketplaceFunction extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - /** @description Function view id, from get_marketplace_functions. */ - // @ApiMember(Description="Function view id, from get_marketplace_functions.", IsRequired=true) - public functionViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteMarketplaceFunction'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions/{FunctionViewId}/enable", "POST") -export class EnableMarketplaceFunction extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - /** @description Function view id, from get_marketplace_functions. */ - // @ApiMember(Description="Function view id, from get_marketplace_functions.", IsRequired=true) - public functionViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableMarketplaceFunction'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions/{FunctionViewId}/disable", "POST") -export class DisableMarketplaceFunction extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - /** @description Function view id, from get_marketplace_functions. */ - // @ApiMember(Description="Function view id, from get_marketplace_functions.", IsRequired=true) - public functionViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableMarketplaceFunction'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions/{FunctionViewId}/tokens", "GET") -export class GetMarketplaceFunctionTokens extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - /** @description Function view id, from get_marketplace_functions. */ - // @ApiMember(Description="Function view id, from get_marketplace_functions.", IsRequired=true) - public functionViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceFunctionTokens'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceTokensResponse(); } -} - -// @Route("/{version}/code/marketplace/functions/{FunctionViewId}/invoke", "POST") -// @DataContract -export class InvokeMarketplaceFunction extends CodeMashRequestBase implements IReturn -{ - /** @description Function view id (func_…), from get_marketplace_functions. */ - // @DataMember - // @ApiMember(Description="Function view id (func_…), from get_marketplace_functions.", IsRequired=true) - public functionViewId: string; - - // @DataMember - public payload: { [index:string]: Object; } = {}; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'InvokeMarketplaceFunction'; } - public getMethod() { return 'POST'; } - public createResponse() { return new InvokeMarketplaceFunctionResponse(); } -} - -// @Route("/{version}/code/marketplace/listings/{ListingViewId}", "GET") -export class GetMarketplaceListing extends CodeMashRequestBase implements IReturn -{ - /** @description Listing view id (ml_…), from get_marketplace_listings. */ - // @ApiMember(Description="Listing view id (ml_…), from get_marketplace_listings.", IsRequired=true) - public listingViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceListing'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceListingResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/test", "POST") -export class TestMarketplaceIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestMarketplaceIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestMarketplaceIntegrationResponse(); } -} - -// @Route("/internal/_typegen", "GET") -export class InternalsTypeGen -{ - public typegen_0_SmtpEmailIntegrationRequest?: SmtpEmailIntegrationRequest; - public typegen_1_AwsSesEmailIntegrationRequest?: AwsSesEmailIntegrationRequest; - public typegen_2_SendGridEmailIntegrationRequest?: SendGridEmailIntegrationRequest; - public typegen_3_MailGunEmailIntegrationRequest?: MailGunEmailIntegrationRequest; - public typegen_4_EmailToAllUsersDeliverySettingsRequest?: EmailToAllUsersDeliverySettingsRequest; - public typegen_5_EmailToAccountUsersDeliverySettingsRequest?: EmailToAccountUsersDeliverySettingsRequest; - public typegen_6_EmailToCollectionRecordsDeliverySettingsRequest?: EmailToCollectionRecordsDeliverySettingsRequest; - public typegen_7_EmailToEmailsDeliverySettingsRequest?: EmailToEmailsDeliverySettingsRequest; - public typegen_8_EmailToUsersDeliverySettingsRequest?: EmailToUsersDeliverySettingsRequest; - public typegen_9_MembershipTriggerRequest?: MembershipTriggerRequest; - public typegen_10_SchemaTriggerRequest?: SchemaTriggerRequest; - public typegen_11_FilesTriggerRequest?: FilesTriggerRequest; - public typegen_12_PaymentTriggerRequest?: PaymentTriggerRequest; - public typegen_15_MongoDbConnectionStringDatabaseIntegrationRequest?: MongoDbConnectionStringDatabaseIntegrationRequest; - public typegen_16_MongoDbAtlasFlexManagedDatabaseIntegrationRequest?: MongoDbAtlasFlexManagedDatabaseIntegrationRequest; - public typegen_16_GoogleDriveFilesIntegrationRequest?: GoogleDriveFilesIntegrationRequest; - public typegen_17_FtpFilesIntegrationRequest?: FtpFilesIntegrationRequest; - public typegen_18_DropBoxFilesIntegrationRequest?: DropBoxFilesIntegrationRequest; - public typegen_19_AppleICloudFilesIntegrationRequest?: AppleICloudFilesIntegrationRequest; - public typegen_20_AwsS3FilesIntegrationRequest?: AwsS3FilesIntegrationRequest; - public typegen_21_GoogleCloudFilesIntegrationRequest?: GoogleCloudFilesIntegrationRequest; - public typegen_22_AzureBlobFilesIntegrationRequest?: AzureBlobFilesIntegrationRequest; - public typegen_23_LocalFilesIntegrationRequest?: LocalFilesIntegrationRequest; - public typegen_24_AmqpLoggingIntegrationRequest?: AmqpLoggingIntegrationRequest; - public typegen_25_AwsKinesisLoggingIntegrationRequest?: AwsKinesisLoggingIntegrationRequest; - public typegen_26_AwsS3LoggingIntegrationRequest?: AwsS3LoggingIntegrationRequest; - public typegen_28_NewRelicLoggingIntegrationRequest?: NewRelicLoggingIntegrationRequest; - public typegen_30_MongoDbLoggingIntegrationRequest?: MongoDbLoggingIntegrationRequest; - public typegen_31_KafkaLoggingIntegrationRequest?: KafkaLoggingIntegrationRequest; - public typegen_32_PrometheusLoggingIntegrationRequest?: PrometheusLoggingIntegrationRequest; - public typegen_33_DataDogLoggingIntegrationRequest?: DataDogLoggingIntegrationRequest; - public typegen_34_InternalKafkaLoggingIntegrationRequest?: InternalKafkaLoggingIntegrationRequest; - public typegen_35_ElasticSearchLoggingIntegrationRequest?: ElasticSearchLoggingIntegrationRequest; - public typegen_37_SplunkLoggingIntegrationRequest?: SplunkLoggingIntegrationRequest; - public typegen_38_AzureOtelLoggingIntegrationRequest?: AzureOtelLoggingIntegrationRequest; - public typegen_39_KibanaLoggingIntegrationRequest?: KibanaLoggingIntegrationRequest; - public typegen_40_LocalFileLoggingIntegrationRequest?: LocalFileLoggingIntegrationRequest; - public typegen_41_OktaMembershipIntegrationRequest?: OktaMembershipIntegrationRequest; - public typegen_42_XMembershipIntegrationRequest?: XMembershipIntegrationRequest; - public typegen_43_GoogleMembershipIntegrationRequest?: GoogleMembershipIntegrationRequest; - public typegen_44_MicrosoftMembershipIntegrationRequest?: MicrosoftMembershipIntegrationRequest; - public typegen_45_GitHubMembershipIntegrationRequest?: GitHubMembershipIntegrationRequest; - public typegen_46_MetaMembershipIntegrationRequest?: MetaMembershipIntegrationRequest; - public typegen_47_AppleMembershipIntegrationRequest?: AppleMembershipIntegrationRequest; - public typegen_48_LemonSqueezyPaymentIntegrationRequest?: LemonSqueezyPaymentIntegrationRequest; - public typegen_49_AdyenPaymentIntegrationRequest?: AdyenPaymentIntegrationRequest; - public typegen_50_MolliePaymentIntegrationRequest?: MolliePaymentIntegrationRequest; - public typegen_51_PaddlePaymentIntegrationRequest?: PaddlePaymentIntegrationRequest; - public typegen_52_PayPalPaymentIntegrationRequest?: PayPalPaymentIntegrationRequest; - public typegen_53_StripePaymentIntegrationRequest?: StripePaymentIntegrationRequest; - public typegen_54_AppleInAppPaymentIntegrationRequest?: AppleInAppPaymentIntegrationRequest; - public typegen_55_GoogleInAppPaymentIntegrationRequest?: GoogleInAppPaymentIntegrationRequest; - public typegen_285_MontonioPaymentIntegrationRequest?: MontonioPaymentIntegrationRequest; - public typegen_287_ShopifyPaymentIntegrationRequest?: ShopifyPaymentIntegrationRequest; - public typegen_288_WooCommercePaymentIntegrationRequest?: WooCommercePaymentIntegrationRequest; - public typegen_289_MagentoPaymentIntegrationRequest?: MagentoPaymentIntegrationRequest; - public typegen_290_BraintreePaymentIntegrationRequest?: BraintreePaymentIntegrationRequest; - public typegen_291_AuthorizeNetPaymentIntegrationRequest?: AuthorizeNetPaymentIntegrationRequest; - public typegen_292_CheckOutComPaymentIntegrationRequest?: CheckOutComPaymentIntegrationRequest; - public typegen_293_WorldpayPaymentIntegrationRequest?: WorldpayPaymentIntegrationRequest; - public typegen_56_EdgeWebPushIntegrationRequest?: EdgeWebPushIntegrationRequest; - public typegen_57_ChromePluginPushIntegrationRequest?: ChromePluginPushIntegrationRequest; - public typegen_58_SafariPushIntegrationRequest?: SafariPushIntegrationRequest; - public typegen_59_ChromeWebPushIntegrationRequest?: ChromeWebPushIntegrationRequest; - public typegen_60_FirefoxWebPushIntegrationRequest?: FirefoxWebPushIntegrationRequest; - public typegen_61_AndroidFirebasePushIntegrationRequest?: AndroidFirebasePushIntegrationRequest; - public typegen_62_AppleApnsPushIntegrationRequest?: AppleApnsPushIntegrationRequest; - public typegen_65_AwsLambdaCodeIntegrationRequest?: AwsLambdaCodeIntegrationRequest; - public typegen_66_AzureFunctionsCodeIntegrationRequest?: AzureFunctionsCodeIntegrationRequest; - public typegen_67_GoogleCloudFunctionsCodeIntegrationRequest?: GoogleCloudFunctionsCodeIntegrationRequest; - public typegen_68_OllamaLlmIntegrationRequest?: OllamaLlmIntegrationRequest; - public typegen_69_OpenRouterLlmIntegrationRequest?: OpenRouterLlmIntegrationRequest; - public typegen_70_MistralLlmIntegrationRequest?: MistralLlmIntegrationRequest; - public typegen_71_GrokLlmIntegrationRequest?: GrokLlmIntegrationRequest; - public typegen_72_GroqLlmIntegrationRequest?: GroqLlmIntegrationRequest; - public typegen_73_GoogleLlmIntegrationRequest?: GoogleLlmIntegrationRequest; - public typegen_74_AnthropicLlmIntegrationRequest?: AnthropicLlmIntegrationRequest; - public typegen_75_OpenAiLlmIntegrationRequest?: OpenAiLlmIntegrationRequest; - public typegen_76_PlaywrightMcpIntegrationRequest?: PlaywrightMcpIntegrationRequest; - public typegen_77_MongoDbMcpIntegrationRequest?: MongoDbMcpIntegrationRequest; - public typegen_78_GitHubMcpIntegrationRequest?: GitHubMcpIntegrationRequest; - public typegen_79_StripeMcpIntegrationRequest?: StripeMcpIntegrationRequest; - public typegen_80_BraveSearchMcpIntegrationRequest?: BraveSearchMcpIntegrationRequest; - public typegen_81_ObsidianMcpIntegrationRequest?: ObsidianMcpIntegrationRequest; - public typegen_82_EmailTemplateDto?: EmailTemplateDto; - public typegen_83_PushTemplateDto?: PushTemplateDto; - public typegen_84_SmsTemplateDto?: SmsTemplateDto; - public typegen_85_SystemEmailTemplateDto?: SystemEmailTemplateDto; - public typegen_86_TriggerActionEmailDto?: TriggerActionEmailDto; - public typegen_87_TriggerActionPushDto?: TriggerActionPushDto; - public typegen_88_TriggerActionCodeDto?: TriggerActionCodeDto; - public typegen_89_TriggerActionWebhookDto?: TriggerActionWebhookDto; - public typegen_236_TriggerActionSmsDto?: TriggerActionSmsDto; - public typegen_237_TriggerActionSseDto?: TriggerActionSseDto; - public typegen_238_TriggerActionMarketplaceDto?: TriggerActionMarketplaceDto; - public typegen_239_SseDeliverySettingsDto?: SseDeliverySettingsDto; - public typegen_240_GetTriggers?: GetTriggers; - public typegen_241_GetTriggersResponse?: GetTriggersResponse; - public typegen_90_EmailToAllUsersDeliverySettingsDto?: EmailToAllUsersDeliverySettingsDto; - public typegen_91_EmailToAccountUsersDeliverySettingsDto?: EmailToAccountUsersDeliverySettingsDto; - public typegen_92_EmailToUsersDeliverySettingsDto?: EmailToUsersDeliverySettingsDto; - public typegen_93_EmailToEmailAddressesDeliverySettingsDto?: EmailToEmailAddressesDeliverySettingsDto; - public typegen_94_EmailToCollectionRecordsDeliverySettingsDto?: EmailToCollectionRecordsDeliverySettingsDto; - public typegen_95_PushToAllUsersDeliverySettingsDto?: PushToAllUsersDeliverySettingsDto; - public typegen_96_PushToUsersDeliverySettingsDto?: PushToUsersDeliverySettingsDto; - public typegen_229_PushToAccountUsersDeliverySettingsDto?: PushToAccountUsersDeliverySettingsDto; - public typegen_97_PushToCollectionRecordsDeliverySettingsDto?: PushToCollectionRecordsDeliverySettingsDto; - public typegen_98_PushToDevicesDeliverySettingsDto?: PushToDevicesDeliverySettingsDto; - public typegen_99_SmsToAllUsersDeliverySettingsDto?: SmsToAllUsersDeliverySettingsDto; - public typegen_100_SmsToUsersDeliverySettingsDto?: SmsToUsersDeliverySettingsDto; - public typegen_249_SmsToAccountUsersDeliverySettingsDto?: SmsToAccountUsersDeliverySettingsDto; - public typegen_101_SmsToCollectionRecordsDeliverySettingsDto?: SmsToCollectionRecordsDeliverySettingsDto; - public typegen_102_SmsToPhoneNumbersDeliverySettingsDto?: SmsToPhoneNumbersDeliverySettingsDto; - public typegen_103_OpenAiLlmIntegrationDto?: OpenAiLlmIntegrationDto; - public typegen_104_AnthropicLlmIntegrationDto?: AnthropicLlmIntegrationDto; - public typegen_105_OllamaLlmIntegrationDto?: OllamaLlmIntegrationDto; - public typegen_106_GroqLlmIntegrationDto?: GroqLlmIntegrationDto; - public typegen_107_GoogleLlmIntegrationDto?: GoogleLlmIntegrationDto; - public typegen_108_MistralLlmIntegrationDto?: MistralLlmIntegrationDto; - public typegen_109_OpenRouterLlmIntegrationDto?: OpenRouterLlmIntegrationDto; - public typegen_110_GrokLlmIntegrationDto?: GrokLlmIntegrationDto; - public typegen_111_DockerMcpIntegrationDto?: DockerMcpIntegrationDto; - public typegen_112_GoogleCalendarMcpIntegrationDto?: GoogleCalendarMcpIntegrationDto; - public typegen_113_ObsidianMcpIntegrationDto?: ObsidianMcpIntegrationDto; - public typegen_114_AwsLambdaCrossAccountRoleCodeIntegrationDto?: AwsLambdaCrossAccountRoleCodeIntegrationDto; - public typegen_115_AwsLambdaIamCodeIntegrationDto?: AwsLambdaIamCodeIntegrationDto; - public typegen_116_AzureFunctionsCodeIntegrationDto?: AzureFunctionsCodeIntegrationDto; - public typegen_118_GoogleCloudFunctionsCodeIntegrationDto?: GoogleCloudFunctionsCodeIntegrationDto; - public typegen_120_AdyenPaymentIntegrationDto?: AdyenPaymentIntegrationDto; - public typegen_121_AppleInAppPaymentIntegrationDto?: AppleInAppPaymentIntegrationDto; - public typegen_122_GoogleInAppPaymentIntegrationDto?: GoogleInAppPaymentIntegrationDto; - public typegen_123_LemonSqueezyPaymentIntegrationDto?: LemonSqueezyPaymentIntegrationDto; - public typegen_124_MolliePaymentIntegrationDto?: MolliePaymentIntegrationDto; - public typegen_125_PaddlePaymentIntegrationDto?: PaddlePaymentIntegrationDto; - public typegen_126_PayPalPaymentIntegrationDto?: PayPalPaymentIntegrationDto; - public typegen_127_StripePaymentIntegrationDto?: StripePaymentIntegrationDto; - public typegen_184_ShopifyPaymentIntegrationDto?: ShopifyPaymentIntegrationDto; - public typegen_185_WooCommercePaymentIntegrationDto?: WooCommercePaymentIntegrationDto; - public typegen_186_MagentoPaymentIntegrationDto?: MagentoPaymentIntegrationDto; - public typegen_187_BraintreePaymentIntegrationDto?: BraintreePaymentIntegrationDto; - public typegen_188_AuthorizeNetPaymentIntegrationDto?: AuthorizeNetPaymentIntegrationDto; - public typegen_189_CheckOutComPaymentIntegrationDto?: CheckOutComPaymentIntegrationDto; - public typegen_190_WorldpayPaymentIntegrationDto?: WorldpayPaymentIntegrationDto; - public typegen_286_MontonioPaymentIntegrationDto?: MontonioPaymentIntegrationDto; - public typegen_294_PaymentOrderEventDto?: PaymentOrderEventDto; - public typegen_128_AppleSignInMembershipIntegrationDto?: AppleSignInMembershipIntegrationDto; - public typegen_129_GitHubMembershipIntegrationDto?: GitHubMembershipIntegrationDto; - public typegen_130_GoogleMembershipIntegrationDto?: GoogleMembershipIntegrationDto; - public typegen_131_MetaMembershipIntegrationDto?: MetaMembershipIntegrationDto; - public typegen_132_MicrosoftMembershipIntegrationDto?: MicrosoftMembershipIntegrationDto; - public typegen_133_OktaMembershipIntegrationDto?: OktaMembershipIntegrationDto; - public typegen_134_XMembershipIntegrationDto?: XMembershipIntegrationDto; - public typegen_135_AmqpLoggingIntegrationDto?: AmqpLoggingIntegrationDto; - public typegen_136_AwsKinesisLoggingIntegrationDto?: AwsKinesisLoggingIntegrationDto; - public typegen_137_AwsS3CrossAccountRoleLoggingIntegrationDto?: AwsS3CrossAccountRoleLoggingIntegrationDto; - public typegen_138_AwsS3IamLoggingIntegrationDto?: AwsS3IamLoggingIntegrationDto; - public typegen_139_AzureOtelLoggingIntegrationDto?: AzureOtelLoggingIntegrationDto; - public typegen_140_DataDogLoggingIntegrationDto?: DataDogLoggingIntegrationDto; - public typegen_141_ElasticSearchLoggingIntegrationDto?: ElasticSearchLoggingIntegrationDto; - public typegen_142_InternalKafkaLoggingIntegrationDto?: InternalKafkaLoggingIntegrationDto; - public typegen_143_KafkaLoggingIntegrationDto?: KafkaLoggingIntegrationDto; - public typegen_144_KibanaLoggingIntegrationDto?: KibanaLoggingIntegrationDto; - public typegen_145_LocalFileLoggingIntegrationDto?: LocalFileLoggingIntegrationDto; - public typegen_147_MongoDbLoggingIntegrationDto?: MongoDbLoggingIntegrationDto; - public typegen_148_NewRelicLoggingIntegrationDto?: NewRelicLoggingIntegrationDto; - public typegen_149_PrometheusLoggingIntegrationDto?: PrometheusLoggingIntegrationDto; - public typegen_150_SplunkLoggingIntegrationDto?: SplunkLoggingIntegrationDto; - public typegen_153_AppleICloudFilesIntegrationDto?: AppleICloudFilesIntegrationDto; - public typegen_154_AwsS3CrossAccountRoleFilesIntegrationDto?: AwsS3CrossAccountRoleFilesIntegrationDto; - public typegen_155_AwsS3IamFilesIntegrationDto?: AwsS3IamFilesIntegrationDto; - public typegen_156_AzureBlobFilesIntegrationDto?: AzureBlobFilesIntegrationDto; - public typegen_157_DropBoxFilesIntegrationDto?: DropBoxFilesIntegrationDto; - public typegen_158_FtpFilesIntegrationDto?: FtpFilesIntegrationDto; - public typegen_159_GoogleCloudFilesIntegrationDto?: GoogleCloudFilesIntegrationDto; - public typegen_160_GoogleDriveFilesIntegrationDto?: GoogleDriveFilesIntegrationDto; - public typegen_161_LocalFilesIntegrationDto?: LocalFilesIntegrationDto; - public typegen_164_MongoDbConnectionStringIntegrationDto?: MongoDbConnectionStringIntegrationDto; - public typegen_165_MongoDbAtlasFlexManagedIntegrationDto?: MongoDbAtlasFlexManagedIntegrationDto; - public typegen_165_BirdSmsIntegrationDto?: BirdSmsIntegrationDto; - public typegen_166_PlivoSmsIntegrationDto?: PlivoSmsIntegrationDto; - public typegen_167_SinchSmsIntegrationDto?: SinchSmsIntegrationDto; - public typegen_168_TelesignSmsIntegrationDto?: TelesignSmsIntegrationDto; - public typegen_169_TelnyxSmsIntegrationDto?: TelnyxSmsIntegrationDto; - public typegen_170_TwilioSmsIntegrationDto?: TwilioSmsIntegrationDto; - public typegen_171_VonageSmsIntegrationDto?: VonageSmsIntegrationDto; - public typegen_246_FakeSmsIntegrationDto?: FakeSmsIntegrationDto; - public typegen_172_AndroidFirebasePushIntegrationDto?: AndroidFirebasePushIntegrationDto; - public typegen_173_AppleApnsPushIntegrationDto?: AppleApnsPushIntegrationDto; - public typegen_174_ChromePluginPushIntegrationDto?: ChromePluginPushIntegrationDto; - public typegen_175_ChromeWebPushIntegrationDto?: ChromeWebPushIntegrationDto; - public typegen_176_EdgeWebPushIntegrationDto?: EdgeWebPushIntegrationDto; - public typegen_177_FirefoxWebPushIntegrationDto?: FirefoxWebPushIntegrationDto; - public typegen_178_SafariPushIntegrationDto?: SafariPushIntegrationDto; - public typegen_247_FakePushIntegrationDto?: FakePushIntegrationDto; - public typegen_179_AwsCrossAccountRoleEmailIntegrationDto?: AwsCrossAccountRoleEmailIntegrationDto; - public typegen_180_AwsIamEmailIntegrationDto?: AwsIamEmailIntegrationDto; - public typegen_181_MailGunEmailIntegrationDto?: MailGunEmailIntegrationDto; - public typegen_182_SendGridEmailIntegrationDto?: SendGridEmailIntegrationDto; - public typegen_183_SmtpEmailIntegrationDto?: SmtpEmailIntegrationDto; - public typegen_248_FakeEmailIntegrationDto?: FakeEmailIntegrationDto; - public typegen_192_WebhookIntegrationDto?: WebhookIntegrationDto; - public typegen_193_WebhookDestinationDto?: WebhookDestinationDto; - public typegen_194_SchedulerTaskDto?: SchedulerTaskDto; - public typegen_249_EmailCampaignSchedulerTaskRequest?: EmailCampaignSchedulerTaskRequest; - public typegen_250_SmsCampaignSchedulerTaskRequest?: SmsCampaignSchedulerTaskRequest; - public typegen_251_PushCampaignSchedulerTaskRequest?: PushCampaignSchedulerTaskRequest; - public typegen_195_MongoDbAggregateDto?: MongoDbAggregateDto; - public typegen_196_MarketplaceIntegrationDto?: MarketplaceIntegrationDto; - public typegen_197_MarketplaceFunctionDto?: MarketplaceFunctionDto; - public typegen_198_MarketplaceListingDto?: MarketplaceListingDto; - public typegen_199_MarketplaceFunctionDefinitionDto?: MarketplaceFunctionDefinitionDto; - public typegen_200_MarketplaceFunctionParameterDto?: MarketplaceFunctionParameterDto; - public typegen_201_EnableCode?: EnableCode; - public typegen_202_DisableCode?: DisableCode; - public typegen_203_GetCodeIntegrations?: GetCodeIntegrations; - public typegen_204_GetCodeIntegration?: GetCodeIntegration; - public typegen_205_SaveCodeIntegration?: SaveCodeIntegration; - public typegen_206_TestCodeIntegration?: TestCodeIntegration; - public typegen_207_ConfirmCodeIntegrationHumanDeliveryRequest?: ConfirmCodeIntegrationHumanDeliveryRequest; - public typegen_209_DeleteCodeIntegrationRequest?: DeleteCodeIntegrationRequest; - public typegen_210_EnableCodeIntegrationRequest?: EnableCodeIntegrationRequest; - public typegen_211_DisableCodeIntegrationRequest?: DisableCodeIntegrationRequest; - public typegen_212_GetMarketplaceListings?: GetMarketplaceListings; - public typegen_213_GetMarketplaceListingFunctionTokens?: GetMarketplaceListingFunctionTokens; - public typegen_214_GetMarketplaceIntegrations?: GetMarketplaceIntegrations; - public typegen_215_GetMarketplaceIntegration?: GetMarketplaceIntegration; - public typegen_216_SaveMarketplaceIntegration?: SaveMarketplaceIntegration; - public typegen_217_DeleteMarketplaceIntegration?: DeleteMarketplaceIntegration; - public typegen_218_EnableMarketplaceIntegration?: EnableMarketplaceIntegration; - public typegen_219_DisableMarketplaceIntegration?: DisableMarketplaceIntegration; - public typegen_221_GetMarketplaceFunctions?: GetMarketplaceFunctions; - public typegen_222_GetMarketplaceFunction?: GetMarketplaceFunction; - public typegen_223_SaveMarketplaceFunction?: SaveMarketplaceFunction; - public typegen_224_DeleteMarketplaceFunction?: DeleteMarketplaceFunction; - public typegen_225_EnableMarketplaceFunction?: EnableMarketplaceFunction; - public typegen_226_DisableMarketplaceFunction?: DisableMarketplaceFunction; - public typegen_227_GetMarketplaceFunctionTokens?: GetMarketplaceFunctionTokens; - public typegen_228_InvokeMarketplaceFunction?: InvokeMarketplaceFunction; - public typegen_232_GetMarketplaceListing?: GetMarketplaceListing; - public typegen_233_TestMarketplaceIntegration?: TestMarketplaceIntegration; - public typegen_234_TestMarketplaceIntegrationResponse?: TestMarketplaceIntegrationResponse; - public typegen_235_GetMarketplaceListingResponse?: GetMarketplaceListingResponse; - public typegen_230_AdminPortalStructureDto?: AdminPortalStructureDto; - public typegen_231_AdminPortalModuleDto?: AdminPortalModuleDto; - public typegen_236_UserMessageEntryWireDto?: UserMessageEntryWireDto; - public typegen_237_AssistantTextEntryWireDto?: AssistantTextEntryWireDto; - public typegen_238_AssistantQuestionEntryWireDto?: AssistantQuestionEntryWireDto; - public typegen_239_UserAnswerEntryWireDto?: UserAnswerEntryWireDto; - public typegen_240_PlanEntryWireDto?: PlanEntryWireDto; - public typegen_241_UserDecisionEntryWireDto?: UserDecisionEntryWireDto; - public typegen_242_RunStepEntryWireDto?: RunStepEntryWireDto; - public typegen_243_ActionPendingEntryWireDto?: ActionPendingEntryWireDto; - public typegen_244_NoticeEntryWireDto?: NoticeEntryWireDto; - public typegen_245_ConversationSnapshotEntryWireDto?: ConversationSnapshotEntryWireDto; - public typegen_269_FunctionRefDto?: FunctionRefDto; - public typegen_270_CodeFunctionEventDto?: CodeFunctionEventDto; - public typegen_271_CodeFunctionContextDto?: CodeFunctionContextDto; - public typegen_272_CodeFunctionCallerDto?: CodeFunctionCallerDto; - public typegen_273_CodeFunctionRunAsDto?: CodeFunctionRunAsDto; - public typegen_274_CodeFunctionDataDto?: CodeFunctionDataDto; - public typegen_275_DatabaseRecordChangeDto?: DatabaseRecordChangeDto; - public typegen_276_UserChangeDto?: UserChangeDto; - public typegen_277_FileChangeDto?: FileChangeDto; - public typegen_278_PaymentFactDto?: PaymentFactDto; - public typegen_279_AiUsageEventDto?: AiUsageEventDto; - public typegen_280_ScheduledTaskInfoDto?: ScheduledTaskInfoDto; - public typegen_281_FakeCodeIntegrationDto?: FakeCodeIntegrationDto; - public typegen_282_FakeCodeIntegrationRequest?: FakeCodeIntegrationRequest; - public typegen_283_CodeFunctionSchedulerTaskRequest?: CodeFunctionSchedulerTaskRequest; - public typegen_284_MarketplaceFunctionSchedulerTaskRequest?: MarketplaceFunctionSchedulerTaskRequest; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'InternalsTypeGen'; } - public getMethod() { return 'GET'; } - public createResponse() {} -} - -export class SharedTypeGen -{ - public typegen_StringFieldDto?: StringFieldDto; - public typegen_DecimalFieldDto?: DecimalFieldDto; - public typegen_CurrencyFieldDto?: CurrencyFieldDto; - public typegen_BooleanFieldDto?: BooleanFieldDto; - public typegen_DateFieldDto?: DateFieldDto; - public typegen_IntegerFieldDto?: IntegerFieldDto; - public typegen_GeolocationFieldDto?: GeolocationFieldDto; - public typegen_TagsFieldDto?: TagsFieldDto; - public typegen_FileFieldDto?: FileFieldDto; - public typegen_TaxonomySelectionFieldDto?: TaxonomySelectionFieldDto; - public typegen_CollectionSelectionFieldDto?: CollectionSelectionFieldDto; - public typegen_UserSelectionFieldDto?: UserSelectionFieldDto; - public typegen_RoleSelectionFieldDto?: RoleSelectionFieldDto; - public typegen_EnumSelectionFieldDto?: EnumSelectionFieldDto; - public typegen_ObjectFieldDto?: ObjectFieldDto; - public typegen_ArrayFieldDto?: ArrayFieldDto; - public typegen_JsonFieldDto?: JsonFieldDto; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'SharedTypeGen'; } - public getMethod() { return 'POST'; } - public createResponse() {} -} - -// @Route("/{version}/echo", "GET") -export class Echo extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'Echo'; } - public getMethod() { return 'GET'; } - public createResponse() { return new EchoResponse(); } -} - -// @Route("/{version}/public/projects/{ProjectId}/brand/{Kind}", "GET") -export class GetPublicProjectBrandAsset extends RequestBase implements IReturn -{ - public projectId?: string; - public kind?: string; - public v?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPublicProjectBrandAsset'; } - public getMethod() { return 'GET'; } - public createResponse() { return new Blob(); } -} - -// @Route("/{version}/public/projects/{ProjectId}/config", "GET") -export class GetPublicProjectConfig extends RequestBase implements IReturn -{ - public projectId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPublicProjectConfig'; } - public getMethod() { return 'GET'; } - public createResponse() { return new PublicProjectConfigDto(); } -} - -// @Route("/{version}/public/projects/{ProjectId}/legal/{Kind}", "GET") -export class GetPublicProjectLegal extends RequestBase implements IReturn -{ - public projectId?: string; - public kind?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPublicProjectLegal'; } - public getMethod() { return 'GET'; } - public createResponse() { return new PublicLegalDocumentDto(); } -} - -/** @description Get one trigger in the shape its save takes (read → change → save) */ -// @Route("/{version}/triggers/{id}/definition", "GET") -// @Api(Description="Get one trigger in the shape its save takes (read → change → save)") -// @DataContract -export class GetTriggerDefinition extends CodeMashRequestBase implements IReturn -{ - /** @description The trigger id (trg_…). */ - // @DataMember - // @ApiMember(Description="The trigger id (trg_…).", IsRequired=true) - public id: string; - - /** @description Which module the trigger belongs to: Schema, Membership, Files, Payments or Ai. */ - // @DataMember - // @ApiMember(Description="Which module the trigger belongs to: Schema, Membership, Files, Payments or Ai.", IsRequired=true) - public triggerType: TriggerType; - - /** @description The collection (schema) id the trigger watches. Required for Schema triggers. */ - // @DataMember - // @ApiMember(Description="The collection (schema) id the trigger watches. Required for Schema triggers.") - public schemaId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetTriggerDefinition'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetTriggerDefinitionResponse(); } -} - -/** @description Get triggers that need attention */ -// @Route("/{version}/triggers/attention", "GET") -// @Api(Description="Get triggers that need attention") -// @DataContract -export class GetTriggersNeedingAttention extends CodeMashRequestBase implements IReturn -{ - /** @description Which triggers: Membership, Schema, Files, Payments or Ai. */ - // @DataMember - // @ApiMember(Description="Which triggers: Membership, Schema, Files, Payments or Ai.", IsRequired=true) - public triggerType: TriggerType; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetTriggersNeedingAttention'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetTriggersNeedingAttentionResponse(); } -} - -/** @description Test a trigger's pre-action code against a sample record */ -// @Route("/{version}/triggers/pre-execute-code/test", "POST") -// @Api(Description="Test a trigger's pre-action code against a sample record") -// @DataContract -export class TestTriggerPreExecuteCode extends CodeMashRequestBase implements IReturn -{ - /** @description The code to test, as saved in preExecuteCode: C# statements ending in 'return true;' or 'return false;', e.g. 'return New.status == "published";'. */ - // @DataMember - // @ApiMember(Description="The code to test, as saved in preExecuteCode: C# statements ending in 'return true;' or 'return false;', e.g. 'return New.status == \"published\";'.", IsRequired=true) - public code: string; - - /** @description Which kind of trigger the code is for: Schema, Membership, Files, Payments or Ai. */ - // @DataMember - // @ApiMember(Description="Which kind of trigger the code is for: Schema, Membership, Files, Payments or Ai.", IsRequired=true) - public triggerType: TriggerType; - - /** @description The sample record AFTER the change (the code's New), as a JSON object. Omit = empty (a delete). */ - // @DataMember - // @ApiMember(Description="The sample record AFTER the change (the code's New), as a JSON object. Omit = empty (a delete).") - public newRecord?: string; - - /** @description The sample record BEFORE the change (the code's Old), as a JSON object. Omit = empty (an insert). */ - // @DataMember - // @ApiMember(Description="The sample record BEFORE the change (the code's Old), as a JSON object. Omit = empty (an insert).") - public oldRecord?: string; - - /** @description What the code sees as Event.Kind: Inserted, Updated, Deleted or Other. Omit = Updated when both records are given, Inserted when only newRecord, Deleted when only oldRecord. */ - // @DataMember - // @ApiMember(Description="What the code sees as Event.Kind: Inserted, Updated, Deleted or Other. Omit = Updated when both records are given, Inserted when only newRecord, Deleted when only oldRecord.") - public eventKind?: string; - - /** @description What the code sees as Event.Name, e.g. database.record.updated. Optional. */ - // @DataMember - // @ApiMember(Description="What the code sees as Event.Name, e.g. database.record.updated. Optional.") - public eventName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestTriggerPreExecuteCode'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestTriggerPreExecuteCodeResponse(); } -} - -// @Route("/{version}/account/profile", "GET") -export class GetAccountProfile extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccountProfile'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAccountProfileResponse(); } -} - -// @Route("/{version}/account/profile", "PUT") -// @DataContract -export class UpdateAccountProfile extends RequestBase implements IReturn -{ - /** @description Account owner's display name. */ - // @DataMember - // @ApiMember(Description="Account owner's display name.", IsRequired=true) - public displayName: string; - - /** @description Email address used for billing communications. */ - // @DataMember - // @ApiMember(Description="Email address used for billing communications.") - public billingEmail?: string; - - /** @description Email address used for operations communications. */ - // @DataMember - // @ApiMember(Description="Email address used for operations communications.") - public operationsEmail?: string; - - /** @description Email address used for security-related communications. */ - // @DataMember - // @ApiMember(Description="Email address used for security-related communications.") - public securityEmail?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateAccountProfile'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/verify/resend", "POST") -export class ResendAccountVerificationToken extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ResendAccountVerificationToken'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get Account Status. */ -// @Route("/{version}/account/status", "GET") -// @Api(Description="Get Account Status.") -export class GetAccountStatus extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccountStatus'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAccountStatusResponse(); } -} - -// @Route("/{version}/account/stripe/create-checkout-session", "POST") -// @DataContract -export class CreateStripeCheckoutSession extends RequestBase implements IReturn -{ - // @DataMember - public subscriptionType: SubscriptionType; - - // @DataMember - public domain?: string; - - // @DataMember - public projectCap: number; - - // @DataMember - public newProjectSessionId?: string; - - // @DataMember - public returnUrl?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateStripeCheckoutSession'; } - public getMethod() { return 'POST'; } - public createResponse() { return new CreateStripeCheckoutSessionResponse(); } -} - -// @Route("/{version}/account/stripe/get-portal-url", "POST") -// @DataContract -export class GetStripeBillingPortalUrl extends RequestBase implements IReturn -{ - /** @description Which subscription (e.g. main account plan) to open the billing portal for. */ - // @DataMember - // @ApiMember(Description="Which subscription (e.g. main account plan) to open the billing portal for.") - public subscriptionType: SubscriptionType; - - /** @description URL to return to after the customer leaves the billing portal. */ - // @DataMember - // @ApiMember(Description="URL to return to after the customer leaves the billing portal.") - public returnUrl?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetStripeBillingPortalUrl'; } - public getMethod() { return 'POST'; } - public createResponse() { return new GetStripeBillingPortalUrlResponse(); } -} - -// @Route("/{version}/account/team/member", "POST") -export class CreateTeamMemberFromInvitation extends RequestBase implements IReturn -{ - /** @description Display name of the account holder */ - // @ApiMember(DataType="string", Description="Display name of the account holder", IsRequired=true, Name="DisplayName", ParameterType="form") - public displayName: string; - - /** @description Token from invitation email */ - // @ApiMember(DataType="string", Description="Token from invitation email", IsRequired=true, Name="Token", ParameterType="form") - public token: string; - - /** @description Set password for a new account */ - // @ApiMember(DataType="string", Description="Set password for a new account", Format="password", IsRequired=true, Name="Password", ParameterType="form") - public password: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateTeamMemberFromInvitation'; } - public getMethod() { return 'POST'; } - public createResponse() { return new CreateTeamMemberFromInvitationResponse(); } -} - -/** @description Get Account Usage Billing. */ -// @Route("/{version}/account/usage-billing", "GET") -// @Api(Description="Get Account Usage Billing.") -export class GetAccountUsageBilling extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccountUsageBilling'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAccountUsageBillingResponse(); } -} - -// @Route("/{version}/account/verify", "POST") -export class VerifyAccount extends RequestBase implements IReturn, IHasAccountId -{ - public token: string; - public accountId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'VerifyAccount'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/projects/{projectId}/notifications/settings/group", "DELETE") -export class DeleteNotificationsGroup extends CodeMashRequestBase implements IReturn -{ - /** @description Tag identifying the notification group to remove. */ - // @ApiMember(Description="Tag identifying the notification group to remove.", IsRequired=true) - public groupTag: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteNotificationsGroup'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/projects/{projectId}/notifications/settings/tag", "DELETE") -export class DeleteNotificationsTag extends CodeMashRequestBase implements IReturn -{ - /** @description Tag identifying the notification tag to delete. */ - // @ApiMember(Description="Tag identifying the notification tag to delete.", IsRequired=true) - public tag: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteNotificationsTag'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/projects/{projectId}/notifications/settings/group/tag", "DELETE") -export class RemoveTagFromNotificationsGroup extends CodeMashRequestBase implements IReturn -{ - /** @description Tag identifying the notification group. */ - // @ApiMember(Description="Tag identifying the notification group.", IsRequired=true) - public groupTag: string; - - /** @description Tag identifying the notification tag to remove from the group. */ - // @ApiMember(Description="Tag identifying the notification tag to remove from the group.", IsRequired=true) - public tag: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RemoveTagFromNotificationsGroup'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/projects/{projectId}/notifications/settings/group", "POST") -export class SaveNotificationsGroup extends CodeMashRequestBase implements IReturn -{ - /** @description The group's tag and translations to save. The tag identifies the group; translations provide its display name per locale. */ - // @ApiMember(Description="The group's tag and translations to save. The tag identifies the group; translations provide its display name per locale.", IsRequired=true) - public groupDefinition: GroupDefinitionDto; - - /** @description Communication channel (e.g. Email, Push) this group belongs to. */ - // @ApiMember(Description="Communication channel (e.g. Email, Push) this group belongs to.") - public channel: CommunicationChannel; - - /** @description If moving the group to a different channel, the channel it currently belongs to. */ - // @ApiMember(Description="If moving the group to a different channel, the channel it currently belongs to.") - public originChannel?: CommunicationChannel; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveNotificationsGroup'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/projects/{projectId}/notifications/settings/tag", "POST") -export class SaveNotificationsTag extends CodeMashRequestBase implements IReturn -{ - /** @description The tag's identifier, translations, and default per-delivery-channel enabled/disabled settings. */ - // @ApiMember(Description="The tag's identifier, translations, and default per-delivery-channel enabled/disabled settings.", IsRequired=true) - public tagDefinition: TagDefinitionDto; - - /** @description Communication channel (e.g. Email, Push) this tag belongs to. */ - // @ApiMember(Description="Communication channel (e.g. Email, Push) this tag belongs to.") - public channel?: CommunicationChannel; - - /** @description Tag of the group this notification tag should be placed under, if any. */ - // @ApiMember(Description="Tag of the group this notification tag should be placed under, if any.") - public groupTag?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveNotificationsTag'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Create a new backend project. */ -// @Route("/{version}/account/projects", "POST") -// @Api(Description="Create a new backend project.") -// @DataContract -export class CreateProjectRequest extends RequestBase implements IReturn -{ - // @DataMember - public integration: DatabaseIntegrationRequest; - - /** @description Project name, unique per account. */ - // @DataMember - // @ApiMember(Description="Project name, unique per account.") - public projectName: string; - - /** @description Region code for the primary region, e.g. 'nb-eu-germany'. Use a code from get_account_regions. */ - // @DataMember - // @ApiMember(Description="Region code for the primary region, e.g. 'nb-eu-germany'. Use a code from get_account_regions.") - public primaryRegion?: string; - - // @DataMember - public additionalRegions?: string[]; - - // @DataMember - public description?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateProjectRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Deletes project */ -// @Route("/{version}/account/projects/{projectId}", "DELETE") -// @Api(Description="Deletes project") -export class DeleteProject extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteProject'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/projects/environments", "POST") -// @DataContract -export class CreateProjectEnvironmentRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Name for the new environment (e.g. 'TEST', 'STAGING'). A-Z/0-9/space, up to 15 chars, cannot be PROD. */ - // @DataMember - // @ApiMember(Description="Name for the new environment (e.g. 'TEST', 'STAGING'). A-Z/0-9/space, up to 15 chars, cannot be PROD.", IsRequired=true) - public environmentName: string; - - // @DataMember(Name="integration") - public integration: DatabaseIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateProjectEnvironmentRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/projects/environments/{environmentName}", "DELETE") -// @DataContract -export class DeleteProjectEnvironmentRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Name of the environment to delete (from get_project_environments), e.g. 'TEST'. PROD is rejected. */ - // @DataMember - // @ApiMember(Description="Name of the environment to delete (from get_project_environments), e.g. 'TEST'. PROD is rejected.", IsRequired=true) - public environmentName: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteProjectEnvironmentRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/projects/environments/{environmentName}/rank", "PATCH") -// @DataContract -export class SetEnvironmentRankRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Name of the environment to re-rank (from get_project_environments). */ - // @DataMember - // @ApiMember(Description="Name of the environment to re-rank (from get_project_environments).", IsRequired=true) - public environmentName: string; - - /** @description New promotion-ladder rank. Out-of-range values are clamped and ranks re-normalized. */ - // @DataMember - // @ApiMember(Description="New promotion-ladder rank. Out-of-range values are clamped and ranks re-normalized.") - public rank: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetEnvironmentRankRequest'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/projects/environments/promote", "POST") -// @DataContract -export class PromoteEnvironmentRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Environment to promote FROM (source of truth for this promotion). */ - // @DataMember - // @ApiMember(Description="Environment to promote FROM (source of truth for this promotion).", IsRequired=true) - public sourceEnv: string; - - /** @description Environment to promote INTO. Must be higher on the promotion ladder than SourceEnv. */ - // @DataMember - // @ApiMember(Description="Environment to promote INTO. Must be higher on the promotion ladder than SourceEnv.", IsRequired=true) - public targetEnv: string; - - /** @description When true, only returns the promotion plan (including deletions) without applying it or copying secrets. Use this to preview before a real run. */ - // @DataMember - // @ApiMember(Description="When true, only returns the promotion plan (including deletions) without applying it or copying secrets. Use this to preview before a real run.") - public dryRun: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PromoteEnvironmentRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PromoteEnvironmentResponse(); } -} - -// @Route("/{version}/account/projects/environments/promote/rollback", "POST") -// @DataContract -export class RollbackPromotionRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Environment whose content should be rolled back. */ - // @DataMember - // @ApiMember(Description="Environment whose content should be rolled back.", IsRequired=true) - public targetEnv: string; - - /** @description The fromVersion anchor returned by the promote_environment call being rolled back. */ - // @DataMember - // @ApiMember(Description="The fromVersion anchor returned by the promote_environment call being rolled back.", IsRequired=true) - public fromVersion: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RollbackPromotionRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PromoteEnvironmentResponse(); } -} - -// @Route("/{version}/account/projects/environments", "GET") -// @DataContract -export class GetProjectEnvironments extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetProjectEnvironments'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetProjectEnvironmentsResponse(); } -} - -/** @description Gets project info. */ -// @Route("/{version}/account/projects/{projectId}", "GET") -// @Api(Description="Gets project info.") -export class GetProject extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetProject'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetProjectResponse(); } -} - -/** @description Retrieve projects list. */ -// @Route("/{version}/account/projects", "GET") -// @Api(Description="Retrieve projects list.") -export class GetProjects extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetProjects'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetProjectsResponse(); } -} - -/** @description Get available project regions. */ -// @Route("/{version}/account/regions", "GET") -// @Api(Description="Get available project regions.") -export class GetAccountRegions extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccountRegions'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAccountRegionsResponse(); } -} - -/** @description Waits (bounded, server-side) for a project to finish provisioning and become active. */ -// @Route("/{version}/account/projects/{projectId}/wait-active", "GET") -// @Api(Description="Waits (bounded, server-side) for a project to finish provisioning and become active.") -export class WaitForProjectActiveRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Max seconds to wait before returning 'not active yet' (default 30, capped at 90). */ - // @ApiMember(Description="Max seconds to wait before returning 'not active yet' (default 30, capped at 90).") - public timeoutSeconds?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'WaitForProjectActiveRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new WaitForProjectActiveResponse(); } -} - -/** @description Gets project tokens. */ -// @Route("/{version}/account/projects/{projectId}/tokens", "GET") -// @Api(Description="Gets project tokens.") -export class GetProjectTokens extends CodeMashRequestBase implements IReturn -{ - public initiatorId?: string; - public recipientId?: string; - public targetUserId?: string; - public membershipTriggerOldUserId?: string; - public membershipTriggerNewUserId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetProjectTokens'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetProjectTokensResponse(); } -} - -/** @description Turns the project's managed Admin Portal on or off */ -// @Route("/{version}/account/projects/{projectId}/admin-portal/enabled", "PUT") -// @Api(Description="Turns the project's managed Admin Portal on or off") -export class SetAdminPortalEnabledRequest extends CodeMashRequestBase implements IReturn -{ - /** @description true turns the managed Admin Portal on; false turns it off. */ - // @ApiMember(Description="true turns the managed Admin Portal on; false turns it off.", IsRequired=true) - public enabled: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetAdminPortalEnabledRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Sets whether the project's brand is returned by the public Admin Portal config */ -// @Route("/{version}/account/projects/{projectId}/settings/brand/expose", "PATCH") -// @Api(Description="Sets whether the project's brand is returned by the public Admin Portal config") -export class UpdateProjectExposeBrand extends CodeMashRequestBase implements IReturn -{ - /** @description True to return the brand in the public Admin Portal config, false to hide it. */ - // @ApiMember(Description="True to return the brand in the public Admin Portal config, false to hide it.") - public exposed: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectExposeBrand'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Sets whether the project's sign-in methods and password policy are returned by the public Admin Portal config */ -// @Route("/{version}/account/projects/{projectId}/settings/auth/expose", "PATCH") -// @Api(Description="Sets whether the project's sign-in methods and password policy are returned by the public Admin Portal config") -export class UpdateProjectExposeAuth extends CodeMashRequestBase implements IReturn -{ - /** @description True to return sign-in methods and password policy in the public Admin Portal config, false to hide them. */ - // @ApiMember(Description="True to return sign-in methods and password policy in the public Admin Portal config, false to hide them.") - public exposed: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectExposeAuth'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Assigns the project's Admin Portal service user */ -// @Route("/{version}/account/projects/{projectId}/settings/admin-portal/service-user", "PUT") -// @Api(Description="Assigns the project's Admin Portal service user") -export class AssignAdminPortalServiceUserRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the existing AuthType.Service user to assign as the project's Admin Portal service user. */ - // @ApiMember(Description="Id of the existing AuthType.Service user to assign as the project's Admin Portal service user.", IsRequired=true) - public serviceUserId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AssignAdminPortalServiceUserRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Reads the Admin Portal layout/structure (service user only) */ -// @Route("/{version}/account/projects/{projectId}/admin-portal/structure", "GET") -// @Api(Description="Reads the Admin Portal layout/structure (service user only)") -export class GetAdminPortalStructure extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAdminPortalStructure'; } - public getMethod() { return 'GET'; } - public createResponse() { return new AdminPortalStructureDto(); } -} - -/** @description Updates the project's admin-portal URL override */ -// @Route("/{version}/account/projects/{projectId}/settings/admin-url", "PATCH") -// @Api(Description="Updates the project's admin-portal URL override") -export class UpdateProjectAdminUrl extends CodeMashRequestBase implements IReturn -{ - /** @description Custom admin-portal URL to use instead of the canonical address. Null/empty restores the canonical pr-{project hex}.admin.{host} address. */ - // @ApiMember(Description="Custom admin-portal URL to use instead of the canonical address. Null/empty restores the canonical pr-{project hex}.admin.{host} address.") - public url?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectAdminUrl'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Creates a Stripe Checkout session for one AI credit pack of the project and returns its URL */ -// @Route("/{version}/account/projects/{projectId}/ai/credits/checkout", "POST") -// @Api(Description="Creates a Stripe Checkout session for one AI credit pack of the project and returns its URL") -export class CreateAiCreditPackCheckoutRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The pack to buy: pack-10 (€10 = 1 000 credits), pack-50 (€50 = 5 000), pack-200 (€200 = 20 000). Net prices; 1 credit = €0.01. */ - // @ApiMember(Description="The pack to buy: pack-10 (€10 = 1 000 credits), pack-50 (€50 = 5 000), pack-200 (€200 = 20 000). Net prices; 1 credit = €0.01.", IsRequired=true) - public pack: string; - - /** @description Dashboard path the browser returns to after Stripe (aiCredits=paid or aiCredits=cancelled is added). Default: the dashboard root. */ - // @ApiMember(Description="Dashboard path the browser returns to after Stripe (aiCredits=paid or aiCredits=cancelled is added). Default: the dashboard root.") - public returnUrl?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateAiCreditPackCheckoutRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new CreateAiCreditPackCheckoutResponse(); } -} - -/** @description Reads the project's end-user AI plans, the role → plan map and the default plan */ -// @Route("/{version}/account/projects/{projectId}/ai/plans", "GET") -// @Api(Description="Reads the project's end-user AI plans, the role → plan map and the default plan") -export class GetProjectAiPlans extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetProjectAiPlans'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetProjectAiPlansResponse(); } -} - -/** @description Saves the project's end-user AI plans (the whole list) */ -// @Route("/{version}/account/projects/{projectId}/ai/plans", "PUT") -// @Api(Description="Saves the project's end-user AI plans (the whole list)") -export class UpdateProjectAiPlans extends CodeMashRequestBase implements IReturn -{ - /** @description The complete list of plans (full replace). */ - // @ApiMember(Description="The complete list of plans (full replace).") - public plans?: AiPlanDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectAiPlans'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new UpdateProjectAiPlansResponse(); } -} - -/** @description Saves which end-user AI plan each project role gets, and the default plan */ -// @Route("/{version}/account/projects/{projectId}/ai/plans/assignments", "PUT") -// @Api(Description="Saves which end-user AI plan each project role gets, and the default plan") -export class UpdateProjectAiPlanAssignments extends CodeMashRequestBase implements IReturn -{ - /** @description Role → plan rows, in order; the first row whose role the user has wins. */ - // @ApiMember(Description="Role → plan rows, in order; the first row whose role the user has wins.") - public roles?: AiPlanRoleAssignmentDto[]; - - /** @description Plan id (aip_…) of users with no per-user plan and no mapped role. Empty = no default. */ - // @ApiMember(Description="Plan id (aip_…) of users with no per-user plan and no mapped role. Empty = no default.") - public defaultPlanId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectAiPlanAssignments'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Lists the users that have their own end-user AI plan */ -// @Route("/{version}/account/projects/{projectId}/ai/plans/users", "GET") -// @Api(Description="Lists the users that have their own end-user AI plan") -export class GetProjectAiUserPlans extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetProjectAiUserPlans'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetProjectAiUserPlansResponse(); } -} - -/** @description Reads the project's AI chat settings for end users: on/off, default LLM and assistants */ -// @Route("/{version}/account/projects/{projectId}/ai/settings", "GET") -// @Api(Description="Reads the project's AI chat settings for end users: on/off, default LLM and assistants") -export class GetProjectAiSettings extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetProjectAiSettings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetProjectAiSettingsResponse(); } -} - -/** @description Saves the project's AI chat settings: on/off and the default LLM */ -// @Route("/{version}/account/projects/{projectId}/ai/settings", "PUT") -// @Api(Description="Saves the project's AI chat settings: on/off and the default LLM") -export class UpdateProjectAiSettings extends CodeMashRequestBase implements IReturn -{ - /** @description True to show end-user AI chat in the Admin Portal, false to hide it. */ - // @ApiMember(Description="True to show end-user AI chat in the Admin Portal, false to hide it.") - public enabled: boolean; - - /** @description Default LLM integration id (int_…) for assistants without their own. Empty clears it. */ - // @ApiMember(Description="Default LLM integration id (int_…) for assistants without their own. Empty clears it.") - public defaultLlmIntegrationId?: string; - - /** @description Model of the default LLM. Empty = the integration's default model. */ - // @ApiMember(Description="Model of the default LLM. Empty = the integration's default model.") - public defaultModel?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectAiSettings'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Saves the project's AI knowledge switches: embed uploaded files */ -// @Route("/{version}/account/projects/{projectId}/ai/knowledge", "PUT") -// @Api(Description="Saves the project's AI knowledge switches: embed uploaded files") -export class UpdateProjectAiKnowledge extends CodeMashRequestBase implements IReturn -{ - /** @description True to put uploaded text files into the project's AI knowledge, false to stop. */ - // @ApiMember(Description="True to put uploaded text files into the project's AI knowledge, false to stop.") - public embedFiles: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectAiKnowledge'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Adds an end-user AI assistant to the project */ -// @Route("/{version}/account/projects/{projectId}/ai/assistants", "POST") -// @Api(Description="Adds an end-user AI assistant to the project") -export class CreateProjectAiAssistant extends ProjectAiAssistantRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateProjectAiAssistant'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Updates an end-user AI assistant of the project (full replace) */ -// @Route("/{version}/account/projects/{projectId}/ai/assistants/{assistantId}", "PUT") -// @Api(Description="Updates an end-user AI assistant of the project (full replace)") -export class UpdateProjectAiAssistant extends ProjectAiAssistantRequestBase implements IReturn -{ - /** @description Id of the assistant (ast_…). */ - // @ApiMember(Description="Id of the assistant (ast_…).", IsRequired=true) - public assistantId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectAiAssistant'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Removes an end-user AI assistant from the project */ -// @Route("/{version}/account/projects/{projectId}/ai/assistants/{assistantId}", "DELETE") -// @Api(Description="Removes an end-user AI assistant from the project") -export class DeleteProjectAiAssistant extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the assistant (ast_…). */ - // @ApiMember(Description="Id of the assistant (ast_…).", IsRequired=true) - public assistantId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteProjectAiAssistant'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Reads the project's AI usage this month: totals, per assistant, top users, per model, and the credit wallet */ -// @Route("/{version}/account/projects/{projectId}/ai/usage", "GET") -// @Api(Description="Reads the project's AI usage this month: totals, per assistant, top users, per model, and the credit wallet") -export class GetProjectAiUsage extends CodeMashRequestBase implements IReturn -{ - /** @description How many users to list, biggest first. 1–100, default 10. */ - // @ApiMember(Description="How many users to list, biggest first. 1–100, default 10.") - public top?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetProjectAiUsage'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetProjectAiUsageResponse(); } -} - -/** @description Updates project accent color */ -// @Route("/{version}/account/projects/{projectId}/settings/accent-color", "PATCH") -// @Api(Description="Updates project accent color") -export class UpdateProjectAccentColor extends CodeMashRequestBase implements IReturn -{ - /** @description Hex color code, e.g. '#FF6D00'. */ - // @ApiMember(Description="Hex color code, e.g. '#FF6D00'.", IsRequired=true) - public color: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectAccentColor'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates project icon */ -// @Route("/{version}/account/projects/{projectId}/settings/icon", "PATCH") -// @Api(Description="Updates project icon") -export class UpdateProjectIcon extends CodeMashRequestBase implements IReturn -{ - public fileResource?: FileResourceRefDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectIcon'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates project logo */ -// @Route("/{version}/account/projects/{projectId}/settings/logo", "PATCH") -// @Api(Description="Updates project logo") -export class UpdateProjectLogo extends CodeMashRequestBase implements IReturn -{ - public fileResource?: FileResourceRefDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectLogo'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates project main color */ -// @Route("/{version}/account/projects/{projectId}/settings/main-color", "PATCH") -// @Api(Description="Updates project main color") -export class UpdateProjectMainColor extends CodeMashRequestBase implements IReturn -{ - /** @description Hex color code, e.g. '#1A73E8'. */ - // @ApiMember(Description="Hex color code, e.g. '#1A73E8'.", IsRequired=true) - public color: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectMainColor'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates project CORS settings */ -// @Route("/{version}/account/projects/{projectId}/settings/origins", "PATCH") -// @Api(Description="Updates project CORS settings") -export class UpdateProjectAllowedOrigins extends CodeMashRequestBase implements IReturn -{ - /** @description The complete new list of allowed origin URLs, e.g. ["https://app.example.com", "https://example.com"]. An entry with no scheme (e.g. "example.com") defaults to https. Whatever is not in this list stops being allowed. */ - // @ApiMember(Description="The complete new list of allowed origin URLs, e.g. [\"https://app.example.com\", \"https://example.com\"]. An entry with no scheme (e.g. \"example.com\") defaults to https. Whatever is not in this list stops being allowed.") - public origins?: string[]; - - /** @description Optional. true removes the project's own Admin Portal origin (pr-{project hex}.{admin host}) on purpose. Without it, a list that drops that origin is rejected with CM-ERRORS-PROJECTS-037, because the Norbix-generated end-user portal could no longer call the project's API. */ - // @ApiMember(Description="Optional. true removes the project's own Admin Portal origin (pr-{project hex}.{admin host}) on purpose. Without it, a list that drops that origin is rejected with CM-ERRORS-PROJECTS-037, because the Norbix-generated end-user portal could no longer call the project's API.") - public removeAdminPortalOrigin?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectAllowedOrigins'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Update project default language */ -// @Route("/{version}/account/projects/{projectId}/settings/default-language", "PATCH") -// @Api(Description="Update project default language") -export class UpdateProjectDefaultLanguage extends CodeMashRequestBase implements IReturn -{ - /** @description Language code, e.g. 'en' or 'de'. */ - // @ApiMember(Description="Language code, e.g. 'en' or 'de'.", IsRequired=true) - public defaultLanguage: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectDefaultLanguage'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates project description */ -// @Route("/{version}/account/projects/{projectId}/settings/description", "PATCH") -// @Api(Description="Updates project description") -export class UpdateProjectDescription extends CodeMashRequestBase implements IReturn -{ - /** @description The new description text. Omit (null) to clear the description. */ - // @ApiMember(Description="The new description text. Omit (null) to clear the description.") - public description?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectDescription'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disables project */ -// @Route("/{version}/account/projects/{projectId}/disable", "PATCH") -// @Api(Description="Disables project") -export class DisableProject extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableProject'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Enables project */ -// @Route("/{version}/account/projects/{projectId}/enable", "PATCH") -// @Api(Description="Enables project") -export class EnableProject extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableProject'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates project languages */ -// @Route("/{version}/account/projects/{projectId}/settings/languages", "PATCH") -// @Api(Description="Updates project languages") -export class UpdateProjectLanguages extends CodeMashRequestBase implements IReturn -{ - /** @description The complete new list of language codes, e.g. ["en", "de", "lt"]. */ - // @ApiMember(Description="The complete new list of language codes, e.g. [\"en\", \"de\", \"lt\"].", IsRequired=true) - public languages: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectLanguages'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Checks which templates miss a (proposed) project language */ -// @Route("/{version}/account/projects/{projectId}/settings/languages/check", "POST") -// @Api(Description="Checks which templates miss a (proposed) project language") -// @DataContract -export class CheckProjectLanguages extends CodeMashRequestBase implements IReturn -{ - /** @description Proposed default language code. Omit to use the current one. */ - // @DataMember - // @ApiMember(Description="Proposed default language code. Omit to use the current one.") - public defaultLanguage?: string; - - /** @description Proposed complete language list. Omit to use the current one. */ - // @DataMember - // @ApiMember(Description="Proposed complete language list. Omit to use the current one.") - public languages?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CheckProjectLanguages'; } - public getMethod() { return 'POST'; } - public createResponse() { return new CheckProjectLanguagesResponse(); } -} - -/** @description Updates the project's public legal documents (Terms & Conditions, Privacy Policy) */ -// @Route("/{version}/account/projects/{projectId}/settings/legal", "PATCH") -// @Api(Description="Updates the project's public legal documents (Terms & Conditions, Privacy Policy)") -export class UpdateProjectLegalDocuments extends CodeMashRequestBase implements IReturn -{ - /** @description Terms & Conditions document, Markdown. Null/empty clears it. */ - // @ApiMember(Description="Terms & Conditions document, Markdown. Null/empty clears it.") - public termsMarkdown?: string; - - /** @description Privacy Policy document, Markdown. Null/empty clears it. */ - // @ApiMember(Description="Privacy Policy document, Markdown. Null/empty clears it.") - public privacyMarkdown?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectLegalDocuments'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Sets whether the project's legal documents are publicly readable via the Admin Portal */ -// @Route("/{version}/account/projects/{projectId}/settings/legal/expose", "PATCH") -// @Api(Description="Sets whether the project's legal documents are publicly readable via the Admin Portal") -export class UpdateProjectExposeLegal extends CodeMashRequestBase implements IReturn -{ - /** @description True to make the legal documents publicly readable via the Admin Portal, false to hide them. */ - // @ApiMember(Description="True to make the legal documents publicly readable via the Admin Portal, false to hide them.") - public exposed: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectExposeLegal'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates project marketing url */ -// @Route("/{version}/account/projects/{projectId}/settings/url", "PATCH") -// @Api(Description="Updates project marketing url") -export class UpdateProjectUrl extends CodeMashRequestBase implements IReturn -{ - /** @description The marketing site URL, e.g. 'https://example.com'. Omit (null) to clear. */ - // @ApiMember(Description="The marketing site URL, e.g. 'https://example.com'. Omit (null) to clear.") - public url?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectUrl'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates project name */ -// @Route("/{version}/account/projects/{projectId}/settings/name", "PATCH") -// @Api(Description="Updates project name") -export class UpdateProjectName extends CodeMashRequestBase implements IReturn -{ - /** @description The new project name, unique per account. */ - // @ApiMember(Description="The new project name, unique per account.", IsRequired=true) - public name: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectName'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates project regions */ -// @Route("/{version}/account/projects/{projectId}/settings/regions", "PATCH") -// @Api(Description="Updates project regions") -export class UpdateProjectRegions extends CodeMashRequestBase implements IReturn -{ - /** @description Primary region code, e.g. 'nb-eu-germany'. Immutable once set — omit to keep the current one; only set it on a project that has none. */ - // @ApiMember(Description="Primary region code, e.g. 'nb-eu-germany'. Immutable once set — omit to keep the current one; only set it on a project that has none.") - public primaryRegion?: string; - - /** @description The complete new list of additional region codes (full replacement). A region that still hosts a provisioned database cluster cannot be removed. */ - // @ApiMember(Description="The complete new list of additional region codes (full replacement). A region that still hosts a provisioned database cluster cannot be removed.") - public additionalRegions?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateProjectRegions'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description This API endpoint allows users to create a new CodeMash account. */ -// @Route("/{version}/account", "POST") -// @Api(Description="This API endpoint allows users to create a new CodeMash account.") -export class CreateAccount extends RequestBase implements IReturn -{ - /** @description Display name of the account holder */ - // @ApiMember(DataType="string", Description="Display name of the account holder", IsRequired=true, Name="DisplayName", ParameterType="form") - public displayName: string; - - /** @description Real email of account holder */ - // @ApiMember(DataType="string", Description="Real email of account holder", IsRequired=true, Name="Email", ParameterType="form") - public email: string; - - /** @description Set password for a new account */ - // @ApiMember(DataType="string", Description="Set password for a new account", Format="password", IsRequired=true, Name="Password", ParameterType="form") - public password: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateAccount'; } - public getMethod() { return 'POST'; } - public createResponse() { return new CreateAccountResponse(); } -} - -// @Route("/{version}/account/team/member/password", "POST") -export class ChangeTeamMemberPassword extends RequestBase implements IReturn -{ - public email: string; - public currentPassword: string; - public newPassword: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ChangeTeamMemberPassword'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/account/team/member/create", "POST") -export class CreateTeamMember extends RequestBase implements IReturn -{ - public email: string; - public displayName?: string; - public password?: string; - public roles?: string[]; - public sendInvitation: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateTeamMember'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/account/team/policies", "POST") -export class CreateAccountPolicy extends RequestBase implements IReturn -{ - /** @description Name for the new custom account policy. */ - // @ApiMember(Description="Name for the new custom account policy.", IsRequired=true) - public policyName: string; - - /** @description Optional human-readable description of the policy's purpose. */ - // @ApiMember(Description="Optional human-readable description of the policy's purpose.") - public description?: string; - - /** @description Raw JSON policy document, AWS-IAM style (Statement array of Effect/Action/Resource entries), matching PolicyDocument.schema.json. This defines which permissions the policy grants. */ - // @ApiMember(Description="Raw JSON policy document, AWS-IAM style (Statement array of Effect/Action/Resource entries), matching PolicyDocument.schema.json. This defines which permissions the policy grants.") - public policyDocumentJson?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateAccountPolicy'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/account/team/roles", "POST") -export class CreateAccountRole extends RequestBase implements IReturn -{ - /** @description Name for the new custom account team role. */ - // @ApiMember(Description="Name for the new custom account team role.", IsRequired=true) - public roleName: string; - - /** @description Optional human-readable description of the role's purpose. */ - // @ApiMember(Description="Optional human-readable description of the role's purpose.") - public description?: string; - - /** @description Public policy ids (from get_account_team_policies) to attach to this role. */ - // @ApiMember(Description="Public policy ids (from get_account_team_policies) to attach to this role.") - public policies?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateAccountRole'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/account/team/policies/{Id}", "DELETE") -export class DeleteAccountPolicy extends RequestBase implements IReturn -{ - /** @description Public policy id (from get_account_team_policies) to delete. */ - // @ApiMember(Description="Public policy id (from get_account_team_policies) to delete.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteAccountPolicy'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/account/team/roles/{Id}", "DELETE") -export class DeleteAccountRole extends RequestBase implements IReturn -{ - /** @description Role template id (from get_account_team_roles) to delete. */ - // @ApiMember(Description="Role template id (from get_account_team_roles) to delete.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteAccountRole'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Gets account team members (collaborators) */ -// @Route("/{version}/account/collaborators", "GET") -// @Api(Description="Gets account team members (collaborators)") -export class GetAccountCollaborators extends RequestBase implements IReturn -{ - /** @description Set true to also include the account owner in the list. */ - // @ApiMember(Description="Set true to also include the account owner in the list.") - public includeAccountOwner: boolean; - - /** @description Set true to only return members that have a registered push device. */ - // @ApiMember(Description="Set true to only return members that have a registered push device.") - public userShouldHavePushDevice: boolean; - - /** @description Optional project id — only members with access to that project. */ - // @ApiMember(Description="Optional project id — only members with access to that project.") - public projectId?: string; - - /** @description Optional filter: only these user ids. */ - // @ApiMember(Description="Optional filter: only these user ids.") - public userIds?: string[]; - - /** @description Optional filter: only members having one of these role names. */ - // @ApiMember(Description="Optional filter: only members having one of these role names.") - public roleNames?: string[]; - - /** @description Cursor token — fetch the page AFTER this member (the list's startingAfter). */ - // @ApiMember(DataType="string", Description="Cursor token — fetch the page AFTER this member (the list's startingAfter).", Name="startingAfter", ParameterType="query") - public startingAfter?: string; - - /** @description Cursor token — fetch the page BEFORE this member. */ - // @ApiMember(DataType="string", Description="Cursor token — fetch the page BEFORE this member.", Name="endingBefore", ParameterType="query") - public endingBefore?: string; - - /** @description Members per page (default 20). */ - // @ApiMember(DataType="integer", Description="Members per page (default 20).", Format="int32", Name="pageSize", ParameterType="query") - public pageSize?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccountCollaborators'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAccountCollaboratorsResponse(); } -} - -// @Route("/{version}/account/team/password-policy", "GET") -export class GetAccountPasswordPolicy extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccountPasswordPolicy'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAccountPasswordPolicyResponse(); } -} - -// @Route("/{version}/account/team/policies", "GET") -export class GetAccountTeamPolicies extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccountTeamPolicies'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAccountTeamPoliciesResponse(); } -} - -// @Route("/{version}/account/team/roles", "GET") -export class GetAccountTeamRoles extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccountTeamRoles'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAccountTeamRolesResponse(); } -} - -/** @description Send invite to team member */ -// @Route("/{version}/account/team/member/invite", "POST") -// @Api(Description="Send invite to team member") -export class SendInviteToTeamMember extends RequestBase implements IReturn -{ - /** @description Email address the invitation is sent to. */ - // @ApiMember(Description="Email address the invitation is sent to.", IsRequired=true) - public email: string; - - /** @description Account role ids (GUIDs from get_account_team_roles) the member gets on accepting. Omit for the default member role. */ - // @ApiMember(Description="Account role ids (GUIDs from get_account_team_roles) the member gets on accepting. Omit for the default member role.") - public roles?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SendInviteToTeamMember'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/team/policies", "PUT") -export class UpdateAccountPolicy extends RequestBase implements IReturn -{ - /** @description Public policy id (from get_account_team_policies) to update. */ - // @ApiMember(Description="Public policy id (from get_account_team_policies) to update.", IsRequired=true) - public id: string; - - /** @description New name for the policy. */ - // @ApiMember(Description="New name for the policy.", IsRequired=true) - public policyName: string; - - /** @description Optional human-readable description of the policy's purpose. */ - // @ApiMember(Description="Optional human-readable description of the policy's purpose.") - public description?: string; - - /** @description Raw JSON policy document, AWS-IAM style (Statement array of Effect/Action/Resource entries) — replaces the policy's current statement set. */ - // @ApiMember(Description="Raw JSON policy document, AWS-IAM style (Statement array of Effect/Action/Resource entries) — replaces the policy's current statement set.") - public policyDocumentJson?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateAccountPolicy'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/account/team/roles", "PUT") -export class UpdateAccountRole extends RequestBase implements IReturn -{ - /** @description Role template id (from get_account_team_roles) to update. */ - // @ApiMember(Description="Role template id (from get_account_team_roles) to update.", IsRequired=true) - public id: string; - - /** @description New name for the role. */ - // @ApiMember(Description="New name for the role.", IsRequired=true) - public roleName: string; - - /** @description Optional human-readable description of the role's purpose. */ - // @ApiMember(Description="Optional human-readable description of the role's purpose.") - public description?: string; - - /** @description Public policy ids (from get_account_team_policies) to attach — replaces the current set. */ - // @ApiMember(Description="Public policy ids (from get_account_team_policies) to attach — replaces the current set.") - public policies?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateAccountRole'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/account/userauth/has-passkey", "POST") -// @DataContract -export class AccountHasPasskeyRequest extends RequestBase implements IReturn -{ - // @DataMember - public email: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AccountHasPasskeyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyOkResponse(); } -} - -// @Route("/{version}/account/userauth/email/start-verification", "POST") -// @DataContract -export class AccountStartEmailVerificationRequest extends RequestBase implements IReturn -{ - // @DataMember - public email: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AccountStartEmailVerificationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyOkResponse(); } -} - -// @Route("/{version}/account/userauth/email/confirm-verification", "POST") -// @DataContract -export class AccountConfirmEmailVerificationRequest extends RequestBase implements IReturn -{ - // @DataMember - public email: string; - - // @DataMember - public code: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AccountConfirmEmailVerificationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyVerificationTokenResponse(); } -} - -// @Route("/{version}/account/userauth/passkey/registration-options", "POST") -// @DataContract -export class AccountPasskeyRegistrationOptionsRequest extends RequestBase implements IReturn -{ - // @DataMember - public verificationToken: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AccountPasskeyRegistrationOptionsRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyCeremonyOptionsResponse(); } -} - -// @Route("/{version}/account/userauth/passkey/verify-registration", "POST") -// @DataContract -export class AccountVerifyPasskeyRegistrationRequest extends RequestBase implements IReturn -{ - // @DataMember - public verificationToken: string; - - // @DataMember - public ceremonyId: string; - - // @DataMember - public attestationResponse: string; - - // @DataMember - public friendlyName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AccountVerifyPasskeyRegistrationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyAuthTokensResponse(); } -} - -// @Route("/{version}/account/userauth/passkey/authentication-options", "POST") -// @DataContract -export class AccountPasskeyAuthenticationOptionsRequest extends RequestBase implements IReturn -{ - // @DataMember - public email: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AccountPasskeyAuthenticationOptionsRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyCeremonyOptionsResponse(); } -} - -// @Route("/{version}/account/userauth/passkey/verify-authentication", "POST") -// @DataContract -export class AccountVerifyPasskeyAuthenticationRequest extends RequestBase implements IReturn -{ - // @DataMember - public ceremonyId: string; - - // @DataMember - public assertionResponse: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AccountVerifyPasskeyAuthenticationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyAuthTokensResponse(); } -} - -// @Route("/{version}/account/userauth/passkeys", "GET") -// @DataContract -export class ListAccountPasskeysRequest extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ListAccountPasskeysRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new AccountPasskeyListResponse(); } -} - -// @Route("/{version}/account/userauth/passkeys/{CredentialId}/rename", "POST") -// @DataContract -export class RenameAccountPasskeyRequest extends RequestBase implements IReturn -{ - // @DataMember - public credentialId: string; - - // @DataMember - public friendlyName: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RenameAccountPasskeyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyOkResponse(); } -} - -// @Route("/{version}/account/userauth/passkeys/{CredentialId}/revoke", "POST") -// @DataContract -export class RevokeAccountPasskeyRequest extends RequestBase implements IReturn -{ - // @DataMember - public credentialId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RevokeAccountPasskeyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyOkResponse(); } -} - -// @Route("/{version}/account/userauth/passkey/enrollment-options", "POST") -// @DataContract -export class AccountPasskeyEnrollmentOptionsRequest extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AccountPasskeyEnrollmentOptionsRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyCeremonyOptionsResponse(); } -} - -// @Route("/{version}/account/userauth/passkey/verify-enrollment", "POST") -// @DataContract -export class AccountVerifyPasskeyEnrollmentRequest extends RequestBase implements IReturn -{ - // @DataMember - public ceremonyId: string; - - // @DataMember - public attestationResponse: string; - - // @DataMember - public friendlyName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AccountVerifyPasskeyEnrollmentRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AccountPasskeyEnrollmentResponse(); } -} - -// @Route("/{version}/account/me", "GET") -export class GetMyAccountUserProfile extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMyAccountUserProfile'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMyAccountUserProfileResponse(); } -} - -// @Route("/{version}/account/me/phone", "PUT") -// @DataContract -export class UpdateMyAccountUserPhone extends RequestBase implements IReturn -{ - /** @description Your phone number in E.164 format (+ and the country code, then digits, e.g. +37060000000). Empty clears it. Used by "Account users" SMS campaigns. */ - // @DataMember - // @ApiMember(Description="Your phone number in E.164 format (+ and the country code, then digits, e.g. +37060000000). Empty clears it. Used by \"Account users\" SMS campaigns.") - public phone?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateMyAccountUserPhone'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/licensing/dns-status", "GET") -export class GetLicenseDomainDnsStatus extends RequestBase implements IReturn -{ - public domain?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLicenseDomainDnsStatus'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLicenseDomainDnsStatusResponse(); } -} - -// @Route("/{version}/licensing/domain-verification/start", "POST") -export class StartLicenseDomainVerificationRequest extends RequestBase implements IReturn -{ - public domain?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'StartLicenseDomainVerificationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new StartLicenseDomainVerificationResponse(); } -} - -// @Route("/{version}/licensing/domain-verification/status", "GET") -export class GetLicenseDomainVerificationStatus extends RequestBase implements IReturn -{ - public domain?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLicenseDomainVerificationStatus'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLicenseDomainVerificationStatusResponse(); } -} - -// @Route("/{version}/account/licenses", "GET") -export class GetLicenses extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLicenses'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLicensesResponse(); } -} - -// @Route("/{version}/licensing/heartbeat", "POST") -export class PostLicenseHeartbeat extends RequestBase implements IReturn -{ - public license?: string; - public licenseAccountId?: string; - public installationId?: string; - public domain?: string; - public hostKind?: string; - public release?: string; - public instanceVersion?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PostLicenseHeartbeat'; } - public getMethod() { return 'POST'; } - public createResponse() { return new PostLicenseHeartbeatResponse(); } -} - -// @Route("/{version}/account/licensing/status", "GET") -export class GetInstallationLicenseStatus extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetInstallationLicenseStatus'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetInstallationLicenseStatusResponse(); } -} - -// @Route("/{version}/account/licenses/{Id}/key", "GET") -export class GetLicenseKey extends RequestBase implements IReturn -{ - public id?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLicenseKey'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLicenseKeyResponse(); } -} - -// @Route("/{version}/account/ai/service-users", "POST") -export class CreateAiServiceUserRequest extends RequestBase implements IReturn -{ - /** @description A name people recognise, e.g. "Claude Code on my laptop". */ - // @ApiMember(Description="A name people recognise, e.g. \"Claude Code on my laptop\".", IsRequired=true) - public name: string; - - /** @description Account role ids (acc_…_nr_…) to give, built-in or custom. At least one role in total (account or project). */ - // @ApiMember(Description="Account role ids (acc_…_nr_…) to give, built-in or custom. At least one role in total (account or project).") - public accountRoleIds?: string[]; - - /** @description Project roles to give: [{ projectId, roleIds: [pr_…_nr_…] }]. Without an account role the service user is pinned to these projects. */ - // @ApiMember(Description="Project roles to give: [{ projectId, roleIds: [pr_…_nr_…] }]. Without an account role the service user is pinned to these projects.") - public projectRoles?: AiProjectRoleIdsDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateAiServiceUserRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new CreateAiServiceUserResponse(); } -} - -// @Route("/{version}/account/ai/service-users", "GET") -export class ListAiServiceUsersRequest extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ListAiServiceUsersRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new ListAiServiceUsersResponse(); } -} - -// @Route("/{version}/account/ai/service-users/{Id}/keys", "POST") -export class RotateAiServiceUserKeyRequest extends RequestBase implements IReturn -{ - /** @description The service user id (aisu_…). */ - // @ApiMember(Description="The service user id (aisu_…).", IsRequired=true) - public id: string; - - /** @description Optional key id (aisk_…) to revoke in the same change — a rotation. */ - // @ApiMember(Description="Optional key id (aisk_…) to revoke in the same change — a rotation.") - public revokeKeyId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RotateAiServiceUserKeyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RotateAiServiceUserKeyResponse(); } -} - -// @Route("/{version}/account/ai/service-users/{Id}/keys/{KeyId}", "DELETE") -export class RevokeAiServiceUserKeyRequest extends RequestBase implements IReturn -{ - /** @description The service user id (aisu_…). */ - // @ApiMember(Description="The service user id (aisu_…).", IsRequired=true) - public id: string; - - /** @description The key id (aisk_…) to revoke. */ - // @ApiMember(Description="The key id (aisk_…) to revoke.", IsRequired=true) - public keyId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RevokeAiServiceUserKeyRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/ai/service-users/{Id}", "PUT") -export class UpdateAiServiceUserRequest extends RequestBase implements IReturn -{ - /** @description The service user id (aisu_…). */ - // @ApiMember(Description="The service user id (aisu_…).", IsRequired=true) - public id: string; - - /** @description The new name, unique in the account, e.g. "Claude Code on my laptop". */ - // @ApiMember(Description="The new name, unique in the account, e.g. \"Claude Code on my laptop\".", IsRequired=true) - public name: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateAiServiceUserRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/account/ai/service-users/{Id}", "DELETE") -export class DeleteAiServiceUserRequest extends RequestBase implements IReturn -{ - /** @description The service user id (aisu_…). */ - // @ApiMember(Description="The service user id (aisu_…).", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteAiServiceUserRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/membership/disable", "PUT") -export class DisableMembership extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableMembership'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/membership/enable", "PUT") -export class EnableMembership extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableMembership'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Import users with their existing password hashes */ -// @Route("/{version}/membership/users/import", "POST") -// @Api(Description="Import users with their existing password hashes") -export class ImportUsersRequest extends CodeMashRequestBase implements IReturn -{ - /** @description True (default) = check every row and write nothing. False = write. */ - // @ApiMember(Description="True (default) = check every row and write nothing. False = write.") - public dryRun: boolean; - - /** @description True = do not add the project's default roles (as 'ignoreUserRegistersAsRole' on registration). */ - // @ApiMember(Description="True = do not add the project's default roles (as 'ignoreUserRegistersAsRole' on registration).") - public ignoreDefaultRoles: boolean; - - /** @description The users to import, 1 to 1000 per request. */ - // @ApiMember(Description="The users to import, 1 to 1000 per request.", IsRequired=true) - public users: ImportUserRowDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ImportUsersRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new ImportUsersResponse(); } -} - -/** @description Repair project logins stored without a project id */ -// @Route("/{version}/membership/users/repair-logins", "POST") -// @Api(Description="Repair project logins stored without a project id") -export class RepairLoginProjectIdsRequest extends CodeMashRequestBase implements IReturn -{ - /** @description True (default) = only count what would change. False = write. */ - // @ApiMember(Description="True (default) = only count what would change. False = write.") - public dryRun: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RepairLoginProjectIdsRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RepairLoginProjectIdsResponse(); } -} - -/** @description Membership */ -// @Route("/{version}/membership/users/{Id}/api-keys", "POST") -// @Api(Description="Membership") -// @DataContract -export class IssueServiceUserApiKeyRequest extends CodeMashRequestBase implements IReturn -{ - // @DataMember - public id: string; - - // @DataMember - public databaseIntegrationId?: string; - - // @DataMember - public name: string; - - // @DataMember - public scopes?: string[]; - - // @DataMember - public expiresInDays?: number; - - // @DataMember - public notes?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'IssueServiceUserApiKeyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IssueServiceUserApiKeyResponse(); } -} - -/** @description Membership */ -// @Route("/{version}/membership/users/{Id}/api-keys", "GET") -// @Api(Description="Membership") -// @DataContract -export class ListServiceUserApiKeysRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The service user's auth id. */ - // @DataMember - // @ApiMember(Description="The service user's auth id.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ListServiceUserApiKeysRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new ListServiceUserApiKeysResponse(); } -} - -/** @description Membership */ -// @Route("/{version}/membership/users/{Id}/api-keys/{KeyId}", "DELETE") -// @Api(Description="Membership") -// @DataContract -export class DeleteServiceUserApiKeyRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The service user's auth id. */ - // @DataMember - // @ApiMember(Description="The service user's auth id.", IsRequired=true) - public id: string; - - /** @description The key id to delete, from list_service_user_api_keys. */ - // @DataMember - // @ApiMember(Description="The key id to delete, from list_service_user_api_keys.", IsRequired=true) - public keyId: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteServiceUserApiKeyRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/membership/triggers/{triggerId}", "DELETE") -// @DataContract -export class DeleteMembershipTrigger extends DeleteTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteMembershipTrigger'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/membership/triggers/{triggerId}/disable", "PATCH") -// @DataContract -export class DisableMembershipTrigger extends DisableTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableMembershipTrigger'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/membership/triggers/{triggerId}/enable", "PATCH") -// @DataContract -export class EnableMembershipTrigger extends EnableTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableMembershipTrigger'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets membership trigger by specified Id */ -// @Route("/{version}/membership/triggers/{id}", "GET") -// @Api(Description="Gets membership trigger by specified Id") -export class GetMembershipTrigger extends GetTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMembershipTrigger'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMembershipTriggerResponse(); } -} - -/** @description Gets membership triggers */ -// @Route("/{version}/membership/triggers", "GET") -// @Api(Description="Gets membership triggers") -export class GetMembershipTriggers extends GetTriggers implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMembershipTriggers'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMembershipTriggersResponse(); } -} - -// @Route("/{version}/membership/triggers", "POST") -// @DataContract -export class SaveMembershipTrigger extends SaveTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveMembershipTrigger'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Create a new custom role for project. */ -// @Route("/{version}/membership/roles", "POST") -// @Api(Description="Create a new custom role for project.") -export class CreateRole extends CodeMashRequestBase implements IReturn -{ - /** @description Display name of the new role, unique within the project. */ - // @ApiMember(Description="Display name of the new role, unique within the project.", IsRequired=true) - public roleName: string; - - public description?: string; - /** @description Policy ids to attach. These are OPAQUE ids from get_policies (e.g. 'pol_3kJ9xJ2mQ0aBcDeFgHiJk') — NEVER invent them or guess from a policy name. Omit this to create a role with no policies and attach them later. */ - // @ApiMember(Description="Policy ids to attach. These are OPAQUE ids from get_policies (e.g. 'pol_3kJ9xJ2mQ0aBcDeFgHiJk') — NEVER invent them or guess from a policy name. Omit this to create a role with no policies and attach them later.") - public policies?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateRole'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Deletes custom role from project. */ -// @Route("/{version}/membership/roles", "DELETE") -// @Api(Description="Deletes custom role from project.") -export class DeleteRole extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the role to delete, from get_roles. */ - // @ApiMember(Description="Id of the role to delete, from get_roles.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteRole'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets project role details. */ -// @Route("/{version}/membership/roles/{Id}", "GET") -// @Api(Description="Gets project role details.") -export class GetRole extends CodeMashRequestBase implements IReturn -{ - /** @description Role id from get_roles. */ - // @ApiMember(Description="Role id from get_roles.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetRole'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetRoleResponse(); } -} - -/** @description Gets project roles. */ -// @Route("/{version}/membership/roles", "GET") -// @Api(Description="Gets project roles.") -export class GetRoles extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetRoles'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetRolesResponse(); } -} - -/** @description Updates role policies */ -// @Route("/{version}/membership/roles", "PATCH") -// @Api(Description="Updates role policies") -export class UpdateRolePolicies extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the role to update, from get_roles. */ - // @ApiMember(Description="Id of the role to update, from get_roles.", IsRequired=true) - public id: string; - - /** @description The role's name — required; resend the current name to keep it. */ - // @ApiMember(Description="The role's name — required; resend the current name to keep it.", IsRequired=true) - public roleName: string; - - public description?: string; - /** @description The complete new list of attached policy ids (full replacement), opaque ids from get_policies (e.g. 'pol_3kJ9xJ2mQ0aBcDeFgHiJk') — never invent or guess them. */ - // @ApiMember(Description="The complete new list of attached policy ids (full replacement), opaque ids from get_policies (e.g. 'pol_3kJ9xJ2mQ0aBcDeFgHiJk') — never invent or guess them.") - public policies?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateRolePolicies'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Create a new custom policy for project. */ -// @Route("/{version}/membership/policies", "POST") -// @Api(Description="Create a new custom policy for project.") -export class CreatePolicy extends CodeMashRequestBase implements IReturn -{ - /** @description Display name of the new policy, unique within the project. */ - // @ApiMember(Description="Display name of the new policy, unique within the project.", IsRequired=true) - public policyName: string; - - /** @description Optional human-readable description of what the policy grants. */ - // @ApiMember(Description="Optional human-readable description of what the policy grants.") - public description?: string; - - /** @description AWS-IAM-style policy document as a raw JSON string (an object with a permission statement list) matching PolicyDocument.schema.json. Malformed or invalid documents are rejected before any change is made. */ - // @ApiMember(Description="AWS-IAM-style policy document as a raw JSON string (an object with a permission statement list) matching PolicyDocument.schema.json. Malformed or invalid documents are rejected before any change is made.") - public policyDocumentJson?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreatePolicy'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Deletes custom policy from project. */ -// @Route("/{version}/membership/policies", "DELETE") -// @Api(Description="Deletes custom policy from project.") -export class DeletePolicy extends CodeMashRequestBase implements IReturn -{ - /** @description Public policy id, e.g. 'pol_database-read', from get_policies. */ - // @ApiMember(Description="Public policy id, e.g. 'pol_database-read', from get_policies.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeletePolicy'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets project policy details. */ -// @Route("/{version}/membership/policies/{Id}", "GET") -// @Api(Description="Gets project policy details.") -export class GetPolicy extends CodeMashRequestBase implements IReturn -{ - /** @description Public policy id, e.g. 'pol_database-read', from get_policies. */ - // @ApiMember(Description="Public policy id, e.g. 'pol_database-read', from get_policies.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPolicy'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPolicyResponse(); } -} - -/** @description Gets project policies. */ -// @Route("/{version}/membership/policies", "GET") -// @Api(Description="Gets project policies.") -export class GetPolicies extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPolicies'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPoliciesResponse(); } -} - -/** @description Updates a custom policy for project. */ -// @Route("/{version}/membership/policies", "PUT") -// @Api(Description="Updates a custom policy for project.") -export class UpdatePolicy extends CodeMashRequestBase implements IReturn -{ - /** @description Public policy id, e.g. 'pol_database-read', from get_policies. */ - // @ApiMember(Description="Public policy id, e.g. 'pol_database-read', from get_policies.", IsRequired=true) - public id: string; - - /** @description The policy's name — required; resend the current name to keep it. */ - // @ApiMember(Description="The policy's name — required; resend the current name to keep it.", IsRequired=true) - public policyName: string; - - /** @description Optional human-readable description of what the policy grants. */ - // @ApiMember(Description="Optional human-readable description of what the policy grants.") - public description?: string; - - /** @description AWS-IAM-style policy document as a raw JSON string (an object with a permission statement list) matching PolicyDocument.schema.json — this is a FULL replacement of the policy's current permissions. */ - // @ApiMember(Description="AWS-IAM-style policy document as a raw JSON string (an object with a permission statement list) matching PolicyDocument.schema.json — this is a FULL replacement of the policy's current permissions.") - public policyDocumentJson?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdatePolicy'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Gets the project's passkey authentication settings. */ -// @Route("/{version}/membership/passkey/settings", "GET") -// @Api(Description="Gets the project's passkey authentication settings.") -export class GetPasskeySettings extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPasskeySettings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPasskeySettingsResponse(); } -} - -/** @description Saves the project's passkey authentication settings. */ -// @Route("/{version}/membership/passkey/settings", "POST") -// @Api(Description="Saves the project's passkey authentication settings.") -export class SavePasskeySettings extends CodeMashRequestBase implements IReturn -{ - /** @description Whether the email + passkey sign-in flow is enabled for the project. */ - // @ApiMember(Description="Whether the email + passkey sign-in flow is enabled for the project.") - public enabled: boolean; - - /** @description Email verification code lifetime, in minutes. Allowed range: 3-15. */ - // @ApiMember(Description="Email verification code lifetime, in minutes. Allowed range: 3-15.") - public codeTtlMinutes: number; - - /** @description Maximum passkeys a single user may register. Allowed range: 1-20. */ - // @ApiMember(Description="Maximum passkeys a single user may register. Allowed range: 1-20.") - public maxCredentialsPerUser: number; - - /** @description Number of recovery codes generated at signup. Allowed range: 5-20. */ - // @ApiMember(Description="Number of recovery codes generated at signup. Allowed range: 5-20.") - public recoveryCodeCount: number; - - /** @description Whether recovery codes are generated automatically at signup. */ - // @ApiMember(Description="Whether recovery codes are generated automatically at signup.") - public generateRecoveryCodesAtSignup: boolean; - - /** @description Accepted authenticator types: 'Any', 'Platform', or 'CrossPlatform'. */ - // @ApiMember(Description="Accepted authenticator types: 'Any', 'Platform', or 'CrossPlatform'.") - public authenticatorAttachment: string; - - /** @description Per-project opt-in for magic-link account recovery (off by default). */ - // @ApiMember(Description="Per-project opt-in for magic-link account recovery (off by default).") - public allowMagicLinkRecovery: boolean; - - /** @description Absolute refresh-token lifetime, in days. Allowed range: 7-90. */ - // @ApiMember(Description="Absolute refresh-token lifetime, in days. Allowed range: 7-90.") - public refreshTokenTtlDays: number; - - /** @description Optional explicit WebAuthn RP-ID — a bare DNS host (e.g. 'app.example.com', no scheme/port/path). Leave null/empty to derive it from the project's CORS origins. WARNING: changing this value invalidates every existing passkey on the project — set it once before going live and avoid changing it afterward. */ - // @ApiMember(Description="Optional explicit WebAuthn RP-ID — a bare DNS host (e.g. 'app.example.com', no scheme/port/path). Leave null/empty to derive it from the project's CORS origins. WARNING: changing this value invalidates every existing passkey on the project — set it once before going live and avoid changing it afterward.") - public rpId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SavePasskeySettings'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/membership/integrations/{Id}", "DELETE") -export class DeleteMembershipIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_membership_integrations. */ - // @ApiMember(Description="Integration id, from get_membership_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteMembershipIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/membership/integrations/{Id}/disable", "PUT") -export class DisableMembershipIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_membership_integrations. */ - // @ApiMember(Description="Integration id, from get_membership_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableMembershipIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/membership/integrations/{Id}/enable", "PUT") -export class EnableMembershipIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_membership_integrations. */ - // @ApiMember(Description="Integration id, from get_membership_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableMembershipIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/membership/integrations/{id}", "GET") -export class GetMembershipIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_membership_integrations. */ - // @ApiMember(Description="Integration id, from get_membership_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMembershipIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMembershipIntegrationResponse(); } -} - -// @Route("/{version}/membership/integrations", "GET") -export class GetMembershipIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMembershipIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMembershipIntegrationsResponse(); } -} - -// @Route("/{version}/membership/integrations", "POST") -// @DataContract -export class SaveMembershipIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: MembershipIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveMembershipIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/membership/integrations/{Id}/default", "PUT") -export class SetMembershipIntegrationAsDefaultRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_membership_integrations. */ - // @ApiMember(Description="Integration id, from get_membership_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetMembershipIntegrationAsDefaultRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets the project's membership authorization (role-assignment) settings. */ -// @Route("/{version}/membership/authorization", "GET") -// @Api(Description="Gets the project's membership authorization (role-assignment) settings.") -export class GetAuthorizationSettings extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAuthorizationSettings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAuthorizationSettingsResponse(); } -} - -/** @description Updates the project's membership authorization settings. */ -// @Route("/{version}/membership/authorization", "PUT") -// @Api(Description="Updates the project's membership authorization settings.") -export class UpdateAuthorizationSettings extends CodeMashRequestBase implements IReturn -{ - /** @description Single-setting change (dashboard tabs), e.g. 'DefaultRegisterRole' with userRegistersAsRole, or 'PasswordComplexity'. Unknown values are refused. Leave empty to change defaultRoles / allowedRegistrationRoles / allowGuestUsers / guestCleanupPeriodDays — only the fields you send change. */ - // @ApiMember(Description="Single-setting change (dashboard tabs), e.g. 'DefaultRegisterRole' with userRegistersAsRole, or 'PasswordComplexity'. Unknown values are refused. Leave empty to change defaultRoles / allowedRegistrationRoles / allowGuestUsers / guestCleanupPeriodDays — only the fields you send change.") - public setting?: string; - - /** @description Role names given to a user who registers without naming roles. Omit = keep; [] = none. */ - // @ApiMember(Description="Role names given to a user who registers without naming roles. Omit = keep; [] = none.") - public defaultRoles?: string[]; - - /** @description Role names a user may pick when registering. Omit = keep; [] = none. */ - // @ApiMember(Description="Role names a user may pick when registering. Omit = keep; [] = none.") - public allowedRegistrationRoles?: string[]; - - /** @description Whether guest (anonymous) users may be created. Omit = keep. When sent, guestCleanupPeriodDays is taken with it (null = never clean up). */ - // @ApiMember(Description="Whether guest (anonymous) users may be created. Omit = keep. When sent, guestCleanupPeriodDays is taken with it (null = never clean up).") - public allowGuestUsers?: boolean; - - /** @description Days after which inactive guests are removed; null or 0 = never. Omit both guest fields = keep. */ - // @ApiMember(Description="Days after which inactive guests are removed; null or 0 = never. Omit both guest fields = keep.") - public guestCleanupPeriodDays?: number; - - public userRegistersAsRole?: string; - public guestRegistersAsRole?: string; - public allowedRegisterRoles?: string[]; - public needVerification: boolean; - public verificationEmailTemplate?: string; - public deactivationEmailTemplate?: string; - public allowInviteUsers: boolean; - public allowDeactivateUsers: boolean; - public inviteUserEmailTemplate?: string; - public invitationExpiration?: number; - public emailVerificationExpiration?: number; - public deactivationExpiration?: number; - public defaultSubscribeToNews: boolean; - /** @description "Email registration": the public register/email route accepts sign-ups. Omit = keep. */ - // @ApiMember(Description="\"Email registration\": the public register/email route accepts sign-ups. Omit = keep.") - public allowEmailRegistration?: boolean; - - /** @description "Invite-only": public sign-up (email and username) is refused; only invitations create users. Omit = keep. */ - // @ApiMember(Description="\"Invite-only\": public sign-up (email and username) is refused; only invitations create users. Omit = keep.") - public inviteOnly?: boolean; - - /** @description "Allow anyone to sign up": grants (true) / revokes (false) membership:register on the project's Guest role. Omit = keep. */ - // @ApiMember(Description="\"Allow anyone to sign up\": grants (true) / revokes (false) membership:register on the project's Guest role. Omit = keep.") - public allowAnyoneToSignUp?: boolean; - - public minLength: number; - public maxLength?: number; - public minNumbers?: number; - public maxNumbers?: number; - public minUpper?: number; - public maxUpper?: number; - public minLower?: number; - public maxLower?: number; - public minSpecial?: number; - public maxSpecial?: number; - public allowedSpecial?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateAuthorizationSettings'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates the project's membership password complexity policy. */ -// @Route("/{version}/membership/authorization/password-complexity", "PUT") -// @Api(Description="Updates the project's membership password complexity policy.") -export class UpdatePasswordComplexity extends CodeMashRequestBase implements IReturn -{ - /** @description Minimum password length. */ - // @ApiMember(Description="Minimum password length.") - public minLength: number; - - /** @description Maximum password length, if capped. */ - // @ApiMember(Description="Maximum password length, if capped.") - public maxLength?: number; - - /** @description Minimum number of numeric characters required. */ - // @ApiMember(Description="Minimum number of numeric characters required.") - public minNumbers?: number; - - /** @description Maximum number of numeric characters allowed. */ - // @ApiMember(Description="Maximum number of numeric characters allowed.") - public maxNumbers?: number; - - /** @description Minimum number of uppercase characters required. */ - // @ApiMember(Description="Minimum number of uppercase characters required.") - public minUpper?: number; - - /** @description Maximum number of uppercase characters allowed. */ - // @ApiMember(Description="Maximum number of uppercase characters allowed.") - public maxUpper?: number; - - /** @description Minimum number of lowercase characters required. */ - // @ApiMember(Description="Minimum number of lowercase characters required.") - public minLower?: number; - - /** @description Maximum number of lowercase characters allowed. */ - // @ApiMember(Description="Maximum number of lowercase characters allowed.") - public maxLower?: number; - - /** @description Minimum number of special characters required. */ - // @ApiMember(Description="Minimum number of special characters required.") - public minSpecial?: number; - - /** @description Maximum number of special characters allowed. */ - // @ApiMember(Description="Maximum number of special characters allowed.") - public maxSpecial?: number; - - /** @description The set of characters counted as 'special', if restricted. */ - // @ApiMember(Description="The set of characters counted as 'special', if restricted.") - public allowedSpecial?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdatePasswordComplexity'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new UpdatePasswordComplexityResponse(); } -} - -/** @description Gets the project's configured membership authentication sign-in flows. */ -// @Route("/{version}/membership/authentication", "GET") -// @Api(Description="Gets the project's configured membership authentication sign-in flows.") -export class GetAuthenticationSettings extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAuthenticationSettings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAuthenticationSettingsResponse(); } -} - -/** @description Updates the project's membership authentication preferences. */ -// @Route("/{version}/membership/authentication", "PUT") -// @Api(Description="Updates the project's membership authentication preferences.") -export class UpdateAuthenticationSettings extends CodeMashRequestBase implements IReturn -{ - /** @description Default URL to redirect end users to after logout. */ - // @ApiMember(Description="Default URL to redirect end users to after logout.") - public logoutUrl?: string; - - /** @description Whether end users may sign in with a username in addition to email. */ - // @ApiMember(Description="Whether end users may sign in with a username in addition to email.") - public allowUsernames: boolean; - - /** @description Per-authentication-mode logout URL overrides. */ - // @ApiMember(Description="Per-authentication-mode logout URL overrides.") - public modes?: CredentialsSettingsModeDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateAuthenticationSettings'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disable database service */ -// @Route("/{version}/database/disable", "PUT") -// @Api(Description="Disable database service") -export class DisableDatabase extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableDatabase'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/database/enable", "PUT") -export class EnableDatabase extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableDatabase'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete database trigger */ -// @Route("/{version}/database/schemas/triggers/{triggerId}", "DELETE") -// @Api(Description="Delete database trigger") -// @DataContract -export class DeleteSchemaTrigger extends DeleteTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteSchemaTrigger'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disable database trigger */ -// @Route("/{version}/database/schemas/triggers/{triggerId}/disable", "PATCH") -// @Api(Description="Disable database trigger") -// @DataContract -export class DisableSchemaTrigger extends DisableTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableSchemaTrigger'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Enable database trigger */ -// @Route("/{version}/database/schemas/triggers/{triggerId}/enable", "PATCH") -// @Api(Description="Enable database trigger") -// @DataContract -export class EnableSchemaTrigger extends EnableTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableSchemaTrigger'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets database trigger by specified Id */ -// @Route("/{version}/database/schemas/triggers/{id}", "GET") -// @Api(Description="Gets database trigger by specified Id") -export class GetSchemaTrigger extends GetTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSchemaTrigger'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSchemaTriggerResponse(); } -} - -/** @description Gets database triggers */ -// @Route("/{version}/database/schemas/triggers", "GET") -// @Api(Description="Gets database triggers") -export class GetSchemaTriggers extends GetTriggers implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSchemaTriggers'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSchemaTriggersResponse(); } -} - -// @Route("/{version}/database/schemas/triggers", "POST") -// @DataContract -export class SaveSchemaTrigger extends SaveTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveSchemaTrigger'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Delete database taxonomy */ -// @Route("/{version}/database/taxonomies/{Id}", "DELETE") -// @Api(Description="Delete database taxonomy") -export class DeleteDatabaseTaxonomyRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Taxonomy id to delete, from get_database_taxonomies. */ - // @ApiMember(Description="Taxonomy id to delete, from get_database_taxonomies.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteDatabaseTaxonomyRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets database taxonomy by id */ -// @Route("/{version}/database/taxonomies/{id}", "GET") -// @Api(Description="Gets database taxonomy by id") -export class GetDatabaseTaxonomy extends CodeMashRequestBase implements IReturn -{ - /** @description Taxonomy id from get_database_taxonomies. */ - // @ApiMember(Description="Taxonomy id from get_database_taxonomies.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseTaxonomy'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseTaxonomyResponse(); } -} - -/** @description Gets database taxonomies */ -// @Route("/{version}/database/taxonomies", "GET") -// @Api(Description="Gets database taxonomies") -export class GetDatabaseTaxonomies extends CodeMashListPaginationRequestBase implements IReturn -{ - public pagingArgs?: PagingArgs; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseTaxonomies'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseTaxonomiesResponse(); } -} - -/** @description Returns the single-parent taxonomy structure tree */ -// @Route("/{version}/database/taxonomies/tree", "GET") -// @Api(Description="Returns the single-parent taxonomy structure tree") -// @DataContract -export class GetDatabaseTaxonomyTreeRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ - // @DataMember - // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - public allLanguages: boolean; - - /** @description When true, each taxonomy node also carries its own term tree (heavier response). */ - // @DataMember - // @ApiMember(Description="When true, each taxonomy node also carries its own term tree (heavier response).") - public includeTerms: boolean; - - /** @description Optional database integration id. When omitted, the project's default database integration is used. */ - // @DataMember - // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseTaxonomyTreeRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseTaxonomyTreeResponse(); } -} - -/** @description Creates or updates a database taxonomy */ -// @Route("/{version}/database/taxonomies", "POST") -// @Api(Description="Creates or updates a database taxonomy") -// @DataContract -export class SaveDatabaseTaxonomyRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Empty to create a new taxonomy; set to an existing taxonomy id (from get_database_taxonomies) to update it. An update replaces the whole taxonomy: send every field you want to keep (parentId, dependencies, description, schemas). */ - // @DataMember - // @ApiMember(Description="Empty to create a new taxonomy; set to an existing taxonomy id (from get_database_taxonomies) to update it. An update replaces the whole taxonomy: send every field you want to keep (parentId, dependencies, description, schemas).") - public viewId?: string; - - /** @description Human-entered taxonomy title (e.g. "Countries"); a slug is derived server-side. */ - // @DataMember - // @ApiMember(Description="Human-entered taxonomy title (e.g. \"Countries\"); a slug is derived server-side.", IsRequired=true) - public taxonomyName: string; - - /** @description Optional free-text description of the taxonomy. */ - // @DataMember - // @ApiMember(Description="Optional free-text description of the taxonomy.") - public description?: string; - - /** @description Optional raw JSON string (Norbix data meta-schema) describing custom meta fields for terms in this taxonomy. Omit to leave the taxonomy structural-only. */ - // @DataMember - // @ApiMember(Description="Optional raw JSON string (Norbix data meta-schema) describing custom meta fields for terms in this taxonomy. Omit to leave the taxonomy structural-only.") - public termsMetaDataSchema?: string; - - /** @description Optional raw JSON string (Norbix UI/visual meta-schema) describing the term meta edit form. */ - // @DataMember - // @ApiMember(Description="Optional raw JSON string (Norbix UI/visual meta-schema) describing the term meta edit form.") - public termsMetaVisualSchema?: string; - - /** @description Optional parent taxonomy id. The child taxonomy points to its parent — e.g. set the Countries taxonomy's parentId to the Regions taxonomy id so each country term can be parented by a region term. Omit for a root taxonomy. */ - // @DataMember - // @ApiMember(Description="Optional parent taxonomy id. The child taxonomy points to its parent — e.g. set the Countries taxonomy's parentId to the Regions taxonomy id so each country term can be parented by a region term. Omit for a root taxonomy.") - public parentId?: string; - - /** @description Optional list of other taxonomy ids this taxonomy depends on for multi-parent terms. Omit for a self-contained taxonomy. */ - // @DataMember - // @ApiMember(Description="Optional list of other taxonomy ids this taxonomy depends on for multi-parent terms. Omit for a self-contained taxonomy.") - public dependencies?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveDatabaseTaxonomyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Delete a single term from a taxonomy by id */ -// @Route("/{version}/database/taxonomies/{TaxonomyId}/terms/{Id}", "DELETE") -// @Api(Description="Delete a single term from a taxonomy by id") -// @DataContract -export class DeleteDatabaseTaxonomyTermRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Taxonomy id that owns the term, from get_database_taxonomies — or the taxonomy name (slug or title). */ - // @DataMember - // @ApiMember(Description="Taxonomy id that owns the term, from get_database_taxonomies — or the taxonomy name (slug or title).", IsRequired=true) - public taxonomyId: string; - - /** @description Term id to delete, from get_database_taxonomy_term_tree. */ - // @DataMember - // @ApiMember(Description="Term id to delete, from get_database_taxonomy_term_tree.", IsRequired=true) - public id: string; - - /** @description Optional database integration id. When omitted, the project's default database integration is used. */ - // @DataMember - // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteDatabaseTaxonomyTermRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete many terms in a taxonomy matching the given filter */ -// @Route("/{version}/database/taxonomies/{TaxonomyId}/terms/many", "DELETE") -// @Api(Description="Delete many terms in a taxonomy matching the given filter") -// @DataContract -export class DeleteManyDatabaseTaxonomyTermsRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Taxonomy id whose terms to delete, from get_database_taxonomies — or the taxonomy name (slug or title). */ - // @DataMember - // @ApiMember(Description="Taxonomy id whose terms to delete, from get_database_taxonomies — or the taxonomy name (slug or title).", IsRequired=true) - public taxonomyId: string; - - /** @description Optional database integration id. When omitted, the project's default database integration is used. */ - // @DataMember - // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - public databaseIntegrationId?: string; - - /** @description MongoDB extended-JSON match filter (a raw JSON object, e.g. {"active":false}) selecting which terms to delete. Automatically ANDed server-side with the taxonomyId, so it cannot affect other taxonomies. */ - // @DataMember - // @ApiMember(Description="MongoDB extended-JSON match filter (a raw JSON object, e.g. {\"active\":false}) selecting which terms to delete. Automatically ANDed server-side with the taxonomyId, so it cannot affect other taxonomies.", IsRequired=true) - public filter: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteManyDatabaseTaxonomyTermsRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get a single term from a taxonomy by id */ -// @Route("/{version}/database/taxonomies/{TaxonomyId}/terms/{Id}", "GET") -// @Api(Description="Get a single term from a taxonomy by id") -// @DataContract -export class GetDatabaseTaxonomyTermRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ - // @DataMember - // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - public allLanguages: boolean; - - /** @description Taxonomy id from get_database_taxonomies — or the taxonomy name (slug or title). */ - // @DataMember - // @ApiMember(Description="Taxonomy id from get_database_taxonomies — or the taxonomy name (slug or title).", IsRequired=true) - public taxonomyId: string; - - /** @description Term id from get_database_taxonomy_term_tree. */ - // @DataMember - // @ApiMember(Description="Term id from get_database_taxonomy_term_tree.", IsRequired=true) - public id: string; - - /** @description Optional database integration id. When omitted, the project's default database integration is used. */ - // @DataMember - // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseTaxonomyTermRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseTaxonomyTermResponse(); } -} - -/** @description Returns a merged term tree across a taxonomy and its child taxonomies */ -// @Route("/{version}/database/taxonomies/{TaxonomyName}/merged-tree", "GET") -// @Api(Description="Returns a merged term tree across a taxonomy and its child taxonomies") -// @DataContract -export class GetDatabaseMergedTermTreeRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ - // @DataMember - // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - public allLanguages: boolean; - - /** @description Root taxonomy slug/name or id, txn_… (from get_database_taxonomies). Its terms are the roots; child-taxonomy terms nest under them. */ - // @DataMember - // @ApiMember(Description="Root taxonomy slug/name or id, txn_… (from get_database_taxonomies). Its terms are the roots; child-taxonomy terms nest under them.", IsRequired=true) - public taxonomyName: string; - - /** @description Optional database integration id. When omitted, the project's default database integration is used. */ - // @DataMember - // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseMergedTermTreeRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseMergedTermTreeResponse(); } -} - -/** @description Returns the whole term tree of a taxonomy (or a sub-tree) in one call */ -// @Route("/{version}/database/taxonomies/{TaxonomyName}/terms/tree", "GET") -// @Api(Description="Returns the whole term tree of a taxonomy (or a sub-tree) in one call") -// @DataContract -export class GetDatabaseTaxonomyTermTreeRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. */ - // @DataMember - // @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - public allLanguages: boolean; - - /** @description Taxonomy slug/name (or its id, txn_…) to fetch the term tree for, from get_database_taxonomies. */ - // @DataMember - // @ApiMember(Description="Taxonomy slug/name (or its id, txn_…) to fetch the term tree for, from get_database_taxonomies.", IsRequired=true) - public taxonomyName: string; - - /** @description Optional term id to root the returned tree at a sub-tree instead of the whole taxonomy. */ - // @DataMember - // @ApiMember(Description="Optional term id to root the returned tree at a sub-tree instead of the whole taxonomy.") - public rootTermId?: string; - - /** @description Optional maximum depth to return below the root. */ - // @DataMember - // @ApiMember(DataType="integer", Description="Optional maximum depth to return below the root.") - public depth?: number; - - /** @description Optional database integration id. When omitted, the project's default database integration is used. */ - // @DataMember - // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseTaxonomyTermTreeRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseTaxonomyTermTreeResponse(); } -} - -/** @description Insert a single term into a taxonomy */ -// @Route("/{version}/database/taxonomies/{TaxonomyId}/terms", "POST") -// @Api(Description="Insert a single term into a taxonomy") -// @DataContract -export class SaveDatabaseTaxonomyTermRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Taxonomy id to insert the term into, from get_database_taxonomies — or the taxonomy name (slug or title). */ - // @DataMember - // @ApiMember(Description="Taxonomy id to insert the term into, from get_database_taxonomies — or the taxonomy name (slug or title).", IsRequired=true) - public taxonomyId: string; - - /** @description Optional database integration id. When omitted, the project's default database integration is used. */ - // @DataMember - // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - public databaseIntegrationId?: string; - - /** @description The term to insert, as a MongoDB extended-JSON document string (a raw JSON object). Supported term fields: name (string, or a {lang:value} map — required); description; slug (optional — the URL-safe name, unique inside the taxonomy; derived from name when omitted, e.g. 'France' → 'france', with a -2, -3… suffix when another term of the taxonomy already has that derived slug; an explicit slug another term has is refused, CM-ERRORS-TAXONOMIES-012); order (integer sort position, lower shows first — omit for unordered); parentId (id of the single parent term); multiParents ("additional categories": array of {taxonomyId, parentId}). The server stamps taxonomyId/taxonomyName automatically — do not include them. Example: {"name":"France","order":1}. */ - // @DataMember - // @ApiMember(Description="The term to insert, as a MongoDB extended-JSON document string (a raw JSON object). Supported term fields: name (string, or a {lang:value} map — required); description; slug (optional — the URL-safe name, unique inside the taxonomy; derived from name when omitted, e.g. 'France' → 'france', with a -2, -3… suffix when another term of the taxonomy already has that derived slug; an explicit slug another term has is refused, CM-ERRORS-TAXONOMIES-012); order (integer sort position, lower shows first — omit for unordered); parentId (id of the single parent term); multiParents (\"additional categories\": array of {taxonomyId, parentId}). The server stamps taxonomyId/taxonomyName automatically — do not include them. Example: {\"name\":\"France\",\"order\":1}.", IsRequired=true) - public document: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveDatabaseTaxonomyTermRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Update a single term in a taxonomy by id */ -// @Route("/{version}/database/taxonomies/{TaxonomyId}/terms/{Id}", "PUT") -// @Api(Description="Update a single term in a taxonomy by id") -// @DataContract -export class UpdateDatabaseTaxonomyTermRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Taxonomy id that owns the term, from get_database_taxonomies — or the taxonomy name (slug or title). */ - // @DataMember - // @ApiMember(Description="Taxonomy id that owns the term, from get_database_taxonomies — or the taxonomy name (slug or title).", IsRequired=true) - public taxonomyId: string; - - /** @description Term id to update, from get_database_taxonomy_term_tree. */ - // @DataMember - // @ApiMember(Description="Term id to update, from get_database_taxonomy_term_tree.", IsRequired=true) - public id: string; - - /** @description Optional database integration id. When omitted, the project's default database integration is used. */ - // @DataMember - // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - public databaseIntegrationId?: string; - - /** @description Partial update document as MongoDB extended-JSON (a raw JSON object of fields to change), applied with $set — only the given fields change. Updatable term fields: name (string or {lang:value} map — a new name re-derives the slug unless 'slug' is sent too; a derived slug another term has gets a -2, -3… suffix); slug (optional — set explicitly, unique inside the taxonomy, CM-ERRORS-TAXONOMIES-012 when another term has it); description; order (integer sort position, lower shows first — use this to numerate/rank terms; set null to clear); parentId (single parent term id — a term from THIS taxonomy's parent taxonomy; e.g. link a country to its region by setting the country term's parentId to the region term id); multiParents ("additional categories": array of {taxonomyId, parentId}). Example to rank a term: {"order":1}. */ - // @DataMember - // @ApiMember(Description="Partial update document as MongoDB extended-JSON (a raw JSON object of fields to change), applied with $set — only the given fields change. Updatable term fields: name (string or {lang:value} map — a new name re-derives the slug unless 'slug' is sent too; a derived slug another term has gets a -2, -3… suffix); slug (optional — set explicitly, unique inside the taxonomy, CM-ERRORS-TAXONOMIES-012 when another term has it); description; order (integer sort position, lower shows first — use this to numerate/rank terms; set null to clear); parentId (single parent term id — a term from THIS taxonomy's parent taxonomy; e.g. link a country to its region by setting the country term's parentId to the region term id); multiParents (\"additional categories\": array of {taxonomyId, parentId}). Example to rank a term: {\"order\":1}.", IsRequired=true) - public update: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateDatabaseTaxonomyTermRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Creates every collection and taxonomy of a compiled IF bundle, linked and published */ -// @Route("/{version}/database/schemas/apply-bundle", "POST") -// @Api(Description="Creates every collection and taxonomy of a compiled IF bundle, linked and published") -// @DataContract -export class ApplyDatabaseSchemaBundleRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Comma-separated catalog entity ids to create from the reviewed catalog (e.g. "blog_posts,comments"). The usual input. */ - // @DataMember - // @ApiMember(Description="Comma-separated catalog entity ids to create from the reviewed catalog (e.g. \"blog_posts,comments\"). The usual input.") - public entities?: string; - - /** @description Only for entities the catalog lacks: one IF entity object or an array of IF objects (JSON string). May also hold catalog refs with add_fields / remove_fields. */ - // @DataMember - // @ApiMember(Description="Only for entities the catalog lacks: one IF entity object or an array of IF objects (JSON string). May also hold catalog refs with add_fields / remove_fields.") - public bundleJson?: string; - - /** @description Field tier to compile: minimal | standard (default) | extended. */ - // @DataMember - // @ApiMember(Description="Field tier to compile: minimal | standard (default) | extended.") - public tier?: string; - - /** @description true = mark free-text fields (title, body, excerpt …) translatable for multilingual content. Default false. */ - // @DataMember - // @ApiMember(Description="true = mark free-text fields (title, body, excerpt …) translatable for multilingual content. Default false.") - public translatable: boolean; - - /** @description false = leave every collection as a draft instead of publishing v1. Default true. */ - // @DataMember - // @ApiMember(Description="false = leave every collection as a draft instead of publishing v1. Default true.") - public publish: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ApplyDatabaseSchemaBundleRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new ApplyDatabaseSchemaBundleResponse(); } -} - -/** @description Delete database schema (collection) */ -// @Route("/{version}/database/schemas/{Id}", "DELETE") -// @Api(Description="Delete database schema (collection)") -export class DeleteDatabaseSchemaRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id to delete, from get_database_schemas. */ - // @ApiMember(Description="Schema id to delete, from get_database_schemas.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteDatabaseSchemaRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Discards the working-copy draft of a database schema without publishing */ -// @Route("/{version}/database/schemas/{Id}/draft", "DELETE") -// @Api(Description="Discards the working-copy draft of a database schema without publishing") -// @DataContract -export class DiscardDatabaseSchemaDraftRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id whose draft to discard, from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id whose draft to discard, from get_database_schemas.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DiscardDatabaseSchemaDraftRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets database schema by id */ -// @Route("/{version}/database/schemas/{id}", "GET") -// @Api(Description="Gets database schema by id") -// @DataContract -export class GetDatabaseSchema extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - public id: string; - - /** @description Optional published version number to pin; omit for the latest published version. */ - // @DataMember(Name="version") - // @ApiMember(DataType="integer", Description="Optional published version number to pin; omit for the latest published version.", Name="version", ParameterType="query") - public version?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseSchema'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseSchemaResponse(); } -} - -/** @description Gets database schemas (collections) */ -// @Route("/{version}/database/schemas", "GET") -// @Api(Description="Gets database schemas (collections)") -export class GetDatabaseSchemas extends CodeMashListPaginationRequestBase implements IReturn -{ - public pagingArgs?: PagingArgs; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseSchemas'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseSchemasResponse(); } -} - -/** @description Gets the current draft of a database schema */ -// @Route("/{version}/database/schemas/{Id}/draft", "GET") -// @Api(Description="Gets the current draft of a database schema") -// @DataContract -export class GetDatabaseSchemaDraft extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseSchemaDraft'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseSchemaDraftResponse(); } -} - -/** @description Gets the Norbix index status of a database schema */ -// @Route("/{version}/database/schemas/{Id}/index-status", "GET") -// @Api(Description="Gets the Norbix index status of a database schema") -// @DataContract -export class GetDatabaseSchemaIndexStatus extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseSchemaIndexStatus'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseSchemaIndexStatusResponse(); } -} - -/** @description Gets database schema records-list display settings */ -// @Route("/{version}/database/schemas/{Id}/list-settings", "GET") -// @Api(Description="Gets database schema records-list display settings") -// @DataContract -export class GetDatabaseSchemaListSettings extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseSchemaListSettings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseSchemaListSettingsResponse(); } -} - -/** @description Structural diff between two published versions of a database schema */ -// @Route("/{version}/database/schemas/{Id}/versions/diff", "GET") -// @Api(Description="Structural diff between two published versions of a database schema") -// @DataContract -export class GetDatabaseSchemaVersionDiff extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - public id: string; - - /** @description Earlier published version number to diff from. Get valid values from get_database_schema_versions. */ - // @DataMember - // @ApiMember(DataType="integer", Description="Earlier published version number to diff from. Get valid values from get_database_schema_versions.", IsRequired=true) - public fromVersion: number; - - /** @description Later published version number to diff to. Get valid values from get_database_schema_versions. */ - // @DataMember - // @ApiMember(DataType="integer", Description="Later published version number to diff to. Get valid values from get_database_schema_versions.", IsRequired=true) - public toVersion: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseSchemaVersionDiff'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseSchemaVersionDiffResponse(); } -} - -/** @description Lists published version summaries for a database schema */ -// @Route("/{version}/database/schemas/{Id}/versions", "GET") -// @Api(Description="Lists published version summaries for a database schema") -// @DataContract -export class GetDatabaseSchemaVersions extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseSchemaVersions'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseSchemaVersionsResponse(); } -} - -// @Route("/{version}/database/schemas/{Id}/publish", "POST") -// @DataContract -export class PublishDatabaseSchemaRequest extends CodeMashRequestBase implements IReturn -{ - // @DataMember - public id: string; - - // @DataMember - public confirmed: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PublishDatabaseSchemaRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Renames a database schema (collection) */ -// @Route("/{version}/database/schemas/{Id}/rename", "PUT") -// @Api(Description="Renames a database schema (collection)") -// @DataContract -export class RenameDatabaseSchemaRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id to rename, from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id to rename, from get_database_schemas.", IsRequired=true) - public id: string; - - /** @description New human-entered title (e.g. "Company Employees"); the slug is derived server-side. */ - // @DataMember - // @ApiMember(Description="New human-entered title (e.g. \"Company Employees\"); the slug is derived server-side.", IsRequired=true) - public title: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RenameDatabaseSchemaRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/database/schemas", "POST") -// @DataContract -export class SaveDatabaseSchemaRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Empty to create a new schema; set to an existing schema id (from get_database_schemas) to update its draft. */ - // @DataMember - // @ApiMember(Description="Empty to create a new schema; set to an existing schema id (from get_database_schemas) to update its draft.") - public viewId?: string; - - /** @description Human-entered schema title (e.g. "Company Employees"); a slug is derived server-side. */ - // @DataMember - // @ApiMember(Description="Human-entered schema title (e.g. \"Company Employees\"); a slug is derived server-side.", IsRequired=true) - public schemaName: string; - - /** @description Raw JSON string matching the Norbix data meta-schema (https://norbix.ai/schemas/meta/v1.json). When unsure of the shape, read an existing schema with get_database_schema first. */ - // @DataMember - // @ApiMember(Description="Raw JSON string matching the Norbix data meta-schema (https://norbix.ai/schemas/meta/v1.json). When unsure of the shape, read an existing schema with get_database_schema first.") - public dataSchema?: string; - - /** @description OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json), describing the record form layout. If omitted or invalid, the backend auto-generates a flat-list form from the data schema; provide it to control the layout. */ - // @DataMember - // @ApiMember(Description="OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json), describing the record form layout. If omitted or invalid, the backend auto-generates a flat-list form from the data schema; provide it to control the layout.") - public visualSchema?: string; - - /** @description Optional schema-level settings (e.g. record validation behavior). */ - // @DataMember - // @ApiMember(Description="Optional schema-level settings (e.g. record validation behavior).") - public settings?: SchemaSettingsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveDatabaseSchemaRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Saves the working-copy draft of a database schema */ -// @Route("/{version}/database/schemas/{Id}/draft", "PUT") -// @Api(Description="Saves the working-copy draft of a database schema") -// @DataContract -export class UpdateDatabaseSchemaDraftRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id whose draft to replace, from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id whose draft to replace, from get_database_schemas.", IsRequired=true) - public id: string; - - /** @description Raw JSON string matching the Norbix data meta-schema (https://norbix.ai/schemas/meta/v1.json) for the draft's data schema. */ - // @DataMember - // @ApiMember(Description="Raw JSON string matching the Norbix data meta-schema (https://norbix.ai/schemas/meta/v1.json) for the draft's data schema.") - public dataSchema?: string; - - /** @description OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json) for the draft's record form. If omitted or empty (no field cell), the backend auto-generates a flat-list form from the data schema; a layout that fails the meta-schema is refused with the key named. */ - // @DataMember - // @ApiMember(Description="OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json) for the draft's record form. If omitted or empty (no field cell), the backend auto-generates a flat-list form from the data schema; a layout that fails the meta-schema is refused with the key named.") - public visualSchema?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateDatabaseSchemaDraftRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Saves a database schema's embed setting: which records go into the project's AI knowledge */ -// @Route("/{version}/database/schemas/{Id}/embed", "PUT") -// @Api(Description="Saves a database schema's embed setting: which records go into the project's AI knowledge") -// @DataContract -export class UpdateDatabaseSchemaEmbedRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id whose embed setting to save, from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id whose embed setting to save, from get_database_schemas.", IsRequired=true) - public id: string; - - /** @description The complete embed setting (full replace): enabled, fields, embeddingIntegrationId (empty = the project's default), perUser. */ - // @DataMember - // @ApiMember(Description="The complete embed setting (full replace): enabled, fields, embeddingIntegrationId (empty = the project's default), perUser.", IsRequired=true) - public embed: SchemaEmbedSettingsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateDatabaseSchemaEmbedRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates database schema records-list display settings */ -// @Route("/{version}/database/schemas/{Id}/list-settings", "PUT") -// @Api(Description="Updates database schema records-list display settings") -// @DataContract -export class UpdateDatabaseSchemaListSettingsRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id whose list settings to update, from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id whose list settings to update, from get_database_schemas.", IsRequired=true) - public id: string; - - /** @description The complete new list settings object (full replace). */ - // @DataMember - // @ApiMember(Description="The complete new list settings object (full replace).", IsRequired=true) - public settings: SchemaListSettingsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateDatabaseSchemaListSettingsRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Updates database schema settings */ -// @Route("/{version}/database/schemas/{Id}/settings", "PUT") -// @Api(Description="Updates database schema settings") -// @DataContract -export class UpdateDatabaseSchemaSettingsRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Schema id whose settings to update, from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id whose settings to update, from get_database_schemas.", IsRequired=true) - public id: string; - - /** @description The new schema settings object. */ - // @DataMember - // @ApiMember(Description="The new schema settings object.", IsRequired=true) - public settings: SchemaSettingsDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateDatabaseSchemaSettingsRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/aggregate", "POST") -// @Api(Description="Database") -export class AggregateRecords extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name to run the aggregation against. */ - // @ApiMember(Description="The collection (schema) name to run the aggregation against.", IsRequired=true) - public collectionName: string; - - public databaseIntegrationId?: string; - /** @description The aggregation pipeline as a MongoDB extended-JSON array of stages. */ - // @ApiMember(Description="The aggregation pipeline as a MongoDB extended-JSON array of stages.", IsRequired=true) - public pipeline: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AggregateRecords'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AggregateRecordsResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/{id}/responsibility", "PUT") -// @Api(Description="Database") -export class ChangeRecordResponsibility extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name the record lives in. */ - // @ApiMember(Description="The collection (schema) name the record lives in.", IsRequired=true) - public collectionName: string; - - /** @description The id of the record whose responsibility changes. */ - // @ApiMember(Description="The id of the record whose responsibility changes.", IsRequired=true) - public id: string; - - public databaseIntegrationId?: string; - /** @description The new responsible user (owner) id. */ - // @ApiMember(Description="The new responsible user (owner) id.", IsRequired=true) - public newResponsibleUserId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ChangeRecordResponsibility'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/count", "GET") -// @Api(Description="Database") -export class CountRecords extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name to count records in. */ - // @ApiMember(Description="The collection (schema) name to count records in.", IsRequired=true) - public collectionName: string; - - public databaseIntegrationId?: string; - /** @description Optional MongoDB extended-JSON filter. Empty means count all records. */ - // @ApiMember(Description="Optional MongoDB extended-JSON filter. Empty means count all records.") - public filter?: string; - - public schemaVersion?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CountRecords'; } - public getMethod() { return 'GET'; } - public createResponse() { return new CountRecordsResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/many", "DELETE") -// @Api(Description="Database") -export class DeleteManyRecords extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name the records live in. */ - // @ApiMember(Description="The collection (schema) name the records live in.", IsRequired=true) - public collectionName: string; - - public databaseIntegrationId?: string; - /** @description The match filter as a MongoDB extended-JSON document. Required. An empty object ({}) matches every record and is refused unless AllRecords is true. */ - // @ApiMember(Description="The match filter as a MongoDB extended-JSON document. Required. An empty object ({}) matches every record and is refused unless AllRecords is true.", IsRequired=true) - public filter: string; - - /** @description Set to true to delete EVERY record of the collection with an empty filter ({}). Without it an empty filter is refused (CM-ERRORS-DATABASE-037). */ - // @ApiMember(Description="Set to true to delete EVERY record of the collection with an empty filter ({}). Without it an empty filter is refused (CM-ERRORS-DATABASE-037).") - public allRecords?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteManyRecords'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/{id}", "DELETE") -// @Api(Description="Database") -export class DeleteRecord extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name the record lives in. */ - // @ApiMember(Description="The collection (schema) name the record lives in.", IsRequired=true) - public collectionName: string; - - /** @description The id of the record to delete. */ - // @ApiMember(Description="The id of the record to delete.", IsRequired=true) - public id: string; - - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteRecord'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/distinct", "GET") -// @Api(Description="Database") -export class DistinctRecordValues extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name to read from. */ - // @ApiMember(Description="The collection (schema) name to read from.", IsRequired=true) - public collectionName: string; - - public databaseIntegrationId?: string; - /** @description The document field (dotted path allowed) to get distinct values for, e.g. 'status'. */ - // @ApiMember(Description="The document field (dotted path allowed) to get distinct values for, e.g. 'status'.", IsRequired=true) - public field: string; - - /** @description Optional MongoDB extended-JSON filter. Empty means consider all records. */ - // @ApiMember(Description="Optional MongoDB extended-JSON filter. Empty means consider all records.") - public filter?: string; - - public schemaVersion?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DistinctRecordValues'; } - public getMethod() { return 'GET'; } - public createResponse() { return new DistinctRecordValuesResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/aggregates/{aggregateId}/execute", "POST") -// @Api(Description="Database") -export class ExecuteRecordsAggregate extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name to run the saved aggregation against. */ - // @ApiMember(Description="The collection (schema) name to run the saved aggregation against.", IsRequired=true) - public collectionName: string; - - /** @description The saved aggregate id (maggr_…) to execute. */ - // @ApiMember(Description="The saved aggregate id (maggr_…) to execute.", IsRequired=true) - public aggregateId: string; - - public databaseIntegrationId?: string; - /** @description Optional key/value substitutions for {TokenKey} placeholders in the saved pipeline. */ - // @ApiMember(Description="Optional key/value substitutions for {TokenKey} placeholders in the saved pipeline.") - public tokens?: { [index:string]: string; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ExecuteRecordsAggregate'; } - public getMethod() { return 'POST'; } - public createResponse() { return new ExecuteRecordsAggregateResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}", "GET") -// @Api(Description="Database") -export class FindRecords extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The collection (schema) name to read from. */ - // @ApiMember(Description="The collection (schema) name to read from.", IsRequired=true) - public collectionName: string; - - public databaseIntegrationId?: string; - /** @description Optional MongoDB extended-JSON filter. Empty means match all records. */ - // @ApiMember(Description="Optional MongoDB extended-JSON filter. Empty means match all records.") - public filter?: string; - - /** @description Optional contact id (ct_…) — only that contact's records are returned. */ - // @ApiMember(Description="Optional contact id (ct_…) — only that contact's records are returned.") - public contactId?: string; - - public schemaVersion?: number; - public pagingArgs?: PagingArgs; - public sortBy?: string; - public sortOrder?: number; - /** @description Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids. */ - // @ApiMember(Description="Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids.") - public expandReferences: boolean; - - public allLanguages: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FindRecords'; } - public getMethod() { return 'GET'; } - public createResponse() { return new FindRecordsResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/{id}", "GET") -// @Api(Description="Database") -export class FindOneRecord extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name to read from. */ - // @ApiMember(Description="The collection (schema) name to read from.", IsRequired=true) - public collectionName: string; - - /** @description The id of the record to fetch. */ - // @ApiMember(Description="The id of the record to fetch.", IsRequired=true) - public id: string; - - public databaseIntegrationId?: string; - /** @description Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids. */ - // @ApiMember(Description="Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids.") - public expandReferences: boolean; - - public allLanguages: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'FindOneRecord'; } - public getMethod() { return 'GET'; } - public createResponse() { return new FindOneRecordResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/indexes", "GET") -// @Api(Description="Database") -// @DataContract -export class GetCollectionIndexes extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name to inspect. */ - // @DataMember - // @ApiMember(Description="The collection (schema) name to inspect.", IsRequired=true) - public collectionName: string; - - // @DataMember - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetCollectionIndexes'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetCollectionIndexesResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/many", "POST") -// @Api(Description="Database") -export class InsertManyRecords extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name to insert into. */ - // @ApiMember(Description="The collection (schema) name to insert into.", IsRequired=true) - public collectionName: string; - - public databaseIntegrationId?: string; - /** @description The records to insert as a MongoDB extended-JSON array of documents. */ - // @ApiMember(Description="The records to insert as a MongoDB extended-JSON array of documents.", IsRequired=true) - public documents: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'InsertManyRecords'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}", "POST") -// @Api(Description="Database") -export class InsertRecord extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name to insert into. */ - // @ApiMember(Description="The collection (schema) name to insert into.", IsRequired=true) - public collectionName: string; - - public databaseIntegrationId?: string; - /** @description The record to insert, as a MongoDB extended-JSON document string. */ - // @ApiMember(Description="The record to insert, as a MongoDB extended-JSON document string.", IsRequired=true) - public document: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'InsertRecord'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/{id}/replace", "PUT") -// @Api(Description="Database") -export class ReplaceRecord extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name the record lives in. */ - // @ApiMember(Description="The collection (schema) name the record lives in.", IsRequired=true) - public collectionName: string; - - /** @description The id of the record to replace. */ - // @ApiMember(Description="The id of the record to replace.", IsRequired=true) - public id: string; - - public databaseIntegrationId?: string; - /** @description The replacement document as MongoDB extended-JSON. */ - // @ApiMember(Description="The replacement document as MongoDB extended-JSON.", IsRequired=true) - public replacement: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ReplaceRecord'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/seed", "POST") -// @Api(Description="Database") -export class SeedCollectionRecords extends CodeMashRequestBase implements IReturn -{ - /** @description Seeding mode: 'dummy' (server-generated sample data, default) or 'realistic' (caller-supplied documents). */ - // @ApiMember(Description="Seeding mode: 'dummy' (server-generated sample data, default) or 'realistic' (caller-supplied documents).") - public mode?: string; - - public databaseIntegrationId?: string; - /** @description JSON array of {collectionName, count?, documents?}. count applies to dummy mode (max 100 per collection); documents (extended-JSON objects, may contain $seedRef placeholders) apply to realistic mode. */ - // @ApiMember(Description="JSON array of {collectionName, count?, documents?}. count applies to dummy mode (max 100 per collection); documents (extended-JSON objects, may contain $seedRef placeholders) apply to realistic mode.", IsRequired=true) - public collections: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SeedCollectionRecords'; } - public getMethod() { return 'POST'; } - public createResponse() { return new SeedCollectionRecordsResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/many", "PUT") -// @Api(Description="Database") -export class UpdateManyRecords extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name the records live in. */ - // @ApiMember(Description="The collection (schema) name the records live in.", IsRequired=true) - public collectionName: string; - - public databaseIntegrationId?: string; - /** @description The match filter as a MongoDB extended-JSON document. An empty object ({}) matches every record and is refused unless AllRecords is true. */ - // @ApiMember(Description="The match filter as a MongoDB extended-JSON document. An empty object ({}) matches every record and is refused unless AllRecords is true.", IsRequired=true) - public filter: string; - - /** @description Set to true to update EVERY record of the collection with an empty filter ({}). Without it an empty filter is refused (CM-ERRORS-DATABASE-037). */ - // @ApiMember(Description="Set to true to update EVERY record of the collection with an empty filter ({}). Without it an empty filter is refused (CM-ERRORS-DATABASE-037).") - public allRecords?: boolean; - - /** @description The partial update document (applied with $set), as MongoDB extended-JSON. Dotted paths reach nested data: {"address.city":"Vilnius"}, {"lines.$[].qty":1}, or {"lines.$[line].qty":3} together with ArrayFilters. */ - // @ApiMember(Description="The partial update document (applied with $set), as MongoDB extended-JSON. Dotted paths reach nested data: {\"address.city\":\"Vilnius\"}, {\"lines.$[].qty\":1}, or {\"lines.$[line].qty\":3} together with ArrayFilters.", IsRequired=true) - public update: string; - - /** @description Optional MongoDB arrayFilters — a JSON array of filter documents, one per $[name] identifier used in the Update paths, e.g. [{"line.sku":"A-1"}] for {"lines.$[line].qty":3}. */ - // @ApiMember(Description="Optional MongoDB arrayFilters — a JSON array of filter documents, one per $[name] identifier used in the Update paths, e.g. [{\"line.sku\":\"A-1\"}] for {\"lines.$[line].qty\":3}.") - public arrayFilters?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateManyRecords'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/collections/{collectionName}/{id}", "PUT") -// @Api(Description="Database") -export class UpdateOneRecord extends CodeMashRequestBase implements IReturn -{ - /** @description The collection (schema) name the record lives in. */ - // @ApiMember(Description="The collection (schema) name the record lives in.", IsRequired=true) - public collectionName: string; - - /** @description The id of the record to update. */ - // @ApiMember(Description="The id of the record to update.", IsRequired=true) - public id: string; - - public databaseIntegrationId?: string; - /** @description The partial update document (applied with $set), as MongoDB extended-JSON. Dotted paths reach nested data: {"address.city":"Vilnius"}, {"lines.2.qty":3}, {"lines.$[].qty":1}, or {"lines.$[line].qty":3} together with ArrayFilters. */ - // @ApiMember(Description="The partial update document (applied with $set), as MongoDB extended-JSON. Dotted paths reach nested data: {\"address.city\":\"Vilnius\"}, {\"lines.2.qty\":3}, {\"lines.$[].qty\":1}, or {\"lines.$[line].qty\":3} together with ArrayFilters.", IsRequired=true) - public update: string; - - /** @description Optional MongoDB arrayFilters — a JSON array of filter documents, one per $[name] identifier used in the Update paths, e.g. [{"line.sku":"A-1"}] for {"lines.$[line].qty":3}. */ - // @ApiMember(Description="Optional MongoDB arrayFilters — a JSON array of filter documents, one per $[name] identifier used in the Update paths, e.g. [{\"line.sku\":\"A-1\"}] for {\"lines.$[line].qty\":3}.") - public arrayFilters?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateOneRecord'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete integration for particular project */ -// @Route("/{version}/database/integrations/{Id}", "DELETE") -// @Api(Description="Delete integration for particular project") -export class DeleteDatabaseIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Database integration id to delete, from get_database_integrations. */ - // @ApiMember(Description="Database integration id to delete, from get_database_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteDatabaseIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disable integration for particular project */ -// @Route("/{version}/database/integrations/{Id}/disable", "PUT") -// @Api(Description="Disable integration for particular project") -export class DisableDatabaseIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Database integration id to disable, from get_database_integrations. */ - // @ApiMember(Description="Database integration id to disable, from get_database_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableDatabaseIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Enable integration for particular project */ -// @Route("/{version}/database/integrations/{Id}/enable", "PUT") -// @Api(Description="Enable integration for particular project") -export class EnableDatabaseIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Database integration id to enable, from get_database_integrations. */ - // @ApiMember(Description="Database integration id to enable, from get_database_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableDatabaseIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets integration by specified Id */ -// @Route("/{version}/database/integrations/{id}", "GET") -// @Api(Description="Gets integration by specified Id") -export class GetDatabaseIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Database integration id from get_database_integrations. */ - // @ApiMember(Description="Database integration id from get_database_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseIntegrationResponse(); } -} - -/** @description Gets database integrations */ -// @Route("/{version}/database/integrations", "GET") -// @Api(Description="Gets database integrations") -export class GetDatabaseIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - public pagingArgs?: PagingArgs; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseIntegrationsResponse(); } -} - -/** @description Returns the Flex tiers this account is entitled to pick */ -// @Route("/{version}/database/integrations/flex-tiers", "GET") -// @Api(Description="Returns the Flex tiers this account is entitled to pick") -export class GetAllowedFlexTiers extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAllowedFlexTiers'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAllowedFlexTiersResponse(); } -} - -// @Route("/{version}/database/integrations/{Id}/connection-string", "GET") -export class RevealManagedFlexConnectionString extends CodeMashRequestBase implements IReturn -{ - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RevealManagedFlexConnectionString'; } - public getMethod() { return 'GET'; } - public createResponse() { return new RevealManagedFlexConnectionStringResponse(); } -} - -/** @description Saves database integration */ -// @Route("/{version}/database/integrations", "POST") -// @Api(Description="Saves database integration") -// @DataContract -export class SaveDatabaseIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: DatabaseIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveDatabaseIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Sets integration as default */ -// @Route("/{version}/database/integrations/{Id}/default", "PUT") -// @Api(Description="Sets integration as default") -export class SetDatabaseIntegrationAsDefaultRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Database integration id to set as default, from get_database_integrations. */ - // @ApiMember(Description="Database integration id to set as default, from get_database_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetDatabaseIntegrationAsDefaultRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Test database integration */ -// @Route("/{version}/database/integrations/test", "POST") -// @Api(Description="Test database integration") -export class TestDatabaseIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Database integration id to test, from get_database_integrations. */ - // @ApiMember(Description="Database integration id to test, from get_database_integrations.", IsRequired=true) - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestDatabaseIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestDatabaseIntegrationResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/imports", "POST") -// @Api(Description="Database") -export class CreateCollectionImport extends CodeMashRequestBase implements IReturn -{ - /** @description The uploaded CSV's file ref, from the upload call. */ - // @ApiMember(Description="The uploaded CSV's file ref, from the upload call.", IsRequired=true) - public file: FileResourceRefDto; - - /** @description The target schema id. */ - // @ApiMember(Description="The target schema id.", IsRequired=true) - public schemaId: string; - - /** @description The target collection (schema) name. */ - // @ApiMember(Description="The target collection (schema) name.", IsRequired=true) - public collectionName: string; - - public databaseIntegrationId?: string; - /** @description The CSV delimiter used at upload time. */ - // @ApiMember(Description="The CSV delimiter used at upload time.", IsRequired=true) - public delimiter: string; - - public hasHeader: boolean; - /** @description Column → property mapping, frozen for this import. */ - // @ApiMember(Description="Column → property mapping, frozen for this import.", IsRequired=true) - public mapping: ImportColumnMappingDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateCollectionImport'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/imports/{Id}", "DELETE") -// @Api(Description="Database") -export class DeleteCollectionImportRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The import id (imp_…). */ - // @ApiMember(Description="The import id (imp_…).", IsRequired=true) - public id: string; - - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteCollectionImportRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/imports/{Id}", "GET") -// @Api(Description="Database") -export class GetCollectionImport extends CodeMashRequestBase implements IReturn -{ - /** @description The import id (imp_…). */ - // @ApiMember(Description="The import id (imp_…).", IsRequired=true) - public id: string; - - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetCollectionImport'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetCollectionImportResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/imports", "GET") -// @Api(Description="Database") -export class GetCollectionImports extends CodeMashListPaginationRequestBase implements IReturn -{ - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetCollectionImports'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetCollectionImportsResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/imports/upload-url", "POST") -// @Api(Description="Database") -export class RequestImportUploadUrlRequest extends CodeMashRequestBase implements IReturn -{ - public fileAccountId?: string; - /** @description The original CSV file name, e.g. people.csv. */ - // @ApiMember(Description="The original CSV file name, e.g. people.csv.", IsRequired=true) - public fileName: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RequestImportUploadUrlRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RequestImportUploadUrlResponse(); } -} - -/** @description Database */ -// @Route("/{version}/database/imports/analyze", "POST") -// @Api(Description="Database") -export class AnalyzeImportFileRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The uploaded CSV's file ref, from the upload-url call. */ - // @ApiMember(Description="The uploaded CSV's file ref, from the upload-url call.", IsRequired=true) - public file: FileResourceRefDto; - - /** @description The CSV delimiter, e.g. "," or ";". */ - // @ApiMember(Description="The CSV delimiter, e.g. \",\" or \";\".", IsRequired=true) - public delimiter: string; - - /** @description Whether the first row is a header row. */ - // @ApiMember(Description="Whether the first row is a header row.") - public hasHeader: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AnalyzeImportFileRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AnalyzeImportFileResponse(); } -} - -/** @description Delete saved Mongo aggregation */ -// @Route("/{version}/database/aggregates/{Id}", "DELETE") -// @Api(Description="Delete saved Mongo aggregation") -// @DataContract -export class DeleteDatabaseAggregateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Aggregate id to delete, from get_database_aggregates. */ - // @DataMember - // @ApiMember(Description="Aggregate id to delete, from get_database_aggregates.", IsRequired=true) - public id: string; - - /** @description Schema id that owns this aggregate, from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id that owns this aggregate, from get_database_schemas.", IsRequired=true) - public schemaId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteDatabaseAggregateRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get saved Mongo aggregation by id */ -// @Route("/{version}/database/aggregates/{Id}", "GET") -// @Api(Description="Get saved Mongo aggregation by id") -export class GetDatabaseAggregate extends CodeMashRequestBase implements IReturn -{ - /** @description Aggregate id from get_database_aggregates. */ - // @ApiMember(Description="Aggregate id from get_database_aggregates.", IsRequired=true) - public id: string; - - /** @description Schema id that owns this aggregate, from get_database_schemas. */ - // @ApiMember(Description="Schema id that owns this aggregate, from get_database_schemas.", IsRequired=true) - public schemaId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseAggregate'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseAggregateResponse(); } -} - -/** @description Lists saved Mongo aggregations for a schema */ -// @Route("/{version}/database/aggregates", "GET") -// @Api(Description="Lists saved Mongo aggregations for a schema") -export class GetDatabaseAggregates extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Schema id whose saved aggregates to list, from get_database_schemas. */ - // @ApiMember(Description="Schema id whose saved aggregates to list, from get_database_schemas.", IsRequired=true) - public schemaId: string; - - public pagingArgs?: PagingArgs; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDatabaseAggregates'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDatabaseAggregatesResponse(); } -} - -/** @description Creates or updates a saved Mongo aggregation */ -// @Route("/{version}/database/aggregates", "POST") -// @Api(Description="Creates or updates a saved Mongo aggregation") -// @DataContract -export class SaveDatabaseAggregateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Empty to create a new saved aggregate; set to an existing aggregate id (from get_database_aggregates) to update it. */ - // @DataMember - // @ApiMember(Description="Empty to create a new saved aggregate; set to an existing aggregate id (from get_database_aggregates) to update it.") - public viewId?: string; - - /** @description Schema id that owns this aggregate, from get_database_schemas. */ - // @DataMember - // @ApiMember(Description="Schema id that owns this aggregate, from get_database_schemas.", IsRequired=true) - public schemaId: string; - - /** @description Human-readable display name for the saved aggregate. */ - // @DataMember - // @ApiMember(Description="Human-readable display name for the saved aggregate.", IsRequired=true) - public displayName: string; - - /** @description Optional free-text description of what the aggregate does. */ - // @DataMember - // @ApiMember(Description="Optional free-text description of what the aggregate does.") - public description?: string; - - /** @description MongoDB aggregation pipeline JSON, optionally containing {TokenKey} placeholders substituted at execute time. */ - // @DataMember - // @ApiMember(Description="MongoDB aggregation pipeline JSON, optionally containing {TokenKey} placeholders substituted at execute time.", IsRequired=true) - public pipeline: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveDatabaseAggregateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Test-run an aggregation pipeline with caller-supplied tokens */ -// @Route("/{version}/database/aggregates/test", "POST") -// @Api(Description="Test-run an aggregation pipeline with caller-supplied tokens") -// @DataContract -export class TestDatabaseAggregateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Optional database integration id. When omitted, the project's default database integration is used. */ - // @DataMember - // @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - public databaseIntegrationId?: string; - - /** @description Name of the collection (schema) to run the aggregation against. */ - // @DataMember - // @ApiMember(Description="Name of the collection (schema) to run the aggregation against.", IsRequired=true) - public collectionName: string; - - /** @description MongoDB aggregation pipeline JSON, optionally containing {TokenKey} placeholders to be substituted from tokens. */ - // @DataMember - // @ApiMember(Description="MongoDB aggregation pipeline JSON, optionally containing {TokenKey} placeholders to be substituted from tokens.", IsRequired=true) - public pipeline: string; - - /** @description Optional key/value substitutions for {TokenKey} placeholders in the pipeline. */ - // @DataMember - // @ApiMember(Description="Optional key/value substitutions for {TokenKey} placeholders in the pipeline.") - public tokens?: { [index:string]: string; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestDatabaseAggregateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestDatabaseAggregateResponse(); } -} - -// @Route("/{version}/files/disable", "PUT") -export class DisableFiles extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableFiles'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/files/enable", "PUT") -export class EnableFiles extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableFiles'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/files/triggers/{triggerId}", "DELETE") -// @DataContract -export class DeleteFilesTrigger extends DeleteTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteFilesTrigger'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/files/triggers/{triggerId}/disable", "PATCH") -// @DataContract -export class DisableFilesTrigger extends DisableTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableFilesTrigger'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/files/triggers/{triggerId}/enable", "PATCH") -// @DataContract -export class EnableFilesTrigger extends EnableTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableFilesTrigger'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets files trigger by specified Id */ -// @Route("/{version}/files/triggers/{id}", "GET") -// @Api(Description="Gets files trigger by specified Id") -export class GetFilesTrigger extends GetTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetFilesTrigger'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetFilesTriggerResponse(); } -} - -/** @description Gets files triggers */ -// @Route("/{version}/files/triggers", "GET") -// @Api(Description="Gets files triggers") -export class GetFilesTriggers extends GetTriggers implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetFilesTriggers'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetFilesTriggersResponse(); } -} - -// @Route("/{version}/files/triggers", "POST") -// @DataContract -export class SaveFilesTrigger extends SaveTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveFilesTrigger'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/files/item/private", "POST") -export class MakeFilePrivateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The files integration the file lives on. */ - // @ApiMember(Description="The files integration the file lives on.", IsRequired=true) - public filesIntegrationId: string; - - /** @description Path of the file, relative to the integration. */ - // @ApiMember(Description="Path of the file, relative to the integration.", IsRequired=true) - public path: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MakeFilePrivateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/files/item/public", "POST") -export class MakeFilePublicRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The files integration the file lives on. */ - // @ApiMember(Description="The files integration the file lives on.", IsRequired=true) - public filesIntegrationId: string; - - /** @description Path of the file to publish, relative to the integration. */ - // @ApiMember(Description="Path of the file to publish, relative to the integration.", IsRequired=true) - public path: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MakeFilePublicRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/files/folder/private", "POST") -export class MakeFolderPrivateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The files integration the folder lives on. */ - // @ApiMember(Description="The files integration the folder lives on.", IsRequired=true) - public filesIntegrationId: string; - - /** @description Folder prefix, relative to the integration. */ - // @ApiMember(Description="Folder prefix, relative to the integration.", IsRequired=true) - public path: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MakeFolderPrivateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/files/folder/public", "POST") -export class MakeFolderPublicRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The files integration the folder lives on. */ - // @ApiMember(Description="The files integration the folder lives on.", IsRequired=true) - public filesIntegrationId: string; - - /** @description Folder prefix to publish, relative to the integration. */ - // @ApiMember(Description="Folder prefix to publish, relative to the integration.", IsRequired=true) - public path: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MakeFolderPublicRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/files/integrations/{Id}", "DELETE") -export class DeleteFilesIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Files integration id to delete, from get_files_integrations. */ - // @ApiMember(Description="Files integration id to delete, from get_files_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteFilesIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/files/integrations/{Id}/disable", "PUT") -export class DisableFilesIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Files integration id to disable, from get_files_integrations. */ - // @ApiMember(Description="Files integration id to disable, from get_files_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableFilesIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/files/integrations/{Id}/enable", "PUT") -export class EnableFilesIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Files integration id to enable, from get_files_integrations. */ - // @ApiMember(Description="Files integration id to enable, from get_files_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableFilesIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets integration by specified Id */ -// @Route("/{version}/files/integrations/{id}", "GET") -// @Api(Description="Gets integration by specified Id") -export class GetFilesIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Files integration id to fetch, from get_files_integrations. */ - // @ApiMember(Description="Files integration id to fetch, from get_files_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetFilesIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetFilesIntegrationResponse(); } -} - -/** @description Gets integrations */ -// @Route("/{version}/files/integrations", "GET") -// @Api(Description="Gets integrations") -export class GetFilesIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetFilesIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetFilesIntegrationsResponse(); } -} - -// @Route("/{version}/files/integrations", "POST") -// @DataContract -export class SaveFilesIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: FilesIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveFilesIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/files/integrations/{Id}/default", "PUT") -export class SetFilesIntegrationAsDefaultRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Files integration id to set as default, from get_files_integrations. */ - // @ApiMember(Description="Files integration id to set as default, from get_files_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetFilesIntegrationAsDefaultRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/files/integrations/test", "POST") -export class TestFilesIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Integration id, from get_files_integrations. */ - // @ApiMember(Description="Integration id, from get_files_integrations.", IsRequired=true) - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestFilesIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestFilesIntegrationResponse(); } -} - -// @Route("/{version}/files/item", "GET") -export class GetFile extends CodeMashRequestBase implements IReturn -{ - /** @description The files integration id to read from, from get_files_integrations. */ - // @ApiMember(Description="The files integration id to read from, from get_files_integrations.", IsRequired=true) - public filesIntegrationId: string; - - /** @description The path of the file to fetch metadata for. */ - // @ApiMember(Description="The path of the file to fetch metadata for.", IsRequired=true) - public path: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetFile'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetFileResponse(); } -} - -// @Route("/{version}/files/item/by-id", "GET") -export class GetFileById extends CodeMashRequestBase implements IReturn -{ - /** @description The files integration id to read from, from get_files_integrations. */ - // @ApiMember(Description="The files integration id to read from, from get_files_integrations.", IsRequired=true) - public filesIntegrationId: string; - - /** @description The file id — nbfl_… as the Files endpoints return it, or its bare UUID. */ - // @ApiMember(Description="The file id — nbfl_… as the Files endpoints return it, or its bare UUID.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetFileById'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetFileByIdResponse(); } -} - -// @Route("/{version}/files/folder", "GET") -export class GetFolderFiles extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The files integration id to list from, from get_files_integrations. */ - // @ApiMember(Description="The files integration id to list from, from get_files_integrations.", IsRequired=true) - public filesIntegrationId: string; - - /** @description Path prefix to list. Empty / null lists the root. */ - // @ApiMember(Description="Path prefix to list. Empty / null lists the root.") - public path?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetFolderFiles'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetFolderFilesResponse(); } -} - -// @Route("/{version}/files/item/use", "POST") -export class UseFileRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The files integration the file lives on. */ - // @ApiMember(Description="The files integration the file lives on.", IsRequired=true) - public filesIntegrationId: string; - - /** @description Path of the file, relative to the integration. */ - // @ApiMember(Description="Path of the file, relative to the integration.", IsRequired=true) - public path: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UseFileRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Disable email service */ -// @Route("/{version}/notifications/email/disable", "PUT") -// @Api(Description="Disable email service") -export class DisableEmail extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableEmail'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get email disable dependencies */ -// @Route("/{version}/notifications/email/disable-dependencies", "GET") -// @Api(Description="Get email disable dependencies") -export class GetEmailDisableDependencies extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailDisableDependencies'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetNotificationModuleDisableDependenciesResponse(); } -} - -/** @description Enable email service */ -// @Route("/{version}/notifications/email/enable", "PUT") -// @Api(Description="Enable email service") -export class EnableEmail extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableEmail'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/notifications/email/validation/integrations", "POST") -// @DataContract -export class SaveEmailValidationIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: EmailValidationIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveEmailValidationIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/notifications/email/validation/integrations/test", "POST") -export class TestEmailValidationIntegration extends CodeMashRequestBase implements IReturn -{ - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestEmailValidationIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestEmailValidationIntegrationResponse(); } -} - -/** @description Attach a file to an email template */ -// @Route("/{version}/notifications/email/templates/attachments", "POST") -// @Api(Description="Attach a file to an email template") -export class AttachFileToTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Optional language code to scope the attachment to a single translation. Omit to attach at the template level. */ - // @ApiMember(Description="Optional language code to scope the attachment to a single translation. Omit to attach at the template level.") - public language?: string; - - /** @description The email template id to attach the file to. Get it from get_email_templates. */ - // @ApiMember(Description="The email template id to attach the file to. Get it from get_email_templates.", IsRequired=true) - public templateId: string; - - /** @description The file resource reference to attach (from a prior file upload). */ - // @ApiMember(Description="The file resource reference to attach (from a prior file upload).", IsRequired=true) - public fileRef: FileResourceRefDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AttachFileToTemplateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Create an email template */ -// @Route("/{version}/notifications/email/templates", "POST") -// @Api(Description="Create an email template") -export class CreateEmailTemplateRequest extends SaveEmailTemplate implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateEmailTemplateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Delete an email template */ -// @Route("/{version}/notifications/email/templates/{Id}", "DELETE") -// @Api(Description="Delete an email template") -export class DeleteEmailTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The email template id to delete. Get it from get_email_templates. */ - // @ApiMember(Description="The email template id to delete. Get it from get_email_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteEmailTemplateRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get an email template */ -// @Route("/{version}/notifications/email/templates/{id}", "GET") -// @Api(Description="Get an email template") -export class GetEmailTemplate extends CodeMashRequestBase implements IReturn -{ - /** @description The email template id to fetch. Get it from get_email_templates. */ - // @ApiMember(Description="The email template id to fetch. Get it from get_email_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailTemplate'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailTemplateResponse(); } -} - -/** @description Gets email templates */ -// @Route("/{version}/notifications/email/templates", "GET") -// @Api(Description="Gets email templates") -export class GetEmailTemplates extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Set true to include archived templates. */ - // @ApiMember(Description="Set true to include archived templates.") - public showArchived?: boolean; - - /** @description Optional: return only the template with this id. */ - // @ApiMember(Description="Optional: return only the template with this id.") - public templateId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailTemplates'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailTemplatesResponse(); } -} - -/** @description Render MJML email template */ -// @Route("/{version}/notifications/email/templates/mjml", "POST") -// @Api(Description="Render MJML email template") -export class GetMjml extends CodeMashRequestBase implements IReturn -{ - /** @description The MJML/Razor template source code to render. */ - // @ApiMember(Description="The MJML/Razor template source code to render.", IsRequired=true) - public code: string; - - /** @description Optional token values to bind into the template while rendering. */ - // @ApiMember(Description="Optional token values to bind into the template while rendering.") - public tokens?: TokenMappingDto[]; - - /** @description Set true when rendering for a preview (vs. a final save), to affect how missing tokens are handled. */ - // @ApiMember(Description="Set true when rendering for a preview (vs. a final save), to affect how missing tokens are handled.") - public isForPreview: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMjml'; } - public getMethod() { return 'POST'; } - public createResponse() { return new GetHtmlFromMjmlResponse(); } -} - -/** @description Get a system email template */ -// @Route("/{version}/notifications/email/system-templates/{id}", "GET") -// @Api(Description="Get a system email template") -export class GetSystemEmailTemplate extends CodeMashRequestBase implements IReturn -{ - /** @description The system email template id to fetch. Get it from get_system_email_templates. */ - // @ApiMember(Description="The system email template id to fetch. Get it from get_system_email_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSystemEmailTemplate'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSystemEmailTemplateResponse(); } -} - -/** @description Get system email templates */ -// @Route("/{version}/notifications/email/system-templates", "GET") -// @Api(Description="Get system email templates") -export class GetSystemEmailTemplates extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Optional group tags to filter templates by (e.g. newsletter, onboarding). */ - // @ApiMember(Description="Optional group tags to filter templates by (e.g. newsletter, onboarding).") - public groupTags?: string[]; - - /** @description Optional visual themes to filter templates by. */ - // @ApiMember(Description="Optional visual themes to filter templates by.") - public themes?: string[]; - - /** @description Optional communication channel to filter templates by (e.g. Transactional, Marketing). */ - // @ApiMember(Description="Optional communication channel to filter templates by (e.g. Transactional, Marketing).") - public communicationChannel?: CommunicationChannel; - - /** @description Optional trigger type to filter templates that are designed for a specific automated trigger. */ - // @ApiMember(Description="Optional trigger type to filter templates that are designed for a specific automated trigger.") - public forTrigger?: TriggerType; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSystemEmailTemplates'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSystemEmailTemplatesResponse(); } -} - -/** @description Gets the tokens used by an email template */ -// @Route("/{version}/notifications/email/templates/{id}/tokens", "GET") -// @Api(Description="Gets the tokens used by an email template") -export class GetEmailTemplateAvailableTokens extends CodeMashRequestBase implements IReturn -{ - /** @description Template id from get_email_templates. */ - // @ApiMember(Description="Template id from get_email_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailTemplateAvailableTokens'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailTemplateAvailableTokensResponse(); } -} - -/** @description Update an email template */ -// @Route("/{version}/notifications/email/templates", "PUT") -// @Api(Description="Update an email template") -export class UpdateEmailTemplateRequest extends SaveEmailTemplate implements IReturn -{ - /** @description The email template id to update. Get it from get_email_templates. */ - // @ApiMember(Description="The email template id to update. Get it from get_email_templates.", IsRequired=true) - public viewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateEmailTemplateRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete an email signature */ -// @Route("/{version}/notifications/email/signatures/{id}", "DELETE") -// @Api(Description="Delete an email signature") -export class DeleteEmailSignature extends CodeMashRequestBase implements IReturn -{ - /** @description The email signature id to delete. Get it from get_email_signatures. */ - // @ApiMember(Description="The email signature id to delete. Get it from get_email_signatures.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteEmailSignature'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get an email signature */ -// @Route("/{version}/notifications/email/signatures/{id}", "GET") -// @Api(Description="Get an email signature") -export class GetEmailSignature extends CodeMashRequestBase implements IReturn -{ - /** @description The email signature id to fetch. Get it from get_email_signatures. */ - // @ApiMember(Description="The email signature id to fetch. Get it from get_email_signatures.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailSignature'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailSignatureResponse(); } -} - -/** @description Get email signatures */ -// @Route("/{version}/notifications/email/signatures", "GET") -// @Api(Description="Get email signatures") -export class GetEmailSignatures extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailSignatures'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailSignaturesResponse(); } -} - -/** @description Save an email signature */ -// @Route("/{version}/notifications/email/signatures", "POST") -// @Api(Description="Save an email signature") -export class SaveEmailSignatureRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The signature id to update. Omit to create a new signature. Get it from get_email_signatures. */ - // @ApiMember(Description="The signature id to update. Omit to create a new signature. Get it from get_email_signatures.") - public viewId?: string; - - /** @description The display name of the signature. */ - // @ApiMember(Description="The display name of the signature.", IsRequired=true) - public displayName: string; - - /** @description The per-language content translations for this signature. */ - // @ApiMember(Description="The per-language content translations for this signature.", IsRequired=true) - public translations: TranslationDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveEmailSignatureRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Get email settings */ -// @Route("/{version}/notifications/email/settings", "GET") -// @Api(Description="Get email settings") -export class GetEmailSettings extends CodeMashRequestBase implements IReturn -{ - /** @description Unused legacy field; leave empty. */ - // @ApiMember(Description="Unused legacy field; leave empty.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailSettings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailSettingsResponse(); } -} - -/** @description Confirm human delivery of a test email */ -// @Route("/{version}/notifications/email/integrations/confirm-human-delivery", "POST") -// @Api(Description="Confirm human delivery of a test email") -// @DataContract -export class ConfirmEmailIntegrationHumanDeliveryRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The email integration id the test delivery was confirmed for. Get it from get_email_integrations. */ - // @DataMember - // @ApiMember(Description="The email integration id the test delivery was confirmed for. Get it from get_email_integrations.", IsRequired=true) - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ConfirmEmailIntegrationHumanDeliveryRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete an email integration */ -// @Route("/{version}/notifications/email/integrations/{Id}", "DELETE") -// @Api(Description="Delete an email integration") -export class DeleteEmailIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The email integration id to delete. Get it from get_email_integrations. */ - // @ApiMember(Description="The email integration id to delete. Get it from get_email_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteEmailIntegration'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disable an email integration */ -// @Route("/{version}/notifications/email/integrations/{Id}/disable", "PUT") -// @Api(Description="Disable an email integration") -export class DisableEmailIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The email integration id to disable. Get it from get_email_integrations. */ - // @ApiMember(Description="The email integration id to disable. Get it from get_email_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableEmailIntegration'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Check email integration domain health */ -// @Route("/{version}/notifications/email/integrations/domain-health", "POST") -// @Api(Description="Check email integration domain health") -// @DataContract -export class CheckEmailIntegrationDomainHealthRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The email integration id to check DNS health for. Get it from get_email_integrations. */ - // @DataMember - // @ApiMember(Description="The email integration id to check DNS health for. Get it from get_email_integrations.", IsRequired=true) - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CheckEmailIntegrationDomainHealthRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new CheckEmailIntegrationDomainHealthResponse(); } -} - -/** @description Enable an email integration */ -// @Route("/{version}/notifications/email/integrations/{Id}/enable", "PUT") -// @Api(Description="Enable an email integration") -export class EnableEmailIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The email integration id to enable. Get it from get_email_integrations. */ - // @ApiMember(Description="The email integration id to enable. Get it from get_email_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableEmailIntegration'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get an email integration */ -// @Route("/{version}/notifications/email/integrations/{id}", "GET") -// @Api(Description="Get an email integration") -export class GetEmailIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The email integration id to fetch. Get it from get_email_integrations. */ - // @ApiMember(Description="The email integration id to fetch. Get it from get_email_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailIntegrationResponse(); } -} - -/** @description Gets email integrations */ -// @Route("/{version}/notifications/email/integrations", "GET") -// @Api(Description="Gets email integrations") -export class GetEmailIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailIntegrationsResponse(); } -} - -// @Route("/{version}/notifications/email/integrations", "POST") -// @DataContract -export class SaveEmailIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: EmailIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveEmailIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Set an email integration as default */ -// @Route("/{version}/notifications/email/integrations/{Id}/default", "PUT") -// @Api(Description="Set an email integration as default") -export class SetEmailsIntegrationAsDefault extends CodeMashRequestBase implements IReturn -{ - /** @description The email integration id to set as default. Get it from get_email_integrations. */ - // @ApiMember(Description="The email integration id to set as default. Get it from get_email_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetEmailsIntegrationAsDefault'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Test an email integration */ -// @Route("/{version}/notifications/email/integrations/test", "POST") -// @Api(Description="Test an email integration") -export class TestEmailIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The email integration id to test. Get it from get_email_integrations. */ - // @ApiMember(Description="The email integration id to test. Get it from get_email_integrations.", IsRequired=true) - public integrationId: string; - - /** @description The recipient email address to send the test email to. */ - // @ApiMember(Description="The recipient email address to send the test email to.", IsRequired=true) - public to: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestEmailIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestEmailIntegrationResponse(); } -} - -/** @description Archive an email template */ -// @Route("/{version}/notifications/email/templates/{Id}/archive", "PUT") -// @Api(Description="Archive an email template") -export class ArchiveEmailTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The email template id to archive. Get it from get_email_templates. */ - // @ApiMember(Description="The email template id to archive. Get it from get_email_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ArchiveEmailTemplateRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Clone an email template */ -// @Route("/{version}/notifications/email/templates/{Id}/clone", "POST") -// @Api(Description="Clone an email template") -export class CloneEmailTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The email template id to clone. Get it from get_email_templates. */ - // @ApiMember(Description="The email template id to clone. Get it from get_email_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CloneEmailTemplateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Un-archive an email template */ -// @Route("/{version}/notifications/email/templates/{Id}/unarchive", "PUT") -// @Api(Description="Un-archive an email template") -export class UnArchiveEmailTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The email template id to unarchive. Get it from get_email_templates. */ - // @ApiMember(Description="The email template id to unarchive. Get it from get_email_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UnArchiveEmailTemplateRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete an email footer */ -// @Route("/{version}/notifications/email/footers/{id}", "DELETE") -// @Api(Description="Delete an email footer") -export class DeleteEmailFooter extends CodeMashRequestBase implements IReturn -{ - /** @description The email footer id to delete. Get it from get_email_footers. */ - // @ApiMember(Description="The email footer id to delete. Get it from get_email_footers.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteEmailFooter'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get an email footer */ -// @Route("/{version}/notifications/email/footers/{id}", "GET") -// @Api(Description="Get an email footer") -export class GetEmailFooter extends CodeMashRequestBase implements IReturn -{ - /** @description The email footer id to fetch. Get it from get_email_footers. */ - // @ApiMember(Description="The email footer id to fetch. Get it from get_email_footers.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailFooter'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailFooterResponse(); } -} - -/** @description Get email footers */ -// @Route("/{version}/notifications/email/footers", "GET") -// @Api(Description="Get email footers") -export class GetEmailFooters extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailFooters'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailFootersResponse(); } -} - -/** @description Save an email footer */ -// @Route("/{version}/notifications/email/footers", "POST") -// @Api(Description="Save an email footer") -export class SaveEmailFooterRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The footer id to update. Omit to create a new footer. Get it from get_email_footers. */ - // @ApiMember(Description="The footer id to update. Omit to create a new footer. Get it from get_email_footers.") - public viewId?: string; - - /** @description The display name of the footer. */ - // @ApiMember(Description="The display name of the footer.", IsRequired=true) - public displayName: string; - - /** @description The per-language content translations for this footer. */ - // @ApiMember(Description="The per-language content translations for this footer.", IsRequired=true) - public translations: TranslationDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveEmailFooterRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description This endpoint implements the RFC 8058 one-click unsubscribe flow used by mailbox providers. */ -// @Route("/{version}/email/one-click-unsubscribe", "POST") -// @Api(Description="This endpoint implements the RFC 8058 one-click unsubscribe flow used by mailbox providers.") -// @DataContract -export class OneClickUnsubscribeRequest extends RequestBase implements IReturn -{ - /** @description Encrypted unsubscribe token. The campaign batcher embedded this value in the List-Unsubscribe header. */ - // @DataMember - // @ApiMember(Description="Encrypted unsubscribe token. The campaign batcher embedded this value in the List-Unsubscribe header.", IsRequired=true, Name="token", ParameterType="query") - public token: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'OneClickUnsubscribeRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Read the marketing e-mail preferences of the person a signed unsubscribe link belongs to. No sign-in: the link is the key. */ -// @Route("/{version}/email/preferences", "GET") -// @Api(Description="Read the marketing e-mail preferences of the person a signed unsubscribe link belongs to. No sign-in: the link is the key.") -// @DataContract -export class GetEmailPreferencesByLinkRequest extends RequestBase implements IReturn -{ - /** @description The signed unsubscribe link token from the e-mail's Preferences or Unsubscribe link. */ - // @DataMember - // @ApiMember(Description="The signed unsubscribe link token from the e-mail's Preferences or Unsubscribe link.", IsRequired=true, Name="token", ParameterType="query") - public token: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailPreferencesByLinkRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailPreferencesByLinkResponse(); } -} - -/** @description Create email campaign */ -// @Route("/{version}/notifications/email/campaigns", "POST") -// @Api(Description="Create email campaign") -// @DataContract -export class CreateEmailCampaignRequest extends CodeMashRequestBase implements IReturn -{ - // @DataMember - public campaign: EmailCampaignRequest; - - // @DataMember - public databaseIntegrationId?: string; - - /** @description Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now. */ - // @DataMember - // @ApiMember(Description="Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now.") - public sendNow?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateEmailCampaignRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Deletes emails campaign from queue */ -// @Route("/{version}/notifications/email/campaigns/{Id}", "DELETE") -// @Api(Description="Deletes emails campaign from queue") -// @DataContract -export class DeleteEmailCampaignRequest extends CodeMashRequestBase implements IReturn -{ - // @DataMember - public id: string; - - // @DataMember - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteEmailCampaignRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets email campaign by id */ -// @Route("/{version}/notifications/email/campaigns/{id}", "GET") -// @Api(Description="Gets email campaign by id") -export class GetEmailCampaign extends CodeMashRequestBase implements IReturn -{ - /** @description The campaign id. */ - // @ApiMember(Description="The campaign id.") - public id: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailCampaign'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailCampaignResponse(); } -} - -/** @description Gets email campaigns */ -// @Route("/{version}/notifications/email/campaigns", "GET") -// @Api(Description="Gets email campaigns") -export class GetEmailCampaigns extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Optional. When omitted, the project's default database integration is used (resolved server-side from the project state). */ - // @ApiMember(Description="Optional. When omitted, the project's default database integration is used (resolved server-side from the project state).") - public databaseIntegrationId?: string; - - /** @description Optional: return only the campaign with this id. */ - // @ApiMember(Description="Optional: return only the campaign with this id.") - public campaignId?: string; - - /** @description Optional: only campaigns that targeted this email address. */ - // @ApiMember(Description="Optional: only campaigns that targeted this email address.") - public emailAddress?: string; - - /** @description Optional: only campaigns built on this email template id. */ - // @ApiMember(Description="Optional: only campaigns built on this email template id.") - public templateId?: string; - - /** @description Optional lower bound for the campaign time, unix timestamp in seconds (UTC). */ - // @ApiMember(Description="Optional lower bound for the campaign time, unix timestamp in seconds (UTC).") - public from?: number; - - /** @description Optional upper bound for the campaign time, unix timestamp in seconds (UTC). */ - // @ApiMember(Description="Optional upper bound for the campaign time, unix timestamp in seconds (UTC).") - public to?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailCampaigns'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailCampaignsResponse(); } -} - -/** @description Get email campaign batches */ -// @Route("/{version}/notifications/email/campaigns/{id}/batches", "GET") -// @Api(Description="Get email campaign batches") -export class GetEmailCampaignBatches extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The email campaign id to list batches for. Get it from get_email_campaigns. */ - // @ApiMember(Description="The email campaign id to list batches for. Get it from get_email_campaigns.", IsRequired=true) - public id: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - /** @description Optional batch id to filter to a single batch. Get it from a prior call to this tool. */ - // @ApiMember(Description="Optional batch id to filter to a single batch. Get it from a prior call to this tool.") - public batchId?: string; - - /** @description Optional recipient email address to filter batches by. */ - // @ApiMember(Description="Optional recipient email address to filter batches by.") - public emailAddress?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailCampaignBatches'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailCampaignBatchesResponse(); } -} - -/** @description Get an email campaign batch notification */ -// @Route("/{version}/notifications/email/campaigns/{id}/batches/{batchId}/{notificationId}", "GET") -// @Api(Description="Get an email campaign batch notification") -export class GetEmailCampaignBatchNotification extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The email campaign id. Get it from get_email_campaigns. */ - // @ApiMember(Description="The email campaign id. Get it from get_email_campaigns.", IsRequired=true) - public id: string; - - /** @description The campaign batch id. Get it from get_email_campaign_batches. */ - // @ApiMember(Description="The campaign batch id. Get it from get_email_campaign_batches.", IsRequired=true) - public batchId: string; - - /** @description The notification id within the batch. Get it from get_email_campaign_batch_notifications. */ - // @ApiMember(Description="The notification id within the batch. Get it from get_email_campaign_batch_notifications.", IsRequired=true) - public notificationId: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailCampaignBatchNotification'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailCampaignBatchNotificationResponse(); } -} - -/** @description Get email campaign batch notifications */ -// @Route("/{version}/notifications/email/campaigns/{id}/batches/{batchId}", "GET") -// @Api(Description="Get email campaign batch notifications") -export class GetEmailCampaignBatchNotifications extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The email campaign id. Get it from get_email_campaigns. */ - // @ApiMember(Description="The email campaign id. Get it from get_email_campaigns.", IsRequired=true) - public id: string; - - /** @description The campaign batch id to list notifications for. Get it from get_email_campaign_batches. */ - // @ApiMember(Description="The campaign batch id to list notifications for. Get it from get_email_campaign_batches.", IsRequired=true) - public batchId: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailCampaignBatchNotifications'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailCampaignBatchNotificationsResponse(); } -} - -/** @description Get email campaign statistics */ -// @Route("/{version}/notifications/email/campaigns/{id}/stats", "GET") -// @Api(Description="Get email campaign statistics") -export class GetEmailCampaignStatistics extends CodeMashRequestBase implements IReturn -{ - /** @description The email campaign id to get statistics for. Get it from get_email_campaigns. */ - // @ApiMember(Description="The email campaign id to get statistics for. Get it from get_email_campaigns.", IsRequired=true) - public id: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailCampaignStatistics'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailCampaignStatisticsResponse(); } -} - -/** @description Preview an email notification */ -// @Route("/{version}/notifications/email/preview", "GET") -// @Api(Description="Preview an email notification") -export class PreviewEmailNotification extends RequestBase implements IReturn -{ - /** @description The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending). */ - // @ApiMember(Description="The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending).") - public hash: string; - - /** @description Signed-in preview by id: the project id. With a hash it must match the hash. */ - // @ApiMember(Description="Signed-in preview by id: the project id. With a hash it must match the hash.") - public projectId?: string; - - /** @description Signed-in preview by id: the notification id (needs email:read). With a hash it must match the hash. */ - // @ApiMember(Description="Signed-in preview by id: the notification id (needs email:read). With a hash it must match the hash.") - public notificationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PreviewEmailNotification'; } - public getMethod() { return 'GET'; } - public createResponse() { return new PreviewEmailNotificationResponse(); } -} - -/** @description Stops a running email campaign */ -// @Route("/{version}/notifications/email/campaigns/{Id}/stop", "POST") -// @Api(Description="Stops a running email campaign") -// @DataContract -export class StopEmailCampaignRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The campaign id to stop. */ - // @DataMember - // @ApiMember(Description="The campaign id to stop.") - public id: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @DataMember - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'StopEmailCampaignRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get email campaign messages */ -// @Route("/{version}/notifications/emails/campaigns/{campaignId}/messages", "GET") -// @Api(Description="Get email campaign messages") -export class GetEmailCampaignMessagesRequest extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The email campaign id. Get it from get_email_campaigns. */ - // @ApiMember(Description="The email campaign id. Get it from get_email_campaigns.", IsRequired=true) - public campaignId: string; - - /** @description The campaign batch id to list messages for. Get it from get_email_campaign_batches. */ - // @ApiMember(Description="The campaign batch id to list messages for. Get it from get_email_campaign_batches.", IsRequired=true) - public campaignBatchId: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmailCampaignMessagesRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmailCampaignMessagesResponse(); } -} - -/** @description Disable SMS service */ -// @Route("/{version}/notifications/sms/disable", "PUT") -// @Api(Description="Disable SMS service") -export class DisableSms extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableSms'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Lists SMS-module dependencies shown before disable */ -// @Route("/{version}/notifications/sms/disable-dependencies", "GET") -// @Api(Description="Lists SMS-module dependencies shown before disable") -export class GetSmsDisableDependencies extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsDisableDependencies'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetNotificationModuleDisableDependenciesResponse(); } -} - -/** @description Enable SMS service */ -// @Route("/{version}/notifications/sms/enable", "PUT") -// @Api(Description="Enable SMS service") -export class EnableSms extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableSms'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Archives sms template */ -// @Route("/{version}/notifications/sms/templates/{Id}/archive", "PUT") -// @Api(Description="Archives sms template") -export class ArchiveSmsTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS template id to archive. Get it from get_sms_templates. */ - // @ApiMember(Description="The SMS template id to archive. Get it from get_sms_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ArchiveSmsTemplateRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Clones sms template */ -// @Route("/{version}/notifications/sms/templates/{Id}/clone", "POST") -// @Api(Description="Clones sms template") -export class CloneSmsTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS template id to clone. Get it from get_sms_templates. */ - // @ApiMember(Description="The SMS template id to clone. Get it from get_sms_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CloneSmsTemplateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Create SMS template */ -// @Route("/{version}/notifications/sms/templates", "POST") -// @Api(Description="Create SMS template") -export class CreateSmsTemplateRequest extends SaveSmsTemplate implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateSmsTemplateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Delete Sms Template for particular project */ -// @Route("/{version}/notifications/sms/templates/{Id}", "DELETE") -// @Api(Description="Delete Sms Template for particular project") -export class DeleteSmsTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS template id to delete. Get it from get_sms_templates. */ - // @ApiMember(Description="The SMS template id to delete. Get it from get_sms_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteSmsTemplateRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets sms template by id */ -// @Route("/{version}/notifications/sms/templates/{id}", "GET") -// @Api(Description="Gets sms template by id") -export class GetSmsTemplate extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS template id to fetch. Get it from get_sms_templates. */ - // @ApiMember(Description="The SMS template id to fetch. Get it from get_sms_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsTemplate'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsTemplateResponse(); } -} - -/** @description Gets sms templates */ -// @Route("/{version}/notifications/sms/templates", "GET") -// @Api(Description="Gets sms templates") -export class GetSmsTemplates extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Set true to include archived templates. */ - // @ApiMember(Description="Set true to include archived templates.") - public showArchived?: boolean; - - /** @description Optional: return only the template with this id. */ - // @ApiMember(Description="Optional: return only the template with this id.") - public templateId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsTemplates'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsTemplatesResponse(); } -} - -/** @description Goes through the Sms template and returns all the tokens that are used in the template translations */ -// @Route("/{version}/notifications/sms/templates/{id}/tokens", "GET") -// @Api(Description="Goes through the Sms template and returns all the tokens that are used in the template translations") -export class GetSmsMessageContentTokens extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS template id. Get it from get_sms_templates. */ - // @ApiMember(Description="The SMS template id. Get it from get_sms_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsMessageContentTokens'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsMessageContentTokensResponse(); } -} - -/** @description Runs the SMS Razor template, returns the bound text or the list of unresolved tokens. */ -// @Route("/{version}/notifications/sms/templates/render", "POST") -// @Api(Description="Runs the SMS Razor template, returns the bound text or the list of unresolved tokens.") -export class RenderSms extends CodeMashRequestBase implements IReturn -{ - /** @description The Razor SMS template code to render. */ - // @ApiMember(Description="The Razor SMS template code to render.") - public code: string; - - /** @description Token name/value pairs to bind into the template. */ - // @ApiMember(Description="Token name/value pairs to bind into the template.") - public tokens?: TokenMappingDto[]; - - /** @description Set true when rendering for a preview (relaxes some validation). */ - // @ApiMember(Description="Set true when rendering for a preview (relaxes some validation).") - public isForPreview: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RenderSms'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RenderSmsTextResponse(); } -} - -/** @description Un-archives sms template */ -// @Route("/{version}/notifications/sms/templates/{Id}/unarchive", "PUT") -// @Api(Description="Un-archives sms template") -export class UnArchiveSmsTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS template id to unarchive. */ - // @ApiMember(Description="The SMS template id to unarchive.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UnArchiveSmsTemplateRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Edit sms template */ -// @Route("/{version}/notifications/sms/templates", "PUT") -// @Api(Description="Edit sms template") -export class UpdateSmsTemplateRequest extends SaveSmsTemplate implements IReturn -{ - /** @description The SMS template id to update. Get it from get_sms_templates. */ - // @ApiMember(Description="The SMS template id to update. Get it from get_sms_templates.", IsRequired=true) - public viewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateSmsTemplateRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets SMS settings */ -// @Route("/{version}/notifications/sms/settings", "GET") -// @Api(Description="Gets SMS settings") -export class GetSmsSettings extends CodeMashRequestBase implements IReturn -{ - /** @description Unused legacy parameter; leave empty. */ - // @ApiMember(Description="Unused legacy parameter; leave empty.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsSettings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsSettingsResponse(); } -} - -/** @description Confirm that you received the test SMS delivery. */ -// @Route("/{version}/notifications/sms/integrations/confirm-human-delivery", "POST") -// @Api(Description="Confirm that you received the test SMS delivery.") -// @DataContract -export class ConfirmSmsIntegrationHumanDeliveryRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS integration id being verified. Get it from get_sms_integrations. */ - // @DataMember - // @ApiMember(Description="The SMS integration id being verified. Get it from get_sms_integrations.") - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ConfirmSmsIntegrationHumanDeliveryRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete integration for particular project */ -// @Route("/{version}/notifications/sms/integrations/{Id}", "DELETE") -// @Api(Description="Delete integration for particular project") -export class DeleteSmsIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS integration id to delete. Get it from get_sms_integrations. */ - // @ApiMember(Description="The SMS integration id to delete. Get it from get_sms_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteSmsIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disable integration for particular project */ -// @Route("/{version}/notifications/sms/integrations/{Id}/disable", "PUT") -// @Api(Description="Disable integration for particular project") -export class DisableSmsIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS integration id to disable. Get it from get_sms_integrations. */ - // @ApiMember(Description="The SMS integration id to disable. Get it from get_sms_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableSmsIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Enable integration for particular project */ -// @Route("/{version}/notifications/sms/integrations/{Id}/enable", "PUT") -// @Api(Description="Enable integration for particular project") -export class EnableSmsIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS integration id to enable. Get it from get_sms_integrations. */ - // @ApiMember(Description="The SMS integration id to enable. Get it from get_sms_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableSmsIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets integration by specified Id */ -// @Route("/{version}/notifications/sms/integrations/{id}", "GET") -// @Api(Description="Gets integration by specified Id") -export class GetSmsIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS integration id to fetch. Get it from get_sms_integrations. */ - // @ApiMember(Description="The SMS integration id to fetch. Get it from get_sms_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsIntegrationResponse(); } -} - -/** @description Gets sms integrations */ -// @Route("/{version}/notifications/sms/integrations", "GET") -// @Api(Description="Gets sms integrations") -export class GetSmsIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsIntegrationsResponse(); } -} - -// @Route("/{version}/notifications/sms/integrations", "POST") -// @DataContract -export class SaveSmsIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: SmsIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveSmsIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Sets integration as default */ -// @Route("/{version}/notifications/sms/integrations/{Id}/default", "PUT") -// @Api(Description="Sets integration as default") -export class SetSmsIntegrationAsDefaultRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS integration id to set as default. Get it from get_sms_integrations. */ - // @ApiMember(Description="The SMS integration id to set as default. Get it from get_sms_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetSmsIntegrationAsDefaultRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Test SMS integration */ -// @Route("/{version}/notifications/sms/integrations/test", "POST") -// @Api(Description="Test SMS integration") -export class TestSmsIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The SMS integration id to test. Get it from get_sms_integrations. */ - // @ApiMember(Description="The SMS integration id to test. Get it from get_sms_integrations.") - public integrationId: string; - - /** @description Optional phone number (international format) to send the test SMS to. */ - // @ApiMember(Description="Optional phone number (international format) to send the test SMS to.") - public to?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestSmsIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestSmsIntegrationResponse(); } -} - -/** @description Deletes sms campaign from queue */ -// @Route("/{version}/notifications/sms/campaigns/{id}", "DELETE") -// @Api(Description="Deletes sms campaign from queue") -export class DeleteSmsCampaign extends CodeMashRequestBase implements IReturn -{ - /** @description The campaign id to delete. Get it from get_sms_campaigns. */ - // @ApiMember(Description="The campaign id to delete. Get it from get_sms_campaigns.", IsRequired=true) - public id: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteSmsCampaign'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get sms campaign by id */ -// @Route("/{version}/notifications/sms/campaigns/{id}", "GET") -// @Api(Description="Get sms campaign by id") -export class GetSmsCampaign extends CodeMashRequestBase implements IReturn -{ - /** @description The campaign id. */ - // @ApiMember(Description="The campaign id.") - public id: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsCampaign'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsCampaignResponse(); } -} - -/** @description Gets sms campaigns */ -// @Route("/{version}/notifications/sms/campaigns", "GET") -// @Api(Description="Gets sms campaigns") -export class GetSmsCampaigns extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - /** @description Optional: return only the campaign with this id. */ - // @ApiMember(Description="Optional: return only the campaign with this id.") - public campaignId?: string; - - /** @description Optional: only campaigns built on this SMS template id. */ - // @ApiMember(Description="Optional: only campaigns built on this SMS template id.") - public templateId?: string; - - /** @description Optional lower bound for the campaign time, unix timestamp in seconds (UTC). */ - // @ApiMember(Description="Optional lower bound for the campaign time, unix timestamp in seconds (UTC).") - public from?: number; - - /** @description Optional upper bound for the campaign time, unix timestamp in seconds (UTC). */ - // @ApiMember(Description="Optional upper bound for the campaign time, unix timestamp in seconds (UTC).") - public to?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsCampaigns'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsCampaignsResponse(); } -} - -/** @description Gets sms campaign batches */ -// @Route("/{version}/notifications/sms/campaigns/{id}/batches", "GET") -// @Api(Description="Gets sms campaign batches") -export class GetSmsCampaignBatches extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The campaign id. Get it from get_sms_campaigns. */ - // @ApiMember(Description="The campaign id. Get it from get_sms_campaigns.") - public id?: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsCampaignBatches'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsCampaignBatchesResponse(); } -} - -/** @description Gets sms campaign batch notification */ -// @Route("/{version}/notifications/sms/campaigns/{id}/batches/{batchId}/{notificationId}", "GET") -// @Api(Description="Gets sms campaign batch notification") -export class GetSmsCampaignBatchNotification extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The campaign id. Get it from get_sms_campaigns. */ - // @ApiMember(Description="The campaign id. Get it from get_sms_campaigns.", IsRequired=true) - public id: string; - - /** @description The campaign batch id. Get it from get_sms_campaign_batches. */ - // @ApiMember(Description="The campaign batch id. Get it from get_sms_campaign_batches.", IsRequired=true) - public batchId: string; - - /** @description The notification id. Get it from get_sms_campaign_batch_notifications. */ - // @ApiMember(Description="The notification id. Get it from get_sms_campaign_batch_notifications.", IsRequired=true) - public notificationId: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsCampaignBatchNotification'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsCampaignBatchNotificationResponse(); } -} - -/** @description Gets sms campaign batch notifications */ -// @Route("/{version}/notifications/sms/campaigns/{id}/batches/{batchId}", "GET") -// @Api(Description="Gets sms campaign batch notifications") -export class GetSmsCampaignBatchNotifications extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The campaign id. Get it from get_sms_campaigns. */ - // @ApiMember(Description="The campaign id. Get it from get_sms_campaigns.", IsRequired=true) - public id: string; - - /** @description The campaign batch id. Get it from get_sms_campaign_batches. */ - // @ApiMember(Description="The campaign batch id. Get it from get_sms_campaign_batches.", IsRequired=true) - public batchId: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsCampaignBatchNotifications'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsCampaignBatchNotificationsResponse(); } -} - -/** @description Get sms campaign statistics */ -// @Route("/{version}/notifications/sms/campaigns/{id}/stats", "GET") -// @Api(Description="Get sms campaign statistics") -export class GetSmsCampaignStatistics extends CodeMashRequestBase implements IReturn -{ - /** @description The campaign id. Get it from get_sms_campaigns. */ - // @ApiMember(Description="The campaign id. Get it from get_sms_campaigns.", IsRequired=true) - public id: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsCampaignStatistics'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsCampaignStatisticsResponse(); } -} - -/** @description Returns SMS preview notification body */ -// @Route("/{version}/notifications/sms/preview", "GET") -// @Api(Description="Returns SMS preview notification body") -export class PreviewSmsNotification extends RequestBase implements IReturn -{ - /** @description The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending). */ - // @ApiMember(Description="The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending).") - public hash: string; - - /** @description Signed-in preview by id: the project id. With a hash it must match the hash. */ - // @ApiMember(Description="Signed-in preview by id: the project id. With a hash it must match the hash.") - public projectId?: string; - - /** @description Signed-in preview by id: the notification id (needs sms:read). With a hash it must match the hash. */ - // @ApiMember(Description="Signed-in preview by id: the notification id (needs sms:read). With a hash it must match the hash.") - public notificationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PreviewSmsNotification'; } - public getMethod() { return 'GET'; } - public createResponse() { return new PreviewSmsNotificationResponse(); } -} - -/** @description Stops a running SMS campaign */ -// @Route("/{version}/notifications/sms/campaigns/{Id}/stop", "POST") -// @Api(Description="Stops a running SMS campaign") -export class StopSmsCampaignRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The campaign id to stop. */ - // @ApiMember(Description="The campaign id to stop.") - public id: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'StopSmsCampaignRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets the sms notifications */ -// @Route("/{version}/notifications/sms/campaigns/{campaignId}/messages", "GET") -// @Api(Description="Gets the sms notifications") -export class GetSmsCampaignMessagesRequest extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The campaign id. Get it from get_sms_campaigns. */ - // @ApiMember(Description="The campaign id. Get it from get_sms_campaigns.", IsRequired=true) - public campaignId: string; - - /** @description The campaign batch id. Get it from get_sms_campaign_batches. */ - // @ApiMember(Description="The campaign batch id. Get it from get_sms_campaign_batches.", IsRequired=true) - public campaignBatchId: string; - - /** @description Optional. Omit to use the project default database integration (resolved per environment). */ - // @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSmsCampaignMessagesRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSmsCampaignMessagesResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/access", "GET") -export class GetMarketplaceIntegrationAccess extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceIntegrationAccess'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceIntegrationAccessResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/access/roles", "PUT") -// @DataContract -export class SetMarketplaceIntegrationRoleAccess extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @DataMember - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - /** @description The role's composite id: acc_…_nr_… (account / team role) or pr_…_nr_… (project role). */ - // @DataMember - // @ApiMember(Description="The role's composite id: acc_…_nr_… (account / team role) or pr_…_nr_… (project role).", IsRequired=true) - public roleId: string; - - /** @description None, Viewer, FunctionsOnly, ReadOnly or FullAccess. */ - // @DataMember - // @ApiMember(Description="None, Viewer, FunctionsOnly, ReadOnly or FullAccess.") - public package: MarketplaceAccessLevel; - - /** @description True to also give the Manage package (edit the connection, its secrets, validation and functions). */ - // @DataMember - // @ApiMember(Description="True to also give the Manage package (edit the connection, its secrets, validation and functions).") - public manage: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetMarketplaceIntegrationRoleAccess'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/access/roles/custom", "POST") -// @DataContract -export class SaveMarketplaceIntegrationCustomAccess extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @DataMember - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - /** @description The role's composite id: acc_…_nr_… or pr_…_nr_…. */ - // @DataMember - // @ApiMember(Description="The role's composite id: acc_…_nr_… or pr_…_nr_….", IsRequired=true) - public roleId: string; - - /** @description The package to start from: None, Viewer, FunctionsOnly, ReadOnly or FullAccess. */ - // @DataMember - // @ApiMember(Description="The package to start from: None, Viewer, FunctionsOnly, ReadOnly or FullAccess.") - public basePackage: MarketplaceAccessLevel; - - /** @description Tool names the role may run (from the connection's tools). */ - // @DataMember - // @ApiMember(Description="Tool names the role may run (from the connection's tools).") - public tools: string[] = []; - - /** @description Function ids (func_…) of this connection the role may run. */ - // @DataMember - // @ApiMember(Description="Function ids (func_…) of this connection the role may run.") - public functions: string[] = []; - - /** @description True to include the Manage rights (edit the connection, its secrets, validation and functions). */ - // @DataMember - // @ApiMember(Description="True to include the Manage rights (edit the connection, its secrets, validation and functions).") - public manage: boolean; - - /** @description True to write a new policy for this role only when its current custom policy is shared with other roles. */ - // @DataMember - // @ApiMember(Description="True to write a new policy for this role only when its current custom policy is shared with other roles.") - public newPolicyForThisRoleOnly: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveMarketplaceIntegrationCustomAccess'; } - public getMethod() { return 'POST'; } - public createResponse() { return new SaveMarketplaceIntegrationCustomAccessResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/tools", "GET") -export class GetMarketplaceIntegrationTools extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceIntegrationTools'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceIntegrationToolsResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/oauth/start", "POST") -export class StartMarketplaceIntegrationSignIn extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'StartMarketplaceIntegrationSignIn'; } - public getMethod() { return 'POST'; } - public createResponse() { return new StartMarketplaceIntegrationSignInResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/oauth/sign-out", "POST") -export class SignOutMarketplaceIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SignOutMarketplaceIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new SignOutMarketplaceIntegrationResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/secrets", "PUT") -// @DataContract -export class ReplaceMarketplaceIntegrationSecretsRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id (int_…). */ - // @DataMember - // @ApiMember(Description="Integration view id (int_…).", IsRequired=true) - public integrationViewId: string; - - // @DataMember - public secrets: { [index:string]: string; } = {}; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ReplaceMarketplaceIntegrationSecretsRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyMarketplaceSecretsResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/secrets/reveal", "POST") -// @DataContract -export class RevealMarketplaceIntegrationSecretsRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id (int_…). */ - // @DataMember - // @ApiMember(Description="Integration view id (int_…).", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RevealMarketplaceIntegrationSecretsRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RevealMarketplaceIntegrationSecretsResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/token-mappings", "PUT") -// @DataContract -export class SetMarketplaceIntegrationTokenMappingsRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id (int_…). */ - // @DataMember - // @ApiMember(Description="Integration view id (int_…).", IsRequired=true) - public integrationViewId: string; - - // @DataMember - public tokenMappings: TokenMappingDto[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetMarketplaceIntegrationTokenMappingsRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new SetMarketplaceIntegrationTokenMappingsResponse(); } -} - -// @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/catalog", "GET") -export class GetMarketplaceFunctionCatalog extends CodeMashRequestBase implements IReturn -{ - /** @description Integration view id, from get_marketplace_integrations. */ - // @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - public integrationViewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceFunctionCatalog'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceFunctionCatalogResponse(); } -} - -// @Route("/{version}/code/marketplace/functions/runs", "GET") -export class GetMarketplaceFunctionRuns extends CodeMashRequestBase implements IReturn -{ - /** @description The marketplace function whose runs to list, from every source (func_…). One of functionId / triggerId / taskId. */ - // @ApiMember(Description="The marketplace function whose runs to list, from every source (func_…). One of functionId / triggerId / taskId.") - public functionId?: string; - - /** @description The trigger whose marketplace function runs to list (trg_…). One of functionId / triggerId / taskId. */ - // @ApiMember(Description="The trigger whose marketplace function runs to list (trg_…). One of functionId / triggerId / taskId.") - public triggerId?: string; - - /** @description The scheduler task whose marketplace function runs to list (tsk_…). One of functionId / triggerId / taskId. */ - // @ApiMember(Description="The scheduler task whose marketplace function runs to list (tsk_…). One of functionId / triggerId / taskId.") - public taskId?: string; - - /** @description The MCP connection whose tool runs to list — the calls an AI chat made to one of its tools without a saved function (int_…). One of functionId / triggerId / taskId / integrationId. */ - // @ApiMember(Description="The MCP connection whose tool runs to list — the calls an AI chat made to one of its tools without a saved function (int_…). One of functionId / triggerId / taskId / integrationId.") - public integrationId?: string; - - /** @description How many runs, newest first: 1-50. Default 20. */ - // @ApiMember(DataType="integer", Description="How many runs, newest first: 1-50. Default 20.") - public limit?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMarketplaceFunctionRuns'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMarketplaceFunctionRunsResponse(); } -} - -// @Route("/{version}/code/functions", "GET") -export class GetCodeFunctions extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Code integration id (int_…), from get_code_integrations. */ - // @ApiMember(Description="Code integration id (int_…), from get_code_integrations.", IsRequired=true) - public integrationId: string; - - /** @description Only functions whose id starts with this. */ - // @ApiMember(Description="Only functions whose id starts with this.") - public prefix?: string; - - /** @description Only functions carrying this tag: "key" or "key=value". */ - // @ApiMember(Description="Only functions carrying this tag: \"key\" or \"key=value\".") - public tag?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetCodeFunctions'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetCodeFunctionsResponse(); } -} - -// @Route("/{version}/code/functions/event-sample", "GET") -export class GetCodeFunctionEventSample extends CodeMashRequestBase implements IReturn -{ - /** @description Database | Membership | Files | Payments | Ai | Scheduler | Manual. */ - // @ApiMember(Description="Database | Membership | Files | Payments | Ai | Scheduler | Manual.", IsRequired=true) - public source: CodeFunctionSource; - - /** @description The event name, e.g. database.record.inserted; omitted = the source's usual one. */ - // @ApiMember(Description="The event name, e.g. database.record.inserted; omitted = the source's usual one.") - public event?: string; - - /** @description The schema id to put into data.database.schemaId (Database source). */ - // @ApiMember(Description="The schema id to put into data.database.schemaId (Database source).") - public schemaId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetCodeFunctionEventSample'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetCodeFunctionEventSampleResponse(); } -} - -// @Route("/{version}/code/functions/qualifiers", "GET") -export class GetCodeFunctionQualifiers extends CodeMashRequestBase implements IReturn -{ - /** @description Code integration id (int_…), from get_code_integrations. */ - // @ApiMember(Description="Code integration id (int_…), from get_code_integrations.", IsRequired=true) - public integrationId: string; - - /** @description Provider-native function id, from get_code_functions. */ - // @ApiMember(Description="Provider-native function id, from get_code_functions.", IsRequired=true) - public functionId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetCodeFunctionQualifiers'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetCodeFunctionQualifiersResponse(); } -} - -// @Route("/{version}/code/functions/runs", "GET") -export class GetCodeFunctionRuns extends CodeMashRequestBase implements IReturn -{ - /** @description The trigger whose function runs to list (trg_…). One of triggerId / taskId. */ - // @ApiMember(Description="The trigger whose function runs to list (trg_…). One of triggerId / taskId.") - public triggerId?: string; - - /** @description The scheduler task whose function runs to list (tsk_…). One of triggerId / taskId. */ - // @ApiMember(Description="The scheduler task whose function runs to list (tsk_…). One of triggerId / taskId.") - public taskId?: string; - - /** @description How many runs, newest first: 1-50. Default 20. */ - // @ApiMember(DataType="integer", Description="How many runs, newest first: 1-50. Default 20.") - public limit?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetCodeFunctionRuns'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetCodeFunctionRunsResponse(); } -} - -// @Route("/{version}/code/functions/invoke", "POST") -// @DataContract -export class InvokeCodeFunction extends CodeMashRequestBase implements IReturn -{ - /** @description Which function: { integrationId, functionId, qualifier? }. */ - // @DataMember - // @ApiMember(Description="Which function: { integrationId, functionId, qualifier? }.", IsRequired=true) - public functionRef: FunctionRefDto; - - // @DataMember - public payload?: { [index:string]: Object; }; - - /** @description Sync (wait for the result, default) or Async (fire and forget). */ - // @DataMember - // @ApiMember(Description="Sync (wait for the result, default) or Async (fire and forget).") - public invocationType: CodeInvocationType; - - /** @description The service user the function acts as (usr_…); omitted = you. */ - // @DataMember - // @ApiMember(Description="The service user the function acts as (usr_…); omitted = you.") - public runAsUserId?: string; - - /** @description A JSON object → envelope config. No bindings: a manual call has nothing to bind them with. */ - // @DataMember - // @ApiMember(Description="A JSON object → envelope config. No bindings: a manual call has nothing to bind them with.") - public config?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'InvokeCodeFunction'; } - public getMethod() { return 'POST'; } - public createResponse() { return new InvokeCodeFunctionResponse(); } -} - -/** @description Disable push service */ -// @Route("/{version}/notifications/push/disable", "PUT") -// @Api(Description="Disable push service") -export class DisablePush extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisablePush'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Lists push disable dependencies */ -// @Route("/{version}/notifications/push/disable-dependencies", "GET") -// @Api(Description="Lists push disable dependencies") -export class GetPushDisableDependencies extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushDisableDependencies'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetNotificationModuleDisableDependenciesResponse(); } -} - -/** @description Enable push service */ -// @Route("/{version}/notifications/push/enable", "PUT") -// @Api(Description="Enable push service") -export class EnablePush extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnablePush'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Archives push template */ -// @Route("/{version}/notifications/push/templates/{Id}/archive", "PUT") -// @Api(Description="Archives push template") -export class ArchivePushTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The push template id to archive. Get it from get_push_templates. */ - // @ApiMember(Description="The push template id to archive. Get it from get_push_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ArchivePushTemplateRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Clones push template */ -// @Route("/{version}/notifications/push/templates/{Id}/clone", "POST") -// @Api(Description="Clones push template") -export class ClonePushTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The push template id to clone. Get it from get_push_templates. */ - // @ApiMember(Description="The push template id to clone. Get it from get_push_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ClonePushTemplateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Create push template */ -// @Route("/{version}/notifications/push/templates", "POST") -// @Api(Description="Create push template") -export class CreatePushTemplateRequest extends SavePushTemplate implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreatePushTemplateRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Delete push template */ -// @Route("/{version}/notifications/push/templates/{Id}", "DELETE") -// @Api(Description="Delete push template") -export class DeletePushTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The push template id to delete. Get it from get_push_templates. */ - // @ApiMember(Description="The push template id to delete. Get it from get_push_templates.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeletePushTemplateRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets a push template */ -// @Route("/{version}/notifications/push/templates/{id}", "GET") -// @Api(Description="Gets a push template") -export class GetPushTemplate extends CodeMashRequestBase implements IReturn -{ - /** @description The push template id to fetch. Get it from get_push_templates. */ - // @ApiMember(Description="The push template id to fetch. Get it from get_push_templates.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushTemplate'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushTemplateResponse(); } -} - -/** @description Gets push templates */ -// @Route("/{version}/notifications/push/templates", "GET") -// @Api(Description="Gets push templates") -export class GetPushTemplates extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Set true to include archived templates. */ - // @ApiMember(Description="Set true to include archived templates.") - public showArchived?: boolean; - - /** @description Optional: return only the template with this id. */ - // @ApiMember(Description="Optional: return only the template with this id.") - public templateId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushTemplates'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushTemplatesResponse(); } -} - -/** @description Gets push template content tokens */ -// @Route("/{version}/notifications/push/templates/{id}/tokens", "GET") -// @Api(Description="Gets push template content tokens") -export class GetPushMessageContentTokens extends CodeMashRequestBase implements IReturn -{ - /** @description The push template id to scan for tokens. Get it from get_push_templates. */ - // @ApiMember(Description="The push template id to scan for tokens. Get it from get_push_templates.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushMessageContentTokens'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushMessageContentTokensResponse(); } -} - -/** @description Renders a push template field */ -// @Route("/{version}/notifications/push/templates/render", "POST") -// @Api(Description="Renders a push template field") -export class RenderPush extends CodeMashRequestBase implements IReturn -{ - /** @description The Razor template source for the field being rendered (Title, Body, or Subtitle). */ - // @ApiMember(Description="The Razor template source for the field being rendered (Title, Body, or Subtitle).", IsRequired=true) - public code: string; - - /** @description Optional token values already bound for this render pass. */ - // @ApiMember(Description="Optional token values already bound for this render pass.") - public tokens?: TokenMappingDto[]; - - /** @description Set true when rendering for a preview (relaxes strict validation). */ - // @ApiMember(Description="Set true when rendering for a preview (relaxes strict validation).") - public isForPreview: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RenderPush'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RenderPushResponse(); } -} - -/** @description Un-archives push template */ -// @Route("/{version}/notifications/push/templates/{Id}/unarchive", "PUT") -// @Api(Description="Un-archives push template") -export class UnArchivePushTemplateRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The push template id to unarchive. */ - // @ApiMember(Description="The push template id to unarchive.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UnArchivePushTemplateRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Edit push template */ -// @Route("/{version}/notifications/push/templates", "PUT") -// @Api(Description="Edit push template") -export class UpdatePushTemplateRequest extends SavePushTemplate implements IReturn -{ - /** @description The push template id to update. Get it from get_push_templates. */ - // @ApiMember(Description="The push template id to update. Get it from get_push_templates.", IsRequired=true) - public viewId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdatePushTemplateRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets push settings */ -// @Route("/{version}/notifications/push/settings", "GET") -// @Api(Description="Gets push settings") -export class GetPushSettings extends CodeMashRequestBase implements IReturn -{ - /** @description The push settings id to fetch. */ - // @ApiMember(Description="The push settings id to fetch.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushSettings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushSettingsResponse(); } -} - -/** @description Confirm human delivery of a test push */ -// @Route("/{version}/notifications/push/integrations/confirm-human-delivery", "POST") -// @Api(Description="Confirm human delivery of a test push") -// @DataContract -export class ConfirmPushIntegrationHumanDeliveryRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The push integration id being verified. Get it from get_push_integrations. */ - // @DataMember - // @ApiMember(Description="The push integration id being verified. Get it from get_push_integrations.", IsRequired=true) - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ConfirmPushIntegrationHumanDeliveryRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete push integration */ -// @Route("/{version}/notifications/push/integrations/{Id}", "DELETE") -// @Api(Description="Delete push integration") -export class DeletePushIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The push integration id to delete. Get it from get_push_integrations. */ - // @ApiMember(Description="The push integration id to delete. Get it from get_push_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeletePushIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disable push integration */ -// @Route("/{version}/notifications/push/integrations/{Id}/disable", "PUT") -// @Api(Description="Disable push integration") -export class DisablePushIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The push integration id to disable. Get it from get_push_integrations. */ - // @ApiMember(Description="The push integration id to disable. Get it from get_push_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisablePushIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Enable push integration */ -// @Route("/{version}/notifications/push/integrations/{Id}/enable", "PUT") -// @Api(Description="Enable push integration") -export class EnablePushIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The push integration id to enable. Get it from get_push_integrations. */ - // @ApiMember(Description="The push integration id to enable. Get it from get_push_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnablePushIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets a push integration */ -// @Route("/{version}/notifications/push/integrations/{id}", "GET") -// @Api(Description="Gets a push integration") -export class GetPushIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The push integration id to fetch. Get it from get_push_integrations. */ - // @ApiMember(Description="The push integration id to fetch. Get it from get_push_integrations.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushIntegrationResponse(); } -} - -/** @description Gets push integrations */ -// @Route("/{version}/notifications/push/integrations", "GET") -// @Api(Description="Gets push integrations") -export class GetPushIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushIntegrationsResponse(); } -} - -// @Route("/{version}/notifications/push/integrations", "POST") -// @DataContract -export class SavePushIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: PushIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SavePushIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Sets push integration as default */ -// @Route("/{version}/notifications/push/integrations/{Id}/default", "PUT") -// @Api(Description="Sets push integration as default") -export class SetPushIntegrationAsDefaultRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The push integration id to set as default. Get it from get_push_integrations. */ - // @ApiMember(Description="The push integration id to set as default. Get it from get_push_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetPushIntegrationAsDefaultRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Test push integration */ -// @Route("/{version}/notifications/push/integrations/test", "POST") -// @Api(Description="Test push integration") -export class TestPushIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The push integration id to test. Get it from get_push_integrations. */ - // @DataMember - // @ApiMember(Description="The push integration id to test. Get it from get_push_integrations.", IsRequired=true) - public integrationId: string; - - /** @description The device token the test is sent to — a device registered for the person receiving the test (get it from get_push_devices). Required for every real provider (only the Sandbox integration tests without one). For a web device it is the browser subscription JSON. Requires DeliveryFamily. */ - // @DataMember - // @ApiMember(Description="The device token the test is sent to — a device registered for the person receiving the test (get it from get_push_devices). Required for every real provider (only the Sandbox integration tests without one). For a web device it is the browser subscription JSON. Requires DeliveryFamily.") - public testToken?: string; - - /** @description The delivery family of TestToken: ios, android, chrome (any browser web push) or safari. Requires TestToken. */ - // @DataMember - // @ApiMember(Description="The delivery family of TestToken: ios, android, chrome (any browser web push) or safari. Requires TestToken.") - public deliveryFamily?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestPushIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestEmailIntegrationResponse(); } -} - -/** @description Registers a device for push notifications */ -// @Route("/{version}/notifications/push/devices", "POST") -// @Api(Description="Registers a device for push notifications") -// @DataContract -export class RegisterDevice extends RequestBase implements IReturn, IHasProjectId -{ - /** @description The device details: OS, token, model, and delivery family. */ - // @DataMember - // @ApiMember(Description="The device details: OS, token, model, and delivery family.", IsRequired=true) - public pushDeviceDto: PushDeviceDto; - - /** @description The id of the user this device belongs to. */ - // @DataMember - // @ApiMember(Description="The id of the user this device belongs to.", IsRequired=true) - public userId: string; - - // @DataMember - public projectId: string; - - /** @description Optional account id to associate with the device. */ - // @DataMember - // @ApiMember(Description="Optional account id to associate with the device.") - public accountId?: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @DataMember - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RegisterDevice'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Gets a registered push device */ -// @Route("/{version}/notifications/push/devices/{id}", "GET") -// @Api(Description="Gets a registered push device") -export class GetPushDevice extends CodeMashRequestBase implements IReturn -{ - /** @description The device id to fetch. Get it from get_push_devices. */ - // @ApiMember(Description="The device id to fetch. Get it from get_push_devices.") - public id: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushDevice'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushDeviceResponse(); } -} - -/** @description Gets registered push devices */ -// @Route("/{version}/notifications/push/devices", "GET") -// @Api(Description="Gets registered push devices") -export class GetPushDevices extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Optional: only the devices of this user. */ - // @ApiMember(Description="Optional: only the devices of this user.") - public userId?: string; - - /** @description Optional: only the device registered with this provider token. */ - // @ApiMember(Description="Optional: only the device registered with this provider token.") - public deviceKey?: string; - - /** @description Optional: only devices of this platform — ios, android, chrome or safari. */ - // @ApiMember(Description="Optional: only devices of this platform — ios, android, chrome or safari.") - public platform?: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushDevices'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushDevicesResponse(); } -} - -/** @description Count the devices a push campaign audience would reach */ -// @Route("/{version}/notifications/push/campaigns/audience-count", "POST") -// @Api(Description="Count the devices a push campaign audience would reach") -// @DataContract -export class GetPushCampaignAudienceCountRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The audience, in the same shape as CreatePushCampaignRequest.campaign. Template and send options are ignored. */ - // @DataMember - // @ApiMember(Description="The audience, in the same shape as CreatePushCampaignRequest.campaign. Template and send options are ignored.") - public campaign: PushCampaignRequest; - - /** @description Optional. When omitted, the default database integration for the request's environment is used. */ - // @DataMember - // @ApiMember(Description="Optional. When omitted, the default database integration for the request's environment is used.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushCampaignAudienceCountRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new GetPushCampaignAudienceCountResponse(); } -} - -/** @description Create push campaign */ -// @Route("/{version}/notifications/push/campaigns", "POST") -// @Api(Description="Create push campaign") -// @DataContract -export class CreatePushCampaignRequest extends CodeMashRequestBase implements IReturn -{ - // @DataMember - public campaign: PushCampaignRequest; - - // @DataMember - public databaseIntegrationId?: string; - - /** @description Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now. */ - // @DataMember - // @ApiMember(Description="Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now.") - public sendNow?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreatePushCampaignRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Deletes push campaign from queue */ -// @Route("/{version}/notifications/push/campaigns/{Id}", "DELETE") -// @Api(Description="Deletes push campaign from queue") -// @DataContract -export class DeletePushCampaignRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The push campaign id to delete. Get it from get_push_campaigns. */ - // @DataMember - // @ApiMember(Description="The push campaign id to delete. Get it from get_push_campaigns.", IsRequired=true) - public id: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @DataMember - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeletePushCampaignRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets push campaign by id */ -// @Route("/{version}/notifications/push/campaigns/{id}", "GET") -// @Api(Description="Gets push campaign by id") -export class GetPushCampaign extends CodeMashRequestBase implements IReturn -{ - /** @description The campaign id. */ - // @ApiMember(Description="The campaign id.") - public id: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushCampaign'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushCampaignResponse(); } -} - -/** @description Gets push campaigns */ -// @Route("/{version}/notifications/push/campaigns", "GET") -// @Api(Description="Gets push campaigns") -export class GetPushCampaigns extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Optional database integration id; omit to use the project's default. */ - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - /** @description Optional: only campaigns built on this push template id. */ - // @ApiMember(Description="Optional: only campaigns built on this push template id.") - public templateId?: string; - - /** @description Optional lower bound for the campaign time, unix timestamp in seconds (UTC). */ - // @ApiMember(Description="Optional lower bound for the campaign time, unix timestamp in seconds (UTC).") - public from?: number; - - /** @description Optional upper bound for the campaign time, unix timestamp in seconds (UTC). */ - // @ApiMember(Description="Optional upper bound for the campaign time, unix timestamp in seconds (UTC).") - public to?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushCampaigns'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushCampaignsResponse(); } -} - -/** @description Gets push campaign batches */ -// @Route("/{version}/notifications/push/campaigns/{id}/batches", "GET") -// @Api(Description="Gets push campaign batches") -export class GetPushCampaignBatches extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The push campaign id to list batches for. Get it from get_push_campaigns. */ - // @ApiMember(Description="The push campaign id to list batches for. Get it from get_push_campaigns.") - public id: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - /** @description Optional: only return the batch with this id. */ - // @ApiMember(Description="Optional: only return the batch with this id.") - public batchId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushCampaignBatches'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushCampaignBatchesResponse(); } -} - -/** @description Gets a push campaign batch notification */ -// @Route("/{version}/notifications/push/campaigns/{id}/batches/{batchId}/{notificationId}", "GET") -// @Api(Description="Gets a push campaign batch notification") -export class GetPushCampaignBatchNotification extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The push campaign id. Get it from get_push_campaigns. */ - // @ApiMember(Description="The push campaign id. Get it from get_push_campaigns.") - public id: string; - - /** @description The batch id. Get it from get_push_campaign_batches. */ - // @ApiMember(Description="The batch id. Get it from get_push_campaign_batches.") - public batchId: string; - - /** @description The notification id within the batch. */ - // @ApiMember(Description="The notification id within the batch.") - public notificationId: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushCampaignBatchNotification'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushCampaignBatchNotificationResponse(); } -} - -/** @description Gets push campaign batch notifications */ -// @Route("/{version}/notifications/push/campaigns/{id}/batches/{batchId}", "GET") -// @Api(Description="Gets push campaign batch notifications") -export class GetPushCampaignBatchNotifications extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The push campaign id. Get it from get_push_campaigns. */ - // @ApiMember(Description="The push campaign id. Get it from get_push_campaigns.") - public id: string; - - /** @description The batch id to list notifications for. Get it from get_push_campaign_batches. */ - // @ApiMember(Description="The batch id to list notifications for. Get it from get_push_campaign_batches.") - public batchId: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushCampaignBatchNotifications'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushCampaignBatchNotificationsResponse(); } -} - -/** @description Get push campaign statistics */ -// @Route("/{version}/notifications/push/campaigns/{id}/stats", "GET") -// @Api(Description="Get push campaign statistics") -export class GetPushCampaignStatistics extends CodeMashRequestBase implements IReturn -{ - /** @description The push campaign id to get statistics for. Get it from get_push_campaigns. */ - // @ApiMember(Description="The push campaign id to get statistics for. Get it from get_push_campaigns.") - public id: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushCampaignStatistics'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushCampaignStatisticsResponse(); } -} - -/** @description Returns push preview notification */ -// @Route("/{version}/notifications/push/preview", "GET") -// @Api(Description="Returns push preview notification") -export class PreviewPushNotification extends RequestBase implements IReturn -{ - /** @description The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending). */ - // @ApiMember(Description="The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending).") - public hash: string; - - /** @description Signed-in preview by id: the project id. With a hash it must match the hash. */ - // @ApiMember(Description="Signed-in preview by id: the project id. With a hash it must match the hash.") - public projectId?: string; - - /** @description Signed-in preview by id: the notification id (needs push:read). With a hash it must match the hash. */ - // @ApiMember(Description="Signed-in preview by id: the notification id (needs push:read). With a hash it must match the hash.") - public notificationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PreviewPushNotification'; } - public getMethod() { return 'GET'; } - public createResponse() { return new PreviewPushNotificationResponse(); } -} - -/** @description Stops a running push campaign */ -// @Route("/{version}/notifications/push/campaigns/{Id}/stop", "POST") -// @Api(Description="Stops a running push campaign") -// @DataContract -export class StopPushCampaignRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The campaign id to stop. */ - // @DataMember - // @ApiMember(Description="The campaign id to stop.") - public id: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @DataMember - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'StopPushCampaignRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets push campaign messages */ -// @Route("/{version}/notifications/push/campaigns/{campaignId}/messages", "GET") -// @Api(Description="Gets push campaign messages") -export class GetPushCampaignMessagesRequest extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description The push campaign id. Get it from get_push_campaigns. */ - // @ApiMember(Description="The push campaign id. Get it from get_push_campaigns.") - public campaignId: string; - - /** @description Optional: restrict results to this batch id. Get it from get_push_campaign_batches. */ - // @ApiMember(Description="Optional: restrict results to this batch id. Get it from get_push_campaign_batches.") - public campaignBatchId: string; - - /** @description Optional database integration id; omit to use the project's default. */ - // @ApiMember(Description="Optional database integration id; omit to use the project's default.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPushCampaignMessagesRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPushCampaignMessagesResponse(); } -} - -// @Route("/{version}/notifications/inbox", "GET") -export class GetNotificationInboxRequest extends CodeMashListPaginationRequestBase implements IReturn -{ - public unreadOnly: boolean; - public channel?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetNotificationInboxRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetNotificationInboxResponse(); } -} - -// @Route("/{version}/notifications/inbox/unread-count", "GET") -export class GetUnreadCountRequest extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetUnreadCountRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetUnreadCountResponse(); } -} - -// @Route("/{version}/notifications/inbox/{notificationId}/read", "POST") -export class MarkNotificationReadRequest extends CodeMashRequestBase implements IReturn -{ - public notificationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MarkNotificationReadRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new MarkNotificationReadResponse(); } -} - -// @Route("/{version}/notifications/inbox/read-all", "POST") -export class MarkAllNotificationsReadRequest extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MarkAllNotificationsReadRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new MarkAllNotificationsReadResponse(); } -} - -/** @description Disable payments service */ -// @Route("/{version}/payments/disable", "PUT") -// @Api(Description="Disable payments service") -export class DisablePayments extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisablePayments'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Enable payments service */ -// @Route("/{version}/payments/enable", "PUT") -// @Api(Description="Enable payments service") -export class EnablePayments extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnablePayments'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets the received payment webhooks log */ -// @Route("/{version}/payments/webhooks/log", "GET") -// @Api(Description="Gets the received payment webhooks log") -export class GetPaymentsWebhookLog extends CodeMashRequestBase implements IReturn -{ - /** @description Only rows for this payments integration (view id). Omit for the whole project. */ - // @ApiMember(DataType="string", Description="Only rows for this payments integration (view id). Omit for the whole project.") - public integrationId?: string; - - /** @description Max rows to return, newest first. Default 50, ceiling 200. */ - // @ApiMember(DataType="int", Description="Max rows to return, newest first. Default 50, ceiling 200.") - public limit?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPaymentsWebhookLog'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPaymentsWebhookLogResponse(); } -} - -/** @description Delete payments trigger */ -// @Route("/{version}/payments/triggers/{triggerId}", "DELETE") -// @Api(Description="Delete payments trigger") -// @DataContract -export class DeletePaymentsTrigger extends DeleteTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeletePaymentsTrigger'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disable payments trigger */ -// @Route("/{version}/payments/triggers/{triggerId}/disable", "PATCH") -// @Api(Description="Disable payments trigger") -// @DataContract -export class DisablePaymentsTrigger extends DisableTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisablePaymentsTrigger'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Enable payments trigger */ -// @Route("/{version}/payments/triggers/{triggerId}/enable", "PATCH") -// @Api(Description="Enable payments trigger") -// @DataContract -export class EnablePaymentsTrigger extends EnableTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnablePaymentsTrigger'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets payments trigger by specified Id */ -// @Route("/{version}/payments/triggers/{id}", "GET") -// @Api(Description="Gets payments trigger by specified Id") -export class GetPaymentsTrigger extends GetTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPaymentsTrigger'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPaymentsTriggerResponse(); } -} - -/** @description Gets payments triggers */ -// @Route("/{version}/payments/triggers", "GET") -// @Api(Description="Gets payments triggers") -export class GetPaymentsTriggers extends GetTriggers implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPaymentsTriggers'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPaymentsTriggersResponse(); } -} - -// @Route("/{version}/payments/triggers", "POST") -// @DataContract -export class SavePaymentsTrigger extends SaveTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SavePaymentsTrigger'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Confirm that you received or verified the test payment integration outcome. */ -// @Route("/{version}/payments/integrations/confirm-human-delivery", "POST") -// @Api(Description="Confirm that you received or verified the test payment integration outcome.") -// @DataContract -export class ConfirmPaymentsIntegrationHumanDeliveryRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The id of the payments integration whose test outcome is being confirmed. */ - // @DataMember - // @ApiMember(Description="The id of the payments integration whose test outcome is being confirmed.", IsRequired=true) - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ConfirmPaymentsIntegrationHumanDeliveryRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete integration for particular project */ -// @Route("/{version}/payments/integrations/{Id}", "DELETE") -// @Api(Description="Delete integration for particular project") -export class DeletePaymentsIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Payments integration id to delete, from get_payments_integrations. */ - // @ApiMember(Description="Payments integration id to delete, from get_payments_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeletePaymentsIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disable integration for particular project */ -// @Route("/{version}/payments/integrations/{Id}/disable", "PUT") -// @Api(Description="Disable integration for particular project") -export class DisablePaymentsIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Payments integration id to disable, from get_payments_integrations. */ - // @ApiMember(Description="Payments integration id to disable, from get_payments_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisablePaymentsIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Enable integration for particular project */ -// @Route("/{version}/payments/integrations/{Id}/enable", "PUT") -// @Api(Description="Enable integration for particular project") -export class EnablePaymentsIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Payments integration id to enable, from get_payments_integrations. */ - // @ApiMember(Description="Payments integration id to enable, from get_payments_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnablePaymentsIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets integration by specified Id */ -// @Route("/{version}/payments/integrations/{id}", "GET") -// @Api(Description="Gets integration by specified Id") -export class GetPaymentsIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Payments integration id to fetch, from get_payments_integrations. */ - // @ApiMember(Description="Payments integration id to fetch, from get_payments_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPaymentsIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPaymentsIntegrationResponse(); } -} - -/** @description Gets integrations */ -// @Route("/{version}/payments/integrations", "GET") -// @Api(Description="Gets integrations") -export class GetPaymentsIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetPaymentsIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetPaymentsIntegrationsResponse(); } -} - -/** @description Saves payments integration */ -// @Route("/{version}/payments/integrations", "POST") -// @Api(Description="Saves payments integration") -// @DataContract -export class SavePaymentsIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: PaymentIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SavePaymentsIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Test payments integration */ -// @Route("/{version}/payments/integrations/test", "POST") -// @Api(Description="Test payments integration") -export class TestPaymentsIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description The id of the payments integration to test. */ - // @ApiMember(Description="The id of the payments integration to test.", IsRequired=true) - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestPaymentsIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestPaymentsIntegrationResponse(); } -} - -/** @description Disable logging service */ -// @Route("/{version}/logs/disable", "PUT") -// @Api(Description="Disable logging service") -export class DisableLogging extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableLogging'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/logs/enable", "PUT") -export class EnableLogging extends CodeMashRequestBase implements IReturn -{ - /** @description When true, also create a Norbix Logging integration backed by the project's default database. */ - // @ApiMember(DataType="boolean", Description="When true, also create a Norbix Logging integration backed by the project's default database.", Name="createNorbixLogging", ParameterType="query") - public createNorbixLogging: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableLogging'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete integration for particular project */ -// @Route("/{version}/logs/integrations/{Id}", "DELETE") -// @Api(Description="Delete integration for particular project") -export class DeleteLoggingIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Logging integration id to delete, from get_logging_integrations. */ - // @ApiMember(Description="Logging integration id to delete, from get_logging_integrations.", IsRequired=true) - public id: string; - - /** @description When true and this is a Norbix Logging integration, also permanently wipes the stored log entries in its backing database. Ignored for other providers. */ - // @ApiMember(Description="When true and this is a Norbix Logging integration, also permanently wipes the stored log entries in its backing database. Ignored for other providers.") - public wipeLogs: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteLoggingIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disable integration for particular project */ -// @Route("/{version}/logs/integrations/{Id}/disable", "PUT") -// @Api(Description="Disable integration for particular project") -export class DisableLoggingIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Logging integration id to disable, from get_logging_integrations. */ - // @ApiMember(Description="Logging integration id to disable, from get_logging_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableLoggingIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Enable integration for particular project */ -// @Route("/{version}/logs/integrations/{Id}/enable", "PUT") -// @Api(Description="Enable integration for particular project") -export class EnableLoggingIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Logging integration id to enable, from get_logging_integrations. */ - // @ApiMember(Description="Logging integration id to enable, from get_logging_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableLoggingIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets integration by specified Id */ -// @Route("/{version}/logs/integrations/{id}", "GET") -// @Api(Description="Gets integration by specified Id") -export class GetLoggingIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Logging integration id to fetch, from get_logging_integrations. */ - // @ApiMember(Description="Logging integration id to fetch, from get_logging_integrations.", IsRequired=true) - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLoggingIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLoggingIntegrationResponse(); } -} - -/** @description Gets integrations */ -// @Route("/{version}/logs/integrations", "GET") -// @Api(Description="Gets integrations") -export class GetLoggingIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLoggingIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLoggingIntegrationsResponse(); } -} - -/** @description Saves logging integration */ -// @Route("/{version}/logs/integrations", "POST") -// @Api(Description="Saves logging integration") -// @DataContract -export class SaveLoggingIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: LoggingIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveLoggingIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Test logging integration */ -// @Route("/{version}/logs/integrations/test", "POST") -// @Api(Description="Test logging integration") -export class TestLoggingIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Logging integration id to test, from get_logging_integrations. */ - // @ApiMember(Description="Logging integration id to test, from get_logging_integrations.", IsRequired=true) - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestLoggingIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestLoggingIntegrationResponse(); } -} - -/** @description Delete every log entry stored in the project's Norbix Logging integration */ -// @Route("/{version}/logs/clean", "POST") -// @Api(Description="Delete every log entry stored in the project's Norbix Logging integration") -export class CleanLogs extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CleanLogs'; } - public getMethod() { return 'POST'; } - public createResponse() { return new CleanLogsResponse(); } -} - -/** @description Fetch the audit trail for a correlation id */ -// @Route("/{version}/logs/audit", "GET") -// @Api(Description="Fetch the audit trail for a correlation id") -export class GetLogsByCorrelationId extends CodeMashRequestBase implements IReturn -{ - /** @description The correlation id whose full request trail you want. */ - // @ApiMember(DataType="string", Description="The correlation id whose full request trail you want.", IsRequired=true, Name="correlationId", ParameterType="query") - public targetCorrelationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLogsByCorrelationId'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLogsByCorrelationIdResponse(); } -} - -/** @description Fetch a filtered, cursor-paged list of tenant log entries */ -// @Route("/{version}/logs", "GET") -// @Api(Description="Fetch a filtered, cursor-paged list of tenant log entries") -export class GetLogs extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Severity filter: Information, Warning or Error. */ - // @ApiMember(DataType="string", Description="Severity filter: Information, Warning or Error.", Name="level", ParameterType="query") - public level?: string; - - /** @description Module filter: Database, Email, Membership, etc. */ - // @ApiMember(DataType="string", Description="Module filter: Database, Email, Membership, etc.", Name="module", ParameterType="query") - public module?: string; - - /** @description Correlation id filter. Empty = no filter (show all). */ - // @ApiMember(DataType="string", Description="Correlation id filter. Empty = no filter (show all).", Name="logCorrelationId", ParameterType="query") - public logCorrelationId?: string; - - /** @description Exact event code filter (e.g. db:record:insert). */ - // @ApiMember(DataType="string", Description="Exact event code filter (e.g. db:record:insert).", Name="eventCode", ParameterType="query") - public eventCode?: string; - - /** @description Free-text search over title and message. */ - // @ApiMember(DataType="string", Description="Free-text search over title and message.", Name="search", ParameterType="query") - public search?: string; - - /** @description Meta key to filter on (e.g. taskId). Letters, digits and _ only. Must come with metaValue. */ - // @ApiMember(DataType="string", Description="Meta key to filter on (e.g. taskId). Letters, digits and _ only. Must come with metaValue.", Name="metaKey", ParameterType="query") - public metaKey?: string; - - /** @description Exact Meta value for metaKey (e.g. a task id tsk_...). Must come with metaKey. */ - // @ApiMember(DataType="string", Description="Exact Meta value for metaKey (e.g. a task id tsk_...). Must come with metaKey.", Name="metaValue", ParameterType="query") - public metaValue?: string; - - /** @description Start of the timestamp range (inclusive, UTC). Optional. */ - // @ApiMember(Description="Start of the timestamp range (inclusive, UTC). Optional.") - public fromUtc?: string; - - /** @description End of the timestamp range (inclusive, UTC). Optional. */ - // @ApiMember(Description="End of the timestamp range (inclusive, UTC). Optional.") - public toUtc?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLogs'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLogsResponse(); } -} - -/** @description Fetch the per-project log settings (flags) */ -// @Route("/{version}/logs/settings", "GET") -// @Api(Description="Fetch the per-project log settings (flags)") -export class GetLogSettings extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLogSettings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLogSettingsResponse(); } -} - -/** @description Update the per-project log settings (flags) */ -// @Route("/{version}/logs/settings", "POST") -// @Api(Description="Update the per-project log settings (flags)") -export class SaveLogSettings extends CodeMashRequestBase implements IReturn -{ - /** @description Drop log entries from requests originating from the Norbix studio (cloud dashboard). */ - // @ApiMember(Description="Drop log entries from requests originating from the Norbix studio (cloud dashboard).") - public skipCloudDashboardLogs: boolean; - - /** @description Strip request/response body meta off http:request / http:response log entries. */ - // @ApiMember(Description="Strip request/response body meta off http:request / http:response log entries.") - public skipHttpBodyMeta: boolean; - - /** @description Turn on tenant-visible log entries for AI chat turns. Default false. */ - // @ApiMember(Description="Turn on tenant-visible log entries for AI chat turns. Default false.") - public aiChatLoggingEnabled: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveLogSettings'; } - public getMethod() { return 'POST'; } - public createResponse() { return new SaveLogSettingsResponse(); } -} - -/** @description Paste-ready prompt and client snippets to connect an AI tool to this installation. */ -// @Route("/{version}/account/agent/onboarding", "GET") -// @Api(Description="Paste-ready prompt and client snippets to connect an AI tool to this installation.") -export class GetAgentOnboardingRequest extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAgentOnboardingRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAgentOnboardingResponse(); } -} - -/** @description The AI project-context summary: the projects the caller may work on, with their settings — never a secret. */ -// @Route("/{version}/account/ai/context", "GET") -// @Api(Description="The AI project-context summary: the projects the caller may work on, with their settings — never a secret.") -export class GetAiContextRequest extends RequestBase implements IReturn -{ - public projectId?: string; - public format?: string; - public knownVersion?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAiContextRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAiContextResponse(); } -} - -/** @description Lists the AI tools this host exposes (external-agent bridge). */ -// @Route("/{version}/account/ai/tools", "GET") -// @Api(Description="Lists the AI tools this host exposes (external-agent bridge).") -export class GetAiToolsRequest extends RequestBase implements IReturn -{ - public toolset?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAiToolsRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAiToolsResponse(); } -} - -/** @description Invokes one AI tool directly (external-agent bridge). */ -// @Route("/{version}/account/ai/tools/{ToolName}", "POST") -// @Api(Description="Invokes one AI tool directly (external-agent bridge).") -export class InvokeAiToolRequest extends RequestBase implements IReturn -{ - public toolName: string; - public argumentsJson?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'InvokeAiToolRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new InvokeAiToolResponse(); } -} - -/** @description Uploads a file into an AI chat session. */ -// @Route("/{version}/account/chat/attachments", "POST") -// @Api(Description="Uploads a file into an AI chat session.") -export class UploadChatAttachmentRequest extends RequestBase implements IReturn -{ - public sessionId?: string; - public fileName: string; - public contentType: string; - public base64Content: string; - public profile?: string; - public topic?: string; - public projectId?: string; - public env?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UploadChatAttachmentRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new UploadChatAttachmentResponse(); } -} - -/** @description Reports AI chat availability and the model-picker menu. */ -// @Route("/{version}/account/chat/availability", "GET") -// @Api(Description="Reports AI chat availability and the model-picker menu.") -export class ChatAvailabilityRequest extends RequestBase implements IReturn -{ - public projectId?: string; - public env?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ChatAvailabilityRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new ChatAvailabilityResponse(); } -} - -/** @description Lists what the AI assistant remembers about this account. */ -// @Route("/{version}/account/chat/memory", "GET") -// @Api(Description="Lists what the AI assistant remembers about this account.") -export class GetChatMemoryRequest extends RequestBase implements IReturn -{ - public projectId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetChatMemoryRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetChatMemoryResponse(); } -} - -/** @description Deletes one AI memory note ('forget this'). */ -// @Route("/{version}/account/chat/memory/{NoteId}", "DELETE") -// @Api(Description="Deletes one AI memory note ('forget this').") -export class ForgetChatMemoryRequest extends RequestBase implements IReturn -{ - public noteId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ForgetChatMemoryRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Deletes an AI chat session (soft delete). */ -// @Route("/{version}/account/chat/sessions/{SessionId}", "DELETE") -// @Api(Description="Deletes an AI chat session (soft delete).") -export class DeleteChatSessionRequest extends RequestBase implements IReturn -{ - public sessionId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteChatSessionRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Archives or unarchives an AI chat session. */ -// @Route("/{version}/account/chat/sessions/{SessionId}/archive", "PATCH") -// @Api(Description="Archives or unarchives an AI chat session.") -export class SetChatSessionArchivedRequest extends RequestBase implements IReturn -{ - public sessionId: string; - public archived: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetChatSessionArchivedRequest'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Pins or unpins an AI chat session. */ -// @Route("/{version}/account/chat/sessions/{SessionId}/pin", "PATCH") -// @Api(Description="Pins or unpins an AI chat session.") -export class SetChatSessionPinnedRequest extends RequestBase implements IReturn -{ - public sessionId: string; - public pinned: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetChatSessionPinnedRequest'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Marks or unmarks an AI chat session as "do not share". */ -// @Route("/{version}/account/chat/sessions/{SessionId}/sharing", "PATCH") -// @Api(Description="Marks or unmarks an AI chat session as \"do not share\".") -export class SetChatSessionSharingRequest extends RequestBase implements IReturn -{ - public sessionId: string; - public doNotShare: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetChatSessionSharingRequest'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Lists the account's recent AI chat sessions. */ -// @Route("/{version}/account/chat/sessions", "GET") -// @Api(Description="Lists the account's recent AI chat sessions.") -export class GetChatSessionsRequest extends RequestBase implements IReturn -{ - public take?: number; - public includeArchived?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetChatSessionsRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetChatSessionsResponse(); } -} - -/** @description Returns one AI chat session's conversation entries — the transcript. */ -// @Route("/{version}/account/chat/sessions/{SessionId}/entries", "GET") -// @Api(Description="Returns one AI chat session's conversation entries — the transcript.") -export class GetChatSessionEntriesRequest extends RequestBase implements IReturn -{ - public sessionId: string; - public sinceSeq?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetChatSessionEntriesRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetChatSessionEntriesResponse(); } -} - -/** @description Records like / dislike feedback on one AI chat entry, or clears it. */ -// @Route("/{version}/account/chat/sessions/{SessionId}/entries/{EntryId}/feedback", "POST") -// @Api(Description="Records like / dislike feedback on one AI chat entry, or clears it.") -export class SetChatEntryFeedbackRequest extends RequestBase implements IReturn -{ - public sessionId: string; - public entryId: string; - public feedback?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetChatEntryFeedbackRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Answers one open AI chat question — or a prepared change's Apply / Skip — and continues the conversation. */ -// @Route("/{version}/account/chat/sessions/{SessionId}/questions/{EntryId}/answer", "POST") -// @Api(Description="Answers one open AI chat question — or a prepared change's Apply / Skip — and continues the conversation.") -export class AnswerChatQuestionRequest extends RequestBase implements IReturn -{ - public sessionId: string; - public entryId: string; - public answers?: { [index:string]: string; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AnswerChatQuestionRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Approves or rejects a proposed AI chat plan. */ -// @Route("/{version}/account/chat/sessions/{SessionId}/plans/{EntryId}/decision", "POST") -// @Api(Description="Approves or rejects a proposed AI chat plan.") -export class DecideChatPlanRequest extends RequestBase implements IReturn -{ - public sessionId: string; - public entryId: string; - public decision: string; - public comment?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DecideChatPlanRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Stops one running step of an AI chat plan run. */ -// @Route("/{version}/account/chat/sessions/{SessionId}/steps/{EntryId}/stop", "POST") -// @Api(Description="Stops one running step of an AI chat plan run.") -export class StopChatRunStepRequest extends RequestBase implements IReturn -{ - public sessionId: string; - public entryId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'StopChatRunStepRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Runs one AI chat conversation turn. */ -// @Route("/{version}/account/chat/turn", "POST") -// @Api(Description="Runs one AI chat conversation turn.") -export class ChatTurnRequest extends RequestBase implements IReturn -{ - public sessionId?: string; - public message: string; - public profile?: string; - public topic?: string; - public llmIntegrationId?: string; - public model?: string; - public projectId?: string; - public env?: string; - public screenContext?: ChatScreenContextDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ChatTurnRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new ChatTurnResponse(); } -} - -/** @description Plans (preview) or builds (apply) a whole project from one spec. */ -// @Route("/{version}/account/ai/scaffold", "POST") -// @Api(Description="Plans (preview) or builds (apply) a whole project from one spec.") -export class ScaffoldProjectRequest extends RequestBase implements IReturn -{ - /** @description The project spec (a JSON object) — see the tool description. */ - // @ApiMember(Description="The project spec (a JSON object) — see the tool description.", IsRequired=true) - public spec: string; - - /** @description 'preview' (writes nothing) or 'apply' (builds the project). */ - // @ApiMember(Description="'preview' (writes nothing) or 'apply' (builds the project).", IsRequired=true) - public mode: string; - - public env?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ScaffoldProjectRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new ScaffoldProjectResponse(); } -} - -/** @description Validates a collection schema without saving it. */ -// @Route("/{version}/account/ai/schemas/validate", "POST") -// @Api(Description="Validates a collection schema without saving it.") -export class ValidateSchemaRequest extends RequestBase implements IReturn -{ - /** @description The schema as JSON — see the tool description. */ - // @ApiMember(Description="The schema as JSON — see the tool description.", IsRequired=true) - public schemaJson: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ValidateSchemaRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new ValidateSchemaResponse(); } -} - -/** @description Renders an email, push or SMS template with sample data. */ -// @Route("/{version}/account/ai/templates/render-preview", "POST") -// @Api(Description="Renders an email, push or SMS template with sample data.") -export class RenderTemplatePreviewRequest extends RequestBase implements IReturn, IHasEnv -{ - /** @description The project of templateId. Not needed to render a body. */ - // @ApiMember(Description="The project of templateId. Not needed to render a body.") - public projectId: string; - - public env?: string; - /** @description email | push | sms */ - // @ApiMember(Description="email | push | sms", IsRequired=true) - public channel: string; - - /** @description An existing template id (tmpl_…). Needs projectId. Leave empty to render body instead. */ - // @ApiMember(Description="An existing template id (tmpl_…). Needs projectId. Leave empty to render body instead.") - public templateId?: string; - - /** @description Razor template text to render when there is no templateId. */ - // @ApiMember(Description="Razor template text to render when there is no templateId.") - public body?: string; - - /** @description Email subject / push title / SMS subject to render with body. Optional. */ - // @ApiMember(Description="Email subject / push title / SMS subject to render with body. Optional.") - public subject?: string; - - /** @description Sample data as a JSON object, read by the template as @Model. */ - // @ApiMember(Description="Sample data as a JSON object, read by the template as @Model.") - public sampleData?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RenderTemplatePreviewRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RenderTemplatePreviewResponse(); } -} - -/** @description MCP server endpoint (Streamable HTTP): JSON-RPC 2.0 over POST, server stream over GET, session end over DELETE. */ -// @Route("/{version}/account/mcp", "POST") -// @Route("/{version}/account/mcp", "GET") -// @Route("/{version}/account/mcp", "DELETE") -// @Api(Description="MCP server endpoint (Streamable HTTP): JSON-RPC 2.0 over POST, server stream over GET, session end over DELETE.") -export class McpRequest implements IReturn -{ - public version?: string; - public toolsets?: string; - public requestStream: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'McpRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return ''; } -} - -/** @description Reads a project's AI Brief: the requirements, decisions and assumptions the assistant recorded from conversations, each with the chat turn, user and time it came from. */ -// @Route("/{version}/projects/{projectId}/ai/brief", "GET") -// @Api(Description="Reads a project's AI Brief: the requirements, decisions and assumptions the assistant recorded from conversations, each with the chat turn, user and time it came from.") -export class GetProjectBriefRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Return the Brief events after this sequence number as well (0 = all). Omit for the snapshot only. */ - // @ApiMember(Description="Return the Brief events after this sequence number as well (0 = all). Omit for the snapshot only.") - public sinceSeq?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetProjectBriefRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetProjectBriefResponse(); } -} - -/** @description Lists a project's AI work items: one serious ask each, with its goal, plans, changes, moved-out items, needs-you list and open questions. */ -// @Route("/{version}/projects/{projectId}/ai/work-items", "GET") -// @Api(Description="Lists a project's AI work items: one serious ask each, with its goal, plans, changes, moved-out items, needs-you list and open questions.") -export class GetWorkItemsRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Filter by status: proposed, active, waiting, done, partly-done or dropped. Omit for all. */ - // @ApiMember(Description="Filter by status: proposed, active, waiting, done, partly-done or dropped. Omit for all.") - public status?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetWorkItemsRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetWorkItemsResponse(); } -} - -/** @description Reads one AI work item: the six long-task sections and the definition-of-done verdict. */ -// @Route("/{version}/projects/{projectId}/ai/work-items/{WorkItemId}", "GET") -// @Api(Description="Reads one AI work item: the six long-task sections and the definition-of-done verdict.") -export class GetWorkItemRequest extends CodeMashRequestBase implements IReturn -{ - public workItemId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetWorkItemRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetWorkItemResponse(); } -} - -/** @description Exports one AI work item as markdown in the long-task shape: Goal, Plan, Changes, Rejected / moved out, Needs you, Open questions. */ -// @Route("/{version}/projects/{projectId}/ai/work-items/{WorkItemId}/export.md", "GET") -// @Api(Description="Exports one AI work item as markdown in the long-task shape: Goal, Plan, Changes, Rejected / moved out, Needs you, Open questions.") -export class ExportWorkItemRequest extends CodeMashRequestBase implements IReturn -{ - public workItemId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ExportWorkItemRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new ExportWorkItemResponse(); } -} - -/** @description Ticks one manual line of a work item's "Needs you" checklist — the one write a human makes to a work item directly. */ -// @Route("/{version}/projects/{projectId}/ai/work-items/{WorkItemId}/needs-you/{Index}/done", "POST") -// @Api(Description="Ticks one manual line of a work item's \"Needs you\" checklist — the one write a human makes to a work item directly.") -export class MarkNeedsYouDoneRequest extends CodeMashRequestBase implements IReturn -{ - public workItemId: string; - public index: number; - /** @description Set false to un-tick the line. Default true. */ - // @ApiMember(Description="Set false to un-tick the line. Default true.") - public done?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MarkNeedsYouDoneRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Save a trigger on an AI project event */ -// @Route("/{version}/ai/triggers", "POST") -// @Api(Description="Save a trigger on an AI project event") -// @DataContract -export class SaveAiProjectTrigger extends SaveTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveAiProjectTrigger'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -/** @description Gets the triggers on AI project events */ -// @Route("/{version}/ai/triggers", "GET") -// @Api(Description="Gets the triggers on AI project events") -export class GetAiProjectTriggers extends GetTriggers implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAiProjectTriggers'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAiTriggersResponse(); } -} - -/** @description Gets one trigger on an AI project event */ -// @Route("/{version}/ai/triggers/{id}", "GET") -// @Api(Description="Gets one trigger on an AI project event") -export class GetAiProjectTrigger extends GetTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAiProjectTrigger'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAiTriggerResponse(); } -} - -/** @description Enable a trigger on an AI project event */ -// @Route("/{version}/ai/triggers/{triggerId}/enable", "PATCH") -// @Api(Description="Enable a trigger on an AI project event") -// @DataContract -export class EnableAiProjectTrigger extends EnableTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableAiProjectTrigger'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Disable a trigger on an AI project event */ -// @Route("/{version}/ai/triggers/{triggerId}/disable", "PATCH") -// @Api(Description="Disable a trigger on an AI project event") -// @DataContract -export class DisableAiProjectTrigger extends DisableTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableAiProjectTrigger'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Delete a trigger on an AI project event */ -// @Route("/{version}/ai/triggers/{triggerId}", "DELETE") -// @Api(Description="Delete a trigger on an AI project event") -// @DataContract -export class DeleteAiProjectTrigger extends DeleteTrigger implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteAiProjectTrigger'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Starts a browser sign-in for the Norbix CLI (OAuth device authorization, RFC 8628): a device code for polling and a user code the person confirms on the dashboard. */ -// @Route("/{version}/auth/device/start", "POST") -// @Api(Description="Starts a browser sign-in for the Norbix CLI (OAuth device authorization, RFC 8628): a device code for polling and a user code the person confirms on the dashboard.") -export class AuthDeviceStartRequest extends RequestBase implements IReturn, INoSessionCookies -{ - /** @description Who asks, shown on the dashboard, e.g. "norbix-cli". 1–80 printable characters. */ - // @ApiMember(Description="Who asks, shown on the dashboard, e.g. \"norbix-cli\". 1–80 printable characters.", IsRequired=true) - public clientName: string; - - /** @description The computer name, shown on the dashboard and part of the AI service user's name (cleaned, at most 40 characters). */ - // @ApiMember(Description="The computer name, shown on the dashboard and part of the AI service user's name (cleaned, at most 40 characters).") - public deviceName?: string; - - /** @description The project the CLI wants to work in. It must be a project of the account of the person who allows the sign-in. */ - // @ApiMember(Description="The project the CLI wants to work in. It must be a project of the account of the person who allows the sign-in.") - public projectId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AuthDeviceStartRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AuthDeviceStartResponse(); } -} - -/** @description Polls a CLI browser sign-in (RFC 8628). Always HTTP 200: an error name (authorization_pending, slow_down, access_denied, expired_token, invalid_grant, invalid_request) or the tokens, once. */ -// @Route("/{version}/auth/device/token", "POST") -// @Api(Description="Polls a CLI browser sign-in (RFC 8628). Always HTTP 200: an error name (authorization_pending, slow_down, access_denied, expired_token, invalid_grant, invalid_request) or the tokens, once.") -export class AuthDeviceTokenRequest extends RequestBase implements IReturn, INoSessionCookies -{ - /** @description The deviceCode from POST /auth/device/start. */ - // @ApiMember(Description="The deviceCode from POST /auth/device/start.", IsRequired=true) - public deviceCode: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AuthDeviceTokenRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AuthDeviceTokenResponse(); } -} - -/** @description The dashboard screen for a CLI browser sign-in: the client and computer that asked, and the roles the signed-in person may give. */ -// @Route("/{version}/auth/device/consent", "GET") -// @Api(Description="The dashboard screen for a CLI browser sign-in: the client and computer that asked, and the roles the signed-in person may give.") -export class AuthDeviceConsentRequest extends RequestBase implements IReturn -{ - /** @description The code the terminal shows, XXXX-XXXX (case, spaces and the dash do not matter). */ - // @ApiMember(Description="The code the terminal shows, XXXX-XXXX (case, spaces and the dash do not matter).", IsRequired=true) - public userCode: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AuthDeviceConsentRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new AuthDeviceConsentResponse(); } -} - -/** @description The signed-in person's decision on a CLI browser sign-in: allow with Membership roles, or deny. */ -// @Route("/{version}/auth/device/consent", "POST") -// @Api(Description="The signed-in person's decision on a CLI browser sign-in: allow with Membership roles, or deny.") -export class AuthDeviceConsentDecisionRequest extends RequestBase implements IReturn -{ - /** @description The code the terminal shows, XXXX-XXXX. */ - // @ApiMember(Description="The code the terminal shows, XXXX-XXXX.", IsRequired=true) - public userCode: string; - - /** @description allow | deny. */ - // @ApiMember(Description="allow | deny.", IsRequired=true) - public decision: string; - - /** @description For allow: account role ids (acc_…_nr_…) to give. */ - // @ApiMember(Description="For allow: account role ids (acc_…_nr_…) to give.") - public accountRoleIds?: string[]; - - /** @description For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }]. */ - // @ApiMember(Description="For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }].") - public projectRoles?: AiProjectRoleIdsDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AuthDeviceConsentDecisionRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AuthDeviceConsentDecisionResponse(); } -} - -/** @description OAuth protected-resource metadata (RFC 9728) for the Hub MCP endpoint. */ -// @Route("/.well-known/oauth-protected-resource", "GET") -// @Route("/.well-known/oauth-protected-resource/{Path*}", "GET") -// @Api(Description="OAuth protected-resource metadata (RFC 9728) for the Hub MCP endpoint.") -export class OAuthProtectedResourceMetadataRequest implements IReturn, INoSessionCookies -{ - public path?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'OAuthProtectedResourceMetadataRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return ''; } -} - -/** @description OAuth authorization-server metadata (RFC 8414). */ -// @Route("/.well-known/oauth-authorization-server", "GET") -// @Route("/.well-known/oauth-authorization-server/{Path*}", "GET") -// @Api(Description="OAuth authorization-server metadata (RFC 8414).") -export class OAuthAuthorizationServerMetadataRequest implements IReturn, INoSessionCookies -{ - public path?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'OAuthAuthorizationServerMetadataRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return ''; } -} - -/** @description Registers an MCP client for OAuth (RFC 7591). Public clients only: PKCE, no secret. */ -// @Route("/{version}/oauth/register", "POST") -// @Api(Description="Registers an MCP client for OAuth (RFC 7591). Public clients only: PKCE, no secret.") -export class OAuthRegisterRequest implements IReturn, INoSessionCookies -{ - public version?: string; - public requestStream: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'OAuthRegisterRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return ''; } -} - -/** @description OAuth authorization endpoint: checks the request and redirects to the dashboard consent screen. */ -// @Route("/{version}/oauth/authorize", "GET") -// @Api(Description="OAuth authorization endpoint: checks the request and redirects to the dashboard consent screen.") -export class OAuthAuthorizeRequest implements IReturn, INoSessionCookies -{ - public version?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'OAuthAuthorizeRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return ''; } -} - -/** @description The dashboard consent screen for an AI tool: the client, where it returns to, and the roles the signed-in person may give. */ -// @Route("/{version}/oauth/consent", "GET") -// @Api(Description="The dashboard consent screen for an AI tool: the client, where it returns to, and the roles the signed-in person may give.") -export class OAuthConsentRequest extends RequestBase implements IReturn -{ - /** @description OAuth response_type from the authorize request (must be "code"). */ - // @ApiMember(Description="OAuth response_type from the authorize request (must be \"code\").") - public responseType?: string; - - /** @description OAuth client_id from the authorize request. */ - // @ApiMember(Description="OAuth client_id from the authorize request.") - public clientId?: string; - - /** @description OAuth redirect_uri from the authorize request. */ - // @ApiMember(Description="OAuth redirect_uri from the authorize request.") - public redirectUri?: string; - - /** @description PKCE code_challenge from the authorize request. */ - // @ApiMember(Description="PKCE code_challenge from the authorize request.") - public codeChallenge?: string; - - /** @description PKCE code_challenge_method from the authorize request (must be "S256"). */ - // @ApiMember(Description="PKCE code_challenge_method from the authorize request (must be \"S256\").") - public codeChallengeMethod?: string; - - /** @description OAuth state from the authorize request; returned to the client unchanged. */ - // @ApiMember(Description="OAuth state from the authorize request; returned to the client unchanged.") - public state?: string; - - /** @description OAuth resource (RFC 8707) from the authorize request. */ - // @ApiMember(Description="OAuth resource (RFC 8707) from the authorize request.") - public resource?: string; - - /** @description OAuth scope from the authorize request. */ - // @ApiMember(Description="OAuth scope from the authorize request.") - public scope?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'OAuthConsentRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new OAuthConsentResponse(); } -} - -/** @description The signed-in person's decision on the consent screen: allow with roles, or deny. Returns the address to send the browser to. */ -// @Route("/{version}/oauth/consent", "POST") -// @Api(Description="The signed-in person's decision on the consent screen: allow with roles, or deny. Returns the address to send the browser to.") -export class OAuthConsentDecisionRequest extends RequestBase implements IReturn -{ - /** @description OAuth response_type from the authorize request (must be "code"). */ - // @ApiMember(Description="OAuth response_type from the authorize request (must be \"code\").") - public responseType?: string; - - /** @description OAuth client_id from the authorize request. */ - // @ApiMember(Description="OAuth client_id from the authorize request.") - public clientId?: string; - - /** @description OAuth redirect_uri from the authorize request. */ - // @ApiMember(Description="OAuth redirect_uri from the authorize request.") - public redirectUri?: string; - - /** @description PKCE code_challenge from the authorize request. */ - // @ApiMember(Description="PKCE code_challenge from the authorize request.") - public codeChallenge?: string; - - /** @description PKCE code_challenge_method from the authorize request (must be "S256"). */ - // @ApiMember(Description="PKCE code_challenge_method from the authorize request (must be \"S256\").") - public codeChallengeMethod?: string; - - /** @description OAuth state from the authorize request; returned to the client unchanged. */ - // @ApiMember(Description="OAuth state from the authorize request; returned to the client unchanged.") - public state?: string; - - /** @description OAuth resource (RFC 8707) from the authorize request. */ - // @ApiMember(Description="OAuth resource (RFC 8707) from the authorize request.") - public resource?: string; - - /** @description OAuth scope from the authorize request. */ - // @ApiMember(Description="OAuth scope from the authorize request.") - public scope?: string; - - /** @description The consentTicket from GET /oauth/consent. */ - // @ApiMember(Description="The consentTicket from GET /oauth/consent.", IsRequired=true) - public consentTicket: string; - - /** @description allow | deny. */ - // @ApiMember(Description="allow | deny.", IsRequired=true) - public decision: string; - - /** @description For allow: account role ids (acc_…_nr_…) to give. */ - // @ApiMember(Description="For allow: account role ids (acc_…_nr_…) to give.") - public accountRoleIds?: string[]; - - /** @description For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }]. */ - // @ApiMember(Description="For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }].") - public projectRoles?: AiProjectRoleIdsDto[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'OAuthConsentDecisionRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new OAuthConsentDecisionResponse(); } -} - -/** @description OAuth token endpoint: authorization code (PKCE S256) or refresh token → access token. */ -// @Route("/{version}/oauth/token", "POST") -// @Api(Description="OAuth token endpoint: authorization code (PKCE S256) or refresh token → access token.") -export class OAuthTokenRequest implements IReturn, INoSessionCookies -{ - public version?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'OAuthTokenRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return ''; } -} - -/** @description OAuth token revocation (RFC 7009): revokes the grant behind a refresh or access token. */ -// @Route("/{version}/oauth/revoke", "POST") -// @Api(Description="OAuth token revocation (RFC 7009): revokes the grant behind a refresh or access token.") -export class OAuthRevokeRequest implements IReturn, INoSessionCookies -{ - public version?: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'OAuthRevokeRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return ''; } -} - -// @Route("/{version}/ai/integrations/embeddings/{Id}", "DELETE") -export class DeleteEmbeddingIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the embedding integration to delete. */ - // @ApiMember(Description="Id of the embedding integration to delete.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteEmbeddingIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/ai/integrations/embeddings/{Id}", "GET") -export class GetEmbeddingIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the embedding integration to fetch. */ - // @ApiMember(Description="Id of the embedding integration to fetch.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmbeddingIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmbeddingIntegrationResponse(); } -} - -// @Route("/{version}/ai/integrations/embeddings", "GET") -export class GetEmbeddingIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetEmbeddingIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetEmbeddingIntegrationsResponse(); } -} - -// @Route("/{version}/ai/integrations/embeddings", "POST") -// @DataContract -export class SaveEmbeddingIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: EmbeddingIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveEmbeddingIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/ai/integrations/embeddings/{Id}/test", "POST") -export class TestEmbeddingIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the embedding integration to test. */ - // @ApiMember(Description="Id of the embedding integration to test.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestEmbeddingIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestEmbeddingIntegrationResponse(); } -} - -// @Route("/{version}/ai/integrations/llms/{Id}", "DELETE") -export class DeleteLlmIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the LLM integration to delete. */ - // @ApiMember(Description="Id of the LLM integration to delete.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteLlmIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/ai/integrations/llms/{Id}/disable", "PUT") -export class DisableLlmIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the LLM integration to disable. */ - // @ApiMember(Description="Id of the LLM integration to disable.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableLlmIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/ai/integrations/llms/{Id}/enable", "PUT") -export class EnableLlmIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the LLM integration to enable. */ - // @ApiMember(Description="Id of the LLM integration to enable.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableLlmIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/ai/integrations/llms/{id}", "GET") -export class GetLlmIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the LLM integration to fetch. */ - // @ApiMember(Description="Id of the LLM integration to fetch.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLlmIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLlmIntegrationResponse(); } -} - -// @Route("/{version}/ai/integrations/llms/integrations", "GET") -export class GetLlmIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLlmIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLlmIntegrationsResponse(); } -} - -// @Route("/{version}/ai/integrations/llms/", "POST") -// @DataContract -export class SaveLlmIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: LlmIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveLlmIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/ai/integrations/llms/{Id}/default", "PUT") -export class SetLlmIntegrationAsDefaultRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the LLM integration to make the default. */ - // @ApiMember(Description="Id of the LLM integration to make the default.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetLlmIntegrationAsDefaultRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/ai/integrations/llms/test", "POST") -export class TestLlmIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the LLM integration to test. */ - // @ApiMember(Description="Id of the LLM integration to test.") - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestLlmIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestLlmIntegrationResponse(); } -} - -// @Route("/{version}/ai/integrations/mcp/{Id}", "DELETE") -export class DeleteMcpIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the MCP integration to delete. */ - // @ApiMember(Description="Id of the MCP integration to delete.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteMcpIntegrationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/ai/integrations/mcp/{Id}/disable", "PUT") -export class DisableMcpIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the MCP integration to disable. */ - // @ApiMember(Description="Id of the MCP integration to disable.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableMcpIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/ai/integrations/mcp/{Id}/enable", "PUT") -export class EnableMcpIntegrationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the MCP integration to enable. */ - // @ApiMember(Description="Id of the MCP integration to enable.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableMcpIntegrationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/ai/integrations/mcp/{id}", "GET") -export class GetMcpIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the MCP integration to fetch. */ - // @ApiMember(Description="Id of the MCP integration to fetch.") - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMcpIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMcpIntegrationResponse(); } -} - -// @Route("/{version}/ai/integrations/mcp/integrations", "GET") -export class GetMcpIntegrations extends CodeMashListPaginationRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetMcpIntegrations'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetMcpIntegrationsResponse(); } -} - -// @Route("/{version}/ai/integrations/mcp/", "POST") -// @DataContract -export class SaveMcpIntegration extends CodeMashRequestBase implements IReturn -{ - // @DataMember(Name="integration") - public integration: McpIntegrationRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveMcpIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/ai/integrations/mcp/test", "POST") -export class TestMcpIntegration extends CodeMashRequestBase implements IReturn -{ - /** @description Id of the MCP integration to test. */ - // @ApiMember(Description="Id of the MCP integration to test.") - public integrationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'TestMcpIntegration'; } - public getMethod() { return 'POST'; } - public createResponse() { return new TestLlmIntegrationResponse(); } -} - -/** @description Gets the project's webhook integration */ -// @Route("/{version}/webhooks/integration", "GET") -// @Api(Description="Gets the project's webhook integration") -export class GetWebhookIntegration extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetWebhookIntegration'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetWebhookIntegrationResponse(); } -} - -// @Route("/{version}/webhooks/integration/secret", "GET") -export class RevealWebhookIntegrationSecretRequest extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RevealWebhookIntegrationSecretRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new RevealWebhookIntegrationSecretResponse(); } -} - -// @Route("/{version}/webhooks/integration/secret/rotate", "POST") -export class RotateWebhookIntegrationSecretRequest extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RotateWebhookIntegrationSecretRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RotateWebhookIntegrationSecretResponse(); } -} - -// @Route("/{version}/webhooks/integration/extra-headers", "PUT") -export class UpdateWebhookIntegrationExtraHeadersRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The integration-wide static headers to send with every delivery. Pass an empty dictionary to clear all extra headers. */ - // @ApiMember(Description="The integration-wide static headers to send with every delivery. Pass an empty dictionary to clear all extra headers.") - public extraHeaders?: { [index:string]: string; }; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateWebhookIntegrationExtraHeadersRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/webhooks/{source}/{integrationInstanceId}", "POST") -export class ReceiveWebhook implements IReturnVoid -{ - public version?: string; - public source: string; - public integrationInstanceId: string; - public requestStream: string; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'ReceiveWebhook'; } - public getMethod() { return 'POST'; } - public createResponse() {} -} - -// @Route("/{version}/webhooks/destinations/{DestinationId}/disable", "PUT") -export class DisableWebhookDestinationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The webhook destination id to disable, from get_webhook_integration. */ - // @ApiMember(Description="The webhook destination id to disable, from get_webhook_integration.", IsRequired=true) - public destinationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableWebhookDestinationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/webhooks/destinations/{DestinationId}/enable", "PUT") -export class EnableWebhookDestinationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The webhook destination id to enable, from get_webhook_integration. */ - // @ApiMember(Description="The webhook destination id to enable, from get_webhook_integration.", IsRequired=true) - public destinationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableWebhookDestinationRequest'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/webhooks/destinations/{DestinationId}", "DELETE") -export class RemoveWebhookDestinationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The webhook destination id to remove, from get_webhook_integration. */ - // @ApiMember(Description="The webhook destination id to remove, from get_webhook_integration.", IsRequired=true) - public destinationId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RemoveWebhookDestinationRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/webhooks/destinations", "POST") -export class SaveWebhookDestinationRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Existing destination id to overwrite, from get_webhook_integration. Omit to create a new destination. */ - // @ApiMember(Description="Existing destination id to overwrite, from get_webhook_integration. Omit to create a new destination.") - public destinationId?: string; - - /** @description Display name for the destination. */ - // @ApiMember(Description="Display name for the destination.", IsRequired=true) - public destinationName: string; - - /** @description The HTTPS endpoint URL that will receive the webhook deliveries. */ - // @ApiMember(Description="The HTTPS endpoint URL that will receive the webhook deliveries.", IsRequired=true) - public endpointUrl: string; - - /** @description The event names this destination subscribes to. Empty subscribes to none. */ - // @ApiMember(Description="The event names this destination subscribes to. Empty subscribes to none.") - public selectedEvents: string[] = []; - - /** @description Destination-specific static headers sent with every delivery to this destination. These win over the integration-wide extra headers on duplicate keys. */ - // @ApiMember(Description="Destination-specific static headers sent with every delivery to this destination. These win over the integration-wide extra headers on duplicate keys.") - public extraHeaders?: { [index:string]: string; }; - - /** @description Whether this destination is enabled for delivery. Defaults to true. */ - // @ApiMember(Description="Whether this destination is enabled for delivery. Defaults to true.") - public isEnabled: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveWebhookDestinationRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new SaveWebhookDestinationResponse(); } -} - -// @Route("/{version}/scheduler/disable", "PUT") -export class DisableScheduler extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableScheduler'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/scheduler/enable", "PUT") -export class EnableScheduler extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableScheduler'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/scheduler/tasks/{Id}", "DELETE") -export class DeleteSchedulerTask extends CodeMashRequestBase implements IReturn -{ - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteSchedulerTask'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/scheduler/tasks/{Id}/disable", "PUT") -export class DisableSchedulerTask extends CodeMashRequestBase implements IReturn -{ - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DisableSchedulerTask'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/scheduler/tasks/{Id}/enable", "PUT") -export class EnableSchedulerTask extends CodeMashRequestBase implements IReturn -{ - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'EnableSchedulerTask'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Gets a scheduled task by id */ -// @Route("/{version}/scheduler/tasks/{id}", "GET") -// @Api(Description="Gets a scheduled task by id") -export class GetSchedulerTask extends CodeMashRequestBase implements IReturn -{ - public id: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSchedulerTask'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSchedulerTaskResponse(); } -} - -/** @description Gets scheduled tasks */ -// @Route("/{version}/scheduler/tasks", "GET") -// @Api(Description="Gets scheduled tasks") -export class GetSchedulerTasks extends CodeMashListPaginationRequestBase implements IReturn -{ - /** @description Optional filter — only return tasks of this type. */ - // @ApiMember(Description="Optional filter — only return tasks of this type.") - public type?: SchedulerTaskType; - - /** @description Optional filter — only return tasks whose enabled state matches this value. */ - // @ApiMember(Description="Optional filter — only return tasks whose enabled state matches this value.") - public enabled?: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSchedulerTasks'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSchedulerTasksResponse(); } -} - -/** @description Gets the latest runs of a scheduled task */ -// @Route("/{version}/scheduler/tasks/{id}/runs", "GET") -// @Api(Description="Gets the latest runs of a scheduled task") -export class GetSchedulerTaskRuns extends CodeMashRequestBase implements IReturn -{ - public id: string; - /** @description How many runs to return, newest first: 1-50. Default 10. */ - // @ApiMember(DataType="integer", Description="How many runs to return, newest first: 1-50. Default 10.", Name="take", ParameterType="query") - public take?: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSchedulerTaskRuns'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSchedulerTaskRunsResponse(); } -} - -/** @description Save scheduled task */ -// @Route("/{version}/scheduler/tasks", "POST") -// @Api(Description="Save scheduled task") -// @DataContract -export class SaveSchedulerTaskRequest extends CodeMashRequestBase implements IReturn -{ - // @DataMember - public taskId?: string; - - // @DataMember - public name: string; - - // @DataMember - public description?: string; - - // @DataMember - public cron: string; - - // @DataMember - public initiatorUserId: string; - - // @DataMember - public isEnabled: boolean; - - // @DataMember - public stopOnError: boolean; - - // @DataMember - public endsAtUnix?: number; - - // @DataMember - public task: SchedulerTaskRequest; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveSchedulerTaskRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/resources/resolve", "POST") -export class ResolveResources extends CodeMashRequestBase implements IReturn -{ - public refs: IReadOnlyList; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ResolveResources'; } - public getMethod() { return 'POST'; } - public createResponse() { return new ResolveResourcesResponse(); } -} - -/** @description Sets or removes one user's own end-user AI plan */ -// @Route("/{version}/membership/users/{userId}/ai-plan", "PUT") -// @Api(Description="Sets or removes one user's own end-user AI plan") -export class SetUserAiPlan extends CodeMashRequestBase implements IReturn -{ - /** @description The human user id (ct_…). */ - // @ApiMember(Description="The human user id (ct_…).", IsRequired=true) - public userId: string; - - /** @description The plan id (aip_…). Empty removes the user's own plan. */ - // @ApiMember(Description="The plan id (aip_…). Empty removes the user's own plan.") - public planId?: string; - - /** @description Database integration id. Optional — defaults to the request environment's default integration. */ - // @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - public databaseIntegrationId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SetUserAiPlan'; } - public getMethod() { return 'PUT'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Create a contact */ -// @Route("/{version}/membership/users", "POST") -// @Api(Description="Create a contact") -export class CreateContactRequest extends CodeMashRequestBase implements IReturn -{ - /** @description Primary email address of the contact (optional if a phone is given). */ - // @ApiMember(Description="Primary email address of the contact (optional if a phone is given).") - public primaryEmail?: string; - - /** @description Primary phone number in international format, e.g. +14155550123 (optional if an email is given). */ - // @ApiMember(Description="Primary phone number in international format, e.g. +14155550123 (optional if an email is given).") - public primaryPhone?: string; - - /** @description Display name shown in the dashboard (optional). */ - // @ApiMember(Description="Display name shown in the dashboard (optional).") - public displayName?: string; - - /** @description Contact's first name (optional). */ - // @ApiMember(Description="Contact's first name (optional).") - public firstName?: string; - - /** @description Contact's last name (optional). */ - // @ApiMember(Description="Contact's last name (optional).") - public lastName?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CreateContactRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Archive a contact */ -// @Route("/{version}/membership/users/{contactId}", "DELETE") -// @Api(Description="Archive a contact") -export class DeleteContact extends CodeMashRequestBase implements IReturn -{ - /** @description The contact id (ct_…) to archive. Get it from get_all_contacts. */ - // @ApiMember(Description="The contact id (ct_…) to archive. Get it from get_all_contacts.", IsRequired=true) - public contactId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeleteContact'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Get a contact */ -// @Route("/{version}/membership/users/{contactId}", "GET") -// @Api(Description="Get a contact") -export class GetContact extends CodeMashRequestBase implements IReturn -{ - /** @description The contact id (ct_…) to fetch, or a login id (usr_…) — then the contact that owns that login is returned. Get it from get_all_contacts. */ - // @ApiMember(Description="The contact id (ct_…) to fetch, or a login id (usr_…) — then the contact that owns that login is returned. Get it from get_all_contacts.", IsRequired=true) - public contactId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetContact'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetContactResponse(); } -} - -/** @description List contacts */ -// @Route("/{version}/membership/users", "GET") -// @Api(Description="List contacts") -export class GetAllContacts extends CodeMashRequestBase implements IReturn -{ - /** @description Cursor for the next page: pass the nextCursor from the previous call. Omit for the first page. */ - // @ApiMember(Description="Cursor for the next page: pass the nextCursor from the previous call. Omit for the first page.") - public startingAfter?: string; - - /** @description How many contacts to return per page (default 50). */ - // @ApiMember(Description="How many contacts to return per page (default 50).") - public pageSize?: number; - - /** @description Free text, case-insensitive: matches the email, phone, display / first / last / full name, or any login's user name or email. */ - // @ApiMember(Description="Free text, case-insensitive: matches the email, phone, display / first / last / full name, or any login's user name or email.") - public search?: string; - - /** @description Case-insensitive part of the email (primary email or any login's email). */ - // @ApiMember(Description="Case-insensitive part of the email (primary email or any login's email).") - public email?: string; - - /** @description Case-insensitive part of any login's user name. */ - // @ApiMember(Description="Case-insensitive part of any login's user name.") - public userName?: string; - - /** @description Login status names, any of: Registered, PendingValidation, Active, Unregistered, Suspended, InActive, Blocked. */ - // @ApiMember(Description="Login status names, any of: Registered, PendingValidation, Active, Unregistered, Suspended, InActive, Blocked.") - public statuses?: string[]; - - /** @description Login type names, any of: Service, Email, UserName, Phone, Guest, Social. */ - // @ApiMember(Description="Login type names, any of: Service, Email, UserName, Phone, Guest, Social.") - public types?: string[]; - - /** @description Composite project-role ids (pr_{project}_nr_{role}); the contact holds any of them. */ - // @ApiMember(Description="Composite project-role ids (pr_{project}_nr_{role}); the contact holds any of them.") - public roleNames?: string[]; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAllContacts'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAllContactsResponse(); } -} - -/** @description Merge contacts */ -// @Route("/{version}/membership/users/merge", "POST") -// @Api(Description="Merge contacts") -export class MergeContactsRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The contact id (ct_…) that will remain after the merge (the survivor). */ - // @ApiMember(Description="The contact id (ct_…) that will remain after the merge (the survivor).", IsRequired=true) - public survivorId: string; - - /** @description The contact ids (ct_…) to merge into the survivor and archive. At least one. */ - // @ApiMember(Description="The contact ids (ct_…) to merge into the survivor and archive. At least one.", IsRequired=true) - public mergedIds: string[] = []; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'MergeContactsRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Repair contact roles from their logins */ -// @Route("/{version}/membership/users/repair-roles", "POST") -// @Api(Description="Repair contact roles from their logins") -export class RepairContactRolesRequest extends CodeMashRequestBase implements IReturn -{ - /** @description True (default) = only count what would change. False = write. */ - // @ApiMember(Description="True (default) = only count what would change. False = write.") - public dryRun: boolean; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RepairContactRolesRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RepairContactRolesResponse(); } -} - -/** @description Update a contact */ -// @Route("/{version}/membership/users/{contactId}", "PATCH") -// @Api(Description="Update a contact") -export class UpdateContactRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The contact id (ct_…) to update. Get it from get_all_contacts. */ - // @ApiMember(Description="The contact id (ct_…) to update. Get it from get_all_contacts.", IsRequired=true) - public contactId: string; - - /** @description Display name shown in the dashboard. */ - // @ApiMember(Description="Display name shown in the dashboard.") - public displayName?: string; - - /** @description First name. */ - // @ApiMember(Description="First name.") - public firstName?: string; - - /** @description Last name. */ - // @ApiMember(Description="Last name.") - public lastName?: string; - - /** @description Full name (overrides first/last when set). */ - // @ApiMember(Description="Full name (overrides first/last when set).") - public fullName?: string; - - /** @description Company or organisation name. */ - // @ApiMember(Description="Company or organisation name.") - public company?: string; - - /** @description Free-text internal notes about the contact. */ - // @ApiMember(Description="Free-text internal notes about the contact.") - public notes?: string; - - /** @description Gender: Male, Female or Other. */ - // @ApiMember(Description="Gender: Male, Female or Other.") - public gender?: string; - - /** @description Birth date as a unix timestamp in MILLISECONDS (UTC). */ - // @ApiMember(Description="Birth date as a unix timestamp in MILLISECONDS (UTC).") - public birthDate?: number; - - /** @description IANA time zone id, e.g. Europe/Vilnius. */ - // @ApiMember(Description="IANA time zone id, e.g. Europe/Vilnius.") - public timeZone?: string; - - /** @description Preferred language/locale code, e.g. en or en-US. */ - // @ApiMember(Description="Preferred language/locale code, e.g. en or en-US.") - public language?: string; - - /** @description Address line 1 (street). */ - // @ApiMember(Description="Address line 1 (street).") - public addressLine1?: string; - - /** @description Address line 2 (apartment, suite, etc.). */ - // @ApiMember(Description="Address line 2 (apartment, suite, etc.).") - public addressLine2?: string; - - /** @description Country name or code. */ - // @ApiMember(Description="Country name or code.") - public country?: string; - - /** @description City. */ - // @ApiMember(Description="City.") - public city?: string; - - /** @description State, region or province. */ - // @ApiMember(Description="State, region or province.") - public state?: string; - - /** @description Postal or ZIP code. */ - // @ApiMember(Description="Postal or ZIP code.") - public postalCode?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'UpdateContactRequest'; } - public getMethod() { return 'PATCH'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Link a login to a contact */ -// @Route("/{version}/membership/users/{contactId}/identities", "POST") -// @Api(Description="Link a login to a contact") -export class AddContactIdentityRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The contact id (ct_…) to link the login to. */ - // @ApiMember(Description="The contact id (ct_…) to link the login to.", IsRequired=true) - public contactId: string; - - /** @description The login (identity) id (usr_…) to link to the contact. */ - // @ApiMember(Description="The login (identity) id (usr_…) to link to the contact.", IsRequired=true) - public authId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AddContactIdentityRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Make a login the contact's primary */ -// @Route("/{version}/membership/users/{contactId}/identities/{authId}/promote", "POST") -// @Api(Description="Make a login the contact's primary") -export class PromoteContactIdentityRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The contact id (ct_…) whose login is being promoted. */ - // @ApiMember(Description="The contact id (ct_…) whose login is being promoted.", IsRequired=true) - public contactId: string; - - /** @description The linked login (identity) id (usr_…) to make primary. */ - // @ApiMember(Description="The linked login (identity) id (usr_…) to make primary.", IsRequired=true) - public authId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PromoteContactIdentityRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -/** @description Unlink a login from a contact */ -// @Route("/{version}/membership/users/{contactId}/identities/{authId}", "DELETE") -// @Api(Description="Unlink a login from a contact") -export class RemoveContactIdentityRequest extends CodeMashRequestBase implements IReturn -{ - /** @description The contact id (ct_…) to unlink the login from. */ - // @ApiMember(Description="The contact id (ct_…) to unlink the login from.", IsRequired=true) - public contactId: string; - - /** @description The login (identity) id (usr_…) to unlink from the contact. */ - // @ApiMember(Description="The login (identity) id (usr_…) to unlink from the contact.", IsRequired=true) - public authId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RemoveContactIdentityRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/settings", "GET") -export class GetComplianceSettings extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetComplianceSettings'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetComplianceSettingsResponse(); } -} - -// @Route("/{version}/compliance/retention", "DELETE") -export class RemoveRetentionWindowRequest extends CodeMashRequestBase implements IReturn -{ - public dataKind: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RemoveRetentionWindowRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/retention", "POST") -export class SaveRetentionWindowRequest extends CodeMashRequestBase implements IReturn -{ - public dataKind: string; - public days: number; - public action: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveRetentionWindowRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/regimes", "POST") -export class AssignRegimeRequest extends CodeMashRequestBase implements IReturn -{ - public regime: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AssignRegimeRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/regimes", "DELETE") -export class ClearRegimeRequest extends CodeMashRequestBase implements IReturn -{ - public regime: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ClearRegimeRequest'; } - public getMethod() { return 'DELETE'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/purposes", "POST") -export class DefineConsentPurposeRequest extends CodeMashRequestBase implements IReturn -{ - public key: string; - public name: string; - public channel: string; - public mappedTags: string[] = []; - public regulatoryBasis: string[] = []; - public description?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DefineConsentPurposeRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/purposes/deprecate", "POST") -export class DeprecateConsentPurposeRequest extends CodeMashRequestBase implements IReturn -{ - public key: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'DeprecateConsentPurposeRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/holds", "GET") -export class GetLegalHolds extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetLegalHolds'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetLegalHoldsResponse(); } -} - -// @Route("/{version}/compliance/holds", "POST") -export class PlaceLegalHoldRequest extends CodeMashRequestBase implements IReturn -{ - public subjectKind: string; - public subjectId: string; - public reason: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'PlaceLegalHoldRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/holds/release", "POST") -export class ReleaseLegalHoldRequest extends CodeMashRequestBase implements IReturn -{ - public holdId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ReleaseLegalHoldRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/dsar/approve", "POST") -export class ApproveDsarRequestRequest extends CodeMashRequestBase implements IReturn -{ - public requestId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ApproveDsarRequestRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/dsar/reject", "POST") -export class RejectDsarRequestRequest extends CodeMashRequestBase implements IReturn -{ - public requestId: string; - public reason: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RejectDsarRequestRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/dsar", "GET") -export class GetDsarRequests extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDsarRequests'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDsarRequestsResponse(); } -} - -// @Route("/{version}/compliance/dsar", "POST") -export class OpenDsarRequestRequest extends CodeMashRequestBase implements IReturn -{ - public subjectKind: string; - public subjectId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'OpenDsarRequestRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/audit", "GET") -export class GetComplianceAuditLog extends CodeMashRequestBase implements IReturn -{ - public from?: string; - public to?: string; - public subjectKind?: string; - public subjectId?: string; - public limit: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetComplianceAuditLog'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetComplianceAuditLogResponse(); } -} - -// @Route("/{version}/compliance/account", "GET") -export class GetAccountCompliance extends RequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccountCompliance'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetAccountComplianceResponse(); } -} - -// @Route("/{version}/compliance/account/dsar-policy", "POST") -export class SaveDsarPolicyRequest extends RequestBase implements IReturn -{ - public mode: string; - public delayDays: number; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveDsarPolicyRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/compliance/account/incident-routing", "POST") -export class SaveIncidentRoutingRequest extends RequestBase implements IReturn -{ - public autoForwardAdvisories: boolean; - public securityContact?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'SaveIncidentRoutingRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/support/cases/{CaseId}/close", "POST") -export class CloseSupportCaseRequest extends RequestBase implements IReturn -{ - public caseId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'CloseSupportCaseRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/support/cases/{CaseId}/reopen", "POST") -export class ReopenSupportCaseRequest extends RequestBase implements IReturn -{ - public caseId: string; - public reason: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ReopenSupportCaseRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/support/cases/{CaseId}/resolve", "POST") -export class ResolveSupportCaseRequest extends RequestBase implements IReturn -{ - public caseId: string; - public resolution?: CaseResolutionDto; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ResolveSupportCaseRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new EmptyResponse(); } -} - -// @Route("/{version}/support/cases/{CaseId}/messages", "POST") -export class AppendSupportCaseMessageRequest extends RequestBase implements IReturn -{ - public caseId: string; - public message: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'AppendSupportCaseMessageRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/support/cases/{CaseId}", "GET") -export class GetSupportCase extends RequestBase implements IReturn -{ - public caseId: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSupportCase'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSupportCaseResponse(); } -} - -// @Route("/{version}/support/cases", "GET") -export class GetSupportCases extends RequestBase implements IReturn -{ - public pagingArgs?: PagingArgs; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetSupportCases'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetSupportCasesResponse(); } -} - -// @Route("/{version}/support/cases", "POST") -export class OpenSupportCaseRequest extends RequestBase implements IReturn -{ - public kind: string; - public severity: string; - public subject: string; - public message: string; - public projectId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'OpenSupportCaseRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new IdResponse(); } -} - -// @Route("/{version}/diagnostics/packs", "GET") -export class GetDiagnosticPacks extends CodeMashRequestBase implements IReturn -{ - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDiagnosticPacks'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDiagnosticPacksResponse(); } -} - -// @Route("/{version}/diagnostics/packs/{PackName}/run", "POST") -export class RunDiagnosticPackRequest extends CodeMashRequestBase implements IReturn -{ - public packName: string; - public packVersion?: number; - public caseId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RunDiagnosticPackRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RunDiagnosticPackResponse(); } -} - -// @Route("/{version}/diagnostics/echo", "GET") -export class GetDiagnosticEcho extends CodeMashRequestBase implements IReturn -{ - public caseId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'GetDiagnosticEcho'; } - public getMethod() { return 'GET'; } - public createResponse() { return new GetDiagnosticEchoResponse(); } -} - -// @Route("/{version}/diagnostics/events", "GET") -export class ReadDiagnosticEventsRequest extends CodeMashRequestBase implements IReturn -{ - public stream: string; - public from: number; - public count: number; - public caseId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'ReadDiagnosticEventsRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new ReadDiagnosticEventsResponse(); } -} - -// @Route("/{version}/diagnostics/logs", "GET") -export class QueryDiagnosticLogsRequest extends CodeMashListPaginationRequestBase implements IReturn -{ - public level?: string; - public module?: string; - public logCorrelationId?: string; - public eventCode?: string; - public search?: string; - public fromUtc?: string; - public toUtc?: string; - public caseId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'QueryDiagnosticLogsRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new QueryDiagnosticLogsResponse(); } -} - -// @Route("/{version}/diagnostics/redis", "GET") -export class InspectDiagnosticRedisRequest extends CodeMashRequestBase implements IReturn -{ - public keyPattern: string; - public caseId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'InspectDiagnosticRedisRequest'; } - public getMethod() { return 'GET'; } - public createResponse() { return new InspectDiagnosticRedisResponse(); } -} - -// @Route("/{version}/diagnostics/health/{CheckId}", "POST") -export class RunDiagnosticHealthCheckRequest extends CodeMashRequestBase implements IReturn -{ - public checkId: string; - public caseId?: string; - - public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } - public getTypeName() { return 'RunDiagnosticHealthCheckRequest'; } - public getMethod() { return 'POST'; } - public createResponse() { return new RunDiagnosticHealthCheckResponse(); } -} - -/** @description Sign In */ -// @Route("/auth", "GET,POST") -// @Route("/auth/{provider}", "GET,POST") -// @Route("/v3/auth", "POST,GET,OPTIONS") -// @Route("/v3/auth/{provider}", "POST,GET,OPTIONS") -// @Route("/v3/staff/auth", "POST,GET,OPTIONS") -// @Route("/v3/staff/auth/{provider}", "POST,GET,OPTIONS") -// @Api(Description="Sign In") -// @DataContract -export class Authenticate implements IReturn, IPost -{ - /** @description AuthProvider, e.g. credentials */ - // @DataMember(Order=1) - public provider?: string; - - // @DataMember(Order=2) - public userName?: string; - - // @DataMember(Order=3) - public password?: string; - - // @DataMember(Order=4) - public rememberMe?: boolean; - - // @DataMember(Order=5) - public accessToken?: string; - - // @DataMember(Order=6) - public accessTokenSecret?: string; - - // @DataMember(Order=7) - public returnUrl?: string; - - // @DataMember(Order=8) - public errorView?: string; - - // @DataMember(Order=9) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'Authenticate'; } - public getMethod() { return 'POST'; } - public createResponse() { return new AuthenticateResponse(); } -} - -// @Route("/access-token") -// @DataContract -export class GetAccessToken implements IReturn, IPost -{ - // @DataMember(Order=1) - public refreshToken?: string; - - // @DataMember(Order=2) - public meta?: { [index:string]: string; }; - - public constructor(init?: Partial) { (Object as any).assign(this, init); } - public getTypeName() { return 'GetAccessToken'; } - public getMethod() { return 'POST'; } - public createResponse() { return new GetAccessTokenResponse(); } -} - diff --git a/references/hub_dtos.py b/references/hub_dtos.py deleted file mode 100644 index a8c0281..0000000 --- a/references/hub_dtos.py +++ /dev/null @@ -1,19772 +0,0 @@ -""" Options: -Date: 2026-10-19 11:26:14 -Version: 10.20 -Tip: To override a DTO option, remove "#" prefix before updating -BaseUrl: http://localhost:5001 - -#GlobalNamespace: -#AddServiceStackTypes: True -#AddResponseStatus: False -#AddImplicitVersion: -#AddDescriptionAsComments: True -#IncludeTypes: -#ExcludeTypes: -#DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum -#DataClass: -#DataClassJson: -""" - -import datetime -import decimal -from marshmallow.fields import * -from servicestack import * -from typing import * -from dataclasses import dataclass, field -from dataclasses_json import dataclass_json, LetterCase, Undefined, config -from enum import Enum, IntEnum -Object = TypeVar('Object') - - -class EmailProvider(str, Enum): - SMTP = 'Smtp' - SEND_GRID = 'SendGrid' - MAIL_GUN = 'MailGun' - AWS_SES = 'AwsSes' - FAKE = 'Fake' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[EmailProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - email_address: Optional[str] = None - email_sender_name: Optional[str] = None - - -class SmtpPorts(IntEnum): - DEFAULT = 25 - SSL = 465 - TLS = 587 - FALLBACK = 2525 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmtpEmailIntegrationRequest(EmailIntegrationRequest): - provider: Optional[EmailProvider] = None - domain: Optional[str] = None - port: Optional[SmtpPorts] = None - user_name: Optional[str] = None - password: Optional[str] = None - - -class AwsIntegrationType(str, Enum): - IAM = 'Iam' - CROSS_ACCOUNT_ROLE = 'CrossAccountRole' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsSesEmailIntegrationRequest(EmailIntegrationRequest): - provider: Optional[EmailProvider] = None - integration_type: Optional[AwsIntegrationType] = None - aws_region: Optional[str] = None - email_identity_arn: Optional[str] = None - configuration_set: Optional[str] = None - role_arn: Optional[str] = None - external_id: Optional[str] = None - access_key: Optional[str] = None - secret_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SendGridEmailIntegrationRequest(EmailIntegrationRequest): - provider: Optional[EmailProvider] = None - api_key: Optional[str] = None - - -class MailGunRegion(str, Enum): - US = 'Us' - EU = 'Eu' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MailGunEmailIntegrationRequest(EmailIntegrationRequest): - provider: Optional[EmailProvider] = None - domain: Optional[str] = None - api_key: Optional[str] = None - webhook_signing_key: Optional[str] = None - region: Optional[MailGunRegion] = None - - -class EmailCampaignRecipientsSourceTypes(str, Enum): - ALL_USERS = 'AllUsers' - SPECIFIED_USERS = 'SpecifiedUsers' - ACCOUNT_USERS = 'AccountUsers' - EMAIL = 'Email' - COLLECTION = 'Collection' - - -class TokenMappingResolverType(str, Enum): - NOT_SET = 'NotSet' - CUSTOM = 'Custom' - PROJECT = 'Project' - PROJECT_SOCIALS = 'ProjectSocials' - INITIATOR = 'Initiator' - RECIPIENT = 'Recipient' - SCHEMA_RECORD = 'SchemaRecord' - TARGET_USER = 'TargetUser' - TAG_DEFINITIONS = 'TagDefinitions' - EMAIL_SIGNATURES = 'EmailSignatures' - CAMPAIGN = 'Campaign' - TEMPLATE = 'Template' - EMAIL_FOOTERS = 'EmailFooters' - OLD = 'Old' - NEW = 'New' - REQUEST_INPUT = 'RequestInput' - INTEGRATION_CONFIG = 'IntegrationConfig' - INTEGRATION_SECRET = 'IntegrationSecret' - - -class SecretValueFormat(str, Enum): - RAW = 'Raw' - BEARER = 'Bearer' - BASIC = 'Basic' - PREFIXED = 'Prefixed' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TokenMappingDto: - key: Optional[str] = None - value: Optional[str] = None - resolver: Optional[TokenMappingResolverType] = None - secret_keys: Optional[List[str]] = None - secret_format: Optional[SecretValueFormat] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailCampaignRequest: - source: Optional[EmailCampaignRecipientsSourceTypes] = None - template_id: Optional[str] = None - integration_id: Optional[str] = None - validation_integration_id: Optional[str] = None - language: Optional[str] = None - initiator_id: Optional[str] = None - notes: Optional[str] = None - mapped_tokens: Optional[List[TokenMappingDto]] = None - campaign_time: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailToAllUsersDeliverySettingsRequest(EmailCampaignRequest): - source: Optional[EmailCampaignRecipientsSourceTypes] = None - roles_names: Optional[List[str]] = None - user_tags: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailToAccountUsersDeliverySettingsRequest(EmailCampaignRequest): - source: Optional[EmailCampaignRecipientsSourceTypes] = None - user_recipients: List[str] = field(default_factory=list) - user_cc: Optional[List[str]] = None - user_bcc: Optional[List[str]] = None - single_email_strategy: bool = False - - -class CollectionEmailCampaignRecipientField(str, Enum): - USER = 'User' - EMAIL = 'Email' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailToCollectionRecordsDeliverySettingsRequest(EmailCampaignRequest): - source: Optional[EmailCampaignRecipientsSourceTypes] = None - fields: List[str] = field(default_factory=list) - schema_name: Optional[str] = None - field_type: Optional[CollectionEmailCampaignRecipientField] = None - role_names: Optional[List[str]] = None - languages: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailToEmailsDeliverySettingsRequest(EmailCampaignRequest): - source: Optional[EmailCampaignRecipientsSourceTypes] = None - recipients: List[str] = field(default_factory=list) - recipients_cc: Optional[List[str]] = None - recipients_bcc: Optional[List[str]] = None - single_email_strategy: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailToUsersDeliverySettingsRequest(EmailCampaignRequest): - source: Optional[EmailCampaignRecipientsSourceTypes] = None - user_recipients: List[str] = field(default_factory=list) - user_cc: Optional[List[str]] = None - user_bcc: Optional[List[str]] = None - single_email_strategy: bool = False - - -class TriggerType(str, Enum): - MEMBERSHIP = 'Membership' - SCHEMA = 'Schema' - FILES = 'Files' - PAYMENTS = 'Payments' - AI = 'Ai' - - -class TriggerActionType(str, Enum): - CODE = 'Code' - PUSH = 'Push' - SMS = 'Sms' - EMAIL = 'Email' - WEBHOOK_CALL = 'WebhookCall' - SSE_CALL = 'SseCall' - MARKETPLACE = 'Marketplace' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerActionDto: - type: Optional[TriggerActionType] = None - integration_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveTriggerRequest: - type: Optional[TriggerType] = None - trigger_id: Optional[str] = None - name: Optional[str] = None - description: Optional[str] = None - is_enabled: bool = False - pre_execute_code: Optional[str] = None - order: Optional[int] = None - break_on_error: bool = False - action: Optional[TriggerActionDto] = None - - -class MembershipTriggerType(str, Enum): - ON_REGISTERED = 'OnRegistered' - ON_INVITED = 'OnInvited' - ON_VERIFIED = 'OnVerified' - ON_UPDATED = 'OnUpdated' - ON_DELETED = 'OnDeleted' - ON_BLOCKED = 'OnBlocked' - ON_REACTIVATED = 'OnReactivated' - ON_USER_CREATED = 'OnUserCreated' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipTriggerRequest(SaveTriggerRequest): - type: Optional[TriggerType] = None - when: Optional[MembershipTriggerType] = None - - -class SchemaTriggerType(str, Enum): - ON_INSERTED = 'OnInserted' - ON_DELETED = 'OnDeleted' - ON_UPDATED = 'OnUpdated' - ON_INSERTED_MANY = 'OnInsertedMany' - ON_UPDATED_MANY = 'OnUpdatedMany' - ON_DELETED_MANY = 'OnDeletedMany' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaTriggerRequest(SaveTriggerRequest): - type: Optional[TriggerType] = None - schema_id: Optional[str] = None - when: Optional[SchemaTriggerType] = None - configuration_code: Optional[str] = None - - -class FilesTriggerType(str, Enum): - ON_FILE_UPLOADED = 'OnFileUploaded' - ON_FILE_DELETED = 'OnFileDeleted' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FilesTriggerRequest(SaveTriggerRequest): - type: Optional[TriggerType] = None - when: Optional[FilesTriggerType] = None - folder: Optional[str] = None - - -class PaymentTriggerType(str, Enum): - ON_ORDER_CREATED = 'OnOrderCreated' - ON_ORDER_PAID = 'OnOrderPaid' - ON_WEBHOOK_CALL_RECEIVED = 'OnWebhookCallReceived' - ON_ORDER_PAYMENT_CHANGED = 'OnOrderPaymentChanged' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentTriggerRequest(SaveTriggerRequest): - type: Optional[TriggerType] = None - when: Optional[PaymentTriggerType] = None - integrations: Optional[List[str]] = None - events: Optional[List[str]] = None - - -class DatabaseProvider(str, Enum): - MONGO_DB_CONNECTION_STRING = 'MongoDbConnectionString' - CODE_MASH_MONGO_DB_ATLAS_FLEX_MANAGED = 'CodeMashMongoDbAtlasFlexManaged' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DatabaseIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[DatabaseProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MongoDbConnectionStringDatabaseIntegrationRequest(DatabaseIntegrationRequest): - provider: Optional[DatabaseProvider] = None - database_name: Optional[str] = None - connection_string: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MongoDbAtlasFlexManagedDatabaseIntegrationRequest(DatabaseIntegrationRequest): - provider: Optional[DatabaseProvider] = None - norbix_region_code: Optional[str] = None - - -class FileProvider(str, Enum): - LOCAL = 'Local' - AWS_S3 = 'AwsS3' - AZURE_BLOB_STORAGE = 'AzureBlobStorage' - GOOGLE_CLOUD_STORAGE = 'GoogleCloudStorage' - FTP = 'Ftp' - APPLE_I_CLOUD = 'AppleICloud' - DROP_BOX = 'DropBox' - GOOGLE_DRIVE = 'GoogleDrive' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FilesIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[FileProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleDriveFilesIntegrationRequest(FilesIntegrationRequest): - provider: Optional[FileProvider] = None - root_folder_id: Optional[str] = None - service_account_json_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FtpFilesIntegrationRequest(FilesIntegrationRequest): - provider: Optional[FileProvider] = None - host: Optional[str] = None - port: int = 0 - root_path: Optional[str] = None - use_ssl: bool = False - username: Optional[str] = None - password: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DropBoxFilesIntegrationRequest(FilesIntegrationRequest): - provider: Optional[FileProvider] = None - root_path: Optional[str] = None - access_token: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppleICloudFilesIntegrationRequest(FilesIntegrationRequest): - provider: Optional[FileProvider] = None - container_identifier: Optional[str] = None - relative_path: Optional[str] = None - key_id: Optional[str] = None - team_id: Optional[str] = None - bundle_id: Optional[str] = None - p8_private_key: Optional[str] = None - - -class AwsS3IntegrationType(str, Enum): - IAM = 'Iam' - CROSS_ACCOUNT_ROLE = 'CrossAccountRole' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsS3FilesIntegrationRequest(FilesIntegrationRequest): - provider: Optional[FileProvider] = None - integration_type: Optional[AwsS3IntegrationType] = None - bucket_name: Optional[str] = None - region: Optional[str] = None - role_arn: Optional[str] = None - external_id: Optional[str] = None - access_key: Optional[str] = None - secret_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleCloudFilesIntegrationRequest(FilesIntegrationRequest): - provider: Optional[FileProvider] = None - bucket_name: Optional[str] = None - service_account_json_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AzureBlobFilesIntegrationRequest(FilesIntegrationRequest): - provider: Optional[FileProvider] = None - blob_name: Optional[str] = None - connection_string: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LocalFilesIntegrationRequest(FilesIntegrationRequest): - provider: Optional[FileProvider] = None - root_path: Optional[str] = None - - -class LoggingProvider(str, Enum): - CONSOLE = 'Console' - NORBIX_LOGGING = 'NorbixLogging' - DATA_DOG = 'DataDog' - NEW_RELIC = 'NewRelic' - SENTRY = 'Sentry' - GRAFANA_LOKI = 'GrafanaLoki' - AXIOM = 'Axiom' - ELASTIC_CLOUD = 'ElasticCloud' - AWS_CLOUD_WATCH = 'AWSCloudWatch' - GCP_CLOUD_LOGGING = 'GCPCloudLogging' - AZURE_MONITOR_LOGS = 'AzureMonitorLogs' - GENERIC_HTTP = 'GenericHttp' - KAFKA = 'Kafka' - AMQP = 'AMQP' - PROMETHEUS = 'Prometheus' - AZURE_O_TEL = 'AzureOTel' - SPLUNK = 'Splunk' - ELASTIC_SEARCH = 'ElasticSearch' - KIBANA = 'Kibana' - LOCAL_FILE = 'LocalFile' - AWSS3 = 'AWSS3' - AWS_KINESIS = 'AWSKinesis' - MONGO_D_B = 'MongoDB' - INTERNAL_KAFKA = 'InternalKafka' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LoggingIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[LoggingProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AmqpLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - host: Optional[str] = None - port: int = 0 - virtual_host: Optional[str] = None - exchange: Optional[str] = None - routing_key: Optional[str] = None - username: Optional[str] = None - password: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsKinesisLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - stream_name: Optional[str] = None - region: Optional[str] = None - access_key: Optional[str] = None - secret_key: Optional[str] = None - - -class AwsS3LoggingIntegrationType(str, Enum): - IAM = 'Iam' - CROSS_ACCOUNT_ROLE = 'CrossAccountRole' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsS3LoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - integration_type: Optional[AwsS3LoggingIntegrationType] = None - bucket_name: Optional[str] = None - region: Optional[str] = None - role_arn: Optional[str] = None - external_id: Optional[str] = None - access_key: Optional[str] = None - secret_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class NewRelicLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - region: Optional[str] = None - service_name: Optional[str] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MongoDbLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - database_name: Optional[str] = None - connection_string: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class KafkaLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - bootstrap_servers: Optional[str] = None - topic: Optional[str] = None - security_protocol: Optional[str] = None - sasl_username: Optional[str] = None - sasl_password: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PrometheusLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - endpoint_url: Optional[str] = None - job_name: Optional[str] = None - bearer_token: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DataDogLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - site: Optional[str] = None - service_name: Optional[str] = None - environment: Optional[str] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InternalKafkaLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - bootstrap_servers: Optional[str] = None - topic: Optional[str] = None - security_protocol: Optional[str] = None - sasl_username: Optional[str] = None - sasl_password: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ElasticSearchLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - uri: Optional[str] = None - index: Optional[str] = None - username: Optional[str] = None - password: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SplunkLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - hec_endpoint_url: Optional[str] = None - index: Optional[str] = None - hec_token: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AzureOtelLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - endpoint_url: Optional[str] = None - resource_name: Optional[str] = None - connection_string: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class KibanaLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - uri: Optional[str] = None - space_id: Optional[str] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LocalFileLoggingIntegrationRequest(LoggingIntegrationRequest): - provider: Optional[LoggingProvider] = None - root_path: Optional[str] = None - - -class MembershipProvider(str, Enum): - APPLE_SIGN_IN = 'AppleSignIn' - GOOGLE_SIGN_IN = 'GoogleSignIn' - GOOGLE = 'Google' - FACEBOOK = 'Facebook' - X = 'X' - GIT_HUB = 'GitHub' - LINKED_IN = 'LinkedIn' - OKTA = 'Okta' - MICROSOFT = 'Microsoft' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[MembershipProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisplayName: - value: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RoleName: - name: Optional[str] = None - display_name: Optional[str] = None - # @Ignore() - is_administrator: bool = False - - # @Ignore() - is_authenticated: bool = False - - # @Ignore() - is_guest: bool = False - - # @Ignore() - is_root_role: bool = False - - # @Ignore() - is_collaborator_role: bool = False - - # @Ignore() - is_project_system_role: bool = False - - # @Ignore() - is_account_system_role: bool = False - - # @Ignore() - is_system_role: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthModeConfig: - name: Optional[DisplayName] = None - callback_url: Optional[str] = None - logout_url: Optional[str] = None - failure_redirect_url: Optional[str] = None - role_name: Optional[RoleName] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OktaMembershipIntegrationRequest(MembershipIntegrationRequest): - provider: Optional[MembershipProvider] = None - domain: Optional[str] = None - client_id: Optional[str] = None - client_secret: Optional[str] = None - o_auth_modes: Optional[List[OAuthModeConfig]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class XMembershipIntegrationRequest(MembershipIntegrationRequest): - provider: Optional[MembershipProvider] = None - api_key: Optional[str] = None - api_secret_key: Optional[str] = None - o_auth_modes: Optional[List[OAuthModeConfig]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleMembershipIntegrationRequest(MembershipIntegrationRequest): - provider: Optional[MembershipProvider] = None - client_id: Optional[str] = None - client_secret: Optional[str] = None - o_auth_modes: Optional[List[OAuthModeConfig]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MicrosoftMembershipIntegrationRequest(MembershipIntegrationRequest): - provider: Optional[MembershipProvider] = None - tenant_id: Optional[str] = None - client_id: Optional[str] = None - client_secret: Optional[str] = None - o_auth_modes: Optional[List[OAuthModeConfig]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GitHubMembershipIntegrationRequest(MembershipIntegrationRequest): - provider: Optional[MembershipProvider] = None - client_id: Optional[str] = None - client_secret: Optional[str] = None - o_auth_modes: Optional[List[OAuthModeConfig]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MetaMembershipIntegrationRequest(MembershipIntegrationRequest): - provider: Optional[MembershipProvider] = None - app_id: Optional[str] = None - app_secret: Optional[str] = None - o_auth_modes: Optional[List[OAuthModeConfig]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppleMembershipIntegrationRequest(MembershipIntegrationRequest): - provider: Optional[MembershipProvider] = None - team_id: Optional[str] = None - app_bundle_id: Optional[str] = None - service_id: Optional[str] = None - key_id: Optional[str] = None - private_key: Optional[str] = None - is_production: bool = False - o_auth_modes: Optional[List[OAuthModeConfig]] = None - - -class PaymentGatewayPlatform(str, Enum): - STRIPE = 'Stripe' - ADYEN = 'Adyen' - PADDLE = 'Paddle' - LEMON_SQUEEZY = 'LemonSqueezy' - APPLE_IN_APP = 'AppleInApp' - GOOGLE_IN_APP = 'GoogleInApp' - SHOPIFY = 'Shopify' - WOO_COMMERCE = 'WooCommerce' - MAGENTO = 'Magento' - PAY_PAL = 'PayPal' - BRAINTREE = 'Braintree' - AUTHORIZE_NET = 'AuthorizeNet' - CHECK_OUT_COM = 'CheckOutCom' - MOLLIE = 'Mollie' - WORLDPAY = 'Worldpay' - MONTONIO = 'Montonio' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[PaymentGatewayPlatform] = None - integration_name: Optional[str] = None - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LemonSqueezyPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - store_id: Optional[str] = None - api_key: Optional[str] = None - webhook_signing_secret: Optional[str] = None - is_test_mode: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AdyenPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - merchant_account: Optional[str] = None - api_key: Optional[str] = None - environment: Optional[str] = None - webhook_id: Optional[str] = None - webhook_hmac_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MolliePaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - profile_id: Optional[str] = None - api_key: Optional[str] = None - is_test_mode: bool = False - webhook_signing_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaddlePaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - api_key: Optional[str] = None - webhook_endpoint_secret_key: Optional[str] = None - environment: Optional[str] = None - client_side_token: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PayPalPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - client_id: Optional[str] = None - client_secret: Optional[str] = None - environment: Optional[str] = None - brand_name: Optional[str] = None - webhook_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StripePaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - publishable_key: Optional[str] = None - secret_key: Optional[str] = None - webhook_signing_secret: Optional[str] = None - webhook_endpoint_id: Optional[str] = None - default_currency: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppleInAppPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - merchant_identifier: Optional[str] = None - merchant_domain: Optional[str] = None - display_name: Optional[str] = None - merchant_identity_certificate_p12_base64: Optional[str] = None - merchant_identity_certificate_password: Optional[str] = None - payment_processing_certificate_p12_base64: Optional[str] = None - payment_processing_certificate_password: Optional[str] = None - webhook_bundle_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleInAppPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - merchant_id: Optional[str] = None - merchant_name: Optional[str] = None - gateway: Optional[str] = None - private_key_or_token: Optional[str] = None - gateway_merchant_id: Optional[str] = None - webhook_package_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MontonioPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - access_key: Optional[str] = None - secret_key: Optional[str] = None - is_sandbox: bool = False - locale: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ShopifyPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - shop_domain: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WooCommercePaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - store_url: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MagentoPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - store_url: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class BraintreePaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - merchant_id: Optional[str] = None - environment: Optional[str] = None - private_key: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthorizeNetPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - merchant_login_id: Optional[str] = None - environment: Optional[str] = None - transaction_key: Optional[str] = None - webhook_signature_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CheckOutComPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - merchant_account: Optional[str] = None - environment: Optional[str] = None - secret_key: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WorldpayPaymentIntegrationRequest(PaymentIntegrationRequest): - provider: Optional[PaymentGatewayPlatform] = None - merchant_code: Optional[str] = None - environment: Optional[str] = None - api_key: Optional[str] = None - webhook_secret: Optional[str] = None - - -class PushProvider(str, Enum): - APPLE_APNS = 'AppleApns' - SAFARI_WEB = 'SafariWeb' - SAFARI_PUSH = 'SafariPush' - ANDROID_FIREBASE = 'AndroidFirebase' - CHROME_WEB = 'ChromeWeb' - FIREFOX_WEB = 'FirefoxWeb' - EDGE_WEB = 'EdgeWeb' - CHROME_PUSH = 'ChromePush' - CODE_MASH_IOS_APP = 'CodeMashIosApp' - CODE_MASH_ANDROID_APP = 'CodeMashAndroidApp' - CODE_MASH_SAFARI_PLUGIN = 'CodeMashSafariPlugin' - CODE_MASH_SAFARI_WEB = 'CodeMashSafariWeb' - CODE_MASH_CHROME_PLUGIN = 'CodeMashChromePlugin' - CODE_MASH_CHROME_WEB = 'CodeMashChromeWeb' - EXPO = 'Expo' - FAKE = 'Fake' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[PushProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EdgeWebPushIntegrationRequest(PushIntegrationRequest): - provider: Optional[PushProvider] = None - # @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) - vapid_public_key: Optional[str] = None - """ - VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. - """ - - - # @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) - vapid_private_key: Optional[str] = None - """ - VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. - """ - - - # @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") - subject: Optional[str] = None - """ - Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. - """ - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChromePluginPushIntegrationRequest(PushIntegrationRequest): - provider: Optional[PushProvider] = None - # @ApiMember(Description="The extension's Chrome id: 32 lower-case letters a–p, as shown on chrome://extensions.", IsRequired=true) - extension_id: Optional[str] = None - """ - The extension's Chrome id: 32 lower-case letters a–p, as shown on chrome://extensions. - """ - - - # @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) - vapid_public_key: Optional[str] = None - """ - VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. - """ - - - # @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) - vapid_private_key: Optional[str] = None - """ - VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. - """ - - - # @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") - subject: Optional[str] = None - """ - Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. - """ - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SafariPushIntegrationRequest(PushIntegrationRequest): - provider: Optional[PushProvider] = None - website_push_id: Optional[str] = None - certificate_p12_base64: Optional[str] = None - certificate_password: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChromeWebPushIntegrationRequest(PushIntegrationRequest): - provider: Optional[PushProvider] = None - # @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) - vapid_public_key: Optional[str] = None - """ - VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. - """ - - - # @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) - vapid_private_key: Optional[str] = None - """ - VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. - """ - - - # @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") - subject: Optional[str] = None - """ - Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. - """ - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FirefoxWebPushIntegrationRequest(PushIntegrationRequest): - provider: Optional[PushProvider] = None - # @ApiMember(Description="VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey.", IsRequired=true) - vapid_public_key: Optional[str] = None - """ - VAPID public key (URL-safe Base-64, 65 bytes), generated together with the private key — e.g. `npx web-push generate-vapid-keys`. The browser subscribes with it as applicationServerKey. - """ - - - # @ApiMember(Description="VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret.", IsRequired=true) - vapid_private_key: Optional[str] = None - """ - VAPID private key (URL-safe Base-64, 32 bytes). Stored as a secret. - """ - - - # @ApiMember(Description="Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:.") - subject: Optional[str] = None - """ - Contact e-mail the browser push services can reach you at, e.g. admin@example.com. An e-mail address only (no URL); it is sent as mailto:. - """ - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AndroidFirebasePushIntegrationRequest(PushIntegrationRequest): - provider: Optional[PushProvider] = None - project_id: Optional[str] = None - client_email: Optional[str] = None - service_account_json: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppleApnsPushIntegrationRequest(PushIntegrationRequest): - provider: Optional[PushProvider] = None - team_id: Optional[str] = None - app_bundle_id: Optional[str] = None - key_id: Optional[str] = None - private_key: Optional[str] = None - is_production: bool = False - - -class CodeProvider(str, Enum): - AWS_LAMBDA = 'AwsLambda' - AZURE_FUNCTIONS = 'AzureFunctions' - GOOGLE_CLOUD_FUNCTIONS = 'GoogleCloudFunctions' - PIPEDREAM = 'Pipedream' - ZAPIER = 'Zapier' - CLOUDFLARE_WORKERS = 'CloudflareWorkers' - VERCEL = 'Vercel' - NETLIFY = 'Netlify' - SUPABASE_EDGE = 'SupabaseEdge' - MODAL = 'Modal' - FAKE = 'Fake' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[CodeProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - - -class AwsLambdaIntegrationType(str, Enum): - IAM = 'Iam' - CROSS_ACCOUNT_ROLE = 'CrossAccountRole' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsLambdaCodeIntegrationRequest(CodeIntegrationRequest): - provider: Optional[CodeProvider] = None - integration_type: Optional[AwsLambdaIntegrationType] = None - region: Optional[str] = None - role_arn: Optional[str] = None - external_id: Optional[str] = None - access_key: Optional[str] = None - secret_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AzureFunctionsCodeIntegrationRequest(CodeIntegrationRequest): - provider: Optional[CodeProvider] = None - function_app_name: Optional[str] = None - resource_group: Optional[str] = None - connection_string_or_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleCloudFunctionsCodeIntegrationRequest(CodeIntegrationRequest): - provider: Optional[CodeProvider] = None - project_id: Optional[str] = None - region: Optional[str] = None - service_account_json_key: Optional[str] = None - - -class LlmProvider(str, Enum): - OPEN_A_I = 'OpenAI' - ANTHROPIC = 'Anthropic' - OLLAMA = 'Ollama' - GROQ = 'Groq' - GOOGLE = 'Google' - MISTRAL = 'Mistral' - OPEN_ROUTER = 'OpenRouter' - GROK = 'Grok' - NORBIX_HOSTED = 'NorbixHosted' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LlmModelOptionRequest: - id: Optional[str] = None - display_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LlmIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[LlmProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - endpoint: Optional[str] = None - default_model: Optional[str] = None - is_default: bool = False - models: Optional[List[LlmModelOptionRequest]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OllamaLlmIntegrationRequest(LlmIntegrationRequest): - provider: Optional[LlmProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OpenRouterLlmIntegrationRequest(LlmIntegrationRequest, ILlmApiKeyRequest): - provider: Optional[LlmProvider] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MistralLlmIntegrationRequest(LlmIntegrationRequest, ILlmApiKeyRequest): - provider: Optional[LlmProvider] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GrokLlmIntegrationRequest(LlmIntegrationRequest, ILlmApiKeyRequest): - provider: Optional[LlmProvider] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GroqLlmIntegrationRequest(LlmIntegrationRequest, ILlmApiKeyRequest): - provider: Optional[LlmProvider] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleLlmIntegrationRequest(LlmIntegrationRequest, ILlmApiKeyRequest): - provider: Optional[LlmProvider] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AnthropicLlmIntegrationRequest(LlmIntegrationRequest, ILlmApiKeyRequest): - provider: Optional[LlmProvider] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OpenAiLlmIntegrationRequest(LlmIntegrationRequest, ILlmApiKeyRequest): - provider: Optional[LlmProvider] = None - api_key: Optional[str] = None - - -class McpProvider(str, Enum): - DOCKER = 'Docker' - OBSIDIAN = 'Obsidian' - GOOGLE_CALENDAR = 'GoogleCalendar' - STRIPE = 'Stripe' - GIT_HUB = 'GitHub' - MONGO_DB = 'MongoDb' - PLAYWRIGHT = 'Playwright' - BRAVE_SEARCH = 'BraveSearch' - - -class McpTransport(str, Enum): - SSE = 'Sse' - HTTP_STREAM = 'HttpStream' - STDIO = 'Stdio' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class McpIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[McpProvider] = None - transport: Optional[McpTransport] = None - integration_name: Optional[str] = None - is_enabled: bool = False - name: Optional[str] = None - category: Optional[str] = None - description: Optional[str] = None - icon: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PlaywrightMcpIntegrationRequest(McpIntegrationRequest): - provider: Optional[McpProvider] = None - transport: Optional[McpTransport] = None - command: Optional[str] = None - args: Optional[List[str]] = None - headless: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MongoDbMcpIntegrationRequest(McpIntegrationRequest): - provider: Optional[McpProvider] = None - transport: Optional[McpTransport] = None - command: Optional[str] = None - args: Optional[List[str]] = None - connection_string: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GitHubMcpIntegrationRequest(McpIntegrationRequest): - provider: Optional[McpProvider] = None - transport: Optional[McpTransport] = None - server_url: Optional[str] = None - access_token: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StripeMcpIntegrationRequest(McpIntegrationRequest): - provider: Optional[McpProvider] = None - transport: Optional[McpTransport] = None - server_url: Optional[str] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class BraveSearchMcpIntegrationRequest(McpIntegrationRequest): - provider: Optional[McpProvider] = None - transport: Optional[McpTransport] = None - server_url: Optional[str] = None - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ObsidianMcpIntegrationRequest(McpIntegrationRequest): - provider: Optional[McpProvider] = None - transport: Optional[McpTransport] = None - command: Optional[str] = None - args: Optional[List[str]] = None - environment_variables: Optional[Dict[str, str]] = None - - -class CommunicationChannel(str, Enum): - TRANSACTIONAL = 'Transactional' - MARKETING = 'Marketing' - SYSTEM = 'System' - - -class NotificationMedium(str, Enum): - EMAIL = 'Email' - SMS = 'Sms' - PUSH = 'Push' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TemplateDto(IHasViewId, IHasDatabaseId): - id: Optional[str] = None - view_id: Optional[str] = None - template_name: Optional[str] = None - description: Optional[str] = None - communication_channel: Optional[CommunicationChannel] = None - medium: Optional[NotificationMedium] = None - is_active: bool = False - tags: Optional[List[str]] = None - env: Optional[str] = None - - -class EmailTemplateEngine(str, Enum): - NOT_SET = 'NotSet' - HANDLEBARS = 'Handlebars' - MJML = 'Mjml' - LIQUID = 'Liquid' - RAZOR = 'Razor' - MUSTACHE = 'Mustache' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailBodyDto(IHasRazorTemplateCode): - structure: Optional[str] = None - code: Optional[str] = None - template_engine: Optional[EmailTemplateEngine] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FileChecksumDto: - algorithm: Optional[str] = None - hash: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FileResourceDto: - id: Optional[str] = None - original_file_name: Optional[str] = None - extension: Optional[str] = None - stored_file_name: Optional[str] = None - size_bytes: Optional[int] = None - checksum: Optional[FileChecksumDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FileResourceRefDto: - resource: Optional[FileResourceDto] = None - integration_id: Optional[str] = None - provider: Optional[FileProvider] = None - path: Optional[str] = None - public_url: Optional[str] = None - is_public: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailMessageContentDto(IHasRazorTemplateCode): - subject: Optional[str] = None - body: Optional[EmailBodyDto] = None - static_attachments: Optional[List[FileResourceRefDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailMessageTranslationDto(IHasRazorTemplateCode): - language: Optional[str] = None - content: Optional[EmailMessageContentDto] = None - static_attachments: Optional[List[FileResourceRefDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailTemplateDto(TemplateDto, IBindableContract): - translations: List[EmailMessageTranslationDto] = field(default_factory=list) - static_attachments: Optional[List[FileResourceRefDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushMessageContentDto(IHasRazorTemplateCode): - title: Optional[str] = None - body: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushMessageTranslationDto(IHasRazorTemplateCode): - language: Optional[str] = None - content: Optional[PushMessageContentDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushTemplateDto(TemplateDto, IHasRazorTemplateCode, IBindableContract): - translations: List[PushMessageTranslationDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsMessageContentDto(IHasRazorTemplateCode): - body: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsMessageTranslationDto(IHasRazorTemplateCode): - language: Optional[str] = None - content: Optional[SmsMessageContentDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsTemplateDto(TemplateDto, IHasRazorTemplateCode, IBindableContract): - translations: List[SmsMessageTranslationDto] = field(default_factory=list) - - -class SystemEmailTemplateTheme(str, Enum): - TEXT = 'Text' - BRANDED = 'Branded' - CREATIVE = 'Creative' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SystemEmailTemplateDto(EmailTemplateDto): - image_preview: Optional[str] = None - theme: Optional[SystemEmailTemplateTheme] = None - system_group: Optional[str] = None - system_tags: Optional[List[str]] = None - for_trigger: Optional[TriggerType] = None - hidden_system_email_template: bool = False - - -# @Flags() -class RespectTimeZoneSettings(IntEnum): - RESPECT_TO_LAST_LOGIN_ZONE = 1 - RESPECT_TO_REGISTRATION_ZONE = 2 - RESPECT_TO_REGISTRATION_PROJECT_ZONE = 4 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailCampaignDeliverySettingsDto: - recipients_source_type: Optional[EmailCampaignRecipientsSourceTypes] = None - mapped_tokens: Optional[List[TokenMappingDto]] = None - campaign_time: Optional[int] = None - respect_time_zone_settings: Optional[RespectTimeZoneSettings] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerActionEmailDto(TriggerActionDto): - template_id: Optional[str] = None - delivery_settings: Optional[EmailCampaignDeliverySettingsDto] = None - language: Optional[str] = None - initiator_id: Optional[str] = None - - -class PushCampaignRecipientsSourceTypes(str, Enum): - ALL_USERS = 'AllUsers' - SPECIFIED_USERS = 'SpecifiedUsers' - COLLECTION = 'Collection' - DEVICES = 'Devices' - ACCOUNT_USERS = 'AccountUsers' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushCampaignDeliverySettingsDto: - recipients_source_type: Optional[PushCampaignRecipientsSourceTypes] = None - mapped_tokens: Optional[List[TokenMappingDto]] = None - campaign_time: Optional[int] = None - respect_time_zone_settings: Optional[RespectTimeZoneSettings] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerActionPushDto(TriggerActionDto): - template_id: Optional[str] = None - delivery_settings: Optional[PushCampaignDeliverySettingsDto] = None - language: Optional[str] = None - initiator_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FunctionRefDto: - integration_id: Optional[str] = None - provider: Optional[CodeProvider] = None - function_id: Optional[str] = None - qualifier: Optional[str] = None - display_name: Optional[str] = None - - -class CodeInvocationType(str, Enum): - SYNC = 'Sync' - ASYNC = 'Async' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeDeliverySettingsDto: - mapped_tokens: Optional[List[TokenMappingDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerActionCodeDto(TriggerActionDto): - function_ref: Optional[FunctionRefDto] = None - run_as_user_id: Optional[str] = None - invocation_type: Optional[CodeInvocationType] = None - config: Optional[str] = None - delivery_settings: Optional[CodeDeliverySettingsDto] = None - function_id: Optional[str] = None - activation_code: Optional[str] = None - meta: Optional[Dict[str, str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WebhookDeliverySettingsDto: - destination_ids: Optional[List[str]] = None - event_name: Optional[str] = None - content_type: Optional[str] = None - include_raw_payload: bool = False - mapped_tokens: Optional[List[TokenMappingDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerActionWebhookDto(TriggerActionDto): - delivery_settings: Optional[WebhookDeliverySettingsDto] = None - - -class SmsCampaignRecipientsSourceTypes(str, Enum): - ALL_USERS = 'AllUsers' - SPECIFIED_USERS = 'SpecifiedUsers' - ACCOUNT_USERS = 'AccountUsers' - PHONE_NUMBERS = 'PhoneNumbers' - COLLECTION = 'Collection' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsCampaignDeliverySettingsDto: - recipients_source_type: Optional[SmsCampaignRecipientsSourceTypes] = None - mapped_tokens: Optional[List[TokenMappingDto]] = None - campaign_time: Optional[int] = None - respect_time_zone_settings: Optional[RespectTimeZoneSettings] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerActionSmsDto(TriggerActionDto): - template_id: Optional[str] = None - delivery_settings: Optional[SmsCampaignDeliverySettingsDto] = None - language: Optional[str] = None - initiator_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SseDeliverySettingsDto: - audience: Optional[str] = None - user_auth_ids: Optional[List[str]] = None - event_name: Optional[str] = None - payload_type: Optional[str] = None - payload_template: Optional[str] = None - persist: bool = False - mapped_tokens: Optional[List[TokenMappingDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerActionSseDto(TriggerActionDto): - delivery_settings: Optional[SseDeliverySettingsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerActionMarketplaceDto(TriggerActionDto): - function_id: Optional[str] = None - payload: Optional[Dict[str, str]] = None - run_as_user_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RequestBase(IVersionBasedRequest, IHasCorrelationIdRequest): - # @ApiMember(DataType="string", Description="TimeZone", Name="TimeZoneId", ParameterType="header") - time_zone_id: Optional[str] = None - """ - TimeZone - """ - - - # @ApiMember(DataType="string", Description="The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v3", IsRequired=true, Name="version", ParameterType="path") - version: Optional[str] = None - """ - The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v3 - """ - - - # @ApiMember(DataType="string", Description="CorrelationId for each request", Name="CorrelationId", ParameterType="header") - correlation_id: Optional[str] = None - """ - CorrelationId for each request - """ - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeMashListPaginationRequestBase(RequestBase, IHasProjectId, IHasEnv): - # @ApiMember(DataType="string", Description="ID of your project. Can be passed in a header as norbix-project-id.", IsRequired=true, Name="norbix-project-id", ParameterType="header") - project_id: Optional[str] = None - """ - ID of your project. Can be passed in a header as norbix-project-id. - """ - - - # @ApiMember(DataType="string", Description="Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env.", Name="norbix-env", ParameterType="header") - env: Optional[str] = None - """ - Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env. - """ - - - # @ApiMember(DataType="string", Description="Cursor token — fetch the page AFTER this item.", Name="startingAfter", ParameterType="query") - starting_after: Optional[str] = None - """ - Cursor token — fetch the page AFTER this item. - """ - - - # @ApiMember(DataType="string", Description="Cursor token — fetch the page BEFORE this item.", Name="endingBefore", ParameterType="query") - ending_before: Optional[str] = None - """ - Cursor token — fetch the page BEFORE this item. - """ - - - # @ApiMember(DataType="integer", Description="Amount of records to return.", Format="int32", Name="pageSize", ParameterType="query") - page_size: Optional[int] = None - """ - Amount of records to return. - """ - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetTriggers(CodeMashListPaginationRequestBase): - schema_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ErrorDto: - message: Optional[str] = None - error_code: Optional[str] = None - context: Optional[Dict[str, str]] = None - stack_trace: Optional[List[ErrorDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeMashResponseStatus: - is_success: bool = False - errors: Optional[List[ErrorDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ResponseBase: - response_status: Optional[CodeMashResponseStatus] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetTriggersResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailToAllUsersDeliverySettingsDto(EmailCampaignDeliverySettingsDto): - roles_names: Optional[List[str]] = None - user_tags: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailToAccountUsersDeliverySettingsDto(EmailCampaignDeliverySettingsDto): - user_recipients: List[str] = field(default_factory=list) - user_cc: Optional[List[str]] = None - user_bcc: Optional[List[str]] = None - single_email_strategy: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailToUsersDeliverySettingsDto(EmailCampaignDeliverySettingsDto): - user_recipients: List[str] = field(default_factory=list) - user_cc: Optional[List[str]] = None - user_bcc: Optional[List[str]] = None - single_email_strategy: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailToEmailAddressesDeliverySettingsDto(EmailCampaignDeliverySettingsDto): - recipients: List[str] = field(default_factory=list) - recipients_cc: Optional[List[str]] = None - recipients_bcc: Optional[List[str]] = None - single_email_strategy: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailToCollectionRecordsDeliverySettingsDto(EmailCampaignDeliverySettingsDto): - fields: List[str] = field(default_factory=list) - schema_name: Optional[str] = None - field_type: Optional[CollectionEmailCampaignRecipientField] = None - role_names: Optional[List[str]] = None - languages: Optional[List[str]] = None - record_ids: Optional[List[str]] = None - - -class PushDeviceDeliveryFamily(str, Enum): - IOS = 'Ios' - ANDROID = 'Android' - CHROME = 'Chrome' - SAFARI = 'Safari' - EXPO = 'Expo' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushToAllUsersDeliverySettingsDto(PushCampaignDeliverySettingsDto): - roles_names: Optional[List[str]] = None - user_tags: Optional[List[str]] = None - platforms: Optional[List[PushDeviceDeliveryFamily]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushToUsersDeliverySettingsDto(PushCampaignDeliverySettingsDto): - recipients: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushToAccountUsersDeliverySettingsDto(PushCampaignDeliverySettingsDto): - recipients: List[str] = field(default_factory=list) - platforms: Optional[List[PushDeviceDeliveryFamily]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushToCollectionRecordsDeliverySettingsDto(PushCampaignDeliverySettingsDto): - fields: List[str] = field(default_factory=list) - field_type: Optional[CollectionEmailCampaignRecipientField] = None - schema_name: Optional[str] = None - role_names: Optional[List[str]] = None - languages: Optional[List[str]] = None - record_ids: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushDeviceDeliveryTokenDto: - push_device_token: Optional[str] = None - delivery_family: Optional[PushDeviceDeliveryFamily] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushToDevicesDeliverySettingsDto(PushCampaignDeliverySettingsDto): - devices: List[PushDeviceDeliveryTokenDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsToAllUsersDeliverySettingsDto(SmsCampaignDeliverySettingsDto): - roles_names: Optional[List[str]] = None - user_tags: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsToUsersDeliverySettingsDto(SmsCampaignDeliverySettingsDto): - recipients: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsToAccountUsersDeliverySettingsDto(SmsCampaignDeliverySettingsDto): - recipients: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsToCollectionRecordsDeliverySettingsDto(SmsCampaignDeliverySettingsDto): - fields: List[str] = field(default_factory=list) - field_type: Optional[CollectionEmailCampaignRecipientField] = None - schema_name: Optional[str] = None - role_names: Optional[List[str]] = None - languages: Optional[List[str]] = None - record_ids: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsToPhoneNumbersDeliverySettingsDto(SmsCampaignDeliverySettingsDto): - phone_numbers: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class IntegrationDto(IHasViewId): - view_id: Optional[str] = None - integration_name: Optional[str] = None - is_enabled: bool = False - env: Optional[str] = None - last_integration_test_at_utc: Optional[datetime.datetime] = None - last_integration_test_succeeded: Optional[bool] = None - last_integration_test_errors: Optional[IReadOnlyList[str]] = None - human_delivery_confirmed_at_utc: Optional[datetime.datetime] = None - requires_human_delivery_confirmation: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LlmModelOptionDto: - id: Optional[str] = None - display_name: Optional[str] = None - input_credit_rate: Decimal = decimal.Decimal(0) - output_credit_rate: Decimal = decimal.Decimal(0) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LlmIntegrationDto(IntegrationDto): - provider: Optional[LlmProvider] = None - base_url: Optional[str] = None - default_model: Optional[str] = None - is_configured: bool = False - is_system_owned: bool = False - is_default: bool = False - models: List[LlmModelOptionDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OpenAiLlmIntegrationDto(LlmIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AnthropicLlmIntegrationDto(LlmIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OllamaLlmIntegrationDto(LlmIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GroqLlmIntegrationDto(LlmIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleLlmIntegrationDto(LlmIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MistralLlmIntegrationDto(LlmIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OpenRouterLlmIntegrationDto(LlmIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GrokLlmIntegrationDto(LlmIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class McpMetadata: - name: Optional[str] = None - category: Optional[str] = None - description: Optional[str] = None - icon: Optional[str] = None - - -class McpAuth(str, Enum): - O_AUTH2 = 'OAuth2' - API_KEY = 'ApiKey' - NONE = 'None' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class McpIntegrationDto(IntegrationDto): - provider: Optional[McpProvider] = None - transport: Optional[McpTransport] = None - metadata: Optional[McpMetadata] = None - is_configured: bool = False - is_system_owned: bool = False - command: Optional[str] = None - args: Optional[List[str]] = None - server_url: Optional[str] = None - auth: Optional[McpAuth] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DockerMcpIntegrationDto(McpIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleCalendarMcpIntegrationDto(McpIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ObsidianMcpIntegrationDto(McpIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeIntegrationDto(IntegrationDto): - provider: Optional[CodeProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsLambdaCrossAccountRoleCodeIntegrationDto(CodeIntegrationDto): - region: Optional[str] = None - role_arn: Optional[str] = None - external_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsLambdaIamCodeIntegrationDto(CodeIntegrationDto): - region: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AzureFunctionsCodeIntegrationDto(CodeIntegrationDto): - function_app_name: Optional[str] = None - resource_group: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleCloudFunctionsCodeIntegrationDto(CodeIntegrationDto): - project_id: Optional[str] = None - region: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentsIntegrationDto(IntegrationDto): - gateway_platform: Optional[PaymentGatewayPlatform] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AdyenPaymentIntegrationDto(PaymentsIntegrationDto): - merchant_account: Optional[str] = None - environment: Optional[str] = None - webhook_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppleInAppPaymentIntegrationDto(PaymentsIntegrationDto): - merchant_identifier: Optional[str] = None - merchant_domain: Optional[str] = None - display_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleInAppPaymentIntegrationDto(PaymentsIntegrationDto): - merchant_id: Optional[str] = None - merchant_name: Optional[str] = None - gateway: Optional[str] = None - gateway_merchant_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LemonSqueezyPaymentIntegrationDto(PaymentsIntegrationDto): - store_id: Optional[str] = None - is_test_mode: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MolliePaymentIntegrationDto(PaymentsIntegrationDto): - profile_id: Optional[str] = None - is_test_mode: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaddlePaymentIntegrationDto(PaymentsIntegrationDto): - environment: Optional[str] = None - client_side_token: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PayPalPaymentIntegrationDto(PaymentsIntegrationDto): - client_id: Optional[str] = None - environment: Optional[str] = None - brand_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StripePaymentIntegrationDto(PaymentsIntegrationDto): - publishable_key: Optional[str] = None - webhook_endpoint_id: Optional[str] = None - default_currency: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ShopifyPaymentIntegrationDto(PaymentsIntegrationDto): - shop_domain: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WooCommercePaymentIntegrationDto(PaymentsIntegrationDto): - store_url: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MagentoPaymentIntegrationDto(PaymentsIntegrationDto): - store_url: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class BraintreePaymentIntegrationDto(PaymentsIntegrationDto): - merchant_id: Optional[str] = None - environment: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthorizeNetPaymentIntegrationDto(PaymentsIntegrationDto): - merchant_login_id: Optional[str] = None - environment: Optional[str] = None - webhook_signature_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CheckOutComPaymentIntegrationDto(PaymentsIntegrationDto): - merchant_account: Optional[str] = None - environment: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WorldpayPaymentIntegrationDto(PaymentsIntegrationDto): - merchant_code: Optional[str] = None - environment: Optional[str] = None - webhook_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MontonioPaymentIntegrationDto(PaymentsIntegrationDto): - access_key: Optional[str] = None - is_sandbox: bool = False - locale: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentOrderLineDto: - sku: Optional[str] = None - title: Optional[str] = None - quantity: int = 0 - unit_amount_minor: int = 0 - amount_minor: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentOrderCheckoutDto: - attempt: int = 0 - integration_id: Optional[str] = None - provider: Optional[str] = None - provider_order_id: Optional[str] = None - provider_reference: Optional[str] = None - payment_url: Optional[str] = None - method: Optional[str] = None - started_on_utc: datetime.datetime = datetime.datetime(1, 1, 1) - expires_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentOrderDto: - id: Optional[str] = None - env: Optional[str] = None - buyer_user_id: Optional[str] = None - merchant_reference: Optional[str] = None - currency: Optional[str] = None - price_version: Optional[str] = None - lines: List[PaymentOrderLineDto] = field(default_factory=list) - total_minor: int = 0 - metadata: Dict[str, str] = field(default_factory=dict) - status: Optional[str] = None - created_on_utc: datetime.datetime = datetime.datetime(1, 1, 1) - updated_on_utc: datetime.datetime = datetime.datetime(1, 1, 1) - checkouts: List[PaymentOrderCheckoutDto] = field(default_factory=list) - settled_minor: Optional[int] = None - refunded_minor: int = 0 - paid_on_utc: Optional[datetime.datetime] = None - provider_payment_id: Optional[str] = None - mismatches: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentEventDto: - integration_id: Optional[str] = None - provider: Optional[str] = None - provider_event_id: Optional[str] = None - order_id: Optional[str] = None - event_name: Optional[str] = None - status: Optional[str] = None - amount_minor: Optional[int] = None - currency: Optional[str] = None - external_ids: Optional[Dict[str, str]] = None - occurred_on: Optional[datetime.datetime] = None - received_on: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentOrderEventDto: - order_event_id: Optional[str] = None - event: Optional[str] = None - from_: Optional[str] = field(metadata=config(field_name='from'), default=None) - to: Optional[str] = None - reason: Optional[str] = None - order: Optional[PaymentOrderDto] = None - payment: Optional[PaymentEventDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipIntegrationDto(IntegrationDto): - provider: Optional[MembershipProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppleSignInMembershipIntegrationDto(MembershipIntegrationDto): - team_id: Optional[str] = None - app_bundle_id: Optional[str] = None - service_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GitHubMembershipIntegrationDto(MembershipIntegrationDto): - client_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleMembershipIntegrationDto(MembershipIntegrationDto): - client_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MetaMembershipIntegrationDto(MembershipIntegrationDto): - app_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MicrosoftMembershipIntegrationDto(MembershipIntegrationDto): - tenant_id: Optional[str] = None - client_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OktaMembershipIntegrationDto(MembershipIntegrationDto): - domain: Optional[str] = None - client_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class XMembershipIntegrationDto(MembershipIntegrationDto): - api_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LoggingIntegrationDto(IntegrationDto): - provider: Optional[LoggingProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AmqpLoggingIntegrationDto(LoggingIntegrationDto): - host: Optional[str] = None - port: int = 0 - virtual_host: Optional[str] = None - exchange: Optional[str] = None - routing_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsKinesisLoggingIntegrationDto(LoggingIntegrationDto): - stream_name: Optional[str] = None - region: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsS3CrossAccountRoleLoggingIntegrationDto(LoggingIntegrationDto): - bucket_name: Optional[str] = None - region: Optional[str] = None - role_arn: Optional[str] = None - external_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsS3IamLoggingIntegrationDto(LoggingIntegrationDto): - bucket_name: Optional[str] = None - region: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AzureOtelLoggingIntegrationDto(LoggingIntegrationDto): - endpoint_url: Optional[str] = None - resource_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DataDogLoggingIntegrationDto(LoggingIntegrationDto): - site: Optional[str] = None - service_name: Optional[str] = None - environment: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ElasticSearchLoggingIntegrationDto(LoggingIntegrationDto): - uri: Optional[str] = None - index: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InternalKafkaLoggingIntegrationDto(LoggingIntegrationDto): - bootstrap_servers: Optional[str] = None - topic: Optional[str] = None - security_protocol: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class KafkaLoggingIntegrationDto(LoggingIntegrationDto): - bootstrap_servers: Optional[str] = None - topic: Optional[str] = None - security_protocol: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class KibanaLoggingIntegrationDto(LoggingIntegrationDto): - uri: Optional[str] = None - space_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LocalFileLoggingIntegrationDto(LoggingIntegrationDto): - root_path: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MongoDbLoggingIntegrationDto(LoggingIntegrationDto): - database_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class NewRelicLoggingIntegrationDto(LoggingIntegrationDto): - region: Optional[str] = None - service_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PrometheusLoggingIntegrationDto(LoggingIntegrationDto): - endpoint_url: Optional[str] = None - job_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SplunkLoggingIntegrationDto(LoggingIntegrationDto): - hec_endpoint_url: Optional[str] = None - index: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FilesIntegrationDto(IntegrationDto): - provider: Optional[FileProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppleICloudFilesIntegrationDto(FilesIntegrationDto): - container_identifier: Optional[str] = None - relative_path: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsS3CrossAccountRoleFilesIntegrationDto(FilesIntegrationDto): - bucket_name: Optional[str] = None - region: Optional[str] = None - role_arn: Optional[str] = None - external_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsS3IamFilesIntegrationDto(FilesIntegrationDto): - bucket_name: Optional[str] = None - region: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AzureBlobFilesIntegrationDto(FilesIntegrationDto): - blob_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DropBoxFilesIntegrationDto(FilesIntegrationDto): - root_path: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FtpFilesIntegrationDto(FilesIntegrationDto): - host: Optional[str] = None - port: int = 0 - root_path: Optional[str] = None - use_ssl: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleCloudFilesIntegrationDto(FilesIntegrationDto): - bucket_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GoogleDriveFilesIntegrationDto(FilesIntegrationDto): - root_folder_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LocalFilesIntegrationDto(FilesIntegrationDto): - root_path: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DatabaseIntegrationDto(IntegrationDto): - provider: Optional[DatabaseProvider] = None - is_system_owned: bool = False - can_manage_indexes: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MongoDbConnectionStringIntegrationDto(DatabaseIntegrationDto): - database_name: Optional[str] = None - - -class IntegrationStatus(str, Enum): - UNKNOWN = 'Unknown' - PENDING = 'Pending' - PROVISIONING = 'Provisioning' - ACTIVE = 'Active' - FAILED = 'Failed' - DEPROVISIONING = 'Deprovisioning' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MongoDbAtlasFlexManagedIntegrationDto(DatabaseIntegrationDto): - database_name: Optional[str] = None - norbix_region_code: Optional[str] = None - flex_tier_code: Optional[str] = None - status: Optional[IntegrationStatus] = None - atlas_project_id: Optional[str] = None - atlas_cluster_name: Optional[str] = None - failure_reason: Optional[str] = None - - -class SmsProvider(str, Enum): - TWILIO = 'Twilio' - VONAGE = 'Vonage' - PLIVO = 'Plivo' - TELNYX = 'Telnyx' - BIRD = 'Bird' - TELESIGN = 'Telesign' - SINCH = 'Sinch' - FAKE = 'Fake' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsIntegrationDto(IntegrationDto): - provider: Optional[SmsProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class BirdSmsIntegrationDto(SmsIntegrationDto): - originator: Optional[str] = None - region: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PlivoSmsIntegrationDto(SmsIntegrationDto): - auth_id: Optional[str] = None - from_phone_number: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SinchSmsIntegrationDto(SmsIntegrationDto): - service_plan_id: Optional[str] = None - from_phone_number: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TelesignSmsIntegrationDto(SmsIntegrationDto): - customer_id: Optional[str] = None - from_sender: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TelnyxSmsIntegrationDto(SmsIntegrationDto): - messaging_profile_id: Optional[str] = None - from_phone_number: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TwilioSmsIntegrationDto(SmsIntegrationDto): - account_sid: Optional[str] = None - from_phone_number: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class VonageSmsIntegrationDto(SmsIntegrationDto): - api_key: Optional[str] = None - from_sender: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FakeSmsIntegrationDto(SmsIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushIntegrationDto(IntegrationDto): - provider: Optional[PushProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AndroidFirebasePushIntegrationDto(PushIntegrationDto): - project_id: Optional[str] = None - client_email: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppleApnsPushIntegrationDto(PushIntegrationDto): - team_id: Optional[str] = None - app_bundle_id: Optional[str] = None - key_id: Optional[str] = None - is_production: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChromePluginPushIntegrationDto(PushIntegrationDto): - extension_id: Optional[str] = None - vapid_public_key: Optional[str] = None - subject: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChromeWebPushIntegrationDto(PushIntegrationDto): - vapid_public_key: Optional[str] = None - subject: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EdgeWebPushIntegrationDto(PushIntegrationDto): - vapid_public_key: Optional[str] = None - subject: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FirefoxWebPushIntegrationDto(PushIntegrationDto): - vapid_public_key: Optional[str] = None - subject: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SafariPushIntegrationDto(PushIntegrationDto): - website_push_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FakePushIntegrationDto(PushIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailIntegrationDto(IntegrationDto): - provider: Optional[EmailProvider] = None - email_address: Optional[str] = None - email_sender_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsSesEmailIntegrationDto(EmailIntegrationDto): - region: Optional[str] = None - identity_arn: Optional[str] = None - configuration_set_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsCrossAccountRoleEmailIntegrationDto(AwsSesEmailIntegrationDto): - role_arn: Optional[str] = None - external_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AwsIamEmailIntegrationDto(AwsSesEmailIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MailGunEmailIntegrationDto(EmailIntegrationDto): - domain: Optional[str] = None - region: Optional[MailGunRegion] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SendGridEmailIntegrationDto(EmailIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmtpEmailIntegrationDto(EmailIntegrationDto): - host_name: Optional[str] = None - port: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FakeEmailIntegrationDto(EmailIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WebhookDestinationDto: - view_id: Optional[str] = None - destination_name: Optional[str] = None - endpoint_url: Optional[str] = None - selected_events: Optional[IReadOnlyList[str]] = None - extra_headers: Optional[IReadOnlyDictionary[str, str]] = None - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WebhookIntegrationDto(IntegrationDto): - is_configured: bool = False - destinations: Optional[IReadOnlyList[WebhookDestinationDto]] = None - extra_headers: Optional[IReadOnlyDictionary[str, str]] = None - - -class SchedulerTaskType(str, Enum): - EMAIL_CAMPAIGN = 'EmailCampaign' - PUSH_CAMPAIGN = 'PushCampaign' - SMS_CAMPAIGN = 'SmsCampaign' - CODE_FUNCTIONAL_CALL = 'CodeFunctionalCall' - WEBHOOK_CALL = 'WebhookCall' - MARKETPLACE_FUNCTION_CALL = 'MarketplaceFunctionCall' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchedulerTaskDto: - project_id: Optional[str] = None - task_id: Optional[str] = None - name: Optional[str] = None - description: Optional[str] = None - cron: Optional[str] = None - type: Optional[SchedulerTaskType] = None - payload_json: Optional[str] = None - initiator_id: Optional[str] = None - is_enabled: bool = False - stop_on_error: bool = False - env: Optional[str] = None - created_at_unix: Optional[int] = None - updated_at_unix: Optional[int] = None - ends_at_unix: Optional[int] = None - has_ended: bool = False - is_failing: bool = False - last_failure_reason: Optional[str] = None - last_failed_at_unix: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchedulerTaskRequest: - type: Optional[SchedulerTaskType] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailCampaignSchedulerTaskRequest(SchedulerTaskRequest): - type: Optional[SchedulerTaskType] = None - campaign: Optional[EmailCampaignRequest] = None - database_integration_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeMashRequestBase(RequestBase, IHasProjectId, IHasEnv): - # @ApiMember(DataType="string", Description="ID of your project. Can be passed in a header as norbix-project-id.", IsRequired=true, Name="norbix-project-id", ParameterType="header") - project_id: Optional[str] = None - """ - ID of your project. Can be passed in a header as norbix-project-id. - """ - - - # @ApiMember(DataType="string", Description="Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env.", Name="norbix-env", ParameterType="header") - env: Optional[str] = None - """ - Target environment for this request (e.g. TEST, STAGING). Optional — when omitted the request runs against PROD. Can be passed in a header as norbix-env. - """ - - -# @Route("/{version}/notifications/sms/campaigns", "POST") -# @Api(Description="Create SMS campaign") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateSmsCampaignRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Create SMS campaign - """ - - # @ApiMember(Description="SMS template id to send — pick one with get_sms_templates. Never invent it.") - template_id: Optional[str] = None - """ - SMS template id to send — pick one with get_sms_templates. Never invent it. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - - # @ApiMember(Description="SMS provider integration id the campaign sends through — pick one with get_sms_integrations (the project default unless the user named another). Required; never invent it.", IsRequired=true) - integration_id: Optional[str] = None - """ - SMS provider integration id the campaign sends through — pick one with get_sms_integrations (the project default unless the user named another). Required; never invent it. - """ - - - # @ApiMember(Description="Optional language code forcing one template translation for every recipient.") - language: Optional[str] = None - """ - Optional language code forcing one template translation for every recipient. - """ - - - initiator_id: Optional[str] = None - # @ApiMember(Description="Audience type: 'AllUsers' (every project member subscribed to the SMS channel — role-based delivery can address MILLIONS of contacts), 'SpecifiedUsers' (exact member ids), or 'PhoneNumbers' (raw phone numbers). Fill EXACTLY the settings object matching this value. 'Collection' delivery is not available from chat.") - delivery_type: Optional[SmsCampaignRecipientsSourceTypes] = None - """ - Audience type: 'AllUsers' (every project member subscribed to the SMS channel — role-based delivery can address MILLIONS of contacts), 'SpecifiedUsers' (exact member ids), or 'PhoneNumbers' (raw phone numbers). Fill EXACTLY the settings object matching this value. 'Collection' delivery is not available from chat. - """ - - - # @ApiMember(Description="For deliveryType 'AllUsers'. JSON object: {\"recipientsSourceType\":\"AllUsers\",\"rolesNames\":[\"authenticated\"],\"userTags\":[],\"campaignTime\":}. rolesNames/userTags are optional narrowing filters — verify exact role names with get_roles.") - all_users: Optional[SmsToAllUsersDeliverySettingsDto] = None - """ - For deliveryType 'AllUsers'. JSON object: {"recipientsSourceType":"AllUsers","rolesNames":["authenticated"],"userTags":[],"campaignTime":}. rolesNames/userTags are optional narrowing filters — verify exact role names with get_roles. - """ - - - # @ApiMember(Description="For deliveryType 'SpecifiedUsers'. JSON object: {\"recipientsSourceType\":\"SpecifiedUsers\",\"recipients\":[],\"campaignTime\":}.") - specified_users: Optional[SmsToUsersDeliverySettingsDto] = None - """ - For deliveryType 'SpecifiedUsers'. JSON object: {"recipientsSourceType":"SpecifiedUsers","recipients":[],"campaignTime":}. - """ - - - # @ApiMember(Description="For deliveryType 'AccountUsers'. JSON object: {\"recipientsSourceType\":\"AccountUsers\",\"recipients\":[],\"campaignTime\":}. Members without a phone number are skipped.") - account_users: Optional[SmsToAccountUsersDeliverySettingsDto] = None - """ - For deliveryType 'AccountUsers'. JSON object: {"recipientsSourceType":"AccountUsers","recipients":[],"campaignTime":}. Members without a phone number are skipped. - """ - - - collection: Optional[SmsToCollectionRecordsDeliverySettingsDto] = None - # @ApiMember(Description="For deliveryType 'PhoneNumbers'. JSON object: {\"recipientsSourceType\":\"PhoneNumbers\",\"phoneNumbers\":[\"+37060000000\"],\"campaignTime\":}. Numbers in international format.") - phone_numbers: Optional[SmsToPhoneNumbersDeliverySettingsDto] = None - """ - For deliveryType 'PhoneNumbers'. JSON object: {"recipientsSourceType":"PhoneNumbers","phoneNumbers":["+37060000000"],"campaignTime":}. Numbers in international format. - """ - - - # @ApiMember(Description="Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now.") - send_now: Optional[bool] = None - """ - Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now. - """ - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsCampaignSchedulerTaskRequest(SchedulerTaskRequest): - type: Optional[SchedulerTaskType] = None - campaign: Optional[CreateSmsCampaignRequest] = None - database_integration_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushCampaignRequest: - source: Optional[PushCampaignRecipientsSourceTypes] = None - template_id: Optional[str] = None - integration_id: Optional[str] = None - language: Optional[str] = None - initiator_id: Optional[str] = None - notes: Optional[str] = None - mapped_tokens: Optional[List[TokenMappingDto]] = None - campaign_time: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushCampaignSchedulerTaskRequest(SchedulerTaskRequest): - type: Optional[SchedulerTaskType] = None - campaign: Optional[PushCampaignRequest] = None - database_integration_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MongoDbAggregateDto(IHasViewId): - view_id: Optional[str] = None - display_name: Optional[str] = None - description: Optional[str] = None - schema_view_id: Optional[str] = None - pipeline: Optional[str] = None - joined_collections: Optional[List[str]] = None - - -class MarketplaceTransport(str, Enum): - MCP = 'Mcp' - REST = 'Rest' - CODE = 'Code' - INTERNAL = 'Internal' - SDK = 'Sdk' - - -class MarketplaceCategory(str, Enum): - OTHER = 'Other' - CRM = 'Crm' - ERP = 'Erp' - MARKETING = 'Marketing' - COMMUNICATION = 'Communication' - PRODUCTIVITY = 'Productivity' - STORAGE = 'Storage' - ANALYTICS = 'Analytics' - IDENTITY = 'Identity' - PAYMENTS = 'Payments' - DEV_TOOLS = 'DevTools' - AI = 'Ai' - FILES = 'Files' - DATABASE = 'Database' - CALENDAR = 'Calendar' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceValidationStepResultDto: - key: Optional[str] = None - label: Optional[str] = None - required_for_functions: bool = False - succeeded: bool = False - skipped: bool = False - message: Optional[str] = None - error_code: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceIntegrationDto(IntegrationDto): - listing_view_id: Optional[str] = None - transport: Optional[MarketplaceTransport] = None - vendor: Optional[str] = None - category: Optional[MarketplaceCategory] = None - description: Optional[str] = None - config: Optional[IReadOnlyDictionary[str, str]] = None - last_validation_steps: Optional[List[MarketplaceValidationStepResultDto]] = None - signed_in: bool = False - signed_in_by: Optional[str] = None - signed_in_at: Optional[datetime.datetime] = None - token_expires_at: Optional[datetime.datetime] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceFunctionParameterDto: - name: Optional[str] = None - type: Optional[str] = None - description: Optional[str] = None - is_required: bool = False - default_value: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceFunctionDto(IHasViewId): - view_id: Optional[str] = None - integration_view_id: Optional[str] = None - function_key: Optional[str] = None - display_name: Optional[str] = None - description: Optional[str] = None - is_enabled: bool = False - request_template: Optional[str] = None - arguments: Dict[str, str] = field(default_factory=dict) - inputs: List[MarketplaceFunctionParameterDto] = field(default_factory=list) - mapped_tokens: List[TokenMappingDto] = field(default_factory=list) - - -class MarketplaceAvailability(str, Enum): - DEVELOPMENT = 'Development' - STAGING = 'Staging' - PRODUCTION = 'Production' - - -class MarketplaceFieldType(str, Enum): - STRING = 'String' - NUMBER = 'Number' - BOOLEAN = 'Boolean' - URL = 'Url' - EMAIL = 'Email' - JSON = 'Json' - MULTILINE_TEXT = 'MultilineText' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceFieldDefinitionDto: - key: Optional[str] = None - label: Optional[str] = None - description: Optional[str] = None - documentation_url: Optional[str] = None - type: Optional[MarketplaceFieldType] = None - is_required: bool = False - default_value: Optional[str] = None - placeholder: Optional[str] = None - validation_pattern: Optional[str] = None - allowed_values: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceInstallFormDto: - data_schema: Optional[str] = None - ui_schema: Optional[str] = None - secret_keys: List[str] = field(default_factory=list) - - -class MarketplaceParameterLocation(str, Enum): - BODY = 'Body' - HEADER = 'Header' - QUERY = 'Query' - PATH = 'Path' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceParameterSpecDto: - name: Optional[str] = None - location: Optional[MarketplaceParameterLocation] = None - value_template: Optional[str] = None - label: Optional[str] = None - description: Optional[str] = None - documentation_url: Optional[str] = None - type: Optional[str] = None - is_required: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceHttpRequestSpecDto: - method: Optional[str] = None - path_template: Optional[str] = None - parameters: Optional[IReadOnlyList[MarketplaceParameterSpecDto]] = None - content_type: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceValidationStepDto: - key: Optional[str] = None - label: Optional[str] = None - description: Optional[str] = None - required_for_functions: bool = False - probe: Optional[MarketplaceHttpRequestSpecDto] = None - - -class MarketplaceFormKind(str, Enum): - GENERIC = 'Generic' - DATABASE_QUERY = 'DatabaseQuery' - DATABASE_WRITE = 'DatabaseWrite' - MESSAGE = 'Message' - PROMPT = 'Prompt' - WEB = 'Web' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceFunctionDefinitionDto: - definition_id: Optional[str] = None - function_key: Optional[str] = None - display_name: Optional[str] = None - description: Optional[str] = None - group: Optional[str] = None - form_kind: Optional[MarketplaceFormKind] = None - inputs: Optional[IReadOnlyList[MarketplaceFunctionParameterDto]] = None - parameters: Optional[IReadOnlyList[MarketplaceFunctionParameterDto]] = None - request_schema: Optional[str] = None - request_template: Optional[str] = None - request: Optional[MarketplaceHttpRequestSpecDto] = None - default_token_mappings: List[TokenMappingDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceListingDto(IHasViewId): - view_id: Optional[str] = None - slug: Optional[str] = None - display_name: Optional[str] = None - vendor: Optional[str] = None - category: Optional[MarketplaceCategory] = None - transport: Optional[MarketplaceTransport] = None - description: Optional[str] = None - icon_url: Optional[str] = None - documentation_url: Optional[str] = None - video_url: Optional[str] = None - availability: Optional[MarketplaceAvailability] = None - connect_steps: Optional[IReadOnlyList[str]] = None - o_auth_redirect_url: Optional[str] = None - is_official: bool = False - tags: Optional[IReadOnlyList[str]] = None - spec_version: int = 0 - config_fields: Optional[IReadOnlyList[MarketplaceFieldDefinitionDto]] = None - secret_fields: Optional[IReadOnlyList[MarketplaceFieldDefinitionDto]] = None - install_form: Optional[MarketplaceInstallFormDto] = None - validation_steps: Optional[IReadOnlyList[MarketplaceValidationStepDto]] = None - functions: Optional[IReadOnlyList[MarketplaceFunctionDefinitionDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AdminPortalModuleDto: - key: Optional[str] = None - display_name: Optional[str] = None - enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatEntryWireDto: - kind: Optional[str] = None - id: Optional[str] = None - seq: int = 0 - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - ref_entry_id: Optional[str] = None - work_item_id: Optional[str] = None - feedback: Optional[str] = None - feedback_at_utc: Optional[datetime.datetime] = None - feedback_by_user_auth_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatEntryAttachmentWireDto: - id: Optional[str] = None - name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserMessageEntryWireDto(AiChatEntryWireDto): - kind: Optional[str] = None - text: Optional[str] = None - attachments: List[AiChatEntryAttachmentWireDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatEntrySourceWireDto: - kind: Optional[str] = None - requirement_id: Optional[str] = None - session_id: Optional[str] = None - entry_id: Optional[str] = None - entry_seq: Optional[int] = None - artifact_id: Optional[str] = None - label: Optional[str] = None - step: Optional[int] = None - number: Optional[int] = None - source_kind: Optional[str] = None - source_id: Optional[str] = None - score: Optional[float] = None - cited: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AssistantTextEntryWireDto(AiChatEntryWireDto): - kind: Optional[str] = None - text: Optional[str] = None - is_streaming: bool = False - sources: List[AiChatEntrySourceWireDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatQuestionOptionWireDto: - value: Optional[str] = None - label: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatQuestionWireDto: - id: Optional[str] = None - text: Optional[str] = None - options: List[AiChatQuestionOptionWireDto] = field(default_factory=list) - default: Optional[str] = None - allow_free_text: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatGateResultWireDto: - class_: Optional[str] = field(metadata=config(field_name='class'), default=None) - reason: Optional[str] = None - affected_requirement_ids: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AssistantQuestionEntryWireDto(AiChatEntryWireDto): - kind: Optional[str] = None - questions: List[AiChatQuestionWireDto] = field(default_factory=list) - status: Optional[str] = None - scope: Optional[str] = None - gate: Optional[AiChatGateResultWireDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserAnswerEntryWireDto(AiChatEntryWireDto): - kind: Optional[str] = None - answers: Dict[str, str] = field(default_factory=dict) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatPlanStepInputsWireDto: - artifacts: List[str] = field(default_factory=list) - requirements: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatPlanStepDoneCheckWireDto: - check: Optional[str] = None - args_json: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatPlanStepLoopWireDto: - max_iterations: Optional[int] = None - max_tool_calls: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatPlanStepWireDto: - n: int = 0 - tool: Optional[str] = None - title: Optional[str] = None - goal: Optional[str] = None - inputs: Optional[AiChatPlanStepInputsWireDto] = None - depends_on: List[int] = field(default_factory=list) - replaces: Optional[int] = None - done: List[AiChatPlanStepDoneCheckWireDto] = field(default_factory=list) - loop: Optional[AiChatPlanStepLoopWireDto] = None - difficulty: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PlanEntryWireDto(AiChatEntryWireDto): - kind: Optional[str] = None - goal: Optional[str] = None - steps: List[AiChatPlanStepWireDto] = field(default_factory=list) - status: Optional[str] = None - gate: Optional[AiChatGateResultWireDto] = None - difficulty: Optional[int] = None - difficulty_reason: Optional[str] = None - delta_of: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserDecisionEntryWireDto(AiChatEntryWireDto): - kind: Optional[str] = None - decision: Optional[str] = None - comment: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiChatStepLogLineWireDto: - seq: int = 0 - tool: Optional[str] = None - agent: Optional[str] = None - status: Optional[str] = None - detail: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RunStepEntryWireDto(AiChatEntryWireDto): - kind: Optional[str] = None - n: int = 0 - tool: Optional[str] = None - title: Optional[str] = None - status: Optional[str] = None - result_summary: Optional[str] = None - error: Optional[str] = None - log: List[AiChatStepLogLineWireDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ActionPendingEntryWireDto(AiChatEntryWireDto): - kind: Optional[str] = None - tool: Optional[str] = None - arguments_json: Optional[str] = None - status: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class NoticeEntryWireDto(AiChatEntryWireDto): - kind: Optional[str] = None - text: Optional[str] = None - level: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ConversationSnapshotEntryWireDto(AiChatEntryWireDto): - kind: Optional[str] = None - snapshot_id: Optional[str] = None - covers_up_to_seq: int = 0 - - -class CodeFunctionSource(str, Enum): - DATABASE = 'Database' - MEMBERSHIP = 'Membership' - FILES = 'Files' - PAYMENTS = 'Payments' - AI = 'Ai' - SCHEDULER = 'Scheduler' - MANUAL = 'Manual' - - -class CodeFunctionCallerKind(str, Enum): - USER = 'User' - API_KEY = 'ApiKey' - SYSTEM = 'System' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeFunctionCallerDto: - user_id: Optional[str] = None - email: Optional[str] = None - kind: Optional[CodeFunctionCallerKind] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeFunctionRunAsDto: - user_id: Optional[str] = None - access_token: Optional[str] = None - expires_at: Optional[datetime.datetime] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeFunctionContextDto: - account_id: Optional[str] = None - project_id: Optional[str] = None - environment: Optional[str] = None - region: Optional[str] = None - hub_url: Optional[str] = None - api_url: Optional[str] = None - echo_url: Optional[str] = None - trigger_id: Optional[str] = None - task_id: Optional[str] = None - correlation_id: Optional[str] = None - caller: Optional[CodeFunctionCallerDto] = None - run_as: Optional[CodeFunctionRunAsDto] = None - - -class ResourceKindDto(str, Enum): - CONTACT = 'contact' - DOCUMENT = 'document' - FILE = 'file' - PAYMENT_CUSTOMER = 'paymentCustomer' - ORDER = 'order' - PAYMENT = 'payment' - PRODUCT = 'product' - INTEGRATION = 'integration' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ResourceRefDto: - project_id: Optional[str] = None - integration_id: Optional[str] = None - kind: Optional[ResourceKindDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DocumentRefDto(ResourceRefDto): - kind: Optional[ResourceKindDto] = None - database_integration_id: Optional[str] = None - schema_id: Optional[str] = None - external_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DatabaseRecordsBatchDto: - ids: List[str] = field(default_factory=list) - count: int = 0 - truncated: bool = False - documents: Optional[List[Dict[str, Object]]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DatabaseRecordChangeDto: - collection: Optional[str] = None - schema_id: Optional[str] = None - schema_version: Optional[int] = None - record_id: Optional[str] = None - old: Optional[Dict[str, Object]] = None - new: Optional[Dict[str, Object]] = None - truncated: bool = False - old_ref: Optional[DocumentRefDto] = None - new_ref: Optional[DocumentRefDto] = None - records: Optional[DatabaseRecordsBatchDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserChangeDto: - user_id: Optional[str] = None - old: Optional[Dict[str, Object]] = None - new: Optional[Dict[str, Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FileChangeDto: - old: Optional[Dict[str, Object]] = None - new: Optional[Dict[str, Object]] = None - path: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentFactDto: - integration_id: Optional[str] = None - provider: Optional[str] = None - provider_event_id: Optional[str] = None - order_id: Optional[str] = None - event_name: Optional[str] = None - status: Optional[str] = None - amount_minor: Optional[int] = None - currency: Optional[str] = None - external_ids: Optional[Dict[str, str]] = None - occurred_on: Optional[datetime.datetime] = None - received_on: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiUsageEventDto: - payload: Dict[str, Object] = field(default_factory=dict) - target_user_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ScheduledTaskInfoDto: - task_id: Optional[str] = None - name: Optional[str] = None - fired_at: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceFunctionCallDto: - function_id: Optional[str] = None - function_key: Optional[str] = None - integration_id: Optional[str] = None - payload: Dict[str, Object] = field(default_factory=dict) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeFunctionDataDto: - database: Optional[DatabaseRecordChangeDto] = None - user: Optional[UserChangeDto] = None - file: Optional[FileChangeDto] = None - payment: Optional[PaymentFactDto] = None - order: Optional[PaymentOrderEventDto] = None - ai: Optional[AiUsageEventDto] = None - task: Optional[ScheduledTaskInfoDto] = None - payload: Optional[Dict[str, Object]] = None - marketplace: Optional[MarketplaceFunctionCallDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeFunctionEventDto: - spec_version: Optional[str] = None - id: Optional[str] = None - event_id: Optional[str] = None - event: Optional[str] = None - source: Optional[CodeFunctionSource] = None - created_on: datetime.datetime = datetime.datetime(1, 1, 1) - context: Optional[CodeFunctionContextDto] = None - data: Optional[CodeFunctionDataDto] = None - config: Optional[Dict[str, Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FakeCodeIntegrationDto(CodeIntegrationDto): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FakeCodeIntegrationRequest(CodeIntegrationRequest): - provider: Optional[CodeProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeFunctionSchedulerTaskRequest(SchedulerTaskRequest): - type: Optional[SchedulerTaskType] = None - function_ref: Optional[FunctionRefDto] = None - invocation_type: Optional[CodeInvocationType] = None - config: Optional[str] = None - mapped_tokens: Optional[List[TokenMappingDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceFunctionSchedulerTaskRequest(SchedulerTaskRequest): - type: Optional[SchedulerTaskType] = None - function_id: Optional[str] = None - payload: Optional[Dict[str, str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class JsonSchemaFieldDto: - field_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StringFieldDto(JsonSchemaFieldDto): - format: Optional[str] = None - pattern: Optional[str] = None - min_length: Optional[int] = None - max_length: Optional[int] = None - translate_options: Optional[IReadOnlyDictionary[str, str]] = None - default: Optional[str] = None - unique: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DecimalFieldDto(JsonSchemaFieldDto): - minimum: Optional[Decimal] = None - maximum: Optional[Decimal] = None - multiple_of: Optional[Decimal] = None - default: Optional[Decimal] = None - unique: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CurrencyDefaultDto: - value: Decimal = decimal.Decimal(0) - currency: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CurrencyFieldDto(JsonSchemaFieldDto): - allowed_currencies: Optional[IReadOnlyList[str]] = None - multiple_of: Optional[Decimal] = None - minimum: Optional[Decimal] = None - maximum: Optional[Decimal] = None - default: Optional[CurrencyDefaultDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class BooleanFieldDto(JsonSchemaFieldDto): - default: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DateFieldDto(JsonSchemaFieldDto): - minimum: Optional[int] = None - maximum: Optional[int] = None - default: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class IntegerFieldDto(JsonSchemaFieldDto): - minimum: Optional[int] = None - maximum: Optional[int] = None - default: Optional[int] = None - unique: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GeolocationFieldDto(JsonSchemaFieldDto): - allowed_types: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TagsFieldDto(JsonSchemaFieldDto): - min_items: Optional[int] = None - max_items: Optional[int] = None - default: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FileFieldDto(JsonSchemaFieldDto): - storages: Optional[IReadOnlyList[str]] = None - min_items: Optional[int] = None - max_items: Optional[int] = None - allowed_file_type: Optional[str] = None - max_size_mb: Optional[Decimal] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TaxonomySelectionFieldDto(JsonSchemaFieldDto): - taxonomy_id: Optional[str] = None - multiple: bool = False - display_field: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CollectionSelectionFieldDto(JsonSchemaFieldDto): - collection_id: Optional[str] = None - display_field: Optional[str] = None - multiple: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserSelectionFieldDto(JsonSchemaFieldDto): - multiple: bool = False - display_field: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RoleSelectionFieldDto(JsonSchemaFieldDto): - multiple: bool = False - display_field: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnumSelectionFieldDto(JsonSchemaFieldDto): - values: Optional[IReadOnlyList[str]] = None - multiple: bool = False - default: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ObjectFieldDto(JsonSchemaFieldDto): - properties: Optional[IReadOnlyList[JsonSchemaFieldDto]] = None - required: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ArrayFieldDto(JsonSchemaFieldDto): - items: Optional[JsonSchemaFieldDto] = None - min_items: Optional[int] = None - max_items: Optional[int] = None - unique_items: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class JsonFieldDto(JsonSchemaFieldDto): - max_bytes: Optional[int] = None - - -class IVersionBasedRequest: - version: Optional[str] = None - - -class IHasCorrelationIdRequest: - correlation_id: Optional[str] = None - - -class IHasProjectId: - project_id: Optional[str] = None - - -class IHasEnv: - env: Optional[str] = None - - -class SubscriptionType(str, Enum): - MANAGED_SERVICE = 'ManagedService' - LICENSE = 'License' - - -class IHasAccountId: - account_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TagDescriptionDto: - title: Optional[str] = None - description: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TagTranslationDto: - language: Optional[str] = None - content: Optional[TagDescriptionDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TagDefinitionBaseDto: - tag: Optional[str] = None - translations: List[TagTranslationDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GroupDefinitionDto(TagDefinitionBaseDto): - pass - - -class DeliveryChannel(str, Enum): - EMAIL = 'Email' - PUSH = 'Push' - SMS = 'Sms' - WEB_PUSH = 'WebPush' - IN_APP = 'InApp' - CHAT_BOT = 'ChatBot' - CHAT_PLATFORM = 'ChatPlatform' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TagDefinitionDto(TagDefinitionBaseDto): - default_delivery: Dict[str, bool] = field(default_factory=dict) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiPlanModelDto: - llm_integration_id: Optional[str] = None - model: Optional[str] = None - - -class AiPlanQuotaUnit(str, Enum): - NONE = 'None' - CREDITS = 'Credits' - TOKENS = 'Tokens' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiPlanFeaturesDto: - attachments: bool = False - rag: bool = False - memory: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiPlanDto: - id: Optional[str] = None - name: Optional[str] = None - allowed_assistant_ids: List[str] = field(default_factory=list) - allowed_models: List[AiPlanModelDto] = field(default_factory=list) - quota_unit: Optional[AiPlanQuotaUnit] = None - monthly_quota: int = 0 - features: Optional[AiPlanFeaturesDto] = None - quota_reached_message: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiPlanRoleAssignmentDto: - role_id: Optional[str] = None - plan_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectAiAssistantRequestBase(CodeMashRequestBase): - # @ApiMember(Description="Name shown to end users. Required, at most 100 characters, unique in the project.") - name: Optional[str] = None - """ - Name shown to end users. Required, at most 100 characters, unique in the project. - """ - - - # @ApiMember(Description="First message end users see. Public. At most 2 000 characters.") - welcome_message: Optional[str] = None - """ - First message end users see. Public. At most 2 000 characters. - """ - - - # @ApiMember(Description="Instructions for the model. Never shown to end users. At most 20 000 characters.") - system_prompt: Optional[str] = None - """ - Instructions for the model. Never shown to end users. At most 20 000 characters. - """ - - - # @ApiMember(Description="Own-scope toolsets the assistant may use: own:records (the user's own database records), own:profile (their profile), own:preferences (their marketing preferences), own:knowledge (search_knowledge — the user's own and the project-wide knowledge). Any other name is refused.") - toolsets: Optional[List[str]] = None - """ - Own-scope toolsets the assistant may use: own:records (the user's own database records), own:profile (their profile), own:preferences (their marketing preferences), own:knowledge (search_knowledge — the user's own and the project-wide knowledge). Any other name is refused. - """ - - - # @ApiMember(Description="The assistant's own LLM integration id (int_…). Empty = the project's default LLM.") - llm_integration_id: Optional[str] = None - """ - The assistant's own LLM integration id (int_…). Empty = the project's default LLM. - """ - - - # @ApiMember(Description="Model name. Empty = the integration's default model.") - model: Optional[str] = None - """ - Model name. Empty = the integration's default model. - """ - - - # @ApiMember(Description="True to let the assistant remember facts about the end user across chats.") - memory_enabled: bool = False - """ - True to let the assistant remember facts about the end user across chats. - """ - - - # @ApiMember(Description="Knowledge the assistant retrieves from before each answer and cites as [n]: record (records of schemas with embed on), file (uploaded files, when the project embeds them), message (the user's earlier chats, assistants with memory). Empty = no automatic retrieval.") - rag_source_ids: Optional[List[str]] = None - """ - Knowledge the assistant retrieves from before each answer and cites as [n]: record (records of schemas with embed on), file (uploaded files, when the project embeds them), message (the user's earlier chats, assistants with memory). Empty = no automatic retrieval. - """ - - - # @ApiMember(Description="Best relevance (0–1) below which the answer says the knowledge does not match strongly. Empty = 0.5; 0 = never.") - weak_match_threshold: Optional[float] = None - """ - Best relevance (0–1) below which the answer says the knowledge does not match strongly. Empty = 0.5; 0 = never. - """ - - - # @ApiMember(Description="AI plan (quota) id. Optional.") - plan_id: Optional[str] = None - """ - AI plan (quota) id. Optional. - """ - - - # @ApiMember(Description="True to make this the project's default assistant; the previous default stops being default.") - is_default: bool = False - """ - True to make this the project's default assistant; the previous default stops being default. - """ - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiProjectRoleIdsDto: - project_id: Optional[str] = None - role_ids: List[str] = field(default_factory=list) - - -class Gender(str, Enum): - MALE = 'Male' - FEMALE = 'Female' - OTHER = 'Other' - - -class MarketingBlockReason(str, Enum): - UNSPECIFIED = 'Unspecified' - UNSUBSCRIBED = 'Unsubscribed' - COMPLAINT = 'Complaint' - HARD_BOUNCE = 'HardBounce' - INVALID_EMAIL = 'InvalidEmail' - ADMIN_BLOCK = 'AdminBlock' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserGeneralInfoDto: - phone: Optional[str] = None - primary_email: Optional[str] = None - display_name: Optional[str] = None - first_name: Optional[str] = None - last_name: Optional[str] = None - full_name: Optional[str] = None - address_line1: Optional[str] = None - address_line2: Optional[str] = None - country: Optional[str] = None - city: Optional[str] = None - state: Optional[str] = None - postal_code: Optional[str] = None - company: Optional[str] = None - gender: Optional[Gender] = None - birth_date: Optional[int] = None - time_zone: Optional[str] = None - language: Optional[str] = None - block_all_marketing_messages: bool = False - blocked_tags: Optional[Dict[str, HashSet[str]]] = None - block_reasons: Optional[List[MarketingBlockReason]] = None - extra_metadata: Optional[str] = None - notes: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ImportUserRowDto: - email: Optional[str] = None - user_name: Optional[str] = None - user_general_info: Optional[UserGeneralInfoDto] = None - roles: Optional[List[str]] = None - created_on: Optional[int] = None - hash_format: Optional[str] = None - password_hash: Optional[str] = None - password_salt: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteTrigger(CodeMashRequestBase): - trigger_id: Optional[str] = None - trigger_type: Optional[TriggerType] = None - schema_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableTrigger(CodeMashRequestBase): - trigger_id: Optional[str] = None - trigger_type: Optional[TriggerType] = None - schema_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableTrigger(CodeMashRequestBase): - trigger_id: Optional[str] = None - trigger_type: Optional[TriggerType] = None - schema_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetTrigger(CodeMashRequestBase): - id: Optional[str] = None - schema_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveTrigger(CodeMashRequestBase): - trigger: Optional[SaveTriggerRequest] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CredentialsSettingsModeDto: - name: Optional[str] = None - logout_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CursorArgs(ICursorArgs): - field: Optional[str] = None - order: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PagingArgs: - cursor_args: Optional[CursorArgs] = None - page_size: Optional[int] = None - starting_after: Optional[str] = None - ending_before: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaUniqueIndexDto: - fields: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaSettingsDto: - soft_delete: bool = False - has_record_owner: bool = False - description: Optional[str] = None - unique_indexes: Optional[List[SchemaUniqueIndexDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaEmbedSettingsDto: - enabled: bool = False - fields: List[str] = field(default_factory=list) - embedding_integration_id: Optional[str] = None - per_user: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaListColumnDto: - field: Optional[str] = None - primary: bool = False - link_reference: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaListSortDto: - field: Optional[str] = None - order: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaListSettingsDto: - columns: List[SchemaListColumnDto] = field(default_factory=list) - default_sort: Optional[SchemaListSortDto] = None - filters: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ImportColumnMappingDto: - csv_column_index: int = 0 - csv_header: Optional[str] = None - property_name: Optional[str] = None - dont_import_on_error: bool = False - - -class EmailValidationProvider(IntEnum): - ZERO_BOUNCE = 1 - NEVER_BOUNCE = 2 - BOUNCER = 3 - MAILGUN_VALIDATE = 4 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailValidationIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[EmailValidationProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveEmailTemplate(CodeMashRequestBase): - # @ApiMember(Description="The display name of the email template.", IsRequired=true) - template_name: Optional[str] = None - """ - The display name of the email template. - """ - - - # @ApiMember(Description="Optional free-text description of what the template is used for.") - description: Optional[str] = None - """ - Optional free-text description of what the template is used for. - """ - - - # @ApiMember(Description="The communication channel the template is intended for (e.g. Transactional, Marketing).") - communication_channel: Optional[CommunicationChannel] = None - """ - The communication channel the template is intended for (e.g. Transactional, Marketing). - """ - - - # @ApiMember(Description="Optional tags to organize/filter the template by.") - tags: Optional[List[str]] = None - """ - Optional tags to organize/filter the template by. - """ - - - # @ApiMember(Description="Optional static file attachments to send with every email using this template.") - static_attachments: Optional[List[FileResourceRefDto]] = None - """ - Optional static file attachments to send with every email using this template. - """ - - - # @ApiMember(Description="The per-language content translations (subject/body) for this template.", IsRequired=true) - translations: List[EmailMessageTranslationDto] = field(default_factory=list) - """ - The per-language content translations (subject/body) for this template. - """ - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TranslationDto: - language: Optional[str] = None - content: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveSmsTemplate(CodeMashRequestBase): - # @ApiMember(Description="Display name for the SMS template.", IsRequired=true) - template_name: Optional[str] = None - """ - Display name for the SMS template. - """ - - - # @ApiMember(Description="Optional free-text description of the template's purpose.") - description: Optional[str] = None - """ - Optional free-text description of the template's purpose. - """ - - - # @ApiMember(Description="Whether this template is Transactional or Marketing SMS.", IsRequired=true) - communication_channel: Optional[CommunicationChannel] = None - """ - Whether this template is Transactional or Marketing SMS. - """ - - - # @ApiMember(Description="Optional tags to organize/filter templates.") - tags: Optional[List[str]] = None - """ - Optional tags to organize/filter templates. - """ - - - # @ApiMember(Description="The template's per-language translations (each with its own SMS body).", IsRequired=true) - translations: List[SmsMessageTranslationDto] = field(default_factory=list) - """ - The template's per-language translations (each with its own SMS body). - """ - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[SmsProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - - -class MarketplaceAccessLevel(str, Enum): - NONE = 'None' - VIEWER = 'Viewer' - FUNCTIONS_ONLY = 'FunctionsOnly' - READ_ONLY = 'ReadOnly' - FULL_ACCESS = 'FullAccess' - MANAGE = 'Manage' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SavePushTemplate(CodeMashRequestBase): - # @ApiMember(Description="The template's display name.", IsRequired=true) - template_name: Optional[str] = None - """ - The template's display name. - """ - - - # @ApiMember(Description="Optional free-text description of the template's purpose.") - description: Optional[str] = None - """ - Optional free-text description of the template's purpose. - """ - - - # @ApiMember(Description="Whether the template is Transactional or Marketing.") - communication_channel: Optional[CommunicationChannel] = None - """ - Whether the template is Transactional or Marketing. - """ - - - # @ApiMember(Description="Optional tags for organizing/filtering templates.") - tags: Optional[List[str]] = None - """ - Optional tags for organizing/filtering templates. - """ - - - # @ApiMember(Description="The per-locale translations (title/body/subtitle) that make up the template content.", IsRequired=true) - translations: List[PushMessageTranslationDto] = field(default_factory=list) - """ - The per-locale translations (title/body/subtitle) that make up the template content. - """ - - -class DeviceType(str, Enum): - UNKNOWN = 'Unknown' - PHONE = 'Phone' - TABLET = 'Tablet' - DESKTOP = 'Desktop' - TV = 'Tv' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushDeviceDto: - device_id: Optional[str] = None - device_os: Optional[str] = None - token: Optional[str] = None - brand: Optional[str] = None - manufacturer: Optional[str] = None - model_name: Optional[str] = None - device_name: Optional[str] = None - device_type: Optional[DeviceType] = None - os_name: Optional[str] = None - os_version: Optional[str] = None - platform_api_level: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChatScreenContextDto: - kind: Optional[str] = None - view_id: Optional[str] = None - - -class INoSessionCookies: - pass - - -class EmbeddingProvider(str, Enum): - VOYAGE = 'Voyage' - OPEN_A_I = 'OpenAI' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmbeddingIntegrationRequest: - integration_id: Optional[str] = None - provider: Optional[EmbeddingProvider] = None - integration_name: Optional[str] = None - is_enabled: bool = False - endpoint: Optional[str] = None - model: Optional[str] = None - dimension: int = 0 - api_key: Optional[str] = None - - -class CaseResolutionFixKind(str, Enum): - CODE_FIX = 'CodeFix' - CONFIG_CHANGE = 'ConfigChange' - CUSTOMER_INSTRUCTION = 'CustomerInstruction' - KNOWN_LIMITATION = 'KnownLimitation' - DUPLICATE = 'Duplicate' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CaseResolutionDto: - problem: Optional[str] = None - symptoms: List[str] = field(default_factory=list) - root_cause: Optional[str] = None - fix: Optional[CaseResolutionFixKind] = None - fix_detail: Optional[str] = None - affected_versions: Optional[List[str]] = None - - -class CodeMashRelease(str, Enum): - NOT_SET = 'NotSet' - COMMUNITY = 'Community' - MANAGED_SERVICE = 'ManagedService' - ENTERPRISE = 'Enterprise' - - -class CodeMashRuntime(str, Enum): - DEVELOPMENT = 'Development' - CI = 'CI' - STAGING = 'Staging' - PRODUCTION = 'Production' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoRegionDto: - code: Optional[str] = None - display_name: Optional[str] = None - api_url: Optional[str] = None - hub_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoAgentSnippetDto: - client: Optional[str] = None - kind: Optional[str] = None - recommended: bool = False - auth: Optional[str] = None - config: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoAgentDto: - mcp_url: Optional[str] = None - o_auth_metadata_url: Optional[str] = None - installation_type: Optional[str] = None - onboarding_docs_url: Optional[str] = None - tools_url: Optional[str] = None - cli_package: Optional[str] = None - cli_install_command: Optional[str] = None - device_authorization_url: Optional[str] = None - device_token_url: Optional[str] = None - snippets: List[EchoAgentSnippetDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoHostingPlatformDto: - provider: Optional[str] = None - is_aws: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicBrandDto: - display_name: Optional[str] = None - main_color: Optional[str] = None - accent_color: Optional[str] = None - logo_url: Optional[str] = None - icon_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicPasswordPolicyDto: - min_length: int = 0 - max_length: Optional[int] = None - min_numbers: Optional[int] = None - min_upper: Optional[int] = None - min_lower: Optional[int] = None - min_special: Optional[int] = None - allowed_special: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicAuthDto: - social_providers: List[str] = field(default_factory=list) - passkey: bool = False - methods: Optional[List[str]] = None - password_policy: Optional[PublicPasswordPolicyDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicAiAssistantDto: - id: Optional[str] = None - name: Optional[str] = None - welcome: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicAiChatDto: - enabled: bool = False - assistants: List[PublicAiAssistantDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerAttentionDto: - trigger_id: Optional[str] = None - trigger_type: Optional[TriggerType] = None - reason: Optional[str] = None - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerActivationTestProblem: - code: Optional[str] = None - message: Optional[str] = None - line: int = 0 - column: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountOwnerDto: - email: Optional[str] = None - display_name: Optional[str] = None - billing_email: Optional[str] = None - operations_email: Optional[str] = None - security_email: Optional[str] = None - - -# @Flags() -class AccountStatus(IntEnum): - REGISTERED = 1 - PENDING_VALIDATION = 2 - ACTIVE = 8 - IN_ACTIVE = 16 - BLOCKED = 32 - UNREGISTERED = 64 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountStatusDto: - account_id: Optional[str] = None - account_id_as_guid: Optional[str] = None - user_id: Optional[str] = None - logged_in_user_id: Optional[str] = None - logged_in_user_email: Optional[str] = None - status: Optional[AccountStatus] = None - project_cap: int = 0 - permissions: List[str] = field(default_factory=list) - roles: List[str] = field(default_factory=list) - allowed_projects: Optional[List[str]] = None - trial_was_issued: bool = False - email_verified: bool = False - joined_by_invitation: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UsageBillingClusterChargeDto: - atlas_project_id: Optional[str] = None - atlas_cluster_name: Optional[str] = None - cents: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UsageBillingPeriodDto: - period: Optional[str] = None - total_cents: int = 0 - per_cluster: List[UsageBillingClusterChargeDto] = field(default_factory=list) - recorded_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UsageBillingIngestionFailureDto: - reason: Optional[str] = None - period: Optional[str] = None - stripe_event_id: Optional[str] = None - message: Optional[str] = None - reported_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UsageBillingDto: - account_id: Optional[str] = None - atlas: Dict[str, UsageBillingPeriodDto] = field(default_factory=dict) - ingestion_failures: List[UsageBillingIngestionFailureDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PromotionItemDto: - type: Optional[str] = None - id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PromotionBlockerDto: - content_type: Optional[str] = None - content_id: Optional[str] = None - ref_kind: Optional[str] = None - unresolved_ref: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PromotionTermChangeDto: - taxonomy_id: Optional[str] = None - term_id: Optional[str] = None - slug: Optional[str] = None - change: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PromotionResultDto: - content_mirrored: List[PromotionItemDto] = field(default_factory=list) - content_deleted: List[PromotionItemDto] = field(default_factory=list) - integrations_seeded: List[PromotionItemDto] = field(default_factory=list) - integrations_to_provision: List[PromotionItemDto] = field(default_factory=list) - integrations_skipped: List[PromotionItemDto] = field(default_factory=list) - blockers: List[PromotionBlockerDto] = field(default_factory=list) - term_changes: List[PromotionTermChangeDto] = field(default_factory=list) - warnings: List[PromotionBlockerDto] = field(default_factory=list) - from_version: Optional[int] = None - was_dry_run: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectEnvironmentsDto: - environments: List[str] = field(default_factory=list) - - -class ProjectStatus(str, Enum): - ACTIVE = 'Active' - PROVISIONING = 'Provisioning' - PROVISIONING_FAILED = 'ProvisioningFailed' - NO_DATABASE = 'NoDatabase' - DISABLED = 'Disabled' - SUSPENDED = 'Suspended' - REMOVED = 'Removed' - - -class Continent(str, Enum): - AFRICA = 'Africa' - ANTARCTICA = 'Antarctica' - ASIA = 'Asia' - EUROPE = 'Europe' - NORTH_AMERICA = 'NorthAmerica' - OCEANIA = 'Oceania' - SOUTH_AMERICA = 'SouthAmerica' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectRegionDto: - id: Optional[str] = None - continent: Optional[Continent] = None - name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectBrandDto: - main_color: Optional[str] = None - accent_color: Optional[str] = None - logo: Optional[FileResourceRefDto] = None - icon: Optional[FileResourceRefDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class NotificationsSettingsGroupDto: - tag: Optional[str] = None - tags: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class NotificationSettingsChannelDto: - channel: Optional[CommunicationChannel] = None - groups: List[NotificationsSettingsGroupDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class NotificationSettingsDto: - channels: List[NotificationSettingsChannelDto] = field(default_factory=list) - all_groups: List[GroupDefinitionDto] = field(default_factory=list) - all_tags: List[TagDefinitionDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthenticationFlowPasswordPolicyDto: - min_length: int = 0 - max_length: Optional[int] = None - min_numbers: Optional[int] = None - min_upper: Optional[int] = None - min_lower: Optional[int] = None - min_special: Optional[int] = None - allowed_special: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthenticationFlowSummaryDto: - type: Optional[str] = None - provider: Optional[str] = None - password_complexity: Optional[AuthenticationFlowPasswordPolicyDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiAssistantDto: - id: Optional[str] = None - name: Optional[str] = None - welcome_message: Optional[str] = None - system_prompt: Optional[str] = None - toolsets: List[str] = field(default_factory=list) - llm_integration_id: Optional[str] = None - model: Optional[str] = None - memory_enabled: bool = False - rag_source_ids: List[str] = field(default_factory=list) - weak_match_threshold: Optional[float] = None - plan_id: Optional[str] = None - is_default: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectAiSettingsDto: - enabled: bool = False - default_llm_integration_id: Optional[str] = None - default_model: Optional[str] = None - assistants: List[AiAssistantDto] = field(default_factory=list) - embed_files: bool = False - plans: List[AiPlanDto] = field(default_factory=list) - plan_role_assignments: List[AiPlanRoleAssignmentDto] = field(default_factory=list) - default_plan_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerDto(IHasViewId, IQueuedTrigger): - type: Optional[TriggerType] = None - view_id: Optional[str] = None - name: Optional[str] = None - then_action: Optional[TriggerActionDto] = None - description: Optional[str] = None - is_enabled: bool = False - activation_code: Optional[str] = None - order: Optional[int] = None - break_on_error: bool = False - saved_by_auth_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaTriggerDto(TriggerDto): - schema_id: Optional[str] = None - when: Optional[SchemaTriggerType] = None - configuration_code: Optional[str] = None - env: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DatabaseDto: - is_enabled: bool = False - triggers: Optional[List[SchemaTriggerDto]] = None - default_integration_view_ids: Dict[str, str] = field(default_factory=dict) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailDto: - is_enabled: bool = False - default_integration_view_ids: Dict[str, str] = field(default_factory=dict) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiDto: - is_enabled: bool = False - default_integration_view_ids: Dict[str, str] = field(default_factory=dict) - default_integration_view_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipTriggerDto(TriggerDto): - when: Optional[MembershipTriggerType] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RoleItemDto: - id: Optional[str] = None - name: Optional[str] = None - display_name: Optional[str] = None - description: Optional[str] = None - is_system: bool = False - attached_policies: Optional[List[str]] = None - - -class PermissionEffect(str, Enum): - ALLOW = 'Allow' - DENY = 'Deny' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PermissionDto: - sid: Optional[str] = None - effect: Optional[PermissionEffect] = None - actions: List[str] = field(default_factory=list) - resources: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PolicyItemDto: - id: Optional[str] = None - name: Optional[str] = None - description: Optional[str] = None - is_system: bool = False - version: Optional[str] = None - permissions: Optional[List[PermissionDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthorizationDto: - user_registers_as_role: Optional[str] = None - allowed_register_roles: Optional[List[str]] = None - allowed_provider_register_roles: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipDto: - is_enabled: bool = False - triggers: Optional[List[MembershipTriggerDto]] = None - custom_roles: Optional[List[RoleItemDto]] = None - custom_policies: Optional[List[PolicyItemDto]] = None - system_role_attachments: Optional[List[RoleItemDto]] = None - authorization: Optional[AuthorizationDto] = None - require_email_validation: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LoggingDto: - is_enabled: bool = False - is_established: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ServerEventsDto: - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushDto: - is_enabled: bool = False - default_integration_view_ids: Dict[str, str] = field(default_factory=dict) - marketing_tags: Optional[List[TagDefinitionDto]] = None - transactional_tags: Optional[List[TagDefinitionDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchedulerDto: - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeDto: - is_enabled: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FilesTriggerDto(TriggerDto): - when: Optional[FilesTriggerType] = None - folder: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FilesDto: - is_enabled: bool = False - triggers: Optional[List[FilesTriggerDto]] = None - default_integration_view_ids: Dict[str, str] = field(default_factory=dict) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentTriggerDto(TriggerDto): - when: Optional[PaymentTriggerType] = None - integrations: Optional[List[str]] = None - events: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentsDto: - is_enabled: bool = False - triggers: Optional[List[PaymentTriggerDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsDto: - is_enabled: bool = False - default_integration_view_ids: Dict[str, str] = field(default_factory=dict) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectDto(IHasViewId, IBindableContract): - account_view_id: Optional[str] = None - project_status: Optional[ProjectStatus] = None - is_active: bool = False - view_id: Optional[str] = None - name: Optional[str] = None - unique_name: Optional[str] = None - host_label: Optional[str] = None - api_host: Optional[str] = None - description: Optional[str] = None - marketing_url: Optional[str] = None - canonical_admin_url: Optional[str] = None - admin_url: Optional[str] = None - effective_admin_url: Optional[str] = None - default_language: Optional[str] = None - languages: List[str] = field(default_factory=list) - primary_region: Optional[ProjectRegionDto] = None - additional_regions: Optional[List[ProjectRegionDto]] = None - is_multi_region_eligible: bool = False - brand: Optional[ProjectBrandDto] = None - notification_settings: Optional[NotificationSettingsDto] = None - allowed_origins: Optional[List[str]] = None - expose_brand_to_admin_portal: bool = False - expose_auth_to_admin_portal: bool = False - admin_portal_enabled: bool = False - admin_portal_service_user_id: Optional[str] = None - membership_authentication_flows: Optional[List[AuthenticationFlowSummaryDto]] = None - expose_legal_to_admin_portal: bool = False - ai_chat: Optional[ProjectAiSettingsDto] = None - legal_terms_markdown: Optional[str] = None - legal_privacy_markdown: Optional[str] = None - environments: List[str] = field(default_factory=list) - environment_ranks: Dict[str, int] = field(default_factory=dict) - database: Optional[DatabaseDto] = None - email: Optional[EmailDto] = None - ai: Optional[AiDto] = None - membership: Optional[MembershipDto] = None - logging: Optional[LoggingDto] = None - server_events: Optional[ServerEventsDto] = None - push: Optional[PushDto] = None - scheduler: Optional[SchedulerDto] = None - code: Optional[CodeDto] = None - files: Optional[FilesDto] = None - payments: Optional[PaymentsDto] = None - sms: Optional[SmsDto] = None - database_enabled: bool = False - email_enabled: bool = False - membership_enabled: bool = False - logging_enabled: bool = False - server_events_enabled: bool = False - push_enabled: bool = False - scheduler_enabled: bool = False - code_enabled: bool = False - files_enabled: bool = False - payments_enabled: bool = False - sms_enabled: bool = False - default_llm_integration_view_id: Optional[str] = None - connections: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectListItemDto: - view_id: Optional[str] = None - is_active: bool = False - project_status: Optional[ProjectStatus] = None - name: Optional[str] = None - unique_name: Optional[str] = None - primary_region: Optional[ProjectRegionDto] = None - additional_regions: Optional[List[ProjectRegionDto]] = None - modules_count: int = 0 - users_count: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiCreditPackCheckoutDto: - url: Optional[str] = None - session_id: Optional[str] = None - pack: Optional[str] = None - credits: int = 0 - price_euro_cents: int = 0 - purchase_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectAiPlansDto: - plans: List[AiPlanDto] = field(default_factory=list) - roles: List[AiPlanRoleAssignmentDto] = field(default_factory=list) - default_plan_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiUserPlanAssignmentDto: - user_id: Optional[str] = None - plan_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiUserPlansDto: - users: List[AiUserPlanAssignmentDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiUsageGroupDto: - id: Optional[str] = None - llm_input_tokens: int = 0 - llm_output_tokens: int = 0 - embedding_tokens: int = 0 - rerank_calls: int = 0 - total_tokens: int = 0 - chargeable_tokens: int = 0 - chargeable_rerank_calls: int = 0 - credits: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiWalletLineDto: - kind: Optional[str] = None - credits: int = 0 - reference: Optional[str] = None - purchased_balance: int = 0 - included_used: Optional[int] = None - purchased_used: Optional[int] = None - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectAiWalletDto: - period: Optional[str] = None - included_credits: int = 0 - purchased_credits: int = 0 - consumed_credits: int = 0 - remaining_credits: int = 0 - status: Optional[str] = None - lines: List[AiWalletLineDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectAiUsageDto: - period: Optional[str] = None - totals: Optional[AiUsageGroupDto] = None - assistants: List[AiUsageGroupDto] = field(default_factory=list) - top_users: List[AiUsageGroupDto] = field(default_factory=list) - models: List[AiUsageGroupDto] = field(default_factory=list) - wallet: Optional[ProjectAiWalletDto] = None - - -# @Flags() -class ApplicationModule(IntEnum): - ACCOUNT = 0 - MEMBERSHIP = 1 - DATABASE = 2 - FILES = 4 - CODE = 8 - EMAIL = 16 - PUSH = 32 - PAYMENT = 64 - SCHEDULER = 128 - LOGGING = 256 - SERVER_EVENTS = 512 - AI = 1024 - SMS = 2048 - PROJECT = 4096 - COMPLIANCE = 8192 - CONTACTS = 16384 - MARKETPLACE = 32768 - DIAGNOSTICS = 65536 - - -class LanguageGapKind(str, Enum): - TEMPLATE = 'Template' - FOOTER = 'Footer' - SIGNATURE = 'Signature' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TemplateLanguageGapDto: - module: Optional[ApplicationModule] = None - kind: Optional[LanguageGapKind] = None - template_id: Optional[str] = None - template_name: Optional[str] = None - missing_languages: List[str] = field(default_factory=list) - - -TViewModelProjection = TypeVar('TViewModelProjection') - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaginatedResponse(Generic[TViewModelProjection]): - items: Optional[IList[TViewModelProjection]] = None - has_more: bool = False - has_previous: bool = False - starting_after: Optional[str] = None - ending_before: Optional[str] = None - - -class AuthType(str, Enum): - SERVICE = 'Service' - EMAIL = 'Email' - USER_NAME = 'UserName' - PHONE = 'Phone' - GUEST = 'Guest' - SOCIAL = 'Social' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccessInformationDto: - ip: Optional[str] = None - date: Optional[datetime.datetime] = None - time_zone: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RegistrationDto: - registration_information: Optional[AccessInformationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LoginDto: - need_change_password_on_next_login: bool = False - last_access_information: Optional[AccessInformationDto] = None - - -class AuthStatus(IntEnum): - REGISTERED = 0 - PENDING_VALIDATION = 2 - INVITED = 4 - ACTIVE = 8 - UNREGISTERED = 16 - SUSPENDED = 32 - IN_ACTIVE = 64 - BLOCKED = 128 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthDto(IBindableContract): - id: Optional[str] = None - type: Optional[AuthType] = None - email: Optional[str] = None - user_name: Optional[str] = None - registration: Optional[RegistrationDto] = None - login: Optional[LoginDto] = None - general_info: Optional[UserGeneralInfoDto] = None - roles: Optional[List[str]] = None - push_devices: Optional[List[str]] = None - tags: Optional[List[str]] = None - status: Optional[AuthStatus] = None - created_on: datetime.datetime = datetime.datetime(1, 1, 1) - modified_on: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasswordPolicyDto: - min_length: int = 0 - max_length: Optional[int] = None - min_numbers: Optional[int] = None - max_numbers: Optional[int] = None - min_upper: Optional[int] = None - max_upper: Optional[int] = None - min_lower: Optional[int] = None - max_lower: Optional[int] = None - min_special: Optional[int] = None - max_special: Optional[int] = None - allowed_special: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountTeamRoleDto: - id: Optional[str] = None - name: Optional[str] = None - description: Optional[str] = None - is_system: bool = False - policies: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasskeyListItemDto: - credential_id: Optional[str] = None - friendly_name: Optional[str] = None - registered_on_utc: datetime.datetime = datetime.datetime(1, 1, 1) - last_used_on_utc: datetime.datetime = datetime.datetime(1, 1, 1) - is_revoked: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LicenseDomainDnsRecordDto: - host: Optional[str] = None - record_type: Optional[str] = None - resolved: bool = False - required: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LicenseDomainDnsStatusDto: - domain: Optional[str] = None - all_required_resolved: bool = False - records: List[LicenseDomainDnsRecordDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LicenseDomainVerificationChallengeDto: - domain: Optional[str] = None - txt_host: Optional[str] = None - txt_value: Optional[str] = None - expires_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - verified: bool = False - verified_at_utc: Optional[datetime.datetime] = None - skipped: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LicenseDomainVerificationStatusDto: - domain: Optional[str] = None - verified: bool = False - skipped: bool = False - txt_host: Optional[str] = None - expected_txt_value: Optional[str] = None - observed_txt_value: Optional[str] = None - expires_at_utc: Optional[datetime.datetime] = None - verified_at_utc: Optional[datetime.datetime] = None - message: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeMashSubscriptionDto: - view_id: Optional[str] = None - domain: Optional[str] = None - will_expire_on: datetime.datetime = datetime.datetime(1, 1, 1) - issued_on: datetime.datetime = datetime.datetime(1, 1, 1) - is_trial: bool = False - subscription_ref_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LicenseDto(CodeMashSubscriptionDto): - is_enterprise: bool = False - project_cap: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LicenseHeartbeatVerdictDto: - status: Optional[str] = None - proof_token: Optional[str] = None - server_time_utc: datetime.datetime = datetime.datetime(1, 1, 1) - grace_until_utc: Optional[datetime.datetime] = None - installation_id: Optional[str] = None - license_account_id: Optional[str] = None - domain: Optional[str] = None - signature: Optional[str] = None - message: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InstallationLicenseDetailsDto: - domain: Optional[str] = None - account_id: Optional[str] = None - email: Optional[str] = None - release: Optional[str] = None - expire: int = 0 - is_trial: bool = False - projects_cap: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InstallationLicenseStatusDto: - stored_mode: Optional[str] = None - effective_mode: Optional[str] = None - is_production: bool = False - grace_days_left: Optional[int] = None - grace_until_utc: Optional[datetime.datetime] = None - last_proven_at_utc: Optional[datetime.datetime] = None - last_heartbeat_at_utc: Optional[datetime.datetime] = None - installation_domain: Optional[str] = None - licensed_domain: Optional[str] = None - host_kind: Optional[str] = None - is_trial_license: bool = False - license_expire_utc: Optional[datetime.datetime] = None - last_heartbeat_outcome: Optional[str] = None - last_heartbeat_error: Optional[str] = None - message: Optional[str] = None - license: Optional[InstallationLicenseDetailsDto] = None - licensing_docs_url: Optional[str] = None - ask_for_enterprise_license_email: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiRoleDto: - id: Optional[str] = None - name: Optional[str] = None - description: Optional[str] = None - is_system: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiProjectRolesDto: - id: Optional[str] = None - name: Optional[str] = None - roles: List[AiRoleDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiServiceUserKeyDto: - id: Optional[str] = None - hint: Optional[str] = None - issued_at: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiServiceUserDto: - id: Optional[str] = None - name: Optional[str] = None - account_roles: List[AiRoleDto] = field(default_factory=list) - projects: List[AiProjectRolesDto] = field(default_factory=list) - created_at: datetime.datetime = datetime.datetime(1, 1, 1) - keys: List[AiServiceUserKeyDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ImportUserErrorDto: - code: Optional[str] = None - message: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ImportUserOutcomeDto: - row: int = 0 - login: Optional[str] = None - outcome: Optional[str] = None - user_id: Optional[str] = None - errors: List[ImportUserErrorDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UsersImportDto: - dry_run: bool = False - received: int = 0 - imported: int = 0 - valid: int = 0 - existing: int = 0 - invalid: int = 0 - failed: int = 0 - rows: List[ImportUserOutcomeDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LoginProjectRepairDto: - dry_run: bool = False - logins_without_project: int = 0 - logins_to_repair: int = 0 - logins_repaired: int = 0 - account_logins_skipped: int = 0 - other_project_logins_skipped: int = 0 - logins_without_evidence: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ServiceUserApiKeyDto: - id: int = 0 - name: Optional[str] = None - visible_key: Optional[str] = None - scopes: List[str] = field(default_factory=list) - environment: Optional[str] = None - created_date: datetime.datetime = datetime.datetime(1, 1, 1) - expiry_date: Optional[datetime.datetime] = None - cancelled_date: Optional[datetime.datetime] = None - active: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetTriggerResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TriggerProjectionList(IHasViewId, IQueuedTrigger): - view_id: Optional[str] = None - name: Optional[str] = None - action_type: Optional[TriggerActionType] = None - has_pre_execute_code: bool = False - is_enabled: bool = False - order: Optional[int] = None - break_on_error: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipTriggerProjectionList(TriggerProjectionList): - type: Optional[MembershipTriggerType] = None - destination_ids: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RoleListProjectionDto: - view_id: Optional[str] = None - name: Optional[str] = None - display_name: Optional[str] = None - is_system: bool = False - policy_count: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasskeySettingsDto: - enabled: bool = False - code_ttl_minutes: int = 0 - max_credentials_per_user: int = 0 - recovery_code_count: int = 0 - generate_recovery_codes_at_signup: bool = False - authenticator_attachment: Optional[str] = None - allow_magic_link_recovery: bool = False - refresh_token_ttl_days: int = 0 - rp_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class IntegrationListProjection(IHasViewId): - view_id: Optional[str] = None - integration_name: Optional[str] = None - is_enabled: bool = False - last_integration_test_at_utc: Optional[datetime.datetime] = None - last_integration_test_succeeded: Optional[bool] = None - last_integration_test_errors: Optional[IReadOnlyList[str]] = None - human_delivery_confirmed_at_utc: Optional[datetime.datetime] = None - requires_human_delivery_confirmation: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipIntegrationListProjection(IntegrationListProjection): - provider: Optional[MembershipProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipMessageTemplateDto: - id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipEmailActionSettingsDto: - send_email: bool = False - template: Optional[MembershipMessageTemplateDto] = None - callback: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipEmailPreferencesDto: - registration_via_email: Optional[MembershipEmailActionSettingsDto] = None - verification_via_email: Optional[MembershipEmailActionSettingsDto] = None - password_reset_via_email: Optional[MembershipEmailActionSettingsDto] = None - invitation_via_email: Optional[MembershipEmailActionSettingsDto] = None - deactivation_via_email: Optional[MembershipEmailActionSettingsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PasswordComplexityDto: - min_length: int = 0 - max_length: Optional[int] = None - min_numbers: Optional[int] = None - max_numbers: Optional[int] = None - min_upper: Optional[int] = None - max_upper: Optional[int] = None - min_lower: Optional[int] = None - max_lower: Optional[int] = None - min_special: Optional[int] = None - max_special: Optional[int] = None - allowed_special: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipAuthorizationViewDto: - email_preferences: Optional[MembershipEmailPreferencesDto] = None - user_registers_as_role: Optional[str] = None - guest_registers_as_role: Optional[str] = None - allowed_register_roles: Optional[List[str]] = None - allowed_provider_register_roles: Optional[List[str]] = None - reset_password_token_expiration: Optional[int] = None - invitation_expiration: Optional[int] = None - email_verification_expiration: Optional[int] = None - deactivation_expiration: Optional[int] = None - default_subscribe_to_news: bool = False - password_complexity: Optional[PasswordComplexityDto] = None - default_roles: Optional[List[str]] = None - allowed_registration_roles: Optional[List[str]] = None - allow_guest_users: bool = False - guest_cleanup_period_days: Optional[int] = None - allow_email_registration: bool = False - allow_username_registration: bool = False - invite_only: bool = False - allow_anyone_to_sign_up: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipCredentialsSettingsModeDto: - name: Optional[str] = None - logout_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipCredentialsSettingsDto: - logout_url: Optional[str] = None - allow_usernames: bool = False - modes: Optional[List[MembershipCredentialsSettingsModeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MembershipAuthenticationViewDto: - credentials_settings: Optional[MembershipCredentialsSettingsDto] = None - flows: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaTriggerProjectionList(TriggerProjectionList): - type: Optional[SchemaTriggerType] = None - env: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DataSchemaDto: - json: Optional[str] = None - fields: List[JsonSchemaFieldDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class VisualSchemaDto: - json: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TaxonomyDto(IHasViewId): - view_id: Optional[str] = None - name: Optional[str] = None - slug: Optional[str] = None - parent_id: Optional[str] = None - description: Optional[str] = None - env: Optional[str] = None - terms_meta_data_schema: Optional[DataSchemaDto] = None - terms_meta_visual_schema: Optional[VisualSchemaDto] = None - dependencies: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TaxonomyRef: - id: Optional[str] = None - name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TaxonomyListProjection(IHasViewId): - view_id: Optional[str] = None - taxonomy_name: Optional[str] = None - taxonomy_slug: Optional[str] = None - parent_id: Optional[str] = None - description: Optional[str] = None - dependencies: Optional[List[str]] = None - parent_name: Optional[str] = None - dependency_refs: Optional[List[TaxonomyRef]] = None - env: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TermMultiParentDto: - taxonomy_id: Optional[str] = None - parent_id: Optional[str] = None - name: Optional[str] = None - names: Optional[Dict[str, str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TermTreeDto: - id: Optional[str] = None - taxonomy_id: Optional[str] = None - taxonomy_name: Optional[str] = None - parent_id: Optional[str] = None - order: Optional[int] = None - name: Optional[str] = None - names: Optional[Dict[str, str]] = None - slug: Optional[str] = None - description: Optional[str] = None - descriptions: Optional[Dict[str, str]] = None - multi_parents: Optional[List[TermMultiParentDto]] = None - meta: Optional[Object] = None - children: Optional[List[TermTreeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TaxonomyTreeDto: - view_id: Optional[str] = None - taxonomy_name: Optional[str] = None - taxonomy_slug: Optional[str] = None - parent_id: Optional[str] = None - children: Optional[List[TaxonomyTreeDto]] = None - terms: Optional[List[TermTreeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TermDto: - id: Optional[str] = None - taxonomy_id: Optional[str] = None - taxonomy_name: Optional[str] = None - parent_id: Optional[str] = None - order: Optional[int] = None - name: Optional[str] = None - names: Optional[Dict[str, str]] = None - slug: Optional[str] = None - description: Optional[str] = None - descriptions: Optional[Dict[str, str]] = None - multi_parents: Optional[List[TermMultiParentDto]] = None - meta: Optional[Object] = None - origin: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppliedTaxonomyDto: - catalog_id: Optional[str] = None - id: Optional[str] = None - slug: Optional[str] = None - title: Optional[str] = None - action: Optional[str] = None - terms_created: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppliedCollectionDto: - entity: Optional[str] = None - id: Optional[str] = None - name: Optional[str] = None - title: Optional[str] = None - action: Optional[str] = None - published: bool = False - linked_fields: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaDto(IHasViewId): - view_id: Optional[str] = None - schema_name: Optional[str] = None - schema_slug: Optional[str] = None - version: int = 0 - meta_schema_version: int = 0 - data_schema: Optional[DataSchemaDto] = None - visual_schema: Optional[VisualSchemaDto] = None - published_at: datetime.datetime = datetime.datetime(1, 1, 1) - settings: Optional[SchemaSettingsDto] = None - embed: Optional[SchemaEmbedSettingsDto] = None - triggers: Optional[List[TriggerDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaListProjection(IHasViewId): - view_id: Optional[str] = None - schema_name: Optional[str] = None - schema_title: Optional[str] = None - latest_version: Optional[int] = None - has_draft: bool = False - meta_schema_version: int = 0 - description: Optional[str] = None - env: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaDraftDto: - data_schema: Optional[DataSchemaDto] = None - visual_schema: Optional[VisualSchemaDto] = None - updated_at: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaIndexDto: - name: Optional[str] = None - keys: List[str] = field(default_factory=list) - unique: bool = False - reason: Optional[str] = None - field: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaIndexIntegrationStatusDto: - integration_id: Optional[str] = None - state: Optional[str] = None - wanted: List[SchemaIndexDto] = field(default_factory=list) - created: List[str] = field(default_factory=list) - dropped: List[str] = field(default_factory=list) - over_cap: List[SchemaIndexDto] = field(default_factory=list) - refused_reason: Optional[str] = None - last_run_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaIndexStatusDto: - schema_id: Optional[str] = None - env: Optional[str] = None - collection: Optional[str] = None - state: Optional[str] = None - integrations: List[SchemaIndexIntegrationStatusDto] = field(default_factory=list) - last_run_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaDiffDto: - from_version: int = 0 - to_version: int = 0 - added: List[str] = field(default_factory=list) - removed: List[str] = field(default_factory=list) - type_changed: List[str] = field(default_factory=list) - validator_tightened: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaVersionSummaryDto: - version: int = 0 - meta_schema_version: int = 0 - published_at: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CollectionIndexKeyDto: - field: Optional[str] = None - order: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CollectionIndexDto: - name: Optional[str] = None - keys: List[CollectionIndexKeyDto] = field(default_factory=list) - created_by_norbix: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SeedCollectionReportItemDto: - collection_name: Optional[str] = None - requested: int = 0 - inserted: int = 0 - ids: List[str] = field(default_factory=list) - errors: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SeedCollectionRecordsResultDto: - insert_order: List[str] = field(default_factory=list) - report: List[SeedCollectionReportItemDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DatabaseIntegrationListProjection(IntegrationListProjection): - provider: Optional[DatabaseProvider] = None - env: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FlexTierDto: - code: Optional[str] = None - step: int = 0 - display_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class IntegrationTestResultItemDto: - operation: Optional[str] = None - result: Optional[str] = None - errors: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchemaRefDto: - schema_id: Optional[str] = None - schema_name: Optional[str] = None - database_integration_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CollectionImportDto: - id: Optional[str] = None - schema: Optional[SchemaRefDto] = None - file: Optional[FileResourceRefDto] = None - error_file: Optional[FileResourceRefDto] = None - delimiter: Optional[str] = None - has_header: bool = False - status: Optional[str] = None - total_rows: int = 0 - total_imported: int = 0 - total_errors: int = 0 - failure_reason: Optional[str] = None - mapping: Optional[List[ImportColumnMappingDto]] = None - created_on: datetime.datetime = datetime.datetime(1, 1, 1) - started_on: Optional[datetime.datetime] = None - completed_on: Optional[datetime.datetime] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ImportUploadTargetDto: - url: Optional[str] = None - content_type: Optional[str] = None - file: Optional[FileResourceRefDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ImportFileColumnDto: - index: int = 0 - header: Optional[str] = None - samples: List[str] = field(default_factory=list) - detected_type: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ImportFileAnalysisDto: - file: Optional[FileResourceRefDto] = None - columns: List[ImportFileColumnDto] = field(default_factory=list) - sample_row_count: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MongoDbAggregateListProjection(IHasViewId): - view_id: Optional[str] = None - display_name: Optional[str] = None - schema_view_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FilesTriggerProjectionList(TriggerProjectionList): - type: Optional[FilesTriggerType] = None - folder: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FilesIntegrationListProjection(IntegrationListProjection): - provider: Optional[FileProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicFolderDto: - path: Optional[str] = None - public_id: Optional[str] = None - public_url: Optional[str] = None - inherited: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class NotificationModuleDependencyItemDto: - name: Optional[str] = None - view_id: Optional[str] = None - category: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class NotificationModuleDisableDependenciesDto: - triggers: List[NotificationModuleDependencyItemDto] = field(default_factory=list) - scheduler_tasks: List[NotificationModuleDependencyItemDto] = field(default_factory=list) - in_flight_campaigns: List[NotificationModuleDependencyItemDto] = field(default_factory=list) - membership_settings: List[NotificationModuleDependencyItemDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestEmailValidationItemDto: - address: Optional[str] = None - verdict: Optional[str] = None - reason: Optional[str] = None - score: Optional[Decimal] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TemplateListProjection(IHasViewId, IHasDatabaseId): - id: Optional[str] = None - view_id: Optional[str] = None - template_name: Optional[str] = None - is_active: bool = False - type: Optional[CommunicationChannel] = None - tags: Optional[List[str]] = None - env: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailTemplateListProjection(TemplateListProjection): - has_attachments: bool = False - languages: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MjmlParseError: - line: int = 0 - message: Optional[str] = None - tag_name: Optional[str] = None - formatted_message: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class HtmlFromMjmlResponse: - html: Optional[str] = None - errors: List[MjmlParseError] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SystemEmailTemplateListProjection(EmailTemplateListProjection): - image_preview: Optional[str] = None - description: Optional[str] = None - theme: Optional[SystemEmailTemplateTheme] = None - system_tags: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailSignatureDto(IHasViewId): - view_id: Optional[str] = None - display_name: Optional[str] = None - translations: List[TranslationDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListItemProjection(IHasViewId): - view_id: Optional[str] = None - display_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListItemWithTranslationsProjection(ListItemProjection): - translations: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailFooterDto(IHasViewId): - view_id: Optional[str] = None - display_name: Optional[str] = None - translations: List[TranslationDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailSettings(IBindableContract): - signatures: Optional[IList[EmailSignatureDto]] = None - footers: Optional[IList[EmailFooterDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DomainHealthRecordItemDto: - record: Optional[str] = None - value: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailIntegrationListProjection(IntegrationListProjection): - email_provider: Optional[EmailProvider] = None - sender_email_address: Optional[str] = None - sender_display_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailLinkPreferencesDto: - email_address: Optional[str] = None - unsubscribed_from_marketing: bool = False - block_reasons: List[str] = field(default_factory=list) - - -class CampaignStatus(str, Enum): - PENDING = 'Pending' - REGISTERED = 'Registered' - SCHEDULED = 'Scheduled' - STARTED = 'Started' - STOPPED = 'Stopped' - PROCESSING = 'Processing' - COMPLETED = 'Completed' - FAILED = 'Failed' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CampaignStatusChangeEntryDto: - time: datetime.datetime = datetime.datetime(1, 1, 1) - status: Optional[CampaignStatus] = None - errors: Optional[List[ErrorDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CampaignDto(IHasResponsibleUserId, IHasDatabaseId): - view_id: Optional[str] = None - created_on: datetime.datetime = datetime.datetime(1, 1, 1) - language: Optional[str] = None - force_campaign_language: bool = False - campaign_processing_integration_id: Optional[str] = None - status_history: List[CampaignStatusChangeEntryDto] = field(default_factory=list) - status: Optional[CampaignStatusChangeEntryDto] = None - token_mapping_values: Optional[List[TokenMappingDto]] = None - notes: Optional[str] = None - created_by_id: Optional[str] = None - time_zone_id: Optional[str] = None - user_id: Optional[str] = None - id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailCampaignDto(CampaignDto): - delivery_settings: Optional[EmailCampaignDeliverySettingsDto] = None - template: Optional[EmailTemplateDto] = None - validation_integration_id: Optional[str] = None - template_is_system: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailCampaignListProjection: - view_id: Optional[str] = None - template_name: Optional[str] = None - template_id: Optional[str] = None - integration_id: Optional[str] = None - language: Optional[str] = None - strategy: Optional[str] = None - latest_status: Optional[CampaignStatus] = None - created_on: datetime.datetime = datetime.datetime(1, 1, 1) - - -class CampaignBatchStatus(str, Enum): - REGISTERED = 'Registered' - PROCESSING = 'Processing' - COMPLETED = 'Completed' - FAILED = 'Failed' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class BatchStatusChangeEntryDto: - time: datetime.datetime = datetime.datetime(1, 1, 1) - status: Optional[CampaignBatchStatus] = None - errors: Optional[List[ErrorDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CampaignBatchDto(IHasDatabaseId): - campaign_id: Optional[str] = None - batch_id: Optional[str] = None - start_after: Optional[str] = None - status_history: List[BatchStatusChangeEntryDto] = field(default_factory=list) - id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailRecipientDto: - email_address: Optional[str] = None - language: Optional[str] = None - time_zone_id: Optional[str] = None - user_token_mappings: Optional[List[TokenMappingDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailRecipientsDto: - to: Optional[List[EmailRecipientDto]] = None - cc: Optional[List[EmailRecipientDto]] = None - bcc: Optional[List[EmailRecipientDto]] = None - starting_after: Optional[str] = None - has_more: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailCampaignBatchDto(CampaignBatchDto): - recipients: Optional[EmailRecipientsDto] = None - - -class CampaignNotificationStatus(str, Enum): - COMPLETED = 'Completed' - BLOCKED_BY_USER_PREFERENCE_BLOCK_ALL = 'BlockedByUserPreferenceBlockAll' - BLOCKED_BY_USER_PREFERENCE_BLOCK_BY_TAG = 'BlockedByUserPreferenceBlockByTag' - FAILED = 'Failed' - VIEWED = 'Viewed' - CLICKED = 'Clicked' - BLOCKED_BY_VALIDATION = 'BlockedByValidation' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class NotificationStatusChangeEntryDto: - time: datetime.datetime = datetime.datetime(1, 1, 1) - status: Optional[CampaignNotificationStatus] = None - source_id: Optional[str] = None - errors: Optional[List[ErrorDto]] = None - tags: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CampaignBatchNotificationDto(IHasDatabaseId): - campaign_id: Optional[str] = None - batch_id: Optional[str] = None - notification_id: Optional[str] = None - ref_notification_id: Optional[str] = None - body: Optional[str] = None - model: Optional[Dict[str, str]] = None - status_history: List[NotificationStatusChangeEntryDto] = field(default_factory=list) - id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmailCampaignBatchNotificationDto(CampaignBatchNotificationDto): - subject: Optional[str] = None - recipients: Optional[EmailRecipientsDto] = None - content: Optional[EmailMessageContentDto] = None - transactional_kind: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CampaignStatsDto: - batches: int = 0 - sent: int = 0 - failed: int = 0 - success_rate: Decimal = decimal.Decimal(0) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsTemplateListProjection(TemplateListProjection): - languages: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsSettings(IBindableContract): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsIntegrationListProjection(IntegrationListProjection): - provider: Optional[SmsProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsCampaignDto(CampaignDto): - recipients: Optional[SmsCampaignDeliverySettingsDto] = None - template: Optional[SmsTemplateDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsRecipientDto: - phone_number: Optional[str] = None - user_id: Optional[str] = None - language: Optional[str] = None - user_token_mappings: Optional[List[TokenMappingDto]] = None - time_zone_id: Optional[str] = None - record: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsRecipientsDto: - to: Optional[List[SmsRecipientDto]] = None - starting_after: Optional[str] = None - has_more: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsCampaignBatchDto(CampaignBatchDto): - recipients: Optional[SmsRecipientsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SmsCampaignBatchNotificationDto(CampaignBatchNotificationDto): - recipients: Optional[SmsRecipientsDto] = None - content: Optional[SmsMessageContentDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceListingProjection(IHasViewId): - view_id: Optional[str] = None - slug: Optional[str] = None - display_name: Optional[str] = None - vendor: Optional[str] = None - category: Optional[MarketplaceCategory] = None - transport: Optional[MarketplaceTransport] = None - icon_url: Optional[str] = None - is_official: bool = False - tags: Optional[IReadOnlyList[str]] = None - function_count: int = 0 - availability: Optional[MarketplaceAvailability] = None - video_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceAccessCustomPolicyDto: - policy_id: Optional[str] = None - name: Optional[str] = None - used_by_roles: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceAccessRoleDto: - role_id: Optional[str] = None - name: Optional[str] = None - scope: Optional[str] = None - is_system: bool = False - fixed: bool = False - package: Optional[MarketplaceAccessLevel] = None - is_custom: bool = False - manage: bool = False - custom: Optional[IReadOnlyList[MarketplaceAccessCustomPolicyDto]] = None - default_not_applied: Optional[str] = None - can_change: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceAccessPackageDto: - kind: Optional[MarketplaceAccessLevel] = None - policy_id: Optional[str] = None - name: Optional[str] = None - exists: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceAccessToolDto: - name: Optional[str] = None - read_only: bool = False - grantable: bool = False - curated: bool = False - excluded_from_full_access: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceAccessFunctionDto: - function_id: Optional[str] = None - name: Optional[str] = None - function_key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceIntegrationListProjection(IHasViewId): - view_id: Optional[str] = None - integration_name: Optional[str] = None - is_enabled: bool = False - listing_view_id: Optional[str] = None - vendor: Optional[str] = None - category: Optional[MarketplaceCategory] = None - transport: Optional[MarketplaceTransport] = None - last_integration_test_at_utc: Optional[datetime.datetime] = None - last_integration_test_succeeded: Optional[bool] = None - last_integration_test_errors: Optional[IReadOnlyList[str]] = None - human_delivery_confirmed_at_utc: Optional[datetime.datetime] = None - requires_human_delivery_confirmation: bool = False - signed_in: bool = False - signed_in_at: Optional[datetime.datetime] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceMcpToolDto: - name: Optional[str] = None - title: Optional[str] = None - description: Optional[str] = None - input_schema: Optional[str] = None - read_only_hint: Optional[bool] = None - destructive_hint: Optional[bool] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceAccessChangesDto: - read_only_added: Optional[IReadOnlyList[str]] = None - read_only_removed: Optional[IReadOnlyList[str]] = None - not_grantable: Optional[IReadOnlyList[str]] = None - read_only_hint_overridden: Optional[IReadOnlyList[str]] = None - excluded_from_full_access: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceFunctionProjection(IHasViewId): - view_id: Optional[str] = None - integration_view_id: Optional[str] = None - function_key: Optional[str] = None - display_name: Optional[str] = None - is_enabled: bool = False - mapping_count: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarketplaceFunctionRunDto: - fired_at: datetime.datetime = datetime.datetime(1, 1, 1) - event: Optional[str] = None - source: Optional[str] = None - function_id: Optional[str] = None - run_as_user_id: Optional[str] = None - succeeded: bool = False - status: Optional[str] = None - duration_ms: Optional[int] = None - error: Optional[str] = None - vendor_request_id: Optional[str] = None - correlation_id: Optional[str] = None - has_details: bool = False - trigger_id: Optional[str] = None - task_id: Optional[str] = None - input: Optional[str] = None - integration_id: Optional[str] = None - tool_name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeIntegrationListProjection(IntegrationListProjection): - provider: Optional[CodeProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeFunctionDescriptorDto: - function_id: Optional[str] = None - display_name: Optional[str] = None - runtime: Optional[str] = None - region: Optional[str] = None - description: Optional[str] = None - last_modified: Optional[datetime.datetime] = None - tags: Optional[Dict[str, str]] = None - arn: Optional[str] = None - - -class CodeFunctionQualifierKindDto(str, Enum): - ALIAS = 'Alias' - VERSION = 'Version' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeFunctionQualifierDto: - name: Optional[str] = None - kind: Optional[CodeFunctionQualifierKindDto] = None - description: Optional[str] = None - target_version: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CodeFunctionRunDto: - fired_at: datetime.datetime = datetime.datetime(1, 1, 1) - event: Optional[str] = None - source: Optional[str] = None - succeeded: bool = False - status_code: Optional[int] = None - duration_ms: Optional[int] = None - error: Optional[str] = None - request_id: Optional[str] = None - input: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushTemplateListProjection(TemplateListProjection): - languages: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushSettings: - marketing_tags: Optional[List[TagDefinitionDto]] = None - transactional_tags: Optional[List[TagDefinitionDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushIntegrationListProjection(IntegrationListProjection): - provider: Optional[PushProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushDeviceListProjection: - id: Optional[str] = None - user_id: Optional[str] = None - device_os: Optional[str] = None - token: Optional[str] = None - brand: Optional[str] = None - manufacturer: Optional[str] = None - model_name: Optional[str] = None - device_name: Optional[str] = None - device_type: Optional[str] = None - os_name: Optional[str] = None - os_version: Optional[str] = None - platform_api_level: Optional[int] = None - platform: Optional[str] = None - app_version: Optional[str] = None - installation_id: Optional[str] = None - locale: Optional[str] = None - time_zone: Optional[str] = None - updated_at_utc: Optional[datetime.datetime] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TeamPushDeviceListProjection(PushDeviceListProjection): - owner_kind: Optional[str] = None - owner_name: Optional[str] = None - owner_email: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushAudienceCountDto: - devices: int = 0 - recipients: int = 0 - skipped_user_ids: int = 0 - is_capped: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushCampaignDto(CampaignDto): - recipients: Optional[PushCampaignDeliverySettingsDto] = None - template: Optional[PushTemplateDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushRecipientDto: - device_tokens: List[PushDeviceDeliveryTokenDto] = field(default_factory=list) - user_id: Optional[str] = None - language: Optional[str] = None - user_token_mappings: Optional[List[TokenMappingDto]] = None - time_zone_id: Optional[str] = None - record: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushRecipientsDto: - to: Optional[List[PushRecipientDto]] = None - starting_after: Optional[str] = None - has_more: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushCampaignBatchDto(CampaignBatchDto): - recipients: Optional[PushRecipientsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class NotificationReadMarkDto: - user_id: Optional[str] = None - read_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PushCampaignBatchNotificationDto(CampaignBatchNotificationDto): - subject: Optional[str] = None - recipients: Optional[PushRecipientsDto] = None - content: Optional[PushMessageContentDto] = None - read_by: Optional[List[NotificationReadMarkDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InAppNotificationDto: - id: Optional[str] = None - project_id: Optional[str] = None - user_id: Optional[str] = None - channel: Optional[str] = None - event_name: Optional[str] = None - payload_json: Optional[str] = None - is_read: bool = False - seen_at_utc: Optional[datetime.datetime] = None - read_at_utc: Optional[datetime.datetime] = None - created_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentsWebhookLogEntry: - integration_id: Optional[str] = None - source: Optional[str] = None - env: Optional[str] = None - event_name: Optional[str] = None - provider_event_id: Optional[str] = None - status_code: int = 0 - description: Optional[str] = None - received_on: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentTriggerProjectionList(TriggerProjectionList): - type: Optional[PaymentTriggerType] = None - integrations: Optional[List[str]] = None - events: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PaymentsIntegrationListProjection(IntegrationListProjection): - gateway_platform: Optional[PaymentGatewayPlatform] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LoggingIntegrationListProjection(IntegrationListProjection): - provider: Optional[LoggingProvider] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TenantLogEntryDto: - id: Optional[str] = None - timestamp: datetime.datetime = datetime.datetime(1, 1, 1) - module: Optional[str] = None - level: Optional[str] = None - event_code: Optional[str] = None - title: Optional[str] = None - message: Optional[str] = None - correlation_id: Optional[str] = None - trace_id: Optional[str] = None - span_id: Optional[str] = None - env: Optional[str] = None - meta: Optional[IReadOnlyDictionary[str, str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AgentOnboardingSnippet: - client: Optional[str] = None - config: Optional[str] = None - auth: Optional[str] = None - kind: Optional[str] = None - recommended: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiProjectContextCallerWireDto: - kind: Optional[str] = None - name: Optional[str] = None - account_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiProjectContextIntegrationWireDto: - id: Optional[str] = None - name: Optional[str] = None - kind: Optional[str] = None - enabled: Optional[bool] = None - default_in: List[str] = field(default_factory=list) - env: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiProjectContextModuleWireDto: - name: Optional[str] = None - integrations_readable: Optional[bool] = None - integrations: Optional[List[AiProjectContextIntegrationWireDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiProjectContextProjectWireDto: - id: Optional[str] = None - name: Optional[str] = None - unique_name: Optional[str] = None - access: Optional[str] = None - description: Optional[str] = None - default_language: Optional[str] = None - languages: List[str] = field(default_factory=list) - environments: Optional[List[str]] = None - primary_region: Optional[str] = None - additional_regions: Optional[List[str]] = None - cors_origins: Optional[List[str]] = None - api_host: Optional[str] = None - admin_url: Optional[str] = None - marketing_url: Optional[str] = None - admin_portal_enabled: Optional[bool] = None - modules: Optional[List[AiProjectContextModuleWireDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiProjectContextWireDto: - version: Optional[str] = None - caller: Optional[AiProjectContextCallerWireDto] = None - projects: List[AiProjectContextProjectWireDto] = field(default_factory=list) - hints: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiToolManifestParameter: - name: Optional[str] = None - type: Optional[str] = None - required: bool = False - description: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiToolManifestItem: - name: Optional[str] = None - description: Optional[str] = None - toolsets: List[str] = field(default_factory=list) - requires_confirmation: bool = False - parameters: List[AiToolManifestParameter] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChatModelOption: - llm_integration_id: Optional[str] = None - kind: Optional[str] = None - provider: Optional[str] = None - model: Optional[str] = None - label: Optional[str] = None - is_default: bool = False - is_auto: bool = False - context_window: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChatMemoryNote: - id: Optional[str] = None - kind: Optional[str] = None - text: Optional[str] = None - project_id: Optional[str] = None - created_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChatSessionListItem: - session_id: Optional[str] = None - profile: Optional[str] = None - project_id: Optional[str] = None - env: Optional[str] = None - title: Optional[str] = None - updated_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - is_archived: bool = False - is_pinned: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ScaffoldStep: - order: int = 0 - kind: Optional[str] = None - title: Optional[str] = None - tool: Optional[str] = None - arguments: Optional[JsonObject] = None - check_tool: Optional[str] = None - template_ref: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ScaffoldIssue: - where: Optional[str] = None - code: Optional[str] = None - message: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ScaffoldStepReportWithLink: - order: int = 0 - title: Optional[str] = None - tool: Optional[str] = None - status: Optional[str] = None - id: Optional[str] = None - dashboard_url: Optional[str] = None - note: Optional[str] = None - errors: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ScaffoldApplyReport: - completed: bool = False - project_id: Optional[str] = None - project_url: Optional[str] = None - summary: Optional[str] = None - steps: List[ScaffoldStepReportWithLink] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TemplatePreviewPartResult: - name: Optional[str] = None - rendered: Optional[str] = None - errors: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TemplatePreview: - channel: Optional[str] = None - ok: bool = False - parts: Optional[IReadOnlyList[TemplatePreviewPartResult]] = None - errors: Optional[IReadOnlyList[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectBriefSourceWireDto: - kind: Optional[str] = None - session_id: Optional[str] = None - entry_id: Optional[str] = None - entry_seq: Optional[int] = None - event_id: Optional[str] = None - user_auth_id: Optional[str] = None - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - surface: Optional[str] = None - quote: Optional[str] = None - work_item_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectBriefSatisfiedByWireDto: - artifact_id: Optional[str] = None - tool: Optional[str] = None - orphaned: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectBriefRequirementWireDto: - id: Optional[str] = None - text: Optional[str] = None - status: Optional[str] = None - confidence: float = 0.0 - is_assumption: bool = False - sources: List[ProjectBriefSourceWireDto] = field(default_factory=list) - satisfied_by: List[ProjectBriefSatisfiedByWireDto] = field(default_factory=list) - since_event_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectBriefDecisionWireDto: - event_id: Optional[str] = None - text: Optional[str] = None - confidence: float = 0.0 - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - sources: List[ProjectBriefSourceWireDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectBriefAssumptionWireDto: - requirement_id: Optional[str] = None - event_id: Optional[str] = None - text: Optional[str] = None - confidence: float = 0.0 - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectBriefSnapshotWireDto: - project_id: Optional[str] = None - up_to_seq: int = 0 - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - requirements: List[ProjectBriefRequirementWireDto] = field(default_factory=list) - decisions: List[ProjectBriefDecisionWireDto] = field(default_factory=list) - open_assumptions: List[ProjectBriefAssumptionWireDto] = field(default_factory=list) - summary: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectBriefEventWireDto: - id: Optional[str] = None - project_id: Optional[str] = None - seq: int = 0 - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - kind: Optional[str] = None - requirement_id: Optional[str] = None - supersedes_event_id: Optional[str] = None - text: Optional[str] = None - confidence: float = 0.0 - sources: List[ProjectBriefSourceWireDto] = field(default_factory=list) - origin: Optional[str] = None - satisfied_by: List[ProjectBriefSatisfiedByWireDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WorkItemEntryRefWireDto: - session_id: Optional[str] = None - entry_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WorkItemRunRefWireDto: - session_id: Optional[str] = None - plan_entry_id: Optional[str] = None - run_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WorkItemArtifactWireDto: - artifact_id: Optional[str] = None - what: Optional[str] = None - step: int = 0 - plan_entry_id: Optional[str] = None - kind: Optional[str] = None - name: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WorkItemMovedOutWireDto: - text: Optional[str] = None - reason: Optional[str] = None - moved_to: Optional[str] = None - source: Optional[str] = None - entry_ref: Optional[WorkItemEntryRefWireDto] = None - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WorkItemNeedsYouWireDto: - text: Optional[str] = None - kind: Optional[str] = None - entry_ref: Optional[WorkItemEntryRefWireDto] = None - done: bool = False - done_at_utc: Optional[datetime.datetime] = None - done_by_user_auth_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WorkItemOpenQuestionWireDto: - entry_ref: Optional[WorkItemEntryRefWireDto] = None - blocking: bool = False - text: Optional[str] = None - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WorkItemDoneConditionWireDto: - condition: int = 0 - holds: bool = False - reason: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WorkItemWireDto: - id: Optional[str] = None - project_id: Optional[str] = None - status: Optional[str] = None - goal: Optional[str] = None - not_in_scope: List[str] = field(default_factory=list) - scope_requirement_ids: List[str] = field(default_factory=list) - difficulty: Optional[int] = None - difficulty_reason: Optional[str] = None - plan_entry_refs: List[WorkItemEntryRefWireDto] = field(default_factory=list) - run_refs: List[WorkItemRunRefWireDto] = field(default_factory=list) - artifacts: List[WorkItemArtifactWireDto] = field(default_factory=list) - moved_out: List[WorkItemMovedOutWireDto] = field(default_factory=list) - needs_you: List[WorkItemNeedsYouWireDto] = field(default_factory=list) - open_questions: List[WorkItemOpenQuestionWireDto] = field(default_factory=list) - session_ids: List[str] = field(default_factory=list) - parent_id: Optional[str] = None - children: List[str] = field(default_factory=list) - summary_entry_ref: Optional[WorkItemEntryRefWireDto] = None - created_by: Optional[str] = None - created_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - updated_at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - done_verdict: Optional[str] = None - done_conditions: List[WorkItemDoneConditionWireDto] = field(default_factory=list) - - -class AiTriggerType(str, Enum): - ON_CREDITS_WARNING = 'OnCreditsWarning' - ON_CREDITS_EXHAUSTED = 'OnCreditsExhausted' - ON_QUOTA_WARNING = 'OnQuotaWarning' - ON_QUOTA_EXHAUSTED = 'OnQuotaExhausted' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiTriggerProjectionList(TriggerProjectionList): - type: Optional[AiTriggerType] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AiTriggerDto(TriggerDto): - when: Optional[AiTriggerType] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmbeddingIntegrationDto(IntegrationDto): - provider: Optional[EmbeddingProvider] = None - model: Optional[str] = None - dimension: int = 0 - base_url: Optional[str] = None - is_configured: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmbeddingIntegrationListProjection(IntegrationListProjection): - embedding_provider: Optional[EmbeddingProvider] = None - model: Optional[str] = None - dimension: int = 0 - is_configured: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LlmIntegrationListProjection(IntegrationListProjection): - llm_provider: Optional[LlmProvider] = None - base_url: Optional[str] = None - default_model: Optional[str] = None - is_default: bool = False - models: List[LlmModelOptionDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class McpIntegrationListProjection(IntegrationListProjection): - mcp_provider: Optional[McpProvider] = None - transport: Optional[McpTransport] = None - category: Optional[str] = None - description: Optional[str] = None - icon: Optional[str] = None - - -class IVirtualDirectory: - pass - - -class IVirtualPathProvider: - root_directory: Optional[IVirtualDirectory] = None - virtual_path_separator: Optional[str] = None - real_path_separator: Optional[str] = None - - -class IVirtualFile: - virtual_path_provider: Optional[IVirtualPathProvider] = None - extension: Optional[str] = None - length: int = 0 - - -# @Flags() -class CacheControl(IntEnum): - NONE = 0 - PUBLIC = 1 - PRIVATE = 2 - MUST_REVALIDATE = 4 - NO_CACHE = 8 - NO_STORE = 16 - NO_TRANSFORM = 32 - PROXY_REVALIDATE = 64 - - -class IContentTypeWriter: - pass - - -# @Flags() -class RequestAttributes(IntEnum): - NONE = 0 - LOCALHOST = 1 - LOCAL_SUBNET = 2 - EXTERNAL = 4 - SECURE = 8 - IN_SECURE = 16 - ANY_SECURITY_MODE = 24 - HTTP_HEAD = 32 - HTTP_GET = 64 - HTTP_POST = 128 - HTTP_PUT = 256 - HTTP_DELETE = 512 - HTTP_PATCH = 1024 - HTTP_OPTIONS = 2048 - HTTP_OTHER = 4096 - ANY_HTTP_METHOD = 8160 - ONE_WAY = 8192 - REPLY = 16384 - ANY_CALL_STYLE = 24576 - SOAP11 = 32768 - SOAP12 = 65536 - XML = 131072 - JSON = 262144 - JSV = 524288 - PROTO_BUF = 1048576 - CSV = 2097152 - HTML = 4194304 - JSONL = 8388608 - MSG_PACK = 16777216 - FORMAT_OTHER = 33554432 - ANY_FORMAT = 67076096 - HTTP = 67108864 - MESSAGE_QUEUE = 134217728 - TCP = 268435456 - GRPC = 536870912 - ENDPOINT_OTHER = 1073741824 - ANY_ENDPOINT = 2080374784 - IN_PROCESS = -2147483648 - INTERNAL_NETWORK_ACCESS = -2147483645 - ANY_NETWORK_ACCESS_TYPE = -2147483641 - ANY = -1 - - -class IRequestPreferences: - accepts_brotli: bool = False - accepts_deflate: bool = False - accepts_gzip: bool = False - - -class IHttpFile: - name: Optional[str] = None - file_name: Optional[str] = None - content_length: int = 0 - content_type: Optional[str] = None - input_stream: Optional[bytes] = None - - -class IRequest: - original_request: Optional[Object] = None - response: Optional[IResponse] = None - operation_name: Optional[str] = None - verb: Optional[str] = None - request_attributes: Optional[RequestAttributes] = None - request_preferences: Optional[IRequestPreferences] = None - dto: Optional[Object] = None - content_type: Optional[str] = None - is_local: bool = False - user_agent: Optional[str] = None - cookies: Optional[Dict[str, Cookie]] = None - response_content_type: Optional[str] = None - has_explicit_response_content_type: bool = False - items: Optional[Dict[str, Object]] = None - headers: Optional[NameValueCollection] = None - query_string: Optional[NameValueCollection] = None - form_data: Optional[NameValueCollection] = None - use_buffered_stream: bool = False - raw_url: Optional[str] = None - absolute_uri: Optional[str] = None - user_host_address: Optional[str] = None - remote_ip: Optional[str] = None - authorization: Optional[str] = None - is_secure_connection: bool = False - accept_types: Optional[List[str]] = None - path_info: Optional[str] = None - original_path_info: Optional[str] = None - input_stream: Optional[bytes] = None - content_length: int = 0 - files: Optional[List[IHttpFile]] = None - url_referrer: Optional[str] = None - request_aborted: Optional[CancellationToken] = None - - -class IResponse: - original_response: Optional[Object] = None - request: Optional[IRequest] = None - status_code: int = 0 - status_description: Optional[str] = None - content_type: Optional[str] = None - output_stream: Optional[bytes] = None - dto: Optional[Object] = None - use_buffered_stream: bool = False - is_closed: bool = False - keep_alive: bool = False - has_started: bool = False - items: Optional[Dict[str, Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchedulerTaskListProjection(IHasViewId): - task_id: Optional[str] = None - name: Optional[str] = None - cron: Optional[str] = None - type: Optional[SchedulerTaskType] = None - is_enabled: bool = False - is_failing: bool = False - last_failure_reason: Optional[str] = None - last_failed_at_unix: Optional[int] = None - ends_at_unix: Optional[int] = None - has_ended: bool = False - view_id: Optional[str] = None - - -class SchedulerTaskRunOutcome(IntEnum): - FIRED = 1 - FAILED = 2 - SKIPPED = 3 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SchedulerTaskRunDto: - log_id: Optional[str] = None - at_utc: datetime.datetime = datetime.datetime(1, 1, 1) - at_unix: int = 0 - outcome: Optional[SchedulerTaskRunOutcome] = None - reason: Optional[str] = None - detail: Optional[str] = None - correlation_id: Optional[str] = None - - -class ResolvedRefStatus(str, Enum): - OK = 'ok' - NOT_FOUND = 'notFound' - UNAUTHORIZED = 'unauthorized' - SOURCE_ERROR = 'sourceError' - ERASED = 'erased' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ResolvedResourceEntry: - ref: Optional[ResourceRefDto] = None - status: Optional[ResolvedRefStatus] = None - resolved: Optional[Object] = None - diagnostic: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChannelSubscriptionStateDto: - unsubscribed: bool = False - blocked_tags: Dict[str, List[str]] = field(default_factory=dict) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UserDto: - id: Optional[str] = None - project_id: Optional[str] = None - primary_email: Optional[str] = None - primary_phone: Optional[str] = None - display_name: Optional[str] = None - first_name: Optional[str] = None - last_name: Optional[str] = None - full_name: Optional[str] = None - company: Optional[str] = None - locale: Optional[str] = None - time_zone: Optional[str] = None - gender: Optional[str] = None - birth_date: Optional[int] = None - address_line1: Optional[str] = None - address_line2: Optional[str] = None - country: Optional[str] = None - city: Optional[str] = None - state: Optional[str] = None - postal_code: Optional[str] = None - tags: Optional[List[str]] = None - roles: Optional[List[str]] = None - lifecycle: Optional[str] = None - source_of_creation: Optional[str] = None - merged_into_contact_id: Optional[str] = None - created_on: datetime.datetime = datetime.datetime(1, 1, 1) - modified_on: datetime.datetime = datetime.datetime(1, 1, 1) - auths: Optional[List[AuthDto]] = None - marketing_preferences: Optional[Dict[str, ChannelSubscriptionStateDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ContactRolesRepairDto: - dry_run: bool = False - contacts_without_roles: int = 0 - contacts_to_repair: int = 0 - contacts_repaired: int = 0 - contacts_without_login_role_ids: int = 0 - legacy_role_names_ignored: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ConsentPurposeDto: - key: Optional[str] = None - name: Optional[str] = None - channel: Optional[str] = None - mapped_tags: List[str] = field(default_factory=list) - regulatory_basis: List[str] = field(default_factory=list) - description: Optional[str] = None - is_deprecated: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RetentionWindowDto: - data_kind: Optional[str] = None - days: int = 0 - action: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ProjectComplianceDto: - regimes: List[str] = field(default_factory=list) - consent_purposes: List[ConsentPurposeDto] = field(default_factory=list) - retention_windows: List[RetentionWindowDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class LegalHoldDto: - id: Optional[str] = None - subject_kind: Optional[str] = None - subject_id: Optional[str] = None - reason: Optional[str] = None - placed_at: datetime.datetime = datetime.datetime(1, 1, 1) - placed_by: Optional[str] = None - released_at: Optional[datetime.datetime] = None - released_by: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DsarRequestDto: - id: Optional[str] = None - subject_kind: Optional[str] = None - subject_id: Optional[str] = None - status: Optional[str] = None - received_at: datetime.datetime = datetime.datetime(1, 1, 1) - sla_deadline: datetime.datetime = datetime.datetime(1, 1, 1) - auto_approve_at: Optional[datetime.datetime] = None - decided_at: Optional[datetime.datetime] = None - decided_by: Optional[str] = None - rejection_reason: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ComplianceAuditEntryDto: - id: Optional[str] = None - timestamp: datetime.datetime = datetime.datetime(1, 1, 1) - action: Optional[str] = None - subject_kind: Optional[str] = None - subject_id: Optional[str] = None - reason: Optional[str] = None - metadata: Optional[Dict[str, str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountComplianceDto: - dsar_mode: Optional[str] = None - dsar_delay_days: int = 0 - auto_forward_advisories: bool = False - security_contact: Optional[str] = None - - -class SupportCaseKind(str, Enum): - QUESTION = 'Question' - BUG = 'Bug' - INCIDENT = 'Incident' - BILLING = 'Billing' - SECURITY = 'Security' - FEATURE_REQUEST = 'FeatureRequest' - - -class SupportCaseSeverity(IntEnum): - S1 = 1 - S2 = 2 - S3 = 3 - S4 = 4 - - -class SupportCaseStatus(str, Enum): - OPEN = 'Open' - TRIAGED = 'Triaged' - IN_PROGRESS = 'InProgress' - WAITING_ON_CUSTOMER = 'WaitingOnCustomer' - RESOLVED = 'Resolved' - CLOSED = 'Closed' - - -class SupportCustomerStatus(str, Enum): - PENDING = 'Pending' - OPEN = 'Open' - SOLVED = 'Solved' - CLOSED = 'Closed' - - -class DeploymentMode(str, Enum): - MANAGED = 'Managed' - SELF_HOSTED = 'SelfHosted' - ENTERPRISE = 'Enterprise' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SupportCaseDto(IHasViewId): - view_id: Optional[str] = None - account_id: Optional[str] = None - project_id: Optional[str] = None - reporter_id: Optional[str] = None - kind: Optional[SupportCaseKind] = None - severity: Optional[SupportCaseSeverity] = None - status: Optional[SupportCaseStatus] = None - customer_status: Optional[SupportCustomerStatus] = None - subject: Optional[str] = None - affected_module: Optional[str] = None - deployment_mode: Optional[DeploymentMode] = None - gateway_version: Optional[str] = None - region: Optional[str] = None - plan_tier: Optional[str] = None - opened_on: int = 0 - first_response_on: Optional[int] = None - resolved_on: Optional[int] = None - closed_on: Optional[int] = None - resolution: Optional[str] = None - message_count: int = 0 - last_message_on: Optional[int] = None - - -class SupportMessageAuthorKind(str, Enum): - CUSTOMER = 'Customer' - STAFF = 'Staff' - AI = 'Ai' - SYSTEM = 'System' - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SupportCaseMessageDto: - id: Optional[str] = None - case_id: Optional[str] = None - author_kind: Optional[SupportMessageAuthorKind] = None - author_id: Optional[str] = None - author_display_name: Optional[str] = None - body: Optional[str] = None - sent_on: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SupportCaseDetailDto: - case: Optional[SupportCaseDto] = None - messages: List[SupportCaseMessageDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SupportCaseListProjection(IHasViewId): - view_id: Optional[str] = None - project_id: Optional[str] = None - kind: Optional[SupportCaseKind] = None - severity: Optional[SupportCaseSeverity] = None - status: Optional[SupportCaseStatus] = None - customer_status: Optional[SupportCustomerStatus] = None - subject: Optional[str] = None - opened_on: int = 0 - message_count: int = 0 - last_message_on: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticPackStepDescriptorDto: - step_id: Optional[str] = None - kind: Optional[str] = None - description: Optional[str] = None - parameters: Dict[str, str] = field(default_factory=dict) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticPackDescriptorDto: - name: Optional[str] = None - version: int = 0 - summary: Optional[str] = None - steps: List[DiagnosticPackStepDescriptorDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticPackStepResultDto: - step_id: Optional[str] = None - kind: Optional[str] = None - is_success: bool = False - result: Optional[Object] = None - error_message: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticPackRunResultDto: - pack_name: Optional[str] = None - pack_version: int = 0 - case_id: Optional[str] = None - steps: List[DiagnosticPackStepResultDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticEchoRegionDto: - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticEchoDto: - container_name: Optional[str] = None - is_managed_service: bool = False - api_version: Optional[str] = None - hub_version: Optional[str] = None - release: Optional[str] = None - runtime: Optional[str] = None - hub_url: Optional[str] = None - api_url: Optional[str] = None - license_present: bool = False - regions: Optional[List[DiagnosticEchoRegionDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticEventItemDto: - position: int = 0 - event_type: Optional[str] = None - payload: Optional[Dict[str, str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticEventsPageDto: - stream: Optional[str] = None - from_: int = field(metadata=config(field_name='from'), default=0) - count: int = 0 - has_more: bool = False - next_from: int = 0 - items: List[DiagnosticEventItemDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticLogsResponse: - list: Optional[PaginatedResponse[TenantLogEntryDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticRedisListItemDto: - view_id: Optional[str] = None - name: Optional[str] = None - status: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticRedisInspectDto: - key_pattern: Optional[str] = None - cache_key: Optional[str] = None - is_list: bool = False - item: Optional[Dict[str, Object]] = None - list_items: Optional[List[DiagnosticRedisListItemDto]] = None - has_more: bool = False - starting_after: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiagnosticHealthCheckDto: - check_id: Optional[str] = None - is_healthy: bool = False - status_code: int = 0 - detail: Optional[str] = None - - -class ILlmApiKeyRequest: - api_key: Optional[str] = None - - -class IHasViewId: - view_id: Optional[str] = None - - -class IHasDatabaseId: - id: Optional[str] = None - - -class IBindableContract: - pass - - -class IHasRazorTemplateCode: - pass - - -class IQueuedTrigger: - view_id: Optional[str] = None - name: Optional[str] = None - order: Optional[int] = None - break_on_error: bool = False - - -class IHasResponsibleUserId: - user_id: Optional[str] = None - - -class ICursorArgs: - field: Optional[str] = None - order: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EchoResponse: - release: Optional[CodeMashRelease] = None - runtime: Optional[CodeMashRuntime] = None - managed_service_hub_url: Optional[str] = None - managed_service_api_url: Optional[str] = None - hub_url: Optional[str] = None - api_url: Optional[str] = None - api_version: Optional[str] = None - hub_version: Optional[str] = None - admin_url_template: Optional[str] = None - email_service_configured: bool = False - root_bootstrap_password_source: Optional[str] = None - regions: Optional[List[EchoRegionDto]] = None - agent: Optional[EchoAgentDto] = None - hosting_platform: Optional[EchoHostingPlatformDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicProjectConfigDto: - display_name: Optional[str] = None - admin_portal_enabled: bool = False - branding: Optional[PublicBrandDto] = None - auth: Optional[PublicAuthDto] = None - ai_chat: Optional[PublicAiChatDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublicLegalDocumentDto: - kind: Optional[str] = None - title: Optional[str] = None - body: Optional[str] = None - available: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetTriggerDefinitionResponse(ResponseBase): - trigger: Optional[SaveTriggerRequest] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetTriggersNeedingAttentionResponse(ResponseBase): - items: List[TriggerAttentionDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestTriggerPreExecuteCodeResponse(ResponseBase): - outcome: Optional[str] = None - trigger_runs: bool = False - problems: List[TriggerActivationTestProblem] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountProfileResponse(ResponseBase): - item: Optional[AccountOwnerDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountStatusResponse(ResponseBase): - item: Optional[AccountStatusDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateStripeCheckoutSessionResponse(IdResponse): - trial_included: bool = False - no_trial_reason: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetStripeBillingPortalUrlResponse(IdResponse): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateTeamMemberFromInvitationResponse(IdResponse): - token: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountUsageBillingResponse(ResponseBase): - item: Optional[UsageBillingDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PromoteEnvironmentResponse(ResponseBase): - item: Optional[PromotionResultDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectEnvironmentsResponse(ResponseBase): - item: Optional[ProjectEnvironmentsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectResponse(ResponseBase): - item: Optional[ProjectDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectsResponse(ResponseBase): - list: Optional[List[ProjectListItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountRegionsResponse(ResponseBase): - items: Optional[List[ProjectRegionDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WaitForProjectActiveResponse(ResponseBase): - status: Optional[str] = None - is_active: bool = False - waited_seconds: int = 0 - message: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectTokensResponse(ResponseBase): - tokens: Optional[List[TokenMappingDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AdminPortalStructureDto: - project_id: Optional[str] = None - admin_portal_enabled: bool = False - display_name: Optional[str] = None - modules: List[AdminPortalModuleDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateAiCreditPackCheckoutResponse(ResponseBase): - result: Optional[AiCreditPackCheckoutDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectAiPlansResponse(ResponseBase): - result: Optional[ProjectAiPlansDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectAiPlansResponse(ResponseBase): - plan_ids: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectAiUserPlansResponse(ResponseBase): - result: Optional[AiUserPlansDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectAiSettingsResponse(ResponseBase): - result: Optional[ProjectAiSettingsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectAiUsageResponse(ResponseBase): - result: Optional[ProjectAiUsageDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CheckProjectLanguagesResponse(ResponseBase): - templates: List[TemplateLanguageGapDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateAccountResponse(IdResponse): - token: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountCollaboratorsResponse(ResponseBase): - list: Optional[PaginatedResponse[AuthDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountPasswordPolicyResponse(ResponseBase): - policy: Optional[AccountPasswordPolicyDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountTeamPoliciesResponse(ResponseBase): - policies: Optional[List[PolicyItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountTeamRolesResponse(ResponseBase): - roles: Optional[List[AccountTeamRoleDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasskeyOkResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasskeyVerificationTokenResponse(ResponseBase): - verification_token: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasskeyCeremonyOptionsResponse(ResponseBase): - ceremony_id: Optional[str] = None - options_json: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasskeyAuthTokensResponse(ResponseBase): - access_token: Optional[str] = None - refresh_token: Optional[str] = None - expires_in_seconds: int = 0 - recovery_codes: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasskeyListResponse(ResponseBase): - passkeys: List[AccountPasskeyListItemDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasskeyEnrollmentResponse(ResponseBase): - recovery_codes: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMyAccountUserProfileResponse(ResponseBase): - item: Optional[AuthDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLicenseDomainDnsStatusResponse(ResponseBase): - status: Optional[LicenseDomainDnsStatusDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StartLicenseDomainVerificationResponse(ResponseBase): - challenge: Optional[LicenseDomainVerificationChallengeDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLicenseDomainVerificationStatusResponse(ResponseBase): - status: Optional[LicenseDomainVerificationStatusDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLicensesResponse(ResponseBase): - list: Optional[List[LicenseDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PostLicenseHeartbeatResponse(ResponseBase): - verdict: Optional[LicenseHeartbeatVerdictDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetInstallationLicenseStatusResponse(ResponseBase): - status: Optional[InstallationLicenseStatusDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLicenseKeyResponse(ResponseBase): - key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateAiServiceUserResponse(ResponseBase): - id: Optional[str] = None - key_id: Optional[str] = None - key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListAiServiceUsersResponse(ResponseBase): - items: List[AiServiceUserDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RotateAiServiceUserKeyResponse(ResponseBase): - key_id: Optional[str] = None - key: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ImportUsersResponse(ResponseBase): - result: Optional[UsersImportDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RepairLoginProjectIdsResponse(ResponseBase): - result: Optional[LoginProjectRepairDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class IssueServiceUserApiKeyResponse: - id: int = 0 - name: Optional[str] = None - key: Optional[str] = None - environment: Optional[str] = None - response_status: Optional[CodeMashResponseStatus] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListServiceUserApiKeysResponse: - keys: List[ServiceUserApiKeyDto] = field(default_factory=list) - response_status: Optional[CodeMashResponseStatus] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMembershipTriggerResponse(GetTriggerResponse): - trigger: Optional[MembershipTriggerDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMembershipTriggersResponse(GetTriggersResponse): - list: Optional[PaginatedResponse[MembershipTriggerProjectionList]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetRoleResponse(ResponseBase): - role: Optional[RoleItemDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetRolesResponse(ResponseBase): - roles: List[RoleListProjectionDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPolicyResponse(ResponseBase): - policy: Optional[PolicyItemDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPoliciesResponse(ResponseBase): - policies: List[PolicyItemDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPasskeySettingsResponse(ResponseBase): - result: Optional[PasskeySettingsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMembershipIntegrationResponse(ResponseBase): - item: Optional[MembershipIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMembershipIntegrationsResponse(ResponseBase): - list: Optional[PaginatedResponse[MembershipIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAuthorizationSettingsResponse(ResponseBase): - result: Optional[MembershipAuthorizationViewDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdatePasswordComplexityResponse(ResponseBase): - result: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAuthenticationSettingsResponse(ResponseBase): - result: Optional[MembershipAuthenticationViewDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSchemaTriggerResponse(GetTriggerResponse): - trigger: Optional[SchemaTriggerDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSchemaTriggersResponse(GetTriggersResponse): - list: Optional[PaginatedResponse[SchemaTriggerProjectionList]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseTaxonomyResponse(ResponseBase): - item: Optional[TaxonomyDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseTaxonomiesResponse(ResponseBase): - list: Optional[PaginatedResponse[TaxonomyListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseTaxonomyTreeResponse(ResponseBase): - tree: Optional[List[TaxonomyTreeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseTaxonomyTermResponse(ResponseBase): - item: Optional[TermDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseMergedTermTreeResponse(ResponseBase): - tree: Optional[List[TermTreeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseTaxonomyTermTreeResponse(ResponseBase): - tree: Optional[List[TermTreeDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ApplyDatabaseSchemaBundleResponse(ResponseBase): - tier: Optional[str] = None - taxonomies: List[AppliedTaxonomyDto] = field(default_factory=list) - collections: List[AppliedCollectionDto] = field(default_factory=list) - decisions: List[str] = field(default_factory=list) - errors: List[str] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaResponse(ResponseBase): - item: Optional[SchemaDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemasResponse(ResponseBase): - list: Optional[PaginatedResponse[SchemaListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaDraftResponse(ResponseBase): - item: Optional[SchemaDraftDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaIndexStatusResponse(ResponseBase): - status: Optional[SchemaIndexStatusDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaListSettingsResponse(ResponseBase): - settings: Optional[SchemaListSettingsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaVersionDiffResponse(ResponseBase): - item: Optional[SchemaDiffDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaVersionsResponse(ResponseBase): - items: Optional[List[SchemaVersionSummaryDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AggregateRecordsResponse(ResponseBase): - result: Optional[List[Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CountRecordsResponse(ResponseBase): - count: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DistinctRecordValuesResponse(ResponseBase): - values: Optional[List[Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ExecuteRecordsAggregateResponse(ResponseBase): - result: Optional[List[Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindRecordsResponse(ResponseBase): - list: Optional[PaginatedResponse[Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindOneRecordResponse(ResponseBase): - result: Optional[Object] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCollectionIndexesResponse(ResponseBase): - indexes: Optional[List[CollectionIndexDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SeedCollectionRecordsResponse(ResponseBase): - result: Optional[SeedCollectionRecordsResultDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseIntegrationResponse(ResponseBase): - item: Optional[DatabaseIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseIntegrationsResponse(ResponseBase): - default_integration_id: Optional[str] = None - list: Optional[PaginatedResponse[DatabaseIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAllowedFlexTiersResponse(ResponseBase): - tiers: Optional[List[FlexTierDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RevealManagedFlexConnectionStringResponse(ResponseBase): - connection_string: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestDatabaseIntegrationResponse(ResponseBase): - items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCollectionImportResponse(ResponseBase): - result: Optional[CollectionImportDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCollectionImportsResponse(ResponseBase): - result: Optional[PaginatedResponse[CollectionImportDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RequestImportUploadUrlResponse(ResponseBase): - result: Optional[ImportUploadTargetDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AnalyzeImportFileResponse(ResponseBase): - result: Optional[ImportFileAnalysisDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseAggregateResponse(ResponseBase): - item: Optional[MongoDbAggregateDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseAggregatesResponse(ResponseBase): - list: Optional[PaginatedResponse[MongoDbAggregateListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestDatabaseAggregateResponse(ResponseBase): - result: Optional[List[Object]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFilesTriggerResponse(GetTriggerResponse): - trigger: Optional[FilesTriggerDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFilesTriggersResponse(GetTriggersResponse): - list: Optional[PaginatedResponse[FilesTriggerProjectionList]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFilesIntegrationResponse(ResponseBase): - item: Optional[FilesIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFilesIntegrationsResponse(ResponseBase): - default_integration_id: Optional[str] = None - list: Optional[PaginatedResponse[FilesIntegrationListProjection]] = None - available_providers: List[FileProvider] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestFilesIntegrationResponse(ResponseBase): - items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFileByIdResponse(ResponseBase): - file: Optional[FileResourceRefDto] = None - is_public: Optional[bool] = None - public_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFolderFilesResponse(ResponseBase): - list: Optional[PaginatedResponse[FileResourceRefDto]] = None - folders: Optional[IList[str]] = None - public_folders: Optional[IList[PublicFolderDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetNotificationModuleDisableDependenciesResponse(ResponseBase): - dependencies: Optional[NotificationModuleDisableDependenciesDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestEmailValidationIntegrationResponse(ResponseBase): - items: List[TestEmailValidationItemDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailTemplateResponse(ResponseBase): - item: Optional[EmailTemplateDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailTemplatesResponse(ResponseBase): - list: Optional[PaginatedResponse[EmailTemplateListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetHtmlFromMjmlResponse(ResponseBase): - variables: Optional[List[str]] = None - html_from_mjml_response: Optional[HtmlFromMjmlResponse] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSystemEmailTemplateResponse(ResponseBase): - item: Optional[SystemEmailTemplateDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSystemEmailTemplatesResponse(ResponseBase): - list: Optional[PaginatedResponse[SystemEmailTemplateListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailTemplateAvailableTokensResponse(ResponseBase): - tokens: Optional[Dict[str, List[str]]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailSignatureResponse(ResponseBase): - item: Optional[EmailSignatureDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailSignaturesResponse(ResponseBase): - list: Optional[PaginatedResponse[ListItemWithTranslationsProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailSettingsResponse(ResponseBase): - settings: Optional[EmailSettings] = None - system_tags: Optional[List[GroupDefinitionDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CheckEmailIntegrationDomainHealthResponse(ResponseBase): - domain: Optional[str] = None - items: Optional[IReadOnlyList[DomainHealthRecordItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailIntegrationResponse(ResponseBase): - item: Optional[EmailIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailIntegrationsResponse(ResponseBase): - default_integration_id: Optional[str] = None - list: Optional[PaginatedResponse[EmailIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestEmailIntegrationResponse(ResponseBase): - items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailFooterResponse(ResponseBase): - item: Optional[EmailFooterDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailFootersResponse(ResponseBase): - list: Optional[PaginatedResponse[ListItemWithTranslationsProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailPreferencesByLinkResponse(ResponseBase): - item: Optional[EmailLinkPreferencesDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignResponse(ResponseBase): - item: Optional[EmailCampaignDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignsResponse(ResponseBase): - list: Optional[PaginatedResponse[EmailCampaignListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignBatchesResponse(ResponseBase): - list: Optional[PaginatedResponse[EmailCampaignBatchDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignBatchNotificationResponse(ResponseBase): - campaign_notification: Optional[EmailCampaignBatchNotificationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignBatchNotificationsResponse(ResponseBase): - batch_status_history: Optional[List[BatchStatusChangeEntryDto]] = None - list: Optional[PaginatedResponse[EmailCampaignBatchNotificationDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignStatisticsResponse(ResponseBase): - stats: Optional[CampaignStatsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PreviewEmailNotificationResponse(ResponseBase): - subject: Optional[str] = None - body: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignMessagesResponse(ResponseBase): - list: Optional[PaginatedResponse[EmailCampaignBatchNotificationDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsTemplateResponse(ResponseBase): - item: Optional[SmsTemplateDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsTemplatesResponse(ResponseBase): - list: Optional[PaginatedResponse[SmsTemplateListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsMessageContentTokensResponse(ResponseBase): - tokens: Optional[Dict[str, List[str]]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RenderSmsTextResponse(ResponseBase): - variables: Optional[List[str]] = None - text: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsSettingsResponse(ResponseBase): - settings: Optional[SmsSettings] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsIntegrationResponse(ResponseBase): - item: Optional[SmsIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsIntegrationsResponse(ResponseBase): - default_integration_id: Optional[str] = None - list: Optional[PaginatedResponse[SmsIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestSmsIntegrationResponse(ResponseBase): - items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignResponse(ResponseBase): - sms_campaign: Optional[SmsCampaignDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignsResponse(ResponseBase): - list: Optional[PaginatedResponse[SmsCampaignDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignBatchesResponse(ResponseBase): - list: Optional[PaginatedResponse[SmsCampaignBatchDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignBatchNotificationResponse(ResponseBase): - campaign_notification: Optional[SmsCampaignBatchNotificationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignBatchNotificationsResponse(ResponseBase): - batch_status_history: Optional[List[BatchStatusChangeEntryDto]] = None - list: Optional[PaginatedResponse[SmsCampaignBatchNotificationDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignStatisticsResponse(ResponseBase): - stats: Optional[CampaignStatsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PreviewSmsNotificationResponse(ResponseBase): - body: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignMessagesResponse(ResponseBase): - list: Optional[PaginatedResponse[SmsCampaignBatchNotificationDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceListingResponse(ResponseBase): - listing: Optional[MarketplaceListingDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceTokensResponse(ResponseBase): - tokens: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceListingsResponse(ResponseBase): - list: Optional[PaginatedResponse[MarketplaceListingProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceIntegrationAccessResponse(ResponseBase): - roles: Optional[IReadOnlyList[MarketplaceAccessRoleDto]] = None - packages: Optional[IReadOnlyList[MarketplaceAccessPackageDto]] = None - tools: Optional[IReadOnlyList[MarketplaceAccessToolDto]] = None - functions: Optional[IReadOnlyList[MarketplaceAccessFunctionDto]] = None - can_manage: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveMarketplaceIntegrationCustomAccessResponse(ResponseBase): - policy_id: Optional[str] = None - created: bool = False - used_by_roles: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceIntegrationResponse(ResponseBase): - integration: Optional[MarketplaceIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceIntegrationsResponse(ResponseBase): - list: Optional[PaginatedResponse[MarketplaceIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceIntegrationToolsResponse(ResponseBase): - tools: Optional[IReadOnlyList[MarketplaceMcpToolDto]] = None - listed_at: Optional[datetime.datetime] = None - catalog_hash: Optional[str] = None - truncated: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StartMarketplaceIntegrationSignInResponse(ResponseBase): - authorize_url: Optional[str] = None - redirect_url: Optional[str] = None - expires_at: Optional[datetime.datetime] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SignOutMarketplaceIntegrationResponse(ResponseBase): - was_signed_in: bool = False - revoke: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EmptyMarketplaceSecretsResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RevealMarketplaceIntegrationSecretsResponse(ResponseBase): - secrets: Optional[IReadOnlyDictionary[str, str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestMarketplaceIntegrationResponse(ResponseBase): - items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None - steps: Optional[IReadOnlyList[MarketplaceValidationStepResultDto]] = None - access_changes: Optional[MarketplaceAccessChangesDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetMarketplaceIntegrationTokenMappingsResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceFunctionResponse(ResponseBase): - function: Optional[MarketplaceFunctionDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceFunctionsResponse(ResponseBase): - list: Optional[PaginatedResponse[MarketplaceFunctionProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceFunctionCatalogResponse(ResponseBase): - functions: Optional[IReadOnlyList[MarketplaceFunctionDefinitionDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceFunctionRunsResponse(ResponseBase): - runs: List[MarketplaceFunctionRunDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InvokeMarketplaceFunctionResponse(ResponseBase): - is_success: bool = False - output: Optional[Object] = None - vendor_request_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeIntegrationResponse(ResponseBase): - item: Optional[CodeIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeIntegrationsResponse(ResponseBase): - list: Optional[PaginatedResponse[CodeIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestCodeIntegrationResponse(ResponseBase): - items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeFunctionsResponse(ResponseBase): - list: Optional[PaginatedResponse[CodeFunctionDescriptorDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeFunctionEventSampleResponse(ResponseBase): - sample: Optional[CodeFunctionEventDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeFunctionQualifiersResponse(ResponseBase): - qualifiers: Optional[IReadOnlyList[CodeFunctionQualifierDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeFunctionRunsResponse(ResponseBase): - runs: List[CodeFunctionRunDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InvokeCodeFunctionResponse(ResponseBase): - status_code: int = 0 - output: Optional[Object] = None - duration_ms: int = 0 - request_id: Optional[str] = None - logs: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushTemplateResponse(ResponseBase): - item: Optional[PushTemplateDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushTemplatesResponse(ResponseBase): - list: Optional[PaginatedResponse[PushTemplateListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushMessageContentTokensResponse(ResponseBase): - tokens: Optional[Dict[str, List[str]]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RenderPushResponse(ResponseBase): - variables: Optional[List[str]] = None - title: Optional[str] = None - body: Optional[str] = None - subtitle: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushSettingsResponse(ResponseBase): - settings: Optional[PushSettings] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushIntegrationResponse(ResponseBase): - item: Optional[PushIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushIntegrationsResponse(ResponseBase): - default_integration_id: Optional[str] = None - list: Optional[PaginatedResponse[PushIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushDeviceResponse(ResponseBase): - item: Optional[PushDeviceDto] = None - user_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushDevicesResponse(ResponseBase): - list: Optional[PaginatedResponse[PushDeviceListProjection]] = None - team_devices: List[TeamPushDeviceListProjection] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignAudienceCountResponse(ResponseBase): - result: Optional[PushAudienceCountDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignResponse(ResponseBase): - item: Optional[PushCampaignDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignsResponse(ResponseBase): - list: Optional[PaginatedResponse[PushCampaignDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignBatchesResponse(ResponseBase): - list: Optional[PaginatedResponse[PushCampaignBatchDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignBatchNotificationResponse(ResponseBase): - campaign_notification: Optional[PushCampaignBatchNotificationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignBatchNotificationsResponse(ResponseBase): - batch_status_history: Optional[List[BatchStatusChangeEntryDto]] = None - list: Optional[PaginatedResponse[PushCampaignBatchNotificationDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignStatisticsResponse(ResponseBase): - stats: Optional[CampaignStatsDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PreviewPushNotificationResponse(ResponseBase): - title: Optional[str] = None - body: Optional[str] = None - subtitle: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignMessagesResponse(ResponseBase): - list: Optional[PaginatedResponse[PushCampaignBatchNotificationDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetNotificationInboxResponse(ResponseBase): - list: Optional[PaginatedResponse[InAppNotificationDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetUnreadCountResponse(ResponseBase): - count: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkNotificationReadResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkAllNotificationsReadResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentsWebhookLogResponse(ResponseBase): - list: Optional[IReadOnlyList[PaymentsWebhookLogEntry]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentsTriggerResponse(GetTriggerResponse): - trigger: Optional[PaymentTriggerDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentsTriggersResponse(GetTriggersResponse): - list: Optional[PaginatedResponse[PaymentTriggerProjectionList]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentsIntegrationResponse(ResponseBase): - item: Optional[PaymentsIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentsIntegrationsResponse(ResponseBase): - list: Optional[PaginatedResponse[PaymentsIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestPaymentsIntegrationResponse(ResponseBase): - items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLoggingIntegrationResponse(ResponseBase): - item: Optional[LoggingIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLoggingIntegrationsResponse(ResponseBase): - list: Optional[PaginatedResponse[LoggingIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestLoggingIntegrationResponse(ResponseBase): - items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CleanLogsResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLogsByCorrelationIdResponse(ResponseBase): - items: Optional[IReadOnlyList[TenantLogEntryDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLogsResponse(ResponseBase): - list: Optional[PaginatedResponse[TenantLogEntryDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLogSettingsResponse(ResponseBase): - skip_cloud_dashboard_logs: bool = False - skip_http_body_meta: bool = False - ai_chat_logging_enabled: bool = False - has_norbix_logging: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveLogSettingsResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAgentOnboardingResponse(ResponseBase): - prompt: Optional[str] = None - hub_url: Optional[str] = None - api_url: Optional[str] = None - mcp_url: Optional[str] = None - docs_url: Optional[str] = None - installation_type: Optional[str] = None - snippets: Optional[List[AgentOnboardingSnippet]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAiContextResponse(ResponseBase): - version: Optional[str] = None - unchanged: bool = False - context: Optional[AiProjectContextWireDto] = None - markdown: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAiToolsResponse(ResponseBase): - tools: Optional[List[AiToolManifestItem]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InvokeAiToolResponse(ResponseBase): - result: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UploadChatAttachmentResponse(ResponseBase): - id: Optional[str] = None - session_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChatAvailabilityResponse(ResponseBase): - available: bool = False - reason: Optional[str] = None - profiles: Optional[List[str]] = None - models: Optional[List[ChatModelOption]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetChatMemoryResponse(ResponseBase): - notes: Optional[List[ChatMemoryNote]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetChatSessionsResponse(ResponseBase): - sessions: Optional[List[ChatSessionListItem]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetChatSessionEntriesResponse(ResponseBase): - session_id: Optional[str] = None - profile: Optional[str] = None - project_id: Optional[str] = None - env: Optional[str] = None - entries: Optional[List[AiChatEntryWireDto]] = None - last_seq: int = 0 - active_work_item_ids: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChatTurnResponse(ResponseBase): - session_id: Optional[str] = None - reply: Optional[str] = None - screen_patch: Optional[ChatScreenContextDto] = None - tool_trace: Optional[List[str]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ScaffoldProjectResponse(ResponseBase): - mode: Optional[str] = None - env: Optional[str] = None - valid: bool = False - plan: Optional[List[ScaffoldStep]] = None - defaults: Optional[List[str]] = None - issues: Optional[List[ScaffoldIssue]] = None - report: Optional[ScaffoldApplyReport] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ValidateSchemaResponse(ResponseBase): - valid: bool = False - issues: Optional[List[ScaffoldIssue]] = None - collections: Optional[List[str]] = None - warnings: Optional[List[ScaffoldIssue]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RenderTemplatePreviewResponse(ResponseBase): - preview: Optional[TemplatePreview] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectBriefResponse(ResponseBase): - project_id: Optional[str] = None - snapshot: Optional[ProjectBriefSnapshotWireDto] = None - events: Optional[List[ProjectBriefEventWireDto]] = None - last_seq: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetWorkItemsResponse(ResponseBase): - project_id: Optional[str] = None - work_items: Optional[List[WorkItemWireDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetWorkItemResponse(ResponseBase): - work_item: Optional[WorkItemWireDto] = None - plans: Optional[List[AiChatEntryWireDto]] = None - steps: Optional[List[AiChatEntryWireDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ExportWorkItemResponse(ResponseBase): - work_item_id: Optional[str] = None - markdown: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAiTriggersResponse(GetTriggersResponse): - list: Optional[PaginatedResponse[AiTriggerProjectionList]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAiTriggerResponse(GetTriggerResponse): - trigger: Optional[AiTriggerDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthDeviceStartResponse(ResponseBase): - device_code: Optional[str] = None - user_code: Optional[str] = None - verification_uri: Optional[str] = None - verification_uri_complete: Optional[str] = None - expires_in: int = 0 - interval: int = 0 - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthDeviceTokenResponse(ResponseBase): - error: Optional[str] = None - error_description: Optional[str] = None - error_code: Optional[str] = None - reason: Optional[str] = None - bearer_token: Optional[str] = None - refresh_token: Optional[str] = None - expires_in: Optional[int] = None - client_id: Optional[str] = None - user_id: Optional[str] = None - user_name: Optional[str] = None - display_name: Optional[str] = None - account_id: Optional[str] = None - project_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthDeviceConsentResponse(ResponseBase): - client_name: Optional[str] = None - device_name: Optional[str] = None - user_code: Optional[str] = None - project_id: Optional[str] = None - account_roles: List[AiRoleDto] = field(default_factory=list) - projects: List[AiProjectRolesDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthDeviceConsentDecisionResponse(ResponseBase): - pass - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthConsentResponse(ResponseBase): - client_name: Optional[str] = None - redirect_host: Optional[str] = None - client_host: Optional[str] = None - redirect_is_loopback: bool = False - consent_ticket: Optional[str] = None - account_roles: List[AiRoleDto] = field(default_factory=list) - projects: List[AiProjectRolesDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthConsentDecisionResponse(ResponseBase): - redirect_url: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmbeddingIntegrationResponse(ResponseBase): - item: Optional[EmbeddingIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmbeddingIntegrationsResponse(ResponseBase): - list: Optional[PaginatedResponse[EmbeddingIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestEmbeddingIntegrationResponse(ResponseBase): - dimension: Optional[int] = None - latency_ms: Optional[int] = None - total_tokens: Optional[int] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLlmIntegrationResponse(ResponseBase): - item: Optional[LlmIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLlmIntegrationsResponse(ResponseBase): - default_integration_id: Optional[str] = None - list: Optional[PaginatedResponse[LlmIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestLlmIntegrationResponse(ResponseBase): - items: Optional[IReadOnlyList[IntegrationTestResultItemDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMcpIntegrationResponse(ResponseBase): - item: Optional[McpIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMcpIntegrationsResponse(ResponseBase): - default_integration_id: Optional[str] = None - list: Optional[PaginatedResponse[McpIntegrationListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetWebhookIntegrationResponse(ResponseBase): - item: Optional[WebhookIntegrationDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RevealWebhookIntegrationSecretResponse(ResponseBase): - signing_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RotateWebhookIntegrationSecretResponse(ResponseBase): - signing_secret: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class HttpResult: - response_text: Optional[str] = None - response_stream: Optional[bytes] = None - file_info: Optional[FileInfo] = None - virtual_file: Optional[IVirtualFile] = None - content_type: Optional[str] = None - headers: Optional[Dict[str, str]] = None - cookies: Optional[List[Cookie]] = None - e_tag: Optional[str] = None - age: Optional[datetime.timedelta] = None - max_age: Optional[datetime.timedelta] = None - expires: Optional[datetime.datetime] = None - last_modified: Optional[datetime.datetime] = None - cache_control: Optional[CacheControl] = None - result_scope: Optional[Func[IDisposable]] = None - allows_partial_response: bool = False - options: Optional[Dict[str, str]] = None - status: int = 0 - status_code: Optional[HttpStatusCode] = None - status_description: Optional[str] = None - response: Optional[Object] = None - response_filter: Optional[IContentTypeWriter] = None - request_context: Optional[IRequest] = None - view: Optional[str] = None - template: Optional[str] = None - padding_length: int = 0 - is_partial_request: bool = False - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveWebhookDestinationResponse(ResponseBase): - destination_id: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSchedulerTaskResponse(ResponseBase): - item: Optional[SchedulerTaskDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSchedulerTasksResponse(ResponseBase): - list: Optional[PaginatedResponse[SchedulerTaskListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSchedulerTaskRunsResponse(ResponseBase): - logs_enabled: bool = False - runs: List[SchedulerTaskRunDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ResolveResourcesResponse(ResponseBase): - resolved: Optional[IReadOnlyList[ResolvedResourceEntry]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetContactResponse(ResponseBase): - item: Optional[UserDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAllContactsResponse(ResponseBase): - items: Optional[IReadOnlyList[UserDto]] = None - next_cursor: Optional[str] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RepairContactRolesResponse(ResponseBase): - result: Optional[ContactRolesRepairDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetComplianceSettingsResponse(ResponseBase): - settings: Optional[ProjectComplianceDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLegalHoldsResponse(ResponseBase): - holds: List[LegalHoldDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDsarRequestsResponse(ResponseBase): - requests: List[DsarRequestDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetComplianceAuditLogResponse(ResponseBase): - entries: List[ComplianceAuditEntryDto] = field(default_factory=list) - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountComplianceResponse(ResponseBase): - settings: Optional[AccountComplianceDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSupportCaseResponse(ResponseBase): - result: Optional[SupportCaseDetailDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSupportCasesResponse(ResponseBase): - list: Optional[PaginatedResponse[SupportCaseListProjection]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDiagnosticPacksResponse(ResponseBase): - packs: Optional[List[DiagnosticPackDescriptorDto]] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RunDiagnosticPackResponse(ResponseBase): - result: Optional[DiagnosticPackRunResultDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDiagnosticEchoResponse(ResponseBase): - result: Optional[DiagnosticEchoDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ReadDiagnosticEventsResponse(ResponseBase): - result: Optional[DiagnosticEventsPageDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class QueryDiagnosticLogsResponse(ResponseBase): - result: Optional[DiagnosticLogsResponse] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InspectDiagnosticRedisResponse(ResponseBase): - result: Optional[DiagnosticRedisInspectDto] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RunDiagnosticHealthCheckResponse(ResponseBase): - result: Optional[DiagnosticHealthCheckDto] = None - - -# @Route("/{version}/code/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableCode(CodeMashRequestBase, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/code/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableCode(CodeMashRequestBase, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/code/integrations", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeIntegrations(CodeMashListPaginationRequestBase, IReturn[GetCodeIntegrationsResponse]): - pass - - -# @Route("/{version}/code/integrations/{id}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeIntegration(CodeMashRequestBase, IReturn[GetCodeIntegrationResponse]): - # @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Integration id, from get_code_integrations. - """ - - -# @Route("/{version}/code/integrations", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveCodeIntegration(CodeMashRequestBase, IReturn[IdResponse]): - integration: Optional[CodeIntegrationRequest] = None - - -# @Route("/{version}/code/integrations/test", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestCodeIntegration(CodeMashRequestBase, IReturn[TestCodeIntegrationResponse]): - # @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - Integration id, from get_code_integrations. - """ - - -# @Route("/{version}/code/integrations/confirm-human-delivery", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ConfirmCodeIntegrationHumanDeliveryRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - Integration id, from get_code_integrations. - """ - - -# @Route("/{version}/code/integrations/{Id}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteCodeIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Integration id, from get_code_integrations. - """ - - -# @Route("/{version}/code/integrations/{Id}/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableCodeIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Integration id, from get_code_integrations. - """ - - -# @Route("/{version}/code/integrations/{Id}/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableCodeIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Integration id, from get_code_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Integration id, from get_code_integrations. - """ - - -# @Route("/{version}/code/marketplace/listings", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceListings(CodeMashListPaginationRequestBase, IReturn[GetMarketplaceListingsResponse]): - # @ApiMember(Description="Filter by one or more categories (Crm, Erp, Communication, etc.).") - categories: Optional[List[MarketplaceCategory]] = None - """ - Filter by one or more categories (Crm, Erp, Communication, etc.). - """ - - - # @ApiMember(Description="Filter by transport (Mcp, Rest, Code).") - transports: Optional[List[MarketplaceTransport]] = None - """ - Filter by transport (Mcp, Rest, Code). - """ - - - # @ApiMember(Description="Free-text search over the listing's display name, vendor, and description.") - search: Optional[str] = None - """ - Free-text search over the listing's display name, vendor, and description. - """ - - - # @ApiMember(Description="If true, return only listings curated and verified by Norbix.") - official_only: Optional[bool] = None - """ - If true, return only listings curated and verified by Norbix. - """ - - - # @ApiMember(Description="Filter by curated tag slugs (e.g. ai-llm, messaging, crm). Matches listings carrying any of the given tags.") - tags: Optional[List[str]] = None - """ - Filter by curated tag slugs (e.g. ai-llm, messaging, crm). Matches listings carrying any of the given tags. - """ - - -# @Route("/{version}/code/marketplace/listings/{ListingViewId}/functions/{FunctionKey}/tokens", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceListingFunctionTokens(CodeMashRequestBase, IReturn[GetMarketplaceTokensResponse]): - # @ApiMember(Description="Marketplace listing view id, from get_marketplace_listings.", IsRequired=true) - listing_view_id: Optional[str] = None - """ - Marketplace listing view id, from get_marketplace_listings. - """ - - - # @ApiMember(Description="Function key on the listing, from get_marketplace_listings.", IsRequired=true) - function_key: Optional[str] = None - """ - Function key on the listing, from get_marketplace_listings. - """ - - -# @Route("/{version}/code/marketplace/integrations", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceIntegrations(CodeMashListPaginationRequestBase, IReturn[GetMarketplaceIntegrationsResponse]): - pass - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceIntegration(CodeMashRequestBase, IReturn[GetMarketplaceIntegrationResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/{version}/code/marketplace/integrations", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveMarketplaceIntegration(CodeMashRequestBase, IReturn[IdResponse]): - # @ApiMember(Description="The marketplace integration to install, from a get_marketplace_listings entry.", IsRequired=true) - integration: Optional[MarketplaceIntegrationDto] = None - """ - The marketplace integration to install, from a get_marketplace_listings entry. - """ - - - secrets: Dict[str, str] = field(default_factory=dict) - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteMarketplaceIntegration(CodeMashRequestBase, IReturn[IdResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/enable", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableMarketplaceIntegration(CodeMashRequestBase): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/disable", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableMarketplaceIntegration(CodeMashRequestBase): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceFunctions(CodeMashListPaginationRequestBase, IReturn[GetMarketplaceFunctionsResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions/{FunctionViewId}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceFunction(CodeMashRequestBase, IReturn[GetMarketplaceFunctionResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - - # @ApiMember(Description="Function view id, from get_marketplace_functions.", IsRequired=true) - function_view_id: Optional[str] = None - """ - Function view id, from get_marketplace_functions. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveMarketplaceFunction(CodeMashRequestBase): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - - # @ApiMember(Description="The function to create: functionKey, displayName, description, and one mapping per vendor function parameter.", IsRequired=true) - function: Optional[MarketplaceFunctionDto] = None - """ - The function to create: functionKey, displayName, description, and one mapping per vendor function parameter. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions/{FunctionViewId}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteMarketplaceFunction(CodeMashRequestBase): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - - # @ApiMember(Description="Function view id, from get_marketplace_functions.", IsRequired=true) - function_view_id: Optional[str] = None - """ - Function view id, from get_marketplace_functions. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions/{FunctionViewId}/enable", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableMarketplaceFunction(CodeMashRequestBase): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - - # @ApiMember(Description="Function view id, from get_marketplace_functions.", IsRequired=true) - function_view_id: Optional[str] = None - """ - Function view id, from get_marketplace_functions. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions/{FunctionViewId}/disable", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableMarketplaceFunction(CodeMashRequestBase): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - - # @ApiMember(Description="Function view id, from get_marketplace_functions.", IsRequired=true) - function_view_id: Optional[str] = None - """ - Function view id, from get_marketplace_functions. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/functions/{FunctionViewId}/tokens", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceFunctionTokens(CodeMashRequestBase, IReturn[GetMarketplaceTokensResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - - # @ApiMember(Description="Function view id, from get_marketplace_functions.", IsRequired=true) - function_view_id: Optional[str] = None - """ - Function view id, from get_marketplace_functions. - """ - - -# @Route("/{version}/code/marketplace/functions/{FunctionViewId}/invoke", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InvokeMarketplaceFunction(CodeMashRequestBase, IReturn[InvokeMarketplaceFunctionResponse]): - # @ApiMember(Description="Function view id (func_…), from get_marketplace_functions.", IsRequired=true) - function_view_id: Optional[str] = None - """ - Function view id (func_…), from get_marketplace_functions. - """ - - - payload: Dict[str, Object] = field(default_factory=dict) - - -# @Route("/{version}/code/marketplace/listings/{ListingViewId}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceListing(CodeMashRequestBase, IReturn[GetMarketplaceListingResponse]): - # @ApiMember(Description="Listing view id (ml_…), from get_marketplace_listings.", IsRequired=true) - listing_view_id: Optional[str] = None - """ - Listing view id (ml_…), from get_marketplace_listings. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/test", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestMarketplaceIntegration(CodeMashRequestBase, IReturn[TestMarketplaceIntegrationResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/internal/_typegen", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InternalsTypeGen: - typegen_0__smtp_email_integration_request: Optional[SmtpEmailIntegrationRequest] = None - typegen_1__aws_ses_email_integration_request: Optional[AwsSesEmailIntegrationRequest] = None - typegen_2__send_grid_email_integration_request: Optional[SendGridEmailIntegrationRequest] = None - typegen_3__mail_gun_email_integration_request: Optional[MailGunEmailIntegrationRequest] = None - typegen_4__email_to_all_users_delivery_settings_request: Optional[EmailToAllUsersDeliverySettingsRequest] = None - typegen_5__email_to_account_users_delivery_settings_request: Optional[EmailToAccountUsersDeliverySettingsRequest] = None - typegen_6__email_to_collection_records_delivery_settings_request: Optional[EmailToCollectionRecordsDeliverySettingsRequest] = None - typegen_7__email_to_emails_delivery_settings_request: Optional[EmailToEmailsDeliverySettingsRequest] = None - typegen_8__email_to_users_delivery_settings_request: Optional[EmailToUsersDeliverySettingsRequest] = None - typegen_9__membership_trigger_request: Optional[MembershipTriggerRequest] = None - typegen_10__schema_trigger_request: Optional[SchemaTriggerRequest] = None - typegen_11__files_trigger_request: Optional[FilesTriggerRequest] = None - typegen_12__payment_trigger_request: Optional[PaymentTriggerRequest] = None - typegen_15__mongo_db_connection_string_database_integration_request: Optional[MongoDbConnectionStringDatabaseIntegrationRequest] = None - typegen_16__mongo_db_atlas_flex_managed_database_integration_request: Optional[MongoDbAtlasFlexManagedDatabaseIntegrationRequest] = None - typegen_16__google_drive_files_integration_request: Optional[GoogleDriveFilesIntegrationRequest] = None - typegen_17__ftp_files_integration_request: Optional[FtpFilesIntegrationRequest] = None - typegen_18__drop_box_files_integration_request: Optional[DropBoxFilesIntegrationRequest] = None - typegen_19__apple_i_cloud_files_integration_request: Optional[AppleICloudFilesIntegrationRequest] = None - typegen_20__aws_s3_files_integration_request: Optional[AwsS3FilesIntegrationRequest] = None - typegen_21__google_cloud_files_integration_request: Optional[GoogleCloudFilesIntegrationRequest] = None - typegen_22__azure_blob_files_integration_request: Optional[AzureBlobFilesIntegrationRequest] = None - typegen_23__local_files_integration_request: Optional[LocalFilesIntegrationRequest] = None - typegen_24__amqp_logging_integration_request: Optional[AmqpLoggingIntegrationRequest] = None - typegen_25__aws_kinesis_logging_integration_request: Optional[AwsKinesisLoggingIntegrationRequest] = None - typegen_26__aws_s3_logging_integration_request: Optional[AwsS3LoggingIntegrationRequest] = None - typegen_28__new_relic_logging_integration_request: Optional[NewRelicLoggingIntegrationRequest] = None - typegen_30__mongo_db_logging_integration_request: Optional[MongoDbLoggingIntegrationRequest] = None - typegen_31__kafka_logging_integration_request: Optional[KafkaLoggingIntegrationRequest] = None - typegen_32__prometheus_logging_integration_request: Optional[PrometheusLoggingIntegrationRequest] = None - typegen_33__data_dog_logging_integration_request: Optional[DataDogLoggingIntegrationRequest] = None - typegen_34__internal_kafka_logging_integration_request: Optional[InternalKafkaLoggingIntegrationRequest] = None - typegen_35__elastic_search_logging_integration_request: Optional[ElasticSearchLoggingIntegrationRequest] = None - typegen_37__splunk_logging_integration_request: Optional[SplunkLoggingIntegrationRequest] = None - typegen_38__azure_otel_logging_integration_request: Optional[AzureOtelLoggingIntegrationRequest] = None - typegen_39__kibana_logging_integration_request: Optional[KibanaLoggingIntegrationRequest] = None - typegen_40__local_file_logging_integration_request: Optional[LocalFileLoggingIntegrationRequest] = None - typegen_41__okta_membership_integration_request: Optional[OktaMembershipIntegrationRequest] = None - typegen_42__x_membership_integration_request: Optional[XMembershipIntegrationRequest] = None - typegen_43__google_membership_integration_request: Optional[GoogleMembershipIntegrationRequest] = None - typegen_44__microsoft_membership_integration_request: Optional[MicrosoftMembershipIntegrationRequest] = None - typegen_45__git_hub_membership_integration_request: Optional[GitHubMembershipIntegrationRequest] = None - typegen_46__meta_membership_integration_request: Optional[MetaMembershipIntegrationRequest] = None - typegen_47__apple_membership_integration_request: Optional[AppleMembershipIntegrationRequest] = None - typegen_48__lemon_squeezy_payment_integration_request: Optional[LemonSqueezyPaymentIntegrationRequest] = None - typegen_49__adyen_payment_integration_request: Optional[AdyenPaymentIntegrationRequest] = None - typegen_50__mollie_payment_integration_request: Optional[MolliePaymentIntegrationRequest] = None - typegen_51__paddle_payment_integration_request: Optional[PaddlePaymentIntegrationRequest] = None - typegen_52__pay_pal_payment_integration_request: Optional[PayPalPaymentIntegrationRequest] = None - typegen_53__stripe_payment_integration_request: Optional[StripePaymentIntegrationRequest] = None - typegen_54__apple_in_app_payment_integration_request: Optional[AppleInAppPaymentIntegrationRequest] = None - typegen_55__google_in_app_payment_integration_request: Optional[GoogleInAppPaymentIntegrationRequest] = None - typegen_285__montonio_payment_integration_request: Optional[MontonioPaymentIntegrationRequest] = None - typegen_287__shopify_payment_integration_request: Optional[ShopifyPaymentIntegrationRequest] = None - typegen_288__woo_commerce_payment_integration_request: Optional[WooCommercePaymentIntegrationRequest] = None - typegen_289__magento_payment_integration_request: Optional[MagentoPaymentIntegrationRequest] = None - typegen_290__braintree_payment_integration_request: Optional[BraintreePaymentIntegrationRequest] = None - typegen_291__authorize_net_payment_integration_request: Optional[AuthorizeNetPaymentIntegrationRequest] = None - typegen_292__check_out_com_payment_integration_request: Optional[CheckOutComPaymentIntegrationRequest] = None - typegen_293__worldpay_payment_integration_request: Optional[WorldpayPaymentIntegrationRequest] = None - typegen_56__edge_web_push_integration_request: Optional[EdgeWebPushIntegrationRequest] = None - typegen_57__chrome_plugin_push_integration_request: Optional[ChromePluginPushIntegrationRequest] = None - typegen_58__safari_push_integration_request: Optional[SafariPushIntegrationRequest] = None - typegen_59__chrome_web_push_integration_request: Optional[ChromeWebPushIntegrationRequest] = None - typegen_60__firefox_web_push_integration_request: Optional[FirefoxWebPushIntegrationRequest] = None - typegen_61__android_firebase_push_integration_request: Optional[AndroidFirebasePushIntegrationRequest] = None - typegen_62__apple_apns_push_integration_request: Optional[AppleApnsPushIntegrationRequest] = None - typegen_65__aws_lambda_code_integration_request: Optional[AwsLambdaCodeIntegrationRequest] = None - typegen_66__azure_functions_code_integration_request: Optional[AzureFunctionsCodeIntegrationRequest] = None - typegen_67__google_cloud_functions_code_integration_request: Optional[GoogleCloudFunctionsCodeIntegrationRequest] = None - typegen_68__ollama_llm_integration_request: Optional[OllamaLlmIntegrationRequest] = None - typegen_69__open_router_llm_integration_request: Optional[OpenRouterLlmIntegrationRequest] = None - typegen_70__mistral_llm_integration_request: Optional[MistralLlmIntegrationRequest] = None - typegen_71__grok_llm_integration_request: Optional[GrokLlmIntegrationRequest] = None - typegen_72__groq_llm_integration_request: Optional[GroqLlmIntegrationRequest] = None - typegen_73__google_llm_integration_request: Optional[GoogleLlmIntegrationRequest] = None - typegen_74__anthropic_llm_integration_request: Optional[AnthropicLlmIntegrationRequest] = None - typegen_75__open_ai_llm_integration_request: Optional[OpenAiLlmIntegrationRequest] = None - typegen_76__playwright_mcp_integration_request: Optional[PlaywrightMcpIntegrationRequest] = None - typegen_77__mongo_db_mcp_integration_request: Optional[MongoDbMcpIntegrationRequest] = None - typegen_78__git_hub_mcp_integration_request: Optional[GitHubMcpIntegrationRequest] = None - typegen_79__stripe_mcp_integration_request: Optional[StripeMcpIntegrationRequest] = None - typegen_80__brave_search_mcp_integration_request: Optional[BraveSearchMcpIntegrationRequest] = None - typegen_81__obsidian_mcp_integration_request: Optional[ObsidianMcpIntegrationRequest] = None - typegen_82__email_template_dto: Optional[EmailTemplateDto] = None - typegen_83__push_template_dto: Optional[PushTemplateDto] = None - typegen_84__sms_template_dto: Optional[SmsTemplateDto] = None - typegen_85__system_email_template_dto: Optional[SystemEmailTemplateDto] = None - typegen_86__trigger_action_email_dto: Optional[TriggerActionEmailDto] = None - typegen_87__trigger_action_push_dto: Optional[TriggerActionPushDto] = None - typegen_88__trigger_action_code_dto: Optional[TriggerActionCodeDto] = None - typegen_89__trigger_action_webhook_dto: Optional[TriggerActionWebhookDto] = None - typegen_236__trigger_action_sms_dto: Optional[TriggerActionSmsDto] = None - typegen_237__trigger_action_sse_dto: Optional[TriggerActionSseDto] = None - typegen_238__trigger_action_marketplace_dto: Optional[TriggerActionMarketplaceDto] = None - typegen_239__sse_delivery_settings_dto: Optional[SseDeliverySettingsDto] = None - typegen_240__get_triggers: Optional[GetTriggers] = None - typegen_241__get_triggers_response: Optional[GetTriggersResponse] = None - typegen_90__email_to_all_users_delivery_settings_dto: Optional[EmailToAllUsersDeliverySettingsDto] = None - typegen_91__email_to_account_users_delivery_settings_dto: Optional[EmailToAccountUsersDeliverySettingsDto] = None - typegen_92__email_to_users_delivery_settings_dto: Optional[EmailToUsersDeliverySettingsDto] = None - typegen_93__email_to_email_addresses_delivery_settings_dto: Optional[EmailToEmailAddressesDeliverySettingsDto] = None - typegen_94__email_to_collection_records_delivery_settings_dto: Optional[EmailToCollectionRecordsDeliverySettingsDto] = None - typegen_95__push_to_all_users_delivery_settings_dto: Optional[PushToAllUsersDeliverySettingsDto] = None - typegen_96__push_to_users_delivery_settings_dto: Optional[PushToUsersDeliverySettingsDto] = None - typegen_229__push_to_account_users_delivery_settings_dto: Optional[PushToAccountUsersDeliverySettingsDto] = None - typegen_97__push_to_collection_records_delivery_settings_dto: Optional[PushToCollectionRecordsDeliverySettingsDto] = None - typegen_98__push_to_devices_delivery_settings_dto: Optional[PushToDevicesDeliverySettingsDto] = None - typegen_99__sms_to_all_users_delivery_settings_dto: Optional[SmsToAllUsersDeliverySettingsDto] = None - typegen_100__sms_to_users_delivery_settings_dto: Optional[SmsToUsersDeliverySettingsDto] = None - typegen_249__sms_to_account_users_delivery_settings_dto: Optional[SmsToAccountUsersDeliverySettingsDto] = None - typegen_101__sms_to_collection_records_delivery_settings_dto: Optional[SmsToCollectionRecordsDeliverySettingsDto] = None - typegen_102__sms_to_phone_numbers_delivery_settings_dto: Optional[SmsToPhoneNumbersDeliverySettingsDto] = None - typegen_103__open_ai_llm_integration_dto: Optional[OpenAiLlmIntegrationDto] = None - typegen_104__anthropic_llm_integration_dto: Optional[AnthropicLlmIntegrationDto] = None - typegen_105__ollama_llm_integration_dto: Optional[OllamaLlmIntegrationDto] = None - typegen_106__groq_llm_integration_dto: Optional[GroqLlmIntegrationDto] = None - typegen_107__google_llm_integration_dto: Optional[GoogleLlmIntegrationDto] = None - typegen_108__mistral_llm_integration_dto: Optional[MistralLlmIntegrationDto] = None - typegen_109__open_router_llm_integration_dto: Optional[OpenRouterLlmIntegrationDto] = None - typegen_110__grok_llm_integration_dto: Optional[GrokLlmIntegrationDto] = None - typegen_111__docker_mcp_integration_dto: Optional[DockerMcpIntegrationDto] = None - typegen_112__google_calendar_mcp_integration_dto: Optional[GoogleCalendarMcpIntegrationDto] = None - typegen_113__obsidian_mcp_integration_dto: Optional[ObsidianMcpIntegrationDto] = None - typegen_114__aws_lambda_cross_account_role_code_integration_dto: Optional[AwsLambdaCrossAccountRoleCodeIntegrationDto] = None - typegen_115__aws_lambda_iam_code_integration_dto: Optional[AwsLambdaIamCodeIntegrationDto] = None - typegen_116__azure_functions_code_integration_dto: Optional[AzureFunctionsCodeIntegrationDto] = None - typegen_118__google_cloud_functions_code_integration_dto: Optional[GoogleCloudFunctionsCodeIntegrationDto] = None - typegen_120__adyen_payment_integration_dto: Optional[AdyenPaymentIntegrationDto] = None - typegen_121__apple_in_app_payment_integration_dto: Optional[AppleInAppPaymentIntegrationDto] = None - typegen_122__google_in_app_payment_integration_dto: Optional[GoogleInAppPaymentIntegrationDto] = None - typegen_123__lemon_squeezy_payment_integration_dto: Optional[LemonSqueezyPaymentIntegrationDto] = None - typegen_124__mollie_payment_integration_dto: Optional[MolliePaymentIntegrationDto] = None - typegen_125__paddle_payment_integration_dto: Optional[PaddlePaymentIntegrationDto] = None - typegen_126__pay_pal_payment_integration_dto: Optional[PayPalPaymentIntegrationDto] = None - typegen_127__stripe_payment_integration_dto: Optional[StripePaymentIntegrationDto] = None - typegen_184__shopify_payment_integration_dto: Optional[ShopifyPaymentIntegrationDto] = None - typegen_185__woo_commerce_payment_integration_dto: Optional[WooCommercePaymentIntegrationDto] = None - typegen_186__magento_payment_integration_dto: Optional[MagentoPaymentIntegrationDto] = None - typegen_187__braintree_payment_integration_dto: Optional[BraintreePaymentIntegrationDto] = None - typegen_188__authorize_net_payment_integration_dto: Optional[AuthorizeNetPaymentIntegrationDto] = None - typegen_189__check_out_com_payment_integration_dto: Optional[CheckOutComPaymentIntegrationDto] = None - typegen_190__worldpay_payment_integration_dto: Optional[WorldpayPaymentIntegrationDto] = None - typegen_286__montonio_payment_integration_dto: Optional[MontonioPaymentIntegrationDto] = None - typegen_294__payment_order_event_dto: Optional[PaymentOrderEventDto] = None - typegen_128__apple_sign_in_membership_integration_dto: Optional[AppleSignInMembershipIntegrationDto] = None - typegen_129__git_hub_membership_integration_dto: Optional[GitHubMembershipIntegrationDto] = None - typegen_130__google_membership_integration_dto: Optional[GoogleMembershipIntegrationDto] = None - typegen_131__meta_membership_integration_dto: Optional[MetaMembershipIntegrationDto] = None - typegen_132__microsoft_membership_integration_dto: Optional[MicrosoftMembershipIntegrationDto] = None - typegen_133__okta_membership_integration_dto: Optional[OktaMembershipIntegrationDto] = None - typegen_134__x_membership_integration_dto: Optional[XMembershipIntegrationDto] = None - typegen_135__amqp_logging_integration_dto: Optional[AmqpLoggingIntegrationDto] = None - typegen_136__aws_kinesis_logging_integration_dto: Optional[AwsKinesisLoggingIntegrationDto] = None - typegen_137__aws_s3_cross_account_role_logging_integration_dto: Optional[AwsS3CrossAccountRoleLoggingIntegrationDto] = None - typegen_138__aws_s3_iam_logging_integration_dto: Optional[AwsS3IamLoggingIntegrationDto] = None - typegen_139__azure_otel_logging_integration_dto: Optional[AzureOtelLoggingIntegrationDto] = None - typegen_140__data_dog_logging_integration_dto: Optional[DataDogLoggingIntegrationDto] = None - typegen_141__elastic_search_logging_integration_dto: Optional[ElasticSearchLoggingIntegrationDto] = None - typegen_142__internal_kafka_logging_integration_dto: Optional[InternalKafkaLoggingIntegrationDto] = None - typegen_143__kafka_logging_integration_dto: Optional[KafkaLoggingIntegrationDto] = None - typegen_144__kibana_logging_integration_dto: Optional[KibanaLoggingIntegrationDto] = None - typegen_145__local_file_logging_integration_dto: Optional[LocalFileLoggingIntegrationDto] = None - typegen_147__mongo_db_logging_integration_dto: Optional[MongoDbLoggingIntegrationDto] = None - typegen_148__new_relic_logging_integration_dto: Optional[NewRelicLoggingIntegrationDto] = None - typegen_149__prometheus_logging_integration_dto: Optional[PrometheusLoggingIntegrationDto] = None - typegen_150__splunk_logging_integration_dto: Optional[SplunkLoggingIntegrationDto] = None - typegen_153__apple_i_cloud_files_integration_dto: Optional[AppleICloudFilesIntegrationDto] = None - typegen_154__aws_s3_cross_account_role_files_integration_dto: Optional[AwsS3CrossAccountRoleFilesIntegrationDto] = None - typegen_155__aws_s3_iam_files_integration_dto: Optional[AwsS3IamFilesIntegrationDto] = None - typegen_156__azure_blob_files_integration_dto: Optional[AzureBlobFilesIntegrationDto] = None - typegen_157__drop_box_files_integration_dto: Optional[DropBoxFilesIntegrationDto] = None - typegen_158__ftp_files_integration_dto: Optional[FtpFilesIntegrationDto] = None - typegen_159__google_cloud_files_integration_dto: Optional[GoogleCloudFilesIntegrationDto] = None - typegen_160__google_drive_files_integration_dto: Optional[GoogleDriveFilesIntegrationDto] = None - typegen_161__local_files_integration_dto: Optional[LocalFilesIntegrationDto] = None - typegen_164__mongo_db_connection_string_integration_dto: Optional[MongoDbConnectionStringIntegrationDto] = None - typegen_165__mongo_db_atlas_flex_managed_integration_dto: Optional[MongoDbAtlasFlexManagedIntegrationDto] = None - typegen_165__bird_sms_integration_dto: Optional[BirdSmsIntegrationDto] = None - typegen_166__plivo_sms_integration_dto: Optional[PlivoSmsIntegrationDto] = None - typegen_167__sinch_sms_integration_dto: Optional[SinchSmsIntegrationDto] = None - typegen_168__telesign_sms_integration_dto: Optional[TelesignSmsIntegrationDto] = None - typegen_169__telnyx_sms_integration_dto: Optional[TelnyxSmsIntegrationDto] = None - typegen_170__twilio_sms_integration_dto: Optional[TwilioSmsIntegrationDto] = None - typegen_171__vonage_sms_integration_dto: Optional[VonageSmsIntegrationDto] = None - typegen_246__fake_sms_integration_dto: Optional[FakeSmsIntegrationDto] = None - typegen_172__android_firebase_push_integration_dto: Optional[AndroidFirebasePushIntegrationDto] = None - typegen_173__apple_apns_push_integration_dto: Optional[AppleApnsPushIntegrationDto] = None - typegen_174__chrome_plugin_push_integration_dto: Optional[ChromePluginPushIntegrationDto] = None - typegen_175__chrome_web_push_integration_dto: Optional[ChromeWebPushIntegrationDto] = None - typegen_176__edge_web_push_integration_dto: Optional[EdgeWebPushIntegrationDto] = None - typegen_177__firefox_web_push_integration_dto: Optional[FirefoxWebPushIntegrationDto] = None - typegen_178__safari_push_integration_dto: Optional[SafariPushIntegrationDto] = None - typegen_247__fake_push_integration_dto: Optional[FakePushIntegrationDto] = None - typegen_179__aws_cross_account_role_email_integration_dto: Optional[AwsCrossAccountRoleEmailIntegrationDto] = None - typegen_180__aws_iam_email_integration_dto: Optional[AwsIamEmailIntegrationDto] = None - typegen_181__mail_gun_email_integration_dto: Optional[MailGunEmailIntegrationDto] = None - typegen_182__send_grid_email_integration_dto: Optional[SendGridEmailIntegrationDto] = None - typegen_183__smtp_email_integration_dto: Optional[SmtpEmailIntegrationDto] = None - typegen_248__fake_email_integration_dto: Optional[FakeEmailIntegrationDto] = None - typegen_192__webhook_integration_dto: Optional[WebhookIntegrationDto] = None - typegen_193__webhook_destination_dto: Optional[WebhookDestinationDto] = None - typegen_194__scheduler_task_dto: Optional[SchedulerTaskDto] = None - typegen_249__email_campaign_scheduler_task_request: Optional[EmailCampaignSchedulerTaskRequest] = None - typegen_250__sms_campaign_scheduler_task_request: Optional[SmsCampaignSchedulerTaskRequest] = None - typegen_251__push_campaign_scheduler_task_request: Optional[PushCampaignSchedulerTaskRequest] = None - typegen_195__mongo_db_aggregate_dto: Optional[MongoDbAggregateDto] = None - typegen_196__marketplace_integration_dto: Optional[MarketplaceIntegrationDto] = None - typegen_197__marketplace_function_dto: Optional[MarketplaceFunctionDto] = None - typegen_198__marketplace_listing_dto: Optional[MarketplaceListingDto] = None - typegen_199__marketplace_function_definition_dto: Optional[MarketplaceFunctionDefinitionDto] = None - typegen_200__marketplace_function_parameter_dto: Optional[MarketplaceFunctionParameterDto] = None - typegen_201__enable_code: Optional[EnableCode] = None - typegen_202__disable_code: Optional[DisableCode] = None - typegen_203__get_code_integrations: Optional[GetCodeIntegrations] = None - typegen_204__get_code_integration: Optional[GetCodeIntegration] = None - typegen_205__save_code_integration: Optional[SaveCodeIntegration] = None - typegen_206__test_code_integration: Optional[TestCodeIntegration] = None - typegen_207__confirm_code_integration_human_delivery_request: Optional[ConfirmCodeIntegrationHumanDeliveryRequest] = None - typegen_209__delete_code_integration_request: Optional[DeleteCodeIntegrationRequest] = None - typegen_210__enable_code_integration_request: Optional[EnableCodeIntegrationRequest] = None - typegen_211__disable_code_integration_request: Optional[DisableCodeIntegrationRequest] = None - typegen_212__get_marketplace_listings: Optional[GetMarketplaceListings] = None - typegen_213__get_marketplace_listing_function_tokens: Optional[GetMarketplaceListingFunctionTokens] = None - typegen_214__get_marketplace_integrations: Optional[GetMarketplaceIntegrations] = None - typegen_215__get_marketplace_integration: Optional[GetMarketplaceIntegration] = None - typegen_216__save_marketplace_integration: Optional[SaveMarketplaceIntegration] = None - typegen_217__delete_marketplace_integration: Optional[DeleteMarketplaceIntegration] = None - typegen_218__enable_marketplace_integration: Optional[EnableMarketplaceIntegration] = None - typegen_219__disable_marketplace_integration: Optional[DisableMarketplaceIntegration] = None - typegen_221__get_marketplace_functions: Optional[GetMarketplaceFunctions] = None - typegen_222__get_marketplace_function: Optional[GetMarketplaceFunction] = None - typegen_223__save_marketplace_function: Optional[SaveMarketplaceFunction] = None - typegen_224__delete_marketplace_function: Optional[DeleteMarketplaceFunction] = None - typegen_225__enable_marketplace_function: Optional[EnableMarketplaceFunction] = None - typegen_226__disable_marketplace_function: Optional[DisableMarketplaceFunction] = None - typegen_227__get_marketplace_function_tokens: Optional[GetMarketplaceFunctionTokens] = None - typegen_228__invoke_marketplace_function: Optional[InvokeMarketplaceFunction] = None - typegen_232__get_marketplace_listing: Optional[GetMarketplaceListing] = None - typegen_233__test_marketplace_integration: Optional[TestMarketplaceIntegration] = None - typegen_234__test_marketplace_integration_response: Optional[TestMarketplaceIntegrationResponse] = None - typegen_235__get_marketplace_listing_response: Optional[GetMarketplaceListingResponse] = None - typegen_230__admin_portal_structure_dto: Optional[AdminPortalStructureDto] = None - typegen_231__admin_portal_module_dto: Optional[AdminPortalModuleDto] = None - typegen_236__user_message_entry_wire_dto: Optional[UserMessageEntryWireDto] = None - typegen_237__assistant_text_entry_wire_dto: Optional[AssistantTextEntryWireDto] = None - typegen_238__assistant_question_entry_wire_dto: Optional[AssistantQuestionEntryWireDto] = None - typegen_239__user_answer_entry_wire_dto: Optional[UserAnswerEntryWireDto] = None - typegen_240__plan_entry_wire_dto: Optional[PlanEntryWireDto] = None - typegen_241__user_decision_entry_wire_dto: Optional[UserDecisionEntryWireDto] = None - typegen_242__run_step_entry_wire_dto: Optional[RunStepEntryWireDto] = None - typegen_243__action_pending_entry_wire_dto: Optional[ActionPendingEntryWireDto] = None - typegen_244__notice_entry_wire_dto: Optional[NoticeEntryWireDto] = None - typegen_245__conversation_snapshot_entry_wire_dto: Optional[ConversationSnapshotEntryWireDto] = None - typegen_269__function_ref_dto: Optional[FunctionRefDto] = None - typegen_270__code_function_event_dto: Optional[CodeFunctionEventDto] = None - typegen_271__code_function_context_dto: Optional[CodeFunctionContextDto] = None - typegen_272__code_function_caller_dto: Optional[CodeFunctionCallerDto] = None - typegen_273__code_function_run_as_dto: Optional[CodeFunctionRunAsDto] = None - typegen_274__code_function_data_dto: Optional[CodeFunctionDataDto] = None - typegen_275__database_record_change_dto: Optional[DatabaseRecordChangeDto] = None - typegen_276__user_change_dto: Optional[UserChangeDto] = None - typegen_277__file_change_dto: Optional[FileChangeDto] = None - typegen_278__payment_fact_dto: Optional[PaymentFactDto] = None - typegen_279__ai_usage_event_dto: Optional[AiUsageEventDto] = None - typegen_280__scheduled_task_info_dto: Optional[ScheduledTaskInfoDto] = None - typegen_281__fake_code_integration_dto: Optional[FakeCodeIntegrationDto] = None - typegen_282__fake_code_integration_request: Optional[FakeCodeIntegrationRequest] = None - typegen_283__code_function_scheduler_task_request: Optional[CodeFunctionSchedulerTaskRequest] = None - typegen_284__marketplace_function_scheduler_task_request: Optional[MarketplaceFunctionSchedulerTaskRequest] = None - - -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SharedTypeGen: - typegen__string_field_dto: Optional[StringFieldDto] = None - typegen__decimal_field_dto: Optional[DecimalFieldDto] = None - typegen__currency_field_dto: Optional[CurrencyFieldDto] = None - typegen__boolean_field_dto: Optional[BooleanFieldDto] = None - typegen__date_field_dto: Optional[DateFieldDto] = None - typegen__integer_field_dto: Optional[IntegerFieldDto] = None - typegen__geolocation_field_dto: Optional[GeolocationFieldDto] = None - typegen__tags_field_dto: Optional[TagsFieldDto] = None - typegen__file_field_dto: Optional[FileFieldDto] = None - typegen__taxonomy_selection_field_dto: Optional[TaxonomySelectionFieldDto] = None - typegen__collection_selection_field_dto: Optional[CollectionSelectionFieldDto] = None - typegen__user_selection_field_dto: Optional[UserSelectionFieldDto] = None - typegen__role_selection_field_dto: Optional[RoleSelectionFieldDto] = None - typegen__enum_selection_field_dto: Optional[EnumSelectionFieldDto] = None - typegen__object_field_dto: Optional[ObjectFieldDto] = None - typegen__array_field_dto: Optional[ArrayFieldDto] = None - typegen__json_field_dto: Optional[JsonFieldDto] = None - - -# @Route("/{version}/echo", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class Echo(RequestBase, IReturn[EchoResponse]): - pass - - -# @Route("/{version}/public/projects/{ProjectId}/brand/{Kind}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPublicProjectBrandAsset(RequestBase, IReturn[bytes]): - project_id: Optional[str] = None - kind: Optional[str] = None - v: Optional[str] = None - - -# @Route("/{version}/public/projects/{ProjectId}/config", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPublicProjectConfig(RequestBase, IReturn[PublicProjectConfigDto]): - project_id: Optional[str] = None - - -# @Route("/{version}/public/projects/{ProjectId}/legal/{Kind}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPublicProjectLegal(RequestBase, IReturn[PublicLegalDocumentDto]): - project_id: Optional[str] = None - kind: Optional[str] = None - - -# @Route("/{version}/triggers/{id}/definition", "GET") -# @Api(Description="Get one trigger in the shape its save takes (read → change → save)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetTriggerDefinition(CodeMashRequestBase, IReturn[GetTriggerDefinitionResponse]): - """ - Get one trigger in the shape its save takes (read → change → save) - """ - - # @ApiMember(Description="The trigger id (trg_…).", IsRequired=true) - id: Optional[str] = None - """ - The trigger id (trg_…). - """ - - - # @ApiMember(Description="Which module the trigger belongs to: Schema, Membership, Files, Payments or Ai.", IsRequired=true) - trigger_type: Optional[TriggerType] = None - """ - Which module the trigger belongs to: Schema, Membership, Files, Payments or Ai. - """ - - - # @ApiMember(Description="The collection (schema) id the trigger watches. Required for Schema triggers.") - schema_id: Optional[str] = None - """ - The collection (schema) id the trigger watches. Required for Schema triggers. - """ - - -# @Route("/{version}/triggers/attention", "GET") -# @Api(Description="Get triggers that need attention") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetTriggersNeedingAttention(CodeMashRequestBase, IReturn[GetTriggersNeedingAttentionResponse]): - """ - Get triggers that need attention - """ - - # @ApiMember(Description="Which triggers: Membership, Schema, Files, Payments or Ai.", IsRequired=true) - trigger_type: Optional[TriggerType] = None - """ - Which triggers: Membership, Schema, Files, Payments or Ai. - """ - - -# @Route("/{version}/triggers/pre-execute-code/test", "POST") -# @Api(Description="Test a trigger's pre-action code against a sample record") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestTriggerPreExecuteCode(CodeMashRequestBase, IReturn[TestTriggerPreExecuteCodeResponse]): - """ - Test a trigger's pre-action code against a sample record - """ - - # @ApiMember(Description="The code to test, as saved in preExecuteCode: C# statements ending in 'return true;' or 'return false;', e.g. 'return New.status == \"published\";'.", IsRequired=true) - code: Optional[str] = None - """ - The code to test, as saved in preExecuteCode: C# statements ending in 'return true;' or 'return false;', e.g. 'return New.status == "published";'. - """ - - - # @ApiMember(Description="Which kind of trigger the code is for: Schema, Membership, Files, Payments or Ai.", IsRequired=true) - trigger_type: Optional[TriggerType] = None - """ - Which kind of trigger the code is for: Schema, Membership, Files, Payments or Ai. - """ - - - # @ApiMember(Description="The sample record AFTER the change (the code's New), as a JSON object. Omit = empty (a delete).") - new_record: Optional[str] = None - """ - The sample record AFTER the change (the code's New), as a JSON object. Omit = empty (a delete). - """ - - - # @ApiMember(Description="The sample record BEFORE the change (the code's Old), as a JSON object. Omit = empty (an insert).") - old_record: Optional[str] = None - """ - The sample record BEFORE the change (the code's Old), as a JSON object. Omit = empty (an insert). - """ - - - # @ApiMember(Description="What the code sees as Event.Kind: Inserted, Updated, Deleted or Other. Omit = Updated when both records are given, Inserted when only newRecord, Deleted when only oldRecord.") - event_kind: Optional[str] = None - """ - What the code sees as Event.Kind: Inserted, Updated, Deleted or Other. Omit = Updated when both records are given, Inserted when only newRecord, Deleted when only oldRecord. - """ - - - # @ApiMember(Description="What the code sees as Event.Name, e.g. database.record.updated. Optional.") - event_name: Optional[str] = None - """ - What the code sees as Event.Name, e.g. database.record.updated. Optional. - """ - - -# @Route("/{version}/account/profile", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountProfile(RequestBase, IReturn[GetAccountProfileResponse]): - pass - - -# @Route("/{version}/account/profile", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateAccountProfile(RequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Account owner's display name.", IsRequired=true) - display_name: Optional[str] = None - """ - Account owner's display name. - """ - - - # @ApiMember(Description="Email address used for billing communications.") - billing_email: Optional[str] = None - """ - Email address used for billing communications. - """ - - - # @ApiMember(Description="Email address used for operations communications.") - operations_email: Optional[str] = None - """ - Email address used for operations communications. - """ - - - # @ApiMember(Description="Email address used for security-related communications.") - security_email: Optional[str] = None - """ - Email address used for security-related communications. - """ - - -# @Route("/{version}/account/verify/resend", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ResendAccountVerificationToken(RequestBase, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/account/status", "GET") -# @Api(Description="Get Account Status.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountStatus(RequestBase, IReturn[GetAccountStatusResponse]): - """ - Get Account Status. - """ - - pass - - -# @Route("/{version}/account/stripe/create-checkout-session", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateStripeCheckoutSession(RequestBase, IReturn[CreateStripeCheckoutSessionResponse]): - subscription_type: Optional[SubscriptionType] = None - domain: Optional[str] = None - project_cap: int = 0 - new_project_session_id: Optional[str] = None - return_url: Optional[str] = None - - -# @Route("/{version}/account/stripe/get-portal-url", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetStripeBillingPortalUrl(RequestBase, IReturn[GetStripeBillingPortalUrlResponse]): - # @ApiMember(Description="Which subscription (e.g. main account plan) to open the billing portal for.") - subscription_type: Optional[SubscriptionType] = None - """ - Which subscription (e.g. main account plan) to open the billing portal for. - """ - - - # @ApiMember(Description="URL to return to after the customer leaves the billing portal.") - return_url: Optional[str] = None - """ - URL to return to after the customer leaves the billing portal. - """ - - -# @Route("/{version}/account/team/member", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateTeamMemberFromInvitation(RequestBase, IReturn[CreateTeamMemberFromInvitationResponse]): - # @ApiMember(DataType="string", Description="Display name of the account holder", IsRequired=true, Name="DisplayName", ParameterType="form") - display_name: Optional[str] = None - """ - Display name of the account holder - """ - - - # @ApiMember(DataType="string", Description="Token from invitation email", IsRequired=true, Name="Token", ParameterType="form") - token: Optional[str] = None - """ - Token from invitation email - """ - - - # @ApiMember(DataType="string", Description="Set password for a new account", Format="password", IsRequired=true, Name="Password", ParameterType="form") - password: Optional[str] = None - """ - Set password for a new account - """ - - -# @Route("/{version}/account/usage-billing", "GET") -# @Api(Description="Get Account Usage Billing.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountUsageBilling(RequestBase, IReturn[GetAccountUsageBillingResponse]): - """ - Get Account Usage Billing. - """ - - pass - - -# @Route("/{version}/account/verify", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class VerifyAccount(RequestBase, IReturn[EmptyResponse], IHasAccountId): - token: Optional[str] = None - account_id: Optional[str] = None - - -# @Route("/{version}/account/projects/{projectId}/notifications/settings/group", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteNotificationsGroup(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Tag identifying the notification group to remove.", IsRequired=true) - group_tag: Optional[str] = None - """ - Tag identifying the notification group to remove. - """ - - -# @Route("/{version}/account/projects/{projectId}/notifications/settings/tag", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteNotificationsTag(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Tag identifying the notification tag to delete.", IsRequired=true) - tag: Optional[str] = None - """ - Tag identifying the notification tag to delete. - """ - - -# @Route("/{version}/account/projects/{projectId}/notifications/settings/group/tag", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RemoveTagFromNotificationsGroup(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Tag identifying the notification group.", IsRequired=true) - group_tag: Optional[str] = None - """ - Tag identifying the notification group. - """ - - - # @ApiMember(Description="Tag identifying the notification tag to remove from the group.", IsRequired=true) - tag: Optional[str] = None - """ - Tag identifying the notification tag to remove from the group. - """ - - -# @Route("/{version}/account/projects/{projectId}/notifications/settings/group", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveNotificationsGroup(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The group's tag and translations to save. The tag identifies the group; translations provide its display name per locale.", IsRequired=true) - group_definition: Optional[GroupDefinitionDto] = None - """ - The group's tag and translations to save. The tag identifies the group; translations provide its display name per locale. - """ - - - # @ApiMember(Description="Communication channel (e.g. Email, Push) this group belongs to.") - channel: Optional[CommunicationChannel] = None - """ - Communication channel (e.g. Email, Push) this group belongs to. - """ - - - # @ApiMember(Description="If moving the group to a different channel, the channel it currently belongs to.") - origin_channel: Optional[CommunicationChannel] = None - """ - If moving the group to a different channel, the channel it currently belongs to. - """ - - -# @Route("/{version}/account/projects/{projectId}/notifications/settings/tag", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveNotificationsTag(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The tag's identifier, translations, and default per-delivery-channel enabled/disabled settings.", IsRequired=true) - tag_definition: Optional[TagDefinitionDto] = None - """ - The tag's identifier, translations, and default per-delivery-channel enabled/disabled settings. - """ - - - # @ApiMember(Description="Communication channel (e.g. Email, Push) this tag belongs to.") - channel: Optional[CommunicationChannel] = None - """ - Communication channel (e.g. Email, Push) this tag belongs to. - """ - - - # @ApiMember(Description="Tag of the group this notification tag should be placed under, if any.") - group_tag: Optional[str] = None - """ - Tag of the group this notification tag should be placed under, if any. - """ - - -# @Route("/{version}/account/projects", "POST") -# @Api(Description="Create a new backend project.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateProjectRequest(RequestBase, IReturn[IdResponse]): - """ - Create a new backend project. - """ - - integration: Optional[DatabaseIntegrationRequest] = None - # @ApiMember(Description="Project name, unique per account.") - project_name: Optional[str] = None - """ - Project name, unique per account. - """ - - - # @ApiMember(Description="Region code for the primary region, e.g. 'nb-eu-germany'. Use a code from get_account_regions.") - primary_region: Optional[str] = None - """ - Region code for the primary region, e.g. 'nb-eu-germany'. Use a code from get_account_regions. - """ - - - additional_regions: Optional[List[str]] = None - description: Optional[str] = None - - -# @Route("/{version}/account/projects/{projectId}", "DELETE") -# @Api(Description="Deletes project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteProject(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Deletes project - """ - - pass - - -# @Route("/{version}/account/projects/environments", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateProjectEnvironmentRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Name for the new environment (e.g. 'TEST', 'STAGING'). A-Z/0-9/space, up to 15 chars, cannot be PROD.", IsRequired=true) - environment_name: Optional[str] = None - """ - Name for the new environment (e.g. 'TEST', 'STAGING'). A-Z/0-9/space, up to 15 chars, cannot be PROD. - """ - - - integration: Optional[DatabaseIntegrationRequest] = None - - -# @Route("/{version}/account/projects/environments/{environmentName}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteProjectEnvironmentRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Name of the environment to delete (from get_project_environments), e.g. 'TEST'. PROD is rejected.", IsRequired=true) - environment_name: Optional[str] = None - """ - Name of the environment to delete (from get_project_environments), e.g. 'TEST'. PROD is rejected. - """ - - -# @Route("/{version}/account/projects/environments/{environmentName}/rank", "PATCH") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetEnvironmentRankRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Name of the environment to re-rank (from get_project_environments).", IsRequired=true) - environment_name: Optional[str] = None - """ - Name of the environment to re-rank (from get_project_environments). - """ - - - # @ApiMember(Description="New promotion-ladder rank. Out-of-range values are clamped and ranks re-normalized.") - rank: int = 0 - """ - New promotion-ladder rank. Out-of-range values are clamped and ranks re-normalized. - """ - - -# @Route("/{version}/account/projects/environments/promote", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PromoteEnvironmentRequest(CodeMashRequestBase, IReturn[PromoteEnvironmentResponse]): - # @ApiMember(Description="Environment to promote FROM (source of truth for this promotion).", IsRequired=true) - source_env: Optional[str] = None - """ - Environment to promote FROM (source of truth for this promotion). - """ - - - # @ApiMember(Description="Environment to promote INTO. Must be higher on the promotion ladder than SourceEnv.", IsRequired=true) - target_env: Optional[str] = None - """ - Environment to promote INTO. Must be higher on the promotion ladder than SourceEnv. - """ - - - # @ApiMember(Description="When true, only returns the promotion plan (including deletions) without applying it or copying secrets. Use this to preview before a real run.") - dry_run: bool = False - """ - When true, only returns the promotion plan (including deletions) without applying it or copying secrets. Use this to preview before a real run. - """ - - -# @Route("/{version}/account/projects/environments/promote/rollback", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RollbackPromotionRequest(CodeMashRequestBase, IReturn[PromoteEnvironmentResponse]): - # @ApiMember(Description="Environment whose content should be rolled back.", IsRequired=true) - target_env: Optional[str] = None - """ - Environment whose content should be rolled back. - """ - - - # @ApiMember(Description="The fromVersion anchor returned by the promote_environment call being rolled back.", IsRequired=true) - from_version: int = 0 - """ - The fromVersion anchor returned by the promote_environment call being rolled back. - """ - - -# @Route("/{version}/account/projects/environments", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectEnvironments(CodeMashRequestBase, IReturn[GetProjectEnvironmentsResponse]): - pass - - -# @Route("/{version}/account/projects/{projectId}", "GET") -# @Api(Description="Gets project info.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProject(CodeMashRequestBase, IReturn[GetProjectResponse]): - """ - Gets project info. - """ - - pass - - -# @Route("/{version}/account/projects", "GET") -# @Api(Description="Retrieve projects list.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjects(RequestBase, IReturn[GetProjectsResponse]): - """ - Retrieve projects list. - """ - - pass - - -# @Route("/{version}/account/regions", "GET") -# @Api(Description="Get available project regions.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountRegions(RequestBase, IReturn[GetAccountRegionsResponse]): - """ - Get available project regions. - """ - - pass - - -# @Route("/{version}/account/projects/{projectId}/wait-active", "GET") -# @Api(Description="Waits (bounded, server-side) for a project to finish provisioning and become active.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class WaitForProjectActiveRequest(CodeMashRequestBase, IReturn[WaitForProjectActiveResponse]): - """ - Waits (bounded, server-side) for a project to finish provisioning and become active. - """ - - # @ApiMember(Description="Max seconds to wait before returning 'not active yet' (default 30, capped at 90).") - timeout_seconds: Optional[int] = None - """ - Max seconds to wait before returning 'not active yet' (default 30, capped at 90). - """ - - -# @Route("/{version}/account/projects/{projectId}/tokens", "GET") -# @Api(Description="Gets project tokens.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectTokens(CodeMashRequestBase, IReturn[GetProjectTokensResponse]): - """ - Gets project tokens. - """ - - initiator_id: Optional[str] = None - recipient_id: Optional[str] = None - target_user_id: Optional[str] = None - membership_trigger_old_user_id: Optional[str] = None - membership_trigger_new_user_id: Optional[str] = None - - -# @Route("/{version}/account/projects/{projectId}/admin-portal/enabled", "PUT") -# @Api(Description="Turns the project's managed Admin Portal on or off") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetAdminPortalEnabledRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Turns the project's managed Admin Portal on or off - """ - - # @ApiMember(Description="true turns the managed Admin Portal on; false turns it off.", IsRequired=true) - enabled: bool = False - """ - true turns the managed Admin Portal on; false turns it off. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/brand/expose", "PATCH") -# @Api(Description="Sets whether the project's brand is returned by the public Admin Portal config") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectExposeBrand(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Sets whether the project's brand is returned by the public Admin Portal config - """ - - # @ApiMember(Description="True to return the brand in the public Admin Portal config, false to hide it.") - exposed: bool = False - """ - True to return the brand in the public Admin Portal config, false to hide it. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/auth/expose", "PATCH") -# @Api(Description="Sets whether the project's sign-in methods and password policy are returned by the public Admin Portal config") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectExposeAuth(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Sets whether the project's sign-in methods and password policy are returned by the public Admin Portal config - """ - - # @ApiMember(Description="True to return sign-in methods and password policy in the public Admin Portal config, false to hide them.") - exposed: bool = False - """ - True to return sign-in methods and password policy in the public Admin Portal config, false to hide them. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/admin-portal/service-user", "PUT") -# @Api(Description="Assigns the project's Admin Portal service user") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AssignAdminPortalServiceUserRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Assigns the project's Admin Portal service user - """ - - # @ApiMember(Description="Id of the existing AuthType.Service user to assign as the project's Admin Portal service user.", IsRequired=true) - service_user_id: Optional[str] = None - """ - Id of the existing AuthType.Service user to assign as the project's Admin Portal service user. - """ - - -# @Route("/{version}/account/projects/{projectId}/admin-portal/structure", "GET") -# @Api(Description="Reads the Admin Portal layout/structure (service user only)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAdminPortalStructure(CodeMashRequestBase, IReturn[AdminPortalStructureDto]): - """ - Reads the Admin Portal layout/structure (service user only) - """ - - pass - - -# @Route("/{version}/account/projects/{projectId}/settings/admin-url", "PATCH") -# @Api(Description="Updates the project's admin-portal URL override") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectAdminUrl(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates the project's admin-portal URL override - """ - - # @ApiMember(Description="Custom admin-portal URL to use instead of the canonical address. Null/empty restores the canonical pr-{project hex}.admin.{host} address.") - url: Optional[str] = None - """ - Custom admin-portal URL to use instead of the canonical address. Null/empty restores the canonical pr-{project hex}.admin.{host} address. - """ - - -# @Route("/{version}/account/projects/{projectId}/ai/credits/checkout", "POST") -# @Api(Description="Creates a Stripe Checkout session for one AI credit pack of the project and returns its URL") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateAiCreditPackCheckoutRequest(CodeMashRequestBase, IReturn[CreateAiCreditPackCheckoutResponse]): - """ - Creates a Stripe Checkout session for one AI credit pack of the project and returns its URL - """ - - # @ApiMember(Description="The pack to buy: pack-10 (€10 = 1 000 credits), pack-50 (€50 = 5 000), pack-200 (€200 = 20 000). Net prices; 1 credit = €0.01.", IsRequired=true) - pack: Optional[str] = None - """ - The pack to buy: pack-10 (€10 = 1 000 credits), pack-50 (€50 = 5 000), pack-200 (€200 = 20 000). Net prices; 1 credit = €0.01. - """ - - - # @ApiMember(Description="Dashboard path the browser returns to after Stripe (aiCredits=paid or aiCredits=cancelled is added). Default: the dashboard root.") - return_url: Optional[str] = None - """ - Dashboard path the browser returns to after Stripe (aiCredits=paid or aiCredits=cancelled is added). Default: the dashboard root. - """ - - -# @Route("/{version}/account/projects/{projectId}/ai/plans", "GET") -# @Api(Description="Reads the project's end-user AI plans, the role → plan map and the default plan") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectAiPlans(CodeMashRequestBase, IReturn[GetProjectAiPlansResponse]): - """ - Reads the project's end-user AI plans, the role → plan map and the default plan - """ - - pass - - -# @Route("/{version}/account/projects/{projectId}/ai/plans", "PUT") -# @Api(Description="Saves the project's end-user AI plans (the whole list)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectAiPlans(CodeMashRequestBase, IReturn[UpdateProjectAiPlansResponse]): - """ - Saves the project's end-user AI plans (the whole list) - """ - - # @ApiMember(Description="The complete list of plans (full replace).") - plans: Optional[List[AiPlanDto]] = None - """ - The complete list of plans (full replace). - """ - - -# @Route("/{version}/account/projects/{projectId}/ai/plans/assignments", "PUT") -# @Api(Description="Saves which end-user AI plan each project role gets, and the default plan") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectAiPlanAssignments(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Saves which end-user AI plan each project role gets, and the default plan - """ - - # @ApiMember(Description="Role → plan rows, in order; the first row whose role the user has wins.") - roles: Optional[List[AiPlanRoleAssignmentDto]] = None - """ - Role → plan rows, in order; the first row whose role the user has wins. - """ - - - # @ApiMember(Description="Plan id (aip_…) of users with no per-user plan and no mapped role. Empty = no default.") - default_plan_id: Optional[str] = None - """ - Plan id (aip_…) of users with no per-user plan and no mapped role. Empty = no default. - """ - - -# @Route("/{version}/account/projects/{projectId}/ai/plans/users", "GET") -# @Api(Description="Lists the users that have their own end-user AI plan") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectAiUserPlans(CodeMashRequestBase, IReturn[GetProjectAiUserPlansResponse]): - """ - Lists the users that have their own end-user AI plan - """ - - pass - - -# @Route("/{version}/account/projects/{projectId}/ai/settings", "GET") -# @Api(Description="Reads the project's AI chat settings for end users: on/off, default LLM and assistants") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectAiSettings(CodeMashRequestBase, IReturn[GetProjectAiSettingsResponse]): - """ - Reads the project's AI chat settings for end users: on/off, default LLM and assistants - """ - - pass - - -# @Route("/{version}/account/projects/{projectId}/ai/settings", "PUT") -# @Api(Description="Saves the project's AI chat settings: on/off and the default LLM") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectAiSettings(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Saves the project's AI chat settings: on/off and the default LLM - """ - - # @ApiMember(Description="True to show end-user AI chat in the Admin Portal, false to hide it.") - enabled: bool = False - """ - True to show end-user AI chat in the Admin Portal, false to hide it. - """ - - - # @ApiMember(Description="Default LLM integration id (int_…) for assistants without their own. Empty clears it.") - default_llm_integration_id: Optional[str] = None - """ - Default LLM integration id (int_…) for assistants without their own. Empty clears it. - """ - - - # @ApiMember(Description="Model of the default LLM. Empty = the integration's default model.") - default_model: Optional[str] = None - """ - Model of the default LLM. Empty = the integration's default model. - """ - - -# @Route("/{version}/account/projects/{projectId}/ai/knowledge", "PUT") -# @Api(Description="Saves the project's AI knowledge switches: embed uploaded files") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectAiKnowledge(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Saves the project's AI knowledge switches: embed uploaded files - """ - - # @ApiMember(Description="True to put uploaded text files into the project's AI knowledge, false to stop.") - embed_files: bool = False - """ - True to put uploaded text files into the project's AI knowledge, false to stop. - """ - - -# @Route("/{version}/account/projects/{projectId}/ai/assistants", "POST") -# @Api(Description="Adds an end-user AI assistant to the project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateProjectAiAssistant(ProjectAiAssistantRequestBase, IReturn[IdResponse]): - """ - Adds an end-user AI assistant to the project - """ - - pass - - -# @Route("/{version}/account/projects/{projectId}/ai/assistants/{assistantId}", "PUT") -# @Api(Description="Updates an end-user AI assistant of the project (full replace)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectAiAssistant(ProjectAiAssistantRequestBase, IReturn[EmptyResponse]): - """ - Updates an end-user AI assistant of the project (full replace) - """ - - # @ApiMember(Description="Id of the assistant (ast_…).", IsRequired=true) - assistant_id: Optional[str] = None - """ - Id of the assistant (ast_…). - """ - - -# @Route("/{version}/account/projects/{projectId}/ai/assistants/{assistantId}", "DELETE") -# @Api(Description="Removes an end-user AI assistant from the project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteProjectAiAssistant(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Removes an end-user AI assistant from the project - """ - - # @ApiMember(Description="Id of the assistant (ast_…).", IsRequired=true) - assistant_id: Optional[str] = None - """ - Id of the assistant (ast_…). - """ - - -# @Route("/{version}/account/projects/{projectId}/ai/usage", "GET") -# @Api(Description="Reads the project's AI usage this month: totals, per assistant, top users, per model, and the credit wallet") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectAiUsage(CodeMashRequestBase, IReturn[GetProjectAiUsageResponse]): - """ - Reads the project's AI usage this month: totals, per assistant, top users, per model, and the credit wallet - """ - - # @ApiMember(Description="How many users to list, biggest first. 1–100, default 10.") - top: Optional[int] = None - """ - How many users to list, biggest first. 1–100, default 10. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/accent-color", "PATCH") -# @Api(Description="Updates project accent color") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectAccentColor(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates project accent color - """ - - # @ApiMember(Description="Hex color code, e.g. '#FF6D00'.", IsRequired=true) - color: Optional[str] = None - """ - Hex color code, e.g. '#FF6D00'. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/icon", "PATCH") -# @Api(Description="Updates project icon") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectIcon(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates project icon - """ - - file_resource: Optional[FileResourceRefDto] = None - - -# @Route("/{version}/account/projects/{projectId}/settings/logo", "PATCH") -# @Api(Description="Updates project logo") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectLogo(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates project logo - """ - - file_resource: Optional[FileResourceRefDto] = None - - -# @Route("/{version}/account/projects/{projectId}/settings/main-color", "PATCH") -# @Api(Description="Updates project main color") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectMainColor(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates project main color - """ - - # @ApiMember(Description="Hex color code, e.g. '#1A73E8'.", IsRequired=true) - color: Optional[str] = None - """ - Hex color code, e.g. '#1A73E8'. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/origins", "PATCH") -# @Api(Description="Updates project CORS settings") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectAllowedOrigins(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates project CORS settings - """ - - # @ApiMember(Description="The complete new list of allowed origin URLs, e.g. [\"https://app.example.com\", \"https://example.com\"]. An entry with no scheme (e.g. \"example.com\") defaults to https. Whatever is not in this list stops being allowed.") - origins: Optional[List[str]] = None - """ - The complete new list of allowed origin URLs, e.g. ["https://app.example.com", "https://example.com"]. An entry with no scheme (e.g. "example.com") defaults to https. Whatever is not in this list stops being allowed. - """ - - - # @ApiMember(Description="Optional. true removes the project's own Admin Portal origin (pr-{project hex}.{admin host}) on purpose. Without it, a list that drops that origin is rejected with CM-ERRORS-PROJECTS-037, because the Norbix-generated end-user portal could no longer call the project's API.") - remove_admin_portal_origin: Optional[bool] = None - """ - Optional. true removes the project's own Admin Portal origin (pr-{project hex}.{admin host}) on purpose. Without it, a list that drops that origin is rejected with CM-ERRORS-PROJECTS-037, because the Norbix-generated end-user portal could no longer call the project's API. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/default-language", "PATCH") -# @Api(Description="Update project default language") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectDefaultLanguage(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Update project default language - """ - - # @ApiMember(Description="Language code, e.g. 'en' or 'de'.", IsRequired=true) - default_language: Optional[str] = None - """ - Language code, e.g. 'en' or 'de'. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/description", "PATCH") -# @Api(Description="Updates project description") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectDescription(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates project description - """ - - # @ApiMember(Description="The new description text. Omit (null) to clear the description.") - description: Optional[str] = None - """ - The new description text. Omit (null) to clear the description. - """ - - -# @Route("/{version}/account/projects/{projectId}/disable", "PATCH") -# @Api(Description="Disables project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableProject(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disables project - """ - - pass - - -# @Route("/{version}/account/projects/{projectId}/enable", "PATCH") -# @Api(Description="Enables project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableProject(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enables project - """ - - pass - - -# @Route("/{version}/account/projects/{projectId}/settings/languages", "PATCH") -# @Api(Description="Updates project languages") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectLanguages(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates project languages - """ - - # @ApiMember(Description="The complete new list of language codes, e.g. [\"en\", \"de\", \"lt\"].", IsRequired=true) - languages: List[str] = field(default_factory=list) - """ - The complete new list of language codes, e.g. ["en", "de", "lt"]. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/languages/check", "POST") -# @Api(Description="Checks which templates miss a (proposed) project language") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CheckProjectLanguages(CodeMashRequestBase, IReturn[CheckProjectLanguagesResponse]): - """ - Checks which templates miss a (proposed) project language - """ - - # @ApiMember(Description="Proposed default language code. Omit to use the current one.") - default_language: Optional[str] = None - """ - Proposed default language code. Omit to use the current one. - """ - - - # @ApiMember(Description="Proposed complete language list. Omit to use the current one.") - languages: Optional[List[str]] = None - """ - Proposed complete language list. Omit to use the current one. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/legal", "PATCH") -# @Api(Description="Updates the project's public legal documents (Terms & Conditions, Privacy Policy)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectLegalDocuments(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates the project's public legal documents (Terms & Conditions, Privacy Policy) - """ - - # @ApiMember(Description="Terms & Conditions document, Markdown. Null/empty clears it.") - terms_markdown: Optional[str] = None - """ - Terms & Conditions document, Markdown. Null/empty clears it. - """ - - - # @ApiMember(Description="Privacy Policy document, Markdown. Null/empty clears it.") - privacy_markdown: Optional[str] = None - """ - Privacy Policy document, Markdown. Null/empty clears it. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/legal/expose", "PATCH") -# @Api(Description="Sets whether the project's legal documents are publicly readable via the Admin Portal") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectExposeLegal(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Sets whether the project's legal documents are publicly readable via the Admin Portal - """ - - # @ApiMember(Description="True to make the legal documents publicly readable via the Admin Portal, false to hide them.") - exposed: bool = False - """ - True to make the legal documents publicly readable via the Admin Portal, false to hide them. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/url", "PATCH") -# @Api(Description="Updates project marketing url") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectUrl(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates project marketing url - """ - - # @ApiMember(Description="The marketing site URL, e.g. 'https://example.com'. Omit (null) to clear.") - url: Optional[str] = None - """ - The marketing site URL, e.g. 'https://example.com'. Omit (null) to clear. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/name", "PATCH") -# @Api(Description="Updates project name") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectName(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates project name - """ - - # @ApiMember(Description="The new project name, unique per account.", IsRequired=true) - name: Optional[str] = None - """ - The new project name, unique per account. - """ - - -# @Route("/{version}/account/projects/{projectId}/settings/regions", "PATCH") -# @Api(Description="Updates project regions") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateProjectRegions(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates project regions - """ - - # @ApiMember(Description="Primary region code, e.g. 'nb-eu-germany'. Immutable once set — omit to keep the current one; only set it on a project that has none.") - primary_region: Optional[str] = None - """ - Primary region code, e.g. 'nb-eu-germany'. Immutable once set — omit to keep the current one; only set it on a project that has none. - """ - - - # @ApiMember(Description="The complete new list of additional region codes (full replacement). A region that still hosts a provisioned database cluster cannot be removed.") - additional_regions: Optional[List[str]] = None - """ - The complete new list of additional region codes (full replacement). A region that still hosts a provisioned database cluster cannot be removed. - """ - - -# @Route("/{version}/account", "POST") -# @Api(Description="This API endpoint allows users to create a new CodeMash account.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateAccount(RequestBase, IReturn[CreateAccountResponse]): - """ - This API endpoint allows users to create a new CodeMash account. - """ - - # @ApiMember(DataType="string", Description="Display name of the account holder", IsRequired=true, Name="DisplayName", ParameterType="form") - display_name: Optional[str] = None - """ - Display name of the account holder - """ - - - # @ApiMember(DataType="string", Description="Real email of account holder", IsRequired=true, Name="Email", ParameterType="form") - email: Optional[str] = None - """ - Real email of account holder - """ - - - # @ApiMember(DataType="string", Description="Set password for a new account", Format="password", IsRequired=true, Name="Password", ParameterType="form") - password: Optional[str] = None - """ - Set password for a new account - """ - - -# @Route("/{version}/account/team/member/password", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChangeTeamMemberPassword(RequestBase, IReturn[IdResponse]): - email: Optional[str] = None - current_password: Optional[str] = None - new_password: Optional[str] = None - - -# @Route("/{version}/account/team/member/create", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateTeamMember(RequestBase, IReturn[IdResponse]): - email: Optional[str] = None - display_name: Optional[str] = None - password: Optional[str] = None - roles: Optional[List[str]] = None - send_invitation: bool = False - - -# @Route("/{version}/account/team/policies", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateAccountPolicy(RequestBase, IReturn[IdResponse]): - # @ApiMember(Description="Name for the new custom account policy.", IsRequired=true) - policy_name: Optional[str] = None - """ - Name for the new custom account policy. - """ - - - # @ApiMember(Description="Optional human-readable description of the policy's purpose.") - description: Optional[str] = None - """ - Optional human-readable description of the policy's purpose. - """ - - - # @ApiMember(Description="Raw JSON policy document, AWS-IAM style (Statement array of Effect/Action/Resource entries), matching PolicyDocument.schema.json. This defines which permissions the policy grants.") - policy_document_json: Optional[str] = None - """ - Raw JSON policy document, AWS-IAM style (Statement array of Effect/Action/Resource entries), matching PolicyDocument.schema.json. This defines which permissions the policy grants. - """ - - -# @Route("/{version}/account/team/roles", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateAccountRole(RequestBase, IReturn[IdResponse]): - # @ApiMember(Description="Name for the new custom account team role.", IsRequired=true) - role_name: Optional[str] = None - """ - Name for the new custom account team role. - """ - - - # @ApiMember(Description="Optional human-readable description of the role's purpose.") - description: Optional[str] = None - """ - Optional human-readable description of the role's purpose. - """ - - - # @ApiMember(Description="Public policy ids (from get_account_team_policies) to attach to this role.") - policies: Optional[List[str]] = None - """ - Public policy ids (from get_account_team_policies) to attach to this role. - """ - - -# @Route("/{version}/account/team/policies/{Id}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteAccountPolicy(RequestBase, IReturn[IdResponse]): - # @ApiMember(Description="Public policy id (from get_account_team_policies) to delete.", IsRequired=true) - id: Optional[str] = None - """ - Public policy id (from get_account_team_policies) to delete. - """ - - -# @Route("/{version}/account/team/roles/{Id}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteAccountRole(RequestBase, IReturn[IdResponse]): - # @ApiMember(Description="Role template id (from get_account_team_roles) to delete.", IsRequired=true) - id: Optional[str] = None - """ - Role template id (from get_account_team_roles) to delete. - """ - - -# @Route("/{version}/account/collaborators", "GET") -# @Api(Description="Gets account team members (collaborators)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountCollaborators(RequestBase, IReturn[GetAccountCollaboratorsResponse]): - """ - Gets account team members (collaborators) - """ - - # @ApiMember(Description="Set true to also include the account owner in the list.") - include_account_owner: bool = False - """ - Set true to also include the account owner in the list. - """ - - - # @ApiMember(Description="Set true to only return members that have a registered push device.") - user_should_have_push_device: bool = False - """ - Set true to only return members that have a registered push device. - """ - - - # @ApiMember(Description="Optional project id — only members with access to that project.") - project_id: Optional[str] = None - """ - Optional project id — only members with access to that project. - """ - - - # @ApiMember(Description="Optional filter: only these user ids.") - user_ids: Optional[List[str]] = None - """ - Optional filter: only these user ids. - """ - - - # @ApiMember(Description="Optional filter: only members having one of these role names.") - role_names: Optional[List[str]] = None - """ - Optional filter: only members having one of these role names. - """ - - - # @ApiMember(DataType="string", Description="Cursor token — fetch the page AFTER this member (the list's startingAfter).", Name="startingAfter", ParameterType="query") - starting_after: Optional[str] = None - """ - Cursor token — fetch the page AFTER this member (the list's startingAfter). - """ - - - # @ApiMember(DataType="string", Description="Cursor token — fetch the page BEFORE this member.", Name="endingBefore", ParameterType="query") - ending_before: Optional[str] = None - """ - Cursor token — fetch the page BEFORE this member. - """ - - - # @ApiMember(DataType="integer", Description="Members per page (default 20).", Format="int32", Name="pageSize", ParameterType="query") - page_size: Optional[int] = None - """ - Members per page (default 20). - """ - - -# @Route("/{version}/account/team/password-policy", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountPasswordPolicy(RequestBase, IReturn[GetAccountPasswordPolicyResponse]): - pass - - -# @Route("/{version}/account/team/policies", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountTeamPolicies(RequestBase, IReturn[GetAccountTeamPoliciesResponse]): - pass - - -# @Route("/{version}/account/team/roles", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountTeamRoles(RequestBase, IReturn[GetAccountTeamRolesResponse]): - pass - - -# @Route("/{version}/account/team/member/invite", "POST") -# @Api(Description="Send invite to team member") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SendInviteToTeamMember(RequestBase, IReturn[EmptyResponse]): - """ - Send invite to team member - """ - - # @ApiMember(Description="Email address the invitation is sent to.", IsRequired=true) - email: Optional[str] = None - """ - Email address the invitation is sent to. - """ - - - # @ApiMember(Description="Account role ids (GUIDs from get_account_team_roles) the member gets on accepting. Omit for the default member role.") - roles: Optional[List[str]] = None - """ - Account role ids (GUIDs from get_account_team_roles) the member gets on accepting. Omit for the default member role. - """ - - -# @Route("/{version}/account/team/policies", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateAccountPolicy(RequestBase, IReturn[IdResponse]): - # @ApiMember(Description="Public policy id (from get_account_team_policies) to update.", IsRequired=true) - id: Optional[str] = None - """ - Public policy id (from get_account_team_policies) to update. - """ - - - # @ApiMember(Description="New name for the policy.", IsRequired=true) - policy_name: Optional[str] = None - """ - New name for the policy. - """ - - - # @ApiMember(Description="Optional human-readable description of the policy's purpose.") - description: Optional[str] = None - """ - Optional human-readable description of the policy's purpose. - """ - - - # @ApiMember(Description="Raw JSON policy document, AWS-IAM style (Statement array of Effect/Action/Resource entries) — replaces the policy's current statement set.") - policy_document_json: Optional[str] = None - """ - Raw JSON policy document, AWS-IAM style (Statement array of Effect/Action/Resource entries) — replaces the policy's current statement set. - """ - - -# @Route("/{version}/account/team/roles", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateAccountRole(RequestBase, IReturn[IdResponse]): - # @ApiMember(Description="Role template id (from get_account_team_roles) to update.", IsRequired=true) - id: Optional[str] = None - """ - Role template id (from get_account_team_roles) to update. - """ - - - # @ApiMember(Description="New name for the role.", IsRequired=true) - role_name: Optional[str] = None - """ - New name for the role. - """ - - - # @ApiMember(Description="Optional human-readable description of the role's purpose.") - description: Optional[str] = None - """ - Optional human-readable description of the role's purpose. - """ - - - # @ApiMember(Description="Public policy ids (from get_account_team_policies) to attach — replaces the current set.") - policies: Optional[List[str]] = None - """ - Public policy ids (from get_account_team_policies) to attach — replaces the current set. - """ - - -# @Route("/{version}/account/userauth/has-passkey", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountHasPasskeyRequest(RequestBase, IReturn[AccountPasskeyOkResponse]): - email: Optional[str] = None - - -# @Route("/{version}/account/userauth/email/start-verification", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountStartEmailVerificationRequest(RequestBase, IReturn[AccountPasskeyOkResponse]): - email: Optional[str] = None - - -# @Route("/{version}/account/userauth/email/confirm-verification", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountConfirmEmailVerificationRequest(RequestBase, IReturn[AccountPasskeyVerificationTokenResponse]): - email: Optional[str] = None - code: Optional[str] = None - - -# @Route("/{version}/account/userauth/passkey/registration-options", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasskeyRegistrationOptionsRequest(RequestBase, IReturn[AccountPasskeyCeremonyOptionsResponse]): - verification_token: Optional[str] = None - - -# @Route("/{version}/account/userauth/passkey/verify-registration", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountVerifyPasskeyRegistrationRequest(RequestBase, IReturn[AccountPasskeyAuthTokensResponse]): - verification_token: Optional[str] = None - ceremony_id: Optional[str] = None - attestation_response: Optional[str] = None - friendly_name: Optional[str] = None - - -# @Route("/{version}/account/userauth/passkey/authentication-options", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasskeyAuthenticationOptionsRequest(RequestBase, IReturn[AccountPasskeyCeremonyOptionsResponse]): - email: Optional[str] = None - - -# @Route("/{version}/account/userauth/passkey/verify-authentication", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountVerifyPasskeyAuthenticationRequest(RequestBase, IReturn[AccountPasskeyAuthTokensResponse]): - ceremony_id: Optional[str] = None - assertion_response: Optional[str] = None - - -# @Route("/{version}/account/userauth/passkeys", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListAccountPasskeysRequest(RequestBase, IReturn[AccountPasskeyListResponse]): - pass - - -# @Route("/{version}/account/userauth/passkeys/{CredentialId}/rename", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RenameAccountPasskeyRequest(RequestBase, IReturn[AccountPasskeyOkResponse]): - credential_id: Optional[str] = None - friendly_name: Optional[str] = None - - -# @Route("/{version}/account/userauth/passkeys/{CredentialId}/revoke", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RevokeAccountPasskeyRequest(RequestBase, IReturn[AccountPasskeyOkResponse]): - credential_id: Optional[str] = None - - -# @Route("/{version}/account/userauth/passkey/enrollment-options", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountPasskeyEnrollmentOptionsRequest(RequestBase, IReturn[AccountPasskeyCeremonyOptionsResponse]): - pass - - -# @Route("/{version}/account/userauth/passkey/verify-enrollment", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AccountVerifyPasskeyEnrollmentRequest(RequestBase, IReturn[AccountPasskeyEnrollmentResponse]): - ceremony_id: Optional[str] = None - attestation_response: Optional[str] = None - friendly_name: Optional[str] = None - - -# @Route("/{version}/account/me", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMyAccountUserProfile(RequestBase, IReturn[GetMyAccountUserProfileResponse]): - pass - - -# @Route("/{version}/account/me/phone", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateMyAccountUserPhone(RequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Your phone number in E.164 format (+ and the country code, then digits, e.g. +37060000000). Empty clears it. Used by \"Account users\" SMS campaigns.") - phone: Optional[str] = None - """ - Your phone number in E.164 format (+ and the country code, then digits, e.g. +37060000000). Empty clears it. Used by "Account users" SMS campaigns. - """ - - -# @Route("/{version}/account/licensing/dns-status", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLicenseDomainDnsStatus(RequestBase, IReturn[GetLicenseDomainDnsStatusResponse]): - domain: Optional[str] = None - - -# @Route("/{version}/licensing/domain-verification/start", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StartLicenseDomainVerificationRequest(RequestBase, IReturn[StartLicenseDomainVerificationResponse]): - domain: Optional[str] = None - - -# @Route("/{version}/licensing/domain-verification/status", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLicenseDomainVerificationStatus(RequestBase, IReturn[GetLicenseDomainVerificationStatusResponse]): - domain: Optional[str] = None - - -# @Route("/{version}/account/licenses", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLicenses(RequestBase, IReturn[GetLicensesResponse]): - pass - - -# @Route("/{version}/licensing/heartbeat", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PostLicenseHeartbeat(RequestBase, IReturn[PostLicenseHeartbeatResponse]): - license: Optional[str] = None - license_account_id: Optional[str] = None - installation_id: Optional[str] = None - domain: Optional[str] = None - host_kind: Optional[str] = None - release: Optional[str] = None - instance_version: Optional[str] = None - - -# @Route("/{version}/account/licensing/status", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetInstallationLicenseStatus(RequestBase, IReturn[GetInstallationLicenseStatusResponse]): - pass - - -# @Route("/{version}/account/licenses/{Id}/key", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLicenseKey(RequestBase, IReturn[GetLicenseKeyResponse]): - id: Optional[str] = None - - -# @Route("/{version}/account/ai/service-users", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateAiServiceUserRequest(RequestBase, IReturn[CreateAiServiceUserResponse]): - # @ApiMember(Description="A name people recognise, e.g. \"Claude Code on my laptop\".", IsRequired=true) - name: Optional[str] = None - """ - A name people recognise, e.g. "Claude Code on my laptop". - """ - - - # @ApiMember(Description="Account role ids (acc_…_nr_…) to give, built-in or custom. At least one role in total (account or project).") - account_role_ids: Optional[List[str]] = None - """ - Account role ids (acc_…_nr_…) to give, built-in or custom. At least one role in total (account or project). - """ - - - # @ApiMember(Description="Project roles to give: [{ projectId, roleIds: [pr_…_nr_…] }]. Without an account role the service user is pinned to these projects.") - project_roles: Optional[List[AiProjectRoleIdsDto]] = None - """ - Project roles to give: [{ projectId, roleIds: [pr_…_nr_…] }]. Without an account role the service user is pinned to these projects. - """ - - -# @Route("/{version}/account/ai/service-users", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListAiServiceUsersRequest(RequestBase, IReturn[ListAiServiceUsersResponse]): - pass - - -# @Route("/{version}/account/ai/service-users/{Id}/keys", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RotateAiServiceUserKeyRequest(RequestBase, IReturn[RotateAiServiceUserKeyResponse]): - # @ApiMember(Description="The service user id (aisu_…).", IsRequired=true) - id: Optional[str] = None - """ - The service user id (aisu_…). - """ - - - # @ApiMember(Description="Optional key id (aisk_…) to revoke in the same change — a rotation.") - revoke_key_id: Optional[str] = None - """ - Optional key id (aisk_…) to revoke in the same change — a rotation. - """ - - -# @Route("/{version}/account/ai/service-users/{Id}/keys/{KeyId}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RevokeAiServiceUserKeyRequest(RequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The service user id (aisu_…).", IsRequired=true) - id: Optional[str] = None - """ - The service user id (aisu_…). - """ - - - # @ApiMember(Description="The key id (aisk_…) to revoke.", IsRequired=true) - key_id: Optional[str] = None - """ - The key id (aisk_…) to revoke. - """ - - -# @Route("/{version}/account/ai/service-users/{Id}", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateAiServiceUserRequest(RequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The service user id (aisu_…).", IsRequired=true) - id: Optional[str] = None - """ - The service user id (aisu_…). - """ - - - # @ApiMember(Description="The new name, unique in the account, e.g. \"Claude Code on my laptop\".", IsRequired=true) - name: Optional[str] = None - """ - The new name, unique in the account, e.g. "Claude Code on my laptop". - """ - - -# @Route("/{version}/account/ai/service-users/{Id}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteAiServiceUserRequest(RequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The service user id (aisu_…).", IsRequired=true) - id: Optional[str] = None - """ - The service user id (aisu_…). - """ - - -# @Route("/{version}/membership/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableMembership(CodeMashRequestBase, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/membership/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableMembership(CodeMashRequestBase, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/membership/users/import", "POST") -# @Api(Description="Import users with their existing password hashes") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ImportUsersRequest(CodeMashRequestBase, IReturn[ImportUsersResponse]): - """ - Import users with their existing password hashes - """ - - # @ApiMember(Description="True (default) = check every row and write nothing. False = write.") - dry_run: bool = False - """ - True (default) = check every row and write nothing. False = write. - """ - - - # @ApiMember(Description="True = do not add the project's default roles (as 'ignoreUserRegistersAsRole' on registration).") - ignore_default_roles: bool = False - """ - True = do not add the project's default roles (as 'ignoreUserRegistersAsRole' on registration). - """ - - - # @ApiMember(Description="The users to import, 1 to 1000 per request.", IsRequired=true) - users: List[ImportUserRowDto] = field(default_factory=list) - """ - The users to import, 1 to 1000 per request. - """ - - -# @Route("/{version}/membership/users/repair-logins", "POST") -# @Api(Description="Repair project logins stored without a project id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RepairLoginProjectIdsRequest(CodeMashRequestBase, IReturn[RepairLoginProjectIdsResponse]): - """ - Repair project logins stored without a project id - """ - - # @ApiMember(Description="True (default) = only count what would change. False = write.") - dry_run: bool = False - """ - True (default) = only count what would change. False = write. - """ - - -# @Route("/{version}/membership/users/{Id}/api-keys", "POST") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class IssueServiceUserApiKeyRequest(CodeMashRequestBase, IReturn[IssueServiceUserApiKeyResponse]): - """ - Membership - """ - - id: Optional[str] = None - database_integration_id: Optional[str] = None - name: Optional[str] = None - scopes: Optional[List[str]] = None - expires_in_days: Optional[int] = None - notes: Optional[str] = None - - -# @Route("/{version}/membership/users/{Id}/api-keys", "GET") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ListServiceUserApiKeysRequest(CodeMashRequestBase, IReturn[ListServiceUserApiKeysResponse]): - """ - Membership - """ - - # @ApiMember(Description="The service user's auth id.", IsRequired=true) - id: Optional[str] = None - """ - The service user's auth id. - """ - - -# @Route("/{version}/membership/users/{Id}/api-keys/{KeyId}", "DELETE") -# @Api(Description="Membership") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteServiceUserApiKeyRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Membership - """ - - # @ApiMember(Description="The service user's auth id.", IsRequired=true) - id: Optional[str] = None - """ - The service user's auth id. - """ - - - # @ApiMember(Description="The key id to delete, from list_service_user_api_keys.", IsRequired=true) - key_id: int = 0 - """ - The key id to delete, from list_service_user_api_keys. - """ - - -# @Route("/{version}/membership/triggers/{triggerId}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteMembershipTrigger(DeleteTrigger, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/membership/triggers/{triggerId}/disable", "PATCH") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableMembershipTrigger(DisableTrigger, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/membership/triggers/{triggerId}/enable", "PATCH") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableMembershipTrigger(EnableTrigger, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/membership/triggers/{id}", "GET") -# @Api(Description="Gets membership trigger by specified Id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMembershipTrigger(GetTrigger, IReturn[GetMembershipTriggerResponse]): - """ - Gets membership trigger by specified Id - """ - - pass - - -# @Route("/{version}/membership/triggers", "GET") -# @Api(Description="Gets membership triggers") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMembershipTriggers(GetTriggers, IReturn[GetMembershipTriggersResponse]): - """ - Gets membership triggers - """ - - pass - - -# @Route("/{version}/membership/triggers", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveMembershipTrigger(SaveTrigger, IReturn[IdResponse]): - pass - - -# @Route("/{version}/membership/roles", "POST") -# @Api(Description="Create a new custom role for project.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateRole(CodeMashRequestBase, IReturn[IdResponse]): - """ - Create a new custom role for project. - """ - - # @ApiMember(Description="Display name of the new role, unique within the project.", IsRequired=true) - role_name: Optional[str] = None - """ - Display name of the new role, unique within the project. - """ - - - description: Optional[str] = None - # @ApiMember(Description="Policy ids to attach. These are OPAQUE ids from get_policies (e.g. 'pol_3kJ9xJ2mQ0aBcDeFgHiJk') — NEVER invent them or guess from a policy name. Omit this to create a role with no policies and attach them later.") - policies: Optional[List[str]] = None - """ - Policy ids to attach. These are OPAQUE ids from get_policies (e.g. 'pol_3kJ9xJ2mQ0aBcDeFgHiJk') — NEVER invent them or guess from a policy name. Omit this to create a role with no policies and attach them later. - """ - - -# @Route("/{version}/membership/roles", "DELETE") -# @Api(Description="Deletes custom role from project.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteRole(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Deletes custom role from project. - """ - - # @ApiMember(Description="Id of the role to delete, from get_roles.", IsRequired=true) - id: Optional[str] = None - """ - Id of the role to delete, from get_roles. - """ - - -# @Route("/{version}/membership/roles/{Id}", "GET") -# @Api(Description="Gets project role details.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetRole(CodeMashRequestBase, IReturn[GetRoleResponse]): - """ - Gets project role details. - """ - - # @ApiMember(Description="Role id from get_roles.", IsRequired=true) - id: Optional[str] = None - """ - Role id from get_roles. - """ - - -# @Route("/{version}/membership/roles", "GET") -# @Api(Description="Gets project roles.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetRoles(CodeMashRequestBase, IReturn[GetRolesResponse]): - """ - Gets project roles. - """ - - pass - - -# @Route("/{version}/membership/roles", "PATCH") -# @Api(Description="Updates role policies") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateRolePolicies(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates role policies - """ - - # @ApiMember(Description="Id of the role to update, from get_roles.", IsRequired=true) - id: Optional[str] = None - """ - Id of the role to update, from get_roles. - """ - - - # @ApiMember(Description="The role's name — required; resend the current name to keep it.", IsRequired=true) - role_name: Optional[str] = None - """ - The role's name — required; resend the current name to keep it. - """ - - - description: Optional[str] = None - # @ApiMember(Description="The complete new list of attached policy ids (full replacement), opaque ids from get_policies (e.g. 'pol_3kJ9xJ2mQ0aBcDeFgHiJk') — never invent or guess them.") - policies: Optional[List[str]] = None - """ - The complete new list of attached policy ids (full replacement), opaque ids from get_policies (e.g. 'pol_3kJ9xJ2mQ0aBcDeFgHiJk') — never invent or guess them. - """ - - -# @Route("/{version}/membership/policies", "POST") -# @Api(Description="Create a new custom policy for project.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreatePolicy(CodeMashRequestBase, IReturn[IdResponse]): - """ - Create a new custom policy for project. - """ - - # @ApiMember(Description="Display name of the new policy, unique within the project.", IsRequired=true) - policy_name: Optional[str] = None - """ - Display name of the new policy, unique within the project. - """ - - - # @ApiMember(Description="Optional human-readable description of what the policy grants.") - description: Optional[str] = None - """ - Optional human-readable description of what the policy grants. - """ - - - # @ApiMember(Description="AWS-IAM-style policy document as a raw JSON string (an object with a permission statement list) matching PolicyDocument.schema.json. Malformed or invalid documents are rejected before any change is made.") - policy_document_json: Optional[str] = None - """ - AWS-IAM-style policy document as a raw JSON string (an object with a permission statement list) matching PolicyDocument.schema.json. Malformed or invalid documents are rejected before any change is made. - """ - - -# @Route("/{version}/membership/policies", "DELETE") -# @Api(Description="Deletes custom policy from project.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeletePolicy(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Deletes custom policy from project. - """ - - # @ApiMember(Description="Public policy id, e.g. 'pol_database-read', from get_policies.", IsRequired=true) - id: Optional[str] = None - """ - Public policy id, e.g. 'pol_database-read', from get_policies. - """ - - -# @Route("/{version}/membership/policies/{Id}", "GET") -# @Api(Description="Gets project policy details.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPolicy(CodeMashRequestBase, IReturn[GetPolicyResponse]): - """ - Gets project policy details. - """ - - # @ApiMember(Description="Public policy id, e.g. 'pol_database-read', from get_policies.", IsRequired=true) - id: Optional[str] = None - """ - Public policy id, e.g. 'pol_database-read', from get_policies. - """ - - -# @Route("/{version}/membership/policies", "GET") -# @Api(Description="Gets project policies.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPolicies(CodeMashRequestBase, IReturn[GetPoliciesResponse]): - """ - Gets project policies. - """ - - pass - - -# @Route("/{version}/membership/policies", "PUT") -# @Api(Description="Updates a custom policy for project.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdatePolicy(CodeMashRequestBase, IReturn[IdResponse]): - """ - Updates a custom policy for project. - """ - - # @ApiMember(Description="Public policy id, e.g. 'pol_database-read', from get_policies.", IsRequired=true) - id: Optional[str] = None - """ - Public policy id, e.g. 'pol_database-read', from get_policies. - """ - - - # @ApiMember(Description="The policy's name — required; resend the current name to keep it.", IsRequired=true) - policy_name: Optional[str] = None - """ - The policy's name — required; resend the current name to keep it. - """ - - - # @ApiMember(Description="Optional human-readable description of what the policy grants.") - description: Optional[str] = None - """ - Optional human-readable description of what the policy grants. - """ - - - # @ApiMember(Description="AWS-IAM-style policy document as a raw JSON string (an object with a permission statement list) matching PolicyDocument.schema.json — this is a FULL replacement of the policy's current permissions.") - policy_document_json: Optional[str] = None - """ - AWS-IAM-style policy document as a raw JSON string (an object with a permission statement list) matching PolicyDocument.schema.json — this is a FULL replacement of the policy's current permissions. - """ - - -# @Route("/{version}/membership/passkey/settings", "GET") -# @Api(Description="Gets the project's passkey authentication settings.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPasskeySettings(CodeMashRequestBase, IReturn[GetPasskeySettingsResponse]): - """ - Gets the project's passkey authentication settings. - """ - - pass - - -# @Route("/{version}/membership/passkey/settings", "POST") -# @Api(Description="Saves the project's passkey authentication settings.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SavePasskeySettings(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Saves the project's passkey authentication settings. - """ - - # @ApiMember(Description="Whether the email + passkey sign-in flow is enabled for the project.") - enabled: bool = False - """ - Whether the email + passkey sign-in flow is enabled for the project. - """ - - - # @ApiMember(Description="Email verification code lifetime, in minutes. Allowed range: 3-15.") - code_ttl_minutes: int = 0 - """ - Email verification code lifetime, in minutes. Allowed range: 3-15. - """ - - - # @ApiMember(Description="Maximum passkeys a single user may register. Allowed range: 1-20.") - max_credentials_per_user: int = 0 - """ - Maximum passkeys a single user may register. Allowed range: 1-20. - """ - - - # @ApiMember(Description="Number of recovery codes generated at signup. Allowed range: 5-20.") - recovery_code_count: int = 0 - """ - Number of recovery codes generated at signup. Allowed range: 5-20. - """ - - - # @ApiMember(Description="Whether recovery codes are generated automatically at signup.") - generate_recovery_codes_at_signup: bool = False - """ - Whether recovery codes are generated automatically at signup. - """ - - - # @ApiMember(Description="Accepted authenticator types: 'Any', 'Platform', or 'CrossPlatform'.") - authenticator_attachment: Optional[str] = None - """ - Accepted authenticator types: 'Any', 'Platform', or 'CrossPlatform'. - """ - - - # @ApiMember(Description="Per-project opt-in for magic-link account recovery (off by default).") - allow_magic_link_recovery: bool = False - """ - Per-project opt-in for magic-link account recovery (off by default). - """ - - - # @ApiMember(Description="Absolute refresh-token lifetime, in days. Allowed range: 7-90.") - refresh_token_ttl_days: int = 0 - """ - Absolute refresh-token lifetime, in days. Allowed range: 7-90. - """ - - - # @ApiMember(Description="Optional explicit WebAuthn RP-ID — a bare DNS host (e.g. 'app.example.com', no scheme/port/path). Leave null/empty to derive it from the project's CORS origins. WARNING: changing this value invalidates every existing passkey on the project — set it once before going live and avoid changing it afterward.") - rp_id: Optional[str] = None - """ - Optional explicit WebAuthn RP-ID — a bare DNS host (e.g. 'app.example.com', no scheme/port/path). Leave null/empty to derive it from the project's CORS origins. WARNING: changing this value invalidates every existing passkey on the project — set it once before going live and avoid changing it afterward. - """ - - -# @Route("/{version}/membership/integrations/{Id}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteMembershipIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Integration id, from get_membership_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Integration id, from get_membership_integrations. - """ - - -# @Route("/{version}/membership/integrations/{Id}/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableMembershipIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Integration id, from get_membership_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Integration id, from get_membership_integrations. - """ - - -# @Route("/{version}/membership/integrations/{Id}/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableMembershipIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Integration id, from get_membership_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Integration id, from get_membership_integrations. - """ - - -# @Route("/{version}/membership/integrations/{id}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMembershipIntegration(CodeMashRequestBase, IReturn[GetMembershipIntegrationResponse]): - # @ApiMember(Description="Integration id, from get_membership_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Integration id, from get_membership_integrations. - """ - - -# @Route("/{version}/membership/integrations", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMembershipIntegrations(CodeMashListPaginationRequestBase, IReturn[GetMembershipIntegrationsResponse]): - pass - - -# @Route("/{version}/membership/integrations", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveMembershipIntegration(CodeMashRequestBase, IReturn[IdResponse]): - integration: Optional[MembershipIntegrationRequest] = None - - -# @Route("/{version}/membership/integrations/{Id}/default", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetMembershipIntegrationAsDefaultRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Integration id, from get_membership_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Integration id, from get_membership_integrations. - """ - - -# @Route("/{version}/membership/authorization", "GET") -# @Api(Description="Gets the project's membership authorization (role-assignment) settings.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAuthorizationSettings(CodeMashRequestBase, IReturn[GetAuthorizationSettingsResponse]): - """ - Gets the project's membership authorization (role-assignment) settings. - """ - - pass - - -# @Route("/{version}/membership/authorization", "PUT") -# @Api(Description="Updates the project's membership authorization settings.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateAuthorizationSettings(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates the project's membership authorization settings. - """ - - # @ApiMember(Description="Single-setting change (dashboard tabs), e.g. 'DefaultRegisterRole' with userRegistersAsRole, or 'PasswordComplexity'. Unknown values are refused. Leave empty to change defaultRoles / allowedRegistrationRoles / allowGuestUsers / guestCleanupPeriodDays — only the fields you send change.") - setting: Optional[str] = None - """ - Single-setting change (dashboard tabs), e.g. 'DefaultRegisterRole' with userRegistersAsRole, or 'PasswordComplexity'. Unknown values are refused. Leave empty to change defaultRoles / allowedRegistrationRoles / allowGuestUsers / guestCleanupPeriodDays — only the fields you send change. - """ - - - # @ApiMember(Description="Role names given to a user who registers without naming roles. Omit = keep; [] = none.") - default_roles: Optional[List[str]] = None - """ - Role names given to a user who registers without naming roles. Omit = keep; [] = none. - """ - - - # @ApiMember(Description="Role names a user may pick when registering. Omit = keep; [] = none.") - allowed_registration_roles: Optional[List[str]] = None - """ - Role names a user may pick when registering. Omit = keep; [] = none. - """ - - - # @ApiMember(Description="Whether guest (anonymous) users may be created. Omit = keep. When sent, guestCleanupPeriodDays is taken with it (null = never clean up).") - allow_guest_users: Optional[bool] = None - """ - Whether guest (anonymous) users may be created. Omit = keep. When sent, guestCleanupPeriodDays is taken with it (null = never clean up). - """ - - - # @ApiMember(Description="Days after which inactive guests are removed; null or 0 = never. Omit both guest fields = keep.") - guest_cleanup_period_days: Optional[int] = None - """ - Days after which inactive guests are removed; null or 0 = never. Omit both guest fields = keep. - """ - - - user_registers_as_role: Optional[str] = None - guest_registers_as_role: Optional[str] = None - allowed_register_roles: Optional[List[str]] = None - need_verification: bool = False - verification_email_template: Optional[str] = None - deactivation_email_template: Optional[str] = None - allow_invite_users: bool = False - allow_deactivate_users: bool = False - invite_user_email_template: Optional[str] = None - invitation_expiration: Optional[int] = None - email_verification_expiration: Optional[int] = None - deactivation_expiration: Optional[int] = None - default_subscribe_to_news: bool = False - # @ApiMember(Description="\"Email registration\": the public register/email route accepts sign-ups. Omit = keep.") - allow_email_registration: Optional[bool] = None - """ - "Email registration": the public register/email route accepts sign-ups. Omit = keep. - """ - - - # @ApiMember(Description="\"Invite-only\": public sign-up (email and username) is refused; only invitations create users. Omit = keep.") - invite_only: Optional[bool] = None - """ - "Invite-only": public sign-up (email and username) is refused; only invitations create users. Omit = keep. - """ - - - # @ApiMember(Description="\"Allow anyone to sign up\": grants (true) / revokes (false) membership:register on the project's Guest role. Omit = keep.") - allow_anyone_to_sign_up: Optional[bool] = None - """ - "Allow anyone to sign up": grants (true) / revokes (false) membership:register on the project's Guest role. Omit = keep. - """ - - - min_length: int = 0 - max_length: Optional[int] = None - min_numbers: Optional[int] = None - max_numbers: Optional[int] = None - min_upper: Optional[int] = None - max_upper: Optional[int] = None - min_lower: Optional[int] = None - max_lower: Optional[int] = None - min_special: Optional[int] = None - max_special: Optional[int] = None - allowed_special: Optional[str] = None - - -# @Route("/{version}/membership/authorization/password-complexity", "PUT") -# @Api(Description="Updates the project's membership password complexity policy.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdatePasswordComplexity(CodeMashRequestBase, IReturn[UpdatePasswordComplexityResponse]): - """ - Updates the project's membership password complexity policy. - """ - - # @ApiMember(Description="Minimum password length.") - min_length: int = 0 - """ - Minimum password length. - """ - - - # @ApiMember(Description="Maximum password length, if capped.") - max_length: Optional[int] = None - """ - Maximum password length, if capped. - """ - - - # @ApiMember(Description="Minimum number of numeric characters required.") - min_numbers: Optional[int] = None - """ - Minimum number of numeric characters required. - """ - - - # @ApiMember(Description="Maximum number of numeric characters allowed.") - max_numbers: Optional[int] = None - """ - Maximum number of numeric characters allowed. - """ - - - # @ApiMember(Description="Minimum number of uppercase characters required.") - min_upper: Optional[int] = None - """ - Minimum number of uppercase characters required. - """ - - - # @ApiMember(Description="Maximum number of uppercase characters allowed.") - max_upper: Optional[int] = None - """ - Maximum number of uppercase characters allowed. - """ - - - # @ApiMember(Description="Minimum number of lowercase characters required.") - min_lower: Optional[int] = None - """ - Minimum number of lowercase characters required. - """ - - - # @ApiMember(Description="Maximum number of lowercase characters allowed.") - max_lower: Optional[int] = None - """ - Maximum number of lowercase characters allowed. - """ - - - # @ApiMember(Description="Minimum number of special characters required.") - min_special: Optional[int] = None - """ - Minimum number of special characters required. - """ - - - # @ApiMember(Description="Maximum number of special characters allowed.") - max_special: Optional[int] = None - """ - Maximum number of special characters allowed. - """ - - - # @ApiMember(Description="The set of characters counted as 'special', if restricted.") - allowed_special: Optional[str] = None - """ - The set of characters counted as 'special', if restricted. - """ - - -# @Route("/{version}/membership/authentication", "GET") -# @Api(Description="Gets the project's configured membership authentication sign-in flows.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAuthenticationSettings(CodeMashRequestBase, IReturn[GetAuthenticationSettingsResponse]): - """ - Gets the project's configured membership authentication sign-in flows. - """ - - pass - - -# @Route("/{version}/membership/authentication", "PUT") -# @Api(Description="Updates the project's membership authentication preferences.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateAuthenticationSettings(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates the project's membership authentication preferences. - """ - - # @ApiMember(Description="Default URL to redirect end users to after logout.") - logout_url: Optional[str] = None - """ - Default URL to redirect end users to after logout. - """ - - - # @ApiMember(Description="Whether end users may sign in with a username in addition to email.") - allow_usernames: bool = False - """ - Whether end users may sign in with a username in addition to email. - """ - - - # @ApiMember(Description="Per-authentication-mode logout URL overrides.") - modes: Optional[List[CredentialsSettingsModeDto]] = None - """ - Per-authentication-mode logout URL overrides. - """ - - -# @Route("/{version}/database/disable", "PUT") -# @Api(Description="Disable database service") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableDatabase(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable database service - """ - - pass - - -# @Route("/{version}/database/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableDatabase(CodeMashRequestBase, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/database/schemas/triggers/{triggerId}", "DELETE") -# @Api(Description="Delete database trigger") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteSchemaTrigger(DeleteTrigger, IReturn[EmptyResponse]): - """ - Delete database trigger - """ - - pass - - -# @Route("/{version}/database/schemas/triggers/{triggerId}/disable", "PATCH") -# @Api(Description="Disable database trigger") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableSchemaTrigger(DisableTrigger, IReturn[EmptyResponse]): - """ - Disable database trigger - """ - - pass - - -# @Route("/{version}/database/schemas/triggers/{triggerId}/enable", "PATCH") -# @Api(Description="Enable database trigger") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableSchemaTrigger(EnableTrigger, IReturn[EmptyResponse]): - """ - Enable database trigger - """ - - pass - - -# @Route("/{version}/database/schemas/triggers/{id}", "GET") -# @Api(Description="Gets database trigger by specified Id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSchemaTrigger(GetTrigger, IReturn[GetSchemaTriggerResponse]): - """ - Gets database trigger by specified Id - """ - - pass - - -# @Route("/{version}/database/schemas/triggers", "GET") -# @Api(Description="Gets database triggers") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSchemaTriggers(GetTriggers, IReturn[GetSchemaTriggersResponse]): - """ - Gets database triggers - """ - - pass - - -# @Route("/{version}/database/schemas/triggers", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveSchemaTrigger(SaveTrigger, IReturn[IdResponse]): - pass - - -# @Route("/{version}/database/taxonomies/{Id}", "DELETE") -# @Api(Description="Delete database taxonomy") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteDatabaseTaxonomyRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete database taxonomy - """ - - # @ApiMember(Description="Taxonomy id to delete, from get_database_taxonomies.", IsRequired=true) - id: Optional[str] = None - """ - Taxonomy id to delete, from get_database_taxonomies. - """ - - -# @Route("/{version}/database/taxonomies/{id}", "GET") -# @Api(Description="Gets database taxonomy by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseTaxonomy(CodeMashRequestBase, IReturn[GetDatabaseTaxonomyResponse]): - """ - Gets database taxonomy by id - """ - - # @ApiMember(Description="Taxonomy id from get_database_taxonomies.", IsRequired=true) - id: Optional[str] = None - """ - Taxonomy id from get_database_taxonomies. - """ - - -# @Route("/{version}/database/taxonomies", "GET") -# @Api(Description="Gets database taxonomies") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseTaxonomies(CodeMashListPaginationRequestBase, IReturn[GetDatabaseTaxonomiesResponse]): - """ - Gets database taxonomies - """ - - paging_args: Optional[PagingArgs] = None - - -# @Route("/{version}/database/taxonomies/tree", "GET") -# @Api(Description="Returns the single-parent taxonomy structure tree") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseTaxonomyTreeRequest(CodeMashRequestBase, IReturn[GetDatabaseTaxonomyTreeResponse]): - """ - Returns the single-parent taxonomy structure tree - """ - - # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - all_languages: bool = False - """ - Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. - """ - - - # @ApiMember(Description="When true, each taxonomy node also carries its own term tree (heavier response).") - include_terms: bool = False - """ - When true, each taxonomy node also carries its own term tree (heavier response). - """ - - - # @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - database_integration_id: Optional[str] = None - """ - Optional database integration id. When omitted, the project's default database integration is used. - """ - - -# @Route("/{version}/database/taxonomies", "POST") -# @Api(Description="Creates or updates a database taxonomy") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveDatabaseTaxonomyRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Creates or updates a database taxonomy - """ - - # @ApiMember(Description="Empty to create a new taxonomy; set to an existing taxonomy id (from get_database_taxonomies) to update it. An update replaces the whole taxonomy: send every field you want to keep (parentId, dependencies, description, schemas).") - view_id: Optional[str] = None - """ - Empty to create a new taxonomy; set to an existing taxonomy id (from get_database_taxonomies) to update it. An update replaces the whole taxonomy: send every field you want to keep (parentId, dependencies, description, schemas). - """ - - - # @ApiMember(Description="Human-entered taxonomy title (e.g. \"Countries\"); a slug is derived server-side.", IsRequired=true) - taxonomy_name: Optional[str] = None - """ - Human-entered taxonomy title (e.g. "Countries"); a slug is derived server-side. - """ - - - # @ApiMember(Description="Optional free-text description of the taxonomy.") - description: Optional[str] = None - """ - Optional free-text description of the taxonomy. - """ - - - # @ApiMember(Description="Optional raw JSON string (Norbix data meta-schema) describing custom meta fields for terms in this taxonomy. Omit to leave the taxonomy structural-only.") - terms_meta_data_schema: Optional[str] = None - """ - Optional raw JSON string (Norbix data meta-schema) describing custom meta fields for terms in this taxonomy. Omit to leave the taxonomy structural-only. - """ - - - # @ApiMember(Description="Optional raw JSON string (Norbix UI/visual meta-schema) describing the term meta edit form.") - terms_meta_visual_schema: Optional[str] = None - """ - Optional raw JSON string (Norbix UI/visual meta-schema) describing the term meta edit form. - """ - - - # @ApiMember(Description="Optional parent taxonomy id. The child taxonomy points to its parent — e.g. set the Countries taxonomy's parentId to the Regions taxonomy id so each country term can be parented by a region term. Omit for a root taxonomy.") - parent_id: Optional[str] = None - """ - Optional parent taxonomy id. The child taxonomy points to its parent — e.g. set the Countries taxonomy's parentId to the Regions taxonomy id so each country term can be parented by a region term. Omit for a root taxonomy. - """ - - - # @ApiMember(Description="Optional list of other taxonomy ids this taxonomy depends on for multi-parent terms. Omit for a self-contained taxonomy.") - dependencies: Optional[List[str]] = None - """ - Optional list of other taxonomy ids this taxonomy depends on for multi-parent terms. Omit for a self-contained taxonomy. - """ - - -# @Route("/{version}/database/taxonomies/{TaxonomyId}/terms/{Id}", "DELETE") -# @Api(Description="Delete a single term from a taxonomy by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteDatabaseTaxonomyTermRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete a single term from a taxonomy by id - """ - - # @ApiMember(Description="Taxonomy id that owns the term, from get_database_taxonomies — or the taxonomy name (slug or title).", IsRequired=true) - taxonomy_id: Optional[str] = None - """ - Taxonomy id that owns the term, from get_database_taxonomies — or the taxonomy name (slug or title). - """ - - - # @ApiMember(Description="Term id to delete, from get_database_taxonomy_term_tree.", IsRequired=true) - id: Optional[str] = None - """ - Term id to delete, from get_database_taxonomy_term_tree. - """ - - - # @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - database_integration_id: Optional[str] = None - """ - Optional database integration id. When omitted, the project's default database integration is used. - """ - - -# @Route("/{version}/database/taxonomies/{TaxonomyId}/terms/many", "DELETE") -# @Api(Description="Delete many terms in a taxonomy matching the given filter") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteManyDatabaseTaxonomyTermsRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete many terms in a taxonomy matching the given filter - """ - - # @ApiMember(Description="Taxonomy id whose terms to delete, from get_database_taxonomies — or the taxonomy name (slug or title).", IsRequired=true) - taxonomy_id: Optional[str] = None - """ - Taxonomy id whose terms to delete, from get_database_taxonomies — or the taxonomy name (slug or title). - """ - - - # @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - database_integration_id: Optional[str] = None - """ - Optional database integration id. When omitted, the project's default database integration is used. - """ - - - # @ApiMember(Description="MongoDB extended-JSON match filter (a raw JSON object, e.g. {\"active\":false}) selecting which terms to delete. Automatically ANDed server-side with the taxonomyId, so it cannot affect other taxonomies.", IsRequired=true) - filter: Optional[str] = None - """ - MongoDB extended-JSON match filter (a raw JSON object, e.g. {"active":false}) selecting which terms to delete. Automatically ANDed server-side with the taxonomyId, so it cannot affect other taxonomies. - """ - - -# @Route("/{version}/database/taxonomies/{TaxonomyId}/terms/{Id}", "GET") -# @Api(Description="Get a single term from a taxonomy by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseTaxonomyTermRequest(CodeMashRequestBase, IReturn[GetDatabaseTaxonomyTermResponse]): - """ - Get a single term from a taxonomy by id - """ - - # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - all_languages: bool = False - """ - Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. - """ - - - # @ApiMember(Description="Taxonomy id from get_database_taxonomies — or the taxonomy name (slug or title).", IsRequired=true) - taxonomy_id: Optional[str] = None - """ - Taxonomy id from get_database_taxonomies — or the taxonomy name (slug or title). - """ - - - # @ApiMember(Description="Term id from get_database_taxonomy_term_tree.", IsRequired=true) - id: Optional[str] = None - """ - Term id from get_database_taxonomy_term_tree. - """ - - - # @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - database_integration_id: Optional[str] = None - """ - Optional database integration id. When omitted, the project's default database integration is used. - """ - - -# @Route("/{version}/database/taxonomies/{TaxonomyName}/merged-tree", "GET") -# @Api(Description="Returns a merged term tree across a taxonomy and its child taxonomies") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseMergedTermTreeRequest(CodeMashRequestBase, IReturn[GetDatabaseMergedTermTreeResponse]): - """ - Returns a merged term tree across a taxonomy and its child taxonomies - """ - - # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - all_languages: bool = False - """ - Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. - """ - - - # @ApiMember(Description="Root taxonomy slug/name or id, txn_… (from get_database_taxonomies). Its terms are the roots; child-taxonomy terms nest under them.", IsRequired=true) - taxonomy_name: Optional[str] = None - """ - Root taxonomy slug/name or id, txn_… (from get_database_taxonomies). Its terms are the roots; child-taxonomy terms nest under them. - """ - - - # @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - database_integration_id: Optional[str] = None - """ - Optional database integration id. When omitted, the project's default database integration is used. - """ - - -# @Route("/{version}/database/taxonomies/{TaxonomyName}/terms/tree", "GET") -# @Api(Description="Returns the whole term tree of a taxonomy (or a sub-tree) in one call") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseTaxonomyTermTreeRequest(CodeMashRequestBase, IReturn[GetDatabaseTaxonomyTermTreeResponse]): - """ - Returns the whole term tree of a taxonomy (or a sub-tree) in one call - """ - - # @ApiMember(Description="Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions.") - all_languages: bool = False - """ - Set true to keep name / description as stored even when Accept-Language is sent (editors). The full translations are always in names / descriptions. - """ - - - # @ApiMember(Description="Taxonomy slug/name (or its id, txn_…) to fetch the term tree for, from get_database_taxonomies.", IsRequired=true) - taxonomy_name: Optional[str] = None - """ - Taxonomy slug/name (or its id, txn_…) to fetch the term tree for, from get_database_taxonomies. - """ - - - # @ApiMember(Description="Optional term id to root the returned tree at a sub-tree instead of the whole taxonomy.") - root_term_id: Optional[str] = None - """ - Optional term id to root the returned tree at a sub-tree instead of the whole taxonomy. - """ - - - # @ApiMember(DataType="integer", Description="Optional maximum depth to return below the root.") - depth: Optional[int] = None - """ - Optional maximum depth to return below the root. - """ - - - # @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - database_integration_id: Optional[str] = None - """ - Optional database integration id. When omitted, the project's default database integration is used. - """ - - -# @Route("/{version}/database/taxonomies/{TaxonomyId}/terms", "POST") -# @Api(Description="Insert a single term into a taxonomy") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveDatabaseTaxonomyTermRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Insert a single term into a taxonomy - """ - - # @ApiMember(Description="Taxonomy id to insert the term into, from get_database_taxonomies — or the taxonomy name (slug or title).", IsRequired=true) - taxonomy_id: Optional[str] = None - """ - Taxonomy id to insert the term into, from get_database_taxonomies — or the taxonomy name (slug or title). - """ - - - # @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - database_integration_id: Optional[str] = None - """ - Optional database integration id. When omitted, the project's default database integration is used. - """ - - - # @ApiMember(Description="The term to insert, as a MongoDB extended-JSON document string (a raw JSON object). Supported term fields: name (string, or a {lang:value} map — required); description; slug (optional — the URL-safe name, unique inside the taxonomy; derived from name when omitted, e.g. 'France' → 'france', with a -2, -3… suffix when another term of the taxonomy already has that derived slug; an explicit slug another term has is refused, CM-ERRORS-TAXONOMIES-012); order (integer sort position, lower shows first — omit for unordered); parentId (id of the single parent term); multiParents (\"additional categories\": array of {taxonomyId, parentId}). The server stamps taxonomyId/taxonomyName automatically — do not include them. Example: {\"name\":\"France\",\"order\":1}.", IsRequired=true) - document: Optional[str] = None - """ - The term to insert, as a MongoDB extended-JSON document string (a raw JSON object). Supported term fields: name (string, or a {lang:value} map — required); description; slug (optional — the URL-safe name, unique inside the taxonomy; derived from name when omitted, e.g. 'France' → 'france', with a -2, -3… suffix when another term of the taxonomy already has that derived slug; an explicit slug another term has is refused, CM-ERRORS-TAXONOMIES-012); order (integer sort position, lower shows first — omit for unordered); parentId (id of the single parent term); multiParents ("additional categories": array of {taxonomyId, parentId}). The server stamps taxonomyId/taxonomyName automatically — do not include them. Example: {"name":"France","order":1}. - """ - - -# @Route("/{version}/database/taxonomies/{TaxonomyId}/terms/{Id}", "PUT") -# @Api(Description="Update a single term in a taxonomy by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateDatabaseTaxonomyTermRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Update a single term in a taxonomy by id - """ - - # @ApiMember(Description="Taxonomy id that owns the term, from get_database_taxonomies — or the taxonomy name (slug or title).", IsRequired=true) - taxonomy_id: Optional[str] = None - """ - Taxonomy id that owns the term, from get_database_taxonomies — or the taxonomy name (slug or title). - """ - - - # @ApiMember(Description="Term id to update, from get_database_taxonomy_term_tree.", IsRequired=true) - id: Optional[str] = None - """ - Term id to update, from get_database_taxonomy_term_tree. - """ - - - # @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - database_integration_id: Optional[str] = None - """ - Optional database integration id. When omitted, the project's default database integration is used. - """ - - - # @ApiMember(Description="Partial update document as MongoDB extended-JSON (a raw JSON object of fields to change), applied with $set — only the given fields change. Updatable term fields: name (string or {lang:value} map — a new name re-derives the slug unless 'slug' is sent too; a derived slug another term has gets a -2, -3… suffix); slug (optional — set explicitly, unique inside the taxonomy, CM-ERRORS-TAXONOMIES-012 when another term has it); description; order (integer sort position, lower shows first — use this to numerate/rank terms; set null to clear); parentId (single parent term id — a term from THIS taxonomy's parent taxonomy; e.g. link a country to its region by setting the country term's parentId to the region term id); multiParents (\"additional categories\": array of {taxonomyId, parentId}). Example to rank a term: {\"order\":1}.", IsRequired=true) - update: Optional[str] = None - """ - Partial update document as MongoDB extended-JSON (a raw JSON object of fields to change), applied with $set — only the given fields change. Updatable term fields: name (string or {lang:value} map — a new name re-derives the slug unless 'slug' is sent too; a derived slug another term has gets a -2, -3… suffix); slug (optional — set explicitly, unique inside the taxonomy, CM-ERRORS-TAXONOMIES-012 when another term has it); description; order (integer sort position, lower shows first — use this to numerate/rank terms; set null to clear); parentId (single parent term id — a term from THIS taxonomy's parent taxonomy; e.g. link a country to its region by setting the country term's parentId to the region term id); multiParents ("additional categories": array of {taxonomyId, parentId}). Example to rank a term: {"order":1}. - """ - - -# @Route("/{version}/database/schemas/apply-bundle", "POST") -# @Api(Description="Creates every collection and taxonomy of a compiled IF bundle, linked and published") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ApplyDatabaseSchemaBundleRequest(CodeMashRequestBase, IReturn[ApplyDatabaseSchemaBundleResponse]): - """ - Creates every collection and taxonomy of a compiled IF bundle, linked and published - """ - - # @ApiMember(Description="Comma-separated catalog entity ids to create from the reviewed catalog (e.g. \"blog_posts,comments\"). The usual input.") - entities: Optional[str] = None - """ - Comma-separated catalog entity ids to create from the reviewed catalog (e.g. "blog_posts,comments"). The usual input. - """ - - - # @ApiMember(Description="Only for entities the catalog lacks: one IF entity object or an array of IF objects (JSON string). May also hold catalog refs with add_fields / remove_fields.") - bundle_json: Optional[str] = None - """ - Only for entities the catalog lacks: one IF entity object or an array of IF objects (JSON string). May also hold catalog refs with add_fields / remove_fields. - """ - - - # @ApiMember(Description="Field tier to compile: minimal | standard (default) | extended.") - tier: Optional[str] = None - """ - Field tier to compile: minimal | standard (default) | extended. - """ - - - # @ApiMember(Description="true = mark free-text fields (title, body, excerpt …) translatable for multilingual content. Default false.") - translatable: bool = False - """ - true = mark free-text fields (title, body, excerpt …) translatable for multilingual content. Default false. - """ - - - # @ApiMember(Description="false = leave every collection as a draft instead of publishing v1. Default true.") - publish: bool = False - """ - false = leave every collection as a draft instead of publishing v1. Default true. - """ - - -# @Route("/{version}/database/schemas/{Id}", "DELETE") -# @Api(Description="Delete database schema (collection)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteDatabaseSchemaRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete database schema (collection) - """ - - # @ApiMember(Description="Schema id to delete, from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id to delete, from get_database_schemas. - """ - - -# @Route("/{version}/database/schemas/{Id}/draft", "DELETE") -# @Api(Description="Discards the working-copy draft of a database schema without publishing") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DiscardDatabaseSchemaDraftRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Discards the working-copy draft of a database schema without publishing - """ - - # @ApiMember(Description="Schema id whose draft to discard, from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id whose draft to discard, from get_database_schemas. - """ - - -# @Route("/{version}/database/schemas/{id}", "GET") -# @Api(Description="Gets database schema by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchema(CodeMashRequestBase, IReturn[GetDatabaseSchemaResponse]): - """ - Gets database schema by id - """ - - # @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id from get_database_schemas. - """ - - - # @ApiMember(DataType="integer", Description="Optional published version number to pin; omit for the latest published version.", Name="version", ParameterType="query") - schema_version: Optional[int] = None - """ - Optional published version number to pin; omit for the latest published version. - """ - - -# @Route("/{version}/database/schemas", "GET") -# @Api(Description="Gets database schemas (collections)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemas(CodeMashListPaginationRequestBase, IReturn[GetDatabaseSchemasResponse]): - """ - Gets database schemas (collections) - """ - - paging_args: Optional[PagingArgs] = None - - -# @Route("/{version}/database/schemas/{Id}/draft", "GET") -# @Api(Description="Gets the current draft of a database schema") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaDraft(CodeMashRequestBase, IReturn[GetDatabaseSchemaDraftResponse]): - """ - Gets the current draft of a database schema - """ - - # @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id from get_database_schemas. - """ - - -# @Route("/{version}/database/schemas/{Id}/index-status", "GET") -# @Api(Description="Gets the Norbix index status of a database schema") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaIndexStatus(CodeMashRequestBase, IReturn[GetDatabaseSchemaIndexStatusResponse]): - """ - Gets the Norbix index status of a database schema - """ - - # @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id from get_database_schemas. - """ - - -# @Route("/{version}/database/schemas/{Id}/list-settings", "GET") -# @Api(Description="Gets database schema records-list display settings") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaListSettings(CodeMashRequestBase, IReturn[GetDatabaseSchemaListSettingsResponse]): - """ - Gets database schema records-list display settings - """ - - # @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id from get_database_schemas. - """ - - -# @Route("/{version}/database/schemas/{Id}/versions/diff", "GET") -# @Api(Description="Structural diff between two published versions of a database schema") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaVersionDiff(CodeMashRequestBase, IReturn[GetDatabaseSchemaVersionDiffResponse]): - """ - Structural diff between two published versions of a database schema - """ - - # @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id from get_database_schemas. - """ - - - # @ApiMember(DataType="integer", Description="Earlier published version number to diff from. Get valid values from get_database_schema_versions.", IsRequired=true) - from_version: int = 0 - """ - Earlier published version number to diff from. Get valid values from get_database_schema_versions. - """ - - - # @ApiMember(DataType="integer", Description="Later published version number to diff to. Get valid values from get_database_schema_versions.", IsRequired=true) - to_version: int = 0 - """ - Later published version number to diff to. Get valid values from get_database_schema_versions. - """ - - -# @Route("/{version}/database/schemas/{Id}/versions", "GET") -# @Api(Description="Lists published version summaries for a database schema") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseSchemaVersions(CodeMashRequestBase, IReturn[GetDatabaseSchemaVersionsResponse]): - """ - Lists published version summaries for a database schema - """ - - # @ApiMember(Description="Schema id from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id from get_database_schemas. - """ - - -# @Route("/{version}/database/schemas/{Id}/publish", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PublishDatabaseSchemaRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - id: Optional[str] = None - confirmed: bool = False - - -# @Route("/{version}/database/schemas/{Id}/rename", "PUT") -# @Api(Description="Renames a database schema (collection)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RenameDatabaseSchemaRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Renames a database schema (collection) - """ - - # @ApiMember(Description="Schema id to rename, from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id to rename, from get_database_schemas. - """ - - - # @ApiMember(Description="New human-entered title (e.g. \"Company Employees\"); the slug is derived server-side.", IsRequired=true) - title: Optional[str] = None - """ - New human-entered title (e.g. "Company Employees"); the slug is derived server-side. - """ - - -# @Route("/{version}/database/schemas", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveDatabaseSchemaRequest(CodeMashRequestBase, IReturn[IdResponse]): - # @ApiMember(Description="Empty to create a new schema; set to an existing schema id (from get_database_schemas) to update its draft.") - view_id: Optional[str] = None - """ - Empty to create a new schema; set to an existing schema id (from get_database_schemas) to update its draft. - """ - - - # @ApiMember(Description="Human-entered schema title (e.g. \"Company Employees\"); a slug is derived server-side.", IsRequired=true) - schema_name: Optional[str] = None - """ - Human-entered schema title (e.g. "Company Employees"); a slug is derived server-side. - """ - - - # @ApiMember(Description="Raw JSON string matching the Norbix data meta-schema (https://norbix.ai/schemas/meta/v1.json). When unsure of the shape, read an existing schema with get_database_schema first.") - data_schema: Optional[str] = None - """ - Raw JSON string matching the Norbix data meta-schema (https://norbix.ai/schemas/meta/v1.json). When unsure of the shape, read an existing schema with get_database_schema first. - """ - - - # @ApiMember(Description="OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json), describing the record form layout. If omitted or invalid, the backend auto-generates a flat-list form from the data schema; provide it to control the layout.") - visual_schema: Optional[str] = None - """ - OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json), describing the record form layout. If omitted or invalid, the backend auto-generates a flat-list form from the data schema; provide it to control the layout. - """ - - - # @ApiMember(Description="Optional schema-level settings (e.g. record validation behavior).") - settings: Optional[SchemaSettingsDto] = None - """ - Optional schema-level settings (e.g. record validation behavior). - """ - - -# @Route("/{version}/database/schemas/{Id}/draft", "PUT") -# @Api(Description="Saves the working-copy draft of a database schema") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateDatabaseSchemaDraftRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Saves the working-copy draft of a database schema - """ - - # @ApiMember(Description="Schema id whose draft to replace, from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id whose draft to replace, from get_database_schemas. - """ - - - # @ApiMember(Description="Raw JSON string matching the Norbix data meta-schema (https://norbix.ai/schemas/meta/v1.json) for the draft's data schema.") - data_schema: Optional[str] = None - """ - Raw JSON string matching the Norbix data meta-schema (https://norbix.ai/schemas/meta/v1.json) for the draft's data schema. - """ - - - # @ApiMember(Description="OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json) for the draft's record form. If omitted or empty (no field cell), the backend auto-generates a flat-list form from the data schema; a layout that fails the meta-schema is refused with the key named.") - visual_schema: Optional[str] = None - """ - OPTIONAL raw JSON string matching the Norbix UI/visual meta-schema (https://norbix.ai/schemas/ui/v1.json) for the draft's record form. If omitted or empty (no field cell), the backend auto-generates a flat-list form from the data schema; a layout that fails the meta-schema is refused with the key named. - """ - - -# @Route("/{version}/database/schemas/{Id}/embed", "PUT") -# @Api(Description="Saves a database schema's embed setting: which records go into the project's AI knowledge") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateDatabaseSchemaEmbedRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Saves a database schema's embed setting: which records go into the project's AI knowledge - """ - - # @ApiMember(Description="Schema id whose embed setting to save, from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id whose embed setting to save, from get_database_schemas. - """ - - - # @ApiMember(Description="The complete embed setting (full replace): enabled, fields, embeddingIntegrationId (empty = the project's default), perUser.", IsRequired=true) - embed: Optional[SchemaEmbedSettingsDto] = None - """ - The complete embed setting (full replace): enabled, fields, embeddingIntegrationId (empty = the project's default), perUser. - """ - - -# @Route("/{version}/database/schemas/{Id}/list-settings", "PUT") -# @Api(Description="Updates database schema records-list display settings") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateDatabaseSchemaListSettingsRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates database schema records-list display settings - """ - - # @ApiMember(Description="Schema id whose list settings to update, from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id whose list settings to update, from get_database_schemas. - """ - - - # @ApiMember(Description="The complete new list settings object (full replace).", IsRequired=true) - settings: Optional[SchemaListSettingsDto] = None - """ - The complete new list settings object (full replace). - """ - - -# @Route("/{version}/database/schemas/{Id}/settings", "PUT") -# @Api(Description="Updates database schema settings") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateDatabaseSchemaSettingsRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Updates database schema settings - """ - - # @ApiMember(Description="Schema id whose settings to update, from get_database_schemas.", IsRequired=true) - id: Optional[str] = None - """ - Schema id whose settings to update, from get_database_schemas. - """ - - - # @ApiMember(Description="The new schema settings object.", IsRequired=true) - settings: Optional[SchemaSettingsDto] = None - """ - The new schema settings object. - """ - - -# @Route("/{version}/database/collections/{collectionName}/aggregate", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AggregateRecords(CodeMashRequestBase, IReturn[AggregateRecordsResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name to run the aggregation against.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name to run the aggregation against. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="The aggregation pipeline as a MongoDB extended-JSON array of stages.", IsRequired=true) - pipeline: Optional[str] = None - """ - The aggregation pipeline as a MongoDB extended-JSON array of stages. - """ - - -# @Route("/{version}/database/collections/{collectionName}/{id}/responsibility", "PUT") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChangeRecordResponsibility(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name the record lives in.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name the record lives in. - """ - - - # @ApiMember(Description="The id of the record whose responsibility changes.", IsRequired=true) - id: Optional[str] = None - """ - The id of the record whose responsibility changes. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="The new responsible user (owner) id.", IsRequired=true) - new_responsible_user_id: Optional[str] = None - """ - The new responsible user (owner) id. - """ - - -# @Route("/{version}/database/collections/{collectionName}/count", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CountRecords(CodeMashRequestBase, IReturn[CountRecordsResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name to count records in.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name to count records in. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="Optional MongoDB extended-JSON filter. Empty means count all records.") - filter: Optional[str] = None - """ - Optional MongoDB extended-JSON filter. Empty means count all records. - """ - - - schema_version: Optional[int] = None - - -# @Route("/{version}/database/collections/{collectionName}/many", "DELETE") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteManyRecords(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name the records live in.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name the records live in. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="The match filter as a MongoDB extended-JSON document. Required. An empty object ({}) matches every record and is refused unless AllRecords is true.", IsRequired=true) - filter: Optional[str] = None - """ - The match filter as a MongoDB extended-JSON document. Required. An empty object ({}) matches every record and is refused unless AllRecords is true. - """ - - - # @ApiMember(Description="Set to true to delete EVERY record of the collection with an empty filter ({}). Without it an empty filter is refused (CM-ERRORS-DATABASE-037).") - all_records: Optional[bool] = None - """ - Set to true to delete EVERY record of the collection with an empty filter ({}). Without it an empty filter is refused (CM-ERRORS-DATABASE-037). - """ - - -# @Route("/{version}/database/collections/{collectionName}/{id}", "DELETE") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteRecord(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name the record lives in.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name the record lives in. - """ - - - # @ApiMember(Description="The id of the record to delete.", IsRequired=true) - id: Optional[str] = None - """ - The id of the record to delete. - """ - - - database_integration_id: Optional[str] = None - - -# @Route("/{version}/database/collections/{collectionName}/distinct", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DistinctRecordValues(CodeMashRequestBase, IReturn[DistinctRecordValuesResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name to read from.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name to read from. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="The document field (dotted path allowed) to get distinct values for, e.g. 'status'.", IsRequired=true) - field: Optional[str] = None - """ - The document field (dotted path allowed) to get distinct values for, e.g. 'status'. - """ - - - # @ApiMember(Description="Optional MongoDB extended-JSON filter. Empty means consider all records.") - filter: Optional[str] = None - """ - Optional MongoDB extended-JSON filter. Empty means consider all records. - """ - - - schema_version: Optional[int] = None - - -# @Route("/{version}/database/collections/{collectionName}/aggregates/{aggregateId}/execute", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ExecuteRecordsAggregate(CodeMashRequestBase, IReturn[ExecuteRecordsAggregateResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name to run the saved aggregation against.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name to run the saved aggregation against. - """ - - - # @ApiMember(Description="The saved aggregate id (maggr_…) to execute.", IsRequired=true) - aggregate_id: Optional[str] = None - """ - The saved aggregate id (maggr_…) to execute. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="Optional key/value substitutions for {TokenKey} placeholders in the saved pipeline.") - tokens: Optional[Dict[str, str]] = None - """ - Optional key/value substitutions for {TokenKey} placeholders in the saved pipeline. - """ - - -# @Route("/{version}/database/collections/{collectionName}", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindRecords(CodeMashListPaginationRequestBase, IReturn[FindRecordsResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name to read from.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name to read from. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="Optional MongoDB extended-JSON filter. Empty means match all records.") - filter: Optional[str] = None - """ - Optional MongoDB extended-JSON filter. Empty means match all records. - """ - - - # @ApiMember(Description="Optional contact id (ct_…) — only that contact's records are returned.") - contact_id: Optional[str] = None - """ - Optional contact id (ct_…) — only that contact's records are returned. - """ - - - schema_version: Optional[int] = None - paging_args: Optional[PagingArgs] = None - sort_by: Optional[str] = None - sort_order: Optional[int] = None - # @ApiMember(Description="Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids.") - expand_references: bool = False - """ - Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids. - """ - - - all_languages: bool = False - - -# @Route("/{version}/database/collections/{collectionName}/{id}", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class FindOneRecord(CodeMashRequestBase, IReturn[FindOneRecordResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name to read from.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name to read from. - """ - - - # @ApiMember(Description="The id of the record to fetch.", IsRequired=true) - id: Optional[str] = None - """ - The id of the record to fetch. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids.") - expand_references: bool = False - """ - Set true to get every reference value as { id, display } (display = the target's displayField per the schema; null when the target is gone). Needs read permission on every source the schema links to (users, roles, taxonomy, collection, files) — otherwise the read is refused with CM-ERRORS-DATABASE-056 naming the source. Default false returns the stored ids. - """ - - - all_languages: bool = False - - -# @Route("/{version}/database/collections/{collectionName}/indexes", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCollectionIndexes(CodeMashRequestBase, IReturn[GetCollectionIndexesResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name to inspect.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name to inspect. - """ - - - database_integration_id: Optional[str] = None - - -# @Route("/{version}/database/collections/{collectionName}/many", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InsertManyRecords(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name to insert into.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name to insert into. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="The records to insert as a MongoDB extended-JSON array of documents.", IsRequired=true) - documents: Optional[str] = None - """ - The records to insert as a MongoDB extended-JSON array of documents. - """ - - -# @Route("/{version}/database/collections/{collectionName}", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InsertRecord(CodeMashRequestBase, IReturn[IdResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name to insert into.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name to insert into. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="The record to insert, as a MongoDB extended-JSON document string.", IsRequired=true) - document: Optional[str] = None - """ - The record to insert, as a MongoDB extended-JSON document string. - """ - - -# @Route("/{version}/database/collections/{collectionName}/{id}/replace", "PUT") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ReplaceRecord(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name the record lives in.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name the record lives in. - """ - - - # @ApiMember(Description="The id of the record to replace.", IsRequired=true) - id: Optional[str] = None - """ - The id of the record to replace. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="The replacement document as MongoDB extended-JSON.", IsRequired=true) - replacement: Optional[str] = None - """ - The replacement document as MongoDB extended-JSON. - """ - - -# @Route("/{version}/database/collections/seed", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SeedCollectionRecords(CodeMashRequestBase, IReturn[SeedCollectionRecordsResponse]): - """ - Database - """ - - # @ApiMember(Description="Seeding mode: 'dummy' (server-generated sample data, default) or 'realistic' (caller-supplied documents).") - mode: Optional[str] = None - """ - Seeding mode: 'dummy' (server-generated sample data, default) or 'realistic' (caller-supplied documents). - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="JSON array of {collectionName, count?, documents?}. count applies to dummy mode (max 100 per collection); documents (extended-JSON objects, may contain $seedRef placeholders) apply to realistic mode.", IsRequired=true) - collections: Optional[str] = None - """ - JSON array of {collectionName, count?, documents?}. count applies to dummy mode (max 100 per collection); documents (extended-JSON objects, may contain $seedRef placeholders) apply to realistic mode. - """ - - -# @Route("/{version}/database/collections/{collectionName}/many", "PUT") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateManyRecords(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name the records live in.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name the records live in. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="The match filter as a MongoDB extended-JSON document. An empty object ({}) matches every record and is refused unless AllRecords is true.", IsRequired=true) - filter: Optional[str] = None - """ - The match filter as a MongoDB extended-JSON document. An empty object ({}) matches every record and is refused unless AllRecords is true. - """ - - - # @ApiMember(Description="Set to true to update EVERY record of the collection with an empty filter ({}). Without it an empty filter is refused (CM-ERRORS-DATABASE-037).") - all_records: Optional[bool] = None - """ - Set to true to update EVERY record of the collection with an empty filter ({}). Without it an empty filter is refused (CM-ERRORS-DATABASE-037). - """ - - - # @ApiMember(Description="The partial update document (applied with $set), as MongoDB extended-JSON. Dotted paths reach nested data: {\"address.city\":\"Vilnius\"}, {\"lines.$[].qty\":1}, or {\"lines.$[line].qty\":3} together with ArrayFilters.", IsRequired=true) - update: Optional[str] = None - """ - The partial update document (applied with $set), as MongoDB extended-JSON. Dotted paths reach nested data: {"address.city":"Vilnius"}, {"lines.$[].qty":1}, or {"lines.$[line].qty":3} together with ArrayFilters. - """ - - - # @ApiMember(Description="Optional MongoDB arrayFilters — a JSON array of filter documents, one per $[name] identifier used in the Update paths, e.g. [{\"line.sku\":\"A-1\"}] for {\"lines.$[line].qty\":3}.") - array_filters: Optional[str] = None - """ - Optional MongoDB arrayFilters — a JSON array of filter documents, one per $[name] identifier used in the Update paths, e.g. [{"line.sku":"A-1"}] for {"lines.$[line].qty":3}. - """ - - -# @Route("/{version}/database/collections/{collectionName}/{id}", "PUT") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateOneRecord(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - # @ApiMember(Description="The collection (schema) name the record lives in.", IsRequired=true) - collection_name: Optional[str] = None - """ - The collection (schema) name the record lives in. - """ - - - # @ApiMember(Description="The id of the record to update.", IsRequired=true) - id: Optional[str] = None - """ - The id of the record to update. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="The partial update document (applied with $set), as MongoDB extended-JSON. Dotted paths reach nested data: {\"address.city\":\"Vilnius\"}, {\"lines.2.qty\":3}, {\"lines.$[].qty\":1}, or {\"lines.$[line].qty\":3} together with ArrayFilters.", IsRequired=true) - update: Optional[str] = None - """ - The partial update document (applied with $set), as MongoDB extended-JSON. Dotted paths reach nested data: {"address.city":"Vilnius"}, {"lines.2.qty":3}, {"lines.$[].qty":1}, or {"lines.$[line].qty":3} together with ArrayFilters. - """ - - - # @ApiMember(Description="Optional MongoDB arrayFilters — a JSON array of filter documents, one per $[name] identifier used in the Update paths, e.g. [{\"line.sku\":\"A-1\"}] for {\"lines.$[line].qty\":3}.") - array_filters: Optional[str] = None - """ - Optional MongoDB arrayFilters — a JSON array of filter documents, one per $[name] identifier used in the Update paths, e.g. [{"line.sku":"A-1"}] for {"lines.$[line].qty":3}. - """ - - -# @Route("/{version}/database/integrations/{Id}", "DELETE") -# @Api(Description="Delete integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteDatabaseIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete integration for particular project - """ - - # @ApiMember(Description="Database integration id to delete, from get_database_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Database integration id to delete, from get_database_integrations. - """ - - -# @Route("/{version}/database/integrations/{Id}/disable", "PUT") -# @Api(Description="Disable integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableDatabaseIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable integration for particular project - """ - - # @ApiMember(Description="Database integration id to disable, from get_database_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Database integration id to disable, from get_database_integrations. - """ - - -# @Route("/{version}/database/integrations/{Id}/enable", "PUT") -# @Api(Description="Enable integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableDatabaseIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enable integration for particular project - """ - - # @ApiMember(Description="Database integration id to enable, from get_database_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Database integration id to enable, from get_database_integrations. - """ - - -# @Route("/{version}/database/integrations/{id}", "GET") -# @Api(Description="Gets integration by specified Id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseIntegration(CodeMashRequestBase, IReturn[GetDatabaseIntegrationResponse]): - """ - Gets integration by specified Id - """ - - # @ApiMember(Description="Database integration id from get_database_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Database integration id from get_database_integrations. - """ - - -# @Route("/{version}/database/integrations", "GET") -# @Api(Description="Gets database integrations") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseIntegrations(CodeMashListPaginationRequestBase, IReturn[GetDatabaseIntegrationsResponse]): - """ - Gets database integrations - """ - - paging_args: Optional[PagingArgs] = None - - -# @Route("/{version}/database/integrations/flex-tiers", "GET") -# @Api(Description="Returns the Flex tiers this account is entitled to pick") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAllowedFlexTiers(CodeMashRequestBase, IReturn[GetAllowedFlexTiersResponse]): - """ - Returns the Flex tiers this account is entitled to pick - """ - - pass - - -# @Route("/{version}/database/integrations/{Id}/connection-string", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RevealManagedFlexConnectionString(CodeMashRequestBase, IReturn[RevealManagedFlexConnectionStringResponse]): - id: Optional[str] = None - - -# @Route("/{version}/database/integrations", "POST") -# @Api(Description="Saves database integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveDatabaseIntegration(CodeMashRequestBase, IReturn[IdResponse]): - """ - Saves database integration - """ - - integration: Optional[DatabaseIntegrationRequest] = None - - -# @Route("/{version}/database/integrations/{Id}/default", "PUT") -# @Api(Description="Sets integration as default") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetDatabaseIntegrationAsDefaultRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Sets integration as default - """ - - # @ApiMember(Description="Database integration id to set as default, from get_database_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Database integration id to set as default, from get_database_integrations. - """ - - -# @Route("/{version}/database/integrations/test", "POST") -# @Api(Description="Test database integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestDatabaseIntegration(CodeMashRequestBase, IReturn[TestDatabaseIntegrationResponse]): - """ - Test database integration - """ - - # @ApiMember(Description="Database integration id to test, from get_database_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - Database integration id to test, from get_database_integrations. - """ - - -# @Route("/{version}/database/imports", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateCollectionImport(CodeMashRequestBase, IReturn[IdResponse]): - """ - Database - """ - - # @ApiMember(Description="The uploaded CSV's file ref, from the upload call.", IsRequired=true) - file: Optional[FileResourceRefDto] = None - """ - The uploaded CSV's file ref, from the upload call. - """ - - - # @ApiMember(Description="The target schema id.", IsRequired=true) - schema_id: Optional[str] = None - """ - The target schema id. - """ - - - # @ApiMember(Description="The target collection (schema) name.", IsRequired=true) - collection_name: Optional[str] = None - """ - The target collection (schema) name. - """ - - - database_integration_id: Optional[str] = None - # @ApiMember(Description="The CSV delimiter used at upload time.", IsRequired=true) - delimiter: Optional[str] = None - """ - The CSV delimiter used at upload time. - """ - - - has_header: bool = False - # @ApiMember(Description="Column → property mapping, frozen for this import.", IsRequired=true) - mapping: List[ImportColumnMappingDto] = field(default_factory=list) - """ - Column → property mapping, frozen for this import. - """ - - -# @Route("/{version}/database/imports/{Id}", "DELETE") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteCollectionImportRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Database - """ - - # @ApiMember(Description="The import id (imp_…).", IsRequired=true) - id: Optional[str] = None - """ - The import id (imp_…). - """ - - - database_integration_id: Optional[str] = None - - -# @Route("/{version}/database/imports/{Id}", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCollectionImport(CodeMashRequestBase, IReturn[GetCollectionImportResponse]): - """ - Database - """ - - # @ApiMember(Description="The import id (imp_…).", IsRequired=true) - id: Optional[str] = None - """ - The import id (imp_…). - """ - - - database_integration_id: Optional[str] = None - - -# @Route("/{version}/database/imports", "GET") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCollectionImports(CodeMashListPaginationRequestBase, IReturn[GetCollectionImportsResponse]): - """ - Database - """ - - database_integration_id: Optional[str] = None - - -# @Route("/{version}/database/imports/upload-url", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RequestImportUploadUrlRequest(CodeMashRequestBase, IReturn[RequestImportUploadUrlResponse]): - """ - Database - """ - - file_account_id: Optional[str] = None - # @ApiMember(Description="The original CSV file name, e.g. people.csv.", IsRequired=true) - file_name: Optional[str] = None - """ - The original CSV file name, e.g. people.csv. - """ - - -# @Route("/{version}/database/imports/analyze", "POST") -# @Api(Description="Database") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AnalyzeImportFileRequest(CodeMashRequestBase, IReturn[AnalyzeImportFileResponse]): - """ - Database - """ - - # @ApiMember(Description="The uploaded CSV's file ref, from the upload-url call.", IsRequired=true) - file: Optional[FileResourceRefDto] = None - """ - The uploaded CSV's file ref, from the upload-url call. - """ - - - # @ApiMember(Description="The CSV delimiter, e.g. \",\" or \";\".", IsRequired=true) - delimiter: Optional[str] = None - """ - The CSV delimiter, e.g. "," or ";". - """ - - - # @ApiMember(Description="Whether the first row is a header row.") - has_header: bool = False - """ - Whether the first row is a header row. - """ - - -# @Route("/{version}/database/aggregates/{Id}", "DELETE") -# @Api(Description="Delete saved Mongo aggregation") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteDatabaseAggregateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete saved Mongo aggregation - """ - - # @ApiMember(Description="Aggregate id to delete, from get_database_aggregates.", IsRequired=true) - id: Optional[str] = None - """ - Aggregate id to delete, from get_database_aggregates. - """ - - - # @ApiMember(Description="Schema id that owns this aggregate, from get_database_schemas.", IsRequired=true) - schema_id: Optional[str] = None - """ - Schema id that owns this aggregate, from get_database_schemas. - """ - - -# @Route("/{version}/database/aggregates/{Id}", "GET") -# @Api(Description="Get saved Mongo aggregation by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseAggregate(CodeMashRequestBase, IReturn[GetDatabaseAggregateResponse]): - """ - Get saved Mongo aggregation by id - """ - - # @ApiMember(Description="Aggregate id from get_database_aggregates.", IsRequired=true) - id: Optional[str] = None - """ - Aggregate id from get_database_aggregates. - """ - - - # @ApiMember(Description="Schema id that owns this aggregate, from get_database_schemas.", IsRequired=true) - schema_id: Optional[str] = None - """ - Schema id that owns this aggregate, from get_database_schemas. - """ - - -# @Route("/{version}/database/aggregates", "GET") -# @Api(Description="Lists saved Mongo aggregations for a schema") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDatabaseAggregates(CodeMashListPaginationRequestBase, IReturn[GetDatabaseAggregatesResponse]): - """ - Lists saved Mongo aggregations for a schema - """ - - # @ApiMember(Description="Schema id whose saved aggregates to list, from get_database_schemas.", IsRequired=true) - schema_id: Optional[str] = None - """ - Schema id whose saved aggregates to list, from get_database_schemas. - """ - - - paging_args: Optional[PagingArgs] = None - - -# @Route("/{version}/database/aggregates", "POST") -# @Api(Description="Creates or updates a saved Mongo aggregation") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveDatabaseAggregateRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Creates or updates a saved Mongo aggregation - """ - - # @ApiMember(Description="Empty to create a new saved aggregate; set to an existing aggregate id (from get_database_aggregates) to update it.") - view_id: Optional[str] = None - """ - Empty to create a new saved aggregate; set to an existing aggregate id (from get_database_aggregates) to update it. - """ - - - # @ApiMember(Description="Schema id that owns this aggregate, from get_database_schemas.", IsRequired=true) - schema_id: Optional[str] = None - """ - Schema id that owns this aggregate, from get_database_schemas. - """ - - - # @ApiMember(Description="Human-readable display name for the saved aggregate.", IsRequired=true) - display_name: Optional[str] = None - """ - Human-readable display name for the saved aggregate. - """ - - - # @ApiMember(Description="Optional free-text description of what the aggregate does.") - description: Optional[str] = None - """ - Optional free-text description of what the aggregate does. - """ - - - # @ApiMember(Description="MongoDB aggregation pipeline JSON, optionally containing {TokenKey} placeholders substituted at execute time.", IsRequired=true) - pipeline: Optional[str] = None - """ - MongoDB aggregation pipeline JSON, optionally containing {TokenKey} placeholders substituted at execute time. - """ - - -# @Route("/{version}/database/aggregates/test", "POST") -# @Api(Description="Test-run an aggregation pipeline with caller-supplied tokens") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestDatabaseAggregateRequest(CodeMashRequestBase, IReturn[TestDatabaseAggregateResponse]): - """ - Test-run an aggregation pipeline with caller-supplied tokens - """ - - # @ApiMember(Description="Optional database integration id. When omitted, the project's default database integration is used.") - database_integration_id: Optional[str] = None - """ - Optional database integration id. When omitted, the project's default database integration is used. - """ - - - # @ApiMember(Description="Name of the collection (schema) to run the aggregation against.", IsRequired=true) - collection_name: Optional[str] = None - """ - Name of the collection (schema) to run the aggregation against. - """ - - - # @ApiMember(Description="MongoDB aggregation pipeline JSON, optionally containing {TokenKey} placeholders to be substituted from tokens.", IsRequired=true) - pipeline: Optional[str] = None - """ - MongoDB aggregation pipeline JSON, optionally containing {TokenKey} placeholders to be substituted from tokens. - """ - - - # @ApiMember(Description="Optional key/value substitutions for {TokenKey} placeholders in the pipeline.") - tokens: Optional[Dict[str, str]] = None - """ - Optional key/value substitutions for {TokenKey} placeholders in the pipeline. - """ - - -# @Route("/{version}/files/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableFiles(CodeMashRequestBase, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/files/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableFiles(CodeMashRequestBase, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/files/triggers/{triggerId}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteFilesTrigger(DeleteTrigger, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/files/triggers/{triggerId}/disable", "PATCH") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableFilesTrigger(DisableTrigger, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/files/triggers/{triggerId}/enable", "PATCH") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableFilesTrigger(EnableTrigger, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/files/triggers/{id}", "GET") -# @Api(Description="Gets files trigger by specified Id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFilesTrigger(GetTrigger, IReturn[GetFilesTriggerResponse]): - """ - Gets files trigger by specified Id - """ - - pass - - -# @Route("/{version}/files/triggers", "GET") -# @Api(Description="Gets files triggers") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFilesTriggers(GetTriggers, IReturn[GetFilesTriggersResponse]): - """ - Gets files triggers - """ - - pass - - -# @Route("/{version}/files/triggers", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveFilesTrigger(SaveTrigger, IReturn[IdResponse]): - pass - - -# @Route("/{version}/files/item/private", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MakeFilePrivateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The files integration the file lives on.", IsRequired=true) - files_integration_id: Optional[str] = None - """ - The files integration the file lives on. - """ - - - # @ApiMember(Description="Path of the file, relative to the integration.", IsRequired=true) - path: Optional[str] = None - """ - Path of the file, relative to the integration. - """ - - -# @Route("/{version}/files/item/public", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MakeFilePublicRequest(CodeMashRequestBase, IReturn[IdResponse]): - # @ApiMember(Description="The files integration the file lives on.", IsRequired=true) - files_integration_id: Optional[str] = None - """ - The files integration the file lives on. - """ - - - # @ApiMember(Description="Path of the file to publish, relative to the integration.", IsRequired=true) - path: Optional[str] = None - """ - Path of the file to publish, relative to the integration. - """ - - -# @Route("/{version}/files/folder/private", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MakeFolderPrivateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The files integration the folder lives on.", IsRequired=true) - files_integration_id: Optional[str] = None - """ - The files integration the folder lives on. - """ - - - # @ApiMember(Description="Folder prefix, relative to the integration.", IsRequired=true) - path: Optional[str] = None - """ - Folder prefix, relative to the integration. - """ - - -# @Route("/{version}/files/folder/public", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MakeFolderPublicRequest(CodeMashRequestBase, IReturn[IdResponse]): - # @ApiMember(Description="The files integration the folder lives on.", IsRequired=true) - files_integration_id: Optional[str] = None - """ - The files integration the folder lives on. - """ - - - # @ApiMember(Description="Folder prefix to publish, relative to the integration.", IsRequired=true) - path: Optional[str] = None - """ - Folder prefix to publish, relative to the integration. - """ - - -# @Route("/{version}/files/integrations/{Id}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteFilesIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Files integration id to delete, from get_files_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Files integration id to delete, from get_files_integrations. - """ - - -# @Route("/{version}/files/integrations/{Id}/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableFilesIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Files integration id to disable, from get_files_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Files integration id to disable, from get_files_integrations. - """ - - -# @Route("/{version}/files/integrations/{Id}/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableFilesIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Files integration id to enable, from get_files_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Files integration id to enable, from get_files_integrations. - """ - - -# @Route("/{version}/files/integrations/{id}", "GET") -# @Api(Description="Gets integration by specified Id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFilesIntegration(CodeMashRequestBase, IReturn[GetFilesIntegrationResponse]): - """ - Gets integration by specified Id - """ - - # @ApiMember(Description="Files integration id to fetch, from get_files_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Files integration id to fetch, from get_files_integrations. - """ - - -# @Route("/{version}/files/integrations", "GET") -# @Api(Description="Gets integrations") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFilesIntegrations(CodeMashListPaginationRequestBase, IReturn[GetFilesIntegrationsResponse]): - """ - Gets integrations - """ - - pass - - -# @Route("/{version}/files/integrations", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveFilesIntegration(CodeMashRequestBase, IReturn[IdResponse]): - integration: Optional[FilesIntegrationRequest] = None - - -# @Route("/{version}/files/integrations/{Id}/default", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetFilesIntegrationAsDefaultRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Files integration id to set as default, from get_files_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Files integration id to set as default, from get_files_integrations. - """ - - -# @Route("/{version}/files/integrations/test", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestFilesIntegration(CodeMashRequestBase, IReturn[TestFilesIntegrationResponse]): - # @ApiMember(Description="Integration id, from get_files_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - Integration id, from get_files_integrations. - """ - - -# @Route("/{version}/files/item/by-id", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFileById(CodeMashRequestBase, IReturn[GetFileByIdResponse]): - # @ApiMember(Description="The files integration id to read from, from get_files_integrations.", IsRequired=true) - files_integration_id: Optional[str] = None - """ - The files integration id to read from, from get_files_integrations. - """ - - - # @ApiMember(Description="The file id — nbfl_… as the Files endpoints return it, or its bare UUID.", IsRequired=true) - id: Optional[str] = None - """ - The file id — nbfl_… as the Files endpoints return it, or its bare UUID. - """ - - -# @Route("/{version}/files/folder", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetFolderFiles(CodeMashListPaginationRequestBase, IReturn[GetFolderFilesResponse]): - # @ApiMember(Description="The files integration id to list from, from get_files_integrations.", IsRequired=true) - files_integration_id: Optional[str] = None - """ - The files integration id to list from, from get_files_integrations. - """ - - - # @ApiMember(Description="Path prefix to list. Empty / null lists the root.") - path: Optional[str] = None - """ - Path prefix to list. Empty / null lists the root. - """ - - -# @Route("/{version}/files/item/use", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UseFileRequest(CodeMashRequestBase, IReturn[IdResponse]): - # @ApiMember(Description="The files integration the file lives on.", IsRequired=true) - files_integration_id: Optional[str] = None - """ - The files integration the file lives on. - """ - - - # @ApiMember(Description="Path of the file, relative to the integration.", IsRequired=true) - path: Optional[str] = None - """ - Path of the file, relative to the integration. - """ - - -# @Route("/{version}/notifications/email/disable", "PUT") -# @Api(Description="Disable email service") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableEmail(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable email service - """ - - pass - - -# @Route("/{version}/notifications/email/disable-dependencies", "GET") -# @Api(Description="Get email disable dependencies") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailDisableDependencies(CodeMashRequestBase, IReturn[GetNotificationModuleDisableDependenciesResponse]): - """ - Get email disable dependencies - """ - - pass - - -# @Route("/{version}/notifications/email/enable", "PUT") -# @Api(Description="Enable email service") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableEmail(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enable email service - """ - - pass - - -# @Route("/{version}/notifications/email/validation/integrations", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveEmailValidationIntegration(CodeMashRequestBase, IReturn[IdResponse]): - integration: Optional[EmailValidationIntegrationRequest] = None - - -# @Route("/{version}/notifications/email/validation/integrations/test", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestEmailValidationIntegration(CodeMashRequestBase, IReturn[TestEmailValidationIntegrationResponse]): - integration_id: Optional[str] = None - - -# @Route("/{version}/notifications/email/templates/attachments", "POST") -# @Api(Description="Attach a file to an email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AttachFileToTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Attach a file to an email template - """ - - # @ApiMember(Description="Optional language code to scope the attachment to a single translation. Omit to attach at the template level.") - language: Optional[str] = None - """ - Optional language code to scope the attachment to a single translation. Omit to attach at the template level. - """ - - - # @ApiMember(Description="The email template id to attach the file to. Get it from get_email_templates.", IsRequired=true) - template_id: Optional[str] = None - """ - The email template id to attach the file to. Get it from get_email_templates. - """ - - - # @ApiMember(Description="The file resource reference to attach (from a prior file upload).", IsRequired=true) - file_ref: Optional[FileResourceRefDto] = None - """ - The file resource reference to attach (from a prior file upload). - """ - - -# @Route("/{version}/notifications/email/templates", "POST") -# @Api(Description="Create an email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateEmailTemplateRequest(SaveEmailTemplate, IReturn[IdResponse]): - """ - Create an email template - """ - - pass - - -# @Route("/{version}/notifications/email/templates/{Id}", "DELETE") -# @Api(Description="Delete an email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteEmailTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete an email template - """ - - # @ApiMember(Description="The email template id to delete. Get it from get_email_templates.", IsRequired=true) - id: Optional[str] = None - """ - The email template id to delete. Get it from get_email_templates. - """ - - -# @Route("/{version}/notifications/email/templates/{id}", "GET") -# @Api(Description="Get an email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailTemplate(CodeMashRequestBase, IReturn[GetEmailTemplateResponse]): - """ - Get an email template - """ - - # @ApiMember(Description="The email template id to fetch. Get it from get_email_templates.", IsRequired=true) - id: Optional[str] = None - """ - The email template id to fetch. Get it from get_email_templates. - """ - - -# @Route("/{version}/notifications/email/templates", "GET") -# @Api(Description="Gets email templates") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailTemplates(CodeMashListPaginationRequestBase, IReturn[GetEmailTemplatesResponse]): - """ - Gets email templates - """ - - # @ApiMember(Description="Set true to include archived templates.") - show_archived: Optional[bool] = None - """ - Set true to include archived templates. - """ - - - # @ApiMember(Description="Optional: return only the template with this id.") - template_id: Optional[str] = None - """ - Optional: return only the template with this id. - """ - - -# @Route("/{version}/notifications/email/templates/mjml", "POST") -# @Api(Description="Render MJML email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMjml(CodeMashRequestBase, IReturn[GetHtmlFromMjmlResponse]): - """ - Render MJML email template - """ - - # @ApiMember(Description="The MJML/Razor template source code to render.", IsRequired=true) - code: Optional[str] = None - """ - The MJML/Razor template source code to render. - """ - - - # @ApiMember(Description="Optional token values to bind into the template while rendering.") - tokens: Optional[List[TokenMappingDto]] = None - """ - Optional token values to bind into the template while rendering. - """ - - - # @ApiMember(Description="Set true when rendering for a preview (vs. a final save), to affect how missing tokens are handled.") - is_for_preview: bool = False - """ - Set true when rendering for a preview (vs. a final save), to affect how missing tokens are handled. - """ - - -# @Route("/{version}/notifications/email/system-templates/{id}", "GET") -# @Api(Description="Get a system email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSystemEmailTemplate(CodeMashRequestBase, IReturn[GetSystemEmailTemplateResponse]): - """ - Get a system email template - """ - - # @ApiMember(Description="The system email template id to fetch. Get it from get_system_email_templates.", IsRequired=true) - id: Optional[str] = None - """ - The system email template id to fetch. Get it from get_system_email_templates. - """ - - -# @Route("/{version}/notifications/email/system-templates", "GET") -# @Api(Description="Get system email templates") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSystemEmailTemplates(CodeMashListPaginationRequestBase, IReturn[GetSystemEmailTemplatesResponse]): - """ - Get system email templates - """ - - # @ApiMember(Description="Optional group tags to filter templates by (e.g. newsletter, onboarding).") - group_tags: Optional[List[str]] = None - """ - Optional group tags to filter templates by (e.g. newsletter, onboarding). - """ - - - # @ApiMember(Description="Optional visual themes to filter templates by.") - themes: Optional[List[str]] = None - """ - Optional visual themes to filter templates by. - """ - - - # @ApiMember(Description="Optional communication channel to filter templates by (e.g. Transactional, Marketing).") - communication_channel: Optional[CommunicationChannel] = None - """ - Optional communication channel to filter templates by (e.g. Transactional, Marketing). - """ - - - # @ApiMember(Description="Optional trigger type to filter templates that are designed for a specific automated trigger.") - for_trigger: Optional[TriggerType] = None - """ - Optional trigger type to filter templates that are designed for a specific automated trigger. - """ - - -# @Route("/{version}/notifications/email/templates/{id}/tokens", "GET") -# @Api(Description="Gets the tokens used by an email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailTemplateAvailableTokens(CodeMashRequestBase, IReturn[GetEmailTemplateAvailableTokensResponse]): - """ - Gets the tokens used by an email template - """ - - # @ApiMember(Description="Template id from get_email_templates.", IsRequired=true) - id: Optional[str] = None - """ - Template id from get_email_templates. - """ - - -# @Route("/{version}/notifications/email/templates", "PUT") -# @Api(Description="Update an email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateEmailTemplateRequest(SaveEmailTemplate, IReturn[EmptyResponse]): - """ - Update an email template - """ - - # @ApiMember(Description="The email template id to update. Get it from get_email_templates.", IsRequired=true) - view_id: Optional[str] = None - """ - The email template id to update. Get it from get_email_templates. - """ - - -# @Route("/{version}/notifications/email/signatures/{id}", "DELETE") -# @Api(Description="Delete an email signature") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteEmailSignature(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete an email signature - """ - - # @ApiMember(Description="The email signature id to delete. Get it from get_email_signatures.", IsRequired=true) - id: Optional[str] = None - """ - The email signature id to delete. Get it from get_email_signatures. - """ - - -# @Route("/{version}/notifications/email/signatures/{id}", "GET") -# @Api(Description="Get an email signature") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailSignature(CodeMashRequestBase, IReturn[GetEmailSignatureResponse]): - """ - Get an email signature - """ - - # @ApiMember(Description="The email signature id to fetch. Get it from get_email_signatures.", IsRequired=true) - id: Optional[str] = None - """ - The email signature id to fetch. Get it from get_email_signatures. - """ - - -# @Route("/{version}/notifications/email/signatures", "GET") -# @Api(Description="Get email signatures") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailSignatures(CodeMashListPaginationRequestBase, IReturn[GetEmailSignaturesResponse]): - """ - Get email signatures - """ - - pass - - -# @Route("/{version}/notifications/email/signatures", "POST") -# @Api(Description="Save an email signature") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveEmailSignatureRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Save an email signature - """ - - # @ApiMember(Description="The signature id to update. Omit to create a new signature. Get it from get_email_signatures.") - view_id: Optional[str] = None - """ - The signature id to update. Omit to create a new signature. Get it from get_email_signatures. - """ - - - # @ApiMember(Description="The display name of the signature.", IsRequired=true) - display_name: Optional[str] = None - """ - The display name of the signature. - """ - - - # @ApiMember(Description="The per-language content translations for this signature.", IsRequired=true) - translations: List[TranslationDto] = field(default_factory=list) - """ - The per-language content translations for this signature. - """ - - -# @Route("/{version}/notifications/email/settings", "GET") -# @Api(Description="Get email settings") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailSettings(CodeMashRequestBase, IReturn[GetEmailSettingsResponse]): - """ - Get email settings - """ - - # @ApiMember(Description="Unused legacy field; leave empty.") - id: Optional[str] = None - """ - Unused legacy field; leave empty. - """ - - -# @Route("/{version}/notifications/email/integrations/confirm-human-delivery", "POST") -# @Api(Description="Confirm human delivery of a test email") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ConfirmEmailIntegrationHumanDeliveryRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Confirm human delivery of a test email - """ - - # @ApiMember(Description="The email integration id the test delivery was confirmed for. Get it from get_email_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - The email integration id the test delivery was confirmed for. Get it from get_email_integrations. - """ - - -# @Route("/{version}/notifications/email/integrations/{Id}", "DELETE") -# @Api(Description="Delete an email integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteEmailIntegration(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete an email integration - """ - - # @ApiMember(Description="The email integration id to delete. Get it from get_email_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The email integration id to delete. Get it from get_email_integrations. - """ - - -# @Route("/{version}/notifications/email/integrations/{Id}/disable", "PUT") -# @Api(Description="Disable an email integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableEmailIntegration(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable an email integration - """ - - # @ApiMember(Description="The email integration id to disable. Get it from get_email_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The email integration id to disable. Get it from get_email_integrations. - """ - - -# @Route("/{version}/notifications/email/integrations/domain-health", "POST") -# @Api(Description="Check email integration domain health") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CheckEmailIntegrationDomainHealthRequest(CodeMashRequestBase, IReturn[CheckEmailIntegrationDomainHealthResponse]): - """ - Check email integration domain health - """ - - # @ApiMember(Description="The email integration id to check DNS health for. Get it from get_email_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - The email integration id to check DNS health for. Get it from get_email_integrations. - """ - - -# @Route("/{version}/notifications/email/integrations/{Id}/enable", "PUT") -# @Api(Description="Enable an email integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableEmailIntegration(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enable an email integration - """ - - # @ApiMember(Description="The email integration id to enable. Get it from get_email_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The email integration id to enable. Get it from get_email_integrations. - """ - - -# @Route("/{version}/notifications/email/integrations/{id}", "GET") -# @Api(Description="Get an email integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailIntegration(CodeMashRequestBase, IReturn[GetEmailIntegrationResponse]): - """ - Get an email integration - """ - - # @ApiMember(Description="The email integration id to fetch. Get it from get_email_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The email integration id to fetch. Get it from get_email_integrations. - """ - - -# @Route("/{version}/notifications/email/integrations", "GET") -# @Api(Description="Gets email integrations") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailIntegrations(CodeMashListPaginationRequestBase, IReturn[GetEmailIntegrationsResponse]): - """ - Gets email integrations - """ - - pass - - -# @Route("/{version}/notifications/email/integrations", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveEmailIntegration(CodeMashRequestBase, IReturn[IdResponse]): - integration: Optional[EmailIntegrationRequest] = None - - -# @Route("/{version}/notifications/email/integrations/{Id}/default", "PUT") -# @Api(Description="Set an email integration as default") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetEmailsIntegrationAsDefault(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Set an email integration as default - """ - - # @ApiMember(Description="The email integration id to set as default. Get it from get_email_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The email integration id to set as default. Get it from get_email_integrations. - """ - - -# @Route("/{version}/notifications/email/integrations/test", "POST") -# @Api(Description="Test an email integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestEmailIntegration(CodeMashRequestBase, IReturn[TestEmailIntegrationResponse]): - """ - Test an email integration - """ - - # @ApiMember(Description="The email integration id to test. Get it from get_email_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - The email integration id to test. Get it from get_email_integrations. - """ - - - # @ApiMember(Description="The recipient email address to send the test email to.", IsRequired=true) - to: Optional[str] = None - """ - The recipient email address to send the test email to. - """ - - -# @Route("/{version}/notifications/email/templates/{Id}/archive", "PUT") -# @Api(Description="Archive an email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ArchiveEmailTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Archive an email template - """ - - # @ApiMember(Description="The email template id to archive. Get it from get_email_templates.", IsRequired=true) - id: Optional[str] = None - """ - The email template id to archive. Get it from get_email_templates. - """ - - -# @Route("/{version}/notifications/email/templates/{Id}/clone", "POST") -# @Api(Description="Clone an email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CloneEmailTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Clone an email template - """ - - # @ApiMember(Description="The email template id to clone. Get it from get_email_templates.", IsRequired=true) - id: Optional[str] = None - """ - The email template id to clone. Get it from get_email_templates. - """ - - -# @Route("/{version}/notifications/email/templates/{Id}/unarchive", "PUT") -# @Api(Description="Un-archive an email template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UnArchiveEmailTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Un-archive an email template - """ - - # @ApiMember(Description="The email template id to unarchive. Get it from get_email_templates.", IsRequired=true) - id: Optional[str] = None - """ - The email template id to unarchive. Get it from get_email_templates. - """ - - -# @Route("/{version}/notifications/email/footers/{id}", "DELETE") -# @Api(Description="Delete an email footer") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteEmailFooter(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete an email footer - """ - - # @ApiMember(Description="The email footer id to delete. Get it from get_email_footers.", IsRequired=true) - id: Optional[str] = None - """ - The email footer id to delete. Get it from get_email_footers. - """ - - -# @Route("/{version}/notifications/email/footers/{id}", "GET") -# @Api(Description="Get an email footer") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailFooter(CodeMashRequestBase, IReturn[GetEmailFooterResponse]): - """ - Get an email footer - """ - - # @ApiMember(Description="The email footer id to fetch. Get it from get_email_footers.", IsRequired=true) - id: Optional[str] = None - """ - The email footer id to fetch. Get it from get_email_footers. - """ - - -# @Route("/{version}/notifications/email/footers", "GET") -# @Api(Description="Get email footers") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailFooters(CodeMashListPaginationRequestBase, IReturn[GetEmailFootersResponse]): - """ - Get email footers - """ - - pass - - -# @Route("/{version}/notifications/email/footers", "POST") -# @Api(Description="Save an email footer") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveEmailFooterRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Save an email footer - """ - - # @ApiMember(Description="The footer id to update. Omit to create a new footer. Get it from get_email_footers.") - view_id: Optional[str] = None - """ - The footer id to update. Omit to create a new footer. Get it from get_email_footers. - """ - - - # @ApiMember(Description="The display name of the footer.", IsRequired=true) - display_name: Optional[str] = None - """ - The display name of the footer. - """ - - - # @ApiMember(Description="The per-language content translations for this footer.", IsRequired=true) - translations: List[TranslationDto] = field(default_factory=list) - """ - The per-language content translations for this footer. - """ - - -# @Route("/{version}/email/one-click-unsubscribe", "POST") -# @Api(Description="This endpoint implements the RFC 8058 one-click unsubscribe flow used by mailbox providers.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OneClickUnsubscribeRequest(RequestBase, IReturn[EmptyResponse]): - """ - This endpoint implements the RFC 8058 one-click unsubscribe flow used by mailbox providers. - """ - - # @ApiMember(Description="Encrypted unsubscribe token. The campaign batcher embedded this value in the List-Unsubscribe header.", IsRequired=true, Name="token", ParameterType="query") - token: Optional[str] = None - """ - Encrypted unsubscribe token. The campaign batcher embedded this value in the List-Unsubscribe header. - """ - - -# @Route("/{version}/email/preferences", "GET") -# @Api(Description="Read the marketing e-mail preferences of the person a signed unsubscribe link belongs to. No sign-in: the link is the key.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailPreferencesByLinkRequest(RequestBase, IReturn[GetEmailPreferencesByLinkResponse]): - """ - Read the marketing e-mail preferences of the person a signed unsubscribe link belongs to. No sign-in: the link is the key. - """ - - # @ApiMember(Description="The signed unsubscribe link token from the e-mail's Preferences or Unsubscribe link.", IsRequired=true, Name="token", ParameterType="query") - token: Optional[str] = None - """ - The signed unsubscribe link token from the e-mail's Preferences or Unsubscribe link. - """ - - -# @Route("/{version}/notifications/email/campaigns", "POST") -# @Api(Description="Create email campaign") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateEmailCampaignRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Create email campaign - """ - - campaign: Optional[EmailCampaignRequest] = None - database_integration_id: Optional[str] = None - # @ApiMember(Description="Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now.") - send_now: Optional[bool] = None - """ - Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now. - """ - - -# @Route("/{version}/notifications/email/campaigns/{Id}", "DELETE") -# @Api(Description="Deletes emails campaign from queue") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteEmailCampaignRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Deletes emails campaign from queue - """ - - id: Optional[str] = None - database_integration_id: Optional[str] = None - - -# @Route("/{version}/notifications/email/campaigns/{id}", "GET") -# @Api(Description="Gets email campaign by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaign(CodeMashRequestBase, IReturn[GetEmailCampaignResponse]): - """ - Gets email campaign by id - """ - - # @ApiMember(Description="The campaign id.") - id: Optional[str] = None - """ - The campaign id. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/email/campaigns", "GET") -# @Api(Description="Gets email campaigns") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaigns(CodeMashListPaginationRequestBase, IReturn[GetEmailCampaignsResponse]): - """ - Gets email campaigns - """ - - # @ApiMember(Description="Optional. When omitted, the project's default database integration is used (resolved server-side from the project state).") - database_integration_id: Optional[str] = None - """ - Optional. When omitted, the project's default database integration is used (resolved server-side from the project state). - """ - - - # @ApiMember(Description="Optional: return only the campaign with this id.") - campaign_id: Optional[str] = None - """ - Optional: return only the campaign with this id. - """ - - - # @ApiMember(Description="Optional: only campaigns that targeted this email address.") - email_address: Optional[str] = None - """ - Optional: only campaigns that targeted this email address. - """ - - - # @ApiMember(Description="Optional: only campaigns built on this email template id.") - template_id: Optional[str] = None - """ - Optional: only campaigns built on this email template id. - """ - - - # @ApiMember(Description="Optional lower bound for the campaign time, unix timestamp in seconds (UTC).") - from_: Optional[int] = field(metadata=config(field_name='from'), default=None) - """ - Optional lower bound for the campaign time, unix timestamp in seconds (UTC). - """ - - - # @ApiMember(Description="Optional upper bound for the campaign time, unix timestamp in seconds (UTC).") - to: Optional[int] = None - """ - Optional upper bound for the campaign time, unix timestamp in seconds (UTC). - """ - - -# @Route("/{version}/notifications/email/campaigns/{id}/batches", "GET") -# @Api(Description="Get email campaign batches") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignBatches(CodeMashListPaginationRequestBase, IReturn[GetEmailCampaignBatchesResponse]): - """ - Get email campaign batches - """ - - # @ApiMember(Description="The email campaign id to list batches for. Get it from get_email_campaigns.", IsRequired=true) - id: Optional[str] = None - """ - The email campaign id to list batches for. Get it from get_email_campaigns. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - - # @ApiMember(Description="Optional batch id to filter to a single batch. Get it from a prior call to this tool.") - batch_id: Optional[str] = None - """ - Optional batch id to filter to a single batch. Get it from a prior call to this tool. - """ - - - # @ApiMember(Description="Optional recipient email address to filter batches by.") - email_address: Optional[str] = None - """ - Optional recipient email address to filter batches by. - """ - - -# @Route("/{version}/notifications/email/campaigns/{id}/batches/{batchId}/{notificationId}", "GET") -# @Api(Description="Get an email campaign batch notification") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignBatchNotification(CodeMashListPaginationRequestBase, IReturn[GetEmailCampaignBatchNotificationResponse]): - """ - Get an email campaign batch notification - """ - - # @ApiMember(Description="The email campaign id. Get it from get_email_campaigns.", IsRequired=true) - id: Optional[str] = None - """ - The email campaign id. Get it from get_email_campaigns. - """ - - - # @ApiMember(Description="The campaign batch id. Get it from get_email_campaign_batches.", IsRequired=true) - batch_id: Optional[str] = None - """ - The campaign batch id. Get it from get_email_campaign_batches. - """ - - - # @ApiMember(Description="The notification id within the batch. Get it from get_email_campaign_batch_notifications.", IsRequired=true) - notification_id: Optional[str] = None - """ - The notification id within the batch. Get it from get_email_campaign_batch_notifications. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/email/campaigns/{id}/batches/{batchId}", "GET") -# @Api(Description="Get email campaign batch notifications") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignBatchNotifications(CodeMashListPaginationRequestBase, IReturn[GetEmailCampaignBatchNotificationsResponse]): - """ - Get email campaign batch notifications - """ - - # @ApiMember(Description="The email campaign id. Get it from get_email_campaigns.", IsRequired=true) - id: Optional[str] = None - """ - The email campaign id. Get it from get_email_campaigns. - """ - - - # @ApiMember(Description="The campaign batch id to list notifications for. Get it from get_email_campaign_batches.", IsRequired=true) - batch_id: Optional[str] = None - """ - The campaign batch id to list notifications for. Get it from get_email_campaign_batches. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/email/campaigns/{id}/stats", "GET") -# @Api(Description="Get email campaign statistics") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignStatistics(CodeMashRequestBase, IReturn[GetEmailCampaignStatisticsResponse]): - """ - Get email campaign statistics - """ - - # @ApiMember(Description="The email campaign id to get statistics for. Get it from get_email_campaigns.", IsRequired=true) - id: Optional[str] = None - """ - The email campaign id to get statistics for. Get it from get_email_campaigns. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/email/preview", "GET") -# @Api(Description="Preview an email notification") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PreviewEmailNotification(RequestBase, IReturn[PreviewEmailNotificationResponse]): - """ - Preview an email notification - """ - - # @ApiMember(Description="The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending).") - hash: Optional[str] = None - """ - The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending). - """ - - - # @ApiMember(Description="Signed-in preview by id: the project id. With a hash it must match the hash.") - project_id: Optional[str] = None - """ - Signed-in preview by id: the project id. With a hash it must match the hash. - """ - - - # @ApiMember(Description="Signed-in preview by id: the notification id (needs email:read). With a hash it must match the hash.") - notification_id: Optional[str] = None - """ - Signed-in preview by id: the notification id (needs email:read). With a hash it must match the hash. - """ - - -# @Route("/{version}/notifications/email/campaigns/{Id}/stop", "POST") -# @Api(Description="Stops a running email campaign") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StopEmailCampaignRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Stops a running email campaign - """ - - # @ApiMember(Description="The campaign id to stop.") - id: Optional[str] = None - """ - The campaign id to stop. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/emails/campaigns/{campaignId}/messages", "GET") -# @Api(Description="Get email campaign messages") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmailCampaignMessagesRequest(CodeMashListPaginationRequestBase, IReturn[GetEmailCampaignMessagesResponse]): - """ - Get email campaign messages - """ - - # @ApiMember(Description="The email campaign id. Get it from get_email_campaigns.", IsRequired=true) - campaign_id: Optional[str] = None - """ - The email campaign id. Get it from get_email_campaigns. - """ - - - # @ApiMember(Description="The campaign batch id to list messages for. Get it from get_email_campaign_batches.", IsRequired=true) - campaign_batch_id: Optional[str] = None - """ - The campaign batch id to list messages for. Get it from get_email_campaign_batches. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/sms/disable", "PUT") -# @Api(Description="Disable SMS service") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableSms(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable SMS service - """ - - pass - - -# @Route("/{version}/notifications/sms/disable-dependencies", "GET") -# @Api(Description="Lists SMS-module dependencies shown before disable") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsDisableDependencies(CodeMashRequestBase, IReturn[GetNotificationModuleDisableDependenciesResponse]): - """ - Lists SMS-module dependencies shown before disable - """ - - pass - - -# @Route("/{version}/notifications/sms/enable", "PUT") -# @Api(Description="Enable SMS service") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableSms(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enable SMS service - """ - - pass - - -# @Route("/{version}/notifications/sms/templates/{Id}/archive", "PUT") -# @Api(Description="Archives sms template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ArchiveSmsTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Archives sms template - """ - - # @ApiMember(Description="The SMS template id to archive. Get it from get_sms_templates.", IsRequired=true) - id: Optional[str] = None - """ - The SMS template id to archive. Get it from get_sms_templates. - """ - - -# @Route("/{version}/notifications/sms/templates/{Id}/clone", "POST") -# @Api(Description="Clones sms template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CloneSmsTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Clones sms template - """ - - # @ApiMember(Description="The SMS template id to clone. Get it from get_sms_templates.", IsRequired=true) - id: Optional[str] = None - """ - The SMS template id to clone. Get it from get_sms_templates. - """ - - -# @Route("/{version}/notifications/sms/templates", "POST") -# @Api(Description="Create SMS template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateSmsTemplateRequest(SaveSmsTemplate, IReturn[IdResponse]): - """ - Create SMS template - """ - - pass - - -# @Route("/{version}/notifications/sms/templates/{Id}", "DELETE") -# @Api(Description="Delete Sms Template for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteSmsTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete Sms Template for particular project - """ - - # @ApiMember(Description="The SMS template id to delete. Get it from get_sms_templates.", IsRequired=true) - id: Optional[str] = None - """ - The SMS template id to delete. Get it from get_sms_templates. - """ - - -# @Route("/{version}/notifications/sms/templates/{id}", "GET") -# @Api(Description="Gets sms template by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsTemplate(CodeMashRequestBase, IReturn[GetSmsTemplateResponse]): - """ - Gets sms template by id - """ - - # @ApiMember(Description="The SMS template id to fetch. Get it from get_sms_templates.", IsRequired=true) - id: Optional[str] = None - """ - The SMS template id to fetch. Get it from get_sms_templates. - """ - - -# @Route("/{version}/notifications/sms/templates", "GET") -# @Api(Description="Gets sms templates") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsTemplates(CodeMashListPaginationRequestBase, IReturn[GetSmsTemplatesResponse]): - """ - Gets sms templates - """ - - # @ApiMember(Description="Set true to include archived templates.") - show_archived: Optional[bool] = None - """ - Set true to include archived templates. - """ - - - # @ApiMember(Description="Optional: return only the template with this id.") - template_id: Optional[str] = None - """ - Optional: return only the template with this id. - """ - - -# @Route("/{version}/notifications/sms/templates/{id}/tokens", "GET") -# @Api(Description="Goes through the Sms template and returns all the tokens that are used in the template translations") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsMessageContentTokens(CodeMashRequestBase, IReturn[GetSmsMessageContentTokensResponse]): - """ - Goes through the Sms template and returns all the tokens that are used in the template translations - """ - - # @ApiMember(Description="The SMS template id. Get it from get_sms_templates.", IsRequired=true) - id: Optional[str] = None - """ - The SMS template id. Get it from get_sms_templates. - """ - - -# @Route("/{version}/notifications/sms/templates/render", "POST") -# @Api(Description="Runs the SMS Razor template, returns the bound text or the list of unresolved tokens.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RenderSms(CodeMashRequestBase, IReturn[RenderSmsTextResponse]): - """ - Runs the SMS Razor template, returns the bound text or the list of unresolved tokens. - """ - - # @ApiMember(Description="The Razor SMS template code to render.") - code: Optional[str] = None - """ - The Razor SMS template code to render. - """ - - - # @ApiMember(Description="Token name/value pairs to bind into the template.") - tokens: Optional[List[TokenMappingDto]] = None - """ - Token name/value pairs to bind into the template. - """ - - - # @ApiMember(Description="Set true when rendering for a preview (relaxes some validation).") - is_for_preview: bool = False - """ - Set true when rendering for a preview (relaxes some validation). - """ - - -# @Route("/{version}/notifications/sms/templates/{Id}/unarchive", "PUT") -# @Api(Description="Un-archives sms template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UnArchiveSmsTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Un-archives sms template - """ - - # @ApiMember(Description="The SMS template id to unarchive.", IsRequired=true) - id: Optional[str] = None - """ - The SMS template id to unarchive. - """ - - -# @Route("/{version}/notifications/sms/templates", "PUT") -# @Api(Description="Edit sms template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateSmsTemplateRequest(SaveSmsTemplate, IReturn[EmptyResponse]): - """ - Edit sms template - """ - - # @ApiMember(Description="The SMS template id to update. Get it from get_sms_templates.", IsRequired=true) - view_id: Optional[str] = None - """ - The SMS template id to update. Get it from get_sms_templates. - """ - - -# @Route("/{version}/notifications/sms/settings", "GET") -# @Api(Description="Gets SMS settings") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsSettings(CodeMashRequestBase, IReturn[GetSmsSettingsResponse]): - """ - Gets SMS settings - """ - - # @ApiMember(Description="Unused legacy parameter; leave empty.") - id: Optional[str] = None - """ - Unused legacy parameter; leave empty. - """ - - -# @Route("/{version}/notifications/sms/integrations/confirm-human-delivery", "POST") -# @Api(Description="Confirm that you received the test SMS delivery.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ConfirmSmsIntegrationHumanDeliveryRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Confirm that you received the test SMS delivery. - """ - - # @ApiMember(Description="The SMS integration id being verified. Get it from get_sms_integrations.") - integration_id: Optional[str] = None - """ - The SMS integration id being verified. Get it from get_sms_integrations. - """ - - -# @Route("/{version}/notifications/sms/integrations/{Id}", "DELETE") -# @Api(Description="Delete integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteSmsIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete integration for particular project - """ - - # @ApiMember(Description="The SMS integration id to delete. Get it from get_sms_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The SMS integration id to delete. Get it from get_sms_integrations. - """ - - -# @Route("/{version}/notifications/sms/integrations/{Id}/disable", "PUT") -# @Api(Description="Disable integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableSmsIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable integration for particular project - """ - - # @ApiMember(Description="The SMS integration id to disable. Get it from get_sms_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The SMS integration id to disable. Get it from get_sms_integrations. - """ - - -# @Route("/{version}/notifications/sms/integrations/{Id}/enable", "PUT") -# @Api(Description="Enable integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableSmsIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enable integration for particular project - """ - - # @ApiMember(Description="The SMS integration id to enable. Get it from get_sms_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The SMS integration id to enable. Get it from get_sms_integrations. - """ - - -# @Route("/{version}/notifications/sms/integrations/{id}", "GET") -# @Api(Description="Gets integration by specified Id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsIntegration(CodeMashRequestBase, IReturn[GetSmsIntegrationResponse]): - """ - Gets integration by specified Id - """ - - # @ApiMember(Description="The SMS integration id to fetch. Get it from get_sms_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The SMS integration id to fetch. Get it from get_sms_integrations. - """ - - -# @Route("/{version}/notifications/sms/integrations", "GET") -# @Api(Description="Gets sms integrations") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsIntegrations(CodeMashListPaginationRequestBase, IReturn[GetSmsIntegrationsResponse]): - """ - Gets sms integrations - """ - - pass - - -# @Route("/{version}/notifications/sms/integrations", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveSmsIntegration(CodeMashRequestBase, IReturn[IdResponse]): - integration: Optional[SmsIntegrationRequest] = None - - -# @Route("/{version}/notifications/sms/integrations/{Id}/default", "PUT") -# @Api(Description="Sets integration as default") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetSmsIntegrationAsDefaultRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Sets integration as default - """ - - # @ApiMember(Description="The SMS integration id to set as default. Get it from get_sms_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The SMS integration id to set as default. Get it from get_sms_integrations. - """ - - -# @Route("/{version}/notifications/sms/integrations/test", "POST") -# @Api(Description="Test SMS integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestSmsIntegration(CodeMashRequestBase, IReturn[TestSmsIntegrationResponse]): - """ - Test SMS integration - """ - - # @ApiMember(Description="The SMS integration id to test. Get it from get_sms_integrations.") - integration_id: Optional[str] = None - """ - The SMS integration id to test. Get it from get_sms_integrations. - """ - - - # @ApiMember(Description="Optional phone number (international format) to send the test SMS to.") - to: Optional[str] = None - """ - Optional phone number (international format) to send the test SMS to. - """ - - -# @Route("/{version}/notifications/sms/campaigns/{id}", "DELETE") -# @Api(Description="Deletes sms campaign from queue") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteSmsCampaign(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Deletes sms campaign from queue - """ - - # @ApiMember(Description="The campaign id to delete. Get it from get_sms_campaigns.", IsRequired=true) - id: Optional[str] = None - """ - The campaign id to delete. Get it from get_sms_campaigns. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/sms/campaigns/{id}", "GET") -# @Api(Description="Get sms campaign by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaign(CodeMashRequestBase, IReturn[GetSmsCampaignResponse]): - """ - Get sms campaign by id - """ - - # @ApiMember(Description="The campaign id.") - id: Optional[str] = None - """ - The campaign id. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/sms/campaigns", "GET") -# @Api(Description="Gets sms campaigns") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaigns(CodeMashListPaginationRequestBase, IReturn[GetSmsCampaignsResponse]): - """ - Gets sms campaigns - """ - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - - # @ApiMember(Description="Optional: return only the campaign with this id.") - campaign_id: Optional[str] = None - """ - Optional: return only the campaign with this id. - """ - - - # @ApiMember(Description="Optional: only campaigns built on this SMS template id.") - template_id: Optional[str] = None - """ - Optional: only campaigns built on this SMS template id. - """ - - - # @ApiMember(Description="Optional lower bound for the campaign time, unix timestamp in seconds (UTC).") - from_: Optional[int] = field(metadata=config(field_name='from'), default=None) - """ - Optional lower bound for the campaign time, unix timestamp in seconds (UTC). - """ - - - # @ApiMember(Description="Optional upper bound for the campaign time, unix timestamp in seconds (UTC).") - to: Optional[int] = None - """ - Optional upper bound for the campaign time, unix timestamp in seconds (UTC). - """ - - -# @Route("/{version}/notifications/sms/campaigns/{id}/batches", "GET") -# @Api(Description="Gets sms campaign batches") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignBatches(CodeMashListPaginationRequestBase, IReturn[GetSmsCampaignBatchesResponse]): - """ - Gets sms campaign batches - """ - - # @ApiMember(Description="The campaign id. Get it from get_sms_campaigns.") - id: Optional[str] = None - """ - The campaign id. Get it from get_sms_campaigns. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/sms/campaigns/{id}/batches/{batchId}/{notificationId}", "GET") -# @Api(Description="Gets sms campaign batch notification") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignBatchNotification(CodeMashListPaginationRequestBase, IReturn[GetSmsCampaignBatchNotificationResponse]): - """ - Gets sms campaign batch notification - """ - - # @ApiMember(Description="The campaign id. Get it from get_sms_campaigns.", IsRequired=true) - id: Optional[str] = None - """ - The campaign id. Get it from get_sms_campaigns. - """ - - - # @ApiMember(Description="The campaign batch id. Get it from get_sms_campaign_batches.", IsRequired=true) - batch_id: Optional[str] = None - """ - The campaign batch id. Get it from get_sms_campaign_batches. - """ - - - # @ApiMember(Description="The notification id. Get it from get_sms_campaign_batch_notifications.", IsRequired=true) - notification_id: Optional[str] = None - """ - The notification id. Get it from get_sms_campaign_batch_notifications. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/sms/campaigns/{id}/batches/{batchId}", "GET") -# @Api(Description="Gets sms campaign batch notifications") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignBatchNotifications(CodeMashListPaginationRequestBase, IReturn[GetSmsCampaignBatchNotificationsResponse]): - """ - Gets sms campaign batch notifications - """ - - # @ApiMember(Description="The campaign id. Get it from get_sms_campaigns.", IsRequired=true) - id: Optional[str] = None - """ - The campaign id. Get it from get_sms_campaigns. - """ - - - # @ApiMember(Description="The campaign batch id. Get it from get_sms_campaign_batches.", IsRequired=true) - batch_id: Optional[str] = None - """ - The campaign batch id. Get it from get_sms_campaign_batches. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/sms/campaigns/{id}/stats", "GET") -# @Api(Description="Get sms campaign statistics") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignStatistics(CodeMashRequestBase, IReturn[GetSmsCampaignStatisticsResponse]): - """ - Get sms campaign statistics - """ - - # @ApiMember(Description="The campaign id. Get it from get_sms_campaigns.", IsRequired=true) - id: Optional[str] = None - """ - The campaign id. Get it from get_sms_campaigns. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/sms/preview", "GET") -# @Api(Description="Returns SMS preview notification body") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PreviewSmsNotification(RequestBase, IReturn[PreviewSmsNotificationResponse]): - """ - Returns SMS preview notification body - """ - - # @ApiMember(Description="The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending).") - hash: Optional[str] = None - """ - The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending). - """ - - - # @ApiMember(Description="Signed-in preview by id: the project id. With a hash it must match the hash.") - project_id: Optional[str] = None - """ - Signed-in preview by id: the project id. With a hash it must match the hash. - """ - - - # @ApiMember(Description="Signed-in preview by id: the notification id (needs sms:read). With a hash it must match the hash.") - notification_id: Optional[str] = None - """ - Signed-in preview by id: the notification id (needs sms:read). With a hash it must match the hash. - """ - - -# @Route("/{version}/notifications/sms/campaigns/{Id}/stop", "POST") -# @Api(Description="Stops a running SMS campaign") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StopSmsCampaignRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Stops a running SMS campaign - """ - - # @ApiMember(Description="The campaign id to stop.") - id: Optional[str] = None - """ - The campaign id to stop. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/notifications/sms/campaigns/{campaignId}/messages", "GET") -# @Api(Description="Gets the sms notifications") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSmsCampaignMessagesRequest(CodeMashListPaginationRequestBase, IReturn[GetSmsCampaignMessagesResponse]): - """ - Gets the sms notifications - """ - - # @ApiMember(Description="The campaign id. Get it from get_sms_campaigns.", IsRequired=true) - campaign_id: Optional[str] = None - """ - The campaign id. Get it from get_sms_campaigns. - """ - - - # @ApiMember(Description="The campaign batch id. Get it from get_sms_campaign_batches.", IsRequired=true) - campaign_batch_id: Optional[str] = None - """ - The campaign batch id. Get it from get_sms_campaign_batches. - """ - - - # @ApiMember(Description="Optional. Omit to use the project default database integration (resolved per environment).") - database_integration_id: Optional[str] = None - """ - Optional. Omit to use the project default database integration (resolved per environment). - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/access", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceIntegrationAccess(CodeMashRequestBase, IReturn[GetMarketplaceIntegrationAccessResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/access/roles", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetMarketplaceIntegrationRoleAccess(CodeMashRequestBase, IReturn[IdResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - - # @ApiMember(Description="The role's composite id: acc_…_nr_… (account / team role) or pr_…_nr_… (project role).", IsRequired=true) - role_id: Optional[str] = None - """ - The role's composite id: acc_…_nr_… (account / team role) or pr_…_nr_… (project role). - """ - - - # @ApiMember(Description="None, Viewer, FunctionsOnly, ReadOnly or FullAccess.") - package: Optional[MarketplaceAccessLevel] = None - """ - None, Viewer, FunctionsOnly, ReadOnly or FullAccess. - """ - - - # @ApiMember(Description="True to also give the Manage package (edit the connection, its secrets, validation and functions).") - manage: bool = False - """ - True to also give the Manage package (edit the connection, its secrets, validation and functions). - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/access/roles/custom", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveMarketplaceIntegrationCustomAccess(CodeMashRequestBase, IReturn[SaveMarketplaceIntegrationCustomAccessResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - - # @ApiMember(Description="The role's composite id: acc_…_nr_… or pr_…_nr_….", IsRequired=true) - role_id: Optional[str] = None - """ - The role's composite id: acc_…_nr_… or pr_…_nr_…. - """ - - - # @ApiMember(Description="The package to start from: None, Viewer, FunctionsOnly, ReadOnly or FullAccess.") - base_package: Optional[MarketplaceAccessLevel] = None - """ - The package to start from: None, Viewer, FunctionsOnly, ReadOnly or FullAccess. - """ - - - # @ApiMember(Description="Tool names the role may run (from the connection's tools).") - tools: List[str] = field(default_factory=list) - """ - Tool names the role may run (from the connection's tools). - """ - - - # @ApiMember(Description="Function ids (func_…) of this connection the role may run.") - functions: List[str] = field(default_factory=list) - """ - Function ids (func_…) of this connection the role may run. - """ - - - # @ApiMember(Description="True to include the Manage rights (edit the connection, its secrets, validation and functions).") - manage: bool = False - """ - True to include the Manage rights (edit the connection, its secrets, validation and functions). - """ - - - # @ApiMember(Description="True to write a new policy for this role only when its current custom policy is shared with other roles.") - new_policy_for_this_role_only: bool = False - """ - True to write a new policy for this role only when its current custom policy is shared with other roles. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/tools", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceIntegrationTools(CodeMashRequestBase, IReturn[GetMarketplaceIntegrationToolsResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/oauth/start", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StartMarketplaceIntegrationSignIn(CodeMashRequestBase, IReturn[StartMarketplaceIntegrationSignInResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/oauth/sign-out", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SignOutMarketplaceIntegration(CodeMashRequestBase, IReturn[SignOutMarketplaceIntegrationResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/secrets", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ReplaceMarketplaceIntegrationSecretsRequest(CodeMashRequestBase, IReturn[EmptyMarketplaceSecretsResponse]): - # @ApiMember(Description="Integration view id (int_…).", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id (int_…). - """ - - - secrets: Dict[str, str] = field(default_factory=dict) - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/secrets/reveal", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RevealMarketplaceIntegrationSecretsRequest(CodeMashRequestBase, IReturn[RevealMarketplaceIntegrationSecretsResponse]): - # @ApiMember(Description="Integration view id (int_…).", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id (int_…). - """ - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/token-mappings", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetMarketplaceIntegrationTokenMappingsRequest(CodeMashRequestBase, IReturn[SetMarketplaceIntegrationTokenMappingsResponse]): - # @ApiMember(Description="Integration view id (int_…).", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id (int_…). - """ - - - token_mappings: List[TokenMappingDto] = field(default_factory=list) - - -# @Route("/{version}/code/marketplace/integrations/{IntegrationViewId}/catalog", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceFunctionCatalog(CodeMashRequestBase, IReturn[GetMarketplaceFunctionCatalogResponse]): - # @ApiMember(Description="Integration view id, from get_marketplace_integrations.", IsRequired=true) - integration_view_id: Optional[str] = None - """ - Integration view id, from get_marketplace_integrations. - """ - - -# @Route("/{version}/code/marketplace/functions/runs", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMarketplaceFunctionRuns(CodeMashRequestBase, IReturn[GetMarketplaceFunctionRunsResponse]): - # @ApiMember(Description="The marketplace function whose runs to list, from every source (func_…). One of functionId / triggerId / taskId.") - function_id: Optional[str] = None - """ - The marketplace function whose runs to list, from every source (func_…). One of functionId / triggerId / taskId. - """ - - - # @ApiMember(Description="The trigger whose marketplace function runs to list (trg_…). One of functionId / triggerId / taskId.") - trigger_id: Optional[str] = None - """ - The trigger whose marketplace function runs to list (trg_…). One of functionId / triggerId / taskId. - """ - - - # @ApiMember(Description="The scheduler task whose marketplace function runs to list (tsk_…). One of functionId / triggerId / taskId.") - task_id: Optional[str] = None - """ - The scheduler task whose marketplace function runs to list (tsk_…). One of functionId / triggerId / taskId. - """ - - - # @ApiMember(Description="The MCP connection whose tool runs to list — the calls an AI chat made to one of its tools without a saved function (int_…). One of functionId / triggerId / taskId / integrationId.") - integration_id: Optional[str] = None - """ - The MCP connection whose tool runs to list — the calls an AI chat made to one of its tools without a saved function (int_…). One of functionId / triggerId / taskId / integrationId. - """ - - - # @ApiMember(DataType="integer", Description="How many runs, newest first: 1-50. Default 20.") - limit: Optional[int] = None - """ - How many runs, newest first: 1-50. Default 20. - """ - - -# @Route("/{version}/code/functions", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeFunctions(CodeMashListPaginationRequestBase, IReturn[GetCodeFunctionsResponse]): - # @ApiMember(Description="Code integration id (int_…), from get_code_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - Code integration id (int_…), from get_code_integrations. - """ - - - # @ApiMember(Description="Only functions whose id starts with this.") - prefix: Optional[str] = None - """ - Only functions whose id starts with this. - """ - - - # @ApiMember(Description="Only functions carrying this tag: \"key\" or \"key=value\".") - tag: Optional[str] = None - """ - Only functions carrying this tag: "key" or "key=value". - """ - - -# @Route("/{version}/code/functions/event-sample", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeFunctionEventSample(CodeMashRequestBase, IReturn[GetCodeFunctionEventSampleResponse]): - # @ApiMember(Description="Database | Membership | Files | Payments | Ai | Scheduler | Manual.", IsRequired=true) - source: Optional[CodeFunctionSource] = None - """ - Database | Membership | Files | Payments | Ai | Scheduler | Manual. - """ - - - # @ApiMember(Description="The event name, e.g. database.record.inserted; omitted = the source's usual one.") - event: Optional[str] = None - """ - The event name, e.g. database.record.inserted; omitted = the source's usual one. - """ - - - # @ApiMember(Description="The schema id to put into data.database.schemaId (Database source).") - schema_id: Optional[str] = None - """ - The schema id to put into data.database.schemaId (Database source). - """ - - -# @Route("/{version}/code/functions/qualifiers", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeFunctionQualifiers(CodeMashRequestBase, IReturn[GetCodeFunctionQualifiersResponse]): - # @ApiMember(Description="Code integration id (int_…), from get_code_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - Code integration id (int_…), from get_code_integrations. - """ - - - # @ApiMember(Description="Provider-native function id, from get_code_functions.", IsRequired=true) - function_id: Optional[str] = None - """ - Provider-native function id, from get_code_functions. - """ - - -# @Route("/{version}/code/functions/runs", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetCodeFunctionRuns(CodeMashRequestBase, IReturn[GetCodeFunctionRunsResponse]): - # @ApiMember(Description="The trigger whose function runs to list (trg_…). One of triggerId / taskId.") - trigger_id: Optional[str] = None - """ - The trigger whose function runs to list (trg_…). One of triggerId / taskId. - """ - - - # @ApiMember(Description="The scheduler task whose function runs to list (tsk_…). One of triggerId / taskId.") - task_id: Optional[str] = None - """ - The scheduler task whose function runs to list (tsk_…). One of triggerId / taskId. - """ - - - # @ApiMember(DataType="integer", Description="How many runs, newest first: 1-50. Default 20.") - limit: Optional[int] = None - """ - How many runs, newest first: 1-50. Default 20. - """ - - -# @Route("/{version}/code/functions/invoke", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InvokeCodeFunction(CodeMashRequestBase, IReturn[InvokeCodeFunctionResponse]): - # @ApiMember(Description="Which function: { integrationId, functionId, qualifier? }.", IsRequired=true) - function_ref: Optional[FunctionRefDto] = None - """ - Which function: { integrationId, functionId, qualifier? }. - """ - - - payload: Optional[Dict[str, Object]] = None - # @ApiMember(Description="Sync (wait for the result, default) or Async (fire and forget).") - invocation_type: Optional[CodeInvocationType] = None - """ - Sync (wait for the result, default) or Async (fire and forget). - """ - - - # @ApiMember(Description="The service user the function acts as (usr_…); omitted = you.") - run_as_user_id: Optional[str] = None - """ - The service user the function acts as (usr_…); omitted = you. - """ - - - # @ApiMember(Description="A JSON object → envelope config. No bindings: a manual call has nothing to bind them with.") - config: Optional[str] = None - """ - A JSON object → envelope config. No bindings: a manual call has nothing to bind them with. - """ - - -# @Route("/{version}/notifications/push/disable", "PUT") -# @Api(Description="Disable push service") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisablePush(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable push service - """ - - pass - - -# @Route("/{version}/notifications/push/disable-dependencies", "GET") -# @Api(Description="Lists push disable dependencies") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushDisableDependencies(CodeMashRequestBase, IReturn[GetNotificationModuleDisableDependenciesResponse]): - """ - Lists push disable dependencies - """ - - pass - - -# @Route("/{version}/notifications/push/enable", "PUT") -# @Api(Description="Enable push service") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnablePush(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enable push service - """ - - pass - - -# @Route("/{version}/notifications/push/templates/{Id}/archive", "PUT") -# @Api(Description="Archives push template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ArchivePushTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Archives push template - """ - - # @ApiMember(Description="The push template id to archive. Get it from get_push_templates.", IsRequired=true) - id: Optional[str] = None - """ - The push template id to archive. Get it from get_push_templates. - """ - - -# @Route("/{version}/notifications/push/templates/{Id}/clone", "POST") -# @Api(Description="Clones push template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ClonePushTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Clones push template - """ - - # @ApiMember(Description="The push template id to clone. Get it from get_push_templates.", IsRequired=true) - id: Optional[str] = None - """ - The push template id to clone. Get it from get_push_templates. - """ - - -# @Route("/{version}/notifications/push/templates", "POST") -# @Api(Description="Create push template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreatePushTemplateRequest(SavePushTemplate, IReturn[IdResponse]): - """ - Create push template - """ - - pass - - -# @Route("/{version}/notifications/push/templates/{Id}", "DELETE") -# @Api(Description="Delete push template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeletePushTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete push template - """ - - # @ApiMember(Description="The push template id to delete. Get it from get_push_templates.", IsRequired=true) - id: Optional[str] = None - """ - The push template id to delete. Get it from get_push_templates. - """ - - -# @Route("/{version}/notifications/push/templates/{id}", "GET") -# @Api(Description="Gets a push template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushTemplate(CodeMashRequestBase, IReturn[GetPushTemplateResponse]): - """ - Gets a push template - """ - - # @ApiMember(Description="The push template id to fetch. Get it from get_push_templates.") - id: Optional[str] = None - """ - The push template id to fetch. Get it from get_push_templates. - """ - - -# @Route("/{version}/notifications/push/templates", "GET") -# @Api(Description="Gets push templates") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushTemplates(CodeMashListPaginationRequestBase, IReturn[GetPushTemplatesResponse]): - """ - Gets push templates - """ - - # @ApiMember(Description="Set true to include archived templates.") - show_archived: Optional[bool] = None - """ - Set true to include archived templates. - """ - - - # @ApiMember(Description="Optional: return only the template with this id.") - template_id: Optional[str] = None - """ - Optional: return only the template with this id. - """ - - -# @Route("/{version}/notifications/push/templates/{id}/tokens", "GET") -# @Api(Description="Gets push template content tokens") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushMessageContentTokens(CodeMashRequestBase, IReturn[GetPushMessageContentTokensResponse]): - """ - Gets push template content tokens - """ - - # @ApiMember(Description="The push template id to scan for tokens. Get it from get_push_templates.") - id: Optional[str] = None - """ - The push template id to scan for tokens. Get it from get_push_templates. - """ - - -# @Route("/{version}/notifications/push/templates/render", "POST") -# @Api(Description="Renders a push template field") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RenderPush(CodeMashRequestBase, IReturn[RenderPushResponse]): - """ - Renders a push template field - """ - - # @ApiMember(Description="The Razor template source for the field being rendered (Title, Body, or Subtitle).", IsRequired=true) - code: Optional[str] = None - """ - The Razor template source for the field being rendered (Title, Body, or Subtitle). - """ - - - # @ApiMember(Description="Optional token values already bound for this render pass.") - tokens: Optional[List[TokenMappingDto]] = None - """ - Optional token values already bound for this render pass. - """ - - - # @ApiMember(Description="Set true when rendering for a preview (relaxes strict validation).") - is_for_preview: bool = False - """ - Set true when rendering for a preview (relaxes strict validation). - """ - - -# @Route("/{version}/notifications/push/templates/{Id}/unarchive", "PUT") -# @Api(Description="Un-archives push template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UnArchivePushTemplateRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Un-archives push template - """ - - # @ApiMember(Description="The push template id to unarchive.", IsRequired=true) - id: Optional[str] = None - """ - The push template id to unarchive. - """ - - -# @Route("/{version}/notifications/push/templates", "PUT") -# @Api(Description="Edit push template") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdatePushTemplateRequest(SavePushTemplate, IReturn[EmptyResponse]): - """ - Edit push template - """ - - # @ApiMember(Description="The push template id to update. Get it from get_push_templates.", IsRequired=true) - view_id: Optional[str] = None - """ - The push template id to update. Get it from get_push_templates. - """ - - -# @Route("/{version}/notifications/push/settings", "GET") -# @Api(Description="Gets push settings") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushSettings(CodeMashRequestBase, IReturn[GetPushSettingsResponse]): - """ - Gets push settings - """ - - # @ApiMember(Description="The push settings id to fetch.") - id: Optional[str] = None - """ - The push settings id to fetch. - """ - - -# @Route("/{version}/notifications/push/integrations/confirm-human-delivery", "POST") -# @Api(Description="Confirm human delivery of a test push") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ConfirmPushIntegrationHumanDeliveryRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Confirm human delivery of a test push - """ - - # @ApiMember(Description="The push integration id being verified. Get it from get_push_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - The push integration id being verified. Get it from get_push_integrations. - """ - - -# @Route("/{version}/notifications/push/integrations/{Id}", "DELETE") -# @Api(Description="Delete push integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeletePushIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete push integration - """ - - # @ApiMember(Description="The push integration id to delete. Get it from get_push_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The push integration id to delete. Get it from get_push_integrations. - """ - - -# @Route("/{version}/notifications/push/integrations/{Id}/disable", "PUT") -# @Api(Description="Disable push integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisablePushIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable push integration - """ - - # @ApiMember(Description="The push integration id to disable. Get it from get_push_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The push integration id to disable. Get it from get_push_integrations. - """ - - -# @Route("/{version}/notifications/push/integrations/{Id}/enable", "PUT") -# @Api(Description="Enable push integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnablePushIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enable push integration - """ - - # @ApiMember(Description="The push integration id to enable. Get it from get_push_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The push integration id to enable. Get it from get_push_integrations. - """ - - -# @Route("/{version}/notifications/push/integrations/{id}", "GET") -# @Api(Description="Gets a push integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushIntegration(CodeMashRequestBase, IReturn[GetPushIntegrationResponse]): - """ - Gets a push integration - """ - - # @ApiMember(Description="The push integration id to fetch. Get it from get_push_integrations.") - id: Optional[str] = None - """ - The push integration id to fetch. Get it from get_push_integrations. - """ - - -# @Route("/{version}/notifications/push/integrations", "GET") -# @Api(Description="Gets push integrations") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushIntegrations(CodeMashListPaginationRequestBase, IReturn[GetPushIntegrationsResponse]): - """ - Gets push integrations - """ - - pass - - -# @Route("/{version}/notifications/push/integrations", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SavePushIntegration(CodeMashRequestBase, IReturn[IdResponse]): - integration: Optional[PushIntegrationRequest] = None - - -# @Route("/{version}/notifications/push/integrations/{Id}/default", "PUT") -# @Api(Description="Sets push integration as default") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetPushIntegrationAsDefaultRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Sets push integration as default - """ - - # @ApiMember(Description="The push integration id to set as default. Get it from get_push_integrations.", IsRequired=true) - id: Optional[str] = None - """ - The push integration id to set as default. Get it from get_push_integrations. - """ - - -# @Route("/{version}/notifications/push/integrations/test", "POST") -# @Api(Description="Test push integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestPushIntegration(CodeMashRequestBase, IReturn[TestEmailIntegrationResponse]): - """ - Test push integration - """ - - # @ApiMember(Description="The push integration id to test. Get it from get_push_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - The push integration id to test. Get it from get_push_integrations. - """ - - - # @ApiMember(Description="The device token the test is sent to — a device registered for the person receiving the test (get it from get_push_devices). Required for every real provider (only the Sandbox integration tests without one). For a web device it is the browser subscription JSON. Requires DeliveryFamily.") - test_token: Optional[str] = None - """ - The device token the test is sent to — a device registered for the person receiving the test (get it from get_push_devices). Required for every real provider (only the Sandbox integration tests without one). For a web device it is the browser subscription JSON. Requires DeliveryFamily. - """ - - - # @ApiMember(Description="The delivery family of TestToken: ios, android, chrome (any browser web push) or safari. Requires TestToken.") - delivery_family: Optional[str] = None - """ - The delivery family of TestToken: ios, android, chrome (any browser web push) or safari. Requires TestToken. - """ - - -# @Route("/{version}/notifications/push/devices", "POST") -# @Api(Description="Registers a device for push notifications") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RegisterDevice(RequestBase, IReturn[IdResponse], IHasProjectId): - """ - Registers a device for push notifications - """ - - # @ApiMember(Description="The device details: OS, token, model, and delivery family.", IsRequired=true) - push_device_dto: Optional[PushDeviceDto] = None - """ - The device details: OS, token, model, and delivery family. - """ - - - # @ApiMember(Description="The id of the user this device belongs to.", IsRequired=true) - user_id: Optional[str] = None - """ - The id of the user this device belongs to. - """ - - - project_id: Optional[str] = None - # @ApiMember(Description="Optional account id to associate with the device.") - account_id: Optional[str] = None - """ - Optional account id to associate with the device. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - -# @Route("/{version}/notifications/push/devices/{id}", "GET") -# @Api(Description="Gets a registered push device") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushDevice(CodeMashRequestBase, IReturn[GetPushDeviceResponse]): - """ - Gets a registered push device - """ - - # @ApiMember(Description="The device id to fetch. Get it from get_push_devices.") - id: Optional[str] = None - """ - The device id to fetch. Get it from get_push_devices. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - -# @Route("/{version}/notifications/push/devices", "GET") -# @Api(Description="Gets registered push devices") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushDevices(CodeMashListPaginationRequestBase, IReturn[GetPushDevicesResponse]): - """ - Gets registered push devices - """ - - # @ApiMember(Description="Optional: only the devices of this user.") - user_id: Optional[str] = None - """ - Optional: only the devices of this user. - """ - - - # @ApiMember(Description="Optional: only the device registered with this provider token.") - device_key: Optional[str] = None - """ - Optional: only the device registered with this provider token. - """ - - - # @ApiMember(Description="Optional: only devices of this platform — ios, android, chrome or safari.") - platform: Optional[str] = None - """ - Optional: only devices of this platform — ios, android, chrome or safari. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - -# @Route("/{version}/notifications/push/campaigns/audience-count", "POST") -# @Api(Description="Count the devices a push campaign audience would reach") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignAudienceCountRequest(CodeMashRequestBase, IReturn[GetPushCampaignAudienceCountResponse]): - """ - Count the devices a push campaign audience would reach - """ - - # @ApiMember(Description="The audience, in the same shape as CreatePushCampaignRequest.campaign. Template and send options are ignored.") - campaign: Optional[PushCampaignRequest] = None - """ - The audience, in the same shape as CreatePushCampaignRequest.campaign. Template and send options are ignored. - """ - - - # @ApiMember(Description="Optional. When omitted, the default database integration for the request's environment is used.") - database_integration_id: Optional[str] = None - """ - Optional. When omitted, the default database integration for the request's environment is used. - """ - - -# @Route("/{version}/notifications/push/campaigns", "POST") -# @Api(Description="Create push campaign") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreatePushCampaignRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Create push campaign - """ - - campaign: Optional[PushCampaignRequest] = None - database_integration_id: Optional[str] = None - # @ApiMember(Description="Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now.") - send_now: Optional[bool] = None - """ - Optional. true sends the campaign now (or at a campaignTime sooner than the review window). Without it, a campaign created by an AI tool must be scheduled at least 24 hours ahead for role-based / all-users / collection audiences and at least 1 hour ahead for direct recipient lists, or it is rejected with CM-ERRORS-CAMPAIGNS-017. Set it only when the user explicitly asked to send now. - """ - - -# @Route("/{version}/notifications/push/campaigns/{Id}", "DELETE") -# @Api(Description="Deletes push campaign from queue") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeletePushCampaignRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Deletes push campaign from queue - """ - - # @ApiMember(Description="The push campaign id to delete. Get it from get_push_campaigns.", IsRequired=true) - id: Optional[str] = None - """ - The push campaign id to delete. Get it from get_push_campaigns. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - -# @Route("/{version}/notifications/push/campaigns/{id}", "GET") -# @Api(Description="Gets push campaign by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaign(CodeMashRequestBase, IReturn[GetPushCampaignResponse]): - """ - Gets push campaign by id - """ - - # @ApiMember(Description="The campaign id.") - id: Optional[str] = None - """ - The campaign id. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - -# @Route("/{version}/notifications/push/campaigns", "GET") -# @Api(Description="Gets push campaigns") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaigns(CodeMashListPaginationRequestBase, IReturn[GetPushCampaignsResponse]): - """ - Gets push campaigns - """ - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - - # @ApiMember(Description="Optional: only campaigns built on this push template id.") - template_id: Optional[str] = None - """ - Optional: only campaigns built on this push template id. - """ - - - # @ApiMember(Description="Optional lower bound for the campaign time, unix timestamp in seconds (UTC).") - from_: Optional[int] = field(metadata=config(field_name='from'), default=None) - """ - Optional lower bound for the campaign time, unix timestamp in seconds (UTC). - """ - - - # @ApiMember(Description="Optional upper bound for the campaign time, unix timestamp in seconds (UTC).") - to: Optional[int] = None - """ - Optional upper bound for the campaign time, unix timestamp in seconds (UTC). - """ - - -# @Route("/{version}/notifications/push/campaigns/{id}/batches", "GET") -# @Api(Description="Gets push campaign batches") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignBatches(CodeMashListPaginationRequestBase, IReturn[GetPushCampaignBatchesResponse]): - """ - Gets push campaign batches - """ - - # @ApiMember(Description="The push campaign id to list batches for. Get it from get_push_campaigns.") - id: Optional[str] = None - """ - The push campaign id to list batches for. Get it from get_push_campaigns. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - - # @ApiMember(Description="Optional: only return the batch with this id.") - batch_id: Optional[str] = None - """ - Optional: only return the batch with this id. - """ - - -# @Route("/{version}/notifications/push/campaigns/{id}/batches/{batchId}/{notificationId}", "GET") -# @Api(Description="Gets a push campaign batch notification") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignBatchNotification(CodeMashListPaginationRequestBase, IReturn[GetPushCampaignBatchNotificationResponse]): - """ - Gets a push campaign batch notification - """ - - # @ApiMember(Description="The push campaign id. Get it from get_push_campaigns.") - id: Optional[str] = None - """ - The push campaign id. Get it from get_push_campaigns. - """ - - - # @ApiMember(Description="The batch id. Get it from get_push_campaign_batches.") - batch_id: Optional[str] = None - """ - The batch id. Get it from get_push_campaign_batches. - """ - - - # @ApiMember(Description="The notification id within the batch.") - notification_id: Optional[str] = None - """ - The notification id within the batch. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - -# @Route("/{version}/notifications/push/campaigns/{id}/batches/{batchId}", "GET") -# @Api(Description="Gets push campaign batch notifications") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignBatchNotifications(CodeMashListPaginationRequestBase, IReturn[GetPushCampaignBatchNotificationsResponse]): - """ - Gets push campaign batch notifications - """ - - # @ApiMember(Description="The push campaign id. Get it from get_push_campaigns.") - id: Optional[str] = None - """ - The push campaign id. Get it from get_push_campaigns. - """ - - - # @ApiMember(Description="The batch id to list notifications for. Get it from get_push_campaign_batches.") - batch_id: Optional[str] = None - """ - The batch id to list notifications for. Get it from get_push_campaign_batches. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - -# @Route("/{version}/notifications/push/campaigns/{id}/stats", "GET") -# @Api(Description="Get push campaign statistics") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignStatistics(CodeMashRequestBase, IReturn[GetPushCampaignStatisticsResponse]): - """ - Get push campaign statistics - """ - - # @ApiMember(Description="The push campaign id to get statistics for. Get it from get_push_campaigns.") - id: Optional[str] = None - """ - The push campaign id to get statistics for. Get it from get_push_campaigns. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - -# @Route("/{version}/notifications/push/preview", "GET") -# @Api(Description="Returns push preview notification") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PreviewPushNotification(RequestBase, IReturn[PreviewPushNotificationResponse]): - """ - Returns push preview notification - """ - - # @ApiMember(Description="The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending).") - hash: Optional[str] = None - """ - The signed preview link hash. With it the preview opens without sign-in: exactly one notification, until the link expires (30 days after sending). - """ - - - # @ApiMember(Description="Signed-in preview by id: the project id. With a hash it must match the hash.") - project_id: Optional[str] = None - """ - Signed-in preview by id: the project id. With a hash it must match the hash. - """ - - - # @ApiMember(Description="Signed-in preview by id: the notification id (needs push:read). With a hash it must match the hash.") - notification_id: Optional[str] = None - """ - Signed-in preview by id: the notification id (needs push:read). With a hash it must match the hash. - """ - - -# @Route("/{version}/notifications/push/campaigns/{Id}/stop", "POST") -# @Api(Description="Stops a running push campaign") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StopPushCampaignRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Stops a running push campaign - """ - - # @ApiMember(Description="The campaign id to stop.") - id: Optional[str] = None - """ - The campaign id to stop. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - -# @Route("/{version}/notifications/push/campaigns/{campaignId}/messages", "GET") -# @Api(Description="Gets push campaign messages") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPushCampaignMessagesRequest(CodeMashListPaginationRequestBase, IReturn[GetPushCampaignMessagesResponse]): - """ - Gets push campaign messages - """ - - # @ApiMember(Description="The push campaign id. Get it from get_push_campaigns.") - campaign_id: Optional[str] = None - """ - The push campaign id. Get it from get_push_campaigns. - """ - - - # @ApiMember(Description="Optional: restrict results to this batch id. Get it from get_push_campaign_batches.") - campaign_batch_id: Optional[str] = None - """ - Optional: restrict results to this batch id. Get it from get_push_campaign_batches. - """ - - - # @ApiMember(Description="Optional database integration id; omit to use the project's default.") - database_integration_id: Optional[str] = None - """ - Optional database integration id; omit to use the project's default. - """ - - -# @Route("/{version}/notifications/inbox", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetNotificationInboxRequest(CodeMashListPaginationRequestBase, IReturn[GetNotificationInboxResponse]): - unread_only: bool = False - channel: Optional[str] = None - - -# @Route("/{version}/notifications/inbox/unread-count", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetUnreadCountRequest(CodeMashRequestBase, IReturn[GetUnreadCountResponse]): - pass - - -# @Route("/{version}/notifications/inbox/{notificationId}/read", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkNotificationReadRequest(CodeMashRequestBase, IReturn[MarkNotificationReadResponse]): - notification_id: Optional[str] = None - - -# @Route("/{version}/notifications/inbox/read-all", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkAllNotificationsReadRequest(CodeMashRequestBase, IReturn[MarkAllNotificationsReadResponse]): - pass - - -# @Route("/{version}/payments/disable", "PUT") -# @Api(Description="Disable payments service") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisablePayments(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable payments service - """ - - pass - - -# @Route("/{version}/payments/enable", "PUT") -# @Api(Description="Enable payments service") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnablePayments(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enable payments service - """ - - pass - - -# @Route("/{version}/payments/webhooks/log", "GET") -# @Api(Description="Gets the received payment webhooks log") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentsWebhookLog(CodeMashRequestBase, IReturn[GetPaymentsWebhookLogResponse]): - """ - Gets the received payment webhooks log - """ - - # @ApiMember(DataType="string", Description="Only rows for this payments integration (view id). Omit for the whole project.") - integration_id: Optional[str] = None - """ - Only rows for this payments integration (view id). Omit for the whole project. - """ - - - # @ApiMember(DataType="int", Description="Max rows to return, newest first. Default 50, ceiling 200.") - limit: Optional[int] = None - """ - Max rows to return, newest first. Default 50, ceiling 200. - """ - - -# @Route("/{version}/payments/triggers/{triggerId}", "DELETE") -# @Api(Description="Delete payments trigger") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeletePaymentsTrigger(DeleteTrigger, IReturn[EmptyResponse]): - """ - Delete payments trigger - """ - - pass - - -# @Route("/{version}/payments/triggers/{triggerId}/disable", "PATCH") -# @Api(Description="Disable payments trigger") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisablePaymentsTrigger(DisableTrigger, IReturn[EmptyResponse]): - """ - Disable payments trigger - """ - - pass - - -# @Route("/{version}/payments/triggers/{triggerId}/enable", "PATCH") -# @Api(Description="Enable payments trigger") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnablePaymentsTrigger(EnableTrigger, IReturn[EmptyResponse]): - """ - Enable payments trigger - """ - - pass - - -# @Route("/{version}/payments/triggers/{id}", "GET") -# @Api(Description="Gets payments trigger by specified Id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentsTrigger(GetTrigger, IReturn[GetPaymentsTriggerResponse]): - """ - Gets payments trigger by specified Id - """ - - pass - - -# @Route("/{version}/payments/triggers", "GET") -# @Api(Description="Gets payments triggers") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentsTriggers(GetTriggers, IReturn[GetPaymentsTriggersResponse]): - """ - Gets payments triggers - """ - - pass - - -# @Route("/{version}/payments/triggers", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SavePaymentsTrigger(SaveTrigger, IReturn[IdResponse]): - pass - - -# @Route("/{version}/payments/integrations/confirm-human-delivery", "POST") -# @Api(Description="Confirm that you received or verified the test payment integration outcome.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ConfirmPaymentsIntegrationHumanDeliveryRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Confirm that you received or verified the test payment integration outcome. - """ - - # @ApiMember(Description="The id of the payments integration whose test outcome is being confirmed.", IsRequired=true) - integration_id: Optional[str] = None - """ - The id of the payments integration whose test outcome is being confirmed. - """ - - -# @Route("/{version}/payments/integrations/{Id}", "DELETE") -# @Api(Description="Delete integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeletePaymentsIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete integration for particular project - """ - - # @ApiMember(Description="Payments integration id to delete, from get_payments_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Payments integration id to delete, from get_payments_integrations. - """ - - -# @Route("/{version}/payments/integrations/{Id}/disable", "PUT") -# @Api(Description="Disable integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisablePaymentsIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable integration for particular project - """ - - # @ApiMember(Description="Payments integration id to disable, from get_payments_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Payments integration id to disable, from get_payments_integrations. - """ - - -# @Route("/{version}/payments/integrations/{Id}/enable", "PUT") -# @Api(Description="Enable integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnablePaymentsIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enable integration for particular project - """ - - # @ApiMember(Description="Payments integration id to enable, from get_payments_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Payments integration id to enable, from get_payments_integrations. - """ - - -# @Route("/{version}/payments/integrations/{id}", "GET") -# @Api(Description="Gets integration by specified Id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentsIntegration(CodeMashRequestBase, IReturn[GetPaymentsIntegrationResponse]): - """ - Gets integration by specified Id - """ - - # @ApiMember(Description="Payments integration id to fetch, from get_payments_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Payments integration id to fetch, from get_payments_integrations. - """ - - -# @Route("/{version}/payments/integrations", "GET") -# @Api(Description="Gets integrations") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetPaymentsIntegrations(CodeMashListPaginationRequestBase, IReturn[GetPaymentsIntegrationsResponse]): - """ - Gets integrations - """ - - pass - - -# @Route("/{version}/payments/integrations", "POST") -# @Api(Description="Saves payments integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SavePaymentsIntegration(CodeMashRequestBase, IReturn[IdResponse]): - """ - Saves payments integration - """ - - integration: Optional[PaymentIntegrationRequest] = None - - -# @Route("/{version}/payments/integrations/test", "POST") -# @Api(Description="Test payments integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestPaymentsIntegration(CodeMashRequestBase, IReturn[TestPaymentsIntegrationResponse]): - """ - Test payments integration - """ - - # @ApiMember(Description="The id of the payments integration to test.", IsRequired=true) - integration_id: Optional[str] = None - """ - The id of the payments integration to test. - """ - - -# @Route("/{version}/logs/disable", "PUT") -# @Api(Description="Disable logging service") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableLogging(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable logging service - """ - - pass - - -# @Route("/{version}/logs/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableLogging(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(DataType="boolean", Description="When true, also create a Norbix Logging integration backed by the project's default database.", Name="createNorbixLogging", ParameterType="query") - create_norbix_logging: bool = False - """ - When true, also create a Norbix Logging integration backed by the project's default database. - """ - - -# @Route("/{version}/logs/integrations/{Id}", "DELETE") -# @Api(Description="Delete integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteLoggingIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Delete integration for particular project - """ - - # @ApiMember(Description="Logging integration id to delete, from get_logging_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Logging integration id to delete, from get_logging_integrations. - """ - - - # @ApiMember(Description="When true and this is a Norbix Logging integration, also permanently wipes the stored log entries in its backing database. Ignored for other providers.") - wipe_logs: bool = False - """ - When true and this is a Norbix Logging integration, also permanently wipes the stored log entries in its backing database. Ignored for other providers. - """ - - -# @Route("/{version}/logs/integrations/{Id}/disable", "PUT") -# @Api(Description="Disable integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableLoggingIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Disable integration for particular project - """ - - # @ApiMember(Description="Logging integration id to disable, from get_logging_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Logging integration id to disable, from get_logging_integrations. - """ - - -# @Route("/{version}/logs/integrations/{Id}/enable", "PUT") -# @Api(Description="Enable integration for particular project") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableLoggingIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Enable integration for particular project - """ - - # @ApiMember(Description="Logging integration id to enable, from get_logging_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Logging integration id to enable, from get_logging_integrations. - """ - - -# @Route("/{version}/logs/integrations/{id}", "GET") -# @Api(Description="Gets integration by specified Id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLoggingIntegration(CodeMashRequestBase, IReturn[GetLoggingIntegrationResponse]): - """ - Gets integration by specified Id - """ - - # @ApiMember(Description="Logging integration id to fetch, from get_logging_integrations.", IsRequired=true) - id: Optional[str] = None - """ - Logging integration id to fetch, from get_logging_integrations. - """ - - -# @Route("/{version}/logs/integrations", "GET") -# @Api(Description="Gets integrations") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLoggingIntegrations(CodeMashListPaginationRequestBase, IReturn[GetLoggingIntegrationsResponse]): - """ - Gets integrations - """ - - pass - - -# @Route("/{version}/logs/integrations", "POST") -# @Api(Description="Saves logging integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveLoggingIntegration(CodeMashRequestBase, IReturn[IdResponse]): - """ - Saves logging integration - """ - - integration: Optional[LoggingIntegrationRequest] = None - - -# @Route("/{version}/logs/integrations/test", "POST") -# @Api(Description="Test logging integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestLoggingIntegration(CodeMashRequestBase, IReturn[TestLoggingIntegrationResponse]): - """ - Test logging integration - """ - - # @ApiMember(Description="Logging integration id to test, from get_logging_integrations.", IsRequired=true) - integration_id: Optional[str] = None - """ - Logging integration id to test, from get_logging_integrations. - """ - - -# @Route("/{version}/logs/clean", "POST") -# @Api(Description="Delete every log entry stored in the project's Norbix Logging integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CleanLogs(CodeMashRequestBase, IReturn[CleanLogsResponse]): - """ - Delete every log entry stored in the project's Norbix Logging integration - """ - - pass - - -# @Route("/{version}/logs/audit", "GET") -# @Api(Description="Fetch the audit trail for a correlation id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLogsByCorrelationId(CodeMashRequestBase, IReturn[GetLogsByCorrelationIdResponse]): - """ - Fetch the audit trail for a correlation id - """ - - # @ApiMember(DataType="string", Description="The correlation id whose full request trail you want.", IsRequired=true, Name="correlationId", ParameterType="query") - target_correlation_id: Optional[str] = None - """ - The correlation id whose full request trail you want. - """ - - -# @Route("/{version}/logs", "GET") -# @Api(Description="Fetch a filtered, cursor-paged list of tenant log entries") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLogs(CodeMashListPaginationRequestBase, IReturn[GetLogsResponse]): - """ - Fetch a filtered, cursor-paged list of tenant log entries - """ - - # @ApiMember(DataType="string", Description="Severity filter: Information, Warning or Error.", Name="level", ParameterType="query") - level: Optional[str] = None - """ - Severity filter: Information, Warning or Error. - """ - - - # @ApiMember(DataType="string", Description="Module filter: Database, Email, Membership, etc.", Name="module", ParameterType="query") - module: Optional[str] = None - """ - Module filter: Database, Email, Membership, etc. - """ - - - # @ApiMember(DataType="string", Description="Correlation id filter. Empty = no filter (show all).", Name="logCorrelationId", ParameterType="query") - log_correlation_id: Optional[str] = None - """ - Correlation id filter. Empty = no filter (show all). - """ - - - # @ApiMember(DataType="string", Description="Exact event code filter (e.g. db:record:insert).", Name="eventCode", ParameterType="query") - event_code: Optional[str] = None - """ - Exact event code filter (e.g. db:record:insert). - """ - - - # @ApiMember(DataType="string", Description="Free-text search over title and message.", Name="search", ParameterType="query") - search: Optional[str] = None - """ - Free-text search over title and message. - """ - - - # @ApiMember(DataType="string", Description="Meta key to filter on (e.g. taskId). Letters, digits and _ only. Must come with metaValue.", Name="metaKey", ParameterType="query") - meta_key: Optional[str] = None - """ - Meta key to filter on (e.g. taskId). Letters, digits and _ only. Must come with metaValue. - """ - - - # @ApiMember(DataType="string", Description="Exact Meta value for metaKey (e.g. a task id tsk_...). Must come with metaKey.", Name="metaValue", ParameterType="query") - meta_value: Optional[str] = None - """ - Exact Meta value for metaKey (e.g. a task id tsk_...). Must come with metaKey. - """ - - - # @ApiMember(Description="Start of the timestamp range (inclusive, UTC). Optional.") - from_utc: Optional[datetime.datetime] = None - """ - Start of the timestamp range (inclusive, UTC). Optional. - """ - - - # @ApiMember(Description="End of the timestamp range (inclusive, UTC). Optional.") - to_utc: Optional[datetime.datetime] = None - """ - End of the timestamp range (inclusive, UTC). Optional. - """ - - -# @Route("/{version}/logs/settings", "GET") -# @Api(Description="Fetch the per-project log settings (flags)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLogSettings(CodeMashRequestBase, IReturn[GetLogSettingsResponse]): - """ - Fetch the per-project log settings (flags) - """ - - pass - - -# @Route("/{version}/logs/settings", "POST") -# @Api(Description="Update the per-project log settings (flags)") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveLogSettings(CodeMashRequestBase, IReturn[SaveLogSettingsResponse]): - """ - Update the per-project log settings (flags) - """ - - # @ApiMember(Description="Drop log entries from requests originating from the Norbix studio (cloud dashboard).") - skip_cloud_dashboard_logs: bool = False - """ - Drop log entries from requests originating from the Norbix studio (cloud dashboard). - """ - - - # @ApiMember(Description="Strip request/response body meta off http:request / http:response log entries.") - skip_http_body_meta: bool = False - """ - Strip request/response body meta off http:request / http:response log entries. - """ - - - # @ApiMember(Description="Turn on tenant-visible log entries for AI chat turns. Default false.") - ai_chat_logging_enabled: bool = False - """ - Turn on tenant-visible log entries for AI chat turns. Default false. - """ - - -# @Route("/{version}/account/agent/onboarding", "GET") -# @Api(Description="Paste-ready prompt and client snippets to connect an AI tool to this installation.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAgentOnboardingRequest(RequestBase, IReturn[GetAgentOnboardingResponse]): - """ - Paste-ready prompt and client snippets to connect an AI tool to this installation. - """ - - pass - - -# @Route("/{version}/account/ai/context", "GET") -# @Api(Description="The AI project-context summary: the projects the caller may work on, with their settings — never a secret.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAiContextRequest(RequestBase, IReturn[GetAiContextResponse]): - """ - The AI project-context summary: the projects the caller may work on, with their settings — never a secret. - """ - - project_id: Optional[str] = None - format: Optional[str] = None - known_version: Optional[str] = None - - -# @Route("/{version}/account/ai/tools", "GET") -# @Api(Description="Lists the AI tools this host exposes (external-agent bridge).") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAiToolsRequest(RequestBase, IReturn[GetAiToolsResponse]): - """ - Lists the AI tools this host exposes (external-agent bridge). - """ - - toolset: Optional[str] = None - - -# @Route("/{version}/account/ai/tools/{ToolName}", "POST") -# @Api(Description="Invokes one AI tool directly (external-agent bridge).") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InvokeAiToolRequest(RequestBase, IReturn[InvokeAiToolResponse]): - """ - Invokes one AI tool directly (external-agent bridge). - """ - - tool_name: Optional[str] = None - arguments_json: Optional[str] = None - - -# @Route("/{version}/account/chat/attachments", "POST") -# @Api(Description="Uploads a file into an AI chat session.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UploadChatAttachmentRequest(RequestBase, IReturn[UploadChatAttachmentResponse]): - """ - Uploads a file into an AI chat session. - """ - - session_id: Optional[str] = None - file_name: Optional[str] = None - content_type: Optional[str] = None - base64_content: Optional[str] = None - profile: Optional[str] = None - topic: Optional[str] = None - project_id: Optional[str] = None - env: Optional[str] = None - - -# @Route("/{version}/account/chat/availability", "GET") -# @Api(Description="Reports AI chat availability and the model-picker menu.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChatAvailabilityRequest(RequestBase, IReturn[ChatAvailabilityResponse]): - """ - Reports AI chat availability and the model-picker menu. - """ - - project_id: Optional[str] = None - env: Optional[str] = None - - -# @Route("/{version}/account/chat/memory", "GET") -# @Api(Description="Lists what the AI assistant remembers about this account.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetChatMemoryRequest(RequestBase, IReturn[GetChatMemoryResponse]): - """ - Lists what the AI assistant remembers about this account. - """ - - project_id: Optional[str] = None - - -# @Route("/{version}/account/chat/memory/{NoteId}", "DELETE") -# @Api(Description="Deletes one AI memory note ('forget this').") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ForgetChatMemoryRequest(RequestBase, IReturn[EmptyResponse]): - """ - Deletes one AI memory note ('forget this'). - """ - - note_id: Optional[str] = None - - -# @Route("/{version}/account/chat/sessions/{SessionId}", "DELETE") -# @Api(Description="Deletes an AI chat session (soft delete).") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteChatSessionRequest(RequestBase, IReturn[IdResponse]): - """ - Deletes an AI chat session (soft delete). - """ - - session_id: Optional[str] = None - - -# @Route("/{version}/account/chat/sessions/{SessionId}/archive", "PATCH") -# @Api(Description="Archives or unarchives an AI chat session.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetChatSessionArchivedRequest(RequestBase, IReturn[IdResponse]): - """ - Archives or unarchives an AI chat session. - """ - - session_id: Optional[str] = None - archived: bool = False - - -# @Route("/{version}/account/chat/sessions/{SessionId}/pin", "PATCH") -# @Api(Description="Pins or unpins an AI chat session.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetChatSessionPinnedRequest(RequestBase, IReturn[IdResponse]): - """ - Pins or unpins an AI chat session. - """ - - session_id: Optional[str] = None - pinned: bool = False - - -# @Route("/{version}/account/chat/sessions/{SessionId}/sharing", "PATCH") -# @Api(Description="Marks or unmarks an AI chat session as \"do not share\".") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetChatSessionSharingRequest(RequestBase, IReturn[IdResponse]): - """ - Marks or unmarks an AI chat session as "do not share". - """ - - session_id: Optional[str] = None - do_not_share: bool = False - - -# @Route("/{version}/account/chat/sessions", "GET") -# @Api(Description="Lists the account's recent AI chat sessions.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetChatSessionsRequest(RequestBase, IReturn[GetChatSessionsResponse]): - """ - Lists the account's recent AI chat sessions. - """ - - take: Optional[int] = None - include_archived: Optional[bool] = None - - -# @Route("/{version}/account/chat/sessions/{SessionId}/entries", "GET") -# @Api(Description="Returns one AI chat session's conversation entries — the transcript.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetChatSessionEntriesRequest(RequestBase, IReturn[GetChatSessionEntriesResponse]): - """ - Returns one AI chat session's conversation entries — the transcript. - """ - - session_id: Optional[str] = None - since_seq: Optional[int] = None - - -# @Route("/{version}/account/chat/sessions/{SessionId}/entries/{EntryId}/feedback", "POST") -# @Api(Description="Records like / dislike feedback on one AI chat entry, or clears it.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetChatEntryFeedbackRequest(RequestBase, IReturn[IdResponse]): - """ - Records like / dislike feedback on one AI chat entry, or clears it. - """ - - session_id: Optional[str] = None - entry_id: Optional[str] = None - feedback: Optional[str] = None - - -# @Route("/{version}/account/chat/sessions/{SessionId}/questions/{EntryId}/answer", "POST") -# @Api(Description="Answers one open AI chat question — or a prepared change's Apply / Skip — and continues the conversation.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AnswerChatQuestionRequest(RequestBase, IReturn[IdResponse]): - """ - Answers one open AI chat question — or a prepared change's Apply / Skip — and continues the conversation. - """ - - session_id: Optional[str] = None - entry_id: Optional[str] = None - answers: Optional[Dict[str, str]] = None - - -# @Route("/{version}/account/chat/sessions/{SessionId}/plans/{EntryId}/decision", "POST") -# @Api(Description="Approves or rejects a proposed AI chat plan.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DecideChatPlanRequest(RequestBase, IReturn[IdResponse]): - """ - Approves or rejects a proposed AI chat plan. - """ - - session_id: Optional[str] = None - entry_id: Optional[str] = None - decision: Optional[str] = None - comment: Optional[str] = None - - -# @Route("/{version}/account/chat/sessions/{SessionId}/steps/{EntryId}/stop", "POST") -# @Api(Description="Stops one running step of an AI chat plan run.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class StopChatRunStepRequest(RequestBase, IReturn[IdResponse]): - """ - Stops one running step of an AI chat plan run. - """ - - session_id: Optional[str] = None - entry_id: Optional[str] = None - - -# @Route("/{version}/account/chat/turn", "POST") -# @Api(Description="Runs one AI chat conversation turn.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ChatTurnRequest(RequestBase, IReturn[ChatTurnResponse]): - """ - Runs one AI chat conversation turn. - """ - - session_id: Optional[str] = None - message: Optional[str] = None - profile: Optional[str] = None - topic: Optional[str] = None - llm_integration_id: Optional[str] = None - model: Optional[str] = None - project_id: Optional[str] = None - env: Optional[str] = None - screen_context: Optional[ChatScreenContextDto] = None - - -# @Route("/{version}/account/ai/scaffold", "POST") -# @Api(Description="Plans (preview) or builds (apply) a whole project from one spec.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ScaffoldProjectRequest(RequestBase, IReturn[ScaffoldProjectResponse]): - """ - Plans (preview) or builds (apply) a whole project from one spec. - """ - - # @ApiMember(Description="The project spec (a JSON object) — see the tool description.", IsRequired=true) - spec: Optional[str] = None - """ - The project spec (a JSON object) — see the tool description. - """ - - - # @ApiMember(Description="'preview' (writes nothing) or 'apply' (builds the project).", IsRequired=true) - mode: Optional[str] = None - """ - 'preview' (writes nothing) or 'apply' (builds the project). - """ - - - env: Optional[str] = None - - -# @Route("/{version}/account/ai/schemas/validate", "POST") -# @Api(Description="Validates a collection schema without saving it.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ValidateSchemaRequest(RequestBase, IReturn[ValidateSchemaResponse]): - """ - Validates a collection schema without saving it. - """ - - # @ApiMember(Description="The schema as JSON — see the tool description.", IsRequired=true) - schema_json: Optional[str] = None - """ - The schema as JSON — see the tool description. - """ - - -# @Route("/{version}/account/ai/templates/render-preview", "POST") -# @Api(Description="Renders an email, push or SMS template with sample data.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RenderTemplatePreviewRequest(RequestBase, IReturn[RenderTemplatePreviewResponse], IHasEnv): - """ - Renders an email, push or SMS template with sample data. - """ - - # @ApiMember(Description="The project of templateId. Not needed to render a body.") - project_id: Optional[str] = None - """ - The project of templateId. Not needed to render a body. - """ - - - env: Optional[str] = None - # @ApiMember(Description="email | push | sms", IsRequired=true) - channel: Optional[str] = None - """ - email | push | sms - """ - - - # @ApiMember(Description="An existing template id (tmpl_…). Needs projectId. Leave empty to render body instead.") - template_id: Optional[str] = None - """ - An existing template id (tmpl_…). Needs projectId. Leave empty to render body instead. - """ - - - # @ApiMember(Description="Razor template text to render when there is no templateId.") - body: Optional[str] = None - """ - Razor template text to render when there is no templateId. - """ - - - # @ApiMember(Description="Email subject / push title / SMS subject to render with body. Optional.") - subject: Optional[str] = None - """ - Email subject / push title / SMS subject to render with body. Optional. - """ - - - # @ApiMember(Description="Sample data as a JSON object, read by the template as @Model.") - sample_data: Optional[str] = None - """ - Sample data as a JSON object, read by the template as @Model. - """ - - -# @Route("/{version}/account/mcp", "POST") -# @Route("/{version}/account/mcp", "GET") -# @Route("/{version}/account/mcp", "DELETE") -# @Api(Description="MCP server endpoint (Streamable HTTP): JSON-RPC 2.0 over POST, server stream over GET, session end over DELETE.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class McpRequest(IReturn[str]): - """ - MCP server endpoint (Streamable HTTP): JSON-RPC 2.0 over POST, server stream over GET, session end over DELETE. - """ - - version: Optional[str] = None - toolsets: Optional[str] = None - request_stream: Optional[bytes] = None - - -# @Route("/{version}/projects/{projectId}/ai/brief", "GET") -# @Api(Description="Reads a project's AI Brief: the requirements, decisions and assumptions the assistant recorded from conversations, each with the chat turn, user and time it came from.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetProjectBriefRequest(CodeMashRequestBase, IReturn[GetProjectBriefResponse]): - """ - Reads a project's AI Brief: the requirements, decisions and assumptions the assistant recorded from conversations, each with the chat turn, user and time it came from. - """ - - # @ApiMember(Description="Return the Brief events after this sequence number as well (0 = all). Omit for the snapshot only.") - since_seq: Optional[int] = None - """ - Return the Brief events after this sequence number as well (0 = all). Omit for the snapshot only. - """ - - -# @Route("/{version}/projects/{projectId}/ai/work-items", "GET") -# @Api(Description="Lists a project's AI work items: one serious ask each, with its goal, plans, changes, moved-out items, needs-you list and open questions.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetWorkItemsRequest(CodeMashRequestBase, IReturn[GetWorkItemsResponse]): - """ - Lists a project's AI work items: one serious ask each, with its goal, plans, changes, moved-out items, needs-you list and open questions. - """ - - # @ApiMember(Description="Filter by status: proposed, active, waiting, done, partly-done or dropped. Omit for all.") - status: Optional[str] = None - """ - Filter by status: proposed, active, waiting, done, partly-done or dropped. Omit for all. - """ - - -# @Route("/{version}/projects/{projectId}/ai/work-items/{WorkItemId}", "GET") -# @Api(Description="Reads one AI work item: the six long-task sections and the definition-of-done verdict.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetWorkItemRequest(CodeMashRequestBase, IReturn[GetWorkItemResponse]): - """ - Reads one AI work item: the six long-task sections and the definition-of-done verdict. - """ - - work_item_id: Optional[str] = None - - -# @Route("/{version}/projects/{projectId}/ai/work-items/{WorkItemId}/export.md", "GET") -# @Api(Description="Exports one AI work item as markdown in the long-task shape: Goal, Plan, Changes, Rejected / moved out, Needs you, Open questions.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ExportWorkItemRequest(CodeMashRequestBase, IReturn[ExportWorkItemResponse]): - """ - Exports one AI work item as markdown in the long-task shape: Goal, Plan, Changes, Rejected / moved out, Needs you, Open questions. - """ - - work_item_id: Optional[str] = None - - -# @Route("/{version}/projects/{projectId}/ai/work-items/{WorkItemId}/needs-you/{Index}/done", "POST") -# @Api(Description="Ticks one manual line of a work item's \"Needs you\" checklist — the one write a human makes to a work item directly.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MarkNeedsYouDoneRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Ticks one manual line of a work item's "Needs you" checklist — the one write a human makes to a work item directly. - """ - - work_item_id: Optional[str] = None - index: int = 0 - # @ApiMember(Description="Set false to un-tick the line. Default true.") - done: Optional[bool] = None - """ - Set false to un-tick the line. Default true. - """ - - -# @Route("/{version}/ai/triggers", "POST") -# @Api(Description="Save a trigger on an AI project event") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveAiProjectTrigger(SaveTrigger, IReturn[IdResponse]): - """ - Save a trigger on an AI project event - """ - - pass - - -# @Route("/{version}/ai/triggers", "GET") -# @Api(Description="Gets the triggers on AI project events") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAiProjectTriggers(GetTriggers, IReturn[GetAiTriggersResponse]): - """ - Gets the triggers on AI project events - """ - - pass - - -# @Route("/{version}/ai/triggers/{id}", "GET") -# @Api(Description="Gets one trigger on an AI project event") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAiProjectTrigger(GetTrigger, IReturn[GetAiTriggerResponse]): - """ - Gets one trigger on an AI project event - """ - - pass - - -# @Route("/{version}/ai/triggers/{triggerId}/enable", "PATCH") -# @Api(Description="Enable a trigger on an AI project event") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableAiProjectTrigger(EnableTrigger, IReturn[EmptyResponse]): - """ - Enable a trigger on an AI project event - """ - - pass - - -# @Route("/{version}/ai/triggers/{triggerId}/disable", "PATCH") -# @Api(Description="Disable a trigger on an AI project event") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableAiProjectTrigger(DisableTrigger, IReturn[EmptyResponse]): - """ - Disable a trigger on an AI project event - """ - - pass - - -# @Route("/{version}/ai/triggers/{triggerId}", "DELETE") -# @Api(Description="Delete a trigger on an AI project event") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteAiProjectTrigger(DeleteTrigger, IReturn[EmptyResponse]): - """ - Delete a trigger on an AI project event - """ - - pass - - -# @Route("/{version}/auth/device/start", "POST") -# @Api(Description="Starts a browser sign-in for the Norbix CLI (OAuth device authorization, RFC 8628): a device code for polling and a user code the person confirms on the dashboard.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthDeviceStartRequest(RequestBase, IReturn[AuthDeviceStartResponse], INoSessionCookies): - """ - Starts a browser sign-in for the Norbix CLI (OAuth device authorization, RFC 8628): a device code for polling and a user code the person confirms on the dashboard. - """ - - # @ApiMember(Description="Who asks, shown on the dashboard, e.g. \"norbix-cli\". 1–80 printable characters.", IsRequired=true) - client_name: Optional[str] = None - """ - Who asks, shown on the dashboard, e.g. "norbix-cli". 1–80 printable characters. - """ - - - # @ApiMember(Description="The computer name, shown on the dashboard and part of the AI service user's name (cleaned, at most 40 characters).") - device_name: Optional[str] = None - """ - The computer name, shown on the dashboard and part of the AI service user's name (cleaned, at most 40 characters). - """ - - - # @ApiMember(Description="The project the CLI wants to work in. It must be a project of the account of the person who allows the sign-in.") - project_id: Optional[str] = None - """ - The project the CLI wants to work in. It must be a project of the account of the person who allows the sign-in. - """ - - -# @Route("/{version}/auth/device/token", "POST") -# @Api(Description="Polls a CLI browser sign-in (RFC 8628). Always HTTP 200: an error name (authorization_pending, slow_down, access_denied, expired_token, invalid_grant, invalid_request) or the tokens, once.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthDeviceTokenRequest(RequestBase, IReturn[AuthDeviceTokenResponse], INoSessionCookies): - """ - Polls a CLI browser sign-in (RFC 8628). Always HTTP 200: an error name (authorization_pending, slow_down, access_denied, expired_token, invalid_grant, invalid_request) or the tokens, once. - """ - - # @ApiMember(Description="The deviceCode from POST /auth/device/start.", IsRequired=true) - device_code: Optional[str] = None - """ - The deviceCode from POST /auth/device/start. - """ - - -# @Route("/{version}/auth/device/consent", "GET") -# @Api(Description="The dashboard screen for a CLI browser sign-in: the client and computer that asked, and the roles the signed-in person may give.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthDeviceConsentRequest(RequestBase, IReturn[AuthDeviceConsentResponse]): - """ - The dashboard screen for a CLI browser sign-in: the client and computer that asked, and the roles the signed-in person may give. - """ - - # @ApiMember(Description="The code the terminal shows, XXXX-XXXX (case, spaces and the dash do not matter).", IsRequired=true) - user_code: Optional[str] = None - """ - The code the terminal shows, XXXX-XXXX (case, spaces and the dash do not matter). - """ - - -# @Route("/{version}/auth/device/consent", "POST") -# @Api(Description="The signed-in person's decision on a CLI browser sign-in: allow with Membership roles, or deny.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AuthDeviceConsentDecisionRequest(RequestBase, IReturn[AuthDeviceConsentDecisionResponse]): - """ - The signed-in person's decision on a CLI browser sign-in: allow with Membership roles, or deny. - """ - - # @ApiMember(Description="The code the terminal shows, XXXX-XXXX.", IsRequired=true) - user_code: Optional[str] = None - """ - The code the terminal shows, XXXX-XXXX. - """ - - - # @ApiMember(Description="allow | deny.", IsRequired=true) - decision: Optional[str] = None - """ - allow | deny. - """ - - - # @ApiMember(Description="For allow: account role ids (acc_…_nr_…) to give.") - account_role_ids: Optional[List[str]] = None - """ - For allow: account role ids (acc_…_nr_…) to give. - """ - - - # @ApiMember(Description="For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }].") - project_roles: Optional[List[AiProjectRoleIdsDto]] = None - """ - For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }]. - """ - - -# @Route("/.well-known/oauth-protected-resource", "GET") -# @Route("/.well-known/oauth-protected-resource/{Path*}", "GET") -# @Api(Description="OAuth protected-resource metadata (RFC 9728) for the Hub MCP endpoint.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthProtectedResourceMetadataRequest(IReturn[str], INoSessionCookies): - """ - OAuth protected-resource metadata (RFC 9728) for the Hub MCP endpoint. - """ - - path: Optional[str] = None - - -# @Route("/.well-known/oauth-authorization-server", "GET") -# @Route("/.well-known/oauth-authorization-server/{Path*}", "GET") -# @Api(Description="OAuth authorization-server metadata (RFC 8414).") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthAuthorizationServerMetadataRequest(IReturn[str], INoSessionCookies): - """ - OAuth authorization-server metadata (RFC 8414). - """ - - path: Optional[str] = None - - -# @Route("/{version}/oauth/register", "POST") -# @Api(Description="Registers an MCP client for OAuth (RFC 7591). Public clients only: PKCE, no secret.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthRegisterRequest(IReturn[str], INoSessionCookies): - """ - Registers an MCP client for OAuth (RFC 7591). Public clients only: PKCE, no secret. - """ - - version: Optional[str] = None - request_stream: Optional[bytes] = None - - -# @Route("/{version}/oauth/authorize", "GET") -# @Api(Description="OAuth authorization endpoint: checks the request and redirects to the dashboard consent screen.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthAuthorizeRequest(IReturn[str], INoSessionCookies): - """ - OAuth authorization endpoint: checks the request and redirects to the dashboard consent screen. - """ - - version: Optional[str] = None - - -# @Route("/{version}/oauth/consent", "GET") -# @Api(Description="The dashboard consent screen for an AI tool: the client, where it returns to, and the roles the signed-in person may give.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthConsentRequest(RequestBase, IReturn[OAuthConsentResponse]): - """ - The dashboard consent screen for an AI tool: the client, where it returns to, and the roles the signed-in person may give. - """ - - # @ApiMember(Description="OAuth response_type from the authorize request (must be \"code\").") - response_type: Optional[str] = None - """ - OAuth response_type from the authorize request (must be "code"). - """ - - - # @ApiMember(Description="OAuth client_id from the authorize request.") - client_id: Optional[str] = None - """ - OAuth client_id from the authorize request. - """ - - - # @ApiMember(Description="OAuth redirect_uri from the authorize request.") - redirect_uri: Optional[str] = None - """ - OAuth redirect_uri from the authorize request. - """ - - - # @ApiMember(Description="PKCE code_challenge from the authorize request.") - code_challenge: Optional[str] = None - """ - PKCE code_challenge from the authorize request. - """ - - - # @ApiMember(Description="PKCE code_challenge_method from the authorize request (must be \"S256\").") - code_challenge_method: Optional[str] = None - """ - PKCE code_challenge_method from the authorize request (must be "S256"). - """ - - - # @ApiMember(Description="OAuth state from the authorize request; returned to the client unchanged.") - state: Optional[str] = None - """ - OAuth state from the authorize request; returned to the client unchanged. - """ - - - # @ApiMember(Description="OAuth resource (RFC 8707) from the authorize request.") - resource: Optional[str] = None - """ - OAuth resource (RFC 8707) from the authorize request. - """ - - - # @ApiMember(Description="OAuth scope from the authorize request.") - scope: Optional[str] = None - """ - OAuth scope from the authorize request. - """ - - -# @Route("/{version}/oauth/consent", "POST") -# @Api(Description="The signed-in person's decision on the consent screen: allow with roles, or deny. Returns the address to send the browser to.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthConsentDecisionRequest(RequestBase, IReturn[OAuthConsentDecisionResponse]): - """ - The signed-in person's decision on the consent screen: allow with roles, or deny. Returns the address to send the browser to. - """ - - # @ApiMember(Description="OAuth response_type from the authorize request (must be \"code\").") - response_type: Optional[str] = None - """ - OAuth response_type from the authorize request (must be "code"). - """ - - - # @ApiMember(Description="OAuth client_id from the authorize request.") - client_id: Optional[str] = None - """ - OAuth client_id from the authorize request. - """ - - - # @ApiMember(Description="OAuth redirect_uri from the authorize request.") - redirect_uri: Optional[str] = None - """ - OAuth redirect_uri from the authorize request. - """ - - - # @ApiMember(Description="PKCE code_challenge from the authorize request.") - code_challenge: Optional[str] = None - """ - PKCE code_challenge from the authorize request. - """ - - - # @ApiMember(Description="PKCE code_challenge_method from the authorize request (must be \"S256\").") - code_challenge_method: Optional[str] = None - """ - PKCE code_challenge_method from the authorize request (must be "S256"). - """ - - - # @ApiMember(Description="OAuth state from the authorize request; returned to the client unchanged.") - state: Optional[str] = None - """ - OAuth state from the authorize request; returned to the client unchanged. - """ - - - # @ApiMember(Description="OAuth resource (RFC 8707) from the authorize request.") - resource: Optional[str] = None - """ - OAuth resource (RFC 8707) from the authorize request. - """ - - - # @ApiMember(Description="OAuth scope from the authorize request.") - scope: Optional[str] = None - """ - OAuth scope from the authorize request. - """ - - - # @ApiMember(Description="The consentTicket from GET /oauth/consent.", IsRequired=true) - consent_ticket: Optional[str] = None - """ - The consentTicket from GET /oauth/consent. - """ - - - # @ApiMember(Description="allow | deny.", IsRequired=true) - decision: Optional[str] = None - """ - allow | deny. - """ - - - # @ApiMember(Description="For allow: account role ids (acc_…_nr_…) to give.") - account_role_ids: Optional[List[str]] = None - """ - For allow: account role ids (acc_…_nr_…) to give. - """ - - - # @ApiMember(Description="For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }].") - project_roles: Optional[List[AiProjectRoleIdsDto]] = None - """ - For allow: project roles to give, [{ projectId, roleIds: [pr_…_nr_…] }]. - """ - - -# @Route("/{version}/oauth/token", "POST") -# @Api(Description="OAuth token endpoint: authorization code (PKCE S256) or refresh token → access token.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthTokenRequest(IReturn[str], INoSessionCookies): - """ - OAuth token endpoint: authorization code (PKCE S256) or refresh token → access token. - """ - - version: Optional[str] = None - - -# @Route("/{version}/oauth/revoke", "POST") -# @Api(Description="OAuth token revocation (RFC 7009): revokes the grant behind a refresh or access token.") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OAuthRevokeRequest(IReturn[str], INoSessionCookies): - """ - OAuth token revocation (RFC 7009): revokes the grant behind a refresh or access token. - """ - - version: Optional[str] = None - - -# @Route("/{version}/ai/integrations/embeddings/{Id}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteEmbeddingIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the embedding integration to delete.") - id: Optional[str] = None - """ - Id of the embedding integration to delete. - """ - - -# @Route("/{version}/ai/integrations/embeddings/{Id}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmbeddingIntegration(CodeMashRequestBase, IReturn[GetEmbeddingIntegrationResponse]): - # @ApiMember(Description="Id of the embedding integration to fetch.") - id: Optional[str] = None - """ - Id of the embedding integration to fetch. - """ - - -# @Route("/{version}/ai/integrations/embeddings", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetEmbeddingIntegrations(CodeMashListPaginationRequestBase, IReturn[GetEmbeddingIntegrationsResponse]): - pass - - -# @Route("/{version}/ai/integrations/embeddings", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveEmbeddingIntegration(CodeMashRequestBase, IReturn[IdResponse]): - integration: Optional[EmbeddingIntegrationRequest] = None - - -# @Route("/{version}/ai/integrations/embeddings/{Id}/test", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestEmbeddingIntegration(CodeMashRequestBase, IReturn[TestEmbeddingIntegrationResponse]): - # @ApiMember(Description="Id of the embedding integration to test.") - id: Optional[str] = None - """ - Id of the embedding integration to test. - """ - - -# @Route("/{version}/ai/integrations/llms/{Id}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteLlmIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the LLM integration to delete.") - id: Optional[str] = None - """ - Id of the LLM integration to delete. - """ - - -# @Route("/{version}/ai/integrations/llms/{Id}/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableLlmIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the LLM integration to disable.") - id: Optional[str] = None - """ - Id of the LLM integration to disable. - """ - - -# @Route("/{version}/ai/integrations/llms/{Id}/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableLlmIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the LLM integration to enable.") - id: Optional[str] = None - """ - Id of the LLM integration to enable. - """ - - -# @Route("/{version}/ai/integrations/llms/{id}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLlmIntegration(CodeMashRequestBase, IReturn[GetLlmIntegrationResponse]): - # @ApiMember(Description="Id of the LLM integration to fetch.") - id: Optional[str] = None - """ - Id of the LLM integration to fetch. - """ - - -# @Route("/{version}/ai/integrations/llms/integrations", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLlmIntegrations(CodeMashListPaginationRequestBase, IReturn[GetLlmIntegrationsResponse]): - pass - - -# @Route("/{version}/ai/integrations/llms/", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveLlmIntegration(CodeMashRequestBase, IReturn[IdResponse]): - integration: Optional[LlmIntegrationRequest] = None - - -# @Route("/{version}/ai/integrations/llms/{Id}/default", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetLlmIntegrationAsDefaultRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the LLM integration to make the default.") - id: Optional[str] = None - """ - Id of the LLM integration to make the default. - """ - - -# @Route("/{version}/ai/integrations/llms/test", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestLlmIntegration(CodeMashRequestBase, IReturn[TestLlmIntegrationResponse]): - # @ApiMember(Description="Id of the LLM integration to test.") - integration_id: Optional[str] = None - """ - Id of the LLM integration to test. - """ - - -# @Route("/{version}/ai/integrations/mcp/{Id}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteMcpIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the MCP integration to delete.") - id: Optional[str] = None - """ - Id of the MCP integration to delete. - """ - - -# @Route("/{version}/ai/integrations/mcp/{Id}/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableMcpIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the MCP integration to disable.") - id: Optional[str] = None - """ - Id of the MCP integration to disable. - """ - - -# @Route("/{version}/ai/integrations/mcp/{Id}/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableMcpIntegrationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="Id of the MCP integration to enable.") - id: Optional[str] = None - """ - Id of the MCP integration to enable. - """ - - -# @Route("/{version}/ai/integrations/mcp/{id}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMcpIntegration(CodeMashRequestBase, IReturn[GetMcpIntegrationResponse]): - # @ApiMember(Description="Id of the MCP integration to fetch.") - id: Optional[str] = None - """ - Id of the MCP integration to fetch. - """ - - -# @Route("/{version}/ai/integrations/mcp/integrations", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetMcpIntegrations(CodeMashListPaginationRequestBase, IReturn[GetMcpIntegrationsResponse]): - pass - - -# @Route("/{version}/ai/integrations/mcp/", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveMcpIntegration(CodeMashRequestBase, IReturn[IdResponse]): - integration: Optional[McpIntegrationRequest] = None - - -# @Route("/{version}/ai/integrations/mcp/test", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class TestMcpIntegration(CodeMashRequestBase, IReturn[TestLlmIntegrationResponse]): - # @ApiMember(Description="Id of the MCP integration to test.") - integration_id: Optional[str] = None - """ - Id of the MCP integration to test. - """ - - -# @Route("/{version}/webhooks/integration", "GET") -# @Api(Description="Gets the project's webhook integration") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetWebhookIntegration(CodeMashRequestBase, IReturn[GetWebhookIntegrationResponse]): - """ - Gets the project's webhook integration - """ - - pass - - -# @Route("/{version}/webhooks/integration/secret", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RevealWebhookIntegrationSecretRequest(CodeMashRequestBase, IReturn[RevealWebhookIntegrationSecretResponse]): - pass - - -# @Route("/{version}/webhooks/integration/secret/rotate", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RotateWebhookIntegrationSecretRequest(CodeMashRequestBase, IReturn[RotateWebhookIntegrationSecretResponse]): - pass - - -# @Route("/{version}/webhooks/integration/extra-headers", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateWebhookIntegrationExtraHeadersRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The integration-wide static headers to send with every delivery. Pass an empty dictionary to clear all extra headers.") - extra_headers: Optional[Dict[str, str]] = None - """ - The integration-wide static headers to send with every delivery. Pass an empty dictionary to clear all extra headers. - """ - - -# @Route("/{version}/webhooks/{source}/{integrationInstanceId}", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ReceiveWebhook(IReturnVoid): - version: Optional[str] = None - source: Optional[str] = None - integration_instance_id: Optional[str] = None - request_stream: Optional[bytes] = None - - -# @Route("/{version}/webhooks/destinations/{DestinationId}/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableWebhookDestinationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The webhook destination id to disable, from get_webhook_integration.", IsRequired=true) - destination_id: Optional[str] = None - """ - The webhook destination id to disable, from get_webhook_integration. - """ - - -# @Route("/{version}/webhooks/destinations/{DestinationId}/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableWebhookDestinationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The webhook destination id to enable, from get_webhook_integration.", IsRequired=true) - destination_id: Optional[str] = None - """ - The webhook destination id to enable, from get_webhook_integration. - """ - - -# @Route("/{version}/webhooks/destinations/{DestinationId}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RemoveWebhookDestinationRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - # @ApiMember(Description="The webhook destination id to remove, from get_webhook_integration.", IsRequired=true) - destination_id: Optional[str] = None - """ - The webhook destination id to remove, from get_webhook_integration. - """ - - -# @Route("/{version}/webhooks/destinations", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveWebhookDestinationRequest(CodeMashRequestBase, IReturn[SaveWebhookDestinationResponse]): - # @ApiMember(Description="Existing destination id to overwrite, from get_webhook_integration. Omit to create a new destination.") - destination_id: Optional[str] = None - """ - Existing destination id to overwrite, from get_webhook_integration. Omit to create a new destination. - """ - - - # @ApiMember(Description="Display name for the destination.", IsRequired=true) - destination_name: Optional[str] = None - """ - Display name for the destination. - """ - - - # @ApiMember(Description="The HTTPS endpoint URL that will receive the webhook deliveries.", IsRequired=true) - endpoint_url: Optional[str] = None - """ - The HTTPS endpoint URL that will receive the webhook deliveries. - """ - - - # @ApiMember(Description="The event names this destination subscribes to. Empty subscribes to none.") - selected_events: List[str] = field(default_factory=list) - """ - The event names this destination subscribes to. Empty subscribes to none. - """ - - - # @ApiMember(Description="Destination-specific static headers sent with every delivery to this destination. These win over the integration-wide extra headers on duplicate keys.") - extra_headers: Optional[Dict[str, str]] = None - """ - Destination-specific static headers sent with every delivery to this destination. These win over the integration-wide extra headers on duplicate keys. - """ - - - # @ApiMember(Description="Whether this destination is enabled for delivery. Defaults to true.") - is_enabled: bool = False - """ - Whether this destination is enabled for delivery. Defaults to true. - """ - - -# @Route("/{version}/scheduler/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableScheduler(CodeMashRequestBase, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/scheduler/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableScheduler(CodeMashRequestBase, IReturn[EmptyResponse]): - pass - - -# @Route("/{version}/scheduler/tasks/{Id}", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteSchedulerTask(CodeMashRequestBase, IReturn[EmptyResponse]): - id: Optional[str] = None - - -# @Route("/{version}/scheduler/tasks/{Id}/disable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DisableSchedulerTask(CodeMashRequestBase, IReturn[EmptyResponse]): - id: Optional[str] = None - - -# @Route("/{version}/scheduler/tasks/{Id}/enable", "PUT") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class EnableSchedulerTask(CodeMashRequestBase, IReturn[EmptyResponse]): - id: Optional[str] = None - - -# @Route("/{version}/scheduler/tasks/{id}", "GET") -# @Api(Description="Gets a scheduled task by id") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSchedulerTask(CodeMashRequestBase, IReturn[GetSchedulerTaskResponse]): - """ - Gets a scheduled task by id - """ - - id: Optional[str] = None - - -# @Route("/{version}/scheduler/tasks", "GET") -# @Api(Description="Gets scheduled tasks") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSchedulerTasks(CodeMashListPaginationRequestBase, IReturn[GetSchedulerTasksResponse]): - """ - Gets scheduled tasks - """ - - # @ApiMember(Description="Optional filter — only return tasks of this type.") - type: Optional[SchedulerTaskType] = None - """ - Optional filter — only return tasks of this type. - """ - - - # @ApiMember(Description="Optional filter — only return tasks whose enabled state matches this value.") - enabled: Optional[bool] = None - """ - Optional filter — only return tasks whose enabled state matches this value. - """ - - -# @Route("/{version}/scheduler/tasks/{id}/runs", "GET") -# @Api(Description="Gets the latest runs of a scheduled task") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSchedulerTaskRuns(CodeMashRequestBase, IReturn[GetSchedulerTaskRunsResponse]): - """ - Gets the latest runs of a scheduled task - """ - - id: Optional[str] = None - # @ApiMember(DataType="integer", Description="How many runs to return, newest first: 1-50. Default 10.", Name="take", ParameterType="query") - take: Optional[int] = None - """ - How many runs to return, newest first: 1-50. Default 10. - """ - - -# @Route("/{version}/scheduler/tasks", "POST") -# @Api(Description="Save scheduled task") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveSchedulerTaskRequest(CodeMashRequestBase, IReturn[IdResponse]): - """ - Save scheduled task - """ - - task_id: Optional[str] = None - name: Optional[str] = None - description: Optional[str] = None - cron: Optional[str] = None - initiator_user_id: Optional[str] = None - is_enabled: bool = False - stop_on_error: bool = False - ends_at_unix: Optional[int] = None - task: Optional[SchedulerTaskRequest] = None - - -# @Route("/{version}/resources/resolve", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ResolveResources(CodeMashRequestBase, IReturn[ResolveResourcesResponse]): - refs: Optional[IReadOnlyList[ResourceRefDto]] = None - - -# @Route("/{version}/membership/users/{userId}/ai-plan", "PUT") -# @Api(Description="Sets or removes one user's own end-user AI plan") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SetUserAiPlan(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Sets or removes one user's own end-user AI plan - """ - - # @ApiMember(Description="The human user id (ct_…).", IsRequired=true) - user_id: Optional[str] = None - """ - The human user id (ct_…). - """ - - - # @ApiMember(Description="The plan id (aip_…). Empty removes the user's own plan.") - plan_id: Optional[str] = None - """ - The plan id (aip_…). Empty removes the user's own plan. - """ - - - # @ApiMember(Description="Database integration id. Optional — defaults to the request environment's default integration.") - database_integration_id: Optional[str] = None - """ - Database integration id. Optional — defaults to the request environment's default integration. - """ - - -# @Route("/{version}/membership/users", "POST") -# @Api(Description="Create a contact") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CreateContactRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Create a contact - """ - - # @ApiMember(Description="Primary email address of the contact (optional if a phone is given).") - primary_email: Optional[str] = None - """ - Primary email address of the contact (optional if a phone is given). - """ - - - # @ApiMember(Description="Primary phone number in international format, e.g. +14155550123 (optional if an email is given).") - primary_phone: Optional[str] = None - """ - Primary phone number in international format, e.g. +14155550123 (optional if an email is given). - """ - - - # @ApiMember(Description="Display name shown in the dashboard (optional).") - display_name: Optional[str] = None - """ - Display name shown in the dashboard (optional). - """ - - - # @ApiMember(Description="Contact's first name (optional).") - first_name: Optional[str] = None - """ - Contact's first name (optional). - """ - - - # @ApiMember(Description="Contact's last name (optional).") - last_name: Optional[str] = None - """ - Contact's last name (optional). - """ - - -# @Route("/{version}/membership/users/{contactId}", "DELETE") -# @Api(Description="Archive a contact") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeleteContact(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Archive a contact - """ - - # @ApiMember(Description="The contact id (ct_…) to archive. Get it from get_all_contacts.", IsRequired=true) - contact_id: Optional[str] = None - """ - The contact id (ct_…) to archive. Get it from get_all_contacts. - """ - - -# @Route("/{version}/membership/users/{contactId}", "GET") -# @Api(Description="Get a contact") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetContact(CodeMashRequestBase, IReturn[GetContactResponse]): - """ - Get a contact - """ - - # @ApiMember(Description="The contact id (ct_…) to fetch, or a login id (usr_…) — then the contact that owns that login is returned. Get it from get_all_contacts.", IsRequired=true) - contact_id: Optional[str] = None - """ - The contact id (ct_…) to fetch, or a login id (usr_…) — then the contact that owns that login is returned. Get it from get_all_contacts. - """ - - -# @Route("/{version}/membership/users", "GET") -# @Api(Description="List contacts") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAllContacts(CodeMashRequestBase, IReturn[GetAllContactsResponse]): - """ - List contacts - """ - - # @ApiMember(Description="Cursor for the next page: pass the nextCursor from the previous call. Omit for the first page.") - starting_after: Optional[str] = None - """ - Cursor for the next page: pass the nextCursor from the previous call. Omit for the first page. - """ - - - # @ApiMember(Description="How many contacts to return per page (default 50).") - page_size: Optional[int] = None - """ - How many contacts to return per page (default 50). - """ - - - # @ApiMember(Description="Free text, case-insensitive: matches the email, phone, display / first / last / full name, or any login's user name or email.") - search: Optional[str] = None - """ - Free text, case-insensitive: matches the email, phone, display / first / last / full name, or any login's user name or email. - """ - - - # @ApiMember(Description="Case-insensitive part of the email (primary email or any login's email).") - email: Optional[str] = None - """ - Case-insensitive part of the email (primary email or any login's email). - """ - - - # @ApiMember(Description="Case-insensitive part of any login's user name.") - user_name: Optional[str] = None - """ - Case-insensitive part of any login's user name. - """ - - - # @ApiMember(Description="Login status names, any of: Registered, PendingValidation, Active, Unregistered, Suspended, InActive, Blocked.") - statuses: Optional[List[str]] = None - """ - Login status names, any of: Registered, PendingValidation, Active, Unregistered, Suspended, InActive, Blocked. - """ - - - # @ApiMember(Description="Login type names, any of: Service, Email, UserName, Phone, Guest, Social.") - types: Optional[List[str]] = None - """ - Login type names, any of: Service, Email, UserName, Phone, Guest, Social. - """ - - - # @ApiMember(Description="Composite project-role ids (pr_{project}_nr_{role}); the contact holds any of them.") - role_names: Optional[List[str]] = None - """ - Composite project-role ids (pr_{project}_nr_{role}); the contact holds any of them. - """ - - -# @Route("/{version}/membership/users/merge", "POST") -# @Api(Description="Merge contacts") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class MergeContactsRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Merge contacts - """ - - # @ApiMember(Description="The contact id (ct_…) that will remain after the merge (the survivor).", IsRequired=true) - survivor_id: Optional[str] = None - """ - The contact id (ct_…) that will remain after the merge (the survivor). - """ - - - # @ApiMember(Description="The contact ids (ct_…) to merge into the survivor and archive. At least one.", IsRequired=true) - merged_ids: List[str] = field(default_factory=list) - """ - The contact ids (ct_…) to merge into the survivor and archive. At least one. - """ - - -# @Route("/{version}/membership/users/repair-roles", "POST") -# @Api(Description="Repair contact roles from their logins") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RepairContactRolesRequest(CodeMashRequestBase, IReturn[RepairContactRolesResponse]): - """ - Repair contact roles from their logins - """ - - # @ApiMember(Description="True (default) = only count what would change. False = write.") - dry_run: bool = False - """ - True (default) = only count what would change. False = write. - """ - - -# @Route("/{version}/membership/users/{contactId}", "PATCH") -# @Api(Description="Update a contact") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class UpdateContactRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Update a contact - """ - - # @ApiMember(Description="The contact id (ct_…) to update. Get it from get_all_contacts.", IsRequired=true) - contact_id: Optional[str] = None - """ - The contact id (ct_…) to update. Get it from get_all_contacts. - """ - - - # @ApiMember(Description="Display name shown in the dashboard.") - display_name: Optional[str] = None - """ - Display name shown in the dashboard. - """ - - - # @ApiMember(Description="First name.") - first_name: Optional[str] = None - """ - First name. - """ - - - # @ApiMember(Description="Last name.") - last_name: Optional[str] = None - """ - Last name. - """ - - - # @ApiMember(Description="Full name (overrides first/last when set).") - full_name: Optional[str] = None - """ - Full name (overrides first/last when set). - """ - - - # @ApiMember(Description="Company or organisation name.") - company: Optional[str] = None - """ - Company or organisation name. - """ - - - # @ApiMember(Description="Free-text internal notes about the contact.") - notes: Optional[str] = None - """ - Free-text internal notes about the contact. - """ - - - # @ApiMember(Description="Gender: Male, Female or Other.") - gender: Optional[str] = None - """ - Gender: Male, Female or Other. - """ - - - # @ApiMember(Description="Birth date as a unix timestamp in MILLISECONDS (UTC).") - birth_date: Optional[int] = None - """ - Birth date as a unix timestamp in MILLISECONDS (UTC). - """ - - - # @ApiMember(Description="IANA time zone id, e.g. Europe/Vilnius.") - time_zone: Optional[str] = None - """ - IANA time zone id, e.g. Europe/Vilnius. - """ - - - # @ApiMember(Description="Preferred language/locale code, e.g. en or en-US.") - language: Optional[str] = None - """ - Preferred language/locale code, e.g. en or en-US. - """ - - - # @ApiMember(Description="Address line 1 (street).") - address_line1: Optional[str] = None - """ - Address line 1 (street). - """ - - - # @ApiMember(Description="Address line 2 (apartment, suite, etc.).") - address_line2: Optional[str] = None - """ - Address line 2 (apartment, suite, etc.). - """ - - - # @ApiMember(Description="Country name or code.") - country: Optional[str] = None - """ - Country name or code. - """ - - - # @ApiMember(Description="City.") - city: Optional[str] = None - """ - City. - """ - - - # @ApiMember(Description="State, region or province.") - state: Optional[str] = None - """ - State, region or province. - """ - - - # @ApiMember(Description="Postal or ZIP code.") - postal_code: Optional[str] = None - """ - Postal or ZIP code. - """ - - -# @Route("/{version}/membership/users/{contactId}/identities", "POST") -# @Api(Description="Link a login to a contact") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AddContactIdentityRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Link a login to a contact - """ - - # @ApiMember(Description="The contact id (ct_…) to link the login to.", IsRequired=true) - contact_id: Optional[str] = None - """ - The contact id (ct_…) to link the login to. - """ - - - # @ApiMember(Description="The login (identity) id (usr_…) to link to the contact.", IsRequired=true) - auth_id: Optional[str] = None - """ - The login (identity) id (usr_…) to link to the contact. - """ - - -# @Route("/{version}/membership/users/{contactId}/identities/{authId}/promote", "POST") -# @Api(Description="Make a login the contact's primary") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PromoteContactIdentityRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Make a login the contact's primary - """ - - # @ApiMember(Description="The contact id (ct_…) whose login is being promoted.", IsRequired=true) - contact_id: Optional[str] = None - """ - The contact id (ct_…) whose login is being promoted. - """ - - - # @ApiMember(Description="The linked login (identity) id (usr_…) to make primary.", IsRequired=true) - auth_id: Optional[str] = None - """ - The linked login (identity) id (usr_…) to make primary. - """ - - -# @Route("/{version}/membership/users/{contactId}/identities/{authId}", "DELETE") -# @Api(Description="Unlink a login from a contact") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RemoveContactIdentityRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - """ - Unlink a login from a contact - """ - - # @ApiMember(Description="The contact id (ct_…) to unlink the login from.", IsRequired=true) - contact_id: Optional[str] = None - """ - The contact id (ct_…) to unlink the login from. - """ - - - # @ApiMember(Description="The login (identity) id (usr_…) to unlink from the contact.", IsRequired=true) - auth_id: Optional[str] = None - """ - The login (identity) id (usr_…) to unlink from the contact. - """ - - -# @Route("/{version}/compliance/settings", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetComplianceSettings(CodeMashRequestBase, IReturn[GetComplianceSettingsResponse]): - pass - - -# @Route("/{version}/compliance/retention", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RemoveRetentionWindowRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - data_kind: Optional[str] = None - - -# @Route("/{version}/compliance/retention", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveRetentionWindowRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - data_kind: Optional[str] = None - days: int = 0 - action: Optional[str] = None - - -# @Route("/{version}/compliance/regimes", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AssignRegimeRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - regime: Optional[str] = None - - -# @Route("/{version}/compliance/regimes", "DELETE") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ClearRegimeRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - regime: Optional[str] = None - - -# @Route("/{version}/compliance/purposes", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DefineConsentPurposeRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - key: Optional[str] = None - name: Optional[str] = None - channel: Optional[str] = None - mapped_tags: List[str] = field(default_factory=list) - regulatory_basis: List[str] = field(default_factory=list) - description: Optional[str] = None - - -# @Route("/{version}/compliance/purposes/deprecate", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class DeprecateConsentPurposeRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - key: Optional[str] = None - - -# @Route("/{version}/compliance/holds", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetLegalHolds(CodeMashRequestBase, IReturn[GetLegalHoldsResponse]): - pass - - -# @Route("/{version}/compliance/holds", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class PlaceLegalHoldRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - subject_kind: Optional[str] = None - subject_id: Optional[str] = None - reason: Optional[str] = None - - -# @Route("/{version}/compliance/holds/release", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ReleaseLegalHoldRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - hold_id: Optional[str] = None - - -# @Route("/{version}/compliance/dsar/approve", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ApproveDsarRequestRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - request_id: Optional[str] = None - - -# @Route("/{version}/compliance/dsar/reject", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RejectDsarRequestRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - request_id: Optional[str] = None - reason: Optional[str] = None - - -# @Route("/{version}/compliance/dsar", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDsarRequests(CodeMashRequestBase, IReturn[GetDsarRequestsResponse]): - pass - - -# @Route("/{version}/compliance/dsar", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OpenDsarRequestRequest(CodeMashRequestBase, IReturn[EmptyResponse]): - subject_kind: Optional[str] = None - subject_id: Optional[str] = None - - -# @Route("/{version}/compliance/audit", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetComplianceAuditLog(CodeMashRequestBase, IReturn[GetComplianceAuditLogResponse]): - from_: Optional[datetime.datetime] = field(metadata=config(field_name='from'), default=None) - to: Optional[datetime.datetime] = None - subject_kind: Optional[str] = None - subject_id: Optional[str] = None - limit: int = 0 - - -# @Route("/{version}/compliance/account", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetAccountCompliance(RequestBase, IReturn[GetAccountComplianceResponse]): - pass - - -# @Route("/{version}/compliance/account/dsar-policy", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveDsarPolicyRequest(RequestBase, IReturn[EmptyResponse]): - mode: Optional[str] = None - delay_days: int = 0 - - -# @Route("/{version}/compliance/account/incident-routing", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class SaveIncidentRoutingRequest(RequestBase, IReturn[EmptyResponse]): - auto_forward_advisories: bool = False - security_contact: Optional[str] = None - - -# @Route("/{version}/support/cases/{CaseId}/close", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class CloseSupportCaseRequest(RequestBase, IReturn[EmptyResponse]): - case_id: Optional[str] = None - - -# @Route("/{version}/support/cases/{CaseId}/reopen", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ReopenSupportCaseRequest(RequestBase, IReturn[EmptyResponse]): - case_id: Optional[str] = None - reason: Optional[str] = None - - -# @Route("/{version}/support/cases/{CaseId}/resolve", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ResolveSupportCaseRequest(RequestBase, IReturn[EmptyResponse]): - case_id: Optional[str] = None - resolution: Optional[CaseResolutionDto] = None - - -# @Route("/{version}/support/cases/{CaseId}/messages", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class AppendSupportCaseMessageRequest(RequestBase, IReturn[IdResponse]): - case_id: Optional[str] = None - message: Optional[str] = None - - -# @Route("/{version}/support/cases/{CaseId}", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSupportCase(RequestBase, IReturn[GetSupportCaseResponse]): - case_id: Optional[str] = None - - -# @Route("/{version}/support/cases", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetSupportCases(RequestBase, IReturn[GetSupportCasesResponse]): - paging_args: Optional[PagingArgs] = None - - -# @Route("/{version}/support/cases", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class OpenSupportCaseRequest(RequestBase, IReturn[IdResponse]): - kind: Optional[str] = None - severity: Optional[str] = None - subject: Optional[str] = None - message: Optional[str] = None - project_id: Optional[str] = None - - -# @Route("/{version}/diagnostics/packs", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDiagnosticPacks(CodeMashRequestBase, IReturn[GetDiagnosticPacksResponse]): - pass - - -# @Route("/{version}/diagnostics/packs/{PackName}/run", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RunDiagnosticPackRequest(CodeMashRequestBase, IReturn[RunDiagnosticPackResponse]): - pack_name: Optional[str] = None - pack_version: Optional[int] = None - case_id: Optional[str] = None - - -# @Route("/{version}/diagnostics/echo", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class GetDiagnosticEcho(CodeMashRequestBase, IReturn[GetDiagnosticEchoResponse]): - case_id: Optional[str] = None - - -# @Route("/{version}/diagnostics/events", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class ReadDiagnosticEventsRequest(CodeMashRequestBase, IReturn[ReadDiagnosticEventsResponse]): - stream: Optional[str] = None - from_: int = field(metadata=config(field_name='from'), default=0) - count: int = 0 - case_id: Optional[str] = None - - -# @Route("/{version}/diagnostics/logs", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class QueryDiagnosticLogsRequest(CodeMashListPaginationRequestBase, IReturn[QueryDiagnosticLogsResponse]): - level: Optional[str] = None - module: Optional[str] = None - log_correlation_id: Optional[str] = None - event_code: Optional[str] = None - search: Optional[str] = None - from_utc: Optional[datetime.datetime] = None - to_utc: Optional[datetime.datetime] = None - case_id: Optional[str] = None - - -# @Route("/{version}/diagnostics/redis", "GET") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class InspectDiagnosticRedisRequest(CodeMashRequestBase, IReturn[InspectDiagnosticRedisResponse]): - key_pattern: Optional[str] = None - case_id: Optional[str] = None - - -# @Route("/{version}/diagnostics/health/{CheckId}", "POST") -@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) -@dataclass -class RunDiagnosticHealthCheckRequest(CodeMashRequestBase, IReturn[RunDiagnosticHealthCheckResponse]): - check_id: Optional[str] = None - case_id: Optional[str] = None - diff --git a/src/norbix_python/functions.py b/src/norbix_python/functions.py index 2d6f7d6..23814e9 100644 --- a/src/norbix_python/functions.py +++ b/src/norbix_python/functions.py @@ -2,8 +2,8 @@ When a trigger, a scheduler task or a manual call (`hub.code.invoke_code_function`) runs one of your functions on AWS Lambda, Azure Functions or Google Cloud -Functions, the function gets one JSON envelope (`CodeFunctionEventDto` in -`references/hub_dtos.py`). :func:`parse_function_event` turns it into a +Functions, the function gets one JSON envelope (`CodeFunctionEventDto` in the +Norbix API reference). :func:`parse_function_event` turns it into a :class:`FunctionEvent`: a thin wrapper over the decoded dict with typed views of the slots in `data` and the constructor options of a client that acts as the run-as user. Nothing here re-declares the DTO; every field is read from