From 8da58825ba172ab3f22acabab8ed6432619a17e7 Mon Sep 17 00:00:00 2001 From: OpenInt Bot Date: Mon, 6 Jan 2025 11:05:03 -0800 Subject: [PATCH] feat(openint): update --- sdks/sdk-openint/openint.oas.json | 301 ++++++++++++++++++++++-- sdks/sdk-openint/openint.oas.types.d.ts | 235 +++++++++++++++++- sdks/sdk-openint/package.json | 2 +- 3 files changed, 509 insertions(+), 29 deletions(-) diff --git a/sdks/sdk-openint/openint.oas.json b/sdks/sdk-openint/openint.oas.json index 8d15276..1bcaf3c 100644 --- a/sdks/sdk-openint/openint.oas.json +++ b/sdks/sdk-openint/openint.oas.json @@ -56,6 +56,61 @@ } } }, + "/clerk-testing-token": { + "get": { + "operationId": "createClerkTestingToken", + "summary": "Create clerk testing token", + "tags": ["Internal"], + "parameters": [ + { + "in": "query", + "name": "secret", + "schema": {"type": "string"}, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {"testing_token": {"type": "string"}}, + "required": ["testing_token"] + } + } + } + }, + "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" + } + } + } + } + } + } + }, "/connect/token": { "post": { "operationId": "createConnectToken", @@ -579,7 +634,11 @@ "responses": { "200": { "description": "Successful response", - "content": {"application/json": {"schema": {}}} + "content": { + "application/json": { + "schema": {"type": "object", "properties": {}} + } + } }, "400": { "description": "Invalid input data", @@ -823,7 +882,27 @@ "responses": { "200": { "description": "Successful response", - "content": {"application/json": {"schema": {}}} + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "connection_requested_event_id": {"type": "string"}, + "pipeline_syncs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "pipeline_id": {"type": "string"}, + "sync_completed_event_id": {"type": "string"} + }, + "required": ["pipeline_id", "sync_completed_event_id"] + } + } + } + } + } + } }, "400": { "description": "Invalid input data", @@ -1937,7 +2016,11 @@ "responses": { "200": { "description": "Successful response", - "content": {"application/json": {"schema": {}}} + "content": { + "application/json": { + "schema": {"type": "object", "properties": {}} + } + } }, "400": { "description": "Invalid input data", @@ -1960,20 +2043,58 @@ } } }, - "/core/sync_run": { + "/core/events": { "get": { - "operationId": "listSyncRuns", - "summary": "List sync runs", - "tags": ["Core"], + "operationId": "listEvents", + "summary": "List events", + "tags": ["Connect"], "parameters": [ - {"in": "query", "name": "limit", "schema": {"type": "number"}}, - {"in": "query", "name": "offset", "schema": {"type": "number"}} + { + "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"}}, + { + "in": "query", + "name": "since", + "schema": {"type": "integer"}, + "required": true + }, + { + "in": "query", + "name": "customerId", + "schema": {"type": ["string", "null"], "minLength": 1} + }, + { + "in": "query", + "name": "name", + "schema": {"type": ["string", "null"]} + } ], "responses": { "200": { "description": "Successful response", "content": { - "application/json": {"schema": {"type": "array", "items": {}}} + "application/json": { + "schema": { + "type": "object", + "properties": { + "next_cursor": {"type": ["string", "null"]}, + "has_next_page": {"type": "boolean"}, + "items": { + "type": "array", + "items": {"$ref": "#/components/schemas/Event"} + } + }, + "required": ["has_next_page", "items"] + } + } } }, "400": { @@ -2094,6 +2215,124 @@ } } } + }, + "patch": { + "operationId": "updateCurrentOrganization", + "summary": "Update current organization", + "tags": ["Internal"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "publicMetadata": { + "type": "object", + "properties": { + "database_url": { + "type": "string", + "title": "PostgreSQL Database URL", + "description": "This is where data from connections are synced to by default", + "example": "postgres://username:password@host:port/database" + }, + "synced_data_schema": { + "type": "string", + "title": "Synced Data Schema", + "description": "Postgres schema to pipe data synced from customer connections into. Defaults to \"synced\" if missing." + }, + "webhook_url": { + "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 + } + } + } + }, + "required": ["publicMetadata"] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Must start with 'org_'" + }, + "slug": {"type": ["string", "null"]}, + "publicMetadata": { + "type": "object", + "properties": { + "database_url": { + "type": "string", + "title": "PostgreSQL Database URL", + "description": "This is where data from connections are synced to by default", + "example": "postgres://username:password@host:port/database" + }, + "synced_data_schema": { + "type": "string", + "title": "Synced Data Schema", + "description": "Postgres schema to pipe data synced from customer connections into. Defaults to \"synced\" if missing." + }, + "webhook_url": { + "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 + } + } + } + }, + "required": ["id", "publicMetadata"] + } + } + } + }, + "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" + } + } + } + } + } } }, "/openapi.json": { @@ -5194,7 +5433,8 @@ {"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": "date_macro", "schema": {"type": "string"}}, + {"in": "query", "name": "summarize_by", "schema": {"type": "string"}} ], "responses": { "200": { @@ -5353,7 +5593,19 @@ {"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": "date_macro", "schema": {"type": "string"}}, + { + "in": "query", + "name": "payment_method", + "schema": {"type": "string"} + }, + {"in": "query", "name": "arpaid", "schema": {"type": "string"}}, + { + "in": "query", + "name": "transaction_type", + "schema": {"type": "string"} + }, + {"in": "query", "name": "sort_by", "schema": {"type": "string"}} ], "responses": { "200": { @@ -7298,15 +7550,14 @@ "standard": { "type": ["object", "null"], "properties": { - "displayName": {"type": "string"}, + "displayName": {"type": ["string", "null"]}, "status": { "type": ["string", "null"], "enum": ["healthy", "disconnected", "error", "manual"] }, "statusMessage": {"type": ["string", "null"]}, "labels": {"type": "array", "items": {"type": "string"}} - }, - "required": ["displayName"] + } }, "disabled": {"type": "boolean"}, "metadata": { @@ -7481,6 +7732,26 @@ }, "required": ["createdAt", "updatedAt", "id"] }, + "Event": { + "type": "object", + "properties": { + "id": {"type": "string", "description": "Must start with 'evt_'"}, + "name": {"type": "string"}, + "data": {"type": ["object", "null"], "additionalProperties": {}}, + "timestamp": {"type": "string"}, + "user": {"type": ["object", "null"], "additionalProperties": {}}, + "org_id": { + "type": ["string", "null"], + "description": "Must start with 'org_'" + }, + "customer_id": {"type": ["string", "null"], "minLength": 1}, + "user_id": { + "type": ["string", "null"], + "description": "Must start with 'user_'" + } + }, + "required": ["id", "name", "timestamp"] + }, "Viewer": { "oneOf": [ { diff --git a/sdks/sdk-openint/openint.oas.types.d.ts b/sdks/sdk-openint/openint.oas.types.d.ts index 6448675..b3d26de 100644 --- a/sdks/sdk-openint/openint.oas.types.d.ts +++ b/sdks/sdk-openint/openint.oas.types.d.ts @@ -16,6 +16,23 @@ export interface paths { patch?: never trace?: never } + '/clerk-testing-token': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Create clerk testing token */ + get: operations['createClerkTestingToken'] + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } '/connect/token': { parameters: { query?: never @@ -373,15 +390,15 @@ export interface paths { patch?: never trace?: never } - '/core/sync_run': { + '/core/events': { parameters: { query?: never header?: never path?: never cookie?: never } - /** List sync runs */ - get: operations['listSyncRuns'] + /** List events */ + get: operations['listEvents'] put?: never post?: never delete?: never @@ -421,7 +438,8 @@ export interface paths { delete?: never options?: never head?: never - patch?: never + /** Update current organization */ + patch: operations['updateCurrentOrganization'] trace?: never } '/openapi.json': { @@ -1655,7 +1673,7 @@ export interface components { [key: string]: unknown } | null standard?: { - displayName: string + displayName?: string | null /** @enum {string|null} */ status?: 'healthy' | 'disconnected' | 'error' | 'manual' | null statusMessage?: string | null @@ -1792,6 +1810,23 @@ export interface components { * */ metadata?: unknown } + Event: { + /** @description Must start with 'evt_' */ + id: string + name: string + data?: { + [key: string]: unknown + } | null + timestamp: string + user?: { + [key: string]: unknown + } | null + /** @description Must start with 'org_' */ + org_id?: string | null + customer_id?: string | null + /** @description Must start with 'user_' */ + user_id?: string | null + } Viewer: | { /** @enum {string} */ @@ -2444,6 +2479,57 @@ export interface operations { } } } + createClerkTestingToken: { + parameters: { + query: { + secret: string + } + header?: never + path?: never + cookie?: never + } + requestBody?: never + responses: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': { + testing_token: string + } + } + } + /** @description Invalid input data */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['error.BAD_REQUEST'] + } + } + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['error.NOT_FOUND'] + } + } + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['error.INTERNAL_SERVER_ERROR'] + } + } + } + } createConnectToken: { parameters: { query?: never @@ -2890,7 +2976,7 @@ export interface operations { [name: string]: unknown } content: { - 'application/json': unknown + 'application/json': Record } } /** @description Invalid input data */ @@ -3079,7 +3165,13 @@ export interface operations { [name: string]: unknown } content: { - 'application/json': unknown + 'application/json': { + connection_requested_event_id?: string + pipeline_syncs?: { + pipeline_id: string + sync_completed_event_id: string + }[] + } } } /** @description Invalid input data */ @@ -4036,7 +4128,7 @@ export interface operations { [name: string]: unknown } content: { - 'application/json': unknown + 'application/json': Record } } /** @description Invalid input data */ @@ -4059,11 +4151,15 @@ export interface operations { } } } - listSyncRuns: { + listEvents: { parameters: { - query?: { - limit?: number - offset?: number + query: { + sync_mode?: 'full' | 'incremental' + cursor?: string | null + page_size?: number + since: number + customerId?: string | null + name?: string | null } header?: never path?: never @@ -4077,7 +4173,11 @@ export interface operations { [name: string]: unknown } content: { - 'application/json': unknown[] + 'application/json': { + next_cursor?: string | null + has_next_page: boolean + items: components['schemas']['Event'][] + } } } /** @description Invalid input data */ @@ -4195,6 +4295,110 @@ export interface operations { } } } + updateCurrentOrganization: { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': { + publicMetadata: { + /** + * PostgreSQL Database URL + * @description This is where data from connections are synced to by default + * @example postgres://username:password@host:port/database + */ + database_url?: string + /** + * Synced Data Schema + * @description Postgres schema to pipe data synced from customer connections into. Defaults to "synced" if missing. + */ + synced_data_schema?: string + /** + * Webhook URL + * @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 + } + } + } + } + responses: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': { + /** @description Must start with 'org_' */ + id: string + slug?: string | null + publicMetadata: { + /** + * PostgreSQL Database URL + * @description This is where data from connections are synced to by default + * @example postgres://username:password@host:port/database + */ + database_url?: string + /** + * Synced Data Schema + * @description Postgres schema to pipe data synced from customer connections into. Defaults to "synced" if missing. + */ + synced_data_schema?: string + /** + * Webhook URL + * @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 + } + } + } + } + /** @description Invalid input data */ + 400: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['error.BAD_REQUEST'] + } + } + /** @description Not found */ + 404: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['error.NOT_FOUND'] + } + } + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['error.INTERNAL_SERVER_ERROR'] + } + } + } + } 'public-getOpenapiDocument': { parameters: { query?: never @@ -6728,6 +6932,7 @@ export interface operations { customer?: string department?: string date_macro?: string + summarize_by?: string } header?: never path?: never @@ -6863,6 +7068,10 @@ export interface operations { customer?: string department?: string date_macro?: string + payment_method?: string + arpaid?: string + transaction_type?: string + sort_by?: string } header?: never path?: never diff --git a/sdks/sdk-openint/package.json b/sdks/sdk-openint/package.json index e9adb9f..2d29bf8 100644 --- a/sdks/sdk-openint/package.json +++ b/sdks/sdk-openint/package.json @@ -1,6 +1,6 @@ { "name": "@opensdks/sdk-openint", - "version": "0.1.1", + "version": "0.1.4", "type": "module", "exports": { ".": {