Circle V2 API Docs
    Preparing search index...

    Variable integrationsRepoConst

    integrationsRepo: DbRepo<
        {
            countPatientsByFacility: (facilityId: FacilityId) => Promise<number>;
            getActiveByFacility: (
                facilityId: FacilityId,
            ) => Promise<
                | {
                    created_at: DbDate;
                    created_by: string
                    | null;
                    credentials:
                        | {
                            access_id: string;
                            app_id: string;
                            location_id: number;
                            location_name?: string;
                            secret_key: string;
                        }
                        | {
                            bearer_token: string;
                            location_ids: number[];
                            location_name?: string;
                        }
                        | {
                            api_id: string;
                            api_secret: string;
                            location_name?: string;
                            realm_id: string;
                            service_facility_id: number;
                            sunwave_email: string;
                        };
                    entity_id: number & { __brand: "EntityId" };
                    facility_id: FacilityId | null;
                    id: IntegrationId;
                    label: string | null;
                    last_sync: string | null;
                    status: "error" | "active" | "inactive";
                    type: "kipu" | "lightningstep" | "sunwave";
                    updated_at: DbDate;
                }
                | null,
            >;
            getById: (
                id: IntegrationId,
                entityId: EntityId,
            ) => Promise<
                {
                    created_at: DbDate;
                    created_by: string
                    | null;
                    credentials:
                        | {
                            access_id: string;
                            app_id: string;
                            location_id: number;
                            location_name?: string;
                            secret_key: string;
                        }
                        | {
                            bearer_token: string;
                            location_ids: number[];
                            location_name?: string;
                        }
                        | {
                            api_id: string;
                            api_secret: string;
                            location_name?: string;
                            realm_id: string;
                            service_facility_id: number;
                            sunwave_email: string;
                        };
                    entity_id: number & { __brand: "EntityId" };
                    facility_id: FacilityId | null;
                    id: IntegrationId;
                    label: string | null;
                    last_sync: string | null;
                    status: "error" | "active" | "inactive";
                    type: "kipu" | "lightningstep" | "sunwave";
                    updated_at: DbDate;
                },
            >;
            insertForFacility: (
                params: Pick<
                    IntegrationInsertParams,
                    | "entity_id"
                    | "facility_id"
                    | "type"
                    | "label"
                    | "credentials"
                    | "created_by",
                >,
            ) => Promise<
                {
                    created_at: DbDate;
                    created_by: string
                    | null;
                    credentials:
                        | {
                            access_id: string;
                            app_id: string;
                            location_id: number;
                            location_name?: string;
                            secret_key: string;
                        }
                        | {
                            bearer_token: string;
                            location_ids: number[];
                            location_name?: string;
                        }
                        | {
                            api_id: string;
                            api_secret: string;
                            location_name?: string;
                            realm_id: string;
                            service_facility_id: number;
                            sunwave_email: string;
                        };
                    entity_id: number & { __brand: "EntityId" };
                    facility_id: FacilityId | null;
                    id: IntegrationId;
                    label: string | null;
                    last_sync: string | null;
                    status: "error" | "active" | "inactive";
                    type: "kipu" | "lightningstep" | "sunwave";
                    updated_at: DbDate;
                },
            >;
            listByFacility: (
                facilityId: FacilityId,
            ) => Promise<
                {
                    created_at: DbDate;
                    created_by: string
                    | null;
                    credentials:
                        | {
                            access_id: string;
                            app_id: string;
                            location_id: number;
                            location_name?: string;
                            secret_key: string;
                        }
                        | {
                            bearer_token: string;
                            location_ids: number[];
                            location_name?: string;
                        }
                        | {
                            api_id: string;
                            api_secret: string;
                            location_name?: string;
                            realm_id: string;
                            service_facility_id: number;
                            sunwave_email: string;
                        };
                    entity_id: number & { __brand: "EntityId" };
                    facility_id: FacilityId | null;
                    id: IntegrationId;
                    label: string | null;
                    last_sync: string | null;
                    status: "error" | "active" | "inactive";
                    type: "kipu" | "lightningstep" | "sunwave";
                    updated_at: DbDate;
                }[],
            >;
            update: (
                id: IntegrationId,
                fields: Pick<IntegrationUpdateParams, "label" | "credentials" | "status">,
            ) => Promise<
                {
                    created_at: DbDate;
                    created_by: string
                    | null;
                    credentials:
                        | {
                            access_id: string;
                            app_id: string;
                            location_id: number;
                            location_name?: string;
                            secret_key: string;
                        }
                        | {
                            bearer_token: string;
                            location_ids: number[];
                            location_name?: string;
                        }
                        | {
                            api_id: string;
                            api_secret: string;
                            location_name?: string;
                            realm_id: string;
                            service_facility_id: number;
                            sunwave_email: string;
                        };
                    entity_id: number & { __brand: "EntityId" };
                    facility_id: FacilityId | null;
                    id: IntegrationId;
                    label: string | null;
                    last_sync: string | null;
                    status: "error" | "active" | "inactive";
                    type: "kipu" | "lightningstep" | "sunwave";
                    updated_at: DbDate;
                },
            >;
            updateLabelByFacilityId: (
                facilityId: FacilityId,
                label: string,
            ) => Promise<UpdateResult[]>;
        },
    > = ...