|
| 1 | +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 | + |
| 3 | +import { APIResource } from '../../resource'; |
| 4 | +import * as Core from '../../core'; |
| 5 | + |
| 6 | +export class Entitlements extends APIResource { |
| 7 | + /** |
| 8 | + * List of innate entitlements available for the Tenant. |
| 9 | + */ |
| 10 | + get(tenantId: string, options?: Core.RequestOptions): Core.APIPromise<TenantEntitlements> { |
| 11 | + return ( |
| 12 | + this._client.get(`/tenants/${tenantId}/entitlements`, options) as Core.APIPromise<{ |
| 13 | + result: TenantEntitlements; |
| 14 | + }> |
| 15 | + )._thenUnwrap((obj) => obj.result); |
| 16 | + } |
| 17 | +} |
| 18 | + |
| 19 | +export interface TenantEntitlements { |
| 20 | + allow_add_subdomain: TenantEntitlements.AllowAddSubdomain; |
| 21 | + |
| 22 | + allow_auto_accept_invites: TenantEntitlements.AllowAutoAcceptInvites; |
| 23 | + |
| 24 | + cname_setup_allowed: TenantEntitlements.CNAMESetupAllowed; |
| 25 | + |
| 26 | + custom_entitlements: Array<TenantEntitlements.CustomEntitlement> | null; |
| 27 | + |
| 28 | + mhs_certificate_count: TenantEntitlements.MhsCertificateCount; |
| 29 | + |
| 30 | + partial_setup_allowed: TenantEntitlements.PartialSetupAllowed; |
| 31 | +} |
| 32 | + |
| 33 | +export namespace TenantEntitlements { |
| 34 | + export interface AllowAddSubdomain { |
| 35 | + type: 'bool'; |
| 36 | + |
| 37 | + value: boolean; |
| 38 | + } |
| 39 | + |
| 40 | + export interface AllowAutoAcceptInvites { |
| 41 | + type: 'bool'; |
| 42 | + |
| 43 | + value: boolean; |
| 44 | + } |
| 45 | + |
| 46 | + export interface CNAMESetupAllowed { |
| 47 | + type: 'bool'; |
| 48 | + |
| 49 | + value: boolean; |
| 50 | + } |
| 51 | + |
| 52 | + export interface CustomEntitlement { |
| 53 | + allocation: |
| 54 | + | CustomEntitlement.OrganizationsAPIMaxCountAllocation |
| 55 | + | CustomEntitlement.OrganizationsAPIBoolAllocation |
| 56 | + | CustomEntitlement.OrganizationsAPINullAllocation; |
| 57 | + |
| 58 | + feature: CustomEntitlement.Feature; |
| 59 | + } |
| 60 | + |
| 61 | + export namespace CustomEntitlement { |
| 62 | + export interface OrganizationsAPIMaxCountAllocation { |
| 63 | + type: 'max_count'; |
| 64 | + |
| 65 | + value: number; |
| 66 | + } |
| 67 | + |
| 68 | + export interface OrganizationsAPIBoolAllocation { |
| 69 | + type: 'bool'; |
| 70 | + |
| 71 | + value: boolean; |
| 72 | + } |
| 73 | + |
| 74 | + export interface OrganizationsAPINullAllocation { |
| 75 | + type: ''; |
| 76 | + |
| 77 | + value?: unknown; |
| 78 | + } |
| 79 | + |
| 80 | + export interface Feature { |
| 81 | + key: string; |
| 82 | + } |
| 83 | + } |
| 84 | + |
| 85 | + export interface MhsCertificateCount { |
| 86 | + type: 'max_count'; |
| 87 | + |
| 88 | + value: number; |
| 89 | + } |
| 90 | + |
| 91 | + export interface PartialSetupAllowed { |
| 92 | + type: 'bool'; |
| 93 | + |
| 94 | + value: boolean; |
| 95 | + } |
| 96 | +} |
| 97 | + |
| 98 | +export declare namespace Entitlements { |
| 99 | + export { type TenantEntitlements as TenantEntitlements }; |
| 100 | +} |
0 commit comments