@mapcreator/api 0.0.0-saga.2 → 0.0.0-saga.4

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 (90) hide show
  1. package/cjs/api/choropleth.d.ts +8 -3
  2. package/cjs/api/choropleth.d.ts.map +1 -1
  3. package/cjs/api/choropleth.js +17 -4
  4. package/cjs/api/choropleth.js.map +1 -1
  5. package/cjs/api/insetMap.d.ts +37 -0
  6. package/cjs/api/insetMap.d.ts.map +1 -0
  7. package/cjs/api/insetMap.js +49 -0
  8. package/cjs/api/insetMap.js.map +1 -0
  9. package/cjs/api/job.d.ts +1 -0
  10. package/cjs/api/job.d.ts.map +1 -1
  11. package/cjs/api/job.js.map +1 -1
  12. package/cjs/api/jobResult.d.ts +1 -1
  13. package/cjs/api/jobResult.d.ts.map +1 -1
  14. package/cjs/api/jobResult.js +1 -1
  15. package/cjs/api/jobResult.js.map +1 -1
  16. package/cjs/api/jobRevision.d.ts +2 -2
  17. package/cjs/api/jobRevision.d.ts.map +1 -1
  18. package/cjs/api/jobRevision.js +1 -1
  19. package/cjs/api/jobRevision.js.map +1 -1
  20. package/cjs/api/organisation.d.ts +2 -1
  21. package/cjs/api/organisation.d.ts.map +1 -1
  22. package/cjs/api/organisation.js +1 -2
  23. package/cjs/api/organisation.js.map +1 -1
  24. package/cjs/api/resources.d.ts +1 -1
  25. package/cjs/api/resources.d.ts.map +1 -1
  26. package/cjs/api/resources.js.map +1 -1
  27. package/cjs/index.d.ts +1 -0
  28. package/cjs/index.d.ts.map +1 -1
  29. package/cjs/index.js +1 -0
  30. package/cjs/index.js.map +1 -1
  31. package/esm/api/choropleth.d.ts +8 -3
  32. package/esm/api/choropleth.d.ts.map +1 -1
  33. package/esm/api/choropleth.js +17 -4
  34. package/esm/api/choropleth.js.map +1 -1
  35. package/esm/api/insetMap.d.ts +37 -0
  36. package/esm/api/insetMap.d.ts.map +1 -0
  37. package/esm/api/insetMap.js +44 -0
  38. package/esm/api/insetMap.js.map +1 -0
  39. package/esm/api/job.d.ts +1 -0
  40. package/esm/api/job.d.ts.map +1 -1
  41. package/esm/api/job.js.map +1 -1
  42. package/esm/api/jobResult.d.ts +1 -1
  43. package/esm/api/jobResult.d.ts.map +1 -1
  44. package/esm/api/jobResult.js +1 -1
  45. package/esm/api/jobResult.js.map +1 -1
  46. package/esm/api/jobRevision.d.ts +2 -2
  47. package/esm/api/jobRevision.d.ts.map +1 -1
  48. package/esm/api/jobRevision.js +1 -1
  49. package/esm/api/jobRevision.js.map +1 -1
  50. package/esm/api/organisation.d.ts +2 -1
  51. package/esm/api/organisation.d.ts.map +1 -1
  52. package/esm/api/organisation.js +1 -2
  53. package/esm/api/organisation.js.map +1 -1
  54. package/esm/api/resources.d.ts +1 -1
  55. package/esm/api/resources.d.ts.map +1 -1
  56. package/esm/api/resources.js.map +1 -1
  57. package/esm/index.d.ts +1 -0
  58. package/esm/index.d.ts.map +1 -1
  59. package/esm/index.js +1 -0
  60. package/esm/index.js.map +1 -1
  61. package/package.json +2 -2
  62. package/src/api/apiCommon.ts +70 -70
  63. package/src/api/choropleth.ts +126 -105
  64. package/src/api/color.ts +22 -22
  65. package/src/api/dimension.ts +44 -44
  66. package/src/api/dimensionSet.ts +20 -20
  67. package/src/api/feature.ts +22 -22
  68. package/src/api/font.ts +49 -49
  69. package/src/api/fontFamily.ts +43 -43
  70. package/src/api/highlight.ts +87 -87
  71. package/src/api/insetMap.ts +96 -0
  72. package/src/api/job.ts +130 -129
  73. package/src/api/jobResult.ts +95 -95
  74. package/src/api/jobRevision.ts +279 -278
  75. package/src/api/jobShare.ts +35 -35
  76. package/src/api/jobType.ts +26 -26
  77. package/src/api/language.ts +19 -19
  78. package/src/api/layer.ts +38 -38
  79. package/src/api/layerFaq.ts +53 -53
  80. package/src/api/layerGroup.ts +69 -69
  81. package/src/api/mapstyleSet.ts +48 -48
  82. package/src/api/message.ts +80 -80
  83. package/src/api/organisation.ts +95 -95
  84. package/src/api/resources.ts +145 -143
  85. package/src/api/svg.ts +33 -33
  86. package/src/api/svgSet.ts +56 -56
  87. package/src/api/user.ts +327 -327
  88. package/src/index.ts +43 -42
  89. package/src/oauth.ts +314 -314
  90. package/src/utils.ts +342 -342
