feat(sdk): generate TypeScript SDK for the AIP spec#4469
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a TypeSpec→TypeScript emitter, emits a full AIP JS SDK package (core, funcs, models, facades, types, README), updates API TypeSpec namespaces/models, adds tests, and wires CI + Make target to publish ChangesAIP JavaScript SDK and tooling
Sequence Diagram(s) Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
2 Open source vulnerabilities detected - high severity
Aikido detected 2 vulnerabilities across 2 packages, it includes 2 high vulnerabilities.
Details
Remediation Aikido suggests bumping the vulnerable packages to a safe version.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
e73b902 to
1caae5b
Compare
fac9b40 to
9d73474
Compare
375c6b3 to
50d641a
Compare
61915e2 to
58719eb
Compare
There was a problem hiding this comment.
Actionable comments posted: 13
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (27)
api/spec/packages/aip-client-javascript/src/funcs/plans.ts (1)
1-113:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winGenerated output isn’t Prettier-clean and currently blocks lint.
CI reports
prettier --checkfailures for this file. Since this package is generated, please fix it via regeneration/formatter in the generation flow rather than manual edits.As per coding guidelines,
api/spec/packages/aip-client-javascript/**: "Never hand-edit files inaip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/funcs/plans.ts` around lines 1 - 113, The file fails Prettier checks; regenerate the aip-client-javascript package (do not hand-edit) from the typespec/typespec-typescript + aip sources so generated output is Prettier-clean, ensuring the generation step runs the formatter (or run prettier --write as part of the generation pipeline); target the generated module containing functions like listPlans, createPlan, updatePlan, getPlan, deletePlan, archivePlan, and publishPlan so their output matches project Prettier config and the CI `prettier --check` passes.api/spec/packages/aip-client-javascript/src/funcs/apps.ts (1)
1-39:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier is failing on this emitted file.
CI already reports style issues here; please fix this through regeneration/template formatting so emitted SDK files pass
prettier --checkconsistently.As per coding guidelines: "
api/spec/packages/aip-client-javascript/**: Never hand-edit files inaip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/funcs/apps.ts` around lines 1 - 39, The emitted file fails Prettier; do not hand-edit—regenerate the SDK so the file is formatted correctly. Re-run the typespec/typescript generator (aip/typespec-typescript) that produces api/spec/packages/aip-client-javascript and regenerate the file containing listApps and getApp (which use toURLSearchParams, encodePath, encodeSort, http, and request); ensure the generator/template outputs pass `prettier --check` (or run the formatter as part of the generation step) so listApps and getApp are reformatted to match project Prettier rules.api/spec/packages/aip-client-javascript/src/sdk/apps.ts (1)
1-31:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier is also failing on this emitted SDK wrapper.
Line-level logic looks fine, but CI flags style issues here too; this should be fixed via the generation/template path so the emitted SDK stays lint-clean.
As per coding guidelines: "
api/spec/packages/aip-client-javascript/**: Never hand-edit files inaip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/sdk/apps.ts` around lines 1 - 31, The emitted SDK wrapper for the Apps class is failing Prettier/CI; do not hand-edit apps.ts—instead update the codegen template in the generator (typespec-typescript / aip generation templates) that emits the Apps class, imports (listApps, getApp, Client, unwrap, RequestOptions and model types) and the methods list/get so the produced output conforms to project Prettier rules (fix import ordering/spacing, trailing newlines, and blank-line placement) and regenerate the package so the generated Apps class and its methods (constructor, list, get) are lint-clean.api/spec/packages/aip-client-javascript/src/sdk/billing.ts (1)
1-61:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier formatting issue blocking CI.
The pipeline reports formatting issues. Regenerate the SDK to fix:
cd api/spec make generateBased on learnings: Never hand-edit files in
aip-client-javascript; regenerate usingmake generate.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/sdk/billing.ts` around lines 1 - 61, The file shows formatting mismatches in the generated SDK (class Billing with methods listProfiles, createProfile, getProfile, updateProfile, deleteProfile); do not hand-edit this file—regenerate the JavaScript SDK to fix Prettier issues by running the repo generation step (from the api/spec directory run the project generator, e.g., make generate) so the Billing class and its methods are re-emitted with correct formatting.api/spec/packages/aip-client-javascript/src/models/operations/billing.ts (1)
1-31:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier formatting issue blocking CI.
The pipeline reports formatting issues. Regenerate the SDK to fix:
cd api/spec make generateBased on learnings: Never hand-edit files in
aip-client-javascript; regenerate usingmake generate.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/models/operations/billing.ts` around lines 1 - 31, The file containing exported types like ListBillingProfilesQuery, CreateBillingProfileRequest, GetBillingProfileRequest, UpdateBillingProfileRequest, DeleteBillingProfileRequest has Prettier formatting issues that must not be hand-edited; regenerate the SDK instead by running the project generation command (run the make generate target in the spec generator) so the file is recreated cleanly—do not manually format or change the exported types such as ListBillingProfilesQuery, CreateBillingProfileRequest, ProfilePagePaginatedResponse, UpsertBillingProfileRequestInput, etc.api/spec/packages/aip-client-javascript/src/funcs/billing.ts (1)
1-81:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier formatting issue blocking CI.
The pipeline reports formatting issues. Regenerate the SDK to fix:
cd api/spec make generateBased on learnings: Never hand-edit files in
aip-client-javascript; regenerate usingmake generate.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/funcs/billing.ts` around lines 1 - 81, Prettier formatting failed because this generated file (api/spec/packages/aip-client-javascript/src/funcs/billing.ts) was hand-edited; do not manually modify functions like listBillingProfiles, createBillingProfile, getBillingProfile, updateBillingProfile, or deleteBillingProfile — regenerate the SDK to fix formatting by running the generator in the spec repo (cd api/spec && make generate) and commit the regenerated files instead of manual edits.api/spec/packages/aip-client-javascript/README.md (1)
1-319:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier formatting issue blocking CI.
The pipeline reports formatting issues. Since this README is generated (per the
api/spec/**/readme.tsguidelines), regenerate the SDK to fix formatting:cd api/spec make generateBased on learnings: Never hand-edit files in
aip-client-javascript; everything is regenerable. As per coding guidelines: the README is emitted byreadme.tsand should not be manually edited.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/README.md` around lines 1 - 319, The README.md in the aip-client-javascript package has Prettier formatting errors; do not edit it manually—instead regenerate the SDK using the repository's generator: run the generator (make generate) in the api/spec workspace to reemit README.md from the readme.ts generator, commit the regenerated files, and ensure no manual edits remain in the aip-client-javascript readme.api/spec/packages/aip-client-javascript/.gitignore (1)
1-10:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier formatting issue blocking CI.
The pipeline reports this file has formatting issues. Run
pnpm formatfromapi/spec/to fix.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/.gitignore` around lines 1 - 10, Prettier reports formatting errors in the .gitignore that contains entries like "dist/", "tsconfig.tsbuildinfo", "node_modules/", and "*.assert.ts"; fix by running the repo formatter (pnpm format) in the package that owns this .gitignore (the package where this file lives) and commit the reformatted .gitignore so the CI Prettier check passes.api/spec/packages/aip-client-javascript/.npmignore (1)
1-18:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier formatting issue blocking CI.
The pipeline reports this file has formatting issues. Run
pnpm formatfromapi/spec/to fix.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/.npmignore` around lines 1 - 18, The .npmignore file fails Prettier formatting and is blocking CI; reformat it by running the workspace formatter (run pnpm format from the package root) so .npmignore matches Prettier rules and the pipeline passes, then commit the updated .npmignore; target the .npmignore file in the aip-client-javascript package.api/spec/packages/aip-client-javascript/src/funcs/addons.ts (1)
1-113: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick winFix formatting in the generator, not the generated output.
The Prettier check is failing on this file, but per the coding guidelines this file is regenerable and should never be hand-edited. The formatting issues need to be resolved by either:
- Running Prettier as part of the generation step in
typespec-typescript/src/emitter.tsx, or- Adding a post-generation formatting step in the emitter
The generated code patterns look correct.
As per coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/funcs/addons.ts` around lines 1 - 113, The generated file aip-client-javascript/src/funcs/addons.ts is failing Prettier because the generator doesn't format output; update the generator in typespec-typescript/src/emitter.tsx to run Prettier (or invoke the Prettier CLI) on generated TypeScript output (either per-file or as a post-generation step) after emitting the code for functions like listAddons, createAddon, updateAddon, etc.; ensure the emitter catches and logs formatting errors, applies the Prettier config used by the repo, and writes the formatted contents back so regenerations produce Prettier-compliant files without manual edits.api/spec/packages/typespec-typescript/src/sdk-files.ts (1)
1-323: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick winRun Prettier on source files.
This is actual source code (not generated), so the Prettier failure should be fixed by running
pnpm run formator similar in thetypespec-typescriptpackage.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/typespec-typescript/src/sdk-files.ts` around lines 1 - 323, Prettier formatting errors detected in the source (fix by running the formatter) — run the project formatter (e.g. cd into the typespec-typescript package and run pnpm run format or your repo's equivalent) and commit the resulting changes so functions like funcsFile, operationsFile, facadeFile, namespaceFile and related source (sdk-files.ts) are properly formatted; ensure you re-run lint/format checks to confirm the Prettier issues are resolved before updating the PR.api/spec/packages/typespec-typescript/src/runtime-templates.ts (1)
1-36: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick winThis file is generated—edit the baseline instead.
Line 1's header says this is generated by
gen-runtime-templates.mjs, so formatting fixes should go in the baseline runtime files, not here. Per the learnings, to update this:
- Restore the baseline from
/tmp/om-aip-sdk-baselineor git history- Update the baseline templates
- Re-run
gen-runtime-templates.mjswithBASELINE_DIRpointing at itThe Prettier failure is expected for generated files.
Based on learnings: "To edit runtime templates or conformance tests, restore the baseline ... update it, and re-run
gen-runtime-templates.mjswithBASELINE_DIRpointing at it"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/typespec-typescript/src/runtime-templates.ts` around lines 1 - 36, This file (RUNTIME_TEMPLATES / ENCODED in api/spec/packages/typespec-typescript/src/runtime-templates.ts) is generated; do not modify it—instead restore the baseline templates (e.g. from /tmp/om-aip-sdk-baseline or git history), make your formatting/templating changes in the baseline files, then re-run the generator scripts/gen-runtime-templates.mjs with BASELINE_DIR pointed at the restored baseline to regenerate runtime-templates.ts; verify the regenerated output (ENCODED / RUNTIME_TEMPLATES) before committing.api/spec/packages/aip-client-javascript/src/funcs/customers.ts (1)
1-281:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winGenerated SDK output is failing lint gates.
CI is flagging Prettier issues here (and sibling generated SDK files), so
pnpm lintcurrently fails. Please regenerate from the emitter and ensure emitted output is Prettier-clean before commit.Based on learnings: run generation via the Makefile (
make generate) instead of hand-editing generated SDK artifacts.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/funcs/customers.ts` around lines 1 - 281, The generated SDK file has Prettier formatting errors (causing pnpm lint to fail) across emitted functions like createCustomer, getCustomer, listCustomers, upsertCustomer, etc.; fix by re-generating the SDK from the emitter (run the project Makefile target: make generate) instead of hand-editing, then run the formatter/lint (pnpm lint or prettier --write) to ensure emitted files (including the functions above) are Prettier-clean before committing.api/spec/packages/aip-client-javascript/src/models/operations/features.ts (1)
1-41:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier check is failing on this file too.
Please run formatting here as well; it’s listed in CI and currently blocks lint.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/models/operations/features.ts` around lines 1 - 41, This file is failing Prettier formatting; run the project's formatter (e.g. the repo's configured Prettier via npm run format or prettier --write) on the file that defines ListFeaturesQuery, CreateFeatureRequest, UpdateFeatureRequest, and related types, fix formatting differences (imports, spacing, trailing commas, newline at EOF) and commit the reformatted file so CI passes.api/spec/packages/aip-client-javascript/src/funcs/features.ts (1)
1-98:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier check is blocking CI for this file.
This file is explicitly reported by
prettier --check; please format it sopnpm lintcan pass.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/funcs/features.ts` around lines 1 - 98, The file fails Prettier formatting; run the formatter and apply its suggested changes to make CI pass. Reformat this file (affecting functions listFeatures, createFeature, getFeature, updateFeature, deleteFeature, queryFeatureCost and their imports/exports) by running the project's formatter (e.g. pnpm lint or prettier --write) and commit the resulting whitespace/line-break/style updates so the file conforms to the repo Prettier rules.api/spec/packages/aip-client-javascript/src/funcs/governance.ts (1)
1-24:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winGenerated code must pass prettier check before merge.
The CI pipeline is failing because this generated file doesn't pass
prettier --check. Since these files inaip-client-javascript/are regenerable from the TypeSpec emitter, you'll need to either:
- Update the emitter to produce prettier-compliant output, or
- Add a formatting step after generation (e.g.,
prettier --writein the generation script)As per coding guidelines: Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/funcs/governance.ts` around lines 1 - 24, The generated file fails the project's Prettier check; update the TypeSpec emitter or the generation pipeline so generated code for symbols like queryGovernanceAccess (in aip-client-javascript/src/funcs/governance.ts) is emitted in Prettier-compliant format or is automatically formatted after generation; specifically either fix the emitter templates that produce the http(...).post(...) call and import ordering/style, or add a post-generation step (e.g., run prettier --write on aip-client-javascript) in the generation script so files like governance.ts always pass prettier --check.api/spec/packages/legacy/src/notification/channel.tsp (1)
200-251:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winRun prettier to fix formatting.
The return type formatting changes need to be auto-formatted with prettier to pass CI.
#!/bin/bash # Auto-fix formatting cd api/spec && pnpm prettier --write packages/legacy/src/notification/channel.tsp🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/legacy/src/notification/channel.tsp` around lines 200 - 251, Run the project's Prettier formatter on the changed TypeSpec file so the return-type alignment for the create/update/get/delete operations (see functions named create, update, get, delete and types NotificationChannelCreateRequest/NotificationChannel) matches CI style; run the repo's formatting command (e.g., the api/spec pnpm prettier --write target file) or your usual project formatting step and commit the updated file so the return-type blocks are auto-formatted.api/spec/packages/aip-client-javascript/src/sdk/llmCost.ts (1)
1-61:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winFix formatting by regenerating the SDK.
Prettier check is failing. Since this is generated code, run the emitter with prettier enabled to fix formatting.
As per coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/sdk/llmCost.ts` around lines 1 - 61, This file is generated and failing Prettier; do not hand-edit—regenerate the aip-client-javascript SDK with the emitter configured to run Prettier so formatting is corrected (the class LLMCost and its methods listPrices, getPrice, listOverrides, createOverride, deleteOverride will be replaced by the formatted output). Re-run the typespec/types + aip emitter pipeline with prettier enabled and commit the regenerated file so the LLMCost class and its exported functions match project style.api/spec/packages/aip-client-javascript/src/models/operations/llmCost.ts (1)
1-38:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winFix formatting by regenerating the SDK.
Prettier check is failing. Since this is generated code, run the emitter with prettier to fix formatting.
As per coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/models/operations/llmCost.ts` around lines 1 - 38, The file containing types like ListLlmCostPricesQuery, ListLlmCostPricesRequest, GetLlmCostPriceRequest, ListLlmCostOverridesQuery, CreateLlmCostOverrideRequest, and DeleteLlmCostOverrideRequest is misformatted; do not hand-edit it—regenerate the aip-client-javascript SDK using the typespec-typescript/aip emitter and ensure the emitter runs Prettier (or run Prettier on the generated output) so the formatting checks pass and the generated declarations are correctly formatted.api/spec/packages/aip-client-javascript/src/funcs/llmCost.ts (1)
1-86:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winFix formatting by regenerating the SDK.
Prettier check is failing. Since this is generated code, the formatting should be corrected by running the emitter with prettier enabled.
As per coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/funcs/llmCost.ts` around lines 1 - 86, The file funcs/llmCost.ts is failing Prettier because it is generated code with formatting drift; do not hand-edit—regenerate the SDK from the typespec/aip sources and run the emitter with Prettier enabled so funcs/llmCost.ts (including functions listLlmCostPrices, getLlmCostPrice, listLlmCostOverrides, createLlmCostOverride, deleteLlmCostOverride) is rewritten with the correct formatting; after regeneration, run the repository Prettier/CI checks and commit the regenerated output.api/spec/packages/legacy/src/meters.tsp (1)
65-263:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winRun prettier to fix formatting.
All the return type formatting changes need to be auto-formatted with prettier to pass CI.
#!/bin/bash # Auto-fix formatting cd api/spec && pnpm prettier --write packages/legacy/src/meters.tsp🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/legacy/src/meters.tsp` around lines 65 - 263, The file defining the Meter endpoints (symbols: get, create, update, delete, queryJson, queryCsv, query, queryCsvPost, listSubjects, listGroupByValues) is incorrectly formatted; run Prettier to auto-fix the return type and spacing changes and re-run CI. Specifically, run your repository's standard formatter (e.g., pnpm prettier --write or prettier --write) over the API spec package containing meters.tsp and commit the resulting changes so the return type blocks match the project's Prettier rules.api/spec/packages/legacy/src/events.tsp (1)
114-144:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winRun prettier to fix formatting.
The return type formatting changes need to be auto-formatted with prettier to pass CI.
#!/bin/bash # Auto-fix formatting cd api/spec && pnpm prettier --write packages/legacy/src/events.tsp🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/legacy/src/events.tsp` around lines 114 - 144, Run the formatter to fix the return-type/union alignment in the TSP spec where the ingestEvents and ingestEventsJson operations are declared (the events.tsp module); run your project's Prettier (e.g. pnpm prettier --write) against that spec file or the repo, verify the file containing ingestEvents/ingestEventsJson is updated, then stage the formatted changes so CI passes.api/spec/packages/aip-client-javascript/src/models/operations/tax.ts (1)
1-33:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPlease format this file; lint is failing here.
Prettier check flags this file in CI, so this needs a formatting pass before merge.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/models/operations/tax.ts` around lines 1 - 33, This file is failing Prettier formatting; run the project's formatter (e.g., npm run format or Prettier) and reformat this file so imports, spacing, and type declarations conform to lint rules; specifically ensure consistent import spacing for "z" and "schemas", align export type blocks like CreateTaxCodeRequest, GetTaxCodeRequest, ListTaxCodesQuery, UpsertTaxCodeRequest, DeleteTaxCodeRequest, and remove/adjust any trailing whitespace or inconsistent indentation so the file passes CI Prettier checks.api/spec/packages/aip-client-javascript/src/funcs/tax.ts (1)
1-82:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRun Prettier on this file to unblock CI.
CI lint is currently failing on this file due to formatting drift. A quick format pass should clear it.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/funcs/tax.ts` around lines 1 - 82, This file is failing CI due to formatting drift; run Prettier (or your project's formatter) on this file and commit the changes to fix formatting inconsistencies across the exported functions (createTaxCode, getTaxCode, listTaxCodes, upsertTaxCode, deleteTaxCode) and imports; simply format the file (e.g., npx prettier --write api/spec/packages/aip-client-javascript/src/funcs/tax.ts) and re-run CI.api/spec/packages/aip-client-javascript/src/sdk/tax.ts (1)
1-61:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier mismatch in this file is failing lint.
This file is part of the current formatting failures in CI; please run formatter here too.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/sdk/tax.ts` around lines 1 - 61, This file fails Prettier formatting; run the project's formatter on the Tax class file (which defines class Tax and its methods createCode, getCode, listCodes, upsertCode, deleteCode) and reformat imports, spacing, line breaks and trailing newline so it matches the repo Prettier config, then stage and commit the formatted file so the CI linting error is resolved.api/spec/packages/aip-client-javascript/src/sdk/planAddons.ts (1)
1-61:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFormatting fix needed in this SDK facade file.
CI shows Prettier drift here; reformatting will unblock lint.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/sdk/planAddons.ts` around lines 1 - 61, The file has Prettier/formatting drift around the PlanAddons SDK facade (class PlanAddons and its methods list, create, get, update, delete); reformat the file to match the repository Prettier/ESLint rules (apply the project's Prettier config or run the formatter used by CI) so imports, spacing, line breaks and trailing newline conform to CI expectations and then commit the formatted file.api/spec/packages/aip-client-javascript/src/models/operations/subscriptions.ts (1)
1-56:⚠️ Potential issue | 🟠 Major | ⚡ Quick winPrettier is still blocking CI on this generated output.
pnpm lintis currently failing onprettier --checkfor this file, so this needs regeneration/reformatting before merge.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/models/operations/subscriptions.ts` around lines 1 - 56, The file containing the TypeScript model types (e.g., CreateSubscriptionRequest, ListSubscriptionsQuery, GetSubscriptionResponse, ListSubscriptionAddonsResponse) is failing prettier --check; regenerate or reformat this generated output so it matches the project's Prettier configuration—either re-run the code generator that produced these types or run the project's formatter (e.g., the configured Prettier) on this file and commit the updated formatting so `pnpm lint` / `prettier --check` passes.
♻️ Duplicate comments (6)
api/spec/packages/aip-client-javascript/tests/errors.spec.ts (1)
1-67:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPipeline failure: Prettier formatting issues in generated test.
As per coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/tests/errors.spec.ts` around lines 1 - 67, The tests in errors.spec.ts are failing Prettier formatting because this file is generated; do not hand-edit it—re-generate the aip-client-javascript artifacts from the authoritative sources instead: run the generator that produces api/spec/packages/aip-client-javascript (the typespec-typescript / aip codegen step) so errors.spec.ts (and any formatting) is rebuilt correctly; locate the failing test file errors.spec.ts (refs: describe('error mapping'), funcs.getMeter, HTTPError) and regenerate the package rather than applying manual formatting fixes.api/spec/packages/aip-client-javascript/tests/client.spec.ts (1)
1-121:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPipeline failure: Prettier formatting issues in generated test.
Same root cause as the main source files - the emitter needs to format its output or the generation pipeline should include a formatting step.
As per coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/tests/client.spec.ts` around lines 1 - 121, The failing tests are due to Prettier formatting issues in the generated test file; fix by reformatting the generated output rather than hand-editing it: regenerate the aip-client-javascript artifacts from typespec-typescript/aip sources (ensuring the emitter emits Prettier-compliant code) or run Prettier on this test file (tests/client.spec.ts) after generation so utilities like mockMeter, lastUrl, and the OpenMeter test usages are formatted correctly; update the generation pipeline to include a formatting step so future outputs from the emitter are Prettier-clean.api/spec/packages/aip-client-javascript/tests/void-responses.spec.ts (1)
1-99:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPipeline failure: Prettier formatting issues in generated test.
As per coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/tests/void-responses.spec.ts` around lines 1 - 99, The test file tests/void-responses.spec.ts has Prettier formatting violations that should not be fixed by hand; regenerate the file from the canonical sources instead—run the aip/typespec Typescript generator (the typespec-typescript + aip codegen pipeline you use to produce aip-client-javascript tests) to produce a properly formatted tests/void-responses.spec.ts (which contains funcs.ingestMeteringEvents and funcs.deleteMeter usages) and commit the generated output; do not manually edit the file in aip-client-javascript.api/spec/packages/aip-client-javascript/tests/nesting.spec.ts (1)
1-32:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPipeline failure: Prettier formatting issues in generated test.
As per coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/tests/nesting.spec.ts` around lines 1 - 32, The failing file api/spec/packages/aip-client-javascript/tests/nesting.spec.ts has Prettier formatting errors but must not be hand-edited; instead regenerate the aip-client-javascript client so the test is produced correctly: re-run the Typespec/AIP generator that emits aip-client-javascript (the sources that produce nesting.spec.ts and the OpenMeter client), then run the repo formatter (prettier) on the generated output and commit the regenerated files; do not manually edit nesting.spec.ts or tests like the "routes customers.charges.list() to the charges sub-resource" case.api/spec/packages/aip-client-javascript/tsconfig.json (1)
1-14:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPipeline failure: Prettier formatting issues in generated config.
As per coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/tsconfig.json` around lines 1 - 14, The tsconfig.json in the aip-client-javascript package was hand-edited and is causing Prettier/pipeline failures; revert this manual change and regenerate the package files from the canonical generators rather than editing by hand: remove your edits to the tsconfig.json in the aip-client-javascript package, then run the typespec/typescript generator pipeline (the typespec-typescript + aip regeneration command used by the repo) to produce the correct, formatted tsconfig.json and commit those generated outputs; ensure future changes to tsconfig.json come from the generator outputs only and not from manual edits.api/spec/packages/aip-client-javascript/tests/meters.spec.ts (1)
1-93:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPipeline failure: Prettier formatting issues in generated test.
As per coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/tests/meters.spec.ts` around lines 1 - 93, The failing pipeline is due to Prettier formatting in a generated test (tests using client(), mockList(), funcs.listMeters and funcs.getMeter) which should not be manually edited; fix by updating the upstream generator or source definitions (typespec-typescript / aip) that produce this file and then re-run the codegen to regenerate a properly formatted meters.spec.ts, or adjust the generator template to emit Prettier-compliant formatting and re-run generation so the generated test (and its helper functions client and mockList) conform to project formatting rules.
🧹 Nitpick comments (5)
api/spec/Makefile (1)
41-41: ⚡ Quick winRedundant "with tag" in success message.
The message prints
"with tag $${AIP_SDK_RELEASE_TAG}"twice: once in "version ... with tag" and again at the end.✨ Proposed fix
- `@echo` "✅ Published $${AIP_SDK_RELEASE_TAG} AIP TypeScript SDK (`@openmeter/client`) version $${AIP_SDK_RELEASE_VERSION} with tag $${AIP_SDK_RELEASE_TAG}" + `@echo` "✅ Published AIP TypeScript SDK (`@openmeter/client`) version $${AIP_SDK_RELEASE_VERSION} with tag $${AIP_SDK_RELEASE_TAG}"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/Makefile` at line 41, Update the success echo in the Makefile to remove the duplicated "with tag" wording: locate the echo that references AIP_SDK_RELEASE_TAG and AIP_SDK_RELEASE_VERSION (the line containing "`@echo` \"✅ Published $${AIP_SDK_RELEASE_TAG} AIP TypeScript SDK (`@openmeter/client`) version $${AIP_SDK_RELEASE_VERSION} with tag $${AIP_SDK_RELEASE_TAG}\"") and edit the message so "with tag" appears only once (for example, include the tag only once after either the package name or the version).api/spec/packages/aip-client-javascript/src/models/operations/meters.ts (1)
1-2: 💤 Low valueUnused zod imports.
The file imports
zodandschemasbut doesn't appear to use them—only type aliases and interfaces are defined. This increases bundle size unnecessarily. Since this is generated code (per guidelines,aip-client-javascript/**files are regenerable), the emitter should be updated to omit these imports when zod schemas aren't actually emitted.Based on coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources" and "Do not validate request bodies; let the server own defaults and validation; do not parse request bodies with zod schemas."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/models/operations/meters.ts` around lines 1 - 2, Remove the unused Zod-related imports from the generated module: eliminate "import { z } from 'zod'" and "import * as schemas from '../schemas.js'" in the meters.ts emitter when no zod schemas are emitted; update the codegen template that produces api/spec/packages/aip-client-javascript/src/models/operations/meters.ts so it only emits those import lines when the file actually references z or schemas (e.g., check for any usages of z or schemas before emitting imports), and regenerate the file so only the type aliases/interfaces remain.api/spec/packages/aip-client-javascript/src/funcs/defaults.ts (1)
12-22: 💤 Low valueUnused
reqparameter in GET request.The
reqparameter is declared but never used in the function body sinceGetOrganizationDefaultTaxCodesRequestis an emptyRecord<string, never>. While this is generated code (per guidelines, files inaip-client-javascript/**are regenerable), the emitter could be updated to omit thereqparameter entirely when the request type is empty, improving the generated API surface.Based on coding guidelines: "Never hand-edit files in
aip-client-javascript; everything it contains is regenerable fromtypespec-typescriptandaipsources."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/funcs/defaults.ts` around lines 12 - 22, The function getOrganizationDefaultTaxCodes currently accepts an unused req parameter (GetOrganizationDefaultTaxCodesRequest is an empty Record) — remove the unused req parameter from the function signature and all generated call sites so the function becomes getOrganizationDefaultTaxCodes(client: Client, options?: RequestOptions): Promise<Result<GetOrganizationDefaultTaxCodesResponse>>; keep the internal implementation calling http(client).get('openmeter/defaults/tax-codes', options).json<...>(), preserve the return type, and update the generator/emitter that produces this file so it omits request parameters when the request type is empty to prevent reintroducing the unused parameter.api/spec/packages/aip-client-javascript/src/models/operations/addons.ts (1)
1-1: 💤 Low valueUnused import optimization opportunity.
Line 1 imports
zfromzodbut this namespace doesn't use any Zod schemas. This happens becausesdk-files.ts:84checksrequestTypes.usesZodat a global level rather than per-namespace. Consider refining the generator to only emit the zod import when the specific namespace actually uses it.Not a bug, just a minor generated-code optimization.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/aip-client-javascript/src/models/operations/addons.ts` at line 1, This file imports `z` from 'zod' but doesn't use it; remove the unused import from api/spec/packages/aip-client-javascript/src/models/operations/addons.ts or, better, update the generator check in sdk-files.ts (around the requestTypes.usesZod logic) to evaluate usesZod per-namespace instead of globally so the import is only emitted when that namespace actually references Zod; target the generator symbol `requestTypes.usesZod` and the output file `addons.ts` when making the change.api/spec/packages/typespec-typescript/src/sdk-files.ts (1)
84-88: 💤 Low valueConsider per-namespace Zod import check.
Line 84 checks
requestTypes.usesZodglobally, so if any namespace uses Zod, every namespace's operation file gets the import. This causes unused imports in namespaces that don't use Zod (like theaddons.tswe saw earlier).Consider checking whether this specific namespace uses Zod instead. Low priority optimization.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/packages/typespec-typescript/src/sdk-files.ts` around lines 84 - 88, The current code uses the global flag requestTypes.usesZod to decide adding Zod imports, causing imports in namespaces that don't use Zod; change the check to inspect the requestTypes for the specific namespace being generated (e.g., use the per-namespace requestTypes object or a requestTypesByNamespace[namespace].usesZod or the local variable passed into the operations generator) before pushing `import { z } from 'zod'` and `import * as schemas...`; update the conditional around imports.push in sdk-files.ts (the block referencing requestTypes.usesZod and imports.push) to use the namespace-scoped flag so only namespaces that actually use Zod get the imports.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3bb69f1d-b9a9-4516-990f-be3a0fdb3e9b
⛔ Files ignored due to path filters (3)
api/spec/patches/@typespec__emitter-framework@0.17.0.patchis excluded by!api/spec/patches/**api/spec/patches/@typespec__http-client.patchis excluded by!api/spec/patches/**api/spec/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (144)
.github/workflows/aip-npm-release.yaml.github/workflows/release.yamlAGENTS.mdapi/spec/.gitignoreapi/spec/.prettierignoreapi/spec/AGENTS.mdapi/spec/Makefileapi/spec/package.jsonapi/spec/packages/aip-client-javascript/.gitignoreapi/spec/packages/aip-client-javascript/.npmignoreapi/spec/packages/aip-client-javascript/README.mdapi/spec/packages/aip-client-javascript/package.jsonapi/spec/packages/aip-client-javascript/src/core.tsapi/spec/packages/aip-client-javascript/src/funcs/addons.tsapi/spec/packages/aip-client-javascript/src/funcs/apps.tsapi/spec/packages/aip-client-javascript/src/funcs/billing.tsapi/spec/packages/aip-client-javascript/src/funcs/currencies.tsapi/spec/packages/aip-client-javascript/src/funcs/customers.tsapi/spec/packages/aip-client-javascript/src/funcs/defaults.tsapi/spec/packages/aip-client-javascript/src/funcs/entitlements.tsapi/spec/packages/aip-client-javascript/src/funcs/events.tsapi/spec/packages/aip-client-javascript/src/funcs/features.tsapi/spec/packages/aip-client-javascript/src/funcs/governance.tsapi/spec/packages/aip-client-javascript/src/funcs/index.tsapi/spec/packages/aip-client-javascript/src/funcs/llmCost.tsapi/spec/packages/aip-client-javascript/src/funcs/meters.tsapi/spec/packages/aip-client-javascript/src/funcs/planAddons.tsapi/spec/packages/aip-client-javascript/src/funcs/plans.tsapi/spec/packages/aip-client-javascript/src/funcs/subscriptions.tsapi/spec/packages/aip-client-javascript/src/funcs/tax.tsapi/spec/packages/aip-client-javascript/src/index.tsapi/spec/packages/aip-client-javascript/src/lib/config.tsapi/spec/packages/aip-client-javascript/src/lib/encodings.tsapi/spec/packages/aip-client-javascript/src/lib/request.tsapi/spec/packages/aip-client-javascript/src/lib/to-error.tsapi/spec/packages/aip-client-javascript/src/lib/types.tsapi/spec/packages/aip-client-javascript/src/models/errors.tsapi/spec/packages/aip-client-javascript/src/models/operations/addons.tsapi/spec/packages/aip-client-javascript/src/models/operations/apps.tsapi/spec/packages/aip-client-javascript/src/models/operations/billing.tsapi/spec/packages/aip-client-javascript/src/models/operations/currencies.tsapi/spec/packages/aip-client-javascript/src/models/operations/customers.tsapi/spec/packages/aip-client-javascript/src/models/operations/defaults.tsapi/spec/packages/aip-client-javascript/src/models/operations/entitlements.tsapi/spec/packages/aip-client-javascript/src/models/operations/events.tsapi/spec/packages/aip-client-javascript/src/models/operations/features.tsapi/spec/packages/aip-client-javascript/src/models/operations/governance.tsapi/spec/packages/aip-client-javascript/src/models/operations/llmCost.tsapi/spec/packages/aip-client-javascript/src/models/operations/meters.tsapi/spec/packages/aip-client-javascript/src/models/operations/planAddons.tsapi/spec/packages/aip-client-javascript/src/models/operations/plans.tsapi/spec/packages/aip-client-javascript/src/models/operations/subscriptions.tsapi/spec/packages/aip-client-javascript/src/models/operations/tax.tsapi/spec/packages/aip-client-javascript/src/models/schemas.tsapi/spec/packages/aip-client-javascript/src/models/types.tsapi/spec/packages/aip-client-javascript/src/sdk/addons.tsapi/spec/packages/aip-client-javascript/src/sdk/apps.tsapi/spec/packages/aip-client-javascript/src/sdk/billing.tsapi/spec/packages/aip-client-javascript/src/sdk/currencies.tsapi/spec/packages/aip-client-javascript/src/sdk/customers.tsapi/spec/packages/aip-client-javascript/src/sdk/defaults.tsapi/spec/packages/aip-client-javascript/src/sdk/entitlements.tsapi/spec/packages/aip-client-javascript/src/sdk/events.tsapi/spec/packages/aip-client-javascript/src/sdk/features.tsapi/spec/packages/aip-client-javascript/src/sdk/governance.tsapi/spec/packages/aip-client-javascript/src/sdk/llmCost.tsapi/spec/packages/aip-client-javascript/src/sdk/meters.tsapi/spec/packages/aip-client-javascript/src/sdk/planAddons.tsapi/spec/packages/aip-client-javascript/src/sdk/plans.tsapi/spec/packages/aip-client-javascript/src/sdk/sdk.tsapi/spec/packages/aip-client-javascript/src/sdk/subscriptions.tsapi/spec/packages/aip-client-javascript/src/sdk/tax.tsapi/spec/packages/aip-client-javascript/tests/client.spec.tsapi/spec/packages/aip-client-javascript/tests/errors.spec.tsapi/spec/packages/aip-client-javascript/tests/meters.spec.tsapi/spec/packages/aip-client-javascript/tests/nesting.spec.tsapi/spec/packages/aip-client-javascript/tests/void-responses.spec.tsapi/spec/packages/aip-client-javascript/tsconfig.jsonapi/spec/packages/aip/package.jsonapi/spec/packages/aip/src/common/error.tspapi/spec/packages/aip/src/common/parameters.tspapi/spec/packages/aip/src/common/properties.tspapi/spec/packages/aip/src/customers/billing.tspapi/spec/packages/aip/src/customers/charges/charges.tspapi/spec/packages/aip/src/customers/charges/operations.tspapi/spec/packages/aip/src/customers/credits/grant.tspapi/spec/packages/aip/src/customers/credits/operations.tspapi/spec/packages/aip/src/customers/operations.tspapi/spec/packages/aip/src/konnect.tspapi/spec/packages/aip/src/meters/operations.tspapi/spec/packages/aip/src/openmeter.tspapi/spec/packages/aip/tspconfig.yamlapi/spec/packages/legacy/src/app/app.tspapi/spec/packages/legacy/src/app/marketplace.tspapi/spec/packages/legacy/src/app/stripe.tspapi/spec/packages/legacy/src/billing/customeroverride.tspapi/spec/packages/legacy/src/billing/invoices.tspapi/spec/packages/legacy/src/billing/profile.tspapi/spec/packages/legacy/src/customer/app.tspapi/spec/packages/legacy/src/customer/customer.tspapi/spec/packages/legacy/src/customer/stripe.tspapi/spec/packages/legacy/src/debug.tspapi/spec/packages/legacy/src/entitlements/customer.tspapi/spec/packages/legacy/src/entitlements/entitlements.tspapi/spec/packages/legacy/src/entitlements/subjects.tspapi/spec/packages/legacy/src/entitlements/v2/customer.tspapi/spec/packages/legacy/src/events.tspapi/spec/packages/legacy/src/meters.tspapi/spec/packages/legacy/src/notification/channel.tspapi/spec/packages/legacy/src/notification/event.tspapi/spec/packages/legacy/src/notification/invoice.tspapi/spec/packages/legacy/src/notification/rule.tspapi/spec/packages/legacy/src/portal.tspapi/spec/packages/legacy/src/productcatalog/routes.tspapi/spec/packages/typespec-typescript/.gitignoreapi/spec/packages/typespec-typescript/package.jsonapi/spec/packages/typespec-typescript/scripts/gen-runtime-templates.mjsapi/spec/packages/typespec-typescript/src/ZodOperations.tsxapi/spec/packages/typespec-typescript/src/components/ZodCustomTypeComponent.tsxapi/spec/packages/typespec-typescript/src/components/ZodOptions.tsxapi/spec/packages/typespec-typescript/src/components/ZodSchema.tsxapi/spec/packages/typespec-typescript/src/components/ZodSchemaDeclaration.tsxapi/spec/packages/typespec-typescript/src/components/index.tsapi/spec/packages/typespec-typescript/src/context/zod-options.tsapi/spec/packages/typespec-typescript/src/emitter.tsxapi/spec/packages/typespec-typescript/src/external-packages/zod.tsapi/spec/packages/typespec-typescript/src/index.tsapi/spec/packages/typespec-typescript/src/input-variants.tsapi/spec/packages/typespec-typescript/src/interface-types.tsapi/spec/packages/typespec-typescript/src/lib.tsapi/spec/packages/typespec-typescript/src/readme.tsapi/spec/packages/typespec-typescript/src/request-types.tsapi/spec/packages/typespec-typescript/src/runtime-templates.tsapi/spec/packages/typespec-typescript/src/sdk-files.tsapi/spec/packages/typespec-typescript/src/sdk-operations.tsapi/spec/packages/typespec-typescript/src/strip-prefixes.tsapi/spec/packages/typespec-typescript/src/ts-types.tsapi/spec/packages/typespec-typescript/src/utils.tsxapi/spec/packages/typespec-typescript/src/zodBaseSchema.tsxapi/spec/packages/typespec-typescript/src/zodConstraintsParts.tsxapi/spec/packages/typespec-typescript/src/zodDescriptionParts.tsxapi/spec/packages/typespec-typescript/src/zodMemberParts.tsxapi/spec/packages/typespec-typescript/tsconfig.jsonapi/spec/pnpm-workspace.yaml
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@api/spec/packages/aip-client-javascript/README.md`:
- Line 169: The table entry for client.subscriptions.change (POST
/openmeter/subscriptions/{subscriptionId}/change) contains a sentence fragment
"Can be used for upgrades, downgrades, and plan changes."; update the
description to a complete sentence (e.g. "This endpoint can be used for
upgrades, downgrades, and plan changes.") so the table reads grammatically
correct and conveys a clear subject.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6abbaa32-c43c-4d7d-a9df-20ec3b146fe3
📒 Files selected for processing (43)
api/spec/packages/aip-client-javascript/README.mdapi/spec/packages/aip-client-javascript/src/funcs/addons.tsapi/spec/packages/aip-client-javascript/src/funcs/apps.tsapi/spec/packages/aip-client-javascript/src/funcs/billing.tsapi/spec/packages/aip-client-javascript/src/funcs/currencies.tsapi/spec/packages/aip-client-javascript/src/funcs/customers.tsapi/spec/packages/aip-client-javascript/src/funcs/entitlements.tsapi/spec/packages/aip-client-javascript/src/funcs/features.tsapi/spec/packages/aip-client-javascript/src/funcs/governance.tsapi/spec/packages/aip-client-javascript/src/funcs/llmCost.tsapi/spec/packages/aip-client-javascript/src/funcs/meters.tsapi/spec/packages/aip-client-javascript/src/funcs/planAddons.tsapi/spec/packages/aip-client-javascript/src/funcs/plans.tsapi/spec/packages/aip-client-javascript/src/funcs/subscriptions.tsapi/spec/packages/aip-client-javascript/src/funcs/tax.tsapi/spec/packages/aip-client-javascript/src/lib/config.tsapi/spec/packages/aip-client-javascript/src/models/operations/addons.tsapi/spec/packages/aip-client-javascript/src/models/operations/billing.tsapi/spec/packages/aip-client-javascript/src/models/operations/currencies.tsapi/spec/packages/aip-client-javascript/src/models/operations/customers.tsapi/spec/packages/aip-client-javascript/src/models/operations/defaults.tsapi/spec/packages/aip-client-javascript/src/models/operations/entitlements.tsapi/spec/packages/aip-client-javascript/src/models/operations/events.tsapi/spec/packages/aip-client-javascript/src/models/operations/features.tsapi/spec/packages/aip-client-javascript/src/models/operations/governance.tsapi/spec/packages/aip-client-javascript/src/models/operations/llmCost.tsapi/spec/packages/aip-client-javascript/src/models/operations/meters.tsapi/spec/packages/aip-client-javascript/src/models/operations/planAddons.tsapi/spec/packages/aip-client-javascript/src/models/operations/plans.tsapi/spec/packages/aip-client-javascript/src/models/operations/subscriptions.tsapi/spec/packages/aip-client-javascript/src/models/operations/tax.tsapi/spec/packages/aip-client-javascript/src/models/schemas.tsapi/spec/packages/aip-client-javascript/src/models/types.tsapi/spec/packages/aip-client-javascript/src/sdk/apps.tsapi/spec/packages/aip-client-javascript/src/sdk/customers.tsapi/spec/packages/aip-client-javascript/src/sdk/defaults.tsapi/spec/packages/aip-client-javascript/src/sdk/entitlements.tsapi/spec/packages/aip-client-javascript/src/sdk/events.tsapi/spec/packages/aip-client-javascript/src/sdk/governance.tsapi/spec/packages/aip-client-javascript/tests/client.spec.tsapi/spec/packages/aip-client-javascript/tests/errors.spec.tsapi/spec/packages/aip-client-javascript/tests/meters.spec.tsapi/spec/packages/aip-client-javascript/tests/nesting.spec.ts
✅ Files skipped from review due to trivial changes (3)
- api/spec/packages/aip-client-javascript/src/models/operations/tax.ts
- api/spec/packages/aip-client-javascript/src/models/operations/currencies.ts
- api/spec/packages/aip-client-javascript/src/models/operations/plans.ts
🚧 Files skipped from review as they are similar to previous changes (34)
- api/spec/packages/aip-client-javascript/src/sdk/entitlements.ts
- api/spec/packages/aip-client-javascript/tests/nesting.spec.ts
- api/spec/packages/aip-client-javascript/src/sdk/governance.ts
- api/spec/packages/aip-client-javascript/src/funcs/apps.ts
- api/spec/packages/aip-client-javascript/src/sdk/events.ts
- api/spec/packages/aip-client-javascript/src/funcs/governance.ts
- api/spec/packages/aip-client-javascript/src/models/operations/defaults.ts
- api/spec/packages/aip-client-javascript/tests/errors.spec.ts
- api/spec/packages/aip-client-javascript/src/models/operations/llmCost.ts
- api/spec/packages/aip-client-javascript/src/funcs/entitlements.ts
- api/spec/packages/aip-client-javascript/tests/meters.spec.ts
- api/spec/packages/aip-client-javascript/src/models/operations/governance.ts
- api/spec/packages/aip-client-javascript/src/sdk/defaults.ts
- api/spec/packages/aip-client-javascript/src/sdk/apps.ts
- api/spec/packages/aip-client-javascript/src/models/operations/entitlements.ts
- api/spec/packages/aip-client-javascript/src/models/operations/planAddons.ts
- api/spec/packages/aip-client-javascript/src/funcs/tax.ts
- api/spec/packages/aip-client-javascript/src/funcs/llmCost.ts
- api/spec/packages/aip-client-javascript/src/funcs/billing.ts
- api/spec/packages/aip-client-javascript/src/models/operations/features.ts
- api/spec/packages/aip-client-javascript/src/models/operations/billing.ts
- api/spec/packages/aip-client-javascript/src/models/operations/subscriptions.ts
- api/spec/packages/aip-client-javascript/src/lib/config.ts
- api/spec/packages/aip-client-javascript/src/funcs/subscriptions.ts
- api/spec/packages/aip-client-javascript/src/models/operations/customers.ts
- api/spec/packages/aip-client-javascript/src/funcs/currencies.ts
- api/spec/packages/aip-client-javascript/src/models/operations/meters.ts
- api/spec/packages/aip-client-javascript/src/funcs/features.ts
- api/spec/packages/aip-client-javascript/src/funcs/plans.ts
- api/spec/packages/aip-client-javascript/src/models/operations/events.ts
- api/spec/packages/aip-client-javascript/src/funcs/meters.ts
- api/spec/packages/aip-client-javascript/src/funcs/customers.ts
- api/spec/packages/aip-client-javascript/src/sdk/customers.ts
- api/spec/packages/aip-client-javascript/src/funcs/addons.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@api/spec/packages/legacy/package.json`:
- Line 29: The package.json currently mixes
`@typespec/prettier-plugin-typespec`@1.12.0 with the rest of the `@typespec/`*
packages pinned at 1.11.0; update the plugin to match the toolchain minor by
changing "`@typespec/prettier-plugin-typespec`" to "1.11.0" in package.json (or
alternatively bump all `@typespec/`* packages to 1.12.0 if you intend to upgrade
the toolchain), then reinstall/update your lockfile (npm/yarn/pnpm) to ensure
the lockfile reflects the consistent versions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1f9d641a-55ee-4371-ad51-8b976ca29794
⛔ Files ignored due to path filters (1)
api/spec/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (18)
api/spec/packages/aip/package.jsonapi/spec/packages/aip/src/apps/operations.tspapi/spec/packages/aip/src/billing/operations.tspapi/spec/packages/aip/src/currencies/cost-bases/operations.tspapi/spec/packages/aip/src/currencies/operations.tspapi/spec/packages/aip/src/customers/charges/operations.tspapi/spec/packages/aip/src/customers/credits/operations.tspapi/spec/packages/aip/src/customers/operations.tspapi/spec/packages/aip/src/defaults/operations.tspapi/spec/packages/aip/src/entitlements/operations.tspapi/spec/packages/aip/src/features/operations.tspapi/spec/packages/aip/src/governance/operations.tspapi/spec/packages/aip/src/llmcost/operations.tspapi/spec/packages/aip/src/meters/operations.tspapi/spec/packages/aip/src/productcatalog/operations.tspapi/spec/packages/aip/src/subscriptions/operations.tspapi/spec/packages/aip/src/tax/operations.tspapi/spec/packages/legacy/package.json
✅ Files skipped from review due to trivial changes (11)
- api/spec/packages/aip/src/currencies/cost-bases/operations.tsp
- api/spec/packages/aip/src/entitlements/operations.tsp
- api/spec/packages/aip/src/governance/operations.tsp
- api/spec/packages/aip/src/defaults/operations.tsp
- api/spec/packages/aip/src/features/operations.tsp
- api/spec/packages/aip/src/tax/operations.tsp
- api/spec/packages/aip/src/billing/operations.tsp
- api/spec/packages/aip/src/llmcost/operations.tsp
- api/spec/packages/aip/src/apps/operations.tsp
- api/spec/packages/aip/src/subscriptions/operations.tsp
- api/spec/packages/aip/src/productcatalog/operations.tsp
🚧 Files skipped from review as they are similar to previous changes (4)
- api/spec/packages/aip/src/customers/charges/operations.tsp
- api/spec/packages/aip/package.json
- api/spec/packages/aip/src/meters/operations.tsp
- api/spec/packages/aip/src/customers/credits/operations.tsp
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
api/spec/Makefile (1)
40-40:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse a portable timestamp command on Line 40
date --rfc-3339=secondsis GNU-specific and can fail on macOS/BSD shells, which breaksmake publish-aip-sdkbefore publish runs.Suggested fix
- CACHE_BUSTER="$$(date --rfc-3339=seconds)" pnpm publish --no-git-checks --access public --tag "$${AIP_SDK_RELEASE_TAG}" + CACHE_BUSTER="$$(date -u +"%Y-%m-%dT%H:%M:%SZ")" pnpm publish --no-git-checks --access public --tag "$${AIP_SDK_RELEASE_TAG}"Based on learnings: "Use the Makefile for all common development tasks (running tests, generating code, linting, building, etc.)".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@api/spec/Makefile` at line 40, The current CACHE_BUSTER assignment uses the GNU-only `date --rfc-3339=seconds` which fails on macOS/BSD; update the Makefile line that sets CACHE_BUSTER (used by the publish-aip-sdk target that runs `pnpm publish`) to use a portable timestamp command instead, e.g., use POSIX-compatible `date -u` with a format string (so CACHE_BUSTER is set via `date -u +...`) or fall back to a short portable generator (Python/Node) so the `pnpm publish --tag ${AIP_SDK_RELEASE_TAG}` invocation works cross-platform.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@api/spec/Makefile`:
- Line 40: The current CACHE_BUSTER assignment uses the GNU-only `date
--rfc-3339=seconds` which fails on macOS/BSD; update the Makefile line that sets
CACHE_BUSTER (used by the publish-aip-sdk target that runs `pnpm publish`) to
use a portable timestamp command instead, e.g., use POSIX-compatible `date -u`
with a format string (so CACHE_BUSTER is set via `date -u +...`) or fall back to
a short portable generator (Python/Node) so the `pnpm publish --tag
${AIP_SDK_RELEASE_TAG}` invocation works cross-platform.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 896c8349-306b-41dd-a496-fbd68d68b65d
⛔ Files ignored due to path filters (1)
api/spec/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
api/spec/Makefileapi/spec/package.jsonapi/spec/packages/typespec-typescript/src/readme.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- api/spec/package.json
- api/spec/packages/typespec-typescript/src/readme.ts
Summary by CodeRabbit
@openmeter/client) with class-based facades and standalone function surface for meters, events, customers, subscriptions, billing, tax, features, plans, addons, LLM cost, entitlements, governance.