export type LoginDetail = {username?: string | undefined, userId?: string | undefined, tenantName?: string | undefined, connectionString?: string | undefined, orgId?: string | undefined, roleName?: string | undefined}; export type ServiceLoginDetails = {username?: string | undefined, tenantName?: string | undefined, orgId?: string | undefined}; export type Subscription = {type?: string | undefined, hasRenewal?: string | undefined}; export type OutlookConfig = {graphClientId?: string | undefined, graphSecretKey?: string | undefined, graphTenantId?: string | undefined, graphClientState?: string | undefined, proxyHost?: string | undefined, proxyPort?: number | undefined, graphEnabled?: boolean | undefined, proxyEnabled?: boolean | undefined}; export type GmailConfig = {gmailClientId?: string | undefined, gmailProjectId?: string | undefined, gmailAuthUri?: string | undefined, gmailTokenUri?: string | undefined, gmailAuthProviderX509CertUrl?: string | undefined, gmailClientSecret?: string | undefined, gmailRedirectUris?: Array | undefined, gmailTopicName?: string | undefined, gmailEnabled?: boolean | undefined}; export type AzureAdConfig = {applicationClientId?: string | undefined, applicationSecretKey?: string | undefined, applicationTenantId?: string | undefined}; export type IdPProviderConfig = {azureAdConfig?: AzureAdConfig | undefined}; export type OrganizationSettings = {hostName?: string | undefined, outlookConfig?: OutlookConfig | undefined, gmailConfig?: GmailConfig | undefined, chatGPTKey?: string | undefined, isUserBasedConsent?: boolean | undefined, idPProviderConfig?: IdPProviderConfig | undefined, configs?: {[key: string]: string} | undefined}; export type OrganizationDto = {id?: string | undefined, name?: string | undefined, tenantName?: string | undefined, ownerDbName?: string | undefined, email?: string | undefined, website?: string | undefined, subdomain?: string | undefined, category?: string | undefined, mainCategory?: string | undefined, language?: string | undefined, contactNumber?: string | undefined, theme?: string | undefined, type?: ('Shared' | 'Enterprise') | undefined, model?: string | undefined, subscription?: Subscription | undefined, sourceOrgId?: string | undefined, dateFormat?: string | undefined, currency?: string | undefined, organizationSettings?: OrganizationSettings | undefined, cloningStatus?: string | undefined, orgLogoUrl?: string | undefined, versionId?: string | undefined, onboardingStatus?: string | undefined, template?: boolean | undefined}; export type OrganizationCommand = {loginDetail?: LoginDetail | undefined, serviceLoginDetails?: ServiceLoginDetails | undefined, eventType?: ('JOB_TYPE_CREATED' | 'JOB_TYPE_MODIFIED' | 'JOB_TYPE_DELETED' | 'JOB_INSTANCE_CREATED' | 'JOB_INSTANCE_MODIFIED' | 'JOB_INSTANCE_STATUS_CHANGED' | 'JOB_INSTANCE_DELETED' | 'JOB_INSTANCE_RESTORED' | 'JOB_INSTANCE_VIEWED' | 'ORG_CREATED' | 'ORG_MODIFIED' | 'ORG_DELETED' | 'USER_CREATED' | 'USER_MODIFIED' | 'USER_DELETED' | 'EMAIL_SUBSCRIPTION_RENEWAL' | 'FILES_UPLOAD_TO_BLOB' | 'JOB_INSTANCE_DATA_FIELDS_UPDATED' | 'GMAIL_WATCH_RENEWAL' | 'JOB_INSTANCE_ROLLUP_OPERATIONS' | 'JOB_INSTANCE_DATA_FIELDS_UPDATE_INTERNAL' | 'JOB_INSTANCE_DATA_FIELDS_UPDATE_WITHOUT_EVENTING' | 'UPDATE_JOB_INSTANCE_AND_WORKFLOW_WITH_ACTIVITY_HISTORY' | 'CREATE_JOB_INSTANCE_WITH_SOURCE_INSTANCE_ACTIVITY' | 'FINAL_JOB_INSTANCE_MODIFIED' | 'FINAL_JOB_INSTANCE_CREATED' | 'FINAL_JOB_INSTANCE_DELETED' | 'FINAL_JOB_INSTANCE_STATUS_CHANGED' | 'CREATE_JOB_INSTANCE_WITH_VALIDATIONS') | undefined, commandType?: ('CREATE_JOB_INSTANCE' | 'UPDATE_JOB_INSTANCE' | 'JOB_STATUS_CHANGE' | 'BAJAJ_STATUS_UPDATE' | 'CREATE_PUBLIC_JOB_INSTANCE' | 'CREATE_BATCH_INSTANCES' | 'CREATE_BATCH_JOB_INSTANCES_FROM_BLOB' | 'UPLOAD_FILES_TO_BLOB_STORAGE' | 'UPDATE_ORGANIZATION_AZURE_AD_CONFIG' | 'UPDATE_JOB_TYPE' | 'ACTIVITY_HISTORY_RETENTION_POLICY' | 'CREATE_BATCH_PARENT_AND_SUB_JOB_INSTANCE' | 'HOOK_STATUS_UPDATE' | 'SIEMENS_CERTIFICATE_UPDATE' | 'DELETE_JOB_INSTANCE' | 'UPDATE_BATCH_JOB_INSTANCES') | undefined, organizationDto?: OrganizationDto | undefined}; export type CreateApiApiV1InternalOrganizationsCommandArgs = {body: OrganizationCommand}; export type CreateApiApiV1InternalOrganizationsCommandOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /api/v1/internal/organizations/command */ export const createApiApiV1InternalOrganizationsCommand = async (args: CreateApiApiV1InternalOrganizationsCommandArgs, options?: CreateApiApiV1InternalOrganizationsCommandOptions) => { const {baseUrl = "https://api-docs.gosure.ai", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/internal/organizations/command${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };