Skip to content

Latest commit

 

History

History
7609 lines (5346 loc) · 87.6 KB

reference.md

File metadata and controls

7609 lines (5346 loc) · 87.6 KB

Reference

accounts

client.accounts.listApiKeys({ ...params }) -> Schematic.ListApiKeysResponse

🔌 Usage

await client.accounts.listApiKeys({
    requireEnvironment: true,
});

⚙️ Parameters

request: Schematic.ListApiKeysRequest

requestOptions: Accounts.RequestOptions

client.accounts.createApiKey({ ...params }) -> Schematic.CreateApiKeyResponse

🔌 Usage

await client.accounts.createApiKey({
    name: "name",
});

⚙️ Parameters

request: Schematic.CreateApiKeyRequestBody

requestOptions: Accounts.RequestOptions

client.accounts.getApiKey(apiKeyId) -> Schematic.GetApiKeyResponse

🔌 Usage

await client.accounts.getApiKey("api_key_id");

⚙️ Parameters

apiKeyId: string — api_key_id

requestOptions: Accounts.RequestOptions

client.accounts.updateApiKey(apiKeyId, { ...params }) -> Schematic.UpdateApiKeyResponse

🔌 Usage

await client.accounts.updateApiKey("api_key_id");

⚙️ Parameters

apiKeyId: string — api_key_id

request: Schematic.UpdateApiKeyRequestBody

requestOptions: Accounts.RequestOptions

client.accounts.deleteApiKey(apiKeyId) -> Schematic.DeleteApiKeyResponse

🔌 Usage

await client.accounts.deleteApiKey("api_key_id");

⚙️ Parameters

apiKeyId: string — api_key_id

requestOptions: Accounts.RequestOptions

client.accounts.countApiKeys({ ...params }) -> Schematic.CountApiKeysResponse

🔌 Usage

await client.accounts.countApiKeys({
    requireEnvironment: true,
});

⚙️ Parameters

request: Schematic.CountApiKeysRequest

requestOptions: Accounts.RequestOptions

client.accounts.listApiRequests({ ...params }) -> Schematic.ListApiRequestsResponse

🔌 Usage

await client.accounts.listApiRequests();

⚙️ Parameters

request: Schematic.ListApiRequestsRequest

requestOptions: Accounts.RequestOptions

client.accounts.getApiRequest(apiRequestId) -> Schematic.GetApiRequestResponse

🔌 Usage

await client.accounts.getApiRequest("api_request_id");

⚙️ Parameters

apiRequestId: string — api_request_id

requestOptions: Accounts.RequestOptions

client.accounts.countApiRequests({ ...params }) -> Schematic.CountApiRequestsResponse

🔌 Usage

await client.accounts.countApiRequests();

⚙️ Parameters

request: Schematic.CountApiRequestsRequest

requestOptions: Accounts.RequestOptions

client.accounts.listEnvironments({ ...params }) -> Schematic.ListEnvironmentsResponse

🔌 Usage

await client.accounts.listEnvironments();

⚙️ Parameters

request: Schematic.ListEnvironmentsRequest

requestOptions: Accounts.RequestOptions

client.accounts.createEnvironment({ ...params }) -> Schematic.CreateEnvironmentResponse

🔌 Usage

await client.accounts.createEnvironment({
    environmentType: "development",
    name: "name",
});

⚙️ Parameters

request: Schematic.CreateEnvironmentRequestBody

requestOptions: Accounts.RequestOptions

client.accounts.getEnvironment(environmentId) -> Schematic.GetEnvironmentResponse

🔌 Usage

await client.accounts.getEnvironment("environment_id");

⚙️ Parameters

environmentId: string — environment_id

requestOptions: Accounts.RequestOptions

client.accounts.updateEnvironment(environmentId, { ...params }) -> Schematic.UpdateEnvironmentResponse

🔌 Usage

await client.accounts.updateEnvironment("environment_id");

⚙️ Parameters

environmentId: string — environment_id

request: Schematic.UpdateEnvironmentRequestBody

requestOptions: Accounts.RequestOptions

client.accounts.deleteEnvironment(environmentId) -> Schematic.DeleteEnvironmentResponse

🔌 Usage

await client.accounts.deleteEnvironment("environment_id");

⚙️ Parameters

environmentId: string — environment_id

requestOptions: Accounts.RequestOptions

features

client.features.countAudienceCompanies({ ...params }) -> Schematic.CountAudienceCompaniesResponse

🔌 Usage

await client.features.countAudienceCompanies({
    conditionGroups: [
        {
            conditions: [
                {
                    conditionType: "company",
                    operator: "eq",
                    resourceIds: ["resource_ids"],
                },
            ],
        },
    ],
    conditions: [
        {
            conditionType: "company",
            operator: "eq",
            resourceIds: ["resource_ids"],
        },
    ],
});

⚙️ Parameters

request: Schematic.AudienceRequestBody

requestOptions: Features.RequestOptions

client.features.countAudienceUsers({ ...params }) -> Schematic.CountAudienceUsersResponse

🔌 Usage

await client.features.countAudienceUsers({
    conditionGroups: [
        {
            conditions: [
                {
                    conditionType: "company",
                    operator: "eq",
                    resourceIds: ["resource_ids"],
                },
            ],
        },
    ],
    conditions: [
        {
            conditionType: "company",
            operator: "eq",
            resourceIds: ["resource_ids"],
        },
    ],
});

⚙️ Parameters

request: Schematic.AudienceRequestBody

requestOptions: Features.RequestOptions

client.features.listAudienceCompanies({ ...params }) -> Schematic.ListAudienceCompaniesResponse

🔌 Usage

await client.features.listAudienceCompanies({
    conditionGroups: [
        {
            conditions: [
                {
                    conditionType: "company",
                    operator: "eq",
                    resourceIds: ["resource_ids"],
                },
            ],
        },
    ],
    conditions: [
        {
            conditionType: "company",
            operator: "eq",
            resourceIds: ["resource_ids"],
        },
    ],
});

⚙️ Parameters

request: Schematic.AudienceRequestBody

requestOptions: Features.RequestOptions

client.features.listAudienceUsers({ ...params }) -> Schematic.ListAudienceUsersResponse

