
All checks were successful
build-and-push-ext / build_push (push) Successful in 15s
feat(api): GET /api/subscriptions/current (stub via ENABLE_SUBSCRIPTION_STUB) chore(types): compléter stub sdk-signer-client (timeout, reconnect, options) chore(ts): build sans toucher signer
77 lines
2.3 KiB
TypeScript
77 lines
2.3 KiB
TypeScript
// Global type declarations for packages without @types
|
|
|
|
declare module 'ovh' {
|
|
interface OVHConfig {
|
|
appKey: string;
|
|
appSecret: string;
|
|
consumerKey: string;
|
|
}
|
|
|
|
interface OVHClient {
|
|
request(method: string, path: string, params: any, callback: (error: any, result: any) => void): void;
|
|
}
|
|
|
|
function ovh(config: OVHConfig): OVHClient;
|
|
export = ovh;
|
|
}
|
|
|
|
declare module '@mailchimp/mailchimp_transactional' {
|
|
interface MailchimpMessage {
|
|
template_name: string;
|
|
template_content: any[];
|
|
message: {
|
|
global_merge_vars: Array<{ name: string; content: string }>;
|
|
from_email: string;
|
|
from_name: string;
|
|
subject: string;
|
|
to: Array<{ email: string; type: string }>;
|
|
};
|
|
}
|
|
|
|
interface MailchimpClient {
|
|
messages: {
|
|
sendTemplate(message: MailchimpMessage): Promise<any>;
|
|
};
|
|
}
|
|
|
|
function mailchimp(apiKey: string): MailchimpClient;
|
|
export = mailchimp;
|
|
}
|
|
|
|
// Stub typing pour sdk-signer-client (non requis pour la compilation de l'endpoint subscription)
|
|
declare module 'sdk-signer-client' {
|
|
export interface SignerClientOptions {
|
|
baseUrl?: string;
|
|
apiKey?: string;
|
|
timeoutMs?: number;
|
|
}
|
|
export interface ClientConfig extends SignerClientOptions {
|
|
url?: string;
|
|
timeout?: number;
|
|
reconnectInterval?: number;
|
|
maxReconnectAttempts?: number;
|
|
}
|
|
export type SignerEvent = 'connected' | 'disconnected' | 'error' | string;
|
|
export class SDKSignerClient {
|
|
constructor(options: ClientConfig);
|
|
connect(): Promise<void>;
|
|
disconnect(): Promise<void>;
|
|
on(event: SignerEvent, handler: (...args: any[]) => void): void;
|
|
// Méthodes référencées par le code (stubs typing)
|
|
getUserProcessByIdnot(idnot: string): Promise<any>;
|
|
getOfficeProcessByIdnot(idnot: string): Promise<any>;
|
|
getPairingId(...args: any[]): Promise<any>;
|
|
createProcess(...args: any[]): Promise<any>;
|
|
getOwnedProcesses(...args: any[]): Promise<any>;
|
|
validateState(...args: any[]): Promise<any>;
|
|
updateProcess(...args: any[]): Promise<any>;
|
|
notifyUpdate(...args: any[]): Promise<any>;
|
|
getPhoneNumberForEmail(email: string): Promise<any>;
|
|
}
|
|
export class SignerClient {
|
|
constructor(options: SignerClientOptions);
|
|
connect(): Promise<void>;
|
|
disconnect(): Promise<void>;
|
|
}
|
|
}
|