Skip to content

Commit a4c1dd8

Browse files
committed
update docs
1 parent 9ebc6be commit a4c1dd8

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

docs/guide/extending.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,29 +151,28 @@ export default hook;
151151
// src/sources/my-custom-source.ts
152152
import type {
153153
ConfigSource,
154-
NormalizedConfig,
154+
ConfigLoadResult,
155155
ResolveConfigOptions
156156
} from '@salesforce/b2c-tooling-sdk/config';
157157

158158
export class MyCustomSource implements ConfigSource {
159159
readonly name = 'my-custom-source';
160160

161-
load(options: ResolveConfigOptions): NormalizedConfig | undefined {
161+
load(options: ResolveConfigOptions): ConfigLoadResult | undefined {
162162
// Load config from your custom source
163163
// Return undefined if source is not available
164164

165165
return {
166-
hostname: 'example.sandbox.us03.dx.commercecloud.salesforce.com',
167-
clientId: 'your-client-id',
168-
clientSecret: 'your-client-secret',
169-
codeVersion: 'version1',
166+
config: {
167+
hostname: 'example.sandbox.us03.dx.commercecloud.salesforce.com',
168+
clientId: 'your-client-id',
169+
clientSecret: 'your-client-secret',
170+
codeVersion: 'version1',
171+
},
172+
// Location is used for diagnostics - can be a file path, keychain entry, URL, etc.
173+
location: '/path/to/config/source',
170174
};
171175
}
172-
173-
// Optional: return path for diagnostics
174-
getPath(): string | undefined {
175-
return '/path/to/config/source';
176-
}
177176
}
178177
```
179178

0 commit comments

Comments
 (0)