🔌 Usage

await client.features.listAudienceUsers({
    conditionGroups: [
        {
            conditions: [
                {
                    conditionType: "company",
                    operator: "eq",
                    resourceIds: ["resource_ids"],
                },
            ],
        },
    ],
    conditions: [
        {
            conditionType: "company",
            operator: "eq",
            resourceIds: ["resource_ids"],
        },
    ],
});

⚙️ Parameters

request: Schematic.AudienceRequestBody

requestOptions: Features.RequestOptions

client.features.listFeatures({ ...params }) -> Schematic.ListFeaturesResponse

🔌 Usage

await client.features.listFeatures();

⚙️ Parameters

request: Schematic.ListFeaturesRequest

requestOptions: Features.RequestOptions

client.features.createFeature({ ...params }) -> Schematic.CreateFeatureResponse

🔌 Usage

await client.features.createFeature({
    description: "description",
    featureType: "boolean",
    name: "name",
});

⚙️ Parameters

request: Schematic.CreateFeatureRequestBody

requestOptions: Features.RequestOptions

client.features.getFeature(featureId) -> Schematic.GetFeatureResponse

🔌 Usage

await client.features.getFeature("feature_id");

⚙️ Parameters

featureId: string — feature_id

requestOptions: Features.RequestOptions

client.features.updateFeature(featureId, { ...params }) -> Schematic.UpdateFeatureResponse

🔌 Usage

await client.features.updateFeature("feature_id");

⚙️ Parameters

featureId: string — feature_id

request: Schematic.UpdateFeatureRequestBody

requestOptions: Features.RequestOptions

client.features.deleteFeature(featureId) -> Schematic.DeleteFeatureResponse

🔌 Usage

await client.features.deleteFeature("feature_id");

⚙️ Parameters

featureId: string — feature_id

requestOptions: Features.RequestOptions

client.features.countFeatures({ ...params }) -> Schematic.CountFeaturesResponse

🔌 Usage

await client.features.countFeatures();

⚙️ Parameters

request: Schematic.CountFeaturesRequest

requestOptions: Features.RequestOptions

client.features.listFlags({ ...params }) -> Schematic.ListFlagsResponse

🔌 Usage

await client.features.listFlags();

⚙️ Parameters

request: Schematic.ListFlagsRequest

requestOptions: Features.RequestOptions

client.features.createFlag({ ...params }) -> Schematic.CreateFlagResponse

🔌 Usage

await client.features.createFlag({
    defaultValue: true,
    description: "description",
    flagType: "flag_type",
    key: "key",
    name: "name",
});

⚙️ Parameters

request: Schematic.CreateFlagRequestBody

requestOptions: Features.RequestOptions

client.features.getFlag(flagId) -> Schematic.GetFlagResponse

🔌 Usage

await client.features.getFlag("flag_id");

⚙️ Parameters

flagId: string — flag_id

requestOptions: Features.RequestOptions

client.features.updateFlag(flagId, { ...params }) -> Schematic.UpdateFlagResponse

🔌 Usage

await client.features.updateFlag("flag_id", {
    defaultValue: true,
    description: "description",
    flagType: "flag_type",
    key: "key",
    name: "name",
});

⚙️ Parameters

flagId: string — flag_id

request: Schematic.CreateFlagRequestBody

requestOptions: Features.RequestOptions

client.features.deleteFlag(flagId) -> Schematic.DeleteFlagResponse

🔌 Usage

await client.features.deleteFlag("flag_id");

⚙️ Parameters

flagId: string — flag_id

requestOptions: Features.RequestOptions

client.features.updateFlagRules(flagId, { ...params }) -> Schematic.UpdateFlagRulesResponse

🔌 Usage

await client.features.updateFlagRules("flag_id", {
    rules: [
        {
            conditionGroups: [
                {
                    conditions: [
                        {
                            conditionType: "company",
                            operator: "eq",
                            resourceIds: ["resource_ids"],
                        },
                    ],
                },
            ],
            conditions: [
                {
                    conditionType: "company",
                    operator: "eq",
                    resourceIds: ["resource_ids"],
                },
            ],
            name: "name",
            priority: 1,
            value: true,
        },
    ],
});

⚙️ Parameters

flagId: string — flag_id

request: Schematic.UpdateFlagRulesRequestBody

requestOptions: Features.RequestOptions

client.features.checkFlag(key, { ...params }) -> Schematic.CheckFlagResponse

🔌 Usage

await client.features.checkFlag("key", {});

⚙️ Parameters

key: string — key

request: Schematic.CheckFlagRequestBody

requestOptions: Features.RequestOptions

client.features.checkFlags({ ...params }) -> Schematic.CheckFlagsResponse

🔌 Usage

await client.features.checkFlags({});

⚙️ Parameters

request: Schematic.CheckFlagRequestBody

requestOptions: Features.RequestOptions

client.features.countFlags({ ...params }) -> Schematic.CountFlagsResponse

🔌 Usage

await client.features.countFlags();

⚙️ Parameters

request: Schematic.CountFlagsRequest

requestOptions: Features.RequestOptions

billing

client.billing.upsertBillingCoupon({ ...params }) -> Schematic.UpsertBillingCouponResponse

🔌 Usage

await client.billing.upsertBillingCoupon({
    amountOff: 1,
    duration: "duration",
    durationInMonths: 1,
    externalId: "external_id",
    maxRedemptions: 1,
    name: "name",
    percentOff: 1.1,
    timesRedeemed: 1,
});

⚙️ Parameters

request: Schematic.CreateCouponRequestBody

requestOptions: Billing.RequestOptions

client.billing.upsertBillingCustomer({ ...params }) -> Schematic.UpsertBillingCustomerResponse

🔌 Usage

await client.billing.upsertBillingCustomer({
    email: "email",
    externalId: "external_id",
    failedToImport: true,
    meta: {
        key: "value",
    },
    name: "name",
});

⚙️ Parameters

request: Schematic.CreateBillingCustomerRequestBody

requestOptions: Billing.RequestOptions

client.billing.listCustomers({ ...params }) -> Schematic.ListCustomersResponse

🔌 Usage

await client.billing.listCustomers();

⚙️ Parameters

