@reactionary/provider-algolia 0.0.48 → 0.0.52

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.
@@ -1,7 +1,7 @@
1
1
  import { ProductSchema } from "@reactionary/core";
2
- import { AlgoliaProductProvider } from "../providers/product.provider";
3
- import { AlgoliaSearchProvider } from "../providers/search.provider";
4
- import { AlgoliaSearchResultSchema } from "../schema/search.schema";
2
+ import { AlgoliaProductProvider } from "../providers/product.provider.js";
3
+ import { AlgoliaSearchProvider } from "../providers/search.provider.js";
4
+ import { AlgoliaSearchResultSchema } from "../schema/search.schema.js";
5
5
  function withAlgoliaCapabilities(configuration, capabilities) {
6
6
  return (cache) => {
7
7
  const client = {};
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export * from "./core/initialize";
2
- export * from "./providers/product.provider";
3
- export * from "./providers/search.provider";
4
- export * from "./schema/configuration.schema";
5
- export * from "./schema/capabilities.schema";
1
+ export * from "./core/initialize.js";
2
+ export * from "./providers/product.provider.js";
3
+ export * from "./providers/search.provider.js";
4
+ export * from "./schema/configuration.schema.js";
5
+ export * from "./schema/capabilities.schema.js";
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@reactionary/provider-algolia",
3
- "version": "0.0.48",
3
+ "version": "0.0.52",
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "dependencies": {
7
- "@reactionary/core": "0.0.48",
7
+ "@reactionary/core": "0.0.52",
8
8
  "algoliasearch": "^5.23.4",
9
9
  "zod": "4.1.9"
10
- }
10
+ },
11
+ "type": "module"
11
12
  }
@@ -30,6 +30,9 @@ class AlgoliaProductProvider extends ProductProvider {
30
30
  };
31
31
  return this.assert(result);
32
32
  }
33
+ getBySKU(payload, reqCtx) {
34
+ throw new Error("Method not implemented.");
35
+ }
33
36
  }
34
37
  export {
35
38
  AlgoliaProductProvider
@@ -1,4 +1,4 @@
1
1
  import type { Client, Cache } from "@reactionary/core";
2
- import type { AlgoliaCapabilities } from "../schema/capabilities.schema";
3
- import type { AlgoliaConfiguration } from "../schema/configuration.schema";
2
+ import type { AlgoliaCapabilities } from "../schema/capabilities.schema.js";
3
+ import type { AlgoliaConfiguration } from "../schema/configuration.schema.js";
4
4
  export declare function withAlgoliaCapabilities(configuration: AlgoliaConfiguration, capabilities: AlgoliaCapabilities): (cache: Cache) => Partial<Client>;
package/src/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './core/initialize';
2
- export * from './providers/product.provider';
3
- export * from './providers/search.provider';
4
- export * from './schema/configuration.schema';
5
- export * from './schema/capabilities.schema';
1
+ export * from './core/initialize.js';
2
+ export * from './providers/product.provider.js';
3
+ export * from './providers/search.provider.js';
4
+ export * from './schema/configuration.schema.js';
5
+ export * from './schema/capabilities.schema.js';
@@ -1,10 +1,11 @@
1
- import type { Product, ProductQueryById, ProductQueryBySlug, RequestContext, Cache } from '@reactionary/core';
1
+ import type { Product, ProductQueryById, ProductQueryBySlug, RequestContext, Cache, ProductQueryBySKU } from '@reactionary/core';
2
2
  import { ProductProvider } from '@reactionary/core';
3
3
  import type { z } from 'zod';
4
- import type { AlgoliaConfiguration } from '../schema/configuration.schema';
4
+ import type { AlgoliaConfiguration } from '../schema/configuration.schema.js';
5
5
  export declare class AlgoliaProductProvider<T extends Product = Product> extends ProductProvider<T> {
6
6
  protected config: AlgoliaConfiguration;
7
7
  constructor(config: AlgoliaConfiguration, schema: z.ZodType<T>, cache: Cache);
8
8
  getById(payload: ProductQueryById, _reqCtx: RequestContext): Promise<T>;
9
9
  getBySlug(payload: ProductQueryBySlug, _reqCtx: RequestContext): Promise<T>;
10
+ getBySKU(payload: ProductQueryBySKU, reqCtx: RequestContext): Promise<T>;
10
11
  }
@@ -1,6 +1,6 @@
1
1
  import { type SearchQueryByTerm, type SearchResult, type RequestContext, type Cache, SearchProvider } from '@reactionary/core';
2
2
  import type { z } from 'zod';
3
- import type { AlgoliaConfiguration } from '../schema/configuration.schema';
3
+ import type { AlgoliaConfiguration } from '../schema/configuration.schema.js';
4
4
  export declare class AlgoliaSearchProvider<T extends SearchResult = SearchResult> extends SearchProvider<T> {
5
5
  protected config: AlgoliaConfiguration;
6
6
  constructor(config: AlgoliaConfiguration, schema: z.ZodType<T>, cache: Cache);