@@ -1,87 +1,87 @@
1
- import type { FeatureCollection } from 'geojson';
2
- import type { SnakeCase } from 'type-fest';
3
- import {
4
- APIMeta,
5
- type ApiCommonData,
6
- type ApiError,
7
- type ApiSuccess,
8
- type Flatten,
9
- defaultListHeader,
10
- getSearchParams,
11
- request,
12
- } from '../utils.js';
13
-
14
- type FieldName = 'id' | 'name' | 'description' | 'previewPath' | 'previewJson';
15
-
16
- export type PartialVectorHighlight = Pick<VectorHighlight, FieldName>;
17
-
18
- export type VectorHighlight = {
19
- id: number;
20
- name: string;
21
- description: string;
22
- previewPath: string | null;
23
- previewJson: FeatureCollection | null;
24
-
25
- vectorSetUrl: string;
26
- sourceLayerName: string;
27
-
28
- lngMin: number;
29
- lngMax: number;
30
- latMin: number;
31
- latMax: number;
32
-
33
- keys: string[];
34
- properties: Record<string, unknown>;
35
- };
36
-
37
- export type ApiVectorHighlight = {
38
- data: {
39
- id: number;
40
- name: string;
41
- description: string;
42
- preview_path: string | null;
43
- preview_json: FeatureCollection | null;
44
-
45
- vector_set_url: string;
46
- source_layer_name: string;
47
-
48
- lng_min: number;
49
- lng_max: number;
50
- lat_min: number;
51
- lat_max: number;
52
-
53
- keys: string[];
54
- properties: Record<string, unknown>;
55
- } & ApiCommonData;
56
- } & Omit<ApiSuccess, 'data'> | ApiError;
57
-
58
- export type ApiVectorHighlightData = Flatten<Exclude<ApiVectorHighlight, ApiError>['data']>;
59
-
60
- export async function listVectorHighlights(name: string): Promise<PartialVectorHighlight[]> {
61
- const pathname = `/v1/highlights/vector`;
62
- const query = getSearchParams({ search: { name } });
63
- const path = `${pathname}?${query}`;
64
-
65
- // Only request first 50 results
66
- const headers = { ...defaultListHeader };
67
- const options = { withMeta: true };
68
-
69
- type ApiVectorHighlightArray = {
70
- data: Array<Pick<ApiVectorHighlightData, SnakeCase<FieldName>>>;
71
- } & Omit<ApiSuccess, 'data'> | ApiError;
72
-
73
- return request<ApiVectorHighlightArray, PartialVectorHighlight>(path, null, headers, options)
74
- .catch((error: Error) => {
75
- if (error instanceof APIMeta) {
76
- return (error as APIMeta<ApiVectorHighlightArray, PartialVectorHighlight>).data;
77
- }
78
-
79
- throw error;
80
- });
81
- }
82
-
83
- export async function getVectorHighlight(highlightId: number): Promise<VectorHighlight> {
84
- const path = `/v1/highlights/vector/${highlightId}`;
85
-
86
- return request<ApiVectorHighlight, VectorHighlight>(path);
87
- }
1
+ import type { FeatureCollection } from 'geojson';
2
+ import type { SnakeCase } from 'type-fest';
3
+ import {
4
+ APIMeta,
5
+ type ApiCommonData,
6
+ type ApiError,
7
+ type ApiSuccess,
8
+ type Flatten,
9
+ defaultListHeader,
10
+ getSearchParams,
11
+ request,
12
+ } from '../utils.js';
13
+
14
+ type FieldName = 'id' | 'name' | 'description' | 'previewPath' | 'previewJson';
15
+
16
+ export type PartialVectorHighlight = Pick<VectorHighlight, FieldName>;
17
+
18
+ export type VectorHighlight = {
19
+ id: number;
20
+ name: string;
21
+ description: string;
22
+ previewPath: string | null;
23
+ previewJson: FeatureCollection | null;
24
+
25
+ vectorSetUrl: string;
26
+ sourceLayerName: string;
27
+
28
+ lngMin: number;
29
+ lngMax: number;
30
+ latMin: number;
31
+ latMax: number;
32
+
33
+ keys: string[];
34
+ properties: Record<string, unknown>;
35
+ };
36
+
37
+ export type ApiVectorHighlight = {
38
+ data: {
39
+ id: number;
40
+ name: string;
41
+ description: string;
42
+ preview_path: string | null;
43
+ preview_json: FeatureCollection | null;
44
+
45
+ vector_set_url: string;
46
+ source_layer_name: string;
47
+
48
+ lng_min: number;
49
+ lng_max: number;
50
+ lat_min: number;
51
+ lat_max: number;
52
+
53
+ keys: string[];
54
+ properties: Record<string, unknown>;
55
+ } & ApiCommonData;
56
+ } & Omit<ApiSuccess, 'data'> | ApiError;
57
+
58
+ export type ApiVectorHighlightData = Flatten<Exclude<ApiVectorHighlight, ApiError>['data']>;
59
+
60
+ export async function listVectorHighlights(name: string): Promise<PartialVectorHighlight[]> {
61
+ const pathname = `/v1/highlights/vector`;
62
+ const query = getSearchParams({ search: { name } });
63
+ const path = `${pathname}?${query}`;
64
+
65
+ // Only request first 50 results
66
+ const headers = { ...defaultListHeader };
67
+ const options = { withMeta: true };
68
+
69
+ type ApiVectorHighlightArray = {
70
+ data: Array<Pick<ApiVectorHighlightData, SnakeCase<FieldName>>>;
71
+ } & Omit<ApiSuccess, 'data'> | ApiError;
72
+
73
+ return request<ApiVectorHighlightArray, PartialVectorHighlight>(path, null, headers, options)
74
+ .catch((error: Error) => {
75
+ if (error instanceof APIMeta) {
76
+ return (error as APIMeta<ApiVectorHighlightArray, PartialVectorHighlight>).data;
77
+ }
78
+
79
+ throw error;
80
+ });
81
+ }
82
+
83
+ export async function getVectorHighlight(highlightId: number): Promise<VectorHighlight> {
84
+ const path = `/v1/highlights/vector/${highlightId}`;
85
+
86
+ return request<ApiVectorHighlight, VectorHighlight>(path);
87
+ }
@@ -0,0 +1,96 @@
1
+ import { apiHost, authenticate, token } from '../oauth.js';
2
+ import {
3
+ APIError,
4
+ type ApiCommonData,
5
+ type ApiError,
6
+ type ApiSuccess,
7
+ type Flatten,
8
+ HTTPError,
9
+ NetworkError,
10
+ request,
11
+ } from '../utils.js';
12
+
13
+ export type InsetMap = {
14
+ id: number;
15
+ description: string;
16
+ jsonFilename: string;
17
+ latMin: number;
18
+ lngMin: number;
19
+ latMax: number;
20
+ lngMax: number;
21
+ };
22
+
23
+ export type ApiInsetMap = {
24
+ data: {
25
+ id: number;
26
+ description: string;
27
+ json_filename: string;
28
+ lat_min: number;
29
+ lng_min: number;
30
+ lat_max: number;
31
+ lng_max: number;
32
+ } & ApiCommonData;
33
+ } & Omit<ApiSuccess, 'data'> | ApiError;
34
+
35
+ export type ApiInsetMapData = Flatten<Exclude<ApiInsetMap, ApiError>['data']>;
36
+
37
+ type Boundary = {
38
+ topLeft: {
39
+ lat: number;
40
+ lng: number;
41
+ };
42
+ bottomRight: {
43
+ lat: number;
44
+ lng: number;
45
+ };
46
+ };
47
+
48
+ export async function listInsetMaps(boundary: Boundary): Promise<InsetMap[]> {
49
+ const path = `/v1/inset-maps/for-boundary`;
50
+
51
+ type ApiInsetMapArray = {
52
+ data: ApiInsetMapData[];
53
+ } & Omit<ApiSuccess, 'data'> | ApiError;
54
+
55
+ return request<ApiInsetMapArray, InsetMap>(path, { boundary });
56
+ }
57
+
58
+ export async function getInsetMap(insetMapId: number): Promise<InsetMap> {
59
+ const path = `/v1/inset-maps/${insetMapId}`;
60
+
61
+ return request<ApiInsetMap, InsetMap>(path);
62
+ }
63
+
64
+ export async function getInsetMapTopoJson<TopoJSON>(insetMapId: number): Promise<TopoJSON> {
65
+ const href = `${apiHost}/v1/inset-maps/${insetMapId}/json`;
66
+ const headers = { Accept: 'application/json', ...(token ? { Authorization: token.toString() } : null) };
67
+ const response = await fetch(href, { headers }).catch((error: Error) => {
68
+ throw new NetworkError(error?.message ?? error);
69
+ });
70
+
71
+ if (response.ok) {
72
+ return response.json().catch(() => {
73
+ throw new APIError({
74
+ success: false,
75
+ error: { type: 'SyntaxError', message: 'Malformed JSON response' },
76
+ });
77
+ }) as Promise<TopoJSON>;
78
+ } else {
79
+ // eslint-disable-next-line default-case
80
+ switch (response.status) {
81
+ case 401:
82
+ await authenticate();
83
+ break; // NO-OP
84
+ case 403:
85
+ case 404:
86
+ case 406:
87
+ case 429:
88
+ throw new APIError({
89
+ success: false,
90
+ error: { type: 'HttpException', message: response.statusText },
91
+ });
92
+ }
93
+
94
+ throw new HTTPError(response);
95
+ }
96
+ }
package/src/api/job.ts CHANGED
@@ -1,129 +1,130 @@
1
- import type { ApiJobShare, JobShare, JobShareVisibility } from './jobShare.js';
2
- import { type JobSearchResult, listJobs } from './apiCommon.js';
3
- import {
4
- type ApiCommon,
5
- type ApiCommonData,
6
- type ApiError,
7
- type ApiSuccess,
8
- type Flatten,
9
- type Revivers,
10
- deletedNoneParam,
11
- request,
12
- } from '../utils.js';
13
-
14
- export type Job = {
15
- id: number;
16
- jobTypeId: number;
17
- title: string;
18
- previewPath: string | undefined;
19
- createdAt: string;
20
- star: boolean;
21
- jobFolderId: number | null;
22
- userEmail: string | undefined;
23
- jobFolderName: string | null;
24
- userId: number;
25
- };
26
-
27
- export type ApiJob = {
28
- data: {
29
- id: number; // The job id (sortable)
30
- job_type_id: number; // The id of the job type (searchable)
31
- user_id: number; // The user id (searchable)
32
- title: string; // The title of the job (searchable, sortable)
33
- description: string | null; // The description of the job (searchable, sortable)
34
- share_token: string | null; // The token used for sharing this job
35
- autosave_preview_path: string | null; // The preview path of the Job
36
- job_folder_id: number | null; // TODO: not present in API specification!
37
- job_folder_name?: string | null; // TODO: not present in API specification!
38
- star: boolean; // TODO: not present in API specification!
39
- } & ApiCommonData;
40
- } & Omit<ApiSuccess, 'data'> | ApiError;
41
-
42
- export type ApiJobData = Flatten<Exclude<ApiJob, ApiError>['data']>;
43
-
44
- export const jobRevivers: Revivers<ApiJob, Job> = {
45
- description: undefined,
46
- share_token: undefined,
47
- autosave_preview_path: undefined,
48
-
49
- jobTypeId: () => 9,
50
- jobFolderName: (data: ApiJobData) => data.job_folder_name ?? null,
51
- createdAt: (data: ApiJobData) => data.created_at as string,
52
- previewPath: (data: ApiJobData) => data.autosave_preview_path ?? undefined,
53
- };
54
-
55
- export async function createJob(title: string): Promise<Job> {
56
- const path = `/v1/jobs`;
57
- const body = { title, job_type_id: 9 };
58
- const options = { revivers: jobRevivers };
59
-
60
- // Technically, the returning `data` will contain only the following fields:
61
- // Pick<ApiJobData, 'id' | 'job_type_id' | 'user_id' | 'title' | 'created_at' | 'updated_at'>
62
-
63
- return request<ApiJob, Job>(path, body, null, options);
64
- }
65
-
66
- export async function getJob(jobId: number): Promise<Job> {
67
- const path = `/v1/jobs/${jobId}`;
68
- const options = { revivers: jobRevivers };
69
-
70
- return request<ApiJob, Job>(path, null, null, options);
71
- }
72
-
73
- export async function deleteJob(jobId: number): Promise<Record<string, never>> {
74
- const path = `/v1/jobs/${jobId}`;
75
-
76
- return request<ApiCommon, Record<string, never>>(path, null, null, { method: 'DELETE' });
77
- }
78
-
79
- export async function updateJob(jobId: number, newTitle: string): Promise<Record<string, never>> {
80
- const path = `/v1/jobs/${jobId}`;
81
- const body = { title: newTitle };
82
-
83
- return request<ApiCommon, Record<string, never>>(path, body, null, { method: 'PATCH' });
84
- }
85
-
86
- export async function updateJobFolder(jobId: number, folderId: number | null): Promise<Record<string, never>> {
87
- const path = `/v1/jobs/${jobId}`;
88
- const body = { job_folder_id: folderId };
89
-
90
- return request<ApiCommon, Record<string, never>>(path, body, null, { method: 'PATCH' });
91
- }
92
-
93
- export async function starJob(jobId: number, star: boolean): Promise<Record<string, never>> {
94
- const path = `/v1/jobs/${jobId}`;
95
- const body = { star };
96
-
97
- return request<ApiCommon, Record<string, never>>(path, body, null, { method: 'PATCH' });
98
- }
99
-
100
- export async function generateJobShare(
101
- jobId: number,
102
- visibility: JobShareVisibility,
103
- ): Promise<JobShare> {
104
- const path = `/v1/jobs/${jobId}/share`;
105
- const body = { visibility };
106
-
107
- return request<ApiJobShare, JobShare>(path, body);
108
- }
109
-
110
- export async function uploadJobPreview(
111
- jobId: number,
112
- preview: Blob,
113
- ): Promise<Record<string, never>> {
114
- const pathname = `/v1/jobs/${jobId}/preview`;
115
- const path = `${pathname}?${deletedNoneParam}`;
116
- const body = new FormData();
117
-
118
- body.append('preview', preview);
119
-
120
- return request<ApiCommon, Record<string, never>>(path, body);
121
- }
122
-
123
- export async function listFeaturedJobs(
124
- title: string,
125
- page: number,
126
- options?: Record<string, unknown>,
127
- ): Promise<JobSearchResult> {
128
- return listJobs(`/v1/jobs/featured`, title, page, options);
129
- }
1
+ import type { ApiJobShare, JobShare, JobShareVisibility } from './jobShare.js';
2
+ import { type JobSearchResult, listJobs } from './apiCommon.js';
3
+ import {
4
+ type ApiCommon,
5
+ type ApiCommonData,
6
+ type ApiError,
7
+ type ApiSuccess,
8
+ type Flatten,
9
+ type Revivers,
10
+ deletedNoneParam,
11
+ request,
12
+ } from '../utils.js';
13
+
14
+ export type Job = {
15
+ id: number;
16
+ jobTypeId: number;
17
+ title: string;
18
+ previewPath: string | undefined;
19
+ createdAt: string;
20
+ star: boolean;
21
+ jobFolderId: number | null;
22
+ userEmail: string | undefined;
23
+ jobFolderName: string | null;
24
+ userId: number;
25
+ orgName: string | undefined;
26
+ };
27
+
28
+ export type ApiJob = {
29
+ data: {
30
+ id: number; // The job id (sortable)
31
+ job_type_id: number; // The id of the job type (searchable)
32
+ user_id: number; // The user id (searchable)
33
+ title: string; // The title of the job (searchable, sortable)
34
+ description: string | null; // The description of the job (searchable, sortable)
35
+ share_token: string | null; // The token used for sharing this job
36
+ autosave_preview_path: string | null; // The preview path of the Job
37
+ job_folder_id: number | null; // TODO: not present in API specification!
38
+ job_folder_name?: string | null; // TODO: not present in API specification!
39
+ star: boolean; // TODO: not present in API specification!
40
+ } & ApiCommonData;
41
+ } & Omit<ApiSuccess, 'data'> | ApiError;
42
+
43
+ export type ApiJobData = Flatten<Exclude<ApiJob, ApiError>['data']>;
44
+
45
+ export const jobRevivers: Revivers<ApiJob, Job> = {
46
+ description: undefined,
47
+ share_token: undefined,
48
+ autosave_preview_path: undefined,
49
+
50
+ jobTypeId: () => 9,
51
+ jobFolderName: (data: ApiJobData) => data.job_folder_name ?? null,
52
+ createdAt: (data: ApiJobData) => data.created_at as string,
53
+ previewPath: (data: ApiJobData) => data.autosave_preview_path ?? undefined,
54
+ };
55
+
56
+ export async function createJob(title: string): Promise<Job> {
57
+ const path = `/v1/jobs`;
58
+ const body = { title, job_type_id: 9 };
59
+ const options = { revivers: jobRevivers };
60
+
61
+ // Technically, the returning `data` will contain only the following fields:
62
+ // Pick<ApiJobData, 'id' | 'job_type_id' | 'user_id' | 'title' | 'created_at' | 'updated_at'>
63
+
64
+ return request<ApiJob, Job>(path, body, null, options);
65
+ }
66
+
67
+ export async function getJob(jobId: number): Promise<Job> {
68
+ const path = `/v1/jobs/${jobId}`;
69
+ const options = { revivers: jobRevivers };
70
+
71
+ return request<ApiJob, Job>(path, null, null, options);
72
+ }
73
+
74
+ export async function deleteJob(jobId: number): Promise<Record<string, never>> {
75
+ const path = `/v1/jobs/${jobId}`;
76
+
77
+ return request<ApiCommon, Record<string, never>>(path, null, null, { method: 'DELETE' });
78
+ }
79
+
80
+ export async function updateJob(jobId: number, newTitle: string): Promise<Record<string, never>> {
81
+ const path = `/v1/jobs/${jobId}`;
82
+ const body = { title: newTitle };
83
+
84
+ return request<ApiCommon, Record<string, never>>(path, body, null, { method: 'PATCH' });
85
+ }
86
+
87
+ export async function updateJobFolder(jobId: number, folderId: number | null): Promise<Record<string, never>> {
88
+ const path = `/v1/jobs/${jobId}`;
89
+ const body = { job_folder_id: folderId };
90
+
91
+ return request<ApiCommon, Record<string, never>>(path, body, null, { method: 'PATCH' });
92
+ }
93
+
94
+ export async function starJob(jobId: number, star: boolean): Promise<Record<string, never>> {
95
+ const path = `/v1/jobs/${jobId}`;
96
+ const body = { star };
97
+
98
+ return request<ApiCommon, Record<string, never>>(path, body, null, { method: 'PATCH' });
99
+ }
100
+
101
+ export async function generateJobShare(
102
+ jobId: number,
103
+ visibility: JobShareVisibility,
104
+ ): Promise<JobShare> {
105
+ const path = `/v1/jobs/${jobId}/share`;
106
+ const body = { visibility };
107
+
108
+ return request<ApiJobShare, JobShare>(path, body);
109
+ }
110
+
111
+ export async function uploadJobPreview(
112
+ jobId: number,
113
+ preview: Blob,
114
+ ): Promise<Record<string, never>> {
115
+ const pathname = `/v1/jobs/${jobId}/preview`;
116
+ const path = `${pathname}?${deletedNoneParam}`;
117
+ const body = new FormData();
118
+
119
+ body.append('preview', preview);
120
+
121
+ return request<ApiCommon, Record<string, never>>(path, body);
122
+ }
123
+
124
+ export async function listFeaturedJobs(
125
+ title: string,
126
+ page: number,
127
+ options?: Record<string, unknown>,
128
+ ): Promise<JobSearchResult> {
129
+ return listJobs(`/v1/jobs/featured`, title, page, options);
130
+ }