import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; import { PatchSubscriptionOrganizationModel } from '../model/patchSubscription'; import { PostSubscriptionOrganizationModel } from '../model/postSubscription'; import { SubscriptionListOrganizationModel } from '../model/subscriptionList'; import { SubscriptionOrganizationModel } from '../model/subscription'; import { Configuration } from '../configuration'; import * as i0 from "@angular/core"; export declare class SubscriptionsService { protected httpClient: HttpClient; protected basePath: string; defaultHeaders: HttpHeaders; configuration: Configuration; encoder: HttpParameterCodec; constructor(httpClient: HttpClient, basePath: string, configuration: Configuration); private addToHttpParams; private addToHttpParamsRecursive; /** * Create Subscription * Creates a Subscription. ## Subscription creation Subscriptions can be created for webhook endpoints. ## State | State | Description | |-------|-------------| | storing | The Platform is storing the subscription details in our private store | | completed | The Platform has created the subscription | | failed | The Platform was not able to successfully create the subscription | Required scope: **subscriptions:execute** * @param postSubscriptionOrganizationModel * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; createSubscription(postSubscriptionOrganizationModel: PostSubscriptionOrganizationModel, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Delete Subscription * Schedules a subscription for deletion. The subscription is not removed immediately: it keeps delivering events until `scheduled_deletion_at`, which is returned on the subscription and is 24 hours after the request by default. A `subscription.deleting` event is published when the deletion is requested and a `subscription.deleted` event when it takes effect. Repeating the request does not move the deadline, and the subscription cannot be modified once a deletion is pending. A subscription with `protection_enabled` set cannot be deleted. Required scope: **subscriptions:execute** * @param subscriptionGuid Identifier for the subscription. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ deleteSubscription(subscriptionGuid: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; deleteSubscription(subscriptionGuid: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; deleteSubscription(subscriptionGuid: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get Subscription * Retrieves a subscription. Required scope: **subscriptions:read** * @param subscriptionGuid Identifier for the subscription. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ getSubscription(subscriptionGuid: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; getSubscription(subscriptionGuid: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; getSubscription(subscriptionGuid: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get subscriptions list * Retrieves a listing of subscriptions. Required scope: **subscriptions:read** * @param page The page index to retrieve. * @param perPage The number of entities per page to return. * @param guid Comma separated subscription_guids to list subscriptions for. * @param environment Environment to list subscriptions for. * @param state State to list subscriptions for. * @param type Comma separated types to list subscriptions for. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, type?: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, type?: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; listSubscriptions(page?: string, perPage?: string, guid?: string, environment?: string, state?: string, type?: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Patch subscription * Update a subscription. Required scope: **subscriptions:write** * @param subscriptionGuid Identifier for the subscription. * @param patchSubscriptionOrganizationModel * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ updateSubscription(subscriptionGuid: string, patchSubscriptionOrganizationModel: PatchSubscriptionOrganizationModel, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; updateSubscription(subscriptionGuid: string, patchSubscriptionOrganizationModel: PatchSubscriptionOrganizationModel, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; updateSubscription(subscriptionGuid: string, patchSubscriptionOrganizationModel: PatchSubscriptionOrganizationModel, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }