wk-nmi
Version:
This is a simple utility package
65 lines (64 loc) • 2 kB
TypeScript
import type { SubDayRequest, SubscriptionResult, SubMonthRequest, MonthCustomSubscriptionInfo, DayCustomSubscriptionInfo } from "../types/subscriptions";
import { BadResponse, ErrorDetail } from "../types/erros";
export declare class Subs {
url: string;
org: string;
apikey: string;
constructor(url: string, org: string, apikey: string);
withDayConfig(sub: SubDayRequest): Promise<BadResponse | ErrorDetail | SubscriptionResult>;
withMonthConfig(sub: SubMonthRequest): Promise<BadResponse | ErrorDetail | SubscriptionResult>;
pause(subscriptionId: string, pause: boolean): Promise<{
response: null;
status: number;
message: string;
} | {
response: any;
status: number;
message?: undefined;
}>;
cancel(subscriptionId: string): Promise<{
response: null;
status: number;
message: string;
} | {
response: any;
status: number;
message?: undefined;
}>;
id(subscription_id: string): Promise<{
response: null;
status: number;
message: string;
} | {
response: any;
status: number;
message?: undefined;
}>;
all(userId: string): Promise<{
response: null;
status: number;
message: string;
} | {
response: any;
status: number;
message?: undefined;
}>;
update_month_subscription(subscription_id: string, customer_vault_id: string, month_config: MonthCustomSubscriptionInfo): Promise<{
response: null;
status: number;
message: string;
} | {
response: any;
status: number;
message?: undefined;
}>;
update_day_subscription(subscription_id: string, customer_vault_id: string, day_config: DayCustomSubscriptionInfo): Promise<{
response: null;
status: number;
message: string;
} | {
response: any;
status: number;
message?: undefined;
}>;
}