ropegeo-common 1.2.3 → 1.2.5

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.
Files changed (47) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +8 -6
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +13 -7
  5. package/dist/types/api/getRopewikiRegionImages/ropewikiRegionImagesParams.d.ts +1 -1
  6. package/dist/types/api/getRopewikiRegionImages/ropewikiRegionImagesParams.d.ts.map +1 -1
  7. package/dist/types/api/getRopewikiRegionImages/ropewikiRegionImagesParams.js +1 -1
  8. package/dist/types/api/getRopewikiRegionImages/ropewikiRegionImagesResult.d.ts +1 -1
  9. package/dist/types/api/getRopewikiRegionImages/ropewikiRegionImagesResult.d.ts.map +1 -1
  10. package/dist/types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsParams.d.ts +1 -1
  11. package/dist/types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsParams.d.ts.map +1 -1
  12. package/dist/types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsParams.js +1 -1
  13. package/dist/types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsResult.d.ts +4 -5
  14. package/dist/types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsResult.d.ts.map +1 -1
  15. package/dist/types/api/search/searchParams.d.ts +1 -1
  16. package/dist/types/api/search/searchParams.d.ts.map +1 -1
  17. package/dist/types/api/search/searchParams.js +1 -1
  18. package/dist/types/api/search/searchResults.d.ts +4 -5
  19. package/dist/types/api/search/searchResults.d.ts.map +1 -1
  20. package/dist/types/cursors/cursor.d.ts +26 -0
  21. package/dist/types/cursors/cursor.d.ts.map +1 -0
  22. package/dist/types/cursors/cursor.js +56 -0
  23. package/dist/types/{api/getRopewikiRegionImages → cursors}/regionImagesCursor.d.ts +4 -2
  24. package/dist/types/cursors/regionImagesCursor.d.ts.map +1 -0
  25. package/dist/types/{api/getRopewikiRegionImages → cursors}/regionImagesCursor.js +9 -28
  26. package/dist/types/{api/getRopewikiRegionPreviews → cursors}/regionPreviewsCursor.d.ts +4 -2
  27. package/dist/types/cursors/regionPreviewsCursor.d.ts.map +1 -0
  28. package/dist/types/{api/getRopewikiRegionPreviews → cursors}/regionPreviewsCursor.js +9 -28
  29. package/dist/types/{api/search → cursors}/searchCursor.d.ts +4 -2
  30. package/dist/types/cursors/searchCursor.d.ts.map +1 -0
  31. package/dist/types/{api/search → cursors}/searchCursor.js +9 -24
  32. package/dist/types/{api/getRoutePreview → previews}/pagePreview.d.ts +6 -5
  33. package/dist/types/previews/pagePreview.d.ts.map +1 -0
  34. package/dist/types/{api/getRoutePreview → previews}/pagePreview.js +7 -5
  35. package/dist/types/previews/preview.d.ts +17 -0
  36. package/dist/types/previews/preview.d.ts.map +1 -0
  37. package/dist/types/previews/preview.js +22 -0
  38. package/dist/types/previews/regionPreview.d.ts +14 -0
  39. package/dist/types/previews/regionPreview.d.ts.map +1 -0
  40. package/dist/types/{api/search → previews}/regionPreview.js +6 -4
  41. package/package.json +1 -1
  42. package/dist/types/api/getRopewikiRegionImages/regionImagesCursor.d.ts.map +0 -1
  43. package/dist/types/api/getRopewikiRegionPreviews/regionPreviewsCursor.d.ts.map +0 -1
  44. package/dist/types/api/getRoutePreview/pagePreview.d.ts.map +0 -1
  45. package/dist/types/api/search/regionPreview.d.ts +0 -13
  46. package/dist/types/api/search/regionPreview.d.ts.map +0 -1
  47. package/dist/types/api/search/searchCursor.d.ts.map +0 -1
