@zyphr-dev/node-sdk 0.1.10 → 0.1.12

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/index.d.cts CHANGED
@@ -22469,6 +22469,10 @@ interface ZyphrOptions {
22469
22469
  apiKey: string;
22470
22470
  /** Override the base API URL (defaults to https://api.zyphr.dev/v1) */
22471
22471
  baseUrl?: string;
22472
+ /** Application public key (za_pub_*) for Auth-as-a-Service endpoints */
22473
+ applicationKey?: string;
22474
+ /** Application secret key (za_sec_*) for Auth-as-a-Service endpoints */
22475
+ applicationSecret?: string;
22472
22476
  }
22473
22477
  declare class Zyphr {
22474
22478
  readonly emails: EmailsApi;
package/dist/index.d.ts CHANGED
@@ -22469,6 +22469,10 @@ interface ZyphrOptions {
22469
22469
  apiKey: string;
22470
22470
  /** Override the base API URL (defaults to https://api.zyphr.dev/v1) */
22471
22471
  baseUrl?: string;
22472
+ /** Application public key (za_pub_*) for Auth-as-a-Service endpoints */
22473
+ applicationKey?: string;
22474
+ /** Application secret key (za_sec_*) for Auth-as-a-Service endpoints */
22475
+ applicationSecret?: string;
22472
22476
  }
22473
22477
  declare class Zyphr {
22474
22478
  readonly emails: EmailsApi;
package/dist/index.js CHANGED
@@ -17881,7 +17881,11 @@ var Zyphr = class {
17881
17881
  constructor(options) {
17882
17882
  const config = new Configuration({
17883
17883
  basePath: options.baseUrl,
17884
- apiKey: () => options.apiKey,
17884
+ apiKey: (name) => {
17885
+ if (name === "X-Application-Key" && options.applicationKey) return options.applicationKey;
17886
+ if (name === "X-Application-Secret" && options.applicationSecret) return options.applicationSecret;
17887
+ return options.apiKey;
17888
+ },
17885
17889
  middleware: [errorMiddleware]
17886
17890
  });
17887
17891
  this.emails = new EmailsApi(config);