diff --git a/.claude/skills/pr-review/SKILL.md b/.claude/skills/pr-review/SKILL.md deleted file mode 100644 index 42a0add4..00000000 --- a/.claude/skills/pr-review/SKILL.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -name: pr-review -description: Review code changes on the current branch for quality, bugs, performance, and security -disable-model-invocation: true -argument-hint: "[optional: LINEAR-TICKET-ID]" -allowed-tools: Read, Grep, Glob, Bash(git diff:*), Bash(git log:*), Bash(git show:*), Bash(git branch:*), Bash(gh pr:*), Bash(gh api:*), Bash(~/.claude/scripts/fetch-github-pr.sh:*), Bash(~/.claude/scripts/fetch-sentry-data.sh:*), Bash(~/.claude/scripts/fetch-slack-thread.sh:*) ---- - -# Code Review - -You are reviewing code changes on the current branch. Your review must be based on the **current state of the code right now**, not on anything you've seen earlier in this conversation. - -## CRITICAL: Always Use Fresh Data - -**IGNORE any file contents, diffs, or line numbers you may have seen earlier in this conversation.** They may be stale. You MUST re-fetch everything from scratch using the commands below. - -## Step 1: Get the Current Diff and PR Context - -Run ALL of these commands to get a fresh view: - -```bash -# The authoritative diff -- only review what's in HERE -git diff main...HEAD - -# Recent commits on this branch -git log --oneline main..HEAD - -# PR description and comments -gh pr view --json number,title,body,comments,reviews,reviewRequests -``` - -Also fetch PR review comments (inline code comments): - -```bash -# Get the PR number -PR_NUMBER=$(gh pr view --json number -q '.number') - -# Fetch all review comments (inline comments on specific lines) -gh api repos/{owner}/{repo}/pulls/$PR_NUMBER/comments --jq '.[] | {path: .path, line: .line, body: .body, user: .user.login, created_at: .created_at}' - -# Fetch review-level comments (general review comments) -gh api repos/{owner}/{repo}/pulls/$PR_NUMBER/reviews --jq '.[] | {state: .state, body: .body, user: .user.login}' -``` - -## Step 2: Understand Context from PR Comments - -Before reviewing, read through the PR comments and review comments. Note **who** said what (by username). - -- **Already-addressed feedback**: If a reviewer pointed out an issue and the author has already fixed it (the fix is visible in the current diff), do NOT re-raise it. -- **Ongoing discussions**: Note any unresolved threads -- your review should take these into account. -- **Previous approvals/requests for changes**: Understand what reviewers have already looked at. - -**IMPORTANT**: Your review is YOUR independent review. Do not take credit for or reference other reviewers' findings as if they were yours. If another reviewer already flagged something, you can note "as [reviewer] pointed out" but do not present their feedback as your own prior review. Your verdict should be based solely on your own analysis of the current code. - -## Step 3: Get Requirements Context - -Check if a Linear ticket ID was provided as an argument ($ARGUMENTS). If not, try to extract it from the branch name (pattern: `{username}/{linear-ticket}-{title}`). - -If a Linear ticket is found: -- Use Linear MCP tools (`get_issue`) to get the issue details and comments -- **Check for a parent ticket**: If the issue has a parent issue, fetch the parent too. Our pattern is to have a parent ticket with project-wide requirements and sub-tickets for specific tasks (often one per repo/PR). The parent ticket will contain the full scope of the project, while the sub-ticket scopes what this specific PR should cover. Use both to assess completeness — the PR should fulfill the sub-ticket's scope, and that scope should be a reasonable subset of the parent's backend-related requirements. -- Look for Sentry links in the description/comments; if found, use Sentry MCP tools to get error details -- Assess whether the changes fulfill the ticket requirements - -If no ticket is found, check the PR description for context on what the changes are meant to accomplish. - -## Step 4: Review the Code - -Review ONLY the changed lines (from `git diff main...HEAD`). Do not comment on unchanged code. - -**When referencing code, always use the file path and quote the actual code snippet** rather than citing line numbers, since line numbers shift as the branch evolves. - -### Code Quality -- Is the code well-structured and maintainable? -- Does it follow CLAUDE.md conventions? (import grouping, error handling with lib/errors, naming, alphabetization, etc.) -- Any AI-generated slop? (excessive comments, unnecessary abstractions, over-engineering) - -### Performance -- N+1 queries, inefficient loops, missing indexes for new queries -- Unbuffered writes in hot paths (especially ClickHouse) -- Missing LIMIT clauses on potentially large result sets - -### Bugs -- Nil pointer risks (especially on struct pointer params and optional relations) -- Functions returning `nil, nil` (violates convention) -- Missing error handling -- Race conditions in concurrent code paths - -### Security -- Hardcoded secrets or sensitive data exposure -- Missing input validation on service request structs - -### Tests -- Are there tests for the new/changed code? -- Do the tests cover edge cases and error paths? -- Are test assertions specific (not just "no error")? - -## Step 5: Present the Review - -Structure your review as: - -``` -## Summary -[1-2 sentences: what this PR does and overall assessment] - -## Requirements Check -[Does the PR fulfill the Linear ticket / PR description requirements? Any gaps?] - -## Issues -### Critical (must fix before merge) -- [blocking issues] - -### Suggestions (nice to have) -- [non-blocking improvements] - -## Prior Review Activity -[Summarize what other reviewers have flagged, attributed by name. Note which of their concerns have been addressed in the current code and which remain open.] - -## Verdict -[LGTM / Needs changes / Needs discussion -- based on YOUR analysis, not other reviewers' findings] -``` - -## Guidelines - -- Be concise. Don't pad with praise or filler. -- Only raise issues that matter. Don't nitpick formatting (that's what linters are for). -- Quote code snippets rather than referencing line numbers. -- If PR comments show a discussion was already resolved, don't reopen it. -- If you're unsure about something, flag it as a question rather than a definitive issue. diff --git a/.fern/metadata.json b/.fern/metadata.json index 48a6294c..b7ba18c7 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -26,7 +26,9 @@ "timers": false }, "dependencies": { - "form-data": "^4.0.4" + "form-data": "^4.0.4", + "ws": "^8.18.1", + "@types/ws": "^8.18.1" }, "devDependencies": { "esbuild": "^0.25.9" @@ -41,5 +43,5 @@ "files": ["dist/**/*.js", "dist/**/*.d.ts", "!dist/**/*.js.map", "!dist/**/*.test.*", "README.md"] } }, - "sdkVersion": "1.3.1" + "sdkVersion": "1.4.0" } diff --git a/.gitignore b/.gitignore index 4dffdc40..72271e04 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ node_modules .DS_Store -/dist -.claude/settings.local.json \ No newline at end of file +/dist \ No newline at end of file diff --git a/package.json b/package.json index e88b6fd7..756fe15b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@schematichq/schematic-typescript-node", - "version": "1.3.1", + "version": "1.4.0", "private": false, "repository": { "type": "git", @@ -27,32 +27,24 @@ "formdata-node": "^6.0.3", "node-fetch": "^2.7.0", "readable-stream": "^4.5.2", - "ws": "^8.0.0" - }, - "peerDependencies": { - "redis": "^4.0.0" - }, - "peerDependenciesMeta": { - "redis": { - "optional": true - } + "ws": "^8.18.1", + "@types/ws": "^8.18.1" }, "devDependencies": { - "@biomejs/biome": "2.3.1", - "@jest/globals": "^29.7.0", - "@types/jest": "^29.5.14", - "@types/node": "^18.19.70", "@types/node-fetch": "^2.6.12", "@types/readable-stream": "^4.0.18", - "@types/ws": "^8.18.1", - "esbuild": "^0.25.9", + "webpack": "^5.97.1", + "ts-loader": "^9.5.1", "jest": "^29.7.0", + "@jest/globals": "^29.7.0", + "@types/jest": "^29.5.14", + "ts-jest": "^29.3.4", "jest-environment-jsdom": "^29.7.0", "msw": "2.11.2", - "ts-jest": "^29.3.4", - "ts-loader": "^9.5.1", + "@types/node": "^18.19.70", "typescript": "~5.7.2", - "webpack": "^5.97.1" + "@biomejs/biome": "2.3.1", + "esbuild": "^0.25.9" }, "browser": { "fs": false, @@ -60,9 +52,7 @@ "path": false, "stream": false, "crypto": false, - "timers": false, - "url": false, - "ws": false + "timers": false }, "packageManager": "yarn@1.22.22", "engines": { @@ -73,7 +63,6 @@ "files": [ "dist/**/*.js", "dist/**/*.d.ts", - "dist/**/*.wasm", "!dist/**/*.js.map", "!dist/**/*.test.*", "README.md" diff --git a/reference.md b/reference.md index ca54b8c9..fd6ad62e 100644 --- a/reference.md +++ b/reference.md @@ -412,7 +412,7 @@ await client.accounts.countApiKeys({ -
client.accounts.listApiRequests({ ...params }) -> Schematic.ListApiRequestsResponse +
client.accounts.listAuditLogs({ ...params }) -> Schematic.ListAuditLogsResponse
@@ -425,10 +425,12 @@ await client.accounts.countApiKeys({
```typescript -await client.accounts.listApiRequests({ - q: "q", - requestType: "request_type", +await client.accounts.listAuditLogs({ + actorType: "api_key", + endTime: new Date("2024-01-15T09:30:00.000Z"), environmentId: "environment_id", + q: "q", + startTime: new Date("2024-01-15T09:30:00.000Z"), limit: 1, offset: 1 }); @@ -447,7 +449,7 @@ await client.accounts.listApiRequests({
-**request:** `Schematic.ListApiRequestsRequest` +**request:** `Schematic.ListAuditLogsRequest`
@@ -467,7 +469,7 @@ await client.accounts.listApiRequests({
-
client.accounts.getApiRequest(api_request_id) -> Schematic.GetApiRequestResponse +
client.accounts.getAuditLog(audit_log_id) -> Schematic.GetAuditLogResponse
@@ -480,7 +482,7 @@ await client.accounts.listApiRequests({
```typescript -await client.accounts.getApiRequest("api_request_id"); +await client.accounts.getAuditLog("audit_log_id"); ```
@@ -496,7 +498,7 @@ await client.accounts.getApiRequest("api_request_id");
-**api_request_id:** `string` — api_request_id +**audit_log_id:** `string` — audit_log_id
@@ -516,7 +518,7 @@ await client.accounts.getApiRequest("api_request_id");
-
client.accounts.countApiRequests({ ...params }) -> Schematic.CountApiRequestsResponse +
client.accounts.countAuditLogs({ ...params }) -> Schematic.CountAuditLogsResponse
@@ -529,10 +531,12 @@ await client.accounts.getApiRequest("api_request_id");
```typescript -await client.accounts.countApiRequests({ - q: "q", - requestType: "request_type", +await client.accounts.countAuditLogs({ + actorType: "api_key", + endTime: new Date("2024-01-15T09:30:00.000Z"), environmentId: "environment_id", + q: "q", + startTime: new Date("2024-01-15T09:30:00.000Z"), limit: 1, offset: 1 }); @@ -551,7 +555,7 @@ await client.accounts.countApiRequests({
-**request:** `Schematic.CountApiRequestsRequest` +**request:** `Schematic.CountAuditLogsRequest`
@@ -867,6 +871,47 @@ await client.accounts.quickstart();
+ + +
+ +
client.accounts.getWhoAmI() -> Schematic.GetWhoAmIResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.accounts.getWhoAmI(); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `AccountsClient.RequestOptions` + +
+
+
+
+ +
@@ -3107,6 +3152,7 @@ await client.credits.countCreditLedger({ await client.credits.listBillingPlanCreditGrants({ creditId: "credit_id", planId: "plan_id", + planVersionId: "plan_version_id", limit: 1, offset: 1 }); @@ -3335,6 +3381,7 @@ await client.credits.deleteBillingPlanCreditGrant("plan_grant_id", { await client.credits.countBillingPlanCreditGrants({ creditId: "credit_id", planId: "plan_id", + planVersionId: "plan_version_id", limit: 1, offset: 1 }); @@ -3804,10 +3851,16 @@ await client.checkout.updateCustomerSubscriptionTrialEnd("subscription_id"); ```typescript await client.companies.listCompanies({ + monetizedSubscriptions: true, planId: "plan_id", + planVersionId: "plan_version_id", q: "q", + sortOrderColumn: "sort_order_column", + sortOrderDirection: "asc", + withEntitlementFor: "with_entitlement_for", withoutFeatureOverrideFor: "without_feature_override_for", withoutPlan: true, + withoutSubscription: true, withSubscription: true, limit: 1, offset: 1 @@ -4023,10 +4076,16 @@ await client.companies.deleteCompany("company_id", { ```typescript await client.companies.countCompanies({ + monetizedSubscriptions: true, planId: "plan_id", + planVersionId: "plan_version_id", q: "q", + sortOrderColumn: "sort_order_column", + sortOrderDirection: "asc", + withEntitlementFor: "with_entitlement_for", withoutFeatureOverrideFor: "without_feature_override_for", withoutPlan: true, + withoutSubscription: true, withSubscription: true, limit: 1, offset: 1 @@ -4062,64 +4121,6 @@ await client.companies.countCompanies({ - - -
- -
client.companies.countCompaniesForAdvancedFilter({ ...params }) -> Schematic.CountCompaniesForAdvancedFilterResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.companies.countCompaniesForAdvancedFilter({ - monetizedSubscriptions: true, - q: "q", - withoutPlan: true, - withoutSubscription: true, - sortOrderColumn: "sort_order_column", - sortOrderDirection: "asc", - limit: 1, - offset: 1 -}); - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Schematic.CountCompaniesForAdvancedFilterRequest` - -
-
- -
-
- -**requestOptions:** `CompaniesClient.RequestOptions` - -
-
-
-
- -
@@ -4226,64 +4227,6 @@ await client.companies.deleteCompanyByKeys({ - - -
- -
client.companies.listCompaniesForAdvancedFilter({ ...params }) -> Schematic.ListCompaniesForAdvancedFilterResponse -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.companies.listCompaniesForAdvancedFilter({ - monetizedSubscriptions: true, - q: "q", - withoutPlan: true, - withoutSubscription: true, - sortOrderColumn: "sort_order_column", - sortOrderDirection: "asc", - limit: 1, - offset: 1 -}); - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Schematic.ListCompaniesForAdvancedFilterRequest` - -
-
- -
-
- -**requestOptions:** `CompaniesClient.RequestOptions` - -
-
-
-
- -
@@ -6472,6 +6415,61 @@ await client.entitlements.listFeatureUsage({ + + +
+ +
client.entitlements.getFeatureUsageTimeSeries({ ...params }) -> Schematic.GetFeatureUsageTimeSeriesResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.entitlements.getFeatureUsageTimeSeries({ + companyId: "company_id", + endTime: new Date("2024-01-15T09:30:00.000Z"), + featureId: "feature_id", + granularity: "daily", + startTime: new Date("2024-01-15T09:30:00.000Z") +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Schematic.GetFeatureUsageTimeSeriesRequest` + +
+
+ +
+
+ +**requestOptions:** `EntitlementsClient.RequestOptions` + +
+
+
+
+ +
@@ -6656,6 +6654,7 @@ await client.entitlements.countFeatureUsers({ await client.entitlements.listPlanEntitlements({ featureId: "feature_id", planId: "plan_id", + planVersionId: "plan_version_id", q: "q", withMeteredProducts: true, limit: 1, @@ -6922,6 +6921,7 @@ await client.entitlements.deletePlanEntitlement("plan_entitlement_id"); await client.entitlements.countPlanEntitlements({ featureId: "feature_id", planId: "plan_id", + planVersionId: "plan_version_id", q: "q", withMeteredProducts: true, limit: 1, @@ -7241,7 +7241,7 @@ await client.plans.createPlan({ -
client.plans.getPlan(plan_id) -> Schematic.GetPlanResponse +
client.plans.getPlan(plan_id, { ...params }) -> Schematic.GetPlanResponse
@@ -7254,7 +7254,9 @@ await client.plans.createPlan({
```typescript -await client.plans.getPlan("plan_id"); +await client.plans.getPlan("plan_id", { + planVersionId: "plan_version_id" +}); ```
@@ -7278,6 +7280,14 @@ await client.plans.getPlan("plan_id");
+**request:** `Schematic.GetPlanRequest` + +
+
+ +
+
+ **requestOptions:** `PlansClient.RequestOptions`
@@ -7533,7 +7543,8 @@ await client.plans.countPlans({ ```typescript await client.plans.listPlanIssues({ - planId: "plan_id" + planId: "plan_id", + planVersionId: "plan_version_id" }); ``` @@ -7570,8 +7581,7 @@ await client.plans.listPlanIssues({
-## components -
client.components.listComponents({ ...params }) -> Schematic.ListComponentsResponse +
client.plans.deletePlanVersion(plan_id) -> Schematic.DeletePlanVersionResponse
@@ -7584,11 +7594,7 @@ await client.plans.listPlanIssues({
```typescript -await client.components.listComponents({ - q: "q", - limit: 1, - offset: 1 -}); +await client.plans.deletePlanVersion("plan_id"); ```
@@ -7604,7 +7610,7 @@ await client.components.listComponents({
-**request:** `Schematic.ListComponentsRequest` +**plan_id:** `string` — plan_id
@@ -7612,7 +7618,7 @@ await client.components.listComponents({
-**requestOptions:** `ComponentsClient.RequestOptions` +**requestOptions:** `PlansClient.RequestOptions`
@@ -7624,7 +7630,7 @@ await client.components.listComponents({
-
client.components.createComponent({ ...params }) -> Schematic.CreateComponentResponse +
client.plans.publishPlanVersion(plan_id, { ...params }) -> Schematic.PublishPlanVersionResponse
@@ -7637,9 +7643,9 @@ await client.components.listComponents({
```typescript -await client.components.createComponent({ - entityType: "billing", - name: "name" +await client.plans.publishPlanVersion("plan_id", { + excludedCompanyIds: ["excluded_company_ids"], + migrationStrategy: "immediate" }); ``` @@ -7656,7 +7662,7 @@ await client.components.createComponent({
-**request:** `Schematic.CreateComponentRequestBody` +**plan_id:** `string` — plan_id
@@ -7664,7 +7670,15 @@ await client.components.createComponent({
-**requestOptions:** `ComponentsClient.RequestOptions` +**request:** `Schematic.PublishPlanVersionRequestBody` + +
+
+ +
+
+ +**requestOptions:** `PlansClient.RequestOptions`
@@ -7676,7 +7690,8 @@ await client.components.createComponent({
-
client.components.getComponent(component_id) -> Schematic.GetComponentResponse +## components +
client.components.listComponents({ ...params }) -> Schematic.ListComponentsResponse
@@ -7689,7 +7704,11 @@ await client.components.createComponent({
```typescript -await client.components.getComponent("component_id"); +await client.components.listComponents({ + q: "q", + limit: 1, + offset: 1 +}); ```
@@ -7705,7 +7724,108 @@ await client.components.getComponent("component_id");
-**component_id:** `string` — component_id +**request:** `Schematic.ListComponentsRequest` + +
+
+ +
+
+ +**requestOptions:** `ComponentsClient.RequestOptions` + +
+
+ +
+ + + + +
+ +
client.components.createComponent({ ...params }) -> Schematic.CreateComponentResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.components.createComponent({ + entityType: "billing", + name: "name" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Schematic.CreateComponentRequestBody` + +
+
+ +
+
+ +**requestOptions:** `ComponentsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.components.getComponent(component_id) -> Schematic.GetComponentResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.components.getComponent("component_id"); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**component_id:** `string` — component_id
@@ -8358,6 +8478,7 @@ await client.events.getSegmentIntegrationStatus(); await client.features.listFeatures({ q: "q", withoutCompanyOverrideFor: "without_company_override_for", + planVersionId: "plan_version_id", withoutPlanEntitlementFor: "without_plan_entitlement_for", booleanRequireEvent: true, limit: 1, @@ -8622,6 +8743,7 @@ await client.features.deleteFeature("feature_id"); await client.features.countFeatures({ q: "q", withoutCompanyOverrideFor: "without_company_override_for", + planVersionId: "plan_version_id", withoutPlanEntitlementFor: "without_plan_entitlement_for", booleanRequireEvent: true, limit: 1, @@ -9408,6 +9530,7 @@ await client.plangroups.createPlanGroup({ prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true @@ -9480,6 +9603,7 @@ await client.plangroups.updatePlanGroup("plan_group_id", { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true @@ -9523,6 +9647,531 @@ await client.plangroups.updatePlanGroup("plan_group_id", {
+
+
+
+ +## planmigrations +
client.planmigrations.listCompanyMigrations({ ...params }) -> Schematic.ListCompanyMigrationsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.planmigrations.listCompanyMigrations({ + migrationId: "migration_id", + q: "q", + status: "completed", + limit: 1, + offset: 1 +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Schematic.ListCompanyMigrationsRequest` + +
+
+ +
+
+ +**requestOptions:** `PlanmigrationsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.planmigrations.countCompanyMigrations({ ...params }) -> Schematic.CountCompanyMigrationsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.planmigrations.countCompanyMigrations({ + migrationId: "migration_id", + q: "q", + status: "completed", + limit: 1, + offset: 1 +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Schematic.CountCompanyMigrationsRequest` + +
+
+ +
+
+ +**requestOptions:** `PlanmigrationsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.planmigrations.listMigrations({ ...params }) -> Schematic.ListMigrationsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.planmigrations.listMigrations({ + planVersionId: "plan_version_id", + status: "completed", + limit: 1, + offset: 1 +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Schematic.ListMigrationsRequest` + +
+
+ +
+
+ +**requestOptions:** `PlanmigrationsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.planmigrations.getMigration(plan_version_migration_id) -> Schematic.GetMigrationResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.planmigrations.getMigration("plan_version_migration_id"); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_version_migration_id:** `string` — plan_version_migration_id + +
+
+ +
+
+ +**requestOptions:** `PlanmigrationsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.planmigrations.countMigrations({ ...params }) -> Schematic.CountMigrationsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.planmigrations.countMigrations({ + planVersionId: "plan_version_id", + status: "completed", + limit: 1, + offset: 1 +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Schematic.CountMigrationsRequest` + +
+
+ +
+
+ +**requestOptions:** `PlanmigrationsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +## componentspublic +
client.componentspublic.getPublicPlans() -> Schematic.GetPublicPlansResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.componentspublic.getPublicPlans(); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `ComponentspublicClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +## scheduledcheckout +
client.scheduledcheckout.listScheduledCheckouts({ ...params }) -> Schematic.ListScheduledCheckoutsResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.scheduledcheckout.listScheduledCheckouts({ + companyId: "company_id", + status: "cancelled", + limit: 1, + offset: 1 +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Schematic.ListScheduledCheckoutsRequest` + +
+
+ +
+
+ +**requestOptions:** `ScheduledcheckoutClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.scheduledcheckout.createScheduledCheckout({ ...params }) -> Schematic.CreateScheduledCheckoutResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.scheduledcheckout.createScheduledCheckout({ + companyId: "company_id", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + toPlanId: "to_plan_id" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Schematic.CreateScheduledCheckoutRequest` + +
+
+ +
+
+ +**requestOptions:** `ScheduledcheckoutClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.scheduledcheckout.getScheduledCheckout(scheduled_checkout_id) -> Schematic.GetScheduledCheckoutResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.scheduledcheckout.getScheduledCheckout("scheduled_checkout_id"); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**scheduled_checkout_id:** `string` — scheduled_checkout_id + +
+
+ +
+
+ +**requestOptions:** `ScheduledcheckoutClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.scheduledcheckout.updateScheduledCheckout(scheduled_checkout_id, { ...params }) -> Schematic.UpdateScheduledCheckoutResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.scheduledcheckout.updateScheduledCheckout("scheduled_checkout_id"); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**scheduled_checkout_id:** `string` — scheduled_checkout_id + +
+
+ +
+
+ +**request:** `Schematic.UpdateScheduledCheckoutRequest` + +
+
+ +
+
+ +**requestOptions:** `ScheduledcheckoutClient.RequestOptions` + +
+
+
+
+ +
diff --git a/src/BaseClient.ts b/src/BaseClient.ts index 467a58d9..8ff87d60 100644 --- a/src/BaseClient.ts +++ b/src/BaseClient.ts @@ -52,8 +52,8 @@ export function normalizeClientOptions { - return core.HttpResponsePromise.fromPromise(this.__listApiRequests(request, requestOptions)); + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__listAuditLogs(request, requestOptions)); } - private async __listApiRequests( - request: Schematic.ListApiRequestsRequest = {}, + private async __listAuditLogs( + request: Schematic.ListAuditLogsRequest = {}, requestOptions?: AccountsClient.RequestOptions, - ): Promise> { - const { q, requestType, environmentId, limit, offset } = request; + ): Promise> { + const { actorType, endTime, environmentId, q, startTime, limit, offset } = request; const _queryParams: Record = {}; - if (q != null) { - _queryParams.q = q; + if (actorType != null) { + _queryParams.actor_type = serializers.ActorType.jsonOrThrow(actorType, { unrecognizedObjectKeys: "strip" }); } - if (requestType != null) { - _queryParams.request_type = requestType; + 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(); } @@ -893,7 +903,7 @@ export class AccountsClient { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.SchematicEnvironment.Default, - "api-requests", + "audit-log", ), method: "GET", headers: _headers, @@ -906,7 +916,7 @@ export class AccountsClient { }); if (_response.ok) { return { - data: serializers.ListApiRequestsResponse.parseOrThrow(_response.body, { + data: serializers.ListAuditLogsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -983,11 +993,11 @@ export class AccountsClient { } } - return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api-requests"); + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/audit-log"); } /** - * @param {string} api_request_id - api_request_id + * @param {string} audit_log_id - audit_log_id * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Schematic.UnauthorizedError} @@ -996,19 +1006,19 @@ export class AccountsClient { * @throws {@link Schematic.InternalServerError} * * @example - * await client.accounts.getApiRequest("api_request_id") + * await client.accounts.getAuditLog("audit_log_id") */ - public getApiRequest( - api_request_id: string, + public getAuditLog( + audit_log_id: string, requestOptions?: AccountsClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__getApiRequest(api_request_id, requestOptions)); + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getAuditLog(audit_log_id, requestOptions)); } - private async __getApiRequest( - api_request_id: string, + private async __getAuditLog( + audit_log_id: string, requestOptions?: AccountsClient.RequestOptions, - ): Promise> { + ): Promise> { const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1020,7 +1030,7 @@ export class AccountsClient { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.SchematicEnvironment.Default, - `api-requests/${core.url.encodePathParam(api_request_id)}`, + `audit-log/${core.url.encodePathParam(audit_log_id)}`, ), method: "GET", headers: _headers, @@ -1033,7 +1043,7 @@ export class AccountsClient { }); if (_response.ok) { return { - data: serializers.GetApiRequestResponse.parseOrThrow(_response.body, { + data: serializers.GetAuditLogResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1099,16 +1109,11 @@ export class AccountsClient { } } - return handleNonStatusCodeError( - _response.error, - _response.rawResponse, - "GET", - "/api-requests/{api_request_id}", - ); + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/audit-log/{audit_log_id}"); } /** - * @param {Schematic.CountApiRequestsRequest} request + * @param {Schematic.CountAuditLogsRequest} request * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Schematic.BadRequestError} @@ -1118,39 +1123,49 @@ export class AccountsClient { * @throws {@link Schematic.InternalServerError} * * @example - * await client.accounts.countApiRequests({ - * q: "q", - * requestType: "request_type", + * await client.accounts.countAuditLogs({ + * actorType: "api_key", + * endTime: new Date("2024-01-15T09:30:00.000Z"), * environmentId: "environment_id", + * q: "q", + * startTime: new Date("2024-01-15T09:30:00.000Z"), * limit: 1, * offset: 1 * }) */ - public countApiRequests( - request: Schematic.CountApiRequestsRequest = {}, + public countAuditLogs( + request: Schematic.CountAuditLogsRequest = {}, requestOptions?: AccountsClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__countApiRequests(request, requestOptions)); + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__countAuditLogs(request, requestOptions)); } - private async __countApiRequests( - request: Schematic.CountApiRequestsRequest = {}, + private async __countAuditLogs( + request: Schematic.CountAuditLogsRequest = {}, requestOptions?: AccountsClient.RequestOptions, - ): Promise> { - const { q, requestType, environmentId, limit, offset } = request; + ): Promise> { + const { actorType, endTime, environmentId, q, startTime, limit, offset } = request; const _queryParams: Record = {}; - if (q != null) { - _queryParams.q = q; + if (actorType != null) { + _queryParams.actor_type = serializers.ActorType.jsonOrThrow(actorType, { unrecognizedObjectKeys: "strip" }); } - if (requestType != null) { - _queryParams.request_type = requestType; + 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(); } @@ -1170,7 +1185,7 @@ export class AccountsClient { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.SchematicEnvironment.Default, - "api-requests/count", + "audit-log/count", ), method: "GET", headers: _headers, @@ -1183,7 +1198,7 @@ export class AccountsClient { }); if (_response.ok) { return { - data: serializers.CountApiRequestsResponse.parseOrThrow(_response.body, { + data: serializers.CountAuditLogsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -1260,7 +1275,7 @@ export class AccountsClient { } } - return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api-requests/count"); + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/audit-log/count"); } /** @@ -2063,4 +2078,117 @@ export class AccountsClient { return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/quickstart"); } + + /** + * @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.accounts.getWhoAmI() + */ + public getWhoAmI( + requestOptions?: AccountsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getWhoAmI(requestOptions)); + } + + private async __getWhoAmI( + requestOptions?: AccountsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + "whoami", + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GetWhoAmIResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/whoami"); + } } diff --git a/src/api/resources/accounts/client/requests/CountAuditLogsRequest.ts b/src/api/resources/accounts/client/requests/CountAuditLogsRequest.ts new file mode 100644 index 00000000..af9470d1 --- /dev/null +++ b/src/api/resources/accounts/client/requests/CountAuditLogsRequest.ts @@ -0,0 +1,27 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../index"; + +/** + * @example + * { + * actorType: "api_key", + * endTime: new Date("2024-01-15T09:30:00.000Z"), + * environmentId: "environment_id", + * q: "q", + * startTime: new Date("2024-01-15T09:30:00.000Z"), + * limit: 1, + * offset: 1 + * } + */ +export interface CountAuditLogsRequest { + actorType?: Schematic.ActorType; + endTime?: Date; + environmentId?: string; + q?: string; + startTime?: Date; + /** Page limit (default 100) */ + limit?: number; + /** Page offset (default 0) */ + offset?: number; +} diff --git a/src/api/resources/accounts/client/requests/CreateApiKeyRequestBody.ts b/src/api/resources/accounts/client/requests/CreateApiKeyRequestBody.ts index f34c0303..016b38f8 100644 --- a/src/api/resources/accounts/client/requests/CreateApiKeyRequestBody.ts +++ b/src/api/resources/accounts/client/requests/CreateApiKeyRequestBody.ts @@ -10,4 +10,5 @@ export interface CreateApiKeyRequestBody { description?: string; environmentId?: string; name: string; + readonly?: boolean; } diff --git a/src/api/resources/accounts/client/requests/ListAuditLogsRequest.ts b/src/api/resources/accounts/client/requests/ListAuditLogsRequest.ts new file mode 100644 index 00000000..1648f00f --- /dev/null +++ b/src/api/resources/accounts/client/requests/ListAuditLogsRequest.ts @@ -0,0 +1,27 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../index"; + +/** + * @example + * { + * actorType: "api_key", + * endTime: new Date("2024-01-15T09:30:00.000Z"), + * environmentId: "environment_id", + * q: "q", + * startTime: new Date("2024-01-15T09:30:00.000Z"), + * limit: 1, + * offset: 1 + * } + */ +export interface ListAuditLogsRequest { + actorType?: Schematic.ActorType; + endTime?: Date; + environmentId?: string; + q?: string; + startTime?: Date; + /** Page limit (default 100) */ + limit?: number; + /** Page offset (default 0) */ + offset?: number; +} diff --git a/src/api/resources/accounts/client/requests/index.ts b/src/api/resources/accounts/client/requests/index.ts index cc6eee45..4bec1e60 100644 --- a/src/api/resources/accounts/client/requests/index.ts +++ b/src/api/resources/accounts/client/requests/index.ts @@ -1,9 +1,9 @@ export type { CountApiKeysRequest } from "./CountApiKeysRequest"; -export type { CountApiRequestsRequest } from "./CountApiRequestsRequest"; +export type { CountAuditLogsRequest } from "./CountAuditLogsRequest"; export type { CreateApiKeyRequestBody } from "./CreateApiKeyRequestBody"; export type { CreateEnvironmentRequestBody } from "./CreateEnvironmentRequestBody"; export type { ListApiKeysRequest } from "./ListApiKeysRequest"; -export type { ListApiRequestsRequest } from "./ListApiRequestsRequest"; +export type { ListAuditLogsRequest } from "./ListAuditLogsRequest"; export type { ListEnvironmentsRequest } from "./ListEnvironmentsRequest"; export type { UpdateApiKeyRequestBody } from "./UpdateApiKeyRequestBody"; export type { UpdateEnvironmentRequestBody } from "./UpdateEnvironmentRequestBody"; diff --git a/src/api/resources/accounts/types/CountApiRequestsParams.ts b/src/api/resources/accounts/types/CountAuditLogsParams.ts similarity index 59% rename from src/api/resources/accounts/types/CountApiRequestsParams.ts rename to src/api/resources/accounts/types/CountAuditLogsParams.ts index d53ebc08..a88e1b26 100644 --- a/src/api/resources/accounts/types/CountApiRequestsParams.ts +++ b/src/api/resources/accounts/types/CountAuditLogsParams.ts @@ -1,14 +1,18 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Schematic from "../../../index"; + /** * Input parameters */ -export interface CountApiRequestsParams { +export interface CountAuditLogsParams { + actorType?: Schematic.ActorType; + endTime?: Date; environmentId?: string; /** Page limit (default 100) */ limit?: number; /** Page offset (default 0) */ offset?: number; q?: string; - requestType?: string; + startTime?: Date; } diff --git a/src/api/resources/accounts/types/CountApiRequestsResponse.ts b/src/api/resources/accounts/types/CountAuditLogsResponse.ts similarity index 66% rename from src/api/resources/accounts/types/CountApiRequestsResponse.ts rename to src/api/resources/accounts/types/CountAuditLogsResponse.ts index 2f70627d..f1d8b60a 100644 --- a/src/api/resources/accounts/types/CountApiRequestsResponse.ts +++ b/src/api/resources/accounts/types/CountAuditLogsResponse.ts @@ -2,8 +2,8 @@ import type * as Schematic from "../../../index"; -export interface CountApiRequestsResponse { +export interface CountAuditLogsResponse { data: Schematic.CountResponse; /** Input parameters */ - params: Schematic.CountApiRequestsParams; + params: Schematic.CountAuditLogsParams; } diff --git a/src/api/resources/accounts/types/GetApiRequestResponse.ts b/src/api/resources/accounts/types/GetAuditLogResponse.ts similarity index 67% rename from src/api/resources/accounts/types/GetApiRequestResponse.ts rename to src/api/resources/accounts/types/GetAuditLogResponse.ts index f6b7f684..7b05f694 100644 --- a/src/api/resources/accounts/types/GetApiRequestResponse.ts +++ b/src/api/resources/accounts/types/GetAuditLogResponse.ts @@ -2,8 +2,8 @@ import type * as Schematic from "../../../index"; -export interface GetApiRequestResponse { - data: Schematic.ApiKeyRequestResponseData; +export interface GetAuditLogResponse { + data: Schematic.AuditLogResponseData; /** Input parameters */ params: Record; } diff --git a/src/api/resources/accounts/types/ListApiRequestsResponse.ts b/src/api/resources/accounts/types/GetWhoAmIResponse.ts similarity index 51% rename from src/api/resources/accounts/types/ListApiRequestsResponse.ts rename to src/api/resources/accounts/types/GetWhoAmIResponse.ts index 9edba25e..c926deb2 100644 --- a/src/api/resources/accounts/types/ListApiRequestsResponse.ts +++ b/src/api/resources/accounts/types/GetWhoAmIResponse.ts @@ -2,8 +2,8 @@ import type * as Schematic from "../../../index"; -export interface ListApiRequestsResponse { - data: Schematic.ApiKeyRequestListResponseData[]; +export interface GetWhoAmIResponse { + data: Schematic.WhoAmIResponseData; /** Input parameters */ - params: Schematic.ListApiRequestsParams; + params: Record; } diff --git a/src/api/resources/accounts/types/ListApiRequestsParams.ts b/src/api/resources/accounts/types/ListAuditLogsParams.ts similarity index 59% rename from src/api/resources/accounts/types/ListApiRequestsParams.ts rename to src/api/resources/accounts/types/ListAuditLogsParams.ts index c70242c1..9136b963 100644 --- a/src/api/resources/accounts/types/ListApiRequestsParams.ts +++ b/src/api/resources/accounts/types/ListAuditLogsParams.ts @@ -1,14 +1,18 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Schematic from "../../../index"; + /** * Input parameters */ -export interface ListApiRequestsParams { +export interface ListAuditLogsParams { + actorType?: Schematic.ActorType; + endTime?: Date; environmentId?: string; /** Page limit (default 100) */ limit?: number; /** Page offset (default 0) */ offset?: number; q?: string; - requestType?: string; + startTime?: Date; } diff --git a/src/api/resources/accounts/types/ListAuditLogsResponse.ts b/src/api/resources/accounts/types/ListAuditLogsResponse.ts new file mode 100644 index 00000000..9bf7eed1 --- /dev/null +++ b/src/api/resources/accounts/types/ListAuditLogsResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface ListAuditLogsResponse { + data: Schematic.AuditLogListResponseData[]; + /** Input parameters */ + params: Schematic.ListAuditLogsParams; +} diff --git a/src/api/resources/accounts/types/index.ts b/src/api/resources/accounts/types/index.ts index 89d5a803..6d4fcdf8 100644 --- a/src/api/resources/accounts/types/index.ts +++ b/src/api/resources/accounts/types/index.ts @@ -1,18 +1,19 @@ export * from "./CountApiKeysParams"; export * from "./CountApiKeysResponse"; -export * from "./CountApiRequestsParams"; -export * from "./CountApiRequestsResponse"; +export * from "./CountAuditLogsParams"; +export * from "./CountAuditLogsResponse"; export * from "./CreateApiKeyResponse"; export * from "./CreateEnvironmentResponse"; export * from "./DeleteApiKeyResponse"; export * from "./DeleteEnvironmentResponse"; export * from "./GetApiKeyResponse"; -export * from "./GetApiRequestResponse"; +export * from "./GetAuditLogResponse"; export * from "./GetEnvironmentResponse"; +export * from "./GetWhoAmIResponse"; export * from "./ListApiKeysParams"; export * from "./ListApiKeysResponse"; -export * from "./ListApiRequestsParams"; -export * from "./ListApiRequestsResponse"; +export * from "./ListAuditLogsParams"; +export * from "./ListAuditLogsResponse"; export * from "./ListEnvironmentsParams"; export * from "./ListEnvironmentsResponse"; export * from "./QuickstartResponse"; diff --git a/src/api/resources/companies/client/Client.ts b/src/api/resources/companies/client/Client.ts index 5df2e4a3..621dd958 100644 --- a/src/api/resources/companies/client/Client.ts +++ b/src/api/resources/companies/client/Client.ts @@ -36,10 +36,16 @@ export class CompaniesClient { * * @example * await client.companies.listCompanies({ + * monetizedSubscriptions: true, * planId: "plan_id", + * planVersionId: "plan_version_id", * q: "q", + * sortOrderColumn: "sort_order_column", + * sortOrderDirection: "asc", + * withEntitlementFor: "with_entitlement_for", * withoutFeatureOverrideFor: "without_feature_override_for", * withoutPlan: true, + * withoutSubscription: true, * withSubscription: true, * limit: 1, * offset: 1 @@ -56,8 +62,35 @@ export class CompaniesClient { request: Schematic.ListCompaniesRequest = {}, requestOptions?: CompaniesClient.RequestOptions, ): Promise> { - const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, withSubscription, limit, offset } = request; + const { + creditTypeIds, + ids, + monetizedSubscriptions, + planId, + planIds, + planVersionId, + q, + sortOrderColumn, + sortOrderDirection, + subscriptionStatuses, + subscriptionTypes, + withEntitlementFor, + withoutFeatureOverrideFor, + withoutPlan, + withoutSubscription, + withSubscription, + 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); @@ -66,14 +99,68 @@ export class CompaniesClient { } } + 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; } @@ -82,6 +169,10 @@ export class CompaniesClient { _queryParams.without_plan = withoutPlan.toString(); } + if (withoutSubscription != null) { + _queryParams.without_subscription = withoutSubscription.toString(); + } + if (withSubscription != null) { _queryParams.with_subscription = withSubscription.toString(); } @@ -605,10 +696,16 @@ export class CompaniesClient { * * @example * await client.companies.countCompanies({ + * monetizedSubscriptions: true, * planId: "plan_id", + * planVersionId: "plan_version_id", * q: "q", + * sortOrderColumn: "sort_order_column", + * sortOrderDirection: "asc", + * withEntitlementFor: "with_entitlement_for", * withoutFeatureOverrideFor: "without_feature_override_for", * withoutPlan: true, + * withoutSubscription: true, * withSubscription: true, * limit: 1, * offset: 1 @@ -625,8 +722,35 @@ export class CompaniesClient { request: Schematic.CountCompaniesRequest = {}, requestOptions?: CompaniesClient.RequestOptions, ): Promise> { - const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, withSubscription, limit, offset } = request; + const { + creditTypeIds, + ids, + monetizedSubscriptions, + planId, + planIds, + planVersionId, + q, + sortOrderColumn, + sortOrderDirection, + subscriptionStatuses, + subscriptionTypes, + withEntitlementFor, + withoutFeatureOverrideFor, + withoutPlan, + withoutSubscription, + withSubscription, + 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); @@ -635,14 +759,68 @@ export class CompaniesClient { } } + 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; } @@ -651,6 +829,10 @@ export class CompaniesClient { _queryParams.without_plan = withoutPlan.toString(); } + if (withoutSubscription != null) { + _queryParams.without_subscription = withoutSubscription.toString(); + } + if (withSubscription != null) { _queryParams.with_subscription = withSubscription.toString(); } @@ -768,7 +950,7 @@ export class CompaniesClient { } /** - * @param {Schematic.CountCompaniesForAdvancedFilterRequest} request + * @param {Schematic.UpsertCompanyRequestBody} request * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Schematic.BadRequestError} @@ -778,312 +960,59 @@ export class CompaniesClient { * @throws {@link Schematic.InternalServerError} * * @example - * await client.companies.countCompaniesForAdvancedFilter({ - * monetizedSubscriptions: true, - * q: "q", - * withoutPlan: true, - * withoutSubscription: true, - * sortOrderColumn: "sort_order_column", - * sortOrderDirection: "asc", - * limit: 1, - * offset: 1 + * await client.companies.createCompany({ + * keys: { + * "key": "value" + * } * }) */ - public countCompaniesForAdvancedFilter( - request: Schematic.CountCompaniesForAdvancedFilterRequest = {}, + public createCompany( + request: Schematic.UpsertCompanyRequestBody, requestOptions?: CompaniesClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__countCompaniesForAdvancedFilter(request, requestOptions)); + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__createCompany(request, requestOptions)); } - private async __countCompaniesForAdvancedFilter( - request: Schematic.CountCompaniesForAdvancedFilterRequest = {}, + private async __createCompany( + request: Schematic.UpsertCompanyRequestBody, requestOptions?: CompaniesClient.RequestOptions, - ): Promise> { - const { - ids, - planIds, - featureIds, - creditTypeIds, - subscriptionStatuses, - subscriptionTypes, - monetizedSubscriptions, - q, - withoutPlan, - withoutSubscription, - sortOrderColumn, - sortOrderDirection, - displayProperties, - limit, - offset, - } = request; - const _queryParams: Record = {}; - if (ids != null) { - if (Array.isArray(ids)) { - _queryParams.ids = ids.map((item) => item); - } else { - _queryParams.ids = ids; - } - } - - if (planIds != null) { - if (Array.isArray(planIds)) { - _queryParams.plan_ids = planIds.map((item) => item); - } else { - _queryParams.plan_ids = planIds; - } - } - - if (featureIds != null) { - if (Array.isArray(featureIds)) { - _queryParams.feature_ids = featureIds.map((item) => item); - } else { - _queryParams.feature_ids = featureIds; - } - } - - if (creditTypeIds != null) { - if (Array.isArray(creditTypeIds)) { - _queryParams.credit_type_ids = creditTypeIds.map((item) => item); - } else { - _queryParams.credit_type_ids = creditTypeIds; - } - } - - 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 (monetizedSubscriptions != null) { - _queryParams.monetized_subscriptions = monetizedSubscriptions.toString(); - } - - if (q != null) { - _queryParams.q = q; - } - - if (withoutPlan != null) { - _queryParams.without_plan = withoutPlan.toString(); - } - - if (withoutSubscription != null) { - _queryParams.without_subscription = withoutSubscription.toString(); - } - - if (sortOrderColumn != null) { - _queryParams.sort_order_column = sortOrderColumn; - } - - if (sortOrderDirection != null) { - _queryParams.sort_order_direction = serializers.SortDirection.jsonOrThrow(sortOrderDirection, { - unrecognizedObjectKeys: "strip", - }); - } - - if (displayProperties != null) { - if (Array.isArray(displayProperties)) { - _queryParams.display_properties = displayProperties.map((item) => item); - } else { - _queryParams.display_properties = displayProperties; - } - } - - if (limit != null) { - _queryParams.limit = limit.toString(); - } - - if (offset != null) { - _queryParams.offset = offset.toString(); - } - - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - const _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.SchematicEnvironment.Default, - "companies/count2", - ), - method: "GET", - headers: _headers, - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: serializers.CountCompaniesForAdvancedFilterResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - rawResponse: _response.rawResponse, - }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Schematic.BadRequestError( - serializers.ApiError.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 401: - throw new Schematic.UnauthorizedError( - serializers.ApiError.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 403: - throw new Schematic.ForbiddenError( - serializers.ApiError.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 404: - throw new Schematic.NotFoundError( - serializers.ApiError.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 500: - throw new Schematic.InternalServerError( - serializers.ApiError.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - default: - throw new errors.SchematicError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/companies/count2"); - } - - /** - * @param {Schematic.UpsertCompanyRequestBody} request - * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Schematic.BadRequestError} - * @throws {@link Schematic.UnauthorizedError} - * @throws {@link Schematic.ForbiddenError} - * @throws {@link Schematic.NotFoundError} - * @throws {@link Schematic.InternalServerError} - * - * @example - * await client.companies.createCompany({ - * keys: { - * "key": "value" - * } - * }) - */ - public createCompany( - request: Schematic.UpsertCompanyRequestBody, - requestOptions?: CompaniesClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__createCompany(request, requestOptions)); - } - - private async __createCompany( - request: Schematic.UpsertCompanyRequestBody, - requestOptions?: CompaniesClient.RequestOptions, - ): Promise> { - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - const _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.SchematicEnvironment.Default, - "companies/create", - ), - method: "POST", - headers: _headers, - contentType: "application/json", - queryParameters: requestOptions?.queryParams, - requestType: "json", - body: serializers.UpsertCompanyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: serializers.CreateCompanyResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - rawResponse: _response.rawResponse, - }; + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + "companies/create", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.UpsertCompanyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CreateCompanyResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; } if (_response.error.reason === "status-code") { @@ -1290,259 +1219,6 @@ export class CompaniesClient { return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/companies/delete"); } - /** - * @param {Schematic.ListCompaniesForAdvancedFilterRequest} request - * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Schematic.BadRequestError} - * @throws {@link Schematic.UnauthorizedError} - * @throws {@link Schematic.ForbiddenError} - * @throws {@link Schematic.NotFoundError} - * @throws {@link Schematic.InternalServerError} - * - * @example - * await client.companies.listCompaniesForAdvancedFilter({ - * monetizedSubscriptions: true, - * q: "q", - * withoutPlan: true, - * withoutSubscription: true, - * sortOrderColumn: "sort_order_column", - * sortOrderDirection: "asc", - * limit: 1, - * offset: 1 - * }) - */ - public listCompaniesForAdvancedFilter( - request: Schematic.ListCompaniesForAdvancedFilterRequest = {}, - requestOptions?: CompaniesClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__listCompaniesForAdvancedFilter(request, requestOptions)); - } - - private async __listCompaniesForAdvancedFilter( - request: Schematic.ListCompaniesForAdvancedFilterRequest = {}, - requestOptions?: CompaniesClient.RequestOptions, - ): Promise> { - const { - ids, - planIds, - featureIds, - creditTypeIds, - subscriptionStatuses, - subscriptionTypes, - monetizedSubscriptions, - q, - withoutPlan, - withoutSubscription, - sortOrderColumn, - sortOrderDirection, - displayProperties, - limit, - offset, - } = request; - const _queryParams: Record = {}; - if (ids != null) { - if (Array.isArray(ids)) { - _queryParams.ids = ids.map((item) => item); - } else { - _queryParams.ids = ids; - } - } - - if (planIds != null) { - if (Array.isArray(planIds)) { - _queryParams.plan_ids = planIds.map((item) => item); - } else { - _queryParams.plan_ids = planIds; - } - } - - if (featureIds != null) { - if (Array.isArray(featureIds)) { - _queryParams.feature_ids = featureIds.map((item) => item); - } else { - _queryParams.feature_ids = featureIds; - } - } - - if (creditTypeIds != null) { - if (Array.isArray(creditTypeIds)) { - _queryParams.credit_type_ids = creditTypeIds.map((item) => item); - } else { - _queryParams.credit_type_ids = creditTypeIds; - } - } - - 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 (monetizedSubscriptions != null) { - _queryParams.monetized_subscriptions = monetizedSubscriptions.toString(); - } - - if (q != null) { - _queryParams.q = q; - } - - if (withoutPlan != null) { - _queryParams.without_plan = withoutPlan.toString(); - } - - if (withoutSubscription != null) { - _queryParams.without_subscription = withoutSubscription.toString(); - } - - if (sortOrderColumn != null) { - _queryParams.sort_order_column = sortOrderColumn; - } - - if (sortOrderDirection != null) { - _queryParams.sort_order_direction = serializers.SortDirection.jsonOrThrow(sortOrderDirection, { - unrecognizedObjectKeys: "strip", - }); - } - - if (displayProperties != null) { - if (Array.isArray(displayProperties)) { - _queryParams.display_properties = displayProperties.map((item) => item); - } else { - _queryParams.display_properties = displayProperties; - } - } - - if (limit != null) { - _queryParams.limit = limit.toString(); - } - - if (offset != null) { - _queryParams.offset = offset.toString(); - } - - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - const _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.SchematicEnvironment.Default, - "companies/list2", - ), - method: "GET", - headers: _headers, - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: serializers.ListCompaniesForAdvancedFilterResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - rawResponse: _response.rawResponse, - }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Schematic.BadRequestError( - serializers.ApiError.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 401: - throw new Schematic.UnauthorizedError( - serializers.ApiError.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 403: - throw new Schematic.ForbiddenError( - serializers.ApiError.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 404: - throw new Schematic.NotFoundError( - serializers.ApiError.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - case 500: - throw new Schematic.InternalServerError( - serializers.ApiError.parseOrThrow(_response.error.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - _response.rawResponse, - ); - default: - throw new errors.SchematicError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/companies/list2"); - } - /** * @param {Schematic.LookupCompanyRequest} request * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration. diff --git a/src/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.ts b/src/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.ts deleted file mode 100644 index 9ad53a21..00000000 --- a/src/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.ts +++ /dev/null @@ -1,49 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../../../index"; - -/** - * @example - * { - * monetizedSubscriptions: true, - * q: "q", - * withoutPlan: true, - * withoutSubscription: true, - * sortOrderColumn: "sort_order_column", - * sortOrderDirection: "asc", - * limit: 1, - * offset: 1 - * } - */ -export interface CountCompaniesForAdvancedFilterRequest { - /** Filter companies by multiple company IDs (starts with comp_) */ - ids?: string | string[]; - /** Filter companies by one or more plan IDs (each ID starts with plan_) */ - planIds?: string | string[]; - /** Filter companies by one or more feature IDs (each ID starts with feat_) */ - featureIds?: string | string[]; - /** Filter companies by one or more credit type IDs (each ID starts with bcrd_) */ - creditTypeIds?: string | string[]; - /** Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid) */ - subscriptionStatuses?: Schematic.SubscriptionStatus | Schematic.SubscriptionStatus[]; - /** Filter companies by one or more subscription types (paid, free, trial) */ - subscriptionTypes?: Schematic.SubscriptionType | Schematic.SubscriptionType[]; - /** Filter companies that have monetized subscriptions */ - monetizedSubscriptions?: boolean; - /** Search for companies by name, keys or string traits */ - q?: string; - /** Filter out companies that have a plan */ - withoutPlan?: boolean; - /** Filter out companies that have a subscription */ - withoutSubscription?: boolean; - /** Column to sort by (e.g. name, created_at, last_seen_at) */ - sortOrderColumn?: string; - /** Direction to sort by (asc or desc) */ - sortOrderDirection?: Schematic.SortDirection; - /** Select the display columns to return (e.g. plan, subscription, users, last_seen_at) */ - displayProperties?: string | string[]; - /** Page limit (default 100) */ - limit?: number; - /** Page offset (default 0) */ - offset?: number; -} diff --git a/src/api/resources/companies/client/requests/CountCompaniesRequest.ts b/src/api/resources/companies/client/requests/CountCompaniesRequest.ts index 2dff3148..a7b50442 100644 --- a/src/api/resources/companies/client/requests/CountCompaniesRequest.ts +++ b/src/api/resources/companies/client/requests/CountCompaniesRequest.ts @@ -1,28 +1,56 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Schematic from "../../../../index"; + /** * @example * { + * monetizedSubscriptions: true, * planId: "plan_id", + * planVersionId: "plan_version_id", * q: "q", + * sortOrderColumn: "sort_order_column", + * sortOrderDirection: "asc", + * withEntitlementFor: "with_entitlement_for", * withoutFeatureOverrideFor: "without_feature_override_for", * withoutPlan: true, + * withoutSubscription: true, * withSubscription: true, * limit: 1, * offset: 1 * } */ export interface CountCompaniesRequest { + /** Filter companies by one or more credit type IDs (each ID starts with bcrd_) */ + creditTypeIds?: string | string[]; /** Filter companies by multiple company IDs (starts with comp_) */ ids?: string | string[]; + /** Filter companies that have monetized subscriptions */ + monetizedSubscriptions?: boolean; /** Filter companies by plan ID (starts with plan_) */ planId?: string; + /** Filter companies by one or more plan IDs (each ID starts with plan_) */ + planIds?: string | string[]; + /** Filter companies by plan version ID (starts with plvr_) */ + planVersionId?: string; /** Search for companies by name, keys or string traits */ q?: string; + /** Column to sort by (e.g. name, created_at, last_seen_at) */ + sortOrderColumn?: string; + /** Direction to sort by (asc or desc) */ + sortOrderDirection?: Schematic.SortDirection; + /** Filter companies by one or more subscription statuses */ + subscriptionStatuses?: Schematic.SubscriptionStatus | Schematic.SubscriptionStatus[]; + /** Filter companies by one or more subscription types */ + subscriptionTypes?: Schematic.SubscriptionType | Schematic.SubscriptionType[]; + /** Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID */ + withEntitlementFor?: string; /** Filter out companies that already have a company override for the specified feature ID */ withoutFeatureOverrideFor?: string; /** Filter out companies that have a plan */ withoutPlan?: boolean; + /** Filter out companies that have a subscription */ + withoutSubscription?: boolean; /** Filter companies that have a subscription */ withSubscription?: boolean; /** Page limit (default 100) */ diff --git a/src/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.ts b/src/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.ts deleted file mode 100644 index 2fbe5247..00000000 --- a/src/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.ts +++ /dev/null @@ -1,49 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../../../index"; - -/** - * @example - * { - * monetizedSubscriptions: true, - * q: "q", - * withoutPlan: true, - * withoutSubscription: true, - * sortOrderColumn: "sort_order_column", - * sortOrderDirection: "asc", - * limit: 1, - * offset: 1 - * } - */ -export interface ListCompaniesForAdvancedFilterRequest { - /** Filter companies by multiple company IDs (starts with comp_) */ - ids?: string | string[]; - /** Filter companies by one or more plan IDs (each ID starts with plan_) */ - planIds?: string | string[]; - /** Filter companies by one or more feature IDs (each ID starts with feat_) */ - featureIds?: string | string[]; - /** Filter companies by one or more credit type IDs (each ID starts with bcrd_) */ - creditTypeIds?: string | string[]; - /** Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid) */ - subscriptionStatuses?: Schematic.SubscriptionStatus | Schematic.SubscriptionStatus[]; - /** Filter companies by one or more subscription types (paid, free, trial) */ - subscriptionTypes?: Schematic.SubscriptionType | Schematic.SubscriptionType[]; - /** Filter companies that have monetized subscriptions */ - monetizedSubscriptions?: boolean; - /** Search for companies by name, keys or string traits */ - q?: string; - /** Filter out companies that have a plan */ - withoutPlan?: boolean; - /** Filter out companies that have a subscription */ - withoutSubscription?: boolean; - /** Column to sort by (e.g. name, created_at, last_seen_at) */ - sortOrderColumn?: string; - /** Direction to sort by (asc or desc) */ - sortOrderDirection?: Schematic.SortDirection; - /** Select the display columns to return (e.g. plan, subscription, users, last_seen_at) */ - displayProperties?: string | string[]; - /** Page limit (default 100) */ - limit?: number; - /** Page offset (default 0) */ - offset?: number; -} diff --git a/src/api/resources/companies/client/requests/ListCompaniesRequest.ts b/src/api/resources/companies/client/requests/ListCompaniesRequest.ts index 349495d4..52153529 100644 --- a/src/api/resources/companies/client/requests/ListCompaniesRequest.ts +++ b/src/api/resources/companies/client/requests/ListCompaniesRequest.ts @@ -1,28 +1,56 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Schematic from "../../../../index"; + /** * @example * { + * monetizedSubscriptions: true, * planId: "plan_id", + * planVersionId: "plan_version_id", * q: "q", + * sortOrderColumn: "sort_order_column", + * sortOrderDirection: "asc", + * withEntitlementFor: "with_entitlement_for", * withoutFeatureOverrideFor: "without_feature_override_for", * withoutPlan: true, + * withoutSubscription: true, * withSubscription: true, * limit: 1, * offset: 1 * } */ export interface ListCompaniesRequest { + /** Filter companies by one or more credit type IDs (each ID starts with bcrd_) */ + creditTypeIds?: string | string[]; /** Filter companies by multiple company IDs (starts with comp_) */ ids?: string | string[]; + /** Filter companies that have monetized subscriptions */ + monetizedSubscriptions?: boolean; /** Filter companies by plan ID (starts with plan_) */ planId?: string; + /** Filter companies by one or more plan IDs (each ID starts with plan_) */ + planIds?: string | string[]; + /** Filter companies by plan version ID (starts with plvr_) */ + planVersionId?: string; /** Search for companies by name, keys or string traits */ q?: string; + /** Column to sort by (e.g. name, created_at, last_seen_at) */ + sortOrderColumn?: string; + /** Direction to sort by (asc or desc) */ + sortOrderDirection?: Schematic.SortDirection; + /** Filter companies by one or more subscription statuses */ + subscriptionStatuses?: Schematic.SubscriptionStatus | Schematic.SubscriptionStatus[]; + /** Filter companies by one or more subscription types */ + subscriptionTypes?: Schematic.SubscriptionType | Schematic.SubscriptionType[]; + /** Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID */ + withEntitlementFor?: string; /** Filter out companies that already have a company override for the specified feature ID */ withoutFeatureOverrideFor?: string; /** Filter out companies that have a plan */ withoutPlan?: boolean; + /** Filter out companies that have a subscription */ + withoutSubscription?: boolean; /** Filter companies that have a subscription */ withSubscription?: boolean; /** Page limit (default 100) */ diff --git a/src/api/resources/companies/client/requests/index.ts b/src/api/resources/companies/client/requests/index.ts index dee951de..70bb450f 100644 --- a/src/api/resources/companies/client/requests/index.ts +++ b/src/api/resources/companies/client/requests/index.ts @@ -1,4 +1,3 @@ -export type { CountCompaniesForAdvancedFilterRequest } from "./CountCompaniesForAdvancedFilterRequest"; export type { CountCompaniesRequest } from "./CountCompaniesRequest"; export type { CountEntityKeyDefinitionsRequest } from "./CountEntityKeyDefinitionsRequest"; export type { CountEntityTraitDefinitionsRequest } from "./CountEntityTraitDefinitionsRequest"; @@ -10,7 +9,6 @@ export type { DeleteCompanyRequest } from "./DeleteCompanyRequest"; export type { GetActiveCompanySubscriptionRequest } from "./GetActiveCompanySubscriptionRequest"; export type { GetEntityTraitValuesRequest } from "./GetEntityTraitValuesRequest"; export type { GetOrCreateCompanyMembershipRequestBody } from "./GetOrCreateCompanyMembershipRequestBody"; -export type { ListCompaniesForAdvancedFilterRequest } from "./ListCompaniesForAdvancedFilterRequest"; export type { ListCompaniesRequest } from "./ListCompaniesRequest"; export type { ListCompanyMembershipsRequest } from "./ListCompanyMembershipsRequest"; export type { ListEntityKeyDefinitionsRequest } from "./ListEntityKeyDefinitionsRequest"; diff --git a/src/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.ts b/src/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.ts deleted file mode 100644 index 11404c02..00000000 --- a/src/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.ts +++ /dev/null @@ -1,38 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../../index"; - -/** - * Input parameters - */ -export interface CountCompaniesForAdvancedFilterParams { - /** Filter companies by one or more credit type IDs (each ID starts with bcrd_) */ - creditTypeIds?: string[]; - /** Select the display columns to return (e.g. plan, subscription, users, last_seen_at) */ - displayProperties?: string[]; - /** Filter companies by one or more feature IDs (each ID starts with feat_) */ - featureIds?: string[]; - /** Filter companies by multiple company IDs (starts with comp_) */ - ids?: string[]; - /** Page limit (default 100) */ - limit?: number; - /** Filter companies that have monetized subscriptions */ - monetizedSubscriptions?: boolean; - /** Page offset (default 0) */ - offset?: number; - /** Filter companies by one or more plan IDs (each ID starts with plan_) */ - planIds?: string[]; - /** Search for companies by name, keys or string traits */ - q?: string; - /** Column to sort by (e.g. name, created_at, last_seen_at) */ - sortOrderColumn?: string; - sortOrderDirection?: Schematic.SortDirection; - /** Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid) */ - subscriptionStatuses?: Schematic.SubscriptionStatus[]; - /** Filter companies by one or more subscription types (paid, free, trial) */ - subscriptionTypes?: Schematic.SubscriptionType[]; - /** Filter out companies that have a plan */ - withoutPlan?: boolean; - /** Filter out companies that have a subscription */ - withoutSubscription?: boolean; -} diff --git a/src/api/resources/companies/types/CountCompaniesParams.ts b/src/api/resources/companies/types/CountCompaniesParams.ts index 59959a54..5f2bff89 100644 --- a/src/api/resources/companies/types/CountCompaniesParams.ts +++ b/src/api/resources/companies/types/CountCompaniesParams.ts @@ -1,23 +1,45 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Schematic from "../../../index"; + /** * Input parameters */ export interface CountCompaniesParams { + /** Filter companies by one or more credit type IDs (each ID starts with bcrd_) */ + creditTypeIds?: string[]; /** Filter companies by multiple company IDs (starts with comp_) */ ids?: string[]; /** Page limit (default 100) */ limit?: number; + /** Filter companies that have monetized subscriptions */ + monetizedSubscriptions?: boolean; /** Page offset (default 0) */ offset?: number; /** Filter companies by plan ID (starts with plan_) */ planId?: string; + /** Filter companies by one or more plan IDs (each ID starts with plan_) */ + planIds?: string[]; + /** Filter companies by plan version ID (starts with plvr_) */ + planVersionId?: string; /** Search for companies by name, keys or string traits */ q?: string; + /** Column to sort by (e.g. name, created_at, last_seen_at) */ + sortOrderColumn?: string; + /** Direction to sort by (asc or desc) */ + sortOrderDirection?: Schematic.SortDirection; + /** Filter companies by one or more subscription statuses */ + subscriptionStatuses?: Schematic.SubscriptionStatus[]; + /** Filter companies by one or more subscription types */ + subscriptionTypes?: Schematic.SubscriptionType[]; + /** Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID */ + withEntitlementFor?: string; /** Filter companies that have a subscription */ withSubscription?: boolean; /** Filter out companies that already have a company override for the specified feature ID */ withoutFeatureOverrideFor?: string; /** Filter out companies that have a plan */ withoutPlan?: boolean; + /** Filter out companies that have a subscription */ + withoutSubscription?: boolean; } diff --git a/src/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.ts b/src/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.ts deleted file mode 100644 index e6a4e5cc..00000000 --- a/src/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.ts +++ /dev/null @@ -1,38 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../../index"; - -/** - * Input parameters - */ -export interface ListCompaniesForAdvancedFilterParams { - /** Filter companies by one or more credit type IDs (each ID starts with bcrd_) */ - creditTypeIds?: string[]; - /** Select the display columns to return (e.g. plan, subscription, users, last_seen_at) */ - displayProperties?: string[]; - /** Filter companies by one or more feature IDs (each ID starts with feat_) */ - featureIds?: string[]; - /** Filter companies by multiple company IDs (starts with comp_) */ - ids?: string[]; - /** Page limit (default 100) */ - limit?: number; - /** Filter companies that have monetized subscriptions */ - monetizedSubscriptions?: boolean; - /** Page offset (default 0) */ - offset?: number; - /** Filter companies by one or more plan IDs (each ID starts with plan_) */ - planIds?: string[]; - /** Search for companies by name, keys or string traits */ - q?: string; - /** Column to sort by (e.g. name, created_at, last_seen_at) */ - sortOrderColumn?: string; - sortOrderDirection?: Schematic.SortDirection; - /** Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid) */ - subscriptionStatuses?: Schematic.SubscriptionStatus[]; - /** Filter companies by one or more subscription types (paid, free, trial) */ - subscriptionTypes?: Schematic.SubscriptionType[]; - /** Filter out companies that have a plan */ - withoutPlan?: boolean; - /** Filter out companies that have a subscription */ - withoutSubscription?: boolean; -} diff --git a/src/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.ts b/src/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.ts deleted file mode 100644 index 7ec7bbf0..00000000 --- a/src/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../../index"; - -export interface ListCompaniesForAdvancedFilterResponse { - data: Schematic.CompanyViewWithFeatureUsageResponseData[]; - /** Input parameters */ - params: Schematic.ListCompaniesForAdvancedFilterParams; -} diff --git a/src/api/resources/companies/types/ListCompaniesParams.ts b/src/api/resources/companies/types/ListCompaniesParams.ts index f13f4bd4..1d038125 100644 --- a/src/api/resources/companies/types/ListCompaniesParams.ts +++ b/src/api/resources/companies/types/ListCompaniesParams.ts @@ -1,23 +1,45 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Schematic from "../../../index"; + /** * Input parameters */ export interface ListCompaniesParams { + /** Filter companies by one or more credit type IDs (each ID starts with bcrd_) */ + creditTypeIds?: string[]; /** Filter companies by multiple company IDs (starts with comp_) */ ids?: string[]; /** Page limit (default 100) */ limit?: number; + /** Filter companies that have monetized subscriptions */ + monetizedSubscriptions?: boolean; /** Page offset (default 0) */ offset?: number; /** Filter companies by plan ID (starts with plan_) */ planId?: string; + /** Filter companies by one or more plan IDs (each ID starts with plan_) */ + planIds?: string[]; + /** Filter companies by plan version ID (starts with plvr_) */ + planVersionId?: string; /** Search for companies by name, keys or string traits */ q?: string; + /** Column to sort by (e.g. name, created_at, last_seen_at) */ + sortOrderColumn?: string; + /** Direction to sort by (asc or desc) */ + sortOrderDirection?: Schematic.SortDirection; + /** Filter companies by one or more subscription statuses */ + subscriptionStatuses?: Schematic.SubscriptionStatus[]; + /** Filter companies by one or more subscription types */ + subscriptionTypes?: Schematic.SubscriptionType[]; + /** Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID */ + withEntitlementFor?: string; /** Filter companies that have a subscription */ withSubscription?: boolean; /** Filter out companies that already have a company override for the specified feature ID */ withoutFeatureOverrideFor?: string; /** Filter out companies that have a plan */ withoutPlan?: boolean; + /** Filter out companies that have a subscription */ + withoutSubscription?: boolean; } diff --git a/src/api/resources/companies/types/index.ts b/src/api/resources/companies/types/index.ts index 8a15e374..a69478e3 100644 --- a/src/api/resources/companies/types/index.ts +++ b/src/api/resources/companies/types/index.ts @@ -1,5 +1,3 @@ -export * from "./CountCompaniesForAdvancedFilterParams"; -export * from "./CountCompaniesForAdvancedFilterResponse"; export * from "./CountCompaniesParams"; export * from "./CountCompaniesResponse"; export * from "./CountEntityKeyDefinitionsParams"; @@ -31,8 +29,6 @@ export * from "./GetOrCreateEntityTraitDefinitionResponse"; export * from "./GetPlanChangeResponse"; export * from "./GetPlanTraitResponse"; export * from "./GetUserResponse"; -export * from "./ListCompaniesForAdvancedFilterParams"; -export * from "./ListCompaniesForAdvancedFilterResponse"; export * from "./ListCompaniesParams"; export * from "./ListCompaniesResponse"; export * from "./ListCompanyMembershipsParams"; diff --git a/src/api/resources/componentspublic/client/Client.ts b/src/api/resources/componentspublic/client/Client.ts new file mode 100644 index 00000000..9fd97948 --- /dev/null +++ b/src/api/resources/componentspublic/client/Client.ts @@ -0,0 +1,138 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; +import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient"; +import * as core from "../../../../core"; +import { mergeHeaders } from "../../../../core/headers"; +import * as environments from "../../../../environments"; +import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError"; +import * as errors from "../../../../errors/index"; +import * as serializers from "../../../../serialization/index"; +import * as Schematic from "../../../index"; + +export declare namespace ComponentspublicClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class ComponentspublicClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + + constructor(options: ComponentspublicClient.Options) { + this._options = normalizeClientOptionsWithAuth(options); + } + + /** + * @param {ComponentspublicClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.componentspublic.getPublicPlans() + */ + public getPublicPlans( + requestOptions?: ComponentspublicClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getPublicPlans(requestOptions)); + } + + private async __getPublicPlans( + requestOptions?: ComponentspublicClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + "public/plans", + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GetPublicPlansResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/public/plans"); + } +} diff --git a/src/api/resources/componentspublic/client/index.ts b/src/api/resources/componentspublic/client/index.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/src/api/resources/componentspublic/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/componentspublic/index.ts b/src/api/resources/componentspublic/index.ts new file mode 100644 index 00000000..d2ec2302 --- /dev/null +++ b/src/api/resources/componentspublic/index.ts @@ -0,0 +1,2 @@ +export * from "./client"; +export * from "./types"; diff --git a/src/api/resources/componentspublic/types/GetPublicPlansResponse.ts b/src/api/resources/componentspublic/types/GetPublicPlansResponse.ts new file mode 100644 index 00000000..e722c6ff --- /dev/null +++ b/src/api/resources/componentspublic/types/GetPublicPlansResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface GetPublicPlansResponse { + data: Schematic.PublicPlansResponseData; + /** Input parameters */ + params: Record; +} diff --git a/src/api/resources/componentspublic/types/index.ts b/src/api/resources/componentspublic/types/index.ts new file mode 100644 index 00000000..9c1c69f6 --- /dev/null +++ b/src/api/resources/componentspublic/types/index.ts @@ -0,0 +1 @@ +export * from "./GetPublicPlansResponse"; diff --git a/src/api/resources/credits/client/Client.ts b/src/api/resources/credits/client/Client.ts index 23810a0c..7637e34d 100644 --- a/src/api/resources/credits/client/Client.ts +++ b/src/api/resources/credits/client/Client.ts @@ -2987,6 +2987,7 @@ export class CreditsClient { * await client.credits.listBillingPlanCreditGrants({ * creditId: "credit_id", * planId: "plan_id", + * planVersionId: "plan_version_id", * limit: 1, * offset: 1 * }) @@ -3002,12 +3003,20 @@ export class CreditsClient { request: Schematic.ListBillingPlanCreditGrantsRequest = {}, requestOptions?: CreditsClient.RequestOptions, ): Promise> { - const { creditId, planId, planIds, ids, limit, offset } = request; + 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; } @@ -3020,12 +3029,8 @@ export class CreditsClient { } } - if (ids != null) { - if (Array.isArray(ids)) { - _queryParams.ids = ids.map((item) => item); - } else { - _queryParams.ids = ids; - } + if (planVersionId != null) { + _queryParams.plan_version_id = planVersionId; } if (limit != null) { @@ -3585,6 +3590,7 @@ export class CreditsClient { * await client.credits.countBillingPlanCreditGrants({ * creditId: "credit_id", * planId: "plan_id", + * planVersionId: "plan_version_id", * limit: 1, * offset: 1 * }) @@ -3600,12 +3606,20 @@ export class CreditsClient { request: Schematic.CountBillingPlanCreditGrantsRequest = {}, requestOptions?: CreditsClient.RequestOptions, ): Promise> { - const { creditId, planId, planIds, ids, limit, offset } = request; + 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; } @@ -3618,12 +3632,8 @@ export class CreditsClient { } } - if (ids != null) { - if (Array.isArray(ids)) { - _queryParams.ids = ids.map((item) => item); - } else { - _queryParams.ids = ids; - } + if (planVersionId != null) { + _queryParams.plan_version_id = planVersionId; } if (limit != null) { diff --git a/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts b/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts index aad2d3fa..bde368e2 100644 --- a/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts +++ b/src/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.ts @@ -5,15 +5,17 @@ * { * creditId: "credit_id", * planId: "plan_id", + * planVersionId: "plan_version_id", * limit: 1, * offset: 1 * } */ export interface CountBillingPlanCreditGrantsRequest { creditId?: string; + ids?: string | string[]; planId?: string; planIds?: string | string[]; - ids?: string | string[]; + planVersionId?: string; /** Page limit (default 100) */ limit?: number; /** Page offset (default 0) */ diff --git a/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts b/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts index ef488e2a..bb748a1f 100644 --- a/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts +++ b/src/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.ts @@ -5,15 +5,17 @@ * { * creditId: "credit_id", * planId: "plan_id", + * planVersionId: "plan_version_id", * limit: 1, * offset: 1 * } */ export interface ListBillingPlanCreditGrantsRequest { creditId?: string; + ids?: string | string[]; planId?: string; planIds?: string | string[]; - ids?: string | string[]; + planVersionId?: string; /** Page limit (default 100) */ limit?: number; /** Page offset (default 0) */ diff --git a/src/api/resources/credits/types/CountBillingPlanCreditGrantsParams.ts b/src/api/resources/credits/types/CountBillingPlanCreditGrantsParams.ts index 6505d0be..211f1344 100644 --- a/src/api/resources/credits/types/CountBillingPlanCreditGrantsParams.ts +++ b/src/api/resources/credits/types/CountBillingPlanCreditGrantsParams.ts @@ -12,4 +12,5 @@ export interface CountBillingPlanCreditGrantsParams { offset?: number; planId?: string; planIds?: string[]; + planVersionId?: string; } diff --git a/src/api/resources/credits/types/ListBillingPlanCreditGrantsParams.ts b/src/api/resources/credits/types/ListBillingPlanCreditGrantsParams.ts index 0c6c48cd..bb63e163 100644 --- a/src/api/resources/credits/types/ListBillingPlanCreditGrantsParams.ts +++ b/src/api/resources/credits/types/ListBillingPlanCreditGrantsParams.ts @@ -12,4 +12,5 @@ export interface ListBillingPlanCreditGrantsParams { offset?: number; planId?: string; planIds?: string[]; + planVersionId?: string; } diff --git a/src/api/resources/entitlements/client/Client.ts b/src/api/resources/entitlements/client/Client.ts index c3f6ffc9..e94c2dd1 100644 --- a/src/api/resources/entitlements/client/Client.ts +++ b/src/api/resources/entitlements/client/Client.ts @@ -1408,6 +1408,140 @@ export class EntitlementsClient { return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/feature-usage"); } + /** + * @param {Schematic.GetFeatureUsageTimeSeriesRequest} request + * @param {EntitlementsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.entitlements.getFeatureUsageTimeSeries({ + * companyId: "company_id", + * endTime: new Date("2024-01-15T09:30:00.000Z"), + * featureId: "feature_id", + * granularity: "daily", + * startTime: new Date("2024-01-15T09:30:00.000Z") + * }) + */ + public getFeatureUsageTimeSeries( + request: Schematic.GetFeatureUsageTimeSeriesRequest, + requestOptions?: EntitlementsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getFeatureUsageTimeSeries(request, requestOptions)); + } + + private async __getFeatureUsageTimeSeries( + request: Schematic.GetFeatureUsageTimeSeriesRequest, + 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 _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + "feature-usage-timeseries", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GetFeatureUsageTimeSeriesResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/feature-usage-timeseries"); + } + /** * @param {Schematic.CountFeatureUsageRequest} request * @param {EntitlementsClient.RequestOptions} requestOptions - Request-specific configuration. @@ -1900,6 +2034,7 @@ export class EntitlementsClient { * await client.entitlements.listPlanEntitlements({ * featureId: "feature_id", * planId: "plan_id", + * planVersionId: "plan_version_id", * q: "q", * withMeteredProducts: true, * limit: 1, @@ -1917,7 +2052,19 @@ export class EntitlementsClient { request: Schematic.ListPlanEntitlementsRequest = {}, requestOptions?: EntitlementsClient.RequestOptions, ): Promise> { - const { featureId, featureIds, ids, planId, planIds, q, withMeteredProducts, limit, offset } = request; + const { + featureId, + featureIds, + ids, + planId, + planIds, + planVersionId, + planVersionIds, + q, + withMeteredProducts, + limit, + offset, + } = request; const _queryParams: Record = {}; if (featureId != null) { _queryParams.feature_id = featureId; @@ -1951,6 +2098,18 @@ export class EntitlementsClient { } } + 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; } @@ -2621,6 +2780,7 @@ export class EntitlementsClient { * await client.entitlements.countPlanEntitlements({ * featureId: "feature_id", * planId: "plan_id", + * planVersionId: "plan_version_id", * q: "q", * withMeteredProducts: true, * limit: 1, @@ -2638,7 +2798,19 @@ export class EntitlementsClient { request: Schematic.CountPlanEntitlementsRequest = {}, requestOptions?: EntitlementsClient.RequestOptions, ): Promise> { - const { featureId, featureIds, ids, planId, planIds, q, withMeteredProducts, limit, offset } = request; + const { + featureId, + featureIds, + ids, + planId, + planIds, + planVersionId, + planVersionIds, + q, + withMeteredProducts, + limit, + offset, + } = request; const _queryParams: Record = {}; if (featureId != null) { _queryParams.feature_id = featureId; @@ -2672,6 +2844,18 @@ export class EntitlementsClient { } } + 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; } diff --git a/src/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.ts b/src/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.ts index b23008f5..431d12c0 100644 --- a/src/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.ts +++ b/src/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.ts @@ -5,6 +5,7 @@ * { * featureId: "feature_id", * planId: "plan_id", + * planVersionId: "plan_version_id", * q: "q", * withMeteredProducts: true, * limit: 1, @@ -22,6 +23,10 @@ export interface CountPlanEntitlementsRequest { planId?: string; /** Filter plan entitlements by multiple plan IDs (starting with plan_) */ planIds?: string | string[]; + /** Filter plan entitlements by a single plan version ID (starting with plvr_) */ + planVersionId?: string; + /** Filter plan entitlements by multiple plan version IDs (starting with plvr_) */ + planVersionIds?: string | string[]; /** Search for plan entitlements by feature or company name */ q?: string; /** Filter plan entitlements only with metered products */ diff --git a/src/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts b/src/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts index 9a4286e0..7491b24d 100644 --- a/src/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts +++ b/src/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts @@ -24,6 +24,7 @@ export interface CreatePlanEntitlementRequestBody { monthlyUnitPriceDecimal?: string; overageBillingProductId?: string; planId: string; + planVersionId?: string; priceBehavior?: Schematic.EntitlementPriceBehavior; /** Use MonthlyPriceTiers or YearlyPriceTiers instead */ priceTiers?: Schematic.CreatePriceTierRequestBody[]; diff --git a/src/api/resources/entitlements/client/requests/GetFeatureUsageTimeSeriesRequest.ts b/src/api/resources/entitlements/client/requests/GetFeatureUsageTimeSeriesRequest.ts new file mode 100644 index 00000000..d91b0dd5 --- /dev/null +++ b/src/api/resources/entitlements/client/requests/GetFeatureUsageTimeSeriesRequest.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../index"; + +/** + * @example + * { + * companyId: "company_id", + * endTime: new Date("2024-01-15T09:30:00.000Z"), + * featureId: "feature_id", + * granularity: "daily", + * startTime: new Date("2024-01-15T09:30:00.000Z") + * } + */ +export interface GetFeatureUsageTimeSeriesRequest { + companyId: string; + endTime: Date; + featureId: string; + granularity?: Schematic.TimeSeriesGranularity; + startTime: Date; +} diff --git a/src/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.ts b/src/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.ts index df73f7bf..a61a2d4d 100644 --- a/src/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.ts +++ b/src/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.ts @@ -5,6 +5,7 @@ * { * featureId: "feature_id", * planId: "plan_id", + * planVersionId: "plan_version_id", * q: "q", * withMeteredProducts: true, * limit: 1, @@ -22,6 +23,10 @@ export interface ListPlanEntitlementsRequest { planId?: string; /** Filter plan entitlements by multiple plan IDs (starting with plan_) */ planIds?: string | string[]; + /** Filter plan entitlements by a single plan version ID (starting with plvr_) */ + planVersionId?: string; + /** Filter plan entitlements by multiple plan version IDs (starting with plvr_) */ + planVersionIds?: string | string[]; /** Search for plan entitlements by feature or company name */ q?: string; /** Filter plan entitlements only with metered products */ diff --git a/src/api/resources/entitlements/client/requests/index.ts b/src/api/resources/entitlements/client/requests/index.ts index 0b3f2e25..0fb3055a 100644 --- a/src/api/resources/entitlements/client/requests/index.ts +++ b/src/api/resources/entitlements/client/requests/index.ts @@ -7,6 +7,7 @@ export type { CreateCompanyOverrideRequestBody } from "./CreateCompanyOverrideRe export type { CreatePlanEntitlementRequestBody } from "./CreatePlanEntitlementRequestBody"; export type { DuplicatePlanEntitlementsRequestBody } from "./DuplicatePlanEntitlementsRequestBody"; export type { GetFeatureUsageByCompanyRequest } from "./GetFeatureUsageByCompanyRequest"; +export type { GetFeatureUsageTimeSeriesRequest } from "./GetFeatureUsageTimeSeriesRequest"; export type { ListCompanyOverridesRequest } from "./ListCompanyOverridesRequest"; export type { ListFeatureCompaniesRequest } from "./ListFeatureCompaniesRequest"; export type { ListFeatureUsageRequest } from "./ListFeatureUsageRequest"; diff --git a/src/api/resources/entitlements/types/CountPlanEntitlementsParams.ts b/src/api/resources/entitlements/types/CountPlanEntitlementsParams.ts index 457a9cc8..96b2fad3 100644 --- a/src/api/resources/entitlements/types/CountPlanEntitlementsParams.ts +++ b/src/api/resources/entitlements/types/CountPlanEntitlementsParams.ts @@ -18,6 +18,10 @@ export interface CountPlanEntitlementsParams { planId?: string; /** Filter plan entitlements by multiple plan IDs (starting with plan_) */ planIds?: string[]; + /** Filter plan entitlements by a single plan version ID (starting with plvr_) */ + planVersionId?: string; + /** Filter plan entitlements by multiple plan version IDs (starting with plvr_) */ + planVersionIds?: string[]; /** Search for plan entitlements by feature or company name */ q?: string; /** Filter plan entitlements only with metered products */ diff --git a/src/api/resources/entitlements/types/GetFeatureUsageTimeSeriesParams.ts b/src/api/resources/entitlements/types/GetFeatureUsageTimeSeriesParams.ts new file mode 100644 index 00000000..2a68f8d4 --- /dev/null +++ b/src/api/resources/entitlements/types/GetFeatureUsageTimeSeriesParams.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +/** + * Input parameters + */ +export interface GetFeatureUsageTimeSeriesParams { + companyId?: string; + endTime?: Date; + featureId?: string; + granularity?: Schematic.TimeSeriesGranularity; + startTime?: Date; +} diff --git a/src/api/resources/entitlements/types/GetFeatureUsageTimeSeriesResponse.ts b/src/api/resources/entitlements/types/GetFeatureUsageTimeSeriesResponse.ts new file mode 100644 index 00000000..6142d6b3 --- /dev/null +++ b/src/api/resources/entitlements/types/GetFeatureUsageTimeSeriesResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface GetFeatureUsageTimeSeriesResponse { + data: Schematic.FeatureUsageTimeSeriesResponseData; + /** Input parameters */ + params: Schematic.GetFeatureUsageTimeSeriesParams; +} diff --git a/src/api/resources/entitlements/types/ListPlanEntitlementsParams.ts b/src/api/resources/entitlements/types/ListPlanEntitlementsParams.ts index dfec056a..d270fb26 100644 --- a/src/api/resources/entitlements/types/ListPlanEntitlementsParams.ts +++ b/src/api/resources/entitlements/types/ListPlanEntitlementsParams.ts @@ -18,6 +18,10 @@ export interface ListPlanEntitlementsParams { planId?: string; /** Filter plan entitlements by multiple plan IDs (starting with plan_) */ planIds?: string[]; + /** Filter plan entitlements by a single plan version ID (starting with plvr_) */ + planVersionId?: string; + /** Filter plan entitlements by multiple plan version IDs (starting with plvr_) */ + planVersionIds?: string[]; /** Search for plan entitlements by feature or company name */ q?: string; /** Filter plan entitlements only with metered products */ diff --git a/src/api/resources/entitlements/types/index.ts b/src/api/resources/entitlements/types/index.ts index 25591fb0..a20473bc 100644 --- a/src/api/resources/entitlements/types/index.ts +++ b/src/api/resources/entitlements/types/index.ts @@ -20,6 +20,8 @@ export * from "./DuplicatePlanEntitlementsResponse"; export * from "./GetCompanyOverrideResponse"; export * from "./GetFeatureUsageByCompanyParams"; export * from "./GetFeatureUsageByCompanyResponse"; +export * from "./GetFeatureUsageTimeSeriesParams"; +export * from "./GetFeatureUsageTimeSeriesResponse"; export * from "./GetPlanEntitlementResponse"; export * from "./ListCompanyOverridesParams"; export * from "./ListCompanyOverridesResponse"; diff --git a/src/api/resources/features/client/Client.ts b/src/api/resources/features/client/Client.ts index 3e0b06f6..7884ae3f 100644 --- a/src/api/resources/features/client/Client.ts +++ b/src/api/resources/features/client/Client.ts @@ -37,6 +37,7 @@ export class FeaturesClient { * await client.features.listFeatures({ * q: "q", * withoutCompanyOverrideFor: "without_company_override_for", + * planVersionId: "plan_version_id", * withoutPlanEntitlementFor: "without_plan_entitlement_for", * booleanRequireEvent: true, * limit: 1, @@ -58,6 +59,7 @@ export class FeaturesClient { ids, q, withoutCompanyOverrideFor, + planVersionId, withoutPlanEntitlementFor, featureType, booleanRequireEvent, @@ -81,6 +83,10 @@ export class FeaturesClient { _queryParams.without_company_override_for = withoutCompanyOverrideFor; } + if (planVersionId != null) { + _queryParams.plan_version_id = planVersionId; + } + if (withoutPlanEntitlementFor != null) { _queryParams.without_plan_entitlement_for = withoutPlanEntitlementFor; } @@ -740,6 +746,7 @@ export class FeaturesClient { * await client.features.countFeatures({ * q: "q", * withoutCompanyOverrideFor: "without_company_override_for", + * planVersionId: "plan_version_id", * withoutPlanEntitlementFor: "without_plan_entitlement_for", * booleanRequireEvent: true, * limit: 1, @@ -761,6 +768,7 @@ export class FeaturesClient { ids, q, withoutCompanyOverrideFor, + planVersionId, withoutPlanEntitlementFor, featureType, booleanRequireEvent, @@ -784,6 +792,10 @@ export class FeaturesClient { _queryParams.without_company_override_for = withoutCompanyOverrideFor; } + if (planVersionId != null) { + _queryParams.plan_version_id = planVersionId; + } + if (withoutPlanEntitlementFor != null) { _queryParams.without_plan_entitlement_for = withoutPlanEntitlementFor; } diff --git a/src/api/resources/features/client/requests/CountFeaturesRequest.ts b/src/api/resources/features/client/requests/CountFeaturesRequest.ts index 1a532a69..fdc9966d 100644 --- a/src/api/resources/features/client/requests/CountFeaturesRequest.ts +++ b/src/api/resources/features/client/requests/CountFeaturesRequest.ts @@ -7,6 +7,7 @@ import type * as Schematic from "../../../../index"; * { * q: "q", * withoutCompanyOverrideFor: "without_company_override_for", + * planVersionId: "plan_version_id", * withoutPlanEntitlementFor: "without_plan_entitlement_for", * booleanRequireEvent: true, * limit: 1, @@ -19,6 +20,8 @@ export interface CountFeaturesRequest { q?: string; /** Filter out features that already have a company override for the specified company ID */ withoutCompanyOverrideFor?: string; + /** Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used */ + planVersionId?: string; /** Filter out features that already have a plan entitlement for the specified plan ID */ withoutPlanEntitlementFor?: string; /** Filter by one or more feature types (boolean, event, trait) */ diff --git a/src/api/resources/features/client/requests/ListFeaturesRequest.ts b/src/api/resources/features/client/requests/ListFeaturesRequest.ts index 139d5659..1876cf94 100644 --- a/src/api/resources/features/client/requests/ListFeaturesRequest.ts +++ b/src/api/resources/features/client/requests/ListFeaturesRequest.ts @@ -7,6 +7,7 @@ import type * as Schematic from "../../../../index"; * { * q: "q", * withoutCompanyOverrideFor: "without_company_override_for", + * planVersionId: "plan_version_id", * withoutPlanEntitlementFor: "without_plan_entitlement_for", * booleanRequireEvent: true, * limit: 1, @@ -19,6 +20,8 @@ export interface ListFeaturesRequest { q?: string; /** Filter out features that already have a company override for the specified company ID */ withoutCompanyOverrideFor?: string; + /** Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used */ + planVersionId?: string; /** Filter out features that already have a plan entitlement for the specified plan ID */ withoutPlanEntitlementFor?: string; /** Filter by one or more feature types (boolean, event, trait) */ diff --git a/src/api/resources/features/types/CountFeaturesParams.ts b/src/api/resources/features/types/CountFeaturesParams.ts index 761eb04b..129569f8 100644 --- a/src/api/resources/features/types/CountFeaturesParams.ts +++ b/src/api/resources/features/types/CountFeaturesParams.ts @@ -15,6 +15,8 @@ export interface CountFeaturesParams { limit?: number; /** Page offset (default 0) */ offset?: number; + /** Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used */ + planVersionId?: string; /** Search by feature name or ID */ q?: string; /** Filter out features that already have a company override for the specified company ID */ diff --git a/src/api/resources/features/types/ListFeaturesParams.ts b/src/api/resources/features/types/ListFeaturesParams.ts index 6898f553..6327c90b 100644 --- a/src/api/resources/features/types/ListFeaturesParams.ts +++ b/src/api/resources/features/types/ListFeaturesParams.ts @@ -15,6 +15,8 @@ export interface ListFeaturesParams { limit?: number; /** Page offset (default 0) */ offset?: number; + /** Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used */ + planVersionId?: string; /** Search by feature name or ID */ q?: string; /** Filter out features that already have a company override for the specified company ID */ diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 5564974c..b5f62226 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -16,6 +16,8 @@ export * from "./companies/types"; export * as components from "./components"; export * from "./components/client/requests"; export * from "./components/types"; +export * as componentspublic from "./componentspublic"; +export * from "./componentspublic/types"; export * as credits from "./credits"; export * from "./credits/client/requests"; export * from "./credits/types"; @@ -37,9 +39,15 @@ export * from "./planbundle/types"; export * as plangroups from "./plangroups"; export * from "./plangroups/client/requests"; export * from "./plangroups/types"; +export * as planmigrations from "./planmigrations"; +export * from "./planmigrations/client/requests"; +export * from "./planmigrations/types"; export * as plans from "./plans"; export * from "./plans/client/requests"; export * from "./plans/types"; +export * as scheduledcheckout from "./scheduledcheckout"; +export * from "./scheduledcheckout/client/requests"; +export * from "./scheduledcheckout/types"; export * as webhooks from "./webhooks"; export * from "./webhooks/client/requests"; export * from "./webhooks/types"; diff --git a/src/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts b/src/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts index 4e752a83..15db00dd 100644 --- a/src/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts +++ b/src/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts @@ -15,5 +15,6 @@ export interface UpdatePlanBundleRequestBody { creditGrants?: Schematic.PlanBundleCreditGrantRequestBody[]; entitlements: Schematic.PlanBundleEntitlementRequestBody[]; plan?: Schematic.UpdatePlanRequestBody; + planVersionId?: string; traits?: Schematic.UpdatePlanTraitTraitRequestBody[]; } diff --git a/src/api/resources/plangroups/client/Client.ts b/src/api/resources/plangroups/client/Client.ts index ca2898f9..38b2e751 100644 --- a/src/api/resources/plangroups/client/Client.ts +++ b/src/api/resources/plangroups/client/Client.ts @@ -167,6 +167,7 @@ export class PlangroupsClient { * prorationBehavior: "create_prorations", * showAsMonthlyPrices: true, * showCredits: true, + * showFeatureDescription: true, * showPeriodToggle: true, * showZeroPriceAsFree: true, * syncCustomerBillingDetails: true @@ -322,6 +323,7 @@ export class PlangroupsClient { * prorationBehavior: "create_prorations", * showAsMonthlyPrices: true, * showCredits: true, + * showFeatureDescription: true, * showPeriodToggle: true, * showZeroPriceAsFree: true, * syncCustomerBillingDetails: true diff --git a/src/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.ts b/src/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.ts index 47a31e59..b44bab71 100644 --- a/src/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.ts +++ b/src/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.ts @@ -24,6 +24,7 @@ import type * as Schematic from "../../../../index"; * prorationBehavior: "create_prorations", * showAsMonthlyPrices: true, * showCredits: true, + * showFeatureDescription: true, * showPeriodToggle: true, * showZeroPriceAsFree: true, * syncCustomerBillingDetails: true @@ -50,8 +51,11 @@ export interface CreatePlanGroupRequestBody { preventSelfServiceDowngradeButtonText?: string; preventSelfServiceDowngradeUrl?: string; prorationBehavior: Schematic.ProrationBehavior; + scheduledDowngradeBehavior?: Schematic.ScheduledDowngradeConfigBehavior; + scheduledDowngradePreventWhenOverLimit?: boolean; showAsMonthlyPrices: boolean; showCredits: boolean; + showFeatureDescription: boolean; showPeriodToggle: boolean; showZeroPriceAsFree: boolean; syncCustomerBillingDetails: boolean; diff --git a/src/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.ts b/src/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.ts index 9202ee7f..3536de2c 100644 --- a/src/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.ts +++ b/src/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.ts @@ -24,6 +24,7 @@ import type * as Schematic from "../../../../index"; * prorationBehavior: "create_prorations", * showAsMonthlyPrices: true, * showCredits: true, + * showFeatureDescription: true, * showPeriodToggle: true, * showZeroPriceAsFree: true, * syncCustomerBillingDetails: true @@ -50,8 +51,11 @@ export interface UpdatePlanGroupRequestBody { preventSelfServiceDowngradeButtonText?: string; preventSelfServiceDowngradeUrl?: string; prorationBehavior: Schematic.ProrationBehavior; + scheduledDowngradeBehavior?: Schematic.ScheduledDowngradeConfigBehavior; + scheduledDowngradePreventWhenOverLimit?: boolean; showAsMonthlyPrices: boolean; showCredits: boolean; + showFeatureDescription: boolean; showPeriodToggle: boolean; showZeroPriceAsFree: boolean; syncCustomerBillingDetails: boolean; diff --git a/src/api/resources/planmigrations/client/Client.ts b/src/api/resources/planmigrations/client/Client.ts new file mode 100644 index 00000000..58ed6b11 --- /dev/null +++ b/src/api/resources/planmigrations/client/Client.ts @@ -0,0 +1,783 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; +import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient"; +import * as core from "../../../../core"; +import { mergeHeaders } from "../../../../core/headers"; +import * as environments from "../../../../environments"; +import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError"; +import * as errors from "../../../../errors/index"; +import * as serializers from "../../../../serialization/index"; +import * as Schematic from "../../../index"; + +export declare namespace PlanmigrationsClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class PlanmigrationsClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + + constructor(options: PlanmigrationsClient.Options) { + this._options = normalizeClientOptionsWithAuth(options); + } + + /** + * @param {Schematic.ListCompanyMigrationsRequest} request + * @param {PlanmigrationsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.BadRequestError} + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.planmigrations.listCompanyMigrations({ + * migrationId: "migration_id", + * q: "q", + * status: "completed", + * limit: 1, + * offset: 1 + * }) + */ + public listCompanyMigrations( + request: Schematic.ListCompanyMigrationsRequest = {}, + requestOptions?: PlanmigrationsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__listCompanyMigrations(request, requestOptions)); + } + + private async __listCompanyMigrations( + request: Schematic.ListCompanyMigrationsRequest = {}, + 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 _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + "plan-version-company-migrations", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.ListCompanyMigrationsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Schematic.BadRequestError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/plan-version-company-migrations", + ); + } + + /** + * @param {Schematic.CountCompanyMigrationsRequest} request + * @param {PlanmigrationsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.BadRequestError} + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.planmigrations.countCompanyMigrations({ + * migrationId: "migration_id", + * q: "q", + * status: "completed", + * limit: 1, + * offset: 1 + * }) + */ + public countCompanyMigrations( + request: Schematic.CountCompanyMigrationsRequest = {}, + requestOptions?: PlanmigrationsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__countCompanyMigrations(request, requestOptions)); + } + + private async __countCompanyMigrations( + request: Schematic.CountCompanyMigrationsRequest = {}, + 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 _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + "plan-version-company-migrations/count", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CountCompanyMigrationsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Schematic.BadRequestError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/plan-version-company-migrations/count", + ); + } + + /** + * @param {Schematic.ListMigrationsRequest} request + * @param {PlanmigrationsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.BadRequestError} + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.planmigrations.listMigrations({ + * planVersionId: "plan_version_id", + * status: "completed", + * limit: 1, + * offset: 1 + * }) + */ + public listMigrations( + request: Schematic.ListMigrationsRequest = {}, + requestOptions?: PlanmigrationsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__listMigrations(request, requestOptions)); + } + + private async __listMigrations( + request: Schematic.ListMigrationsRequest = {}, + 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 _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + "plan-version-migrations", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.ListMigrationsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Schematic.BadRequestError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/plan-version-migrations"); + } + + /** + * @param {string} plan_version_migration_id - plan_version_migration_id + * @param {PlanmigrationsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.planmigrations.getMigration("plan_version_migration_id") + */ + public getMigration( + plan_version_migration_id: string, + requestOptions?: PlanmigrationsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getMigration(plan_version_migration_id, requestOptions)); + } + + private async __getMigration( + plan_version_migration_id: string, + requestOptions?: PlanmigrationsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + `plan-version-migrations/${core.url.encodePathParam(plan_version_migration_id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GetMigrationResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/plan-version-migrations/{plan_version_migration_id}", + ); + } + + /** + * @param {Schematic.CountMigrationsRequest} request + * @param {PlanmigrationsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.BadRequestError} + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.planmigrations.countMigrations({ + * planVersionId: "plan_version_id", + * status: "completed", + * limit: 1, + * offset: 1 + * }) + */ + public countMigrations( + request: Schematic.CountMigrationsRequest = {}, + requestOptions?: PlanmigrationsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__countMigrations(request, requestOptions)); + } + + private async __countMigrations( + request: Schematic.CountMigrationsRequest = {}, + 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 _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + "plan-version-migrations/count", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CountMigrationsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Schematic.BadRequestError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/plan-version-migrations/count", + ); + } +} diff --git a/src/api/resources/planmigrations/client/index.ts b/src/api/resources/planmigrations/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/planmigrations/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/accounts/client/requests/ListApiRequestsRequest.ts b/src/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.ts similarity index 53% rename from src/api/resources/accounts/client/requests/ListApiRequestsRequest.ts rename to src/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.ts index 0fa83a2b..36d8256f 100644 --- a/src/api/resources/accounts/client/requests/ListApiRequestsRequest.ts +++ b/src/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.ts @@ -1,19 +1,21 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Schematic from "../../../../index"; + /** * @example * { + * migrationId: "migration_id", * q: "q", - * requestType: "request_type", - * environmentId: "environment_id", + * status: "completed", * limit: 1, * offset: 1 * } */ -export interface ListApiRequestsRequest { +export interface CountCompanyMigrationsRequest { + migrationId?: string; q?: string; - requestType?: string; - environmentId?: string; + status?: Schematic.PlanVersionCompanyMigrationStatus; /** Page limit (default 100) */ limit?: number; /** Page offset (default 0) */ diff --git a/src/api/resources/planmigrations/client/requests/CountMigrationsRequest.ts b/src/api/resources/planmigrations/client/requests/CountMigrationsRequest.ts new file mode 100644 index 00000000..e8cde787 --- /dev/null +++ b/src/api/resources/planmigrations/client/requests/CountMigrationsRequest.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../index"; + +/** + * @example + * { + * planVersionId: "plan_version_id", + * status: "completed", + * limit: 1, + * offset: 1 + * } + */ +export interface CountMigrationsRequest { + planVersionId?: string; + status?: Schematic.PlanVersionMigrationStatus; + /** Page limit (default 100) */ + limit?: number; + /** Page offset (default 0) */ + offset?: number; +} diff --git a/src/api/resources/accounts/client/requests/CountApiRequestsRequest.ts b/src/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.ts similarity index 53% rename from src/api/resources/accounts/client/requests/CountApiRequestsRequest.ts rename to src/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.ts index ccede495..2c682e9b 100644 --- a/src/api/resources/accounts/client/requests/CountApiRequestsRequest.ts +++ b/src/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.ts @@ -1,19 +1,21 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Schematic from "../../../../index"; + /** * @example * { + * migrationId: "migration_id", * q: "q", - * requestType: "request_type", - * environmentId: "environment_id", + * status: "completed", * limit: 1, * offset: 1 * } */ -export interface CountApiRequestsRequest { +export interface ListCompanyMigrationsRequest { + migrationId?: string; q?: string; - requestType?: string; - environmentId?: string; + status?: Schematic.PlanVersionCompanyMigrationStatus; /** Page limit (default 100) */ limit?: number; /** Page offset (default 0) */ diff --git a/src/api/resources/planmigrations/client/requests/ListMigrationsRequest.ts b/src/api/resources/planmigrations/client/requests/ListMigrationsRequest.ts new file mode 100644 index 00000000..4a738ed7 --- /dev/null +++ b/src/api/resources/planmigrations/client/requests/ListMigrationsRequest.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../index"; + +/** + * @example + * { + * planVersionId: "plan_version_id", + * status: "completed", + * limit: 1, + * offset: 1 + * } + */ +export interface ListMigrationsRequest { + planVersionId?: string; + status?: Schematic.PlanVersionMigrationStatus; + /** Page limit (default 100) */ + limit?: number; + /** Page offset (default 0) */ + offset?: number; +} diff --git a/src/api/resources/planmigrations/client/requests/index.ts b/src/api/resources/planmigrations/client/requests/index.ts new file mode 100644 index 00000000..af0301c9 --- /dev/null +++ b/src/api/resources/planmigrations/client/requests/index.ts @@ -0,0 +1,4 @@ +export type { CountCompanyMigrationsRequest } from "./CountCompanyMigrationsRequest"; +export type { CountMigrationsRequest } from "./CountMigrationsRequest"; +export type { ListCompanyMigrationsRequest } from "./ListCompanyMigrationsRequest"; +export type { ListMigrationsRequest } from "./ListMigrationsRequest"; diff --git a/src/api/resources/planmigrations/index.ts b/src/api/resources/planmigrations/index.ts new file mode 100644 index 00000000..d2ec2302 --- /dev/null +++ b/src/api/resources/planmigrations/index.ts @@ -0,0 +1,2 @@ +export * from "./client"; +export * from "./types"; diff --git a/src/api/resources/planmigrations/types/CountCompanyMigrationsParams.ts b/src/api/resources/planmigrations/types/CountCompanyMigrationsParams.ts new file mode 100644 index 00000000..fe2bbb25 --- /dev/null +++ b/src/api/resources/planmigrations/types/CountCompanyMigrationsParams.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +/** + * Input parameters + */ +export interface CountCompanyMigrationsParams { + /** Page limit (default 100) */ + limit?: number; + migrationId?: string; + /** Page offset (default 0) */ + offset?: number; + q?: string; + status?: Schematic.PlanVersionCompanyMigrationStatus; +} diff --git a/src/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.ts b/src/api/resources/planmigrations/types/CountCompanyMigrationsResponse.ts similarity index 60% rename from src/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.ts rename to src/api/resources/planmigrations/types/CountCompanyMigrationsResponse.ts index 0397b056..9c08141e 100644 --- a/src/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.ts +++ b/src/api/resources/planmigrations/types/CountCompanyMigrationsResponse.ts @@ -2,8 +2,8 @@ import type * as Schematic from "../../../index"; -export interface CountCompaniesForAdvancedFilterResponse { +export interface CountCompanyMigrationsResponse { data: Schematic.CountResponse; /** Input parameters */ - params: Schematic.CountCompaniesForAdvancedFilterParams; + params: Schematic.CountCompanyMigrationsParams; } diff --git a/src/api/resources/planmigrations/types/CountMigrationsParams.ts b/src/api/resources/planmigrations/types/CountMigrationsParams.ts new file mode 100644 index 00000000..a7a8f534 --- /dev/null +++ b/src/api/resources/planmigrations/types/CountMigrationsParams.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +/** + * Input parameters + */ +export interface CountMigrationsParams { + /** Page limit (default 100) */ + limit?: number; + /** Page offset (default 0) */ + offset?: number; + planVersionId?: string; + status?: Schematic.PlanVersionMigrationStatus; +} diff --git a/src/api/resources/planmigrations/types/CountMigrationsResponse.ts b/src/api/resources/planmigrations/types/CountMigrationsResponse.ts new file mode 100644 index 00000000..f1103461 --- /dev/null +++ b/src/api/resources/planmigrations/types/CountMigrationsResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface CountMigrationsResponse { + data: Schematic.CountResponse; + /** Input parameters */ + params: Schematic.CountMigrationsParams; +} diff --git a/src/api/resources/planmigrations/types/GetMigrationResponse.ts b/src/api/resources/planmigrations/types/GetMigrationResponse.ts new file mode 100644 index 00000000..75d2522c --- /dev/null +++ b/src/api/resources/planmigrations/types/GetMigrationResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface GetMigrationResponse { + data: Schematic.PlanVersionMigrationResponseData; + /** Input parameters */ + params: Record; +} diff --git a/src/api/resources/planmigrations/types/ListCompanyMigrationsParams.ts b/src/api/resources/planmigrations/types/ListCompanyMigrationsParams.ts new file mode 100644 index 00000000..c056e6da --- /dev/null +++ b/src/api/resources/planmigrations/types/ListCompanyMigrationsParams.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +/** + * Input parameters + */ +export interface ListCompanyMigrationsParams { + /** Page limit (default 100) */ + limit?: number; + migrationId?: string; + /** Page offset (default 0) */ + offset?: number; + q?: string; + status?: Schematic.PlanVersionCompanyMigrationStatus; +} diff --git a/src/api/resources/planmigrations/types/ListCompanyMigrationsResponse.ts b/src/api/resources/planmigrations/types/ListCompanyMigrationsResponse.ts new file mode 100644 index 00000000..e5e2e2b9 --- /dev/null +++ b/src/api/resources/planmigrations/types/ListCompanyMigrationsResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface ListCompanyMigrationsResponse { + data: Schematic.PlanVersionCompanyMigrationResponseData[]; + /** Input parameters */ + params: Schematic.ListCompanyMigrationsParams; +} diff --git a/src/api/resources/planmigrations/types/ListMigrationsParams.ts b/src/api/resources/planmigrations/types/ListMigrationsParams.ts new file mode 100644 index 00000000..fa17b12c --- /dev/null +++ b/src/api/resources/planmigrations/types/ListMigrationsParams.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +/** + * Input parameters + */ +export interface ListMigrationsParams { + /** Page limit (default 100) */ + limit?: number; + /** Page offset (default 0) */ + offset?: number; + planVersionId?: string; + status?: Schematic.PlanVersionMigrationStatus; +} diff --git a/src/api/resources/planmigrations/types/ListMigrationsResponse.ts b/src/api/resources/planmigrations/types/ListMigrationsResponse.ts new file mode 100644 index 00000000..9169f214 --- /dev/null +++ b/src/api/resources/planmigrations/types/ListMigrationsResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface ListMigrationsResponse { + data: Schematic.PlanVersionMigrationResponseData[]; + /** Input parameters */ + params: Schematic.ListMigrationsParams; +} diff --git a/src/api/resources/planmigrations/types/index.ts b/src/api/resources/planmigrations/types/index.ts new file mode 100644 index 00000000..b96f2a01 --- /dev/null +++ b/src/api/resources/planmigrations/types/index.ts @@ -0,0 +1,9 @@ +export * from "./CountCompanyMigrationsParams"; +export * from "./CountCompanyMigrationsResponse"; +export * from "./CountMigrationsParams"; +export * from "./CountMigrationsResponse"; +export * from "./GetMigrationResponse"; +export * from "./ListCompanyMigrationsParams"; +export * from "./ListCompanyMigrationsResponse"; +export * from "./ListMigrationsParams"; +export * from "./ListMigrationsResponse"; diff --git a/src/api/resources/plans/client/Client.ts b/src/api/resources/plans/client/Client.ts index 98d01bdf..294dd4c4 100644 --- a/src/api/resources/plans/client/Client.ts +++ b/src/api/resources/plans/client/Client.ts @@ -510,6 +510,7 @@ export class PlansClient { /** * @param {string} plan_id - plan_id + * @param {Schematic.GetPlanRequest} request * @param {PlansClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Schematic.UnauthorizedError} @@ -518,19 +519,29 @@ export class PlansClient { * @throws {@link Schematic.InternalServerError} * * @example - * await client.plans.getPlan("plan_id") + * await client.plans.getPlan("plan_id", { + * planVersionId: "plan_version_id" + * }) */ public getPlan( plan_id: string, + request: Schematic.GetPlanRequest = {}, requestOptions?: PlansClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__getPlan(plan_id, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__getPlan(plan_id, request, requestOptions)); } private async __getPlan( plan_id: string, + request: Schematic.GetPlanRequest = {}, requestOptions?: PlansClient.RequestOptions, ): Promise> { + const { planVersionId } = request; + const _queryParams: Record = {}; + if (planVersionId != null) { + _queryParams.plan_version_id = planVersionId; + } + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -546,7 +557,7 @@ export class PlansClient { ), method: "GET", headers: _headers, - queryParameters: requestOptions?.queryParams, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -1249,7 +1260,8 @@ export class PlansClient { * * @example * await client.plans.listPlanIssues({ - * planId: "plan_id" + * planId: "plan_id", + * planVersionId: "plan_version_id" * }) */ public listPlanIssues( @@ -1263,9 +1275,13 @@ export class PlansClient { request: Schematic.ListPlanIssuesRequest, requestOptions?: PlansClient.RequestOptions, ): Promise> { - const { planId } = request; + const { planId, planVersionId } = request; const _queryParams: Record = {}; _queryParams.plan_id = planId; + if (planVersionId != null) { + _queryParams.plan_version_id = planVersionId; + } + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -1369,4 +1385,274 @@ export class PlansClient { return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/plans/issues"); } + + /** + * @param {string} plan_id - plan_id + * @param {PlansClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.BadRequestError} + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.plans.deletePlanVersion("plan_id") + */ + public deletePlanVersion( + plan_id: string, + requestOptions?: PlansClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__deletePlanVersion(plan_id, requestOptions)); + } + + private async __deletePlanVersion( + plan_id: string, + requestOptions?: PlansClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + `plans/version/${core.url.encodePathParam(plan_id)}`, + ), + method: "DELETE", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.DeletePlanVersionResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Schematic.BadRequestError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/plans/version/{plan_id}"); + } + + /** + * @param {string} plan_id - plan_id + * @param {Schematic.PublishPlanVersionRequestBody} request + * @param {PlansClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.BadRequestError} + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.plans.publishPlanVersion("plan_id", { + * excludedCompanyIds: ["excluded_company_ids"], + * migrationStrategy: "immediate" + * }) + */ + public publishPlanVersion( + plan_id: string, + request: Schematic.PublishPlanVersionRequestBody, + requestOptions?: PlansClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__publishPlanVersion(plan_id, request, requestOptions)); + } + + private async __publishPlanVersion( + plan_id: string, + request: Schematic.PublishPlanVersionRequestBody, + requestOptions?: PlansClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + `plans/version/${core.url.encodePathParam(plan_id)}/publish`, + ), + method: "PUT", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.PublishPlanVersionRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.PublishPlanVersionResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Schematic.BadRequestError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "PUT", + "/plans/version/{plan_id}/publish", + ); + } } diff --git a/src/api/resources/plans/client/requests/GetPlanRequest.ts b/src/api/resources/plans/client/requests/GetPlanRequest.ts new file mode 100644 index 00000000..53a313c3 --- /dev/null +++ b/src/api/resources/plans/client/requests/GetPlanRequest.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * planVersionId: "plan_version_id" + * } + */ +export interface GetPlanRequest { + /** Fetch billing settings for a specific plan version */ + planVersionId?: string; +} diff --git a/src/api/resources/plans/client/requests/ListPlanIssuesRequest.ts b/src/api/resources/plans/client/requests/ListPlanIssuesRequest.ts index a153026c..1e0f59a4 100644 --- a/src/api/resources/plans/client/requests/ListPlanIssuesRequest.ts +++ b/src/api/resources/plans/client/requests/ListPlanIssuesRequest.ts @@ -3,9 +3,11 @@ /** * @example * { - * planId: "plan_id" + * planId: "plan_id", + * planVersionId: "plan_version_id" * } */ export interface ListPlanIssuesRequest { planId: string; + planVersionId?: string; } diff --git a/src/api/resources/plans/client/requests/PublishPlanVersionRequestBody.ts b/src/api/resources/plans/client/requests/PublishPlanVersionRequestBody.ts new file mode 100644 index 00000000..45778e53 --- /dev/null +++ b/src/api/resources/plans/client/requests/PublishPlanVersionRequestBody.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../index"; + +/** + * @example + * { + * excludedCompanyIds: ["excluded_company_ids"], + * migrationStrategy: "immediate" + * } + */ +export interface PublishPlanVersionRequestBody { + excludedCompanyIds: string[]; + migrationStrategy: Schematic.PlanVersionMigrationStrategy; +} diff --git a/src/api/resources/plans/client/requests/index.ts b/src/api/resources/plans/client/requests/index.ts index 2a2494c8..7f4713f1 100644 --- a/src/api/resources/plans/client/requests/index.ts +++ b/src/api/resources/plans/client/requests/index.ts @@ -1,4 +1,6 @@ export type { CountPlansRequest } from "./CountPlansRequest"; +export type { GetPlanRequest } from "./GetPlanRequest"; export type { ListPlanIssuesRequest } from "./ListPlanIssuesRequest"; export type { ListPlansRequest } from "./ListPlansRequest"; +export type { PublishPlanVersionRequestBody } from "./PublishPlanVersionRequestBody"; export type { UpdateCompanyPlansRequestBody } from "./UpdateCompanyPlansRequestBody"; diff --git a/src/api/resources/plans/types/CountPlansParams.ts b/src/api/resources/plans/types/CountPlansParams.ts index f5022141..686a0982 100644 --- a/src/api/resources/plans/types/CountPlansParams.ts +++ b/src/api/resources/plans/types/CountPlansParams.ts @@ -20,6 +20,7 @@ export interface CountPlansParams { limit?: number; /** Page offset (default 0) */ offset?: number; + /** Filter by plan type */ planType?: Schematic.PlanType; q?: string; /** Filter out plans that already have a plan entitlement for the specified feature ID */ diff --git a/src/api/resources/plans/types/DeletePlanVersionResponse.ts b/src/api/resources/plans/types/DeletePlanVersionResponse.ts new file mode 100644 index 00000000..1877407c --- /dev/null +++ b/src/api/resources/plans/types/DeletePlanVersionResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface DeletePlanVersionResponse { + data: Schematic.DeleteResponse; + /** Input parameters */ + params: Record; +} diff --git a/src/api/resources/plans/types/GetPlanParams.ts b/src/api/resources/plans/types/GetPlanParams.ts new file mode 100644 index 00000000..b4892e55 --- /dev/null +++ b/src/api/resources/plans/types/GetPlanParams.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Input parameters + */ +export interface GetPlanParams { + /** Fetch billing settings for a specific plan version */ + planVersionId?: string; +} diff --git a/src/api/resources/plans/types/GetPlanResponse.ts b/src/api/resources/plans/types/GetPlanResponse.ts index 84bf7e1f..af8f1923 100644 --- a/src/api/resources/plans/types/GetPlanResponse.ts +++ b/src/api/resources/plans/types/GetPlanResponse.ts @@ -5,5 +5,5 @@ import type * as Schematic from "../../../index"; export interface GetPlanResponse { data: Schematic.PlanDetailResponseData; /** Input parameters */ - params: Record; + params: Schematic.GetPlanParams; } diff --git a/src/api/resources/plans/types/ListPlanIssuesParams.ts b/src/api/resources/plans/types/ListPlanIssuesParams.ts index 0620186f..9b1571b7 100644 --- a/src/api/resources/plans/types/ListPlanIssuesParams.ts +++ b/src/api/resources/plans/types/ListPlanIssuesParams.ts @@ -5,4 +5,5 @@ */ export interface ListPlanIssuesParams { planId?: string; + planVersionId?: string; } diff --git a/src/api/resources/plans/types/ListPlansParams.ts b/src/api/resources/plans/types/ListPlansParams.ts index c64d9127..ef07954c 100644 --- a/src/api/resources/plans/types/ListPlansParams.ts +++ b/src/api/resources/plans/types/ListPlansParams.ts @@ -20,6 +20,7 @@ export interface ListPlansParams { limit?: number; /** Page offset (default 0) */ offset?: number; + /** Filter by plan type */ planType?: Schematic.PlanType; q?: string; /** Filter out plans that already have a plan entitlement for the specified feature ID */ diff --git a/src/api/resources/plans/types/PublishPlanVersionResponse.ts b/src/api/resources/plans/types/PublishPlanVersionResponse.ts new file mode 100644 index 00000000..13b93ce5 --- /dev/null +++ b/src/api/resources/plans/types/PublishPlanVersionResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface PublishPlanVersionResponse { + data: Schematic.PlanVersionResponseData; + /** Input parameters */ + params: Record; +} diff --git a/src/api/resources/plans/types/index.ts b/src/api/resources/plans/types/index.ts index 7f34f3cb..9e59e93a 100644 --- a/src/api/resources/plans/types/index.ts +++ b/src/api/resources/plans/types/index.ts @@ -2,11 +2,14 @@ export * from "./CountPlansParams"; export * from "./CountPlansResponse"; export * from "./CreatePlanResponse"; export * from "./DeletePlanResponse"; +export * from "./DeletePlanVersionResponse"; +export * from "./GetPlanParams"; export * from "./GetPlanResponse"; export * from "./ListPlanIssuesParams"; export * from "./ListPlanIssuesResponse"; export * from "./ListPlansParams"; export * from "./ListPlansResponse"; +export * from "./PublishPlanVersionResponse"; export * from "./UpdateCompanyPlansResponse"; export * from "./UpdatePlanResponse"; export * from "./UpsertBillingProductPlanResponse"; diff --git a/src/api/resources/scheduledcheckout/client/Client.ts b/src/api/resources/scheduledcheckout/client/Client.ts new file mode 100644 index 00000000..b8dd48d5 --- /dev/null +++ b/src/api/resources/scheduledcheckout/client/Client.ts @@ -0,0 +1,576 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; +import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient"; +import * as core from "../../../../core"; +import { mergeHeaders } from "../../../../core/headers"; +import * as environments from "../../../../environments"; +import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError"; +import * as errors from "../../../../errors/index"; +import * as serializers from "../../../../serialization/index"; +import * as Schematic from "../../../index"; + +export declare namespace ScheduledcheckoutClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class ScheduledcheckoutClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + + constructor(options: ScheduledcheckoutClient.Options) { + this._options = normalizeClientOptionsWithAuth(options); + } + + /** + * @param {Schematic.ListScheduledCheckoutsRequest} request + * @param {ScheduledcheckoutClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.BadRequestError} + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.scheduledcheckout.listScheduledCheckouts({ + * companyId: "company_id", + * status: "cancelled", + * limit: 1, + * offset: 1 + * }) + */ + public listScheduledCheckouts( + request: Schematic.ListScheduledCheckoutsRequest = {}, + requestOptions?: ScheduledcheckoutClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__listScheduledCheckouts(request, requestOptions)); + } + + private async __listScheduledCheckouts( + request: Schematic.ListScheduledCheckoutsRequest = {}, + 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 _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + "scheduled-checkout", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.ListScheduledCheckoutsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Schematic.BadRequestError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/scheduled-checkout"); + } + + /** + * @param {Schematic.CreateScheduledCheckoutRequest} request + * @param {ScheduledcheckoutClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.BadRequestError} + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.scheduledcheckout.createScheduledCheckout({ + * companyId: "company_id", + * executeAfter: new Date("2024-01-15T09:30:00.000Z"), + * fromPlanId: "from_plan_id", + * toPlanId: "to_plan_id" + * }) + */ + public createScheduledCheckout( + request: Schematic.CreateScheduledCheckoutRequest, + requestOptions?: ScheduledcheckoutClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__createScheduledCheckout(request, requestOptions)); + } + + private async __createScheduledCheckout( + request: Schematic.CreateScheduledCheckoutRequest, + requestOptions?: ScheduledcheckoutClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + "scheduled-checkout", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.CreateScheduledCheckoutRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CreateScheduledCheckoutResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Schematic.BadRequestError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/scheduled-checkout"); + } + + /** + * @param {string} scheduled_checkout_id - scheduled_checkout_id + * @param {ScheduledcheckoutClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.scheduledcheckout.getScheduledCheckout("scheduled_checkout_id") + */ + public getScheduledCheckout( + scheduled_checkout_id: string, + requestOptions?: ScheduledcheckoutClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getScheduledCheckout(scheduled_checkout_id, requestOptions)); + } + + private async __getScheduledCheckout( + scheduled_checkout_id: string, + requestOptions?: ScheduledcheckoutClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + `scheduled-checkout/${core.url.encodePathParam(scheduled_checkout_id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GetScheduledCheckoutResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/scheduled-checkout/{scheduled_checkout_id}", + ); + } + + /** + * @param {string} scheduled_checkout_id - scheduled_checkout_id + * @param {Schematic.UpdateScheduledCheckoutRequest} request + * @param {ScheduledcheckoutClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Schematic.BadRequestError} + * @throws {@link Schematic.UnauthorizedError} + * @throws {@link Schematic.ForbiddenError} + * @throws {@link Schematic.NotFoundError} + * @throws {@link Schematic.InternalServerError} + * + * @example + * await client.scheduledcheckout.updateScheduledCheckout("scheduled_checkout_id") + */ + public updateScheduledCheckout( + scheduled_checkout_id: string, + request: Schematic.UpdateScheduledCheckoutRequest = {}, + requestOptions?: ScheduledcheckoutClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__updateScheduledCheckout(scheduled_checkout_id, request, requestOptions), + ); + } + + private async __updateScheduledCheckout( + scheduled_checkout_id: string, + request: Schematic.UpdateScheduledCheckoutRequest = {}, + requestOptions?: ScheduledcheckoutClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SchematicEnvironment.Default, + `scheduled-checkout/${core.url.encodePathParam(scheduled_checkout_id)}`, + ), + method: "PUT", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.UpdateScheduledCheckoutRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.UpdateScheduledCheckoutResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Schematic.BadRequestError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 401: + throw new Schematic.UnauthorizedError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 403: + throw new Schematic.ForbiddenError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 404: + throw new Schematic.NotFoundError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + case 500: + throw new Schematic.InternalServerError( + serializers.ApiError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.SchematicError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "PUT", + "/scheduled-checkout/{scheduled_checkout_id}", + ); + } +} diff --git a/src/api/resources/scheduledcheckout/client/index.ts b/src/api/resources/scheduledcheckout/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/scheduledcheckout/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/scheduledcheckout/client/requests/CreateScheduledCheckoutRequest.ts b/src/api/resources/scheduledcheckout/client/requests/CreateScheduledCheckoutRequest.ts new file mode 100644 index 00000000..5861ceb8 --- /dev/null +++ b/src/api/resources/scheduledcheckout/client/requests/CreateScheduledCheckoutRequest.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * companyId: "company_id", + * executeAfter: new Date("2024-01-15T09:30:00.000Z"), + * fromPlanId: "from_plan_id", + * toPlanId: "to_plan_id" + * } + */ +export interface CreateScheduledCheckoutRequest { + companyId: string; + executeAfter: Date; + fromPlanId: string; + toPlanId: string; +} diff --git a/src/api/resources/scheduledcheckout/client/requests/ListScheduledCheckoutsRequest.ts b/src/api/resources/scheduledcheckout/client/requests/ListScheduledCheckoutsRequest.ts new file mode 100644 index 00000000..a641e49b --- /dev/null +++ b/src/api/resources/scheduledcheckout/client/requests/ListScheduledCheckoutsRequest.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../index"; + +/** + * @example + * { + * companyId: "company_id", + * status: "cancelled", + * limit: 1, + * offset: 1 + * } + */ +export interface ListScheduledCheckoutsRequest { + companyId?: string; + status?: Schematic.ScheduledCheckoutStatus; + /** Page limit (default 100) */ + limit?: number; + /** Page offset (default 0) */ + offset?: number; +} diff --git a/src/api/resources/scheduledcheckout/client/requests/UpdateScheduledCheckoutRequest.ts b/src/api/resources/scheduledcheckout/client/requests/UpdateScheduledCheckoutRequest.ts new file mode 100644 index 00000000..b27e5e34 --- /dev/null +++ b/src/api/resources/scheduledcheckout/client/requests/UpdateScheduledCheckoutRequest.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../index"; + +/** + * @example + * {} + */ +export interface UpdateScheduledCheckoutRequest { + executeAfter?: Date; + status?: Schematic.ScheduledCheckoutStatus; +} diff --git a/src/api/resources/scheduledcheckout/client/requests/index.ts b/src/api/resources/scheduledcheckout/client/requests/index.ts new file mode 100644 index 00000000..256f6d33 --- /dev/null +++ b/src/api/resources/scheduledcheckout/client/requests/index.ts @@ -0,0 +1,3 @@ +export type { CreateScheduledCheckoutRequest } from "./CreateScheduledCheckoutRequest"; +export type { ListScheduledCheckoutsRequest } from "./ListScheduledCheckoutsRequest"; +export type { UpdateScheduledCheckoutRequest } from "./UpdateScheduledCheckoutRequest"; diff --git a/src/api/resources/scheduledcheckout/index.ts b/src/api/resources/scheduledcheckout/index.ts new file mode 100644 index 00000000..d2ec2302 --- /dev/null +++ b/src/api/resources/scheduledcheckout/index.ts @@ -0,0 +1,2 @@ +export * from "./client"; +export * from "./types"; diff --git a/src/api/resources/scheduledcheckout/types/CreateScheduledCheckoutResponse.ts b/src/api/resources/scheduledcheckout/types/CreateScheduledCheckoutResponse.ts new file mode 100644 index 00000000..b4dbdd15 --- /dev/null +++ b/src/api/resources/scheduledcheckout/types/CreateScheduledCheckoutResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface CreateScheduledCheckoutResponse { + data: Schematic.ScheduledCheckoutResponseData; + /** Input parameters */ + params: Record; +} diff --git a/src/api/resources/scheduledcheckout/types/GetScheduledCheckoutResponse.ts b/src/api/resources/scheduledcheckout/types/GetScheduledCheckoutResponse.ts new file mode 100644 index 00000000..ebb9d091 --- /dev/null +++ b/src/api/resources/scheduledcheckout/types/GetScheduledCheckoutResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface GetScheduledCheckoutResponse { + data: Schematic.ScheduledCheckoutResponseData; + /** Input parameters */ + params: Record; +} diff --git a/src/api/resources/scheduledcheckout/types/ListScheduledCheckoutsParams.ts b/src/api/resources/scheduledcheckout/types/ListScheduledCheckoutsParams.ts new file mode 100644 index 00000000..4efb6c29 --- /dev/null +++ b/src/api/resources/scheduledcheckout/types/ListScheduledCheckoutsParams.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +/** + * Input parameters + */ +export interface ListScheduledCheckoutsParams { + companyId?: string; + /** Page limit (default 100) */ + limit?: number; + /** Page offset (default 0) */ + offset?: number; + status?: Schematic.ScheduledCheckoutStatus; +} diff --git a/src/api/resources/scheduledcheckout/types/ListScheduledCheckoutsResponse.ts b/src/api/resources/scheduledcheckout/types/ListScheduledCheckoutsResponse.ts new file mode 100644 index 00000000..a0f565d1 --- /dev/null +++ b/src/api/resources/scheduledcheckout/types/ListScheduledCheckoutsResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface ListScheduledCheckoutsResponse { + data: Schematic.ScheduledCheckoutResponseData[]; + /** Input parameters */ + params: Schematic.ListScheduledCheckoutsParams; +} diff --git a/src/api/resources/scheduledcheckout/types/UpdateScheduledCheckoutResponse.ts b/src/api/resources/scheduledcheckout/types/UpdateScheduledCheckoutResponse.ts new file mode 100644 index 00000000..a1385186 --- /dev/null +++ b/src/api/resources/scheduledcheckout/types/UpdateScheduledCheckoutResponse.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../index"; + +export interface UpdateScheduledCheckoutResponse { + data: Schematic.ScheduledCheckoutResponseData; + /** Input parameters */ + params: Record; +} diff --git a/src/api/resources/scheduledcheckout/types/index.ts b/src/api/resources/scheduledcheckout/types/index.ts new file mode 100644 index 00000000..29d7dde8 --- /dev/null +++ b/src/api/resources/scheduledcheckout/types/index.ts @@ -0,0 +1,5 @@ +export * from "./CreateScheduledCheckoutResponse"; +export * from "./GetScheduledCheckoutResponse"; +export * from "./ListScheduledCheckoutsParams"; +export * from "./ListScheduledCheckoutsResponse"; +export * from "./UpdateScheduledCheckoutResponse"; diff --git a/src/api/types/PlanChangeActorType.ts b/src/api/types/ActorType.ts similarity index 59% rename from src/api/types/PlanChangeActorType.ts rename to src/api/types/ActorType.ts index 066b6220..7502670a 100644 --- a/src/api/types/PlanChangeActorType.ts +++ b/src/api/types/ActorType.ts @@ -1,9 +1,10 @@ // This file was auto-generated by Fern from our API Definition. -export const PlanChangeActorType = { +export const ActorType = { ApiKey: "api_key", AppUser: "app_user", + StripeApp: "stripe_app", System: "system", TemporaryAccessToken: "temporary_access_token", } as const; -export type PlanChangeActorType = (typeof PlanChangeActorType)[keyof typeof PlanChangeActorType]; +export type ActorType = (typeof ActorType)[keyof typeof ActorType]; diff --git a/src/api/types/ApiKeyCreateResponseData.ts b/src/api/types/ApiKeyCreateResponseData.ts index 7d2c3aab..44ce2c1a 100644 --- a/src/api/types/ApiKeyCreateResponseData.ts +++ b/src/api/types/ApiKeyCreateResponseData.ts @@ -9,6 +9,7 @@ export interface ApiKeyCreateResponseData { id: string; lastUsedAt?: Date; name: string; + readonly: boolean; scopes: Schematic.ApiKeyScope[]; secret: string; updatedAt: Date; diff --git a/src/api/types/ApiKeyResponseData.ts b/src/api/types/ApiKeyResponseData.ts index eef5d664..6749eee4 100644 --- a/src/api/types/ApiKeyResponseData.ts +++ b/src/api/types/ApiKeyResponseData.ts @@ -9,6 +9,7 @@ export interface ApiKeyResponseData { id: string; lastUsedAt?: Date; name: string; + readonly: boolean; scopes: Schematic.ApiKeyScope[]; updatedAt: Date; } diff --git a/src/api/types/ApiKeyRequestListResponseData.ts b/src/api/types/AuditLogListResponseData.ts similarity index 71% rename from src/api/types/ApiKeyRequestListResponseData.ts rename to src/api/types/AuditLogListResponseData.ts index 6bb90573..1c774b2c 100644 --- a/src/api/types/ApiKeyRequestListResponseData.ts +++ b/src/api/types/AuditLogListResponseData.ts @@ -1,13 +1,14 @@ // This file was auto-generated by Fern from our API Definition. -export interface ApiKeyRequestListResponseData { - apiKeyId: string; +import type * as Schematic from "../index"; + +export interface AuditLogListResponseData { + actorType: Schematic.ActorType; + apiKeyId?: string; endedAt?: Date; environmentId?: string; id: string; method: string; - reqBody?: string; - requestType?: string; resourceId?: number; resourceIdString?: string; resourceName?: string; diff --git a/src/api/types/ApiKeyRequestResponseData.ts b/src/api/types/AuditLogResponseData.ts similarity index 75% rename from src/api/types/ApiKeyRequestResponseData.ts rename to src/api/types/AuditLogResponseData.ts index e9a58fb7..4a482dda 100644 --- a/src/api/types/ApiKeyRequestResponseData.ts +++ b/src/api/types/AuditLogResponseData.ts @@ -2,15 +2,14 @@ import type * as Schematic from "../index"; -export interface ApiKeyRequestResponseData { - apiKey?: Schematic.ApiKeyResponseData; - apiKeyId: string; +export interface AuditLogResponseData { + actorType: Schematic.ActorType; + apiKeyId?: string; endedAt?: Date; environmentId?: string; id: string; method: string; reqBody?: string; - requestType?: string; resourceId?: number; resourceIdString?: string; resourceName?: string; @@ -20,7 +19,6 @@ export interface ApiKeyRequestResponseData { secondaryResource?: string; startedAt: Date; url: string; - userAgent?: string; userId?: string; userName?: string; } diff --git a/src/api/types/BillingCreditResponseData.ts b/src/api/types/BillingCreditResponseData.ts index 0f33ea8b..c23d388e 100644 --- a/src/api/types/BillingCreditResponseData.ts +++ b/src/api/types/BillingCreditResponseData.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../index"; export interface BillingCreditResponseData { burnStrategy: Schematic.BillingCreditBurnStrategy; + costEditable: boolean; createdAt: Date; defaultExpiryUnit: Schematic.BillingCreditExpiryUnit; defaultExpiryUnitCount?: number; diff --git a/src/api/types/BillingCreditView.ts b/src/api/types/BillingCreditView.ts new file mode 100644 index 00000000..8a293b67 --- /dev/null +++ b/src/api/types/BillingCreditView.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface BillingCreditView { + accountId: string; + burnStrategy: Schematic.BillingCreditBurnStrategy; + costEditable: boolean; + createdAt: Date; + defaultExpiryUnit: Schematic.BillingCreditExpiryUnit; + defaultExpiryUnitCount?: number; + defaultRolloverPolicy: Schematic.BillingCreditRolloverPolicy; + description: string; + environmentId: string; + icon?: string; + id: string; + name: string; + pluralName?: string; + price?: Schematic.BillingPriceView; + pricePerUnit?: number; + pricePerUnitDecimal?: string; + product?: Schematic.BillingProductResponseData; + singularName?: string; + updatedAt: Date; +} diff --git a/src/api/types/BillingPlanCreditGrantResponseData.ts b/src/api/types/BillingPlanCreditGrantResponseData.ts index 41b0305d..374ac21d 100644 --- a/src/api/types/BillingPlanCreditGrantResponseData.ts +++ b/src/api/types/BillingPlanCreditGrantResponseData.ts @@ -11,19 +11,26 @@ export interface BillingPlanCreditGrantResponseData { autoTopupExpiryUnitCount?: number; autoTopupThresholdPercent?: number; createdAt: Date; + credit?: Schematic.BillingCreditResponseData; creditAmount: number; creditId: string; + /** Use credit.name from the nested credit object instead */ creditName: string; + /** Use plural_name from the nested credit object instead */ creditPluralName?: string; + /** Use singular_name from the nested credit object instead */ creditSingularName?: string; expiryType?: Schematic.BillingCreditExpiryType; expiryUnit?: Schematic.BillingCreditExpiryUnit; expiryUnitCount?: number; id: string; + plan?: Schematic.PreviewObjectResponseData; planId: string; + /** Use plan.name from the nested plan object instead */ planName: string; - resetCadence: Schematic.BillingPlanCreditGrantResetCadence; - resetStart: Schematic.BillingPlanCreditGrantResetStart; + planVersionId?: string; + resetCadence?: Schematic.BillingPlanCreditGrantResetCadence; + resetStart?: Schematic.BillingPlanCreditGrantResetStart; resetType?: Schematic.BillingPlanCreditGrantResetType; updatedAt: Date; } diff --git a/src/api/types/CheckFlagResponseData.ts b/src/api/types/CheckFlagResponseData.ts index 4dbe5f1b..3fee0e07 100644 --- a/src/api/types/CheckFlagResponseData.ts +++ b/src/api/types/CheckFlagResponseData.ts @@ -1,19 +1,23 @@ // This file was auto-generated by Fern from our API Definition. +import type * as Schematic from "../index"; + export interface CheckFlagResponseData { /** If company keys were provided and matched a company, its ID */ companyId?: string; + /** If a feature entitlement rule was matched, its entitlement details */ + entitlement?: Schematic.FeatureEntitlement; /** If an error occurred while checking the flag, the error message */ error?: string; - /** If a numeric feature entitlement rule was matched, its allocation */ + /** Deprecated: Use Entitlement.Allocation instead. */ featureAllocation?: number; - /** If a numeric feature entitlement rule was matched, the company's usage */ + /** Deprecated: Use Entitlement.Usage instead. */ featureUsage?: number; - /** If an event-based numeric feature entitlement rule was matched, the event used to track its usage */ + /** Deprecated: Use Entitlement.EventName instead. */ featureUsageEvent?: string; - /** For event-based feature entitlement rules, the period over which usage is tracked (current_month, current_day, current_week, all_time) */ + /** Deprecated: Use Entitlement.MetricPeriod instead. */ featureUsagePeriod?: string; - /** For event-based feature entitlement rules, when the usage period will reset */ + /** Deprecated: Use Entitlement.MetricResetAt instead. */ featureUsageResetAt?: Date; /** The key used to check the flag */ flag: string; diff --git a/src/api/types/CompanyDetailResponseData.ts b/src/api/types/CompanyDetailResponseData.ts index f449d40d..762e0cf3 100644 --- a/src/api/types/CompanyDetailResponseData.ts +++ b/src/api/types/CompanyDetailResponseData.ts @@ -9,6 +9,7 @@ export interface CompanyDetailResponseData { billingSubscriptions: Schematic.BillingSubscriptionView[]; createdAt: Date; defaultPaymentMethod?: Schematic.PaymentMethodResponseData; + entitlements: Schematic.FeatureEntitlement[]; entityTraits: Schematic.EntityTraitDetailResponseData[]; environmentId: string; id: string; @@ -21,6 +22,7 @@ export interface CompanyDetailResponseData { plan?: Schematic.CompanyPlanWithBillingSubView; plans: Schematic.GenericPreviewObject[]; rules: Schematic.Rule[]; + scheduledDowngrade?: Schematic.ScheduledDowngradeResponseData; /** A map of trait names to trait values */ traits?: Record; updatedAt: Date; diff --git a/src/api/types/CompanyPlanDetailResponseData.ts b/src/api/types/CompanyPlanDetailResponseData.ts index b87d0d22..7e21d0ed 100644 --- a/src/api/types/CompanyPlanDetailResponseData.ts +++ b/src/api/types/CompanyPlanDetailResponseData.ts @@ -3,6 +3,7 @@ import type * as Schematic from "../index"; export interface CompanyPlanDetailResponseData { + activeVersion?: Schematic.PlanVersionResponseData; audienceType?: string; billingProduct?: Schematic.BillingProductDetailResponseData; chargeType: Schematic.ChargeType; @@ -15,6 +16,7 @@ export interface CompanyPlanDetailResponseData { custom: boolean; customPlanConfig?: Schematic.CustomPlanConfig; description: string; + draftVersion?: Schematic.PlanVersionResponseData; entitlements: Schematic.PlanEntitlementResponseData[]; features: Schematic.FeatureDetailResponseData[]; icon: string; diff --git a/src/api/types/CompanyViewWithFeatureUsageResponseData.ts b/src/api/types/CompanyViewWithFeatureUsageResponseData.ts deleted file mode 100644 index 5b58670a..00000000 --- a/src/api/types/CompanyViewWithFeatureUsageResponseData.ts +++ /dev/null @@ -1,29 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../index"; - -export interface CompanyViewWithFeatureUsageResponseData { - addOns: Schematic.CompanyPlanWithBillingSubView[]; - billingCreditBalances?: Record; - billingSubscription?: Schematic.BillingSubscriptionView; - billingSubscriptions: Schematic.BillingSubscriptionView[]; - createdAt: Date; - defaultPaymentMethod?: Schematic.PaymentMethodResponseData; - entityTraits: Schematic.EntityTraitDetailResponseData[]; - environmentId: string; - featureUsage: Schematic.FeatureUsageDataResponseData[]; - id: string; - keys: Schematic.EntityKeyDetailResponseData[]; - lastSeenAt?: Date; - logoUrl?: string; - metrics: Schematic.CompanyEventPeriodMetricsResponseData[]; - name: string; - paymentMethods: Schematic.PaymentMethodResponseData[]; - plan?: Schematic.CompanyPlanWithBillingSubView; - plans: Schematic.GenericPreviewObject[]; - rules: Schematic.Rule[]; - /** A map of trait names to trait values */ - traits?: Record; - updatedAt: Date; - userCount: number; -} diff --git a/src/api/types/ComponentDisplaySettings.ts b/src/api/types/ComponentDisplaySettings.ts index 27ad4acc..10abd573 100644 --- a/src/api/types/ComponentDisplaySettings.ts +++ b/src/api/types/ComponentDisplaySettings.ts @@ -3,6 +3,7 @@ export interface ComponentDisplaySettings { showAsMonthlyPrices: boolean; showCredits: boolean; + showFeatureDescription: boolean; showPeriodToggle: boolean; showZeroPriceAsFree: boolean; } diff --git a/src/api/types/ComponentHydrateResponseData.ts b/src/api/types/ComponentHydrateResponseData.ts index 8e8220ba..4cf7489a 100644 --- a/src/api/types/ComponentHydrateResponseData.ts +++ b/src/api/types/ComponentHydrateResponseData.ts @@ -20,6 +20,7 @@ export interface ComponentHydrateResponseData { preventSelfServiceDowngrade: boolean; preventSelfServiceDowngradeButtonText?: string; preventSelfServiceDowngradeUrl?: string; + scheduledDowngrade?: Schematic.ScheduledDowngradeResponseData; showAsMonthlyPrices: boolean; showCredits: boolean; showPeriodToggle: boolean; diff --git a/src/api/types/ComponentPreviewResponseData.ts b/src/api/types/ComponentPreviewResponseData.ts index 0511e2fb..ff764dc8 100644 --- a/src/api/types/ComponentPreviewResponseData.ts +++ b/src/api/types/ComponentPreviewResponseData.ts @@ -21,6 +21,7 @@ export interface ComponentPreviewResponseData { preventSelfServiceDowngrade: boolean; preventSelfServiceDowngradeButtonText?: string; preventSelfServiceDowngradeUrl?: string; + scheduledDowngrade?: Schematic.ScheduledDowngradeResponseData; showAsMonthlyPrices: boolean; showCredits: boolean; showPeriodToggle: boolean; diff --git a/src/api/types/ComponentSettingsResponseData.ts b/src/api/types/ComponentSettingsResponseData.ts index 937d48fd..2b4f850a 100644 --- a/src/api/types/ComponentSettingsResponseData.ts +++ b/src/api/types/ComponentSettingsResponseData.ts @@ -3,6 +3,7 @@ export interface ComponentSettingsResponseData { showAsMonthlyPrices: boolean; showCredits: boolean; + showFeatureDescription: boolean; showPeriodToggle: boolean; showZeroPriceAsFree: boolean; } diff --git a/src/api/types/ConditionConditionType.ts b/src/api/types/ConditionConditionType.ts index 086f010d..6068ca9e 100644 --- a/src/api/types/ConditionConditionType.ts +++ b/src/api/types/ConditionConditionType.ts @@ -5,9 +5,9 @@ export const ConditionConditionType = { BillingProduct: "billing_product", Company: "company", Credit: "credit", - CrmProduct: "crm_product", Metric: "metric", Plan: "plan", + PlanVersion: "plan_version", Trait: "trait", User: "user", } as const; diff --git a/src/api/types/ConditionGroupResponseData.ts b/src/api/types/ConditionGroupResponseData.ts new file mode 100644 index 00000000..9054097e --- /dev/null +++ b/src/api/types/ConditionGroupResponseData.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface ConditionGroupResponseData { + accountId: string; + createdAt: Date; + 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 new file mode 100644 index 00000000..f232d447 --- /dev/null +++ b/src/api/types/ConditionGroupView.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface ConditionGroupView { + accountId: string; + conditions: Schematic.ConditionView[]; + createdAt: Date; + 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 new file mode 100644 index 00000000..b6f520dd --- /dev/null +++ b/src/api/types/ConditionResponseData.ts @@ -0,0 +1,31 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface ConditionResponseData { + accountId: string; + comparisonTraitId?: string; + conditionGroupId?: string; + conditionType: string; + consumptionRate?: number; + createdAt: Date; + creditId?: string; + environmentId: string; + eventSubtype?: string; + flagId?: string; + id: string; + metricPeriod?: string; + metricPeriodMonthReset?: string; + metricValue?: number; + operator: string; + planVersionId?: string; + resourceUnspecifiedIds: string[]; + ruleId: string; + traitEntityType?: Schematic.EntityType; + traitId?: string; + traitValue: string; + traitValueBool: boolean; + traitValueDate?: Date; + traitValueInt: number; + updatedAt: Date; +} diff --git a/src/api/types/ConditionView.ts b/src/api/types/ConditionView.ts new file mode 100644 index 00000000..6f0406ef --- /dev/null +++ b/src/api/types/ConditionView.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface ConditionView { + accountId: string; + billingProducts: Schematic.GenericPreviewObject[]; + companies: Schematic.GenericPreviewObject[]; + comparisonTrait?: Schematic.EntityTraitDefinitionResponseData; + comparisonTraitId?: string; + conditionGroupId?: string; + conditionType: string; + consumptionRate?: number; + createdAt: Date; + creditId?: string; + environmentId: string; + eventSubtype?: string; + flagId?: string; + id: string; + metricPeriod?: string; + metricPeriodMonthReset?: string; + metricValue?: number; + operator: string; + planVersionId?: string; + planVersions: Schematic.GenericPreviewObject[]; + plans: Schematic.GenericPreviewObject[]; + resourceUnspecifiedIds: string[]; + ruleId: string; + trait?: Schematic.EntityTraitDefinitionResponseData; + traitEntityType?: Schematic.EntityType; + traitId?: string; + traitValue: string; + traitValueBool: boolean; + traitValueDate?: Date; + traitValueInt: number; + updatedAt: Date; + users: Schematic.GenericPreviewObject[]; +} diff --git a/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts b/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts index bbcda5e6..680eb1c4 100644 --- a/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts +++ b/src/api/types/CreateBillingPlanCreditGrantRequestBody.ts @@ -17,6 +17,7 @@ export interface CreateBillingPlanCreditGrantRequestBody { expiryUnit?: Schematic.BillingCreditExpiryUnit; expiryUnitCount?: number; planId: string; + planVersionId?: string; resetCadence: Schematic.BillingPlanCreditGrantResetCadence; resetStart: Schematic.BillingPlanCreditGrantResetStart; resetType?: Schematic.BillingPlanCreditGrantResetType; diff --git a/src/api/types/CreateEntitlementInBundleRequestBody.ts b/src/api/types/CreateEntitlementInBundleRequestBody.ts index 2e127421..2b372fa2 100644 --- a/src/api/types/CreateEntitlementInBundleRequestBody.ts +++ b/src/api/types/CreateEntitlementInBundleRequestBody.ts @@ -15,6 +15,8 @@ export interface CreateEntitlementInBundleRequestBody { monthlyUnitPrice?: number; monthlyUnitPriceDecimal?: string; overageBillingProductId?: string; + planId: string; + planVersionId?: string; priceBehavior?: Schematic.EntitlementPriceBehavior; /** Use MonthlyPriceTiers or YearlyPriceTiers instead */ priceTiers?: Schematic.CreatePriceTierRequestBody[]; diff --git a/src/api/types/CreateEventRequestBody.ts b/src/api/types/CreateEventRequestBody.ts index d47ac322..a2d25235 100644 --- a/src/api/types/CreateEventRequestBody.ts +++ b/src/api/types/CreateEventRequestBody.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../index"; export interface CreateEventRequestBody { body?: Schematic.EventBody; + /** Either 'identify' or 'track' */ eventType: Schematic.EventType; /** Optionally provide a timestamp at which the event was sent to Schematic */ sentAt?: Date; diff --git a/src/api/types/CreditUsageResponseData.ts b/src/api/types/CreditUsageResponseData.ts deleted file mode 100644 index 9677a859..00000000 --- a/src/api/types/CreditUsageResponseData.ts +++ /dev/null @@ -1,15 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../index"; - -export interface CreditUsageResponseData { - creditConsumptionRate?: number; - creditGrantCounts?: Record; - creditGrantDetails: Schematic.CreditGrantDetail[]; - creditRemaining?: number; - /** Deprecated: Use credit_remaining instead. */ - creditTotal?: number; - creditTypeIcon?: string; - creditTypeName?: string; - creditUsed?: number; -} diff --git a/src/api/types/CreditsAutoTopupCompanySummary.ts b/src/api/types/CreditsAutoTopupCompanySummary.ts new file mode 100644 index 00000000..92ebefa8 --- /dev/null +++ b/src/api/types/CreditsAutoTopupCompanySummary.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface CreditsAutoTopupCompanySummary { + id: string; + name: string; +} diff --git a/src/api/types/CreditsAutoTopupCreditSummary.ts b/src/api/types/CreditsAutoTopupCreditSummary.ts new file mode 100644 index 00000000..e693ce2d --- /dev/null +++ b/src/api/types/CreditsAutoTopupCreditSummary.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface CreditsAutoTopupCreditSummary { + id: string; + name: string; +} diff --git a/src/api/types/CreditsAutoTopupHardFailure.ts b/src/api/types/CreditsAutoTopupHardFailure.ts new file mode 100644 index 00000000..2b6b3d62 --- /dev/null +++ b/src/api/types/CreditsAutoTopupHardFailure.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface CreditsAutoTopupHardFailure { + company?: Schematic.CreditsAutoTopupCompanySummary; + credit?: Schematic.CreditsAutoTopupCreditSummary; + errorMessage?: string; + stripeErrorCode?: string; +} diff --git a/src/api/types/CreditsAutoTopupRetryFailure.ts b/src/api/types/CreditsAutoTopupRetryFailure.ts new file mode 100644 index 00000000..6c7e7dc8 --- /dev/null +++ b/src/api/types/CreditsAutoTopupRetryFailure.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface CreditsAutoTopupRetryFailure { + company?: Schematic.CreditsAutoTopupCompanySummary; + consecutiveFailures: number; + credit?: Schematic.CreditsAutoTopupCreditSummary; + lastErrorMessage?: string; + stripeErrorCode?: string; +} diff --git a/src/api/types/FeatureCompanyResponseData.ts b/src/api/types/FeatureCompanyResponseData.ts index 19d9b132..9443dca6 100644 --- a/src/api/types/FeatureCompanyResponseData.ts +++ b/src/api/types/FeatureCompanyResponseData.ts @@ -7,6 +7,7 @@ export interface FeatureCompanyResponseData { access: boolean; /** The maximum amount of usage that is permitted; a null value indicates that unlimited usage is permitted or that this is a credit-based entitlement (use credit_remaining instead). */ allocation?: number; + /** The type of allocation that is being used. */ allocationType: Schematic.EntitlementValueType; company?: Schematic.CompanyDetailResponseData; companyOverride?: Schematic.CompanyOverrideResponseData; @@ -14,6 +15,7 @@ export interface FeatureCompanyResponseData { creditConsumptionRate?: number; creditGrantCounts?: Record; creditGrantDetails?: Schematic.CreditGrantDetail[]; + /** Reason for the credit grant */ creditGrantReason?: Schematic.BillingCreditGrantReason; creditRemaining?: number; /** Deprecated: Use credit_remaining instead. */ @@ -21,6 +23,7 @@ export interface FeatureCompanyResponseData { /** Icon identifier for the credit type */ creditTypeIcon?: string; creditUsage?: Schematic.CreditUsage; + /** Aggregated credit usage by time period (day, week, month, billing period) */ creditUsageAggregation?: Schematic.CreditUsageAggregation; creditUsed?: number; /** Effective limit for usage calculations. For overage pricing, this is the soft limit where overage charges begin. For tiered pricing, this is the first tier boundary. For other pricing models, this is the base allocation. Used to calculate usage percentages and determine access thresholds. */ diff --git a/src/api/types/FeatureCompanyUserResponseData.ts b/src/api/types/FeatureCompanyUserResponseData.ts index 048165a6..0b47f3bb 100644 --- a/src/api/types/FeatureCompanyUserResponseData.ts +++ b/src/api/types/FeatureCompanyUserResponseData.ts @@ -7,6 +7,7 @@ export interface FeatureCompanyUserResponseData { access: boolean; /** The maximum amount of usage that is permitted; a null value indicates that unlimited usage is permitted. */ allocation?: number; + /** The type of allocation that is being used. */ allocationType: Schematic.EntitlementValueType; company?: Schematic.CompanyDetailResponseData; entitlementId: string; diff --git a/src/api/types/FeatureEntitlement.ts b/src/api/types/FeatureEntitlement.ts new file mode 100644 index 00000000..c73501a0 --- /dev/null +++ b/src/api/types/FeatureEntitlement.ts @@ -0,0 +1,34 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface FeatureEntitlement { + /** If the company has a numeric entitlement for this feature, the allocated amount */ + allocation?: number; + /** If the company has a credit-based entitlement for this feature, the ID of the credit */ + creditId?: string; + /** If the company has a credit-based entitlement for this feature, the remaining credit amount */ + creditRemaining?: number; + /** If the company has a credit-based entitlement for this feature, the total credit amount */ + creditTotal?: number; + /** If the company has a credit-based entitlement for this feature, the amount of credit used */ + creditUsed?: number; + /** If the feature is event-based, the name of the event tracked for usage */ + eventName?: string; + /** The ID of the feature */ + featureId: string; + /** The key of the flag associated with the feature */ + featureKey: string; + /** For event-based feature entitlements, the period over which usage is tracked */ + metricPeriod?: Schematic.FeatureEntitlementMetricPeriod; + /** For event-based feature entitlements, when the usage period will reset */ + metricResetAt?: Date; + /** For event-based feature entitlements that have a monthly period, whether that monthly reset is based on the calendar month or a billing cycle */ + monthReset?: Schematic.FeatureEntitlementMonthReset; + /** For usage-based pricing, the soft limit for overage charges or the next tier boundary */ + softLimit?: number; + /** If the company has a numeric entitlement for this feature, the current usage amount */ + usage?: number; + /** The type of the entitlement value */ + valueType: Schematic.EntitlementValueType; +} diff --git a/src/api/types/FeatureEntitlementMetricPeriod.ts b/src/api/types/FeatureEntitlementMetricPeriod.ts new file mode 100644 index 00000000..f0fd485c --- /dev/null +++ b/src/api/types/FeatureEntitlementMetricPeriod.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** For event-based feature entitlements, the period over which usage is tracked */ +export const FeatureEntitlementMetricPeriod = { + AllTime: "all_time", + CurrentDay: "current_day", + CurrentMonth: "current_month", + CurrentWeek: "current_week", +} as const; +export type FeatureEntitlementMetricPeriod = + (typeof FeatureEntitlementMetricPeriod)[keyof typeof FeatureEntitlementMetricPeriod]; diff --git a/src/api/types/FeatureEntitlementMonthReset.ts b/src/api/types/FeatureEntitlementMonthReset.ts new file mode 100644 index 00000000..afa09858 --- /dev/null +++ b/src/api/types/FeatureEntitlementMonthReset.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** For event-based feature entitlements that have a monthly period, whether that monthly reset is based on the calendar month or a billing cycle */ +export const FeatureEntitlementMonthReset = { + FirstOfMonth: "first_of_month", + BillingCycle: "billing_cycle", +} as const; +export type FeatureEntitlementMonthReset = + (typeof FeatureEntitlementMonthReset)[keyof typeof FeatureEntitlementMonthReset]; diff --git a/src/api/types/FeatureUsageDataResponseData.ts b/src/api/types/FeatureUsageDataResponseData.ts deleted file mode 100644 index 8611402a..00000000 --- a/src/api/types/FeatureUsageDataResponseData.ts +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../index"; - -export interface FeatureUsageDataResponseData { - creditTypeId?: string; - creditUsage?: Schematic.CreditUsageResponseData; - entitlementSource: string; - entitlementValueType: string; - featureId: string; - featureName: string; - featureType: Schematic.FeatureType; - hardLimit: string; - hasAccess: boolean; - metricResetAt?: Date; - monthlyUsageBasedPrice?: Schematic.BillingPriceView; - priceBehavior?: string; - softLimit: string; - usage: string; - valueNumeric?: number; - yearlyUsageBasedPrice?: Schematic.BillingPriceView; -} diff --git a/src/api/types/FeatureUsageLegacyResponseData.ts b/src/api/types/FeatureUsageLegacyResponseData.ts new file mode 100644 index 00000000..7fe0a6f9 --- /dev/null +++ b/src/api/types/FeatureUsageLegacyResponseData.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface FeatureUsageLegacyResponseData { + allocation?: number; + creditUsage?: Schematic.CreditUsage; + entitlement: string; + feature?: Schematic.FeatureView; + metricResetAt?: Date; + usage?: number; +} diff --git a/src/api/types/FeatureUsageResponseData.ts b/src/api/types/FeatureUsageResponseData.ts index 5061d945..f5de4cf3 100644 --- a/src/api/types/FeatureUsageResponseData.ts +++ b/src/api/types/FeatureUsageResponseData.ts @@ -7,18 +7,21 @@ export interface FeatureUsageResponseData { access: boolean; /** The maximum amount of usage that is permitted; a null value indicates that unlimited usage is permitted or that this is a credit-based entitlement (use credit_remaining instead). */ allocation?: number; + /** The type of allocation that is being used. */ allocationType: Schematic.EntitlementValueType; companyOverride?: Schematic.CompanyOverrideResponseData; /** The rate at which credits are consumed per unit of usage */ creditConsumptionRate?: number; creditGrantCounts?: Record; creditGrantDetails?: Schematic.CreditGrantDetail[]; + /** Reason for the credit grant */ creditGrantReason?: Schematic.BillingCreditGrantReason; creditRemaining?: number; /** Deprecated: Use credit_remaining instead. */ creditTotal?: number; /** Icon identifier for the credit type */ creditTypeIcon?: string; + /** Aggregated credit usage by time period (day, week, month, billing period) */ creditUsageAggregation?: Schematic.CreditUsageAggregation; creditUsed?: number; /** Effective limit for usage calculations. For overage pricing, this is the soft limit where overage charges begin. For tiered pricing, this is the first tier boundary. For other pricing models, this is the base allocation. Used to calculate usage percentages and determine access thresholds. */ diff --git a/src/api/types/FeatureUsageTimeSeriesResponseData.ts b/src/api/types/FeatureUsageTimeSeriesResponseData.ts new file mode 100644 index 00000000..d0b121c5 --- /dev/null +++ b/src/api/types/FeatureUsageTimeSeriesResponseData.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface FeatureUsageTimeSeriesResponseData { + featureId: string; + featureType: Schematic.FeatureType; + limits: Schematic.LimitTimeSeriesPointResponseData[]; + periodType?: string; + usagePoints: Schematic.UsageTimeSeriesPointResponseData[]; +} diff --git a/src/api/types/FeatureView.ts b/src/api/types/FeatureView.ts new file mode 100644 index 00000000..f5b46001 --- /dev/null +++ b/src/api/types/FeatureView.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface FeatureView { + accountId: string; + createdAt: Date; + description: string; + eventSubtype?: string; + eventSummary?: Schematic.EventSummaryResponseData; + featureType: Schematic.FeatureType; + flags: Schematic.FlagView[]; + icon: string; + id: string; + lifecyclePhase?: Schematic.FeatureLifecyclePhase; + maintainerId?: string; + name: string; + plans: Schematic.PreviewObject[]; + pluralName?: string; + singularName?: string; + trait?: Schematic.EntityTraitDefinitionResponseData; + traitId?: string; + updatedAt: Date; +} diff --git a/src/api/types/FlagView.ts b/src/api/types/FlagView.ts new file mode 100644 index 00000000..6c377910 --- /dev/null +++ b/src/api/types/FlagView.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface FlagView { + accountId: string; + createdAt: Date; + defaultValue: boolean; + description: string; + feature?: Schematic.FeatureResponseData; + featureId?: string; + flagType: Schematic.FlagType; + id: string; + key: string; + lastCheckedAt?: Date; + maintainerId?: string; + name: string; + rules: Schematic.RuleView[]; + updatedAt: Date; +} diff --git a/src/api/types/LimitTimeSeriesPointResponseData.ts b/src/api/types/LimitTimeSeriesPointResponseData.ts new file mode 100644 index 00000000..0b03484c --- /dev/null +++ b/src/api/types/LimitTimeSeriesPointResponseData.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface LimitTimeSeriesPointResponseData { + effectiveAt: Date; + isSoftLimit: boolean; + limitSource: Schematic.EntitlementType; + limitValue?: number; + planId?: string; + priceBehavior?: Schematic.EntitlementPriceBehavior; +} diff --git a/src/api/types/PlanChangeAction.ts b/src/api/types/PlanChangeAction.ts index 368e76b5..84c6623c 100644 --- a/src/api/types/PlanChangeAction.ts +++ b/src/api/types/PlanChangeAction.ts @@ -9,6 +9,7 @@ export const PlanChangeAction = { PlanBillingProductChanged: "plan_billing_product_changed", PlanDeleted: "plan_deleted", PlanTraitChange: "plan_trait_change", + PlanVersionMigration: "plan_version_migration", Quickstart: "quickstart", SubscriptionChange: "subscription_change", } as const; diff --git a/src/api/types/PlanChangeResponseData.ts b/src/api/types/PlanChangeResponseData.ts index 883e4da5..764b5efb 100644 --- a/src/api/types/PlanChangeResponseData.ts +++ b/src/api/types/PlanChangeResponseData.ts @@ -4,12 +4,13 @@ import type * as Schematic from "../index"; export interface PlanChangeResponseData { action: Schematic.PlanChangeAction; - actorType: Schematic.PlanChangeActorType; + actorType: Schematic.ActorType; addOnsAdded: Schematic.PlanSnapshotView[]; addOnsRemoved: Schematic.PlanSnapshotView[]; apiKey?: Schematic.ApiKeyResponseData; - apiKeyRequest?: Schematic.ApiKeyRequestListResponseData; + auditLog?: Schematic.AuditLogListResponseData; basePlan?: Schematic.PlanSnapshotView; + /** Any special behavior that affected the assignment of the base plan during this change. */ basePlanAction?: Schematic.PlanChangeBasePlanAction; company?: Schematic.CompanyResponseData; companyId: string; @@ -18,6 +19,7 @@ export interface PlanChangeResponseData { id: string; previousBasePlan?: Schematic.PlanSnapshotView; requestId?: string; + /** If a subscription was changed as a part of this plan change, indicates the type of change that was made. */ subscriptionChangeAction?: Schematic.PlanChangeSubscriptionAction; /** Any traits were updated as part of this plan change (via pay-in-advance entitlements). */ traitsUpdated: Schematic.SubscriptionTraitUpdate[]; diff --git a/src/api/types/PlanCreditGrantView.ts b/src/api/types/PlanCreditGrantView.ts index 0457e7ee..e1070789 100644 --- a/src/api/types/PlanCreditGrantView.ts +++ b/src/api/types/PlanCreditGrantView.ts @@ -11,21 +11,28 @@ export interface PlanCreditGrantView { billingCreditAutoTopupExpiryUnitCount?: number; billingCreditAutoTopupThresholdPercent?: number; createdAt: Date; + credit?: Schematic.BillingCreditView; creditAmount: number; + /** Deprecated field, will be removed in the future. Use Credit.Description instead. */ creditDescription: string; + /** Deprecated field, will be removed in the future. Use Credit.Icon instead. */ creditIcon?: string; creditId: string; + /** Deprecated field, will be removed in the future. Use Credit.Name instead. */ creditName: string; expiryType?: Schematic.BillingCreditExpiryType; expiryUnit?: Schematic.BillingCreditExpiryUnit; expiryUnitCount?: number; id: string; + plan?: Schematic.GenericPreviewObject; planId: string; - planName: string; + planVersionId?: string; + /** Deprecated field, will be removed in the future. Use Credit.PluralName instead. */ pluralName?: string; - resetCadence: Schematic.BillingPlanCreditGrantResetCadence; - resetStart: Schematic.BillingPlanCreditGrantResetStart; + resetCadence?: Schematic.BillingPlanCreditGrantResetCadence; + resetStart?: Schematic.BillingPlanCreditGrantResetStart; resetType: Schematic.BillingPlanCreditGrantResetType; + /** Deprecated field, will be removed in the future. Use Credit.SingularName instead. */ singularName?: string; updatedAt: Date; } diff --git a/src/api/types/PlanDetailResponseData.ts b/src/api/types/PlanDetailResponseData.ts index fdb8eda0..784b2176 100644 --- a/src/api/types/PlanDetailResponseData.ts +++ b/src/api/types/PlanDetailResponseData.ts @@ -3,6 +3,7 @@ import type * as Schematic from "../index"; export interface PlanDetailResponseData { + activeVersion?: Schematic.PlanVersionResponseData; audienceType?: string; billingProduct?: Schematic.BillingProductDetailResponseData; chargeType: Schematic.ChargeType; @@ -10,6 +11,7 @@ export interface PlanDetailResponseData { controlledBy: Schematic.PlanControlledByType; createdAt: Date; description: string; + draftVersion?: Schematic.PlanVersionResponseData; features: Schematic.FeatureDetailResponseData[]; icon: string; id: string; diff --git a/src/api/types/PlanGroupDetailResponseData.ts b/src/api/types/PlanGroupDetailResponseData.ts index 71bbde81..897a78bb 100644 --- a/src/api/types/PlanGroupDetailResponseData.ts +++ b/src/api/types/PlanGroupDetailResponseData.ts @@ -26,6 +26,8 @@ export interface PlanGroupDetailResponseData { preventSelfServiceDowngradeButtonText?: string; preventSelfServiceDowngradeUrl?: string; prorationBehavior: string; + scheduledDowngradeBehavior?: string; + scheduledDowngradePreventWhenOverLimit?: boolean; showAsMonthlyPrices: boolean; showCredits: boolean; showPeriodToggle: boolean; diff --git a/src/api/types/PlanGroupPlanDetailResponseData.ts b/src/api/types/PlanGroupPlanDetailResponseData.ts index dd8da848..f132b978 100644 --- a/src/api/types/PlanGroupPlanDetailResponseData.ts +++ b/src/api/types/PlanGroupPlanDetailResponseData.ts @@ -3,6 +3,7 @@ import type * as Schematic from "../index"; export interface PlanGroupPlanDetailResponseData { + activeVersion?: Schematic.PlanVersionResponseData; audienceType?: string; billingProduct?: Schematic.BillingProductDetailResponseData; chargeType: Schematic.ChargeType; @@ -12,6 +13,7 @@ export interface PlanGroupPlanDetailResponseData { createdAt: Date; customPlanConfig?: Schematic.CustomPlanViewConfigResponseData; description: string; + draftVersion?: Schematic.PlanVersionResponseData; entitlements: Schematic.PlanEntitlementResponseData[]; features: Schematic.FeatureDetailResponseData[]; icon: string; diff --git a/src/api/types/PlanGroupResponseData.ts b/src/api/types/PlanGroupResponseData.ts index 66be9ee0..71b07b73 100644 --- a/src/api/types/PlanGroupResponseData.ts +++ b/src/api/types/PlanGroupResponseData.ts @@ -19,6 +19,8 @@ export interface PlanGroupResponseData { preventSelfServiceDowngradeButtonText?: string; preventSelfServiceDowngradeUrl?: string; prorationBehavior: string; + scheduledDowngradeBehavior?: string; + scheduledDowngradePreventWhenOverLimit?: boolean; showAsMonthlyPrices: boolean; showCredits: boolean; showPeriodToggle: boolean; diff --git a/src/api/types/PlanVersionCompanyMigrationResponseData.ts b/src/api/types/PlanVersionCompanyMigrationResponseData.ts new file mode 100644 index 00000000..59db8948 --- /dev/null +++ b/src/api/types/PlanVersionCompanyMigrationResponseData.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface PlanVersionCompanyMigrationResponseData { + companyId: string; + companyName: string; + completedAt?: Date; + createdAt: Date; + error?: string; + id: string; + migrationId: string; + planVersionIdFrom?: string; + startedAt?: Date; + status: Schematic.PlanVersionCompanyMigrationStatus; + updatedAt: Date; +} diff --git a/src/api/types/PlanVersionCompanyMigrationStatus.ts b/src/api/types/PlanVersionCompanyMigrationStatus.ts new file mode 100644 index 00000000..1f0eae49 --- /dev/null +++ b/src/api/types/PlanVersionCompanyMigrationStatus.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +export const PlanVersionCompanyMigrationStatus = { + Completed: "completed", + Failed: "failed", + InProgress: "in_progress", + Pending: "pending", + Skipped: "skipped", +} as const; +export type PlanVersionCompanyMigrationStatus = + (typeof PlanVersionCompanyMigrationStatus)[keyof typeof PlanVersionCompanyMigrationStatus]; diff --git a/src/api/types/PlanVersionMigrationResponseData.ts b/src/api/types/PlanVersionMigrationResponseData.ts new file mode 100644 index 00000000..54d2ef4e --- /dev/null +++ b/src/api/types/PlanVersionMigrationResponseData.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface PlanVersionMigrationResponseData { + completedAt?: Date; + completedCompanies: number; + createdAt: Date; + error?: string; + failedCompanies: number; + id: string; + planId: string; + planVersionIdFrom?: string; + planVersionIdTo: string; + skippedCompanies: number; + startedAt?: Date; + status: Schematic.PlanVersionMigrationStatus; + strategy: Schematic.PlanVersionMigrationStrategy; + totalCompanies: number; + updatedAt: Date; +} diff --git a/src/api/types/PlanVersionMigrationStatus.ts b/src/api/types/PlanVersionMigrationStatus.ts new file mode 100644 index 00000000..cc8cdb96 --- /dev/null +++ b/src/api/types/PlanVersionMigrationStatus.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export const PlanVersionMigrationStatus = { + Completed: "completed", + Failed: "failed", + InProgress: "in_progress", + Pending: "pending", +} as const; +export type PlanVersionMigrationStatus = (typeof PlanVersionMigrationStatus)[keyof typeof PlanVersionMigrationStatus]; diff --git a/src/api/types/PlanVersionMigrationStrategy.ts b/src/api/types/PlanVersionMigrationStrategy.ts new file mode 100644 index 00000000..9f372e8f --- /dev/null +++ b/src/api/types/PlanVersionMigrationStrategy.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const PlanVersionMigrationStrategy = { + Immediate: "immediate", + Leave: "leave", +} as const; +export type PlanVersionMigrationStrategy = + (typeof PlanVersionMigrationStrategy)[keyof typeof PlanVersionMigrationStrategy]; diff --git a/src/api/types/PlanViewPublicResponseData.ts b/src/api/types/PlanViewPublicResponseData.ts new file mode 100644 index 00000000..3534bc88 --- /dev/null +++ b/src/api/types/PlanViewPublicResponseData.ts @@ -0,0 +1,35 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface PlanViewPublicResponseData { + activeVersion?: Schematic.PlanVersionResponseData; + audienceType?: string; + billingProduct?: Schematic.BillingProductDetailResponseData; + chargeType: Schematic.ChargeType; + companyCount: number; + compatiblePlanIds: string[]; + controlledBy: Schematic.PlanControlledByType; + createdAt: Date; + custom: boolean; + customPlanConfig?: Schematic.CustomPlanConfig; + description: string; + draftVersion?: Schematic.PlanVersionResponseData; + entitlements: Schematic.PlanEntitlementResponseData[]; + features: Schematic.FeatureDetailResponseData[]; + icon: string; + id: string; + includedCreditGrants: Schematic.PlanCreditGrantView[]; + isCustom: boolean; + isDefault: boolean; + isFree: boolean; + isTrialable: boolean; + monthlyPrice?: Schematic.BillingPriceResponseData; + name: string; + oneTimePrice?: Schematic.BillingPriceResponseData; + planType: Schematic.PlanType; + trialDays?: number; + updatedAt: Date; + versions: Schematic.PlanVersionResponseData[]; + yearlyPrice?: Schematic.BillingPriceResponseData; +} diff --git a/src/api/types/PreviewSubscriptionChangeResponseData.ts b/src/api/types/PreviewSubscriptionChangeResponseData.ts index f23ed611..6a2aa737 100644 --- a/src/api/types/PreviewSubscriptionChangeResponseData.ts +++ b/src/api/types/PreviewSubscriptionChangeResponseData.ts @@ -6,12 +6,14 @@ export interface PreviewSubscriptionChangeResponseData { amountOff: number; dueNow: number; finance?: Schematic.PreviewSubscriptionFinanceResponseData; + isScheduledDowngrade: boolean; newCharges: number; paymentMethodRequired: boolean; percentOff: number; periodStart: Date; promoCodeApplied: boolean; proration: number; + scheduledChangeTime?: Date; trialEnd?: Date; usageViolations: Schematic.FeatureUsageResponseData[]; } diff --git a/src/api/types/PublicPlansResponseData.ts b/src/api/types/PublicPlansResponseData.ts new file mode 100644 index 00000000..000a4adb --- /dev/null +++ b/src/api/types/PublicPlansResponseData.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface PublicPlansResponseData { + activeAddOns: Schematic.PlanViewPublicResponseData[]; + activePlans: Schematic.PlanViewPublicResponseData[]; + addOnCompatibilities: Schematic.CompatiblePlans[]; + capabilities?: Schematic.ComponentCapabilities; + displaySettings: Schematic.ComponentDisplaySettings; + showAsMonthlyPrices: boolean; + showCredits: boolean; + showPeriodToggle: boolean; + showZeroPriceAsFree: boolean; +} diff --git a/src/api/types/RuleView.ts b/src/api/types/RuleView.ts new file mode 100644 index 00000000..db618087 --- /dev/null +++ b/src/api/types/RuleView.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface RuleView { + accountId: string; + conditionGroups: Schematic.ConditionGroupView[]; + conditions: Schematic.ConditionView[]; + createdAt: Date; + environmentId: string; + flagId?: string; + id: string; + name: string; + planVersionId?: string; + priority: number; + ruleType: string; + updatedAt: Date; + value: boolean; +} diff --git a/src/api/types/RulesEngineSchemaVersion.ts b/src/api/types/RulesEngineSchemaVersion.ts index a4a6cc8c..07b0325a 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 = { - FiveHundredFortyNineE6Fea: "549e6fea", + V0F048Dd3: "v0f048dd3", PlaceholderForFernCompatibility: "placeholder-for-fern-compatibility", } as const; export type RulesEngineSchemaVersion = (typeof RulesEngineSchemaVersion)[keyof typeof RulesEngineSchemaVersion]; diff --git a/src/api/types/RulesengineCheckFlagResult.ts b/src/api/types/RulesengineCheckFlagResult.ts index ca4b2a7c..580cb0b4 100644 --- a/src/api/types/RulesengineCheckFlagResult.ts +++ b/src/api/types/RulesengineCheckFlagResult.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../index"; export interface RulesengineCheckFlagResult { companyId?: string; + entitlement?: Schematic.RulesengineFeatureEntitlement; err?: string; featureAllocation?: number; featureUsage?: number; diff --git a/src/api/types/RulesengineCompany.ts b/src/api/types/RulesengineCompany.ts index 2e594eef..1e0bf533 100644 --- a/src/api/types/RulesengineCompany.ts +++ b/src/api/types/RulesengineCompany.ts @@ -7,12 +7,13 @@ export interface RulesengineCompany { basePlanId?: string; billingProductIds: string[]; creditBalances: Record; - crmProductIds: string[]; + entitlements?: Schematic.RulesengineFeatureEntitlement[]; environmentId: string; id: string; keys: Record; metrics: Schematic.RulesengineCompanyMetric[]; planIds: string[]; + planVersionIds: string[]; rules: Schematic.RulesengineRule[]; subscription?: Schematic.RulesengineSubscription; traits: Schematic.RulesengineTrait[]; diff --git a/src/api/types/RulesengineConditionConditionType.ts b/src/api/types/RulesengineConditionConditionType.ts index d82f0bab..94d602cb 100644 --- a/src/api/types/RulesengineConditionConditionType.ts +++ b/src/api/types/RulesengineConditionConditionType.ts @@ -5,9 +5,9 @@ export const RulesengineConditionConditionType = { BillingProduct: "billing_product", Company: "company", Credit: "credit", - CrmProduct: "crm_product", Metric: "metric", Plan: "plan", + PlanVersion: "plan_version", Trait: "trait", User: "user", } as const; diff --git a/src/api/types/RulesengineEntitlementValueType.ts b/src/api/types/RulesengineEntitlementValueType.ts new file mode 100644 index 00000000..1c0d9a7b --- /dev/null +++ b/src/api/types/RulesengineEntitlementValueType.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +export const RulesengineEntitlementValueType = { + Boolean: "boolean", + Credit: "credit", + Numeric: "numeric", + Trait: "trait", + Unknown: "unknown", + Unlimited: "unlimited", +} as const; +export type RulesengineEntitlementValueType = + (typeof RulesengineEntitlementValueType)[keyof typeof RulesengineEntitlementValueType]; diff --git a/src/api/types/RulesengineFeatureEntitlement.ts b/src/api/types/RulesengineFeatureEntitlement.ts new file mode 100644 index 00000000..38c71c74 --- /dev/null +++ b/src/api/types/RulesengineFeatureEntitlement.ts @@ -0,0 +1,34 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface RulesengineFeatureEntitlement { + /** If the company has a numeric entitlement for this feature, the allocated amount */ + allocation?: number; + /** If the company has a credit-based entitlement for this feature, the ID of the credit */ + creditId?: string; + /** If the company has a credit-based entitlement for this feature, the remaining credit amount */ + creditRemaining?: number; + /** If the company has a credit-based entitlement for this feature, the total credit amount */ + creditTotal?: number; + /** If the company has a credit-based entitlement for this feature, the amount of credit used */ + creditUsed?: number; + /** If the feature is event-based, the name of the event tracked for usage */ + eventName?: string; + /** The ID of the feature */ + featureId: string; + /** The key of the flag associated with the feature */ + featureKey: string; + /** For event-based feature entitlements, the period over which usage is tracked */ + metricPeriod?: Schematic.RulesengineFeatureEntitlementMetricPeriod; + /** For event-based feature entitlements, when the usage period will reset */ + metricResetAt?: Date; + /** For event-based feature entitlements that have a monthly period, whether that monthly reset is based on the calendar month or a billing cycle */ + monthReset?: Schematic.RulesengineFeatureEntitlementMonthReset; + /** For usage-based pricing, the soft limit for overage charges or the next tier boundary */ + softLimit?: number; + /** If the company has a numeric entitlement for this feature, the current usage amount */ + usage?: number; + /** The type of the entitlement value */ + valueType: Schematic.RulesengineEntitlementValueType; +} diff --git a/src/api/types/RulesengineFeatureEntitlementMetricPeriod.ts b/src/api/types/RulesengineFeatureEntitlementMetricPeriod.ts new file mode 100644 index 00000000..712916f9 --- /dev/null +++ b/src/api/types/RulesengineFeatureEntitlementMetricPeriod.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** For event-based feature entitlements, the period over which usage is tracked */ +export const RulesengineFeatureEntitlementMetricPeriod = { + AllTime: "all_time", + CurrentDay: "current_day", + CurrentMonth: "current_month", + CurrentWeek: "current_week", +} as const; +export type RulesengineFeatureEntitlementMetricPeriod = + (typeof RulesengineFeatureEntitlementMetricPeriod)[keyof typeof RulesengineFeatureEntitlementMetricPeriod]; diff --git a/src/api/types/RulesengineFeatureEntitlementMonthReset.ts b/src/api/types/RulesengineFeatureEntitlementMonthReset.ts new file mode 100644 index 00000000..1651c630 --- /dev/null +++ b/src/api/types/RulesengineFeatureEntitlementMonthReset.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** For event-based feature entitlements that have a monthly period, whether that monthly reset is based on the calendar month or a billing cycle */ +export const RulesengineFeatureEntitlementMonthReset = { + FirstOfMonth: "first_of_month", + BillingCycle: "billing_cycle", +} as const; +export type RulesengineFeatureEntitlementMonthReset = + (typeof RulesengineFeatureEntitlementMonthReset)[keyof typeof RulesengineFeatureEntitlementMonthReset]; diff --git a/src/api/types/ScheduledCheckoutResponseData.ts b/src/api/types/ScheduledCheckoutResponseData.ts new file mode 100644 index 00000000..d3fc96c6 --- /dev/null +++ b/src/api/types/ScheduledCheckoutResponseData.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface ScheduledCheckoutResponseData { + actorType: string; + companyId: string; + completedAt?: Date; + createdAt: Date; + errorMessage?: string; + executeAfter: Date; + fromPlanId: string; + id: string; + scheduledInterval?: string; + scheduledPrice?: number; + startedAt?: Date; + status: Schematic.ScheduledCheckoutStatus; + toPlanId: string; + updatedAt: Date; +} diff --git a/src/api/types/ScheduledCheckoutStatus.ts b/src/api/types/ScheduledCheckoutStatus.ts new file mode 100644 index 00000000..cc92d492 --- /dev/null +++ b/src/api/types/ScheduledCheckoutStatus.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ScheduledCheckoutStatus = { + Cancelled: "cancelled", + Error: "error", + Executing: "executing", + Pending: "pending", + Success: "success", +} as const; +export type ScheduledCheckoutStatus = (typeof ScheduledCheckoutStatus)[keyof typeof ScheduledCheckoutStatus]; diff --git a/src/api/types/ScheduledDowngradeConfigBehavior.ts b/src/api/types/ScheduledDowngradeConfigBehavior.ts new file mode 100644 index 00000000..fbbd4c9a --- /dev/null +++ b/src/api/types/ScheduledDowngradeConfigBehavior.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ScheduledDowngradeConfigBehavior = { + EndOfBillingPeriod: "end_of_billing_period", + None: "none", +} as const; +export type ScheduledDowngradeConfigBehavior = + (typeof ScheduledDowngradeConfigBehavior)[keyof typeof ScheduledDowngradeConfigBehavior]; diff --git a/src/api/types/ScheduledDowngradeResponseData.ts b/src/api/types/ScheduledDowngradeResponseData.ts new file mode 100644 index 00000000..d7666413 --- /dev/null +++ b/src/api/types/ScheduledDowngradeResponseData.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface ScheduledDowngradeResponseData { + currency: string; + effectiveAfter: Date; + fromPlanId: string; + fromPlanName: string; + fromSubscriptionPrice: number; + id: string; + interval: string; + scheduledInterval?: string; + scheduledPrice?: number; + toPlanId: string; + toPlanName: string; +} diff --git a/src/api/types/TimeSeriesGranularity.ts b/src/api/types/TimeSeriesGranularity.ts new file mode 100644 index 00000000..2bda98c8 --- /dev/null +++ b/src/api/types/TimeSeriesGranularity.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TimeSeriesGranularity = { + Daily: "daily", + Hourly: "hourly", + Monthly: "monthly", + Weekly: "weekly", +} as const; +export type TimeSeriesGranularity = (typeof TimeSeriesGranularity)[keyof typeof TimeSeriesGranularity]; diff --git a/src/api/types/UpsertCompanyRequestBody.ts b/src/api/types/UpsertCompanyRequestBody.ts index d297e978..29da9609 100644 --- a/src/api/types/UpsertCompanyRequestBody.ts +++ b/src/api/types/UpsertCompanyRequestBody.ts @@ -7,6 +7,7 @@ export interface UpsertCompanyRequestBody { keys: Record; lastSeenAt?: Date; name?: string; + preventKeyRemap?: boolean; /** A map of trait names to trait values */ traits?: Record; updateOnly?: boolean; diff --git a/src/api/types/UsageTimeSeriesPointResponseData.ts b/src/api/types/UsageTimeSeriesPointResponseData.ts new file mode 100644 index 00000000..ba096edf --- /dev/null +++ b/src/api/types/UsageTimeSeriesPointResponseData.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface UsageTimeSeriesPointResponseData { + periodEnd?: Date; + periodStart?: Date; + timestamp: Date; + usage: number; +} diff --git a/src/api/types/WebFeatureUsageWebhookOutput.ts b/src/api/types/WebFeatureUsageWebhookOutput.ts new file mode 100644 index 00000000..35e50bdf --- /dev/null +++ b/src/api/types/WebFeatureUsageWebhookOutput.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface WebFeatureUsageWebhookOutput { + allocation?: number; + creditUsage?: Schematic.CreditUsage; + entitlement: string; + feature?: Schematic.FeatureView; + metricResetAt?: Date; + usage?: number; + company?: Schematic.CompanyDetailResponseData; +} diff --git a/src/api/types/WebhookRequestType.ts b/src/api/types/WebhookRequestType.ts index 7d04a109..a9789bf1 100644 --- a/src/api/types/WebhookRequestType.ts +++ b/src/api/types/WebhookRequestType.ts @@ -31,6 +31,7 @@ export const WebhookRequestType = { PlanEntitlementDeleted: "plan.entitlement.deleted", PlanEntitlementUpdated: "plan.entitlement.updated", PlanUpdated: "plan.updated", + PlanVersionDeleted: "plan_version.deleted", RuleDeleted: "rule.deleted", TestSend: "test.send", UserCreated: "user.created", diff --git a/src/api/types/WhoAmIResponseData.ts b/src/api/types/WhoAmIResponseData.ts new file mode 100644 index 00000000..e264560d --- /dev/null +++ b/src/api/types/WhoAmIResponseData.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../index"; + +export interface WhoAmIResponseData { + accountId: string; + accountName: string; + actorType: string; + apiKeyId?: string; + environmentId?: string; + environments: Schematic.EnvironmentResponseData[]; + stripeUserId?: string; + userId?: string; + userName?: string; +} diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 08e8d434..4d6c6fc6 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -1,9 +1,10 @@ +export * from "./ActorType"; export * from "./ApiError"; export * from "./ApiKeyCreateResponseData"; -export * from "./ApiKeyRequestListResponseData"; -export * from "./ApiKeyRequestResponseData"; export * from "./ApiKeyResponseData"; export * from "./ApiKeyScope"; +export * from "./AuditLogListResponseData"; +export * from "./AuditLogResponseData"; export * from "./BillingCouponResponseData"; export * from "./BillingCreditBundleResponseData"; export * from "./BillingCreditBundleStatus"; @@ -18,6 +19,7 @@ export * from "./BillingCreditGrantZeroedOutReason"; export * from "./BillingCreditLedgerResponseData"; export * from "./BillingCreditResponseData"; export * from "./BillingCreditRolloverPolicy"; +export * from "./BillingCreditView"; export * from "./BillingCustomerResponseData"; export * from "./BillingCustomerSubscription"; export * from "./BillingCustomerWithSubscriptionsResponseData"; @@ -67,7 +69,6 @@ export * from "./CompanyPlanInvalidReason"; export * from "./CompanyPlanWithBillingSubView"; export * from "./CompanyResponseData"; export * from "./CompanySubscriptionResponseData"; -export * from "./CompanyViewWithFeatureUsageResponseData"; export * from "./CompatiblePlans"; export * from "./CompatiblePlansResponseData"; export * from "./ComponentCapabilities"; @@ -82,9 +83,13 @@ export * from "./ComponentState"; export * from "./Condition"; export * from "./ConditionConditionType"; export * from "./ConditionGroup"; +export * from "./ConditionGroupResponseData"; +export * from "./ConditionGroupView"; export * from "./ConditionMetricPeriod"; export * from "./ConditionMetricPeriodMonthReset"; export * from "./ConditionOperator"; +export * from "./ConditionResponseData"; +export * from "./ConditionView"; export * from "./CountResponse"; export * from "./CouponRequestBody"; export * from "./CreateBillingPlanCreditGrantRequestBody"; @@ -116,12 +121,15 @@ export * from "./CreditGrantExpiryRequestBody"; export * from "./CreditGrantSortOrder"; export * from "./CreditLedgerEnrichedEntryResponseData"; export * from "./CreditLedgerPeriod"; +export * from "./CreditsAutoTopupCompanySummary"; +export * from "./CreditsAutoTopupCreditSummary"; +export * from "./CreditsAutoTopupHardFailure"; +export * from "./CreditsAutoTopupRetryFailure"; export * from "./CreditTransferResponseData"; export * from "./CreditTransferView"; export * from "./CreditTriggerConfig"; export * from "./CreditUsage"; export * from "./CreditUsageAggregation"; -export * from "./CreditUsageResponseData"; export * from "./CustomPlanConfig"; export * from "./CustomPlanViewConfigResponseData"; export * from "./DataExportOutputFileType"; @@ -160,21 +168,28 @@ export * from "./EventType"; export * from "./FeatureCompanyResponseData"; export * from "./FeatureCompanyUserResponseData"; export * from "./FeatureDetailResponseData"; +export * from "./FeatureEntitlement"; +export * from "./FeatureEntitlementMetricPeriod"; +export * from "./FeatureEntitlementMonthReset"; export * from "./FeatureLedgerResponseData"; export * from "./FeatureLifecyclePhase"; export * from "./FeatureResponseData"; export * from "./FeatureType"; -export * from "./FeatureUsageDataResponseData"; export * from "./FeatureUsageDetailResponseData"; +export * from "./FeatureUsageLegacyResponseData"; export * from "./FeatureUsageResponseData"; +export * from "./FeatureUsageTimeSeriesResponseData"; +export * from "./FeatureView"; export * from "./FlagDetailResponseData"; export * from "./FlagResponseData"; export * from "./FlagType"; +export * from "./FlagView"; export * from "./GenericPreviewObject"; export * from "./InvoiceRequestBody"; export * from "./InvoiceResponseData"; export * from "./IssueTemporaryAccessTokenResponseData"; export * from "./KeysRequestBody"; +export * from "./LimitTimeSeriesPointResponseData"; export * from "./ManagePlanPreviewResponseResponseData"; export * from "./ManagePlanRequest"; export * from "./ManagePlanResponseResponseData"; @@ -187,7 +202,6 @@ export * from "./PlanBundleCreditGrantRequestBody"; export * from "./PlanBundleEntitlementRequestBody"; export * from "./PlanBundleResponseData"; export * from "./PlanChangeAction"; -export * from "./PlanChangeActorType"; export * from "./PlanChangeBasePlanAction"; export * from "./PlanChangeResponseData"; export * from "./PlanChangeSubscriptionAction"; @@ -207,14 +221,21 @@ export * from "./PlanSelection"; export * from "./PlanSnapshotView"; export * from "./PlanTraitResponseData"; export * from "./PlanType"; +export * from "./PlanVersionCompanyMigrationResponseData"; +export * from "./PlanVersionCompanyMigrationStatus"; +export * from "./PlanVersionMigrationResponseData"; +export * from "./PlanVersionMigrationStatus"; +export * from "./PlanVersionMigrationStrategy"; export * from "./PlanVersionResponseData"; export * from "./PlanVersionStatus"; +export * from "./PlanViewPublicResponseData"; export * from "./PreviewObject"; export * from "./PreviewObjectResponseData"; export * from "./PreviewSubscriptionChangeResponseData"; export * from "./PreviewSubscriptionFinanceResponseData"; export * from "./PreviewSubscriptionUpcomingInvoiceLineItems"; export * from "./ProrationBehavior"; +export * from "./PublicPlansResponseData"; export * from "./QuickstartResp"; export * from "./RawEventBatchResponseData"; export * from "./RawEventResponseData"; @@ -241,7 +262,11 @@ export * from "./RulesengineConditionGroup"; export * from "./RulesengineConditionMetricPeriod"; export * from "./RulesengineConditionMetricPeriodMonthReset"; export * from "./RulesengineConditionOperator"; +export * from "./RulesengineEntitlementValueType"; export * from "./RulesengineEntityType"; +export * from "./RulesengineFeatureEntitlement"; +export * from "./RulesengineFeatureEntitlementMetricPeriod"; +export * from "./RulesengineFeatureEntitlementMonthReset"; export * from "./RulesengineFlag"; export * from "./RulesengineRule"; export * from "./RulesengineRuleRuleType"; @@ -250,6 +275,11 @@ export * from "./RulesengineTrait"; export * from "./RulesengineTraitDefinition"; export * from "./RulesengineTraitDefinitionComparableType"; export * from "./RulesengineUser"; +export * from "./RuleView"; +export * from "./ScheduledCheckoutResponseData"; +export * from "./ScheduledCheckoutStatus"; +export * from "./ScheduledDowngradeConfigBehavior"; +export * from "./ScheduledDowngradeResponseData"; export * from "./SegmentStatusResp"; export * from "./SkippedEntitlementErrorResponseData"; export * from "./SkippedEntitlementResponseData"; @@ -260,6 +290,7 @@ export * from "./SubscriptionTraitUpdate"; export * from "./SubscriptionType"; export * from "./TemporaryAccessTokenResourceType"; export * from "./TemporaryAccessTokenResponseData"; +export * from "./TimeSeriesGranularity"; export * from "./TraitDefinition"; export * from "./TraitDefinitionComparableType"; export * from "./TraitType"; @@ -280,11 +311,14 @@ export * from "./UpsertUserRequestBody"; export * from "./UpsertUserSubRequestBody"; export * from "./UsageBasedEntitlementRequestBody"; export * from "./UsageBasedEntitlementResponseData"; +export * from "./UsageTimeSeriesPointResponseData"; export * from "./UserDetailResponseData"; export * from "./UserResponseData"; +export * from "./WebFeatureUsageWebhookOutput"; export * from "./WebhookEventDetailResponseData"; export * from "./WebhookEventResponseData"; export * from "./WebhookEventStatus"; export * from "./WebhookRequestType"; export * from "./WebhookResponseData"; export * from "./WebhookStatus"; +export * from "./WhoAmIResponseData"; diff --git a/src/datastream/websocket-client.ts b/src/datastream/websocket-client.ts index 78b94f1d..6072c4f6 100644 --- a/src/datastream/websocket-client.ts +++ b/src/datastream/websocket-client.ts @@ -1,7 +1,6 @@ // Note: This client is designed for Node.js server environments only import { EventEmitter } from 'events'; -import { URL } from 'url'; import WebSocketClass, { type WebSocket } from 'ws'; import { DataStreamResp, DataStreamBaseReq } from './types'; import { Logger } from '../logger'; diff --git a/src/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.ts b/src/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.ts index cf0c5992..4a7b5c2d 100644 --- a/src/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.ts +++ b/src/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.ts @@ -11,6 +11,7 @@ export const CreateApiKeyRequestBody: core.serialization.Schema< description: core.serialization.string().optional(), environmentId: core.serialization.property("environment_id", core.serialization.string().optional()), name: core.serialization.string(), + readonly: core.serialization.boolean().optional(), }); export declare namespace CreateApiKeyRequestBody { @@ -18,5 +19,6 @@ export declare namespace CreateApiKeyRequestBody { description?: string | null; environment_id?: string | null; name: string; + readonly?: boolean | null; } } diff --git a/src/serialization/resources/accounts/types/CountApiRequestsParams.ts b/src/serialization/resources/accounts/types/CountAuditLogsParams.ts similarity index 51% rename from src/serialization/resources/accounts/types/CountApiRequestsParams.ts rename to src/serialization/resources/accounts/types/CountAuditLogsParams.ts index d452c7b2..b3523f5c 100644 --- a/src/serialization/resources/accounts/types/CountApiRequestsParams.ts +++ b/src/serialization/resources/accounts/types/CountAuditLogsParams.ts @@ -3,24 +3,29 @@ import type * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; import type * as serializers from "../../../index"; +import { ActorType } from "../../../types/ActorType"; -export const CountApiRequestsParams: core.serialization.ObjectSchema< - serializers.CountApiRequestsParams.Raw, - Schematic.CountApiRequestsParams +export const CountAuditLogsParams: core.serialization.ObjectSchema< + serializers.CountAuditLogsParams.Raw, + Schematic.CountAuditLogsParams > = core.serialization.object({ + actorType: core.serialization.property("actor_type", ActorType.optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), environmentId: core.serialization.property("environment_id", core.serialization.string().optional()), limit: core.serialization.number().optional(), offset: core.serialization.number().optional(), q: core.serialization.string().optional(), - requestType: core.serialization.property("request_type", core.serialization.string().optional()), + startTime: core.serialization.property("start_time", core.serialization.date().optional()), }); -export declare namespace CountApiRequestsParams { +export declare namespace CountAuditLogsParams { export interface Raw { + actor_type?: ActorType.Raw | null; + end_time?: string | null; environment_id?: string | null; limit?: number | null; offset?: number | null; q?: string | null; - request_type?: string | null; + start_time?: string | null; } } diff --git a/src/serialization/resources/accounts/types/CountApiRequestsResponse.ts b/src/serialization/resources/accounts/types/CountAuditLogsResponse.ts similarity index 53% rename from src/serialization/resources/accounts/types/CountApiRequestsResponse.ts rename to src/serialization/resources/accounts/types/CountAuditLogsResponse.ts index bc3be63d..2ad8d5d3 100644 --- a/src/serialization/resources/accounts/types/CountApiRequestsResponse.ts +++ b/src/serialization/resources/accounts/types/CountAuditLogsResponse.ts @@ -4,19 +4,19 @@ import type * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; import type * as serializers from "../../../index"; import { CountResponse } from "../../../types/CountResponse"; -import { CountApiRequestsParams } from "./CountApiRequestsParams"; +import { CountAuditLogsParams } from "./CountAuditLogsParams"; -export const CountApiRequestsResponse: core.serialization.ObjectSchema< - serializers.CountApiRequestsResponse.Raw, - Schematic.CountApiRequestsResponse +export const CountAuditLogsResponse: core.serialization.ObjectSchema< + serializers.CountAuditLogsResponse.Raw, + Schematic.CountAuditLogsResponse > = core.serialization.object({ data: CountResponse, - params: CountApiRequestsParams, + params: CountAuditLogsParams, }); -export declare namespace CountApiRequestsResponse { +export declare namespace CountAuditLogsResponse { export interface Raw { data: CountResponse.Raw; - params: CountApiRequestsParams.Raw; + params: CountAuditLogsParams.Raw; } } diff --git a/src/serialization/resources/accounts/types/GetApiRequestResponse.ts b/src/serialization/resources/accounts/types/GetAuditLogResponse.ts similarity index 54% rename from src/serialization/resources/accounts/types/GetApiRequestResponse.ts rename to src/serialization/resources/accounts/types/GetAuditLogResponse.ts index f414adb8..d215baee 100644 --- a/src/serialization/resources/accounts/types/GetApiRequestResponse.ts +++ b/src/serialization/resources/accounts/types/GetAuditLogResponse.ts @@ -3,19 +3,19 @@ import type * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; import type * as serializers from "../../../index"; -import { ApiKeyRequestResponseData } from "../../../types/ApiKeyRequestResponseData"; +import { AuditLogResponseData } from "../../../types/AuditLogResponseData"; -export const GetApiRequestResponse: core.serialization.ObjectSchema< - serializers.GetApiRequestResponse.Raw, - Schematic.GetApiRequestResponse +export const GetAuditLogResponse: core.serialization.ObjectSchema< + serializers.GetAuditLogResponse.Raw, + Schematic.GetAuditLogResponse > = core.serialization.object({ - data: ApiKeyRequestResponseData, + data: AuditLogResponseData, params: core.serialization.record(core.serialization.string(), core.serialization.unknown()), }); -export declare namespace GetApiRequestResponse { +export declare namespace GetAuditLogResponse { export interface Raw { - data: ApiKeyRequestResponseData.Raw; + data: AuditLogResponseData.Raw; params: Record; } } diff --git a/src/serialization/resources/accounts/types/GetWhoAmIResponse.ts b/src/serialization/resources/accounts/types/GetWhoAmIResponse.ts new file mode 100644 index 00000000..427c500b --- /dev/null +++ b/src/serialization/resources/accounts/types/GetWhoAmIResponse.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { WhoAmIResponseData } from "../../../types/WhoAmIResponseData"; + +export const GetWhoAmIResponse: core.serialization.ObjectSchema< + serializers.GetWhoAmIResponse.Raw, + Schematic.GetWhoAmIResponse +> = core.serialization.object({ + data: WhoAmIResponseData, + params: core.serialization.record(core.serialization.string(), core.serialization.unknown()), +}); + +export declare namespace GetWhoAmIResponse { + export interface Raw { + data: WhoAmIResponseData.Raw; + params: Record; + } +} diff --git a/src/serialization/resources/accounts/types/ListApiRequestsResponse.ts b/src/serialization/resources/accounts/types/ListApiRequestsResponse.ts deleted file mode 100644 index 7d4e6203..00000000 --- a/src/serialization/resources/accounts/types/ListApiRequestsResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../../../api/index"; -import * as core from "../../../../core"; -import type * as serializers from "../../../index"; -import { ApiKeyRequestListResponseData } from "../../../types/ApiKeyRequestListResponseData"; -import { ListApiRequestsParams } from "./ListApiRequestsParams"; - -export const ListApiRequestsResponse: core.serialization.ObjectSchema< - serializers.ListApiRequestsResponse.Raw, - Schematic.ListApiRequestsResponse -> = core.serialization.object({ - data: core.serialization.list(ApiKeyRequestListResponseData), - params: ListApiRequestsParams, -}); - -export declare namespace ListApiRequestsResponse { - export interface Raw { - data: ApiKeyRequestListResponseData.Raw[]; - params: ListApiRequestsParams.Raw; - } -} diff --git a/src/serialization/resources/accounts/types/ListApiRequestsParams.ts b/src/serialization/resources/accounts/types/ListAuditLogsParams.ts similarity index 52% rename from src/serialization/resources/accounts/types/ListApiRequestsParams.ts rename to src/serialization/resources/accounts/types/ListAuditLogsParams.ts index 581528b0..a57fc7b5 100644 --- a/src/serialization/resources/accounts/types/ListApiRequestsParams.ts +++ b/src/serialization/resources/accounts/types/ListAuditLogsParams.ts @@ -3,24 +3,29 @@ import type * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; import type * as serializers from "../../../index"; +import { ActorType } from "../../../types/ActorType"; -export const ListApiRequestsParams: core.serialization.ObjectSchema< - serializers.ListApiRequestsParams.Raw, - Schematic.ListApiRequestsParams +export const ListAuditLogsParams: core.serialization.ObjectSchema< + serializers.ListAuditLogsParams.Raw, + Schematic.ListAuditLogsParams > = core.serialization.object({ + actorType: core.serialization.property("actor_type", ActorType.optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), environmentId: core.serialization.property("environment_id", core.serialization.string().optional()), limit: core.serialization.number().optional(), offset: core.serialization.number().optional(), q: core.serialization.string().optional(), - requestType: core.serialization.property("request_type", core.serialization.string().optional()), + startTime: core.serialization.property("start_time", core.serialization.date().optional()), }); -export declare namespace ListApiRequestsParams { +export declare namespace ListAuditLogsParams { export interface Raw { + actor_type?: ActorType.Raw | null; + end_time?: string | null; environment_id?: string | null; limit?: number | null; offset?: number | null; q?: string | null; - request_type?: string | null; + start_time?: string | null; } } diff --git a/src/serialization/resources/accounts/types/ListAuditLogsResponse.ts b/src/serialization/resources/accounts/types/ListAuditLogsResponse.ts new file mode 100644 index 00000000..1a942c19 --- /dev/null +++ b/src/serialization/resources/accounts/types/ListAuditLogsResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { AuditLogListResponseData } from "../../../types/AuditLogListResponseData"; +import { ListAuditLogsParams } from "./ListAuditLogsParams"; + +export const ListAuditLogsResponse: core.serialization.ObjectSchema< + serializers.ListAuditLogsResponse.Raw, + Schematic.ListAuditLogsResponse +> = core.serialization.object({ + data: core.serialization.list(AuditLogListResponseData), + params: ListAuditLogsParams, +}); + +export declare namespace ListAuditLogsResponse { + export interface Raw { + data: AuditLogListResponseData.Raw[]; + params: ListAuditLogsParams.Raw; + } +} diff --git a/src/serialization/resources/accounts/types/index.ts b/src/serialization/resources/accounts/types/index.ts index 89d5a803..6d4fcdf8 100644 --- a/src/serialization/resources/accounts/types/index.ts +++ b/src/serialization/resources/accounts/types/index.ts @@ -1,18 +1,19 @@ export * from "./CountApiKeysParams"; export * from "./CountApiKeysResponse"; -export * from "./CountApiRequestsParams"; -export * from "./CountApiRequestsResponse"; +export * from "./CountAuditLogsParams"; +export * from "./CountAuditLogsResponse"; export * from "./CreateApiKeyResponse"; export * from "./CreateEnvironmentResponse"; export * from "./DeleteApiKeyResponse"; export * from "./DeleteEnvironmentResponse"; export * from "./GetApiKeyResponse"; -export * from "./GetApiRequestResponse"; +export * from "./GetAuditLogResponse"; export * from "./GetEnvironmentResponse"; +export * from "./GetWhoAmIResponse"; export * from "./ListApiKeysParams"; export * from "./ListApiKeysResponse"; -export * from "./ListApiRequestsParams"; -export * from "./ListApiRequestsResponse"; +export * from "./ListAuditLogsParams"; +export * from "./ListAuditLogsResponse"; export * from "./ListEnvironmentsParams"; export * from "./ListEnvironmentsResponse"; export * from "./QuickstartResponse"; diff --git a/src/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.ts b/src/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.ts deleted file mode 100644 index 059667cd..00000000 --- a/src/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.ts +++ /dev/null @@ -1,67 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../../../api/index"; -import * as core from "../../../../core"; -import type * as serializers from "../../../index"; -import { SortDirection } from "../../../types/SortDirection"; -import { SubscriptionStatus } from "../../../types/SubscriptionStatus"; -import { SubscriptionType } from "../../../types/SubscriptionType"; - -export const CountCompaniesForAdvancedFilterParams: core.serialization.ObjectSchema< - serializers.CountCompaniesForAdvancedFilterParams.Raw, - Schematic.CountCompaniesForAdvancedFilterParams -> = core.serialization.object({ - creditTypeIds: core.serialization.property( - "credit_type_ids", - core.serialization.list(core.serialization.string()).optional(), - ), - displayProperties: core.serialization.property( - "display_properties", - core.serialization.list(core.serialization.string()).optional(), - ), - featureIds: core.serialization.property( - "feature_ids", - core.serialization.list(core.serialization.string()).optional(), - ), - ids: core.serialization.list(core.serialization.string()).optional(), - limit: core.serialization.number().optional(), - monetizedSubscriptions: core.serialization.property( - "monetized_subscriptions", - core.serialization.boolean().optional(), - ), - offset: core.serialization.number().optional(), - planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string()).optional()), - q: core.serialization.string().optional(), - sortOrderColumn: core.serialization.property("sort_order_column", core.serialization.string().optional()), - sortOrderDirection: core.serialization.property("sort_order_direction", SortDirection.optional()), - subscriptionStatuses: core.serialization.property( - "subscription_statuses", - core.serialization.list(SubscriptionStatus).optional(), - ), - subscriptionTypes: core.serialization.property( - "subscription_types", - core.serialization.list(SubscriptionType).optional(), - ), - withoutPlan: core.serialization.property("without_plan", core.serialization.boolean().optional()), - withoutSubscription: core.serialization.property("without_subscription", core.serialization.boolean().optional()), -}); - -export declare namespace CountCompaniesForAdvancedFilterParams { - export interface Raw { - credit_type_ids?: string[] | null; - display_properties?: string[] | null; - feature_ids?: string[] | null; - ids?: string[] | null; - limit?: number | null; - monetized_subscriptions?: boolean | null; - offset?: number | null; - plan_ids?: string[] | null; - q?: string | null; - sort_order_column?: string | null; - sort_order_direction?: SortDirection.Raw | null; - subscription_statuses?: SubscriptionStatus.Raw[] | null; - subscription_types?: SubscriptionType.Raw[] | null; - without_plan?: boolean | null; - without_subscription?: boolean | null; - } -} diff --git a/src/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.ts b/src/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.ts deleted file mode 100644 index 8cd8c9f7..00000000 --- a/src/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../../../api/index"; -import * as core from "../../../../core"; -import type * as serializers from "../../../index"; -import { CountResponse } from "../../../types/CountResponse"; -import { CountCompaniesForAdvancedFilterParams } from "./CountCompaniesForAdvancedFilterParams"; - -export const CountCompaniesForAdvancedFilterResponse: core.serialization.ObjectSchema< - serializers.CountCompaniesForAdvancedFilterResponse.Raw, - Schematic.CountCompaniesForAdvancedFilterResponse -> = core.serialization.object({ - data: CountResponse, - params: CountCompaniesForAdvancedFilterParams, -}); - -export declare namespace CountCompaniesForAdvancedFilterResponse { - export interface Raw { - data: CountResponse.Raw; - params: CountCompaniesForAdvancedFilterParams.Raw; - } -} diff --git a/src/serialization/resources/companies/types/CountCompaniesParams.ts b/src/serialization/resources/companies/types/CountCompaniesParams.ts index 3bd4656d..f4d942de 100644 --- a/src/serialization/resources/companies/types/CountCompaniesParams.ts +++ b/src/serialization/resources/companies/types/CountCompaniesParams.ts @@ -3,33 +3,68 @@ import type * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; import type * as serializers from "../../../index"; +import { SortDirection } from "../../../types/SortDirection"; +import { SubscriptionStatus } from "../../../types/SubscriptionStatus"; +import { SubscriptionType } from "../../../types/SubscriptionType"; export const CountCompaniesParams: core.serialization.ObjectSchema< serializers.CountCompaniesParams.Raw, Schematic.CountCompaniesParams > = core.serialization.object({ + creditTypeIds: core.serialization.property( + "credit_type_ids", + core.serialization.list(core.serialization.string()).optional(), + ), ids: core.serialization.list(core.serialization.string()).optional(), limit: core.serialization.number().optional(), + monetizedSubscriptions: core.serialization.property( + "monetized_subscriptions", + core.serialization.boolean().optional(), + ), offset: core.serialization.number().optional(), planId: core.serialization.property("plan_id", core.serialization.string().optional()), + planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string()).optional()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), q: core.serialization.string().optional(), + sortOrderColumn: core.serialization.property("sort_order_column", core.serialization.string().optional()), + sortOrderDirection: core.serialization.property("sort_order_direction", SortDirection.optional()), + subscriptionStatuses: core.serialization.property( + "subscription_statuses", + core.serialization.list(SubscriptionStatus).optional(), + ), + subscriptionTypes: core.serialization.property( + "subscription_types", + core.serialization.list(SubscriptionType).optional(), + ), + withEntitlementFor: core.serialization.property("with_entitlement_for", core.serialization.string().optional()), withSubscription: core.serialization.property("with_subscription", core.serialization.boolean().optional()), withoutFeatureOverrideFor: core.serialization.property( "without_feature_override_for", core.serialization.string().optional(), ), withoutPlan: core.serialization.property("without_plan", core.serialization.boolean().optional()), + withoutSubscription: core.serialization.property("without_subscription", core.serialization.boolean().optional()), }); export declare namespace CountCompaniesParams { export interface Raw { + credit_type_ids?: string[] | null; ids?: string[] | null; limit?: number | null; + monetized_subscriptions?: boolean | null; offset?: number | null; plan_id?: string | null; + plan_ids?: string[] | null; + plan_version_id?: string | null; q?: string | null; + sort_order_column?: string | null; + sort_order_direction?: SortDirection.Raw | null; + subscription_statuses?: SubscriptionStatus.Raw[] | null; + subscription_types?: SubscriptionType.Raw[] | null; + with_entitlement_for?: string | null; with_subscription?: boolean | null; without_feature_override_for?: string | null; without_plan?: boolean | null; + without_subscription?: boolean | null; } } diff --git a/src/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.ts b/src/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.ts deleted file mode 100644 index d52b79ff..00000000 --- a/src/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.ts +++ /dev/null @@ -1,67 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../../../api/index"; -import * as core from "../../../../core"; -import type * as serializers from "../../../index"; -import { SortDirection } from "../../../types/SortDirection"; -import { SubscriptionStatus } from "../../../types/SubscriptionStatus"; -import { SubscriptionType } from "../../../types/SubscriptionType"; - -export const ListCompaniesForAdvancedFilterParams: core.serialization.ObjectSchema< - serializers.ListCompaniesForAdvancedFilterParams.Raw, - Schematic.ListCompaniesForAdvancedFilterParams -> = core.serialization.object({ - creditTypeIds: core.serialization.property( - "credit_type_ids", - core.serialization.list(core.serialization.string()).optional(), - ), - displayProperties: core.serialization.property( - "display_properties", - core.serialization.list(core.serialization.string()).optional(), - ), - featureIds: core.serialization.property( - "feature_ids", - core.serialization.list(core.serialization.string()).optional(), - ), - ids: core.serialization.list(core.serialization.string()).optional(), - limit: core.serialization.number().optional(), - monetizedSubscriptions: core.serialization.property( - "monetized_subscriptions", - core.serialization.boolean().optional(), - ), - offset: core.serialization.number().optional(), - planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string()).optional()), - q: core.serialization.string().optional(), - sortOrderColumn: core.serialization.property("sort_order_column", core.serialization.string().optional()), - sortOrderDirection: core.serialization.property("sort_order_direction", SortDirection.optional()), - subscriptionStatuses: core.serialization.property( - "subscription_statuses", - core.serialization.list(SubscriptionStatus).optional(), - ), - subscriptionTypes: core.serialization.property( - "subscription_types", - core.serialization.list(SubscriptionType).optional(), - ), - withoutPlan: core.serialization.property("without_plan", core.serialization.boolean().optional()), - withoutSubscription: core.serialization.property("without_subscription", core.serialization.boolean().optional()), -}); - -export declare namespace ListCompaniesForAdvancedFilterParams { - export interface Raw { - credit_type_ids?: string[] | null; - display_properties?: string[] | null; - feature_ids?: string[] | null; - ids?: string[] | null; - limit?: number | null; - monetized_subscriptions?: boolean | null; - offset?: number | null; - plan_ids?: string[] | null; - q?: string | null; - sort_order_column?: string | null; - sort_order_direction?: SortDirection.Raw | null; - subscription_statuses?: SubscriptionStatus.Raw[] | null; - subscription_types?: SubscriptionType.Raw[] | null; - without_plan?: boolean | null; - without_subscription?: boolean | null; - } -} diff --git a/src/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.ts b/src/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.ts deleted file mode 100644 index faa2896b..00000000 --- a/src/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../../../api/index"; -import * as core from "../../../../core"; -import type * as serializers from "../../../index"; -import { CompanyViewWithFeatureUsageResponseData } from "../../../types/CompanyViewWithFeatureUsageResponseData"; -import { ListCompaniesForAdvancedFilterParams } from "./ListCompaniesForAdvancedFilterParams"; - -export const ListCompaniesForAdvancedFilterResponse: core.serialization.ObjectSchema< - serializers.ListCompaniesForAdvancedFilterResponse.Raw, - Schematic.ListCompaniesForAdvancedFilterResponse -> = core.serialization.object({ - data: core.serialization.list(CompanyViewWithFeatureUsageResponseData), - params: ListCompaniesForAdvancedFilterParams, -}); - -export declare namespace ListCompaniesForAdvancedFilterResponse { - export interface Raw { - data: CompanyViewWithFeatureUsageResponseData.Raw[]; - params: ListCompaniesForAdvancedFilterParams.Raw; - } -} diff --git a/src/serialization/resources/companies/types/ListCompaniesParams.ts b/src/serialization/resources/companies/types/ListCompaniesParams.ts index f4d5ef6b..3f5e8a11 100644 --- a/src/serialization/resources/companies/types/ListCompaniesParams.ts +++ b/src/serialization/resources/companies/types/ListCompaniesParams.ts @@ -3,33 +3,68 @@ import type * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; import type * as serializers from "../../../index"; +import { SortDirection } from "../../../types/SortDirection"; +import { SubscriptionStatus } from "../../../types/SubscriptionStatus"; +import { SubscriptionType } from "../../../types/SubscriptionType"; export const ListCompaniesParams: core.serialization.ObjectSchema< serializers.ListCompaniesParams.Raw, Schematic.ListCompaniesParams > = core.serialization.object({ + creditTypeIds: core.serialization.property( + "credit_type_ids", + core.serialization.list(core.serialization.string()).optional(), + ), ids: core.serialization.list(core.serialization.string()).optional(), limit: core.serialization.number().optional(), + monetizedSubscriptions: core.serialization.property( + "monetized_subscriptions", + core.serialization.boolean().optional(), + ), offset: core.serialization.number().optional(), planId: core.serialization.property("plan_id", core.serialization.string().optional()), + planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string()).optional()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), q: core.serialization.string().optional(), + sortOrderColumn: core.serialization.property("sort_order_column", core.serialization.string().optional()), + sortOrderDirection: core.serialization.property("sort_order_direction", SortDirection.optional()), + subscriptionStatuses: core.serialization.property( + "subscription_statuses", + core.serialization.list(SubscriptionStatus).optional(), + ), + subscriptionTypes: core.serialization.property( + "subscription_types", + core.serialization.list(SubscriptionType).optional(), + ), + withEntitlementFor: core.serialization.property("with_entitlement_for", core.serialization.string().optional()), withSubscription: core.serialization.property("with_subscription", core.serialization.boolean().optional()), withoutFeatureOverrideFor: core.serialization.property( "without_feature_override_for", core.serialization.string().optional(), ), withoutPlan: core.serialization.property("without_plan", core.serialization.boolean().optional()), + withoutSubscription: core.serialization.property("without_subscription", core.serialization.boolean().optional()), }); export declare namespace ListCompaniesParams { export interface Raw { + credit_type_ids?: string[] | null; ids?: string[] | null; limit?: number | null; + monetized_subscriptions?: boolean | null; offset?: number | null; plan_id?: string | null; + plan_ids?: string[] | null; + plan_version_id?: string | null; q?: string | null; + sort_order_column?: string | null; + sort_order_direction?: SortDirection.Raw | null; + subscription_statuses?: SubscriptionStatus.Raw[] | null; + subscription_types?: SubscriptionType.Raw[] | null; + with_entitlement_for?: string | null; with_subscription?: boolean | null; without_feature_override_for?: string | null; without_plan?: boolean | null; + without_subscription?: boolean | null; } } diff --git a/src/serialization/resources/companies/types/index.ts b/src/serialization/resources/companies/types/index.ts index 8a15e374..a69478e3 100644 --- a/src/serialization/resources/companies/types/index.ts +++ b/src/serialization/resources/companies/types/index.ts @@ -1,5 +1,3 @@ -export * from "./CountCompaniesForAdvancedFilterParams"; -export * from "./CountCompaniesForAdvancedFilterResponse"; export * from "./CountCompaniesParams"; export * from "./CountCompaniesResponse"; export * from "./CountEntityKeyDefinitionsParams"; @@ -31,8 +29,6 @@ export * from "./GetOrCreateEntityTraitDefinitionResponse"; export * from "./GetPlanChangeResponse"; export * from "./GetPlanTraitResponse"; export * from "./GetUserResponse"; -export * from "./ListCompaniesForAdvancedFilterParams"; -export * from "./ListCompaniesForAdvancedFilterResponse"; export * from "./ListCompaniesParams"; export * from "./ListCompaniesResponse"; export * from "./ListCompanyMembershipsParams"; diff --git a/src/serialization/resources/componentspublic/index.ts b/src/serialization/resources/componentspublic/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/serialization/resources/componentspublic/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/componentspublic/types/GetPublicPlansResponse.ts b/src/serialization/resources/componentspublic/types/GetPublicPlansResponse.ts new file mode 100644 index 00000000..f368c641 --- /dev/null +++ b/src/serialization/resources/componentspublic/types/GetPublicPlansResponse.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { PublicPlansResponseData } from "../../../types/PublicPlansResponseData"; + +export const GetPublicPlansResponse: core.serialization.ObjectSchema< + serializers.GetPublicPlansResponse.Raw, + Schematic.GetPublicPlansResponse +> = core.serialization.object({ + data: PublicPlansResponseData, + params: core.serialization.record(core.serialization.string(), core.serialization.unknown()), +}); + +export declare namespace GetPublicPlansResponse { + export interface Raw { + data: PublicPlansResponseData.Raw; + params: Record; + } +} diff --git a/src/serialization/resources/componentspublic/types/index.ts b/src/serialization/resources/componentspublic/types/index.ts new file mode 100644 index 00000000..9c1c69f6 --- /dev/null +++ b/src/serialization/resources/componentspublic/types/index.ts @@ -0,0 +1 @@ +export * from "./GetPublicPlansResponse"; diff --git a/src/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.ts b/src/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.ts index ea64063e..4c87ba20 100644 --- a/src/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.ts +++ b/src/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.ts @@ -14,6 +14,7 @@ export const CountBillingPlanCreditGrantsParams: core.serialization.ObjectSchema offset: core.serialization.number().optional(), planId: core.serialization.property("plan_id", core.serialization.string().optional()), planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string()).optional()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), }); export declare namespace CountBillingPlanCreditGrantsParams { @@ -24,5 +25,6 @@ export declare namespace CountBillingPlanCreditGrantsParams { offset?: number | null; plan_id?: string | null; plan_ids?: string[] | null; + plan_version_id?: string | null; } } diff --git a/src/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.ts b/src/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.ts index 56585085..2ecf0d3e 100644 --- a/src/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.ts +++ b/src/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.ts @@ -14,6 +14,7 @@ export const ListBillingPlanCreditGrantsParams: core.serialization.ObjectSchema< offset: core.serialization.number().optional(), planId: core.serialization.property("plan_id", core.serialization.string().optional()), planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string()).optional()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), }); export declare namespace ListBillingPlanCreditGrantsParams { @@ -24,5 +25,6 @@ export declare namespace ListBillingPlanCreditGrantsParams { offset?: number | null; plan_id?: string | null; plan_ids?: string[] | null; + plan_version_id?: string | null; } } diff --git a/src/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts b/src/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts index 1ee8f37b..802683ac 100644 --- a/src/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts +++ b/src/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.ts @@ -45,6 +45,7 @@ export const CreatePlanEntitlementRequestBody: core.serialization.Schema< core.serialization.string().optional(), ), planId: core.serialization.property("plan_id", core.serialization.string()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), priceBehavior: core.serialization.property("price_behavior", EntitlementPriceBehavior.optional()), priceTiers: core.serialization.property( "price_tiers", @@ -87,6 +88,7 @@ export declare namespace CreatePlanEntitlementRequestBody { monthly_unit_price_decimal?: string | null; overage_billing_product_id?: string | null; plan_id: string; + plan_version_id?: string | null; price_behavior?: EntitlementPriceBehavior.Raw | null; price_tiers?: CreatePriceTierRequestBody.Raw[] | null; soft_limit?: number | null; diff --git a/src/serialization/resources/entitlements/types/CountPlanEntitlementsParams.ts b/src/serialization/resources/entitlements/types/CountPlanEntitlementsParams.ts index 5d648b32..962c9e18 100644 --- a/src/serialization/resources/entitlements/types/CountPlanEntitlementsParams.ts +++ b/src/serialization/resources/entitlements/types/CountPlanEntitlementsParams.ts @@ -18,6 +18,11 @@ export const CountPlanEntitlementsParams: core.serialization.ObjectSchema< offset: core.serialization.number().optional(), planId: core.serialization.property("plan_id", core.serialization.string().optional()), planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string()).optional()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + planVersionIds: core.serialization.property( + "plan_version_ids", + core.serialization.list(core.serialization.string()).optional(), + ), q: core.serialization.string().optional(), withMeteredProducts: core.serialization.property("with_metered_products", core.serialization.boolean().optional()), }); @@ -31,6 +36,8 @@ export declare namespace CountPlanEntitlementsParams { offset?: number | null; plan_id?: string | null; plan_ids?: string[] | null; + plan_version_id?: string | null; + plan_version_ids?: string[] | null; q?: string | null; with_metered_products?: boolean | null; } diff --git a/src/serialization/resources/entitlements/types/GetFeatureUsageTimeSeriesParams.ts b/src/serialization/resources/entitlements/types/GetFeatureUsageTimeSeriesParams.ts new file mode 100644 index 00000000..df96d88c --- /dev/null +++ b/src/serialization/resources/entitlements/types/GetFeatureUsageTimeSeriesParams.ts @@ -0,0 +1,27 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { TimeSeriesGranularity } from "../../../types/TimeSeriesGranularity"; + +export const GetFeatureUsageTimeSeriesParams: core.serialization.ObjectSchema< + serializers.GetFeatureUsageTimeSeriesParams.Raw, + Schematic.GetFeatureUsageTimeSeriesParams +> = core.serialization.object({ + companyId: core.serialization.property("company_id", core.serialization.string().optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), + featureId: core.serialization.property("feature_id", core.serialization.string().optional()), + granularity: TimeSeriesGranularity.optional(), + startTime: core.serialization.property("start_time", core.serialization.date().optional()), +}); + +export declare namespace GetFeatureUsageTimeSeriesParams { + export interface Raw { + company_id?: string | null; + end_time?: string | null; + feature_id?: string | null; + granularity?: TimeSeriesGranularity.Raw | null; + start_time?: string | null; + } +} diff --git a/src/serialization/resources/entitlements/types/GetFeatureUsageTimeSeriesResponse.ts b/src/serialization/resources/entitlements/types/GetFeatureUsageTimeSeriesResponse.ts new file mode 100644 index 00000000..75e2fca8 --- /dev/null +++ b/src/serialization/resources/entitlements/types/GetFeatureUsageTimeSeriesResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { FeatureUsageTimeSeriesResponseData } from "../../../types/FeatureUsageTimeSeriesResponseData"; +import { GetFeatureUsageTimeSeriesParams } from "./GetFeatureUsageTimeSeriesParams"; + +export const GetFeatureUsageTimeSeriesResponse: core.serialization.ObjectSchema< + serializers.GetFeatureUsageTimeSeriesResponse.Raw, + Schematic.GetFeatureUsageTimeSeriesResponse +> = core.serialization.object({ + data: FeatureUsageTimeSeriesResponseData, + params: GetFeatureUsageTimeSeriesParams, +}); + +export declare namespace GetFeatureUsageTimeSeriesResponse { + export interface Raw { + data: FeatureUsageTimeSeriesResponseData.Raw; + params: GetFeatureUsageTimeSeriesParams.Raw; + } +} diff --git a/src/serialization/resources/entitlements/types/ListPlanEntitlementsParams.ts b/src/serialization/resources/entitlements/types/ListPlanEntitlementsParams.ts index 629e8d70..cd9dc88e 100644 --- a/src/serialization/resources/entitlements/types/ListPlanEntitlementsParams.ts +++ b/src/serialization/resources/entitlements/types/ListPlanEntitlementsParams.ts @@ -18,6 +18,11 @@ export const ListPlanEntitlementsParams: core.serialization.ObjectSchema< offset: core.serialization.number().optional(), planId: core.serialization.property("plan_id", core.serialization.string().optional()), planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string()).optional()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + planVersionIds: core.serialization.property( + "plan_version_ids", + core.serialization.list(core.serialization.string()).optional(), + ), q: core.serialization.string().optional(), withMeteredProducts: core.serialization.property("with_metered_products", core.serialization.boolean().optional()), }); @@ -31,6 +36,8 @@ export declare namespace ListPlanEntitlementsParams { offset?: number | null; plan_id?: string | null; plan_ids?: string[] | null; + plan_version_id?: string | null; + plan_version_ids?: string[] | null; q?: string | null; with_metered_products?: boolean | null; } diff --git a/src/serialization/resources/entitlements/types/index.ts b/src/serialization/resources/entitlements/types/index.ts index 25591fb0..a20473bc 100644 --- a/src/serialization/resources/entitlements/types/index.ts +++ b/src/serialization/resources/entitlements/types/index.ts @@ -20,6 +20,8 @@ export * from "./DuplicatePlanEntitlementsResponse"; export * from "./GetCompanyOverrideResponse"; export * from "./GetFeatureUsageByCompanyParams"; export * from "./GetFeatureUsageByCompanyResponse"; +export * from "./GetFeatureUsageTimeSeriesParams"; +export * from "./GetFeatureUsageTimeSeriesResponse"; export * from "./GetPlanEntitlementResponse"; export * from "./ListCompanyOverridesParams"; export * from "./ListCompanyOverridesResponse"; diff --git a/src/serialization/resources/features/types/CountFeaturesParams.ts b/src/serialization/resources/features/types/CountFeaturesParams.ts index e2dae75e..06a5563b 100644 --- a/src/serialization/resources/features/types/CountFeaturesParams.ts +++ b/src/serialization/resources/features/types/CountFeaturesParams.ts @@ -14,6 +14,7 @@ export const CountFeaturesParams: core.serialization.ObjectSchema< ids: core.serialization.list(core.serialization.string()).optional(), limit: core.serialization.number().optional(), offset: core.serialization.number().optional(), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), q: core.serialization.string().optional(), withoutCompanyOverrideFor: core.serialization.property( "without_company_override_for", @@ -32,6 +33,7 @@ export declare namespace CountFeaturesParams { ids?: string[] | null; limit?: number | null; offset?: number | null; + plan_version_id?: string | null; q?: string | null; without_company_override_for?: string | null; without_plan_entitlement_for?: string | null; diff --git a/src/serialization/resources/features/types/ListFeaturesParams.ts b/src/serialization/resources/features/types/ListFeaturesParams.ts index a712f385..96ff3cb7 100644 --- a/src/serialization/resources/features/types/ListFeaturesParams.ts +++ b/src/serialization/resources/features/types/ListFeaturesParams.ts @@ -14,6 +14,7 @@ export const ListFeaturesParams: core.serialization.ObjectSchema< ids: core.serialization.list(core.serialization.string()).optional(), limit: core.serialization.number().optional(), offset: core.serialization.number().optional(), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), q: core.serialization.string().optional(), withoutCompanyOverrideFor: core.serialization.property( "without_company_override_for", @@ -32,6 +33,7 @@ export declare namespace ListFeaturesParams { ids?: string[] | null; limit?: number | null; offset?: number | null; + plan_version_id?: string | null; q?: string | null; without_company_override_for?: string | null; without_plan_entitlement_for?: string | null; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index 5564974c..c8a6387a 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -16,6 +16,8 @@ export * from "./companies/types"; export * as components from "./components"; export * from "./components/client/requests"; export * from "./components/types"; +export * as componentspublic from "./componentspublic"; +export * from "./componentspublic/types"; export * as credits from "./credits"; export * from "./credits/client/requests"; export * from "./credits/types"; @@ -37,9 +39,14 @@ export * from "./planbundle/types"; export * as plangroups from "./plangroups"; export * from "./plangroups/client/requests"; export * from "./plangroups/types"; +export * as planmigrations from "./planmigrations"; +export * from "./planmigrations/types"; export * as plans from "./plans"; export * from "./plans/client/requests"; export * from "./plans/types"; +export * as scheduledcheckout from "./scheduledcheckout"; +export * from "./scheduledcheckout/client/requests"; +export * from "./scheduledcheckout/types"; export * as webhooks from "./webhooks"; export * from "./webhooks/client/requests"; export * from "./webhooks/types"; diff --git a/src/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts b/src/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts index 5cf4c312..10cc6550 100644 --- a/src/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts +++ b/src/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.ts @@ -20,6 +20,7 @@ export const UpdatePlanBundleRequestBody: core.serialization.Schema< ), entitlements: core.serialization.list(PlanBundleEntitlementRequestBody), plan: UpdatePlanRequestBody.optional(), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), traits: core.serialization.list(UpdatePlanTraitTraitRequestBody).optional(), }); @@ -29,6 +30,7 @@ export declare namespace UpdatePlanBundleRequestBody { credit_grants?: PlanBundleCreditGrantRequestBody.Raw[] | null; entitlements: PlanBundleEntitlementRequestBody.Raw[]; plan?: UpdatePlanRequestBody.Raw | null; + plan_version_id?: string | null; traits?: UpdatePlanTraitTraitRequestBody.Raw[] | null; } } diff --git a/src/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.ts b/src/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.ts index dbab7207..4e9c07a3 100644 --- a/src/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.ts +++ b/src/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.ts @@ -8,6 +8,7 @@ import { CustomPlanConfig } from "../../../../types/CustomPlanConfig"; import { OrderedPlansInGroup } from "../../../../types/OrderedPlansInGroup"; import { PlanGroupBundleOrder } from "../../../../types/PlanGroupBundleOrder"; import { ProrationBehavior } from "../../../../types/ProrationBehavior"; +import { ScheduledDowngradeConfigBehavior } from "../../../../types/ScheduledDowngradeConfigBehavior"; export const CreatePlanGroupRequestBody: core.serialization.Schema< serializers.CreatePlanGroupRequestBody.Raw, @@ -50,8 +51,17 @@ export const CreatePlanGroupRequestBody: core.serialization.Schema< core.serialization.string().optional(), ), prorationBehavior: core.serialization.property("proration_behavior", ProrationBehavior), + scheduledDowngradeBehavior: core.serialization.property( + "scheduled_downgrade_behavior", + ScheduledDowngradeConfigBehavior.optional(), + ), + scheduledDowngradePreventWhenOverLimit: core.serialization.property( + "scheduled_downgrade_prevent_when_over_limit", + core.serialization.boolean().optional(), + ), showAsMonthlyPrices: core.serialization.property("show_as_monthly_prices", core.serialization.boolean()), showCredits: core.serialization.property("show_credits", core.serialization.boolean()), + showFeatureDescription: core.serialization.property("show_feature_description", core.serialization.boolean()), showPeriodToggle: core.serialization.property("show_period_toggle", core.serialization.boolean()), showZeroPriceAsFree: core.serialization.property("show_zero_price_as_free", core.serialization.boolean()), syncCustomerBillingDetails: core.serialization.property( @@ -91,8 +101,11 @@ export declare namespace CreatePlanGroupRequestBody { prevent_self_service_downgrade_button_text?: string | null; prevent_self_service_downgrade_url?: string | null; proration_behavior: ProrationBehavior.Raw; + scheduled_downgrade_behavior?: ScheduledDowngradeConfigBehavior.Raw | null; + scheduled_downgrade_prevent_when_over_limit?: boolean | null; show_as_monthly_prices: boolean; show_credits: boolean; + show_feature_description: boolean; show_period_toggle: boolean; show_zero_price_as_free: boolean; sync_customer_billing_details: boolean; diff --git a/src/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.ts b/src/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.ts index fef133ad..a9eade78 100644 --- a/src/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.ts +++ b/src/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.ts @@ -8,6 +8,7 @@ import { CustomPlanConfig } from "../../../../types/CustomPlanConfig"; import { OrderedPlansInGroup } from "../../../../types/OrderedPlansInGroup"; import { PlanGroupBundleOrder } from "../../../../types/PlanGroupBundleOrder"; import { ProrationBehavior } from "../../../../types/ProrationBehavior"; +import { ScheduledDowngradeConfigBehavior } from "../../../../types/ScheduledDowngradeConfigBehavior"; export const UpdatePlanGroupRequestBody: core.serialization.Schema< serializers.UpdatePlanGroupRequestBody.Raw, @@ -50,8 +51,17 @@ export const UpdatePlanGroupRequestBody: core.serialization.Schema< core.serialization.string().optional(), ), prorationBehavior: core.serialization.property("proration_behavior", ProrationBehavior), + scheduledDowngradeBehavior: core.serialization.property( + "scheduled_downgrade_behavior", + ScheduledDowngradeConfigBehavior.optional(), + ), + scheduledDowngradePreventWhenOverLimit: core.serialization.property( + "scheduled_downgrade_prevent_when_over_limit", + core.serialization.boolean().optional(), + ), showAsMonthlyPrices: core.serialization.property("show_as_monthly_prices", core.serialization.boolean()), showCredits: core.serialization.property("show_credits", core.serialization.boolean()), + showFeatureDescription: core.serialization.property("show_feature_description", core.serialization.boolean()), showPeriodToggle: core.serialization.property("show_period_toggle", core.serialization.boolean()), showZeroPriceAsFree: core.serialization.property("show_zero_price_as_free", core.serialization.boolean()), syncCustomerBillingDetails: core.serialization.property( @@ -91,8 +101,11 @@ export declare namespace UpdatePlanGroupRequestBody { prevent_self_service_downgrade_button_text?: string | null; prevent_self_service_downgrade_url?: string | null; proration_behavior: ProrationBehavior.Raw; + scheduled_downgrade_behavior?: ScheduledDowngradeConfigBehavior.Raw | null; + scheduled_downgrade_prevent_when_over_limit?: boolean | null; show_as_monthly_prices: boolean; show_credits: boolean; + show_feature_description: boolean; show_period_toggle: boolean; show_zero_price_as_free: boolean; sync_customer_billing_details: boolean; diff --git a/src/serialization/resources/planmigrations/index.ts b/src/serialization/resources/planmigrations/index.ts new file mode 100644 index 00000000..eea524d6 --- /dev/null +++ b/src/serialization/resources/planmigrations/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/planmigrations/types/CountCompanyMigrationsParams.ts b/src/serialization/resources/planmigrations/types/CountCompanyMigrationsParams.ts new file mode 100644 index 00000000..ef669df6 --- /dev/null +++ b/src/serialization/resources/planmigrations/types/CountCompanyMigrationsParams.ts @@ -0,0 +1,27 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { PlanVersionCompanyMigrationStatus } from "../../../types/PlanVersionCompanyMigrationStatus"; + +export const CountCompanyMigrationsParams: core.serialization.ObjectSchema< + serializers.CountCompanyMigrationsParams.Raw, + Schematic.CountCompanyMigrationsParams +> = core.serialization.object({ + limit: core.serialization.number().optional(), + migrationId: core.serialization.property("migration_id", core.serialization.string().optional()), + offset: core.serialization.number().optional(), + q: core.serialization.string().optional(), + status: PlanVersionCompanyMigrationStatus.optional(), +}); + +export declare namespace CountCompanyMigrationsParams { + export interface Raw { + limit?: number | null; + migration_id?: string | null; + offset?: number | null; + q?: string | null; + status?: PlanVersionCompanyMigrationStatus.Raw | null; + } +} diff --git a/src/serialization/resources/planmigrations/types/CountCompanyMigrationsResponse.ts b/src/serialization/resources/planmigrations/types/CountCompanyMigrationsResponse.ts new file mode 100644 index 00000000..93a2ec02 --- /dev/null +++ b/src/serialization/resources/planmigrations/types/CountCompanyMigrationsResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { CountResponse } from "../../../types/CountResponse"; +import { CountCompanyMigrationsParams } from "./CountCompanyMigrationsParams"; + +export const CountCompanyMigrationsResponse: core.serialization.ObjectSchema< + serializers.CountCompanyMigrationsResponse.Raw, + Schematic.CountCompanyMigrationsResponse +> = core.serialization.object({ + data: CountResponse, + params: CountCompanyMigrationsParams, +}); + +export declare namespace CountCompanyMigrationsResponse { + export interface Raw { + data: CountResponse.Raw; + params: CountCompanyMigrationsParams.Raw; + } +} diff --git a/src/serialization/resources/planmigrations/types/CountMigrationsParams.ts b/src/serialization/resources/planmigrations/types/CountMigrationsParams.ts new file mode 100644 index 00000000..3251ac23 --- /dev/null +++ b/src/serialization/resources/planmigrations/types/CountMigrationsParams.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { PlanVersionMigrationStatus } from "../../../types/PlanVersionMigrationStatus"; + +export const CountMigrationsParams: core.serialization.ObjectSchema< + serializers.CountMigrationsParams.Raw, + Schematic.CountMigrationsParams +> = core.serialization.object({ + limit: core.serialization.number().optional(), + offset: core.serialization.number().optional(), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + status: PlanVersionMigrationStatus.optional(), +}); + +export declare namespace CountMigrationsParams { + export interface Raw { + limit?: number | null; + offset?: number | null; + plan_version_id?: string | null; + status?: PlanVersionMigrationStatus.Raw | null; + } +} diff --git a/src/serialization/resources/planmigrations/types/CountMigrationsResponse.ts b/src/serialization/resources/planmigrations/types/CountMigrationsResponse.ts new file mode 100644 index 00000000..13e43f9b --- /dev/null +++ b/src/serialization/resources/planmigrations/types/CountMigrationsResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { CountResponse } from "../../../types/CountResponse"; +import { CountMigrationsParams } from "./CountMigrationsParams"; + +export const CountMigrationsResponse: core.serialization.ObjectSchema< + serializers.CountMigrationsResponse.Raw, + Schematic.CountMigrationsResponse +> = core.serialization.object({ + data: CountResponse, + params: CountMigrationsParams, +}); + +export declare namespace CountMigrationsResponse { + export interface Raw { + data: CountResponse.Raw; + params: CountMigrationsParams.Raw; + } +} diff --git a/src/serialization/resources/planmigrations/types/GetMigrationResponse.ts b/src/serialization/resources/planmigrations/types/GetMigrationResponse.ts new file mode 100644 index 00000000..12809bfe --- /dev/null +++ b/src/serialization/resources/planmigrations/types/GetMigrationResponse.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { PlanVersionMigrationResponseData } from "../../../types/PlanVersionMigrationResponseData"; + +export const GetMigrationResponse: core.serialization.ObjectSchema< + serializers.GetMigrationResponse.Raw, + Schematic.GetMigrationResponse +> = core.serialization.object({ + data: PlanVersionMigrationResponseData, + params: core.serialization.record(core.serialization.string(), core.serialization.unknown()), +}); + +export declare namespace GetMigrationResponse { + export interface Raw { + data: PlanVersionMigrationResponseData.Raw; + params: Record; + } +} diff --git a/src/serialization/resources/planmigrations/types/ListCompanyMigrationsParams.ts b/src/serialization/resources/planmigrations/types/ListCompanyMigrationsParams.ts new file mode 100644 index 00000000..05007ed8 --- /dev/null +++ b/src/serialization/resources/planmigrations/types/ListCompanyMigrationsParams.ts @@ -0,0 +1,27 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { PlanVersionCompanyMigrationStatus } from "../../../types/PlanVersionCompanyMigrationStatus"; + +export const ListCompanyMigrationsParams: core.serialization.ObjectSchema< + serializers.ListCompanyMigrationsParams.Raw, + Schematic.ListCompanyMigrationsParams +> = core.serialization.object({ + limit: core.serialization.number().optional(), + migrationId: core.serialization.property("migration_id", core.serialization.string().optional()), + offset: core.serialization.number().optional(), + q: core.serialization.string().optional(), + status: PlanVersionCompanyMigrationStatus.optional(), +}); + +export declare namespace ListCompanyMigrationsParams { + export interface Raw { + limit?: number | null; + migration_id?: string | null; + offset?: number | null; + q?: string | null; + status?: PlanVersionCompanyMigrationStatus.Raw | null; + } +} diff --git a/src/serialization/resources/planmigrations/types/ListCompanyMigrationsResponse.ts b/src/serialization/resources/planmigrations/types/ListCompanyMigrationsResponse.ts new file mode 100644 index 00000000..03b023a4 --- /dev/null +++ b/src/serialization/resources/planmigrations/types/ListCompanyMigrationsResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { PlanVersionCompanyMigrationResponseData } from "../../../types/PlanVersionCompanyMigrationResponseData"; +import { ListCompanyMigrationsParams } from "./ListCompanyMigrationsParams"; + +export const ListCompanyMigrationsResponse: core.serialization.ObjectSchema< + serializers.ListCompanyMigrationsResponse.Raw, + Schematic.ListCompanyMigrationsResponse +> = core.serialization.object({ + data: core.serialization.list(PlanVersionCompanyMigrationResponseData), + params: ListCompanyMigrationsParams, +}); + +export declare namespace ListCompanyMigrationsResponse { + export interface Raw { + data: PlanVersionCompanyMigrationResponseData.Raw[]; + params: ListCompanyMigrationsParams.Raw; + } +} diff --git a/src/serialization/resources/planmigrations/types/ListMigrationsParams.ts b/src/serialization/resources/planmigrations/types/ListMigrationsParams.ts new file mode 100644 index 00000000..3e70de42 --- /dev/null +++ b/src/serialization/resources/planmigrations/types/ListMigrationsParams.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { PlanVersionMigrationStatus } from "../../../types/PlanVersionMigrationStatus"; + +export const ListMigrationsParams: core.serialization.ObjectSchema< + serializers.ListMigrationsParams.Raw, + Schematic.ListMigrationsParams +> = core.serialization.object({ + limit: core.serialization.number().optional(), + offset: core.serialization.number().optional(), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + status: PlanVersionMigrationStatus.optional(), +}); + +export declare namespace ListMigrationsParams { + export interface Raw { + limit?: number | null; + offset?: number | null; + plan_version_id?: string | null; + status?: PlanVersionMigrationStatus.Raw | null; + } +} diff --git a/src/serialization/resources/planmigrations/types/ListMigrationsResponse.ts b/src/serialization/resources/planmigrations/types/ListMigrationsResponse.ts new file mode 100644 index 00000000..e1288864 --- /dev/null +++ b/src/serialization/resources/planmigrations/types/ListMigrationsResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { PlanVersionMigrationResponseData } from "../../../types/PlanVersionMigrationResponseData"; +import { ListMigrationsParams } from "./ListMigrationsParams"; + +export const ListMigrationsResponse: core.serialization.ObjectSchema< + serializers.ListMigrationsResponse.Raw, + Schematic.ListMigrationsResponse +> = core.serialization.object({ + data: core.serialization.list(PlanVersionMigrationResponseData), + params: ListMigrationsParams, +}); + +export declare namespace ListMigrationsResponse { + export interface Raw { + data: PlanVersionMigrationResponseData.Raw[]; + params: ListMigrationsParams.Raw; + } +} diff --git a/src/serialization/resources/planmigrations/types/index.ts b/src/serialization/resources/planmigrations/types/index.ts new file mode 100644 index 00000000..b96f2a01 --- /dev/null +++ b/src/serialization/resources/planmigrations/types/index.ts @@ -0,0 +1,9 @@ +export * from "./CountCompanyMigrationsParams"; +export * from "./CountCompanyMigrationsResponse"; +export * from "./CountMigrationsParams"; +export * from "./CountMigrationsResponse"; +export * from "./GetMigrationResponse"; +export * from "./ListCompanyMigrationsParams"; +export * from "./ListCompanyMigrationsResponse"; +export * from "./ListMigrationsParams"; +export * from "./ListMigrationsResponse"; diff --git a/src/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.ts b/src/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.ts new file mode 100644 index 00000000..d838b435 --- /dev/null +++ b/src/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { PlanVersionMigrationStrategy } from "../../../../types/PlanVersionMigrationStrategy"; + +export const PublishPlanVersionRequestBody: core.serialization.Schema< + serializers.PublishPlanVersionRequestBody.Raw, + Schematic.PublishPlanVersionRequestBody +> = core.serialization.object({ + excludedCompanyIds: core.serialization.property( + "excluded_company_ids", + core.serialization.list(core.serialization.string()), + ), + migrationStrategy: core.serialization.property("migration_strategy", PlanVersionMigrationStrategy), +}); + +export declare namespace PublishPlanVersionRequestBody { + export interface Raw { + excluded_company_ids: string[]; + migration_strategy: PlanVersionMigrationStrategy.Raw; + } +} diff --git a/src/serialization/resources/plans/client/requests/index.ts b/src/serialization/resources/plans/client/requests/index.ts index 18a85614..b7b5b1ff 100644 --- a/src/serialization/resources/plans/client/requests/index.ts +++ b/src/serialization/resources/plans/client/requests/index.ts @@ -1 +1,2 @@ +export { PublishPlanVersionRequestBody } from "./PublishPlanVersionRequestBody"; export { UpdateCompanyPlansRequestBody } from "./UpdateCompanyPlansRequestBody"; diff --git a/src/serialization/resources/plans/types/DeletePlanVersionResponse.ts b/src/serialization/resources/plans/types/DeletePlanVersionResponse.ts new file mode 100644 index 00000000..8a4b6aa2 --- /dev/null +++ b/src/serialization/resources/plans/types/DeletePlanVersionResponse.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { DeleteResponse } from "../../../types/DeleteResponse"; + +export const DeletePlanVersionResponse: core.serialization.ObjectSchema< + serializers.DeletePlanVersionResponse.Raw, + Schematic.DeletePlanVersionResponse +> = core.serialization.object({ + data: DeleteResponse, + params: core.serialization.record(core.serialization.string(), core.serialization.unknown()), +}); + +export declare namespace DeletePlanVersionResponse { + export interface Raw { + data: DeleteResponse.Raw; + params: Record; + } +} diff --git a/src/serialization/resources/plans/types/GetPlanParams.ts b/src/serialization/resources/plans/types/GetPlanParams.ts new file mode 100644 index 00000000..c1d902e7 --- /dev/null +++ b/src/serialization/resources/plans/types/GetPlanParams.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; + +export const GetPlanParams: core.serialization.ObjectSchema = + core.serialization.object({ + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + }); + +export declare namespace GetPlanParams { + export interface Raw { + plan_version_id?: string | null; + } +} diff --git a/src/serialization/resources/plans/types/GetPlanResponse.ts b/src/serialization/resources/plans/types/GetPlanResponse.ts index bd6095b3..bf8207ab 100644 --- a/src/serialization/resources/plans/types/GetPlanResponse.ts +++ b/src/serialization/resources/plans/types/GetPlanResponse.ts @@ -4,18 +4,19 @@ import type * as Schematic from "../../../../api/index"; import * as core from "../../../../core"; import type * as serializers from "../../../index"; import { PlanDetailResponseData } from "../../../types/PlanDetailResponseData"; +import { GetPlanParams } from "./GetPlanParams"; export const GetPlanResponse: core.serialization.ObjectSchema< serializers.GetPlanResponse.Raw, Schematic.GetPlanResponse > = core.serialization.object({ data: PlanDetailResponseData, - params: core.serialization.record(core.serialization.string(), core.serialization.unknown()), + params: GetPlanParams, }); export declare namespace GetPlanResponse { export interface Raw { data: PlanDetailResponseData.Raw; - params: Record; + params: GetPlanParams.Raw; } } diff --git a/src/serialization/resources/plans/types/ListPlanIssuesParams.ts b/src/serialization/resources/plans/types/ListPlanIssuesParams.ts index 52980fff..8cce130b 100644 --- a/src/serialization/resources/plans/types/ListPlanIssuesParams.ts +++ b/src/serialization/resources/plans/types/ListPlanIssuesParams.ts @@ -9,10 +9,12 @@ export const ListPlanIssuesParams: core.serialization.ObjectSchema< Schematic.ListPlanIssuesParams > = core.serialization.object({ planId: core.serialization.property("plan_id", core.serialization.string().optional()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), }); export declare namespace ListPlanIssuesParams { export interface Raw { plan_id?: string | null; + plan_version_id?: string | null; } } diff --git a/src/serialization/resources/plans/types/PublishPlanVersionResponse.ts b/src/serialization/resources/plans/types/PublishPlanVersionResponse.ts new file mode 100644 index 00000000..08f0a06f --- /dev/null +++ b/src/serialization/resources/plans/types/PublishPlanVersionResponse.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { PlanVersionResponseData } from "../../../types/PlanVersionResponseData"; + +export const PublishPlanVersionResponse: core.serialization.ObjectSchema< + serializers.PublishPlanVersionResponse.Raw, + Schematic.PublishPlanVersionResponse +> = core.serialization.object({ + data: PlanVersionResponseData, + params: core.serialization.record(core.serialization.string(), core.serialization.unknown()), +}); + +export declare namespace PublishPlanVersionResponse { + export interface Raw { + data: PlanVersionResponseData.Raw; + params: Record; + } +} diff --git a/src/serialization/resources/plans/types/index.ts b/src/serialization/resources/plans/types/index.ts index 7f34f3cb..9e59e93a 100644 --- a/src/serialization/resources/plans/types/index.ts +++ b/src/serialization/resources/plans/types/index.ts @@ -2,11 +2,14 @@ export * from "./CountPlansParams"; export * from "./CountPlansResponse"; export * from "./CreatePlanResponse"; export * from "./DeletePlanResponse"; +export * from "./DeletePlanVersionResponse"; +export * from "./GetPlanParams"; export * from "./GetPlanResponse"; export * from "./ListPlanIssuesParams"; export * from "./ListPlanIssuesResponse"; export * from "./ListPlansParams"; export * from "./ListPlansResponse"; +export * from "./PublishPlanVersionResponse"; export * from "./UpdateCompanyPlansResponse"; export * from "./UpdatePlanResponse"; export * from "./UpsertBillingProductPlanResponse"; diff --git a/src/serialization/resources/scheduledcheckout/client/index.ts b/src/serialization/resources/scheduledcheckout/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/scheduledcheckout/client/requests/CreateScheduledCheckoutRequest.ts b/src/serialization/resources/scheduledcheckout/client/requests/CreateScheduledCheckoutRequest.ts new file mode 100644 index 00000000..94ba31cc --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/client/requests/CreateScheduledCheckoutRequest.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; + +export const CreateScheduledCheckoutRequest: core.serialization.Schema< + serializers.CreateScheduledCheckoutRequest.Raw, + Schematic.CreateScheduledCheckoutRequest +> = core.serialization.object({ + companyId: core.serialization.property("company_id", core.serialization.string()), + executeAfter: core.serialization.property("execute_after", core.serialization.date()), + fromPlanId: core.serialization.property("from_plan_id", core.serialization.string()), + toPlanId: core.serialization.property("to_plan_id", core.serialization.string()), +}); + +export declare namespace CreateScheduledCheckoutRequest { + export interface Raw { + company_id: string; + execute_after: string; + from_plan_id: string; + to_plan_id: string; + } +} diff --git a/src/serialization/resources/scheduledcheckout/client/requests/UpdateScheduledCheckoutRequest.ts b/src/serialization/resources/scheduledcheckout/client/requests/UpdateScheduledCheckoutRequest.ts new file mode 100644 index 00000000..d7350b53 --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/client/requests/UpdateScheduledCheckoutRequest.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { ScheduledCheckoutStatus } from "../../../../types/ScheduledCheckoutStatus"; + +export const UpdateScheduledCheckoutRequest: core.serialization.Schema< + serializers.UpdateScheduledCheckoutRequest.Raw, + Schematic.UpdateScheduledCheckoutRequest +> = core.serialization.object({ + executeAfter: core.serialization.property("execute_after", core.serialization.date().optional()), + status: ScheduledCheckoutStatus.optional(), +}); + +export declare namespace UpdateScheduledCheckoutRequest { + export interface Raw { + execute_after?: string | null; + status?: ScheduledCheckoutStatus.Raw | null; + } +} diff --git a/src/serialization/resources/scheduledcheckout/client/requests/index.ts b/src/serialization/resources/scheduledcheckout/client/requests/index.ts new file mode 100644 index 00000000..8d2c731b --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/client/requests/index.ts @@ -0,0 +1,2 @@ +export { CreateScheduledCheckoutRequest } from "./CreateScheduledCheckoutRequest"; +export { UpdateScheduledCheckoutRequest } from "./UpdateScheduledCheckoutRequest"; diff --git a/src/serialization/resources/scheduledcheckout/index.ts b/src/serialization/resources/scheduledcheckout/index.ts new file mode 100644 index 00000000..d2ec2302 --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/index.ts @@ -0,0 +1,2 @@ +export * from "./client"; +export * from "./types"; diff --git a/src/serialization/resources/scheduledcheckout/types/CreateScheduledCheckoutResponse.ts b/src/serialization/resources/scheduledcheckout/types/CreateScheduledCheckoutResponse.ts new file mode 100644 index 00000000..b23b825a --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/types/CreateScheduledCheckoutResponse.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { ScheduledCheckoutResponseData } from "../../../types/ScheduledCheckoutResponseData"; + +export const CreateScheduledCheckoutResponse: core.serialization.ObjectSchema< + serializers.CreateScheduledCheckoutResponse.Raw, + Schematic.CreateScheduledCheckoutResponse +> = core.serialization.object({ + data: ScheduledCheckoutResponseData, + params: core.serialization.record(core.serialization.string(), core.serialization.unknown()), +}); + +export declare namespace CreateScheduledCheckoutResponse { + export interface Raw { + data: ScheduledCheckoutResponseData.Raw; + params: Record; + } +} diff --git a/src/serialization/resources/scheduledcheckout/types/GetScheduledCheckoutResponse.ts b/src/serialization/resources/scheduledcheckout/types/GetScheduledCheckoutResponse.ts new file mode 100644 index 00000000..1dc79a4e --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/types/GetScheduledCheckoutResponse.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { ScheduledCheckoutResponseData } from "../../../types/ScheduledCheckoutResponseData"; + +export const GetScheduledCheckoutResponse: core.serialization.ObjectSchema< + serializers.GetScheduledCheckoutResponse.Raw, + Schematic.GetScheduledCheckoutResponse +> = core.serialization.object({ + data: ScheduledCheckoutResponseData, + params: core.serialization.record(core.serialization.string(), core.serialization.unknown()), +}); + +export declare namespace GetScheduledCheckoutResponse { + export interface Raw { + data: ScheduledCheckoutResponseData.Raw; + params: Record; + } +} diff --git a/src/serialization/resources/scheduledcheckout/types/ListScheduledCheckoutsParams.ts b/src/serialization/resources/scheduledcheckout/types/ListScheduledCheckoutsParams.ts new file mode 100644 index 00000000..77c94062 --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/types/ListScheduledCheckoutsParams.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { ScheduledCheckoutStatus } from "../../../types/ScheduledCheckoutStatus"; + +export const ListScheduledCheckoutsParams: core.serialization.ObjectSchema< + serializers.ListScheduledCheckoutsParams.Raw, + Schematic.ListScheduledCheckoutsParams +> = core.serialization.object({ + companyId: core.serialization.property("company_id", core.serialization.string().optional()), + limit: core.serialization.number().optional(), + offset: core.serialization.number().optional(), + status: ScheduledCheckoutStatus.optional(), +}); + +export declare namespace ListScheduledCheckoutsParams { + export interface Raw { + company_id?: string | null; + limit?: number | null; + offset?: number | null; + status?: ScheduledCheckoutStatus.Raw | null; + } +} diff --git a/src/serialization/resources/scheduledcheckout/types/ListScheduledCheckoutsResponse.ts b/src/serialization/resources/scheduledcheckout/types/ListScheduledCheckoutsResponse.ts new file mode 100644 index 00000000..650d98fe --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/types/ListScheduledCheckoutsResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { ScheduledCheckoutResponseData } from "../../../types/ScheduledCheckoutResponseData"; +import { ListScheduledCheckoutsParams } from "./ListScheduledCheckoutsParams"; + +export const ListScheduledCheckoutsResponse: core.serialization.ObjectSchema< + serializers.ListScheduledCheckoutsResponse.Raw, + Schematic.ListScheduledCheckoutsResponse +> = core.serialization.object({ + data: core.serialization.list(ScheduledCheckoutResponseData), + params: ListScheduledCheckoutsParams, +}); + +export declare namespace ListScheduledCheckoutsResponse { + export interface Raw { + data: ScheduledCheckoutResponseData.Raw[]; + params: ListScheduledCheckoutsParams.Raw; + } +} diff --git a/src/serialization/resources/scheduledcheckout/types/UpdateScheduledCheckoutResponse.ts b/src/serialization/resources/scheduledcheckout/types/UpdateScheduledCheckoutResponse.ts new file mode 100644 index 00000000..2caa57b0 --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/types/UpdateScheduledCheckoutResponse.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../../../api/index"; +import * as core from "../../../../core"; +import type * as serializers from "../../../index"; +import { ScheduledCheckoutResponseData } from "../../../types/ScheduledCheckoutResponseData"; + +export const UpdateScheduledCheckoutResponse: core.serialization.ObjectSchema< + serializers.UpdateScheduledCheckoutResponse.Raw, + Schematic.UpdateScheduledCheckoutResponse +> = core.serialization.object({ + data: ScheduledCheckoutResponseData, + params: core.serialization.record(core.serialization.string(), core.serialization.unknown()), +}); + +export declare namespace UpdateScheduledCheckoutResponse { + export interface Raw { + data: ScheduledCheckoutResponseData.Raw; + params: Record; + } +} diff --git a/src/serialization/resources/scheduledcheckout/types/index.ts b/src/serialization/resources/scheduledcheckout/types/index.ts new file mode 100644 index 00000000..29d7dde8 --- /dev/null +++ b/src/serialization/resources/scheduledcheckout/types/index.ts @@ -0,0 +1,5 @@ +export * from "./CreateScheduledCheckoutResponse"; +export * from "./GetScheduledCheckoutResponse"; +export * from "./ListScheduledCheckoutsParams"; +export * from "./ListScheduledCheckoutsResponse"; +export * from "./UpdateScheduledCheckoutResponse"; diff --git a/src/serialization/types/ActorType.ts b/src/serialization/types/ActorType.ts new file mode 100644 index 00000000..30008915 --- /dev/null +++ b/src/serialization/types/ActorType.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const ActorType: core.serialization.Schema = + core.serialization.enum_(["api_key", "app_user", "stripe_app", "system", "temporary_access_token"]); + +export declare namespace ActorType { + export type Raw = "api_key" | "app_user" | "stripe_app" | "system" | "temporary_access_token"; +} diff --git a/src/serialization/types/ApiKeyCreateResponseData.ts b/src/serialization/types/ApiKeyCreateResponseData.ts index 6d0b2bc4..49ce85c7 100644 --- a/src/serialization/types/ApiKeyCreateResponseData.ts +++ b/src/serialization/types/ApiKeyCreateResponseData.ts @@ -15,6 +15,7 @@ export const ApiKeyCreateResponseData: core.serialization.ObjectSchema< id: core.serialization.string(), lastUsedAt: core.serialization.property("last_used_at", core.serialization.date().optional()), name: core.serialization.string(), + readonly: core.serialization.boolean(), scopes: core.serialization.list(ApiKeyScope), secret: core.serialization.string(), updatedAt: core.serialization.property("updated_at", core.serialization.date()), @@ -28,6 +29,7 @@ export declare namespace ApiKeyCreateResponseData { id: string; last_used_at?: string | null; name: string; + readonly: boolean; scopes: ApiKeyScope.Raw[]; secret: string; updated_at: string; diff --git a/src/serialization/types/ApiKeyResponseData.ts b/src/serialization/types/ApiKeyResponseData.ts index d0495440..a6b9d2e2 100644 --- a/src/serialization/types/ApiKeyResponseData.ts +++ b/src/serialization/types/ApiKeyResponseData.ts @@ -15,6 +15,7 @@ export const ApiKeyResponseData: core.serialization.ObjectSchema< id: core.serialization.string(), lastUsedAt: core.serialization.property("last_used_at", core.serialization.date().optional()), name: core.serialization.string(), + readonly: core.serialization.boolean(), scopes: core.serialization.list(ApiKeyScope), updatedAt: core.serialization.property("updated_at", core.serialization.date()), }); @@ -27,6 +28,7 @@ export declare namespace ApiKeyResponseData { id: string; last_used_at?: string | null; name: string; + readonly: boolean; scopes: ApiKeyScope.Raw[]; updated_at: string; } diff --git a/src/serialization/types/ApiKeyRequestListResponseData.ts b/src/serialization/types/AuditLogListResponseData.ts similarity index 77% rename from src/serialization/types/ApiKeyRequestListResponseData.ts rename to src/serialization/types/AuditLogListResponseData.ts index dfda2675..b82d94f7 100644 --- a/src/serialization/types/ApiKeyRequestListResponseData.ts +++ b/src/serialization/types/AuditLogListResponseData.ts @@ -3,18 +3,18 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { ActorType } from "./ActorType"; -export const ApiKeyRequestListResponseData: core.serialization.ObjectSchema< - serializers.ApiKeyRequestListResponseData.Raw, - Schematic.ApiKeyRequestListResponseData +export const AuditLogListResponseData: core.serialization.ObjectSchema< + serializers.AuditLogListResponseData.Raw, + Schematic.AuditLogListResponseData > = core.serialization.object({ - apiKeyId: core.serialization.property("api_key_id", core.serialization.string()), + actorType: core.serialization.property("actor_type", ActorType), + apiKeyId: core.serialization.property("api_key_id", core.serialization.string().optional()), endedAt: core.serialization.property("ended_at", core.serialization.date().optional()), environmentId: core.serialization.property("environment_id", core.serialization.string().optional()), id: core.serialization.string(), method: core.serialization.string(), - reqBody: core.serialization.property("req_body", core.serialization.string().optional()), - requestType: core.serialization.property("request_type", core.serialization.string().optional()), resourceId: core.serialization.property("resource_id", core.serialization.number().optional()), resourceIdString: core.serialization.property("resource_id_string", core.serialization.string().optional()), resourceName: core.serialization.property("resource_name", core.serialization.string().optional()), @@ -26,15 +26,14 @@ export const ApiKeyRequestListResponseData: core.serialization.ObjectSchema< userName: core.serialization.property("user_name", core.serialization.string().optional()), }); -export declare namespace ApiKeyRequestListResponseData { +export declare namespace AuditLogListResponseData { export interface Raw { - api_key_id: string; + actor_type: ActorType.Raw; + api_key_id?: string | null; ended_at?: string | null; environment_id?: string | null; id: string; method: string; - req_body?: string | null; - request_type?: string | null; resource_id?: number | null; resource_id_string?: string | null; resource_name?: string | null; diff --git a/src/serialization/types/ApiKeyRequestResponseData.ts b/src/serialization/types/AuditLogResponseData.ts similarity index 75% rename from src/serialization/types/ApiKeyRequestResponseData.ts rename to src/serialization/types/AuditLogResponseData.ts index b2d8b62f..7f771bd7 100644 --- a/src/serialization/types/ApiKeyRequestResponseData.ts +++ b/src/serialization/types/AuditLogResponseData.ts @@ -3,20 +3,19 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -import { ApiKeyResponseData } from "./ApiKeyResponseData"; +import { ActorType } from "./ActorType"; -export const ApiKeyRequestResponseData: core.serialization.ObjectSchema< - serializers.ApiKeyRequestResponseData.Raw, - Schematic.ApiKeyRequestResponseData +export const AuditLogResponseData: core.serialization.ObjectSchema< + serializers.AuditLogResponseData.Raw, + Schematic.AuditLogResponseData > = core.serialization.object({ - apiKey: core.serialization.property("api_key", ApiKeyResponseData.optional()), - apiKeyId: core.serialization.property("api_key_id", core.serialization.string()), + actorType: core.serialization.property("actor_type", ActorType), + apiKeyId: core.serialization.property("api_key_id", core.serialization.string().optional()), endedAt: core.serialization.property("ended_at", core.serialization.date().optional()), environmentId: core.serialization.property("environment_id", core.serialization.string().optional()), id: core.serialization.string(), method: core.serialization.string(), reqBody: core.serialization.property("req_body", core.serialization.string().optional()), - requestType: core.serialization.property("request_type", core.serialization.string().optional()), resourceId: core.serialization.property("resource_id", core.serialization.number().optional()), resourceIdString: core.serialization.property("resource_id_string", core.serialization.string().optional()), resourceName: core.serialization.property("resource_name", core.serialization.string().optional()), @@ -26,21 +25,19 @@ export const ApiKeyRequestResponseData: core.serialization.ObjectSchema< secondaryResource: core.serialization.property("secondary_resource", core.serialization.string().optional()), startedAt: core.serialization.property("started_at", core.serialization.date()), url: core.serialization.string(), - userAgent: core.serialization.property("user_agent", core.serialization.string().optional()), userId: core.serialization.property("user_id", core.serialization.string().optional()), userName: core.serialization.property("user_name", core.serialization.string().optional()), }); -export declare namespace ApiKeyRequestResponseData { +export declare namespace AuditLogResponseData { export interface Raw { - api_key?: ApiKeyResponseData.Raw | null; - api_key_id: string; + actor_type: ActorType.Raw; + api_key_id?: string | null; ended_at?: string | null; environment_id?: string | null; id: string; method: string; req_body?: string | null; - request_type?: string | null; resource_id?: number | null; resource_id_string?: string | null; resource_name?: string | null; @@ -50,7 +47,6 @@ export declare namespace ApiKeyRequestResponseData { secondary_resource?: string | null; started_at: string; url: string; - user_agent?: string | null; user_id?: string | null; user_name?: string | null; } diff --git a/src/serialization/types/BillingCreditResponseData.ts b/src/serialization/types/BillingCreditResponseData.ts index 1d429f50..d0370c46 100644 --- a/src/serialization/types/BillingCreditResponseData.ts +++ b/src/serialization/types/BillingCreditResponseData.ts @@ -14,6 +14,7 @@ export const BillingCreditResponseData: core.serialization.ObjectSchema< Schematic.BillingCreditResponseData > = core.serialization.object({ burnStrategy: core.serialization.property("burn_strategy", BillingCreditBurnStrategy), + costEditable: core.serialization.property("cost_editable", core.serialization.boolean()), createdAt: core.serialization.property("created_at", core.serialization.date()), defaultExpiryUnit: core.serialization.property("default_expiry_unit", BillingCreditExpiryUnit), defaultExpiryUnitCount: core.serialization.property( @@ -35,6 +36,7 @@ export const BillingCreditResponseData: core.serialization.ObjectSchema< export declare namespace BillingCreditResponseData { export interface Raw { burn_strategy: BillingCreditBurnStrategy.Raw; + cost_editable: boolean; created_at: string; default_expiry_unit: BillingCreditExpiryUnit.Raw; default_expiry_unit_count?: number | null; diff --git a/src/serialization/types/BillingCreditView.ts b/src/serialization/types/BillingCreditView.ts new file mode 100644 index 00000000..27732ab0 --- /dev/null +++ b/src/serialization/types/BillingCreditView.ts @@ -0,0 +1,62 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { BillingCreditBurnStrategy } from "./BillingCreditBurnStrategy"; +import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit"; +import { BillingCreditRolloverPolicy } from "./BillingCreditRolloverPolicy"; +import { BillingPriceView } from "./BillingPriceView"; +import { BillingProductResponseData } from "./BillingProductResponseData"; + +export const BillingCreditView: core.serialization.ObjectSchema< + serializers.BillingCreditView.Raw, + Schematic.BillingCreditView +> = core.serialization.object({ + accountId: core.serialization.property("account_id", core.serialization.string()), + burnStrategy: core.serialization.property("burn_strategy", BillingCreditBurnStrategy), + costEditable: core.serialization.property("cost_editable", core.serialization.boolean()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + defaultExpiryUnit: core.serialization.property("default_expiry_unit", BillingCreditExpiryUnit), + defaultExpiryUnitCount: core.serialization.property( + "default_expiry_unit_count", + core.serialization.number().optional(), + ), + defaultRolloverPolicy: core.serialization.property("default_rollover_policy", BillingCreditRolloverPolicy), + description: core.serialization.string(), + environmentId: core.serialization.property("environment_id", core.serialization.string()), + icon: core.serialization.string().optional(), + id: core.serialization.string(), + name: core.serialization.string(), + pluralName: core.serialization.property("plural_name", core.serialization.string().optional()), + price: BillingPriceView.optional(), + pricePerUnit: core.serialization.property("price_per_unit", core.serialization.number().optional()), + pricePerUnitDecimal: core.serialization.property("price_per_unit_decimal", core.serialization.string().optional()), + product: BillingProductResponseData.optional(), + singularName: core.serialization.property("singular_name", core.serialization.string().optional()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), +}); + +export declare namespace BillingCreditView { + export interface Raw { + account_id: string; + burn_strategy: BillingCreditBurnStrategy.Raw; + cost_editable: boolean; + created_at: string; + default_expiry_unit: BillingCreditExpiryUnit.Raw; + default_expiry_unit_count?: number | null; + default_rollover_policy: BillingCreditRolloverPolicy.Raw; + description: string; + environment_id: string; + icon?: string | null; + id: string; + name: string; + plural_name?: string | null; + price?: BillingPriceView.Raw | null; + price_per_unit?: number | null; + price_per_unit_decimal?: string | null; + product?: BillingProductResponseData.Raw | null; + singular_name?: string | null; + updated_at: string; + } +} diff --git a/src/serialization/types/BillingPlanCreditGrantResponseData.ts b/src/serialization/types/BillingPlanCreditGrantResponseData.ts index 350e1e85..4c2a65c4 100644 --- a/src/serialization/types/BillingPlanCreditGrantResponseData.ts +++ b/src/serialization/types/BillingPlanCreditGrantResponseData.ts @@ -5,9 +5,11 @@ import * as core from "../../core"; import type * as serializers from "../index"; import { BillingCreditExpiryType } from "./BillingCreditExpiryType"; import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit"; +import { BillingCreditResponseData } from "./BillingCreditResponseData"; import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence"; import { BillingPlanCreditGrantResetStart } from "./BillingPlanCreditGrantResetStart"; import { BillingPlanCreditGrantResetType } from "./BillingPlanCreditGrantResetType"; +import { PreviewObjectResponseData } from "./PreviewObjectResponseData"; export const BillingPlanCreditGrantResponseData: core.serialization.ObjectSchema< serializers.BillingPlanCreditGrantResponseData.Raw, @@ -27,6 +29,7 @@ export const BillingPlanCreditGrantResponseData: core.serialization.ObjectSchema core.serialization.number().optional(), ), createdAt: core.serialization.property("created_at", core.serialization.date()), + credit: BillingCreditResponseData.optional(), creditAmount: core.serialization.property("credit_amount", core.serialization.number()), creditId: core.serialization.property("credit_id", core.serialization.string()), creditName: core.serialization.property("credit_name", core.serialization.string()), @@ -36,10 +39,12 @@ export const BillingPlanCreditGrantResponseData: core.serialization.ObjectSchema expiryUnit: core.serialization.property("expiry_unit", BillingCreditExpiryUnit.optional()), expiryUnitCount: core.serialization.property("expiry_unit_count", core.serialization.number().optional()), id: core.serialization.string(), + plan: PreviewObjectResponseData.optional(), planId: core.serialization.property("plan_id", core.serialization.string()), planName: core.serialization.property("plan_name", core.serialization.string()), - resetCadence: core.serialization.property("reset_cadence", BillingPlanCreditGrantResetCadence), - resetStart: core.serialization.property("reset_start", BillingPlanCreditGrantResetStart), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + resetCadence: core.serialization.property("reset_cadence", BillingPlanCreditGrantResetCadence.optional()), + resetStart: core.serialization.property("reset_start", BillingPlanCreditGrantResetStart.optional()), resetType: core.serialization.property("reset_type", BillingPlanCreditGrantResetType.optional()), updatedAt: core.serialization.property("updated_at", core.serialization.date()), }); @@ -54,6 +59,7 @@ export declare namespace BillingPlanCreditGrantResponseData { auto_topup_expiry_unit_count?: number | null; auto_topup_threshold_percent?: number | null; created_at: string; + credit?: BillingCreditResponseData.Raw | null; credit_amount: number; credit_id: string; credit_name: string; @@ -63,10 +69,12 @@ export declare namespace BillingPlanCreditGrantResponseData { expiry_unit?: BillingCreditExpiryUnit.Raw | null; expiry_unit_count?: number | null; id: string; + plan?: PreviewObjectResponseData.Raw | null; plan_id: string; plan_name: string; - reset_cadence: BillingPlanCreditGrantResetCadence.Raw; - reset_start: BillingPlanCreditGrantResetStart.Raw; + plan_version_id?: string | null; + reset_cadence?: BillingPlanCreditGrantResetCadence.Raw | null; + reset_start?: BillingPlanCreditGrantResetStart.Raw | null; reset_type?: BillingPlanCreditGrantResetType.Raw | null; updated_at: string; } diff --git a/src/serialization/types/CheckFlagResponseData.ts b/src/serialization/types/CheckFlagResponseData.ts index 29038010..94b6e6d4 100644 --- a/src/serialization/types/CheckFlagResponseData.ts +++ b/src/serialization/types/CheckFlagResponseData.ts @@ -3,12 +3,14 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { FeatureEntitlement } from "./FeatureEntitlement"; export const CheckFlagResponseData: core.serialization.ObjectSchema< serializers.CheckFlagResponseData.Raw, Schematic.CheckFlagResponseData > = core.serialization.object({ companyId: core.serialization.property("company_id", core.serialization.string().optional()), + entitlement: FeatureEntitlement.optional(), error: core.serialization.string().optional(), featureAllocation: core.serialization.property("feature_allocation", core.serialization.number().optional()), featureUsage: core.serialization.property("feature_usage", core.serialization.number().optional()), @@ -27,6 +29,7 @@ export const CheckFlagResponseData: core.serialization.ObjectSchema< export declare namespace CheckFlagResponseData { export interface Raw { company_id?: string | null; + entitlement?: FeatureEntitlement.Raw | null; error?: string | null; feature_allocation?: number | null; feature_usage?: number | null; diff --git a/src/serialization/types/CompanyDetailResponseData.ts b/src/serialization/types/CompanyDetailResponseData.ts index ba38a5d1..46010d81 100644 --- a/src/serialization/types/CompanyDetailResponseData.ts +++ b/src/serialization/types/CompanyDetailResponseData.ts @@ -8,9 +8,11 @@ import { CompanyEventPeriodMetricsResponseData } from "./CompanyEventPeriodMetri import { CompanyPlanWithBillingSubView } from "./CompanyPlanWithBillingSubView"; import { EntityKeyDetailResponseData } from "./EntityKeyDetailResponseData"; import { EntityTraitDetailResponseData } from "./EntityTraitDetailResponseData"; +import { FeatureEntitlement } from "./FeatureEntitlement"; import { GenericPreviewObject } from "./GenericPreviewObject"; import { PaymentMethodResponseData } from "./PaymentMethodResponseData"; import { Rule } from "./Rule"; +import { ScheduledDowngradeResponseData } from "./ScheduledDowngradeResponseData"; export const CompanyDetailResponseData: core.serialization.ObjectSchema< serializers.CompanyDetailResponseData.Raw, @@ -28,6 +30,7 @@ export const CompanyDetailResponseData: core.serialization.ObjectSchema< ), createdAt: core.serialization.property("created_at", core.serialization.date()), defaultPaymentMethod: core.serialization.property("default_payment_method", PaymentMethodResponseData.optional()), + entitlements: core.serialization.list(FeatureEntitlement), entityTraits: core.serialization.property("entity_traits", core.serialization.list(EntityTraitDetailResponseData)), environmentId: core.serialization.property("environment_id", core.serialization.string()), id: core.serialization.string(), @@ -40,6 +43,7 @@ export const CompanyDetailResponseData: core.serialization.ObjectSchema< plan: CompanyPlanWithBillingSubView.optional(), plans: core.serialization.list(GenericPreviewObject), rules: core.serialization.list(Rule), + scheduledDowngrade: core.serialization.property("scheduled_downgrade", ScheduledDowngradeResponseData.optional()), traits: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), updatedAt: core.serialization.property("updated_at", core.serialization.date()), userCount: core.serialization.property("user_count", core.serialization.number()), @@ -53,6 +57,7 @@ export declare namespace CompanyDetailResponseData { billing_subscriptions: BillingSubscriptionView.Raw[]; created_at: string; default_payment_method?: PaymentMethodResponseData.Raw | null; + entitlements: FeatureEntitlement.Raw[]; entity_traits: EntityTraitDetailResponseData.Raw[]; environment_id: string; id: string; @@ -65,6 +70,7 @@ export declare namespace CompanyDetailResponseData { plan?: CompanyPlanWithBillingSubView.Raw | null; plans: GenericPreviewObject.Raw[]; rules: Rule.Raw[]; + scheduled_downgrade?: ScheduledDowngradeResponseData.Raw | null; traits?: Record | null; updated_at: string; user_count: number; diff --git a/src/serialization/types/CompanyPlanDetailResponseData.ts b/src/serialization/types/CompanyPlanDetailResponseData.ts index 612e5f8a..fdddcf31 100644 --- a/src/serialization/types/CompanyPlanDetailResponseData.ts +++ b/src/serialization/types/CompanyPlanDetailResponseData.ts @@ -20,6 +20,7 @@ export const CompanyPlanDetailResponseData: core.serialization.ObjectSchema< serializers.CompanyPlanDetailResponseData.Raw, Schematic.CompanyPlanDetailResponseData > = core.serialization.object({ + activeVersion: core.serialization.property("active_version", PlanVersionResponseData.optional()), audienceType: core.serialization.property("audience_type", core.serialization.string().optional()), billingProduct: core.serialization.property("billing_product", BillingProductDetailResponseData.optional()), chargeType: core.serialization.property("charge_type", ChargeType), @@ -35,6 +36,7 @@ export const CompanyPlanDetailResponseData: core.serialization.ObjectSchema< custom: core.serialization.boolean(), customPlanConfig: core.serialization.property("custom_plan_config", CustomPlanConfig.optional()), description: core.serialization.string(), + draftVersion: core.serialization.property("draft_version", PlanVersionResponseData.optional()), entitlements: core.serialization.list(PlanEntitlementResponseData), features: core.serialization.list(FeatureDetailResponseData), icon: core.serialization.string(), @@ -62,6 +64,7 @@ export const CompanyPlanDetailResponseData: core.serialization.ObjectSchema< export declare namespace CompanyPlanDetailResponseData { export interface Raw { + active_version?: PlanVersionResponseData.Raw | null; audience_type?: string | null; billing_product?: BillingProductDetailResponseData.Raw | null; charge_type: ChargeType.Raw; @@ -74,6 +77,7 @@ export declare namespace CompanyPlanDetailResponseData { custom: boolean; custom_plan_config?: CustomPlanConfig.Raw | null; description: string; + draft_version?: PlanVersionResponseData.Raw | null; entitlements: PlanEntitlementResponseData.Raw[]; features: FeatureDetailResponseData.Raw[]; icon: string; diff --git a/src/serialization/types/CompanyViewWithFeatureUsageResponseData.ts b/src/serialization/types/CompanyViewWithFeatureUsageResponseData.ts deleted file mode 100644 index d2caa83f..00000000 --- a/src/serialization/types/CompanyViewWithFeatureUsageResponseData.ts +++ /dev/null @@ -1,75 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../api/index"; -import * as core from "../../core"; -import type * as serializers from "../index"; -import { BillingSubscriptionView } from "./BillingSubscriptionView"; -import { CompanyEventPeriodMetricsResponseData } from "./CompanyEventPeriodMetricsResponseData"; -import { CompanyPlanWithBillingSubView } from "./CompanyPlanWithBillingSubView"; -import { EntityKeyDetailResponseData } from "./EntityKeyDetailResponseData"; -import { EntityTraitDetailResponseData } from "./EntityTraitDetailResponseData"; -import { FeatureUsageDataResponseData } from "./FeatureUsageDataResponseData"; -import { GenericPreviewObject } from "./GenericPreviewObject"; -import { PaymentMethodResponseData } from "./PaymentMethodResponseData"; -import { Rule } from "./Rule"; - -export const CompanyViewWithFeatureUsageResponseData: core.serialization.ObjectSchema< - serializers.CompanyViewWithFeatureUsageResponseData.Raw, - Schematic.CompanyViewWithFeatureUsageResponseData -> = core.serialization.object({ - addOns: core.serialization.property("add_ons", core.serialization.list(CompanyPlanWithBillingSubView)), - billingCreditBalances: core.serialization.property( - "billing_credit_balances", - core.serialization.record(core.serialization.string(), core.serialization.number()).optional(), - ), - billingSubscription: core.serialization.property("billing_subscription", BillingSubscriptionView.optional()), - billingSubscriptions: core.serialization.property( - "billing_subscriptions", - core.serialization.list(BillingSubscriptionView), - ), - createdAt: core.serialization.property("created_at", core.serialization.date()), - defaultPaymentMethod: core.serialization.property("default_payment_method", PaymentMethodResponseData.optional()), - entityTraits: core.serialization.property("entity_traits", core.serialization.list(EntityTraitDetailResponseData)), - environmentId: core.serialization.property("environment_id", core.serialization.string()), - featureUsage: core.serialization.property("feature_usage", core.serialization.list(FeatureUsageDataResponseData)), - id: core.serialization.string(), - keys: core.serialization.list(EntityKeyDetailResponseData), - lastSeenAt: core.serialization.property("last_seen_at", core.serialization.date().optional()), - logoUrl: core.serialization.property("logo_url", core.serialization.string().optional()), - metrics: core.serialization.list(CompanyEventPeriodMetricsResponseData), - name: core.serialization.string(), - paymentMethods: core.serialization.property("payment_methods", core.serialization.list(PaymentMethodResponseData)), - plan: CompanyPlanWithBillingSubView.optional(), - plans: core.serialization.list(GenericPreviewObject), - rules: core.serialization.list(Rule), - traits: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), - updatedAt: core.serialization.property("updated_at", core.serialization.date()), - userCount: core.serialization.property("user_count", core.serialization.number()), -}); - -export declare namespace CompanyViewWithFeatureUsageResponseData { - export interface Raw { - add_ons: CompanyPlanWithBillingSubView.Raw[]; - billing_credit_balances?: Record | null; - billing_subscription?: BillingSubscriptionView.Raw | null; - billing_subscriptions: BillingSubscriptionView.Raw[]; - created_at: string; - default_payment_method?: PaymentMethodResponseData.Raw | null; - entity_traits: EntityTraitDetailResponseData.Raw[]; - environment_id: string; - feature_usage: FeatureUsageDataResponseData.Raw[]; - id: string; - keys: EntityKeyDetailResponseData.Raw[]; - last_seen_at?: string | null; - logo_url?: string | null; - metrics: CompanyEventPeriodMetricsResponseData.Raw[]; - name: string; - payment_methods: PaymentMethodResponseData.Raw[]; - plan?: CompanyPlanWithBillingSubView.Raw | null; - plans: GenericPreviewObject.Raw[]; - rules: Rule.Raw[]; - traits?: Record | null; - updated_at: string; - user_count: number; - } -} diff --git a/src/serialization/types/ComponentDisplaySettings.ts b/src/serialization/types/ComponentDisplaySettings.ts index 73092703..a178a9f7 100644 --- a/src/serialization/types/ComponentDisplaySettings.ts +++ b/src/serialization/types/ComponentDisplaySettings.ts @@ -10,6 +10,7 @@ export const ComponentDisplaySettings: core.serialization.ObjectSchema< > = core.serialization.object({ showAsMonthlyPrices: core.serialization.property("show_as_monthly_prices", core.serialization.boolean()), showCredits: core.serialization.property("show_credits", core.serialization.boolean()), + showFeatureDescription: core.serialization.property("show_feature_description", core.serialization.boolean()), showPeriodToggle: core.serialization.property("show_period_toggle", core.serialization.boolean()), showZeroPriceAsFree: core.serialization.property("show_zero_price_as_free", core.serialization.boolean()), }); @@ -18,6 +19,7 @@ export declare namespace ComponentDisplaySettings { export interface Raw { show_as_monthly_prices: boolean; show_credits: boolean; + show_feature_description: boolean; show_period_toggle: boolean; show_zero_price_as_free: boolean; } diff --git a/src/serialization/types/ComponentHydrateResponseData.ts b/src/serialization/types/ComponentHydrateResponseData.ts index 2e3eebc3..4225cf32 100644 --- a/src/serialization/types/ComponentHydrateResponseData.ts +++ b/src/serialization/types/ComponentHydrateResponseData.ts @@ -16,6 +16,7 @@ import { CreditCompanyGrantView } from "./CreditCompanyGrantView"; import { FeatureUsageDetailResponseData } from "./FeatureUsageDetailResponseData"; import { InvoiceResponseData } from "./InvoiceResponseData"; import { PlanDetailResponseData } from "./PlanDetailResponseData"; +import { ScheduledDowngradeResponseData } from "./ScheduledDowngradeResponseData"; import { StripeEmbedInfo } from "./StripeEmbedInfo"; import { UsageBasedEntitlementResponseData } from "./UsageBasedEntitlementResponseData"; @@ -55,6 +56,7 @@ export const ComponentHydrateResponseData: core.serialization.ObjectSchema< "prevent_self_service_downgrade_url", core.serialization.string().optional(), ), + scheduledDowngrade: core.serialization.property("scheduled_downgrade", ScheduledDowngradeResponseData.optional()), showAsMonthlyPrices: core.serialization.property("show_as_monthly_prices", core.serialization.boolean()), showCredits: core.serialization.property("show_credits", core.serialization.boolean()), showPeriodToggle: core.serialization.property("show_period_toggle", core.serialization.boolean()), @@ -87,6 +89,7 @@ export declare namespace ComponentHydrateResponseData { prevent_self_service_downgrade: boolean; prevent_self_service_downgrade_button_text?: string | null; prevent_self_service_downgrade_url?: string | null; + scheduled_downgrade?: ScheduledDowngradeResponseData.Raw | null; show_as_monthly_prices: boolean; show_credits: boolean; show_period_toggle: boolean; diff --git a/src/serialization/types/ComponentPreviewResponseData.ts b/src/serialization/types/ComponentPreviewResponseData.ts index 4c8c2b46..48d4ffc0 100644 --- a/src/serialization/types/ComponentPreviewResponseData.ts +++ b/src/serialization/types/ComponentPreviewResponseData.ts @@ -16,6 +16,7 @@ import { CreditCompanyGrantView } from "./CreditCompanyGrantView"; import { FeatureUsageDetailResponseData } from "./FeatureUsageDetailResponseData"; import { InvoiceResponseData } from "./InvoiceResponseData"; import { PlanDetailResponseData } from "./PlanDetailResponseData"; +import { ScheduledDowngradeResponseData } from "./ScheduledDowngradeResponseData"; import { StripeEmbedInfo } from "./StripeEmbedInfo"; import { UsageBasedEntitlementResponseData } from "./UsageBasedEntitlementResponseData"; @@ -56,6 +57,7 @@ export const ComponentPreviewResponseData: core.serialization.ObjectSchema< "prevent_self_service_downgrade_url", core.serialization.string().optional(), ), + scheduledDowngrade: core.serialization.property("scheduled_downgrade", ScheduledDowngradeResponseData.optional()), showAsMonthlyPrices: core.serialization.property("show_as_monthly_prices", core.serialization.boolean()), showCredits: core.serialization.property("show_credits", core.serialization.boolean()), showPeriodToggle: core.serialization.property("show_period_toggle", core.serialization.boolean()), @@ -89,6 +91,7 @@ export declare namespace ComponentPreviewResponseData { prevent_self_service_downgrade: boolean; prevent_self_service_downgrade_button_text?: string | null; prevent_self_service_downgrade_url?: string | null; + scheduled_downgrade?: ScheduledDowngradeResponseData.Raw | null; show_as_monthly_prices: boolean; show_credits: boolean; show_period_toggle: boolean; diff --git a/src/serialization/types/ComponentSettingsResponseData.ts b/src/serialization/types/ComponentSettingsResponseData.ts index e3aec552..22aa0be6 100644 --- a/src/serialization/types/ComponentSettingsResponseData.ts +++ b/src/serialization/types/ComponentSettingsResponseData.ts @@ -10,6 +10,7 @@ export const ComponentSettingsResponseData: core.serialization.ObjectSchema< > = core.serialization.object({ showAsMonthlyPrices: core.serialization.property("show_as_monthly_prices", core.serialization.boolean()), showCredits: core.serialization.property("show_credits", core.serialization.boolean()), + showFeatureDescription: core.serialization.property("show_feature_description", core.serialization.boolean()), showPeriodToggle: core.serialization.property("show_period_toggle", core.serialization.boolean()), showZeroPriceAsFree: core.serialization.property("show_zero_price_as_free", core.serialization.boolean()), }); @@ -18,6 +19,7 @@ export declare namespace ComponentSettingsResponseData { export interface Raw { show_as_monthly_prices: boolean; show_credits: boolean; + show_feature_description: boolean; show_period_toggle: boolean; show_zero_price_as_free: boolean; } diff --git a/src/serialization/types/ConditionConditionType.ts b/src/serialization/types/ConditionConditionType.ts index c8083031..35510066 100644 --- a/src/serialization/types/ConditionConditionType.ts +++ b/src/serialization/types/ConditionConditionType.ts @@ -12,9 +12,9 @@ export const ConditionConditionType: core.serialization.Schema< "billing_product", "company", "credit", - "crm_product", "metric", "plan", + "plan_version", "trait", "user", ]); @@ -25,9 +25,9 @@ export declare namespace ConditionConditionType { | "billing_product" | "company" | "credit" - | "crm_product" | "metric" | "plan" + | "plan_version" | "trait" | "user"; } diff --git a/src/serialization/types/ConditionGroupResponseData.ts b/src/serialization/types/ConditionGroupResponseData.ts new file mode 100644 index 00000000..1094ba30 --- /dev/null +++ b/src/serialization/types/ConditionGroupResponseData.ts @@ -0,0 +1,32 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const ConditionGroupResponseData: core.serialization.ObjectSchema< + serializers.ConditionGroupResponseData.Raw, + Schematic.ConditionGroupResponseData +> = core.serialization.object({ + accountId: core.serialization.property("account_id", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + environmentId: core.serialization.property("environment_id", core.serialization.string()), + flagId: core.serialization.property("flag_id", core.serialization.string().optional()), + id: core.serialization.string(), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + ruleId: core.serialization.property("rule_id", core.serialization.string()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), +}); + +export declare namespace ConditionGroupResponseData { + export interface Raw { + account_id: string; + created_at: string; + environment_id: string; + flag_id?: string | null; + id: string; + plan_version_id?: string | null; + rule_id: string; + updated_at: string; + } +} diff --git a/src/serialization/types/ConditionGroupView.ts b/src/serialization/types/ConditionGroupView.ts new file mode 100644 index 00000000..144b48cb --- /dev/null +++ b/src/serialization/types/ConditionGroupView.ts @@ -0,0 +1,35 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ConditionView } from "./ConditionView"; + +export const ConditionGroupView: core.serialization.ObjectSchema< + serializers.ConditionGroupView.Raw, + Schematic.ConditionGroupView +> = core.serialization.object({ + accountId: core.serialization.property("account_id", core.serialization.string()), + conditions: core.serialization.list(ConditionView), + createdAt: core.serialization.property("created_at", core.serialization.date()), + environmentId: core.serialization.property("environment_id", core.serialization.string()), + flagId: core.serialization.property("flag_id", core.serialization.string().optional()), + id: core.serialization.string(), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + ruleId: core.serialization.property("rule_id", core.serialization.string()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), +}); + +export declare namespace ConditionGroupView { + export interface Raw { + account_id: string; + conditions: ConditionView.Raw[]; + created_at: string; + environment_id: string; + flag_id?: string | null; + id: string; + plan_version_id?: string | null; + rule_id: string; + updated_at: string; + } +} diff --git a/src/serialization/types/ConditionResponseData.ts b/src/serialization/types/ConditionResponseData.ts new file mode 100644 index 00000000..e47ff18b --- /dev/null +++ b/src/serialization/types/ConditionResponseData.ts @@ -0,0 +1,73 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { EntityType } from "./EntityType"; + +export const ConditionResponseData: core.serialization.ObjectSchema< + serializers.ConditionResponseData.Raw, + Schematic.ConditionResponseData +> = core.serialization.object({ + accountId: core.serialization.property("account_id", core.serialization.string()), + comparisonTraitId: core.serialization.property("comparison_trait_id", core.serialization.string().optional()), + conditionGroupId: core.serialization.property("condition_group_id", core.serialization.string().optional()), + conditionType: core.serialization.property("condition_type", core.serialization.string()), + consumptionRate: core.serialization.property("consumption_rate", core.serialization.number().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + creditId: core.serialization.property("credit_id", core.serialization.string().optional()), + environmentId: core.serialization.property("environment_id", core.serialization.string()), + eventSubtype: core.serialization.property("event_subtype", core.serialization.string().optional()), + flagId: core.serialization.property("flag_id", core.serialization.string().optional()), + id: core.serialization.string(), + metricPeriod: core.serialization.property("metric_period", core.serialization.string().optional()), + metricPeriodMonthReset: core.serialization.property( + "metric_period_month_reset", + core.serialization.string().optional(), + ), + metricValue: core.serialization.property("metric_value", core.serialization.number().optional()), + operator: core.serialization.string(), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + resourceUnspecifiedIds: core.serialization.property( + "resource_unspecified_ids", + core.serialization.list(core.serialization.string()), + ), + ruleId: core.serialization.property("rule_id", core.serialization.string()), + traitEntityType: core.serialization.property("trait_entity_type", EntityType.optional()), + traitId: core.serialization.property("trait_id", core.serialization.string().optional()), + traitValue: core.serialization.property("trait_value", core.serialization.string()), + traitValueBool: core.serialization.property("trait_value_bool", core.serialization.boolean()), + traitValueDate: core.serialization.property("trait_value_date", core.serialization.date().optional()), + traitValueInt: core.serialization.property("trait_value_int", core.serialization.number()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), +}); + +export declare namespace ConditionResponseData { + export interface Raw { + account_id: string; + comparison_trait_id?: string | null; + condition_group_id?: string | null; + condition_type: string; + consumption_rate?: number | null; + created_at: string; + credit_id?: string | null; + environment_id: string; + event_subtype?: string | null; + flag_id?: string | null; + id: string; + metric_period?: string | null; + metric_period_month_reset?: string | null; + metric_value?: number | null; + operator: string; + plan_version_id?: string | null; + resource_unspecified_ids: string[]; + rule_id: string; + trait_entity_type?: EntityType.Raw | null; + trait_id?: string | null; + trait_value: string; + trait_value_bool: boolean; + trait_value_date?: string | null; + trait_value_int: number; + updated_at: string; + } +} diff --git a/src/serialization/types/ConditionView.ts b/src/serialization/types/ConditionView.ts new file mode 100644 index 00000000..35e5b6d0 --- /dev/null +++ b/src/serialization/types/ConditionView.ts @@ -0,0 +1,87 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { EntityTraitDefinitionResponseData } from "./EntityTraitDefinitionResponseData"; +import { EntityType } from "./EntityType"; +import { GenericPreviewObject } from "./GenericPreviewObject"; + +export const ConditionView: core.serialization.ObjectSchema = + core.serialization.object({ + accountId: core.serialization.property("account_id", core.serialization.string()), + billingProducts: core.serialization.property("billing_products", core.serialization.list(GenericPreviewObject)), + companies: core.serialization.list(GenericPreviewObject), + comparisonTrait: core.serialization.property("comparison_trait", EntityTraitDefinitionResponseData.optional()), + comparisonTraitId: core.serialization.property("comparison_trait_id", core.serialization.string().optional()), + conditionGroupId: core.serialization.property("condition_group_id", core.serialization.string().optional()), + conditionType: core.serialization.property("condition_type", core.serialization.string()), + consumptionRate: core.serialization.property("consumption_rate", core.serialization.number().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + creditId: core.serialization.property("credit_id", core.serialization.string().optional()), + environmentId: core.serialization.property("environment_id", core.serialization.string()), + eventSubtype: core.serialization.property("event_subtype", core.serialization.string().optional()), + flagId: core.serialization.property("flag_id", core.serialization.string().optional()), + id: core.serialization.string(), + metricPeriod: core.serialization.property("metric_period", core.serialization.string().optional()), + metricPeriodMonthReset: core.serialization.property( + "metric_period_month_reset", + core.serialization.string().optional(), + ), + metricValue: core.serialization.property("metric_value", core.serialization.number().optional()), + operator: core.serialization.string(), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + planVersions: core.serialization.property("plan_versions", core.serialization.list(GenericPreviewObject)), + plans: core.serialization.list(GenericPreviewObject), + resourceUnspecifiedIds: core.serialization.property( + "resource_unspecified_ids", + core.serialization.list(core.serialization.string()), + ), + ruleId: core.serialization.property("rule_id", core.serialization.string()), + trait: EntityTraitDefinitionResponseData.optional(), + traitEntityType: core.serialization.property("trait_entity_type", EntityType.optional()), + traitId: core.serialization.property("trait_id", core.serialization.string().optional()), + traitValue: core.serialization.property("trait_value", core.serialization.string()), + traitValueBool: core.serialization.property("trait_value_bool", core.serialization.boolean()), + traitValueDate: core.serialization.property("trait_value_date", core.serialization.date().optional()), + traitValueInt: core.serialization.property("trait_value_int", core.serialization.number()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), + users: core.serialization.list(GenericPreviewObject), + }); + +export declare namespace ConditionView { + export interface Raw { + account_id: string; + billing_products: GenericPreviewObject.Raw[]; + companies: GenericPreviewObject.Raw[]; + comparison_trait?: EntityTraitDefinitionResponseData.Raw | null; + comparison_trait_id?: string | null; + condition_group_id?: string | null; + condition_type: string; + consumption_rate?: number | null; + created_at: string; + credit_id?: string | null; + environment_id: string; + event_subtype?: string | null; + flag_id?: string | null; + id: string; + metric_period?: string | null; + metric_period_month_reset?: string | null; + metric_value?: number | null; + operator: string; + plan_version_id?: string | null; + plan_versions: GenericPreviewObject.Raw[]; + plans: GenericPreviewObject.Raw[]; + resource_unspecified_ids: string[]; + rule_id: string; + trait?: EntityTraitDefinitionResponseData.Raw | null; + trait_entity_type?: EntityType.Raw | null; + trait_id?: string | null; + trait_value: string; + trait_value_bool: boolean; + trait_value_date?: string | null; + trait_value_int: number; + updated_at: string; + users: GenericPreviewObject.Raw[]; + } +} diff --git a/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts b/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts index d9816c3d..ad9f1bf4 100644 --- a/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts +++ b/src/serialization/types/CreateBillingPlanCreditGrantRequestBody.ts @@ -34,6 +34,7 @@ export const CreateBillingPlanCreditGrantRequestBody: core.serialization.ObjectS expiryUnit: core.serialization.property("expiry_unit", BillingCreditExpiryUnit.optional()), expiryUnitCount: core.serialization.property("expiry_unit_count", core.serialization.number().optional()), planId: core.serialization.property("plan_id", core.serialization.string()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), resetCadence: core.serialization.property("reset_cadence", BillingPlanCreditGrantResetCadence), resetStart: core.serialization.property("reset_start", BillingPlanCreditGrantResetStart), resetType: core.serialization.property("reset_type", BillingPlanCreditGrantResetType.optional()), @@ -55,6 +56,7 @@ export declare namespace CreateBillingPlanCreditGrantRequestBody { expiry_unit?: BillingCreditExpiryUnit.Raw | null; expiry_unit_count?: number | null; plan_id: string; + plan_version_id?: string | null; reset_cadence: BillingPlanCreditGrantResetCadence.Raw; reset_start: BillingPlanCreditGrantResetStart.Raw; reset_type?: BillingPlanCreditGrantResetType.Raw | null; diff --git a/src/serialization/types/CreateEntitlementInBundleRequestBody.ts b/src/serialization/types/CreateEntitlementInBundleRequestBody.ts index 2579faf3..4e414a28 100644 --- a/src/serialization/types/CreateEntitlementInBundleRequestBody.ts +++ b/src/serialization/types/CreateEntitlementInBundleRequestBody.ts @@ -47,6 +47,8 @@ export const CreateEntitlementInBundleRequestBody: core.serialization.ObjectSche "overage_billing_product_id", core.serialization.string().optional(), ), + planId: core.serialization.property("plan_id", core.serialization.string()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), priceBehavior: core.serialization.property("price_behavior", EntitlementPriceBehavior.optional()), priceTiers: core.serialization.property( "price_tiers", @@ -88,6 +90,8 @@ export declare namespace CreateEntitlementInBundleRequestBody { monthly_unit_price?: number | null; monthly_unit_price_decimal?: string | null; overage_billing_product_id?: string | null; + plan_id: string; + plan_version_id?: string | null; price_behavior?: EntitlementPriceBehavior.Raw | null; price_tiers?: CreatePriceTierRequestBody.Raw[] | null; soft_limit?: number | null; diff --git a/src/serialization/types/CreditUsageResponseData.ts b/src/serialization/types/CreditUsageResponseData.ts deleted file mode 100644 index 7f17ec73..00000000 --- a/src/serialization/types/CreditUsageResponseData.ts +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../api/index"; -import * as core from "../../core"; -import type * as serializers from "../index"; -import { CreditGrantDetail } from "./CreditGrantDetail"; - -export const CreditUsageResponseData: core.serialization.ObjectSchema< - serializers.CreditUsageResponseData.Raw, - Schematic.CreditUsageResponseData -> = core.serialization.object({ - creditConsumptionRate: core.serialization.property( - "credit_consumption_rate", - core.serialization.number().optional(), - ), - creditGrantCounts: core.serialization.property( - "credit_grant_counts", - core.serialization.record(core.serialization.string(), core.serialization.number()).optional(), - ), - creditGrantDetails: core.serialization.property("credit_grant_details", core.serialization.list(CreditGrantDetail)), - creditRemaining: core.serialization.property("credit_remaining", core.serialization.number().optional()), - creditTotal: core.serialization.property("credit_total", core.serialization.number().optional()), - creditTypeIcon: core.serialization.property("credit_type_icon", core.serialization.string().optional()), - creditTypeName: core.serialization.property("credit_type_name", core.serialization.string().optional()), - creditUsed: core.serialization.property("credit_used", core.serialization.number().optional()), -}); - -export declare namespace CreditUsageResponseData { - export interface Raw { - credit_consumption_rate?: number | null; - credit_grant_counts?: Record | null; - credit_grant_details: CreditGrantDetail.Raw[]; - credit_remaining?: number | null; - credit_total?: number | null; - credit_type_icon?: string | null; - credit_type_name?: string | null; - credit_used?: number | null; - } -} diff --git a/src/serialization/types/CreditsAutoTopupCompanySummary.ts b/src/serialization/types/CreditsAutoTopupCompanySummary.ts new file mode 100644 index 00000000..0a20e1ed --- /dev/null +++ b/src/serialization/types/CreditsAutoTopupCompanySummary.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CreditsAutoTopupCompanySummary: core.serialization.ObjectSchema< + serializers.CreditsAutoTopupCompanySummary.Raw, + Schematic.CreditsAutoTopupCompanySummary +> = core.serialization.object({ + id: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace CreditsAutoTopupCompanySummary { + export interface Raw { + id: string; + name: string; + } +} diff --git a/src/serialization/types/CreditsAutoTopupCreditSummary.ts b/src/serialization/types/CreditsAutoTopupCreditSummary.ts new file mode 100644 index 00000000..edc56b1e --- /dev/null +++ b/src/serialization/types/CreditsAutoTopupCreditSummary.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CreditsAutoTopupCreditSummary: core.serialization.ObjectSchema< + serializers.CreditsAutoTopupCreditSummary.Raw, + Schematic.CreditsAutoTopupCreditSummary +> = core.serialization.object({ + id: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace CreditsAutoTopupCreditSummary { + export interface Raw { + id: string; + name: string; + } +} diff --git a/src/serialization/types/CreditsAutoTopupHardFailure.ts b/src/serialization/types/CreditsAutoTopupHardFailure.ts new file mode 100644 index 00000000..8c4cfa2d --- /dev/null +++ b/src/serialization/types/CreditsAutoTopupHardFailure.ts @@ -0,0 +1,26 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CreditsAutoTopupCompanySummary } from "./CreditsAutoTopupCompanySummary"; +import { CreditsAutoTopupCreditSummary } from "./CreditsAutoTopupCreditSummary"; + +export const CreditsAutoTopupHardFailure: core.serialization.ObjectSchema< + serializers.CreditsAutoTopupHardFailure.Raw, + Schematic.CreditsAutoTopupHardFailure +> = core.serialization.object({ + company: CreditsAutoTopupCompanySummary.optional(), + credit: CreditsAutoTopupCreditSummary.optional(), + errorMessage: core.serialization.property("error_message", core.serialization.string().optional()), + stripeErrorCode: core.serialization.property("stripe_error_code", core.serialization.string().optional()), +}); + +export declare namespace CreditsAutoTopupHardFailure { + export interface Raw { + company?: CreditsAutoTopupCompanySummary.Raw | null; + credit?: CreditsAutoTopupCreditSummary.Raw | null; + error_message?: string | null; + stripe_error_code?: string | null; + } +} diff --git a/src/serialization/types/CreditsAutoTopupRetryFailure.ts b/src/serialization/types/CreditsAutoTopupRetryFailure.ts new file mode 100644 index 00000000..d59c97fe --- /dev/null +++ b/src/serialization/types/CreditsAutoTopupRetryFailure.ts @@ -0,0 +1,28 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CreditsAutoTopupCompanySummary } from "./CreditsAutoTopupCompanySummary"; +import { CreditsAutoTopupCreditSummary } from "./CreditsAutoTopupCreditSummary"; + +export const CreditsAutoTopupRetryFailure: core.serialization.ObjectSchema< + serializers.CreditsAutoTopupRetryFailure.Raw, + Schematic.CreditsAutoTopupRetryFailure +> = core.serialization.object({ + company: CreditsAutoTopupCompanySummary.optional(), + consecutiveFailures: core.serialization.property("consecutive_failures", core.serialization.number()), + credit: CreditsAutoTopupCreditSummary.optional(), + lastErrorMessage: core.serialization.property("last_error_message", core.serialization.string().optional()), + stripeErrorCode: core.serialization.property("stripe_error_code", core.serialization.string().optional()), +}); + +export declare namespace CreditsAutoTopupRetryFailure { + export interface Raw { + company?: CreditsAutoTopupCompanySummary.Raw | null; + consecutive_failures: number; + credit?: CreditsAutoTopupCreditSummary.Raw | null; + last_error_message?: string | null; + stripe_error_code?: string | null; + } +} diff --git a/src/serialization/types/FeatureEntitlement.ts b/src/serialization/types/FeatureEntitlement.ts new file mode 100644 index 00000000..f5ed45d0 --- /dev/null +++ b/src/serialization/types/FeatureEntitlement.ts @@ -0,0 +1,47 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { EntitlementValueType } from "./EntitlementValueType"; +import { FeatureEntitlementMetricPeriod } from "./FeatureEntitlementMetricPeriod"; +import { FeatureEntitlementMonthReset } from "./FeatureEntitlementMonthReset"; + +export const FeatureEntitlement: core.serialization.ObjectSchema< + serializers.FeatureEntitlement.Raw, + Schematic.FeatureEntitlement +> = core.serialization.object({ + allocation: core.serialization.number().optional(), + creditId: core.serialization.property("credit_id", core.serialization.string().optional()), + creditRemaining: core.serialization.property("credit_remaining", core.serialization.number().optional()), + creditTotal: core.serialization.property("credit_total", core.serialization.number().optional()), + creditUsed: core.serialization.property("credit_used", core.serialization.number().optional()), + eventName: core.serialization.property("event_name", core.serialization.string().optional()), + featureId: core.serialization.property("feature_id", core.serialization.string()), + featureKey: core.serialization.property("feature_key", core.serialization.string()), + metricPeriod: core.serialization.property("metric_period", FeatureEntitlementMetricPeriod.optional()), + metricResetAt: core.serialization.property("metric_reset_at", core.serialization.date().optional()), + monthReset: core.serialization.property("month_reset", FeatureEntitlementMonthReset.optional()), + softLimit: core.serialization.property("soft_limit", core.serialization.number().optional()), + usage: core.serialization.number().optional(), + valueType: core.serialization.property("value_type", EntitlementValueType), +}); + +export declare namespace FeatureEntitlement { + export interface Raw { + allocation?: number | null; + credit_id?: string | null; + credit_remaining?: number | null; + credit_total?: number | null; + credit_used?: number | null; + event_name?: string | null; + feature_id: string; + feature_key: string; + metric_period?: FeatureEntitlementMetricPeriod.Raw | null; + metric_reset_at?: string | null; + month_reset?: FeatureEntitlementMonthReset.Raw | null; + soft_limit?: number | null; + usage?: number | null; + value_type: EntitlementValueType.Raw; + } +} diff --git a/src/serialization/types/FeatureEntitlementMetricPeriod.ts b/src/serialization/types/FeatureEntitlementMetricPeriod.ts new file mode 100644 index 00000000..1ad73096 --- /dev/null +++ b/src/serialization/types/FeatureEntitlementMetricPeriod.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const FeatureEntitlementMetricPeriod: core.serialization.Schema< + serializers.FeatureEntitlementMetricPeriod.Raw, + Schematic.FeatureEntitlementMetricPeriod +> = core.serialization.enum_(["all_time", "current_day", "current_month", "current_week"]); + +export declare namespace FeatureEntitlementMetricPeriod { + export type Raw = "all_time" | "current_day" | "current_month" | "current_week"; +} diff --git a/src/serialization/types/FeatureEntitlementMonthReset.ts b/src/serialization/types/FeatureEntitlementMonthReset.ts new file mode 100644 index 00000000..98390c18 --- /dev/null +++ b/src/serialization/types/FeatureEntitlementMonthReset.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const FeatureEntitlementMonthReset: core.serialization.Schema< + serializers.FeatureEntitlementMonthReset.Raw, + Schematic.FeatureEntitlementMonthReset +> = core.serialization.enum_(["first_of_month", "billing_cycle"]); + +export declare namespace FeatureEntitlementMonthReset { + export type Raw = "first_of_month" | "billing_cycle"; +} diff --git a/src/serialization/types/FeatureUsageDataResponseData.ts b/src/serialization/types/FeatureUsageDataResponseData.ts deleted file mode 100644 index fdca3ccd..00000000 --- a/src/serialization/types/FeatureUsageDataResponseData.ts +++ /dev/null @@ -1,51 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Schematic from "../../api/index"; -import * as core from "../../core"; -import type * as serializers from "../index"; -import { BillingPriceView } from "./BillingPriceView"; -import { CreditUsageResponseData } from "./CreditUsageResponseData"; -import { FeatureType } from "./FeatureType"; - -export const FeatureUsageDataResponseData: core.serialization.ObjectSchema< - serializers.FeatureUsageDataResponseData.Raw, - Schematic.FeatureUsageDataResponseData -> = core.serialization.object({ - creditTypeId: core.serialization.property("credit_type_id", core.serialization.string().optional()), - creditUsage: core.serialization.property("credit_usage", CreditUsageResponseData.optional()), - entitlementSource: core.serialization.property("entitlement_source", core.serialization.string()), - entitlementValueType: core.serialization.property("entitlement_value_type", core.serialization.string()), - featureId: core.serialization.property("feature_id", core.serialization.string()), - featureName: core.serialization.property("feature_name", core.serialization.string()), - featureType: core.serialization.property("feature_type", FeatureType), - hardLimit: core.serialization.property("hard_limit", core.serialization.string()), - hasAccess: core.serialization.property("has_access", core.serialization.boolean()), - metricResetAt: core.serialization.property("metric_reset_at", core.serialization.date().optional()), - monthlyUsageBasedPrice: core.serialization.property("monthly_usage_based_price", BillingPriceView.optional()), - priceBehavior: core.serialization.property("price_behavior", core.serialization.string().optional()), - softLimit: core.serialization.property("soft_limit", core.serialization.string()), - usage: core.serialization.string(), - valueNumeric: core.serialization.property("value_numeric", core.serialization.number().optional()), - yearlyUsageBasedPrice: core.serialization.property("yearly_usage_based_price", BillingPriceView.optional()), -}); - -export declare namespace FeatureUsageDataResponseData { - export interface Raw { - credit_type_id?: string | null; - credit_usage?: CreditUsageResponseData.Raw | null; - entitlement_source: string; - entitlement_value_type: string; - feature_id: string; - feature_name: string; - feature_type: FeatureType.Raw; - hard_limit: string; - has_access: boolean; - metric_reset_at?: string | null; - monthly_usage_based_price?: BillingPriceView.Raw | null; - price_behavior?: string | null; - soft_limit: string; - usage: string; - value_numeric?: number | null; - yearly_usage_based_price?: BillingPriceView.Raw | null; - } -} diff --git a/src/serialization/types/FeatureUsageLegacyResponseData.ts b/src/serialization/types/FeatureUsageLegacyResponseData.ts new file mode 100644 index 00000000..3299a107 --- /dev/null +++ b/src/serialization/types/FeatureUsageLegacyResponseData.ts @@ -0,0 +1,30 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CreditUsage } from "./CreditUsage"; +import { FeatureView } from "./FeatureView"; + +export const FeatureUsageLegacyResponseData: core.serialization.ObjectSchema< + serializers.FeatureUsageLegacyResponseData.Raw, + Schematic.FeatureUsageLegacyResponseData +> = core.serialization.object({ + allocation: core.serialization.property("Allocation", core.serialization.number().optional()), + creditUsage: core.serialization.property("CreditUsage", CreditUsage.optional()), + entitlement: core.serialization.property("Entitlement", core.serialization.string()), + feature: core.serialization.property("Feature", FeatureView.optional()), + metricResetAt: core.serialization.property("MetricResetAt", core.serialization.date().optional()), + usage: core.serialization.property("Usage", core.serialization.number().optional()), +}); + +export declare namespace FeatureUsageLegacyResponseData { + export interface Raw { + Allocation?: number | null; + CreditUsage?: CreditUsage.Raw | null; + Entitlement: string; + Feature?: FeatureView.Raw | null; + MetricResetAt?: string | null; + Usage?: number | null; + } +} diff --git a/src/serialization/types/FeatureUsageTimeSeriesResponseData.ts b/src/serialization/types/FeatureUsageTimeSeriesResponseData.ts new file mode 100644 index 00000000..2d7accd4 --- /dev/null +++ b/src/serialization/types/FeatureUsageTimeSeriesResponseData.ts @@ -0,0 +1,29 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { FeatureType } from "./FeatureType"; +import { LimitTimeSeriesPointResponseData } from "./LimitTimeSeriesPointResponseData"; +import { UsageTimeSeriesPointResponseData } from "./UsageTimeSeriesPointResponseData"; + +export const FeatureUsageTimeSeriesResponseData: core.serialization.ObjectSchema< + serializers.FeatureUsageTimeSeriesResponseData.Raw, + Schematic.FeatureUsageTimeSeriesResponseData +> = core.serialization.object({ + featureId: core.serialization.property("feature_id", core.serialization.string()), + featureType: core.serialization.property("feature_type", FeatureType), + limits: core.serialization.list(LimitTimeSeriesPointResponseData), + periodType: core.serialization.property("period_type", core.serialization.string().optional()), + usagePoints: core.serialization.property("usage_points", core.serialization.list(UsageTimeSeriesPointResponseData)), +}); + +export declare namespace FeatureUsageTimeSeriesResponseData { + export interface Raw { + feature_id: string; + feature_type: FeatureType.Raw; + limits: LimitTimeSeriesPointResponseData.Raw[]; + period_type?: string | null; + usage_points: UsageTimeSeriesPointResponseData.Raw[]; + } +} diff --git a/src/serialization/types/FeatureView.ts b/src/serialization/types/FeatureView.ts new file mode 100644 index 00000000..a1a35110 --- /dev/null +++ b/src/serialization/types/FeatureView.ts @@ -0,0 +1,56 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { EntityTraitDefinitionResponseData } from "./EntityTraitDefinitionResponseData"; +import { EventSummaryResponseData } from "./EventSummaryResponseData"; +import { FeatureLifecyclePhase } from "./FeatureLifecyclePhase"; +import { FeatureType } from "./FeatureType"; +import { FlagView } from "./FlagView"; +import { PreviewObject } from "./PreviewObject"; + +export const FeatureView: core.serialization.ObjectSchema = + core.serialization.object({ + accountId: core.serialization.property("account_id", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + description: core.serialization.string(), + eventSubtype: core.serialization.property("event_subtype", core.serialization.string().optional()), + eventSummary: core.serialization.property("event_summary", EventSummaryResponseData.optional()), + featureType: core.serialization.property("feature_type", FeatureType), + flags: core.serialization.list(FlagView), + icon: core.serialization.string(), + id: core.serialization.string(), + lifecyclePhase: core.serialization.property("lifecycle_phase", FeatureLifecyclePhase.optional()), + maintainerId: core.serialization.property("maintainer_id", core.serialization.string().optional()), + name: core.serialization.string(), + plans: core.serialization.list(PreviewObject), + pluralName: core.serialization.property("plural_name", core.serialization.string().optional()), + singularName: core.serialization.property("singular_name", core.serialization.string().optional()), + trait: EntityTraitDefinitionResponseData.optional(), + traitId: core.serialization.property("trait_id", core.serialization.string().optional()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), + }); + +export declare namespace FeatureView { + export interface Raw { + account_id: string; + created_at: string; + description: string; + event_subtype?: string | null; + event_summary?: EventSummaryResponseData.Raw | null; + feature_type: FeatureType.Raw; + flags: FlagView.Raw[]; + icon: string; + id: string; + lifecycle_phase?: FeatureLifecyclePhase.Raw | null; + maintainer_id?: string | null; + name: string; + plans: PreviewObject.Raw[]; + plural_name?: string | null; + singular_name?: string | null; + trait?: EntityTraitDefinitionResponseData.Raw | null; + trait_id?: string | null; + updated_at: string; + } +} diff --git a/src/serialization/types/FlagView.ts b/src/serialization/types/FlagView.ts new file mode 100644 index 00000000..d9239e71 --- /dev/null +++ b/src/serialization/types/FlagView.ts @@ -0,0 +1,45 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { FeatureResponseData } from "./FeatureResponseData"; +import { FlagType } from "./FlagType"; +import { RuleView } from "./RuleView"; + +export const FlagView: core.serialization.ObjectSchema = + core.serialization.object({ + accountId: core.serialization.property("account_id", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + defaultValue: core.serialization.property("default_value", core.serialization.boolean()), + description: core.serialization.string(), + feature: FeatureResponseData.optional(), + featureId: core.serialization.property("feature_id", core.serialization.string().optional()), + flagType: core.serialization.property("flag_type", FlagType), + id: core.serialization.string(), + key: core.serialization.string(), + lastCheckedAt: core.serialization.property("last_checked_at", core.serialization.date().optional()), + maintainerId: core.serialization.property("maintainer_id", core.serialization.string().optional()), + name: core.serialization.string(), + rules: core.serialization.list(RuleView), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), + }); + +export declare namespace FlagView { + export interface Raw { + account_id: string; + created_at: string; + default_value: boolean; + description: string; + feature?: FeatureResponseData.Raw | null; + feature_id?: string | null; + flag_type: FlagType.Raw; + id: string; + key: string; + last_checked_at?: string | null; + maintainer_id?: string | null; + name: string; + rules: RuleView.Raw[]; + updated_at: string; + } +} diff --git a/src/serialization/types/LimitTimeSeriesPointResponseData.ts b/src/serialization/types/LimitTimeSeriesPointResponseData.ts new file mode 100644 index 00000000..fbaddcec --- /dev/null +++ b/src/serialization/types/LimitTimeSeriesPointResponseData.ts @@ -0,0 +1,30 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { EntitlementPriceBehavior } from "./EntitlementPriceBehavior"; +import { EntitlementType } from "./EntitlementType"; + +export const LimitTimeSeriesPointResponseData: core.serialization.ObjectSchema< + serializers.LimitTimeSeriesPointResponseData.Raw, + Schematic.LimitTimeSeriesPointResponseData +> = core.serialization.object({ + effectiveAt: core.serialization.property("effective_at", core.serialization.date()), + isSoftLimit: core.serialization.property("is_soft_limit", core.serialization.boolean()), + limitSource: core.serialization.property("limit_source", EntitlementType), + limitValue: core.serialization.property("limit_value", core.serialization.number().optional()), + planId: core.serialization.property("plan_id", core.serialization.string().optional()), + priceBehavior: core.serialization.property("price_behavior", EntitlementPriceBehavior.optional()), +}); + +export declare namespace LimitTimeSeriesPointResponseData { + export interface Raw { + effective_at: string; + is_soft_limit: boolean; + limit_source: EntitlementType.Raw; + limit_value?: number | null; + plan_id?: string | null; + price_behavior?: EntitlementPriceBehavior.Raw | null; + } +} diff --git a/src/serialization/types/PlanChangeAction.ts b/src/serialization/types/PlanChangeAction.ts index 6cc08b69..e1c54a08 100644 --- a/src/serialization/types/PlanChangeAction.ts +++ b/src/serialization/types/PlanChangeAction.ts @@ -14,6 +14,7 @@ export const PlanChangeAction: core.serialization.Schema = core.serialization.enum_(["api_key", "app_user", "system", "temporary_access_token"]); - -export declare namespace PlanChangeActorType { - export type Raw = "api_key" | "app_user" | "system" | "temporary_access_token"; -} diff --git a/src/serialization/types/PlanChangeResponseData.ts b/src/serialization/types/PlanChangeResponseData.ts index c632fdca..73a58a54 100644 --- a/src/serialization/types/PlanChangeResponseData.ts +++ b/src/serialization/types/PlanChangeResponseData.ts @@ -3,11 +3,11 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -import { ApiKeyRequestListResponseData } from "./ApiKeyRequestListResponseData"; +import { ActorType } from "./ActorType"; import { ApiKeyResponseData } from "./ApiKeyResponseData"; +import { AuditLogListResponseData } from "./AuditLogListResponseData"; import { CompanyResponseData } from "./CompanyResponseData"; import { PlanChangeAction } from "./PlanChangeAction"; -import { PlanChangeActorType } from "./PlanChangeActorType"; import { PlanChangeBasePlanAction } from "./PlanChangeBasePlanAction"; import { PlanChangeSubscriptionAction } from "./PlanChangeSubscriptionAction"; import { PlanSnapshotView } from "./PlanSnapshotView"; @@ -18,11 +18,11 @@ export const PlanChangeResponseData: core.serialization.ObjectSchema< Schematic.PlanChangeResponseData > = core.serialization.object({ action: PlanChangeAction, - actorType: core.serialization.property("actor_type", PlanChangeActorType), + actorType: core.serialization.property("actor_type", ActorType), addOnsAdded: core.serialization.property("add_ons_added", core.serialization.list(PlanSnapshotView)), addOnsRemoved: core.serialization.property("add_ons_removed", core.serialization.list(PlanSnapshotView)), apiKey: core.serialization.property("api_key", ApiKeyResponseData.optional()), - apiKeyRequest: core.serialization.property("api_key_request", ApiKeyRequestListResponseData.optional()), + auditLog: core.serialization.property("audit_log", AuditLogListResponseData.optional()), basePlan: core.serialization.property("base_plan", PlanSnapshotView.optional()), basePlanAction: core.serialization.property("base_plan_action", PlanChangeBasePlanAction.optional()), company: CompanyResponseData.optional(), @@ -45,11 +45,11 @@ export const PlanChangeResponseData: core.serialization.ObjectSchema< export declare namespace PlanChangeResponseData { export interface Raw { action: PlanChangeAction.Raw; - actor_type: PlanChangeActorType.Raw; + actor_type: ActorType.Raw; add_ons_added: PlanSnapshotView.Raw[]; add_ons_removed: PlanSnapshotView.Raw[]; api_key?: ApiKeyResponseData.Raw | null; - api_key_request?: ApiKeyRequestListResponseData.Raw | null; + audit_log?: AuditLogListResponseData.Raw | null; base_plan?: PlanSnapshotView.Raw | null; base_plan_action?: PlanChangeBasePlanAction.Raw | null; company?: CompanyResponseData.Raw | null; diff --git a/src/serialization/types/PlanCreditGrantView.ts b/src/serialization/types/PlanCreditGrantView.ts index 8b580caf..4b704cee 100644 --- a/src/serialization/types/PlanCreditGrantView.ts +++ b/src/serialization/types/PlanCreditGrantView.ts @@ -5,9 +5,11 @@ import * as core from "../../core"; import type * as serializers from "../index"; import { BillingCreditExpiryType } from "./BillingCreditExpiryType"; import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit"; +import { BillingCreditView } from "./BillingCreditView"; import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence"; import { BillingPlanCreditGrantResetStart } from "./BillingPlanCreditGrantResetStart"; import { BillingPlanCreditGrantResetType } from "./BillingPlanCreditGrantResetType"; +import { GenericPreviewObject } from "./GenericPreviewObject"; export const PlanCreditGrantView: core.serialization.ObjectSchema< serializers.PlanCreditGrantView.Raw, @@ -42,6 +44,7 @@ export const PlanCreditGrantView: core.serialization.ObjectSchema< core.serialization.number().optional(), ), createdAt: core.serialization.property("created_at", core.serialization.date()), + credit: BillingCreditView.optional(), creditAmount: core.serialization.property("credit_amount", core.serialization.number()), creditDescription: core.serialization.property("credit_description", core.serialization.string()), creditIcon: core.serialization.property("credit_icon", core.serialization.string().optional()), @@ -51,11 +54,12 @@ export const PlanCreditGrantView: core.serialization.ObjectSchema< expiryUnit: core.serialization.property("expiry_unit", BillingCreditExpiryUnit.optional()), expiryUnitCount: core.serialization.property("expiry_unit_count", core.serialization.number().optional()), id: core.serialization.string(), + plan: GenericPreviewObject.optional(), planId: core.serialization.property("plan_id", core.serialization.string()), - planName: core.serialization.property("plan_name", core.serialization.string()), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), pluralName: core.serialization.property("plural_name", core.serialization.string().optional()), - resetCadence: core.serialization.property("reset_cadence", BillingPlanCreditGrantResetCadence), - resetStart: core.serialization.property("reset_start", BillingPlanCreditGrantResetStart), + resetCadence: core.serialization.property("reset_cadence", BillingPlanCreditGrantResetCadence.optional()), + resetStart: core.serialization.property("reset_start", BillingPlanCreditGrantResetStart.optional()), resetType: core.serialization.property("reset_type", BillingPlanCreditGrantResetType), singularName: core.serialization.property("singular_name", core.serialization.string().optional()), updatedAt: core.serialization.property("updated_at", core.serialization.date()), @@ -71,6 +75,7 @@ export declare namespace PlanCreditGrantView { billing_credit_auto_topup_expiry_unit_count?: number | null; billing_credit_auto_topup_threshold_percent?: number | null; created_at: string; + credit?: BillingCreditView.Raw | null; credit_amount: number; credit_description: string; credit_icon?: string | null; @@ -80,11 +85,12 @@ export declare namespace PlanCreditGrantView { expiry_unit?: BillingCreditExpiryUnit.Raw | null; expiry_unit_count?: number | null; id: string; + plan?: GenericPreviewObject.Raw | null; plan_id: string; - plan_name: string; + plan_version_id?: string | null; plural_name?: string | null; - reset_cadence: BillingPlanCreditGrantResetCadence.Raw; - reset_start: BillingPlanCreditGrantResetStart.Raw; + reset_cadence?: BillingPlanCreditGrantResetCadence.Raw | null; + reset_start?: BillingPlanCreditGrantResetStart.Raw | null; reset_type: BillingPlanCreditGrantResetType.Raw; singular_name?: string | null; updated_at: string; diff --git a/src/serialization/types/PlanDetailResponseData.ts b/src/serialization/types/PlanDetailResponseData.ts index 18c79219..b139bf58 100644 --- a/src/serialization/types/PlanDetailResponseData.ts +++ b/src/serialization/types/PlanDetailResponseData.ts @@ -16,6 +16,7 @@ export const PlanDetailResponseData: core.serialization.ObjectSchema< serializers.PlanDetailResponseData.Raw, Schematic.PlanDetailResponseData > = core.serialization.object({ + activeVersion: core.serialization.property("active_version", PlanVersionResponseData.optional()), audienceType: core.serialization.property("audience_type", core.serialization.string().optional()), billingProduct: core.serialization.property("billing_product", BillingProductDetailResponseData.optional()), chargeType: core.serialization.property("charge_type", ChargeType), @@ -23,6 +24,7 @@ export const PlanDetailResponseData: core.serialization.ObjectSchema< controlledBy: core.serialization.property("controlled_by", PlanControlledByType), createdAt: core.serialization.property("created_at", core.serialization.date()), description: core.serialization.string(), + draftVersion: core.serialization.property("draft_version", PlanVersionResponseData.optional()), features: core.serialization.list(FeatureDetailResponseData), icon: core.serialization.string(), id: core.serialization.string(), @@ -45,6 +47,7 @@ export const PlanDetailResponseData: core.serialization.ObjectSchema< export declare namespace PlanDetailResponseData { export interface Raw { + active_version?: PlanVersionResponseData.Raw | null; audience_type?: string | null; billing_product?: BillingProductDetailResponseData.Raw | null; charge_type: ChargeType.Raw; @@ -52,6 +55,7 @@ export declare namespace PlanDetailResponseData { controlled_by: PlanControlledByType.Raw; created_at: string; description: string; + draft_version?: PlanVersionResponseData.Raw | null; features: FeatureDetailResponseData.Raw[]; icon: string; id: string; diff --git a/src/serialization/types/PlanGroupDetailResponseData.ts b/src/serialization/types/PlanGroupDetailResponseData.ts index 01d7f094..167b6a2f 100644 --- a/src/serialization/types/PlanGroupDetailResponseData.ts +++ b/src/serialization/types/PlanGroupDetailResponseData.ts @@ -59,6 +59,14 @@ export const PlanGroupDetailResponseData: core.serialization.ObjectSchema< core.serialization.string().optional(), ), prorationBehavior: core.serialization.property("proration_behavior", core.serialization.string()), + scheduledDowngradeBehavior: core.serialization.property( + "scheduled_downgrade_behavior", + core.serialization.string().optional(), + ), + scheduledDowngradePreventWhenOverLimit: core.serialization.property( + "scheduled_downgrade_prevent_when_over_limit", + core.serialization.boolean().optional(), + ), showAsMonthlyPrices: core.serialization.property("show_as_monthly_prices", core.serialization.boolean()), showCredits: core.serialization.property("show_credits", core.serialization.boolean()), showPeriodToggle: core.serialization.property("show_period_toggle", core.serialization.boolean()), @@ -107,6 +115,8 @@ export declare namespace PlanGroupDetailResponseData { prevent_self_service_downgrade_button_text?: string | null; prevent_self_service_downgrade_url?: string | null; proration_behavior: string; + scheduled_downgrade_behavior?: string | null; + scheduled_downgrade_prevent_when_over_limit?: boolean | null; show_as_monthly_prices: boolean; show_credits: boolean; show_period_toggle: boolean; diff --git a/src/serialization/types/PlanGroupPlanDetailResponseData.ts b/src/serialization/types/PlanGroupPlanDetailResponseData.ts index f7625ea5..2697f077 100644 --- a/src/serialization/types/PlanGroupPlanDetailResponseData.ts +++ b/src/serialization/types/PlanGroupPlanDetailResponseData.ts @@ -18,6 +18,7 @@ export const PlanGroupPlanDetailResponseData: core.serialization.ObjectSchema< serializers.PlanGroupPlanDetailResponseData.Raw, Schematic.PlanGroupPlanDetailResponseData > = core.serialization.object({ + activeVersion: core.serialization.property("active_version", PlanVersionResponseData.optional()), audienceType: core.serialization.property("audience_type", core.serialization.string().optional()), billingProduct: core.serialization.property("billing_product", BillingProductDetailResponseData.optional()), chargeType: core.serialization.property("charge_type", ChargeType), @@ -30,6 +31,7 @@ export const PlanGroupPlanDetailResponseData: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date()), customPlanConfig: core.serialization.property("custom_plan_config", CustomPlanViewConfigResponseData.optional()), description: core.serialization.string(), + draftVersion: core.serialization.property("draft_version", PlanVersionResponseData.optional()), entitlements: core.serialization.list(PlanEntitlementResponseData), features: core.serialization.list(FeatureDetailResponseData), icon: core.serialization.string(), @@ -54,6 +56,7 @@ export const PlanGroupPlanDetailResponseData: core.serialization.ObjectSchema< export declare namespace PlanGroupPlanDetailResponseData { export interface Raw { + active_version?: PlanVersionResponseData.Raw | null; audience_type?: string | null; billing_product?: BillingProductDetailResponseData.Raw | null; charge_type: ChargeType.Raw; @@ -63,6 +66,7 @@ export declare namespace PlanGroupPlanDetailResponseData { created_at: string; custom_plan_config?: CustomPlanViewConfigResponseData.Raw | null; description: string; + draft_version?: PlanVersionResponseData.Raw | null; entitlements: PlanEntitlementResponseData.Raw[]; features: FeatureDetailResponseData.Raw[]; icon: string; diff --git a/src/serialization/types/PlanGroupResponseData.ts b/src/serialization/types/PlanGroupResponseData.ts index 58295a63..7d92e8c3 100644 --- a/src/serialization/types/PlanGroupResponseData.ts +++ b/src/serialization/types/PlanGroupResponseData.ts @@ -43,6 +43,14 @@ export const PlanGroupResponseData: core.serialization.ObjectSchema< core.serialization.string().optional(), ), prorationBehavior: core.serialization.property("proration_behavior", core.serialization.string()), + scheduledDowngradeBehavior: core.serialization.property( + "scheduled_downgrade_behavior", + core.serialization.string().optional(), + ), + scheduledDowngradePreventWhenOverLimit: core.serialization.property( + "scheduled_downgrade_prevent_when_over_limit", + core.serialization.boolean().optional(), + ), showAsMonthlyPrices: core.serialization.property("show_as_monthly_prices", core.serialization.boolean()), showCredits: core.serialization.property("show_credits", core.serialization.boolean()), showPeriodToggle: core.serialization.property("show_period_toggle", core.serialization.boolean()), @@ -82,6 +90,8 @@ export declare namespace PlanGroupResponseData { prevent_self_service_downgrade_button_text?: string | null; prevent_self_service_downgrade_url?: string | null; proration_behavior: string; + scheduled_downgrade_behavior?: string | null; + scheduled_downgrade_prevent_when_over_limit?: boolean | null; show_as_monthly_prices: boolean; show_credits: boolean; show_period_toggle: boolean; diff --git a/src/serialization/types/PlanVersionCompanyMigrationResponseData.ts b/src/serialization/types/PlanVersionCompanyMigrationResponseData.ts new file mode 100644 index 00000000..6a8d7eb1 --- /dev/null +++ b/src/serialization/types/PlanVersionCompanyMigrationResponseData.ts @@ -0,0 +1,39 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { PlanVersionCompanyMigrationStatus } from "./PlanVersionCompanyMigrationStatus"; + +export const PlanVersionCompanyMigrationResponseData: core.serialization.ObjectSchema< + serializers.PlanVersionCompanyMigrationResponseData.Raw, + Schematic.PlanVersionCompanyMigrationResponseData +> = core.serialization.object({ + companyId: core.serialization.property("company_id", core.serialization.string()), + companyName: core.serialization.property("company_name", core.serialization.string()), + completedAt: core.serialization.property("completed_at", core.serialization.date().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + error: core.serialization.string().optional(), + id: core.serialization.string(), + migrationId: core.serialization.property("migration_id", core.serialization.string()), + planVersionIdFrom: core.serialization.property("plan_version_id_from", core.serialization.string().optional()), + startedAt: core.serialization.property("started_at", core.serialization.date().optional()), + status: PlanVersionCompanyMigrationStatus, + updatedAt: core.serialization.property("updated_at", core.serialization.date()), +}); + +export declare namespace PlanVersionCompanyMigrationResponseData { + export interface Raw { + company_id: string; + company_name: string; + completed_at?: string | null; + created_at: string; + error?: string | null; + id: string; + migration_id: string; + plan_version_id_from?: string | null; + started_at?: string | null; + status: PlanVersionCompanyMigrationStatus.Raw; + updated_at: string; + } +} diff --git a/src/serialization/types/PlanVersionCompanyMigrationStatus.ts b/src/serialization/types/PlanVersionCompanyMigrationStatus.ts new file mode 100644 index 00000000..6f9c9950 --- /dev/null +++ b/src/serialization/types/PlanVersionCompanyMigrationStatus.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const PlanVersionCompanyMigrationStatus: core.serialization.Schema< + serializers.PlanVersionCompanyMigrationStatus.Raw, + Schematic.PlanVersionCompanyMigrationStatus +> = core.serialization.enum_(["completed", "failed", "in_progress", "pending", "skipped"]); + +export declare namespace PlanVersionCompanyMigrationStatus { + export type Raw = "completed" | "failed" | "in_progress" | "pending" | "skipped"; +} diff --git a/src/serialization/types/PlanVersionMigrationResponseData.ts b/src/serialization/types/PlanVersionMigrationResponseData.ts new file mode 100644 index 00000000..8e1f5525 --- /dev/null +++ b/src/serialization/types/PlanVersionMigrationResponseData.ts @@ -0,0 +1,48 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { PlanVersionMigrationStatus } from "./PlanVersionMigrationStatus"; +import { PlanVersionMigrationStrategy } from "./PlanVersionMigrationStrategy"; + +export const PlanVersionMigrationResponseData: core.serialization.ObjectSchema< + serializers.PlanVersionMigrationResponseData.Raw, + Schematic.PlanVersionMigrationResponseData +> = core.serialization.object({ + completedAt: core.serialization.property("completed_at", core.serialization.date().optional()), + completedCompanies: core.serialization.property("completed_companies", core.serialization.number()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + error: core.serialization.string().optional(), + failedCompanies: core.serialization.property("failed_companies", core.serialization.number()), + id: core.serialization.string(), + planId: core.serialization.property("plan_id", core.serialization.string()), + planVersionIdFrom: core.serialization.property("plan_version_id_from", core.serialization.string().optional()), + planVersionIdTo: core.serialization.property("plan_version_id_to", core.serialization.string()), + skippedCompanies: core.serialization.property("skipped_companies", core.serialization.number()), + startedAt: core.serialization.property("started_at", core.serialization.date().optional()), + status: PlanVersionMigrationStatus, + strategy: PlanVersionMigrationStrategy, + totalCompanies: core.serialization.property("total_companies", core.serialization.number()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), +}); + +export declare namespace PlanVersionMigrationResponseData { + export interface Raw { + completed_at?: string | null; + completed_companies: number; + created_at: string; + error?: string | null; + failed_companies: number; + id: string; + plan_id: string; + plan_version_id_from?: string | null; + plan_version_id_to: string; + skipped_companies: number; + started_at?: string | null; + status: PlanVersionMigrationStatus.Raw; + strategy: PlanVersionMigrationStrategy.Raw; + total_companies: number; + updated_at: string; + } +} diff --git a/src/serialization/types/PlanVersionMigrationStatus.ts b/src/serialization/types/PlanVersionMigrationStatus.ts new file mode 100644 index 00000000..89935636 --- /dev/null +++ b/src/serialization/types/PlanVersionMigrationStatus.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const PlanVersionMigrationStatus: core.serialization.Schema< + serializers.PlanVersionMigrationStatus.Raw, + Schematic.PlanVersionMigrationStatus +> = core.serialization.enum_(["completed", "failed", "in_progress", "pending"]); + +export declare namespace PlanVersionMigrationStatus { + export type Raw = "completed" | "failed" | "in_progress" | "pending"; +} diff --git a/src/serialization/types/PlanVersionMigrationStrategy.ts b/src/serialization/types/PlanVersionMigrationStrategy.ts new file mode 100644 index 00000000..20855053 --- /dev/null +++ b/src/serialization/types/PlanVersionMigrationStrategy.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const PlanVersionMigrationStrategy: core.serialization.Schema< + serializers.PlanVersionMigrationStrategy.Raw, + Schematic.PlanVersionMigrationStrategy +> = core.serialization.enum_(["immediate", "leave"]); + +export declare namespace PlanVersionMigrationStrategy { + export type Raw = "immediate" | "leave"; +} diff --git a/src/serialization/types/PlanViewPublicResponseData.ts b/src/serialization/types/PlanViewPublicResponseData.ts new file mode 100644 index 00000000..f005d770 --- /dev/null +++ b/src/serialization/types/PlanViewPublicResponseData.ts @@ -0,0 +1,90 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { BillingPriceResponseData } from "./BillingPriceResponseData"; +import { BillingProductDetailResponseData } from "./BillingProductDetailResponseData"; +import { ChargeType } from "./ChargeType"; +import { CustomPlanConfig } from "./CustomPlanConfig"; +import { FeatureDetailResponseData } from "./FeatureDetailResponseData"; +import { PlanControlledByType } from "./PlanControlledByType"; +import { PlanCreditGrantView } from "./PlanCreditGrantView"; +import { PlanEntitlementResponseData } from "./PlanEntitlementResponseData"; +import { PlanType } from "./PlanType"; +import { PlanVersionResponseData } from "./PlanVersionResponseData"; + +export const PlanViewPublicResponseData: core.serialization.ObjectSchema< + serializers.PlanViewPublicResponseData.Raw, + Schematic.PlanViewPublicResponseData +> = core.serialization.object({ + activeVersion: core.serialization.property("active_version", PlanVersionResponseData.optional()), + audienceType: core.serialization.property("audience_type", core.serialization.string().optional()), + billingProduct: core.serialization.property("billing_product", BillingProductDetailResponseData.optional()), + chargeType: core.serialization.property("charge_type", ChargeType), + companyCount: core.serialization.property("company_count", core.serialization.number()), + compatiblePlanIds: core.serialization.property( + "compatible_plan_ids", + core.serialization.list(core.serialization.string()), + ), + controlledBy: core.serialization.property("controlled_by", PlanControlledByType), + createdAt: core.serialization.property("created_at", core.serialization.date()), + custom: core.serialization.boolean(), + customPlanConfig: core.serialization.property("custom_plan_config", CustomPlanConfig.optional()), + description: core.serialization.string(), + draftVersion: core.serialization.property("draft_version", PlanVersionResponseData.optional()), + entitlements: core.serialization.list(PlanEntitlementResponseData), + features: core.serialization.list(FeatureDetailResponseData), + icon: core.serialization.string(), + id: core.serialization.string(), + includedCreditGrants: core.serialization.property( + "included_credit_grants", + core.serialization.list(PlanCreditGrantView), + ), + isCustom: core.serialization.property("is_custom", core.serialization.boolean()), + isDefault: core.serialization.property("is_default", core.serialization.boolean()), + isFree: core.serialization.property("is_free", core.serialization.boolean()), + isTrialable: core.serialization.property("is_trialable", core.serialization.boolean()), + monthlyPrice: core.serialization.property("monthly_price", BillingPriceResponseData.optional()), + name: core.serialization.string(), + oneTimePrice: core.serialization.property("one_time_price", BillingPriceResponseData.optional()), + planType: core.serialization.property("plan_type", PlanType), + trialDays: core.serialization.property("trial_days", core.serialization.number().optional()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), + versions: core.serialization.list(PlanVersionResponseData), + yearlyPrice: core.serialization.property("yearly_price", BillingPriceResponseData.optional()), +}); + +export declare namespace PlanViewPublicResponseData { + export interface Raw { + active_version?: PlanVersionResponseData.Raw | null; + audience_type?: string | null; + billing_product?: BillingProductDetailResponseData.Raw | null; + charge_type: ChargeType.Raw; + company_count: number; + compatible_plan_ids: string[]; + controlled_by: PlanControlledByType.Raw; + created_at: string; + custom: boolean; + custom_plan_config?: CustomPlanConfig.Raw | null; + description: string; + draft_version?: PlanVersionResponseData.Raw | null; + entitlements: PlanEntitlementResponseData.Raw[]; + features: FeatureDetailResponseData.Raw[]; + icon: string; + id: string; + included_credit_grants: PlanCreditGrantView.Raw[]; + is_custom: boolean; + is_default: boolean; + is_free: boolean; + is_trialable: boolean; + monthly_price?: BillingPriceResponseData.Raw | null; + name: string; + one_time_price?: BillingPriceResponseData.Raw | null; + plan_type: PlanType.Raw; + trial_days?: number | null; + updated_at: string; + versions: PlanVersionResponseData.Raw[]; + yearly_price?: BillingPriceResponseData.Raw | null; + } +} diff --git a/src/serialization/types/PreviewSubscriptionChangeResponseData.ts b/src/serialization/types/PreviewSubscriptionChangeResponseData.ts index da13d19e..bbc2b732 100644 --- a/src/serialization/types/PreviewSubscriptionChangeResponseData.ts +++ b/src/serialization/types/PreviewSubscriptionChangeResponseData.ts @@ -13,12 +13,14 @@ export const PreviewSubscriptionChangeResponseData: core.serialization.ObjectSch amountOff: core.serialization.property("amount_off", core.serialization.number()), dueNow: core.serialization.property("due_now", core.serialization.number()), finance: PreviewSubscriptionFinanceResponseData.optional(), + isScheduledDowngrade: core.serialization.property("is_scheduled_downgrade", core.serialization.boolean()), newCharges: core.serialization.property("new_charges", core.serialization.number()), paymentMethodRequired: core.serialization.property("payment_method_required", core.serialization.boolean()), percentOff: core.serialization.property("percent_off", core.serialization.number()), periodStart: core.serialization.property("period_start", core.serialization.date()), promoCodeApplied: core.serialization.property("promo_code_applied", core.serialization.boolean()), proration: core.serialization.number(), + scheduledChangeTime: core.serialization.property("scheduled_change_time", core.serialization.date().optional()), trialEnd: core.serialization.property("trial_end", core.serialization.date().optional()), usageViolations: core.serialization.property("usage_violations", core.serialization.list(FeatureUsageResponseData)), }); @@ -28,12 +30,14 @@ export declare namespace PreviewSubscriptionChangeResponseData { amount_off: number; due_now: number; finance?: PreviewSubscriptionFinanceResponseData.Raw | null; + is_scheduled_downgrade: boolean; new_charges: number; payment_method_required: boolean; percent_off: number; period_start: string; promo_code_applied: boolean; proration: number; + scheduled_change_time?: string | null; trial_end?: string | null; usage_violations: FeatureUsageResponseData.Raw[]; } diff --git a/src/serialization/types/PublicPlansResponseData.ts b/src/serialization/types/PublicPlansResponseData.ts new file mode 100644 index 00000000..69037949 --- /dev/null +++ b/src/serialization/types/PublicPlansResponseData.ts @@ -0,0 +1,41 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CompatiblePlans } from "./CompatiblePlans"; +import { ComponentCapabilities } from "./ComponentCapabilities"; +import { ComponentDisplaySettings } from "./ComponentDisplaySettings"; +import { PlanViewPublicResponseData } from "./PlanViewPublicResponseData"; + +export const PublicPlansResponseData: core.serialization.ObjectSchema< + serializers.PublicPlansResponseData.Raw, + Schematic.PublicPlansResponseData +> = core.serialization.object({ + activeAddOns: core.serialization.property("active_add_ons", core.serialization.list(PlanViewPublicResponseData)), + activePlans: core.serialization.property("active_plans", core.serialization.list(PlanViewPublicResponseData)), + addOnCompatibilities: core.serialization.property( + "add_on_compatibilities", + core.serialization.list(CompatiblePlans), + ), + capabilities: ComponentCapabilities.optional(), + displaySettings: core.serialization.property("display_settings", ComponentDisplaySettings), + showAsMonthlyPrices: core.serialization.property("show_as_monthly_prices", core.serialization.boolean()), + showCredits: core.serialization.property("show_credits", core.serialization.boolean()), + showPeriodToggle: core.serialization.property("show_period_toggle", core.serialization.boolean()), + showZeroPriceAsFree: core.serialization.property("show_zero_price_as_free", core.serialization.boolean()), +}); + +export declare namespace PublicPlansResponseData { + export interface Raw { + active_add_ons: PlanViewPublicResponseData.Raw[]; + active_plans: PlanViewPublicResponseData.Raw[]; + add_on_compatibilities: CompatiblePlans.Raw[]; + capabilities?: ComponentCapabilities.Raw | null; + display_settings: ComponentDisplaySettings.Raw; + show_as_monthly_prices: boolean; + show_credits: boolean; + show_period_toggle: boolean; + show_zero_price_as_free: boolean; + } +} diff --git a/src/serialization/types/RuleView.ts b/src/serialization/types/RuleView.ts new file mode 100644 index 00000000..6f42614f --- /dev/null +++ b/src/serialization/types/RuleView.ts @@ -0,0 +1,42 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ConditionGroupView } from "./ConditionGroupView"; +import { ConditionView } from "./ConditionView"; + +export const RuleView: core.serialization.ObjectSchema = + core.serialization.object({ + accountId: core.serialization.property("account_id", core.serialization.string()), + conditionGroups: core.serialization.property("condition_groups", core.serialization.list(ConditionGroupView)), + conditions: core.serialization.list(ConditionView), + createdAt: core.serialization.property("created_at", core.serialization.date()), + environmentId: core.serialization.property("environment_id", core.serialization.string()), + flagId: core.serialization.property("flag_id", core.serialization.string().optional()), + id: core.serialization.string(), + name: core.serialization.string(), + planVersionId: core.serialization.property("plan_version_id", core.serialization.string().optional()), + priority: core.serialization.number(), + ruleType: core.serialization.property("rule_type", core.serialization.string()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), + value: core.serialization.boolean(), + }); + +export declare namespace RuleView { + export interface Raw { + account_id: string; + condition_groups: ConditionGroupView.Raw[]; + conditions: ConditionView.Raw[]; + created_at: string; + environment_id: string; + flag_id?: string | null; + id: string; + name: string; + plan_version_id?: string | null; + priority: number; + rule_type: string; + updated_at: string; + value: boolean; + } +} diff --git a/src/serialization/types/RulesEngineSchemaVersion.ts b/src/serialization/types/RulesEngineSchemaVersion.ts index f9438eaa..f06edfea 100644 --- a/src/serialization/types/RulesEngineSchemaVersion.ts +++ b/src/serialization/types/RulesEngineSchemaVersion.ts @@ -7,8 +7,8 @@ import type * as serializers from "../index"; export const RulesEngineSchemaVersion: core.serialization.Schema< serializers.RulesEngineSchemaVersion.Raw, Schematic.RulesEngineSchemaVersion -> = core.serialization.enum_(["549e6fea", "placeholder-for-fern-compatibility"]); +> = core.serialization.enum_(["v0f048dd3", "placeholder-for-fern-compatibility"]); export declare namespace RulesEngineSchemaVersion { - export type Raw = "549e6fea" | "placeholder-for-fern-compatibility"; + export type Raw = "v0f048dd3" | "placeholder-for-fern-compatibility"; } diff --git a/src/serialization/types/RulesengineCheckFlagResult.ts b/src/serialization/types/RulesengineCheckFlagResult.ts index d74f6fe7..0447c9dc 100644 --- a/src/serialization/types/RulesengineCheckFlagResult.ts +++ b/src/serialization/types/RulesengineCheckFlagResult.ts @@ -5,12 +5,14 @@ import * as core from "../../core"; import type * as serializers from "../index"; import { RulesengineCheckFlagResultFeatureUsagePeriod } from "./RulesengineCheckFlagResultFeatureUsagePeriod"; import { RulesengineCheckFlagResultRuleType } from "./RulesengineCheckFlagResultRuleType"; +import { RulesengineFeatureEntitlement } from "./RulesengineFeatureEntitlement"; export const RulesengineCheckFlagResult: core.serialization.ObjectSchema< serializers.RulesengineCheckFlagResult.Raw, Schematic.RulesengineCheckFlagResult > = core.serialization.object({ companyId: core.serialization.property("company_id", core.serialization.string().optional()), + entitlement: RulesengineFeatureEntitlement.optional(), err: core.serialization.string().optional(), featureAllocation: core.serialization.property("feature_allocation", core.serialization.number().optional()), featureUsage: core.serialization.property("feature_usage", core.serialization.number().optional()), @@ -32,6 +34,7 @@ export const RulesengineCheckFlagResult: core.serialization.ObjectSchema< export declare namespace RulesengineCheckFlagResult { export interface Raw { company_id?: string | null; + entitlement?: RulesengineFeatureEntitlement.Raw | null; err?: string | null; feature_allocation?: number | null; feature_usage?: number | null; diff --git a/src/serialization/types/RulesengineCompany.ts b/src/serialization/types/RulesengineCompany.ts index 865a724f..e6ec7b4c 100644 --- a/src/serialization/types/RulesengineCompany.ts +++ b/src/serialization/types/RulesengineCompany.ts @@ -4,6 +4,7 @@ import type * as Schematic from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { RulesengineCompanyMetric } from "./RulesengineCompanyMetric"; +import { RulesengineFeatureEntitlement } from "./RulesengineFeatureEntitlement"; import { RulesengineRule } from "./RulesengineRule"; import { RulesengineSubscription } from "./RulesengineSubscription"; import { RulesengineTrait } from "./RulesengineTrait"; @@ -22,12 +23,16 @@ export const RulesengineCompany: core.serialization.ObjectSchema< "credit_balances", core.serialization.record(core.serialization.string(), core.serialization.number()), ), - crmProductIds: core.serialization.property("crm_product_ids", core.serialization.list(core.serialization.string())), + entitlements: core.serialization.list(RulesengineFeatureEntitlement).optional(), environmentId: core.serialization.property("environment_id", core.serialization.string()), id: core.serialization.string(), keys: core.serialization.record(core.serialization.string(), core.serialization.string()), metrics: core.serialization.list(RulesengineCompanyMetric), planIds: core.serialization.property("plan_ids", core.serialization.list(core.serialization.string())), + planVersionIds: core.serialization.property( + "plan_version_ids", + core.serialization.list(core.serialization.string()), + ), rules: core.serialization.list(RulesengineRule), subscription: RulesengineSubscription.optional(), traits: core.serialization.list(RulesengineTrait), @@ -39,12 +44,13 @@ export declare namespace RulesengineCompany { base_plan_id?: string | null; billing_product_ids: string[]; credit_balances: Record; - crm_product_ids: string[]; + entitlements?: RulesengineFeatureEntitlement.Raw[] | null; environment_id: string; id: string; keys: Record; metrics: RulesengineCompanyMetric.Raw[]; plan_ids: string[]; + plan_version_ids: string[]; rules: RulesengineRule.Raw[]; subscription?: RulesengineSubscription.Raw | null; traits: RulesengineTrait.Raw[]; diff --git a/src/serialization/types/RulesengineConditionConditionType.ts b/src/serialization/types/RulesengineConditionConditionType.ts index 0f1ca846..8507b8c6 100644 --- a/src/serialization/types/RulesengineConditionConditionType.ts +++ b/src/serialization/types/RulesengineConditionConditionType.ts @@ -12,9 +12,9 @@ export const RulesengineConditionConditionType: core.serialization.Schema< "billing_product", "company", "credit", - "crm_product", "metric", "plan", + "plan_version", "trait", "user", ]); @@ -25,9 +25,9 @@ export declare namespace RulesengineConditionConditionType { | "billing_product" | "company" | "credit" - | "crm_product" | "metric" | "plan" + | "plan_version" | "trait" | "user"; } diff --git a/src/serialization/types/RulesengineEntitlementValueType.ts b/src/serialization/types/RulesengineEntitlementValueType.ts new file mode 100644 index 00000000..4176fff4 --- /dev/null +++ b/src/serialization/types/RulesengineEntitlementValueType.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const RulesengineEntitlementValueType: core.serialization.Schema< + serializers.RulesengineEntitlementValueType.Raw, + Schematic.RulesengineEntitlementValueType +> = core.serialization.enum_(["boolean", "credit", "numeric", "trait", "unknown", "unlimited"]); + +export declare namespace RulesengineEntitlementValueType { + export type Raw = "boolean" | "credit" | "numeric" | "trait" | "unknown" | "unlimited"; +} diff --git a/src/serialization/types/RulesengineFeatureEntitlement.ts b/src/serialization/types/RulesengineFeatureEntitlement.ts new file mode 100644 index 00000000..445609b1 --- /dev/null +++ b/src/serialization/types/RulesengineFeatureEntitlement.ts @@ -0,0 +1,47 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { RulesengineEntitlementValueType } from "./RulesengineEntitlementValueType"; +import { RulesengineFeatureEntitlementMetricPeriod } from "./RulesengineFeatureEntitlementMetricPeriod"; +import { RulesengineFeatureEntitlementMonthReset } from "./RulesengineFeatureEntitlementMonthReset"; + +export const RulesengineFeatureEntitlement: core.serialization.ObjectSchema< + serializers.RulesengineFeatureEntitlement.Raw, + Schematic.RulesengineFeatureEntitlement +> = core.serialization.object({ + allocation: core.serialization.number().optional(), + creditId: core.serialization.property("credit_id", core.serialization.string().optional()), + creditRemaining: core.serialization.property("credit_remaining", core.serialization.number().optional()), + creditTotal: core.serialization.property("credit_total", core.serialization.number().optional()), + creditUsed: core.serialization.property("credit_used", core.serialization.number().optional()), + eventName: core.serialization.property("event_name", core.serialization.string().optional()), + featureId: core.serialization.property("feature_id", core.serialization.string()), + featureKey: core.serialization.property("feature_key", core.serialization.string()), + metricPeriod: core.serialization.property("metric_period", RulesengineFeatureEntitlementMetricPeriod.optional()), + metricResetAt: core.serialization.property("metric_reset_at", core.serialization.date().optional()), + monthReset: core.serialization.property("month_reset", RulesengineFeatureEntitlementMonthReset.optional()), + softLimit: core.serialization.property("soft_limit", core.serialization.number().optional()), + usage: core.serialization.number().optional(), + valueType: core.serialization.property("value_type", RulesengineEntitlementValueType), +}); + +export declare namespace RulesengineFeatureEntitlement { + export interface Raw { + allocation?: number | null; + credit_id?: string | null; + credit_remaining?: number | null; + credit_total?: number | null; + credit_used?: number | null; + event_name?: string | null; + feature_id: string; + feature_key: string; + metric_period?: RulesengineFeatureEntitlementMetricPeriod.Raw | null; + metric_reset_at?: string | null; + month_reset?: RulesengineFeatureEntitlementMonthReset.Raw | null; + soft_limit?: number | null; + usage?: number | null; + value_type: RulesengineEntitlementValueType.Raw; + } +} diff --git a/src/serialization/types/RulesengineFeatureEntitlementMetricPeriod.ts b/src/serialization/types/RulesengineFeatureEntitlementMetricPeriod.ts new file mode 100644 index 00000000..0bf19219 --- /dev/null +++ b/src/serialization/types/RulesengineFeatureEntitlementMetricPeriod.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const RulesengineFeatureEntitlementMetricPeriod: core.serialization.Schema< + serializers.RulesengineFeatureEntitlementMetricPeriod.Raw, + Schematic.RulesengineFeatureEntitlementMetricPeriod +> = core.serialization.enum_(["all_time", "current_day", "current_month", "current_week"]); + +export declare namespace RulesengineFeatureEntitlementMetricPeriod { + export type Raw = "all_time" | "current_day" | "current_month" | "current_week"; +} diff --git a/src/serialization/types/RulesengineFeatureEntitlementMonthReset.ts b/src/serialization/types/RulesengineFeatureEntitlementMonthReset.ts new file mode 100644 index 00000000..cff4e293 --- /dev/null +++ b/src/serialization/types/RulesengineFeatureEntitlementMonthReset.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const RulesengineFeatureEntitlementMonthReset: core.serialization.Schema< + serializers.RulesengineFeatureEntitlementMonthReset.Raw, + Schematic.RulesengineFeatureEntitlementMonthReset +> = core.serialization.enum_(["first_of_month", "billing_cycle"]); + +export declare namespace RulesengineFeatureEntitlementMonthReset { + export type Raw = "first_of_month" | "billing_cycle"; +} diff --git a/src/serialization/types/ScheduledCheckoutResponseData.ts b/src/serialization/types/ScheduledCheckoutResponseData.ts new file mode 100644 index 00000000..9fde1e93 --- /dev/null +++ b/src/serialization/types/ScheduledCheckoutResponseData.ts @@ -0,0 +1,45 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ScheduledCheckoutStatus } from "./ScheduledCheckoutStatus"; + +export const ScheduledCheckoutResponseData: core.serialization.ObjectSchema< + serializers.ScheduledCheckoutResponseData.Raw, + Schematic.ScheduledCheckoutResponseData +> = core.serialization.object({ + actorType: core.serialization.property("actor_type", core.serialization.string()), + companyId: core.serialization.property("company_id", core.serialization.string()), + completedAt: core.serialization.property("completed_at", core.serialization.date().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date()), + errorMessage: core.serialization.property("error_message", core.serialization.string().optional()), + executeAfter: core.serialization.property("execute_after", core.serialization.date()), + fromPlanId: core.serialization.property("from_plan_id", core.serialization.string()), + id: core.serialization.string(), + scheduledInterval: core.serialization.property("scheduled_interval", core.serialization.string().optional()), + scheduledPrice: core.serialization.property("scheduled_price", core.serialization.number().optional()), + startedAt: core.serialization.property("started_at", core.serialization.date().optional()), + status: ScheduledCheckoutStatus, + toPlanId: core.serialization.property("to_plan_id", core.serialization.string()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), +}); + +export declare namespace ScheduledCheckoutResponseData { + export interface Raw { + actor_type: string; + company_id: string; + completed_at?: string | null; + created_at: string; + error_message?: string | null; + execute_after: string; + from_plan_id: string; + id: string; + scheduled_interval?: string | null; + scheduled_price?: number | null; + started_at?: string | null; + status: ScheduledCheckoutStatus.Raw; + to_plan_id: string; + updated_at: string; + } +} diff --git a/src/serialization/types/ScheduledCheckoutStatus.ts b/src/serialization/types/ScheduledCheckoutStatus.ts new file mode 100644 index 00000000..31f00a97 --- /dev/null +++ b/src/serialization/types/ScheduledCheckoutStatus.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const ScheduledCheckoutStatus: core.serialization.Schema< + serializers.ScheduledCheckoutStatus.Raw, + Schematic.ScheduledCheckoutStatus +> = core.serialization.enum_(["cancelled", "error", "executing", "pending", "success"]); + +export declare namespace ScheduledCheckoutStatus { + export type Raw = "cancelled" | "error" | "executing" | "pending" | "success"; +} diff --git a/src/serialization/types/ScheduledDowngradeConfigBehavior.ts b/src/serialization/types/ScheduledDowngradeConfigBehavior.ts new file mode 100644 index 00000000..e3e1ce23 --- /dev/null +++ b/src/serialization/types/ScheduledDowngradeConfigBehavior.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const ScheduledDowngradeConfigBehavior: core.serialization.Schema< + serializers.ScheduledDowngradeConfigBehavior.Raw, + Schematic.ScheduledDowngradeConfigBehavior +> = core.serialization.enum_(["end_of_billing_period", "none"]); + +export declare namespace ScheduledDowngradeConfigBehavior { + export type Raw = "end_of_billing_period" | "none"; +} diff --git a/src/serialization/types/ScheduledDowngradeResponseData.ts b/src/serialization/types/ScheduledDowngradeResponseData.ts new file mode 100644 index 00000000..f2d1a2af --- /dev/null +++ b/src/serialization/types/ScheduledDowngradeResponseData.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const ScheduledDowngradeResponseData: core.serialization.ObjectSchema< + serializers.ScheduledDowngradeResponseData.Raw, + Schematic.ScheduledDowngradeResponseData +> = core.serialization.object({ + currency: core.serialization.string(), + effectiveAfter: core.serialization.property("effective_after", core.serialization.date()), + fromPlanId: core.serialization.property("from_plan_id", core.serialization.string()), + fromPlanName: core.serialization.property("from_plan_name", core.serialization.string()), + fromSubscriptionPrice: core.serialization.property("from_subscription_price", core.serialization.number()), + id: core.serialization.string(), + interval: core.serialization.string(), + scheduledInterval: core.serialization.property("scheduled_interval", core.serialization.string().optional()), + scheduledPrice: core.serialization.property("scheduled_price", core.serialization.number().optional()), + toPlanId: core.serialization.property("to_plan_id", core.serialization.string()), + toPlanName: core.serialization.property("to_plan_name", core.serialization.string()), +}); + +export declare namespace ScheduledDowngradeResponseData { + export interface Raw { + currency: string; + effective_after: string; + from_plan_id: string; + from_plan_name: string; + from_subscription_price: number; + id: string; + interval: string; + scheduled_interval?: string | null; + scheduled_price?: number | null; + to_plan_id: string; + to_plan_name: string; + } +} diff --git a/src/serialization/types/TimeSeriesGranularity.ts b/src/serialization/types/TimeSeriesGranularity.ts new file mode 100644 index 00000000..2c684c78 --- /dev/null +++ b/src/serialization/types/TimeSeriesGranularity.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const TimeSeriesGranularity: core.serialization.Schema< + serializers.TimeSeriesGranularity.Raw, + Schematic.TimeSeriesGranularity +> = core.serialization.enum_(["daily", "hourly", "monthly", "weekly"]); + +export declare namespace TimeSeriesGranularity { + export type Raw = "daily" | "hourly" | "monthly" | "weekly"; +} diff --git a/src/serialization/types/UpsertCompanyRequestBody.ts b/src/serialization/types/UpsertCompanyRequestBody.ts index cfd4712b..9e0e5d3d 100644 --- a/src/serialization/types/UpsertCompanyRequestBody.ts +++ b/src/serialization/types/UpsertCompanyRequestBody.ts @@ -12,6 +12,7 @@ export const UpsertCompanyRequestBody: core.serialization.ObjectSchema< keys: core.serialization.record(core.serialization.string(), core.serialization.string()), lastSeenAt: core.serialization.property("last_seen_at", core.serialization.date().optional()), name: core.serialization.string().optional(), + preventKeyRemap: core.serialization.property("prevent_key_remap", core.serialization.boolean().optional()), traits: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), updateOnly: core.serialization.property("update_only", core.serialization.boolean().optional()), }); @@ -22,6 +23,7 @@ export declare namespace UpsertCompanyRequestBody { keys: Record; last_seen_at?: string | null; name?: string | null; + prevent_key_remap?: boolean | null; traits?: Record | null; update_only?: boolean | null; } diff --git a/src/serialization/types/UsageTimeSeriesPointResponseData.ts b/src/serialization/types/UsageTimeSeriesPointResponseData.ts new file mode 100644 index 00000000..37cb72cd --- /dev/null +++ b/src/serialization/types/UsageTimeSeriesPointResponseData.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const UsageTimeSeriesPointResponseData: core.serialization.ObjectSchema< + serializers.UsageTimeSeriesPointResponseData.Raw, + Schematic.UsageTimeSeriesPointResponseData +> = core.serialization.object({ + periodEnd: core.serialization.property("period_end", core.serialization.date().optional()), + periodStart: core.serialization.property("period_start", core.serialization.date().optional()), + timestamp: core.serialization.date(), + usage: core.serialization.number(), +}); + +export declare namespace UsageTimeSeriesPointResponseData { + export interface Raw { + period_end?: string | null; + period_start?: string | null; + timestamp: string; + usage: number; + } +} diff --git a/src/serialization/types/WebFeatureUsageWebhookOutput.ts b/src/serialization/types/WebFeatureUsageWebhookOutput.ts new file mode 100644 index 00000000..783f1114 --- /dev/null +++ b/src/serialization/types/WebFeatureUsageWebhookOutput.ts @@ -0,0 +1,33 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CompanyDetailResponseData } from "./CompanyDetailResponseData"; +import { CreditUsage } from "./CreditUsage"; +import { FeatureView } from "./FeatureView"; + +export const WebFeatureUsageWebhookOutput: core.serialization.ObjectSchema< + serializers.WebFeatureUsageWebhookOutput.Raw, + Schematic.WebFeatureUsageWebhookOutput +> = core.serialization.object({ + allocation: core.serialization.property("Allocation", core.serialization.number().optional()), + creditUsage: core.serialization.property("CreditUsage", CreditUsage.optional()), + entitlement: core.serialization.property("Entitlement", core.serialization.string()), + feature: core.serialization.property("Feature", FeatureView.optional()), + metricResetAt: core.serialization.property("MetricResetAt", core.serialization.date().optional()), + usage: core.serialization.property("Usage", core.serialization.number().optional()), + company: CompanyDetailResponseData.optional(), +}); + +export declare namespace WebFeatureUsageWebhookOutput { + export interface Raw { + Allocation?: number | null; + CreditUsage?: CreditUsage.Raw | null; + Entitlement: string; + Feature?: FeatureView.Raw | null; + MetricResetAt?: string | null; + Usage?: number | null; + company?: CompanyDetailResponseData.Raw | null; + } +} diff --git a/src/serialization/types/WebhookRequestType.ts b/src/serialization/types/WebhookRequestType.ts index e38cce50..56b2144f 100644 --- a/src/serialization/types/WebhookRequestType.ts +++ b/src/serialization/types/WebhookRequestType.ts @@ -38,6 +38,7 @@ export const WebhookRequestType: core.serialization.Schema< "plan.entitlement.deleted", "plan.entitlement.updated", "plan.updated", + "plan_version.deleted", "rule.deleted", "test.send", "user.created", @@ -79,6 +80,7 @@ export declare namespace WebhookRequestType { | "plan.entitlement.deleted" | "plan.entitlement.updated" | "plan.updated" + | "plan_version.deleted" | "rule.deleted" | "test.send" | "user.created" diff --git a/src/serialization/types/WhoAmIResponseData.ts b/src/serialization/types/WhoAmIResponseData.ts new file mode 100644 index 00000000..10a20baa --- /dev/null +++ b/src/serialization/types/WhoAmIResponseData.ts @@ -0,0 +1,35 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Schematic from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { EnvironmentResponseData } from "./EnvironmentResponseData"; + +export const WhoAmIResponseData: core.serialization.ObjectSchema< + serializers.WhoAmIResponseData.Raw, + Schematic.WhoAmIResponseData +> = core.serialization.object({ + accountId: core.serialization.property("account_id", core.serialization.string()), + accountName: core.serialization.property("account_name", core.serialization.string()), + actorType: core.serialization.property("actor_type", core.serialization.string()), + apiKeyId: core.serialization.property("api_key_id", core.serialization.string().optional()), + environmentId: core.serialization.property("environment_id", core.serialization.string().optional()), + environments: core.serialization.list(EnvironmentResponseData), + stripeUserId: core.serialization.property("stripe_user_id", core.serialization.string().optional()), + userId: core.serialization.property("user_id", core.serialization.string().optional()), + userName: core.serialization.property("user_name", core.serialization.string().optional()), +}); + +export declare namespace WhoAmIResponseData { + export interface Raw { + account_id: string; + account_name: string; + actor_type: string; + api_key_id?: string | null; + environment_id?: string | null; + environments: EnvironmentResponseData.Raw[]; + stripe_user_id?: string | null; + user_id?: string | null; + user_name?: string | null; + } +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index 08e8d434..4d6c6fc6 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -1,9 +1,10 @@ +export * from "./ActorType"; export * from "./ApiError"; export * from "./ApiKeyCreateResponseData"; -export * from "./ApiKeyRequestListResponseData"; -export * from "./ApiKeyRequestResponseData"; export * from "./ApiKeyResponseData"; export * from "./ApiKeyScope"; +export * from "./AuditLogListResponseData"; +export * from "./AuditLogResponseData"; export * from "./BillingCouponResponseData"; export * from "./BillingCreditBundleResponseData"; export * from "./BillingCreditBundleStatus"; @@ -18,6 +19,7 @@ export * from "./BillingCreditGrantZeroedOutReason"; export * from "./BillingCreditLedgerResponseData"; export * from "./BillingCreditResponseData"; export * from "./BillingCreditRolloverPolicy"; +export * from "./BillingCreditView"; export * from "./BillingCustomerResponseData"; export * from "./BillingCustomerSubscription"; export * from "./BillingCustomerWithSubscriptionsResponseData"; @@ -67,7 +69,6 @@ export * from "./CompanyPlanInvalidReason"; export * from "./CompanyPlanWithBillingSubView"; export * from "./CompanyResponseData"; export * from "./CompanySubscriptionResponseData"; -export * from "./CompanyViewWithFeatureUsageResponseData"; export * from "./CompatiblePlans"; export * from "./CompatiblePlansResponseData"; export * from "./ComponentCapabilities"; @@ -82,9 +83,13 @@ export * from "./ComponentState"; export * from "./Condition"; export * from "./ConditionConditionType"; export * from "./ConditionGroup"; +export * from "./ConditionGroupResponseData"; +export * from "./ConditionGroupView"; export * from "./ConditionMetricPeriod"; export * from "./ConditionMetricPeriodMonthReset"; export * from "./ConditionOperator"; +export * from "./ConditionResponseData"; +export * from "./ConditionView"; export * from "./CountResponse"; export * from "./CouponRequestBody"; export * from "./CreateBillingPlanCreditGrantRequestBody"; @@ -116,12 +121,15 @@ export * from "./CreditGrantExpiryRequestBody"; export * from "./CreditGrantSortOrder"; export * from "./CreditLedgerEnrichedEntryResponseData"; export * from "./CreditLedgerPeriod"; +export * from "./CreditsAutoTopupCompanySummary"; +export * from "./CreditsAutoTopupCreditSummary"; +export * from "./CreditsAutoTopupHardFailure"; +export * from "./CreditsAutoTopupRetryFailure"; export * from "./CreditTransferResponseData"; export * from "./CreditTransferView"; export * from "./CreditTriggerConfig"; export * from "./CreditUsage"; export * from "./CreditUsageAggregation"; -export * from "./CreditUsageResponseData"; export * from "./CustomPlanConfig"; export * from "./CustomPlanViewConfigResponseData"; export * from "./DataExportOutputFileType"; @@ -160,21 +168,28 @@ export * from "./EventType"; export * from "./FeatureCompanyResponseData"; export * from "./FeatureCompanyUserResponseData"; export * from "./FeatureDetailResponseData"; +export * from "./FeatureEntitlement"; +export * from "./FeatureEntitlementMetricPeriod"; +export * from "./FeatureEntitlementMonthReset"; export * from "./FeatureLedgerResponseData"; export * from "./FeatureLifecyclePhase"; export * from "./FeatureResponseData"; export * from "./FeatureType"; -export * from "./FeatureUsageDataResponseData"; export * from "./FeatureUsageDetailResponseData"; +export * from "./FeatureUsageLegacyResponseData"; export * from "./FeatureUsageResponseData"; +export * from "./FeatureUsageTimeSeriesResponseData"; +export * from "./FeatureView"; export * from "./FlagDetailResponseData"; export * from "./FlagResponseData"; export * from "./FlagType"; +export * from "./FlagView"; export * from "./GenericPreviewObject"; export * from "./InvoiceRequestBody"; export * from "./InvoiceResponseData"; export * from "./IssueTemporaryAccessTokenResponseData"; export * from "./KeysRequestBody"; +export * from "./LimitTimeSeriesPointResponseData"; export * from "./ManagePlanPreviewResponseResponseData"; export * from "./ManagePlanRequest"; export * from "./ManagePlanResponseResponseData"; @@ -187,7 +202,6 @@ export * from "./PlanBundleCreditGrantRequestBody"; export * from "./PlanBundleEntitlementRequestBody"; export * from "./PlanBundleResponseData"; export * from "./PlanChangeAction"; -export * from "./PlanChangeActorType"; export * from "./PlanChangeBasePlanAction"; export * from "./PlanChangeResponseData"; export * from "./PlanChangeSubscriptionAction"; @@ -207,14 +221,21 @@ export * from "./PlanSelection"; export * from "./PlanSnapshotView"; export * from "./PlanTraitResponseData"; export * from "./PlanType"; +export * from "./PlanVersionCompanyMigrationResponseData"; +export * from "./PlanVersionCompanyMigrationStatus"; +export * from "./PlanVersionMigrationResponseData"; +export * from "./PlanVersionMigrationStatus"; +export * from "./PlanVersionMigrationStrategy"; export * from "./PlanVersionResponseData"; export * from "./PlanVersionStatus"; +export * from "./PlanViewPublicResponseData"; export * from "./PreviewObject"; export * from "./PreviewObjectResponseData"; export * from "./PreviewSubscriptionChangeResponseData"; export * from "./PreviewSubscriptionFinanceResponseData"; export * from "./PreviewSubscriptionUpcomingInvoiceLineItems"; export * from "./ProrationBehavior"; +export * from "./PublicPlansResponseData"; export * from "./QuickstartResp"; export * from "./RawEventBatchResponseData"; export * from "./RawEventResponseData"; @@ -241,7 +262,11 @@ export * from "./RulesengineConditionGroup"; export * from "./RulesengineConditionMetricPeriod"; export * from "./RulesengineConditionMetricPeriodMonthReset"; export * from "./RulesengineConditionOperator"; +export * from "./RulesengineEntitlementValueType"; export * from "./RulesengineEntityType"; +export * from "./RulesengineFeatureEntitlement"; +export * from "./RulesengineFeatureEntitlementMetricPeriod"; +export * from "./RulesengineFeatureEntitlementMonthReset"; export * from "./RulesengineFlag"; export * from "./RulesengineRule"; export * from "./RulesengineRuleRuleType"; @@ -250,6 +275,11 @@ export * from "./RulesengineTrait"; export * from "./RulesengineTraitDefinition"; export * from "./RulesengineTraitDefinitionComparableType"; export * from "./RulesengineUser"; +export * from "./RuleView"; +export * from "./ScheduledCheckoutResponseData"; +export * from "./ScheduledCheckoutStatus"; +export * from "./ScheduledDowngradeConfigBehavior"; +export * from "./ScheduledDowngradeResponseData"; export * from "./SegmentStatusResp"; export * from "./SkippedEntitlementErrorResponseData"; export * from "./SkippedEntitlementResponseData"; @@ -260,6 +290,7 @@ export * from "./SubscriptionTraitUpdate"; export * from "./SubscriptionType"; export * from "./TemporaryAccessTokenResourceType"; export * from "./TemporaryAccessTokenResponseData"; +export * from "./TimeSeriesGranularity"; export * from "./TraitDefinition"; export * from "./TraitDefinitionComparableType"; export * from "./TraitType"; @@ -280,11 +311,14 @@ export * from "./UpsertUserRequestBody"; export * from "./UpsertUserSubRequestBody"; export * from "./UsageBasedEntitlementRequestBody"; export * from "./UsageBasedEntitlementResponseData"; +export * from "./UsageTimeSeriesPointResponseData"; export * from "./UserDetailResponseData"; export * from "./UserResponseData"; +export * from "./WebFeatureUsageWebhookOutput"; export * from "./WebhookEventDetailResponseData"; export * from "./WebhookEventResponseData"; export * from "./WebhookEventStatus"; export * from "./WebhookRequestType"; export * from "./WebhookResponseData"; export * from "./WebhookStatus"; +export * from "./WhoAmIResponseData"; diff --git a/tests/unit/fetcher/stream-wrappers/webpack.test.ts b/tests/unit/fetcher/stream-wrappers/webpack.test.ts index e3f4b927..f7537d3c 100644 --- a/tests/unit/fetcher/stream-wrappers/webpack.test.ts +++ b/tests/unit/fetcher/stream-wrappers/webpack.test.ts @@ -23,13 +23,6 @@ describe("test env compatibility", () => { ".jsx": [".tsx", ".jsx"], }, }, - externals: { - // Node.js-only optional dependencies, not needed in browser bundles - redis: "commonjs redis", - ws: "commonjs ws", - fs: "commonjs fs", - path: "commonjs path", - }, }, (err, stats) => { try { diff --git a/tests/wire/accounts.test.ts b/tests/wire/accounts.test.ts index a4adf155..87b756cf 100644 --- a/tests/wire/accounts.test.ts +++ b/tests/wire/accounts.test.ts @@ -18,6 +18,7 @@ describe("AccountsClient", () => { id: "id", last_used_at: "2024-01-15T09:30:00Z", name: "name", + readonly: true, scopes: ["admin"], updated_at: "2024-01-15T09:30:00Z", }, @@ -41,6 +42,7 @@ describe("AccountsClient", () => { id: "id", lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), name: "name", + readonly: true, scopes: ["admin"], updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -136,6 +138,7 @@ describe("AccountsClient", () => { id: "id", last_used_at: "2024-01-15T09:30:00Z", name: "name", + readonly: true, scopes: ["admin"], secret: "secret", updated_at: "2024-01-15T09:30:00Z", @@ -162,6 +165,7 @@ describe("AccountsClient", () => { id: "id", lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), name: "name", + readonly: true, scopes: ["admin"], secret: "secret", updatedAt: new Date("2024-01-15T09:30:00.000Z"), @@ -175,7 +179,7 @@ describe("AccountsClient", () => { test("createApiKey (2)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -188,7 +192,7 @@ describe("AccountsClient", () => { await expect(async () => { return await client.accounts.createApiKey({ - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.BadRequestError); }); @@ -196,7 +200,7 @@ describe("AccountsClient", () => { test("createApiKey (3)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -209,7 +213,7 @@ describe("AccountsClient", () => { await expect(async () => { return await client.accounts.createApiKey({ - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.UnauthorizedError); }); @@ -217,7 +221,7 @@ describe("AccountsClient", () => { test("createApiKey (4)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -230,7 +234,7 @@ describe("AccountsClient", () => { await expect(async () => { return await client.accounts.createApiKey({ - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.ForbiddenError); }); @@ -238,7 +242,7 @@ describe("AccountsClient", () => { test("createApiKey (5)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -251,7 +255,7 @@ describe("AccountsClient", () => { await expect(async () => { return await client.accounts.createApiKey({ - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.NotFoundError); }); @@ -259,7 +263,7 @@ describe("AccountsClient", () => { test("createApiKey (6)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -272,7 +276,7 @@ describe("AccountsClient", () => { await expect(async () => { return await client.accounts.createApiKey({ - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.InternalServerError); }); @@ -289,6 +293,7 @@ describe("AccountsClient", () => { id: "id", last_used_at: "2024-01-15T09:30:00Z", name: "name", + readonly: true, scopes: ["admin"], updated_at: "2024-01-15T09:30:00Z", }, @@ -311,6 +316,7 @@ describe("AccountsClient", () => { id: "id", lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), name: "name", + readonly: true, scopes: ["admin"], updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -404,6 +410,7 @@ describe("AccountsClient", () => { id: "id", last_used_at: "2024-01-15T09:30:00Z", name: "name", + readonly: true, scopes: ["admin"], updated_at: "2024-01-15T09:30:00Z", }, @@ -427,6 +434,7 @@ describe("AccountsClient", () => { id: "id", lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), name: "name", + readonly: true, scopes: ["admin"], updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -744,20 +752,19 @@ describe("AccountsClient", () => { }).rejects.toThrow(Schematic.InternalServerError); }); - test("listApiRequests (1)", async () => { + test("listAuditLogs (1)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { data: [ { + actor_type: "api_key", api_key_id: "api_key_id", ended_at: "2024-01-15T09:30:00Z", environment_id: "environment_id", id: "id", method: "method", - req_body: "req_body", - request_type: "request_type", resource_id: 1, resource_id_string: "resource_id_string", resource_name: "resource_name", @@ -769,27 +776,36 @@ describe("AccountsClient", () => { user_name: "user_name", }, ], - params: { environment_id: "environment_id", limit: 1, offset: 1, q: "q", request_type: "request_type" }, + params: { + actor_type: "api_key", + end_time: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + limit: 1, + offset: 1, + q: "q", + start_time: "2024-01-15T09:30:00Z", + }, }; - server.mockEndpoint().get("/api-requests").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); + server.mockEndpoint().get("/audit-log").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.accounts.listApiRequests({ - q: "q", - requestType: "request_type", + const response = await client.accounts.listAuditLogs({ + actorType: "api_key", + endTime: new Date("2024-01-15T09:30:00.000Z"), environmentId: "environment_id", + q: "q", + startTime: new Date("2024-01-15T09:30:00.000Z"), limit: 1, offset: 1, }); expect(response).toEqual({ data: [ { + actorType: "api_key", apiKeyId: "api_key_id", endedAt: new Date("2024-01-15T09:30:00.000Z"), environmentId: "environment_id", id: "id", method: "method", - reqBody: "req_body", - requestType: "request_type", resourceId: 1, resourceIdString: "resource_id_string", resourceName: "resource_name", @@ -802,98 +818,90 @@ describe("AccountsClient", () => { }, ], params: { + actorType: "api_key", + endTime: new Date("2024-01-15T09:30:00.000Z"), environmentId: "environment_id", limit: 1, offset: 1, q: "q", - requestType: "request_type", + startTime: new Date("2024-01-15T09:30:00.000Z"), }, }); }); - test("listApiRequests (2)", async () => { + test("listAuditLogs (2)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/api-requests").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); + server.mockEndpoint().get("/audit-log").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); await expect(async () => { - return await client.accounts.listApiRequests(); + return await client.accounts.listAuditLogs(); }).rejects.toThrow(Schematic.BadRequestError); }); - test("listApiRequests (3)", async () => { + test("listAuditLogs (3)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/api-requests").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); + server.mockEndpoint().get("/audit-log").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); await expect(async () => { - return await client.accounts.listApiRequests(); + return await client.accounts.listAuditLogs(); }).rejects.toThrow(Schematic.UnauthorizedError); }); - test("listApiRequests (4)", async () => { + test("listAuditLogs (4)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/api-requests").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); + server.mockEndpoint().get("/audit-log").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); await expect(async () => { - return await client.accounts.listApiRequests(); + return await client.accounts.listAuditLogs(); }).rejects.toThrow(Schematic.ForbiddenError); }); - test("listApiRequests (5)", async () => { + test("listAuditLogs (5)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/api-requests").respondWith().statusCode(404).jsonBody(rawResponseBody).build(); + server.mockEndpoint().get("/audit-log").respondWith().statusCode(404).jsonBody(rawResponseBody).build(); await expect(async () => { - return await client.accounts.listApiRequests(); + return await client.accounts.listAuditLogs(); }).rejects.toThrow(Schematic.NotFoundError); }); - test("listApiRequests (6)", async () => { + test("listAuditLogs (6)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/api-requests").respondWith().statusCode(500).jsonBody(rawResponseBody).build(); + server.mockEndpoint().get("/audit-log").respondWith().statusCode(500).jsonBody(rawResponseBody).build(); await expect(async () => { - return await client.accounts.listApiRequests(); + return await client.accounts.listAuditLogs(); }).rejects.toThrow(Schematic.InternalServerError); }); - test("getApiRequest (1)", async () => { + test("getAuditLog (1)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { data: { - api_key: { - created_at: "2024-01-15T09:30:00Z", - description: "description", - environment_id: "environment_id", - id: "id", - last_used_at: "2024-01-15T09:30:00Z", - name: "name", - scopes: ["admin"], - updated_at: "2024-01-15T09:30:00Z", - }, + actor_type: "api_key", api_key_id: "api_key_id", ended_at: "2024-01-15T09:30:00Z", environment_id: "environment_id", id: "id", method: "method", req_body: "req_body", - request_type: "request_type", resource_id: 1, resource_id_string: "resource_id_string", resource_name: "resource_name", @@ -903,7 +911,6 @@ describe("AccountsClient", () => { secondary_resource: "secondary_resource", started_at: "2024-01-15T09:30:00Z", url: "url", - user_agent: "user_agent", user_id: "user_id", user_name: "user_name", }, @@ -911,32 +918,22 @@ describe("AccountsClient", () => { }; server .mockEndpoint() - .get("/api-requests/api_request_id") + .get("/audit-log/audit_log_id") .respondWith() .statusCode(200) .jsonBody(rawResponseBody) .build(); - const response = await client.accounts.getApiRequest("api_request_id"); + const response = await client.accounts.getAuditLog("audit_log_id"); expect(response).toEqual({ data: { - apiKey: { - createdAt: new Date("2024-01-15T09:30:00.000Z"), - description: "description", - environmentId: "environment_id", - id: "id", - lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), - name: "name", - scopes: ["admin"], - updatedAt: new Date("2024-01-15T09:30:00.000Z"), - }, + actorType: "api_key", apiKeyId: "api_key_id", endedAt: new Date("2024-01-15T09:30:00.000Z"), environmentId: "environment_id", id: "id", method: "method", reqBody: "req_body", - requestType: "request_type", resourceId: 1, resourceIdString: "resource_id_string", resourceName: "resource_name", @@ -946,7 +943,6 @@ describe("AccountsClient", () => { secondaryResource: "secondary_resource", startedAt: new Date("2024-01-15T09:30:00.000Z"), url: "url", - userAgent: "user_agent", userId: "user_id", userName: "user_name", }, @@ -956,98 +952,102 @@ describe("AccountsClient", () => { }); }); - test("getApiRequest (2)", async () => { + test("getAuditLog (2)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; server .mockEndpoint() - .get("/api-requests/api_request_id") + .get("/audit-log/audit_log_id") .respondWith() .statusCode(401) .jsonBody(rawResponseBody) .build(); await expect(async () => { - return await client.accounts.getApiRequest("api_request_id"); + return await client.accounts.getAuditLog("audit_log_id"); }).rejects.toThrow(Schematic.UnauthorizedError); }); - test("getApiRequest (3)", async () => { + test("getAuditLog (3)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; server .mockEndpoint() - .get("/api-requests/api_request_id") + .get("/audit-log/audit_log_id") .respondWith() .statusCode(403) .jsonBody(rawResponseBody) .build(); await expect(async () => { - return await client.accounts.getApiRequest("api_request_id"); + return await client.accounts.getAuditLog("audit_log_id"); }).rejects.toThrow(Schematic.ForbiddenError); }); - test("getApiRequest (4)", async () => { + test("getAuditLog (4)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; server .mockEndpoint() - .get("/api-requests/api_request_id") + .get("/audit-log/audit_log_id") .respondWith() .statusCode(404) .jsonBody(rawResponseBody) .build(); await expect(async () => { - return await client.accounts.getApiRequest("api_request_id"); + return await client.accounts.getAuditLog("audit_log_id"); }).rejects.toThrow(Schematic.NotFoundError); }); - test("getApiRequest (5)", async () => { + test("getAuditLog (5)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; server .mockEndpoint() - .get("/api-requests/api_request_id") + .get("/audit-log/audit_log_id") .respondWith() .statusCode(500) .jsonBody(rawResponseBody) .build(); await expect(async () => { - return await client.accounts.getApiRequest("api_request_id"); + return await client.accounts.getAuditLog("audit_log_id"); }).rejects.toThrow(Schematic.InternalServerError); }); - test("countApiRequests (1)", async () => { + test("countAuditLogs (1)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { data: { count: 1 }, - params: { environment_id: "environment_id", limit: 1, offset: 1, q: "q", request_type: "request_type" }, + params: { + actor_type: "api_key", + end_time: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + limit: 1, + offset: 1, + q: "q", + start_time: "2024-01-15T09:30:00Z", + }, }; - server - .mockEndpoint() - .get("/api-requests/count") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/audit-log/count").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.accounts.countApiRequests({ - q: "q", - requestType: "request_type", + const response = await client.accounts.countAuditLogs({ + actorType: "api_key", + endTime: new Date("2024-01-15T09:30:00.000Z"), environmentId: "environment_id", + q: "q", + startTime: new Date("2024-01-15T09:30:00.000Z"), limit: 1, offset: 1, }); @@ -1056,102 +1056,74 @@ describe("AccountsClient", () => { count: 1, }, params: { + actorType: "api_key", + endTime: new Date("2024-01-15T09:30:00.000Z"), environmentId: "environment_id", limit: 1, offset: 1, q: "q", - requestType: "request_type", + startTime: new Date("2024-01-15T09:30:00.000Z"), }, }); }); - test("countApiRequests (2)", async () => { + test("countAuditLogs (2)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; - server - .mockEndpoint() - .get("/api-requests/count") - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/audit-log/count").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); await expect(async () => { - return await client.accounts.countApiRequests(); + return await client.accounts.countAuditLogs(); }).rejects.toThrow(Schematic.BadRequestError); }); - test("countApiRequests (3)", async () => { + test("countAuditLogs (3)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; - server - .mockEndpoint() - .get("/api-requests/count") - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/audit-log/count").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); await expect(async () => { - return await client.accounts.countApiRequests(); + return await client.accounts.countAuditLogs(); }).rejects.toThrow(Schematic.UnauthorizedError); }); - test("countApiRequests (4)", async () => { + test("countAuditLogs (4)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; - server - .mockEndpoint() - .get("/api-requests/count") - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/audit-log/count").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); await expect(async () => { - return await client.accounts.countApiRequests(); + return await client.accounts.countAuditLogs(); }).rejects.toThrow(Schematic.ForbiddenError); }); - test("countApiRequests (5)", async () => { + test("countAuditLogs (5)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; - server - .mockEndpoint() - .get("/api-requests/count") - .respondWith() - .statusCode(404) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/audit-log/count").respondWith().statusCode(404).jsonBody(rawResponseBody).build(); await expect(async () => { - return await client.accounts.countApiRequests(); + return await client.accounts.countAuditLogs(); }).rejects.toThrow(Schematic.NotFoundError); }); - test("countApiRequests (6)", async () => { + test("countAuditLogs (6)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { error: "error" }; - server - .mockEndpoint() - .get("/api-requests/count") - .respondWith() - .statusCode(500) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/audit-log/count").respondWith().statusCode(500).jsonBody(rawResponseBody).build(); await expect(async () => { - return await client.accounts.countApiRequests(); + return await client.accounts.countAuditLogs(); }).rejects.toThrow(Schematic.InternalServerError); }); @@ -1266,6 +1238,7 @@ describe("AccountsClient", () => { created_at: "2024-01-15T09:30:00Z", id: "id", name: "name", + readonly: true, scopes: ["admin"], updated_at: "2024-01-15T09:30:00Z", }, @@ -1298,6 +1271,7 @@ describe("AccountsClient", () => { createdAt: new Date("2024-01-15T09:30:00.000Z"), id: "id", name: "name", + readonly: true, scopes: ["admin"], updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1317,7 +1291,7 @@ describe("AccountsClient", () => { test("createEnvironment (2)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { environment_type: "development", name: "name" }; + const rawRequestBody = { environment_type: "development", name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -1331,7 +1305,7 @@ describe("AccountsClient", () => { await expect(async () => { return await client.accounts.createEnvironment({ environmentType: "development", - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.BadRequestError); }); @@ -1339,7 +1313,7 @@ describe("AccountsClient", () => { test("createEnvironment (3)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { environment_type: "development", name: "name" }; + const rawRequestBody = { environment_type: "development", name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -1353,7 +1327,7 @@ describe("AccountsClient", () => { await expect(async () => { return await client.accounts.createEnvironment({ environmentType: "development", - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.UnauthorizedError); }); @@ -1361,7 +1335,7 @@ describe("AccountsClient", () => { test("createEnvironment (4)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { environment_type: "development", name: "name" }; + const rawRequestBody = { environment_type: "development", name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -1375,7 +1349,7 @@ describe("AccountsClient", () => { await expect(async () => { return await client.accounts.createEnvironment({ environmentType: "development", - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.ForbiddenError); }); @@ -1383,7 +1357,7 @@ describe("AccountsClient", () => { test("createEnvironment (5)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { environment_type: "development", name: "name" }; + const rawRequestBody = { environment_type: "development", name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -1397,7 +1371,7 @@ describe("AccountsClient", () => { await expect(async () => { return await client.accounts.createEnvironment({ environmentType: "development", - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.NotFoundError); }); @@ -1405,7 +1379,7 @@ describe("AccountsClient", () => { test("createEnvironment (6)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { environment_type: "development", name: "name" }; + const rawRequestBody = { environment_type: "development", name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -1419,7 +1393,7 @@ describe("AccountsClient", () => { await expect(async () => { return await client.accounts.createEnvironment({ environmentType: "development", - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.InternalServerError); }); @@ -1857,4 +1831,107 @@ describe("AccountsClient", () => { return await client.accounts.quickstart(); }).rejects.toThrow(Schematic.InternalServerError); }); + + test("getWhoAmI (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: { + account_id: "account_id", + account_name: "account_name", + actor_type: "actor_type", + api_key_id: "api_key_id", + environment_id: "environment_id", + environments: [ + { + created_at: "2024-01-15T09:30:00Z", + environment_type: "development", + id: "id", + name: "name", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + stripe_user_id: "stripe_user_id", + user_id: "user_id", + user_name: "user_name", + }, + params: { key: "value" }, + }; + server.mockEndpoint().get("/whoami").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); + + const response = await client.accounts.getWhoAmI(); + expect(response).toEqual({ + data: { + accountId: "account_id", + accountName: "account_name", + actorType: "actor_type", + apiKeyId: "api_key_id", + environmentId: "environment_id", + environments: [ + { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentType: "development", + id: "id", + name: "name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + stripeUserId: "stripe_user_id", + userId: "user_id", + userName: "user_name", + }, + params: { + key: "value", + }, + }); + }); + + test("getWhoAmI (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server.mockEndpoint().get("/whoami").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.accounts.getWhoAmI(); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("getWhoAmI (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server.mockEndpoint().get("/whoami").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.accounts.getWhoAmI(); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("getWhoAmI (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server.mockEndpoint().get("/whoami").respondWith().statusCode(404).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.accounts.getWhoAmI(); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("getWhoAmI (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server.mockEndpoint().get("/whoami").respondWith().statusCode(500).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.accounts.getWhoAmI(); + }).rejects.toThrow(Schematic.InternalServerError); + }); }); diff --git a/tests/wire/billing.test.ts b/tests/wire/billing.test.ts index 063457c1..bc9d3bc2 100644 --- a/tests/wire/billing.test.ts +++ b/tests/wire/billing.test.ts @@ -2189,7 +2189,7 @@ describe("BillingClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { billing_scheme: "per_unit", - currency: "currency", + currency: "foo", external_account_id: "external_account_id", interval: "interval", is_active: true, @@ -2212,7 +2212,7 @@ describe("BillingClient", () => { await expect(async () => { return await client.billing.upsertBillingPrice({ billingScheme: "per_unit", - currency: "currency", + currency: "foo", externalAccountId: "external_account_id", interval: "interval", isActive: true, @@ -2237,7 +2237,7 @@ describe("BillingClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { billing_scheme: "per_unit", - currency: "currency", + currency: "foo", external_account_id: "external_account_id", interval: "interval", is_active: true, @@ -2260,7 +2260,7 @@ describe("BillingClient", () => { await expect(async () => { return await client.billing.upsertBillingPrice({ billingScheme: "per_unit", - currency: "currency", + currency: "foo", externalAccountId: "external_account_id", interval: "interval", isActive: true, @@ -2285,7 +2285,7 @@ describe("BillingClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { billing_scheme: "per_unit", - currency: "currency", + currency: "foo", external_account_id: "external_account_id", interval: "interval", is_active: true, @@ -2308,7 +2308,7 @@ describe("BillingClient", () => { await expect(async () => { return await client.billing.upsertBillingPrice({ billingScheme: "per_unit", - currency: "currency", + currency: "foo", externalAccountId: "external_account_id", interval: "interval", isActive: true, @@ -2333,7 +2333,7 @@ describe("BillingClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { billing_scheme: "per_unit", - currency: "currency", + currency: "foo", external_account_id: "external_account_id", interval: "interval", is_active: true, @@ -2356,7 +2356,7 @@ describe("BillingClient", () => { await expect(async () => { return await client.billing.upsertBillingPrice({ billingScheme: "per_unit", - currency: "currency", + currency: "foo", externalAccountId: "external_account_id", interval: "interval", isActive: true, @@ -2381,7 +2381,7 @@ describe("BillingClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { billing_scheme: "per_unit", - currency: "currency", + currency: "foo", external_account_id: "external_account_id", interval: "interval", is_active: true, @@ -2404,7 +2404,7 @@ describe("BillingClient", () => { await expect(async () => { return await client.billing.upsertBillingPrice({ billingScheme: "per_unit", - currency: "currency", + currency: "foo", externalAccountId: "external_account_id", interval: "interval", isActive: true, @@ -3481,7 +3481,7 @@ describe("BillingClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { cancel_at_period_end: true, - currency: "currency", + currency: "foo", customer_external_id: "customer_external_id", discounts: [ { @@ -3500,7 +3500,7 @@ describe("BillingClient", () => { expired_at: "2024-01-15T09:30:00Z", product_external_ids: [ { - currency: "currency", + currency: "foo", interval: "interval", price: 1, price_external_id: "price_external_id", @@ -3509,7 +3509,7 @@ describe("BillingClient", () => { usage_type: "licensed", }, { - currency: "currency", + currency: "foo", interval: "interval", price: 1, price_external_id: "price_external_id", @@ -3534,7 +3534,7 @@ describe("BillingClient", () => { await expect(async () => { return await client.billing.upsertBillingSubscription({ cancelAtPeriodEnd: true, - currency: "currency", + currency: "foo", customerExternalId: "customer_external_id", discounts: [ { @@ -3553,7 +3553,7 @@ describe("BillingClient", () => { expiredAt: new Date("2024-01-15T09:30:00.000Z"), productExternalIds: [ { - currency: "currency", + currency: "foo", interval: "interval", price: 1, priceExternalId: "price_external_id", @@ -3562,7 +3562,7 @@ describe("BillingClient", () => { usageType: "licensed", }, { - currency: "currency", + currency: "foo", interval: "interval", price: 1, priceExternalId: "price_external_id", @@ -3582,7 +3582,7 @@ describe("BillingClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { cancel_at_period_end: true, - currency: "currency", + currency: "foo", customer_external_id: "customer_external_id", discounts: [ { @@ -3601,7 +3601,7 @@ describe("BillingClient", () => { expired_at: "2024-01-15T09:30:00Z", product_external_ids: [ { - currency: "currency", + currency: "foo", interval: "interval", price: 1, price_external_id: "price_external_id", @@ -3610,7 +3610,7 @@ describe("BillingClient", () => { usage_type: "licensed", }, { - currency: "currency", + currency: "foo", interval: "interval", price: 1, price_external_id: "price_external_id", @@ -3635,7 +3635,7 @@ describe("BillingClient", () => { await expect(async () => { return await client.billing.upsertBillingSubscription({ cancelAtPeriodEnd: true, - currency: "currency", + currency: "foo", customerExternalId: "customer_external_id", discounts: [ { @@ -3654,7 +3654,7 @@ describe("BillingClient", () => { expiredAt: new Date("2024-01-15T09:30:00.000Z"), productExternalIds: [ { - currency: "currency", + currency: "foo", interval: "interval", price: 1, priceExternalId: "price_external_id", @@ -3663,7 +3663,7 @@ describe("BillingClient", () => { usageType: "licensed", }, { - currency: "currency", + currency: "foo", interval: "interval", price: 1, priceExternalId: "price_external_id", @@ -3683,7 +3683,7 @@ describe("BillingClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { cancel_at_period_end: true, - currency: "currency", + currency: "foo", customer_external_id: "customer_external_id", discounts: [ { @@ -3702,7 +3702,7 @@ describe("BillingClient", () => { expired_at: "2024-01-15T09:30:00Z", product_external_ids: [ { - currency: "currency", + currency: "foo", interval: "interval", price: 1, price_external_id: "price_external_id", @@ -3711,7 +3711,7 @@ describe("BillingClient", () => { usage_type: "licensed", }, { - currency: "currency", + currency: "foo", interval: "interval", price: 1, price_external_id: "price_external_id", @@ -3736,7 +3736,7 @@ describe("BillingClient", () => { await expect(async () => { return await client.billing.upsertBillingSubscription({ cancelAtPeriodEnd: true, - currency: "currency", + currency: "foo", customerExternalId: "customer_external_id", discounts: [ { @@ -3755,7 +3755,7 @@ describe("BillingClient", () => { expiredAt: new Date("2024-01-15T09:30:00.000Z"), productExternalIds: [ { - currency: "currency", + currency: "foo", interval: "interval", price: 1, priceExternalId: "price_external_id", @@ -3764,7 +3764,7 @@ describe("BillingClient", () => { usageType: "licensed", }, { - currency: "currency", + currency: "foo", interval: "interval", price: 1, priceExternalId: "price_external_id", @@ -3784,7 +3784,7 @@ describe("BillingClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { cancel_at_period_end: true, - currency: "currency", + currency: "foo", customer_external_id: "customer_external_id", discounts: [ { @@ -3803,7 +3803,7 @@ describe("BillingClient", () => { expired_at: "2024-01-15T09:30:00Z", product_external_ids: [ { - currency: "currency", + currency: "foo", interval: "interval", price: 1, price_external_id: "price_external_id", @@ -3812,7 +3812,7 @@ describe("BillingClient", () => { usage_type: "licensed", }, { - currency: "currency", + currency: "foo", interval: "interval", price: 1, price_external_id: "price_external_id", @@ -3837,7 +3837,7 @@ describe("BillingClient", () => { await expect(async () => { return await client.billing.upsertBillingSubscription({ cancelAtPeriodEnd: true, - currency: "currency", + currency: "foo", customerExternalId: "customer_external_id", discounts: [ { @@ -3856,7 +3856,7 @@ describe("BillingClient", () => { expiredAt: new Date("2024-01-15T09:30:00.000Z"), productExternalIds: [ { - currency: "currency", + currency: "foo", interval: "interval", price: 1, priceExternalId: "price_external_id", @@ -3865,7 +3865,7 @@ describe("BillingClient", () => { usageType: "licensed", }, { - currency: "currency", + currency: "foo", interval: "interval", price: 1, priceExternalId: "price_external_id", @@ -3885,7 +3885,7 @@ describe("BillingClient", () => { const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { cancel_at_period_end: true, - currency: "currency", + currency: "foo", customer_external_id: "customer_external_id", discounts: [ { @@ -3904,7 +3904,7 @@ describe("BillingClient", () => { expired_at: "2024-01-15T09:30:00Z", product_external_ids: [ { - currency: "currency", + currency: "foo", interval: "interval", price: 1, price_external_id: "price_external_id", @@ -3913,7 +3913,7 @@ describe("BillingClient", () => { usage_type: "licensed", }, { - currency: "currency", + currency: "foo", interval: "interval", price: 1, price_external_id: "price_external_id", @@ -3938,7 +3938,7 @@ describe("BillingClient", () => { await expect(async () => { return await client.billing.upsertBillingSubscription({ cancelAtPeriodEnd: true, - currency: "currency", + currency: "foo", customerExternalId: "customer_external_id", discounts: [ { @@ -3957,7 +3957,7 @@ describe("BillingClient", () => { expiredAt: new Date("2024-01-15T09:30:00.000Z"), productExternalIds: [ { - currency: "currency", + currency: "foo", interval: "interval", price: 1, priceExternalId: "price_external_id", @@ -3966,7 +3966,7 @@ describe("BillingClient", () => { usageType: "licensed", }, { - currency: "currency", + currency: "foo", interval: "interval", price: 1, priceExternalId: "price_external_id", diff --git a/tests/wire/checkout.test.ts b/tests/wire/checkout.test.ts index 7a8625f5..1d055a14 100644 --- a/tests/wire/checkout.test.ts +++ b/tests/wire/checkout.test.ts @@ -576,6 +576,18 @@ describe("CheckoutClient", () => { }, ], active_plan: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -606,6 +618,18 @@ describe("CheckoutClient", () => { controlled_by: "schematic", created_at: "2024-01-15T09:30:00Z", description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, features: [ { created_at: "2024-01-15T09:30:00Z", @@ -691,8 +715,6 @@ describe("CheckoutClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -775,9 +797,6 @@ describe("CheckoutClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -893,6 +912,7 @@ describe("CheckoutClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -959,9 +979,6 @@ describe("CheckoutClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -1006,6 +1023,17 @@ describe("CheckoutClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -1022,6 +1050,18 @@ describe("CheckoutClient", () => { }, selected_credit_bundles: [{ quantity: 1, total: 1 }], selected_plan: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -1052,6 +1092,18 @@ describe("CheckoutClient", () => { controlled_by: "schematic", created_at: "2024-01-15T09:30:00Z", description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, features: [ { created_at: "2024-01-15T09:30:00Z", @@ -1137,8 +1189,6 @@ describe("CheckoutClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -1398,6 +1448,18 @@ describe("CheckoutClient", () => { }, ], activePlan: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1428,6 +1490,18 @@ describe("CheckoutClient", () => { controlledBy: "schematic", createdAt: new Date("2024-01-15T09:30:00.000Z"), description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, features: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1528,8 +1602,6 @@ describe("CheckoutClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -1617,9 +1689,6 @@ describe("CheckoutClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1737,6 +1806,13 @@ describe("CheckoutClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1803,9 +1879,6 @@ describe("CheckoutClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1855,6 +1928,17 @@ describe("CheckoutClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -1878,6 +1962,18 @@ describe("CheckoutClient", () => { }, ], selectedPlan: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1908,6 +2004,18 @@ describe("CheckoutClient", () => { controlledBy: "schematic", createdAt: new Date("2024-01-15T09:30:00.000Z"), description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, features: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2008,8 +2116,6 @@ describe("CheckoutClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -2282,12 +2388,14 @@ describe("CheckoutClient", () => { { amount: 1, description: "description", price_id: "price_id", proration: true, quantity: 1 }, ], }, + is_scheduled_downgrade: true, new_charges: 1, payment_method_required: true, percent_off: 1.1, period_start: "2024-01-15T09:30:00Z", promo_code_applied: true, proration: 1, + scheduled_change_time: "2024-01-15T09:30:00Z", usage_violations: [ { access: true, @@ -2359,12 +2467,14 @@ describe("CheckoutClient", () => { }, ], }, + isScheduledDowngrade: true, newCharges: 1, paymentMethodRequired: true, percentOff: 1.1, periodStart: new Date("2024-01-15T09:30:00.000Z"), promoCodeApplied: true, proration: 1, + scheduledChangeTime: new Date("2024-01-15T09:30:00.000Z"), usageViolations: [ { access: true, @@ -2760,9 +2870,6 @@ describe("CheckoutClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -2878,6 +2985,7 @@ describe("CheckoutClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -2944,9 +3052,6 @@ describe("CheckoutClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -2991,6 +3096,17 @@ describe("CheckoutClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -3044,9 +3160,6 @@ describe("CheckoutClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -3164,6 +3277,13 @@ describe("CheckoutClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -3230,9 +3350,6 @@ describe("CheckoutClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -3282,6 +3399,17 @@ describe("CheckoutClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -3630,12 +3758,14 @@ describe("CheckoutClient", () => { }, ], }, + is_scheduled_downgrade: true, new_charges: 1, payment_method_required: true, percent_off: 1.1, period_start: "2024-01-15T09:30:00Z", promo_code_applied: true, proration: 1, + scheduled_change_time: "2024-01-15T09:30:00Z", usage_violations: [ { access: true, @@ -3702,12 +3832,14 @@ describe("CheckoutClient", () => { }, ], }, + isScheduledDowngrade: true, newCharges: 1, paymentMethodRequired: true, percentOff: 1.1, periodStart: new Date("2024-01-15T09:30:00.000Z"), promoCodeApplied: true, proration: 1, + scheduledChangeTime: new Date("2024-01-15T09:30:00.000Z"), usageViolations: [ { access: true, @@ -4044,9 +4176,6 @@ describe("CheckoutClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -4162,6 +4291,7 @@ describe("CheckoutClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -4228,9 +4358,6 @@ describe("CheckoutClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -4275,6 +4402,17 @@ describe("CheckoutClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -4311,9 +4449,6 @@ describe("CheckoutClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -4431,6 +4566,13 @@ describe("CheckoutClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -4497,9 +4639,6 @@ describe("CheckoutClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -4549,6 +4688,17 @@ describe("CheckoutClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, diff --git a/tests/wire/companies.test.ts b/tests/wire/companies.test.ts index 7bca76a8..80fc6b46 100644 --- a/tests/wire/companies.test.ts +++ b/tests/wire/companies.test.ts @@ -25,9 +25,6 @@ describe("CompaniesClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -143,6 +140,7 @@ describe("CompaniesClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -209,9 +207,6 @@ describe("CompaniesClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -256,29 +251,56 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, }, ], params: { + credit_type_ids: ["credit_type_ids"], ids: ["ids"], limit: 1, + monetized_subscriptions: true, offset: 1, plan_id: "plan_id", + plan_ids: ["plan_ids"], + plan_version_id: "plan_version_id", q: "q", + sort_order_column: "sort_order_column", + sort_order_direction: "asc", + subscription_statuses: ["active"], + subscription_types: ["free"], + with_entitlement_for: "with_entitlement_for", with_subscription: true, without_feature_override_for: "without_feature_override_for", without_plan: true, + without_subscription: true, }, }; server.mockEndpoint().get("/companies").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.companies.listCompanies({ + monetizedSubscriptions: true, planId: "plan_id", + planVersionId: "plan_version_id", q: "q", + sortOrderColumn: "sort_order_column", + sortOrderDirection: "asc", + withEntitlementFor: "with_entitlement_for", withoutFeatureOverrideFor: "without_feature_override_for", withoutPlan: true, + withoutSubscription: true, withSubscription: true, limit: 1, offset: 1, @@ -299,9 +321,6 @@ describe("CompaniesClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -419,6 +438,13 @@ describe("CompaniesClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -485,9 +511,6 @@ describe("CompaniesClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -537,6 +560,17 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -545,14 +579,24 @@ describe("CompaniesClient", () => { }, ], params: { + creditTypeIds: ["credit_type_ids"], ids: ["ids"], limit: 1, + monetizedSubscriptions: true, offset: 1, planId: "plan_id", + planIds: ["plan_ids"], + planVersionId: "plan_version_id", q: "q", + sortOrderColumn: "sort_order_column", + sortOrderDirection: "asc", + subscriptionStatuses: ["active"], + subscriptionTypes: ["free"], + withEntitlementFor: "with_entitlement_for", withSubscription: true, withoutFeatureOverrideFor: "without_feature_override_for", withoutPlan: true, + withoutSubscription: true, }, }); }); @@ -636,9 +680,6 @@ describe("CompaniesClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -796,6 +837,7 @@ describe("CompaniesClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -867,9 +909,6 @@ describe("CompaniesClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -917,6 +956,19 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -952,9 +1004,6 @@ describe("CompaniesClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1116,6 +1165,13 @@ describe("CompaniesClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1187,9 +1243,6 @@ describe("CompaniesClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1242,6 +1295,19 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -1388,9 +1454,6 @@ describe("CompaniesClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -1548,6 +1611,7 @@ describe("CompaniesClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -1619,9 +1683,6 @@ describe("CompaniesClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -1669,6 +1730,19 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -1699,9 +1773,6 @@ describe("CompaniesClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1863,6 +1934,13 @@ describe("CompaniesClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1934,9 +2012,6 @@ describe("CompaniesClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1989,6 +2064,19 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -2198,23 +2286,39 @@ describe("CompaniesClient", () => { const rawResponseBody = { data: { count: 1 }, params: { + credit_type_ids: ["credit_type_ids"], ids: ["ids"], limit: 1, + monetized_subscriptions: true, offset: 1, plan_id: "plan_id", + plan_ids: ["plan_ids"], + plan_version_id: "plan_version_id", q: "q", + sort_order_column: "sort_order_column", + sort_order_direction: "asc", + subscription_statuses: ["active"], + subscription_types: ["free"], + with_entitlement_for: "with_entitlement_for", with_subscription: true, without_feature_override_for: "without_feature_override_for", without_plan: true, + without_subscription: true, }, }; server.mockEndpoint().get("/companies/count").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.companies.countCompanies({ + monetizedSubscriptions: true, planId: "plan_id", + planVersionId: "plan_version_id", q: "q", + sortOrderColumn: "sort_order_column", + sortOrderDirection: "asc", + withEntitlementFor: "with_entitlement_for", withoutFeatureOverrideFor: "without_feature_override_for", withoutPlan: true, + withoutSubscription: true, withSubscription: true, limit: 1, offset: 1, @@ -2224,14 +2328,24 @@ describe("CompaniesClient", () => { count: 1, }, params: { + creditTypeIds: ["credit_type_ids"], ids: ["ids"], limit: 1, + monetizedSubscriptions: true, offset: 1, planId: "plan_id", + planIds: ["plan_ids"], + planVersionId: "plan_version_id", q: "q", + sortOrderColumn: "sort_order_column", + sortOrderDirection: "asc", + subscriptionStatuses: ["active"], + subscriptionTypes: ["free"], + withEntitlementFor: "with_entitlement_for", withSubscription: true, withoutFeatureOverrideFor: "without_feature_override_for", withoutPlan: true, + withoutSubscription: true, }, }); }); @@ -2296,126 +2410,6 @@ describe("CompaniesClient", () => { }).rejects.toThrow(Schematic.InternalServerError); }); - test("countCompaniesForAdvancedFilter (1)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { - data: { count: 1 }, - params: { - credit_type_ids: ["credit_type_ids"], - display_properties: ["display_properties"], - feature_ids: ["feature_ids"], - ids: ["ids"], - limit: 1, - monetized_subscriptions: true, - offset: 1, - plan_ids: ["plan_ids"], - q: "q", - sort_order_column: "sort_order_column", - sort_order_direction: "asc", - subscription_statuses: ["active"], - subscription_types: ["free"], - without_plan: true, - without_subscription: true, - }, - }; - server.mockEndpoint().get("/companies/count2").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - - const response = await client.companies.countCompaniesForAdvancedFilter({ - monetizedSubscriptions: true, - q: "q", - withoutPlan: true, - withoutSubscription: true, - sortOrderColumn: "sort_order_column", - sortOrderDirection: "asc", - limit: 1, - offset: 1, - }); - expect(response).toEqual({ - data: { - count: 1, - }, - params: { - creditTypeIds: ["credit_type_ids"], - displayProperties: ["display_properties"], - featureIds: ["feature_ids"], - ids: ["ids"], - limit: 1, - monetizedSubscriptions: true, - offset: 1, - planIds: ["plan_ids"], - q: "q", - sortOrderColumn: "sort_order_column", - sortOrderDirection: "asc", - subscriptionStatuses: ["active"], - subscriptionTypes: ["free"], - withoutPlan: true, - withoutSubscription: true, - }, - }); - }); - - test("countCompaniesForAdvancedFilter (2)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/companies/count2").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.companies.countCompaniesForAdvancedFilter(); - }).rejects.toThrow(Schematic.BadRequestError); - }); - - test("countCompaniesForAdvancedFilter (3)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/companies/count2").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.companies.countCompaniesForAdvancedFilter(); - }).rejects.toThrow(Schematic.UnauthorizedError); - }); - - test("countCompaniesForAdvancedFilter (4)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/companies/count2").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.companies.countCompaniesForAdvancedFilter(); - }).rejects.toThrow(Schematic.ForbiddenError); - }); - - test("countCompaniesForAdvancedFilter (5)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/companies/count2").respondWith().statusCode(404).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.companies.countCompaniesForAdvancedFilter(); - }).rejects.toThrow(Schematic.NotFoundError); - }); - - test("countCompaniesForAdvancedFilter (6)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/companies/count2").respondWith().statusCode(500).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.companies.countCompaniesForAdvancedFilter(); - }).rejects.toThrow(Schematic.InternalServerError); - }); - test("createCompany (1)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); @@ -2435,9 +2429,6 @@ describe("CompaniesClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -2595,6 +2586,7 @@ describe("CompaniesClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -2666,9 +2658,6 @@ describe("CompaniesClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -2716,6 +2705,19 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -2751,9 +2753,6 @@ describe("CompaniesClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -2915,6 +2914,13 @@ describe("CompaniesClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2986,9 +2992,6 @@ describe("CompaniesClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -3041,6 +3044,19 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -3329,683 +3345,81 @@ describe("CompaniesClient", () => { }).rejects.toThrow(Schematic.InternalServerError); }); - test("listCompaniesForAdvancedFilter (1)", async () => { + test("lookupCompany (1)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { - data: [ - { - add_ons: [ - { - id: "id", - included_credit_grants: [ - { - billing_credit_auto_topup_enabled: true, + data: { + add_ons: [ + { + added_on: "2024-01-15T09:30:00Z", + billing_product_external_id: "billing_product_external_id", + billing_product_id: "billing_product_id", + description: "description", + id: "id", + image_url: "image_url", + included_credit_grants: [ + { + billing_credit_auto_topup_amount: 1, + billing_credit_auto_topup_amount_type: "billing_credit_auto_topup_amount_type", + billing_credit_auto_topup_enabled: true, + billing_credit_auto_topup_expiry_type: "duration", + billing_credit_auto_topup_expiry_unit: "billing_periods", + billing_credit_auto_topup_expiry_unit_count: 1, + billing_credit_auto_topup_threshold_percent: 1, + created_at: "2024-01-15T09:30:00Z", + credit: { + account_id: "account_id", + burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", - credit_amount: 1, - credit_description: "credit_description", - credit_id: "credit_id", - credit_name: "credit_name", + default_expiry_unit: "billing_periods", + default_expiry_unit_count: 1, + default_rollover_policy: "expire", + description: "description", + environment_id: "environment_id", + icon: "icon", id: "id", - plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", - reset_type: "no_reset", + name: "name", + plural_name: "plural_name", + price: { + billing_scheme: "per_unit", + created_at: "2024-01-15T09:30:00Z", + currency: "currency", + id: "id", + interval: "day", + is_active: true, + package_size: 1, + price: 1, + price_external_id: "price_external_id", + price_id: "price_id", + price_tier: [], + product_external_id: "product_external_id", + product_id: "product_id", + product_name: "product_name", + provider_type: "schematic", + updated_at: "2024-01-15T09:30:00Z", + usage_type: "licensed", + }, + price_per_unit: 1, + price_per_unit_decimal: "price_per_unit_decimal", + product: { + account_id: "account_id", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + external_id: "external_id", + is_active: true, + name: "name", + price: 1.1, + product_id: "product_id", + provider_type: "schematic", + quantity: 1.1, + updated_at: "2024-01-15T09:30:00Z", + }, + singular_name: "singular_name", updated_at: "2024-01-15T09:30:00Z", }, - ], - name: "name", - }, - ], - billing_credit_balances: { key: 1.1 }, - billing_subscription: { - cancel_at_period_end: true, - created_at: "2024-01-15T09:30:00Z", - currency: "currency", - customer_external_id: "customer_external_id", - discounts: [ - { - coupon_id: "coupon_id", - coupon_name: "coupon_name", - discount_external_id: "discount_external_id", - duration: "duration", - is_active: true, - started_at: "2024-01-15T09:30:00Z", - subscription_external_id: "subscription_external_id", - }, - ], - id: "id", - interval: "interval", - period_end: 1, - period_start: 1, - products: [ - { - billing_scheme: "per_unit", - created_at: "2024-01-15T09:30:00Z", - currency: "currency", - environment_id: "environment_id", - external_id: "external_id", - id: "id", - interval: "interval", - name: "name", - package_size: 1, - price: 1, - price_external_id: "price_external_id", - price_id: "price_id", - price_tier: [{}], - provider_type: "schematic", - quantity: 1.1, - subscription_id: "subscription_id", - updated_at: "2024-01-15T09:30:00Z", - usage_type: "licensed", - }, - ], - provider_type: "schematic", - status: "status", - subscription_external_id: "subscription_external_id", - total_price: 1, - }, - billing_subscriptions: [ - { - cancel_at_period_end: true, - created_at: "2024-01-15T09:30:00Z", - currency: "currency", - customer_external_id: "customer_external_id", - discounts: [ - { - coupon_id: "coupon_id", - coupon_name: "coupon_name", - discount_external_id: "discount_external_id", - duration: "duration", - is_active: true, - started_at: "2024-01-15T09:30:00Z", - subscription_external_id: "subscription_external_id", - }, - ], - id: "id", - interval: "interval", - period_end: 1, - period_start: 1, - products: [ - { - billing_scheme: "per_unit", - created_at: "2024-01-15T09:30:00Z", - currency: "currency", - environment_id: "environment_id", - external_id: "external_id", - id: "id", - interval: "interval", - name: "name", - package_size: 1, - price: 1, - price_external_id: "price_external_id", - price_id: "price_id", - price_tier: [{}], - provider_type: "schematic", - quantity: 1.1, - subscription_id: "subscription_id", - updated_at: "2024-01-15T09:30:00Z", - usage_type: "licensed", - }, - ], - provider_type: "schematic", - status: "status", - subscription_external_id: "subscription_external_id", - total_price: 1, - }, - ], - created_at: "2024-01-15T09:30:00Z", - default_payment_method: { - created_at: "2024-01-15T09:30:00Z", - customer_external_id: "customer_external_id", - environment_id: "environment_id", - external_id: "external_id", - id: "id", - payment_method_type: "payment_method_type", - provider_type: "schematic", - updated_at: "2024-01-15T09:30:00Z", - }, - entity_traits: [ - { - created_at: "2024-01-15T09:30:00Z", - definition_id: "definition_id", - environment_id: "environment_id", - id: "id", - updated_at: "2024-01-15T09:30:00Z", - value: "value", - }, - ], - environment_id: "environment_id", - feature_usage: [ - { - entitlement_source: "entitlement_source", - entitlement_value_type: "entitlement_value_type", - feature_id: "feature_id", - feature_name: "feature_name", - feature_type: "boolean", - hard_limit: "hard_limit", - has_access: true, - soft_limit: "soft_limit", - usage: "usage", - }, - ], - id: "id", - keys: [ - { - created_at: "2024-01-15T09:30:00Z", - definition_id: "definition_id", - entity_id: "entity_id", - entity_type: "company", - environment_id: "environment_id", - id: "id", - key: "key", - updated_at: "2024-01-15T09:30:00Z", - value: "value", - }, - ], - last_seen_at: "2024-01-15T09:30:00Z", - logo_url: "logo_url", - metrics: [ - { - account_id: "account_id", - captured_at_max: "2024-01-15T09:30:00Z", - captured_at_min: "2024-01-15T09:30:00Z", - company_id: "company_id", - created_at: "2024-01-15T09:30:00Z", - environment_id: "environment_id", - event_subtype: "event_subtype", - month_reset: "month_reset", - period: "period", - value: 1, - }, - ], - name: "name", - payment_methods: [ - { - created_at: "2024-01-15T09:30:00Z", - customer_external_id: "customer_external_id", - environment_id: "environment_id", - external_id: "external_id", - id: "id", - payment_method_type: "payment_method_type", - provider_type: "schematic", - updated_at: "2024-01-15T09:30:00Z", - }, - ], - plan: { - id: "id", - included_credit_grants: [ - { - billing_credit_auto_topup_enabled: true, - created_at: "2024-01-15T09:30:00Z", - credit_amount: 1, - credit_description: "credit_description", - credit_id: "credit_id", - credit_name: "credit_name", - id: "id", - plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", - reset_type: "no_reset", - updated_at: "2024-01-15T09:30:00Z", - }, - ], - name: "name", - }, - plans: [{ id: "id", name: "name" }], - rules: [ - { - account_id: "account_id", - condition_groups: [ - { - conditions: [ - { - account_id: "account_id", - condition_type: "base_plan", - environment_id: "environment_id", - id: "id", - operator: "eq", - resource_ids: ["resource_ids"], - trait_value: "trait_value", - }, - ], - }, - ], - conditions: [ - { - account_id: "account_id", - condition_type: "base_plan", - environment_id: "environment_id", - id: "id", - operator: "eq", - resource_ids: ["resource_ids"], - trait_value: "trait_value", - }, - ], - environment_id: "environment_id", - id: "id", - name: "name", - priority: 1, - rule_type: "default", - value: true, - }, - ], - traits: { key: "value" }, - updated_at: "2024-01-15T09:30:00Z", - user_count: 1, - }, - ], - params: { - credit_type_ids: ["credit_type_ids"], - display_properties: ["display_properties"], - feature_ids: ["feature_ids"], - ids: ["ids"], - limit: 1, - monetized_subscriptions: true, - offset: 1, - plan_ids: ["plan_ids"], - q: "q", - sort_order_column: "sort_order_column", - sort_order_direction: "asc", - subscription_statuses: ["active"], - subscription_types: ["free"], - without_plan: true, - without_subscription: true, - }, - }; - server.mockEndpoint().get("/companies/list2").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - - const response = await client.companies.listCompaniesForAdvancedFilter({ - monetizedSubscriptions: true, - q: "q", - withoutPlan: true, - withoutSubscription: true, - sortOrderColumn: "sort_order_column", - sortOrderDirection: "asc", - limit: 1, - offset: 1, - }); - expect(response).toEqual({ - data: [ - { - addOns: [ - { - id: "id", - includedCreditGrants: [ - { - billingCreditAutoTopupEnabled: true, - createdAt: new Date("2024-01-15T09:30:00.000Z"), - creditAmount: 1, - creditDescription: "credit_description", - creditId: "credit_id", - creditName: "credit_name", - id: "id", - planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", - resetType: "no_reset", - updatedAt: new Date("2024-01-15T09:30:00.000Z"), - }, - ], - name: "name", - }, - ], - billingCreditBalances: { - key: 1.1, - }, - billingSubscription: { - cancelAtPeriodEnd: true, - createdAt: new Date("2024-01-15T09:30:00.000Z"), - currency: "currency", - customerExternalId: "customer_external_id", - discounts: [ - { - couponId: "coupon_id", - couponName: "coupon_name", - discountExternalId: "discount_external_id", - duration: "duration", - isActive: true, - startedAt: new Date("2024-01-15T09:30:00.000Z"), - subscriptionExternalId: "subscription_external_id", - }, - ], - id: "id", - interval: "interval", - periodEnd: 1, - periodStart: 1, - products: [ - { - billingScheme: "per_unit", - createdAt: new Date("2024-01-15T09:30:00.000Z"), - currency: "currency", - environmentId: "environment_id", - externalId: "external_id", - id: "id", - interval: "interval", - name: "name", - packageSize: 1, - price: 1, - priceExternalId: "price_external_id", - priceId: "price_id", - priceTier: [{}], - providerType: "schematic", - quantity: 1.1, - subscriptionId: "subscription_id", - updatedAt: new Date("2024-01-15T09:30:00.000Z"), - usageType: "licensed", - }, - ], - providerType: "schematic", - status: "status", - subscriptionExternalId: "subscription_external_id", - totalPrice: 1, - }, - billingSubscriptions: [ - { - cancelAtPeriodEnd: true, - createdAt: new Date("2024-01-15T09:30:00.000Z"), - currency: "currency", - customerExternalId: "customer_external_id", - discounts: [ - { - couponId: "coupon_id", - couponName: "coupon_name", - discountExternalId: "discount_external_id", - duration: "duration", - isActive: true, - startedAt: new Date("2024-01-15T09:30:00.000Z"), - subscriptionExternalId: "subscription_external_id", - }, - ], - id: "id", - interval: "interval", - periodEnd: 1, - periodStart: 1, - products: [ - { - billingScheme: "per_unit", - createdAt: new Date("2024-01-15T09:30:00.000Z"), - currency: "currency", - environmentId: "environment_id", - externalId: "external_id", - id: "id", - interval: "interval", - name: "name", - packageSize: 1, - price: 1, - priceExternalId: "price_external_id", - priceId: "price_id", - priceTier: [{}], - providerType: "schematic", - quantity: 1.1, - subscriptionId: "subscription_id", - updatedAt: new Date("2024-01-15T09:30:00.000Z"), - usageType: "licensed", - }, - ], - providerType: "schematic", - status: "status", - subscriptionExternalId: "subscription_external_id", - totalPrice: 1, - }, - ], - createdAt: new Date("2024-01-15T09:30:00.000Z"), - defaultPaymentMethod: { - createdAt: new Date("2024-01-15T09:30:00.000Z"), - customerExternalId: "customer_external_id", - environmentId: "environment_id", - externalId: "external_id", - id: "id", - paymentMethodType: "payment_method_type", - providerType: "schematic", - updatedAt: new Date("2024-01-15T09:30:00.000Z"), - }, - entityTraits: [ - { - createdAt: new Date("2024-01-15T09:30:00.000Z"), - definitionId: "definition_id", - environmentId: "environment_id", - id: "id", - updatedAt: new Date("2024-01-15T09:30:00.000Z"), - value: "value", - }, - ], - environmentId: "environment_id", - featureUsage: [ - { - entitlementSource: "entitlement_source", - entitlementValueType: "entitlement_value_type", - featureId: "feature_id", - featureName: "feature_name", - featureType: "boolean", - hardLimit: "hard_limit", - hasAccess: true, - softLimit: "soft_limit", - usage: "usage", - }, - ], - id: "id", - keys: [ - { - createdAt: new Date("2024-01-15T09:30:00.000Z"), - definitionId: "definition_id", - entityId: "entity_id", - entityType: "company", - environmentId: "environment_id", - id: "id", - key: "key", - updatedAt: new Date("2024-01-15T09:30:00.000Z"), - value: "value", - }, - ], - lastSeenAt: new Date("2024-01-15T09:30:00.000Z"), - logoUrl: "logo_url", - metrics: [ - { - accountId: "account_id", - capturedAtMax: new Date("2024-01-15T09:30:00.000Z"), - capturedAtMin: new Date("2024-01-15T09:30:00.000Z"), - companyId: "company_id", - createdAt: new Date("2024-01-15T09:30:00.000Z"), - environmentId: "environment_id", - eventSubtype: "event_subtype", - monthReset: "month_reset", - period: "period", - value: 1, - }, - ], - name: "name", - paymentMethods: [ - { - createdAt: new Date("2024-01-15T09:30:00.000Z"), - customerExternalId: "customer_external_id", - environmentId: "environment_id", - externalId: "external_id", - id: "id", - paymentMethodType: "payment_method_type", - providerType: "schematic", - updatedAt: new Date("2024-01-15T09:30:00.000Z"), - }, - ], - plan: { - id: "id", - includedCreditGrants: [ - { - billingCreditAutoTopupEnabled: true, - createdAt: new Date("2024-01-15T09:30:00.000Z"), - creditAmount: 1, - creditDescription: "credit_description", - creditId: "credit_id", - creditName: "credit_name", - id: "id", - planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", - resetType: "no_reset", - updatedAt: new Date("2024-01-15T09:30:00.000Z"), - }, - ], - name: "name", - }, - plans: [ - { - id: "id", - name: "name", - }, - ], - rules: [ - { - accountId: "account_id", - conditionGroups: [ - { - conditions: [ - { - accountId: "account_id", - conditionType: "base_plan", - environmentId: "environment_id", - id: "id", - operator: "eq", - resourceIds: ["resource_ids"], - traitValue: "trait_value", - }, - ], - }, - ], - conditions: [ - { - accountId: "account_id", - conditionType: "base_plan", - environmentId: "environment_id", - id: "id", - operator: "eq", - resourceIds: ["resource_ids"], - traitValue: "trait_value", - }, - ], - environmentId: "environment_id", - id: "id", - name: "name", - priority: 1, - ruleType: "default", - value: true, - }, - ], - traits: { - key: "value", - }, - updatedAt: new Date("2024-01-15T09:30:00.000Z"), - userCount: 1, - }, - ], - params: { - creditTypeIds: ["credit_type_ids"], - displayProperties: ["display_properties"], - featureIds: ["feature_ids"], - ids: ["ids"], - limit: 1, - monetizedSubscriptions: true, - offset: 1, - planIds: ["plan_ids"], - q: "q", - sortOrderColumn: "sort_order_column", - sortOrderDirection: "asc", - subscriptionStatuses: ["active"], - subscriptionTypes: ["free"], - withoutPlan: true, - withoutSubscription: true, - }, - }); - }); - - test("listCompaniesForAdvancedFilter (2)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/companies/list2").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.companies.listCompaniesForAdvancedFilter(); - }).rejects.toThrow(Schematic.BadRequestError); - }); - - test("listCompaniesForAdvancedFilter (3)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/companies/list2").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.companies.listCompaniesForAdvancedFilter(); - }).rejects.toThrow(Schematic.UnauthorizedError); - }); - - test("listCompaniesForAdvancedFilter (4)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/companies/list2").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.companies.listCompaniesForAdvancedFilter(); - }).rejects.toThrow(Schematic.ForbiddenError); - }); - - test("listCompaniesForAdvancedFilter (5)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/companies/list2").respondWith().statusCode(404).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.companies.listCompaniesForAdvancedFilter(); - }).rejects.toThrow(Schematic.NotFoundError); - }); - - test("listCompaniesForAdvancedFilter (6)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { error: "error" }; - server.mockEndpoint().get("/companies/list2").respondWith().statusCode(500).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.companies.listCompaniesForAdvancedFilter(); - }).rejects.toThrow(Schematic.InternalServerError); - }); - - test("lookupCompany (1)", async () => { - const server = mockServerPool.createServer(); - const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - - const rawResponseBody = { - data: { - add_ons: [ - { - added_on: "2024-01-15T09:30:00Z", - billing_product_external_id: "billing_product_external_id", - billing_product_id: "billing_product_id", - description: "description", - id: "id", - image_url: "image_url", - included_credit_grants: [ - { - billing_credit_auto_topup_amount: 1, - billing_credit_auto_topup_amount_type: "billing_credit_auto_topup_amount_type", - billing_credit_auto_topup_enabled: true, - billing_credit_auto_topup_expiry_type: "duration", - billing_credit_auto_topup_expiry_unit: "billing_periods", - billing_credit_auto_topup_expiry_unit_count: 1, - billing_credit_auto_topup_threshold_percent: 1, - created_at: "2024-01-15T09:30:00Z", credit_amount: 1, credit_description: "credit_description", credit_icon: "credit_icon", @@ -4015,8 +3429,9 @@ describe("CompaniesClient", () => { expiry_unit: "billing_periods", expiry_unit_count: 1, id: "id", + plan: { description: "description", id: "id", image_url: "image_url", name: "name" }, plan_id: "plan_id", - plan_name: "plan_name", + plan_version_id: "plan_version_id", plural_name: "plural_name", reset_cadence: "daily", reset_start: "billing_period", @@ -4033,6 +3448,57 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_unit_count: 1, billing_credit_auto_topup_threshold_percent: 1, created_at: "2024-01-15T09:30:00Z", + credit: { + account_id: "account_id", + burn_strategy: "expiration_priority", + cost_editable: true, + created_at: "2024-01-15T09:30:00Z", + default_expiry_unit: "billing_periods", + default_expiry_unit_count: 1, + default_rollover_policy: "expire", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plural_name: "plural_name", + price: { + billing_scheme: "per_unit", + created_at: "2024-01-15T09:30:00Z", + currency: "currency", + id: "id", + interval: "day", + is_active: true, + package_size: 1, + price: 1, + price_external_id: "price_external_id", + price_id: "price_id", + price_tier: [], + product_external_id: "product_external_id", + product_id: "product_id", + product_name: "product_name", + provider_type: "schematic", + updated_at: "2024-01-15T09:30:00Z", + usage_type: "licensed", + }, + price_per_unit: 1, + price_per_unit_decimal: "price_per_unit_decimal", + product: { + account_id: "account_id", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + external_id: "external_id", + is_active: true, + name: "name", + price: 1.1, + product_id: "product_id", + provider_type: "schematic", + quantity: 1.1, + updated_at: "2024-01-15T09:30:00Z", + }, + singular_name: "singular_name", + updated_at: "2024-01-15T09:30:00Z", + }, credit_amount: 1, credit_description: "credit_description", credit_icon: "credit_icon", @@ -4042,8 +3508,9 @@ describe("CompaniesClient", () => { expiry_unit: "billing_periods", expiry_unit_count: 1, id: "id", + plan: { description: "description", id: "id", image_url: "image_url", name: "name" }, plan_id: "plan_id", - plan_name: "plan_name", + plan_version_id: "plan_version_id", plural_name: "plural_name", reset_cadence: "daily", reset_start: "billing_period", @@ -4074,6 +3541,57 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_unit_count: 1, billing_credit_auto_topup_threshold_percent: 1, created_at: "2024-01-15T09:30:00Z", + credit: { + account_id: "account_id", + burn_strategy: "expiration_priority", + cost_editable: true, + created_at: "2024-01-15T09:30:00Z", + default_expiry_unit: "billing_periods", + default_expiry_unit_count: 1, + default_rollover_policy: "expire", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plural_name: "plural_name", + price: { + billing_scheme: "per_unit", + created_at: "2024-01-15T09:30:00Z", + currency: "currency", + id: "id", + interval: "day", + is_active: true, + package_size: 1, + price: 1, + price_external_id: "price_external_id", + price_id: "price_id", + price_tier: [], + product_external_id: "product_external_id", + product_id: "product_id", + product_name: "product_name", + provider_type: "schematic", + updated_at: "2024-01-15T09:30:00Z", + usage_type: "licensed", + }, + price_per_unit: 1, + price_per_unit_decimal: "price_per_unit_decimal", + product: { + account_id: "account_id", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + external_id: "external_id", + is_active: true, + name: "name", + price: 1.1, + product_id: "product_id", + provider_type: "schematic", + quantity: 1.1, + updated_at: "2024-01-15T09:30:00Z", + }, + singular_name: "singular_name", + updated_at: "2024-01-15T09:30:00Z", + }, credit_amount: 1, credit_description: "credit_description", credit_icon: "credit_icon", @@ -4083,8 +3601,9 @@ describe("CompaniesClient", () => { expiry_unit: "billing_periods", expiry_unit_count: 1, id: "id", + plan: { description: "description", id: "id", image_url: "image_url", name: "name" }, plan_id: "plan_id", - plan_name: "plan_name", + plan_version_id: "plan_version_id", plural_name: "plural_name", reset_cadence: "daily", reset_start: "billing_period", @@ -4101,6 +3620,57 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_unit_count: 1, billing_credit_auto_topup_threshold_percent: 1, created_at: "2024-01-15T09:30:00Z", + credit: { + account_id: "account_id", + burn_strategy: "expiration_priority", + cost_editable: true, + created_at: "2024-01-15T09:30:00Z", + default_expiry_unit: "billing_periods", + default_expiry_unit_count: 1, + default_rollover_policy: "expire", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plural_name: "plural_name", + price: { + billing_scheme: "per_unit", + created_at: "2024-01-15T09:30:00Z", + currency: "currency", + id: "id", + interval: "day", + is_active: true, + package_size: 1, + price: 1, + price_external_id: "price_external_id", + price_id: "price_id", + price_tier: [], + product_external_id: "product_external_id", + product_id: "product_id", + product_name: "product_name", + provider_type: "schematic", + updated_at: "2024-01-15T09:30:00Z", + usage_type: "licensed", + }, + price_per_unit: 1, + price_per_unit_decimal: "price_per_unit_decimal", + product: { + account_id: "account_id", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + external_id: "external_id", + is_active: true, + name: "name", + price: 1.1, + product_id: "product_id", + provider_type: "schematic", + quantity: 1.1, + updated_at: "2024-01-15T09:30:00Z", + }, + singular_name: "singular_name", + updated_at: "2024-01-15T09:30:00Z", + }, credit_amount: 1, credit_description: "credit_description", credit_icon: "credit_icon", @@ -4110,8 +3680,9 @@ describe("CompaniesClient", () => { expiry_unit: "billing_periods", expiry_unit_count: 1, id: "id", + plan: { description: "description", id: "id", image_url: "image_url", name: "name" }, plan_id: "plan_id", - plan_name: "plan_name", + plan_version_id: "plan_version_id", plural_name: "plural_name", reset_cadence: "daily", reset_start: "billing_period", @@ -4666,6 +4237,40 @@ describe("CompaniesClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [ + { + allocation: 1, + credit_id: "credit_id", + credit_remaining: 1.1, + credit_total: 1.1, + credit_used: 1.1, + event_name: "event_name", + feature_id: "feature_id", + feature_key: "feature_key", + metric_period: "all_time", + metric_reset_at: "2024-01-15T09:30:00Z", + month_reset: "first_of_month", + soft_limit: 1, + usage: 1, + value_type: "boolean", + }, + { + allocation: 1, + credit_id: "credit_id", + credit_remaining: 1.1, + credit_total: 1.1, + credit_used: 1.1, + event_name: "event_name", + feature_id: "feature_id", + feature_key: "feature_key", + metric_period: "all_time", + metric_reset_at: "2024-01-15T09:30:00Z", + month_reset: "first_of_month", + soft_limit: 1, + usage: 1, + value_type: "boolean", + }, + ], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -4832,6 +4437,57 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_unit_count: 1, billing_credit_auto_topup_threshold_percent: 1, created_at: "2024-01-15T09:30:00Z", + credit: { + account_id: "account_id", + burn_strategy: "expiration_priority", + cost_editable: true, + created_at: "2024-01-15T09:30:00Z", + default_expiry_unit: "billing_periods", + default_expiry_unit_count: 1, + default_rollover_policy: "expire", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plural_name: "plural_name", + price: { + billing_scheme: "per_unit", + created_at: "2024-01-15T09:30:00Z", + currency: "currency", + id: "id", + interval: "day", + is_active: true, + package_size: 1, + price: 1, + price_external_id: "price_external_id", + price_id: "price_id", + price_tier: [], + product_external_id: "product_external_id", + product_id: "product_id", + product_name: "product_name", + provider_type: "schematic", + updated_at: "2024-01-15T09:30:00Z", + usage_type: "licensed", + }, + price_per_unit: 1, + price_per_unit_decimal: "price_per_unit_decimal", + product: { + account_id: "account_id", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + external_id: "external_id", + is_active: true, + name: "name", + price: 1.1, + product_id: "product_id", + provider_type: "schematic", + quantity: 1.1, + updated_at: "2024-01-15T09:30:00Z", + }, + singular_name: "singular_name", + updated_at: "2024-01-15T09:30:00Z", + }, credit_amount: 1, credit_description: "credit_description", credit_icon: "credit_icon", @@ -4841,8 +4497,9 @@ describe("CompaniesClient", () => { expiry_unit: "billing_periods", expiry_unit_count: 1, id: "id", + plan: { description: "description", id: "id", image_url: "image_url", name: "name" }, plan_id: "plan_id", - plan_name: "plan_name", + plan_version_id: "plan_version_id", plural_name: "plural_name", reset_cadence: "daily", reset_start: "billing_period", @@ -4859,6 +4516,57 @@ describe("CompaniesClient", () => { billing_credit_auto_topup_expiry_unit_count: 1, billing_credit_auto_topup_threshold_percent: 1, created_at: "2024-01-15T09:30:00Z", + credit: { + account_id: "account_id", + burn_strategy: "expiration_priority", + cost_editable: true, + created_at: "2024-01-15T09:30:00Z", + default_expiry_unit: "billing_periods", + default_expiry_unit_count: 1, + default_rollover_policy: "expire", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plural_name: "plural_name", + price: { + billing_scheme: "per_unit", + created_at: "2024-01-15T09:30:00Z", + currency: "currency", + id: "id", + interval: "day", + is_active: true, + package_size: 1, + price: 1, + price_external_id: "price_external_id", + price_id: "price_id", + price_tier: [], + product_external_id: "product_external_id", + product_id: "product_id", + product_name: "product_name", + provider_type: "schematic", + updated_at: "2024-01-15T09:30:00Z", + usage_type: "licensed", + }, + price_per_unit: 1, + price_per_unit_decimal: "price_per_unit_decimal", + product: { + account_id: "account_id", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + external_id: "external_id", + is_active: true, + name: "name", + price: 1.1, + product_id: "product_id", + provider_type: "schematic", + quantity: 1.1, + updated_at: "2024-01-15T09:30:00Z", + }, + singular_name: "singular_name", + updated_at: "2024-01-15T09:30:00Z", + }, credit_amount: 1, credit_description: "credit_description", credit_icon: "credit_icon", @@ -4868,8 +4576,9 @@ describe("CompaniesClient", () => { expiry_unit: "billing_periods", expiry_unit_count: 1, id: "id", + plan: { description: "description", id: "id", image_url: "image_url", name: "name" }, plan_id: "plan_id", - plan_name: "plan_name", + plan_version_id: "plan_version_id", plural_name: "plural_name", reset_cadence: "daily", reset_start: "billing_period", @@ -5185,6 +4894,19 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { traits: { key: "value" } }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -5218,6 +4940,57 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryUnitCount: 1, billingCreditAutoTopupThresholdPercent: 1, createdAt: new Date("2024-01-15T09:30:00.000Z"), + credit: { + accountId: "account_id", + burnStrategy: "expiration_priority", + costEditable: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultExpiryUnit: "billing_periods", + defaultExpiryUnitCount: 1, + defaultRolloverPolicy: "expire", + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + pluralName: "plural_name", + price: { + billingScheme: "per_unit", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + currency: "currency", + id: "id", + interval: "day", + isActive: true, + packageSize: 1, + price: 1, + priceExternalId: "price_external_id", + priceId: "price_id", + priceTier: [], + productExternalId: "product_external_id", + productId: "product_id", + productName: "product_name", + providerType: "schematic", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + usageType: "licensed", + }, + pricePerUnit: 1, + pricePerUnitDecimal: "price_per_unit_decimal", + product: { + accountId: "account_id", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + externalId: "external_id", + isActive: true, + name: "name", + price: 1.1, + productId: "product_id", + providerType: "schematic", + quantity: 1.1, + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + singularName: "singular_name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, creditAmount: 1, creditDescription: "credit_description", creditIcon: "credit_icon", @@ -5227,8 +5000,14 @@ describe("CompaniesClient", () => { expiryUnit: "billing_periods", expiryUnitCount: 1, id: "id", + plan: { + description: "description", + id: "id", + imageUrl: "image_url", + name: "name", + }, planId: "plan_id", - planName: "plan_name", + planVersionId: "plan_version_id", pluralName: "plural_name", resetCadence: "daily", resetStart: "billing_period", @@ -5245,6 +5024,57 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryUnitCount: 1, billingCreditAutoTopupThresholdPercent: 1, createdAt: new Date("2024-01-15T09:30:00.000Z"), + credit: { + accountId: "account_id", + burnStrategy: "expiration_priority", + costEditable: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultExpiryUnit: "billing_periods", + defaultExpiryUnitCount: 1, + defaultRolloverPolicy: "expire", + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + pluralName: "plural_name", + price: { + billingScheme: "per_unit", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + currency: "currency", + id: "id", + interval: "day", + isActive: true, + packageSize: 1, + price: 1, + priceExternalId: "price_external_id", + priceId: "price_id", + priceTier: [], + productExternalId: "product_external_id", + productId: "product_id", + productName: "product_name", + providerType: "schematic", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + usageType: "licensed", + }, + pricePerUnit: 1, + pricePerUnitDecimal: "price_per_unit_decimal", + product: { + accountId: "account_id", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + externalId: "external_id", + isActive: true, + name: "name", + price: 1.1, + productId: "product_id", + providerType: "schematic", + quantity: 1.1, + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + singularName: "singular_name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, creditAmount: 1, creditDescription: "credit_description", creditIcon: "credit_icon", @@ -5254,8 +5084,14 @@ describe("CompaniesClient", () => { expiryUnit: "billing_periods", expiryUnitCount: 1, id: "id", + plan: { + description: "description", + id: "id", + imageUrl: "image_url", + name: "name", + }, planId: "plan_id", - planName: "plan_name", + planVersionId: "plan_version_id", pluralName: "plural_name", resetCadence: "daily", resetStart: "billing_period", @@ -5286,6 +5122,57 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryUnitCount: 1, billingCreditAutoTopupThresholdPercent: 1, createdAt: new Date("2024-01-15T09:30:00.000Z"), + credit: { + accountId: "account_id", + burnStrategy: "expiration_priority", + costEditable: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultExpiryUnit: "billing_periods", + defaultExpiryUnitCount: 1, + defaultRolloverPolicy: "expire", + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + pluralName: "plural_name", + price: { + billingScheme: "per_unit", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + currency: "currency", + id: "id", + interval: "day", + isActive: true, + packageSize: 1, + price: 1, + priceExternalId: "price_external_id", + priceId: "price_id", + priceTier: [], + productExternalId: "product_external_id", + productId: "product_id", + productName: "product_name", + providerType: "schematic", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + usageType: "licensed", + }, + pricePerUnit: 1, + pricePerUnitDecimal: "price_per_unit_decimal", + product: { + accountId: "account_id", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + externalId: "external_id", + isActive: true, + name: "name", + price: 1.1, + productId: "product_id", + providerType: "schematic", + quantity: 1.1, + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + singularName: "singular_name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, creditAmount: 1, creditDescription: "credit_description", creditIcon: "credit_icon", @@ -5295,8 +5182,14 @@ describe("CompaniesClient", () => { expiryUnit: "billing_periods", expiryUnitCount: 1, id: "id", + plan: { + description: "description", + id: "id", + imageUrl: "image_url", + name: "name", + }, planId: "plan_id", - planName: "plan_name", + planVersionId: "plan_version_id", pluralName: "plural_name", resetCadence: "daily", resetStart: "billing_period", @@ -5313,6 +5206,57 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryUnitCount: 1, billingCreditAutoTopupThresholdPercent: 1, createdAt: new Date("2024-01-15T09:30:00.000Z"), + credit: { + accountId: "account_id", + burnStrategy: "expiration_priority", + costEditable: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultExpiryUnit: "billing_periods", + defaultExpiryUnitCount: 1, + defaultRolloverPolicy: "expire", + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + pluralName: "plural_name", + price: { + billingScheme: "per_unit", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + currency: "currency", + id: "id", + interval: "day", + isActive: true, + packageSize: 1, + price: 1, + priceExternalId: "price_external_id", + priceId: "price_id", + priceTier: [], + productExternalId: "product_external_id", + productId: "product_id", + productName: "product_name", + providerType: "schematic", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + usageType: "licensed", + }, + pricePerUnit: 1, + pricePerUnitDecimal: "price_per_unit_decimal", + product: { + accountId: "account_id", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + externalId: "external_id", + isActive: true, + name: "name", + price: 1.1, + productId: "product_id", + providerType: "schematic", + quantity: 1.1, + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + singularName: "singular_name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, creditAmount: 1, creditDescription: "credit_description", creditIcon: "credit_icon", @@ -5322,8 +5266,14 @@ describe("CompaniesClient", () => { expiryUnit: "billing_periods", expiryUnitCount: 1, id: "id", + plan: { + description: "description", + id: "id", + imageUrl: "image_url", + name: "name", + }, planId: "plan_id", - planName: "plan_name", + planVersionId: "plan_version_id", pluralName: "plural_name", resetCadence: "daily", resetStart: "billing_period", @@ -5892,6 +5842,40 @@ describe("CompaniesClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + allocation: 1, + creditId: "credit_id", + creditRemaining: 1.1, + creditTotal: 1.1, + creditUsed: 1.1, + eventName: "event_name", + featureId: "feature_id", + featureKey: "feature_key", + metricPeriod: "all_time", + metricResetAt: new Date("2024-01-15T09:30:00.000Z"), + monthReset: "first_of_month", + softLimit: 1, + usage: 1, + valueType: "boolean", + }, + { + allocation: 1, + creditId: "credit_id", + creditRemaining: 1.1, + creditTotal: 1.1, + creditUsed: 1.1, + eventName: "event_name", + featureId: "feature_id", + featureKey: "feature_key", + metricPeriod: "all_time", + metricResetAt: new Date("2024-01-15T09:30:00.000Z"), + monthReset: "first_of_month", + softLimit: 1, + usage: 1, + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -6058,6 +6042,57 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryUnitCount: 1, billingCreditAutoTopupThresholdPercent: 1, createdAt: new Date("2024-01-15T09:30:00.000Z"), + credit: { + accountId: "account_id", + burnStrategy: "expiration_priority", + costEditable: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultExpiryUnit: "billing_periods", + defaultExpiryUnitCount: 1, + defaultRolloverPolicy: "expire", + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + pluralName: "plural_name", + price: { + billingScheme: "per_unit", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + currency: "currency", + id: "id", + interval: "day", + isActive: true, + packageSize: 1, + price: 1, + priceExternalId: "price_external_id", + priceId: "price_id", + priceTier: [], + productExternalId: "product_external_id", + productId: "product_id", + productName: "product_name", + providerType: "schematic", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + usageType: "licensed", + }, + pricePerUnit: 1, + pricePerUnitDecimal: "price_per_unit_decimal", + product: { + accountId: "account_id", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + externalId: "external_id", + isActive: true, + name: "name", + price: 1.1, + productId: "product_id", + providerType: "schematic", + quantity: 1.1, + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + singularName: "singular_name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, creditAmount: 1, creditDescription: "credit_description", creditIcon: "credit_icon", @@ -6067,8 +6102,14 @@ describe("CompaniesClient", () => { expiryUnit: "billing_periods", expiryUnitCount: 1, id: "id", + plan: { + description: "description", + id: "id", + imageUrl: "image_url", + name: "name", + }, planId: "plan_id", - planName: "plan_name", + planVersionId: "plan_version_id", pluralName: "plural_name", resetCadence: "daily", resetStart: "billing_period", @@ -6085,6 +6126,57 @@ describe("CompaniesClient", () => { billingCreditAutoTopupExpiryUnitCount: 1, billingCreditAutoTopupThresholdPercent: 1, createdAt: new Date("2024-01-15T09:30:00.000Z"), + credit: { + accountId: "account_id", + burnStrategy: "expiration_priority", + costEditable: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultExpiryUnit: "billing_periods", + defaultExpiryUnitCount: 1, + defaultRolloverPolicy: "expire", + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + pluralName: "plural_name", + price: { + billingScheme: "per_unit", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + currency: "currency", + id: "id", + interval: "day", + isActive: true, + packageSize: 1, + price: 1, + priceExternalId: "price_external_id", + priceId: "price_id", + priceTier: [], + productExternalId: "product_external_id", + productId: "product_id", + productName: "product_name", + providerType: "schematic", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + usageType: "licensed", + }, + pricePerUnit: 1, + pricePerUnitDecimal: "price_per_unit_decimal", + product: { + accountId: "account_id", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + externalId: "external_id", + isActive: true, + name: "name", + price: 1.1, + productId: "product_id", + providerType: "schematic", + quantity: 1.1, + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + singularName: "singular_name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, creditAmount: 1, creditDescription: "credit_description", creditIcon: "credit_icon", @@ -6094,8 +6186,14 @@ describe("CompaniesClient", () => { expiryUnit: "billing_periods", expiryUnitCount: 1, id: "id", + plan: { + description: "description", + id: "id", + imageUrl: "image_url", + name: "name", + }, planId: "plan_id", - planName: "plan_name", + planVersionId: "plan_version_id", pluralName: "plural_name", resetCadence: "daily", resetStart: "billing_period", @@ -6469,6 +6567,19 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { traits: { key: "value", @@ -7266,9 +7377,6 @@ describe("CompaniesClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -7426,6 +7534,7 @@ describe("CompaniesClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -7497,9 +7606,6 @@ describe("CompaniesClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -7547,6 +7653,19 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -7583,9 +7702,6 @@ describe("CompaniesClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -7747,6 +7863,13 @@ describe("CompaniesClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -7818,9 +7941,6 @@ describe("CompaniesClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -7873,6 +7993,19 @@ describe("CompaniesClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -9143,11 +9276,12 @@ describe("CompaniesClient", () => { created_at: "2024-01-15T09:30:00Z", id: "id", name: "name", + readonly: true, scopes: ["admin"], updated_at: "2024-01-15T09:30:00Z", }, - api_key_request: { - api_key_id: "api_key_id", + audit_log: { + actor_type: "api_key", id: "id", method: "method", started_at: "2024-01-15T09:30:00Z", @@ -9237,11 +9371,12 @@ describe("CompaniesClient", () => { createdAt: new Date("2024-01-15T09:30:00.000Z"), id: "id", name: "name", + readonly: true, scopes: ["admin"], updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, - apiKeyRequest: { - apiKeyId: "api_key_id", + auditLog: { + actorType: "api_key", id: "id", method: "method", startedAt: new Date("2024-01-15T09:30:00.000Z"), @@ -9380,17 +9515,17 @@ describe("CompaniesClient", () => { id: "id", last_used_at: "2024-01-15T09:30:00Z", name: "name", + readonly: true, scopes: ["admin"], updated_at: "2024-01-15T09:30:00Z", }, - api_key_request: { + audit_log: { + actor_type: "api_key", api_key_id: "api_key_id", ended_at: "2024-01-15T09:30:00Z", environment_id: "environment_id", id: "id", method: "method", - req_body: "req_body", - request_type: "request_type", resource_id: 1, resource_id_string: "resource_id_string", resource_name: "resource_name", @@ -9474,17 +9609,17 @@ describe("CompaniesClient", () => { id: "id", lastUsedAt: new Date("2024-01-15T09:30:00.000Z"), name: "name", + readonly: true, scopes: ["admin"], updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, - apiKeyRequest: { + auditLog: { + actorType: "api_key", apiKeyId: "api_key_id", endedAt: new Date("2024-01-15T09:30:00.000Z"), environmentId: "environment_id", id: "id", method: "method", - reqBody: "req_body", - requestType: "request_type", resourceId: 1, resourceIdString: "resource_id_string", resourceName: "resource_name", diff --git a/tests/wire/components.test.ts b/tests/wire/components.test.ts index 0787011f..df2d29f1 100644 --- a/tests/wire/components.test.ts +++ b/tests/wire/components.test.ts @@ -162,7 +162,7 @@ describe("ComponentsClient", () => { test("createComponent (2)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { entity_type: "billing", name: "name" }; + const rawRequestBody = { entity_type: "billing", name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -176,7 +176,7 @@ describe("ComponentsClient", () => { await expect(async () => { return await client.components.createComponent({ entityType: "billing", - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.BadRequestError); }); @@ -184,7 +184,7 @@ describe("ComponentsClient", () => { test("createComponent (3)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { entity_type: "billing", name: "name" }; + const rawRequestBody = { entity_type: "billing", name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -198,7 +198,7 @@ describe("ComponentsClient", () => { await expect(async () => { return await client.components.createComponent({ entityType: "billing", - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.UnauthorizedError); }); @@ -206,7 +206,7 @@ describe("ComponentsClient", () => { test("createComponent (4)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { entity_type: "billing", name: "name" }; + const rawRequestBody = { entity_type: "billing", name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -220,7 +220,7 @@ describe("ComponentsClient", () => { await expect(async () => { return await client.components.createComponent({ entityType: "billing", - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.ForbiddenError); }); @@ -228,7 +228,7 @@ describe("ComponentsClient", () => { test("createComponent (5)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { entity_type: "billing", name: "name" }; + const rawRequestBody = { entity_type: "billing", name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -242,7 +242,7 @@ describe("ComponentsClient", () => { await expect(async () => { return await client.components.createComponent({ entityType: "billing", - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.NotFoundError); }); @@ -250,7 +250,7 @@ describe("ComponentsClient", () => { test("createComponent (6)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { entity_type: "billing", name: "name" }; + const rawRequestBody = { entity_type: "billing", name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -264,7 +264,7 @@ describe("ComponentsClient", () => { await expect(async () => { return await client.components.createComponent({ entityType: "billing", - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.InternalServerError); }); @@ -835,9 +835,6 @@ describe("ComponentsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -982,9 +979,6 @@ describe("ComponentsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -1046,9 +1040,6 @@ describe("ComponentsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -1164,6 +1155,7 @@ describe("ComponentsClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -1230,9 +1222,6 @@ describe("ComponentsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -1277,6 +1266,17 @@ describe("ComponentsClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -1324,6 +1324,18 @@ describe("ComponentsClient", () => { }, ], default_plan: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -1354,6 +1366,18 @@ describe("ComponentsClient", () => { controlled_by: "schematic", created_at: "2024-01-15T09:30:00Z", description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, features: [ { created_at: "2024-01-15T09:30:00Z", @@ -1439,8 +1463,6 @@ describe("ComponentsClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -1496,6 +1518,7 @@ describe("ComponentsClient", () => { display_settings: { show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, }, @@ -1526,6 +1549,18 @@ describe("ComponentsClient", () => { }, ], post_trial_plan: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -1556,6 +1591,18 @@ describe("ComponentsClient", () => { controlled_by: "schematic", created_at: "2024-01-15T09:30:00Z", description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, features: [ { created_at: "2024-01-15T09:30:00Z", @@ -1641,8 +1688,6 @@ describe("ComponentsClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -1698,6 +1743,19 @@ describe("ComponentsClient", () => { prevent_self_service_downgrade: true, prevent_self_service_downgrade_button_text: "prevent_self_service_downgrade_button_text", prevent_self_service_downgrade_url: "prevent_self_service_downgrade_url", + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, show_as_monthly_prices: true, show_credits: true, show_period_toggle: true, @@ -1938,9 +1996,6 @@ describe("ComponentsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -2100,9 +2155,6 @@ describe("ComponentsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -2175,9 +2227,6 @@ describe("ComponentsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -2295,6 +2344,13 @@ describe("ComponentsClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2361,9 +2417,6 @@ describe("ComponentsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -2413,6 +2466,17 @@ describe("ComponentsClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -2464,6 +2528,18 @@ describe("ComponentsClient", () => { }, ], defaultPlan: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2494,6 +2570,18 @@ describe("ComponentsClient", () => { controlledBy: "schematic", createdAt: new Date("2024-01-15T09:30:00.000Z"), description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, features: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2594,8 +2682,6 @@ describe("ComponentsClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -2651,6 +2737,7 @@ describe("ComponentsClient", () => { displaySettings: { showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, }, @@ -2681,6 +2768,18 @@ describe("ComponentsClient", () => { }, ], postTrialPlan: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2711,6 +2810,18 @@ describe("ComponentsClient", () => { controlledBy: "schematic", createdAt: new Date("2024-01-15T09:30:00.000Z"), description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, features: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2811,8 +2922,6 @@ describe("ComponentsClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -2868,6 +2977,19 @@ describe("ComponentsClient", () => { preventSelfServiceDowngrade: true, preventSelfServiceDowngradeButtonText: "prevent_self_service_downgrade_button_text", preventSelfServiceDowngradeUrl: "prevent_self_service_downgrade_url", + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, showAsMonthlyPrices: true, showCredits: true, showPeriodToggle: true, diff --git a/tests/wire/componentspublic.test.ts b/tests/wire/componentspublic.test.ts new file mode 100644 index 00000000..a077afd3 --- /dev/null +++ b/tests/wire/componentspublic.test.ts @@ -0,0 +1,674 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Schematic from "../../src/api/index"; +import { SchematicClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; + +describe("ComponentspublicClient", () => { + test("getPublicPlans (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: { + active_add_ons: [ + { + charge_type: "free", + company_count: 1, + compatible_plan_ids: ["compatible_plan_ids"], + controlled_by: "schematic", + created_at: "2024-01-15T09:30:00Z", + custom: true, + description: "description", + entitlements: [ + { + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + feature_id: "feature_id", + id: "id", + plan_id: "plan_id", + rule_id: "rule_id", + updated_at: "2024-01-15T09:30:00Z", + value_type: "boolean", + }, + ], + features: [ + { + created_at: "2024-01-15T09:30:00Z", + description: "description", + feature_type: "boolean", + flags: [ + { + created_at: "2024-01-15T09:30:00Z", + default_value: true, + description: "description", + flag_type: "boolean", + id: "id", + key: "key", + name: "name", + rules: [ + { + condition_groups: [ + { + conditions: [ + { + condition_type: "condition_type", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + id: "id", + operator: "operator", + resource_ids: ["resource_ids"], + resources: [{ id: "id", name: "name" }], + rule_id: "rule_id", + trait_value: "trait_value", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + id: "id", + rule_id: "rule_id", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + conditions: [ + { + condition_type: "condition_type", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + id: "id", + operator: "operator", + resource_ids: ["resource_ids"], + resources: [{ id: "id", name: "name" }], + rule_id: "rule_id", + trait_value: "trait_value", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + id: "id", + name: "name", + priority: 1, + rule_type: "rule_type", + updated_at: "2024-01-15T09:30:00Z", + value: true, + }, + ], + updated_at: "2024-01-15T09:30:00Z", + }, + ], + icon: "icon", + id: "id", + name: "name", + plans: [{ id: "id", name: "name" }], + updated_at: "2024-01-15T09:30:00Z", + }, + ], + icon: "icon", + id: "id", + included_credit_grants: [ + { + billing_credit_auto_topup_enabled: true, + created_at: "2024-01-15T09:30:00Z", + credit_amount: 1, + credit_description: "credit_description", + credit_id: "credit_id", + credit_name: "credit_name", + id: "id", + plan_id: "plan_id", + reset_type: "no_reset", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + is_custom: true, + is_default: true, + is_free: true, + is_trialable: true, + name: "name", + plan_type: "plan", + updated_at: "2024-01-15T09:30:00Z", + versions: [ + { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, + ], + }, + ], + active_plans: [ + { + charge_type: "free", + company_count: 1, + compatible_plan_ids: ["compatible_plan_ids"], + controlled_by: "schematic", + created_at: "2024-01-15T09:30:00Z", + custom: true, + description: "description", + entitlements: [ + { + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + feature_id: "feature_id", + id: "id", + plan_id: "plan_id", + rule_id: "rule_id", + updated_at: "2024-01-15T09:30:00Z", + value_type: "boolean", + }, + ], + features: [ + { + created_at: "2024-01-15T09:30:00Z", + description: "description", + feature_type: "boolean", + flags: [ + { + created_at: "2024-01-15T09:30:00Z", + default_value: true, + description: "description", + flag_type: "boolean", + id: "id", + key: "key", + name: "name", + rules: [ + { + condition_groups: [ + { + conditions: [ + { + condition_type: "condition_type", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + id: "id", + operator: "operator", + resource_ids: ["resource_ids"], + resources: [{ id: "id", name: "name" }], + rule_id: "rule_id", + trait_value: "trait_value", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + id: "id", + rule_id: "rule_id", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + conditions: [ + { + condition_type: "condition_type", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + id: "id", + operator: "operator", + resource_ids: ["resource_ids"], + resources: [{ id: "id", name: "name" }], + rule_id: "rule_id", + trait_value: "trait_value", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + id: "id", + name: "name", + priority: 1, + rule_type: "rule_type", + updated_at: "2024-01-15T09:30:00Z", + value: true, + }, + ], + updated_at: "2024-01-15T09:30:00Z", + }, + ], + icon: "icon", + id: "id", + name: "name", + plans: [{ id: "id", name: "name" }], + updated_at: "2024-01-15T09:30:00Z", + }, + ], + icon: "icon", + id: "id", + included_credit_grants: [ + { + billing_credit_auto_topup_enabled: true, + created_at: "2024-01-15T09:30:00Z", + credit_amount: 1, + credit_description: "credit_description", + credit_id: "credit_id", + credit_name: "credit_name", + id: "id", + plan_id: "plan_id", + reset_type: "no_reset", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + is_custom: true, + is_default: true, + is_free: true, + is_trialable: true, + name: "name", + plan_type: "plan", + updated_at: "2024-01-15T09:30:00Z", + versions: [ + { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, + ], + }, + ], + add_on_compatibilities: [ + { compatible_plan_ids: ["compatible_plan_ids"], source_plan_id: "source_plan_id" }, + ], + capabilities: { badge_visibility: true, checkout: true }, + display_settings: { + show_as_monthly_prices: true, + show_credits: true, + show_feature_description: true, + show_period_toggle: true, + show_zero_price_as_free: true, + }, + show_as_monthly_prices: true, + show_credits: true, + show_period_toggle: true, + show_zero_price_as_free: true, + }, + params: { key: "value" }, + }; + server.mockEndpoint().get("/public/plans").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); + + const response = await client.componentspublic.getPublicPlans(); + expect(response).toEqual({ + data: { + activeAddOns: [ + { + chargeType: "free", + companyCount: 1, + compatiblePlanIds: ["compatible_plan_ids"], + controlledBy: "schematic", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + custom: true, + description: "description", + entitlements: [ + { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + featureId: "feature_id", + id: "id", + planId: "plan_id", + ruleId: "rule_id", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + valueType: "boolean", + }, + ], + features: [ + { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + featureType: "boolean", + flags: [ + { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultValue: true, + description: "description", + flagType: "boolean", + id: "id", + key: "key", + name: "name", + rules: [ + { + conditionGroups: [ + { + conditions: [ + { + conditionType: "condition_type", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + id: "id", + operator: "operator", + resourceIds: ["resource_ids"], + resources: [ + { + id: "id", + name: "name", + }, + ], + ruleId: "rule_id", + traitValue: "trait_value", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + id: "id", + ruleId: "rule_id", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + conditions: [ + { + conditionType: "condition_type", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + id: "id", + operator: "operator", + resourceIds: ["resource_ids"], + resources: [ + { + id: "id", + name: "name", + }, + ], + ruleId: "rule_id", + traitValue: "trait_value", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + id: "id", + name: "name", + priority: 1, + ruleType: "rule_type", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + value: true, + }, + ], + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + icon: "icon", + id: "id", + name: "name", + plans: [ + { + id: "id", + name: "name", + }, + ], + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + icon: "icon", + id: "id", + includedCreditGrants: [ + { + billingCreditAutoTopupEnabled: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + creditAmount: 1, + creditDescription: "credit_description", + creditId: "credit_id", + creditName: "credit_name", + id: "id", + planId: "plan_id", + resetType: "no_reset", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + isCustom: true, + isDefault: true, + isFree: true, + isTrialable: true, + name: "name", + planType: "plan", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + versions: [ + { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, + ], + }, + ], + activePlans: [ + { + chargeType: "free", + companyCount: 1, + compatiblePlanIds: ["compatible_plan_ids"], + controlledBy: "schematic", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + custom: true, + description: "description", + entitlements: [ + { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + featureId: "feature_id", + id: "id", + planId: "plan_id", + ruleId: "rule_id", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + valueType: "boolean", + }, + ], + features: [ + { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + featureType: "boolean", + flags: [ + { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultValue: true, + description: "description", + flagType: "boolean", + id: "id", + key: "key", + name: "name", + rules: [ + { + conditionGroups: [ + { + conditions: [ + { + conditionType: "condition_type", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + id: "id", + operator: "operator", + resourceIds: ["resource_ids"], + resources: [ + { + id: "id", + name: "name", + }, + ], + ruleId: "rule_id", + traitValue: "trait_value", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + id: "id", + ruleId: "rule_id", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + conditions: [ + { + conditionType: "condition_type", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + id: "id", + operator: "operator", + resourceIds: ["resource_ids"], + resources: [ + { + id: "id", + name: "name", + }, + ], + ruleId: "rule_id", + traitValue: "trait_value", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + id: "id", + name: "name", + priority: 1, + ruleType: "rule_type", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + value: true, + }, + ], + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + icon: "icon", + id: "id", + name: "name", + plans: [ + { + id: "id", + name: "name", + }, + ], + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + icon: "icon", + id: "id", + includedCreditGrants: [ + { + billingCreditAutoTopupEnabled: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + creditAmount: 1, + creditDescription: "credit_description", + creditId: "credit_id", + creditName: "credit_name", + id: "id", + planId: "plan_id", + resetType: "no_reset", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + isCustom: true, + isDefault: true, + isFree: true, + isTrialable: true, + name: "name", + planType: "plan", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + versions: [ + { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, + ], + }, + ], + addOnCompatibilities: [ + { + compatiblePlanIds: ["compatible_plan_ids"], + sourcePlanId: "source_plan_id", + }, + ], + capabilities: { + badgeVisibility: true, + checkout: true, + }, + displaySettings: { + showAsMonthlyPrices: true, + showCredits: true, + showFeatureDescription: true, + showPeriodToggle: true, + showZeroPriceAsFree: true, + }, + showAsMonthlyPrices: true, + showCredits: true, + showPeriodToggle: true, + showZeroPriceAsFree: true, + }, + params: { + key: "value", + }, + }); + }); + + test("getPublicPlans (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server.mockEndpoint().get("/public/plans").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.componentspublic.getPublicPlans(); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("getPublicPlans (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server.mockEndpoint().get("/public/plans").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.componentspublic.getPublicPlans(); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("getPublicPlans (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server.mockEndpoint().get("/public/plans").respondWith().statusCode(404).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.componentspublic.getPublicPlans(); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("getPublicPlans (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server.mockEndpoint().get("/public/plans").respondWith().statusCode(500).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.componentspublic.getPublicPlans(); + }).rejects.toThrow(Schematic.InternalServerError); + }); +}); diff --git a/tests/wire/credits.test.ts b/tests/wire/credits.test.ts index 7354a831..7a8d5eaf 100644 --- a/tests/wire/credits.test.ts +++ b/tests/wire/credits.test.ts @@ -13,6 +13,7 @@ describe("CreditsClient", () => { data: [ { burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", default_expiry_unit: "billing_periods", default_expiry_unit_count: 1, @@ -61,6 +62,7 @@ describe("CreditsClient", () => { data: [ { burnStrategy: "expiration_priority", + costEditable: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), defaultExpiryUnit: "billing_periods", defaultExpiryUnitCount: 1, @@ -172,6 +174,7 @@ describe("CreditsClient", () => { const rawResponseBody = { data: { burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", default_expiry_unit: "billing_periods", default_expiry_unit_count: 1, @@ -227,6 +230,7 @@ describe("CreditsClient", () => { expect(response).toEqual({ data: { burnStrategy: "expiration_priority", + costEditable: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), defaultExpiryUnit: "billing_periods", defaultExpiryUnitCount: 1, @@ -391,6 +395,7 @@ describe("CreditsClient", () => { const rawResponseBody = { data: { burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", default_expiry_unit: "billing_periods", default_expiry_unit_count: 1, @@ -441,6 +446,7 @@ describe("CreditsClient", () => { expect(response).toEqual({ data: { burnStrategy: "expiration_priority", + costEditable: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), defaultExpiryUnit: "billing_periods", defaultExpiryUnitCount: 1, @@ -562,6 +568,7 @@ describe("CreditsClient", () => { const rawResponseBody = { data: { burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", default_expiry_unit: "billing_periods", default_expiry_unit_count: 1, @@ -616,6 +623,7 @@ describe("CreditsClient", () => { expect(response).toEqual({ data: { burnStrategy: "expiration_priority", + costEditable: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), defaultExpiryUnit: "billing_periods", defaultExpiryUnitCount: 1, @@ -3640,17 +3648,28 @@ describe("CreditsClient", () => { auto_topup_expiry_unit_count: 1, auto_topup_threshold_percent: 1, created_at: "2024-01-15T09:30:00Z", + credit: { + burn_strategy: "expiration_priority", + cost_editable: true, + created_at: "2024-01-15T09:30:00Z", + default_expiry_unit: "billing_periods", + default_rollover_policy: "expire", + description: "description", + id: "id", + name: "name", + updated_at: "2024-01-15T09:30:00Z", + }, credit_amount: 1, credit_id: "credit_id", credit_name: "credit_name", - credit_plural_name: "credit_plural_name", - credit_singular_name: "credit_singular_name", expiry_type: "duration", expiry_unit: "billing_periods", expiry_unit_count: 1, id: "id", + plan: { id: "id", name: "name" }, plan_id: "plan_id", plan_name: "plan_name", + plan_version_id: "plan_version_id", reset_cadence: "daily", reset_start: "billing_period", reset_type: "no_reset", @@ -3664,6 +3683,7 @@ describe("CreditsClient", () => { offset: 1, plan_id: "plan_id", plan_ids: ["plan_ids"], + plan_version_id: "plan_version_id", }, }; server @@ -3677,6 +3697,7 @@ describe("CreditsClient", () => { const response = await client.credits.listBillingPlanCreditGrants({ creditId: "credit_id", planId: "plan_id", + planVersionId: "plan_version_id", limit: 1, offset: 1, }); @@ -3691,17 +3712,31 @@ describe("CreditsClient", () => { autoTopupExpiryUnitCount: 1, autoTopupThresholdPercent: 1, createdAt: new Date("2024-01-15T09:30:00.000Z"), + credit: { + burnStrategy: "expiration_priority", + costEditable: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultExpiryUnit: "billing_periods", + defaultRolloverPolicy: "expire", + description: "description", + id: "id", + name: "name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, creditAmount: 1, creditId: "credit_id", creditName: "credit_name", - creditPluralName: "credit_plural_name", - creditSingularName: "credit_singular_name", expiryType: "duration", expiryUnit: "billing_periods", expiryUnitCount: 1, id: "id", + plan: { + id: "id", + name: "name", + }, planId: "plan_id", planName: "plan_name", + planVersionId: "plan_version_id", resetCadence: "daily", resetStart: "billing_period", resetType: "no_reset", @@ -3715,6 +3750,7 @@ describe("CreditsClient", () => { offset: 1, planId: "plan_id", planIds: ["plan_ids"], + planVersionId: "plan_version_id", }, }); }); @@ -3829,17 +3865,54 @@ describe("CreditsClient", () => { auto_topup_expiry_unit_count: 1, auto_topup_threshold_percent: 1, created_at: "2024-01-15T09:30:00Z", + credit: { + burn_strategy: "expiration_priority", + cost_editable: true, + created_at: "2024-01-15T09:30:00Z", + default_expiry_unit: "billing_periods", + default_expiry_unit_count: 1, + default_rollover_policy: "expire", + description: "description", + icon: "icon", + id: "id", + name: "name", + plural_name: "plural_name", + price: { + currency: "currency", + external_price_id: "external_price_id", + id: "id", + interval: "day", + price: 1, + provider_type: "schematic", + scheme: "per_unit", + }, + product: { + account_id: "account_id", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + external_id: "external_id", + is_active: true, + name: "name", + price: 1.1, + product_id: "product_id", + provider_type: "schematic", + quantity: 1.1, + updated_at: "2024-01-15T09:30:00Z", + }, + singular_name: "singular_name", + updated_at: "2024-01-15T09:30:00Z", + }, credit_amount: 1, credit_id: "credit_id", credit_name: "credit_name", - credit_plural_name: "credit_plural_name", - credit_singular_name: "credit_singular_name", expiry_type: "duration", expiry_unit: "billing_periods", expiry_unit_count: 1, id: "id", + plan: { description: "description", id: "id", image_url: "image_url", name: "name" }, plan_id: "plan_id", plan_name: "plan_name", + plan_version_id: "plan_version_id", reset_cadence: "daily", reset_start: "billing_period", reset_type: "no_reset", @@ -3873,17 +3946,59 @@ describe("CreditsClient", () => { autoTopupExpiryUnitCount: 1, autoTopupThresholdPercent: 1, createdAt: new Date("2024-01-15T09:30:00.000Z"), + credit: { + burnStrategy: "expiration_priority", + costEditable: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultExpiryUnit: "billing_periods", + defaultExpiryUnitCount: 1, + defaultRolloverPolicy: "expire", + description: "description", + icon: "icon", + id: "id", + name: "name", + pluralName: "plural_name", + price: { + currency: "currency", + externalPriceId: "external_price_id", + id: "id", + interval: "day", + price: 1, + providerType: "schematic", + scheme: "per_unit", + }, + product: { + accountId: "account_id", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + externalId: "external_id", + isActive: true, + name: "name", + price: 1.1, + productId: "product_id", + providerType: "schematic", + quantity: 1.1, + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + singularName: "singular_name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, creditAmount: 1, creditId: "credit_id", creditName: "credit_name", - creditPluralName: "credit_plural_name", - creditSingularName: "credit_singular_name", expiryType: "duration", expiryUnit: "billing_periods", expiryUnitCount: 1, id: "id", + plan: { + description: "description", + id: "id", + imageUrl: "image_url", + name: "name", + }, planId: "plan_id", planName: "plan_name", + planVersionId: "plan_version_id", resetCadence: "daily", resetStart: "billing_period", resetType: "no_reset", @@ -4064,17 +4179,54 @@ describe("CreditsClient", () => { auto_topup_expiry_unit_count: 1, auto_topup_threshold_percent: 1, created_at: "2024-01-15T09:30:00Z", + credit: { + burn_strategy: "expiration_priority", + cost_editable: true, + created_at: "2024-01-15T09:30:00Z", + default_expiry_unit: "billing_periods", + default_expiry_unit_count: 1, + default_rollover_policy: "expire", + description: "description", + icon: "icon", + id: "id", + name: "name", + plural_name: "plural_name", + price: { + currency: "currency", + external_price_id: "external_price_id", + id: "id", + interval: "day", + price: 1, + provider_type: "schematic", + scheme: "per_unit", + }, + product: { + account_id: "account_id", + created_at: "2024-01-15T09:30:00Z", + environment_id: "environment_id", + external_id: "external_id", + is_active: true, + name: "name", + price: 1.1, + product_id: "product_id", + provider_type: "schematic", + quantity: 1.1, + updated_at: "2024-01-15T09:30:00Z", + }, + singular_name: "singular_name", + updated_at: "2024-01-15T09:30:00Z", + }, credit_amount: 1, credit_id: "credit_id", credit_name: "credit_name", - credit_plural_name: "credit_plural_name", - credit_singular_name: "credit_singular_name", expiry_type: "duration", expiry_unit: "billing_periods", expiry_unit_count: 1, id: "id", + plan: { description: "description", id: "id", image_url: "image_url", name: "name" }, plan_id: "plan_id", plan_name: "plan_name", + plan_version_id: "plan_version_id", reset_cadence: "daily", reset_start: "billing_period", reset_type: "no_reset", @@ -4105,17 +4257,59 @@ describe("CreditsClient", () => { autoTopupExpiryUnitCount: 1, autoTopupThresholdPercent: 1, createdAt: new Date("2024-01-15T09:30:00.000Z"), + credit: { + burnStrategy: "expiration_priority", + costEditable: true, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + defaultExpiryUnit: "billing_periods", + defaultExpiryUnitCount: 1, + defaultRolloverPolicy: "expire", + description: "description", + icon: "icon", + id: "id", + name: "name", + pluralName: "plural_name", + price: { + currency: "currency", + externalPriceId: "external_price_id", + id: "id", + interval: "day", + price: 1, + providerType: "schematic", + scheme: "per_unit", + }, + product: { + accountId: "account_id", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + environmentId: "environment_id", + externalId: "external_id", + isActive: true, + name: "name", + price: 1.1, + productId: "product_id", + providerType: "schematic", + quantity: 1.1, + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + singularName: "singular_name", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, creditAmount: 1, creditId: "credit_id", creditName: "credit_name", - creditPluralName: "credit_plural_name", - creditSingularName: "credit_singular_name", expiryType: "duration", expiryUnit: "billing_periods", expiryUnitCount: 1, id: "id", + plan: { + description: "description", + id: "id", + imageUrl: "image_url", + name: "name", + }, planId: "plan_id", planName: "plan_name", + planVersionId: "plan_version_id", resetCadence: "daily", resetStart: "billing_period", resetType: "no_reset", @@ -4366,6 +4560,7 @@ describe("CreditsClient", () => { offset: 1, plan_id: "plan_id", plan_ids: ["plan_ids"], + plan_version_id: "plan_version_id", }, }; server @@ -4379,6 +4574,7 @@ describe("CreditsClient", () => { const response = await client.credits.countBillingPlanCreditGrants({ creditId: "credit_id", planId: "plan_id", + planVersionId: "plan_version_id", limit: 1, offset: 1, }); @@ -4393,6 +4589,7 @@ describe("CreditsClient", () => { offset: 1, planId: "plan_id", planIds: ["plan_ids"], + planVersionId: "plan_version_id", }, }); }); diff --git a/tests/wire/entitlements.test.ts b/tests/wire/entitlements.test.ts index 6c27e8d5..35d2b7e4 100644 --- a/tests/wire/entitlements.test.ts +++ b/tests/wire/entitlements.test.ts @@ -26,9 +26,6 @@ describe("EntitlementsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -86,6 +83,7 @@ describe("EntitlementsClient", () => { }, ], created_at: "2024-01-15T09:30:00Z", + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -264,9 +262,6 @@ describe("EntitlementsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -324,6 +319,13 @@ describe("EntitlementsClient", () => { }, ], createdAt: new Date("2024-01-15T09:30:00.000Z"), + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -562,9 +564,6 @@ describe("EntitlementsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -680,6 +679,7 @@ describe("EntitlementsClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -746,9 +746,6 @@ describe("EntitlementsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -793,6 +790,17 @@ describe("EntitlementsClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -880,9 +888,6 @@ describe("EntitlementsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1000,6 +1005,13 @@ describe("EntitlementsClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1066,9 +1078,6 @@ describe("EntitlementsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1118,6 +1127,17 @@ describe("EntitlementsClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -1316,9 +1336,6 @@ describe("EntitlementsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -1434,6 +1451,7 @@ describe("EntitlementsClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -1500,9 +1518,6 @@ describe("EntitlementsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -1547,6 +1562,17 @@ describe("EntitlementsClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -1629,9 +1655,6 @@ describe("EntitlementsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1749,6 +1772,13 @@ describe("EntitlementsClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1815,9 +1845,6 @@ describe("EntitlementsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -1867,6 +1894,17 @@ describe("EntitlementsClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -2022,9 +2060,6 @@ describe("EntitlementsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -2140,6 +2175,7 @@ describe("EntitlementsClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -2206,9 +2242,6 @@ describe("EntitlementsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -2253,6 +2286,17 @@ describe("EntitlementsClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -2338,9 +2382,6 @@ describe("EntitlementsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -2458,6 +2499,13 @@ describe("EntitlementsClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2524,9 +2572,6 @@ describe("EntitlementsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -2576,6 +2621,17 @@ describe("EntitlementsClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -3024,9 +3080,6 @@ describe("EntitlementsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -3084,6 +3137,7 @@ describe("EntitlementsClient", () => { }, ], created_at: "2024-01-15T09:30:00Z", + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -3379,9 +3433,6 @@ describe("EntitlementsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -3439,6 +3490,13 @@ describe("EntitlementsClient", () => { }, ], createdAt: new Date("2024-01-15T09:30:00.000Z"), + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -4423,6 +4481,164 @@ describe("EntitlementsClient", () => { }).rejects.toThrow(Schematic.InternalServerError); }); + test("getFeatureUsageTimeSeries (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: { + feature_id: "feature_id", + feature_type: "boolean", + limits: [ + { effective_at: "2024-01-15T09:30:00Z", is_soft_limit: true, limit_source: "company_override" }, + ], + period_type: "period_type", + usage_points: [{ timestamp: "2024-01-15T09:30:00Z", usage: 1 }], + }, + params: { + company_id: "company_id", + end_time: "2024-01-15T09:30:00Z", + feature_id: "feature_id", + granularity: "daily", + start_time: "2024-01-15T09:30:00Z", + }, + }; + server + .mockEndpoint() + .get("/feature-usage-timeseries") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.entitlements.getFeatureUsageTimeSeries({ + companyId: "company_id", + endTime: new Date("2024-01-15T09:30:00.000Z"), + featureId: "feature_id", + granularity: "daily", + startTime: new Date("2024-01-15T09:30:00.000Z"), + }); + expect(response).toEqual({ + data: { + featureId: "feature_id", + featureType: "boolean", + limits: [ + { + effectiveAt: new Date("2024-01-15T09:30:00.000Z"), + isSoftLimit: true, + limitSource: "company_override", + }, + ], + periodType: "period_type", + usagePoints: [ + { + timestamp: new Date("2024-01-15T09:30:00.000Z"), + usage: 1, + }, + ], + }, + params: { + companyId: "company_id", + endTime: new Date("2024-01-15T09:30:00.000Z"), + featureId: "feature_id", + granularity: "daily", + startTime: new Date("2024-01-15T09:30:00.000Z"), + }, + }); + }); + + test("getFeatureUsageTimeSeries (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/feature-usage-timeseries") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.entitlements.getFeatureUsageTimeSeries({ + companyId: "company_id", + endTime: new Date("2024-01-15T09:30:00.000Z"), + featureId: "feature_id", + startTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("getFeatureUsageTimeSeries (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/feature-usage-timeseries") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.entitlements.getFeatureUsageTimeSeries({ + companyId: "company_id", + endTime: new Date("2024-01-15T09:30:00.000Z"), + featureId: "feature_id", + startTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("getFeatureUsageTimeSeries (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/feature-usage-timeseries") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.entitlements.getFeatureUsageTimeSeries({ + companyId: "company_id", + endTime: new Date("2024-01-15T09:30:00.000Z"), + featureId: "feature_id", + startTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("getFeatureUsageTimeSeries (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/feature-usage-timeseries") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.entitlements.getFeatureUsageTimeSeries({ + companyId: "company_id", + endTime: new Date("2024-01-15T09:30:00.000Z"), + featureId: "feature_id", + startTime: new Date("2024-01-15T09:30:00.000Z"), + }); + }).rejects.toThrow(Schematic.InternalServerError); + }); + test("countFeatureUsage (1)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); @@ -4589,9 +4805,6 @@ describe("EntitlementsClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -4649,6 +4862,7 @@ describe("EntitlementsClient", () => { }, ], created_at: "2024-01-15T09:30:00Z", + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -4867,9 +5081,6 @@ describe("EntitlementsClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -4927,6 +5138,13 @@ describe("EntitlementsClient", () => { }, ], createdAt: new Date("2024-01-15T09:30:00.000Z"), + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -5442,6 +5660,7 @@ describe("EntitlementsClient", () => { value_bool: true, value_credit: { burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", default_expiry_unit: "billing_periods", default_rollover_policy: "expire", @@ -5472,6 +5691,8 @@ describe("EntitlementsClient", () => { offset: 1, plan_id: "plan_id", plan_ids: ["plan_ids"], + plan_version_id: "plan_version_id", + plan_version_ids: ["plan_version_ids"], q: "q", with_metered_products: true, }, @@ -5481,6 +5702,7 @@ describe("EntitlementsClient", () => { const response = await client.entitlements.listPlanEntitlements({ featureId: "feature_id", planId: "plan_id", + planVersionId: "plan_version_id", q: "q", withMeteredProducts: true, limit: 1, @@ -5575,6 +5797,7 @@ describe("EntitlementsClient", () => { valueBool: true, valueCredit: { burnStrategy: "expiration_priority", + costEditable: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), defaultExpiryUnit: "billing_periods", defaultRolloverPolicy: "expire", @@ -5605,6 +5828,8 @@ describe("EntitlementsClient", () => { offset: 1, planId: "plan_id", planIds: ["plan_ids"], + planVersionId: "plan_version_id", + planVersionIds: ["plan_version_ids"], q: "q", withMeteredProducts: true, }, @@ -5780,6 +6005,7 @@ describe("EntitlementsClient", () => { value_bool: true, value_credit: { burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", default_expiry_unit: "billing_periods", default_expiry_unit_count: 1, @@ -5948,6 +6174,7 @@ describe("EntitlementsClient", () => { valueBool: true, valueCredit: { burnStrategy: "expiration_priority", + costEditable: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), defaultExpiryUnit: "billing_periods", defaultExpiryUnitCount: 1, @@ -6225,6 +6452,7 @@ describe("EntitlementsClient", () => { value_bool: true, value_credit: { burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", default_expiry_unit: "billing_periods", default_expiry_unit_count: 1, @@ -6388,6 +6616,7 @@ describe("EntitlementsClient", () => { valueBool: true, valueCredit: { burnStrategy: "expiration_priority", + costEditable: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), defaultExpiryUnit: "billing_periods", defaultExpiryUnitCount: 1, @@ -6622,6 +6851,7 @@ describe("EntitlementsClient", () => { value_bool: true, value_credit: { burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", default_expiry_unit: "billing_periods", default_expiry_unit_count: 1, @@ -6788,6 +7018,7 @@ describe("EntitlementsClient", () => { valueBool: true, valueCredit: { burnStrategy: "expiration_priority", + costEditable: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), defaultExpiryUnit: "billing_periods", defaultExpiryUnitCount: 1, @@ -7074,6 +7305,8 @@ describe("EntitlementsClient", () => { offset: 1, plan_id: "plan_id", plan_ids: ["plan_ids"], + plan_version_id: "plan_version_id", + plan_version_ids: ["plan_version_ids"], q: "q", with_metered_products: true, }, @@ -7089,6 +7322,7 @@ describe("EntitlementsClient", () => { const response = await client.entitlements.countPlanEntitlements({ featureId: "feature_id", planId: "plan_id", + planVersionId: "plan_version_id", q: "q", withMeteredProducts: true, limit: 1, @@ -7106,6 +7340,8 @@ describe("EntitlementsClient", () => { offset: 1, planId: "plan_id", planIds: ["plan_ids"], + planVersionId: "plan_version_id", + planVersionIds: ["plan_version_ids"], q: "q", withMeteredProducts: true, }, @@ -7466,6 +7702,10 @@ describe("EntitlementsClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [ + { feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }, + { feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }, + ], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -7590,6 +7830,17 @@ describe("EntitlementsClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { traits: { key: "value" } }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -7980,6 +8231,7 @@ describe("EntitlementsClient", () => { value_bool: true, value_credit: { burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", default_expiry_unit: "billing_periods", default_expiry_unit_count: 1, @@ -8140,6 +8392,10 @@ describe("EntitlementsClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [ + { feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }, + { feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }, + ], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -8264,6 +8520,17 @@ describe("EntitlementsClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { traits: { key: "value" } }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -8654,6 +8921,7 @@ describe("EntitlementsClient", () => { value_bool: true, value_credit: { burn_strategy: "expiration_priority", + cost_editable: true, created_at: "2024-01-15T09:30:00Z", default_expiry_unit: "billing_periods", default_expiry_unit_count: 1, @@ -8838,6 +9106,18 @@ describe("EntitlementsClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -8972,6 +9252,17 @@ describe("EntitlementsClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { traits: { key: "value", @@ -9378,6 +9669,7 @@ describe("EntitlementsClient", () => { valueBool: true, valueCredit: { burnStrategy: "expiration_priority", + costEditable: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), defaultExpiryUnit: "billing_periods", defaultExpiryUnitCount: 1, @@ -9548,6 +9840,18 @@ describe("EntitlementsClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -9682,6 +9986,17 @@ describe("EntitlementsClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { traits: { key: "value", @@ -10088,6 +10403,7 @@ describe("EntitlementsClient", () => { valueBool: true, valueCredit: { burnStrategy: "expiration_priority", + costEditable: true, createdAt: new Date("2024-01-15T09:30:00.000Z"), defaultExpiryUnit: "billing_periods", defaultExpiryUnitCount: 1, diff --git a/tests/wire/features.test.ts b/tests/wire/features.test.ts index 99a41111..0e95b5dc 100644 --- a/tests/wire/features.test.ts +++ b/tests/wire/features.test.ts @@ -111,6 +111,7 @@ describe("FeaturesClient", () => { ids: ["ids"], limit: 1, offset: 1, + plan_version_id: "plan_version_id", q: "q", without_company_override_for: "without_company_override_for", without_plan_entitlement_for: "without_plan_entitlement_for", @@ -121,6 +122,7 @@ describe("FeaturesClient", () => { const response = await client.features.listFeatures({ q: "q", withoutCompanyOverrideFor: "without_company_override_for", + planVersionId: "plan_version_id", withoutPlanEntitlementFor: "without_plan_entitlement_for", booleanRequireEvent: true, limit: 1, @@ -243,6 +245,7 @@ describe("FeaturesClient", () => { ids: ["ids"], limit: 1, offset: 1, + planVersionId: "plan_version_id", q: "q", withoutCompanyOverrideFor: "without_company_override_for", withoutPlanEntitlementFor: "without_plan_entitlement_for", @@ -1402,6 +1405,7 @@ describe("FeaturesClient", () => { ids: ["ids"], limit: 1, offset: 1, + plan_version_id: "plan_version_id", q: "q", without_company_override_for: "without_company_override_for", without_plan_entitlement_for: "without_plan_entitlement_for", @@ -1412,6 +1416,7 @@ describe("FeaturesClient", () => { const response = await client.features.countFeatures({ q: "q", withoutCompanyOverrideFor: "without_company_override_for", + planVersionId: "plan_version_id", withoutPlanEntitlementFor: "without_plan_entitlement_for", booleanRequireEvent: true, limit: 1, @@ -1427,6 +1432,7 @@ describe("FeaturesClient", () => { ids: ["ids"], limit: 1, offset: 1, + planVersionId: "plan_version_id", q: "q", withoutCompanyOverrideFor: "without_company_override_for", withoutPlanEntitlementFor: "without_plan_entitlement_for", @@ -3943,12 +3949,23 @@ describe("FeaturesClient", () => { const rawResponseBody = { data: { company_id: "company_id", + entitlement: { + allocation: 1, + credit_id: "credit_id", + credit_remaining: 1.1, + credit_total: 1.1, + credit_used: 1.1, + event_name: "event_name", + feature_id: "feature_id", + feature_key: "feature_key", + metric_period: "all_time", + metric_reset_at: "2024-01-15T09:30:00Z", + month_reset: "first_of_month", + soft_limit: 1, + usage: 1, + value_type: "boolean", + }, error: "error", - feature_allocation: 1, - feature_usage: 1, - feature_usage_event: "feature_usage_event", - feature_usage_period: "feature_usage_period", - feature_usage_reset_at: "2024-01-15T09:30:00Z", flag: "flag", flag_id: "flag_id", reason: "reason", @@ -3972,12 +3989,23 @@ describe("FeaturesClient", () => { expect(response).toEqual({ data: { companyId: "company_id", + entitlement: { + allocation: 1, + creditId: "credit_id", + creditRemaining: 1.1, + creditTotal: 1.1, + creditUsed: 1.1, + eventName: "event_name", + featureId: "feature_id", + featureKey: "feature_key", + metricPeriod: "all_time", + metricResetAt: new Date("2024-01-15T09:30:00.000Z"), + monthReset: "first_of_month", + softLimit: 1, + usage: 1, + valueType: "boolean", + }, error: "error", - featureAllocation: 1, - featureUsage: 1, - featureUsageEvent: "feature_usage_event", - featureUsagePeriod: "feature_usage_period", - featureUsageResetAt: new Date("2024-01-15T09:30:00.000Z"), flag: "flag", flagId: "flag_id", reason: "reason", diff --git a/tests/wire/planbundle.test.ts b/tests/wire/planbundle.test.ts index 79a89788..8ceb43d3 100644 --- a/tests/wire/planbundle.test.ts +++ b/tests/wire/planbundle.test.ts @@ -34,8 +34,6 @@ describe("PlanbundleClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -117,8 +115,6 @@ describe("PlanbundleClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -332,8 +328,6 @@ describe("PlanbundleClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -415,8 +409,6 @@ describe("PlanbundleClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], diff --git a/tests/wire/plangroups.test.ts b/tests/wire/plangroups.test.ts index 2251f130..932917f9 100644 --- a/tests/wire/plangroups.test.ts +++ b/tests/wire/plangroups.test.ts @@ -133,12 +133,25 @@ describe("PlangroupsClient", () => { component_settings: { show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, }, custom_plan_config: { cta_text: "cta_text", cta_web_site: "cta_web_site", price_text: "price_text" }, custom_plan_id: "custom_plan_id", default_plan: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -175,6 +188,18 @@ describe("PlangroupsClient", () => { price_text: "price_text", }, description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, entitlements: [ { created_at: "2024-01-15T09:30:00Z", @@ -272,8 +297,6 @@ describe("PlangroupsClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -328,6 +351,18 @@ describe("PlangroupsClient", () => { }, }, fallback_plan: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -364,6 +399,18 @@ describe("PlangroupsClient", () => { price_text: "price_text", }, description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, entitlements: [ { created_at: "2024-01-15T09:30:00Z", @@ -461,8 +508,6 @@ describe("PlangroupsClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -519,6 +564,18 @@ describe("PlangroupsClient", () => { fallback_plan_id: "fallback_plan_id", id: "id", initial_plan: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -555,6 +612,18 @@ describe("PlangroupsClient", () => { price_text: "price_text", }, description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, entitlements: [ { created_at: "2024-01-15T09:30:00Z", @@ -652,8 +721,6 @@ describe("PlangroupsClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -859,6 +926,8 @@ describe("PlangroupsClient", () => { prevent_self_service_downgrade_button_text: "prevent_self_service_downgrade_button_text", prevent_self_service_downgrade_url: "prevent_self_service_downgrade_url", proration_behavior: "proration_behavior", + scheduled_downgrade_behavior: "scheduled_downgrade_behavior", + scheduled_downgrade_prevent_when_over_limit: true, show_as_monthly_prices: true, show_credits: true, show_period_toggle: true, @@ -867,6 +936,18 @@ describe("PlangroupsClient", () => { tax_collection_enabled: true, trial_days: 1, trial_expiry_plan: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -903,6 +984,18 @@ describe("PlangroupsClient", () => { price_text: "price_text", }, description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, entitlements: [ { created_at: "2024-01-15T09:30:00Z", @@ -1000,8 +1093,6 @@ describe("PlangroupsClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -1231,6 +1322,7 @@ describe("PlangroupsClient", () => { componentSettings: { showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, }, @@ -1241,6 +1333,18 @@ describe("PlangroupsClient", () => { }, customPlanId: "custom_plan_id", defaultPlan: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1277,6 +1381,18 @@ describe("PlangroupsClient", () => { priceText: "price_text", }, description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, entitlements: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1389,8 +1505,6 @@ describe("PlangroupsClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -1445,6 +1559,18 @@ describe("PlangroupsClient", () => { }, }, fallbackPlan: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1481,6 +1607,18 @@ describe("PlangroupsClient", () => { priceText: "price_text", }, description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, entitlements: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1593,8 +1731,6 @@ describe("PlangroupsClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -1651,6 +1787,18 @@ describe("PlangroupsClient", () => { fallbackPlanId: "fallback_plan_id", id: "id", initialPlan: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1687,6 +1835,18 @@ describe("PlangroupsClient", () => { priceText: "price_text", }, description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, entitlements: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1799,8 +1959,6 @@ describe("PlangroupsClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -2033,6 +2191,8 @@ describe("PlangroupsClient", () => { preventSelfServiceDowngradeButtonText: "prevent_self_service_downgrade_button_text", preventSelfServiceDowngradeUrl: "prevent_self_service_downgrade_url", prorationBehavior: "proration_behavior", + scheduledDowngradeBehavior: "scheduled_downgrade_behavior", + scheduledDowngradePreventWhenOverLimit: true, showAsMonthlyPrices: true, showCredits: true, showPeriodToggle: true, @@ -2041,6 +2201,18 @@ describe("PlangroupsClient", () => { taxCollectionEnabled: true, trialDays: 1, trialExpiryPlan: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2077,6 +2249,18 @@ describe("PlangroupsClient", () => { priceText: "price_text", }, description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, entitlements: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2189,8 +2373,6 @@ describe("PlangroupsClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -2343,6 +2525,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -2357,6 +2540,7 @@ describe("PlangroupsClient", () => { component_settings: { show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, }, @@ -2371,6 +2555,8 @@ describe("PlangroupsClient", () => { prevent_self_service_downgrade_button_text: "prevent_self_service_downgrade_button_text", prevent_self_service_downgrade_url: "prevent_self_service_downgrade_url", proration_behavior: "proration_behavior", + scheduled_downgrade_behavior: "scheduled_downgrade_behavior", + scheduled_downgrade_prevent_when_over_limit: true, show_as_monthly_prices: true, show_credits: true, show_period_toggle: true, @@ -2419,6 +2605,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -2440,6 +2627,7 @@ describe("PlangroupsClient", () => { componentSettings: { showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, }, @@ -2462,6 +2650,8 @@ describe("PlangroupsClient", () => { preventSelfServiceDowngradeButtonText: "prevent_self_service_downgrade_button_text", preventSelfServiceDowngradeUrl: "prevent_self_service_downgrade_url", prorationBehavior: "proration_behavior", + scheduledDowngradeBehavior: "scheduled_downgrade_behavior", + scheduledDowngradePreventWhenOverLimit: true, showAsMonthlyPrices: true, showCredits: true, showPeriodToggle: true, @@ -2496,6 +2686,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -2546,6 +2737,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -2570,6 +2762,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -2620,6 +2813,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -2644,6 +2838,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -2694,6 +2889,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -2718,6 +2914,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -2768,6 +2965,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -2792,6 +2990,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -2842,6 +3041,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -2866,6 +3066,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -2880,6 +3081,7 @@ describe("PlangroupsClient", () => { component_settings: { show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, }, @@ -2894,6 +3096,8 @@ describe("PlangroupsClient", () => { prevent_self_service_downgrade_button_text: "prevent_self_service_downgrade_button_text", prevent_self_service_downgrade_url: "prevent_self_service_downgrade_url", proration_behavior: "proration_behavior", + scheduled_downgrade_behavior: "scheduled_downgrade_behavior", + scheduled_downgrade_prevent_when_over_limit: true, show_as_monthly_prices: true, show_credits: true, show_period_toggle: true, @@ -2942,6 +3146,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -2963,6 +3168,7 @@ describe("PlangroupsClient", () => { componentSettings: { showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, }, @@ -2985,6 +3191,8 @@ describe("PlangroupsClient", () => { preventSelfServiceDowngradeButtonText: "prevent_self_service_downgrade_button_text", preventSelfServiceDowngradeUrl: "prevent_self_service_downgrade_url", prorationBehavior: "proration_behavior", + scheduledDowngradeBehavior: "scheduled_downgrade_behavior", + scheduledDowngradePreventWhenOverLimit: true, showAsMonthlyPrices: true, showCredits: true, showPeriodToggle: true, @@ -3019,6 +3227,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -3069,6 +3278,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -3093,6 +3303,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -3143,6 +3354,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -3167,6 +3379,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -3217,6 +3430,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -3241,6 +3455,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -3291,6 +3506,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, @@ -3315,6 +3531,7 @@ describe("PlangroupsClient", () => { proration_behavior: "create_prorations", show_as_monthly_prices: true, show_credits: true, + show_feature_description: true, show_period_toggle: true, show_zero_price_as_free: true, sync_customer_billing_details: true, @@ -3365,6 +3582,7 @@ describe("PlangroupsClient", () => { prorationBehavior: "create_prorations", showAsMonthlyPrices: true, showCredits: true, + showFeatureDescription: true, showPeriodToggle: true, showZeroPriceAsFree: true, syncCustomerBillingDetails: true, diff --git a/tests/wire/planmigrations.test.ts b/tests/wire/planmigrations.test.ts new file mode 100644 index 00000000..b322a955 --- /dev/null +++ b/tests/wire/planmigrations.test.ts @@ -0,0 +1,700 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Schematic from "../../src/api/index"; +import { SchematicClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; + +describe("PlanmigrationsClient", () => { + test("listCompanyMigrations (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: [ + { + company_id: "company_id", + company_name: "company_name", + completed_at: "2024-01-15T09:30:00Z", + created_at: "2024-01-15T09:30:00Z", + error: "error", + id: "id", + migration_id: "migration_id", + plan_version_id_from: "plan_version_id_from", + started_at: "2024-01-15T09:30:00Z", + status: "completed", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + params: { limit: 1, migration_id: "migration_id", offset: 1, q: "q", status: "completed" }, + }; + server + .mockEndpoint() + .get("/plan-version-company-migrations") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.planmigrations.listCompanyMigrations({ + migrationId: "migration_id", + q: "q", + status: "completed", + limit: 1, + offset: 1, + }); + expect(response).toEqual({ + data: [ + { + companyId: "company_id", + companyName: "company_name", + completedAt: new Date("2024-01-15T09:30:00.000Z"), + createdAt: new Date("2024-01-15T09:30:00.000Z"), + error: "error", + id: "id", + migrationId: "migration_id", + planVersionIdFrom: "plan_version_id_from", + startedAt: new Date("2024-01-15T09:30:00.000Z"), + status: "completed", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + params: { + limit: 1, + migrationId: "migration_id", + offset: 1, + q: "q", + status: "completed", + }, + }); + }); + + test("listCompanyMigrations (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-company-migrations") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.listCompanyMigrations(); + }).rejects.toThrow(Schematic.BadRequestError); + }); + + test("listCompanyMigrations (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-company-migrations") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.listCompanyMigrations(); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("listCompanyMigrations (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-company-migrations") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.listCompanyMigrations(); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("listCompanyMigrations (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-company-migrations") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.listCompanyMigrations(); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("listCompanyMigrations (6)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-company-migrations") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.listCompanyMigrations(); + }).rejects.toThrow(Schematic.InternalServerError); + }); + + test("countCompanyMigrations (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: { count: 1 }, + params: { limit: 1, migration_id: "migration_id", offset: 1, q: "q", status: "completed" }, + }; + server + .mockEndpoint() + .get("/plan-version-company-migrations/count") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.planmigrations.countCompanyMigrations({ + migrationId: "migration_id", + q: "q", + status: "completed", + limit: 1, + offset: 1, + }); + expect(response).toEqual({ + data: { + count: 1, + }, + params: { + limit: 1, + migrationId: "migration_id", + offset: 1, + q: "q", + status: "completed", + }, + }); + }); + + test("countCompanyMigrations (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-company-migrations/count") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.countCompanyMigrations(); + }).rejects.toThrow(Schematic.BadRequestError); + }); + + test("countCompanyMigrations (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-company-migrations/count") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.countCompanyMigrations(); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("countCompanyMigrations (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-company-migrations/count") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.countCompanyMigrations(); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("countCompanyMigrations (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-company-migrations/count") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.countCompanyMigrations(); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("countCompanyMigrations (6)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-company-migrations/count") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.countCompanyMigrations(); + }).rejects.toThrow(Schematic.InternalServerError); + }); + + test("listMigrations (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: [ + { + completed_at: "2024-01-15T09:30:00Z", + completed_companies: 1, + created_at: "2024-01-15T09:30:00Z", + error: "error", + failed_companies: 1, + id: "id", + plan_id: "plan_id", + plan_version_id_from: "plan_version_id_from", + plan_version_id_to: "plan_version_id_to", + skipped_companies: 1, + started_at: "2024-01-15T09:30:00Z", + status: "completed", + strategy: "immediate", + total_companies: 1, + updated_at: "2024-01-15T09:30:00Z", + }, + ], + params: { limit: 1, offset: 1, plan_version_id: "plan_version_id", status: "completed" }, + }; + server + .mockEndpoint() + .get("/plan-version-migrations") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.planmigrations.listMigrations({ + planVersionId: "plan_version_id", + status: "completed", + limit: 1, + offset: 1, + }); + expect(response).toEqual({ + data: [ + { + completedAt: new Date("2024-01-15T09:30:00.000Z"), + completedCompanies: 1, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + error: "error", + failedCompanies: 1, + id: "id", + planId: "plan_id", + planVersionIdFrom: "plan_version_id_from", + planVersionIdTo: "plan_version_id_to", + skippedCompanies: 1, + startedAt: new Date("2024-01-15T09:30:00.000Z"), + status: "completed", + strategy: "immediate", + totalCompanies: 1, + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + params: { + limit: 1, + offset: 1, + planVersionId: "plan_version_id", + status: "completed", + }, + }); + }); + + test("listMigrations (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.listMigrations(); + }).rejects.toThrow(Schematic.BadRequestError); + }); + + test("listMigrations (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.listMigrations(); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("listMigrations (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.listMigrations(); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("listMigrations (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.listMigrations(); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("listMigrations (6)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.listMigrations(); + }).rejects.toThrow(Schematic.InternalServerError); + }); + + test("getMigration (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: { + completed_at: "2024-01-15T09:30:00Z", + completed_companies: 1, + created_at: "2024-01-15T09:30:00Z", + error: "error", + failed_companies: 1, + id: "id", + plan_id: "plan_id", + plan_version_id_from: "plan_version_id_from", + plan_version_id_to: "plan_version_id_to", + skipped_companies: 1, + started_at: "2024-01-15T09:30:00Z", + status: "completed", + strategy: "immediate", + total_companies: 1, + updated_at: "2024-01-15T09:30:00Z", + }, + params: { key: "value" }, + }; + server + .mockEndpoint() + .get("/plan-version-migrations/plan_version_migration_id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.planmigrations.getMigration("plan_version_migration_id"); + expect(response).toEqual({ + data: { + completedAt: new Date("2024-01-15T09:30:00.000Z"), + completedCompanies: 1, + createdAt: new Date("2024-01-15T09:30:00.000Z"), + error: "error", + failedCompanies: 1, + id: "id", + planId: "plan_id", + planVersionIdFrom: "plan_version_id_from", + planVersionIdTo: "plan_version_id_to", + skippedCompanies: 1, + startedAt: new Date("2024-01-15T09:30:00.000Z"), + status: "completed", + strategy: "immediate", + totalCompanies: 1, + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + params: { + key: "value", + }, + }); + }); + + test("getMigration (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations/plan_version_migration_id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.getMigration("plan_version_migration_id"); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("getMigration (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations/plan_version_migration_id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.getMigration("plan_version_migration_id"); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("getMigration (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations/plan_version_migration_id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.getMigration("plan_version_migration_id"); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("getMigration (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations/plan_version_migration_id") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.getMigration("plan_version_migration_id"); + }).rejects.toThrow(Schematic.InternalServerError); + }); + + test("countMigrations (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: { count: 1 }, + params: { limit: 1, offset: 1, plan_version_id: "plan_version_id", status: "completed" }, + }; + server + .mockEndpoint() + .get("/plan-version-migrations/count") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.planmigrations.countMigrations({ + planVersionId: "plan_version_id", + status: "completed", + limit: 1, + offset: 1, + }); + expect(response).toEqual({ + data: { + count: 1, + }, + params: { + limit: 1, + offset: 1, + planVersionId: "plan_version_id", + status: "completed", + }, + }); + }); + + test("countMigrations (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations/count") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.countMigrations(); + }).rejects.toThrow(Schematic.BadRequestError); + }); + + test("countMigrations (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations/count") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.countMigrations(); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("countMigrations (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations/count") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.countMigrations(); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("countMigrations (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations/count") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.countMigrations(); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("countMigrations (6)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/plan-version-migrations/count") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.planmigrations.countMigrations(); + }).rejects.toThrow(Schematic.InternalServerError); + }); +}); diff --git a/tests/wire/plans.test.ts b/tests/wire/plans.test.ts index 88d24059..fec1767d 100644 --- a/tests/wire/plans.test.ts +++ b/tests/wire/plans.test.ts @@ -24,9 +24,6 @@ describe("PlansClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -184,6 +181,7 @@ describe("PlansClient", () => { provider_type: "schematic", updated_at: "2024-01-15T09:30:00Z", }, + entitlements: [{ feature_id: "feature_id", feature_key: "feature_key", value_type: "boolean" }], entity_traits: [ { created_at: "2024-01-15T09:30:00Z", @@ -255,9 +253,6 @@ describe("PlansClient", () => { credit_name: "credit_name", id: "id", plan_id: "plan_id", - plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", reset_type: "no_reset", updated_at: "2024-01-15T09:30:00Z", }, @@ -305,6 +300,19 @@ describe("PlansClient", () => { value: true, }, ], + scheduled_downgrade: { + currency: "currency", + effective_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + from_plan_name: "from_plan_name", + from_subscription_price: 1, + id: "id", + interval: "interval", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + to_plan_id: "to_plan_id", + to_plan_name: "to_plan_name", + }, traits: { key: "value" }, updated_at: "2024-01-15T09:30:00Z", user_count: 1, @@ -338,9 +346,6 @@ describe("PlansClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -502,6 +507,13 @@ describe("PlansClient", () => { providerType: "schematic", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, + entitlements: [ + { + featureId: "feature_id", + featureKey: "feature_key", + valueType: "boolean", + }, + ], entityTraits: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -573,9 +585,6 @@ describe("PlansClient", () => { creditName: "credit_name", id: "id", planId: "plan_id", - planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", resetType: "no_reset", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, @@ -628,6 +637,19 @@ describe("PlansClient", () => { value: true, }, ], + scheduledDowngrade: { + currency: "currency", + effectiveAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + fromPlanName: "from_plan_name", + fromSubscriptionPrice: 1, + id: "id", + interval: "interval", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + toPlanId: "to_plan_id", + toPlanName: "to_plan_name", + }, traits: { key: "value", }, @@ -752,6 +774,18 @@ describe("PlansClient", () => { const rawResponseBody = { data: [ { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -782,6 +816,18 @@ describe("PlansClient", () => { controlled_by: "schematic", created_at: "2024-01-15T09:30:00Z", description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, features: [ { created_at: "2024-01-15T09:30:00Z", @@ -867,8 +913,6 @@ describe("PlansClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -955,6 +999,18 @@ describe("PlansClient", () => { expect(response).toEqual({ data: [ { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -985,6 +1041,18 @@ describe("PlansClient", () => { controlledBy: "schematic", createdAt: new Date("2024-01-15T09:30:00.000Z"), description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, features: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1085,8 +1153,6 @@ describe("PlansClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -1223,6 +1289,19 @@ describe("PlansClient", () => { const rawRequestBody = { description: "description", name: "name", plan_type: "plan" }; const rawResponseBody = { data: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + original_plan_id: "original_plan_id", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -1254,6 +1333,19 @@ describe("PlansClient", () => { controlled_by: "schematic", created_at: "2024-01-15T09:30:00Z", description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + original_plan_id: "original_plan_id", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, features: [ { created_at: "2024-01-15T09:30:00Z", @@ -1339,8 +1431,6 @@ describe("PlansClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -1414,6 +1504,19 @@ describe("PlansClient", () => { }); expect(response).toEqual({ data: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + originalPlanId: "original_plan_id", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1445,6 +1548,19 @@ describe("PlansClient", () => { controlledBy: "schematic", createdAt: new Date("2024-01-15T09:30:00.000Z"), description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + originalPlanId: "original_plan_id", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, features: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1545,8 +1661,6 @@ describe("PlansClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -1611,7 +1725,7 @@ describe("PlansClient", () => { test("createPlan (2)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { description: "description", name: "name", plan_type: "plan" }; + const rawRequestBody = { description: "description", name: "x", plan_type: "plan" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -1625,7 +1739,7 @@ describe("PlansClient", () => { await expect(async () => { return await client.plans.createPlan({ description: "description", - name: "name", + name: "x", planType: "plan", }); }).rejects.toThrow(Schematic.BadRequestError); @@ -1634,7 +1748,7 @@ describe("PlansClient", () => { test("createPlan (3)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { description: "description", name: "name", plan_type: "plan" }; + const rawRequestBody = { description: "description", name: "x", plan_type: "plan" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -1648,7 +1762,7 @@ describe("PlansClient", () => { await expect(async () => { return await client.plans.createPlan({ description: "description", - name: "name", + name: "x", planType: "plan", }); }).rejects.toThrow(Schematic.UnauthorizedError); @@ -1657,7 +1771,7 @@ describe("PlansClient", () => { test("createPlan (4)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { description: "description", name: "name", plan_type: "plan" }; + const rawRequestBody = { description: "description", name: "x", plan_type: "plan" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -1671,7 +1785,7 @@ describe("PlansClient", () => { await expect(async () => { return await client.plans.createPlan({ description: "description", - name: "name", + name: "x", planType: "plan", }); }).rejects.toThrow(Schematic.ForbiddenError); @@ -1680,7 +1794,7 @@ describe("PlansClient", () => { test("createPlan (5)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { description: "description", name: "name", plan_type: "plan" }; + const rawRequestBody = { description: "description", name: "x", plan_type: "plan" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -1694,7 +1808,7 @@ describe("PlansClient", () => { await expect(async () => { return await client.plans.createPlan({ description: "description", - name: "name", + name: "x", planType: "plan", }); }).rejects.toThrow(Schematic.NotFoundError); @@ -1703,7 +1817,7 @@ describe("PlansClient", () => { test("createPlan (6)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { description: "description", name: "name", plan_type: "plan" }; + const rawRequestBody = { description: "description", name: "x", plan_type: "plan" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -1717,7 +1831,7 @@ describe("PlansClient", () => { await expect(async () => { return await client.plans.createPlan({ description: "description", - name: "name", + name: "x", planType: "plan", }); }).rejects.toThrow(Schematic.InternalServerError); @@ -1729,6 +1843,19 @@ describe("PlansClient", () => { const rawResponseBody = { data: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + original_plan_id: "original_plan_id", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -1760,6 +1887,19 @@ describe("PlansClient", () => { controlled_by: "schematic", created_at: "2024-01-15T09:30:00Z", description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + original_plan_id: "original_plan_id", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, features: [ { created_at: "2024-01-15T09:30:00Z", @@ -1845,8 +1985,6 @@ describe("PlansClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -1902,13 +2040,28 @@ describe("PlansClient", () => { scheme: "per_unit", }, }, - params: { key: "value" }, + params: { plan_version_id: "plan_version_id" }, }; server.mockEndpoint().get("/plans/plan_id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.plans.getPlan("plan_id"); + const response = await client.plans.getPlan("plan_id", { + planVersionId: "plan_version_id", + }); expect(response).toEqual({ data: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + originalPlanId: "original_plan_id", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -1940,6 +2093,19 @@ describe("PlansClient", () => { controlledBy: "schematic", createdAt: new Date("2024-01-15T09:30:00.000Z"), description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + originalPlanId: "original_plan_id", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, features: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2040,8 +2206,6 @@ describe("PlansClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -2098,7 +2262,7 @@ describe("PlansClient", () => { }, }, params: { - key: "value", + planVersionId: "plan_version_id", }, }); }); @@ -2157,6 +2321,19 @@ describe("PlansClient", () => { const rawRequestBody = { name: "name" }; const rawResponseBody = { data: { + active_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + original_plan_id: "original_plan_id", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, billing_product: { account_id: "account_id", created_at: "2024-01-15T09:30:00Z", @@ -2188,6 +2365,19 @@ describe("PlansClient", () => { controlled_by: "schematic", created_at: "2024-01-15T09:30:00Z", description: "description", + draft_version: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + original_plan_id: "original_plan_id", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, features: [ { created_at: "2024-01-15T09:30:00Z", @@ -2273,8 +2463,6 @@ describe("PlansClient", () => { id: "id", plan_id: "plan_id", plan_name: "plan_name", - reset_cadence: "daily", - reset_start: "billing_period", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -2346,6 +2534,19 @@ describe("PlansClient", () => { }); expect(response).toEqual({ data: { + activeVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + originalPlanId: "original_plan_id", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, billingProduct: { accountId: "account_id", createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2377,6 +2578,19 @@ describe("PlansClient", () => { controlledBy: "schematic", createdAt: new Date("2024-01-15T09:30:00.000Z"), description: "description", + draftVersion: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + originalPlanId: "original_plan_id", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, features: [ { createdAt: new Date("2024-01-15T09:30:00.000Z"), @@ -2477,8 +2691,6 @@ describe("PlansClient", () => { id: "id", planId: "plan_id", planName: "plan_name", - resetCadence: "daily", - resetStart: "billing_period", updatedAt: new Date("2024-01-15T09:30:00.000Z"), }, ], @@ -2543,7 +2755,7 @@ describe("PlansClient", () => { test("updatePlan (2)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -2556,7 +2768,7 @@ describe("PlansClient", () => { await expect(async () => { return await client.plans.updatePlan("plan_id", { - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.BadRequestError); }); @@ -2564,7 +2776,7 @@ describe("PlansClient", () => { test("updatePlan (3)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -2577,7 +2789,7 @@ describe("PlansClient", () => { await expect(async () => { return await client.plans.updatePlan("plan_id", { - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.UnauthorizedError); }); @@ -2585,7 +2797,7 @@ describe("PlansClient", () => { test("updatePlan (4)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -2598,7 +2810,7 @@ describe("PlansClient", () => { await expect(async () => { return await client.plans.updatePlan("plan_id", { - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.ForbiddenError); }); @@ -2606,7 +2818,7 @@ describe("PlansClient", () => { test("updatePlan (5)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -2619,7 +2831,7 @@ describe("PlansClient", () => { await expect(async () => { return await client.plans.updatePlan("plan_id", { - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.NotFoundError); }); @@ -2627,7 +2839,7 @@ describe("PlansClient", () => { test("updatePlan (6)", async () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name" }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { error: "error" }; server .mockEndpoint() @@ -2640,7 +2852,7 @@ describe("PlansClient", () => { await expect(async () => { return await client.plans.updatePlan("plan_id", { - name: "name", + name: "x", }); }).rejects.toThrow(Schematic.InternalServerError); }); @@ -3009,12 +3221,13 @@ describe("PlansClient", () => { const rawResponseBody = { data: [{ code: "code", description: "description", detail: "detail", id: "id" }], - params: { plan_id: "plan_id" }, + params: { plan_id: "plan_id", plan_version_id: "plan_version_id" }, }; server.mockEndpoint().get("/plans/issues").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.plans.listPlanIssues({ planId: "plan_id", + planVersionId: "plan_version_id", }); expect(response).toEqual({ data: [ @@ -3027,6 +3240,7 @@ describe("PlansClient", () => { ], params: { planId: "plan_id", + planVersionId: "plan_version_id", }, }); }); @@ -3100,4 +3314,296 @@ describe("PlansClient", () => { }); }).rejects.toThrow(Schematic.InternalServerError); }); + + test("deletePlanVersion (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { data: { deleted: true }, params: { key: "value" } }; + server + .mockEndpoint() + .delete("/plans/version/plan_id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.plans.deletePlanVersion("plan_id"); + expect(response).toEqual({ + data: { + deleted: true, + }, + params: { + key: "value", + }, + }); + }); + + test("deletePlanVersion (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .delete("/plans/version/plan_id") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.plans.deletePlanVersion("plan_id"); + }).rejects.toThrow(Schematic.BadRequestError); + }); + + test("deletePlanVersion (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .delete("/plans/version/plan_id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.plans.deletePlanVersion("plan_id"); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("deletePlanVersion (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .delete("/plans/version/plan_id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.plans.deletePlanVersion("plan_id"); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("deletePlanVersion (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .delete("/plans/version/plan_id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.plans.deletePlanVersion("plan_id"); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("deletePlanVersion (6)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .delete("/plans/version/plan_id") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.plans.deletePlanVersion("plan_id"); + }).rejects.toThrow(Schematic.InternalServerError); + }); + + test("publishPlanVersion (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { excluded_company_ids: ["excluded_company_ids"], migration_strategy: "immediate" }; + const rawResponseBody = { + data: { + created_at: "2024-01-15T09:30:00Z", + description: "description", + environment_id: "environment_id", + icon: "icon", + id: "id", + name: "name", + original_plan_id: "original_plan_id", + plan_type: "plan", + status: "published", + updated_at: "2024-01-15T09:30:00Z", + version: 1, + }, + params: { key: "value" }, + }; + server + .mockEndpoint() + .put("/plans/version/plan_id/publish") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.plans.publishPlanVersion("plan_id", { + excludedCompanyIds: ["excluded_company_ids"], + migrationStrategy: "immediate", + }); + expect(response).toEqual({ + data: { + createdAt: new Date("2024-01-15T09:30:00.000Z"), + description: "description", + environmentId: "environment_id", + icon: "icon", + id: "id", + name: "name", + originalPlanId: "original_plan_id", + planType: "plan", + status: "published", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + version: 1, + }, + params: { + key: "value", + }, + }); + }); + + test("publishPlanVersion (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + excluded_company_ids: ["excluded_company_ids", "excluded_company_ids"], + migration_strategy: "immediate", + }; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .put("/plans/version/plan_id/publish") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.plans.publishPlanVersion("plan_id", { + excludedCompanyIds: ["excluded_company_ids", "excluded_company_ids"], + migrationStrategy: "immediate", + }); + }).rejects.toThrow(Schematic.BadRequestError); + }); + + test("publishPlanVersion (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + excluded_company_ids: ["excluded_company_ids", "excluded_company_ids"], + migration_strategy: "immediate", + }; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .put("/plans/version/plan_id/publish") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.plans.publishPlanVersion("plan_id", { + excludedCompanyIds: ["excluded_company_ids", "excluded_company_ids"], + migrationStrategy: "immediate", + }); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("publishPlanVersion (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + excluded_company_ids: ["excluded_company_ids", "excluded_company_ids"], + migration_strategy: "immediate", + }; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .put("/plans/version/plan_id/publish") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.plans.publishPlanVersion("plan_id", { + excludedCompanyIds: ["excluded_company_ids", "excluded_company_ids"], + migrationStrategy: "immediate", + }); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("publishPlanVersion (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + excluded_company_ids: ["excluded_company_ids", "excluded_company_ids"], + migration_strategy: "immediate", + }; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .put("/plans/version/plan_id/publish") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.plans.publishPlanVersion("plan_id", { + excludedCompanyIds: ["excluded_company_ids", "excluded_company_ids"], + migrationStrategy: "immediate", + }); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("publishPlanVersion (6)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + excluded_company_ids: ["excluded_company_ids", "excluded_company_ids"], + migration_strategy: "immediate", + }; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .put("/plans/version/plan_id/publish") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.plans.publishPlanVersion("plan_id", { + excludedCompanyIds: ["excluded_company_ids", "excluded_company_ids"], + migrationStrategy: "immediate", + }); + }).rejects.toThrow(Schematic.InternalServerError); + }); }); diff --git a/tests/wire/scheduledcheckout.test.ts b/tests/wire/scheduledcheckout.test.ts new file mode 100644 index 00000000..cade7a11 --- /dev/null +++ b/tests/wire/scheduledcheckout.test.ts @@ -0,0 +1,653 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Schematic from "../../src/api/index"; +import { SchematicClient } from "../../src/Client"; +import { mockServerPool } from "../mock-server/MockServerPool"; + +describe("ScheduledcheckoutClient", () => { + test("listScheduledCheckouts (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: [ + { + actor_type: "actor_type", + company_id: "company_id", + completed_at: "2024-01-15T09:30:00Z", + created_at: "2024-01-15T09:30:00Z", + error_message: "error_message", + execute_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + id: "id", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + started_at: "2024-01-15T09:30:00Z", + status: "cancelled", + to_plan_id: "to_plan_id", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + params: { company_id: "company_id", limit: 1, offset: 1, status: "cancelled" }, + }; + server + .mockEndpoint() + .get("/scheduled-checkout") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.scheduledcheckout.listScheduledCheckouts({ + companyId: "company_id", + status: "cancelled", + limit: 1, + offset: 1, + }); + expect(response).toEqual({ + data: [ + { + actorType: "actor_type", + companyId: "company_id", + completedAt: new Date("2024-01-15T09:30:00.000Z"), + createdAt: new Date("2024-01-15T09:30:00.000Z"), + errorMessage: "error_message", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + id: "id", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + startedAt: new Date("2024-01-15T09:30:00.000Z"), + status: "cancelled", + toPlanId: "to_plan_id", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + params: { + companyId: "company_id", + limit: 1, + offset: 1, + status: "cancelled", + }, + }); + }); + + test("listScheduledCheckouts (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/scheduled-checkout") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.listScheduledCheckouts(); + }).rejects.toThrow(Schematic.BadRequestError); + }); + + test("listScheduledCheckouts (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/scheduled-checkout") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.listScheduledCheckouts(); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("listScheduledCheckouts (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/scheduled-checkout") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.listScheduledCheckouts(); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("listScheduledCheckouts (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/scheduled-checkout") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.listScheduledCheckouts(); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("listScheduledCheckouts (6)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/scheduled-checkout") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.listScheduledCheckouts(); + }).rejects.toThrow(Schematic.InternalServerError); + }); + + test("createScheduledCheckout (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + company_id: "company_id", + execute_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + to_plan_id: "to_plan_id", + }; + const rawResponseBody = { + data: { + actor_type: "actor_type", + company_id: "company_id", + completed_at: "2024-01-15T09:30:00Z", + created_at: "2024-01-15T09:30:00Z", + error_message: "error_message", + execute_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + id: "id", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + started_at: "2024-01-15T09:30:00Z", + status: "cancelled", + to_plan_id: "to_plan_id", + updated_at: "2024-01-15T09:30:00Z", + }, + params: { key: "value" }, + }; + server + .mockEndpoint() + .post("/scheduled-checkout") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.scheduledcheckout.createScheduledCheckout({ + companyId: "company_id", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + toPlanId: "to_plan_id", + }); + expect(response).toEqual({ + data: { + actorType: "actor_type", + companyId: "company_id", + completedAt: new Date("2024-01-15T09:30:00.000Z"), + createdAt: new Date("2024-01-15T09:30:00.000Z"), + errorMessage: "error_message", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + id: "id", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + startedAt: new Date("2024-01-15T09:30:00.000Z"), + status: "cancelled", + toPlanId: "to_plan_id", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + params: { + key: "value", + }, + }); + }); + + test("createScheduledCheckout (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + company_id: "company_id", + execute_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + to_plan_id: "to_plan_id", + }; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .post("/scheduled-checkout") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.createScheduledCheckout({ + companyId: "company_id", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + toPlanId: "to_plan_id", + }); + }).rejects.toThrow(Schematic.BadRequestError); + }); + + test("createScheduledCheckout (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + company_id: "company_id", + execute_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + to_plan_id: "to_plan_id", + }; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .post("/scheduled-checkout") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.createScheduledCheckout({ + companyId: "company_id", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + toPlanId: "to_plan_id", + }); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("createScheduledCheckout (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + company_id: "company_id", + execute_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + to_plan_id: "to_plan_id", + }; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .post("/scheduled-checkout") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.createScheduledCheckout({ + companyId: "company_id", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + toPlanId: "to_plan_id", + }); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("createScheduledCheckout (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + company_id: "company_id", + execute_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + to_plan_id: "to_plan_id", + }; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .post("/scheduled-checkout") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.createScheduledCheckout({ + companyId: "company_id", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + toPlanId: "to_plan_id", + }); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("createScheduledCheckout (6)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = { + company_id: "company_id", + execute_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + to_plan_id: "to_plan_id", + }; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .post("/scheduled-checkout") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.createScheduledCheckout({ + companyId: "company_id", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + toPlanId: "to_plan_id", + }); + }).rejects.toThrow(Schematic.InternalServerError); + }); + + test("getScheduledCheckout (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + data: { + actor_type: "actor_type", + company_id: "company_id", + completed_at: "2024-01-15T09:30:00Z", + created_at: "2024-01-15T09:30:00Z", + error_message: "error_message", + execute_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + id: "id", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + started_at: "2024-01-15T09:30:00Z", + status: "cancelled", + to_plan_id: "to_plan_id", + updated_at: "2024-01-15T09:30:00Z", + }, + params: { key: "value" }, + }; + server + .mockEndpoint() + .get("/scheduled-checkout/scheduled_checkout_id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.scheduledcheckout.getScheduledCheckout("scheduled_checkout_id"); + expect(response).toEqual({ + data: { + actorType: "actor_type", + companyId: "company_id", + completedAt: new Date("2024-01-15T09:30:00.000Z"), + createdAt: new Date("2024-01-15T09:30:00.000Z"), + errorMessage: "error_message", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + id: "id", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + startedAt: new Date("2024-01-15T09:30:00.000Z"), + status: "cancelled", + toPlanId: "to_plan_id", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + params: { + key: "value", + }, + }); + }); + + test("getScheduledCheckout (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/scheduled-checkout/scheduled_checkout_id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.getScheduledCheckout("scheduled_checkout_id"); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("getScheduledCheckout (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/scheduled-checkout/scheduled_checkout_id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.getScheduledCheckout("scheduled_checkout_id"); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("getScheduledCheckout (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/scheduled-checkout/scheduled_checkout_id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.getScheduledCheckout("scheduled_checkout_id"); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("getScheduledCheckout (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .get("/scheduled-checkout/scheduled_checkout_id") + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.getScheduledCheckout("scheduled_checkout_id"); + }).rejects.toThrow(Schematic.InternalServerError); + }); + + test("updateScheduledCheckout (1)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { + data: { + actor_type: "actor_type", + company_id: "company_id", + completed_at: "2024-01-15T09:30:00Z", + created_at: "2024-01-15T09:30:00Z", + error_message: "error_message", + execute_after: "2024-01-15T09:30:00Z", + from_plan_id: "from_plan_id", + id: "id", + scheduled_interval: "scheduled_interval", + scheduled_price: 1, + started_at: "2024-01-15T09:30:00Z", + status: "cancelled", + to_plan_id: "to_plan_id", + updated_at: "2024-01-15T09:30:00Z", + }, + params: { key: "value" }, + }; + server + .mockEndpoint() + .put("/scheduled-checkout/scheduled_checkout_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.scheduledcheckout.updateScheduledCheckout("scheduled_checkout_id"); + expect(response).toEqual({ + data: { + actorType: "actor_type", + companyId: "company_id", + completedAt: new Date("2024-01-15T09:30:00.000Z"), + createdAt: new Date("2024-01-15T09:30:00.000Z"), + errorMessage: "error_message", + executeAfter: new Date("2024-01-15T09:30:00.000Z"), + fromPlanId: "from_plan_id", + id: "id", + scheduledInterval: "scheduled_interval", + scheduledPrice: 1, + startedAt: new Date("2024-01-15T09:30:00.000Z"), + status: "cancelled", + toPlanId: "to_plan_id", + updatedAt: new Date("2024-01-15T09:30:00.000Z"), + }, + params: { + key: "value", + }, + }); + }); + + test("updateScheduledCheckout (2)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .put("/scheduled-checkout/scheduled_checkout_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.updateScheduledCheckout("scheduled_checkout_id"); + }).rejects.toThrow(Schematic.BadRequestError); + }); + + test("updateScheduledCheckout (3)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .put("/scheduled-checkout/scheduled_checkout_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.updateScheduledCheckout("scheduled_checkout_id"); + }).rejects.toThrow(Schematic.UnauthorizedError); + }); + + test("updateScheduledCheckout (4)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .put("/scheduled-checkout/scheduled_checkout_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.updateScheduledCheckout("scheduled_checkout_id"); + }).rejects.toThrow(Schematic.ForbiddenError); + }); + + test("updateScheduledCheckout (5)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .put("/scheduled-checkout/scheduled_checkout_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.updateScheduledCheckout("scheduled_checkout_id"); + }).rejects.toThrow(Schematic.NotFoundError); + }); + + test("updateScheduledCheckout (6)", async () => { + const server = mockServerPool.createServer(); + const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { error: "error" }; + server + .mockEndpoint() + .put("/scheduled-checkout/scheduled_checkout_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(500) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.scheduledcheckout.updateScheduledCheckout("scheduled_checkout_id"); + }).rejects.toThrow(Schematic.InternalServerError); + }); +}); diff --git a/tests/wire/webhooks.test.ts b/tests/wire/webhooks.test.ts index aca6942f..4cd2e664 100644 --- a/tests/wire/webhooks.test.ts +++ b/tests/wire/webhooks.test.ts @@ -595,9 +595,9 @@ describe("WebhooksClient", () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { - name: "name", + name: "x", request_types: ["subscription.trial.ended", "subscription.trial.ended"], - url: "url", + url: "x", }; const rawResponseBody = { error: "error" }; server @@ -611,9 +611,9 @@ describe("WebhooksClient", () => { await expect(async () => { return await client.webhooks.createWebhook({ - name: "name", + name: "x", requestTypes: ["subscription.trial.ended", "subscription.trial.ended"], - url: "url", + url: "x", }); }).rejects.toThrow(Schematic.BadRequestError); }); @@ -622,9 +622,9 @@ describe("WebhooksClient", () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { - name: "name", + name: "x", request_types: ["subscription.trial.ended", "subscription.trial.ended"], - url: "url", + url: "x", }; const rawResponseBody = { error: "error" }; server @@ -638,9 +638,9 @@ describe("WebhooksClient", () => { await expect(async () => { return await client.webhooks.createWebhook({ - name: "name", + name: "x", requestTypes: ["subscription.trial.ended", "subscription.trial.ended"], - url: "url", + url: "x", }); }).rejects.toThrow(Schematic.UnauthorizedError); }); @@ -649,9 +649,9 @@ describe("WebhooksClient", () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { - name: "name", + name: "x", request_types: ["subscription.trial.ended", "subscription.trial.ended"], - url: "url", + url: "x", }; const rawResponseBody = { error: "error" }; server @@ -665,9 +665,9 @@ describe("WebhooksClient", () => { await expect(async () => { return await client.webhooks.createWebhook({ - name: "name", + name: "x", requestTypes: ["subscription.trial.ended", "subscription.trial.ended"], - url: "url", + url: "x", }); }).rejects.toThrow(Schematic.ForbiddenError); }); @@ -676,9 +676,9 @@ describe("WebhooksClient", () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { - name: "name", + name: "x", request_types: ["subscription.trial.ended", "subscription.trial.ended"], - url: "url", + url: "x", }; const rawResponseBody = { error: "error" }; server @@ -692,9 +692,9 @@ describe("WebhooksClient", () => { await expect(async () => { return await client.webhooks.createWebhook({ - name: "name", + name: "x", requestTypes: ["subscription.trial.ended", "subscription.trial.ended"], - url: "url", + url: "x", }); }).rejects.toThrow(Schematic.NotFoundError); }); @@ -703,9 +703,9 @@ describe("WebhooksClient", () => { const server = mockServerPool.createServer(); const client = new SchematicClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawRequestBody = { - name: "name", + name: "x", request_types: ["subscription.trial.ended", "subscription.trial.ended"], - url: "url", + url: "x", }; const rawResponseBody = { error: "error" }; server @@ -719,9 +719,9 @@ describe("WebhooksClient", () => { await expect(async () => { return await client.webhooks.createWebhook({ - name: "name", + name: "x", requestTypes: ["subscription.trial.ended", "subscription.trial.ended"], - url: "url", + url: "x", }); }).rejects.toThrow(Schematic.InternalServerError); }); diff --git a/yarn.lock b/yarn.lock index 2b70d617..a7609022 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,7 +4,7 @@ "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.27.1": version "7.27.1" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== dependencies: "@babel/helper-validator-identifier" "^7.27.1" @@ -13,12 +13,12 @@ "@babel/compat-data@^7.27.2": version "7.28.5" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.5.tgz#a8a4962e1567121ac0b3b487f52107443b455c7f" integrity sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": version "7.28.5" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.5.tgz#4c81b35e51e1b734f510c99b07dfbc7bbbb48f7e" integrity sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw== dependencies: "@babel/code-frame" "^7.27.1" @@ -39,7 +39,7 @@ "@babel/generator@^7.28.5", "@babel/generator@^7.7.2": version "7.28.5" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.5.tgz#712722d5e50f44d07bc7ac9fe84438742dd61298" integrity sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ== dependencies: "@babel/parser" "^7.28.5" @@ -50,7 +50,7 @@ "@babel/helper-compilation-targets@^7.27.2": version "7.27.2" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== dependencies: "@babel/compat-data" "^7.27.2" @@ -61,12 +61,12 @@ "@babel/helper-globals@^7.28.0": version "7.28.0" - resolved "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== "@babel/helper-module-imports@^7.27.1": version "7.27.1" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204" integrity sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w== dependencies: "@babel/traverse" "^7.27.1" @@ -74,7 +74,7 @@ "@babel/helper-module-transforms@^7.28.3": version "7.28.3" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz#a2b37d3da3b2344fe085dab234426f2b9a2fa5f6" integrity sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw== dependencies: "@babel/helper-module-imports" "^7.27.1" @@ -83,27 +83,27 @@ "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.8.0": version "7.27.1" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz#ddb2f876534ff8013e6c2b299bf4d39b3c51d44c" integrity sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw== "@babel/helper-string-parser@^7.27.1": version "7.27.1" - resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== "@babel/helper-validator-identifier@^7.27.1", "@babel/helper-validator-identifier@^7.28.5": version "7.28.5" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== "@babel/helper-validator-option@^7.27.1": version "7.27.1" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== "@babel/helpers@^7.28.4": version "7.28.4" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827" integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w== dependencies: "@babel/template" "^7.27.2" @@ -111,133 +111,133 @@ "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.5": version "7.28.5" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.5.tgz#0b0225ee90362f030efd644e8034c99468893b08" integrity sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ== dependencies: "@babel/types" "^7.28.5" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-bigint@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-syntax-class-static-block@^7.14.5": version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-import-attributes@^7.24.7": version "7.27.1" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz#34c017d54496f9b11b61474e7ea3dfd5563ffe07" integrity sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww== dependencies: "@babel/helper-plugin-utils" "^7.27.1" "@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-json-strings@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@^7.7.2": version "7.27.1" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz#2f9beb5eff30fa507c5532d107daac7b888fa34c" integrity sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w== dependencies: "@babel/helper-plugin-utils" "^7.27.1" "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-numeric-separator@^7.10.4": version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-catch-binding@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-chaining@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-private-property-in-object@^7.14.5": version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-top-level-await@^7.14.5": version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": version "7.27.1" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz#5147d29066a793450f220c63fa3a9431b7e6dd18" integrity sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ== dependencies: "@babel/helper-plugin-utils" "^7.27.1" "@babel/template@^7.27.2", "@babel/template@^7.3.3": version "7.27.2" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== dependencies: "@babel/code-frame" "^7.27.1" @@ -246,7 +246,7 @@ "@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.5": version "7.28.5" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.5.tgz#450cab9135d21a7a2ca9d2d35aa05c20e68c360b" integrity sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ== dependencies: "@babel/code-frame" "^7.27.1" @@ -259,7 +259,7 @@ "@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4", "@babel/types@^7.28.5", "@babel/types@^7.3.3": version "7.28.5" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.5.tgz#10fc405f60897c35f07e85493c932c7b5ca0592b" integrity sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA== dependencies: "@babel/helper-string-parser" "^7.27.1" @@ -267,12 +267,12 @@ "@bcoe/v8-coverage@^0.2.3": version "0.2.3" - resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== "@biomejs/biome@2.3.1": version "2.3.1" - resolved "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-2.3.1.tgz#d1a9284f52986324f288cdaf450331a0f3fb1da7" integrity sha512-A29evf1R72V5bo4o2EPxYMm5mtyGvzp2g+biZvRFx29nWebGyyeOSsDWGx3tuNNMFRepGwxmA9ZQ15mzfabK2w== optionalDependencies: "@biomejs/cli-darwin-arm64" "2.3.1" @@ -286,7 +286,7 @@ "@biomejs/cli-darwin-arm64@2.3.1": version "2.3.1" - resolved "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.1.tgz#607835f8ef043e1a80f9ad2a232c9e860941ab60" integrity sha512-ombSf3MnTUueiYGN1SeI9tBCsDUhpWzOwS63Dove42osNh0PfE1cUtHFx6eZ1+MYCCLwXzlFlYFdrJ+U7h6LcA== "@biomejs/cli-darwin-x64@2.3.1": @@ -326,14 +326,14 @@ "@bundled-es-modules/cookie@^2.0.1": version "2.0.1" - resolved "https://registry.npmjs.org/@bundled-es-modules/cookie/-/cookie-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/@bundled-es-modules/cookie/-/cookie-2.0.1.tgz#b41376af6a06b3e32a15241d927b840a9b4de507" integrity sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw== dependencies: cookie "^0.7.2" "@bundled-es-modules/statuses@^1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@bundled-es-modules/statuses/-/statuses-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@bundled-es-modules/statuses/-/statuses-1.0.1.tgz#761d10f44e51a94902c4da48675b71a76cc98872" integrity sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg== dependencies: statuses "^2.0.1" @@ -360,7 +360,7 @@ "@esbuild/darwin-arm64@0.25.12": version "0.25.12" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz#79197898ec1ff745d21c071e1c7cc3c802f0c1fd" integrity sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg== "@esbuild/darwin-x64@0.25.12": @@ -470,12 +470,12 @@ "@inquirer/ansi@^1.0.2": version "1.0.2" - resolved "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-1.0.2.tgz#674a4c4d81ad460695cb2a1fc69d78cd187f337e" integrity sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ== "@inquirer/confirm@^5.0.0": version "5.1.21" - resolved "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.21.tgz" + resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.21.tgz#610c4acd7797d94890a6e2dde2c98eb1e891dd12" integrity sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ== dependencies: "@inquirer/core" "^10.3.2" @@ -483,7 +483,7 @@ "@inquirer/core@^10.3.2": version "10.3.2" - resolved "https://registry.npmjs.org/@inquirer/core/-/core-10.3.2.tgz" + resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.3.2.tgz#535979ff3ff4fe1e7cc4f83e2320504c743b7e20" integrity sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A== dependencies: "@inquirer/ansi" "^1.0.2" @@ -497,17 +497,17 @@ "@inquirer/figures@^1.0.15": version "1.0.15" - resolved "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz" + resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.15.tgz#dbb49ed80df11df74268023b496ac5d9acd22b3a" integrity sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g== "@inquirer/type@^3.0.10": version "3.0.10" - resolved "https://registry.npmjs.org/@inquirer/type/-/type-3.0.10.tgz" + resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.10.tgz#11ed564ec78432a200ea2601a212d24af8150d50" integrity sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA== "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" - resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== dependencies: camelcase "^5.3.1" @@ -518,12 +518,12 @@ "@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== "@jest/console@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== dependencies: "@jest/types" "^29.6.3" @@ -535,7 +535,7 @@ "@jest/core@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== dependencies: "@jest/console" "^29.7.0" @@ -569,7 +569,7 @@ "@jest/environment@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== dependencies: "@jest/fake-timers" "^29.7.0" @@ -579,14 +579,14 @@ "@jest/expect-utils@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== dependencies: jest-get-type "^29.6.3" "@jest/expect@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== dependencies: expect "^29.7.0" @@ -594,7 +594,7 @@ "@jest/fake-timers@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== dependencies: "@jest/types" "^29.6.3" @@ -606,7 +606,7 @@ "@jest/globals@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== dependencies: "@jest/environment" "^29.7.0" @@ -616,7 +616,7 @@ "@jest/reporters@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== dependencies: "@bcoe/v8-coverage" "^0.2.3" @@ -646,14 +646,14 @@ "@jest/schemas@^29.6.3": version "29.6.3" - resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== dependencies: "@sinclair/typebox" "^0.27.8" "@jest/source-map@^29.6.3": version "29.6.3" - resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== dependencies: "@jridgewell/trace-mapping" "^0.3.18" @@ -662,7 +662,7 @@ "@jest/test-result@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== dependencies: "@jest/console" "^29.7.0" @@ -672,7 +672,7 @@ "@jest/test-sequencer@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== dependencies: "@jest/test-result" "^29.7.0" @@ -682,7 +682,7 @@ "@jest/transform@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== dependencies: "@babel/core" "^7.11.6" @@ -703,7 +703,7 @@ "@jest/types@^29.6.3": version "29.6.3" - resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== dependencies: "@jest/schemas" "^29.6.3" @@ -715,7 +715,7 @@ "@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5": version "0.3.13" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== dependencies: "@jridgewell/sourcemap-codec" "^1.5.0" @@ -723,7 +723,7 @@ "@jridgewell/remapping@^2.3.5": version "2.3.5" - resolved "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== dependencies: "@jridgewell/gen-mapping" "^0.3.5" @@ -731,12 +731,12 @@ "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== "@jridgewell/source-map@^0.3.3": version "0.3.11" - resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.11.tgz#b21835cbd36db656b857c2ad02ebd413cc13a9ba" integrity sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA== dependencies: "@jridgewell/gen-mapping" "^0.3.5" @@ -744,12 +744,12 @@ "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0": version "1.5.5" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.28": version "0.3.31" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== dependencies: "@jridgewell/resolve-uri" "^3.1.0" @@ -757,7 +757,7 @@ "@mswjs/interceptors@^0.39.1": version "0.39.8" - resolved "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.39.8.tgz" + resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.39.8.tgz#0a2cf4cf26a731214ca4156273121f67dff7ebf8" integrity sha512-2+BzZbjRO7Ct61k8fMNHEtoKjeWI9pIlHFTqBwZ5icHpqszIgEZbjb1MW5Z0+bITTCTl3gk4PDBxs9tA/csXvA== dependencies: "@open-draft/deferred-promise" "^2.2.0" @@ -769,12 +769,12 @@ "@open-draft/deferred-promise@^2.2.0": version "2.2.0" - resolved "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz" + resolved "https://registry.yarnpkg.com/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz#4a822d10f6f0e316be4d67b4d4f8c9a124b073bd" integrity sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA== "@open-draft/logger@^0.3.0": version "0.3.0" - resolved "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz" + resolved "https://registry.yarnpkg.com/@open-draft/logger/-/logger-0.3.0.tgz#2b3ab1242b360aa0adb28b85f5d7da1c133a0954" integrity sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ== dependencies: is-node-process "^1.2.0" @@ -782,36 +782,36 @@ "@open-draft/until@^2.0.0", "@open-draft/until@^2.1.0": version "2.1.0" - resolved "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-2.1.0.tgz#0acf32f470af2ceaf47f095cdecd40d68666efda" integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg== "@sinclair/typebox@^0.27.8": version "0.27.8" - resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== "@sinonjs/commons@^3.0.0": version "3.0.1" - resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== dependencies: type-detect "4.0.8" "@sinonjs/fake-timers@^10.0.2": version "10.3.0" - resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== dependencies: "@sinonjs/commons" "^3.0.0" "@tootallnate/once@2": version "2.0.0" - resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== "@types/babel__core@^7.1.14": version "7.20.5" - resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== dependencies: "@babel/parser" "^7.20.7" @@ -822,14 +822,14 @@ "@types/babel__generator@*": version "7.27.0" - resolved "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.27.0.tgz#b5819294c51179957afaec341442f9341e4108a9" integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": version "7.4.4" - resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== dependencies: "@babel/parser" "^7.1.0" @@ -837,19 +837,19 @@ "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": version "7.28.0" - resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.28.0.tgz#07d713d6cce0d265c9849db0cbe62d3f61f36f74" integrity sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q== dependencies: "@babel/types" "^7.28.2" "@types/cookie@^0.6.0": version "0.6.0" - resolved "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.6.0.tgz#eac397f28bf1d6ae0ae081363eca2f425bedf0d5" integrity sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA== "@types/eslint-scope@^3.7.7": version "3.7.7" - resolved "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== dependencies: "@types/eslint" "*" @@ -857,7 +857,7 @@ "@types/eslint@*": version "9.6.1" - resolved "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584" integrity sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag== dependencies: "@types/estree" "*" @@ -865,38 +865,38 @@ "@types/estree@*", "@types/estree@^1.0.8": version "1.0.8" - resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== "@types/graceful-fs@^4.1.3": version "4.1.9" - resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== dependencies: "@types/node" "*" "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.6" - resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== "@types/istanbul-lib-report@*": version "3.0.3" - resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": version "3.0.4" - resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== dependencies: "@types/istanbul-lib-report" "*" "@types/jest@^29.5.14": version "29.5.14" - resolved "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.14.tgz#2b910912fa1d6856cadcd0c1f95af7df1d6049e5" integrity sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ== dependencies: expect "^29.0.0" @@ -904,7 +904,7 @@ "@types/jsdom@^20.0.0": version "20.0.1" - resolved "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.1.tgz#07c14bc19bd2f918c1929541cdaacae894744808" integrity sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ== dependencies: "@types/node" "*" @@ -913,68 +913,75 @@ "@types/json-schema@*", "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.9": version "7.0.15" - resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node-fetch@^2.6.12": version "2.6.13" - resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.13.tgz" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.13.tgz#e0c9b7b5edbdb1b50ce32c127e85e880872d56ee" integrity sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw== dependencies: "@types/node" "*" form-data "^4.0.4" -"@types/node@*", "@types/node@^18.19.70": +"@types/node@*": + version "25.0.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.0.3.tgz#79b9ac8318f373fbfaaf6e2784893efa9701f269" + integrity sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA== + dependencies: + undici-types "~7.16.0" + +"@types/node@^18.19.70": version "18.19.130" - resolved "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.130.tgz#da4c6324793a79defb7a62cba3947ec5add00d59" integrity sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg== dependencies: undici-types "~5.26.4" "@types/readable-stream@^4.0.18": version "4.0.23" - resolved "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.23.tgz" + resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.23.tgz#fcd0f7472f45ceb43154f08f0083ccd1c76e53ce" integrity sha512-wwXrtQvbMHxCbBgjHaMGEmImFTQxxpfMOR/ZoQnXxB1woqkUbdLGFDgauo00Py9IudiaqSeiBiulSV9i6XIPig== dependencies: "@types/node" "*" "@types/stack-utils@^2.0.0": version "2.0.3" - resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== "@types/statuses@^2.0.4": version "2.0.6" - resolved "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/@types/statuses/-/statuses-2.0.6.tgz#66748315cc9a96d63403baa8671b2c124f8633aa" integrity sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA== "@types/tough-cookie@*": version "4.0.5" - resolved "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== "@types/ws@^8.18.1": version "8.18.1" - resolved "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.18.1.tgz#48464e4bf2ddfd17db13d845467f6070ffea4aa9" integrity sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg== dependencies: "@types/node" "*" "@types/yargs-parser@*": version "21.0.3" - resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.8": version "17.0.35" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.35.tgz#07013e46aa4d7d7d50a49e15604c1c5340d4eb24" integrity sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg== dependencies: "@types/yargs-parser" "*" "@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1": version "1.14.1" - resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.14.1.tgz#a9f6a07f2b03c95c8d38c4536a1fdfb521ff55b6" integrity sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ== dependencies: "@webassemblyjs/helper-numbers" "1.13.2" @@ -982,22 +989,22 @@ "@webassemblyjs/floating-point-hex-parser@1.13.2": version "1.13.2" - resolved "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz#fcca1eeddb1cc4e7b6eed4fc7956d6813b21b9fb" integrity sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA== "@webassemblyjs/helper-api-error@1.13.2": version "1.13.2" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz#e0a16152248bc38daee76dd7e21f15c5ef3ab1e7" integrity sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ== "@webassemblyjs/helper-buffer@1.14.1": version "1.14.1" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz#822a9bc603166531f7d5df84e67b5bf99b72b96b" integrity sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA== "@webassemblyjs/helper-numbers@1.13.2": version "1.13.2" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz#dbd932548e7119f4b8a7877fd5a8d20e63490b2d" integrity sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA== dependencies: "@webassemblyjs/floating-point-hex-parser" "1.13.2" @@ -1006,12 +1013,12 @@ "@webassemblyjs/helper-wasm-bytecode@1.13.2": version "1.13.2" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz#e556108758f448aae84c850e593ce18a0eb31e0b" integrity sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA== "@webassemblyjs/helper-wasm-section@1.14.1": version "1.14.1" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz#9629dda9c4430eab54b591053d6dc6f3ba050348" integrity sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw== dependencies: "@webassemblyjs/ast" "1.14.1" @@ -1021,26 +1028,26 @@ "@webassemblyjs/ieee754@1.13.2": version "1.13.2" - resolved "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz#1c5eaace1d606ada2c7fd7045ea9356c59ee0dba" integrity sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw== dependencies: "@xtuc/ieee754" "^1.2.0" "@webassemblyjs/leb128@1.13.2": version "1.13.2" - resolved "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.13.2.tgz#57c5c3deb0105d02ce25fa3fd74f4ebc9fd0bbb0" integrity sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw== dependencies: "@xtuc/long" "4.2.2" "@webassemblyjs/utf8@1.13.2": version "1.13.2" - resolved "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.13.2.tgz#917a20e93f71ad5602966c2d685ae0c6c21f60f1" integrity sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ== "@webassemblyjs/wasm-edit@^1.14.1": version "1.14.1" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz#ac6689f502219b59198ddec42dcd496b1004d597" integrity sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ== dependencies: "@webassemblyjs/ast" "1.14.1" @@ -1054,7 +1061,7 @@ "@webassemblyjs/wasm-gen@1.14.1": version "1.14.1" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz#991e7f0c090cb0bb62bbac882076e3d219da9570" integrity sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg== dependencies: "@webassemblyjs/ast" "1.14.1" @@ -1065,7 +1072,7 @@ "@webassemblyjs/wasm-opt@1.14.1": version "1.14.1" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz#e6f71ed7ccae46781c206017d3c14c50efa8106b" integrity sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw== dependencies: "@webassemblyjs/ast" "1.14.1" @@ -1075,7 +1082,7 @@ "@webassemblyjs/wasm-parser@1.14.1", "@webassemblyjs/wasm-parser@^1.14.1": version "1.14.1" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz#b3e13f1893605ca78b52c68e54cf6a865f90b9fb" integrity sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ== dependencies: "@webassemblyjs/ast" "1.14.1" @@ -1087,7 +1094,7 @@ "@webassemblyjs/wast-printer@1.14.1": version "1.14.1" - resolved "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz#3bb3e9638a8ae5fdaf9610e7a06b4d9f9aa6fe07" integrity sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw== dependencies: "@webassemblyjs/ast" "1.14.1" @@ -1095,29 +1102,29 @@ "@xtuc/ieee754@^1.2.0": version "1.2.0" - resolved "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== "@xtuc/long@4.2.2": version "4.2.2" - resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== abab@^2.0.6: version "2.0.6" - resolved "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== abort-controller@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== dependencies: event-target-shim "^5.0.0" acorn-globals@^7.0.0: version "7.0.1" - resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q== dependencies: acorn "^8.1.0" @@ -1125,45 +1132,45 @@ acorn-globals@^7.0.0: acorn-import-phases@^1.0.3: version "1.0.4" - resolved "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz" + resolved "https://registry.yarnpkg.com/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz#16eb850ba99a056cb7cbfe872ffb8972e18c8bd7" integrity sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ== acorn-walk@^8.0.2: version "8.3.4" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== dependencies: acorn "^8.11.0" acorn@^8.1.0, acorn@^8.11.0, acorn@^8.15.0, acorn@^8.8.1: version "8.15.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== agent-base@6: version "6.0.2" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: debug "4" ajv-formats@^2.1.1: version "2.1.1" - resolved "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== dependencies: ajv "^8.0.0" ajv-keywords@^5.1.0: version "5.1.0" - resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== dependencies: fast-deep-equal "^3.1.3" ajv@^8.0.0, ajv@^8.9.0: version "8.17.1" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: fast-deep-equal "^3.1.3" @@ -1173,31 +1180,31 @@ ajv@^8.0.0, ajv@^8.9.0: ansi-escapes@^4.2.1: version "4.3.2" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: type-fest "^0.21.3" ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" ansi-styles@^5.0.0: version "5.2.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== anymatch@^3.0.3: version "3.1.3" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" @@ -1205,19 +1212,19 @@ anymatch@^3.0.3: argparse@^1.0.7: version "1.0.10" - resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" asynckit@^0.4.0: version "0.4.0" - resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== babel-jest@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== dependencies: "@jest/transform" "^29.7.0" @@ -1230,7 +1237,7 @@ babel-jest@^29.7.0: babel-plugin-istanbul@^6.1.1: version "6.1.1" - resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -1241,7 +1248,7 @@ babel-plugin-istanbul@^6.1.1: babel-plugin-jest-hoist@^29.6.3: version "29.6.3" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== dependencies: "@babel/template" "^7.3.3" @@ -1251,7 +1258,7 @@ babel-plugin-jest-hoist@^29.6.3: babel-preset-current-node-syntax@^1.0.0: version "1.2.0" - resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz#20730d6cdc7dda5d89401cab10ac6a32067acde6" integrity sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" @@ -1272,7 +1279,7 @@ babel-preset-current-node-syntax@^1.0.0: babel-preset-jest@^29.6.3: version "29.6.3" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== dependencies: babel-plugin-jest-hoist "^29.6.3" @@ -1280,22 +1287,22 @@ babel-preset-jest@^29.6.3: balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base64-js@^1.3.1: version "1.5.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== baseline-browser-mapping@^2.9.0: version "2.9.10" - resolved "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.10.tgz" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.10.tgz#099221e89b30ec784675af076fbd4a93e58b53c3" integrity sha512-2VIKvDx8Z1a9rTB2eCkdPE5nSe28XnA+qivGnWHoB40hMMt/h1hSz0960Zqsn6ZyxWXUie0EBdElKv8may20AA== brace-expansion@^1.1.7: version "1.1.12" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== dependencies: balanced-match "^1.0.0" @@ -1303,14 +1310,14 @@ brace-expansion@^1.1.7: braces@^3.0.3: version "3.0.3" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: fill-range "^7.1.1" browserslist@^4.24.0, browserslist@^4.28.1: version "4.28.1" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.1.tgz#7f534594628c53c63101079e27e40de490456a95" integrity sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA== dependencies: baseline-browser-mapping "^2.9.0" @@ -1321,26 +1328,26 @@ browserslist@^4.24.0, browserslist@^4.28.1: bs-logger@^0.2.6: version "0.2.6" - resolved "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== dependencies: fast-json-stable-stringify "2.x" bser@2.1.1: version "2.1.1" - resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== dependencies: node-int64 "^0.4.0" buffer-from@^1.0.0: version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== buffer@^6.0.3: version "6.0.3" - resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== dependencies: base64-js "^1.3.1" @@ -1348,7 +1355,7 @@ buffer@^6.0.3: call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== dependencies: es-errors "^1.3.0" @@ -1356,27 +1363,27 @@ call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: callsites@^3.0.0: version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camelcase@^5.3.1: version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== camelcase@^6.2.0: version "6.3.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001759: version "1.0.30001760" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001760.tgz" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001760.tgz#bdd1960fafedf8d5f04ff16e81460506ff9b798f" integrity sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -1384,32 +1391,32 @@ chalk@^4.0.0, chalk@^4.1.0: char-regex@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== chrome-trace-event@^1.0.2: version "1.0.4" - resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b" integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== ci-info@^3.2.0: version "3.9.0" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== cjs-module-lexer@^1.0.0: version "1.4.3" - resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz#0f79731eb8cfe1ec72acd4066efac9d61991b00d" integrity sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q== cli-width@^4.1.0: version "4.1.0" - resolved "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5" integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== cliui@^8.0.1: version "8.0.1" - resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== dependencies: string-width "^4.2.0" @@ -1418,56 +1425,56 @@ cliui@^8.0.1: co@^4.6.0: version "4.6.0" - resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== collect-v8-coverage@^1.0.0: version "1.0.3" - resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz#cc1f01eb8d02298cbc9a437c74c70ab4e5210b80" integrity sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw== color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@~1.1.4: version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== combined-stream@^1.0.8: version "1.0.8" - resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" commander@^2.20.0: version "2.20.3" - resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== concat-map@0.0.1: version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== convert-source-map@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== cookie@^0.7.2: version "0.7.2" - resolved "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7" integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w== create-jest@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== dependencies: "@jest/types" "^29.6.3" @@ -1480,7 +1487,7 @@ create-jest@^29.7.0: cross-spawn@^7.0.3: version "7.0.6" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" @@ -1489,24 +1496,24 @@ cross-spawn@^7.0.3: cssom@^0.5.0: version "0.5.0" - resolved "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== cssom@~0.3.6: version "0.3.8" - resolved "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== cssstyle@^2.3.0: version "2.3.0" - resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== dependencies: cssom "~0.3.6" data-urls@^3.0.2: version "3.0.2" - resolved "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ== dependencies: abab "^2.0.6" @@ -1515,51 +1522,51 @@ data-urls@^3.0.2: debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: version "4.4.3" - resolved "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== dependencies: ms "^2.1.3" decimal.js@^10.4.2: version "10.6.0" - resolved "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.6.0.tgz#e649a43e3ab953a72192ff5983865e509f37ed9a" integrity sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg== dedent@^1.0.0: version "1.7.1" - resolved "https://registry.npmjs.org/dedent/-/dedent-1.7.1.tgz" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.1.tgz#364661eea3d73f3faba7089214420ec2f8f13e15" integrity sha512-9JmrhGZpOlEgOLdQgSm0zxFaYoQon408V1v49aqTWuXENVlnCuY9JBZcXZiCsZQWDjTm5Qf/nIvAy77mXDAjEg== deepmerge@^4.2.2: version "4.3.1" - resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== delayed-stream@~1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== detect-newline@^3.0.0: version "3.1.0" - resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== diff-sequences@^29.6.3: version "29.6.3" - resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== domexception@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== dependencies: webidl-conversions "^7.0.0" dunder-proto@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== dependencies: call-bind-apply-helpers "^1.0.1" @@ -1568,22 +1575,22 @@ dunder-proto@^1.0.1: electron-to-chromium@^1.5.263: version "1.5.267" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz#5d84f2df8cdb6bfe7e873706bb21bd4bfb574dc7" integrity sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw== emittery@^0.13.1: version "0.13.1" - resolved "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== emoji-regex@^8.0.0: version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.4: version "5.18.4" - resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.4.tgz" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.4.tgz#c22d33055f3952035ce6a144ce092447c525f828" integrity sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q== dependencies: graceful-fs "^4.2.4" @@ -1591,41 +1598,41 @@ enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.4: entities@^6.0.0: version "6.0.1" - resolved "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/entities/-/entities-6.0.1.tgz#c28c34a43379ca7f61d074130b2f5f7020a30694" integrity sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g== error-ex@^1.3.1: version "1.3.4" - resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414" integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ== dependencies: is-arrayish "^0.2.1" es-define-property@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== es-errors@^1.3.0: version "1.3.0" - resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-module-lexer@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-2.0.0.tgz#f657cd7a9448dcdda9c070a3cb75e5dc1e85f5b1" integrity sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw== es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: version "1.1.1" - resolved "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== dependencies: es-errors "^1.3.0" es-set-tostringtag@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== dependencies: es-errors "^1.3.0" @@ -1635,7 +1642,7 @@ es-set-tostringtag@^2.1.0: esbuild@^0.25.9: version "0.25.12" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.12.tgz#97a1d041f4ab00c2fce2f838d2b9969a2d2a97a5" integrity sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg== optionalDependencies: "@esbuild/aix-ppc64" "0.25.12" @@ -1667,17 +1674,17 @@ esbuild@^0.25.9: escalade@^3.1.1, escalade@^3.2.0: version "3.2.0" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-string-regexp@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== escodegen@^2.0.0: version "2.1.0" - resolved "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== dependencies: esprima "^4.0.1" @@ -1688,7 +1695,7 @@ escodegen@^2.0.0: eslint-scope@5.1.1: version "5.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: esrecurse "^4.3.0" @@ -1696,44 +1703,44 @@ eslint-scope@5.1.1: esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" - resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esrecurse@^4.3.0: version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^4.1.1: version "4.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estraverse@^5.2.0: version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== esutils@^2.0.2: version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== event-target-shim@^5.0.0: version "5.0.1" - resolved "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== events@^3.2.0, events@^3.3.0: version "3.3.0" - resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== execa@^5.0.0: version "5.1.1" - resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== dependencies: cross-spawn "^7.0.3" @@ -1748,12 +1755,12 @@ execa@^5.0.0: exit@^0.1.2: version "0.1.2" - resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== expect@^29.0.0, expect@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== dependencies: "@jest/expect-utils" "^29.7.0" @@ -1764,36 +1771,36 @@ expect@^29.0.0, expect@^29.7.0: fast-deep-equal@^3.1.3: version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-uri@^3.0.1: version "3.1.0" - resolved "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== fb-watchman@^2.0.0: version "2.0.2" - resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== dependencies: bser "2.1.1" fill-range@^7.1.1: version "7.1.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: locate-path "^5.0.0" @@ -1801,7 +1808,7 @@ find-up@^4.0.0, find-up@^4.1.0: form-data@^4.0.0, form-data@^4.0.4: version "4.0.5" - resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.5.tgz#b49e48858045ff4cbf6b03e1805cebcad3679053" integrity sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w== dependencies: asynckit "^0.4.0" @@ -1812,37 +1819,37 @@ form-data@^4.0.0, form-data@^4.0.4: formdata-node@^6.0.3: version "6.0.3" - resolved "https://registry.npmjs.org/formdata-node/-/formdata-node-6.0.3.tgz" + resolved "https://registry.yarnpkg.com/formdata-node/-/formdata-node-6.0.3.tgz#48f8e2206ae2befded82af621ef015f08168dc6d" integrity sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg== fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@^2.3.2: version "2.3.3" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.2: version "1.1.2" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== gensync@^1.0.0-beta.2: version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-caller-file@^2.0.5: version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-intrinsic@^1.2.6: version "1.3.0" - resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== dependencies: call-bind-apply-helpers "^1.0.2" @@ -1858,12 +1865,12 @@ get-intrinsic@^1.2.6: get-package-type@^0.1.0: version "0.1.0" - resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== get-proto@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== dependencies: dunder-proto "^1.0.1" @@ -1871,17 +1878,17 @@ get-proto@^1.0.1: get-stream@^6.0.0: version "6.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== glob-to-regexp@^0.4.1: version "0.4.1" - resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== glob@^7.1.3, glob@^7.1.4: version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -1893,22 +1900,22 @@ glob@^7.1.3, glob@^7.1.4: gopd@^1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== graphql@^16.8.1: version "16.12.0" - resolved "https://registry.npmjs.org/graphql/-/graphql-16.12.0.tgz" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.12.0.tgz#28cc2462435b1ac3fdc6976d030cef83a0c13ac7" integrity sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ== handlebars@^4.7.8: version "4.7.8" - resolved "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== dependencies: minimist "^1.2.5" @@ -1920,48 +1927,48 @@ handlebars@^4.7.8: has-flag@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has-symbols@^1.0.3, has-symbols@^1.1.0: version "1.1.0" - resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== has-tostringtag@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== dependencies: has-symbols "^1.0.3" hasown@^2.0.2: version "2.0.2" - resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: function-bind "^1.1.2" headers-polyfill@^4.0.2: version "4.0.3" - resolved "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-4.0.3.tgz" + resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-4.0.3.tgz#922a0155de30ecc1f785bcf04be77844ca95ad07" integrity sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ== html-encoding-sniffer@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== dependencies: whatwg-encoding "^2.0.0" html-escaper@^2.0.0: version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== http-proxy-agent@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== dependencies: "@tootallnate/once" "2" @@ -1970,7 +1977,7 @@ http-proxy-agent@^5.0.0: https-proxy-agent@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== dependencies: agent-base "6" @@ -1978,24 +1985,24 @@ https-proxy-agent@^5.0.1: human-signals@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== iconv-lite@0.6.3: version "0.6.3" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== dependencies: safer-buffer ">= 2.1.2 < 3.0.0" ieee754@^1.2.1: version "1.2.1" - resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== import-local@^3.0.2: version "3.2.0" - resolved "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== dependencies: pkg-dir "^4.2.0" @@ -2003,12 +2010,12 @@ import-local@^3.0.2: imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" @@ -2016,64 +2023,64 @@ inflight@^1.0.4: inherits@2: version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== is-arrayish@^0.2.1: version "0.2.1" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-core-module@^2.16.1: version "2.16.1" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== dependencies: hasown "^2.0.2" is-fullwidth-code-point@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-generator-fn@^2.0.0: version "2.1.0" - resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== is-node-process@^1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/is-node-process/-/is-node-process-1.2.0.tgz#ea02a1b90ddb3934a19aea414e88edef7e11d134" integrity sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw== is-number@^7.0.0: version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-potential-custom-element-name@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== is-stream@^2.0.0: version "2.0.1" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== isexe@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.2" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== istanbul-lib-instrument@^5.0.4: version "5.2.1" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== dependencies: "@babel/core" "^7.12.3" @@ -2084,7 +2091,7 @@ istanbul-lib-instrument@^5.0.4: istanbul-lib-instrument@^6.0.0: version "6.0.3" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== dependencies: "@babel/core" "^7.23.9" @@ -2095,7 +2102,7 @@ istanbul-lib-instrument@^6.0.0: istanbul-lib-report@^3.0.0: version "3.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== dependencies: istanbul-lib-coverage "^3.0.0" @@ -2104,7 +2111,7 @@ istanbul-lib-report@^3.0.0: istanbul-lib-source-maps@^4.0.0: version "4.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== dependencies: debug "^4.1.1" @@ -2113,7 +2120,7 @@ istanbul-lib-source-maps@^4.0.0: istanbul-reports@^3.1.3: version "3.2.0" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.2.0.tgz#cb4535162b5784aa623cee21a7252cf2c807ac93" integrity sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA== dependencies: html-escaper "^2.0.0" @@ -2121,7 +2128,7 @@ istanbul-reports@^3.1.3: jest-changed-files@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== dependencies: execa "^5.0.0" @@ -2130,7 +2137,7 @@ jest-changed-files@^29.7.0: jest-circus@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== dependencies: "@jest/environment" "^29.7.0" @@ -2156,7 +2163,7 @@ jest-circus@^29.7.0: jest-cli@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== dependencies: "@jest/core" "^29.7.0" @@ -2173,7 +2180,7 @@ jest-cli@^29.7.0: jest-config@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== dependencies: "@babel/core" "^7.11.6" @@ -2201,7 +2208,7 @@ jest-config@^29.7.0: jest-diff@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== dependencies: chalk "^4.0.0" @@ -2211,14 +2218,14 @@ jest-diff@^29.7.0: jest-docblock@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== dependencies: detect-newline "^3.0.0" jest-each@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== dependencies: "@jest/types" "^29.6.3" @@ -2229,7 +2236,7 @@ jest-each@^29.7.0: jest-environment-jsdom@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz#d206fa3551933c3fd519e5dfdb58a0f5139a837f" integrity sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA== dependencies: "@jest/environment" "^29.7.0" @@ -2243,7 +2250,7 @@ jest-environment-jsdom@^29.7.0: jest-environment-node@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== dependencies: "@jest/environment" "^29.7.0" @@ -2255,12 +2262,12 @@ jest-environment-node@^29.7.0: jest-get-type@^29.6.3: version "29.6.3" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== jest-haste-map@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== dependencies: "@jest/types" "^29.6.3" @@ -2279,7 +2286,7 @@ jest-haste-map@^29.7.0: jest-leak-detector@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== dependencies: jest-get-type "^29.6.3" @@ -2287,7 +2294,7 @@ jest-leak-detector@^29.7.0: jest-matcher-utils@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== dependencies: chalk "^4.0.0" @@ -2297,7 +2304,7 @@ jest-matcher-utils@^29.7.0: jest-message-util@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== dependencies: "@babel/code-frame" "^7.12.13" @@ -2312,7 +2319,7 @@ jest-message-util@^29.7.0: jest-mock@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== dependencies: "@jest/types" "^29.6.3" @@ -2321,17 +2328,17 @@ jest-mock@^29.7.0: jest-pnp-resolver@^1.2.2: version "1.2.3" - resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== jest-regex-util@^29.6.3: version "29.6.3" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== jest-resolve-dependencies@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== dependencies: jest-regex-util "^29.6.3" @@ -2339,7 +2346,7 @@ jest-resolve-dependencies@^29.7.0: jest-resolve@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== dependencies: chalk "^4.0.0" @@ -2354,7 +2361,7 @@ jest-resolve@^29.7.0: jest-runner@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== dependencies: "@jest/console" "^29.7.0" @@ -2381,7 +2388,7 @@ jest-runner@^29.7.0: jest-runtime@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== dependencies: "@jest/environment" "^29.7.0" @@ -2409,7 +2416,7 @@ jest-runtime@^29.7.0: jest-snapshot@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== dependencies: "@babel/core" "^7.11.6" @@ -2435,7 +2442,7 @@ jest-snapshot@^29.7.0: jest-util@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== dependencies: "@jest/types" "^29.6.3" @@ -2447,7 +2454,7 @@ jest-util@^29.7.0: jest-validate@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== dependencies: "@jest/types" "^29.6.3" @@ -2459,7 +2466,7 @@ jest-validate@^29.7.0: jest-watcher@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== dependencies: "@jest/test-result" "^29.7.0" @@ -2473,7 +2480,7 @@ jest-watcher@^29.7.0: jest-worker@^27.4.5: version "27.5.1" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== dependencies: "@types/node" "*" @@ -2482,7 +2489,7 @@ jest-worker@^27.4.5: jest-worker@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== dependencies: "@types/node" "*" @@ -2492,7 +2499,7 @@ jest-worker@^29.7.0: jest@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== dependencies: "@jest/core" "^29.7.0" @@ -2502,12 +2509,12 @@ jest@^29.7.0: js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: version "3.14.2" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.2.tgz#77485ce1dd7f33c061fd1b16ecea23b55fcb04b0" integrity sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg== dependencies: argparse "^1.0.7" @@ -2515,7 +2522,7 @@ js-yaml@^3.13.1: jsdom@^20.0.0: version "20.0.3" - resolved "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db" integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ== dependencies: abab "^2.0.6" @@ -2547,95 +2554,95 @@ jsdom@^20.0.0: jsesc@^3.0.2: version "3.1.0" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" - resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== json5@^2.2.3: version "2.2.3" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== kleur@^3.0.3: version "3.0.3" - resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== leven@^3.1.0: version "3.1.0" - resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== lines-and-columns@^1.1.6: version "1.2.4" - resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== loader-runner@^4.3.1: version "4.3.1" - resolved "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.1.tgz#6c76ed29b0ccce9af379208299f07f876de737e3" integrity sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q== locate-path@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: p-locate "^4.1.0" lodash.memoize@^4.1.2: version "4.1.2" - resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== lru-cache@^5.1.1: version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: yallist "^3.0.2" make-dir@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== dependencies: semver "^7.5.3" make-error@^1.3.6: version "1.3.6" - resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== makeerror@1.0.12: version "1.0.12" - resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== dependencies: tmpl "1.0.5" math-intrinsics@^1.1.0: version "1.1.0" - resolved "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== merge-stream@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== micromatch@^4.0.0, micromatch@^4.0.4: version "4.0.8" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: braces "^3.0.3" @@ -2643,41 +2650,41 @@ micromatch@^4.0.0, micromatch@^4.0.4: mime-db@1.52.0: version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12, mime-types@^2.1.27: version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" mimic-fn@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" minimist@^1.2.5: version "1.2.8" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== ms@^2.1.3: version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== msw@2.11.2: version "2.11.2" - resolved "https://registry.npmjs.org/msw/-/msw-2.11.2.tgz" + resolved "https://registry.yarnpkg.com/msw/-/msw-2.11.2.tgz#622d83855f456a5f93b1528f6eb6f4c0114623c3" integrity sha512-MI54hLCsrMwiflkcqlgYYNJJddY5/+S0SnONvhv1owOplvqohKSQyGejpNdUGyCwgs4IH7PqaNbPw/sKOEze9Q== dependencies: "@bundled-es-modules/cookie" "^2.0.1" @@ -2702,101 +2709,101 @@ msw@2.11.2: mute-stream@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-2.0.0.tgz#a5446fc0c512b71c83c44d908d5c7b7b4c493b2b" integrity sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA== natural-compare@^1.4.0: version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== neo-async@^2.6.2: version "2.6.2" - resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== node-fetch@^2.7.0: version "2.7.0" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" node-int64@^0.4.0: version "0.4.0" - resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== node-releases@^2.0.27: version "2.0.27" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== normalize-path@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== npm-run-path@^4.0.1: version "4.0.1" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== dependencies: path-key "^3.0.0" nwsapi@^2.2.2: version "2.2.23" - resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.23.tgz" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.23.tgz#59712c3a88e6de2bb0b6ccc1070397267019cf6c" integrity sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ== once@^1.3.0: version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" onetime@^5.1.2: version "5.1.2" - resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" outvariant@^1.4.0, outvariant@^1.4.3: version "1.4.3" - resolved "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz" + resolved "https://registry.yarnpkg.com/outvariant/-/outvariant-1.4.3.tgz#221c1bfc093e8fec7075497e7799fdbf43d14873" integrity sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA== p-limit@^2.2.0: version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" p-limit@^3.1.0: version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-locate@^4.1.0: version "4.1.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: p-limit "^2.2.0" p-try@^2.0.0: version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== parse-json@^5.2.0: version "5.2.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" @@ -2806,61 +2813,61 @@ parse-json@^5.2.0: parse5@^7.0.0, parse5@^7.1.1: version "7.3.0" - resolved "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.3.0.tgz#d7e224fa72399c7a175099f45fc2ad024b05ec05" integrity sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw== dependencies: entities "^6.0.0" path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.7: version "1.0.7" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-to-regexp@^6.3.0: version "6.3.0" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.3.0.tgz#2b6a26a337737a8e1416f9272ed0766b1c0389f4" integrity sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ== picocolors@^1.1.1: version "1.1.1" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pirates@^4.0.4: version "4.0.7" - resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== pkg-dir@^4.2.0: version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: find-up "^4.0.0" pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== dependencies: "@jest/schemas" "^29.6.3" @@ -2869,12 +2876,12 @@ pretty-format@^29.0.0, pretty-format@^29.7.0: process@^0.11.10: version "0.11.10" - resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== prompts@^2.0.1: version "2.4.2" - resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== dependencies: kleur "^3.0.3" @@ -2882,41 +2889,41 @@ prompts@^2.0.1: psl@^1.1.33: version "1.15.0" - resolved "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.15.0.tgz#bdace31896f1d97cec6a79e8224898ce93d974c6" integrity sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w== dependencies: punycode "^2.3.1" punycode@^2.1.1, punycode@^2.3.1: version "2.3.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== pure-rand@^6.0.0: version "6.1.0" - resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== querystringify@^2.1.1: version "2.2.0" - resolved "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== randombytes@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" react-is@^18.0.0: version "18.3.1" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== readable-stream@^4.5.2: version "4.7.0" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.7.0.tgz#cedbd8a1146c13dfff8dab14068028d58c15ac91" integrity sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg== dependencies: abort-controller "^3.0.0" @@ -2927,39 +2934,39 @@ readable-stream@^4.5.2: require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== require-from-string@^2.0.2: version "2.0.2" - resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== requires-port@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== resolve-cwd@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== dependencies: resolve-from "^5.0.0" resolve-from@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== resolve.exports@^2.0.0: version "2.0.3" - resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f" integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== resolve@^1.20.0: version "1.22.11" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262" integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ== dependencies: is-core-module "^2.16.1" @@ -2968,29 +2975,29 @@ resolve@^1.20.0: rettime@^0.7.0: version "0.7.0" - resolved "https://registry.npmjs.org/rettime/-/rettime-0.7.0.tgz" + resolved "https://registry.yarnpkg.com/rettime/-/rettime-0.7.0.tgz#c040f1a65e396eaa4b8346dd96ed937edc79d96f" integrity sha512-LPRKoHnLKd/r3dVxcwO7vhCW+orkOGj9ViueosEBK6ie89CijnfRlhaDhHq/3Hxu4CkWQtxwlBG0mzTQY6uQjw== safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== saxes@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== dependencies: xmlchars "^2.2.0" schema-utils@^4.3.0, schema-utils@^4.3.3: version "4.3.3" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.3.tgz#5b1850912fa31df90716963d45d9121fdfc09f46" integrity sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA== dependencies: "@types/json-schema" "^7.0.9" @@ -3000,56 +3007,56 @@ schema-utils@^4.3.0, schema-utils@^4.3.3: semver@^6.3.0, semver@^6.3.1: version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.7.3: version "7.7.3" - resolved "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== serialize-javascript@^6.0.2: version "6.0.2" - resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== signal-exit@^4.1.0: version "4.1.0" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== sisteransi@^1.0.5: version "1.0.5" - resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== slash@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== source-map-support@0.5.13: version "0.5.13" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== dependencies: buffer-from "^1.0.0" @@ -3057,7 +3064,7 @@ source-map-support@0.5.13: source-map-support@~0.5.20: version "0.5.21" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" @@ -3065,39 +3072,39 @@ source-map-support@~0.5.20: source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== source-map@^0.7.4: version "0.7.6" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.6.tgz#a3658ab87e5b6429c8a1f3ba0083d4c61ca3ef02" integrity sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ== sprintf-js@~1.0.2: version "1.0.3" - resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== stack-utils@^2.0.3: version "2.0.6" - resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== dependencies: escape-string-regexp "^2.0.0" statuses@^2.0.1: version "2.0.2" - resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382" integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw== strict-event-emitter@^0.5.1: version "0.5.1" - resolved "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz" + resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz#1602ece81c51574ca39c6815e09f1a3e8550bd93" integrity sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ== string-length@^4.0.1: version "4.0.2" - resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== dependencies: char-regex "^1.0.2" @@ -3105,7 +3112,7 @@ string-length@^4.0.1: string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" @@ -3114,65 +3121,65 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: string_decoder@^1.3.0: version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: safe-buffer "~5.2.0" strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" strip-bom@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== strip-final-newline@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== strip-json-comments@^3.1.1: version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== supports-color@^7.1.0: version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" supports-color@^8.0.0: version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== symbol-tree@^3.2.4: version "3.2.4" - resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== tapable@^2.2.0, tapable@^2.3.0: version "2.3.0" - resolved "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.3.0.tgz#7e3ea6d5ca31ba8e078b560f0d83ce9a14aa8be6" integrity sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg== terser-webpack-plugin@^5.3.16: version "5.3.16" - resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz#741e448cc3f93d8026ebe4f7ef9e4afacfd56330" integrity sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q== dependencies: "@jridgewell/trace-mapping" "^0.3.25" @@ -3183,7 +3190,7 @@ terser-webpack-plugin@^5.3.16: terser@^5.31.1: version "5.44.1" - resolved "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.1.tgz#e391e92175c299b8c284ad6ded609e37303b0a9c" integrity sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw== dependencies: "@jridgewell/source-map" "^0.3.3" @@ -3193,7 +3200,7 @@ terser@^5.31.1: test-exclude@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== dependencies: "@istanbuljs/schema" "^0.1.2" @@ -3202,31 +3209,31 @@ test-exclude@^6.0.0: tldts-core@^7.0.19: version "7.0.19" - resolved "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.19.tgz" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.19.tgz#9dd8a457a09b4e65c8266c029f1847fa78dead20" integrity sha512-lJX2dEWx0SGH4O6p+7FPwYmJ/bu1JbcGJ8RLaG9b7liIgZ85itUVEPbMtWRVrde/0fnDPEPHW10ZsKW3kVsE9A== tldts@^7.0.5: version "7.0.19" - resolved "https://registry.npmjs.org/tldts/-/tldts-7.0.19.tgz" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.19.tgz#84cd7a7f04e68ec93b93b106fac038c527b99368" integrity sha512-8PWx8tvC4jDB39BQw1m4x8y5MH1BcQ5xHeL2n7UVFulMPH/3Q0uiamahFJ3lXA0zO2SUyRXuVVbWSDmstlt9YA== dependencies: tldts-core "^7.0.19" tmpl@1.0.5: version "1.0.5" - resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== to-regex-range@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" tough-cookie@^4.1.2: version "4.1.4" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== dependencies: psl "^1.1.33" @@ -3236,26 +3243,26 @@ tough-cookie@^4.1.2: tough-cookie@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.0.tgz#11e418b7864a2c0d874702bc8ce0f011261940e5" integrity sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w== dependencies: tldts "^7.0.5" tr46@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== dependencies: punycode "^2.1.1" tr46@~0.0.3: version "0.0.3" - resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== ts-jest@^29.3.4: version "29.4.6" - resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.6.tgz" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.6.tgz#51cb7c133f227396818b71297ad7409bb77106e9" integrity sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA== dependencies: bs-logger "^0.2.6" @@ -3270,7 +3277,7 @@ ts-jest@^29.3.4: ts-loader@^9.5.1: version "9.5.4" - resolved "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.4.tgz" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.4.tgz#44b571165c10fb5a90744aa5b7e119233c4f4585" integrity sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ== dependencies: chalk "^4.1.0" @@ -3281,42 +3288,47 @@ ts-loader@^9.5.1: type-detect@4.0.8: version "4.0.8" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== type-fest@^0.21.3: version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== type-fest@^4.26.1, type-fest@^4.41.0: version "4.41.0" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.41.0.tgz#6ae1c8e5731273c2bf1f58ad39cbae2c91a46c58" integrity sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA== typescript@~5.7.2: version "5.7.3" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw== uglify-js@^3.1.4: version "3.19.3" - resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.19.3.tgz#82315e9bbc6f2b25888858acd1fff8441035b77f" integrity sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ== undici-types@~5.26.4: version "5.26.5" - resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~7.16.0: + version "7.16.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.16.0.tgz#ffccdff36aea4884cbfce9a750a0580224f58a46" + integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== + universalify@^0.2.0: version "0.2.0" - resolved "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== update-browserslist-db@^1.2.0: version "1.2.3" - resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz#64d76db58713136acbeb4c49114366cc6cc2e80d" integrity sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w== dependencies: escalade "^3.2.0" @@ -3324,7 +3336,7 @@ update-browserslist-db@^1.2.0: url-parse@^1.5.3: version "1.5.10" - resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== dependencies: querystringify "^2.1.1" @@ -3332,7 +3344,7 @@ url-parse@^1.5.3: v8-to-istanbul@^9.0.1: version "9.3.0" - resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== dependencies: "@jridgewell/trace-mapping" "^0.3.12" @@ -3341,44 +3353,44 @@ v8-to-istanbul@^9.0.1: w3c-xmlserializer@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw== dependencies: xml-name-validator "^4.0.0" walker@^1.0.8: version "1.0.8" - resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== dependencies: makeerror "1.0.12" watchpack@^2.4.4: - version "2.5.1" - resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.5.1.tgz" - integrity sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg== + version "2.4.4" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.4.tgz#473bda72f0850453da6425081ea46fc0d7602947" + integrity sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" webidl-conversions@^3.0.0: version "3.0.1" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== webidl-conversions@^7.0.0: version "7.0.0" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== webpack-sources@^3.3.3: version "3.3.3" - resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.3.3.tgz#d4bf7f9909675d7a070ff14d0ef2a4f3c982c723" integrity sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg== webpack@^5.97.1: version "5.104.1" - resolved "https://registry.npmjs.org/webpack/-/webpack-5.104.1.tgz" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.104.1.tgz#94bd41eb5dbf06e93be165ba8be41b8260d4fb1a" integrity sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA== dependencies: "@types/eslint-scope" "^3.7.7" @@ -3409,19 +3421,19 @@ webpack@^5.97.1: whatwg-encoding@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== dependencies: iconv-lite "0.6.3" whatwg-mimetype@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== whatwg-url@^11.0.0: version "11.0.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== dependencies: tr46 "^3.0.0" @@ -3429,7 +3441,7 @@ whatwg-url@^11.0.0: whatwg-url@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== dependencies: tr46 "~0.0.3" @@ -3437,19 +3449,19 @@ whatwg-url@^5.0.0: which@^2.0.1: version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" wordwrap@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== wrap-ansi@^6.2.0: version "6.2.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== dependencies: ansi-styles "^4.0.0" @@ -3458,7 +3470,7 @@ wrap-ansi@^6.2.0: wrap-ansi@^7.0.0: version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" @@ -3467,55 +3479,50 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== write-file-atomic@^4.0.2: version "4.0.2" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== dependencies: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@^8.0.0: - version "8.19.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.19.0.tgz#ddc2bdfa5b9ad860204f5a72a4863a8895fd8c8b" - integrity sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg== - -ws@^8.11.0: +ws@^8.11.0, ws@^8.18.1: version "8.18.3" - resolved "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.3.tgz#b56b88abffde62791c639170400c93dcb0c95472" integrity sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg== xml-name-validator@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== xmlchars@^2.2.0: version "2.2.0" - resolved "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== y18n@^5.0.5: version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yallist@^3.0.2: version "3.1.1" - resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== yargs-parser@^21.1.1: version "21.1.1" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs@^17.3.1, yargs@^17.7.2: version "17.7.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== dependencies: cliui "^8.0.1" @@ -3528,10 +3535,10 @@ yargs@^17.3.1, yargs@^17.7.2: yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== yoctocolors-cjs@^2.1.3: version "2.1.3" - resolved "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz" + resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz#7e4964ea8ec422b7a40ac917d3a344cfd2304baa" integrity sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==