request: Schematic.ListCustomersRequest

requestOptions: Billing.RequestOptions

client.billing.countCustomers({ ...params }) -> Schematic.CountCustomersResponse

🔌 Usage

await client.billing.countCustomers();

⚙️ Parameters

request: Schematic.CountCustomersRequest

requestOptions: Billing.RequestOptions

client.billing.listInvoices({ ...params }) -> Schematic.ListInvoicesResponse

🔌 Usage

await client.billing.listInvoices({
    customerExternalId: "customer_external_id",
});

⚙️ Parameters

request: Schematic.ListInvoicesRequest

requestOptions: Billing.RequestOptions

client.billing.upsertInvoice({ ...params }) -> Schematic.UpsertInvoiceResponse

🔌 Usage

await client.billing.upsertInvoice({
    amountDue: 1,
    amountPaid: 1,
    amountRemaining: 1,
    collectionMethod: "collection_method",
    currency: "currency",
    customerExternalId: "customer_external_id",
    subtotal: 1,
});

⚙️ Parameters

request: Schematic.CreateInvoiceRequestBody

requestOptions: Billing.RequestOptions

client.billing.listMeters({ ...params }) -> Schematic.ListMetersResponse

🔌 Usage

await client.billing.listMeters();

⚙️ Parameters

request: Schematic.ListMetersRequest

requestOptions: Billing.RequestOptions

client.billing.upsertBillingMeter({ ...params }) -> Schematic.UpsertBillingMeterResponse

🔌 Usage

await client.billing.upsertBillingMeter({
    displayName: "display_name",
    eventName: "event_name",
    eventPayloadKey: "event_payload_key",
    externalId: "external_id",
});

⚙️ Parameters

request: Schematic.CreateMeterRequestBody

requestOptions: Billing.RequestOptions

client.billing.listPaymentMethods({ ...params }) -> Schematic.ListPaymentMethodsResponse

🔌 Usage

await client.billing.listPaymentMethods({
    customerExternalId: "customer_external_id",
});

⚙️ Parameters

request: Schematic.ListPaymentMethodsRequest

requestOptions: Billing.RequestOptions

client.billing.upsertPaymentMethod({ ...params }) -> Schematic.UpsertPaymentMethodResponse

🔌 Usage

await client.billing.upsertPaymentMethod({
    customerExternalId: "customer_external_id",
    externalId: "external_id",
    paymentMethodType: "payment_method_type",
});

⚙️ Parameters

request: Schematic.CreatePaymentMethodRequestBody

requestOptions: Billing.RequestOptions

client.billing.searchBillingPrices({ ...params }) -> Schematic.SearchBillingPricesResponse

🔌 Usage

await client.billing.searchBillingPrices();

⚙️ Parameters

request: Schematic.SearchBillingPricesRequest

requestOptions: Billing.RequestOptions

client.billing.upsertBillingPrice({ ...params }) -> Schematic.UpsertBillingPriceResponse

🔌 Usage

await client.billing.upsertBillingPrice({
    currency: "currency",
    interval: "interval",
    isActive: true,
    price: 1,
    priceExternalId: "price_external_id",
    productExternalId: "product_external_id",
    usageType: "usage_type",
});

⚙️ Parameters

request: Schematic.CreateBillingPriceRequestBody

requestOptions: Billing.RequestOptions

client.billing.listProductPrices({ ...params }) -> Schematic.ListProductPricesResponse

🔌 Usage

await client.billing.listProductPrices();

⚙️ Parameters

request: Schematic.ListProductPricesRequest

requestOptions: Billing.RequestOptions

client.billing.deleteProductPrice(billingId) -> Schematic.DeleteProductPriceResponse

🔌 Usage

await client.billing.deleteProductPrice("billing_id");

⚙️ Parameters

billingId: string — billing_id

requestOptions: Billing.RequestOptions

client.billing.upsertBillingProduct({ ...params }) -> Schematic.UpsertBillingProductResponse

🔌 Usage

await client.billing.upsertBillingProduct({
    currency: "currency",
    externalId: "external_id",
    name: "name",
    price: 1.1,
    quantity: 1,
});

⚙️ Parameters

request: Schematic.CreateBillingProductRequestBody

requestOptions: Billing.RequestOptions

client.billing.listBillingProducts({ ...params }) -> Schematic.ListBillingProductsResponse

🔌 Usage

await client.billing.listBillingProducts();

⚙️ Parameters

request: Schematic.ListBillingProductsRequest

requestOptions: Billing.RequestOptions

client.billing.countBillingProducts({ ...params }) -> Schematic.CountBillingProductsResponse

🔌 Usage

await client.billing.countBillingProducts();

⚙️ Parameters

request: Schematic.CountBillingProductsRequest

requestOptions: Billing.RequestOptions

client.billing.upsertBillingSubscription({ ...params }) -> Schematic.UpsertBillingSubscriptionResponse

🔌 Usage

await client.billing.upsertBillingSubscription({
    currency: "currency",
    customerExternalId: "customer_external_id",
    discounts: [
        {
            couponExternalId: "coupon_external_id",
            externalId: "external_id",
            isActive: true,
            startedAt: "2024-01-15T09:30:00Z",
        },
    ],
    expiredAt: "2024-01-15T09:30:00Z",
    productExternalIds: [
        {
            currency: "currency",
            interval: "interval",
            price: 1,
            priceExternalId: "price_external_id",
            productExternalId: "product_external_id",
            quantity: 1,
            usageType: "usage_type",
        },
    ],
    subscriptionExternalId: "subscription_external_id",
    totalPrice: 1,
});

⚙️ Parameters

request: Schematic.CreateBillingSubscriptionsRequestBody

requestOptions: Billing.RequestOptions

checkout

client.checkout.internal({ ...params }) -> Schematic.CheckoutInternalResponse

🔌 Usage

await client.checkout.internal({
    addOnIds: [
        {
            addOnId: "add_on_id",
            priceId: "price_id",
        },
    ],
    companyId: "company_id",
    newPlanId: "new_plan_id",
    newPriceId: "new_price_id",
    payInAdvance: [
        {
            priceId: "price_id",
            quantity: 1,
        },
    ],
});

⚙️ Parameters

