Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion .oagen-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 2,
"language": "node",
"generatedAt": "2026-06-01T17:59:24.986Z",
"generatedAt": "2026-06-16T18:02:10.415Z",
"files": [
"src/api-keys/interfaces/create-validation-options.interface.ts",
"src/api-keys/interfaces/delete-api-key-options.interface.ts",
Expand Down Expand Up @@ -82,6 +82,47 @@
"src/groups/serializers/index.ts",
"src/groups/serializers/update-group.serializer.ts",
"src/groups/serializers/user-organization-membership-base-list-data.serializer.ts",
"src/pipes/fixtures/connected-account.json",
"src/pipes/fixtures/data-integration-access-token-response-access-token.json",
"src/pipes/fixtures/data-integration-access-token-response.json",
"src/pipes/fixtures/data-integration-authorize-url-response.json",
"src/pipes/fixtures/data-integrations-get-data-integration-authorize-url-request.json",
"src/pipes/fixtures/data-integrations-get-user-token-request.json",
"src/pipes/fixtures/data-integrations-list-response-data-connected-account.json",
"src/pipes/fixtures/data-integrations-list-response-data.json",
"src/pipes/fixtures/data-integrations-list-response.json",
"src/pipes/interfaces/authorize-data-integration-options.interface.ts",
"src/pipes/interfaces/connected-account-state.interface.ts",
"src/pipes/interfaces/connected-account.interface.ts",
"src/pipes/interfaces/create-data-integration-token-options.interface.ts",
"src/pipes/interfaces/data-integration-access-token-response-access-token.interface.ts",
"src/pipes/interfaces/data-integration-access-token-response-error.interface.ts",
"src/pipes/interfaces/data-integration-access-token-response.interface.ts",
"src/pipes/interfaces/data-integration-authorize-url-response.interface.ts",
"src/pipes/interfaces/data-integrations-get-data-integration-authorize-url-request.interface.ts",
"src/pipes/interfaces/data-integrations-get-user-token-request.interface.ts",
"src/pipes/interfaces/data-integrations-list-response-data-connected-account-state.interface.ts",
"src/pipes/interfaces/data-integrations-list-response-data-connected-account.interface.ts",
"src/pipes/interfaces/data-integrations-list-response-data-ownership.interface.ts",
"src/pipes/interfaces/data-integrations-list-response-data.interface.ts",
"src/pipes/interfaces/data-integrations-list-response.interface.ts",
"src/pipes/interfaces/delete-user-connected-account-options.interface.ts",
"src/pipes/interfaces/get-user-connected-account-options.interface.ts",
"src/pipes/interfaces/index.ts",
"src/pipes/interfaces/list-user-data-providers-options.interface.ts",
"src/pipes/pipes.spec.ts",
"src/pipes/pipes.ts",
"src/pipes/serializers.spec.ts",
"src/pipes/serializers/connected-account.serializer.ts",
"src/pipes/serializers/data-integration-access-token-response-access-token.serializer.ts",
"src/pipes/serializers/data-integration-access-token-response.serializer.ts",
"src/pipes/serializers/data-integration-authorize-url-response.serializer.ts",
"src/pipes/serializers/data-integrations-get-data-integration-authorize-url-request.serializer.ts",
"src/pipes/serializers/data-integrations-get-user-token-request.serializer.ts",
"src/pipes/serializers/data-integrations-list-response-data-connected-account.serializer.ts",
"src/pipes/serializers/data-integrations-list-response-data.serializer.ts",
"src/pipes/serializers/data-integrations-list-response.serializer.ts",
"src/pipes/serializers/index.ts",
"src/radar/fixtures/radar-list-entry-already-present-response.json",
"src/radar/fixtures/radar-standalone-assess-request.json",
"src/radar/fixtures/radar-standalone-delete-radar-list-entry-request.json",
Expand Down
10 changes: 10 additions & 0 deletions src/pipes/fixtures/connected-account.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"object": "connected_account",
"id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
"user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
"organization_id": null,
"scopes": ["repo", "user:email"],
"state": "connected",
"created_at": "2024-01-16T14:20:00.000Z",
"updated_at": "2024-01-16T14:20:00.000Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"object": "access_token",
"access_token": "gho_16C7e42F292c6912E7710c838347Ae178B4a",
"expires_at": "2025-12-31T23:59:59.000Z",
"scopes": ["repo", "user:email"],
"missing_scopes": []
}
10 changes: 10 additions & 0 deletions src/pipes/fixtures/data-integration-access-token-response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"active": true,
"access_token": {
"object": "access_token",
"access_token": "gho_16C7e42F292c6912E7710c838347Ae178B4a",
"expires_at": "2025-12-31T23:59:59.000Z",
"scopes": ["repo", "user:email"],
"missing_scopes": []
}
}
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"url": "https://api.workos.com/data-integrations/q2czJKmVAraSBg8xFpT7M9uR/authorize-redirect"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
"organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
"return_to": "https://example.com/callback"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
"organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"object": "connected_account",
"id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
"user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
"organization_id": "test_organizationId",
"scopes": ["repo", "user:email"],
"state": "connected",
"created_at": "test_createdAt",
"updated_at": "test_updatedAt",
"userland_user_id": "test_userlandUserId"
}
24 changes: 24 additions & 0 deletions src/pipes/fixtures/data-integrations-list-response-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"object": "data_provider",
"id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
"name": "GitHub",
"description": "Connect your GitHub account to access repositories.",
"slug": "github",
"integration_type": "test_integrationType",
"credentials_type": "test_credentialsType",
"scopes": ["repo", "user:email"],
"ownership": "userland_user",
"created_at": "test_createdAt",
"updated_at": "test_updatedAt",
"connected_account": {
"object": "connected_account",
"id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
"user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
"organization_id": "test_organizationId",
"scopes": ["repo", "user:email"],
"state": "connected",
"created_at": "test_createdAt",
"updated_at": "test_updatedAt",
"userland_user_id": "test_userlandUserId"
}
}
29 changes: 29 additions & 0 deletions src/pipes/fixtures/data-integrations-list-response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"object": "list",
"data": [
{
"object": "data_provider",
"id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
"name": "GitHub",
"description": "Connect your GitHub account to access repositories.",
"slug": "github",
"integration_type": "test_integrationType",
"credentials_type": "test_credentialsType",
"scopes": ["repo", "user:email"],
"ownership": "userland_user",
"created_at": "test_createdAt",
"updated_at": "test_updatedAt",
"connected_account": {
"object": "connected_account",
"id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
"user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
"organization_id": "test_organizationId",
"scopes": ["repo", "user:email"],
"state": "connected",
"created_at": "test_createdAt",
"updated_at": "test_updatedAt",
"userland_user_id": "test_userlandUserId"
}
}
]
}
4 changes: 0 additions & 4 deletions src/pipes/fixtures/get-access-token-needs-reauth.json

