Skip to content

Commit c455671

Browse files
committed
add new services
1 parent b0cee88 commit c455671

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ $ saddlebackOpenapi --help
1818
Options:
1919
-V, --version output the version number
2020
-i, --input <value> OpenAPI specification, can be a path, url or string content
21-
-o, --output <value> Output directory
21+
-o, --output <value> Output directory should end with service name workflows | events | notifications | core | journey | giving | smallGroup
2222
-c, --config <value> Path to the config file
2323
-l, --login <value> Login
2424
-p, --password <value> Password
2525
-e, --environment <value> Environment dev | stage | stage2
26-
-s, --service <value> Service 'workflows' | 'event' | 'notifications' | 'core'
26+
-s, --service <value> Service Service Workflows | Events | Notifications | Core | Journey | Giving | SmallGroup
2727
-h, --help display help for command
2828
-m, --filterMethod Filter method include(default) | exclude')
2929
-f, --filterArray Filter array

bin/saddleback.cli.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ const params = program
1616
.option('-l, --login <value>', 'Login')
1717
.option('-p, --password <value>', 'Password')
1818
.option('-e, --environment <value>', 'Environment dev | stage | stage2')
19-
.option('-s, --service <value>', 'Service ')
19+
.option(
20+
'-s, --service <value>',
21+
'Service Workflows | Events | Notifications | Core | Journey | Giving | SmallGroup'
22+
)
2023
.option('-m, --filterMethod <value>', 'Filter method include(default) | exclude')
2124
.option('-f, --filterArray <value>', 'Filter array')
2225
.parse(process.argv)

src/utils/saddleback/getUrlByServiceEnv.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
export enum Service {
2-
Workflows = 'workflows',
3-
Event = 'event',
4-
Notifications = 'notifications',
5-
Core = 'core',
2+
Workflows = 'Workflows',
3+
Events = 'Events',
4+
Notifications = 'Notifications',
5+
Core = 'Core',
6+
Journey = 'Journey',
7+
Giving = 'Giving',
8+
SmallGroup = 'SmallGroup',
69
}
710

811
export enum Environment {
@@ -20,7 +23,13 @@ export const getUrlByServiceEnv = ({ env, service }: { service: Service; env: En
2023
return `https://hc-notificationservice-${env}.azurewebsites.net/api-doc/v1/swagger.json`;
2124
case Service.Workflows:
2225
return `https://hc-workflowsservice-${env}.azurewebsites.net/api-doc/v1/swagger.json`;
23-
case Service.Event:
26+
case Service.Events:
2427
return `https://hc-eventservice-${env}.azurewebsites.net/api-doc/all/swagger.json`;
28+
case Service.Journey:
29+
return `https://hc-journeyservice-${env}.azurewebsites.net/api-doc/v1/swagger.json`;
30+
case Service.Giving:
31+
return `https://hc-givingservice-${env}.azurewebsites.net/api-doc/v1/swagger.json`;
32+
case Service.SmallGroup:
33+
return `https://hc-smallgroupservice-${env}.azurewebsites.net/api-doc/v1/swagger.json`;
2534
}
2635
};

types/index.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Service } from '../src/client/interfaces/Service';
2-
import { Environment } from '../src/utils/saddleback/getUrlByServiceEnv';
1+
import { Environment, Service } from '../src/utils/saddleback/getUrlByServiceEnv';
32

43
export declare enum HttpClient {
54
FETCH = 'fetch',
@@ -44,7 +43,7 @@ export type CustomConfig = Options & {
4443
useAutoNotificationService?: boolean;
4544
useAutoWorkflowsService?: boolean;
4645
useEnvironment?: Environment | 'dev' | 'stage' | 'stage2' | 'feature';
47-
useService?: Service | 'workflows' | 'event' | 'notifications' | 'core';
46+
useService?: Service | 'Workflows' | 'Events' | 'Notifications' | 'Core' | 'Journey' | 'Giving' | 'SmallGroup';
4847
filterMethod: 'include' | 'exclude';
4948
filterArray: string[];
5049
};

0 commit comments

Comments
 (0)