cloudflare
Version:
The official TypeScript library for the Cloudflare API
92 lines • 3.38 kB
TypeScript
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as UserSubscriptionsAPI from 'cloudflare/resources/user/subscriptions';
import { SubscriptionsSinglePage } from 'cloudflare/resources/user/subscriptions';
export declare class Subscriptions extends APIResource {
/**
* Create a zone subscription, either plan or add-ons.
*/
create(identifier: string, body: SubscriptionCreateParams, options?: Core.RequestOptions): Core.APIPromise<SubscriptionCreateResponse>;
/**
* Updates an account subscription.
*/
update(accountIdentifier: string, subscriptionIdentifier: string, body: SubscriptionUpdateParams, options?: Core.RequestOptions): Core.APIPromise<SubscriptionUpdateResponse>;
/**
* Lists all of an account's subscriptions.
*/
list(accountIdentifier: string, options?: Core.RequestOptions): Core.PagePromise<SubscriptionsSinglePage, UserSubscriptionsAPI.Subscription>;
/**
* Deletes an account's subscription.
*/
delete(accountIdentifier: string, subscriptionIdentifier: string, body: SubscriptionDeleteParams, options?: Core.RequestOptions): Core.APIPromise<SubscriptionDeleteResponse>;
/**
* Lists zone subscription details.
*/
get(identifier: string, options?: Core.RequestOptions): Core.APIPromise<SubscriptionGetResponse>;
}
export type SubscriptionCreateResponse = unknown | string | null;
export type SubscriptionUpdateResponse = unknown | string | null;
export interface SubscriptionDeleteResponse {
/**
* Subscription identifier tag.
*/
subscription_id?: string;
}
export type SubscriptionGetResponse = unknown | string | null;
export interface SubscriptionCreateParams {
app?: SubscriptionCreateParams.App;
/**
* The list of add-ons subscribed to.
*/
component_values?: Array<UserSubscriptionsAPI.SubscriptionComponent>;
/**
* How often the subscription is renewed automatically.
*/
frequency?: 'weekly' | 'monthly' | 'quarterly' | 'yearly';
/**
* The rate plan applied to the subscription.
*/
rate_plan?: UserSubscriptionsAPI.RatePlan;
/**
* A simple zone object. May have null properties if not a zone subscription.
*/
zone?: UserSubscriptionsAPI.SubscriptionZone;
}
export declare namespace SubscriptionCreateParams {
interface App {
/**
* app install id.
*/
install_id?: string;
}
}
export interface SubscriptionUpdateParams {
app?: SubscriptionUpdateParams.App;
/**
* The list of add-ons subscribed to.
*/
component_values?: Array<UserSubscriptionsAPI.SubscriptionComponent>;
/**
* How often the subscription is renewed automatically.
*/
frequency?: 'weekly' | 'monthly' | 'quarterly' | 'yearly';
/**
* The rate plan applied to the subscription.
*/
rate_plan?: UserSubscriptionsAPI.RatePlan;
/**
* A simple zone object. May have null properties if not a zone subscription.
*/
zone?: UserSubscriptionsAPI.SubscriptionZone;
}
export declare namespace SubscriptionUpdateParams {
interface App {
/**
* app install id.
*/
install_id?: string;
}
}
export type SubscriptionDeleteParams = unknown;
export { SubscriptionsSinglePage };
//# sourceMappingURL=subscriptions.d.ts.map