This file was deleted.

10 changes: 0 additions & 10 deletions src/pipes/fixtures/get-access-token-no-expiry.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/pipes/fixtures/get-access-token-not-installed.json

This file was deleted.

10 changes: 0 additions & 10 deletions src/pipes/fixtures/get-access-token-success.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This file is auto-generated by oagen. Do not edit.

export interface AuthorizeDataIntegrationOptions {
/** The slug identifier of the provider (e.g., `github`, `slack`, `notion`). */
slug: string;
/** The ID of the user to authorize. */
userId: string;
/** An organization ID to scope the authorization to a specific organization. */
organizationId?: string;
/** The URL to redirect the user to after authorization. */
returnTo?: string;
}
10 changes: 10 additions & 0 deletions src/pipes/interfaces/connected-account-state.interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This file is auto-generated by oagen. Do not edit.

export const ConnectedAccountState = {
Connected: 'connected',
NeedsReauthorization: 'needs_reauthorization',
Disconnected: 'disconnected',
} as const;

export type ConnectedAccountState =
(typeof ConnectedAccountState)[keyof typeof ConnectedAccountState];
38 changes: 38 additions & 0 deletions src/pipes/interfaces/connected-account.interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// This file is auto-generated by oagen. Do not edit.

import type { ConnectedAccountState } from './connected-account-state.interface';

