Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Jan 15, 2025
1 parent 81db052 commit 44e8d41
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 85 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cli-verification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
check_and_publish packages/node-client
check_and_publish packages/runner-sdk
check_and_publish packages/frontend
- id: publish_step
name: Publish npm packages to the github registry
env:
Expand All @@ -67,6 +68,7 @@ jobs:
GIT_HASH=$(git rev-parse HEAD)
echo "hash=${GIT_HASH}" >> "$GITHUB_OUTPUT"
bash ./scripts/publish.sh 0.0.1-$GIT_HASH
- name: Publish the cli privately under the correct scope
working-directory: packages/cli
env:
Expand Down
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
53 changes: 7 additions & 46 deletions packages/runner-sdk/models.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ type ParamEncoder = (value: any, defaultEncoder: (value: any) => any) => any;
interface GenericFormData {
append(name: string, value: any, options?: any): any;
}
type SerializerVisitor = (
this: GenericFormData,
value: any,
key: string | number,
path: null | (string | number)[],
helpers: FormDataVisitorHelpers
) => boolean;
type SerializerVisitor = (this: GenericFormData, value: any, key: string | number, path: null | (string | number)[], helpers: FormDataVisitorHelpers) => boolean;
type CustomParamsSerializer = (params: Record<string, any>, options?: ParamsSerializerOptions) => string;
interface FormDataVisitorHelpers {
defaultVisitor: SerializerVisitor;
Expand Down Expand Up @@ -165,12 +159,10 @@ interface JwtCredentials {
type: AuthModes['Jwt'];
privateKeyId?: string;
issuerId?: string;
privateKey:
| {
id: string;
secret: string;
}
| string;
privateKey:{
id: string;
secret: string;
} | string;
token?: string;
expires_at?: Date | undefined;
}
Expand Down Expand Up @@ -201,22 +193,7 @@ interface CustomCredentials extends CredentialsCommon {
type: AuthModes['Custom'];
}
type UnauthCredentials = Record<string, never>;
type AuthCredentials =
| OAuth2Credentials
| OAuth2ClientCredentials
| OAuth1Credentials
| BasicApiCredentials
| ApiKeyCredentials
| AppCredentials
| AppStoreCredentials
| UnauthCredentials
| TbaCredentials
| TableauCredentials
| JwtCredentials
| BillCredentials
| TwoStepCredentials
| SignatureCredentials
| CustomCredentials;
type AuthCredentials = OAuth2Credentials | OAuth2ClientCredentials | OAuth1Credentials | BasicApiCredentials | ApiKeyCredentials | AppCredentials | AppStoreCredentials | UnauthCredentials | TbaCredentials | TableauCredentials | JwtCredentials | BillCredentials | TwoStepCredentials | SignatureCredentials | CustomCredentials;
type Metadata = Record<string, unknown>;
interface MetadataChangeResponse {
metadata: Metadata;
Expand Down Expand Up @@ -353,23 +330,7 @@ export declare class NangoAction {
put<T = any>(config: Omit<ProxyConfiguration, 'method'>): Promise<AxiosResponse<T>>;
patch<T = any>(config: Omit<ProxyConfiguration, 'method'>): Promise<AxiosResponse<T>>;
delete<T = any>(config: Omit<ProxyConfiguration, 'method'>): Promise<AxiosResponse<T>>;
getToken(): Promise<
| string
| OAuth1Token
| OAuth2ClientCredentials
| BasicApiCredentials
| ApiKeyCredentials
| AppCredentials
| AppStoreCredentials
| UnauthCredentials
| CustomCredentials
| TbaCredentials
| TableauCredentials
| JwtCredentials
| BillCredentials
| TwoStepCredentials
| SignatureCredentials
>;
getToken(): Promise<string | OAuth1Token | OAuth2ClientCredentials | BasicApiCredentials | ApiKeyCredentials | AppCredentials | AppStoreCredentials | UnauthCredentials | CustomCredentials | TbaCredentials | TableauCredentials | JwtCredentials | BillCredentials | TwoStepCredentials | SignatureCredentials>;
/**
* Get current integration
*/
Expand Down

0 comments on commit 44e8d41

Please sign in to comment.