Skip to content

Commit

Permalink
Merge pull request #1182 from lucduong/master
Browse files Browse the repository at this point in the history
chore(types): add service list options & define getActionList type
  • Loading branch information
icebob authored Feb 5, 2023
2 parents 16dbe71 + 586e7a1 commit bb038ab
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,15 @@ declare namespace Moleculer {
withEndpoints?: boolean;
}

interface ServiceListCatalogOptions {
onlyLocal?: boolean;
onlyAvailable?: boolean;
skipInternal?: boolean;
withActions?: boolean;
withEvents?: boolean;
grouping?: boolean;
}

class ServiceRegistry {
broker: ServiceBroker;
metrics: MetricRegistry;
Expand All @@ -1734,7 +1743,8 @@ declare namespace Moleculer {
actions: any;
events: any;

getServiceList(opts?: ActionCatalogListOptions): ServiceSchema[];
getServiceList<S = ServiceSettingSchema>(opts?: ServiceListCatalogOptions): ServiceSchema<S>[];
getActionList(opts?: ActionCatalogListOptions): ActionSchema[];
}

class AsyncStorage {
Expand Down

0 comments on commit bb038ab

Please sign in to comment.