Skip to content

Commit 3bb2afd

Browse files
committed
refactor(api): update list methods to accept optional projectId parameter
- Modified the listConfigurations, listTemplates, and listTags methods in TestPlanItClient to accept an optional _projectId parameter instead of a required projectId. This change enhances flexibility in method usage and aligns with TypeScript best practices.
1 parent 7f11099 commit 3bb2afd

7 files changed

Lines changed: 17 additions & 17 deletions

File tree

packages/api/dist/index.d.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ declare class TestPlanItClient {
797797
/**
798798
* List all configurations
799799
*/
800-
listConfigurations(projectId: number): Promise<Configuration[]>;
800+
listConfigurations(_projectId?: number): Promise<Configuration[]>;
801801
/**
802802
* Find a configuration by name using CLI lookup
803803
*/
@@ -846,7 +846,7 @@ declare class TestPlanItClient {
846846
* List all templates accessible to the user
847847
* ZenStack access control handles permission filtering automatically
848848
*/
849-
listTemplates(projectId: number): Promise<Template[]>;
849+
listTemplates(_projectId?: number): Promise<Template[]>;
850850
/**
851851
* Find a template by name (case-insensitive)
852852
* Logs available templates if template not found for debugging
@@ -855,7 +855,7 @@ declare class TestPlanItClient {
855855
/**
856856
* List all tags
857857
*/
858-
listTags(projectId: number): Promise<Tag[]>;
858+
listTags(_projectId?: number): Promise<Tag[]>;
859859
/**
860860
* Create a new tag
861861
*/

packages/api/dist/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ declare class TestPlanItClient {
797797
/**
798798
* List all configurations
799799
*/
800-
listConfigurations(projectId: number): Promise<Configuration[]>;
800+
listConfigurations(_projectId?: number): Promise<Configuration[]>;
801801
/**
802802
* Find a configuration by name using CLI lookup
803803
*/
@@ -846,7 +846,7 @@ declare class TestPlanItClient {
846846
* List all templates accessible to the user
847847
* ZenStack access control handles permission filtering automatically
848848
*/
849-
listTemplates(projectId: number): Promise<Template[]>;
849+
listTemplates(_projectId?: number): Promise<Template[]>;
850850
/**
851851
* Find a template by name (case-insensitive)
852852
* Logs available templates if template not found for debugging
@@ -855,7 +855,7 @@ declare class TestPlanItClient {
855855
/**
856856
* List all tags
857857
*/
858-
listTags(projectId: number): Promise<Tag[]>;
858+
listTags(_projectId?: number): Promise<Tag[]>;
859859
/**
860860
* Create a new tag
861861
*/

packages/api/dist/index.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/api/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/api/dist/index.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ var TestPlanItClient = class {
496496
/**
497497
* List all configurations
498498
*/
499-
async listConfigurations(projectId) {
499+
async listConfigurations(_projectId) {
500500
return this.zenstack("configurations", "findMany", {
501501
where: {
502502
isDeleted: false,
@@ -728,7 +728,7 @@ var TestPlanItClient = class {
728728
* List all templates accessible to the user
729729
* ZenStack access control handles permission filtering automatically
730730
*/
731-
async listTemplates(projectId) {
731+
async listTemplates(_projectId) {
732732
return this.zenstack("templates", "findMany", {
733733
where: {
734734
isDeleted: false,
@@ -768,7 +768,7 @@ var TestPlanItClient = class {
768768
/**
769769
* List all tags
770770
*/
771-
async listTags(projectId) {
771+
async listTags(_projectId) {
772772
return this.zenstack("tags", "findMany", {
773773
where: {
774774
isDeleted: false

packages/api/dist/index.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/api/src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ export class TestPlanItClient {
752752
/**
753753
* List all configurations
754754
*/
755-
async listConfigurations(projectId: number): Promise<Configuration[]> {
755+
async listConfigurations(_projectId?: number): Promise<Configuration[]> {
756756
return this.zenstack<Configuration[]>("configurations", "findMany", {
757757
where: {
758758
isDeleted: false,
@@ -1038,7 +1038,7 @@ export class TestPlanItClient {
10381038
* List all templates accessible to the user
10391039
* ZenStack access control handles permission filtering automatically
10401040
*/
1041-
async listTemplates(projectId: number): Promise<Template[]> {
1041+
async listTemplates(_projectId?: number): Promise<Template[]> {
10421042
return this.zenstack<Template[]>("templates", "findMany", {
10431043
where: {
10441044
isDeleted: false,
@@ -1088,7 +1088,7 @@ export class TestPlanItClient {
10881088
/**
10891089
* List all tags
10901090
*/
1091-
async listTags(projectId: number): Promise<Tag[]> {
1091+
async listTags(_projectId?: number): Promise<Tag[]> {
10921092
return this.zenstack<Tag[]>("tags", "findMany", {
10931093
where: {
10941094
isDeleted: false,

0 commit comments

Comments
 (0)