Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk): standalone package #3297

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/webflow-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
paths:
- packages/shared/providers.yaml
- packages/providers/providers.yaml
- docs-v2/integrations/all/*.md
workflow_dispatch:

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
- NANGO_LOGS_ES_PWD
- FLAG_SERVE_CONNECT_UI=${FLAG_SERVE_CONNECT_UI:-true}
volumes:
- './packages/shared/providers.yaml:/usr/nango-server/src/packages/shared/providers.yaml'
- './packages/providers/providers.yaml:/usr/nango-server/src/packages/providers/providers.yaml'
restart: always
ports:
- '${SERVER_PORT:-3003}:${SERVER_PORT:-3003}'
Expand Down
2 changes: 1 addition & 1 deletion docs-v2/reference/api-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebarTitle: 'API config (providers.yaml)'
icon: 'network-wired'
---

API configurations are listed in the `providers.yaml` file, located in the [Nango GitHub repository](https://github.com/NangoHQ/nango/blob/master/packages/shared/providers.yaml).
API configurations are listed in the `providers.yaml` file, located in the [Nango GitHub repository](https://github.com/NangoHQ/nango/blob/master/packages/providers/providers.yaml).

# Examples

Expand Down
16 changes: 11 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ exports[`buildModelTs > should return empty (with sdk) 1`] = `

// ------ SDK

import { Nango } from '@nangohq/node';
import type { AxiosInstance, AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse } from 'axios';
import { AxiosError } from 'axios';
import type { Nango } from '@nangohq/node';
import type { AxiosInstance, AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';
import type { ApiEndUser, DBSyncConfig, DBTeam, GetPublicIntegration, RunnerFlags } from '@nangohq/types';

export declare const oldLevelToNewLevel: {
readonly debug: "debug";
readonly info: "info";
readonly warn: "warn";
readonly error: "error";
readonly verbose: "debug";
readonly silly: "debug";
readonly http: "info";
readonly debug: 'debug';
readonly info: 'info';
readonly warn: 'warn';
readonly error: 'error';
readonly verbose: 'debug';
readonly silly: 'debug';
readonly http: 'info';
};
type LogLevel = 'info' | 'debug' | 'error' | 'warn' | 'http' | 'verbose' | 'silly';
type ParamEncoder = (value: any, defaultEncoder: (value: any) => any) => any;
Expand Down Expand Up @@ -202,7 +202,7 @@ interface JwtCredentials {
type: AuthModes['Jwt'];
privateKeyId?: string;
issuerId?: string;
privateKey: {
privateKey:{
id: string;
secret: string;
} | string;
Expand Down Expand Up @@ -298,14 +298,16 @@ export interface NangoProps {
dryRun?: boolean;
track_deletes?: boolean;
attributes?: object | undefined;
logMessages?: {
counts: {
updated: number;
added: number;
deleted: number;
};
messages: unknown[];
} | undefined;
logMessages?:
| {
counts: {
updated: number;
added: number;
deleted: number;
};
messages: unknown[];
}
| undefined;
rawSaveOutput?: Map<string, unknown[]> | undefined;
rawDeleteOutput?: Map<string, unknown[]> | undefined;
stubbedMetadata?: Metadata | undefined;
Expand Down Expand Up @@ -354,9 +356,14 @@ export declare class NangoAction {
ActionError: typeof ActionError;
private memoizedConnections;
private memoizedIntegration;
constructor(config: NangoProps, { persistApi }?: {
persistApi: AxiosInstance;
});
constructor(
config: NangoProps,
{
persistApi
}?: {
persistApi: AxiosInstance;
}
);
protected stringify(): string;
private proxyConfig;
protected throwIfAborted(): void;
Expand Down Expand Up @@ -393,15 +400,26 @@ export declare class NangoAction {
* await nango.log('This is a log message', { level: 'error' })
* \`\`\`
*/
log(message: any, options?: {
level?: LogLevel;
} | {
[key: string]: any;
level?: never;
}): Promise<void>;
log(message: string, ...args: [any, {
level?: LogLevel;
}]): Promise<void>;
log(
message: any,
options?:
| {
level?: LogLevel;
}
| {
[key: string]: any;
level?: never;
}
): Promise<void>;
log(
message: string,
...args: [
any,
{
level?: LogLevel;
}
]
): Promise<void>;
getEnvironmentVariables(): Promise<EnvironmentVariable[] | null>;
getFlowAttributes<A = object>(): A | null;
paginate<T = any>(config: ProxyConfiguration): AsyncGenerator<T[], undefined, void>;
Expand All @@ -413,14 +431,16 @@ export declare class NangoAction {
export declare class NangoSync extends NangoAction {
lastSyncDate?: Date;
track_deletes: boolean;
logMessages?: {
counts: {
updated: number;
added: number;
deleted: number;
};
messages: unknown[];
} | undefined;
logMessages?:
| {
counts: {
updated: number;
added: number;
deleted: number;
};
messages: unknown[];
}
| undefined;
rawSaveOutput?: Map<string, unknown[]>;
rawDeleteOutput?: Map<string, unknown[]>;
stubbedMetadata?: Metadata | undefined;
Expand Down
Loading
Loading