Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lehh committed May 29, 2022
1 parent 475a8bb commit 8ba1b3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export class ExampleSoapConfigService implements SoapModuleOptionsFactory {
return {
uri: configService.get<string>('soap.uri'),
auth: {
type: 'basic',
username: configService.get<string>('soap.username'),
password: configService.get<string>('soap.password'),
},
Expand Down Expand Up @@ -139,9 +140,9 @@ Note: for the `useExisting` provider you need to import the module containing th

`uri`: The SOAP service uri.

`auth`: Basic authentication filling in the `username` and `password` fields when needed.
`auth` (optional): Basic or WSSecurity authentication. Fields `type` (basic or wssecurity), `username` and `password` are required. For the WSSecurity `options` field, refer to [soap-repository](https://www.npmjs.com/package/soap#wssecurity)

`clientOptions`: The soap client options as in [soap repository](https://www.npmjs.com/package/soap#options).
`clientOptions` (optional): The soap client options as in [soap repository](https://www.npmjs.com/package/soap#options).

### SoapModuleAsyncOptions
`clientName`: The unique client name for class injection.
Expand Down
4 changes: 3 additions & 1 deletion docs/upgrading-to-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
- `registerAsync` is now used to register async providers like: useFactory, useExisting or useClass.
- Property `name` was renamed to `clientName` in `SoapModuleOptions` and `SoapModuleAsyncOptions` interfaces;
- Defined `SoapModuleOptionsFactoryType` for `createSoapModuleOptions` and `useFactory` functions return types.
- Auth has now two types `basic` and `wssecurity`

### So, what you need to do is basically:
- ***Create an import for each client;***
- ***Use `register` instead of `registerAsync`;***
- ***Use `clientName` instead of `name`;***
- ***Use `SoapModuleOptionsFactoryType` instead of `SoapModuleOptions` on the return type of the `createSoapModuleOptions`/`useFactory` function.***
- ***Use `SoapModuleOptionsFactoryType` instead of `SoapModuleOptions` on the return type of the `createSoapModuleOptions`/`useFactory` function.***
- ***Add the property `type` to the auth configuration object***

0 comments on commit 8ba1b3d

Please sign in to comment.