diff --git a/kits/cdk/connector.types.ts b/kits/cdk/connector.types.ts index a1f064cc..51a59c56 100644 --- a/kits/cdk/connector.types.ts +++ b/kits/cdk/connector.types.ts @@ -24,6 +24,7 @@ import type { import type {EndUserId, Id} from './id.types' import {makeId} from './id.types' import type {ZStandard} from './models' +import {VerticalKey} from './verticals' /** * Equivalent to to airbyte's low code connector spec, @@ -226,6 +227,7 @@ export interface ConnectorServer< name: string logo_url?: string | null updated_at: string + verticals?: VerticalKey[] raw_data: T['_intOpType']['data'] }> }> diff --git a/kits/cdk/entity-links.ts b/kits/cdk/entity-links.ts index cbeedf72..b290d604 100644 --- a/kits/cdk/entity-links.ts +++ b/kits/cdk/entity-links.ts @@ -81,7 +81,7 @@ export function cachingTransformLink( /** * Used to workaround beancount limitation https://groups.google.com/g/beancount/c/PmkPVgLNKgg - * Not ideal that we have to use Openint link to workaround + * Not ideal that we have to use Venice link to workaround * beancount quirk. Maybe this should actually be a beancount plugin in python? * @see https://share.cleanshot.com/8AVFxc * We have two options instead diff --git a/kits/cdk/internal/NangoClient.ts b/kits/cdk/internal/NangoClient.ts index b63307c2..c4448727 100644 --- a/kits/cdk/internal/NangoClient.ts +++ b/kits/cdk/internal/NangoClient.ts @@ -20,6 +20,7 @@ export const zNangoOauthConnectParams = z }) .passthrough() + // Where is this used relative to nango frontend? export function buildNangoConnectUrl({ provider_config_key, ...params diff --git a/kits/cdk/internal/oauthConnector.ts b/kits/cdk/internal/oauthConnector.ts index 5996c892..f4213939 100644 --- a/kits/cdk/internal/oauthConnector.ts +++ b/kits/cdk/internal/oauthConnector.ts @@ -80,17 +80,35 @@ export function oauthConnect({ connectorName, connectorConfigId, resourceId, + authOptions, }: { nangoFrontend: NangoFrontend connectorName: string connectorConfigId: Id['ccfg'] /** Should address the re-connect scenario, but let's see... */ resourceId?: Id['reso'] + authOptions?: { + authorization_params?: Record + } }): Promise { + // console.log('oauthConnect', { + // connectorName, + // connectorConfigId, + // resourceId, + // authOptions, + // }) return nangoFrontend .auth( connectorConfigId, resourceId ?? makeId('reso', connectorName, makeUlid()), + { + params: {}, + ...authOptions, + // authOptions would tend to contain the authorization_params needed to make the initial connection + // authorization_params: { + // scope: 'https://www.googleapis.com/auth/drive.readonly', + // }, + }, ) .then((r) => oauthBaseSchema.connectOutput.parse(r)) .catch((err) => { diff --git a/kits/cdk/internal/remote-procedure.ts b/kits/cdk/internal/remote-procedure.ts index 63bd9628..3566d62f 100644 --- a/kits/cdk/internal/remote-procedure.ts +++ b/kits/cdk/internal/remote-procedure.ts @@ -35,11 +35,11 @@ export async function getRemoteContext(ctx: ProtectedContext) { const nango = initNangoSDK({ headers: {authorization: `Bearer ${ctx.env.NANGO_SECRET_KEY}`}, }) - + // @ts-expect-error oauth is conditionally present const oauthCredentialsExpiryTime = new Date(resource.settings?.oauth?.credentials?.raw?.expires_at ?? new Date(new Date().getTime() + 1000)); const forceRefreshCredentials = oauthCredentialsExpiryTime < new Date(); - + const settings = { ...resource.settings, ...(resource.connectorConfig.connector.metadata?.nangoProvider && { @@ -48,6 +48,7 @@ export async function getRemoteContext(ctx: ProtectedContext) { params: { path: {connectionId}, query: { + refresh_token: true, provider_config_key: providerConfigKey, force_refresh: forceRefreshCredentials, // Conditionally call based on expiry }, diff --git a/kits/cdk/verticals.ts b/kits/cdk/verticals.ts index 1a25bfaa..d5aacbad 100644 --- a/kits/cdk/verticals.ts +++ b/kits/cdk/verticals.ts @@ -40,6 +40,7 @@ const _VERTICAL_BY_KEY = { one-way with no impact on original data.`, objects: ['job', 'offer', 'candidate', 'opening'], }, + email: {}, } satisfies Record // MARK: - diff --git a/kits/sdk/openapi.json b/kits/sdk/openapi.json index b1381027..2114c936 100644 --- a/kits/sdk/openapi.json +++ b/kits/sdk/openapi.json @@ -481,6 +481,13 @@ "schema": { "type": ["string", "null"] } + }, + { + "in": "query", + "name": "forceRefresh", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -695,6 +702,13 @@ "description": "Must start with 'reso_'" }, "required": true + }, + { + "in": "query", + "name": "forceRefresh", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -1338,7 +1352,8 @@ "hris", "payroll", "calendar", - "ats" + "ats", + "email" ] } } @@ -2362,6 +2377,12 @@ "type": "string", "title": "Webhook URL", "description": "Events like sync.completed and connection.created can be sent to url of your choosing" + }, + "migrate_tables": { + "type": "boolean", + "title": "Migrate Tables", + "description": "If enabled, table migrations will be run if needed when entities are persisted", + "default": true } } } @@ -5866,24 +5887,51 @@ "parameters": [ { "in": "query", - "name": "sync_mode", + "name": "start_date", "schema": { - "type": "string", - "enum": ["full", "incremental"] + "type": "string" } }, { "in": "query", - "name": "cursor", + "name": "end_date", "schema": { - "type": ["string", "null"] + "type": "string" } }, { "in": "query", - "name": "page_size", + "name": "sort_order", "schema": { - "type": "number" + "type": "string" + } + }, + { + "in": "query", + "name": "customer", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "department", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "date_macro", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "summarize_by", + "schema": { + "type": "string" } } ], @@ -5999,24 +6047,44 @@ "parameters": [ { "in": "query", - "name": "sync_mode", + "name": "start_date", "schema": { - "type": "string", - "enum": ["full", "incremental"] + "type": "string" } }, { "in": "query", - "name": "cursor", + "name": "end_date", "schema": { - "type": ["string", "null"] + "type": "string" } }, { "in": "query", - "name": "page_size", + "name": "sort_order", "schema": { - "type": "number" + "type": "string" + } + }, + { + "in": "query", + "name": "customer", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "department", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "date_macro", + "schema": { + "type": "string" } } ], @@ -6110,30 +6178,57 @@ } } }, - "/unified/pta/account": { + "/unified/accounting/cash-flow": { "get": { - "operationId": "pta-listAccounts", + "operationId": "accounting-getCashFlow", "parameters": [ { "in": "query", - "name": "sync_mode", + "name": "start_date", "schema": { - "type": "string", - "enum": ["full", "incremental"] + "type": "string" } }, { "in": "query", - "name": "cursor", + "name": "end_date", "schema": { - "type": ["string", "null"] + "type": "string" } }, { "in": "query", - "name": "page_size", + "name": "sort_order", "schema": { - "type": "number" + "type": "string" + } + }, + { + "in": "query", + "name": "customer", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "department", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "date_macro", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "summarize_by", + "schema": { + "type": "string" } } ], @@ -6145,21 +6240,51 @@ "schema": { "type": "object", "properties": { - "next_cursor": { - "type": ["string", "null"] + "reportName": { + "type": "string" }, - "has_next_page": { - "type": "boolean" + "startPeriod": { + "type": "string", + "format": "date" }, - "items": { - "type": "array", - "items": { - "type": "object", - "properties": {} - } + "endPeriod": { + "type": "string", + "format": "date" + }, + "currency": { + "type": "string" + }, + "netIncome": { + "type": ["number", "null"] + }, + "totalOperatingAdjustments": { + "type": ["number", "null"] + }, + "netCashFromOperatingActivities": { + "type": ["number", "null"] + }, + "netCashFromFinancingActivities": { + "type": ["number", "null"] + }, + "netCashIncrease": { + "type": ["number", "null"] + }, + "endingCash": { + "type": ["number", "null"] } }, - "required": ["has_next_page", "items"] + "required": [ + "reportName", + "startPeriod", + "endPeriod", + "currency", + "netIncome", + "totalOperatingAdjustments", + "netCashFromOperatingActivities", + "netCashFromFinancingActivities", + "netCashIncrease", + "endingCash" + ] } } } @@ -6197,30 +6322,50 @@ } } }, - "/unified/pta/transaction": { + "/unified/accounting/transaction-list": { "get": { - "operationId": "pta-listTransactions", + "operationId": "accounting-getTransactionList", "parameters": [ { "in": "query", - "name": "sync_mode", + "name": "start_date", "schema": { - "type": "string", - "enum": ["full", "incremental"] + "type": "string" } }, { "in": "query", - "name": "cursor", + "name": "end_date", "schema": { - "type": ["string", "null"] + "type": "string" } }, { "in": "query", - "name": "page_size", + "name": "sort_order", "schema": { - "type": "number" + "type": "string" + } + }, + { + "in": "query", + "name": "customer", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "department", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "date_macro", + "schema": { + "type": "string" } } ], @@ -6232,21 +6377,65 @@ "schema": { "type": "object", "properties": { - "next_cursor": { - "type": ["string", "null"] + "reportName": { + "type": "string" }, - "has_next_page": { - "type": "boolean" + "startPeriod": { + "type": "string" }, - "items": { + "endPeriod": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "transactions": { "type": "array", "items": { "type": "object", - "properties": {} + "properties": { + "date": { + "type": "string" + }, + "transactionType": { + "type": "string" + }, + "documentNumber": { + "type": "string" + }, + "posting": { + "type": "string" + }, + "name": { + "type": "string" + }, + "department": { + "type": "string" + }, + "memo": { + "type": "string" + }, + "account": { + "type": "string" + }, + "split": { + "type": "string" + }, + "amount": { + "type": "number" + } + }, + "required": ["date", "transactionType", "amount"] } } }, - "required": ["has_next_page", "items"] + "required": [ + "reportName", + "startPeriod", + "endPeriod", + "currency", + "transactions" + ] } } } @@ -6284,45 +6473,676 @@ } } }, - "/unified/pta/commodity": { + "/unified/accounting/customer-balance": { "get": { - "operationId": "pta-listCommodities", + "operationId": "accounting-getCustomerBalance", "parameters": [ { "in": "query", - "name": "sync_mode", + "name": "start_date", "schema": { - "type": "string", - "enum": ["full", "incremental"] + "type": "string" } }, { "in": "query", - "name": "cursor", + "name": "end_date", "schema": { - "type": ["string", "null"] + "type": "string" } }, { "in": "query", - "name": "page_size", + "name": "sort_order", "schema": { - "type": "number" + "type": "string" } - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "next_cursor": { - "type": ["string", "null"] - }, - "has_next_page": { + }, + { + "in": "query", + "name": "customer", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "department", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "date_macro", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "summarize_by", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "reportName": { + "type": "string" + }, + "reportDate": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "entries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "customerId": { + "type": "string" + }, + "customerName": { + "type": "string" + }, + "balance": { + "type": "number" + } + }, + "required": ["customerId", "customerName", "balance"] + } + }, + "totalBalance": { + "type": "number" + } + }, + "required": [ + "reportName", + "reportDate", + "currency", + "entries", + "totalBalance" + ] + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/unified/accounting/customer-income": { + "get": { + "operationId": "accounting-getCustomerIncome", + "parameters": [ + { + "in": "query", + "name": "start_date", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "end_date", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sort_order", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "customer", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "department", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "date_macro", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "summarize_by", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "reportName": { + "type": "string" + }, + "startPeriod": { + "type": "string" + }, + "endPeriod": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "entries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "customerId": { + "type": "string" + }, + "customerName": { + "type": "string" + }, + "totalIncome": { + "type": "number" + }, + "totalExpenses": { + "type": "number" + }, + "netIncome": { + "type": "number" + } + }, + "required": [ + "customerId", + "customerName", + "totalIncome", + "totalExpenses", + "netIncome" + ] + } + }, + "totalIncome": { + "type": "number" + }, + "totalExpenses": { + "type": "number" + }, + "netIncome": { + "type": "number" + } + }, + "required": [ + "reportName", + "startPeriod", + "endPeriod", + "currency", + "entries", + "totalIncome", + "totalExpenses", + "netIncome" + ] + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/unified/accounting/bank-accounts": { + "get": { + "operationId": "accounting-getBankAccounts", + "parameters": [ + { + "in": "query", + "name": "customer", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "updated": { + "type": "string" + }, + "name": { + "type": "string" + }, + "accountNumber": { + "type": "string" + }, + "default": { + "type": "boolean" + }, + "created": { + "type": "string" + }, + "inputType": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "accountType": { + "type": "string" + }, + "routingNumber": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "updated", + "name", + "accountNumber", + "default", + "created", + "inputType", + "phone", + "accountType", + "routingNumber", + "id" + ] + } + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/unified/accounting/payment-receipt": { + "get": { + "operationId": "accounting-getPaymentReceipts", + "parameters": [ + { + "in": "query", + "name": "customer_transaction_id", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/unified/pta/account": { + "get": { + "operationId": "pta-listAccounts", + "parameters": [ + { + "in": "query", + "name": "sync_mode", + "schema": { + "type": "string", + "enum": ["full", "incremental"] + } + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": ["string", "null"] + } + }, + { + "in": "query", + "name": "page_size", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "next_cursor": { + "type": ["string", "null"] + }, + "has_next_page": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + } + }, + "required": ["has_next_page", "items"] + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/unified/pta/transaction": { + "get": { + "operationId": "pta-listTransactions", + "parameters": [ + { + "in": "query", + "name": "sync_mode", + "schema": { + "type": "string", + "enum": ["full", "incremental"] + } + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": ["string", "null"] + } + }, + { + "in": "query", + "name": "page_size", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "next_cursor": { + "type": ["string", "null"] + }, + "has_next_page": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + } + }, + "required": ["has_next_page", "items"] + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/unified/pta/commodity": { + "get": { + "operationId": "pta-listCommodities", + "parameters": [ + { + "in": "query", + "name": "sync_mode", + "schema": { + "type": "string", + "enum": ["full", "incremental"] + } + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": ["string", "null"] + } + }, + { + "in": "query", + "name": "page_size", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "next_cursor": { + "type": ["string", "null"] + }, + "has_next_page": { "type": "boolean" }, "items": { @@ -6457,6 +7277,100 @@ } } }, + "/unified/ats/job/{jobId}/opening": { + "get": { + "operationId": "ats-listJobOpenings", + "parameters": [ + { + "in": "path", + "name": "jobId", + "schema": { + "type": "string" + }, + "required": true + }, + { + "in": "query", + "name": "sync_mode", + "schema": { + "type": "string", + "enum": ["full", "incremental"] + } + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": ["string", "null"] + } + }, + { + "in": "query", + "name": "page_size", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "next_cursor": { + "type": ["string", "null"] + }, + "has_next_page": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ats.opening" + } + } + }, + "required": ["has_next_page", "items"] + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, "/unified/ats/offer": { "get": { "operationId": "ats-listOffers", @@ -7597,7 +8511,13 @@ }, "Link": { "type": "string", - "enum": ["banking", "prefix_connector_name", "single_table", "ats"] + "enum": [ + "banking", + "prefix_connector_name", + "single_table", + "ats", + "ag_column_rename" + ] }, "core.integration": { "type": "object", @@ -7644,7 +8564,8 @@ "hris", "payroll", "calendar", - "ats" + "ats", + "email" ] } }, @@ -9043,6 +9964,32 @@ }, "description": "A department in an organization" }, + "ats.opening": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "modified_at": { + "type": "string" + }, + "status": { + "type": "string" + }, + "job_id": { + "type": "string" + }, + "raw_data": { + "type": "object", + "additionalProperties": {} + } + }, + "required": ["id", "created_at", "modified_at", "status", "job_id"], + "description": "An opening for a job" + }, "ats.offer": { "type": "object", "properties": { diff --git a/kits/sdk/openapi.types.d.ts b/kits/sdk/openapi.types.d.ts index fcfe5c4f..00c31c09 100644 --- a/kits/sdk/openapi.types.d.ts +++ b/kits/sdk/openapi.types.d.ts @@ -232,6 +232,24 @@ export interface paths { '/unified/accounting/profit-and-loss': { get: operations['accounting-getProfitAndLoss'] } + '/unified/accounting/cash-flow': { + get: operations['accounting-getCashFlow'] + } + '/unified/accounting/transaction-list': { + get: operations['accounting-getTransactionList'] + } + '/unified/accounting/customer-balance': { + get: operations['accounting-getCustomerBalance'] + } + '/unified/accounting/customer-income': { + get: operations['accounting-getCustomerIncome'] + } + '/unified/accounting/bank-accounts': { + get: operations['accounting-getBankAccounts'] + } + '/unified/accounting/payment-receipt': { + get: operations['accounting-getPaymentReceipts'] + } '/unified/pta/account': { get: operations['pta-listAccounts'] } @@ -244,6 +262,9 @@ export interface paths { '/unified/ats/job': { get: operations['ats-listJobs'] } + '/unified/ats/job/{jobId}/opening': { + get: operations['ats-listJobOpenings'] + } '/unified/ats/offer': { get: operations['ats-listOffers'] } @@ -458,7 +479,12 @@ export interface components { metadata?: unknown } /** @enum {string} */ - Link: 'banking' | 'prefix_connector_name' | 'single_table' | 'ats' + Link: + | 'banking' + | 'prefix_connector_name' + | 'single_table' + | 'ats' + | 'ag_column_rename' 'core.integration': { id: string /** @description ISO8601 date string */ @@ -489,6 +515,7 @@ export interface components { | 'payroll' | 'calendar' | 'ats' + | 'email' )[] | null connector_name: string @@ -1036,6 +1063,17 @@ export interface components { [key: string]: unknown } } + /** @description An opening for a job */ + 'ats.opening': { + id: string + created_at: string + modified_at: string + status: string + job_id: string + raw_data?: { + [key: string]: unknown + } + } /** @description An offer to a candidate */ 'ats.offer': { id: string @@ -1304,6 +1342,7 @@ export interface operations { endUserId?: string | null connectorConfigId?: string | null connectorName?: string | null + forceRefresh?: boolean } } responses: { @@ -1380,6 +1419,9 @@ export interface operations { } getResource: { parameters: { + query?: { + forceRefresh?: boolean + } path: { id: string } @@ -1836,6 +1878,7 @@ export interface operations { | 'payroll' | 'calendar' | 'ats' + | 'email' )[] }[] } @@ -2386,6 +2429,12 @@ export interface operations { * @description Events like sync.completed and connection.created can be sent to url of your choosing */ webhook_url?: string + /** + * Migrate Tables + * @description If enabled, table migrations will be run if needed when entities are persisted + * @default true + */ + migrate_tables?: boolean } } } @@ -4154,9 +4203,13 @@ export interface operations { 'accounting-getBalanceSheet': { parameters: { query?: { - sync_mode?: 'full' | 'incremental' - cursor?: string | null - page_size?: number + start_date?: string + end_date?: string + sort_order?: string + customer?: string + department?: string + date_macro?: string + summarize_by?: string } } responses: { @@ -4206,9 +4259,12 @@ export interface operations { 'accounting-getProfitAndLoss': { parameters: { query?: { - sync_mode?: 'full' | 'incremental' - cursor?: string | null - page_size?: number + start_date?: string + end_date?: string + sort_order?: string + customer?: string + department?: string + date_macro?: string } } responses: { @@ -4251,6 +4307,293 @@ export interface operations { } } } + 'accounting-getCashFlow': { + parameters: { + query?: { + start_date?: string + end_date?: string + sort_order?: string + customer?: string + department?: string + date_macro?: string + summarize_by?: string + } + } + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + reportName: string + /** Format: date */ + startPeriod: string + /** Format: date */ + endPeriod: string + currency: string + netIncome: number | null + totalOperatingAdjustments: number | null + netCashFromOperatingActivities: number | null + netCashFromFinancingActivities: number | null + netCashIncrease: number | null + endingCash: number | null + } + } + } + /** @description Invalid input data */ + 400: { + content: { + 'application/json': components['schemas']['error.BAD_REQUEST'] + } + } + /** @description Not found */ + 404: { + content: { + 'application/json': components['schemas']['error.NOT_FOUND'] + } + } + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['error.INTERNAL_SERVER_ERROR'] + } + } + } + } + 'accounting-getTransactionList': { + parameters: { + query?: { + start_date?: string + end_date?: string + sort_order?: string + customer?: string + department?: string + date_macro?: string + } + } + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + reportName: string + startPeriod: string + endPeriod: string + currency: string + transactions: { + date: string + transactionType: string + documentNumber?: string + posting?: string + name?: string + department?: string + memo?: string + account?: string + split?: string + amount: number + }[] + } + } + } + /** @description Invalid input data */ + 400: { + content: { + 'application/json': components['schemas']['error.BAD_REQUEST'] + } + } + /** @description Not found */ + 404: { + content: { + 'application/json': components['schemas']['error.NOT_FOUND'] + } + } + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['error.INTERNAL_SERVER_ERROR'] + } + } + } + } + 'accounting-getCustomerBalance': { + parameters: { + query?: { + start_date?: string + end_date?: string + sort_order?: string + customer?: string + department?: string + date_macro?: string + summarize_by?: string + } + } + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + reportName: string + reportDate: string + currency: string + entries: { + customerId: string + customerName: string + balance: number + }[] + totalBalance: number + } + } + } + /** @description Invalid input data */ + 400: { + content: { + 'application/json': components['schemas']['error.BAD_REQUEST'] + } + } + /** @description Not found */ + 404: { + content: { + 'application/json': components['schemas']['error.NOT_FOUND'] + } + } + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['error.INTERNAL_SERVER_ERROR'] + } + } + } + } + 'accounting-getCustomerIncome': { + parameters: { + query?: { + start_date?: string + end_date?: string + sort_order?: string + customer?: string + department?: string + date_macro?: string + summarize_by?: string + } + } + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + reportName: string + startPeriod: string + endPeriod: string + currency: string + entries: { + customerId: string + customerName: string + totalIncome: number + totalExpenses: number + netIncome: number + }[] + totalIncome: number + totalExpenses: number + netIncome: number + } + } + } + /** @description Invalid input data */ + 400: { + content: { + 'application/json': components['schemas']['error.BAD_REQUEST'] + } + } + /** @description Not found */ + 404: { + content: { + 'application/json': components['schemas']['error.NOT_FOUND'] + } + } + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['error.INTERNAL_SERVER_ERROR'] + } + } + } + } + 'accounting-getBankAccounts': { + parameters: { + query: { + customer: string + } + } + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + updated: string + name: string + accountNumber: string + default: boolean + created: string + inputType: string + phone: string + accountType: string + routingNumber: string + id: string + }[] + } + } + /** @description Invalid input data */ + 400: { + content: { + 'application/json': components['schemas']['error.BAD_REQUEST'] + } + } + /** @description Not found */ + 404: { + content: { + 'application/json': components['schemas']['error.NOT_FOUND'] + } + } + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['error.INTERNAL_SERVER_ERROR'] + } + } + } + } + 'accounting-getPaymentReceipts': { + parameters: { + query: { + customer_transaction_id: string + } + } + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': unknown + } + } + /** @description Invalid input data */ + 400: { + content: { + 'application/json': components['schemas']['error.BAD_REQUEST'] + } + } + /** @description Not found */ + 404: { + content: { + 'application/json': components['schemas']['error.NOT_FOUND'] + } + } + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['error.INTERNAL_SERVER_ERROR'] + } + } + } + } 'pta-listAccounts': { parameters: { query?: { @@ -4407,6 +4750,48 @@ export interface operations { } } } + 'ats-listJobOpenings': { + parameters: { + query?: { + sync_mode?: 'full' | 'incremental' + cursor?: string | null + page_size?: number + } + path: { + jobId: string + } + } + responses: { + /** @description Successful response */ + 200: { + content: { + 'application/json': { + next_cursor?: string | null + has_next_page: boolean + items: components['schemas']['ats.opening'][] + } + } + } + /** @description Invalid input data */ + 400: { + content: { + 'application/json': components['schemas']['error.BAD_REQUEST'] + } + } + /** @description Not found */ + 404: { + content: { + 'application/json': components['schemas']['error.NOT_FOUND'] + } + } + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['error.INTERNAL_SERVER_ERROR'] + } + } + } + } 'ats-listOffers': { parameters: { query?: {