diff --git a/.fern/metadata.json b/.fern/metadata.json
index 06bdfedd..fa723cd9 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -1,7 +1,7 @@
{
- "cliVersion": "3.24.4",
+ "cliVersion": "4.43.1",
"generatorName": "fernapi/fern-typescript-node-sdk",
- "generatorVersion": "3.42.7",
+ "generatorVersion": "3.59.4",
"generatorConfig": {
"allowCustomFetcher": true,
"includeApiReference": true,
@@ -46,5 +46,6 @@
"files": ["dist/**/*.js", "dist/**/*.d.ts", "!dist/**/*.js.map", "!dist/**/*.test.*", "README.md"]
}
},
- "sdkVersion": "1.4.4"
+ "originGitCommit": "f6da3f47e1ccc938dd397950a59c4d166cd228b4",
+ "sdkVersion": "1.4.5"
}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fa273df3..4957856b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,6 +2,10 @@ name: ci
on: [push]
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: false
+
jobs:
compile:
runs-on: ubuntu-latest
@@ -63,7 +67,15 @@ jobs:
elif [[ ${GITHUB_REF} == *beta* ]]; then
publish --access public --tag beta
else
- publish --access public
+ PKG_NAME=$(node -p "require('./package.json').name")
+ PKG_VERSION=$(node -p "require('./package.json').version")
+ CURRENT_LATEST=$(npm view "${PKG_NAME}" dist-tags.latest 2>/dev/null || echo "0.0.0")
+ if npx -y semver "${PKG_VERSION}" -r "<${CURRENT_LATEST}" > /dev/null 2>&1; then
+ echo "Publishing ${PKG_VERSION} with --tag backport (current latest is ${CURRENT_LATEST})"
+ publish --access public --tag backport
+ else
+ publish --access public
+ fi
fi
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
\ No newline at end of file
diff --git a/biome.json b/biome.json
index a777468e..5084b70a 100644
--- a/biome.json
+++ b/biome.json
@@ -1,5 +1,5 @@
{
- "$schema": "https://biomejs.dev/schemas/2.3.1/schema.json",
+ "$schema": "https://biomejs.dev/schemas/2.4.3/schema.json",
"root": true,
"vcs": {
"enabled": false
diff --git a/package.json b/package.json
index 449251b4..717a7f44 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@schematichq/schematic-typescript-node",
- "version": "1.4.4",
+ "version": "1.4.5",
"private": false,
"repository": {
"type": "git",
@@ -16,7 +16,7 @@
"check": "biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
"check:fix": "biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
"build": "node build.js",
- "prepack": "cp -rv dist/. .",
+ "prepack": "",
"test": "jest --config jest.config.mjs",
"test:unit": "jest --selectProjects unit",
"test:wire": "jest --selectProjects wire",
@@ -45,7 +45,7 @@
"msw": "2.11.2",
"@types/node": "^18.19.70",
"typescript": "~5.7.2",
- "@biomejs/biome": "2.3.1",
+ "@biomejs/biome": "2.4.3",
"esbuild": "^0.25.9",
"miniflare": "^4.20260305.0"
},
diff --git a/reference.md b/reference.md
index 006b83ce..5d344e88 100644
--- a/reference.md
+++ b/reference.md
@@ -114,8 +114,8 @@ await client.deletePlanAudiencesPlanAudienceId("plan_audience_id");
await client.accounts.listApiKeys({
environmentId: "environment_id",
requireEnvironment: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -374,8 +374,8 @@ await client.accounts.deleteApiKey("api_key_id");
await client.accounts.countApiKeys({
environmentId: "environment_id",
requireEnvironment: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -431,8 +431,8 @@ await client.accounts.listAuditLogs({
environmentId: "environment_id",
q: "q",
startTime: new Date("2024-01-15T09:30:00.000Z"),
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -537,8 +537,8 @@ await client.accounts.countAuditLogs({
environmentId: "environment_id",
q: "q",
startTime: new Date("2024-01-15T09:30:00.000Z"),
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -589,8 +589,8 @@ await client.accounts.countAuditLogs({
```typescript
await client.accounts.listEnvironments({
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -933,8 +933,8 @@ await client.accounts.getWhoAmI();
await client.billing.listCoupons({
isActive: true,
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -985,14 +985,14 @@ await client.billing.listCoupons({
```typescript
await client.billing.upsertBillingCoupon({
- amountOff: 1,
+ amountOff: 1000000,
duration: "duration",
- durationInMonths: 1,
+ durationInMonths: 1000000,
externalId: "external_id",
- maxRedemptions: 1,
+ maxRedemptions: 1000000,
name: "name",
percentOff: 1.1,
- timesRedeemed: 1
+ timesRedeemed: 1000000
});
```
@@ -1102,8 +1102,8 @@ await client.billing.listCustomersWithSubscriptions({
name: "name",
providerType: "schematic",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -1157,8 +1157,8 @@ await client.billing.countCustomers({
name: "name",
providerType: "schematic",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -1212,8 +1212,8 @@ await client.billing.listInvoices({
companyId: "company_id",
customerExternalId: "customer_external_id",
subscriptionExternalId: "subscription_external_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -1264,13 +1264,13 @@ await client.billing.listInvoices({
```typescript
await client.billing.upsertInvoice({
- amountDue: 1,
- amountPaid: 1,
- amountRemaining: 1,
+ amountDue: 1000000,
+ amountPaid: 1000000,
+ amountRemaining: 1000000,
collectionMethod: "collection_method",
currency: "currency",
customerExternalId: "customer_external_id",
- subtotal: 1
+ subtotal: 1000000
});
```
@@ -1322,8 +1322,8 @@ await client.billing.upsertInvoice({
```typescript
await client.billing.listMeters({
displayName: "display_name",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -1430,8 +1430,8 @@ await client.billing.upsertBillingMeter({
await client.billing.listPaymentMethods({
companyId: "company_id",
customerExternalId: "customer_external_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -1539,15 +1539,15 @@ await client.billing.listBillingPrices({
forTrialExpiryPlan: true,
interval: "interval",
isActive: true,
- price: 1,
+ price: 1000000,
productId: "product_id",
providerType: "schematic",
q: "q",
tiersMode: "graduated",
usageType: "licensed",
withMeter: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -1603,7 +1603,7 @@ await client.billing.upsertBillingPrice({
externalAccountId: "external_account_id",
interval: "interval",
isActive: true,
- price: 1,
+ price: 1000000,
priceExternalId: "price_external_id",
priceTiers: [{
priceExternalId: "price_external_id"
@@ -1713,15 +1713,15 @@ await client.billing.listBillingProductPrices({
forTrialExpiryPlan: true,
interval: "interval",
isActive: true,
- price: 1,
+ price: 1000000,
productId: "product_id",
providerType: "schematic",
q: "q",
tiersMode: "graduated",
usageType: "licensed",
withMeter: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -1882,8 +1882,8 @@ await client.billing.listBillingProducts({
withPricesOnly: true,
withZeroPrice: true,
withoutLinkedToPlan: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -1943,8 +1943,8 @@ await client.billing.countBillingProducts({
withPricesOnly: true,
withZeroPrice: true,
withoutLinkedToPlan: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -2008,14 +2008,14 @@ await client.billing.upsertBillingSubscription({
productExternalIds: [{
currency: "currency",
interval: "interval",
- price: 1,
+ price: 1000000,
priceExternalId: "price_external_id",
productExternalId: "product_external_id",
- quantity: 1,
+ quantity: 1000000,
usageType: "licensed"
}],
subscriptionExternalId: "subscription_external_id",
- totalPrice: 1
+ totalPrice: 1000000
});
```
@@ -2068,8 +2068,8 @@ await client.billing.upsertBillingSubscription({
```typescript
await client.credits.listBillingCredits({
name: "name",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -2334,8 +2334,8 @@ await client.credits.listCreditBundles({
creditId: "credit_id",
status: "active",
bundleType: "fixed",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -2389,7 +2389,7 @@ await client.credits.createCreditBundle({
bundleName: "bundle_name",
creditId: "credit_id",
currency: "currency",
- pricePerUnit: 1
+ pricePerUnit: 1000000
});
```
@@ -2490,7 +2490,7 @@ await client.credits.getCreditBundle("bundle_id");
```typescript
await client.credits.updateCreditBundleDetails("bundle_id", {
bundleName: "bundle_name",
- pricePerUnit: 1
+ pricePerUnit: 1000000
});
```
@@ -2601,8 +2601,8 @@ await client.credits.countCreditBundles({
creditId: "credit_id",
status: "active",
bundleType: "fixed",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -2654,8 +2654,8 @@ await client.credits.countCreditBundles({
```typescript
await client.credits.countBillingCredits({
name: "name",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -2765,7 +2765,7 @@ await client.credits.zeroOutGrant("grant_id");
await client.credits.grantBillingCreditsToCompany({
companyId: "company_id",
creditId: "credit_id",
- quantity: 1,
+ quantity: 1000000,
reason: "billing_credit_auto_topup"
});
@@ -2820,8 +2820,8 @@ await client.credits.countCompanyGrants({
companyId: "company_id",
order: "created_at",
dir: "asc",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -2875,8 +2875,8 @@ await client.credits.listCompanyGrants({
companyId: "company_id",
order: "created_at",
dir: "asc",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -2928,8 +2928,8 @@ await client.credits.listCompanyGrants({
```typescript
await client.credits.countBillingCreditsGrants({
creditId: "credit_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -2981,8 +2981,8 @@ await client.credits.countBillingCreditsGrants({
```typescript
await client.credits.listGrantsForCredit({
creditId: "credit_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -3039,8 +3039,8 @@ await client.credits.getEnrichedCreditLedger({
period: "daily",
startTime: "start_time",
endTime: "end_time",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -3097,8 +3097,8 @@ await client.credits.countCreditLedger({
period: "daily",
startTime: "start_time",
endTime: "end_time",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -3152,8 +3152,8 @@ await client.credits.listBillingPlanCreditGrants({
creditId: "credit_id",
planId: "plan_id",
planVersionId: "plan_version_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -3204,7 +3204,7 @@ await client.credits.listBillingPlanCreditGrants({
```typescript
await client.credits.createBillingPlanCreditGrant({
- creditAmount: 1,
+ creditAmount: 1000000,
creditId: "credit_id",
planId: "plan_id",
resetCadence: "daily",
@@ -3381,8 +3381,8 @@ await client.credits.countBillingPlanCreditGrants({
creditId: "credit_id",
planId: "plan_id",
planVersionId: "plan_version_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -3439,8 +3439,8 @@ await client.credits.listCreditEventLedger({
eventType: "grant",
featureId: "feature_id",
startTime: "start_time",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -3497,8 +3497,8 @@ await client.credits.countCreditEventLedger({
eventType: "grant",
featureId: "feature_id",
startTime: "start_time",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -3557,13 +3557,13 @@ await client.checkout.internal({
companyId: "company_id",
creditBundles: [{
bundleId: "bundle_id",
- quantity: 1
+ quantity: 1000000
}],
newPlanId: "new_plan_id",
newPriceId: "new_price_id",
payInAdvance: [{
priceId: "price_id",
- quantity: 1
+ quantity: 1000000
}],
skipTrial: true
});
@@ -3674,13 +3674,13 @@ await client.checkout.previewCheckoutInternal({
companyId: "company_id",
creditBundles: [{
bundleId: "bundle_id",
- quantity: 1
+ quantity: 1000000
}],
newPlanId: "new_plan_id",
newPriceId: "new_price_id",
payInAdvance: [{
priceId: "price_id",
- quantity: 1
+ quantity: 1000000
}],
skipTrial: true
});
@@ -3739,11 +3739,11 @@ await client.checkout.managePlan({
companyId: "company_id",
creditBundles: [{
bundleId: "bundle_id",
- quantity: 1
+ quantity: 1000000
}],
payInAdvanceEntitlements: [{
priceId: "price_id",
- quantity: 1
+ quantity: 1000000
}]
});
@@ -3801,11 +3801,11 @@ await client.checkout.previewManagePlan({
companyId: "company_id",
creditBundles: [{
bundleId: "bundle_id",
- quantity: 1
+ quantity: 1000000
}],
payInAdvanceEntitlements: [{
priceId: "price_id",
- quantity: 1
+ quantity: 1000000
}]
});
@@ -3977,8 +3977,8 @@ await client.companies.listCompanies({
withoutPlan: true,
withoutSubscription: true,
withSubscription: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -4202,8 +4202,8 @@ await client.companies.countCompanies({
withoutPlan: true,
withoutSubscription: true,
withSubscription: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -4350,6 +4350,24 @@ await client.companies.deleteCompanyByKeys({
-
+#### 📝 Description
+
+
+-
+
+
+-
+
+Company lookup is determined to resolve a company from its keys, similar to how many of our other apis work.
+The following approaches will all work to resolve a company and any of them are appropriate:
+1. `/companies/lookup?keys={"foo": "bar", "fizz": "buzz"}`
+2. `/companies/lookup?keys[foo]=bar&keys[fizz]=buzz`
+2. `/companies/lookup?foo=bar&fizz=buzz`
+
+
+
+
+
#### 🔌 Usage
@@ -4415,8 +4433,8 @@ await client.companies.lookupCompany({
await client.companies.listCompanyMemberships({
companyId: "company_id",
userId: "user_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -4569,8 +4587,8 @@ await client.companies.deleteCompanyMembership("company_membership_id");
```typescript
await client.companies.getActiveCompanySubscription({
companyId: "company_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -4677,8 +4695,8 @@ await client.companies.upsertCompanyTrait({
await client.companies.listEntityKeyDefinitions({
entityType: "company",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -4731,8 +4749,8 @@ await client.companies.listEntityKeyDefinitions({
await client.companies.countEntityKeyDefinitions({
entityType: "company",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -4786,8 +4804,8 @@ await client.companies.listEntityTraitDefinitions({
entityType: "company",
q: "q",
traitType: "boolean",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -5002,8 +5020,8 @@ await client.companies.countEntityTraitDefinitions({
entityType: "company",
q: "q",
traitType: "boolean",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -5056,8 +5074,8 @@ await client.companies.countEntityTraitDefinitions({
await client.companies.getEntityTraitValues({
definitionId: "definition_id",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -5111,8 +5129,8 @@ await client.companies.listPlanChanges({
action: "action",
basePlanAction: "base_plan_action",
companyId: "company_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -5214,8 +5232,8 @@ await client.companies.getPlanChange("plan_change_id");
await client.companies.listPlanTraits({
planId: "plan_id",
traitId: "trait_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -5535,8 +5553,8 @@ await client.companies.updatePlanTraitsBulk({
await client.companies.countPlanTraits({
planId: "plan_id",
traitId: "trait_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -5644,8 +5662,8 @@ await client.companies.listUsers({
companyId: "company_id",
planId: "plan_id",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -5850,8 +5868,8 @@ await client.companies.countUsers({
companyId: "company_id",
planId: "plan_id",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -6066,8 +6084,8 @@ await client.entitlements.listCompanyOverrides({
featureId: "feature_id",
withoutExpired: true,
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -6332,8 +6350,8 @@ await client.entitlements.countCompanyOverrides({
featureId: "feature_id",
withoutExpired: true,
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -6386,8 +6404,8 @@ await client.entitlements.countCompanyOverrides({
await client.entitlements.listFeatureCompanies({
featureId: "feature_id",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -6440,8 +6458,8 @@ await client.entitlements.listFeatureCompanies({
await client.entitlements.countFeatureCompanies({
featureId: "feature_id",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -6496,8 +6514,8 @@ await client.entitlements.listFeatureUsage({
includeUsageAggregation: true,
q: "q",
withoutNegativeEntitlements: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -6607,8 +6625,8 @@ await client.entitlements.countFeatureUsage({
includeUsageAggregation: true,
q: "q",
withoutNegativeEntitlements: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -6661,8 +6679,8 @@ await client.entitlements.countFeatureUsage({
await client.entitlements.listFeatureUsers({
featureId: "feature_id",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -6715,8 +6733,8 @@ await client.entitlements.listFeatureUsers({
await client.entitlements.countFeatureUsers({
featureId: "feature_id",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -6772,8 +6790,8 @@ await client.entitlements.listPlanEntitlements({
planVersionId: "plan_version_id",
q: "q",
withMeteredProducts: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -7039,8 +7057,8 @@ await client.entitlements.countPlanEntitlements({
planVersionId: "plan_version_id",
q: "q",
withMeteredProducts: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -7261,12 +7279,13 @@ await client.plans.listPlans({
forInitialPlan: true,
forTrialExpiryPlan: true,
hasProductId: true,
+ includeDraftVersions: true,
planType: "plan",
q: "q",
withoutEntitlementFor: "without_entitlement_for",
withoutPaidProductId: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -7602,12 +7621,13 @@ await client.plans.countPlans({
forInitialPlan: true,
forTrialExpiryPlan: true,
hasProductId: true,
+ includeDraftVersions: true,
planType: "plan",
q: "q",
withoutEntitlementFor: "without_entitlement_for",
withoutPaidProductId: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -7821,8 +7841,8 @@ await client.plans.publishPlanVersion("plan_id", {
```typescript
await client.components.listComponents({
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -8081,8 +8101,8 @@ await client.components.deleteComponent("component_id");
```typescript
await client.components.countComponents({
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -8341,8 +8361,8 @@ await client.events.createEventBatch({
```typescript
await client.events.getEventSummaries({
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -8397,8 +8417,8 @@ await client.events.listEvents({
eventSubtype: "event_subtype",
flagId: "flag_id",
userId: "user_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -8596,8 +8616,8 @@ await client.features.listFeatures({
planVersionId: "plan_version_id",
withoutPlanEntitlementFor: "without_plan_entitlement_for",
booleanRequireEvent: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -8861,8 +8881,8 @@ await client.features.countFeatures({
planVersionId: "plan_version_id",
withoutPlanEntitlementFor: "without_plan_entitlement_for",
booleanRequireEvent: true,
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -8915,8 +8935,8 @@ await client.features.countFeatures({
await client.features.listFlags({
featureId: "feature_id",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -9197,7 +9217,7 @@ await client.features.updateFlagRules("flag_id", {
resourceIds: ["resource_ids"]
}],
name: "name",
- priority: 1,
+ priority: 1000000,
value: true
}]
});
@@ -9417,8 +9437,8 @@ await client.features.checkFlagsBulk({
await client.features.countFlags({
featureId: "feature_id",
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -9796,8 +9816,8 @@ await client.planmigrations.listCompanyMigrations({
migrationId: "migration_id",
q: "q",
status: "completed",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -9851,8 +9871,8 @@ await client.planmigrations.countCompanyMigrations({
migrationId: "migration_id",
q: "q",
status: "completed",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -9905,8 +9925,8 @@ await client.planmigrations.countCompanyMigrations({
await client.planmigrations.listMigrations({
planVersionId: "plan_version_id",
status: "completed",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -10008,8 +10028,8 @@ await client.planmigrations.getMigration("plan_version_migration_id");
await client.planmigrations.countMigrations({
planVersionId: "plan_version_id",
status: "completed",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -10105,8 +10125,8 @@ await client.componentspublic.getPublicPlans();
await client.scheduledcheckout.listScheduledCheckouts({
companyId: "company_id",
status: "cancelled",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -10374,8 +10394,8 @@ await client.accesstokens.issueTemporaryAccessToken({
await client.webhooks.listWebhookEvents({
q: "q",
webhookId: "webhook_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -10477,8 +10497,8 @@ await client.webhooks.getWebhookEvent("webhook_event_id");
await client.webhooks.countWebhookEvents({
q: "q",
webhookId: "webhook_id",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -10530,8 +10550,8 @@ await client.webhooks.countWebhookEvents({
```typescript
await client.webhooks.listWebhooks({
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -10791,8 +10811,8 @@ await client.webhooks.deleteWebhook("webhook_id");
```typescript
await client.webhooks.countWebhooks({
q: "q",
- limit: 1,
- offset: 1
+ limit: 1000000,
+ offset: 1000000
});
```
@@ -10828,3 +10848,4 @@ await client.webhooks.countWebhooks({
+
diff --git a/src/BaseClient.ts b/src/BaseClient.ts
index 691a4853..ca92313d 100644
--- a/src/BaseClient.ts
+++ b/src/BaseClient.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import { HeaderAuthProvider } from "./auth/HeaderAuthProvider.js";
+import { HeaderAuthProvider } from "./auth/HeaderAuthProvider";
import * as core from "./core";
import { mergeHeaders } from "./core/headers";
import type * as environments from "./environments";
@@ -52,8 +52,8 @@ export function normalizeClientOptions} A standard Response object.
+ */
+ public async fetch(
+ input: Request | string | URL,
+ init?: RequestInit,
+ requestOptions?: core.PassthroughRequest.RequestOptions,
+ ): Promise {
+ return core.makePassthroughRequest(
+ input,
+ init,
+ {
+ baseUrl: this._options.baseUrl ?? this._options.environment,
+ headers: this._options.headers,
+ timeoutInSeconds: this._options.timeoutInSeconds,
+ maxRetries: this._options.maxRetries,
+ fetch: this._options.fetch,
+ logging: this._options.logging,
+ getAuthHeaders: async () => (await this._options.authProvider.getAuthRequest()).headers,
+ },
+ requestOptions,
+ );
+ }
}
diff --git a/src/api/resources/accesstokens/exports.ts b/src/api/resources/accesstokens/exports.ts
new file mode 100644
index 00000000..04f1f8db
--- /dev/null
+++ b/src/api/resources/accesstokens/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { AccesstokensClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/accounts/client/Client.ts b/src/api/resources/accounts/client/Client.ts
index 8892b3c7..64ead638 100644
--- a/src/api/resources/accounts/client/Client.ts
+++ b/src/api/resources/accounts/client/Client.ts
@@ -37,8 +37,8 @@ export class AccountsClient {
* await client.accounts.listApiKeys({
* environmentId: "environment_id",
* requireEnvironment: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listApiKeys(
@@ -53,20 +53,12 @@ export class AccountsClient {
requestOptions?: AccountsClient.RequestOptions,
): Promise> {
const { environmentId, requireEnvironment, limit, offset } = request;
- const _queryParams: Record = {};
- if (environmentId != null) {
- _queryParams.environment_id = environmentId;
- }
-
- _queryParams.require_environment = requireEnvironment.toString();
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ environment_id: environmentId,
+ require_environment: requireEnvironment,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -696,8 +688,8 @@ export class AccountsClient {
* await client.accounts.countApiKeys({
* environmentId: "environment_id",
* requireEnvironment: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countApiKeys(
@@ -712,20 +704,12 @@ export class AccountsClient {
requestOptions?: AccountsClient.RequestOptions,
): Promise> {
const { environmentId, requireEnvironment, limit, offset } = request;
- const _queryParams: Record = {};
- if (environmentId != null) {
- _queryParams.environment_id = environmentId;
- }
-
- _queryParams.require_environment = requireEnvironment.toString();
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ environment_id: environmentId,
+ require_environment: requireEnvironment,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -847,8 +831,8 @@ export class AccountsClient {
* environmentId: "environment_id",
* q: "q",
* startTime: new Date("2024-01-15T09:30:00.000Z"),
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listAuditLogs(
@@ -863,35 +847,18 @@ export class AccountsClient {
requestOptions?: AccountsClient.RequestOptions,
): Promise> {
const { actorType, endTime, environmentId, q, startTime, limit, offset } = request;
- const _queryParams: Record = {};
- if (actorType != null) {
- _queryParams.actor_type = serializers.ActorType.jsonOrThrow(actorType, { unrecognizedObjectKeys: "strip" });
- }
-
- if (endTime != null) {
- _queryParams.end_time = endTime.toISOString();
- }
-
- if (environmentId != null) {
- _queryParams.environment_id = environmentId;
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (startTime != null) {
- _queryParams.start_time = startTime.toISOString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ actor_type:
+ actorType != null
+ ? serializers.ActorType.jsonOrThrow(actorType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ end_time: endTime != null ? endTime?.toISOString() : undefined,
+ environment_id: environmentId,
+ q,
+ start_time: startTime != null ? startTime?.toISOString() : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1129,8 +1096,8 @@ export class AccountsClient {
* environmentId: "environment_id",
* q: "q",
* startTime: new Date("2024-01-15T09:30:00.000Z"),
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countAuditLogs(
@@ -1145,35 +1112,18 @@ export class AccountsClient {
requestOptions?: AccountsClient.RequestOptions,
): Promise> {
const { actorType, endTime, environmentId, q, startTime, limit, offset } = request;
- const _queryParams: Record = {};
- if (actorType != null) {
- _queryParams.actor_type = serializers.ActorType.jsonOrThrow(actorType, { unrecognizedObjectKeys: "strip" });
- }
-
- if (endTime != null) {
- _queryParams.end_time = endTime.toISOString();
- }
-
- if (environmentId != null) {
- _queryParams.environment_id = environmentId;
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (startTime != null) {
- _queryParams.start_time = startTime.toISOString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ actor_type:
+ actorType != null
+ ? serializers.ActorType.jsonOrThrow(actorType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ end_time: endTime != null ? endTime?.toISOString() : undefined,
+ environment_id: environmentId,
+ q,
+ start_time: startTime != null ? startTime?.toISOString() : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1290,8 +1240,8 @@ export class AccountsClient {
*
* @example
* await client.accounts.listEnvironments({
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listEnvironments(
@@ -1306,23 +1256,11 @@ export class AccountsClient {
requestOptions?: AccountsClient.RequestOptions,
): Promise> {
const { ids, limit, offset } = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/accounts/client/requests/CountApiKeysRequest.ts b/src/api/resources/accounts/client/requests/CountApiKeysRequest.ts
index 8f018d4d..1855e68f 100644
--- a/src/api/resources/accounts/client/requests/CountApiKeysRequest.ts
+++ b/src/api/resources/accounts/client/requests/CountApiKeysRequest.ts
@@ -5,8 +5,8 @@
* {
* environmentId: "environment_id",
* requireEnvironment: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountApiKeysRequest {
diff --git a/src/api/resources/accounts/client/requests/CountAuditLogsRequest.ts b/src/api/resources/accounts/client/requests/CountAuditLogsRequest.ts
index af9470d1..ca0d87c9 100644
--- a/src/api/resources/accounts/client/requests/CountAuditLogsRequest.ts
+++ b/src/api/resources/accounts/client/requests/CountAuditLogsRequest.ts
@@ -10,8 +10,8 @@ import type * as Schematic from "../../../../index";
* environmentId: "environment_id",
* q: "q",
* startTime: new Date("2024-01-15T09:30:00.000Z"),
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountAuditLogsRequest {
diff --git a/src/api/resources/accounts/client/requests/ListApiKeysRequest.ts b/src/api/resources/accounts/client/requests/ListApiKeysRequest.ts
index 2a4183eb..c1423bca 100644
--- a/src/api/resources/accounts/client/requests/ListApiKeysRequest.ts
+++ b/src/api/resources/accounts/client/requests/ListApiKeysRequest.ts
@@ -5,8 +5,8 @@
* {
* environmentId: "environment_id",
* requireEnvironment: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListApiKeysRequest {
diff --git a/src/api/resources/accounts/client/requests/ListAuditLogsRequest.ts b/src/api/resources/accounts/client/requests/ListAuditLogsRequest.ts
index 1648f00f..1417a644 100644
--- a/src/api/resources/accounts/client/requests/ListAuditLogsRequest.ts
+++ b/src/api/resources/accounts/client/requests/ListAuditLogsRequest.ts
@@ -10,8 +10,8 @@ import type * as Schematic from "../../../../index";
* environmentId: "environment_id",
* q: "q",
* startTime: new Date("2024-01-15T09:30:00.000Z"),
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListAuditLogsRequest {
diff --git a/src/api/resources/accounts/client/requests/ListEnvironmentsRequest.ts b/src/api/resources/accounts/client/requests/ListEnvironmentsRequest.ts
index 1f1f02c5..baffe355 100644
--- a/src/api/resources/accounts/client/requests/ListEnvironmentsRequest.ts
+++ b/src/api/resources/accounts/client/requests/ListEnvironmentsRequest.ts
@@ -3,8 +3,8 @@
/**
* @example
* {
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListEnvironmentsRequest {
diff --git a/src/api/resources/accounts/exports.ts b/src/api/resources/accounts/exports.ts
new file mode 100644
index 00000000..11698f7e
--- /dev/null
+++ b/src/api/resources/accounts/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { AccountsClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/billing/client/Client.ts b/src/api/resources/billing/client/Client.ts
index 7e01f949..41c540eb 100644
--- a/src/api/resources/billing/client/Client.ts
+++ b/src/api/resources/billing/client/Client.ts
@@ -37,8 +37,8 @@ export class BillingClient {
* await client.billing.listCoupons({
* isActive: true,
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listCoupons(
@@ -53,23 +53,12 @@ export class BillingClient {
requestOptions?: BillingClient.RequestOptions,
): Promise> {
const { isActive, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (isActive != null) {
- _queryParams.is_active = isActive.toString();
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ is_active: isActive,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -186,14 +175,14 @@ export class BillingClient {
*
* @example
* await client.billing.upsertBillingCoupon({
- * amountOff: 1,
+ * amountOff: 1000000,
* duration: "duration",
- * durationInMonths: 1,
+ * durationInMonths: 1000000,
* externalId: "external_id",
- * maxRedemptions: 1,
+ * maxRedemptions: 1000000,
* name: "name",
* percentOff: 1.1,
- * timesRedeemed: 1
+ * timesRedeemed: 1000000
* })
*/
public upsertBillingCoupon(
@@ -469,8 +458,8 @@ export class BillingClient {
* name: "name",
* providerType: "schematic",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listCustomersWithSubscriptions(
@@ -485,37 +474,17 @@ export class BillingClient {
requestOptions?: BillingClient.RequestOptions,
): Promise> {
const { companyIds, name, providerType, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyIds != null) {
- if (Array.isArray(companyIds)) {
- _queryParams.company_ids = companyIds.map((item) => item);
- } else {
- _queryParams.company_ids = companyIds;
- }
- }
-
- if (name != null) {
- _queryParams.name = name;
- }
-
- if (providerType != null) {
- _queryParams.provider_type = serializers.BillingProviderType.jsonOrThrow(providerType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_ids: companyIds,
+ name,
+ provider_type:
+ providerType != null
+ ? serializers.BillingProviderType.jsonOrThrow(providerType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -635,8 +604,8 @@ export class BillingClient {
* name: "name",
* providerType: "schematic",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countCustomers(
@@ -651,37 +620,17 @@ export class BillingClient {
requestOptions?: BillingClient.RequestOptions,
): Promise> {
const { companyIds, name, providerType, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyIds != null) {
- if (Array.isArray(companyIds)) {
- _queryParams.company_ids = companyIds.map((item) => item);
- } else {
- _queryParams.company_ids = companyIds;
- }
- }
-
- if (name != null) {
- _queryParams.name = name;
- }
-
- if (providerType != null) {
- _queryParams.provider_type = serializers.BillingProviderType.jsonOrThrow(providerType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_ids: companyIds,
+ name,
+ provider_type:
+ providerType != null
+ ? serializers.BillingProviderType.jsonOrThrow(providerType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -801,8 +750,8 @@ export class BillingClient {
* companyId: "company_id",
* customerExternalId: "customer_external_id",
* subscriptionExternalId: "subscription_external_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listInvoices(
@@ -817,21 +766,13 @@ export class BillingClient {
requestOptions?: BillingClient.RequestOptions,
): Promise> {
const { companyId, customerExternalId, subscriptionExternalId, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- _queryParams.customer_external_id = customerExternalId;
- _queryParams.subscription_external_id = subscriptionExternalId;
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ customer_external_id: customerExternalId,
+ subscription_external_id: subscriptionExternalId,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -948,13 +889,13 @@ export class BillingClient {
*
* @example
* await client.billing.upsertInvoice({
- * amountDue: 1,
- * amountPaid: 1,
- * amountRemaining: 1,
+ * amountDue: 1000000,
+ * amountPaid: 1000000,
+ * amountRemaining: 1000000,
* collectionMethod: "collection_method",
* currency: "currency",
* customerExternalId: "customer_external_id",
- * subtotal: 1
+ * subtotal: 1000000
* })
*/
public upsertInvoice(
@@ -1088,8 +1029,8 @@ export class BillingClient {
* @example
* await client.billing.listMeters({
* displayName: "display_name",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listMeters(
@@ -1104,19 +1045,11 @@ export class BillingClient {
requestOptions?: BillingClient.RequestOptions,
): Promise> {
const { displayName, limit, offset } = request;
- const _queryParams: Record = {};
- if (displayName != null) {
- _queryParams.display_name = displayName;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ display_name: displayName,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1371,8 +1304,8 @@ export class BillingClient {
* await client.billing.listPaymentMethods({
* companyId: "company_id",
* customerExternalId: "customer_external_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listPaymentMethods(
@@ -1387,20 +1320,12 @@ export class BillingClient {
requestOptions?: BillingClient.RequestOptions,
): Promise> {
const { companyId, customerExternalId, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- _queryParams.customer_external_id = customerExternalId;
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ customer_external_id: customerExternalId,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1656,15 +1581,15 @@ export class BillingClient {
* forTrialExpiryPlan: true,
* interval: "interval",
* isActive: true,
- * price: 1,
+ * price: 1000000,
* productId: "product_id",
* providerType: "schematic",
* q: "q",
* tiersMode: "graduated",
* usageType: "licensed",
* withMeter: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listBillingPrices(
@@ -1695,81 +1620,32 @@ export class BillingClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (forInitialPlan != null) {
- _queryParams.for_initial_plan = forInitialPlan.toString();
- }
-
- if (forTrialExpiryPlan != null) {
- _queryParams.for_trial_expiry_plan = forTrialExpiryPlan.toString();
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (interval != null) {
- _queryParams.interval = interval;
- }
-
- if (isActive != null) {
- _queryParams.is_active = isActive.toString();
- }
-
- if (price != null) {
- _queryParams.price = price.toString();
- }
-
- if (productId != null) {
- _queryParams.product_id = productId;
- }
-
- if (productIds != null) {
- if (Array.isArray(productIds)) {
- _queryParams.product_ids = productIds.map((item) => item);
- } else {
- _queryParams.product_ids = productIds;
- }
- }
-
- if (providerType != null) {
- _queryParams.provider_type = serializers.BillingProviderType.jsonOrThrow(providerType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (tiersMode != null) {
- _queryParams.tiers_mode = serializers.BillingTiersMode.jsonOrThrow(tiersMode, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (usageType != null) {
- _queryParams.usage_type = serializers.BillingPriceUsageType.jsonOrThrow(usageType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (withMeter != null) {
- _queryParams.with_meter = withMeter.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ for_initial_plan: forInitialPlan,
+ for_trial_expiry_plan: forTrialExpiryPlan,
+ ids,
+ interval,
+ is_active: isActive,
+ price,
+ product_id: productId,
+ product_ids: productIds,
+ provider_type:
+ providerType != null
+ ? serializers.BillingProviderType.jsonOrThrow(providerType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ q,
+ tiers_mode:
+ tiersMode != null
+ ? serializers.BillingTiersMode.jsonOrThrow(tiersMode, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ usage_type:
+ usageType != null
+ ? serializers.BillingPriceUsageType.jsonOrThrow(usageType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ with_meter: withMeter,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1891,7 +1767,7 @@ export class BillingClient {
* externalAccountId: "external_account_id",
* interval: "interval",
* isActive: true,
- * price: 1,
+ * price: 1000000,
* priceExternalId: "price_external_id",
* priceTiers: [{
* priceExternalId: "price_external_id"
@@ -2167,15 +2043,15 @@ export class BillingClient {
* forTrialExpiryPlan: true,
* interval: "interval",
* isActive: true,
- * price: 1,
+ * price: 1000000,
* productId: "product_id",
* providerType: "schematic",
* q: "q",
* tiersMode: "graduated",
* usageType: "licensed",
* withMeter: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listBillingProductPrices(
@@ -2206,81 +2082,32 @@ export class BillingClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (forInitialPlan != null) {
- _queryParams.for_initial_plan = forInitialPlan.toString();
- }
-
- if (forTrialExpiryPlan != null) {
- _queryParams.for_trial_expiry_plan = forTrialExpiryPlan.toString();
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (interval != null) {
- _queryParams.interval = interval;
- }
-
- if (isActive != null) {
- _queryParams.is_active = isActive.toString();
- }
-
- if (price != null) {
- _queryParams.price = price.toString();
- }
-
- if (productId != null) {
- _queryParams.product_id = productId;
- }
-
- if (productIds != null) {
- if (Array.isArray(productIds)) {
- _queryParams.product_ids = productIds.map((item) => item);
- } else {
- _queryParams.product_ids = productIds;
- }
- }
-
- if (providerType != null) {
- _queryParams.provider_type = serializers.BillingProviderType.jsonOrThrow(providerType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (tiersMode != null) {
- _queryParams.tiers_mode = serializers.BillingTiersMode.jsonOrThrow(tiersMode, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (usageType != null) {
- _queryParams.usage_type = serializers.BillingPriceUsageType.jsonOrThrow(usageType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (withMeter != null) {
- _queryParams.with_meter = withMeter.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ for_initial_plan: forInitialPlan,
+ for_trial_expiry_plan: forTrialExpiryPlan,
+ ids,
+ interval,
+ is_active: isActive,
+ price,
+ product_id: productId,
+ product_ids: productIds,
+ provider_type:
+ providerType != null
+ ? serializers.BillingProviderType.jsonOrThrow(providerType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ q,
+ tiers_mode:
+ tiersMode != null
+ ? serializers.BillingTiersMode.jsonOrThrow(tiersMode, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ usage_type:
+ usageType != null
+ ? serializers.BillingPriceUsageType.jsonOrThrow(usageType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ with_meter: withMeter,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2673,8 +2500,8 @@ export class BillingClient {
* withPricesOnly: true,
* withZeroPrice: true,
* withoutLinkedToPlan: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listBillingProducts(
@@ -2702,63 +2529,26 @@ export class BillingClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (isActive != null) {
- _queryParams.is_active = isActive.toString();
- }
-
- if (name != null) {
- _queryParams.name = name;
- }
-
- if (priceUsageType != null) {
- _queryParams.price_usage_type = serializers.BillingPriceUsageType.jsonOrThrow(priceUsageType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (providerType != null) {
- _queryParams.provider_type = serializers.BillingProviderType.jsonOrThrow(providerType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (withOneTimeCharges != null) {
- _queryParams.with_one_time_charges = withOneTimeCharges.toString();
- }
-
- if (withPricesOnly != null) {
- _queryParams.with_prices_only = withPricesOnly.toString();
- }
-
- if (withZeroPrice != null) {
- _queryParams.with_zero_price = withZeroPrice.toString();
- }
-
- if (withoutLinkedToPlan != null) {
- _queryParams.without_linked_to_plan = withoutLinkedToPlan.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ is_active: isActive,
+ name,
+ price_usage_type:
+ priceUsageType != null
+ ? serializers.BillingPriceUsageType.jsonOrThrow(priceUsageType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ provider_type:
+ providerType != null
+ ? serializers.BillingProviderType.jsonOrThrow(providerType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ q,
+ with_one_time_charges: withOneTimeCharges,
+ with_prices_only: withPricesOnly,
+ with_zero_price: withZeroPrice,
+ without_linked_to_plan: withoutLinkedToPlan,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2884,8 +2674,8 @@ export class BillingClient {
* withPricesOnly: true,
* withZeroPrice: true,
* withoutLinkedToPlan: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countBillingProducts(
@@ -2913,63 +2703,26 @@ export class BillingClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (isActive != null) {
- _queryParams.is_active = isActive.toString();
- }
-
- if (name != null) {
- _queryParams.name = name;
- }
-
- if (priceUsageType != null) {
- _queryParams.price_usage_type = serializers.BillingPriceUsageType.jsonOrThrow(priceUsageType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (providerType != null) {
- _queryParams.provider_type = serializers.BillingProviderType.jsonOrThrow(providerType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (withOneTimeCharges != null) {
- _queryParams.with_one_time_charges = withOneTimeCharges.toString();
- }
-
- if (withPricesOnly != null) {
- _queryParams.with_prices_only = withPricesOnly.toString();
- }
-
- if (withZeroPrice != null) {
- _queryParams.with_zero_price = withZeroPrice.toString();
- }
-
- if (withoutLinkedToPlan != null) {
- _queryParams.without_linked_to_plan = withoutLinkedToPlan.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ is_active: isActive,
+ name,
+ price_usage_type:
+ priceUsageType != null
+ ? serializers.BillingPriceUsageType.jsonOrThrow(priceUsageType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ provider_type:
+ providerType != null
+ ? serializers.BillingProviderType.jsonOrThrow(providerType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ q,
+ with_one_time_charges: withOneTimeCharges,
+ with_prices_only: withPricesOnly,
+ with_zero_price: withZeroPrice,
+ without_linked_to_plan: withoutLinkedToPlan,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -3099,14 +2852,14 @@ export class BillingClient {
* productExternalIds: [{
* currency: "currency",
* interval: "interval",
- * price: 1,
+ * price: 1000000,
* priceExternalId: "price_external_id",
* productExternalId: "product_external_id",
- * quantity: 1,
+ * quantity: 1000000,
* usageType: "licensed"
* }],
* subscriptionExternalId: "subscription_external_id",
- * totalPrice: 1
+ * totalPrice: 1000000
* })
*/
public upsertBillingSubscription(
diff --git a/src/api/resources/billing/client/requests/CountBillingProductsRequest.ts b/src/api/resources/billing/client/requests/CountBillingProductsRequest.ts
index f17d758f..bf41f5da 100644
--- a/src/api/resources/billing/client/requests/CountBillingProductsRequest.ts
+++ b/src/api/resources/billing/client/requests/CountBillingProductsRequest.ts
@@ -14,8 +14,8 @@ import type * as Schematic from "../../../../index";
* withPricesOnly: true,
* withZeroPrice: true,
* withoutLinkedToPlan: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountBillingProductsRequest {
diff --git a/src/api/resources/billing/client/requests/CountCustomersRequest.ts b/src/api/resources/billing/client/requests/CountCustomersRequest.ts
index e6be6d43..e872185a 100644
--- a/src/api/resources/billing/client/requests/CountCustomersRequest.ts
+++ b/src/api/resources/billing/client/requests/CountCustomersRequest.ts
@@ -8,8 +8,8 @@ import type * as Schematic from "../../../../index";
* name: "name",
* providerType: "schematic",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountCustomersRequest {
diff --git a/src/api/resources/billing/client/requests/CreateBillingPriceRequestBody.ts b/src/api/resources/billing/client/requests/CreateBillingPriceRequestBody.ts
index fc53b0c9..e8b11ba3 100644
--- a/src/api/resources/billing/client/requests/CreateBillingPriceRequestBody.ts
+++ b/src/api/resources/billing/client/requests/CreateBillingPriceRequestBody.ts
@@ -10,7 +10,7 @@ import type * as Schematic from "../../../../index";
* externalAccountId: "external_account_id",
* interval: "interval",
* isActive: true,
- * price: 1,
+ * price: 1000000,
* priceExternalId: "price_external_id",
* priceTiers: [{
* priceExternalId: "price_external_id"
diff --git a/src/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.ts b/src/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.ts
index c19610c4..4f401959 100644
--- a/src/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.ts
+++ b/src/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.ts
@@ -18,14 +18,14 @@ import type * as Schematic from "../../../../index";
* productExternalIds: [{
* currency: "currency",
* interval: "interval",
- * price: 1,
+ * price: 1000000,
* priceExternalId: "price_external_id",
* productExternalId: "product_external_id",
- * quantity: 1,
+ * quantity: 1000000,
* usageType: "licensed"
* }],
* subscriptionExternalId: "subscription_external_id",
- * totalPrice: 1
+ * totalPrice: 1000000
* }
*/
export interface CreateBillingSubscriptionRequestBody {
diff --git a/src/api/resources/billing/client/requests/CreateCouponRequestBody.ts b/src/api/resources/billing/client/requests/CreateCouponRequestBody.ts
index 94d17188..ff1416ce 100644
--- a/src/api/resources/billing/client/requests/CreateCouponRequestBody.ts
+++ b/src/api/resources/billing/client/requests/CreateCouponRequestBody.ts
@@ -3,14 +3,14 @@
/**
* @example
* {
- * amountOff: 1,
+ * amountOff: 1000000,
* duration: "duration",
- * durationInMonths: 1,
+ * durationInMonths: 1000000,
* externalId: "external_id",
- * maxRedemptions: 1,
+ * maxRedemptions: 1000000,
* name: "name",
* percentOff: 1.1,
- * timesRedeemed: 1
+ * timesRedeemed: 1000000
* }
*/
export interface CreateCouponRequestBody {
diff --git a/src/api/resources/billing/client/requests/CreateInvoiceRequestBody.ts b/src/api/resources/billing/client/requests/CreateInvoiceRequestBody.ts
index 5c5c966e..87012018 100644
--- a/src/api/resources/billing/client/requests/CreateInvoiceRequestBody.ts
+++ b/src/api/resources/billing/client/requests/CreateInvoiceRequestBody.ts
@@ -5,13 +5,13 @@ import type * as Schematic from "../../../../index";
/**
* @example
* {
- * amountDue: 1,
- * amountPaid: 1,
- * amountRemaining: 1,
+ * amountDue: 1000000,
+ * amountPaid: 1000000,
+ * amountRemaining: 1000000,
* collectionMethod: "collection_method",
* currency: "currency",
* customerExternalId: "customer_external_id",
- * subtotal: 1
+ * subtotal: 1000000
* }
*/
export interface CreateInvoiceRequestBody {
diff --git a/src/api/resources/billing/client/requests/ListBillingPricesRequest.ts b/src/api/resources/billing/client/requests/ListBillingPricesRequest.ts
index b631e36b..93c1a24e 100644
--- a/src/api/resources/billing/client/requests/ListBillingPricesRequest.ts
+++ b/src/api/resources/billing/client/requests/ListBillingPricesRequest.ts
@@ -9,15 +9,15 @@ import type * as Schematic from "../../../../index";
* forTrialExpiryPlan: true,
* interval: "interval",
* isActive: true,
- * price: 1,
+ * price: 1000000,
* productId: "product_id",
* providerType: "schematic",
* q: "q",
* tiersMode: "graduated",
* usageType: "licensed",
* withMeter: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListBillingPricesRequest {
diff --git a/src/api/resources/billing/client/requests/ListBillingProductPricesRequest.ts b/src/api/resources/billing/client/requests/ListBillingProductPricesRequest.ts
index 66c67f0f..babf2b66 100644
--- a/src/api/resources/billing/client/requests/ListBillingProductPricesRequest.ts
+++ b/src/api/resources/billing/client/requests/ListBillingProductPricesRequest.ts
@@ -9,15 +9,15 @@ import type * as Schematic from "../../../../index";
* forTrialExpiryPlan: true,
* interval: "interval",
* isActive: true,
- * price: 1,
+ * price: 1000000,
* productId: "product_id",
* providerType: "schematic",
* q: "q",
* tiersMode: "graduated",
* usageType: "licensed",
* withMeter: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListBillingProductPricesRequest {
diff --git a/src/api/resources/billing/client/requests/ListBillingProductsRequest.ts b/src/api/resources/billing/client/requests/ListBillingProductsRequest.ts
index 9e8d9b74..5b52d029 100644
--- a/src/api/resources/billing/client/requests/ListBillingProductsRequest.ts
+++ b/src/api/resources/billing/client/requests/ListBillingProductsRequest.ts
@@ -14,8 +14,8 @@ import type * as Schematic from "../../../../index";
* withPricesOnly: true,
* withZeroPrice: true,
* withoutLinkedToPlan: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListBillingProductsRequest {
diff --git a/src/api/resources/billing/client/requests/ListCouponsRequest.ts b/src/api/resources/billing/client/requests/ListCouponsRequest.ts
index 9aaee271..f38867ad 100644
--- a/src/api/resources/billing/client/requests/ListCouponsRequest.ts
+++ b/src/api/resources/billing/client/requests/ListCouponsRequest.ts
@@ -5,8 +5,8 @@
* {
* isActive: true,
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListCouponsRequest {
diff --git a/src/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.ts b/src/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.ts
index 79a9b8a2..020f3c13 100644
--- a/src/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.ts
+++ b/src/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.ts
@@ -8,8 +8,8 @@ import type * as Schematic from "../../../../index";
* name: "name",
* providerType: "schematic",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListCustomersWithSubscriptionsRequest {
diff --git a/src/api/resources/billing/client/requests/ListInvoicesRequest.ts b/src/api/resources/billing/client/requests/ListInvoicesRequest.ts
index 2d3d0dd2..a998e2f1 100644
--- a/src/api/resources/billing/client/requests/ListInvoicesRequest.ts
+++ b/src/api/resources/billing/client/requests/ListInvoicesRequest.ts
@@ -6,8 +6,8 @@
* companyId: "company_id",
* customerExternalId: "customer_external_id",
* subscriptionExternalId: "subscription_external_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListInvoicesRequest {
diff --git a/src/api/resources/billing/client/requests/ListMetersRequest.ts b/src/api/resources/billing/client/requests/ListMetersRequest.ts
index c2cc3114..db4b0509 100644
--- a/src/api/resources/billing/client/requests/ListMetersRequest.ts
+++ b/src/api/resources/billing/client/requests/ListMetersRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* displayName: "display_name",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListMetersRequest {
diff --git a/src/api/resources/billing/client/requests/ListPaymentMethodsRequest.ts b/src/api/resources/billing/client/requests/ListPaymentMethodsRequest.ts
index 01fa6bff..ab61e4f7 100644
--- a/src/api/resources/billing/client/requests/ListPaymentMethodsRequest.ts
+++ b/src/api/resources/billing/client/requests/ListPaymentMethodsRequest.ts
@@ -5,8 +5,8 @@
* {
* companyId: "company_id",
* customerExternalId: "customer_external_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListPaymentMethodsRequest {
diff --git a/src/api/resources/billing/exports.ts b/src/api/resources/billing/exports.ts
new file mode 100644
index 00000000..3df14eb2
--- /dev/null
+++ b/src/api/resources/billing/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { BillingClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/checkout/client/Client.ts b/src/api/resources/checkout/client/Client.ts
index 8491f53b..1211364c 100644
--- a/src/api/resources/checkout/client/Client.ts
+++ b/src/api/resources/checkout/client/Client.ts
@@ -42,13 +42,13 @@ export class CheckoutClient {
* companyId: "company_id",
* creditBundles: [{
* bundleId: "bundle_id",
- * quantity: 1
+ * quantity: 1000000
* }],
* newPlanId: "new_plan_id",
* newPriceId: "new_price_id",
* payInAdvance: [{
* priceId: "price_id",
- * quantity: 1
+ * quantity: 1000000
* }],
* skipTrial: true
* })
@@ -325,13 +325,13 @@ export class CheckoutClient {
* companyId: "company_id",
* creditBundles: [{
* bundleId: "bundle_id",
- * quantity: 1
+ * quantity: 1000000
* }],
* newPlanId: "new_plan_id",
* newPriceId: "new_price_id",
* payInAdvance: [{
* priceId: "price_id",
- * quantity: 1
+ * quantity: 1000000
* }],
* skipTrial: true
* })
@@ -474,11 +474,11 @@ export class CheckoutClient {
* companyId: "company_id",
* creditBundles: [{
* bundleId: "bundle_id",
- * quantity: 1
+ * quantity: 1000000
* }],
* payInAdvanceEntitlements: [{
* priceId: "price_id",
- * quantity: 1
+ * quantity: 1000000
* }]
* })
*/
@@ -618,11 +618,11 @@ export class CheckoutClient {
* companyId: "company_id",
* creditBundles: [{
* bundleId: "bundle_id",
- * quantity: 1
+ * quantity: 1000000
* }],
* payInAdvanceEntitlements: [{
* priceId: "price_id",
- * quantity: 1
+ * quantity: 1000000
* }]
* })
*/
diff --git a/src/api/resources/checkout/exports.ts b/src/api/resources/checkout/exports.ts
new file mode 100644
index 00000000..aa634073
--- /dev/null
+++ b/src/api/resources/checkout/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { CheckoutClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/companies/client/Client.ts b/src/api/resources/companies/client/Client.ts
index 621dd958..26795087 100644
--- a/src/api/resources/companies/client/Client.ts
+++ b/src/api/resources/companies/client/Client.ts
@@ -47,8 +47,8 @@ export class CompaniesClient {
* withoutPlan: true,
* withoutSubscription: true,
* withSubscription: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listCompanies(
@@ -82,109 +82,43 @@ export class CompaniesClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (creditTypeIds != null) {
- if (Array.isArray(creditTypeIds)) {
- _queryParams.credit_type_ids = creditTypeIds.map((item) => item);
- } else {
- _queryParams.credit_type_ids = creditTypeIds;
- }
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (monetizedSubscriptions != null) {
- _queryParams.monetized_subscriptions = monetizedSubscriptions.toString();
- }
-
- if (planId != null) {
- _queryParams.plan_id = planId;
- }
-
- if (planIds != null) {
- if (Array.isArray(planIds)) {
- _queryParams.plan_ids = planIds.map((item) => item);
- } else {
- _queryParams.plan_ids = planIds;
- }
- }
-
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (sortOrderColumn != null) {
- _queryParams.sort_order_column = sortOrderColumn;
- }
-
- if (sortOrderDirection != null) {
- _queryParams.sort_order_direction = serializers.SortDirection.jsonOrThrow(sortOrderDirection, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (subscriptionStatuses != null) {
- if (Array.isArray(subscriptionStatuses)) {
- _queryParams.subscription_statuses = subscriptionStatuses.map((item) =>
- serializers.SubscriptionStatus.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
- );
- } else {
- _queryParams.subscription_statuses = serializers.SubscriptionStatus.jsonOrThrow(subscriptionStatuses, {
- unrecognizedObjectKeys: "strip",
- });
- }
- }
-
- if (subscriptionTypes != null) {
- if (Array.isArray(subscriptionTypes)) {
- _queryParams.subscription_types = subscriptionTypes.map((item) =>
- serializers.SubscriptionType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
- );
- } else {
- _queryParams.subscription_types = serializers.SubscriptionType.jsonOrThrow(subscriptionTypes, {
- unrecognizedObjectKeys: "strip",
- });
- }
- }
-
- if (withEntitlementFor != null) {
- _queryParams.with_entitlement_for = withEntitlementFor;
- }
-
- if (withoutFeatureOverrideFor != null) {
- _queryParams.without_feature_override_for = withoutFeatureOverrideFor;
- }
-
- if (withoutPlan != null) {
- _queryParams.without_plan = withoutPlan.toString();
- }
-
- if (withoutSubscription != null) {
- _queryParams.without_subscription = withoutSubscription.toString();
- }
-
- if (withSubscription != null) {
- _queryParams.with_subscription = withSubscription.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ credit_type_ids: creditTypeIds,
+ ids,
+ monetized_subscriptions: monetizedSubscriptions,
+ plan_id: planId,
+ plan_ids: planIds,
+ plan_version_id: planVersionId,
+ q,
+ sort_order_column: sortOrderColumn,
+ sort_order_direction:
+ sortOrderDirection != null
+ ? serializers.SortDirection.jsonOrThrow(sortOrderDirection, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ subscription_statuses: Array.isArray(subscriptionStatuses)
+ ? subscriptionStatuses.map((item) =>
+ serializers.SubscriptionStatus.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
+ )
+ : subscriptionStatuses != null
+ ? serializers.SubscriptionStatus.jsonOrThrow(subscriptionStatuses, {
+ unrecognizedObjectKeys: "strip",
+ })
+ : undefined,
+ subscription_types: Array.isArray(subscriptionTypes)
+ ? subscriptionTypes.map((item) =>
+ serializers.SubscriptionType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
+ )
+ : subscriptionTypes != null
+ ? serializers.SubscriptionType.jsonOrThrow(subscriptionTypes, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ with_entitlement_for: withEntitlementFor,
+ without_feature_override_for: withoutFeatureOverrideFor,
+ without_plan: withoutPlan,
+ without_subscription: withoutSubscription,
+ with_subscription: withSubscription,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -571,15 +505,10 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { cancelSubscription, prorate } = request;
- const _queryParams: Record = {};
- if (cancelSubscription != null) {
- _queryParams.cancel_subscription = cancelSubscription.toString();
- }
-
- if (prorate != null) {
- _queryParams.prorate = prorate.toString();
- }
-
+ const _queryParams: Record = {
+ cancel_subscription: cancelSubscription,
+ prorate,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -707,8 +636,8 @@ export class CompaniesClient {
* withoutPlan: true,
* withoutSubscription: true,
* withSubscription: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countCompanies(
@@ -742,109 +671,43 @@ export class CompaniesClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (creditTypeIds != null) {
- if (Array.isArray(creditTypeIds)) {
- _queryParams.credit_type_ids = creditTypeIds.map((item) => item);
- } else {
- _queryParams.credit_type_ids = creditTypeIds;
- }
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (monetizedSubscriptions != null) {
- _queryParams.monetized_subscriptions = monetizedSubscriptions.toString();
- }
-
- if (planId != null) {
- _queryParams.plan_id = planId;
- }
-
- if (planIds != null) {
- if (Array.isArray(planIds)) {
- _queryParams.plan_ids = planIds.map((item) => item);
- } else {
- _queryParams.plan_ids = planIds;
- }
- }
-
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (sortOrderColumn != null) {
- _queryParams.sort_order_column = sortOrderColumn;
- }
-
- if (sortOrderDirection != null) {
- _queryParams.sort_order_direction = serializers.SortDirection.jsonOrThrow(sortOrderDirection, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (subscriptionStatuses != null) {
- if (Array.isArray(subscriptionStatuses)) {
- _queryParams.subscription_statuses = subscriptionStatuses.map((item) =>
- serializers.SubscriptionStatus.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
- );
- } else {
- _queryParams.subscription_statuses = serializers.SubscriptionStatus.jsonOrThrow(subscriptionStatuses, {
- unrecognizedObjectKeys: "strip",
- });
- }
- }
-
- if (subscriptionTypes != null) {
- if (Array.isArray(subscriptionTypes)) {
- _queryParams.subscription_types = subscriptionTypes.map((item) =>
- serializers.SubscriptionType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
- );
- } else {
- _queryParams.subscription_types = serializers.SubscriptionType.jsonOrThrow(subscriptionTypes, {
- unrecognizedObjectKeys: "strip",
- });
- }
- }
-
- if (withEntitlementFor != null) {
- _queryParams.with_entitlement_for = withEntitlementFor;
- }
-
- if (withoutFeatureOverrideFor != null) {
- _queryParams.without_feature_override_for = withoutFeatureOverrideFor;
- }
-
- if (withoutPlan != null) {
- _queryParams.without_plan = withoutPlan.toString();
- }
-
- if (withoutSubscription != null) {
- _queryParams.without_subscription = withoutSubscription.toString();
- }
-
- if (withSubscription != null) {
- _queryParams.with_subscription = withSubscription.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ credit_type_ids: creditTypeIds,
+ ids,
+ monetized_subscriptions: monetizedSubscriptions,
+ plan_id: planId,
+ plan_ids: planIds,
+ plan_version_id: planVersionId,
+ q,
+ sort_order_column: sortOrderColumn,
+ sort_order_direction:
+ sortOrderDirection != null
+ ? serializers.SortDirection.jsonOrThrow(sortOrderDirection, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ subscription_statuses: Array.isArray(subscriptionStatuses)
+ ? subscriptionStatuses.map((item) =>
+ serializers.SubscriptionStatus.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
+ )
+ : subscriptionStatuses != null
+ ? serializers.SubscriptionStatus.jsonOrThrow(subscriptionStatuses, {
+ unrecognizedObjectKeys: "strip",
+ })
+ : undefined,
+ subscription_types: Array.isArray(subscriptionTypes)
+ ? subscriptionTypes.map((item) =>
+ serializers.SubscriptionType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
+ )
+ : subscriptionTypes != null
+ ? serializers.SubscriptionType.jsonOrThrow(subscriptionTypes, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ with_entitlement_for: withEntitlementFor,
+ without_feature_override_for: withoutFeatureOverrideFor,
+ without_plan: withoutPlan,
+ without_subscription: withoutSubscription,
+ with_subscription: withSubscription,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1220,6 +1083,12 @@ export class CompaniesClient {
}
/**
+ * Company lookup is determined to resolve a company from its keys, similar to how many of our other apis work.
+ * The following approaches will all work to resolve a company and any of them are appropriate:
+ * 1. `/companies/lookup?keys={"foo": "bar", "fizz": "buzz"}`
+ * 2. `/companies/lookup?keys[foo]=bar&keys[fizz]=buzz`
+ * 2. `/companies/lookup?foo=bar&fizz=buzz`
+ *
* @param {Schematic.LookupCompanyRequest} request
* @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
*
@@ -1247,8 +1116,9 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { keys } = request;
- const _queryParams: Record = {};
- _queryParams.keys = toJson(keys);
+ const _queryParams: Record = {
+ keys: toJson(keys),
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1356,8 +1226,8 @@ export class CompaniesClient {
* await client.companies.listCompanyMemberships({
* companyId: "company_id",
* userId: "user_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listCompanyMemberships(
@@ -1372,23 +1242,12 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { companyId, userId, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (userId != null) {
- _queryParams.user_id = userId;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ user_id: userId,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1777,8 +1636,8 @@ export class CompaniesClient {
* @example
* await client.companies.getActiveCompanySubscription({
* companyId: "company_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public getActiveCompanySubscription(
@@ -1793,27 +1652,12 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { companyId, companyIds, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (companyIds != null) {
- if (Array.isArray(companyIds)) {
- _queryParams.company_ids = companyIds.map((item) => item);
- } else {
- _queryParams.company_ids = companyIds;
- }
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ company_ids: companyIds,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2068,8 +1912,8 @@ export class CompaniesClient {
* await client.companies.listEntityKeyDefinitions({
* entityType: "company",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listEntityKeyDefinitions(
@@ -2084,33 +1928,16 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { entityType, ids, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (entityType != null) {
- _queryParams.entity_type = serializers.EntityType.jsonOrThrow(entityType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ entity_type:
+ entityType != null
+ ? serializers.EntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ ids,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2229,8 +2056,8 @@ export class CompaniesClient {
* await client.companies.countEntityKeyDefinitions({
* entityType: "company",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countEntityKeyDefinitions(
@@ -2245,33 +2072,16 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { entityType, ids, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (entityType != null) {
- _queryParams.entity_type = serializers.EntityType.jsonOrThrow(entityType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ entity_type:
+ entityType != null
+ ? serializers.EntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ ids,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2391,8 +2201,8 @@ export class CompaniesClient {
* entityType: "company",
* q: "q",
* traitType: "boolean",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listEntityTraitDefinitions(
@@ -2407,49 +2217,25 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { entityType, ids, q, traitType, traitTypes, limit, offset } = request;
- const _queryParams: Record = {};
- if (entityType != null) {
- _queryParams.entity_type = serializers.EntityType.jsonOrThrow(entityType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (traitType != null) {
- _queryParams.trait_type = serializers.TraitType.jsonOrThrow(traitType, { unrecognizedObjectKeys: "strip" });
- }
-
- if (traitTypes != null) {
- if (Array.isArray(traitTypes)) {
- _queryParams.trait_types = traitTypes.map((item) =>
- serializers.TraitType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
- );
- } else {
- _queryParams.trait_types = serializers.TraitType.jsonOrThrow(traitTypes, {
- unrecognizedObjectKeys: "strip",
- });
- }
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ entity_type:
+ entityType != null
+ ? serializers.EntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ ids,
+ q,
+ trait_type:
+ traitType != null
+ ? serializers.TraitType.jsonOrThrow(traitType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ trait_types: Array.isArray(traitTypes)
+ ? traitTypes.map((item) => serializers.TraitType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }))
+ : traitTypes != null
+ ? serializers.TraitType.jsonOrThrow(traitTypes, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2974,8 +2760,8 @@ export class CompaniesClient {
* entityType: "company",
* q: "q",
* traitType: "boolean",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countEntityTraitDefinitions(
@@ -2990,49 +2776,25 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { entityType, ids, q, traitType, traitTypes, limit, offset } = request;
- const _queryParams: Record = {};
- if (entityType != null) {
- _queryParams.entity_type = serializers.EntityType.jsonOrThrow(entityType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (traitType != null) {
- _queryParams.trait_type = serializers.TraitType.jsonOrThrow(traitType, { unrecognizedObjectKeys: "strip" });
- }
-
- if (traitTypes != null) {
- if (Array.isArray(traitTypes)) {
- _queryParams.trait_types = traitTypes.map((item) =>
- serializers.TraitType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
- );
- } else {
- _queryParams.trait_types = serializers.TraitType.jsonOrThrow(traitTypes, {
- unrecognizedObjectKeys: "strip",
- });
- }
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ entity_type:
+ entityType != null
+ ? serializers.EntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ ids,
+ q,
+ trait_type:
+ traitType != null
+ ? serializers.TraitType.jsonOrThrow(traitType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ trait_types: Array.isArray(traitTypes)
+ ? traitTypes.map((item) => serializers.TraitType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }))
+ : traitTypes != null
+ ? serializers.TraitType.jsonOrThrow(traitTypes, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -3156,8 +2918,8 @@ export class CompaniesClient {
* await client.companies.getEntityTraitValues({
* definitionId: "definition_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public getEntityTraitValues(
@@ -3172,20 +2934,12 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { definitionId, q, limit, offset } = request;
- const _queryParams: Record = {};
- _queryParams.definition_id = definitionId;
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ definition_id: definitionId,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -3305,8 +3059,8 @@ export class CompaniesClient {
* action: "action",
* basePlanAction: "base_plan_action",
* companyId: "company_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listPlanChanges(
@@ -3321,43 +3075,15 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { action, basePlanAction, companyId, companyIds, planIds, limit, offset } = request;
- const _queryParams: Record = {};
- if (action != null) {
- _queryParams.action = action;
- }
-
- if (basePlanAction != null) {
- _queryParams.base_plan_action = basePlanAction;
- }
-
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (companyIds != null) {
- if (Array.isArray(companyIds)) {
- _queryParams.company_ids = companyIds.map((item) => item);
- } else {
- _queryParams.company_ids = companyIds;
- }
- }
-
- if (planIds != null) {
- if (Array.isArray(planIds)) {
- _queryParams.plan_ids = planIds.map((item) => item);
- } else {
- _queryParams.plan_ids = planIds;
- }
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ action,
+ base_plan_action: basePlanAction,
+ company_id: companyId,
+ company_ids: companyIds,
+ plan_ids: planIds,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -3597,8 +3323,8 @@ export class CompaniesClient {
* await client.companies.listPlanTraits({
* planId: "plan_id",
* traitId: "trait_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listPlanTraits(
@@ -3613,39 +3339,14 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { ids, planId, traitId, traitIds, limit, offset } = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (planId != null) {
- _queryParams.plan_id = planId;
- }
-
- if (traitId != null) {
- _queryParams.trait_id = traitId;
- }
-
- if (traitIds != null) {
- if (Array.isArray(traitIds)) {
- _queryParams.trait_ids = traitIds.map((item) => item);
- } else {
- _queryParams.trait_ids = traitIds;
- }
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ plan_id: planId,
+ trait_id: traitId,
+ trait_ids: traitIds,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -4423,8 +4124,8 @@ export class CompaniesClient {
* await client.companies.countPlanTraits({
* planId: "plan_id",
* traitId: "trait_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countPlanTraits(
@@ -4439,39 +4140,14 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { ids, planId, traitId, traitIds, limit, offset } = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (planId != null) {
- _queryParams.plan_id = planId;
- }
-
- if (traitId != null) {
- _queryParams.trait_id = traitId;
- }
-
- if (traitIds != null) {
- if (Array.isArray(traitIds)) {
- _queryParams.trait_ids = traitIds.map((item) => item);
- } else {
- _queryParams.trait_ids = traitIds;
- }
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ plan_id: planId,
+ trait_id: traitId,
+ trait_ids: traitIds,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -4727,8 +4403,8 @@ export class CompaniesClient {
* companyId: "company_id",
* planId: "plan_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listUsers(
@@ -4743,35 +4419,14 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { companyId, ids, planId, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (planId != null) {
- _queryParams.plan_id = planId;
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ ids,
+ plan_id: planId,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -5270,8 +4925,8 @@ export class CompaniesClient {
* companyId: "company_id",
* planId: "plan_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countUsers(
@@ -5286,35 +4941,14 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { companyId, ids, planId, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (planId != null) {
- _queryParams.plan_id = planId;
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ ids,
+ plan_id: planId,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -5717,8 +5351,9 @@ export class CompaniesClient {
requestOptions?: CompaniesClient.RequestOptions,
): Promise> {
const { keys } = request;
- const _queryParams: Record = {};
- _queryParams.keys = toJson(keys);
+ const _queryParams: Record = {
+ keys: toJson(keys),
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/companies/client/requests/CountCompaniesRequest.ts b/src/api/resources/companies/client/requests/CountCompaniesRequest.ts
index a7b50442..6a863c39 100644
--- a/src/api/resources/companies/client/requests/CountCompaniesRequest.ts
+++ b/src/api/resources/companies/client/requests/CountCompaniesRequest.ts
@@ -16,8 +16,8 @@ import type * as Schematic from "../../../../index";
* withoutPlan: true,
* withoutSubscription: true,
* withSubscription: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountCompaniesRequest {
diff --git a/src/api/resources/companies/client/requests/CountEntityKeyDefinitionsRequest.ts b/src/api/resources/companies/client/requests/CountEntityKeyDefinitionsRequest.ts
index e38d9308..1e798207 100644
--- a/src/api/resources/companies/client/requests/CountEntityKeyDefinitionsRequest.ts
+++ b/src/api/resources/companies/client/requests/CountEntityKeyDefinitionsRequest.ts
@@ -7,8 +7,8 @@ import type * as Schematic from "../../../../index";
* {
* entityType: "company",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountEntityKeyDefinitionsRequest {
diff --git a/src/api/resources/companies/client/requests/CountEntityTraitDefinitionsRequest.ts b/src/api/resources/companies/client/requests/CountEntityTraitDefinitionsRequest.ts
index 9cc8fcd0..8da73346 100644
--- a/src/api/resources/companies/client/requests/CountEntityTraitDefinitionsRequest.ts
+++ b/src/api/resources/companies/client/requests/CountEntityTraitDefinitionsRequest.ts
@@ -8,8 +8,8 @@ import type * as Schematic from "../../../../index";
* entityType: "company",
* q: "q",
* traitType: "boolean",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountEntityTraitDefinitionsRequest {
diff --git a/src/api/resources/companies/client/requests/CountPlanTraitsRequest.ts b/src/api/resources/companies/client/requests/CountPlanTraitsRequest.ts
index 506c9eea..53e6ebc3 100644
--- a/src/api/resources/companies/client/requests/CountPlanTraitsRequest.ts
+++ b/src/api/resources/companies/client/requests/CountPlanTraitsRequest.ts
@@ -5,8 +5,8 @@
* {
* planId: "plan_id",
* traitId: "trait_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountPlanTraitsRequest {
diff --git a/src/api/resources/companies/client/requests/CountUsersRequest.ts b/src/api/resources/companies/client/requests/CountUsersRequest.ts
index 0f2ec114..fc4fab7c 100644
--- a/src/api/resources/companies/client/requests/CountUsersRequest.ts
+++ b/src/api/resources/companies/client/requests/CountUsersRequest.ts
@@ -6,8 +6,8 @@
* companyId: "company_id",
* planId: "plan_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountUsersRequest {
diff --git a/src/api/resources/companies/client/requests/GetActiveCompanySubscriptionRequest.ts b/src/api/resources/companies/client/requests/GetActiveCompanySubscriptionRequest.ts
index 9fe68ba3..868e7ccc 100644
--- a/src/api/resources/companies/client/requests/GetActiveCompanySubscriptionRequest.ts
+++ b/src/api/resources/companies/client/requests/GetActiveCompanySubscriptionRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* companyId: "company_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface GetActiveCompanySubscriptionRequest {
diff --git a/src/api/resources/companies/client/requests/GetEntityTraitValuesRequest.ts b/src/api/resources/companies/client/requests/GetEntityTraitValuesRequest.ts
index 303f2492..a9655e09 100644
--- a/src/api/resources/companies/client/requests/GetEntityTraitValuesRequest.ts
+++ b/src/api/resources/companies/client/requests/GetEntityTraitValuesRequest.ts
@@ -5,8 +5,8 @@
* {
* definitionId: "definition_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface GetEntityTraitValuesRequest {
diff --git a/src/api/resources/companies/client/requests/ListCompaniesRequest.ts b/src/api/resources/companies/client/requests/ListCompaniesRequest.ts
index 52153529..ad335867 100644
--- a/src/api/resources/companies/client/requests/ListCompaniesRequest.ts
+++ b/src/api/resources/companies/client/requests/ListCompaniesRequest.ts
@@ -16,8 +16,8 @@ import type * as Schematic from "../../../../index";
* withoutPlan: true,
* withoutSubscription: true,
* withSubscription: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListCompaniesRequest {
diff --git a/src/api/resources/companies/client/requests/ListCompanyMembershipsRequest.ts b/src/api/resources/companies/client/requests/ListCompanyMembershipsRequest.ts
index 238c9c20..a0494111 100644
--- a/src/api/resources/companies/client/requests/ListCompanyMembershipsRequest.ts
+++ b/src/api/resources/companies/client/requests/ListCompanyMembershipsRequest.ts
@@ -5,8 +5,8 @@
* {
* companyId: "company_id",
* userId: "user_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListCompanyMembershipsRequest {
diff --git a/src/api/resources/companies/client/requests/ListEntityKeyDefinitionsRequest.ts b/src/api/resources/companies/client/requests/ListEntityKeyDefinitionsRequest.ts
index 98c0d1aa..c978f5c8 100644
--- a/src/api/resources/companies/client/requests/ListEntityKeyDefinitionsRequest.ts
+++ b/src/api/resources/companies/client/requests/ListEntityKeyDefinitionsRequest.ts
@@ -7,8 +7,8 @@ import type * as Schematic from "../../../../index";
* {
* entityType: "company",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListEntityKeyDefinitionsRequest {
diff --git a/src/api/resources/companies/client/requests/ListEntityTraitDefinitionsRequest.ts b/src/api/resources/companies/client/requests/ListEntityTraitDefinitionsRequest.ts
index c36e557a..87b1734a 100644
--- a/src/api/resources/companies/client/requests/ListEntityTraitDefinitionsRequest.ts
+++ b/src/api/resources/companies/client/requests/ListEntityTraitDefinitionsRequest.ts
@@ -8,8 +8,8 @@ import type * as Schematic from "../../../../index";
* entityType: "company",
* q: "q",
* traitType: "boolean",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListEntityTraitDefinitionsRequest {
diff --git a/src/api/resources/companies/client/requests/ListPlanChangesRequest.ts b/src/api/resources/companies/client/requests/ListPlanChangesRequest.ts
index b16f5e2e..c7632ec1 100644
--- a/src/api/resources/companies/client/requests/ListPlanChangesRequest.ts
+++ b/src/api/resources/companies/client/requests/ListPlanChangesRequest.ts
@@ -6,8 +6,8 @@
* action: "action",
* basePlanAction: "base_plan_action",
* companyId: "company_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListPlanChangesRequest {
diff --git a/src/api/resources/companies/client/requests/ListPlanTraitsRequest.ts b/src/api/resources/companies/client/requests/ListPlanTraitsRequest.ts
index 4f47507f..cc824c94 100644
--- a/src/api/resources/companies/client/requests/ListPlanTraitsRequest.ts
+++ b/src/api/resources/companies/client/requests/ListPlanTraitsRequest.ts
@@ -5,8 +5,8 @@
* {
* planId: "plan_id",
* traitId: "trait_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListPlanTraitsRequest {
diff --git a/src/api/resources/companies/client/requests/ListUsersRequest.ts b/src/api/resources/companies/client/requests/ListUsersRequest.ts
index 3ae25a5a..8b778d36 100644
--- a/src/api/resources/companies/client/requests/ListUsersRequest.ts
+++ b/src/api/resources/companies/client/requests/ListUsersRequest.ts
@@ -6,8 +6,8 @@
* companyId: "company_id",
* planId: "plan_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListUsersRequest {
diff --git a/src/api/resources/companies/exports.ts b/src/api/resources/companies/exports.ts
new file mode 100644
index 00000000..b2ff6b6a
--- /dev/null
+++ b/src/api/resources/companies/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { CompaniesClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/components/client/Client.ts b/src/api/resources/components/client/Client.ts
index cb01fc0b..b07288db 100644
--- a/src/api/resources/components/client/Client.ts
+++ b/src/api/resources/components/client/Client.ts
@@ -36,8 +36,8 @@ export class ComponentsClient {
* @example
* await client.components.listComponents({
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listComponents(
@@ -52,19 +52,11 @@ export class ComponentsClient {
requestOptions?: ComponentsClient.RequestOptions,
): Promise> {
const { q, limit, offset } = request;
- const _queryParams: Record = {};
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -694,8 +686,8 @@ export class ComponentsClient {
* @example
* await client.components.countComponents({
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countComponents(
@@ -710,19 +702,11 @@ export class ComponentsClient {
requestOptions?: ComponentsClient.RequestOptions,
): Promise> {
const { q, limit, offset } = request;
- const _queryParams: Record = {};
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -854,15 +838,10 @@ export class ComponentsClient {
requestOptions?: ComponentsClient.RequestOptions,
): Promise> {
const { companyId, componentId } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (componentId != null) {
- _queryParams.component_id = componentId;
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ component_id: componentId,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/components/client/requests/CountComponentsRequest.ts b/src/api/resources/components/client/requests/CountComponentsRequest.ts
index 581450a5..7068c453 100644
--- a/src/api/resources/components/client/requests/CountComponentsRequest.ts
+++ b/src/api/resources/components/client/requests/CountComponentsRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountComponentsRequest {
diff --git a/src/api/resources/components/client/requests/ListComponentsRequest.ts b/src/api/resources/components/client/requests/ListComponentsRequest.ts
index 3f5c6863..2a0b583c 100644
--- a/src/api/resources/components/client/requests/ListComponentsRequest.ts
+++ b/src/api/resources/components/client/requests/ListComponentsRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListComponentsRequest {
diff --git a/src/api/resources/components/exports.ts b/src/api/resources/components/exports.ts
new file mode 100644
index 00000000..fbca1f00
--- /dev/null
+++ b/src/api/resources/components/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { ComponentsClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/componentspublic/exports.ts b/src/api/resources/componentspublic/exports.ts
new file mode 100644
index 00000000..b0e85451
--- /dev/null
+++ b/src/api/resources/componentspublic/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { ComponentspublicClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/credits/client/Client.ts b/src/api/resources/credits/client/Client.ts
index ac30a64e..8ebad160 100644
--- a/src/api/resources/credits/client/Client.ts
+++ b/src/api/resources/credits/client/Client.ts
@@ -36,8 +36,8 @@ export class CreditsClient {
* @example
* await client.credits.listBillingCredits({
* name: "name",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listBillingCredits(
@@ -52,27 +52,12 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { ids, name, limit, offset } = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (name != null) {
- _queryParams.name = name;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ name,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -713,8 +698,8 @@ export class CreditsClient {
* creditId: "credit_id",
* status: "active",
* bundleType: "fixed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listCreditBundles(
@@ -729,39 +714,20 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { ids, creditId, status, bundleType, limit, offset } = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (creditId != null) {
- _queryParams.credit_id = creditId;
- }
-
- if (status != null) {
- _queryParams.status = serializers.BillingCreditBundleStatus.jsonOrThrow(status, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (bundleType != null) {
- _queryParams.bundle_type = serializers.BillingCreditBundleType.jsonOrThrow(bundleType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ credit_id: creditId,
+ status:
+ status != null
+ ? serializers.BillingCreditBundleStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ bundle_type:
+ bundleType != null
+ ? serializers.BillingCreditBundleType.jsonOrThrow(bundleType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -881,7 +847,7 @@ export class CreditsClient {
* bundleName: "bundle_name",
* creditId: "credit_id",
* currency: "currency",
- * pricePerUnit: 1
+ * pricePerUnit: 1000000
* })
*/
public createCreditBundle(
@@ -1137,7 +1103,7 @@ export class CreditsClient {
* @example
* await client.credits.updateCreditBundleDetails("bundle_id", {
* bundleName: "bundle_name",
- * pricePerUnit: 1
+ * pricePerUnit: 1000000
* })
*/
public updateCreditBundleDetails(
@@ -1417,8 +1383,8 @@ export class CreditsClient {
* creditId: "credit_id",
* status: "active",
* bundleType: "fixed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countCreditBundles(
@@ -1433,39 +1399,20 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { ids, creditId, status, bundleType, limit, offset } = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (creditId != null) {
- _queryParams.credit_id = creditId;
- }
-
- if (status != null) {
- _queryParams.status = serializers.BillingCreditBundleStatus.jsonOrThrow(status, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (bundleType != null) {
- _queryParams.bundle_type = serializers.BillingCreditBundleType.jsonOrThrow(bundleType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ credit_id: creditId,
+ status:
+ status != null
+ ? serializers.BillingCreditBundleStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ bundle_type:
+ bundleType != null
+ ? serializers.BillingCreditBundleType.jsonOrThrow(bundleType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1588,8 +1535,8 @@ export class CreditsClient {
* @example
* await client.credits.countBillingCredits({
* name: "name",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countBillingCredits(
@@ -1604,27 +1551,12 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { ids, name, limit, offset } = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (name != null) {
- _queryParams.name = name;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ name,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1882,7 +1814,7 @@ export class CreditsClient {
* await client.credits.grantBillingCreditsToCompany({
* companyId: "company_id",
* creditId: "credit_id",
- * quantity: 1,
+ * quantity: 1000000,
* reason: "billing_credit_auto_topup"
* })
*/
@@ -2024,8 +1956,8 @@ export class CreditsClient {
* companyId: "company_id",
* order: "created_at",
* dir: "asc",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countCompanyGrants(
@@ -2040,29 +1972,19 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { companyId, order, dir, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (order != null) {
- _queryParams.order = serializers.CreditGrantSortOrder.jsonOrThrow(order, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (dir != null) {
- _queryParams.dir = serializers.SortDirection.jsonOrThrow(dir, { unrecognizedObjectKeys: "strip" });
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ order:
+ order != null
+ ? serializers.CreditGrantSortOrder.jsonOrThrow(order, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ dir:
+ dir != null
+ ? serializers.SortDirection.jsonOrThrow(dir, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2187,8 +2109,8 @@ export class CreditsClient {
* companyId: "company_id",
* order: "created_at",
* dir: "asc",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listCompanyGrants(
@@ -2203,29 +2125,19 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { companyId, order, dir, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (order != null) {
- _queryParams.order = serializers.CreditGrantSortOrder.jsonOrThrow(order, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (dir != null) {
- _queryParams.dir = serializers.SortDirection.jsonOrThrow(dir, { unrecognizedObjectKeys: "strip" });
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ order:
+ order != null
+ ? serializers.CreditGrantSortOrder.jsonOrThrow(order, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ dir:
+ dir != null
+ ? serializers.SortDirection.jsonOrThrow(dir, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2348,8 +2260,8 @@ export class CreditsClient {
* @example
* await client.credits.countBillingCreditsGrants({
* creditId: "credit_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countBillingCreditsGrants(
@@ -2364,27 +2276,12 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { creditId, ids, limit, offset } = request;
- const _queryParams: Record = {};
- if (creditId != null) {
- _queryParams.credit_id = creditId;
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ credit_id: creditId,
+ ids,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2502,8 +2399,8 @@ export class CreditsClient {
* @example
* await client.credits.listGrantsForCredit({
* creditId: "credit_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listGrantsForCredit(
@@ -2518,27 +2415,12 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { creditId, ids, limit, offset } = request;
- const _queryParams: Record = {};
- if (creditId != null) {
- _queryParams.credit_id = creditId;
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ credit_id: creditId,
+ ids,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2661,8 +2543,8 @@ export class CreditsClient {
* period: "daily",
* startTime: "start_time",
* endTime: "end_time",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public getEnrichedCreditLedger(
@@ -2677,33 +2559,16 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { companyId, billingCreditId, featureId, period, startTime, endTime, limit, offset } = request;
- const _queryParams: Record = {};
- _queryParams.company_id = companyId;
- if (billingCreditId != null) {
- _queryParams.billing_credit_id = billingCreditId;
- }
-
- if (featureId != null) {
- _queryParams.feature_id = featureId;
- }
-
- _queryParams.period = serializers.CreditLedgerPeriod.jsonOrThrow(period, { unrecognizedObjectKeys: "strip" });
- if (startTime != null) {
- _queryParams.start_time = startTime;
- }
-
- if (endTime != null) {
- _queryParams.end_time = endTime;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ billing_credit_id: billingCreditId,
+ feature_id: featureId,
+ period: serializers.CreditLedgerPeriod.jsonOrThrow(period, { unrecognizedObjectKeys: "strip" }),
+ start_time: startTime,
+ end_time: endTime,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2826,8 +2691,8 @@ export class CreditsClient {
* period: "daily",
* startTime: "start_time",
* endTime: "end_time",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countCreditLedger(
@@ -2842,33 +2707,16 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { companyId, billingCreditId, featureId, period, startTime, endTime, limit, offset } = request;
- const _queryParams: Record = {};
- _queryParams.company_id = companyId;
- if (billingCreditId != null) {
- _queryParams.billing_credit_id = billingCreditId;
- }
-
- if (featureId != null) {
- _queryParams.feature_id = featureId;
- }
-
- _queryParams.period = serializers.CreditLedgerPeriod.jsonOrThrow(period, { unrecognizedObjectKeys: "strip" });
- if (startTime != null) {
- _queryParams.start_time = startTime;
- }
-
- if (endTime != null) {
- _queryParams.end_time = endTime;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ billing_credit_id: billingCreditId,
+ feature_id: featureId,
+ period: serializers.CreditLedgerPeriod.jsonOrThrow(period, { unrecognizedObjectKeys: "strip" }),
+ start_time: startTime,
+ end_time: endTime,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2988,8 +2836,8 @@ export class CreditsClient {
* creditId: "credit_id",
* planId: "plan_id",
* planVersionId: "plan_version_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listBillingPlanCreditGrants(
@@ -3004,43 +2852,15 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { creditId, ids, planId, planIds, planVersionId, limit, offset } = request;
- const _queryParams: Record = {};
- if (creditId != null) {
- _queryParams.credit_id = creditId;
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (planId != null) {
- _queryParams.plan_id = planId;
- }
-
- if (planIds != null) {
- if (Array.isArray(planIds)) {
- _queryParams.plan_ids = planIds.map((item) => item);
- } else {
- _queryParams.plan_ids = planIds;
- }
- }
-
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ credit_id: creditId,
+ ids,
+ plan_id: planId,
+ plan_ids: planIds,
+ plan_version_id: planVersionId,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -3157,7 +2977,7 @@ export class CreditsClient {
*
* @example
* await client.credits.createBillingPlanCreditGrant({
- * creditAmount: 1,
+ * creditAmount: 1000000,
* creditId: "credit_id",
* planId: "plan_id",
* resetCadence: "daily",
@@ -3462,11 +3282,9 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { applyToExisting } = request;
- const _queryParams: Record = {};
- if (applyToExisting != null) {
- _queryParams.apply_to_existing = applyToExisting.toString();
- }
-
+ const _queryParams: Record = {
+ apply_to_existing: applyToExisting,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -3591,8 +3409,8 @@ export class CreditsClient {
* creditId: "credit_id",
* planId: "plan_id",
* planVersionId: "plan_version_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countBillingPlanCreditGrants(
@@ -3607,43 +3425,15 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { creditId, ids, planId, planIds, planVersionId, limit, offset } = request;
- const _queryParams: Record = {};
- if (creditId != null) {
- _queryParams.credit_id = creditId;
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (planId != null) {
- _queryParams.plan_id = planId;
- }
-
- if (planIds != null) {
- if (Array.isArray(planIds)) {
- _queryParams.plan_ids = planIds.map((item) => item);
- } else {
- _queryParams.plan_ids = planIds;
- }
- }
-
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ credit_id: creditId,
+ ids,
+ plan_id: planId,
+ plan_ids: planIds,
+ plan_version_id: planVersionId,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -3771,8 +3561,8 @@ export class CreditsClient {
* eventType: "grant",
* featureId: "feature_id",
* startTime: "start_time",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listCreditEventLedger(
@@ -3787,38 +3577,19 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { billingCreditId, companyId, endTime, eventType, featureId, startTime, limit, offset } = request;
- const _queryParams: Record = {};
- if (billingCreditId != null) {
- _queryParams.billing_credit_id = billingCreditId;
- }
-
- _queryParams.company_id = companyId;
- if (endTime != null) {
- _queryParams.end_time = endTime;
- }
-
- if (eventType != null) {
- _queryParams.event_type = serializers.CreditEventType.jsonOrThrow(eventType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (featureId != null) {
- _queryParams.feature_id = featureId;
- }
-
- if (startTime != null) {
- _queryParams.start_time = startTime;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ billing_credit_id: billingCreditId,
+ company_id: companyId,
+ end_time: endTime,
+ event_type:
+ eventType != null
+ ? serializers.CreditEventType.jsonOrThrow(eventType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ feature_id: featureId,
+ start_time: startTime,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -3941,8 +3712,8 @@ export class CreditsClient {
* eventType: "grant",
* featureId: "feature_id",
* startTime: "start_time",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countCreditEventLedger(
@@ -3957,38 +3728,19 @@ export class CreditsClient {
requestOptions?: CreditsClient.RequestOptions,
): Promise> {
const { billingCreditId, companyId, endTime, eventType, featureId, startTime, limit, offset } = request;
- const _queryParams: Record = {};
- if (billingCreditId != null) {
- _queryParams.billing_credit_id = billingCreditId;
- }
-
- _queryParams.company_id = companyId;
- if (endTime != null) {
- _queryParams.end_time = endTime;
- }
-
- if (eventType != null) {
- _queryParams.event_type = serializers.CreditEventType.jsonOrThrow(eventType, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (featureId != null) {
- _queryParams.feature_id = featureId;
- }
-
- if (startTime != null) {
- _queryParams.start_time = startTime;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ billing_credit_id: billingCreditId,
+ company_id: companyId,
+ end_time: endTime,
+ event_type:
+ eventType != null
+ ? serializers.CreditEventType.jsonOrThrow(eventType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ feature_id: featureId,
+ start_time: startTime,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.ts b/src/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.ts
index 22150c12..7c9a9f9d 100644
--- a/src/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.ts
+++ b/src/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* creditId: "credit_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountBillingCreditsGrantsRequest {
diff --git a/src/api/resources/credits/client/requests/CountBillingCreditsRequest.ts b/src/api/resources/credits/client/requests/CountBillingCreditsRequest.ts
index 3aa5a665..d6582fd1 100644
--- a/src/api/resources/credits/client/requests/CountBillingCreditsRequest.ts
+++ b/src/api/resources/credits/client/requests/CountBillingCreditsRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* name: "name",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountBillingCreditsRequest {
diff --git a/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts b/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts
index bde368e2..bde0d9cf 100644
--- a/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts
+++ b/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts
@@ -6,8 +6,8 @@
* creditId: "credit_id",
* planId: "plan_id",
* planVersionId: "plan_version_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountBillingPlanCreditGrantsRequest {
diff --git a/src/api/resources/credits/client/requests/CountCompanyGrantsRequest.ts b/src/api/resources/credits/client/requests/CountCompanyGrantsRequest.ts
index ef05481b..664ccf36 100644
--- a/src/api/resources/credits/client/requests/CountCompanyGrantsRequest.ts
+++ b/src/api/resources/credits/client/requests/CountCompanyGrantsRequest.ts
@@ -8,8 +8,8 @@ import type * as Schematic from "../../../../index";
* companyId: "company_id",
* order: "created_at",
* dir: "asc",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountCompanyGrantsRequest {
diff --git a/src/api/resources/credits/client/requests/CountCreditBundlesRequest.ts b/src/api/resources/credits/client/requests/CountCreditBundlesRequest.ts
index d32757ab..895363d8 100644
--- a/src/api/resources/credits/client/requests/CountCreditBundlesRequest.ts
+++ b/src/api/resources/credits/client/requests/CountCreditBundlesRequest.ts
@@ -8,8 +8,8 @@ import type * as Schematic from "../../../../index";
* creditId: "credit_id",
* status: "active",
* bundleType: "fixed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountCreditBundlesRequest {
diff --git a/src/api/resources/credits/client/requests/CountCreditEventLedgerRequest.ts b/src/api/resources/credits/client/requests/CountCreditEventLedgerRequest.ts
index e1679ffa..fe2107c4 100644
--- a/src/api/resources/credits/client/requests/CountCreditEventLedgerRequest.ts
+++ b/src/api/resources/credits/client/requests/CountCreditEventLedgerRequest.ts
@@ -11,8 +11,8 @@ import type * as Schematic from "../../../../index";
* eventType: "grant",
* featureId: "feature_id",
* startTime: "start_time",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountCreditEventLedgerRequest {
diff --git a/src/api/resources/credits/client/requests/CountCreditLedgerRequest.ts b/src/api/resources/credits/client/requests/CountCreditLedgerRequest.ts
index 0ae76ca9..d1f8513c 100644
--- a/src/api/resources/credits/client/requests/CountCreditLedgerRequest.ts
+++ b/src/api/resources/credits/client/requests/CountCreditLedgerRequest.ts
@@ -11,8 +11,8 @@ import type * as Schematic from "../../../../index";
* period: "daily",
* startTime: "start_time",
* endTime: "end_time",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountCreditLedgerRequest {
diff --git a/src/api/resources/credits/client/requests/CreateCompanyCreditGrant.ts b/src/api/resources/credits/client/requests/CreateCompanyCreditGrant.ts
index dbf478af..7f3b7dc0 100644
--- a/src/api/resources/credits/client/requests/CreateCompanyCreditGrant.ts
+++ b/src/api/resources/credits/client/requests/CreateCompanyCreditGrant.ts
@@ -7,7 +7,7 @@ import type * as Schematic from "../../../../index";
* {
* companyId: "company_id",
* creditId: "credit_id",
- * quantity: 1,
+ * quantity: 1000000,
* reason: "billing_credit_auto_topup"
* }
*/
diff --git a/src/api/resources/credits/client/requests/CreateCreditBundleRequestBody.ts b/src/api/resources/credits/client/requests/CreateCreditBundleRequestBody.ts
index 655d7fd4..4f8bc5a6 100644
--- a/src/api/resources/credits/client/requests/CreateCreditBundleRequestBody.ts
+++ b/src/api/resources/credits/client/requests/CreateCreditBundleRequestBody.ts
@@ -8,7 +8,7 @@ import type * as Schematic from "../../../../index";
* bundleName: "bundle_name",
* creditId: "credit_id",
* currency: "currency",
- * pricePerUnit: 1
+ * pricePerUnit: 1000000
* }
*/
export interface CreateCreditBundleRequestBody {
diff --git a/src/api/resources/credits/client/requests/GetEnrichedCreditLedgerRequest.ts b/src/api/resources/credits/client/requests/GetEnrichedCreditLedgerRequest.ts
index 4973c2a4..cba1ed2c 100644
--- a/src/api/resources/credits/client/requests/GetEnrichedCreditLedgerRequest.ts
+++ b/src/api/resources/credits/client/requests/GetEnrichedCreditLedgerRequest.ts
@@ -11,8 +11,8 @@ import type * as Schematic from "../../../../index";
* period: "daily",
* startTime: "start_time",
* endTime: "end_time",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface GetEnrichedCreditLedgerRequest {
diff --git a/src/api/resources/credits/client/requests/ListBillingCreditsRequest.ts b/src/api/resources/credits/client/requests/ListBillingCreditsRequest.ts
index 38798198..1e7eb865 100644
--- a/src/api/resources/credits/client/requests/ListBillingCreditsRequest.ts
+++ b/src/api/resources/credits/client/requests/ListBillingCreditsRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* name: "name",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListBillingCreditsRequest {
diff --git a/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts b/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts
index bb748a1f..1d3b0982 100644
--- a/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts
+++ b/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts
@@ -6,8 +6,8 @@
* creditId: "credit_id",
* planId: "plan_id",
* planVersionId: "plan_version_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListBillingPlanCreditGrantsRequest {
diff --git a/src/api/resources/credits/client/requests/ListCompanyGrantsRequest.ts b/src/api/resources/credits/client/requests/ListCompanyGrantsRequest.ts
index d2c2735b..1102ae8b 100644
--- a/src/api/resources/credits/client/requests/ListCompanyGrantsRequest.ts
+++ b/src/api/resources/credits/client/requests/ListCompanyGrantsRequest.ts
@@ -8,8 +8,8 @@ import type * as Schematic from "../../../../index";
* companyId: "company_id",
* order: "created_at",
* dir: "asc",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListCompanyGrantsRequest {
diff --git a/src/api/resources/credits/client/requests/ListCreditBundlesRequest.ts b/src/api/resources/credits/client/requests/ListCreditBundlesRequest.ts
index eee69fce..7261f0c6 100644
--- a/src/api/resources/credits/client/requests/ListCreditBundlesRequest.ts
+++ b/src/api/resources/credits/client/requests/ListCreditBundlesRequest.ts
@@ -8,8 +8,8 @@ import type * as Schematic from "../../../../index";
* creditId: "credit_id",
* status: "active",
* bundleType: "fixed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListCreditBundlesRequest {
diff --git a/src/api/resources/credits/client/requests/ListCreditEventLedgerRequest.ts b/src/api/resources/credits/client/requests/ListCreditEventLedgerRequest.ts
index 780d1c65..7c25124b 100644
--- a/src/api/resources/credits/client/requests/ListCreditEventLedgerRequest.ts
+++ b/src/api/resources/credits/client/requests/ListCreditEventLedgerRequest.ts
@@ -11,8 +11,8 @@ import type * as Schematic from "../../../../index";
* eventType: "grant",
* featureId: "feature_id",
* startTime: "start_time",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListCreditEventLedgerRequest {
diff --git a/src/api/resources/credits/client/requests/ListGrantsForCreditRequest.ts b/src/api/resources/credits/client/requests/ListGrantsForCreditRequest.ts
index f2ec4c72..c1139d58 100644
--- a/src/api/resources/credits/client/requests/ListGrantsForCreditRequest.ts
+++ b/src/api/resources/credits/client/requests/ListGrantsForCreditRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* creditId: "credit_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListGrantsForCreditRequest {
diff --git a/src/api/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.ts b/src/api/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.ts
index 892c7836..57710f95 100644
--- a/src/api/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.ts
+++ b/src/api/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.ts
@@ -6,7 +6,7 @@ import type * as Schematic from "../../../../index";
* @example
* {
* bundleName: "bundle_name",
- * pricePerUnit: 1
+ * pricePerUnit: 1000000
* }
*/
export interface UpdateCreditBundleDetailsRequestBody {
diff --git a/src/api/resources/credits/exports.ts b/src/api/resources/credits/exports.ts
new file mode 100644
index 00000000..0b1c3f20
--- /dev/null
+++ b/src/api/resources/credits/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { CreditsClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/dataexports/exports.ts b/src/api/resources/dataexports/exports.ts
new file mode 100644
index 00000000..d36343bb
--- /dev/null
+++ b/src/api/resources/dataexports/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { DataexportsClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/entitlements/client/Client.ts b/src/api/resources/entitlements/client/Client.ts
index e94c2dd1..4777a57f 100644
--- a/src/api/resources/entitlements/client/Client.ts
+++ b/src/api/resources/entitlements/client/Client.ts
@@ -40,8 +40,8 @@ export class EntitlementsClient {
* featureId: "feature_id",
* withoutExpired: true,
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listCompanyOverrides(
@@ -56,55 +56,17 @@ export class EntitlementsClient {
requestOptions?: EntitlementsClient.RequestOptions,
): Promise> {
const { companyId, companyIds, featureId, featureIds, ids, withoutExpired, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (companyIds != null) {
- if (Array.isArray(companyIds)) {
- _queryParams.company_ids = companyIds.map((item) => item);
- } else {
- _queryParams.company_ids = companyIds;
- }
- }
-
- if (featureId != null) {
- _queryParams.feature_id = featureId;
- }
-
- if (featureIds != null) {
- if (Array.isArray(featureIds)) {
- _queryParams.feature_ids = featureIds.map((item) => item);
- } else {
- _queryParams.feature_ids = featureIds;
- }
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (withoutExpired != null) {
- _queryParams.without_expired = withoutExpired.toString();
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ company_ids: companyIds,
+ feature_id: featureId,
+ feature_ids: featureIds,
+ ids,
+ without_expired: withoutExpired,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -761,8 +723,8 @@ export class EntitlementsClient {
* featureId: "feature_id",
* withoutExpired: true,
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countCompanyOverrides(
@@ -777,55 +739,17 @@ export class EntitlementsClient {
requestOptions?: EntitlementsClient.RequestOptions,
): Promise> {
const { companyId, companyIds, featureId, featureIds, ids, withoutExpired, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (companyIds != null) {
- if (Array.isArray(companyIds)) {
- _queryParams.company_ids = companyIds.map((item) => item);
- } else {
- _queryParams.company_ids = companyIds;
- }
- }
-
- if (featureId != null) {
- _queryParams.feature_id = featureId;
- }
-
- if (featureIds != null) {
- if (Array.isArray(featureIds)) {
- _queryParams.feature_ids = featureIds.map((item) => item);
- } else {
- _queryParams.feature_ids = featureIds;
- }
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (withoutExpired != null) {
- _queryParams.without_expired = withoutExpired.toString();
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ company_ids: companyIds,
+ feature_id: featureId,
+ feature_ids: featureIds,
+ ids,
+ without_expired: withoutExpired,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -944,8 +868,8 @@ export class EntitlementsClient {
* await client.entitlements.listFeatureCompanies({
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listFeatureCompanies(
@@ -960,20 +884,12 @@ export class EntitlementsClient {
requestOptions?: EntitlementsClient.RequestOptions,
): Promise> {
const { featureId, q, limit, offset } = request;
- const _queryParams: Record = {};
- _queryParams.feature_id = featureId;
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ feature_id: featureId,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1092,8 +1008,8 @@ export class EntitlementsClient {
* await client.entitlements.countFeatureCompanies({
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countFeatureCompanies(
@@ -1108,20 +1024,12 @@ export class EntitlementsClient {
requestOptions?: EntitlementsClient.RequestOptions,
): Promise> {
const { featureId, q, limit, offset } = request;
- const _queryParams: Record = {};
- _queryParams.feature_id = featureId;
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ feature_id: featureId,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1242,8 +1150,8 @@ export class EntitlementsClient {
* includeUsageAggregation: true,
* q: "q",
* withoutNegativeEntitlements: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listFeatureUsage(
@@ -1267,43 +1175,16 @@ export class EntitlementsClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (companyKeys != null) {
- _queryParams.company_keys = toJson(companyKeys);
- }
-
- if (featureIds != null) {
- if (Array.isArray(featureIds)) {
- _queryParams.feature_ids = featureIds.map((item) => item);
- } else {
- _queryParams.feature_ids = featureIds;
- }
- }
-
- if (includeUsageAggregation != null) {
- _queryParams.include_usage_aggregation = includeUsageAggregation.toString();
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (withoutNegativeEntitlements != null) {
- _queryParams.without_negative_entitlements = withoutNegativeEntitlements.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ company_keys: companyKeys != null ? toJson(companyKeys) : undefined,
+ feature_ids: featureIds,
+ include_usage_aggregation: includeUsageAggregation,
+ q,
+ without_negative_entitlements: withoutNegativeEntitlements,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1438,17 +1319,16 @@ export class EntitlementsClient {
requestOptions?: EntitlementsClient.RequestOptions,
): Promise> {
const { companyId, endTime, featureId, granularity, startTime } = request;
- const _queryParams: Record = {};
- _queryParams.company_id = companyId;
- _queryParams.end_time = endTime.toISOString();
- _queryParams.feature_id = featureId;
- if (granularity != null) {
- _queryParams.granularity = serializers.TimeSeriesGranularity.jsonOrThrow(granularity, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- _queryParams.start_time = startTime.toISOString();
+ const _queryParams: Record = {
+ company_id: companyId,
+ end_time: endTime.toISOString(),
+ feature_id: featureId,
+ granularity:
+ granularity != null
+ ? serializers.TimeSeriesGranularity.jsonOrThrow(granularity, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ start_time: startTime.toISOString(),
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1558,8 +1438,8 @@ export class EntitlementsClient {
* includeUsageAggregation: true,
* q: "q",
* withoutNegativeEntitlements: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countFeatureUsage(
@@ -1583,43 +1463,16 @@ export class EntitlementsClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (companyKeys != null) {
- _queryParams.company_keys = toJson(companyKeys);
- }
-
- if (featureIds != null) {
- if (Array.isArray(featureIds)) {
- _queryParams.feature_ids = featureIds.map((item) => item);
- } else {
- _queryParams.feature_ids = featureIds;
- }
- }
-
- if (includeUsageAggregation != null) {
- _queryParams.include_usage_aggregation = includeUsageAggregation.toString();
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (withoutNegativeEntitlements != null) {
- _queryParams.without_negative_entitlements = withoutNegativeEntitlements.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ company_keys: companyKeys != null ? toJson(companyKeys) : undefined,
+ feature_ids: featureIds,
+ include_usage_aggregation: includeUsageAggregation,
+ q,
+ without_negative_entitlements: withoutNegativeEntitlements,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1738,8 +1591,8 @@ export class EntitlementsClient {
* await client.entitlements.listFeatureUsers({
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listFeatureUsers(
@@ -1754,20 +1607,12 @@ export class EntitlementsClient {
requestOptions?: EntitlementsClient.RequestOptions,
): Promise> {
const { featureId, q, limit, offset } = request;
- const _queryParams: Record = {};
- _queryParams.feature_id = featureId;
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ feature_id: featureId,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1886,8 +1731,8 @@ export class EntitlementsClient {
* await client.entitlements.countFeatureUsers({
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countFeatureUsers(
@@ -1902,20 +1747,12 @@ export class EntitlementsClient {
requestOptions?: EntitlementsClient.RequestOptions,
): Promise> {
const { featureId, q, limit, offset } = request;
- const _queryParams: Record = {};
- _queryParams.feature_id = featureId;
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ feature_id: featureId,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2037,8 +1874,8 @@ export class EntitlementsClient {
* planVersionId: "plan_version_id",
* q: "q",
* withMeteredProducts: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listPlanEntitlements(
@@ -2065,67 +1902,19 @@ export class EntitlementsClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (featureId != null) {
- _queryParams.feature_id = featureId;
- }
-
- if (featureIds != null) {
- if (Array.isArray(featureIds)) {
- _queryParams.feature_ids = featureIds.map((item) => item);
- } else {
- _queryParams.feature_ids = featureIds;
- }
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (planId != null) {
- _queryParams.plan_id = planId;
- }
-
- if (planIds != null) {
- if (Array.isArray(planIds)) {
- _queryParams.plan_ids = planIds.map((item) => item);
- } else {
- _queryParams.plan_ids = planIds;
- }
- }
-
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
- if (planVersionIds != null) {
- if (Array.isArray(planVersionIds)) {
- _queryParams.plan_version_ids = planVersionIds.map((item) => item);
- } else {
- _queryParams.plan_version_ids = planVersionIds;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (withMeteredProducts != null) {
- _queryParams.with_metered_products = withMeteredProducts.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ feature_id: featureId,
+ feature_ids: featureIds,
+ ids,
+ plan_id: planId,
+ plan_ids: planIds,
+ plan_version_id: planVersionId,
+ plan_version_ids: planVersionIds,
+ q,
+ with_metered_products: withMeteredProducts,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -2783,8 +2572,8 @@ export class EntitlementsClient {
* planVersionId: "plan_version_id",
* q: "q",
* withMeteredProducts: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countPlanEntitlements(
@@ -2811,67 +2600,19 @@ export class EntitlementsClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (featureId != null) {
- _queryParams.feature_id = featureId;
- }
-
- if (featureIds != null) {
- if (Array.isArray(featureIds)) {
- _queryParams.feature_ids = featureIds.map((item) => item);
- } else {
- _queryParams.feature_ids = featureIds;
- }
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (planId != null) {
- _queryParams.plan_id = planId;
- }
-
- if (planIds != null) {
- if (Array.isArray(planIds)) {
- _queryParams.plan_ids = planIds.map((item) => item);
- } else {
- _queryParams.plan_ids = planIds;
- }
- }
-
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
- if (planVersionIds != null) {
- if (Array.isArray(planVersionIds)) {
- _queryParams.plan_version_ids = planVersionIds.map((item) => item);
- } else {
- _queryParams.plan_version_ids = planVersionIds;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (withMeteredProducts != null) {
- _queryParams.with_metered_products = withMeteredProducts.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ feature_id: featureId,
+ feature_ids: featureIds,
+ ids,
+ plan_id: planId,
+ plan_ids: planIds,
+ plan_version_id: planVersionId,
+ plan_version_ids: planVersionIds,
+ q,
+ with_metered_products: withMeteredProducts,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -3140,8 +2881,9 @@ export class EntitlementsClient {
requestOptions?: EntitlementsClient.RequestOptions,
): Promise> {
const { keys } = request;
- const _queryParams: Record = {};
- _queryParams.keys = toJson(keys);
+ const _queryParams: Record = {
+ keys: toJson(keys),
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.ts b/src/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.ts
index 6759c392..f13f47ea 100644
--- a/src/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.ts
+++ b/src/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.ts
@@ -7,8 +7,8 @@
* featureId: "feature_id",
* withoutExpired: true,
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountCompanyOverridesRequest {
diff --git a/src/api/resources/entitlements/client/requests/CountFeatureCompaniesRequest.ts b/src/api/resources/entitlements/client/requests/CountFeatureCompaniesRequest.ts
index 6d81638e..93132401 100644
--- a/src/api/resources/entitlements/client/requests/CountFeatureCompaniesRequest.ts
+++ b/src/api/resources/entitlements/client/requests/CountFeatureCompaniesRequest.ts
@@ -5,8 +5,8 @@
* {
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountFeatureCompaniesRequest {
diff --git a/src/api/resources/entitlements/client/requests/CountFeatureUsageRequest.ts b/src/api/resources/entitlements/client/requests/CountFeatureUsageRequest.ts
index 7ca8fe54..f59ef172 100644
--- a/src/api/resources/entitlements/client/requests/CountFeatureUsageRequest.ts
+++ b/src/api/resources/entitlements/client/requests/CountFeatureUsageRequest.ts
@@ -7,8 +7,8 @@
* includeUsageAggregation: true,
* q: "q",
* withoutNegativeEntitlements: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountFeatureUsageRequest {
diff --git a/src/api/resources/entitlements/client/requests/CountFeatureUsersRequest.ts b/src/api/resources/entitlements/client/requests/CountFeatureUsersRequest.ts
index 038f4415..5aea4d92 100644
--- a/src/api/resources/entitlements/client/requests/CountFeatureUsersRequest.ts
+++ b/src/api/resources/entitlements/client/requests/CountFeatureUsersRequest.ts
@@ -5,8 +5,8 @@
* {
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountFeatureUsersRequest {
diff --git a/src/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.ts b/src/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.ts
index 431d12c0..9e82d641 100644
--- a/src/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.ts
+++ b/src/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.ts
@@ -8,8 +8,8 @@
* planVersionId: "plan_version_id",
* q: "q",
* withMeteredProducts: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountPlanEntitlementsRequest {
diff --git a/src/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.ts b/src/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.ts
index a699ae22..c8a9e0cf 100644
--- a/src/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.ts
+++ b/src/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.ts
@@ -7,8 +7,8 @@
* featureId: "feature_id",
* withoutExpired: true,
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListCompanyOverridesRequest {
diff --git a/src/api/resources/entitlements/client/requests/ListFeatureCompaniesRequest.ts b/src/api/resources/entitlements/client/requests/ListFeatureCompaniesRequest.ts
index e8394357..c0729f28 100644
--- a/src/api/resources/entitlements/client/requests/ListFeatureCompaniesRequest.ts
+++ b/src/api/resources/entitlements/client/requests/ListFeatureCompaniesRequest.ts
@@ -5,8 +5,8 @@
* {
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListFeatureCompaniesRequest {
diff --git a/src/api/resources/entitlements/client/requests/ListFeatureUsageRequest.ts b/src/api/resources/entitlements/client/requests/ListFeatureUsageRequest.ts
index 7aca89a6..f331f8d7 100644
--- a/src/api/resources/entitlements/client/requests/ListFeatureUsageRequest.ts
+++ b/src/api/resources/entitlements/client/requests/ListFeatureUsageRequest.ts
@@ -7,8 +7,8 @@
* includeUsageAggregation: true,
* q: "q",
* withoutNegativeEntitlements: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListFeatureUsageRequest {
diff --git a/src/api/resources/entitlements/client/requests/ListFeatureUsersRequest.ts b/src/api/resources/entitlements/client/requests/ListFeatureUsersRequest.ts
index fd4691d1..ed1f4dad 100644
--- a/src/api/resources/entitlements/client/requests/ListFeatureUsersRequest.ts
+++ b/src/api/resources/entitlements/client/requests/ListFeatureUsersRequest.ts
@@ -5,8 +5,8 @@
* {
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListFeatureUsersRequest {
diff --git a/src/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.ts b/src/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.ts
index a61a2d4d..cf0ba70b 100644
--- a/src/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.ts
+++ b/src/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.ts
@@ -8,8 +8,8 @@
* planVersionId: "plan_version_id",
* q: "q",
* withMeteredProducts: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListPlanEntitlementsRequest {
diff --git a/src/api/resources/entitlements/exports.ts b/src/api/resources/entitlements/exports.ts
new file mode 100644
index 00000000..c605d765
--- /dev/null
+++ b/src/api/resources/entitlements/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { EntitlementsClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/events/client/Client.ts b/src/api/resources/events/client/Client.ts
index c36facbf..784b4b4c 100644
--- a/src/api/resources/events/client/Client.ts
+++ b/src/api/resources/events/client/Client.ts
@@ -171,8 +171,8 @@ export class EventsClient {
* @example
* await client.events.getEventSummaries({
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public getEventSummaries(
@@ -187,27 +187,12 @@ export class EventsClient {
requestOptions?: EventsClient.RequestOptions,
): Promise> {
const { q, eventSubtypes, limit, offset } = request;
- const _queryParams: Record = {};
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (eventSubtypes != null) {
- if (Array.isArray(eventSubtypes)) {
- _queryParams.event_subtypes = eventSubtypes.map((item) => item);
- } else {
- _queryParams.event_subtypes = eventSubtypes;
- }
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ q,
+ event_subtypes: eventSubtypes,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -328,8 +313,8 @@ export class EventsClient {
* eventSubtype: "event_subtype",
* flagId: "flag_id",
* userId: "user_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listEvents(
@@ -344,43 +329,19 @@ export class EventsClient {
requestOptions?: EventsClient.RequestOptions,
): Promise> {
const { companyId, eventSubtype, eventTypes, flagId, userId, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (eventSubtype != null) {
- _queryParams.event_subtype = eventSubtype;
- }
-
- if (eventTypes != null) {
- if (Array.isArray(eventTypes)) {
- _queryParams.event_types = eventTypes.map((item) =>
- serializers.EventType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
- );
- } else {
- _queryParams.event_types = serializers.EventType.jsonOrThrow(eventTypes, {
- unrecognizedObjectKeys: "strip",
- });
- }
- }
-
- if (flagId != null) {
- _queryParams.flag_id = flagId;
- }
-
- if (userId != null) {
- _queryParams.user_id = userId;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ event_subtype: eventSubtype,
+ event_types: Array.isArray(eventTypes)
+ ? eventTypes.map((item) => serializers.EventType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }))
+ : eventTypes != null
+ ? serializers.EventType.jsonOrThrow(eventTypes, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ flag_id: flagId,
+ user_id: userId,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/events/client/requests/GetEventSummariesRequest.ts b/src/api/resources/events/client/requests/GetEventSummariesRequest.ts
index 7499b37c..8c6c0e28 100644
--- a/src/api/resources/events/client/requests/GetEventSummariesRequest.ts
+++ b/src/api/resources/events/client/requests/GetEventSummariesRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface GetEventSummariesRequest {
diff --git a/src/api/resources/events/client/requests/ListEventsRequest.ts b/src/api/resources/events/client/requests/ListEventsRequest.ts
index aa96b004..f7ea057c 100644
--- a/src/api/resources/events/client/requests/ListEventsRequest.ts
+++ b/src/api/resources/events/client/requests/ListEventsRequest.ts
@@ -9,8 +9,8 @@ import type * as Schematic from "../../../../index";
* eventSubtype: "event_subtype",
* flagId: "flag_id",
* userId: "user_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListEventsRequest {
diff --git a/src/api/resources/events/exports.ts b/src/api/resources/events/exports.ts
new file mode 100644
index 00000000..4cfbd2f8
--- /dev/null
+++ b/src/api/resources/events/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { EventsClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/features/client/Client.ts b/src/api/resources/features/client/Client.ts
index 7884ae3f..6c365930 100644
--- a/src/api/resources/features/client/Client.ts
+++ b/src/api/resources/features/client/Client.ts
@@ -40,8 +40,8 @@ export class FeaturesClient {
* planVersionId: "plan_version_id",
* withoutPlanEntitlementFor: "without_plan_entitlement_for",
* booleanRequireEvent: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listFeatures(
@@ -66,55 +66,23 @@ export class FeaturesClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (withoutCompanyOverrideFor != null) {
- _queryParams.without_company_override_for = withoutCompanyOverrideFor;
- }
-
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
- if (withoutPlanEntitlementFor != null) {
- _queryParams.without_plan_entitlement_for = withoutPlanEntitlementFor;
- }
-
- if (featureType != null) {
- if (Array.isArray(featureType)) {
- _queryParams.feature_type = featureType.map((item) =>
- serializers.FeatureType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
- );
- } else {
- _queryParams.feature_type = serializers.FeatureType.jsonOrThrow(featureType, {
- unrecognizedObjectKeys: "strip",
- });
- }
- }
-
- if (booleanRequireEvent != null) {
- _queryParams.boolean_require_event = booleanRequireEvent.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ q,
+ without_company_override_for: withoutCompanyOverrideFor,
+ plan_version_id: planVersionId,
+ without_plan_entitlement_for: withoutPlanEntitlementFor,
+ feature_type: Array.isArray(featureType)
+ ? featureType.map((item) =>
+ serializers.FeatureType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
+ )
+ : featureType != null
+ ? serializers.FeatureType.jsonOrThrow(featureType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ boolean_require_event: booleanRequireEvent,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -749,8 +717,8 @@ export class FeaturesClient {
* planVersionId: "plan_version_id",
* withoutPlanEntitlementFor: "without_plan_entitlement_for",
* booleanRequireEvent: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countFeatures(
@@ -775,55 +743,23 @@ export class FeaturesClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (withoutCompanyOverrideFor != null) {
- _queryParams.without_company_override_for = withoutCompanyOverrideFor;
- }
-
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
- if (withoutPlanEntitlementFor != null) {
- _queryParams.without_plan_entitlement_for = withoutPlanEntitlementFor;
- }
-
- if (featureType != null) {
- if (Array.isArray(featureType)) {
- _queryParams.feature_type = featureType.map((item) =>
- serializers.FeatureType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
- );
- } else {
- _queryParams.feature_type = serializers.FeatureType.jsonOrThrow(featureType, {
- unrecognizedObjectKeys: "strip",
- });
- }
- }
-
- if (booleanRequireEvent != null) {
- _queryParams.boolean_require_event = booleanRequireEvent.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ q,
+ without_company_override_for: withoutCompanyOverrideFor,
+ plan_version_id: planVersionId,
+ without_plan_entitlement_for: withoutPlanEntitlementFor,
+ feature_type: Array.isArray(featureType)
+ ? featureType.map((item) =>
+ serializers.FeatureType.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }),
+ )
+ : featureType != null
+ ? serializers.FeatureType.jsonOrThrow(featureType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ boolean_require_event: booleanRequireEvent,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -942,8 +878,8 @@ export class FeaturesClient {
* await client.features.listFlags({
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listFlags(
@@ -958,31 +894,13 @@ export class FeaturesClient {
requestOptions?: FeaturesClient.RequestOptions,
): Promise> {
const { featureId, ids, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (featureId != null) {
- _queryParams.feature_id = featureId;
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ feature_id: featureId,
+ ids,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1635,7 +1553,7 @@ export class FeaturesClient {
* resourceIds: ["resource_ids"]
* }],
* name: "name",
- * priority: 1,
+ * priority: 1000000,
* value: true
* }]
* })
@@ -2172,8 +2090,8 @@ export class FeaturesClient {
* await client.features.countFlags({
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countFlags(
@@ -2188,31 +2106,13 @@ export class FeaturesClient {
requestOptions?: FeaturesClient.RequestOptions,
): Promise> {
const { featureId, ids, q, limit, offset } = request;
- const _queryParams: Record = {};
- if (featureId != null) {
- _queryParams.feature_id = featureId;
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ feature_id: featureId,
+ ids,
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/features/client/requests/CountFeaturesRequest.ts b/src/api/resources/features/client/requests/CountFeaturesRequest.ts
index fdc9966d..52862967 100644
--- a/src/api/resources/features/client/requests/CountFeaturesRequest.ts
+++ b/src/api/resources/features/client/requests/CountFeaturesRequest.ts
@@ -10,8 +10,8 @@ import type * as Schematic from "../../../../index";
* planVersionId: "plan_version_id",
* withoutPlanEntitlementFor: "without_plan_entitlement_for",
* booleanRequireEvent: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountFeaturesRequest {
diff --git a/src/api/resources/features/client/requests/CountFlagsRequest.ts b/src/api/resources/features/client/requests/CountFlagsRequest.ts
index 1be72e36..8e207682 100644
--- a/src/api/resources/features/client/requests/CountFlagsRequest.ts
+++ b/src/api/resources/features/client/requests/CountFlagsRequest.ts
@@ -5,8 +5,8 @@
* {
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountFlagsRequest {
diff --git a/src/api/resources/features/client/requests/ListFeaturesRequest.ts b/src/api/resources/features/client/requests/ListFeaturesRequest.ts
index 1876cf94..6e387bf3 100644
--- a/src/api/resources/features/client/requests/ListFeaturesRequest.ts
+++ b/src/api/resources/features/client/requests/ListFeaturesRequest.ts
@@ -10,8 +10,8 @@ import type * as Schematic from "../../../../index";
* planVersionId: "plan_version_id",
* withoutPlanEntitlementFor: "without_plan_entitlement_for",
* booleanRequireEvent: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListFeaturesRequest {
diff --git a/src/api/resources/features/client/requests/ListFlagsRequest.ts b/src/api/resources/features/client/requests/ListFlagsRequest.ts
index bc0699e7..6b5bf659 100644
--- a/src/api/resources/features/client/requests/ListFlagsRequest.ts
+++ b/src/api/resources/features/client/requests/ListFlagsRequest.ts
@@ -5,8 +5,8 @@
* {
* featureId: "feature_id",
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListFlagsRequest {
diff --git a/src/api/resources/features/client/requests/UpdateFlagRulesRequestBody.ts b/src/api/resources/features/client/requests/UpdateFlagRulesRequestBody.ts
index 7dd586b5..bf262e9f 100644
--- a/src/api/resources/features/client/requests/UpdateFlagRulesRequestBody.ts
+++ b/src/api/resources/features/client/requests/UpdateFlagRulesRequestBody.ts
@@ -19,7 +19,7 @@ import type * as Schematic from "../../../../index";
* resourceIds: ["resource_ids"]
* }],
* name: "name",
- * priority: 1,
+ * priority: 1000000,
* value: true
* }]
* }
diff --git a/src/api/resources/features/exports.ts b/src/api/resources/features/exports.ts
new file mode 100644
index 00000000..f8626f3d
--- /dev/null
+++ b/src/api/resources/features/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { FeaturesClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/planbundle/exports.ts b/src/api/resources/planbundle/exports.ts
new file mode 100644
index 00000000..163b94f3
--- /dev/null
+++ b/src/api/resources/planbundle/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { PlanbundleClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/plangroups/client/Client.ts b/src/api/resources/plangroups/client/Client.ts
index ea8710d5..02616f92 100644
--- a/src/api/resources/plangroups/client/Client.ts
+++ b/src/api/resources/plangroups/client/Client.ts
@@ -49,11 +49,9 @@ export class PlangroupsClient {
requestOptions?: PlangroupsClient.RequestOptions,
): Promise> {
const { includeCompanyCounts } = request;
- const _queryParams: Record = {};
- if (includeCompanyCounts != null) {
- _queryParams.include_company_counts = includeCompanyCounts.toString();
- }
-
+ const _queryParams: Record = {
+ include_company_counts: includeCompanyCounts,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/plangroups/exports.ts b/src/api/resources/plangroups/exports.ts
new file mode 100644
index 00000000..f4897cd3
--- /dev/null
+++ b/src/api/resources/plangroups/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { PlangroupsClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/planmigrations/client/Client.ts b/src/api/resources/planmigrations/client/Client.ts
index 58ed6b11..71e34926 100644
--- a/src/api/resources/planmigrations/client/Client.ts
+++ b/src/api/resources/planmigrations/client/Client.ts
@@ -38,8 +38,8 @@ export class PlanmigrationsClient {
* migrationId: "migration_id",
* q: "q",
* status: "completed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listCompanyMigrations(
@@ -54,29 +54,18 @@ export class PlanmigrationsClient {
requestOptions?: PlanmigrationsClient.RequestOptions,
): Promise> {
const { migrationId, q, status, limit, offset } = request;
- const _queryParams: Record = {};
- if (migrationId != null) {
- _queryParams.migration_id = migrationId;
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (status != null) {
- _queryParams.status = serializers.PlanVersionCompanyMigrationStatus.jsonOrThrow(status, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ migration_id: migrationId,
+ q,
+ status:
+ status != null
+ ? serializers.PlanVersionCompanyMigrationStatus.jsonOrThrow(status, {
+ unrecognizedObjectKeys: "strip",
+ })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -201,8 +190,8 @@ export class PlanmigrationsClient {
* migrationId: "migration_id",
* q: "q",
* status: "completed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countCompanyMigrations(
@@ -217,29 +206,18 @@ export class PlanmigrationsClient {
requestOptions?: PlanmigrationsClient.RequestOptions,
): Promise> {
const { migrationId, q, status, limit, offset } = request;
- const _queryParams: Record = {};
- if (migrationId != null) {
- _queryParams.migration_id = migrationId;
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (status != null) {
- _queryParams.status = serializers.PlanVersionCompanyMigrationStatus.jsonOrThrow(status, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ migration_id: migrationId,
+ q,
+ status:
+ status != null
+ ? serializers.PlanVersionCompanyMigrationStatus.jsonOrThrow(status, {
+ unrecognizedObjectKeys: "strip",
+ })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -363,8 +341,8 @@ export class PlanmigrationsClient {
* await client.planmigrations.listMigrations({
* planVersionId: "plan_version_id",
* status: "completed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listMigrations(
@@ -379,25 +357,15 @@ export class PlanmigrationsClient {
requestOptions?: PlanmigrationsClient.RequestOptions,
): Promise> {
const { planVersionId, status, limit, offset } = request;
- const _queryParams: Record = {};
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
- if (status != null) {
- _queryParams.status = serializers.PlanVersionMigrationStatus.jsonOrThrow(status, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ plan_version_id: planVersionId,
+ status:
+ status != null
+ ? serializers.PlanVersionMigrationStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -637,8 +605,8 @@ export class PlanmigrationsClient {
* await client.planmigrations.countMigrations({
* planVersionId: "plan_version_id",
* status: "completed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countMigrations(
@@ -653,25 +621,15 @@ export class PlanmigrationsClient {
requestOptions?: PlanmigrationsClient.RequestOptions,
): Promise> {
const { planVersionId, status, limit, offset } = request;
- const _queryParams: Record = {};
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
- if (status != null) {
- _queryParams.status = serializers.PlanVersionMigrationStatus.jsonOrThrow(status, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ plan_version_id: planVersionId,
+ status:
+ status != null
+ ? serializers.PlanVersionMigrationStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.ts b/src/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.ts
index 36d8256f..ae9b0371 100644
--- a/src/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.ts
+++ b/src/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.ts
@@ -8,8 +8,8 @@ import type * as Schematic from "../../../../index";
* migrationId: "migration_id",
* q: "q",
* status: "completed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountCompanyMigrationsRequest {
diff --git a/src/api/resources/planmigrations/client/requests/CountMigrationsRequest.ts b/src/api/resources/planmigrations/client/requests/CountMigrationsRequest.ts
index e8cde787..f2db100e 100644
--- a/src/api/resources/planmigrations/client/requests/CountMigrationsRequest.ts
+++ b/src/api/resources/planmigrations/client/requests/CountMigrationsRequest.ts
@@ -7,8 +7,8 @@ import type * as Schematic from "../../../../index";
* {
* planVersionId: "plan_version_id",
* status: "completed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountMigrationsRequest {
diff --git a/src/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.ts b/src/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.ts
index 2c682e9b..6e38cfa4 100644
--- a/src/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.ts
+++ b/src/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.ts
@@ -8,8 +8,8 @@ import type * as Schematic from "../../../../index";
* migrationId: "migration_id",
* q: "q",
* status: "completed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListCompanyMigrationsRequest {
diff --git a/src/api/resources/planmigrations/client/requests/ListMigrationsRequest.ts b/src/api/resources/planmigrations/client/requests/ListMigrationsRequest.ts
index 4a738ed7..0ed6f2b9 100644
--- a/src/api/resources/planmigrations/client/requests/ListMigrationsRequest.ts
+++ b/src/api/resources/planmigrations/client/requests/ListMigrationsRequest.ts
@@ -7,8 +7,8 @@ import type * as Schematic from "../../../../index";
* {
* planVersionId: "plan_version_id",
* status: "completed",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListMigrationsRequest {
diff --git a/src/api/resources/planmigrations/exports.ts b/src/api/resources/planmigrations/exports.ts
new file mode 100644
index 00000000..7c8209f3
--- /dev/null
+++ b/src/api/resources/planmigrations/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { PlanmigrationsClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/plans/client/Client.ts b/src/api/resources/plans/client/Client.ts
index 294dd4c4..075ff8b7 100644
--- a/src/api/resources/plans/client/Client.ts
+++ b/src/api/resources/plans/client/Client.ts
@@ -183,12 +183,13 @@ export class PlansClient {
* forInitialPlan: true,
* forTrialExpiryPlan: true,
* hasProductId: true,
+ * includeDraftVersions: true,
* planType: "plan",
* q: "q",
* withoutEntitlementFor: "without_entitlement_for",
* withoutPaidProductId: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listPlans(
@@ -209,6 +210,7 @@ export class PlansClient {
forTrialExpiryPlan,
hasProductId,
ids,
+ includeDraftVersions,
planType,
q,
withoutEntitlementFor,
@@ -216,59 +218,24 @@ export class PlansClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (forFallbackPlan != null) {
- _queryParams.for_fallback_plan = forFallbackPlan.toString();
- }
-
- if (forInitialPlan != null) {
- _queryParams.for_initial_plan = forInitialPlan.toString();
- }
-
- if (forTrialExpiryPlan != null) {
- _queryParams.for_trial_expiry_plan = forTrialExpiryPlan.toString();
- }
-
- if (hasProductId != null) {
- _queryParams.has_product_id = hasProductId.toString();
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (planType != null) {
- _queryParams.plan_type = serializers.PlanType.jsonOrThrow(planType, { unrecognizedObjectKeys: "strip" });
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (withoutEntitlementFor != null) {
- _queryParams.without_entitlement_for = withoutEntitlementFor;
- }
-
- if (withoutPaidProductId != null) {
- _queryParams.without_paid_product_id = withoutPaidProductId.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ for_fallback_plan: forFallbackPlan,
+ for_initial_plan: forInitialPlan,
+ for_trial_expiry_plan: forTrialExpiryPlan,
+ has_product_id: hasProductId,
+ ids,
+ include_draft_versions: includeDraftVersions,
+ plan_type:
+ planType != null
+ ? serializers.PlanType.jsonOrThrow(planType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ q,
+ without_entitlement_for: withoutEntitlementFor,
+ without_paid_product_id: withoutPaidProductId,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -537,11 +504,9 @@ export class PlansClient {
requestOptions?: PlansClient.RequestOptions,
): Promise> {
const { planVersionId } = request;
- const _queryParams: Record = {};
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
+ const _queryParams: Record = {
+ plan_version_id: planVersionId,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1058,12 +1023,13 @@ export class PlansClient {
* forInitialPlan: true,
* forTrialExpiryPlan: true,
* hasProductId: true,
+ * includeDraftVersions: true,
* planType: "plan",
* q: "q",
* withoutEntitlementFor: "without_entitlement_for",
* withoutPaidProductId: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countPlans(
@@ -1084,6 +1050,7 @@ export class PlansClient {
forTrialExpiryPlan,
hasProductId,
ids,
+ includeDraftVersions,
planType,
q,
withoutEntitlementFor,
@@ -1091,59 +1058,24 @@ export class PlansClient {
limit,
offset,
} = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (forFallbackPlan != null) {
- _queryParams.for_fallback_plan = forFallbackPlan.toString();
- }
-
- if (forInitialPlan != null) {
- _queryParams.for_initial_plan = forInitialPlan.toString();
- }
-
- if (forTrialExpiryPlan != null) {
- _queryParams.for_trial_expiry_plan = forTrialExpiryPlan.toString();
- }
-
- if (hasProductId != null) {
- _queryParams.has_product_id = hasProductId.toString();
- }
-
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (planType != null) {
- _queryParams.plan_type = serializers.PlanType.jsonOrThrow(planType, { unrecognizedObjectKeys: "strip" });
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (withoutEntitlementFor != null) {
- _queryParams.without_entitlement_for = withoutEntitlementFor;
- }
-
- if (withoutPaidProductId != null) {
- _queryParams.without_paid_product_id = withoutPaidProductId.toString();
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ for_fallback_plan: forFallbackPlan,
+ for_initial_plan: forInitialPlan,
+ for_trial_expiry_plan: forTrialExpiryPlan,
+ has_product_id: hasProductId,
+ ids,
+ include_draft_versions: includeDraftVersions,
+ plan_type:
+ planType != null
+ ? serializers.PlanType.jsonOrThrow(planType, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ q,
+ without_entitlement_for: withoutEntitlementFor,
+ without_paid_product_id: withoutPaidProductId,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1276,12 +1208,10 @@ export class PlansClient {
requestOptions?: PlansClient.RequestOptions,
): Promise> {
const { planId, planVersionId } = request;
- const _queryParams: Record = {};
- _queryParams.plan_id = planId;
- if (planVersionId != null) {
- _queryParams.plan_version_id = planVersionId;
- }
-
+ const _queryParams: Record = {
+ plan_id: planId,
+ plan_version_id: planVersionId,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/plans/client/requests/CountPlansRequest.ts b/src/api/resources/plans/client/requests/CountPlansRequest.ts
index 51bb18cf..4f5d5336 100644
--- a/src/api/resources/plans/client/requests/CountPlansRequest.ts
+++ b/src/api/resources/plans/client/requests/CountPlansRequest.ts
@@ -10,12 +10,13 @@ import type * as Schematic from "../../../../index";
* forInitialPlan: true,
* forTrialExpiryPlan: true,
* hasProductId: true,
+ * includeDraftVersions: true,
* planType: "plan",
* q: "q",
* withoutEntitlementFor: "without_entitlement_for",
* withoutPaidProductId: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountPlansRequest {
@@ -29,6 +30,8 @@ export interface CountPlansRequest {
/** Filter out plans that do not have a billing product ID */
hasProductId?: boolean;
ids?: string | string[];
+ /** Include billing settings from draft versions for plans which have draft version */
+ includeDraftVersions?: boolean;
/** Filter by plan type */
planType?: Schematic.PlanType;
q?: string;
diff --git a/src/api/resources/plans/client/requests/ListPlansRequest.ts b/src/api/resources/plans/client/requests/ListPlansRequest.ts
index 31b743be..bd8e26c8 100644
--- a/src/api/resources/plans/client/requests/ListPlansRequest.ts
+++ b/src/api/resources/plans/client/requests/ListPlansRequest.ts
@@ -10,12 +10,13 @@ import type * as Schematic from "../../../../index";
* forInitialPlan: true,
* forTrialExpiryPlan: true,
* hasProductId: true,
+ * includeDraftVersions: true,
* planType: "plan",
* q: "q",
* withoutEntitlementFor: "without_entitlement_for",
* withoutPaidProductId: true,
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListPlansRequest {
@@ -29,6 +30,8 @@ export interface ListPlansRequest {
/** Filter out plans that do not have a billing product ID */
hasProductId?: boolean;
ids?: string | string[];
+ /** Include billing settings from draft versions for plans which have draft version */
+ includeDraftVersions?: boolean;
/** Filter by plan type */
planType?: Schematic.PlanType;
q?: string;
diff --git a/src/api/resources/plans/exports.ts b/src/api/resources/plans/exports.ts
new file mode 100644
index 00000000..114f6861
--- /dev/null
+++ b/src/api/resources/plans/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { PlansClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/plans/types/CountPlansParams.ts b/src/api/resources/plans/types/CountPlansParams.ts
index 686a0982..e3a1f3ec 100644
--- a/src/api/resources/plans/types/CountPlansParams.ts
+++ b/src/api/resources/plans/types/CountPlansParams.ts
@@ -16,6 +16,8 @@ export interface CountPlansParams {
/** Filter out plans that do not have a billing product ID */
hasProductId?: boolean;
ids?: string[];
+ /** Include billing settings from draft versions for plans which have draft version */
+ includeDraftVersions?: boolean;
/** Page limit (default 100) */
limit?: number;
/** Page offset (default 0) */
diff --git a/src/api/resources/plans/types/ListPlansParams.ts b/src/api/resources/plans/types/ListPlansParams.ts
index ef07954c..02d059ea 100644
--- a/src/api/resources/plans/types/ListPlansParams.ts
+++ b/src/api/resources/plans/types/ListPlansParams.ts
@@ -16,6 +16,8 @@ export interface ListPlansParams {
/** Filter out plans that do not have a billing product ID */
hasProductId?: boolean;
ids?: string[];
+ /** Include billing settings from draft versions for plans which have draft version */
+ includeDraftVersions?: boolean;
/** Page limit (default 100) */
limit?: number;
/** Page offset (default 0) */
diff --git a/src/api/resources/scheduledcheckout/client/Client.ts b/src/api/resources/scheduledcheckout/client/Client.ts
index b8dd48d5..196d7dd4 100644
--- a/src/api/resources/scheduledcheckout/client/Client.ts
+++ b/src/api/resources/scheduledcheckout/client/Client.ts
@@ -37,8 +37,8 @@ export class ScheduledcheckoutClient {
* await client.scheduledcheckout.listScheduledCheckouts({
* companyId: "company_id",
* status: "cancelled",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listScheduledCheckouts(
@@ -53,25 +53,15 @@ export class ScheduledcheckoutClient {
requestOptions?: ScheduledcheckoutClient.RequestOptions,
): Promise> {
const { companyId, status, limit, offset } = request;
- const _queryParams: Record = {};
- if (companyId != null) {
- _queryParams.company_id = companyId;
- }
-
- if (status != null) {
- _queryParams.status = serializers.ScheduledCheckoutStatus.jsonOrThrow(status, {
- unrecognizedObjectKeys: "strip",
- });
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ company_id: companyId,
+ status:
+ status != null
+ ? serializers.ScheduledCheckoutStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" })
+ : undefined,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/scheduledcheckout/client/requests/ListScheduledCheckoutsRequest.ts b/src/api/resources/scheduledcheckout/client/requests/ListScheduledCheckoutsRequest.ts
index a641e49b..56096d33 100644
--- a/src/api/resources/scheduledcheckout/client/requests/ListScheduledCheckoutsRequest.ts
+++ b/src/api/resources/scheduledcheckout/client/requests/ListScheduledCheckoutsRequest.ts
@@ -7,8 +7,8 @@ import type * as Schematic from "../../../../index";
* {
* companyId: "company_id",
* status: "cancelled",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListScheduledCheckoutsRequest {
diff --git a/src/api/resources/scheduledcheckout/exports.ts b/src/api/resources/scheduledcheckout/exports.ts
new file mode 100644
index 00000000..6dc97e47
--- /dev/null
+++ b/src/api/resources/scheduledcheckout/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { ScheduledcheckoutClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/resources/webhooks/client/Client.ts b/src/api/resources/webhooks/client/Client.ts
index fd8cf3e7..fb9874ea 100644
--- a/src/api/resources/webhooks/client/Client.ts
+++ b/src/api/resources/webhooks/client/Client.ts
@@ -37,8 +37,8 @@ export class WebhooksClient {
* await client.webhooks.listWebhookEvents({
* q: "q",
* webhookId: "webhook_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listWebhookEvents(
@@ -53,31 +53,13 @@ export class WebhooksClient {
requestOptions?: WebhooksClient.RequestOptions,
): Promise> {
const { ids, q, webhookId, limit, offset } = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (webhookId != null) {
- _queryParams.webhook_id = webhookId;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ q,
+ webhook_id: webhookId,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -317,8 +299,8 @@ export class WebhooksClient {
* await client.webhooks.countWebhookEvents({
* q: "q",
* webhookId: "webhook_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countWebhookEvents(
@@ -333,31 +315,13 @@ export class WebhooksClient {
requestOptions?: WebhooksClient.RequestOptions,
): Promise> {
const { ids, q, webhookId, limit, offset } = request;
- const _queryParams: Record = {};
- if (ids != null) {
- if (Array.isArray(ids)) {
- _queryParams.ids = ids.map((item) => item);
- } else {
- _queryParams.ids = ids;
- }
- }
-
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (webhookId != null) {
- _queryParams.webhook_id = webhookId;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ ids,
+ q,
+ webhook_id: webhookId,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -475,8 +439,8 @@ export class WebhooksClient {
* @example
* await client.webhooks.listWebhooks({
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public listWebhooks(
@@ -491,19 +455,11 @@ export class WebhooksClient {
requestOptions?: WebhooksClient.RequestOptions,
): Promise> {
const { q, limit, offset } = request;
- const _queryParams: Record = {};
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
@@ -1134,8 +1090,8 @@ export class WebhooksClient {
* @example
* await client.webhooks.countWebhooks({
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* })
*/
public countWebhooks(
@@ -1150,19 +1106,11 @@ export class WebhooksClient {
requestOptions?: WebhooksClient.RequestOptions,
): Promise> {
const { q, limit, offset } = request;
- const _queryParams: Record = {};
- if (q != null) {
- _queryParams.q = q;
- }
-
- if (limit != null) {
- _queryParams.limit = limit.toString();
- }
-
- if (offset != null) {
- _queryParams.offset = offset.toString();
- }
-
+ const _queryParams: Record = {
+ q,
+ limit,
+ offset,
+ };
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
diff --git a/src/api/resources/webhooks/client/requests/CountWebhookEventsRequest.ts b/src/api/resources/webhooks/client/requests/CountWebhookEventsRequest.ts
index b15ca5e5..e2726ef7 100644
--- a/src/api/resources/webhooks/client/requests/CountWebhookEventsRequest.ts
+++ b/src/api/resources/webhooks/client/requests/CountWebhookEventsRequest.ts
@@ -5,8 +5,8 @@
* {
* q: "q",
* webhookId: "webhook_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountWebhookEventsRequest {
diff --git a/src/api/resources/webhooks/client/requests/CountWebhooksRequest.ts b/src/api/resources/webhooks/client/requests/CountWebhooksRequest.ts
index 0babebba..e8738c56 100644
--- a/src/api/resources/webhooks/client/requests/CountWebhooksRequest.ts
+++ b/src/api/resources/webhooks/client/requests/CountWebhooksRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface CountWebhooksRequest {
diff --git a/src/api/resources/webhooks/client/requests/ListWebhookEventsRequest.ts b/src/api/resources/webhooks/client/requests/ListWebhookEventsRequest.ts
index ee4c1738..e90b964b 100644
--- a/src/api/resources/webhooks/client/requests/ListWebhookEventsRequest.ts
+++ b/src/api/resources/webhooks/client/requests/ListWebhookEventsRequest.ts
@@ -5,8 +5,8 @@
* {
* q: "q",
* webhookId: "webhook_id",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListWebhookEventsRequest {
diff --git a/src/api/resources/webhooks/client/requests/ListWebhooksRequest.ts b/src/api/resources/webhooks/client/requests/ListWebhooksRequest.ts
index da3f80b7..6096324c 100644
--- a/src/api/resources/webhooks/client/requests/ListWebhooksRequest.ts
+++ b/src/api/resources/webhooks/client/requests/ListWebhooksRequest.ts
@@ -4,8 +4,8 @@
* @example
* {
* q: "q",
- * limit: 1,
- * offset: 1
+ * limit: 1000000,
+ * offset: 1000000
* }
*/
export interface ListWebhooksRequest {
diff --git a/src/api/resources/webhooks/exports.ts b/src/api/resources/webhooks/exports.ts
new file mode 100644
index 00000000..c6d1afdd
--- /dev/null
+++ b/src/api/resources/webhooks/exports.ts
@@ -0,0 +1,4 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export { WebhooksClient } from "./client/Client";
+export * from "./client/index";
diff --git a/src/api/types/ConditionGroupResponseData.ts b/src/api/types/ConditionGroupResponseData.ts
index 9054097e..d8871a85 100644
--- a/src/api/types/ConditionGroupResponseData.ts
+++ b/src/api/types/ConditionGroupResponseData.ts
@@ -6,7 +6,6 @@ export interface ConditionGroupResponseData {
environmentId: string;
flagId?: string;
id: string;
- planVersionId?: string;
ruleId: string;
updatedAt: Date;
}
diff --git a/src/api/types/ConditionGroupView.ts b/src/api/types/ConditionGroupView.ts
index f232d447..3d29ef4f 100644
--- a/src/api/types/ConditionGroupView.ts
+++ b/src/api/types/ConditionGroupView.ts
@@ -9,7 +9,6 @@ export interface ConditionGroupView {
environmentId: string;
flagId?: string;
id: string;
- planVersionId?: string;
ruleId: string;
updatedAt: Date;
}
diff --git a/src/api/types/ConditionResponseData.ts b/src/api/types/ConditionResponseData.ts
index b6f520dd..bf95d384 100644
--- a/src/api/types/ConditionResponseData.ts
+++ b/src/api/types/ConditionResponseData.ts
@@ -18,7 +18,6 @@ export interface ConditionResponseData {
metricPeriodMonthReset?: string;
metricValue?: number;
operator: string;
- planVersionId?: string;
resourceUnspecifiedIds: string[];
ruleId: string;
traitEntityType?: Schematic.EntityType;
diff --git a/src/api/types/ConditionView.ts b/src/api/types/ConditionView.ts
index 6f0406ef..019df55c 100644
--- a/src/api/types/ConditionView.ts
+++ b/src/api/types/ConditionView.ts
@@ -21,7 +21,6 @@ export interface ConditionView {
metricPeriodMonthReset?: string;
metricValue?: number;
operator: string;
- planVersionId?: string;
planVersions: Schematic.GenericPreviewObject[];
plans: Schematic.GenericPreviewObject[];
resourceUnspecifiedIds: string[];
diff --git a/src/api/types/ManagePlanRequest.ts b/src/api/types/ManagePlanRequest.ts
index b801d3e4..ad156a26 100644
--- a/src/api/types/ManagePlanRequest.ts
+++ b/src/api/types/ManagePlanRequest.ts
@@ -6,6 +6,7 @@ export interface ManagePlanRequest {
addOnSelections: Schematic.PlanSelection[];
basePlanId?: string;
basePlanPriceId?: string;
+ basePlanVersionId?: string;
/** If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true. */
cancelImmediately?: boolean;
companyId: string;
diff --git a/src/api/types/PlanSelection.ts b/src/api/types/PlanSelection.ts
index 65dab8b1..e9a157bb 100644
--- a/src/api/types/PlanSelection.ts
+++ b/src/api/types/PlanSelection.ts
@@ -3,4 +3,5 @@
export interface PlanSelection {
planId: string;
priceId?: string;
+ versionId?: string;
}
diff --git a/src/api/types/RuleView.ts b/src/api/types/RuleView.ts
index db618087..dbd35078 100644
--- a/src/api/types/RuleView.ts
+++ b/src/api/types/RuleView.ts
@@ -11,7 +11,6 @@ export interface RuleView {
flagId?: string;
id: string;
name: string;
- planVersionId?: string;
priority: number;
ruleType: string;
updatedAt: Date;
diff --git a/src/api/types/RulesEngineSchemaVersion.ts b/src/api/types/RulesEngineSchemaVersion.ts
index 07b0325a..ae347715 100644
--- a/src/api/types/RulesEngineSchemaVersion.ts
+++ b/src/api/types/RulesEngineSchemaVersion.ts
@@ -2,7 +2,7 @@
/** The current schema version hash for rules engine types. The first enum value is always the current version. */
export const RulesEngineSchemaVersion = {
- V0F048Dd3: "v0f048dd3",
+ V5F633Cc3: "v5f633cc3",
PlaceholderForFernCompatibility: "placeholder-for-fern-compatibility",
} as const;
export type RulesEngineSchemaVersion = (typeof RulesEngineSchemaVersion)[keyof typeof RulesEngineSchemaVersion];
diff --git a/src/api/types/WebScheduledDowngradeWebhookOutput.ts b/src/api/types/WebScheduledDowngradeWebhookOutput.ts
new file mode 100644
index 00000000..0fd8249b
--- /dev/null
+++ b/src/api/types/WebScheduledDowngradeWebhookOutput.ts
@@ -0,0 +1,13 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as Schematic from "../index";
+
+export interface WebScheduledDowngradeWebhookOutput {
+ company?: Schematic.CompanyResponseData;
+ executeAfter: Date;
+ fromPlan?: Schematic.PlanSnapshotView;
+ id: string;
+ scheduledInterval?: string;
+ scheduledPrice?: number;
+ toPlan?: Schematic.PlanSnapshotView;
+}
diff --git a/src/api/types/WebhookRequestType.ts b/src/api/types/WebhookRequestType.ts
index a9789bf1..02b83cf9 100644
--- a/src/api/types/WebhookRequestType.ts
+++ b/src/api/types/WebhookRequestType.ts
@@ -9,6 +9,7 @@ export const WebhookRequestType = {
CompanyOverrideExpired: "company.override.expired",
CompanyOverrideUpdated: "company.override.updated",
CompanyPlanChanged: "company.plan_changed",
+ CompanyScheduledDowngrade: "company.scheduled_downgrade",
CompanyUpdated: "company.updated",
CreditLimitReached: "credit.limit.reached",
CreditLimitWarning: "credit.limit.warning",
diff --git a/src/api/types/index.ts b/src/api/types/index.ts
index 4421c2dd..a7fad6ed 100644
--- a/src/api/types/index.ts
+++ b/src/api/types/index.ts
@@ -329,4 +329,5 @@ export * from "./WebhookEventStatus";
export * from "./WebhookRequestType";
export * from "./WebhookResponseData";
export * from "./WebhookStatus";
+export * from "./WebScheduledDowngradeWebhookOutput";
export * from "./WhoAmIResponseData";
diff --git a/src/auth/HeaderAuthProvider.ts b/src/auth/HeaderAuthProvider.ts
index 652387e1..1c429d44 100644
--- a/src/auth/HeaderAuthProvider.ts
+++ b/src/auth/HeaderAuthProvider.ts
@@ -3,37 +3,46 @@
import * as core from "../core";
import * as errors from "../errors/index";
-export namespace HeaderAuthProvider {
- export interface AuthOptions {
- apiKey: core.Supplier;
- }
-
- export interface Options extends AuthOptions {}
-}
+const PARAM_KEY = "apiKey" as const;
+const HEADER_NAME = "X-Schematic-Api-Key" as const;
export class HeaderAuthProvider implements core.AuthProvider {
- private readonly headerValue: core.Supplier;
+ private readonly options: HeaderAuthProvider.Options;
constructor(options: HeaderAuthProvider.Options) {
- this.headerValue = options.apiKey;
+ this.options = options;
}
- public static canCreate(options: HeaderAuthProvider.Options): boolean {
- return options.apiKey != null;
+ public static canCreate(options: Partial): boolean {
+ return options?.[PARAM_KEY] != null;
}
- public async getAuthRequest(_arg?: { endpointMetadata?: core.EndpointMetadata }): Promise {
- const apiKey = await core.Supplier.get(this.headerValue);
- if (apiKey == null) {
+ public async getAuthRequest({
+ endpointMetadata,
+ }: {
+ endpointMetadata?: core.EndpointMetadata;
+ } = {}): Promise {
+ const headerValue = await core.Supplier.get(this.options[PARAM_KEY]);
+ if (headerValue == null) {
throw new errors.SchematicError({
- message: "Please specify a apiKey by passing it in to the constructor",
+ message: HeaderAuthProvider.AUTH_CONFIG_ERROR_MESSAGE,
});
}
- const headerValue = apiKey;
-
return {
- headers: { "X-Schematic-Api-Key": headerValue },
+ headers: { [HEADER_NAME]: headerValue },
};
}
}
+
+export namespace HeaderAuthProvider {
+ export const AUTH_SCHEME = "ApiKeyAuth" as const;
+ export const AUTH_CONFIG_ERROR_MESSAGE: string =
+ `Please provide '${PARAM_KEY}' when initializing the client` as const;
+ export type Options = AuthOptions;
+ export type AuthOptions = { [PARAM_KEY]: core.Supplier };
+
+ export function createInstance(options: Options): core.AuthProvider {
+ return new HeaderAuthProvider(options);
+ }
+}
diff --git a/src/core/fetcher/BinaryResponse.ts b/src/core/fetcher/BinaryResponse.ts
index bca7f4c7..b9e40fb6 100644
--- a/src/core/fetcher/BinaryResponse.ts
+++ b/src/core/fetcher/BinaryResponse.ts
@@ -14,7 +14,7 @@ export type BinaryResponse = {
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)
* Some versions of the Fetch API may not support this method.
*/
- bytes?(): ReturnType;
+ bytes?(): Promise;
};
export function getBinaryResponse(response: Response): BinaryResponse {
diff --git a/src/core/fetcher/EndpointSupplier.ts b/src/core/fetcher/EndpointSupplier.ts
index f4a99783..cbb4ff68 100644
--- a/src/core/fetcher/EndpointSupplier.ts
+++ b/src/core/fetcher/EndpointSupplier.ts
@@ -1,10 +1,10 @@
import type { EndpointMetadata } from "./EndpointMetadata";
import type { Supplier } from "./Supplier";
-type EndpointSupplierFn = (arg: { endpointMetadata: EndpointMetadata }) => T | Promise;
+type EndpointSupplierFn = (arg: { endpointMetadata?: EndpointMetadata }) => T | Promise;
export type EndpointSupplier = Supplier | EndpointSupplierFn;
export const EndpointSupplier = {
- get: async (supplier: EndpointSupplier, arg: { endpointMetadata: EndpointMetadata }): Promise => {
+ get: async (supplier: EndpointSupplier