request: Schematic.ChangeSubscriptionInternalRequestBody

requestOptions: Checkout.RequestOptions

client.checkout.getCheckoutData(checkoutInternalId) -> Schematic.GetCheckoutDataResponse

🔌 Usage

await client.checkout.getCheckoutData("checkout_internal_id");

⚙️ Parameters

checkoutInternalId: string — checkout_internal_id

requestOptions: Checkout.RequestOptions

client.checkout.previewCheckoutInternal({ ...params }) -> Schematic.PreviewCheckoutInternalResponse

🔌 Usage

await client.checkout.previewCheckoutInternal({
    addOnIds: [
        {
            addOnId: "add_on_id",
            priceId: "price_id",
        },
    ],
    companyId: "company_id",
    newPlanId: "new_plan_id",
    newPriceId: "new_price_id",
    payInAdvance: [
        {
            priceId: "price_id",
            quantity: 1,
        },
    ],
});

⚙️ Parameters

request: Schematic.ChangeSubscriptionInternalRequestBody

requestOptions: Checkout.RequestOptions

client.checkout.updateCustomerSubscriptionTrialEnd(subscriptionId, { ...params }) -> Schematic.UpdateCustomerSubscriptionTrialEndResponse

🔌 Usage

await client.checkout.updateCustomerSubscriptionTrialEnd("subscription_id");

⚙️ Parameters

subscriptionId: string — subscription_id

request: Schematic.UpdateTrialEndRequestBody

requestOptions: Checkout.RequestOptions

companies

client.companies.listCompanies({ ...params }) -> Schematic.ListCompaniesResponse

🔌 Usage

await client.companies.listCompanies();

⚙️ Parameters

request: Schematic.ListCompaniesRequest

requestOptions: Companies.RequestOptions

client.companies.upsertCompany({ ...params }) -> Schematic.UpsertCompanyResponse

🔌 Usage

await client.companies.upsertCompany({
    keys: {
        key: "value",
    },
});

⚙️ Parameters

request: Schematic.UpsertCompanyRequestBody

requestOptions: Companies.RequestOptions

client.companies.getCompany(companyId) -> Schematic.GetCompanyResponse

🔌 Usage

await client.companies.getCompany("company_id");

⚙️ Parameters

companyId: string — company_id

requestOptions: Companies.RequestOptions

client.companies.deleteCompany(companyId) -> Schematic.DeleteCompanyResponse

🔌 Usage

await client.companies.deleteCompany("company_id");

⚙️ Parameters

companyId: string — company_id

requestOptions: Companies.RequestOptions

client.companies.countCompanies({ ...params }) -> Schematic.CountCompaniesResponse

🔌 Usage

await client.companies.countCompanies();

⚙️ Parameters

request: Schematic.CountCompaniesRequest

requestOptions: Companies.RequestOptions

client.companies.createCompany({ ...params }) -> Schematic.CreateCompanyResponse

🔌 Usage

await client.companies.createCompany({
    keys: {
        key: "value",
    },
});

⚙️ Parameters

request: Schematic.UpsertCompanyRequestBody

requestOptions: Companies.RequestOptions

client.companies.deleteCompanyByKeys({ ...params }) -> Schematic.DeleteCompanyByKeysResponse

🔌 Usage

await client.companies.deleteCompanyByKeys({
    keys: {
        key: "value",
    },
});

⚙️ Parameters

request: Schematic.KeysRequestBody

requestOptions: Companies.RequestOptions

client.companies.lookupCompany({ ...params }) -> Schematic.LookupCompanyResponse

🔌 Usage

await client.companies.lookupCompany({
    keys: {
        keys: {
            key: "value",
        },
    },
});

⚙️ Parameters

request: Schematic.LookupCompanyRequest

requestOptions: Companies.RequestOptions

client.companies.getActiveDeals({ ...params }) -> Schematic.GetActiveDealsResponse

🔌 Usage

await client.companies.getActiveDeals({
    companyId: "company_id",
    dealStage: "deal_stage",
});

⚙️ Parameters

request: Schematic.GetActiveDealsRequest

requestOptions: Companies.RequestOptions

client.companies.listCompanyMemberships({ ...params }) -> Schematic.ListCompanyMembershipsResponse

🔌 Usage

await client.companies.listCompanyMemberships();

⚙️ Parameters

request: Schematic.ListCompanyMembershipsRequest

requestOptions: Companies.RequestOptions

client.companies.getOrCreateCompanyMembership({ ...params }) -> Schematic.GetOrCreateCompanyMembershipResponse

🔌 Usage

await client.companies.getOrCreateCompanyMembership({
    companyId: "company_id",
    userId: "user_id",
});

⚙️ Parameters

request: Schematic.GetOrCreateCompanyMembershipRequestBody

requestOptions: Companies.RequestOptions

client.companies.deleteCompanyMembership(companyMembershipId) -> Schematic.DeleteCompanyMembershipResponse

🔌 Usage

await client.companies.deleteCompanyMembership("company_membership_id");

⚙️ Parameters

companyMembershipId: string — company_membership_id

requestOptions: Companies.RequestOptions

client.companies.getActiveCompanySubscription({ ...params }) -> Schematic.GetActiveCompanySubscriptionResponse

🔌 Usage

await client.companies.getActiveCompanySubscription();

⚙️ Parameters

request: Schematic.GetActiveCompanySubscriptionRequest

requestOptions: Companies.RequestOptions

client.companies.upsertCompanyTrait({ ...params }) -> Schematic.UpsertCompanyTraitResponse

🔌 Usage

await client.companies.upsertCompanyTrait({
    keys: {
        key: "value",
    },
    trait: "trait",
});

⚙️ Parameters

request: Schematic.UpsertTraitRequestBody

requestOptions: Companies.RequestOptions

client.companies.listEntityKeyDefinitions({ ...params }) -> Schematic.ListEntityKeyDefinitionsResponse

🔌 Usage

await client.companies.listEntityKeyDefinitions();

⚙️ Parameters

request: Schematic.ListEntityKeyDefinitionsRequest

requestOptions: Companies.RequestOptions

client.companies.countEntityKeyDefinitions({ ...params }) -> Schematic.CountEntityKeyDefinitionsResponse

