import { Service } from './Service'; import { DeleteRuleParams, GetGrantsParams, GetRuleHistoryParams, GetRulesParams, GetUsageParams, GrantCreditDc, GrantDc, LimitKindDc, PagedListRuleChangeDc, RevokeGrantParams, RuleDc, SetKindActiveParams, UpsertRuleDc, UsageDc } from './data-contracts'; /** * @title Spatial Processing Gateway API * @version 1.5.1.0 * @baseUrl /sp */ export declare class QuotasService extends Service { /** * No description * * @tags Quotas * @name GetKinds * @operationId QuotasController_GetKinds * @summary Every limit kind. * @request GET:/quotas/kinds * @secure * @response `200` OK */ getKinds(): Promise; /** * No description * * @tags Quotas * @name GetKind * @operationId QuotasController_GetKind * @summary One limit kind. * @request GET:/quotas/kinds/{code} * @secure * @response `200` OK */ getKind(code: string): Promise; /** * No description * * @tags Quotas * @name DeleteKind * @operationId QuotasController_DeleteKind * @summary Deletes a kind nobody declared within the grace period and nobody consumed; otherwise 409 with `KIND_IN_USE`. * @request DELETE:/quotas/kinds/{code} * @secure * @response `200` OK */ deleteKind(code: string): Promise; /** * No description * * @tags Quotas * @name SetKindActive * @operationId QuotasController_SetKindActive * @summary Switches enforcement of a kind on or off: the way to retire a kind. * @request PUT:/quotas/kinds/{code}/active * @secure * @response `200` OK */ setKindActive({ code, ...query }: SetKindActiveParams): Promise; /** * No description * * @tags Quotas * @name GetRules * @operationId QuotasController_GetRules * @summary Rules matching the filter. * @request GET:/quotas/rules * @secure * @response `200` OK */ getRules(query: GetRulesParams): Promise; /** * No description * * @tags Quotas * @name UpsertRule * @operationId QuotasController_UpsertRule * @summary Writes a rule, replacing whatever stands at the same kind, subject and qualifier. Repeating the same plan changes nothing. * @request PUT:/quotas/rules * @secure * @response `200` OK */ upsertRule(data: UpsertRuleDc): Promise; /** * No description * * @tags Quotas * @name DeleteRule * @operationId QuotasController_DeleteRule * @summary Deletes a rule. * @request DELETE:/quotas/rules * @secure * @response `200` OK */ deleteRule(query: DeleteRuleParams): Promise; /** * No description * * @tags Quotas * @name GetRuleHistory * @operationId QuotasController_GetRuleHistory * @summary Changes of the rules matching the filter, newest first. * @request GET:/quotas/rules/history * @secure * @response `200` OK */ getRuleHistory(query: GetRuleHistoryParams): Promise; /** * No description * * @tags Quotas * @name GetGrants * @operationId QuotasController_GetGrants * @summary Grants of credit matching the filter, newest first. * @request GET:/quotas/grants * @secure * @response `200` OK */ getGrants(query: GetGrantsParams): Promise; /** * No description * * @tags Quotas * @name GrantCredit * @operationId QuotasController_GrantCredit * @summary Grants credit on top of a rate plan, spent after the plan, the soonest to burn first. Granting again with the same key returns the first grant. * @request POST:/quotas/grants * @secure * @response `200` OK */ grantCredit(data: GrantCreditDc): Promise; /** * No description * * @tags Quotas * @name RevokeGrant * @operationId QuotasController_RevokeGrant * @summary Revokes a grant: what is left of it burns now, what it paid for stays paid. Revoking twice changes nothing. * @request POST:/quotas/grants/{id}/revoke * @secure * @response `200` OK */ revokeGrant({ id, ...query }: RevokeGrantParams): Promise; /** * No description * * @tags Quotas * @name GetUsage * @operationId QuotasController_GetUsage * @summary What a user has left: the plan in force for each kind, what is spent in the current window and the grants of credit on top of it. * @request GET:/quotas/usage * @secure * @response `200` OK */ getUsage(query: GetUsageParams): Promise; }