// This is Generated Source. import CreateSubscriptionRequest from "../definitions/CreateSubscriptionRequest"; import ModifySubscriptionRequest from "../definitions/ModifySubscriptionRequest"; import RecordsCollectionResourceSubscriptionResponse from "../definitions/RecordsCollectionResourceSubscriptionResponse"; import SubscriptionInfo from "../definitions/SubscriptionInfo"; import PathSegment from "../PathSegment"; import Renew from "./Renew"; export default class Subscription extends PathSegment { constructor(prv: PathSegment, id?: string, service?) { super("subscription", id, prv, service); } /** * */ renew(id?: string) { return new Renew(this, id); } /** * */ list(): Promise { return this._send({ body: undefined, ignoreId: false, method: "get", query: undefined, }).then((res) => { return res.json(); }); } /** * * return {ApiResponse} */ listRaw(): Promise { return this._send({ body: undefined, ignoreId: false, method: "get", query: undefined, }); } /** *

Since 1.0.6 (Release 5.15)

Creates a new subscription.

Usage Plan Group

Medium

*/ post(body: CreateSubscriptionRequest): Promise { return this._send({ body: body, ignoreId: true, method: "post", query: undefined, }).then((res) => { return res.json(); }); } /** *

Since 1.0.6 (Release 5.15)

Creates a new subscription.

Usage Plan Group

Medium

* return {ApiResponse} */ postRaw(body: CreateSubscriptionRequest): Promise { return this._send({ body: body, ignoreId: true, method: "post", query: undefined, }); } /** *

Since 1.0.6 (Release 5.15)

Returns the requested subscription.

Usage Plan Group

Light

*/ get(): Promise { return this._send({ body: undefined, ignoreId: true, method: "get", query: undefined, }).then((res) => { return res.json(); }); } /** *

Since 1.0.6 (Release 5.15)

Returns the requested subscription.

Usage Plan Group

Light

* return {ApiResponse} */ getRaw(): Promise { return this._send({ body: undefined, ignoreId: true, method: "get", query: undefined, }); } /** *

Since 1.0.6 (Release 5.15)

Renews the existent subscription if the request body is empty. If event filters are specified, calling this method modifies the event filters for the existing subscription. The client application can extend or narrow the events for which it receives notifications in the frame of one subscription.

Usage Plan Group

Medium

*/ put(body: ModifySubscriptionRequest, query?: PutQuery): Promise { return this._send({ body: body, ignoreId: true, method: "put", query: query, }).then((res) => { return res.json(); }); } /** *

Since 1.0.6 (Release 5.15)

Renews the existent subscription if the request body is empty. If event filters are specified, calling this method modifies the event filters for the existing subscription. The client application can extend or narrow the events for which it receives notifications in the frame of one subscription.

Usage Plan Group

Medium

* return {ApiResponse} */ putRaw(body: ModifySubscriptionRequest, query?: PutQuery): Promise { return this._send({ body: body, ignoreId: true, method: "put", query: query, }); } /** *

Cancels the existent subscription.

Usage Plan Group

Medium

*/ delete(): Promise { return this._send({ body: undefined, ignoreId: true, method: "delete", query: undefined, }); } /** *

Cancels the existent subscription.

Usage Plan Group

Medium

* return {ApiResponse} */ deleteRaw(): Promise { return this._send({ body: undefined, ignoreId: true, method: "delete", query: undefined, }); } } export interface PutQuery { /** * If 'True' then aggregated presence status is returned in a notification payload */ aggregated?: boolean; }