🔌 Usage

await client.companies.countEntityKeyDefinitions();

⚙️ Parameters

request: Schematic.CountEntityKeyDefinitionsRequest

requestOptions: Companies.RequestOptions

client.companies.listEntityTraitDefinitions({ ...params }) -> Schematic.ListEntityTraitDefinitionsResponse

🔌 Usage

await client.companies.listEntityTraitDefinitions();

⚙️ Parameters

request: Schematic.ListEntityTraitDefinitionsRequest

requestOptions: Companies.RequestOptions

client.companies.getOrCreateEntityTraitDefinition({ ...params }) -> Schematic.GetOrCreateEntityTraitDefinitionResponse

🔌 Usage

await client.companies.getOrCreateEntityTraitDefinition({
    entityType: "company",
    hierarchy: ["hierarchy"],
    traitType: "boolean",
});

⚙️ Parameters

request: Schematic.CreateEntityTraitDefinitionRequestBody

requestOptions: Companies.RequestOptions

client.companies.getEntityTraitDefinition(entityTraitDefinitionId) -> Schematic.GetEntityTraitDefinitionResponse

🔌 Usage

await client.companies.getEntityTraitDefinition("entity_trait_definition_id");

⚙️ Parameters

entityTraitDefinitionId: string — entity_trait_definition_id

requestOptions: Companies.RequestOptions

client.companies.updateEntityTraitDefinition(entityTraitDefinitionId, { ...params }) -> Schematic.UpdateEntityTraitDefinitionResponse

🔌 Usage

await client.companies.updateEntityTraitDefinition("entity_trait_definition_id", {
    traitType: "boolean",
});

⚙️ Parameters

entityTraitDefinitionId: string — entity_trait_definition_id

request: Schematic.UpdateEntityTraitDefinitionRequestBody

requestOptions: Companies.RequestOptions

client.companies.countEntityTraitDefinitions({ ...params }) -> Schematic.CountEntityTraitDefinitionsResponse

🔌 Usage

await client.companies.countEntityTraitDefinitions();

⚙️ Parameters

request: Schematic.CountEntityTraitDefinitionsRequest

requestOptions: Companies.RequestOptions

client.companies.getEntityTraitValues({ ...params }) -> Schematic.GetEntityTraitValuesResponse

🔌 Usage

await client.companies.getEntityTraitValues({
    definitionId: "definition_id",
});

⚙️ Parameters

request: Schematic.GetEntityTraitValuesRequest

requestOptions: Companies.RequestOptions

client.companies.upsertUserTrait({ ...params }) -> Schematic.UpsertUserTraitResponse

🔌 Usage

await client.companies.upsertUserTrait({
    keys: {
        key: "value",
    },
    trait: "trait",
});

⚙️ Parameters

request: Schematic.UpsertTraitRequestBody

requestOptions: Companies.RequestOptions

client.companies.listUsers({ ...params }) -> Schematic.ListUsersResponse

🔌 Usage

await client.companies.listUsers();

⚙️ Parameters

request: Schematic.ListUsersRequest

requestOptions: Companies.RequestOptions

client.companies.upsertUser({ ...params }) -> Schematic.UpsertUserResponse

🔌 Usage

await client.companies.upsertUser({
    company: {
        key: "value",
    },
    keys: {
        key: "value",
    },
});

⚙️ Parameters

request: Schematic.UpsertUserRequestBody

requestOptions: Companies.RequestOptions

client.companies.getUser(userId) -> Schematic.GetUserResponse

🔌 Usage

await client.companies.getUser("user_id");

⚙️ Parameters

userId: string — user_id

requestOptions: Companies.RequestOptions

client.companies.deleteUser(userId) -> Schematic.DeleteUserResponse

🔌 Usage

await client.companies.deleteUser("user_id");

⚙️ Parameters

userId: string — user_id

requestOptions: Companies.RequestOptions

client.companies.countUsers({ ...params }) -> Schematic.CountUsersResponse

🔌 Usage

await client.companies.countUsers();

⚙️ Parameters

request: Schematic.CountUsersRequest

requestOptions: Companies.RequestOptions

client.companies.createUser({ ...params }) -> Schematic.CreateUserResponse

🔌 Usage

await client.companies.createUser({
    company: {
        key: "value",
    },
    keys: {
        key: "value",
    },
});

⚙️ Parameters

request: Schematic.UpsertUserRequestBody

requestOptions: Companies.RequestOptions

client.companies.deleteUserByKeys({ ...params }) -> Schematic.DeleteUserByKeysResponse

🔌 Usage

await client.companies.deleteUserByKeys({
    keys: {
        key: "value",
    },
});

⚙️ Parameters

request: Schematic.KeysRequestBody

requestOptions: Companies.RequestOptions

client.companies.lookupUser({ ...params }) -> Schematic.LookupUserResponse

🔌 Usage

await client.companies.lookupUser({
    keys: {
        keys: {
            key: "value",
        },
    },
});

⚙️ Parameters

request: Schematic.LookupUserRequest

requestOptions: Companies.RequestOptions

entitlements

client.entitlements.listCompanyOverrides({ ...params }) -> Schematic.ListCompanyOverridesResponse

🔌 Usage

await client.entitlements.listCompanyOverrides();

⚙️ Parameters

request: Schematic.ListCompanyOverridesRequest

requestOptions: Entitlements.RequestOptions

client.entitlements.createCompanyOverride({ ...params }) -> Schematic.CreateCompanyOverrideResponse

🔌 Usage

await client.entitlements.createCompanyOverride({
    companyId: "company_id",
    featureId: "feature_id",
    valueType: "boolean",
});

⚙️ Parameters

request: Schematic.CreateCompanyOverrideRequestBody

requestOptions: Entitlements.RequestOptions

client.entitlements.getCompanyOverride(companyOverrideId) -> Schematic.GetCompanyOverrideResponse

🔌 Usage

await client.entitlements.getCompanyOverride("company_override_id");

⚙️ Parameters

companyOverrideId: string — company_override_id

requestOptions: Entitlements.RequestOptions

client.entitlements.updateCompanyOverride(companyOverrideId, { ...params }) -> Schematic.UpdateCompanyOverrideResponse