export interface ConnectedAccount {
/** Distinguishes the connected account object. */
object: 'connected_account';
/** The unique identifier of the connected account. */
id: string;
/** The [User](https://workos.com/docs/reference/authkit/user) identifier associated with this connection. */
userId: string | null;
/** The [Organization](https://workos.com/docs/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization. */
organizationId: string | null;
/** The OAuth scopes granted for this connection. */
scopes: string[];
/**
* The state of the connected account:
* - `connected`: The connection is active and tokens are valid.
* - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed.
* - `disconnected`: The connection has been disconnected.
*/
state: ConnectedAccountState;
/** The timestamp when the connection was created. */
createdAt: string;
/** The timestamp when the connection was last updated. */
updatedAt: string;
}

export interface ConnectedAccountResponse {
object: 'connected_account';
id: string;
user_id: string | null;
organization_id: string | null;
scopes: string[];
state: ConnectedAccountState;
created_at: string;
updated_at: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This file is auto-generated by oagen. Do not edit.

export interface CreateDataIntegrationTokenOptions {
/** The identifier of the integration. */
slug: string;
/** A [User](https://workos.com/docs/reference/authkit/user) identifier. */
userId: string;
/** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */
organizationId?: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// This file is auto-generated by oagen. Do not edit.

/** The [access token](https://workos.com/docs/reference/pipes/access-token) object, present when `active` is `true`. */
export interface DataIntegrationAccessTokenResponseAccessToken {
/** Distinguishes the access token object. */
object: 'access_token';
/** The OAuth access token for the connected integration. */
accessToken: string;
/** The ISO-8601 formatted timestamp indicating when the access token expires. */
expiresAt: Date | null;
/** The scopes granted to the access token. */
scopes: string[];
/** If the integration has requested scopes that aren't present on the access token, they're listed here. */
missingScopes: string[];
}

export interface DataIntegrationAccessTokenResponseAccessTokenResponse {
object: 'access_token';
access_token: string;
expires_at: string | null;
scopes: string[];
missing_scopes: string[];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file is auto-generated by oagen. Do not edit.

export const DataIntegrationAccessTokenResponseError = {
NotInstalled: 'not_installed',
NeedsReauthorization: 'needs_reauthorization',
} as const;

export type DataIntegrationAccessTokenResponseError =
(typeof DataIntegrationAccessTokenResponseError)[keyof typeof DataIntegrationAccessTokenResponseError];
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This file is auto-generated by oagen. Do not edit.

import type {
DataIntegrationAccessTokenResponseAccessToken,
DataIntegrationAccessTokenResponseAccessTokenResponse,
} from './data-integration-access-token-response-access-token.interface';

export type DataIntegrationAccessTokenResponse =
| { active: true; accessToken: DataIntegrationAccessTokenResponseAccessToken }
| { active: false; error: 'needs_reauthorization' | 'not_installed' };

export type DataIntegrationAccessTokenResponseWire =
| {
active: true;
access_token: DataIntegrationAccessTokenResponseAccessTokenResponse;
}
| { active: false; error: 'needs_reauthorization' | 'not_installed' };
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This file is auto-generated by oagen. Do not edit.

export interface DataIntegrationAuthorizeUrlResponse {
/** The OAuth authorization URL to redirect the user to. */
url: string;
}

export interface DataIntegrationAuthorizeUrlResponseWire {
url: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This file is auto-generated by oagen. Do not edit.

export interface DataIntegrationsGetDataIntegrationAuthorizeUrlRequest {
/** The ID of the user to authorize. */
userId: string;
/** An organization ID to scope the authorization to a specific organization. */
organizationId?: string;
/** The URL to redirect the user to after authorization. */
returnTo?: string;
}

export interface DataIntegrationsGetDataIntegrationAuthorizeUrlRequestResponse {
user_id: string;
organization_id?: string;
return_to?: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This file is auto-generated by oagen. Do not edit.

export interface DataIntegrationsGetUserTokenRequest {
/** A [User](https://workos.com/docs/reference/authkit/user) identifier. */
userId: string;
/** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */
organizationId?: string | null;
}

export interface DataIntegrationsGetUserTokenRequestResponse {
user_id: string;
organization_id?: string | null;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This file is auto-generated by oagen. Do not edit.

export const DataIntegrationsListResponseDataConnectedAccountState = {
Connected: 'connected',
NeedsReauthorization: 'needs_reauthorization',
Disconnected: 'disconnected',
} as const;

export type DataIntegrationsListResponseDataConnectedAccountState =
(typeof DataIntegrationsListResponseDataConnectedAccountState)[keyof typeof DataIntegrationsListResponseDataConnectedAccountState];
Loading