@cavuno/board 1.37.0 → 1.39.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/README.md +7 -0
- package/dist/{jobs-CMCADU_-.d.mts → _spec-DxC1ze93.d.mts} +57 -100
- package/dist/{jobs-CMCADU_-.d.ts → _spec-DxC1ze93.d.ts} +57 -100
- package/dist/{board-D_BRa2zC.d.ts → board-CqYibYUA.d.mts} +1 -1
- package/dist/{board-D0guOBYy.d.mts → board-RfZEAJse.d.ts} +1 -1
- package/dist/filters.d.mts +18 -4
- package/dist/filters.d.ts +18 -4
- package/dist/filters.js +17 -0
- package/dist/filters.mjs +17 -0
- package/dist/format.d.mts +3 -2
- package/dist/format.d.ts +3 -2
- package/dist/index.d.mts +17 -73
- package/dist/index.d.ts +17 -73
- package/dist/index.js +22 -1
- package/dist/index.mjs +22 -1
- package/dist/jobs-CLLIvtMc.d.ts +105 -0
- package/dist/jobs-DPPA1Nev.d.mts +105 -0
- package/dist/{salaries-9U42CM5A.d.mts → salaries-DK4RnJnw.d.ts} +2 -1
- package/dist/{salaries-C3w9kvPJ.d.ts → salaries-Rb5h_eVZ.d.mts} +2 -1
- package/dist/search-CqBa1Qc4.d.mts +81 -0
- package/dist/search-DBoMM-gE.d.ts +81 -0
- package/dist/seo.d.mts +4 -3
- package/dist/seo.d.ts +4 -3
- package/dist/server.d.mts +5 -3
- package/dist/server.d.ts +5 -3
- package/dist/sitemap.d.mts +5 -3
- package/dist/sitemap.d.ts +5 -3
- package/dist/suggest.d.mts +70 -0
- package/dist/suggest.d.ts +70 -0
- package/dist/suggest.js +165 -0
- package/dist/suggest.mjs +144 -0
- package/package.json +11 -1
- package/skills/cavuno-board-filters/SKILL.md +11 -4
- package/skills/cavuno-board-jobs/SKILL.md +18 -2
- package/skills/cavuno-board-suggest/SKILL.md +119 -0
- package/skills/manifest.json +9 -2
package/README.md
CHANGED
|
@@ -39,6 +39,13 @@ const board = createBoardClient({
|
|
|
39
39
|
const { name, theme, features } = await board.context();
|
|
40
40
|
const page = await board.jobs.list({ limit: 20 });
|
|
41
41
|
const job = await board.jobs.retrieve('senior-chef');
|
|
42
|
+
|
|
43
|
+
// Federated search-dropdown suggestions (companies + taxonomy terms).
|
|
44
|
+
const { items } = await board.search.suggest({ q: 'acme', limit: 10 });
|
|
45
|
+
// Or the headless controller (debounce / abort / stale-drop built in):
|
|
46
|
+
// import { createSuggestController } from '@cavuno/board/suggest';
|
|
47
|
+
// const suggest = createSuggestController(board);
|
|
48
|
+
// suggest.setQuery('acme');
|
|
42
49
|
```
|
|
43
50
|
|
|
44
51
|
Every method accepts trailing `FetchOptions` — `signal`, `headers`, and
|
|
@@ -962,6 +962,25 @@ interface components {
|
|
|
962
962
|
boardP75Max: number | null;
|
|
963
963
|
currency: string;
|
|
964
964
|
};
|
|
965
|
+
CompanySuggestion: {
|
|
966
|
+
/** @enum {string} */
|
|
967
|
+
object: "suggestion";
|
|
968
|
+
/**
|
|
969
|
+
* @description discriminator enum property added by openapi-typescript
|
|
970
|
+
* @enum {string}
|
|
971
|
+
*/
|
|
972
|
+
type: "company";
|
|
973
|
+
/** @description Stable company identity. */
|
|
974
|
+
id: string;
|
|
975
|
+
/** @description Public company URL slug. */
|
|
976
|
+
slug: string;
|
|
977
|
+
/** @description Company display name. */
|
|
978
|
+
name: string;
|
|
979
|
+
/** @description Company logo URL, or `null` when none is set. */
|
|
980
|
+
logoUrl: string | null;
|
|
981
|
+
/** @description Live published-job count for this company on the board. */
|
|
982
|
+
jobCount: number;
|
|
983
|
+
};
|
|
965
984
|
CompanySummary: {
|
|
966
985
|
/** @description Unique identifier for the object. Use this value as the `{id}` path parameter for the company endpoints (e.g. `GET /v1/companies/{id}`). */
|
|
967
986
|
id: string;
|
|
@@ -1707,8 +1726,8 @@ interface components {
|
|
|
1707
1726
|
* @enum {string}
|
|
1708
1727
|
*/
|
|
1709
1728
|
seniority?: "entry_level" | "associate" | "mid_level" | "senior" | "lead" | "principal" | "director" | "executive";
|
|
1710
|
-
/** @description Where candidates apply. Accepts an HTTPS URL, a `mailto:` URI, or a bare email address (normalized to `mailto:` form). */
|
|
1711
|
-
applicationUrl
|
|
1729
|
+
/** @description Where candidates apply. Accepts an HTTPS URL, a `mailto:` URI, or a bare email address (normalized to `mailto:` form). Omit to collect applications on the board (built-in applications). */
|
|
1730
|
+
applicationUrl?: string;
|
|
1712
1731
|
/** @description Minimum salary, in `salaryCurrency` units. */
|
|
1713
1732
|
salaryMin?: number;
|
|
1714
1733
|
/** @description Maximum salary, in `salaryCurrency` units. */
|
|
@@ -1938,8 +1957,8 @@ interface components {
|
|
|
1938
1957
|
* @enum {string}
|
|
1939
1958
|
*/
|
|
1940
1959
|
seniority?: "entry_level" | "associate" | "mid_level" | "senior" | "lead" | "principal" | "director" | "executive";
|
|
1941
|
-
/** @description Where candidates apply. Accepts an HTTPS URL, a `mailto:` URI, or a bare email address (
|
|
1942
|
-
applicationUrl?: string;
|
|
1960
|
+
/** @description Where candidates apply. Accepts an HTTPS URL, a `mailto:` URI, or a bare email address (normalized to `mailto:` form). Pass `null` to clear the stored value and switch the job to on-board (built-in) applications. Omitted means unchanged. */
|
|
1961
|
+
applicationUrl?: string | null;
|
|
1943
1962
|
/** @description Minimum salary, in `salaryCurrency` units. */
|
|
1944
1963
|
salaryMin?: number;
|
|
1945
1964
|
/** @description Maximum salary, in `salaryCurrency` units. */
|
|
@@ -3449,6 +3468,8 @@ interface components {
|
|
|
3449
3468
|
filters?: {
|
|
3450
3469
|
/** @description Only return jobs at any of the given company IDs. Up to 10 values. */
|
|
3451
3470
|
companyId?: string[];
|
|
3471
|
+
/** @description Company slugs (the public URL identity). Up to 10. Resolved server-side; unknown slugs are dropped. Combined with `companyId` as a union. If the provided company filter resolves to no known companies, the result is empty. */
|
|
3472
|
+
companySlug?: string[];
|
|
3452
3473
|
/** @description Only return jobs with any of the given remote-work options. Up to 10 values. */
|
|
3453
3474
|
remoteOption?: ("on_site" | "hybrid" | "remote")[];
|
|
3454
3475
|
/** @description Only return jobs with any of the given employment types. Up to 10 values. */
|
|
@@ -4172,6 +4193,15 @@ interface components {
|
|
|
4172
4193
|
createdAt: string;
|
|
4173
4194
|
})[];
|
|
4174
4195
|
};
|
|
4196
|
+
SuggestResult: {
|
|
4197
|
+
/** @enum {string} */
|
|
4198
|
+
object: "suggest_result";
|
|
4199
|
+
/** @description The trimmed query string that produced these suggestions. */
|
|
4200
|
+
query: string;
|
|
4201
|
+
/** @description Interleaved company + taxonomy-term suggestions. Order is server-ranked; clients must not re-sort. */
|
|
4202
|
+
items: components["schemas"]["SuggestionItem"][];
|
|
4203
|
+
};
|
|
4204
|
+
SuggestionItem: components["schemas"]["CompanySuggestion"] | components["schemas"]["TermSuggestion"];
|
|
4175
4205
|
TalentDirectoryEntry: {
|
|
4176
4206
|
/** @enum {string} */
|
|
4177
4207
|
object: "talent_directory_entry";
|
|
@@ -4254,6 +4284,28 @@ interface components {
|
|
|
4254
4284
|
locality: string | null;
|
|
4255
4285
|
placeType: string | null;
|
|
4256
4286
|
} | null;
|
|
4287
|
+
TermSuggestion: {
|
|
4288
|
+
/** @enum {string} */
|
|
4289
|
+
object: "suggestion";
|
|
4290
|
+
/**
|
|
4291
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4292
|
+
* @enum {string}
|
|
4293
|
+
*/
|
|
4294
|
+
type: "term";
|
|
4295
|
+
/**
|
|
4296
|
+
* @description Whether this taxonomy term is a category or a skill.
|
|
4297
|
+
* @enum {string}
|
|
4298
|
+
*/
|
|
4299
|
+
termType: "category" | "skill";
|
|
4300
|
+
/** @description Stable taxonomy entity ID. */
|
|
4301
|
+
id: string;
|
|
4302
|
+
/** @description Current source-locale slug used by job search; old slugs may remain aliases. */
|
|
4303
|
+
sourceSlug: string;
|
|
4304
|
+
/** @description Board-language canonical URL slug. */
|
|
4305
|
+
canonicalSlug: string;
|
|
4306
|
+
/** @description Board-language name with source-name fallback. */
|
|
4307
|
+
displayName: string;
|
|
4308
|
+
};
|
|
4257
4309
|
TitleLocationSalary: {
|
|
4258
4310
|
/** @enum {string} */
|
|
4259
4311
|
object: "title_location_salary";
|
|
@@ -4784,99 +4836,4 @@ interface components {
|
|
|
4784
4836
|
|
|
4785
4837
|
type Schemas = components['schemas'];
|
|
4786
4838
|
|
|
4787
|
-
|
|
4788
|
-
* Stripe-shaped success envelopes (`01-conventions.md` §5.1). The
|
|
4789
|
-
* server MAY add top-level fields; consumers MUST ignore unknown
|
|
4790
|
-
* fields.
|
|
4791
|
-
*/
|
|
4792
|
-
/**
|
|
4793
|
-
* Optional offset-pagination metadata generated from the Board API contract.
|
|
4794
|
-
* `nextCursor` is preserved alongside for forward cursor iteration.
|
|
4795
|
-
*/
|
|
4796
|
-
type OffsetPagination = Schemas['OffsetPagination'];
|
|
4797
|
-
/** @deprecated Use `OffsetPagination`. */
|
|
4798
|
-
type StorefrontPagination = OffsetPagination;
|
|
4799
|
-
/** @deprecated Use `OffsetPagination`. */
|
|
4800
|
-
type JobCatalogPagination = OffsetPagination;
|
|
4801
|
-
type ListEnvelope<T> = OffsetPagination & {
|
|
4802
|
-
object: 'list';
|
|
4803
|
-
url: string;
|
|
4804
|
-
hasMore: boolean;
|
|
4805
|
-
/** `null` when `hasMore` is false — always present, never undefined. */
|
|
4806
|
-
nextCursor: string | null;
|
|
4807
|
-
data: T[];
|
|
4808
|
-
};
|
|
4809
|
-
type SearchEnvelope<T> = OffsetPagination & {
|
|
4810
|
-
object: 'search_result';
|
|
4811
|
-
url: string;
|
|
4812
|
-
hasMore: boolean;
|
|
4813
|
-
nextCursor: string | null;
|
|
4814
|
-
data: T[];
|
|
4815
|
-
};
|
|
4816
|
-
|
|
4817
|
-
type PublicJob = Schemas['PublicJob'];
|
|
4818
|
-
type PublicJobCard = Schemas['PublicJobCard'];
|
|
4819
|
-
/**
|
|
4820
|
-
* A job's opaque, display-only custom-field values (CAV-294), keyed by each
|
|
4821
|
-
* field's `key`. Resolve labels via the board's `CustomFieldDefinition`s
|
|
4822
|
-
* (`board.context().customFields`).
|
|
4823
|
-
*/
|
|
4824
|
-
type CustomFieldValues = PublicJob['customFieldValues'];
|
|
4825
|
-
type CustomFieldValue = CustomFieldValues[string];
|
|
4826
|
-
type JobCompany = Schemas['JobCompany'];
|
|
4827
|
-
type OfficeLocation = Schemas['JobOfficeLocation'];
|
|
4828
|
-
type RemoteOption = NonNullable<PublicJob['remoteOption']>;
|
|
4829
|
-
type EmploymentType = NonNullable<PublicJob['employmentType']>;
|
|
4830
|
-
type Seniority = NonNullable<PublicJob['seniority']>;
|
|
4831
|
-
/** Candidate-facing result ordering (ADR-0048); `relevance` is the default. */
|
|
4832
|
-
type JobSort = NonNullable<Schemas['PublicSearchJobsBody']['sort']>;
|
|
4833
|
-
type EducationRequirement = PublicJob['educationRequirements'][number];
|
|
4834
|
-
type RemotePermit = PublicJob['remotePermits'][number];
|
|
4835
|
-
type RemoteTimezone = PublicJob['remoteTimezones'][number];
|
|
4836
|
-
/**
|
|
4837
|
-
* Derived suggestion on a browse list (ADR-0037 §8): jobs surface `category`
|
|
4838
|
-
* and `skill` terms; the companies list surfaces `market` terms.
|
|
4839
|
-
*/
|
|
4840
|
-
interface RelatedSearch {
|
|
4841
|
-
type: 'category' | 'skill' | 'market';
|
|
4842
|
-
slug: string;
|
|
4843
|
-
term: string;
|
|
4844
|
-
count: number;
|
|
4845
|
-
}
|
|
4846
|
-
/** The browse list envelope — `PublicJobCard`s + job catalog pagination + `relatedSearches`. */
|
|
4847
|
-
type JobCardListEnvelope = ListEnvelope<PublicJobCard> & {
|
|
4848
|
-
relatedSearches?: RelatedSearch[];
|
|
4849
|
-
};
|
|
4850
|
-
/** The search envelope — `PublicJobCard`s + job catalog pagination. */
|
|
4851
|
-
type JobCardSearchEnvelope = SearchEnvelope<PublicJobCard>;
|
|
4852
|
-
type JobsListQuery = {
|
|
4853
|
-
cursor?: string;
|
|
4854
|
-
/** 1–100. */
|
|
4855
|
-
limit?: number;
|
|
4856
|
-
/** Job catalog page offset; takes precedence over `cursor`. `offset + limit` ≤ 10,000. */
|
|
4857
|
-
offset?: number;
|
|
4858
|
-
/** Repeated param (up to 10) — OR-matched. Repeat `companyId` per value. */
|
|
4859
|
-
companyId?: string[];
|
|
4860
|
-
remoteOption?: RemoteOption[];
|
|
4861
|
-
employmentType?: EmploymentType[];
|
|
4862
|
-
seniority?: Seniority[];
|
|
4863
|
-
/** Result ordering (ADR-0048). Absent ⇒ `relevance` (the featured-ranked browse). */
|
|
4864
|
-
sort?: JobSort;
|
|
4865
|
-
/** Place slug for a geo radius search; unresolvable slugs are ignored. */
|
|
4866
|
-
location?: string;
|
|
4867
|
-
/** Radius in km around `location` (10–250; default 50). */
|
|
4868
|
-
radius?: number;
|
|
4869
|
-
/** Category slug seed (the `/jobs/[keyword]` page) — server resolves it to the English source name; unresolvable → 404. */
|
|
4870
|
-
category?: string;
|
|
4871
|
-
/** Skill slug seed (the `/jobs/skills/[skill]` page) — server-resolved; unresolvable → 404. */
|
|
4872
|
-
skill?: string;
|
|
4873
|
-
/** Sparse fieldset (Medusa-style `+field`). Only `'+description'` is supported — adds `description` to each card. */
|
|
4874
|
-
fields?: string;
|
|
4875
|
-
};
|
|
4876
|
-
type JobsSimilarQuery = {
|
|
4877
|
-
/** How many similar jobs to return (1–20; default 5). */
|
|
4878
|
-
limit?: number;
|
|
4879
|
-
};
|
|
4880
|
-
type JobsSearchBody = Schemas['PublicSearchJobsBody'];
|
|
4881
|
-
|
|
4882
|
-
export type { CustomFieldValues as C, EmploymentType as E, JobSort as J, ListEnvelope as L, OfficeLocation as O, PublicJob as P, RemoteOption as R, Seniority as S, PublicJobCard as a, Schemas as b, components as c, JobsListQuery as d, JobCardListEnvelope as e, JobsSearchBody as f, JobCardSearchEnvelope as g, JobsSimilarQuery as h, SearchEnvelope as i, CustomFieldValue as j, EducationRequirement as k, JobCatalogPagination as l, JobCompany as m, OffsetPagination as n, RelatedSearch as o, RemotePermit as p, RemoteTimezone as q, StorefrontPagination as r };
|
|
4839
|
+
export type { Schemas as S, components as c };
|
|
@@ -962,6 +962,25 @@ interface components {
|
|
|
962
962
|
boardP75Max: number | null;
|
|
963
963
|
currency: string;
|
|
964
964
|
};
|
|
965
|
+
CompanySuggestion: {
|
|
966
|
+
/** @enum {string} */
|
|
967
|
+
object: "suggestion";
|
|
968
|
+
/**
|
|
969
|
+
* @description discriminator enum property added by openapi-typescript
|
|
970
|
+
* @enum {string}
|
|
971
|
+
*/
|
|
972
|
+
type: "company";
|
|
973
|
+
/** @description Stable company identity. */
|
|
974
|
+
id: string;
|
|
975
|
+
/** @description Public company URL slug. */
|
|
976
|
+
slug: string;
|
|
977
|
+
/** @description Company display name. */
|
|
978
|
+
name: string;
|
|
979
|
+
/** @description Company logo URL, or `null` when none is set. */
|
|
980
|
+
logoUrl: string | null;
|
|
981
|
+
/** @description Live published-job count for this company on the board. */
|
|
982
|
+
jobCount: number;
|
|
983
|
+
};
|
|
965
984
|
CompanySummary: {
|
|
966
985
|
/** @description Unique identifier for the object. Use this value as the `{id}` path parameter for the company endpoints (e.g. `GET /v1/companies/{id}`). */
|
|
967
986
|
id: string;
|
|
@@ -1707,8 +1726,8 @@ interface components {
|
|
|
1707
1726
|
* @enum {string}
|
|
1708
1727
|
*/
|
|
1709
1728
|
seniority?: "entry_level" | "associate" | "mid_level" | "senior" | "lead" | "principal" | "director" | "executive";
|
|
1710
|
-
/** @description Where candidates apply. Accepts an HTTPS URL, a `mailto:` URI, or a bare email address (normalized to `mailto:` form). */
|
|
1711
|
-
applicationUrl
|
|
1729
|
+
/** @description Where candidates apply. Accepts an HTTPS URL, a `mailto:` URI, or a bare email address (normalized to `mailto:` form). Omit to collect applications on the board (built-in applications). */
|
|
1730
|
+
applicationUrl?: string;
|
|
1712
1731
|
/** @description Minimum salary, in `salaryCurrency` units. */
|
|
1713
1732
|
salaryMin?: number;
|
|
1714
1733
|
/** @description Maximum salary, in `salaryCurrency` units. */
|
|
@@ -1938,8 +1957,8 @@ interface components {
|
|
|
1938
1957
|
* @enum {string}
|
|
1939
1958
|
*/
|
|
1940
1959
|
seniority?: "entry_level" | "associate" | "mid_level" | "senior" | "lead" | "principal" | "director" | "executive";
|
|
1941
|
-
/** @description Where candidates apply. Accepts an HTTPS URL, a `mailto:` URI, or a bare email address (
|
|
1942
|
-
applicationUrl?: string;
|
|
1960
|
+
/** @description Where candidates apply. Accepts an HTTPS URL, a `mailto:` URI, or a bare email address (normalized to `mailto:` form). Pass `null` to clear the stored value and switch the job to on-board (built-in) applications. Omitted means unchanged. */
|
|
1961
|
+
applicationUrl?: string | null;
|
|
1943
1962
|
/** @description Minimum salary, in `salaryCurrency` units. */
|
|
1944
1963
|
salaryMin?: number;
|
|
1945
1964
|
/** @description Maximum salary, in `salaryCurrency` units. */
|
|
@@ -3449,6 +3468,8 @@ interface components {
|
|
|
3449
3468
|
filters?: {
|
|
3450
3469
|
/** @description Only return jobs at any of the given company IDs. Up to 10 values. */
|
|
3451
3470
|
companyId?: string[];
|
|
3471
|
+
/** @description Company slugs (the public URL identity). Up to 10. Resolved server-side; unknown slugs are dropped. Combined with `companyId` as a union. If the provided company filter resolves to no known companies, the result is empty. */
|
|
3472
|
+
companySlug?: string[];
|
|
3452
3473
|
/** @description Only return jobs with any of the given remote-work options. Up to 10 values. */
|
|
3453
3474
|
remoteOption?: ("on_site" | "hybrid" | "remote")[];
|
|
3454
3475
|
/** @description Only return jobs with any of the given employment types. Up to 10 values. */
|
|
@@ -4172,6 +4193,15 @@ interface components {
|
|
|
4172
4193
|
createdAt: string;
|
|
4173
4194
|
})[];
|
|
4174
4195
|
};
|
|
4196
|
+
SuggestResult: {
|
|
4197
|
+
/** @enum {string} */
|
|
4198
|
+
object: "suggest_result";
|
|
4199
|
+
/** @description The trimmed query string that produced these suggestions. */
|
|
4200
|
+
query: string;
|
|
4201
|
+
/** @description Interleaved company + taxonomy-term suggestions. Order is server-ranked; clients must not re-sort. */
|
|
4202
|
+
items: components["schemas"]["SuggestionItem"][];
|
|
4203
|
+
};
|
|
4204
|
+
SuggestionItem: components["schemas"]["CompanySuggestion"] | components["schemas"]["TermSuggestion"];
|
|
4175
4205
|
TalentDirectoryEntry: {
|
|
4176
4206
|
/** @enum {string} */
|
|
4177
4207
|
object: "talent_directory_entry";
|
|
@@ -4254,6 +4284,28 @@ interface components {
|
|
|
4254
4284
|
locality: string | null;
|
|
4255
4285
|
placeType: string | null;
|
|
4256
4286
|
} | null;
|
|
4287
|
+
TermSuggestion: {
|
|
4288
|
+
/** @enum {string} */
|
|
4289
|
+
object: "suggestion";
|
|
4290
|
+
/**
|
|
4291
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4292
|
+
* @enum {string}
|
|
4293
|
+
*/
|
|
4294
|
+
type: "term";
|
|
4295
|
+
/**
|
|
4296
|
+
* @description Whether this taxonomy term is a category or a skill.
|
|
4297
|
+
* @enum {string}
|
|
4298
|
+
*/
|
|
4299
|
+
termType: "category" | "skill";
|
|
4300
|
+
/** @description Stable taxonomy entity ID. */
|
|
4301
|
+
id: string;
|
|
4302
|
+
/** @description Current source-locale slug used by job search; old slugs may remain aliases. */
|
|
4303
|
+
sourceSlug: string;
|
|
4304
|
+
/** @description Board-language canonical URL slug. */
|
|
4305
|
+
canonicalSlug: string;
|
|
4306
|
+
/** @description Board-language name with source-name fallback. */
|
|
4307
|
+
displayName: string;
|
|
4308
|
+
};
|
|
4257
4309
|
TitleLocationSalary: {
|
|
4258
4310
|
/** @enum {string} */
|
|
4259
4311
|
object: "title_location_salary";
|
|
@@ -4784,99 +4836,4 @@ interface components {
|
|
|
4784
4836
|
|
|
4785
4837
|
type Schemas = components['schemas'];
|
|
4786
4838
|
|
|
4787
|
-
|
|
4788
|
-
* Stripe-shaped success envelopes (`01-conventions.md` §5.1). The
|
|
4789
|
-
* server MAY add top-level fields; consumers MUST ignore unknown
|
|
4790
|
-
* fields.
|
|
4791
|
-
*/
|
|
4792
|
-
/**
|
|
4793
|
-
* Optional offset-pagination metadata generated from the Board API contract.
|
|
4794
|
-
* `nextCursor` is preserved alongside for forward cursor iteration.
|
|
4795
|
-
*/
|
|
4796
|
-
type OffsetPagination = Schemas['OffsetPagination'];
|
|
4797
|
-
/** @deprecated Use `OffsetPagination`. */
|
|
4798
|
-
type StorefrontPagination = OffsetPagination;
|
|
4799
|
-
/** @deprecated Use `OffsetPagination`. */
|
|
4800
|
-
type JobCatalogPagination = OffsetPagination;
|
|
4801
|
-
type ListEnvelope<T> = OffsetPagination & {
|
|
4802
|
-
object: 'list';
|
|
4803
|
-
url: string;
|
|
4804
|
-
hasMore: boolean;
|
|
4805
|
-
/** `null` when `hasMore` is false — always present, never undefined. */
|
|
4806
|
-
nextCursor: string | null;
|
|
4807
|
-
data: T[];
|
|
4808
|
-
};
|
|
4809
|
-
type SearchEnvelope<T> = OffsetPagination & {
|
|
4810
|
-
object: 'search_result';
|
|
4811
|
-
url: string;
|
|
4812
|
-
hasMore: boolean;
|
|
4813
|
-
nextCursor: string | null;
|
|
4814
|
-
data: T[];
|
|
4815
|
-
};
|
|
4816
|
-
|
|
4817
|
-
type PublicJob = Schemas['PublicJob'];
|
|
4818
|
-
type PublicJobCard = Schemas['PublicJobCard'];
|
|
4819
|
-
/**
|
|
4820
|
-
* A job's opaque, display-only custom-field values (CAV-294), keyed by each
|
|
4821
|
-
* field's `key`. Resolve labels via the board's `CustomFieldDefinition`s
|
|
4822
|
-
* (`board.context().customFields`).
|
|
4823
|
-
*/
|
|
4824
|
-
type CustomFieldValues = PublicJob['customFieldValues'];
|
|
4825
|
-
type CustomFieldValue = CustomFieldValues[string];
|
|
4826
|
-
type JobCompany = Schemas['JobCompany'];
|
|
4827
|
-
type OfficeLocation = Schemas['JobOfficeLocation'];
|
|
4828
|
-
type RemoteOption = NonNullable<PublicJob['remoteOption']>;
|
|
4829
|
-
type EmploymentType = NonNullable<PublicJob['employmentType']>;
|
|
4830
|
-
type Seniority = NonNullable<PublicJob['seniority']>;
|
|
4831
|
-
/** Candidate-facing result ordering (ADR-0048); `relevance` is the default. */
|
|
4832
|
-
type JobSort = NonNullable<Schemas['PublicSearchJobsBody']['sort']>;
|
|
4833
|
-
type EducationRequirement = PublicJob['educationRequirements'][number];
|
|
4834
|
-
type RemotePermit = PublicJob['remotePermits'][number];
|
|
4835
|
-
type RemoteTimezone = PublicJob['remoteTimezones'][number];
|
|
4836
|
-
/**
|
|
4837
|
-
* Derived suggestion on a browse list (ADR-0037 §8): jobs surface `category`
|
|
4838
|
-
* and `skill` terms; the companies list surfaces `market` terms.
|
|
4839
|
-
*/
|
|
4840
|
-
interface RelatedSearch {
|
|
4841
|
-
type: 'category' | 'skill' | 'market';
|
|
4842
|
-
slug: string;
|
|
4843
|
-
term: string;
|
|
4844
|
-
count: number;
|
|
4845
|
-
}
|
|
4846
|
-
/** The browse list envelope — `PublicJobCard`s + job catalog pagination + `relatedSearches`. */
|
|
4847
|
-
type JobCardListEnvelope = ListEnvelope<PublicJobCard> & {
|
|
4848
|
-
relatedSearches?: RelatedSearch[];
|
|
4849
|
-
};
|
|
4850
|
-
/** The search envelope — `PublicJobCard`s + job catalog pagination. */
|
|
4851
|
-
type JobCardSearchEnvelope = SearchEnvelope<PublicJobCard>;
|
|
4852
|
-
type JobsListQuery = {
|
|
4853
|
-
cursor?: string;
|
|
4854
|
-
/** 1–100. */
|
|
4855
|
-
limit?: number;
|
|
4856
|
-
/** Job catalog page offset; takes precedence over `cursor`. `offset + limit` ≤ 10,000. */
|
|
4857
|
-
offset?: number;
|
|
4858
|
-
/** Repeated param (up to 10) — OR-matched. Repeat `companyId` per value. */
|
|
4859
|
-
companyId?: string[];
|
|
4860
|
-
remoteOption?: RemoteOption[];
|
|
4861
|
-
employmentType?: EmploymentType[];
|
|
4862
|
-
seniority?: Seniority[];
|
|
4863
|
-
/** Result ordering (ADR-0048). Absent ⇒ `relevance` (the featured-ranked browse). */
|
|
4864
|
-
sort?: JobSort;
|
|
4865
|
-
/** Place slug for a geo radius search; unresolvable slugs are ignored. */
|
|
4866
|
-
location?: string;
|
|
4867
|
-
/** Radius in km around `location` (10–250; default 50). */
|
|
4868
|
-
radius?: number;
|
|
4869
|
-
/** Category slug seed (the `/jobs/[keyword]` page) — server resolves it to the English source name; unresolvable → 404. */
|
|
4870
|
-
category?: string;
|
|
4871
|
-
/** Skill slug seed (the `/jobs/skills/[skill]` page) — server-resolved; unresolvable → 404. */
|
|
4872
|
-
skill?: string;
|
|
4873
|
-
/** Sparse fieldset (Medusa-style `+field`). Only `'+description'` is supported — adds `description` to each card. */
|
|
4874
|
-
fields?: string;
|
|
4875
|
-
};
|
|
4876
|
-
type JobsSimilarQuery = {
|
|
4877
|
-
/** How many similar jobs to return (1–20; default 5). */
|
|
4878
|
-
limit?: number;
|
|
4879
|
-
};
|
|
4880
|
-
type JobsSearchBody = Schemas['PublicSearchJobsBody'];
|
|
4881
|
-
|
|
4882
|
-
export type { CustomFieldValues as C, EmploymentType as E, JobSort as J, ListEnvelope as L, OfficeLocation as O, PublicJob as P, RemoteOption as R, Seniority as S, PublicJobCard as a, Schemas as b, components as c, JobsListQuery as d, JobCardListEnvelope as e, JobsSearchBody as f, JobCardSearchEnvelope as g, JobsSimilarQuery as h, SearchEnvelope as i, CustomFieldValue as j, EducationRequirement as k, JobCatalogPagination as l, JobCompany as m, OffsetPagination as n, RelatedSearch as o, RemotePermit as p, RemoteTimezone as q, StorefrontPagination as r };
|
|
4839
|
+
export type { Schemas as S, components as c };
|
package/dist/filters.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { B as BoardLabelOverrides } from './ui-copy-CKfFTtLk.mjs';
|
|
2
|
-
import { J as JobSort, E as EmploymentType, R as RemoteOption, S as Seniority } from './jobs-
|
|
2
|
+
import { J as JobSort, E as EmploymentType, R as RemoteOption, S as Seniority } from './jobs-DPPA1Nev.mjs';
|
|
3
|
+
import './_spec-DxC1ze93.mjs';
|
|
3
4
|
|
|
4
5
|
declare const REMOTE_OPTIONS: readonly RemoteOption[];
|
|
5
6
|
/**
|
|
@@ -33,6 +34,12 @@ interface ListingFilters {
|
|
|
33
34
|
employmentType?: EmploymentType;
|
|
34
35
|
/** Multi-select (parity with the hosted board's seniority checkboxes). */
|
|
35
36
|
seniority?: Seniority[];
|
|
37
|
+
/**
|
|
38
|
+
* Company filter as PUBLIC SLUGS (the URL identity). Multi-select tolerated
|
|
39
|
+
* in URLs (comma-joined); the hosted UI applies single-replace. Map to the
|
|
40
|
+
* wire as `companySlug` (`jobs.list` query / `jobs.search` filters).
|
|
41
|
+
*/
|
|
42
|
+
company?: string[];
|
|
36
43
|
/** Result ordering (ADR-0048); absent ⇒ `relevance`. */
|
|
37
44
|
sort?: JobSort;
|
|
38
45
|
}
|
|
@@ -42,14 +49,21 @@ interface ListingFilters {
|
|
|
42
49
|
* semantics: trim, lowercase, drop unknowns, dedupe preserving order.
|
|
43
50
|
*/
|
|
44
51
|
declare function parseSeniority(raw: unknown): Seniority[] | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Normalise raw company-slug input — an array (repeated params) or a
|
|
54
|
+
* comma-string (hand-typed URL) — with the hosted semantics: trim,
|
|
55
|
+
* lowercase, drop empties, dedupe preserving order, then cap at 10
|
|
56
|
+
* (the wire max; keep FIRST 10). Open value set (no vocabulary).
|
|
57
|
+
*/
|
|
58
|
+
declare function parseCompany(raw: unknown): string[] | undefined;
|
|
45
59
|
/**
|
|
46
60
|
* Validate raw URL search params into the supported listing filters,
|
|
47
61
|
* dropping unknown values (never throwing — listing URLs are public input).
|
|
48
62
|
*
|
|
49
63
|
* @example
|
|
50
|
-
* parseListingFilters({ seniority: 'senior,lead', sort: 'newest' });
|
|
51
|
-
* // { seniority: ['senior', 'lead'], sort: 'newest' }
|
|
64
|
+
* parseListingFilters({ seniority: 'senior,lead', company: 'acme', sort: 'newest' });
|
|
65
|
+
* // { seniority: ['senior', 'lead'], company: ['acme'], sort: 'newest' }
|
|
52
66
|
*/
|
|
53
67
|
declare function parseListingFilters(search: Record<string, unknown>): ListingFilters;
|
|
54
68
|
|
|
55
|
-
export { DEFAULT_SORT, EMPLOYMENT_TYPES, JOB_SORTS, type ListingFilters, REMOTE_OPTIONS, SENIORITIES, parseListingFilters, parseSeniority, seniorityLabels, sortLabels };
|
|
69
|
+
export { DEFAULT_SORT, EMPLOYMENT_TYPES, JOB_SORTS, type ListingFilters, REMOTE_OPTIONS, SENIORITIES, parseCompany, parseListingFilters, parseSeniority, seniorityLabels, sortLabels };
|
package/dist/filters.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { B as BoardLabelOverrides } from './ui-copy-CKfFTtLk.js';
|
|
2
|
-
import { J as JobSort, E as EmploymentType, R as RemoteOption, S as Seniority } from './jobs-
|
|
2
|
+
import { J as JobSort, E as EmploymentType, R as RemoteOption, S as Seniority } from './jobs-CLLIvtMc.js';
|
|
3
|
+
import './_spec-DxC1ze93.js';
|
|
3
4
|
|
|
4
5
|
declare const REMOTE_OPTIONS: readonly RemoteOption[];
|
|
5
6
|
/**
|
|
@@ -33,6 +34,12 @@ interface ListingFilters {
|
|
|
33
34
|
employmentType?: EmploymentType;
|
|
34
35
|
/** Multi-select (parity with the hosted board's seniority checkboxes). */
|
|
35
36
|
seniority?: Seniority[];
|
|
37
|
+
/**
|
|
38
|
+
* Company filter as PUBLIC SLUGS (the URL identity). Multi-select tolerated
|
|
39
|
+
* in URLs (comma-joined); the hosted UI applies single-replace. Map to the
|
|
40
|
+
* wire as `companySlug` (`jobs.list` query / `jobs.search` filters).
|
|
41
|
+
*/
|
|
42
|
+
company?: string[];
|
|
36
43
|
/** Result ordering (ADR-0048); absent ⇒ `relevance`. */
|
|
37
44
|
sort?: JobSort;
|
|
38
45
|
}
|
|
@@ -42,14 +49,21 @@ interface ListingFilters {
|
|
|
42
49
|
* semantics: trim, lowercase, drop unknowns, dedupe preserving order.
|
|
43
50
|
*/
|
|
44
51
|
declare function parseSeniority(raw: unknown): Seniority[] | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Normalise raw company-slug input — an array (repeated params) or a
|
|
54
|
+
* comma-string (hand-typed URL) — with the hosted semantics: trim,
|
|
55
|
+
* lowercase, drop empties, dedupe preserving order, then cap at 10
|
|
56
|
+
* (the wire max; keep FIRST 10). Open value set (no vocabulary).
|
|
57
|
+
*/
|
|
58
|
+
declare function parseCompany(raw: unknown): string[] | undefined;
|
|
45
59
|
/**
|
|
46
60
|
* Validate raw URL search params into the supported listing filters,
|
|
47
61
|
* dropping unknown values (never throwing — listing URLs are public input).
|
|
48
62
|
*
|
|
49
63
|
* @example
|
|
50
|
-
* parseListingFilters({ seniority: 'senior,lead', sort: 'newest' });
|
|
51
|
-
* // { seniority: ['senior', 'lead'], sort: 'newest' }
|
|
64
|
+
* parseListingFilters({ seniority: 'senior,lead', company: 'acme', sort: 'newest' });
|
|
65
|
+
* // { seniority: ['senior', 'lead'], company: ['acme'], sort: 'newest' }
|
|
52
66
|
*/
|
|
53
67
|
declare function parseListingFilters(search: Record<string, unknown>): ListingFilters;
|
|
54
68
|
|
|
55
|
-
export { DEFAULT_SORT, EMPLOYMENT_TYPES, JOB_SORTS, type ListingFilters, REMOTE_OPTIONS, SENIORITIES, parseListingFilters, parseSeniority, seniorityLabels, sortLabels };
|
|
69
|
+
export { DEFAULT_SORT, EMPLOYMENT_TYPES, JOB_SORTS, type ListingFilters, REMOTE_OPTIONS, SENIORITIES, parseCompany, parseListingFilters, parseSeniority, seniorityLabels, sortLabels };
|
package/dist/filters.js
CHANGED
|
@@ -25,6 +25,7 @@ __export(filters_exports, {
|
|
|
25
25
|
JOB_SORTS: () => JOB_SORTS,
|
|
26
26
|
REMOTE_OPTIONS: () => REMOTE_OPTIONS,
|
|
27
27
|
SENIORITIES: () => SENIORITIES,
|
|
28
|
+
parseCompany: () => parseCompany,
|
|
28
29
|
parseListingFilters: () => parseListingFilters,
|
|
29
30
|
parseSeniority: () => parseSeniority,
|
|
30
31
|
seniorityLabels: () => seniorityLabels,
|
|
@@ -746,6 +747,7 @@ function sortLabels(locale, labels) {
|
|
|
746
747
|
salary_high: copy.sortSalaryHighLabel
|
|
747
748
|
};
|
|
748
749
|
}
|
|
750
|
+
var COMPANY_SLUG_MAX = 10;
|
|
749
751
|
var SENIORITY_LOOKUP = new Set(SENIORITIES);
|
|
750
752
|
function parseSeniority(raw) {
|
|
751
753
|
const values = Array.isArray(raw) ? raw : typeof raw === "string" && raw ? raw.split(",") : [];
|
|
@@ -761,6 +763,20 @@ function parseSeniority(raw) {
|
|
|
761
763
|
}
|
|
762
764
|
return result.length > 0 ? result : void 0;
|
|
763
765
|
}
|
|
766
|
+
function parseCompany(raw) {
|
|
767
|
+
const values = Array.isArray(raw) ? raw : typeof raw === "string" && raw ? raw.split(",") : [];
|
|
768
|
+
const result = [];
|
|
769
|
+
const seen = /* @__PURE__ */ new Set();
|
|
770
|
+
for (const value of values) {
|
|
771
|
+
if (typeof value !== "string") continue;
|
|
772
|
+
const normalized = value.trim().toLowerCase();
|
|
773
|
+
if (!normalized || seen.has(normalized)) continue;
|
|
774
|
+
seen.add(normalized);
|
|
775
|
+
result.push(normalized);
|
|
776
|
+
if (result.length >= COMPANY_SLUG_MAX) break;
|
|
777
|
+
}
|
|
778
|
+
return result.length > 0 ? result : void 0;
|
|
779
|
+
}
|
|
764
780
|
function parseListingFilters(search) {
|
|
765
781
|
return {
|
|
766
782
|
q: typeof search.q === "string" && search.q ? search.q : void 0,
|
|
@@ -769,6 +785,7 @@ function parseListingFilters(search) {
|
|
|
769
785
|
search.employmentType
|
|
770
786
|
) ? search.employmentType : void 0,
|
|
771
787
|
seniority: parseSeniority(search.seniority),
|
|
788
|
+
company: parseCompany(search.company),
|
|
772
789
|
sort: JOB_SORTS.includes(search.sort) ? search.sort : void 0
|
|
773
790
|
};
|
|
774
791
|
}
|
package/dist/filters.mjs
CHANGED
|
@@ -712,6 +712,7 @@ function sortLabels(locale, labels) {
|
|
|
712
712
|
salary_high: copy.sortSalaryHighLabel
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
|
+
var COMPANY_SLUG_MAX = 10;
|
|
715
716
|
var SENIORITY_LOOKUP = new Set(SENIORITIES);
|
|
716
717
|
function parseSeniority(raw) {
|
|
717
718
|
const values = Array.isArray(raw) ? raw : typeof raw === "string" && raw ? raw.split(",") : [];
|
|
@@ -727,6 +728,20 @@ function parseSeniority(raw) {
|
|
|
727
728
|
}
|
|
728
729
|
return result.length > 0 ? result : void 0;
|
|
729
730
|
}
|
|
731
|
+
function parseCompany(raw) {
|
|
732
|
+
const values = Array.isArray(raw) ? raw : typeof raw === "string" && raw ? raw.split(",") : [];
|
|
733
|
+
const result = [];
|
|
734
|
+
const seen = /* @__PURE__ */ new Set();
|
|
735
|
+
for (const value of values) {
|
|
736
|
+
if (typeof value !== "string") continue;
|
|
737
|
+
const normalized = value.trim().toLowerCase();
|
|
738
|
+
if (!normalized || seen.has(normalized)) continue;
|
|
739
|
+
seen.add(normalized);
|
|
740
|
+
result.push(normalized);
|
|
741
|
+
if (result.length >= COMPANY_SLUG_MAX) break;
|
|
742
|
+
}
|
|
743
|
+
return result.length > 0 ? result : void 0;
|
|
744
|
+
}
|
|
730
745
|
function parseListingFilters(search) {
|
|
731
746
|
return {
|
|
732
747
|
q: typeof search.q === "string" && search.q ? search.q : void 0,
|
|
@@ -735,6 +750,7 @@ function parseListingFilters(search) {
|
|
|
735
750
|
search.employmentType
|
|
736
751
|
) ? search.employmentType : void 0,
|
|
737
752
|
seniority: parseSeniority(search.seniority),
|
|
753
|
+
company: parseCompany(search.company),
|
|
738
754
|
sort: JOB_SORTS.includes(search.sort) ? search.sort : void 0
|
|
739
755
|
};
|
|
740
756
|
}
|
|
@@ -744,6 +760,7 @@ export {
|
|
|
744
760
|
JOB_SORTS,
|
|
745
761
|
REMOTE_OPTIONS,
|
|
746
762
|
SENIORITIES,
|
|
763
|
+
parseCompany,
|
|
747
764
|
parseListingFilters,
|
|
748
765
|
parseSeniority,
|
|
749
766
|
seniorityLabels,
|
package/dist/format.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-
|
|
1
|
+
import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-DPPA1Nev.mjs';
|
|
2
2
|
import { B as BoardLabelOverrides } from './ui-copy-CKfFTtLk.mjs';
|
|
3
3
|
export { A as AlertsCopy, a as ApplyCopy, b as BlogCopy, c as BreadcrumbsCopy, C as CopyLinkCopy, E as EntityCopy, F as FooterCopy, J as JobCardCopy, d as JobDetailCopy, e as JobSearchCopy, N as NavCopy, P as PUBLIC_LABEL_GROUPS, f as PaginationCopy, S as SalaryCopy, U as UiCopy, u as uiCopy } from './ui-copy-CKfFTtLk.mjs';
|
|
4
|
-
import { C as CustomFieldDefinition } from './board-
|
|
4
|
+
import { C as CustomFieldDefinition } from './board-CqYibYUA.mjs';
|
|
5
|
+
import './_spec-DxC1ze93.mjs';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Date display helpers in the board language (required leading parameter,
|
package/dist/format.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-
|
|
1
|
+
import { P as PublicJob, a as PublicJobCard, C as CustomFieldValues } from './jobs-CLLIvtMc.js';
|
|
2
2
|
import { B as BoardLabelOverrides } from './ui-copy-CKfFTtLk.js';
|
|
3
3
|
export { A as AlertsCopy, a as ApplyCopy, b as BlogCopy, c as BreadcrumbsCopy, C as CopyLinkCopy, E as EntityCopy, F as FooterCopy, J as JobCardCopy, d as JobDetailCopy, e as JobSearchCopy, N as NavCopy, P as PUBLIC_LABEL_GROUPS, f as PaginationCopy, S as SalaryCopy, U as UiCopy, u as uiCopy } from './ui-copy-CKfFTtLk.js';
|
|
4
|
-
import { C as CustomFieldDefinition } from './board-
|
|
4
|
+
import { C as CustomFieldDefinition } from './board-RfZEAJse.js';
|
|
5
|
+
import './_spec-DxC1ze93.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Date display helpers in the board language (required leading parameter,
|