🔌 Usage

await client.entitlements.updateCompanyOverride("company_override_id", {
    valueType: "boolean",
});

⚙️ Parameters

companyOverrideId: string — company_override_id

request: Schematic.UpdateCompanyOverrideRequestBody

requestOptions: Entitlements.RequestOptions

client.entitlements.deleteCompanyOverride(companyOverrideId) -> Schematic.DeleteCompanyOverrideResponse

🔌 Usage

await client.entitlements.deleteCompanyOverride("company_override_id");

⚙️ Parameters

companyOverrideId: string — company_override_id

requestOptions: Entitlements.RequestOptions

client.entitlements.countCompanyOverrides({ ...params }) -> Schematic.CountCompanyOverridesResponse

🔌 Usage

await client.entitlements.countCompanyOverrides();

⚙️ Parameters

request: Schematic.CountCompanyOverridesRequest

requestOptions: Entitlements.RequestOptions

client.entitlements.listFeatureCompanies({ ...params }) -> Schematic.ListFeatureCompaniesResponse

🔌 Usage

await client.entitlements.listFeatureCompanies({
    featureId: "feature_id",
});

⚙️ Parameters

request: Schematic.ListFeatureCompaniesRequest

requestOptions: Entitlements.RequestOptions

client.entitlements.countFeatureCompanies({ ...params }) -> Schematic.CountFeatureCompaniesResponse

🔌 Usage

await client.entitlements.countFeatureCompanies({
    featureId: "feature_id",
});

⚙️ Parameters

request: Schematic.CountFeatureCompaniesRequest

requestOptions: Entitlements.RequestOptions

client.entitlements.listFeatureUsage({ ...params }) -> Schematic.ListFeatureUsageResponse

🔌 Usage

await client.entitlements.listFeatureUsage();

⚙️ Parameters

request: Schematic.ListFeatureUsageRequest

requestOptions: Entitlements.RequestOptions

client.entitlements.countFeatureUsage({ ...params }) -> Schematic.CountFeatureUsageResponse

🔌 Usage

await client.entitlements.countFeatureUsage();

⚙️ Parameters

request: Schematic.CountFeatureUsageRequest

requestOptions: Entitlements.RequestOptions

client.entitlements.listFeatureUsers({ ...params }) -> Schematic.ListFeatureUsersResponse

🔌 Usage

await client.entitlements.listFeatureUsers({
    featureId: "feature_id",
});

⚙️ Parameters

request: Schematic.ListFeatureUsersRequest

requestOptions: Entitlements.RequestOptions

client.entitlements.countFeatureUsers({ ...params }) -> Schematic.CountFeatureUsersResponse

🔌 Usage

await client.entitlements.countFeatureUsers({
    featureId: "feature_id",
});

⚙️ Parameters

request: Schematic.CountFeatureUsersRequest

requestOptions: Entitlements.RequestOptions

client.entitlements.listPlanEntitlements({ ...params }) -> Schematic.ListPlanEntitlementsResponse

🔌 Usage

await client.entitlements.listPlanEntitlements();

⚙️ Parameters

request: Schematic.ListPlanEntitlementsRequest

requestOptions: Entitlements.RequestOptions

client.entitlements.createPlanEntitlement({ ...params }) -> Schematic.CreatePlanEntitlementResponse

🔌 Usage

await client.entitlements.createPlanEntitlement({
    featureId: "feature_id",
    planId: "plan_id",
    valueType: "boolean",
});

⚙️ Parameters

request: Schematic.CreatePlanEntitlementRequestBody

requestOptions: Entitlements.RequestOptions

client.entitlements.getPlanEntitlement(planEntitlementId) -> Schematic.GetPlanEntitlementResponse

🔌 Usage

await client.entitlements.getPlanEntitlement("plan_entitlement_id");

⚙️ Parameters

planEntitlementId: string — plan_entitlement_id

requestOptions: Entitlements.RequestOptions

client.entitlements.updatePlanEntitlement(planEntitlementId, { ...params }) -> Schematic.UpdatePlanEntitlementResponse

🔌 Usage

await client.entitlements.updatePlanEntitlement("plan_entitlement_id", {
    valueType: "boolean",
});

⚙️ Parameters

planEntitlementId: string — plan_entitlement_id

request: Schematic.UpdatePlanEntitlementRequestBody

requestOptions: Entitlements.RequestOptions

client.entitlements.deletePlanEntitlement(planEntitlementId) -> Schematic.DeletePlanEntitlementResponse

🔌 Usage

await client.entitlements.deletePlanEntitlement("plan_entitlement_id");

⚙️ Parameters

planEntitlementId: string — plan_entitlement_id

requestOptions: Entitlements.RequestOptions

client.entitlements.countPlanEntitlements({ ...params }) -> Schematic.CountPlanEntitlementsResponse

🔌 Usage

await client.entitlements.countPlanEntitlements();

⚙️ Parameters

request: Schematic.CountPlanEntitlementsRequest

requestOptions: Entitlements.RequestOptions

client.entitlements.getFeatureUsageByCompany({ ...params }) -> Schematic.GetFeatureUsageByCompanyResponse

🔌 Usage

await client.entitlements.getFeatureUsageByCompany({
    keys: {
        keys: {
            key: "value",
        },
    },
});

⚙️ Parameters

request: Schematic.GetFeatureUsageByCompanyRequest

requestOptions: Entitlements.RequestOptions

plans

client.plans.updateCompanyPlans(companyPlanId, { ...params }) -> Schematic.UpdateCompanyPlansResponse

🔌 Usage

await client.plans.updateCompanyPlans("company_plan_id", {
    addOnIds: ["add_on_ids"],
});

⚙️ Parameters

companyPlanId: string — company_plan_id

request: Schematic.UpdateCompanyPlansRequestBody

requestOptions: Plans.RequestOptions

client.plans.getAudience(planAudienceId) -> Schematic.GetAudienceResponse

🔌 Usage

await client.plans.getAudience("plan_audience_id");

⚙️ Parameters

planAudienceId: string — plan_audience_id

requestOptions: Plans.RequestOptions

client.plans.updateAudience(planAudienceId, { ...params }) -> Schematic.UpdateAudienceResponse

