@highlightxyz/sdk 0.1.1 → 0.3.0

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/lib/client.d.ts CHANGED
@@ -4,6 +4,13 @@ import { HighlightClient } from "./v1/gen/sdk.gen.js";
4
4
  export { createClient, HighlightClient };
5
5
  export type { Client };
6
6
  export type HighlightClientConfig = Config & {
7
+ /**
8
+ * Highlight API key sent as a bearer token.
9
+ *
10
+ * This is a convenience alias for configuring `auth` and `security`
11
+ * explicitly. `auth` takes precedence when both are provided.
12
+ */
13
+ apiKey?: string;
7
14
  security?: ReadonlyArray<Auth>;
8
15
  };
9
16
  export declare function createHighlightClient(config?: HighlightClientConfig): HighlightClient;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,KAAK,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AACzC,YAAY,EAAE,MAAM,EAAE,CAAC;AAEvB,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG;IAC3C,QAAQ,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;CAChC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,MAAM,CAAC,EAAE,qBAAqB,mBAGnE"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,KAAK,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AACzC,YAAY,EAAE,MAAM,EAAE,CAAC;AAEvB,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG;IAC3C;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;CAChC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,MAAM,CAAC,EAAE,qBAAqB,mBAYnE"}
package/lib/client.js CHANGED
@@ -3,6 +3,14 @@ import { createClient } from "./v1/gen/client";
3
3
  import { HighlightClient } from "./v1/gen/sdk.gen.js";
4
4
  export { createClient, HighlightClient };
5
5
  export function createHighlightClient(config) {
6
- const client = createClient(config);
6
+ const resolvedConfig = {
7
+ ...config,
8
+ auth: config?.auth ?? config?.apiKey,
9
+ security: config?.security ??
10
+ (config?.auth || config?.apiKey
11
+ ? [{ type: "http", scheme: "bearer" }]
12
+ : undefined),
13
+ };
14
+ const client = createClient(resolvedConfig);
7
15
  return new HighlightClient({ client });
8
16
  }
package/lib/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./client";
2
+ export * from "./v1/media.js";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
package/lib/index.js CHANGED
@@ -1 +1,2 @@
1
1
  export * from "./client";
2
+ export * from "./v1/media.js";