package/README.md CHANGED
@@ -8,7 +8,7 @@ Shared types and utilities for [RopeGeo](https://github.com/yurst3/RopeGeo) and
8
8
  - **Page data source** – `PageDataSource` enum (e.g. Ropewiki) used when linking routes to pages.
9
9
  - **Ropewiki page view types** – `RopewikiPageView`, `RopewikiBetaSectionView`, and `RopewikiImageView` for the getRopewikiPageView API (full Ropewiki page with beta sections and images).
10
10
  - **Routes (GET /routes)** – `Route`, `RouteType`, `RouteGeoJsonFeature`, and `RoutesGeojson` for the routes GeoJSON Feature Collection API. `RoutesGeojson.fromRoutes(routes)` builds the response shape from an array of `Route`.
11
- - **Search API types** – `SearchResults` (paginated search response with `results: (PagePreview | RegionPreview)[]` and `nextCursor: string`), `RegionPreview` (region search hit with id, name, parents, imageUrl, source), and `PagePreview` (page search hit; same type as route preview).
11
+ - **Search API types** – `SearchResults` (paginated search response with `results: Preview[]` and `nextCursor: string`), `RegionPreview` (region search hit with id, name, parents, imageUrl, source), and `PagePreview` (page search hit; same type as route preview).
12
12
 
13
13
  ## Usage
14
14
 
package/dist/index.d.ts CHANGED
@@ -1,25 +1,27 @@
1
1
  export { PageDataSource } from './types/pageDataSource';
2
2
  export { Difficulty, DifficultyRisk, DifficultyTechnical, DifficultyTime, DifficultyWater } from './types/difficulty';
3
3
  export { PermitStatus } from './types/permitStatus';
4
- export { GetRopewikiPagePreviewRow, PagePreview } from './types/api/getRoutePreview/pagePreview';
4
+ export { Preview, PreviewType } from './types/previews/preview';
5
+ export { GetRopewikiPagePreviewRow, PagePreview } from './types/previews/pagePreview';
6
+ export { RegionPreview } from './types/previews/regionPreview';
5
7
  export { Route, RouteGeoJsonFeature, RouteType } from './types/route';
6
8
  export { RoutesGeojson } from './types/api/getRoutes/routeGeojson';
7
9
  export { RoutesParams } from './types/api/getRoutes/routesParams';
8
10
  export type { RopewikiImageView } from './types/api/getRopewikiPageView/ropewikiImageView';
9
11
  export type { RopewikiBetaSectionView } from './types/api/getRopewikiPageView/ropewikiBetaSectionView';
10
12
  export type { RopewikiPageView } from './types/api/getRopewikiPageView/ropewikiPageView';
11
- export { RegionPreview } from './types/api/search/regionPreview';
12
- export { SearchCursor } from './types/api/search/searchCursor';
13
- export type { SearchCursorType } from './types/api/search/searchCursor';
13
+ export { Cursor, CursorType } from './types/cursors/cursor';
14
+ export { SearchCursor } from './types/cursors/searchCursor';
15
+ export type { SearchCursorType } from './types/cursors/searchCursor';
14
16
  export { SearchParams } from './types/api/search/searchParams';
15
17
  export type { SearchOrder } from './types/api/search/searchParams';
16
18
  export { SearchResults } from './types/api/search/searchResults';
17
19
  export { RopewikiRegionView } from './types/api/getRopewikiRegionView/ropewikiRegionView';
18
20
  export type { RopewikiRegionViewRow } from './types/api/getRopewikiRegionView/ropewikiRegionView';
19
- export { RegionPreviewsCursor } from './types/api/getRopewikiRegionPreviews/regionPreviewsCursor';
21
+ export { RegionPreviewsCursor } from './types/cursors/regionPreviewsCursor';
20
22
  export { RopewikiRegionPreviewsParams } from './types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsParams';
21
23
  export { RopewikiRegionPreviewsResult } from './types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsResult';
22
- export { RegionImagesCursor } from './types/api/getRopewikiRegionImages/regionImagesCursor';
24
+ export { RegionImagesCursor } from './types/cursors/regionImagesCursor';
23
25
  export { RopewikiRegionImageView } from './types/api/getRopewikiRegionImages/ropewikiRegionImageView';
24
26
  export type { RopewikiRegionImageViewRow } from './types/api/getRopewikiRegionImages/ropewikiRegionImageView';
25
27
  export { RopewikiRegionImagesParams } from './types/api/getRopewikiRegionImages/ropewikiRegionImagesParams';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,YAAY,EAAE,iBA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,YAAY,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAC;AAC9G,OAAO,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAC;AAC5G,OAAO,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RopewikiRegionImagesResult = exports.RopewikiRegionImagesParams = exports.RopewikiRegionImageView = exports.RegionImagesCursor = exports.RopewikiRegionPreviewsResult = exports.RopewikiRegionPreviewsParams = exports.RegionPreviewsCursor = exports.RopewikiRegionView = exports.SearchResults = exports.SearchParams = exports.SearchCursor = exports.RegionPreview = exports.RoutesParams = exports.RoutesGeojson = exports.RouteType = exports.Route = exports.PagePreview = exports.PermitStatus = exports.DifficultyWater = exports.DifficultyTime = exports.DifficultyTechnical = exports.DifficultyRisk = exports.Difficulty = exports.PageDataSource = void 0;
3
+ exports.RopewikiRegionImagesResult = exports.RopewikiRegionImagesParams = exports.RopewikiRegionImageView = exports.RegionImagesCursor = exports.RopewikiRegionPreviewsResult = exports.RopewikiRegionPreviewsParams = exports.RegionPreviewsCursor = exports.RopewikiRegionView = exports.SearchResults = exports.SearchParams = exports.SearchCursor = exports.CursorType = exports.Cursor = exports.RoutesParams = exports.RoutesGeojson = exports.RouteType = exports.Route = exports.RegionPreview = exports.PagePreview = exports.PreviewType = exports.Preview = exports.PermitStatus = exports.DifficultyWater = exports.DifficultyTime = exports.DifficultyTechnical = exports.DifficultyRisk = exports.Difficulty = exports.PageDataSource = void 0;
4
4
  var pageDataSource_1 = require("./types/pageDataSource");
5
5
  Object.defineProperty(exports, "PageDataSource", { enumerable: true, get: function () { return pageDataSource_1.PageDataSource; } });
6
6
  var difficulty_1 = require("./types/difficulty");
@@ -11,8 +11,13 @@ Object.defineProperty(exports, "DifficultyTime", { enumerable: true, get: functi
11
11
  Object.defineProperty(exports, "DifficultyWater", { enumerable: true, get: function () { return difficulty_1.DifficultyWater; } });
12
12
  var permitStatus_1 = require("./types/permitStatus");
13
13
  Object.defineProperty(exports, "PermitStatus", { enumerable: true, get: function () { return permitStatus_1.PermitStatus; } });
14
- var pagePreview_1 = require("./types/api/getRoutePreview/pagePreview");
14
+ var preview_1 = require("./types/previews/preview");
15
+ Object.defineProperty(exports, "Preview", { enumerable: true, get: function () { return preview_1.Preview; } });
16
+ Object.defineProperty(exports, "PreviewType", { enumerable: true, get: function () { return preview_1.PreviewType; } });
17
+ var pagePreview_1 = require("./types/previews/pagePreview");
15
18
  Object.defineProperty(exports, "PagePreview", { enumerable: true, get: function () { return pagePreview_1.PagePreview; } });
19
+ var regionPreview_1 = require("./types/previews/regionPreview");
20
+ Object.defineProperty(exports, "RegionPreview", { enumerable: true, get: function () { return regionPreview_1.RegionPreview; } });
16
21
  var route_1 = require("./types/route");
17
22
  Object.defineProperty(exports, "Route", { enumerable: true, get: function () { return route_1.Route; } });
18
23
  Object.defineProperty(exports, "RouteType", { enumerable: true, get: function () { return route_1.RouteType; } });
@@ -20,9 +25,10 @@ var routeGeojson_1 = require("./types/api/getRoutes/routeGeojson");
20
25
  Object.defineProperty(exports, "RoutesGeojson", { enumerable: true, get: function () { return routeGeojson_1.RoutesGeojson; } });
21
26
  var routesParams_1 = require("./types/api/getRoutes/routesParams");
22
27
  Object.defineProperty(exports, "RoutesParams", { enumerable: true, get: function () { return routesParams_1.RoutesParams; } });
23
- var regionPreview_1 = require("./types/api/search/regionPreview");
24
- Object.defineProperty(exports, "RegionPreview", { enumerable: true, get: function () { return regionPreview_1.RegionPreview; } });
25
- var searchCursor_1 = require("./types/api/search/searchCursor");
28
+ var cursor_1 = require("./types/cursors/cursor");
29
+ Object.defineProperty(exports, "Cursor", { enumerable: true, get: function () { return cursor_1.Cursor; } });
30
+ Object.defineProperty(exports, "CursorType", { enumerable: true, get: function () { return cursor_1.CursorType; } });
31
+ var searchCursor_1 = require("./types/cursors/searchCursor");
26
32
  Object.defineProperty(exports, "SearchCursor", { enumerable: true, get: function () { return searchCursor_1.SearchCursor; } });
27
33
  var searchParams_1 = require("./types/api/search/searchParams");
28
34
  Object.defineProperty(exports, "SearchParams", { enumerable: true, get: function () { return searchParams_1.SearchParams; } });
@@ -30,13 +36,13 @@ var searchResults_1 = require("./types/api/search/searchResults");
30
36
  Object.defineProperty(exports, "SearchResults", { enumerable: true, get: function () { return searchResults_1.SearchResults; } });
31
37
  var ropewikiRegionView_1 = require("./types/api/getRopewikiRegionView/ropewikiRegionView");
32
38
  Object.defineProperty(exports, "RopewikiRegionView", { enumerable: true, get: function () { return ropewikiRegionView_1.RopewikiRegionView; } });
33
- var regionPreviewsCursor_1 = require("./types/api/getRopewikiRegionPreviews/regionPreviewsCursor");
39
+ var regionPreviewsCursor_1 = require("./types/cursors/regionPreviewsCursor");
34
40
  Object.defineProperty(exports, "RegionPreviewsCursor", { enumerable: true, get: function () { return regionPreviewsCursor_1.RegionPreviewsCursor; } });
35
41
  var ropewikiRegionPreviewsParams_1 = require("./types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsParams");
36
42
  Object.defineProperty(exports, "RopewikiRegionPreviewsParams", { enumerable: true, get: function () { return ropewikiRegionPreviewsParams_1.RopewikiRegionPreviewsParams; } });
37
43
  var ropewikiRegionPreviewsResult_1 = require("./types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsResult");
38
44
  Object.defineProperty(exports, "RopewikiRegionPreviewsResult", { enumerable: true, get: function () { return ropewikiRegionPreviewsResult_1.RopewikiRegionPreviewsResult; } });
39
- var regionImagesCursor_1 = require("./types/api/getRopewikiRegionImages/regionImagesCursor");
45
+ var regionImagesCursor_1 = require("./types/cursors/regionImagesCursor");
40
46
  Object.defineProperty(exports, "RegionImagesCursor", { enumerable: true, get: function () { return regionImagesCursor_1.RegionImagesCursor; } });
41
47
  var ropewikiRegionImageView_1 = require("./types/api/getRopewikiRegionImages/ropewikiRegionImageView");
42
48
  Object.defineProperty(exports, "RopewikiRegionImageView", { enumerable: true, get: function () { return ropewikiRegionImageView_1.RopewikiRegionImageView; } });
@@ -1,4 +1,4 @@
1
- import { RegionImagesCursor } from './regionImagesCursor';
1
+ import { RegionImagesCursor } from '../../cursors/regionImagesCursor';
2
2
  /**
3
3
  * Validated params for getRopewikiRegionImages (GET /ropewiki/region/{id}/images).
4
4
  * Cursor is stored decoded (RegionImagesCursor | null).
@@ -1 +1 @@
1
- {"version":3,"file":"ropewikiRegionImagesParams.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRopewikiRegionImages/ropewikiRegionImagesParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI1D;;;;GAIG;AACH,qBAAa,0BAA0B;IACnC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;gBAEtC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IA0BvD;;;OAGG;IACH,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAU7C;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CACxB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,0BAA0B;CAOhC"}
1
+ {"version":3,"file":"ropewikiRegionImagesParams.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRopewikiRegionImages/ropewikiRegionImagesParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAItE;;;;GAIG;AACH,qBAAa,0BAA0B;IACnC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;gBAEtC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IA0BvD;;;OAGG;IACH,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAU7C;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CACxB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,0BAA0B;CAOhC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RopewikiRegionImagesParams = void 0;
4
- const regionImagesCursor_1 = require("./regionImagesCursor");
4
+ const regionImagesCursor_1 = require("../../cursors/regionImagesCursor");
5
5
  const DEFAULT_LIMIT = 20;
6
6
  /**
7
7
  * Validated params for getRopewikiRegionImages (GET /ropewiki/region/{id}/images).
@@ -1,5 +1,5 @@
1
1
  import type { RopewikiRegionImageView } from './ropewikiRegionImageView';
2
- import { RegionImagesCursor } from './regionImagesCursor';
2
+ import { RegionImagesCursor } from '../../cursors/regionImagesCursor';
3
3
  /**
4
4
  * Result of getRopewikiRegionImages (GET /ropewiki/region/{id}/images).
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ropewikiRegionImagesResult.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRopewikiRegionImages/ropewikiRegionImagesResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;GAEG;AACH,qBAAa,0BAA0B;IACnC,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAGtB,OAAO,EAAE,uBAAuB,EAAE,EAClC,UAAU,EAAE,kBAAkB,GAAG,IAAI;CAK5C"}
1
+ {"version":3,"file":"ropewikiRegionImagesResult.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRopewikiRegionImages/ropewikiRegionImagesResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE;;GAEG;AACH,qBAAa,0BAA0B;IACnC,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAGtB,OAAO,EAAE,uBAAuB,EAAE,EAClC,UAAU,EAAE,kBAAkB,GAAG,IAAI;CAK5C"}
@@ -1,4 +1,4 @@
1
- import { RegionPreviewsCursor } from './regionPreviewsCursor';
1
+ import { RegionPreviewsCursor } from '../../cursors/regionPreviewsCursor';
2
2
  /**
3
3
  * Validated params for getRopewikiRegionPreviews (GET /ropewiki/region/{id}/previews).
4
4
  * Cursor is stored decoded (RegionPreviewsCursor | null).
@@ -1 +1 @@
1
- {"version":3,"file":"ropewikiRegionPreviewsParams.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D;;;;GAIG;AACH,qBAAa,4BAA4B;IACrC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAC;gBAExC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IA0BvD;;;OAGG;IACH,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAU7C;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CACxB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,4BAA4B;CAOlC"}
1
+ {"version":3,"file":"ropewikiRegionPreviewsParams.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAI1E;;;;GAIG;AACH,qBAAa,4BAA4B;IACrC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,MAAM,EAAE,oBAAoB,GAAG,IAAI,CAAC;gBAExC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IA0BvD;;;OAGG;IACH,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAU7C;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CACxB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,4BAA4B;CAOlC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RopewikiRegionPreviewsParams = void 0;
4
- const regionPreviewsCursor_1 = require("./regionPreviewsCursor");
4
+ const regionPreviewsCursor_1 = require("../../cursors/regionPreviewsCursor");
5
5
  const DEFAULT_LIMIT = 20;
6
6
  /**
7
7
  * Validated params for getRopewikiRegionPreviews (GET /ropewiki/region/{id}/previews).
@@ -1,12 +1,11 @@
1
- import { PagePreview } from '../getRoutePreview/pagePreview';
2
- import { RegionPreview } from '../search/regionPreview';
3
- import { RegionPreviewsCursor } from './regionPreviewsCursor';
1
+ import { Preview } from '../../previews/preview';
2
+ import { RegionPreviewsCursor } from '../../cursors/regionPreviewsCursor';
4
3
  /**
5
4
  * Result of getRopewikiRegionPreviews (GET /ropewiki/region/{id}/previews).
6
5
  */
7
6
  export declare class RopewikiRegionPreviewsResult {
8
- results: (PagePreview | RegionPreview)[];
7
+ results: Preview[];
9
8
  nextCursor: string | null;
10
- constructor(results: (PagePreview | RegionPreview)[], nextCursor: RegionPreviewsCursor | null);
9
+ constructor(results: Preview[], nextCursor: RegionPreviewsCursor | null);
11
10
  }
12
11
  //# sourceMappingURL=ropewikiRegionPreviewsResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ropewikiRegionPreviewsResult.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;GAEG;AACH,qBAAa,4BAA4B;IACrC,OAAO,EAAE,CAAC,WAAW,GAAG,aAAa,CAAC,EAAE,CAAC;IACzC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAGtB,OAAO,EAAE,CAAC,WAAW,GAAG,aAAa,CAAC,EAAE,EACxC,UAAU,EAAE,oBAAoB,GAAG,IAAI;CAK9C"}
1
+ {"version":3,"file":"ropewikiRegionPreviewsResult.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRopewikiRegionPreviews/ropewikiRegionPreviewsResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;GAEG;AACH,qBAAa,4BAA4B;IACrC,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAGtB,OAAO,EAAE,OAAO,EAAE,EAClB,UAAU,EAAE,oBAAoB,GAAG,IAAI;CAK9C"}
@@ -1,4 +1,4 @@
1
- import { SearchCursor } from './searchCursor';
1
+ import { SearchCursor } from '../../cursors/searchCursor';
2
2
  export type SearchOrder = 'similarity' | 'quality';
3
3
  /**
4
4
  * Validated search parameters. Cursor is stored decoded (SearchCursor | null).
@@ -1 +1 @@
1
- {"version":3,"file":"searchParams.d.ts","sourceRoot":"","sources":["../../../../src/types/api/search/searchParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,SAA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AAE,OAAO,CAAC;IACtC,SAAgB,cAAc,EAAE,OAAO,CAAC;IACxC,SAAgB,UAAU,EAAE,OAAO,CAAC;IACpC,SAAgB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,SAAgB,KAAK,EAAE,WAAW,CAAC;IACnC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;gBAGxC,IAAI,EAAE,MAAM,EACZ,mBAAmB,EAAE,MAAM,EAC3B,YAAY,EAAE,OAAO,EACrB,cAAc,EAAE,OAAO,EACvB,UAAU,EAAE,OAAO,EACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GAAG,IAAI;IAqEhC;;;OAGG;IACH,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAmB7C;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CACxB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,YAAY;IA2Cf;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAY9B"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SearchParams = void 0;
4
- const searchCursor_1 = require("./searchCursor");
4
+ const searchCursor_1 = require("../../cursors/searchCursor");
5
5
  const DEFAULT_LIMIT = 20;
6
6
  /** UUID v4 format: 8-4-4-4-12 hex digits */
7
7
  const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -1,9 +1,8 @@
1
- import { PagePreview } from '../getRoutePreview/pagePreview';
2
- import { RegionPreview } from './regionPreview';
3
- import { SearchCursor } from './searchCursor';
1
+ import { Preview } from '../../previews/preview';
2
+ import { SearchCursor } from '../../cursors/searchCursor';
4
3
  export declare class SearchResults {
5
- results: (PagePreview | RegionPreview)[];
4
+ results: Preview[];
6
5
  nextCursor: string | null;
7
- constructor(results: (PagePreview | RegionPreview)[], nextCursor: SearchCursor | null);
6
+ constructor(results: Preview[], nextCursor: SearchCursor | null);
8
7
  }
9
8
  //# sourceMappingURL=searchResults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchResults.d.ts","sourceRoot":"","sources":["../../../../src/types/api/search/searchResults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBAAa,aAAa;IACtB,OAAO,EAAE,CAAC,WAAW,GAAG,aAAa,CAAC,EAAE,CAAC;IACzC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEd,OAAO,EAAE,CAAC,WAAW,GAAG,aAAa,CAAC,EAAE,EAAE,UAAU,EAAE,YAAY,GAAG,IAAI;CAIxF"}
1
+ {"version":3,"file":"searchResults.d.ts","sourceRoot":"","sources":["../../../../src/types/api/search/searchResults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,qBAAa,aAAa;IACtB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEd,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,YAAY,GAAG,IAAI;CAIlE"}
@@ -0,0 +1,26 @@
1
+ export declare enum CursorType {
2
+ Search = "search",
3
+ RegionPreviews = "region_previews",
4
+ RegionImages = "region_images"
5
+ }
6
+ /**
7
+ * Base class for pagination cursors. Each cursor encodes to base64url JSON
8
+ * including cursorType so decoding can validate the correct cursor kind.
9
+ */
10
+ export declare abstract class Cursor {
11
+ abstract readonly cursorType: CursorType;
12
+ /** Subclasses return their payload (without cursorType; base adds it). */
13
+ protected abstract toPayload(): Record<string, unknown>;
14
+ encodeBase64(): string;
15
+ /**
16
+ * Decodes a base64url-encoded cursor string to a plain object.
17
+ * Subclasses should call this then validate cursorType and required keys.
18
+ */
19
+ protected static parseBase64Url(encoded: string, errorLabel: string): Record<string, unknown>;
20
+ /**
21
+ * Validates that the decoded object has the expected cursorType.
22
+ * @throws if cursorType is missing or does not match
23
+ */
24
+ protected static validateCursorType(obj: Record<string, unknown>, expected: CursorType, errorLabel: string): void;
25
+ }
26
+ //# sourceMappingURL=cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../src/types/cursors/cursor.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,MAAM,WAAW;IACjB,cAAc,oBAAoB;IAClC,YAAY,kBAAkB;CACjC;AAKD;;;GAGG;AACH,8BAAsB,MAAM;IACxB,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAEzC,0EAA0E;IAC1E,SAAS,CAAC,QAAQ,CAAC,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAEvD,YAAY,IAAI,MAAM;IAOtB;;;OAGG;IACH,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAkB7F;;;OAGG;IACH,SAAS,CAAC,MAAM,CAAC,kBAAkB,CAC/B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,QAAQ,EAAE,UAAU,EACpB,UAAU,EAAE,MAAM,GACnB,IAAI;CAUV"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /// <reference types="node" />
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Cursor = exports.CursorType = void 0;
5
+ var CursorType;
6
+ (function (CursorType) {
7
+ CursorType["Search"] = "search";
8
+ CursorType["RegionPreviews"] = "region_previews";
9
+ CursorType["RegionImages"] = "region_images";
10
+ })(CursorType || (exports.CursorType = CursorType = {}));
11
+ const ENCODING = 'utf8';
12
+ const BASE64URL = 'base64url';
13
+ /**
14
+ * Base class for pagination cursors. Each cursor encodes to base64url JSON
15
+ * including cursorType so decoding can validate the correct cursor kind.
16
+ */
17
+ class Cursor {
18
+ encodeBase64() {
19
+ return Buffer.from(JSON.stringify({ cursorType: this.cursorType, ...this.toPayload() }), ENCODING).toString(BASE64URL);
20
+ }
21
+ /**
22
+ * Decodes a base64url-encoded cursor string to a plain object.
23
+ * Subclasses should call this then validate cursorType and required keys.
24
+ */
25
+ static parseBase64Url(encoded, errorLabel) {
26
+ if (typeof encoded !== 'string' || encoded === '') {
27
+ throw new Error(`${errorLabel} must be a non-empty string`);
28
+ }
29
+ let decoded;
30
+ try {
31
+ const json = Buffer.from(encoded, BASE64URL).toString(ENCODING);
32
+ decoded = JSON.parse(json);
33
+ }
34
+ catch (err) {
35
+ const message = err instanceof Error ? err.message : String(err);
36
+ throw new Error(`Invalid ${errorLabel} encoding: ${message}`);
37
+ }
38
+ if (decoded == null || typeof decoded !== 'object') {
39
+ throw new Error(`${errorLabel} must be an object`);
40
+ }
41
+ return decoded;
42
+ }
43
+ /**
44
+ * Validates that the decoded object has the expected cursorType.
45
+ * @throws if cursorType is missing or does not match
46
+ */
47
+ static validateCursorType(obj, expected, errorLabel) {
48
+ if (!('cursorType' in obj)) {
49
+ throw new Error(`${errorLabel} must have a cursorType property`);
50
+ }
51
+ if (obj.cursorType !== expected) {
52
+ throw new Error(`${errorLabel} cursorType must be "${expected}", got: ${JSON.stringify(obj.cursorType)}`);
53
+ }
54
+ }
55
+ }
56
+ exports.Cursor = Cursor;
@@ -1,12 +1,14 @@
1
+ import { Cursor, CursorType } from './cursor';
1
2
  /**
2
3
  * Cursor for region images pagination. Encodes to base64url for the nextCursor string.
3
4
  */
4
- export declare class RegionImagesCursor {
5
+ export declare class RegionImagesCursor extends Cursor {
5
6
  readonly sortKey: number;
6
7
  readonly pageId: string;
7
8
  readonly imageId: string;
9
+ readonly cursorType = CursorType.RegionImages;
8
10
  constructor(sortKey: number, pageId: string, imageId: string);
9
- encodeBase64(): string;
11
+ protected toPayload(): Record<string, unknown>;
10
12
  /**
11
13
  * Decodes a base64url-encoded cursor string. Throws if the string is invalid
12
14
  * or does not represent a valid RegionImagesCursor shape.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regionImagesCursor.d.ts","sourceRoot":"","sources":["../../../src/types/cursors/regionImagesCursor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,MAAM;aAItB,OAAO,EAAE,MAAM;aACf,MAAM,EAAE,MAAM;aACd,OAAO,EAAE,MAAM;IALnC,QAAQ,CAAC,UAAU,2BAA2B;gBAG1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;IAKnC,SAAS,CAAC,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI9C;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB;CAqB3D"}
@@ -1,50 +1,31 @@
1
1
  "use strict";
2
- /// <reference types="node" />
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.RegionImagesCursor = void 0;
5
- const ENCODING = 'utf8';
6
- const BASE64URL = 'base64url';
4
+ const cursor_1 = require("./cursor");
7
5
  /**
8
6
  * Cursor for region images pagination. Encodes to base64url for the nextCursor string.
9
7
  */
10
- class RegionImagesCursor {
8
+ class RegionImagesCursor extends cursor_1.Cursor {
11
9
  constructor(sortKey, pageId, imageId) {
10
+ super();
12
11
  this.sortKey = sortKey;
13
12
  this.pageId = pageId;
14
13
  this.imageId = imageId;
14
+ this.cursorType = cursor_1.CursorType.RegionImages;
15
15
  }
16
- encodeBase64() {
17
- return Buffer.from(JSON.stringify({
18
- sortKey: this.sortKey,
19
- pageId: this.pageId,
20
- imageId: this.imageId,
21
- }), ENCODING).toString(BASE64URL);
16
+ toPayload() {
17
+ return { sortKey: this.sortKey, pageId: this.pageId, imageId: this.imageId };
22
18
  }
23
19
  /**
24
20
  * Decodes a base64url-encoded cursor string. Throws if the string is invalid
25
21
  * or does not represent a valid RegionImagesCursor shape.
26
22
  */
27
23
  static decodeBase64(encoded) {
28
- if (typeof encoded !== 'string' || encoded === '') {
29
- throw new Error('Region images cursor must be a non-empty string');
30
- }
31
- let decoded;
32
- try {
33
- const json = Buffer.from(encoded, BASE64URL).toString(ENCODING);
34
- decoded = JSON.parse(json);
35
- }
36
- catch (err) {
37
- const message = err instanceof Error ? err.message : String(err);
38
- throw new Error(`Invalid region images cursor encoding: ${message}`);
39
- }
40
- if (decoded == null ||
41
- typeof decoded !== 'object' ||
42
- !('sortKey' in decoded) ||
43
- !('pageId' in decoded) ||
44
- !('imageId' in decoded)) {
24
+ const obj = cursor_1.Cursor.parseBase64Url(encoded, 'region images cursor');
25
+ cursor_1.Cursor.validateCursorType(obj, cursor_1.CursorType.RegionImages, 'Region images cursor');
26
+ if (!('sortKey' in obj) || !('pageId' in obj) || !('imageId' in obj)) {
45
27
  throw new Error('Region images cursor must be an object with sortKey, pageId, and imageId');
46
28
  }
47
- const obj = decoded;
48
29
  const sortKey = Number(obj.sortKey);
49
30
  if (Number.isNaN(sortKey)) {
50
31
  throw new Error(`Region images cursor sortKey must be a number, got: ${JSON.stringify(obj.sortKey)}`);
@@ -1,12 +1,14 @@
1
+ import { Cursor, CursorType } from './cursor';
1
2
  /**
2
3
  * Cursor for region previews pagination. Encodes to base64url for the nextCursor string.
3
4
  */
4
- export declare class RegionPreviewsCursor {
5
+ export declare class RegionPreviewsCursor extends Cursor {
5
6
  readonly sortKey: number;
6
7
  readonly type: string;
7
8
  readonly id: string;
9
+ readonly cursorType = CursorType.RegionPreviews;
8
10
  constructor(sortKey: number, type: string, id: string);
9
- encodeBase64(): string;
11
+ protected toPayload(): Record<string, unknown>;
10
12
  /**
11
13
  * Decodes a base64url-encoded cursor string. Throws if the string is invalid
12
14
  * or does not represent a valid RegionPreviewsCursor shape.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regionPreviewsCursor.d.ts","sourceRoot":"","sources":["../../../src/types/cursors/regionPreviewsCursor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,MAAM;aAIxB,OAAO,EAAE,MAAM;aACf,IAAI,EAAE,MAAM;aACZ,EAAE,EAAE,MAAM;IAL9B,QAAQ,CAAC,UAAU,6BAA6B;gBAG5B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM;IAK9B,SAAS,CAAC,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI9C;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB;CAqB7D"}
@@ -1,50 +1,31 @@
1
1
  "use strict";
2
- /// <reference types="node" />
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.RegionPreviewsCursor = void 0;
5
- const ENCODING = 'utf8';
6
- const BASE64URL = 'base64url';
4
+ const cursor_1 = require("./cursor");
7
5
  /**
8
6
  * Cursor for region previews pagination. Encodes to base64url for the nextCursor string.
9
7
  */
10
- class RegionPreviewsCursor {
8
+ class RegionPreviewsCursor extends cursor_1.Cursor {
11
9
  constructor(sortKey, type, id) {
10
+ super();
12
11
  this.sortKey = sortKey;
13
12
  this.type = type;
14
13
  this.id = id;
14
+ this.cursorType = cursor_1.CursorType.RegionPreviews;
15
15
  }
16
- encodeBase64() {
17
- return Buffer.from(JSON.stringify({
18
- sortKey: this.sortKey,
19
- type: this.type,
20
- id: this.id,
21
- }), ENCODING).toString(BASE64URL);
16
+ toPayload() {
17
+ return { sortKey: this.sortKey, type: this.type, id: this.id };
22
18
  }
23
19
  /**
24
20
  * Decodes a base64url-encoded cursor string. Throws if the string is invalid
25
21
  * or does not represent a valid RegionPreviewsCursor shape.
26
22
  */
27
23
  static decodeBase64(encoded) {
28
- if (typeof encoded !== 'string' || encoded === '') {
29
- throw new Error('Region previews cursor must be a non-empty string');
30
- }
31
- let decoded;
32
- try {
33
- const json = Buffer.from(encoded, BASE64URL).toString(ENCODING);
34
- decoded = JSON.parse(json);
35
- }
36
- catch (err) {
37
- const message = err instanceof Error ? err.message : String(err);
38
- throw new Error(`Invalid region previews cursor encoding: ${message}`);
39
- }
40
- if (decoded == null ||
41
- typeof decoded !== 'object' ||
42
- !('sortKey' in decoded) ||
43
- !('type' in decoded) ||
44
- !('id' in decoded)) {
24
+ const obj = cursor_1.Cursor.parseBase64Url(encoded, 'region previews cursor');
25
+ cursor_1.Cursor.validateCursorType(obj, cursor_1.CursorType.RegionPreviews, 'Region previews cursor');
26
+ if (!('sortKey' in obj) || !('type' in obj) || !('id' in obj)) {
45
27
  throw new Error('Region previews cursor must be an object with sortKey, type, and id');
46
28
  }
47
- const obj = decoded;
48
29
  const sortKey = Number(obj.sortKey);
49
30
  if (Number.isNaN(sortKey)) {
50
31
  throw new Error(`Region previews cursor sortKey must be a number, got: ${JSON.stringify(obj.sortKey)}`);
@@ -1,13 +1,15 @@
1
+ import { Cursor, CursorType } from './cursor';
1
2
  export type SearchCursorType = 'page' | 'region';
2
3
  /**
3
4
  * Cursor for search API pagination. Encodes to base64url for the nextCursor string.
4
5
  */
5
- export declare class SearchCursor {
6
+ export declare class SearchCursor extends Cursor {
6
7
  readonly sortKey: number;
7
8
  readonly type: SearchCursorType;
8
9
  readonly id: string;
10
+ readonly cursorType = CursorType.Search;
9
11
  constructor(sortKey: number, type: SearchCursorType, id: string);
10
- encodeBase64(): string;
12
+ protected toPayload(): Record<string, unknown>;
11
13
  /**
12
14
  * Decodes a base64url-encoded cursor string. Throws if the string is invalid
13
15
  * or does not represent a valid SearchCursor.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searchCursor.d.ts","sourceRoot":"","sources":["../../../src/types/cursors/searchCursor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEjD;;GAEG;AACH,qBAAa,YAAa,SAAQ,MAAM;aAIhB,OAAO,EAAE,MAAM;aACf,IAAI,EAAE,gBAAgB;aACtB,EAAE,EAAE,MAAM;IAL9B,QAAQ,CAAC,UAAU,qBAAqB;gBAGpB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,gBAAgB,EACtB,EAAE,EAAE,MAAM;IAK9B,SAAS,CAAC,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI9C;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY;CAoBrD"}
@@ -1,46 +1,31 @@
1
1
  "use strict";
2
- /// <reference types="node" />
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.SearchCursor = void 0;
5
- const ENCODING = 'utf8';
6
- const BASE64URL = 'base64url';
4
+ const cursor_1 = require("./cursor");
7
5
  /**
8
6
  * Cursor for search API pagination. Encodes to base64url for the nextCursor string.
9
7
  */
10
- class SearchCursor {
8
+ class SearchCursor extends cursor_1.Cursor {
11
9
  constructor(sortKey, type, id) {
10
+ super();
12
11
  this.sortKey = sortKey;
13
12
  this.type = type;
14
13
  this.id = id;
14
+ this.cursorType = cursor_1.CursorType.Search;
15
15
  }
16
- encodeBase64() {
17
- return Buffer.from(JSON.stringify({ sortKey: this.sortKey, type: this.type, id: this.id }), ENCODING).toString(BASE64URL);
16
+ toPayload() {
17
+ return { sortKey: this.sortKey, type: this.type, id: this.id };
18
18
  }
19
19
  /**
20
20
  * Decodes a base64url-encoded cursor string. Throws if the string is invalid
21
21
  * or does not represent a valid SearchCursor.
22
22
  */
23
23
  static decodeBase64(encoded) {
24
- if (typeof encoded !== 'string' || encoded === '') {
25
- throw new Error('Search cursor must be a non-empty string');
26
- }
27
- let decoded;
28
- try {
29
- const json = Buffer.from(encoded, BASE64URL).toString(ENCODING);
30
- decoded = JSON.parse(json);
31
- }
32
- catch (err) {
33
- const message = err instanceof Error ? err.message : String(err);
34
- throw new Error(`Invalid search cursor encoding: ${message}`);
35
- }
36
- if (decoded == null ||
37
- typeof decoded !== 'object' ||
38
- !('sortKey' in decoded) ||
39
- !('type' in decoded) ||
40
- !('id' in decoded)) {
24
+ const obj = cursor_1.Cursor.parseBase64Url(encoded, 'search cursor');
25
+ cursor_1.Cursor.validateCursorType(obj, cursor_1.CursorType.Search, 'Search cursor');
26
+ if (!('sortKey' in obj) || !('type' in obj) || !('id' in obj)) {
41
27
  throw new Error('Search cursor must be an object with sortKey, type, and id');
42
28
  }
43
- const obj = decoded;
44
29
  const type = obj.type;
45
30
  if (type !== 'page' && type !== 'region') {
46
31
  throw new Error(`Search cursor type must be "page" or "region", got: ${JSON.stringify(type)}`);
@@ -1,6 +1,7 @@
1
- import { Difficulty } from '../../difficulty';
2
- import { PermitStatus } from '../../permitStatus';
3
- import { PageDataSource } from '../../pageDataSource';
1
+ import { Difficulty } from '../difficulty';
2
+ import { PermitStatus } from '../permitStatus';
3
+ import { PageDataSource } from '../pageDataSource';
4
+ import { Preview, PreviewType } from './preview';
4
5
  /**
5
6
  * Row shape returned by the getRopewikiPagePreview query.
6
7
  * Used when building a PagePreview from Ropewiki data via PagePreview.fromDbRow.
@@ -24,9 +25,9 @@ export interface GetRopewikiPagePreviewRow {
24
25
  * Preview of a page linked to a route (e.g. Ropewiki page).
25
26
  * Used by GET /route/{routeId}/preview.
26
27
  */
27
- export declare class PagePreview {
28
+ export declare class PagePreview extends Preview {
28
29
  /** Discriminator for search results: always 'page' */
29
- readonly previewType: "page";
30
+ readonly previewType = PreviewType.Page;
30
31
  /** Page identifier (e.g. RopewikiPage id) */
31
32
  id: string;
32
33
  /** Source of the page (e.g. ropewiki) */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagePreview.d.ts","sourceRoot":"","sources":["../../../src/types/previews/pagePreview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;GAGG;AACH,qBAAa,WAAY,SAAQ,OAAO;IACpC,sDAAsD;IACtD,QAAQ,CAAC,WAAW,oBAAoB;IACxC,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,MAAM,EAAE,cAAc,C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 0;
4
- const difficulty_1 = require("../../difficulty");
5
- const permitStatus_1 = require("../../permitStatus");
6
- const pageDataSource_1 = require("../../pageDataSource");
4
+ const difficulty_1 = require("../difficulty");
5
+ const permitStatus_1 = require("../permitStatus");
6
+ const pageDataSource_1 = require("../pageDataSource");
7
+ const preview_1 = require("./preview");
7
8
  /**
8
9
  * Preview of a page linked to a route (e.g. Ropewiki page).
9
10
  * Used by GET /route/{routeId}/preview.
10
11
  */
11
- class PagePreview {
12
+ class PagePreview extends preview_1.Preview {
12
13
  constructor(id, source, imageUrl, rating, ratingCount, title, regions, aka, difficulty, mapData, externalLink, permit) {
14
+ super();
13
15
  /** Discriminator for search results: always 'page' */
14
- this.previewType = 'page';
16
+ this.previewType = preview_1.PreviewType.Page;
15
17
  this.id = id;
16
18
  this.source = source;
17
19
  this.imageUrl = imageUrl;
@@ -0,0 +1,17 @@
1
+ import { PagePreview } from './pagePreview';
2
+ import { RegionPreview } from './regionPreview';
3
+ export declare enum PreviewType {
4
+ Page = "page",
5
+ Region = "region"
6
+ }
7
+ /**
8
+ * Base type for previews (e.g. page or region).
9
+ */
10
+ export declare abstract class Preview {
11
+ abstract readonly previewType: PreviewType;
12
+ /** Type guard: narrows this to PagePreview. */
13
+ isPagePreview(): this is PagePreview;
14
+ /** Type guard: narrows this to RegionPreview. */
15
+ isRegionPreview(): this is RegionPreview;
16
+ }
17
+ //# sourceMappingURL=preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../src/types/previews/preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,oBAAY,WAAW;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;CACpB;AAED;;GAEG;AACH,8BAAsB,OAAO;IACzB,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAE3C,+CAA+C;IAC/C,aAAa,IAAI,IAAI,IAAI,WAAW;IAIpC,iDAAiD;IACjD,eAAe,IAAI,IAAI,IAAI,aAAa;CAG3C"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Preview = exports.PreviewType = void 0;
4
+ var PreviewType;
5
+ (function (PreviewType) {
6
+ PreviewType["Page"] = "page";
7
+ PreviewType["Region"] = "region";
8
+ })(PreviewType || (exports.PreviewType = PreviewType = {}));
9
+ /**
10
+ * Base type for previews (e.g. page or region).
11
+ */
12
+ class Preview {
13
+ /** Type guard: narrows this to PagePreview. */
14
+ isPagePreview() {
15
+ return this.previewType === PreviewType.Page;
16
+ }
17
+ /** Type guard: narrows this to RegionPreview. */
18
+ isRegionPreview() {
19
+ return this.previewType === PreviewType.Region;
20
+ }
21
+ }
22
+ exports.Preview = Preview;
@@ -0,0 +1,14 @@
1
+ import { PageDataSource } from '../pageDataSource';
2
+ import { Preview, PreviewType } from './preview';
3
+ export declare class RegionPreview extends Preview {
4
+ readonly previewType = PreviewType.Region;
5
+ id: string;
6
+ name: string;
7
+ parents: string[];
8
+ pageCount: number;
9
+ regionCount: number;
10
+ imageUrl: string | null;
11
+ source: PageDataSource;
12
+ constructor(id: string, name: string, parents: string[], pageCount: number, regionCount: number, imageUrl: string | null, source: PageDataSource);
13
+ }
14
+ //# sourceMappingURL=regionPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regionPreview.d.ts","sourceRoot":"","sources":["../../../src/types/previews/regionPreview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEjD,qBAAa,aAAc,SAAQ,OAAO;IACtC,QAAQ,CAAC,WAAW,sBAAsB;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,cAAc,CAAC;gBAGnB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,EAAE,cAAc;CAW7B"}
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RegionPreview = void 0;
4
- class RegionPreview {
4
+ const preview_1 = require("./preview");
5
+ class RegionPreview extends preview_1.Preview {
5
6
  constructor(id, name, parents, pageCount, regionCount, imageUrl, source) {
6
- this.previewType = 'region';
7
+ super();
8
+ this.previewType = preview_1.PreviewType.Region;
7
9
  this.id = id;
8
10
  this.name = name;
9
11
  this.parents = parents;
10
- this.pageCount = pageCount ?? 0;
11
- this.regionCount = regionCount ?? 0;
12
+ this.pageCount = pageCount;
13
+ this.regionCount = regionCount;
12
14
  this.imageUrl = imageUrl;
13
15
  this.source = source;
14
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ropegeo-common",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Shared types and utilities for RopeGeo and WebScraper",
5
5
  "license": "ISC",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"regionImagesCursor.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRopewikiRegionImages/regionImagesCursor.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,kBAAkB;aAEP,OAAO,EAAE,MAAM;aACf,MAAM,EAAE,MAAM;aACd,OAAO,EAAE,MAAM;gBAFf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM;IAGnC,YAAY,IAAI,MAAM;IAWtB;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB;CA0C3D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"regionPreviewsCursor.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRopewikiRegionPreviews/regionPreviewsCursor.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,qBAAa,oBAAoB;aAET,OAAO,EAAE,MAAM;aACf,IAAI,EAAE,MAAM;aACZ,EAAE,EAAE,MAAM;gBAFV,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM;IAG9B,YAAY,IAAI,MAAM;IAWtB;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB;CA0C7D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pagePreview.d.ts","sourceRoot":"","sources":["../../../../src/types/api/getRoutePreview/pagePreview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CA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B;;OAEG;IACH,MAAM,CAAC,SAAS,CACZ,GAAG,EAAE,yBAAyB,EAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,GAAG,CAAC,EAAE,MAAM,EAAE,GACf,WAAW;IAuBd,OAAO,CAAC,MAAM,CAAC,WAAW;CAK7B"}
@@ -1,13 +0,0 @@
1
- import { PageDataSource } from '../../pageDataSource';
2
- export declare class RegionPreview {
3
- readonly previewType: "region";
4
- id: string;
5
- name: string;
6
- parents: string[];
7
- pageCount: number;
8
- regionCount: number;
9
- imageUrl: string | null;
10
- source: PageDataSource;
11
- constructor(id: string, name: string, parents: string[], pageCount: number | null, regionCount: number | null, imageUrl: string | null, source: PageDataSource);
12
- }
13
- //# sourceMappingURL=regionPreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"regionPreview.d.ts","sourceRoot":"","sources":["../../../../src/types/api/search/regionPreview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,qBAAa,aAAa;IACtB,QAAQ,CAAC,WAAW,EAAG,QAAQ,CAAU;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,cAAc,CAAC;gBAGnB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,EAAE,cAAc;CAU7B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"searchCursor.d.ts","sourceRoot":"","sources":["../../../../src/types/api/search/searchCursor.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEjD;;GAEG;AACH,qBAAa,YAAY;aAED,OAAO,EAAE,MAAM;aACf,IAAI,EAAE,gBAAgB;aACtB,EAAE,EAAE,MAAM;gBAFV,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,gBAAgB,EACtB,EAAE,EAAE,MAAM;IAG9B,YAAY,IAAI,MAAM;IAMtB;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY;CAmCrD"}