diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 3c7257365..fe31d4e5d 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -263,22 +263,22 @@ services: # volumes: # - pgadmin-data:/var/lib/pgadmin - ngrok: - image: ngrok/ngrok:latest - restart: always - command: - - "start" - - "--all" - - "--config" - - "/etc/ngrok.yml" - volumes: - - ./ngrok.yml:/etc/ngrok.yml - ports: - - 4040:4040 - depends_on: - api: - condition: service_healthy - network_mode: "host" + # ngrok: + # image: ngrok/ngrok:latest + # restart: always + # command: + # - "start" + # - "--all" + # - "--config" + # - "/etc/ngrok.yml" + # volumes: + # - ./ngrok.yml:/etc/ngrok.yml + # ports: + # - 4040:4040 + # depends_on: + # api: + # condition: service_healthy + # network_mode: "host" docs: build: diff --git a/docs/syncwithCode.sh b/docs/syncwithCode.sh index a9feea75c..fcfa30015 100644 --- a/docs/syncwithCode.sh +++ b/docs/syncwithCode.sh @@ -14,7 +14,7 @@ grep '^|' ../packages/api/src/ats/README.md > snippets/ats-catalog.mdx # File Storage grep '^|' ../packages/api/src/filestorage/README.md > snippets/filestorage-catalog.mdx -# File Storage +# Ecommerce grep '^|' ../packages/api/src/ecommerce/README.md > snippets/ecommerce-catalog.mdx npx @mintlify/scraping@latest openapi-file openapi-with-code-samples.yaml -o objects diff --git a/packages/api/prisma/schema.prisma b/packages/api/prisma/schema.prisma index 37071eb07..f6e86b15b 100644 --- a/packages/api/prisma/schema.prisma +++ b/packages/api/prisma/schema.prisma @@ -16,8 +16,8 @@ model users { first_name String last_name String id_stytch String? @unique(map: "force_stytch_id_unique") - created_at DateTime @default(now()) @db.Timestamp(6) - modified_at DateTime @default(now()) @db.Timestamp(6) + created_at DateTime @default(now()) @db.Timestamptz(6) + modified_at DateTime @default(now()) @db.Timestamptz(6) reset_token String? reset_token_expires_at DateTime? @db.Timestamptz(6) api_keys api_keys[] @@ -31,10 +31,10 @@ model webhook_endpoints { url String secret String active Boolean - created_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) scope String[] id_project String @db.Uuid - last_update DateTime? @db.Timestamp(6) + last_update DateTime? @db.Timestamptz(6) webhook_delivery_attempts webhook_delivery_attempts[] } @@ -61,8 +61,8 @@ model api_keys { projects projects @relation(fields: [id_project], references: [id_project], onDelete: NoAction, onUpdate: NoAction, map: "fk_7") users users @relation(fields: [id_user], references: [id_user], onDelete: NoAction, onUpdate: NoAction, map: "fk_8") - @@index([id_user], map: "fk_2") @@index([id_project], map: "fk_api_keys_projects") + @@index([id_user], map: "fkx_api_keys_user_id") } /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments @@ -105,8 +105,8 @@ model connections { token_type String access_token String? refresh_token String? - expiration_timestamp DateTime? @db.Timestamp(6) - created_at DateTime @db.Timestamp(6) + expiration_timestamp DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) connection_token String? id_project String @db.Uuid id_linked_user String @db.Uuid @@ -130,8 +130,8 @@ model crm_addresses { id_crm_company String? @db.Uuid id_crm_contact String? @db.Uuid id_connection String @db.Uuid - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) owner_type String crm_contacts crm_contacts? @relation(fields: [id_crm_contact], references: [id_crm_contact], onDelete: NoAction, onUpdate: NoAction, map: "fk_14") crm_companies crm_companies? @relation(fields: [id_crm_company], references: [id_crm_company], onDelete: NoAction, onUpdate: NoAction, map: "fk_15") @@ -145,8 +145,8 @@ model crm_companies { name String? industry String? number_of_employees BigInt? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) remote_id String? remote_platform String? id_crm_user String? @db.Uuid @@ -169,8 +169,8 @@ model crm_contacts { id_crm_contact String @id(map: "pk_crm_contacts") @db.Uuid first_name String? last_name String? - created_at DateTime? @db.Timestamp(6) - modified_at DateTime? @db.Timestamp(6) + created_at DateTime? @db.Timestamptz(6) + modified_at DateTime? @db.Timestamptz(6) remote_id String? remote_platform String? id_crm_user String? @db.Uuid @@ -191,8 +191,8 @@ model crm_deals { name String description String? amount BigInt - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) remote_id String? remote_platform String? id_crm_user String? @db.Uuid @@ -214,8 +214,8 @@ model crm_deals { model crm_deals_stages { id_crm_deals_stage String @id(map: "pk_crm_deal_stages") @db.Uuid stage_name String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_linked_user String? @db.Uuid remote_id String? remote_platform String? @@ -229,8 +229,8 @@ model crm_email_addresses { email_address String email_address_type String owner_type String - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_crm_company String? @db.Uuid id_crm_contact String? @db.Uuid id_connection String @db.Uuid @@ -248,8 +248,8 @@ model crm_engagements { type String? direction String? subject String? - start_at DateTime? @db.Timestamp(6) - end_time DateTime? @db.Timestamp(6) + start_at DateTime? @db.Timestamptz(6) + end_time DateTime? @db.Timestamptz(6) remote_id String? id_linked_user String? @db.Uuid remote_platform String? @@ -257,8 +257,8 @@ model crm_engagements { id_crm_user String? @db.Uuid id_connection String @db.Uuid contacts String[] - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) crm_companies crm_companies? @relation(fields: [id_crm_company], references: [id_crm_company], onDelete: NoAction, onUpdate: NoAction, map: "fk_29") crm_users crm_users? @relation(fields: [id_crm_user], references: [id_crm_user], onDelete: NoAction, onUpdate: NoAction, map: "fk_crm_engagement_crm_user") @@ -269,8 +269,8 @@ model crm_engagements { model crm_notes { id_crm_note String @id(map: "pk_crm_notes") @db.Uuid content String - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_crm_company String? @db.Uuid id_crm_contact String? @db.Uuid id_crm_deal String? @db.Uuid @@ -295,8 +295,8 @@ model crm_phone_numbers { phone_number String? phone_type String? owner_type String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_crm_company String? @db.Uuid id_crm_contact String? @db.Uuid id_connection String @db.Uuid @@ -312,10 +312,10 @@ model crm_tasks { subject String? content String? status String? - due_date DateTime? @db.Timestamp(6) - finished_date DateTime? @db.Timestamp(6) - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + due_date DateTime? @db.Timestamptz(6) + finished_date DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_crm_user String? @db.Uuid id_crm_company String? @db.Uuid id_crm_deal String? @db.Uuid @@ -336,8 +336,8 @@ model crm_users { id_crm_user String @id(map: "pk_crm_users") @db.Uuid name String? email String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_linked_user String? @db.Uuid remote_id String? remote_platform String? @@ -388,7 +388,7 @@ model events { method String url String provider String - timestamp DateTime @default(now()) @db.Timestamp(6) + timestamp DateTime @default(now()) @db.Timestamptz(6) id_linked_user String @db.Uuid linked_users linked_users @relation(fields: [id_linked_user], references: [id_linked_user], onDelete: NoAction, onUpdate: NoAction, map: "fk_12") jobs_status_history jobs_status_history[] @@ -398,11 +398,13 @@ model events { } model invite_links { - id_invite_link String @id(map: "pk_invite_links") @db.Uuid - status String - email String? - id_linked_user String @db.Uuid - linked_users linked_users @relation(fields: [id_linked_user], references: [id_linked_user], onDelete: NoAction, onUpdate: NoAction, map: "fk_37") + id_invite_link String @id(map: "pk_invite_links") @db.Uuid + status String + email String? + id_linked_user String @db.Uuid + displayed_verticals String[] + displayed_providers String[] + linked_users linked_users @relation(fields: [id_linked_user], references: [id_linked_user], onDelete: NoAction, onUpdate: NoAction, map: "fk_37") @@index([id_linked_user], map: "fk_invite_link_linkeduserid") } @@ -410,7 +412,7 @@ model invite_links { /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model jobs_status_history { id_jobs_status_history String @id(map: "pk_jobs_status_history") @db.Uuid - timestamp DateTime @default(now()) @db.Timestamp(6) + timestamp DateTime @default(now()) @db.Timestamptz(6) previous_status String new_status String id_event String @db.Uuid @@ -457,7 +459,7 @@ model remote_data { ressource_owner_id String? @unique(map: "force_unique_ressourceownerid") @db.Uuid format String? data String? - created_at DateTime? @db.Timestamp(6) + created_at DateTime? @db.Timestamptz(6) } /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments @@ -467,8 +469,8 @@ model tcg_accounts { name String? domains String[] remote_platform String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_linked_user String? @db.Uuid id_connection String @db.Uuid tcg_contacts tcg_contacts[] @@ -482,8 +484,8 @@ model tcg_attachments { file_name String? file_url String? uploader String @db.Uuid - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_linked_user String? @db.Uuid id_tcg_ticket String? @db.Uuid id_tcg_comment String? @db.Uuid @@ -504,8 +506,8 @@ model tcg_collections { collection_type String? parent_collection String? @db.Uuid id_tcg_ticket String? @db.Uuid - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_linked_user String @db.Uuid id_connection String @db.Uuid } @@ -524,8 +526,8 @@ model tcg_comments { id_tcg_contact String? @db.Uuid id_tcg_user String? @db.Uuid id_linked_user String? @db.Uuid - created_at DateTime? @db.Timestamp(6) - modified_at DateTime? @db.Timestamp(6) + created_at DateTime? @db.Timestamptz(6) + modified_at DateTime? @db.Timestamptz(6) id_connection String @db.Uuid tcg_attachments tcg_attachments[] tcg_tickets tcg_tickets? @relation(fields: [id_tcg_ticket], references: [id_tcg_ticket], onDelete: NoAction, onUpdate: NoAction, map: "fk_40_1") @@ -545,8 +547,8 @@ model tcg_contacts { details String? remote_id String? remote_platform String? - created_at DateTime? @db.Timestamp(6) - modified_at DateTime? @db.Timestamp(6) + created_at DateTime? @db.Timestamptz(6) + modified_at DateTime? @db.Timestamptz(6) id_tcg_account String? @db.Uuid id_linked_user String? @db.Uuid id_connection String @db.Uuid @@ -562,8 +564,8 @@ model tcg_tags { remote_id String? remote_platform String? id_tcg_ticket String? @db.Uuid - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_linked_user String? @db.Uuid id_connection String @db.Uuid tcg_tickets tcg_tickets? @relation(fields: [id_tcg_ticket], references: [id_tcg_ticket], onDelete: NoAction, onUpdate: NoAction, map: "fk_48") @@ -589,12 +591,12 @@ model tcg_tickets { name String? status String? description String? - due_date DateTime? @db.Timestamp(6) + due_date DateTime? @db.Timestamptz(6) ticket_type String? parent_ticket String? @db.Uuid tags String[] collections String[] - completed_at DateTime? @db.Timestamp(6) + completed_at DateTime? @db.Timestamptz(6) priority String? assigned_to String[] remote_id String? @@ -602,8 +604,8 @@ model tcg_tickets { creator_type String? id_tcg_user String? @db.Uuid id_linked_user String? @db.Uuid - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_connection String @db.Uuid tcg_attachments tcg_attachments[] tcg_comments tcg_comments[] @@ -622,8 +624,8 @@ model tcg_users { teams String[] id_linked_user String? @db.Uuid id_connection String @db.Uuid - created_at DateTime? @db.Timestamp(6) - modified_at DateTime? @db.Timestamp(6) + created_at DateTime? @db.Timestamptz(6) + modified_at DateTime? @db.Timestamptz(6) tcg_comments tcg_comments[] } @@ -645,9 +647,9 @@ model value { /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model webhook_delivery_attempts { id_webhook_delivery_attempt String @id(map: "pk_webhook_event") @db.Uuid - timestamp DateTime @db.Timestamp(6) + timestamp DateTime @db.Timestamptz(6) status String - next_retry DateTime? @db.Timestamp(6) + next_retry DateTime? @db.Timestamptz(6) attempt_count BigInt id_webhooks_payload String? @db.Uuid id_webhook_endpoint String? @db.Uuid @@ -678,6 +680,8 @@ model connector_sets { crm_zendesk Boolean? crm_close Boolean? fs_box Boolean? + tcg_github Boolean? + ecom_woocommerce Boolean? projects projects[] } @@ -690,18 +694,18 @@ model managed_webhooks { api_version String? active_events String[] remote_signing_secret String? - modified_at DateTime @db.Timestamp(6) - created_at DateTime @db.Timestamp(6) + modified_at DateTime @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) } model fs_drives { id_fs_drive String @id(map: "pk_fs_drives") @db.Uuid drive_url String? name String? - remote_created_at DateTime? @db.Timestamp(6) + remote_created_at DateTime? @db.Timestamptz(6) remote_id String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_connection String @db.Uuid } @@ -714,8 +718,8 @@ model fs_files { remote_id String? id_fs_permission String? @db.Uuid id_fs_folder String? @db.Uuid - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_connection String @db.Uuid @@index([id_fs_folder], map: "fk_fs_file_folderid") @@ -730,8 +734,8 @@ model fs_folders { description String? parent_folder String? @db.Uuid remote_id String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_fs_drive String? @db.Uuid id_connection String @db.Uuid id_fs_permission String? @db.Uuid @@ -748,8 +752,8 @@ model fs_permissions { group String? @db.Uuid type String? roles String[] - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_connection String @db.Uuid } @@ -1048,8 +1052,8 @@ model fs_groups { users String[] remote_id String? remote_was_deleted Boolean - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_connection String @db.Uuid } @@ -1059,8 +1063,8 @@ model fs_users { email String? is_me Boolean remote_id String? - created_at DateTime @db.Timestamp(6) - modified_at DateTime @db.Timestamp(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) id_connection String @db.Uuid } @@ -1763,3 +1767,347 @@ model ecom_fulfilment_orders { model ecom_order_line_items { id_ecom_order_line_item String @id(map: "pk_106") @db.Uuid } + +model hris_bank_infos { + id_hris_bank_info String @id(map: "pk_hris_bank_infos") @db.Uuid + account_type String? + bank_name String? + account_number String? + routing_number String? + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + id_hris_employee String? @db.Uuid + hris_employees hris_employees? @relation(fields: [id_hris_employee], references: [id_hris_employee], onDelete: NoAction, onUpdate: NoAction, map: "fk_bank_infos_employeeid") + + @@index([id_hris_employee], map: "fkx_bank_infos_employeeid") +} + +model hris_benefits { + id_hris_benefit String @id(map: "pk_hris_benefits") @db.Uuid + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + provider_name String? + id_hris_employee String? @db.Uuid + employee_contribution BigInt? + company_contribution BigInt? + start_date DateTime? @db.Timestamptz(6) + end_date DateTime? @db.Timestamptz(6) + id_hris_employer_benefit String? @db.Uuid + hris_employer_benefits hris_employer_benefits? @relation(fields: [id_hris_employer_benefit], references: [id_hris_employer_benefit], onDelete: NoAction, onUpdate: NoAction, map: "fk_hris_benefit_employer_benefit_id") + hris_employees hris_employees? @relation(fields: [id_hris_employee], references: [id_hris_employee], onDelete: NoAction, onUpdate: NoAction, map: "fk_hris_benefits_employeeid") + + @@index([id_hris_employer_benefit], map: "fkx_hris_benefit_employer_benefit_id") + @@index([id_hris_employee], map: "fkx_hris_benefits_employeeid") +} + +model hris_companies { + id_hris_company String @id(map: "pk_hris_companies") @db.Uuid + legal_name String? + display_name String? + eins String[] + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + hris_employees hris_employees[] +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model hris_dependents { + id_hris_dependents String @id(map: "pk_hris_dependents") @db.Uuid + first_name String? + last_name String? + middle_name String? + relationship String? + date_of_birth DateTime? @db.Date + gender String? + phone_number String? + home_location String? @db.Uuid + is_student Boolean? + ssn String? + id_hris_employee String? @db.Uuid + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + hris_employees hris_employees? @relation(fields: [id_hris_employee], references: [id_hris_employee], onDelete: NoAction, onUpdate: NoAction, map: "fk_hris_dependant_hris_employee_id") + + @@index([id_hris_employee], map: "fkx_hris_dependant_hris_employee_id") +} + +model hris_employee_payroll_runs { + id_hris_employee_payroll_run String @id(map: "pk_hris_employee_payroll_runs") @db.Uuid + id_hris_employee String? @db.Uuid + id_hris_payroll_run String? @db.Uuid + gross_pay BigInt? + net_pay BigInt? + start_date DateTime? @db.Timestamptz(6) + end_date DateTime? @db.Timestamptz(6) + check_date DateTime? @db.Timestamptz(6) + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + hris_payroll_runs hris_payroll_runs? @relation(fields: [id_hris_payroll_run], references: [id_hris_payroll_run], onDelete: NoAction, onUpdate: NoAction, map: "fk_employee_payroll_run_payroll_run_id") + hris_employees hris_employees? @relation(fields: [id_hris_employee], references: [id_hris_employee], onDelete: NoAction, onUpdate: NoAction, map: "fk_hris_employee_payroll_run_employee_id") + hris_employee_payroll_runs_deductions hris_employee_payroll_runs_deductions[] + hris_employee_payroll_runs_earnings hris_employee_payroll_runs_earnings[] + hris_employee_payroll_runs_taxes hris_employee_payroll_runs_taxes[] + + @@index([id_hris_payroll_run], map: "fkx_employee_payroll_run_payroll_run_id") + @@index([id_hris_employee], map: "fkx_hris_employee_payroll_run_employee_id") +} + +model hris_employee_payroll_runs_deductions { + id_hris_employee_payroll_runs_deduction String @id(map: "pk_hris_employee_payroll_runs_deductions") @db.Uuid + remote_id String? + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + id_hris_employee_payroll_run String? @db.Uuid + name String? + employee_deduction BigInt? + company_deduction BigInt? + hris_employee_payroll_runs hris_employee_payroll_runs? @relation(fields: [id_hris_employee_payroll_run], references: [id_hris_employee_payroll_run], onDelete: NoAction, onUpdate: NoAction, map: "fk_hris_employee_payroll_runs_deduction_hris_employee_payroll_i") + + @@index([id_hris_employee_payroll_run], map: "fkx_hris_employee_payroll_runs_deduction_hris_employee_payroll_") +} + +model hris_employee_payroll_runs_earnings { + id_hris_employee_payroll_runs_earning String @id(map: "pk_hris_employee_payroll_runs_earnings") @db.Uuid + amount BigInt? + type String? + id_hris_employee_payroll_run String? @db.Uuid + remote_id String? + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + hris_employee_payroll_runs hris_employee_payroll_runs? @relation(fields: [id_hris_employee_payroll_run], references: [id_hris_employee_payroll_run], onDelete: NoAction, onUpdate: NoAction, map: "fk_hris_employee_payroll_runs_earning_hris_employee_payroll_run") + + @@index([id_hris_employee_payroll_run], map: "fkx_hris_employee_payroll_runs_earning_hris_employee_payroll_ru") +} + +model hris_employee_payroll_runs_taxes { + id_hris_employee_payroll_runs_tax String @id(map: "pk_hris_employee_payroll_runs_taxes") @db.Uuid + name String? + amount BigInt? + employer_tax Boolean? + id_hris_employee_payroll_run String? @db.Uuid + remote_id String? + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + hris_employee_payroll_runs hris_employee_payroll_runs? @relation(fields: [id_hris_employee_payroll_run], references: [id_hris_employee_payroll_run], onDelete: NoAction, onUpdate: NoAction, map: "fk_hris_employee_payroll_run_tax_hris_employee_payroll_run_id") + + @@index([id_hris_employee_payroll_run], map: "fkx_hris_employee_payroll_run_tax_hris_employee_payroll_run_id") +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model hris_employees { + id_hris_employee String @id(map: "pk_hris_employees") @db.Uuid + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + groups String[] + employee_number String? + id_hris_company String? @db.Uuid + first_name String? + last_name String? + preferred_name String? + display_full_name String? + username String? + work_email String? + personal_email String? + mobile_phone_number String? + employments String[] + ssn String? + gender String? + ethnicity String? + marital_status String? + date_of_birth DateTime? @db.Date + start_date DateTime? @db.Date + employment_status String? + termination_date DateTime? @db.Date + avatar_url String? + hris_bank_infos hris_bank_infos[] + hris_benefits hris_benefits[] + hris_dependents hris_dependents[] + hris_employee_payroll_runs hris_employee_payroll_runs[] + hris_companies hris_companies? @relation(fields: [id_hris_company], references: [id_hris_company], onDelete: NoAction, onUpdate: NoAction, map: "fk_employee_companyid") + hris_employments hris_employments[] + hris_time_off_balances hris_time_off_balances[] + hris_timesheet_entries hris_timesheet_entries[] + + @@index([id_hris_company], map: "fkx_employee_companyid") +} + +model hris_employer_benefits { + id_hris_employer_benefit String @id(map: "pk_hris_employer_benefits") @db.Uuid + id_connection String @db.Uuid + benefit_plan_type String? + name String? + description String? + deduction_code String? + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + remote_was_deleted Boolean + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + hris_benefits hris_benefits[] +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model hris_employments { + id_hris_employment String @id(map: "pk_hris_employments") @db.Uuid + job_title String + pay_rate BigInt? + pay_period String? + pay_frequency String? + pay_currency String? + flsa_status String? + effective_date DateTime? @db.Date + employment_type String? + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + id_hris_pay_group String? @db.Uuid + id_hris_employee String? @db.Uuid + hris_employees hris_employees? @relation(fields: [id_hris_employee], references: [id_hris_employee], onDelete: NoAction, onUpdate: NoAction, map: "fk_107") + hris_pay_groups hris_pay_groups? @relation(fields: [id_hris_pay_group], references: [id_hris_pay_group], onDelete: NoAction, onUpdate: NoAction, map: "fk_employments_pay_group_id") + + @@index([id_hris_employee], map: "fk_2") + @@index([id_hris_pay_group], map: "fkx_employments_pay_group_id") +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model hris_groups { + id_hris_group String @id(map: "pk_hris_groups") @db.Uuid + parent_group String? @db.Uuid + name String? + type String? + remote_id String + remote_created_at DateTime @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model hris_locations { + id_hris_location String @id(map: "pk_hris_locations") @db.Uuid + name String? + phone_number String? + street_1 String? + street_2 String? + city String? + state String? + zip_code String? + country String? + location_type String? + remote_id String + remote_created_at DateTime @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid +} + +model hris_pay_groups { + id_hris_pay_group String @id(map: "pk_hris_pay_groups") @db.Uuid + pay_group_name String? + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + hris_employments hris_employments[] +} + +model hris_payroll_runs { + id_hris_payroll_run String @id(map: "pk_hris_payroll_runs") @db.Uuid + run_state String? + run_type String? + start_date DateTime? @db.Timestamptz(6) + end_date DateTime? @db.Timestamptz(6) + check_date DateTime? @db.Timestamptz(6) + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + hris_employee_payroll_runs hris_employee_payroll_runs[] +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model hris_time_off { + id_hris_time_off String @id(map: "pk_hris_time_off") @db.Uuid + employee String? @db.Uuid + approver String? @db.Uuid + status String? + employee_note String? + units String? + amount BigInt? + request_type String? + start_time DateTime? @db.Timestamptz(6) + end_time DateTime? @db.Timestamptz(6) + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid +} + +model hris_time_off_balances { + id_hris_time_off_balance String @id(map: "pk_hris_time_off_balances") @db.Uuid + balance BigInt? + id_hris_employee String? @db.Uuid + used BigInt? + policy_type String? + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + hris_employees hris_employees? @relation(fields: [id_hris_employee], references: [id_hris_employee], onDelete: NoAction, onUpdate: NoAction, map: "fk_hris_timeoff_balance_hris_employee_id") + + @@index([id_hris_employee], map: "fkx_hris_timeoff_balance_hris_employee_id") +} + +model hris_timesheet_entries { + id_hris_timesheet_entry String @id(map: "pk_hris_timesheet_entries") @db.Uuid + hours_worked BigInt? + start_time DateTime? @db.Timestamptz(6) + end_time DateTime? @db.Timestamptz(6) + id_hris_employee String? @db.Uuid + remote_id String? + remote_created_at DateTime? @db.Timestamptz(6) + created_at DateTime @db.Timestamptz(6) + modified_at DateTime @db.Timestamptz(6) + remote_was_deleted Boolean + id_connection String @db.Uuid + hris_employees hris_employees? @relation(fields: [id_hris_employee], references: [id_hris_employee], onDelete: NoAction, onUpdate: NoAction, map: "fk_timesheet_entry_employee_id") + + @@index([id_hris_employee], map: "fkx_timesheet_entry_employee_id") +} diff --git a/packages/api/scripts/init.sql b/packages/api/scripts/init.sql index 4a7ff8d0f..ec0ad6fdf 100644 --- a/packages/api/scripts/init.sql +++ b/packages/api/scripts/init.sql @@ -28,10 +28,10 @@ CREATE TABLE webhook_endpoints url text NOT NULL, secret text NOT NULL, active boolean NOT NULL, - created_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, "scope" text[] NULL, id_project uuid NOT NULL, - last_update timestamp NULL, + last_update timestamp with time zone NULL, CONSTRAINT PK_webhook_endpoint PRIMARY KEY ( id_webhook_endpoint ) ); COMMENT ON COLUMN webhook_endpoints.endpoint_description IS 'An optional description of what the webhook is used for'; @@ -49,8 +49,8 @@ CREATE TABLE users first_name text NOT NULL, last_name text NOT NULL, id_stytch text NULL, - created_at timestamp NOT NULL DEFAULT NOW(), - modified_at timestamp NOT NULL DEFAULT NOW(), + created_at timestamp with time zone NOT NULL DEFAULT NOW(), + modified_at timestamp with time zone NOT NULL DEFAULT NOW(), reset_token text NULL, reset_token_expires_at timestamp with time zone NULL, CONSTRAINT PK_users PRIMARY KEY ( id_user ), @@ -75,8 +75,8 @@ CREATE TABLE tcg_users teams text[] NULL, id_linked_user uuid NULL, id_connection uuid NOT NULL, - created_at timestamp NULL, - modified_at timestamp NULL, + created_at timestamp with time zone NULL, + modified_at timestamp with time zone NULL, CONSTRAINT PK_tcg_users PRIMARY KEY ( id_tcg_user ) ); COMMENT ON TABLE tcg_users IS 'The User object is used to represent an employee within a company.'; @@ -108,8 +108,8 @@ CREATE TABLE tcg_collections collection_type text NULL, parent_collection uuid NULL, id_tcg_ticket uuid NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_linked_user uuid NOT NULL, id_connection uuid NOT NULL, CONSTRAINT PK_tcg_collections PRIMARY KEY ( id_tcg_collection ) @@ -123,8 +123,8 @@ CREATE TABLE tcg_accounts name text NULL, domains text[] NULL, remote_platform text NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_linked_user uuid NULL, id_connection uuid NOT NULL, CONSTRAINT PK_tcg_account PRIMARY KEY ( id_tcg_account ) @@ -138,7 +138,7 @@ CREATE TABLE remote_data ressource_owner_id uuid NULL, "format" text NULL, data text NULL, - created_at timestamp NULL, + created_at timestamp with time zone NULL, CONSTRAINT PK_remote_data PRIMARY KEY ( id_remote_data ), CONSTRAINT Force_Unique_ressourceOwnerId UNIQUE ( ressource_owner_id ) ); @@ -155,13 +155,142 @@ CREATE TABLE managed_webhooks api_version text NULL, active_events text[] NULL, remote_signing_secret text NULL, - modified_at timestamp NOT NULL, - created_at timestamp NOT NULL, + modified_at timestamp with time zone NOT NULL, + created_at timestamp with time zone NOT NULL, CONSTRAINT PK_managed_webhooks PRIMARY KEY ( id_managed_webhook ) ); COMMENT ON COLUMN managed_webhooks.endpoint IS 'UUID that will be used in the final URL to help identify where to route data ex: api.panora.dev/mw/{managed_webhooks.endpoint}'; +-- ************************************** hris_time_off +CREATE TABLE hris_time_off +( + id_hris_time_off uuid NOT NULL, + employee uuid NULL, + approver uuid NULL, + status text NULL, + employee_note text NULL, + units text NULL, + amount bigint NULL, + request_type text NULL, + start_time timestamp with time zone NULL, + end_time timestamp with time zone NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + CONSTRAINT PK_hris_time_off PRIMARY KEY ( id_hris_time_off ) +); +COMMENT ON COLUMN hris_time_off.employee IS 'id_hris_employee of the employee requesting the time off'; +COMMENT ON COLUMN hris_time_off.approver IS 'id_hris_employee of the manager approving the time off'; + +-- ************************************** hris_payroll_runs +CREATE TABLE hris_payroll_runs +( + id_hris_payroll_run uuid NOT NULL, + run_state text NULL, + run_type text NULL, + start_date timestamp with time zone NULL, + end_date timestamp with time zone NULL, + check_date timestamp with time zone NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + CONSTRAINT PK_hris_payroll_runs PRIMARY KEY ( id_hris_payroll_run ) +); + +-- ************************************** hris_pay_groups +CREATE TABLE hris_pay_groups +( + id_hris_pay_group uuid NOT NULL, + pay_group_name text NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + CONSTRAINT PK_hris_pay_groups PRIMARY KEY ( id_hris_pay_group ) +); + +-- ************************************** hris_locations +CREATE TABLE hris_locations +( + id_hris_location uuid NOT NULL, + name text NULL, + phone_number text NULL, + street_1 text NULL, + street_2 text NULL, + city text NULL, + "state" text NULL, + zip_code text NULL, + country text NULL, + location_type text NULL, + remote_id text NOT NULL, + remote_created_at timestamp with time zone NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + CONSTRAINT PK_hris_locations PRIMARY KEY ( id_hris_location ) +); +COMMENT ON COLUMN hris_locations.location_type IS 'HOME, WORK'; + +-- ************************************** hris_groups +CREATE TABLE hris_groups +( + id_hris_group uuid NOT NULL, + parent_group uuid NULL, + name text NULL, + type text NULL, + remote_id text NOT NULL, + remote_created_at timestamp with time zone NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + CONSTRAINT PK_hris_groups PRIMARY KEY ( id_hris_group ) +); +COMMENT ON COLUMN hris_groups.parent_group IS 'id_hris_group of parent group'; + +-- ************************************** hris_employer_benefits +CREATE TABLE hris_employer_benefits +( + id_hris_employer_benefit uuid NOT NULL, + id_connection uuid NOT NULL, + benefit_plan_type text NULL, + name text NULL, + description text NULL, + deduction_code text NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + remote_was_deleted boolean NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + CONSTRAINT PK_hris_employer_benefits PRIMARY KEY ( id_hris_employer_benefit ) +); + +-- ************************************** hris_companies +CREATE TABLE hris_companies +( + id_hris_company uuid NOT NULL, + legal_name text NULL, + display_name text NULL, + eins text[] NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + CONSTRAINT PK_hris_companies PRIMARY KEY ( id_hris_company ) +); + -- ************************************** fs_users CREATE TABLE fs_users ( @@ -170,8 +299,8 @@ CREATE TABLE fs_users email text NULL, is_me boolean NOT NULL, remote_id text NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_connection uuid NOT NULL, CONSTRAINT PK_fs_users PRIMARY KEY ( id_fs_user ) ); @@ -206,8 +335,8 @@ CREATE TABLE fs_permissions "group" uuid NULL, type text NULL, roles text[] NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_connection uuid NOT NULL, CONSTRAINT PK_fs_permissions PRIMARY KEY ( id_fs_permission ) ); @@ -221,8 +350,8 @@ CREATE TABLE fs_groups users text[] NULL, remote_id text NULL, remote_was_deleted boolean NOT NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_connection uuid NOT NULL, CONSTRAINT PK_fs_groups PRIMARY KEY ( id_fs_group ) ); @@ -234,10 +363,10 @@ CREATE TABLE fs_drives id_fs_drive uuid NOT NULL, drive_url text NULL, name text NULL, - remote_created_at timestamp NULL, + remote_created_at timestamp with time zone NULL, remote_id text NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_connection uuid NOT NULL, CONSTRAINT PK_fs_drives PRIMARY KEY ( id_fs_drive ) ); @@ -335,8 +464,8 @@ CREATE TABLE crm_users id_crm_user uuid NOT NULL, name text NULL, email text NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_linked_user uuid NULL, remote_id text NULL, remote_platform text NULL, @@ -349,8 +478,8 @@ CREATE TABLE crm_deals_stages ( id_crm_deals_stage uuid NOT NULL, stage_name text NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_linked_user uuid NULL, remote_id text NULL, remote_platform text NULL, @@ -374,8 +503,9 @@ CREATE TABLE connector_sets crm_zendesk boolean NULL, crm_close boolean NULL, fs_box boolean NULL, - tcg_github boolean NULL, -CONSTRAINT PK_project_connector PRIMARY KEY ( id_connector_set ) + tcg_github boolean NULL, + ecom_woocommerce boolean NULL, + CONSTRAINT PK_project_connector PRIMARY KEY ( id_connector_set ) ); -- ************************************** connection_strategies @@ -763,12 +893,12 @@ CREATE TABLE tcg_tickets name text NULL, status text NULL, description text NULL, - due_date timestamp NULL, + due_date timestamp with time zone NULL, ticket_type text NULL, parent_ticket uuid NULL, tags text[] NULL, collections text[] NULL, - completed_at timestamp NULL, + completed_at timestamp with time zone NULL, priority text NULL, assigned_to text[] NULL, remote_id text NULL, @@ -776,8 +906,8 @@ CREATE TABLE tcg_tickets creator_type text NULL, id_tcg_user uuid NULL, id_linked_user uuid NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_connection uuid NOT NULL, CONSTRAINT PK_tcg_tickets PRIMARY KEY ( id_tcg_ticket ) ); @@ -802,8 +932,8 @@ CREATE TABLE tcg_contacts details text NULL, remote_id text NULL, remote_platform text NULL, - created_at timestamp NULL, - modified_at timestamp NULL, + created_at timestamp with time zone NULL, + modified_at timestamp with time zone NULL, id_tcg_account uuid NULL, id_linked_user uuid NULL, id_connection uuid NOT NULL, @@ -837,6 +967,48 @@ COMMENT ON COLUMN projects.sync_mode IS 'Can be realtime or periodic_pull'; COMMENT ON COLUMN projects.pull_frequency IS 'Frequency in seconds for pulls ex 3600 for one hour'; +-- ************************************** hris_employees +CREATE TABLE hris_employees +( + id_hris_employee uuid NOT NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + groups text[] NULL, + employee_number text NULL, + id_hris_company uuid NULL, + first_name text NULL, + last_name text NULL, + preferred_name text NULL, + display_full_name text NULL, + username text NULL, + work_email text NULL, + personal_email text NULL, + mobile_phone_number text NULL, + employments text[] NULL, + ssn text NULL, + gender text NULL, + ethnicity text NULL, + marital_status text NULL, + date_of_birth date NULL, + start_date date NULL, + employment_status text NULL, + termination_date date NULL, + avatar_url text NULL, + CONSTRAINT PK_hris_employees PRIMARY KEY ( id_hris_employee ), + CONSTRAINT FK_employee_companyId FOREIGN KEY ( id_hris_company ) REFERENCES hris_companies ( id_hris_company ) +); +CREATE INDEX FKX_employee_companyId ON hris_employees +( + id_hris_company +); +COMMENT ON COLUMN hris_employees.groups IS 'array of id_hris_group'; +COMMENT ON COLUMN hris_employees.employments IS 'array of id_hris_employment'; +COMMENT ON COLUMN hris_employees.gender IS 'The employee''s gender. Possible options are: MALE, FEMALE, NON-BINARY, OTHER, or PREFER_NOT_TO_DISCLOSE. If the original value doesn''t correspond to any of these categories, it will be returned as is.'; + -- ************************************** fs_folders CREATE TABLE fs_folders ( @@ -847,8 +1019,8 @@ CREATE TABLE fs_folders description text NULL, parent_folder uuid NULL, remote_id text NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_fs_drive uuid NULL, id_connection uuid NOT NULL, id_fs_permission uuid NULL, @@ -921,8 +1093,8 @@ CREATE TABLE crm_contacts id_crm_contact uuid NOT NULL, first_name text NULL, last_name text NULL, - created_at timestamp NULL, - modified_at timestamp NULL, + created_at timestamp with time zone NULL, + modified_at timestamp with time zone NULL, remote_id text NULL, remote_platform text NULL, id_crm_user uuid NULL, @@ -944,8 +1116,8 @@ CREATE TABLE crm_companies name text NULL, industry text NULL, number_of_employees bigint NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, remote_id text NULL, remote_platform text NULL, id_crm_user uuid NULL, @@ -1401,8 +1573,8 @@ CREATE TABLE tcg_tags remote_id text NULL, remote_platform text NULL, id_tcg_ticket uuid NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_linked_user uuid NULL, id_connection uuid NOT NULL, CONSTRAINT PK_tcg_tags PRIMARY KEY ( id_tcg_tag ), @@ -1428,8 +1600,8 @@ CREATE TABLE tcg_comments id_tcg_contact uuid NULL, id_tcg_user uuid NULL, id_linked_user uuid NULL, - created_at timestamp NULL, - modified_at timestamp NULL, + created_at timestamp with time zone NULL, + modified_at timestamp with time zone NULL, id_connection uuid NOT NULL, CONSTRAINT PK_tcg_comments PRIMARY KEY ( id_tcg_comment ), CONSTRAINT FK_41 FOREIGN KEY ( id_tcg_contact ) REFERENCES tcg_contacts ( id_tcg_contact ), @@ -1468,6 +1640,198 @@ CREATE INDEX FK_proectID_linked_users ON linked_users COMMENT ON COLUMN linked_users.linked_user_origin_id IS 'id of the customer, in our customers own systems'; COMMENT ON COLUMN linked_users.alias IS 'human-readable alias, for UI (ex ACME company)'; +-- ************************************** hris_timesheet_entries +CREATE TABLE hris_timesheet_entries +( + id_hris_timesheet_entry uuid NOT NULL, + hours_worked bigint NULL, + start_time timestamp with time zone NULL, + end_time timestamp with time zone NULL, + id_hris_employee uuid NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + CONSTRAINT PK_hris_timesheet_entries PRIMARY KEY ( id_hris_timesheet_entry ), + CONSTRAINT FK_timesheet_entry_employee_Id FOREIGN KEY ( id_hris_employee ) REFERENCES hris_employees ( id_hris_employee ) +); +CREATE INDEX FKx_timesheet_entry_employee_Id ON hris_timesheet_entries +( + id_hris_employee +); + +-- ************************************** hris_time_off_balances +CREATE TABLE hris_time_off_balances +( + id_hris_time_off_balance uuid NOT NULL, + balance bigint NULL, + id_hris_employee uuid NULL, + used bigint NULL, + policy_type text NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + CONSTRAINT PK_hris_time_off_balances PRIMARY KEY ( id_hris_time_off_balance ), + CONSTRAINT FK_hris_timeoff_balance_hris_employee_ID FOREIGN KEY ( id_hris_employee ) REFERENCES hris_employees ( id_hris_employee ) +); +CREATE INDEX FKx_hris_timeoff_balance_hris_employee_ID ON hris_time_off_balances +( + id_hris_employee +); + +-- ************************************** hris_employments +CREATE TABLE hris_employments +( + id_hris_employment uuid NOT NULL, + job_title text NOT NULL, + pay_rate bigint NULL, + pay_period text NULL, + pay_frequency text NULL, + pay_currency text NULL, + flsa_status text NULL, + effective_date date NULL, + employment_type text NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + id_hris_pay_group uuid NULL, + id_hris_employee uuid NULL, + CONSTRAINT PK_hris_employments PRIMARY KEY ( id_hris_employment ), + CONSTRAINT FK_107 FOREIGN KEY ( id_hris_employee ) REFERENCES hris_employees ( id_hris_employee ), + CONSTRAINT FK_employments_pay_group_Id FOREIGN KEY ( id_hris_pay_group ) REFERENCES hris_pay_groups ( id_hris_pay_group ) +); +CREATE INDEX FK_2 ON hris_employments +( + id_hris_employee +); +CREATE INDEX FKx_employments_pay_group_Id ON hris_employments +( + id_hris_pay_group +); +COMMENT ON COLUMN hris_employments.pay_rate IS 'pay rate, in usd, in cents'; +COMMENT ON COLUMN hris_employments.pay_period IS 'The time period covered by this pay rate. Available options are: HOUR, DAY, WEEK, EVERY_TWO_WEEKS, SEMIMONTHLY, MONTH, QUARTER, EVERY_SIX_MONTHS, and YEAR. If there is no direct match, the original value provided will be returned as is.'; + +-- ************************************** hris_employee_payroll_runs +CREATE TABLE hris_employee_payroll_runs +( + id_hris_employee_payroll_run uuid NOT NULL, + id_hris_employee uuid NULL, + id_hris_payroll_run uuid NULL, + gross_pay bigint NULL, + net_pay bigint NULL, + start_date timestamp with time zone NULL, + end_date timestamp with time zone NULL, + check_date timestamp with time zone NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + CONSTRAINT PK_hris_employee_payroll_runs PRIMARY KEY ( id_hris_employee_payroll_run ), + CONSTRAINT FK_employee_payroll_run_payroll_run_Id FOREIGN KEY ( id_hris_payroll_run ) REFERENCES hris_payroll_runs ( id_hris_payroll_run ), + CONSTRAINT FK_hris_employee_payroll_run_employee_Id FOREIGN KEY ( id_hris_employee ) REFERENCES hris_employees ( id_hris_employee ) +); +CREATE INDEX FKx_employee_payroll_run_payroll_run_Id ON hris_employee_payroll_runs +( + id_hris_payroll_run +); +CREATE INDEX FKx_hris_employee_payroll_run_employee_Id ON hris_employee_payroll_runs +( + id_hris_employee +); + +-- ************************************** hris_dependents +CREATE TABLE hris_dependents +( + id_hris_dependents uuid NOT NULL, + first_name text NULL, + last_name text NULL, + middle_name text NULL, + relationship text NULL, + date_of_birth date NULL, + gender text NULL, + phone_number text NULL, + home_location uuid NULL, + is_student boolean NULL, + ssn text NULL, + id_hris_employee uuid NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + CONSTRAINT PK_hris_dependents PRIMARY KEY ( id_hris_dependents ), + CONSTRAINT FK_hris_dependant_hris_employee_Id FOREIGN KEY ( id_hris_employee ) REFERENCES hris_employees ( id_hris_employee ) +); +CREATE INDEX FKx_hris_dependant_hris_employee_Id ON hris_dependents +( + id_hris_employee +); +COMMENT ON COLUMN hris_dependents.home_location IS 'contains a id_hris_location'; + +-- ************************************** hris_benefits +CREATE TABLE hris_benefits +( + id_hris_benefit uuid NOT NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + provider_name text NULL, + id_hris_employee uuid NULL, + employee_contribution bigint NULL, + company_contribution bigint NULL, + start_date timestamp with time zone NULL, + end_date timestamp with time zone NULL, + id_hris_employer_benefit uuid NULL, + CONSTRAINT PK_hris_benefits PRIMARY KEY ( id_hris_benefit ), + CONSTRAINT FK_hris_benefit_employer_benefit_Id FOREIGN KEY ( id_hris_employer_benefit ) REFERENCES hris_employer_benefits ( id_hris_employer_benefit ), + CONSTRAINT FK_hris_benefits_employeeId FOREIGN KEY ( id_hris_employee ) REFERENCES hris_employees ( id_hris_employee ) +); +CREATE INDEX FKx_hris_benefit_employer_benefit_Id ON hris_benefits +( + id_hris_employer_benefit +); +CREATE INDEX FKx_hris_benefits_employeeId ON hris_benefits +( + id_hris_employee +); + +-- ************************************** hris_bank_infos +CREATE TABLE hris_bank_infos +( + id_hris_bank_info uuid NOT NULL, + account_type text NULL, + bank_name text NULL, + account_number text NULL, + routing_number text NULL, + remote_id text NULL, + remote_created_at timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + remote_was_deleted boolean NOT NULL, + id_connection uuid NOT NULL, + id_hris_employee uuid NULL, + CONSTRAINT PK_hris_bank_infos PRIMARY KEY ( id_hris_bank_info ), + CONSTRAINT FK_bank_infos_employeeId FOREIGN KEY ( id_hris_employee ) REFERENCES hris_employees ( id_hris_employee ) +); +CREATE INDEX FKX_bank_infos_employeeId ON hris_bank_infos +( + id_hris_employee +); + -- ************************************** fs_files CREATE TABLE fs_files ( @@ -1479,8 +1843,8 @@ CREATE TABLE fs_files remote_id text NULL, id_fs_permission uuid NULL, id_fs_folder uuid NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_connection uuid NOT NULL, CONSTRAINT PK_fs_files PRIMARY KEY ( id_fs_file ) ); @@ -1553,8 +1917,8 @@ CREATE TABLE crm_phone_numbers phone_number text NULL, phone_type text NULL, owner_type text NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_crm_company uuid NULL, id_crm_contact uuid NULL, id_connection uuid NOT NULL, @@ -1580,8 +1944,8 @@ CREATE TABLE crm_engagements type text NULL, direction text NULL, subject text NULL, - start_at timestamp NULL, - end_time timestamp NULL, + start_at timestamp with time zone NULL, + end_time timestamp with time zone NULL, remote_id text NULL, id_linked_user uuid NULL, remote_platform text NULL, @@ -1589,8 +1953,8 @@ CREATE TABLE crm_engagements id_crm_user uuid NULL, id_connection uuid NOT NULL, contacts text[] NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, CONSTRAINT PK_crm_engagement PRIMARY KEY ( id_crm_engagement ), CONSTRAINT FK_crm_engagement_crm_user FOREIGN KEY ( id_crm_user ) REFERENCES crm_users ( id_crm_user ), CONSTRAINT FK_29 FOREIGN KEY ( id_crm_company ) REFERENCES crm_companies ( id_crm_company ) @@ -1614,8 +1978,8 @@ CREATE TABLE crm_email_addresses email_address text NOT NULL, email_address_type text NOT NULL, owner_type text NOT NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_crm_company uuid NULL, id_crm_contact uuid NULL, id_connection uuid NOT NULL, @@ -1640,8 +2004,8 @@ CREATE TABLE crm_deals name text NOT NULL, description text NULL, amount bigint NOT NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, remote_id text NULL, remote_platform text NULL, id_crm_user uuid NULL, @@ -1682,8 +2046,8 @@ CREATE TABLE crm_addresses id_crm_company uuid NULL, id_crm_contact uuid NULL, id_connection uuid NOT NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, owner_type text NOT NULL, CONSTRAINT PK_crm_addresses PRIMARY KEY ( id_crm_address ), CONSTRAINT FK_14 FOREIGN KEY ( id_crm_contact ) REFERENCES crm_contacts ( id_crm_contact ), @@ -1768,17 +2132,17 @@ CREATE TABLE api_keys id_user uuid NOT NULL, CONSTRAINT id_ PRIMARY KEY ( id_api_key ), CONSTRAINT unique_api_keys UNIQUE ( api_key_hash ), - CONSTRAINT FK_8 FOREIGN KEY ( id_user ) REFERENCES users ( id_user ), - CONSTRAINT FK_7 FOREIGN KEY ( id_project ) REFERENCES projects ( id_project ) -); -CREATE INDEX FK_2 ON api_keys -( - id_user + CONSTRAINT FK_api_key_project_Id FOREIGN KEY ( id_project ) REFERENCES projects ( id_project ), + CONSTRAINT FK_api_keys_user_Id FOREIGN KEY ( id_user ) REFERENCES users ( id_user ) ); CREATE INDEX FK_api_keys_projects ON api_keys ( id_project ); +CREATE INDEX FKx_api_keys_user_Id ON api_keys +( + id_user +); -- ************************************** acc_purchase_orders_line_items CREATE TABLE acc_purchase_orders_line_items @@ -2022,8 +2386,8 @@ CREATE TABLE tcg_attachments file_name text NULL, file_url text NULL, uploader uuid NOT NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_linked_user uuid NULL, id_tcg_ticket uuid NULL, id_tcg_comment uuid NULL, @@ -2047,10 +2411,12 @@ COMMENT ON COLUMN tcg_attachments.id_tcg_ticket IS 'For cases where the ticketin -- ************************************** invite_links CREATE TABLE invite_links ( - id_invite_link uuid NOT NULL, - status text NOT NULL, - email text NULL, - id_linked_user uuid NOT NULL, + id_invite_link uuid NOT NULL, + status text NOT NULL, + email text NULL, + id_linked_user uuid NOT NULL, + displayed_verticals text[] NULL, + displayed_providers text[] NULL, CONSTRAINT PK_invite_links PRIMARY KEY ( id_invite_link ), CONSTRAINT FK_37 FOREIGN KEY ( id_linked_user ) REFERENCES linked_users ( id_linked_user ) ); @@ -2059,6 +2425,62 @@ CREATE INDEX FK_invite_link_linkedUserID ON invite_links id_linked_user ); +-- ************************************** hris_employee_payroll_runs_taxes +CREATE TABLE hris_employee_payroll_runs_taxes +( + id_hris_employee_payroll_runs_tax uuid NOT NULL, + name text NULL, + amount bigint NULL, + employer_tax boolean NULL, + id_hris_employee_payroll_run uuid NULL, + remote_id text NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + CONSTRAINT PK_hris_employee_payroll_runs_taxes PRIMARY KEY ( id_hris_employee_payroll_runs_tax ), + CONSTRAINT FK_hris_employee_payroll_run_tax_hris_employee_payroll_run_id FOREIGN KEY ( id_hris_employee_payroll_run ) REFERENCES hris_employee_payroll_runs ( id_hris_employee_payroll_run ) +); +CREATE INDEX FKx_hris_employee_payroll_run_tax_hris_employee_payroll_run_id ON hris_employee_payroll_runs_taxes +( + id_hris_employee_payroll_run +); + +-- ************************************** hris_employee_payroll_runs_earnings +CREATE TABLE hris_employee_payroll_runs_earnings +( + id_hris_employee_payroll_runs_earning uuid NOT NULL, + amount bigint NULL, + type text NULL, + id_hris_employee_payroll_run uuid NULL, + remote_id text NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + CONSTRAINT PK_hris_employee_payroll_runs_earnings PRIMARY KEY ( id_hris_employee_payroll_runs_earning ), + CONSTRAINT FK_hris_employee_payroll_runs_earning_hris_employee_payroll_run_Id FOREIGN KEY ( id_hris_employee_payroll_run ) REFERENCES hris_employee_payroll_runs ( id_hris_employee_payroll_run ) +); +CREATE INDEX FKx_hris_employee_payroll_runs_earning_hris_employee_payroll_run_Id ON hris_employee_payroll_runs_earnings +( + id_hris_employee_payroll_run +); + +-- ************************************** hris_employee_payroll_runs_deductions +CREATE TABLE hris_employee_payroll_runs_deductions +( + id_hris_employee_payroll_runs_deduction uuid NOT NULL, + remote_id text NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, + id_hris_employee_payroll_run uuid NULL, + name text NULL, + employee_deduction bigint NULL, + company_deduction bigint NULL, + CONSTRAINT PK_hris_employee_payroll_runs_deductions PRIMARY KEY ( id_hris_employee_payroll_runs_deduction ), + CONSTRAINT FK_hris_employee_payroll_runs_deduction_hris_employee_payroll_Id FOREIGN KEY ( id_hris_employee_payroll_run ) REFERENCES hris_employee_payroll_runs ( id_hris_employee_payroll_run ) +); +CREATE INDEX FKx_hris_employee_payroll_runs_deduction_hris_employee_payroll_Id ON hris_employee_payroll_runs_deductions +( + id_hris_employee_payroll_run +); + -- ************************************** events CREATE TABLE events ( @@ -2071,7 +2493,7 @@ CREATE TABLE events method text NOT NULL, url text NOT NULL, provider text NOT NULL, - "timestamp" timestamp NOT NULL DEFAULT NOW(), + "timestamp" timestamp with time zone NOT NULL DEFAULT NOW(), id_linked_user uuid NOT NULL, CONSTRAINT PK_jobs PRIMARY KEY ( id_event ), CONSTRAINT FK_12 FOREIGN KEY ( id_linked_user ) REFERENCES linked_users ( id_linked_user ) @@ -2090,10 +2512,10 @@ CREATE TABLE crm_tasks subject text NULL, content text NULL, status text NULL, - due_date timestamp NULL, - finished_date timestamp NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + due_date timestamp with time zone NULL, + finished_date timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_crm_user uuid NULL, id_crm_company uuid NULL, id_crm_deal uuid NULL, @@ -2124,8 +2546,8 @@ CREATE TABLE crm_notes ( id_crm_note uuid NOT NULL, content text NOT NULL, - created_at timestamp NOT NULL, - modified_at timestamp NOT NULL, + created_at timestamp with time zone NOT NULL, + modified_at timestamp with time zone NOT NULL, id_crm_company uuid NULL, id_crm_contact uuid NULL, id_crm_deal uuid NULL, @@ -2167,8 +2589,8 @@ CREATE TABLE connections token_type text NOT NULL, access_token text NULL, refresh_token text NULL, - expiration_timestamp timestamp NULL, - created_at timestamp NOT NULL, + expiration_timestamp timestamp with time zone NULL, + created_at timestamp with time zone NOT NULL, connection_token text NULL, id_project uuid NOT NULL, id_linked_user uuid NOT NULL, @@ -2313,9 +2735,9 @@ CREATE INDEX FK_acc_expense_expense_lines_index ON acc_expense_lines CREATE TABLE webhook_delivery_attempts ( id_webhook_delivery_attempt uuid NOT NULL, - "timestamp" timestamp NOT NULL, + "timestamp" timestamp with time zone NOT NULL, status text NOT NULL, - next_retry timestamp NULL, + next_retry timestamp with time zone NULL, attempt_count bigint NOT NULL, id_webhooks_payload uuid NULL, id_webhook_endpoint uuid NULL, @@ -2354,7 +2776,7 @@ can be 0 1 2 3 4 5 6'; CREATE TABLE jobs_status_history ( id_jobs_status_history uuid NOT NULL, - "timestamp" timestamp NOT NULL DEFAULT NOW(), + "timestamp" timestamp with time zone NOT NULL DEFAULT NOW(), previous_status text NOT NULL, new_status text NOT NULL, id_event uuid NOT NULL, diff --git a/packages/api/swagger/swagger-spec.yaml b/packages/api/swagger/swagger-spec.yaml index bb601fcfc..7fc0ec35f 100644 --- a/packages/api/swagger/swagger-spec.yaml +++ b/packages/api/swagger/swagger-spec.yaml @@ -107,6 +107,8 @@ paths: schema: type: string responses: + '200': + description: '' '201': description: '' content: @@ -127,6 +129,8 @@ paths: schema: type: string responses: + '200': + description: '' '201': description: '' content: @@ -157,6 +161,8 @@ paths: type: object additionalProperties: true description: Dynamic event payload + '201': + description: '' tags: *ref_0 x-speakeasy-group: webhooks /ticketing/tickets: @@ -183,6 +189,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -307,6 +314,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -398,6 +406,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -487,6 +496,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -622,6 +632,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -746,6 +757,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -870,6 +882,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -993,6 +1006,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1117,6 +1131,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1241,6 +1256,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1332,6 +1348,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1455,6 +1472,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1546,6 +1564,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1638,6 +1657,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1765,6 +1785,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -1856,6 +1877,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2155,11 +2177,15 @@ paths: required: false in: query schema: + minimum: 1 + default: 1 type: number - name: limit required: false in: query schema: + minimum: 1 + default: 10 type: number responses: '200': @@ -2195,6 +2221,12 @@ paths: application/json: schema: type: object + '201': + description: '' + content: + application/json: + schema: + type: object tags: &ref_21 - passthrough x-speakeasy-group: passthrough @@ -2240,6 +2272,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2331,6 +2364,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2422,6 +2456,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2513,6 +2548,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2604,6 +2640,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2696,6 +2733,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2819,6 +2857,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -2911,6 +2950,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3002,6 +3042,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3093,6 +3134,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3184,6 +3226,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3275,6 +3318,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3366,6 +3410,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3489,6 +3534,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3580,6 +3626,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3709,6 +3756,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3840,6 +3888,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -3969,6 +4018,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4098,6 +4148,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4192,6 +4243,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4286,6 +4338,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4414,6 +4467,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4508,6 +4562,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4636,6 +4691,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4730,6 +4786,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4854,6 +4911,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -4978,6 +5036,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5102,6 +5161,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5226,6 +5286,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5317,6 +5378,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5441,6 +5503,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5533,6 +5596,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5624,6 +5688,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5715,6 +5780,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5806,6 +5872,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5897,6 +5964,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -5988,6 +6056,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6079,6 +6148,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6170,6 +6240,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6259,6 +6330,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6383,6 +6455,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6474,6 +6547,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6599,6 +6673,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6691,6 +6766,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6783,6 +6859,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6875,6 +6952,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -6999,6 +7077,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -7091,6 +7170,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -7215,6 +7295,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -7307,6 +7388,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -7431,6 +7513,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -7522,6 +7605,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -7647,6 +7731,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -7771,6 +7856,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -7863,6 +7949,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -7988,6 +8075,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -8079,6 +8167,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -8171,6 +8260,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -8263,6 +8353,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -8355,6 +8446,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -8446,6 +8538,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -8570,6 +8663,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -8694,6 +8788,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -8785,6 +8880,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -8876,6 +8972,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -8998,6 +9095,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -9120,6 +9218,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -9209,6 +9308,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -9299,6 +9399,7 @@ paths: example: 10 description: Set to get the number of records. schema: + default: 50 type: number - name: cursor required: false @@ -9429,7 +9530,6 @@ components: password_hash: type: string required: - - id_user - email - password_hash Connection: @@ -9517,8 +9617,8 @@ components: description: The unique UUID of the webhook. endpoint_description: type: string - example: Webhook to receive connection events nullable: true + example: Webhook to receive connection events description: The description of the webhook. url: type: string @@ -9556,8 +9656,8 @@ components: last_update: format: date-time type: string - example: '2024-10-01T12:00:00Z' nullable: true + example: '2024-10-01T12:00:00Z' description: The last update date of the webhook. required: - id_webhook_endpoint @@ -9592,7 +9692,6 @@ components: type: string required: - url - - description - scope SignatureVerificationDto: type: object @@ -11725,8 +11824,6 @@ components: - id_project - name - sync_mode - - pull_frequency - - redirect_url - id_user - id_connector_set CreateProjectDto: @@ -12095,10 +12192,10 @@ components: type: object properties: method: - type: string enum: - GET - POST + type: string path: type: string nullable: true @@ -12117,12 +12214,11 @@ components: type: object additionalProperties: true nullable: true + headers: + type: object required: - method - path - - data - - request_format - - overrideBaseUrl UnifiedHrisBankinfoOutput: type: object properties: {}