🔌 Usage

await client.plans.updateAudience("plan_audience_id", {
    conditionGroups: [
        {
            conditions: [
                {
                    conditionType: "company",
                    operator: "eq",
                    resourceIds: ["resource_ids"],
                },
            ],
        },
    ],
    conditions: [
        {
            conditionType: "company",
            operator: "eq",
            resourceIds: ["resource_ids"],
        },
    ],
});

⚙️ Parameters

planAudienceId: string — plan_audience_id

request: Schematic.UpdateAudienceRequestBody

requestOptions: Plans.RequestOptions

client.plans.deleteAudience(planAudienceId) -> Schematic.DeleteAudienceResponse

🔌 Usage

await client.plans.deleteAudience("plan_audience_id");

⚙️ Parameters

planAudienceId: string — plan_audience_id

requestOptions: Plans.RequestOptions

client.plans.listPlans({ ...params }) -> Schematic.ListPlansResponse

🔌 Usage

await client.plans.listPlans();

⚙️ Parameters

request: Schematic.ListPlansRequest

requestOptions: Plans.RequestOptions

client.plans.createPlan({ ...params }) -> Schematic.CreatePlanResponse

🔌 Usage

await client.plans.createPlan({
    description: "description",
    name: "name",
    planType: "plan",
});

⚙️ Parameters

request: Schematic.CreatePlanRequestBody

requestOptions: Plans.RequestOptions

client.plans.getPlan(planId) -> Schematic.GetPlanResponse

🔌 Usage

await client.plans.getPlan("plan_id");

⚙️ Parameters

planId: string — plan_id

requestOptions: Plans.RequestOptions

client.plans.updatePlan(planId, { ...params }) -> Schematic.UpdatePlanResponse

🔌 Usage

await client.plans.updatePlan("plan_id", {
    name: "name",
});

⚙️ Parameters

planId: string — plan_id

request: Schematic.UpdatePlanRequestBody

requestOptions: Plans.RequestOptions

client.plans.deletePlan(planId) -> Schematic.DeletePlanResponse

🔌 Usage

await client.plans.deletePlan("plan_id");

⚙️ Parameters

planId: string — plan_id

requestOptions: Plans.RequestOptions

client.plans.upsertBillingProductPlan(planId, { ...params }) -> Schematic.UpsertBillingProductPlanResponse

🔌 Usage

await client.plans.upsertBillingProductPlan("plan_id", {
    isFreePlan: true,
    isTrialable: true,
});

⚙️ Parameters

planId: string — plan_id

request: Schematic.UpsertBillingProductRequestBody

requestOptions: Plans.RequestOptions

client.plans.countPlans({ ...params }) -> Schematic.CountPlansResponse

🔌 Usage

await client.plans.countPlans();

⚙️ Parameters

request: Schematic.CountPlansRequest

requestOptions: Plans.RequestOptions

components

client.components.listComponents({ ...params }) -> Schematic.ListComponentsResponse

🔌 Usage

await client.components.listComponents();

⚙️ Parameters

request: Schematic.ListComponentsRequest

requestOptions: Components.RequestOptions

client.components.createComponent({ ...params }) -> Schematic.CreateComponentResponse

🔌 Usage

await client.components.createComponent({
    entityType: "entitlement",
    name: "name",
});

⚙️ Parameters

request: Schematic.CreateComponentRequestBody

requestOptions: Components.RequestOptions

client.components.getComponent(componentId) -> Schematic.GetComponentResponse

🔌 Usage

await client.components.getComponent("component_id");

⚙️ Parameters

componentId: string — component_id

requestOptions: Components.RequestOptions

client.components.updateComponent(componentId, { ...params }) -> Schematic.UpdateComponentResponse

🔌 Usage

await client.components.updateComponent("component_id");

⚙️ Parameters

componentId: string — component_id

request: Schematic.UpdateComponentRequestBody

requestOptions: Components.RequestOptions

client.components.deleteComponent(componentId) -> Schematic.DeleteComponentResponse

🔌 Usage

await client.components.deleteComponent("component_id");

⚙️ Parameters

componentId: string — component_id

requestOptions: Components.RequestOptions

client.components.countComponents({ ...params }) -> Schematic.CountComponentsResponse

🔌 Usage

await client.components.countComponents();

⚙️ Parameters

request: Schematic.CountComponentsRequest

requestOptions: Components.RequestOptions

client.components.previewComponentData({ ...params }) -> Schematic.PreviewComponentDataResponse

🔌 Usage

await client.components.previewComponentData();

⚙️ Parameters

request: Schematic.PreviewComponentDataRequest

requestOptions: Components.RequestOptions

crm

client.crm.upsertDealLineItemAssociation({ ...params }) -> Schematic.UpsertDealLineItemAssociationResponse

🔌 Usage

await client.crm.upsertDealLineItemAssociation({
    dealExternalId: "deal_external_id",
    lineItemExternalId: "line_item_external_id",
});

⚙️ Parameters

request: Schematic.CreateCrmDealLineItemAssociationRequestBody

requestOptions: Crm.RequestOptions

client.crm.upsertLineItem({ ...params }) -> Schematic.UpsertLineItemResponse

🔌 Usage

await client.crm.upsertLineItem({
    amount: "amount",
    interval: "interval",
    lineItemExternalId: "line_item_external_id",
    productExternalId: "product_external_id",
    quantity: 1,
});

⚙️ Parameters

request: Schematic.CreateCrmLineItemRequestBody

requestOptions: Crm.RequestOptions

client.crm.upsertCrmDeal({ ...params }) -> Schematic.UpsertCrmDealResponse

🔌 Usage

await client.crm.upsertCrmDeal({
    crmCompanyKey: "crm_company_key",
    crmType: "crm_type",
    dealExternalId: "deal_external_id",
});

⚙️ Parameters

request: Schematic.CreateCrmDealRequestBody

requestOptions: Crm.RequestOptions

client.crm.listCrmProducts({ ...params }) -> Schematic.ListCrmProductsResponse

🔌 Usage

await client.crm.listCrmProducts();

⚙️ Parameters

request: Schematic.ListCrmProductsRequest

requestOptions: Crm.RequestOptions

