@clxmedia/credstore-client 1.0.15 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -80,9 +80,7 @@ export declare class CredStoreClient {
80
80
  private httpService;
81
81
  constructor(config: CredStoreConfig);
82
82
  buildHeaders(guidSecret?: string, skipCache?: boolean): {
83
- 'x-credstore-skip-cache': string;
84
- 'x-credstore-secret': string;
85
- 'x-credstore-admin-key': string;
83
+ [x: string]: string;
86
84
  };
87
85
  fetchCredential(guid: string, fetchOptions?: FetchOptions): Promise<CredStoreBundle>;
88
86
  createCredential(provider: CredentialProvider, credData: EntrataCredential | RealPageCredential | YardiCredential | GenericCredential | MailJetCredential): Promise<any>;
package/dist/client.js CHANGED
@@ -28,11 +28,16 @@ class CredStoreClient {
28
28
  this.apiKey = config.api_key;
29
29
  }
30
30
  buildHeaders(guidSecret, skipCache) {
31
- return {
32
- 'x-credstore-skip-cache': `${skipCache}`,
33
- 'x-credstore-secret': guidSecret,
34
- 'x-credstore-admin-key': this.apiKey
31
+ const headers = {
32
+ 'x-credstore-skip-cache': `${skipCache}`
35
33
  };
34
+ if (this.apiKey) {
35
+ headers['x-credstore-admin-key'] = this.apiKey;
36
+ }
37
+ if (guidSecret) {
38
+ headers['x-credstore-secret'] = guidSecret;
39
+ }
40
+ return headers;
36
41
  }
37
42
  fetchCredential(guid, fetchOptions) {
38
43
  return __awaiter(this, void 0, void 0, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/credstore-client",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "CLXperience CredStore Client",
5
5
  "author": "Brandon Thompson <brandont@clxmedia.com>",
6
6
  "license": "MIT",