UNPKG

abowire

Version:

This is the official **Abowire Javascript SDK**, which makes it easy to connect to the Abowire **GraphQL API** and includes all the required dependencies you need.

338 lines (337 loc) 13.8 kB
import { CreateLicenseUserInput, GetLicenseUserQueryVariables, ListLicenseUsersQueryVariables, UpdateLicenseUserInput } from '../../gen/graphql'; import { AbowireGraphQLClient } from '../../graphql/graphql-client'; export declare class LicenseUserApi { private graphQL; constructor(graphQL: AbowireGraphQLClient); create(input: CreateLicenseUserInput): Promise<{ __typename?: "LicenseUser" | undefined; id: string; name: string; metadata?: any; createdAt?: any; updatedAt?: any; customer: { __typename?: "Customer" | undefined; id: string; name: string; }; licenses: { __typename?: "LicenseList" | undefined; count: number; total: number; cursor?: string | null | undefined; items: { __typename?: "License" | undefined; id: string; status: import("../../gen/graphql").LicenseStatus; code?: string | null | undefined; activations?: number | null | undefined; activationsLeft?: number | null | undefined; expirationDate?: any; units?: string[] | null | undefined; metadata?: any; createdAt?: any; updatedAt?: any; subscription: { __typename?: "Subscription" | undefined; id: string; customer: { __typename?: "Customer" | undefined; id: string; name: string; }; product: { __typename?: "Product" | undefined; name: string; pricing: { __typename?: "Pricing" | undefined; description?: string | null | undefined; type: import("../../gen/graphql").PricingType; price?: number | null | undefined; unit?: string | null | undefined; strategy: import("../../gen/graphql").PricingStrategy; chargeOnce?: boolean | null | undefined; tiers: { __typename?: "PricingTier" | undefined; from: number; to?: number | null | undefined; price: number; }[]; }[]; }; }; licenseUser?: { __typename?: "LicenseUser" | undefined; id: string; name: string; } | null | undefined; }[]; }; }>; update(id: string, input: UpdateLicenseUserInput): Promise<{ __typename?: "LicenseUser" | undefined; id: string; name: string; metadata?: any; createdAt?: any; updatedAt?: any; customer: { __typename?: "Customer" | undefined; id: string; name: string; }; licenses: { __typename?: "LicenseList" | undefined; count: number; total: number; cursor?: string | null | undefined; items: { __typename?: "License" | undefined; id: string; status: import("../../gen/graphql").LicenseStatus; code?: string | null | undefined; activations?: number | null | undefined; activationsLeft?: number | null | undefined; expirationDate?: any; units?: string[] | null | undefined; metadata?: any; createdAt?: any; updatedAt?: any; subscription: { __typename?: "Subscription" | undefined; id: string; customer: { __typename?: "Customer" | undefined; id: string; name: string; }; product: { __typename?: "Product" | undefined; name: string; pricing: { __typename?: "Pricing" | undefined; description?: string | null | undefined; type: import("../../gen/graphql").PricingType; price?: number | null | undefined; unit?: string | null | undefined; strategy: import("../../gen/graphql").PricingStrategy; chargeOnce?: boolean | null | undefined; tiers: { __typename?: "PricingTier" | undefined; from: number; to?: number | null | undefined; price: number; }[]; }[]; }; }; licenseUser?: { __typename?: "LicenseUser" | undefined; id: string; name: string; } | null | undefined; }[]; }; }>; remove(id: string): Promise<{ __typename?: "LicenseUser" | undefined; id: string; name: string; metadata?: any; createdAt?: any; updatedAt?: any; customer: { __typename?: "Customer" | undefined; id: string; name: string; }; licenses: { __typename?: "LicenseList" | undefined; count: number; total: number; cursor?: string | null | undefined; items: { __typename?: "License" | undefined; id: string; status: import("../../gen/graphql").LicenseStatus; code?: string | null | undefined; activations?: number | null | undefined; activationsLeft?: number | null | undefined; expirationDate?: any; units?: string[] | null | undefined; metadata?: any; createdAt?: any; updatedAt?: any; subscription: { __typename?: "Subscription" | undefined; id: string; customer: { __typename?: "Customer" | undefined; id: string; name: string; }; product: { __typename?: "Product" | undefined; name: string; pricing: { __typename?: "Pricing" | undefined; description?: string | null | undefined; type: import("../../gen/graphql").PricingType; price?: number | null | undefined; unit?: string | null | undefined; strategy: import("../../gen/graphql").PricingStrategy; chargeOnce?: boolean | null | undefined; tiers: { __typename?: "PricingTier" | undefined; from: number; to?: number | null | undefined; price: number; }[]; }[]; }; }; licenseUser?: { __typename?: "LicenseUser" | undefined; id: string; name: string; } | null | undefined; }[]; }; }>; get(id: string, input?: Partial<GetLicenseUserQueryVariables>): Promise<{ __typename?: "LicenseUser" | undefined; id: string; name: string; metadata?: any; createdAt?: any; updatedAt?: any; customer: { __typename?: "Customer" | undefined; id: string; name: string; }; licenses: { __typename?: "LicenseList" | undefined; count: number; total: number; cursor?: string | null | undefined; items: { __typename?: "License" | undefined; id: string; status: import("../../gen/graphql").LicenseStatus; code?: string | null | undefined; activations?: number | null | undefined; activationsLeft?: number | null | undefined; expirationDate?: any; units?: string[] | null | undefined; metadata?: any; createdAt?: any; updatedAt?: any; subscription: { __typename?: "Subscription" | undefined; id: string; customer: { __typename?: "Customer" | undefined; id: string; name: string; }; product: { __typename?: "Product" | undefined; name: string; pricing: { __typename?: "Pricing" | undefined; description?: string | null | undefined; type: import("../../gen/graphql").PricingType; price?: number | null | undefined; unit?: string | null | undefined; strategy: import("../../gen/graphql").PricingStrategy; chargeOnce?: boolean | null | undefined; tiers: { __typename?: "PricingTier" | undefined; from: number; to?: number | null | undefined; price: number; }[]; }[]; }; }; licenseUser?: { __typename?: "LicenseUser" | undefined; id: string; name: string; } | null | undefined; }[]; }; }>; list(input?: Partial<ListLicenseUsersQueryVariables>): Promise<{ __typename?: "LicenseUserList" | undefined; count: number; total: number; cursor?: string | null | undefined; items: { __typename?: "LicenseUser" | undefined; id: string; name: string; metadata?: any; createdAt?: any; updatedAt?: any; customer: { __typename?: "Customer" | undefined; id: string; name: string; }; licenses: { __typename?: "LicenseList" | undefined; count: number; total: number; cursor?: string | null | undefined; items: { __typename?: "License" | undefined; id: string; status: import("../../gen/graphql").LicenseStatus; code?: string | null | undefined; activations?: number | null | undefined; activationsLeft?: number | null | undefined; expirationDate?: any; units?: string[] | null | undefined; metadata?: any; createdAt?: any; updatedAt?: any; subscription: { __typename?: "Subscription" | undefined; id: string; customer: { __typename?: "Customer" | undefined; id: string; name: string; }; product: { __typename?: "Product" | undefined; name: string; pricing: { __typename?: "Pricing" | undefined; description?: string | null | undefined; type: import("../../gen/graphql").PricingType; price?: number | null | undefined; unit?: string | null | undefined; strategy: import("../../gen/graphql").PricingStrategy; chargeOnce?: boolean | null | undefined; tiers: { __typename?: "PricingTier" | undefined; from: number; to?: number | null | undefined; price: number; }[]; }[]; }; }; licenseUser?: { __typename?: "LicenseUser" | undefined; id: string; name: string; } | null | undefined; }[]; }; }[]; }>; }