client.crm.upsertCrmProduct({ ...params }) -> Schematic.UpsertCrmProductResponse

🔌 Usage

await client.crm.upsertCrmProduct({
    currency: "currency",
    description: "description",
    externalId: "external_id",
    interval: "interval",
    name: "name",
    price: "price",
    quantity: 1,
    sku: "sku",
});

⚙️ Parameters

request: Schematic.CreateCrmProductRequestBody

requestOptions: Crm.RequestOptions

events

client.events.createEventBatch({ ...params }) -> Schematic.CreateEventBatchResponse

🔌 Usage

await client.events.createEventBatch({
    events: [
        {
            eventType: "identify",
        },
    ],
});

⚙️ Parameters

request: Schematic.CreateEventBatchRequestBody

requestOptions: Events.RequestOptions

client.events.getEventSummaries({ ...params }) -> Schematic.GetEventSummariesResponse

🔌 Usage

await client.events.getEventSummaries();

⚙️ Parameters

request: Schematic.GetEventSummariesRequest

requestOptions: Events.RequestOptions

client.events.listEvents({ ...params }) -> Schematic.ListEventsResponse

🔌 Usage

await client.events.listEvents();

⚙️ Parameters

request: Schematic.ListEventsRequest

requestOptions: Events.RequestOptions

client.events.createEvent({ ...params }) -> Schematic.CreateEventResponse

🔌 Usage

await client.events.createEvent({
    eventType: "identify",
});

⚙️ Parameters

request: Schematic.CreateEventRequestBody

requestOptions: Events.RequestOptions

client.events.getEvent(eventId) -> Schematic.GetEventResponse

🔌 Usage

await client.events.getEvent("event_id");

⚙️ Parameters

eventId: string — event_id

requestOptions: Events.RequestOptions

client.events.getSegmentIntegrationStatus() -> Schematic.GetSegmentIntegrationStatusResponse

🔌 Usage

await client.events.getSegmentIntegrationStatus();

⚙️ Parameters

requestOptions: Events.RequestOptions

plangroups

client.plangroups.getPlanGroup() -> Schematic.GetPlanGroupResponse

🔌 Usage

await client.plangroups.getPlanGroup();

⚙️ Parameters

requestOptions: Plangroups.RequestOptions

client.plangroups.createPlanGroup({ ...params }) -> Schematic.CreatePlanGroupResponse

🔌 Usage

await client.plangroups.createPlanGroup({
    addOnIds: ["add_on_ids"],
    planIds: ["plan_ids"],
});

⚙️ Parameters

request: Schematic.CreatePlanGroupRequestBody

requestOptions: Plangroups.RequestOptions

client.plangroups.updatePlanGroup(planGroupId, { ...params }) -> Schematic.UpdatePlanGroupResponse

🔌 Usage

await client.plangroups.updatePlanGroup("plan_group_id", {
    addOnIds: ["add_on_ids"],
    planIds: ["plan_ids"],
});

⚙️ Parameters

planGroupId: string — plan_group_id

request: Schematic.UpdatePlanGroupRequestBody

requestOptions: Plangroups.RequestOptions

accesstokens

client.accesstokens.issueTemporaryAccessToken({ ...params }) -> Schematic.IssueTemporaryAccessTokenResponse

🔌 Usage

await client.accesstokens.issueTemporaryAccessToken({
    lookup: {
        key: "value",
    },
    resourceType: "resource_type",
});

⚙️ Parameters

request: Schematic.IssueTemporaryAccessTokenRequestBody

requestOptions: Accesstokens.RequestOptions

webhooks

client.webhooks.listWebhookEvents({ ...params }) -> Schematic.ListWebhookEventsResponse

🔌 Usage

await client.webhooks.listWebhookEvents();

⚙️ Parameters

request: Schematic.ListWebhookEventsRequest

requestOptions: Webhooks.RequestOptions

client.webhooks.getWebhookEvent(webhookEventId) -> Schematic.GetWebhookEventResponse

🔌 Usage

await client.webhooks.getWebhookEvent("webhook_event_id");

⚙️ Parameters

webhookEventId: string — webhook_event_id

requestOptions: Webhooks.RequestOptions

client.webhooks.countWebhookEvents({ ...params }) -> Schematic.CountWebhookEventsResponse

🔌 Usage

await client.webhooks.countWebhookEvents();

⚙️ Parameters

request: Schematic.CountWebhookEventsRequest

requestOptions: Webhooks.RequestOptions

client.webhooks.listWebhooks({ ...params }) -> Schematic.ListWebhooksResponse

🔌 Usage

await client.webhooks.listWebhooks();

⚙️ Parameters

request: Schematic.ListWebhooksRequest

requestOptions: Webhooks.RequestOptions

client.webhooks.createWebhook({ ...params }) -> Schematic.CreateWebhookResponse

🔌 Usage

await client.webhooks.createWebhook({
    name: "name",
    requestTypes: ["company.updated"],
    url: "url",
});

⚙️ Parameters

request: Schematic.CreateWebhookRequestBody

requestOptions: Webhooks.RequestOptions

client.webhooks.getWebhook(webhookId) -> Schematic.GetWebhookResponse

🔌 Usage

await client.webhooks.getWebhook("webhook_id");

⚙️ Parameters

webhookId: string — webhook_id

requestOptions: Webhooks.RequestOptions

client.webhooks.updateWebhook(webhookId, { ...params }) -> Schematic.UpdateWebhookResponse

🔌 Usage

await client.webhooks.updateWebhook("webhook_id");

⚙️ Parameters

webhookId: string — webhook_id

request: Schematic.UpdateWebhookRequestBody

requestOptions: Webhooks.RequestOptions

client.webhooks.deleteWebhook(webhookId) -> Schematic.DeleteWebhookResponse

🔌 Usage

await client.webhooks.deleteWebhook("webhook_id");

⚙️ Parameters

webhookId: string — webhook_id

requestOptions: Webhooks.RequestOptions

client.webhooks.countWebhooks({ ...params }) -> Schematic.CountWebhooksResponse

🔌 Usage

await client.webhooks.countWebhooks();

⚙️ Parameters

request: Schematic.CountWebhooksRequest

requestOptions: Webhooks.RequestOptions