@inploi/sdk 3.1.2 → 3.1.3

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.
@@ -0,0 +1,2 @@
1
+ import{a,b}from"./chunk-U6WFJKHV.mjs";export{a as countryCodeOf,b as jobCountryCodes};
2
+ //# sourceMappingURL=sdk.country-codes-R6CUZ3IG.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inploi/sdk",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/inploi/platform.git",
@@ -35,8 +35,9 @@
35
35
  "tsup": "^7.2.0",
36
36
  "vite": "7.3.8",
37
37
  "vitest": "4.1.12",
38
- "@inploi/core": "1.25.0",
39
- "@inploi/talent-bank": "0.72.0",
38
+ "@inploi/core": "2.0.0",
39
+ "@inploi/talent-bank": "0.100.0",
40
+ "@inploi/test-each-row": "0.0.0",
40
41
  "eslint-config-custom": "0.1.0",
41
42
  "tsconfig": "0.1.0"
42
43
  },
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/sdk.country-codes.ts"],"sourcesContent":["/** Names ATS feeds use that are not a country's English name. */\nconst ALIASES: Record<string, string> = {\n\tuk: 'gb',\n\t'great britain': 'gb',\n\tengland: 'gb',\n\tscotland: 'gb',\n\twales: 'gb',\n\t'northern ireland': 'gb',\n\t// County values observed in Kisimul's job feed; do not infer GB for other unknown place names.\n\tlincolnshire: 'gb',\n\tsurrey: 'gb',\n\t'republic of ireland': 'ie',\n\teire: 'ie',\n\t'hong kong sar': 'hk',\n\t'united states of america': 'us',\n\tturkey: 'tr',\n\t'czech republic': 'cz',\n\tburma: 'mm',\n\t// Preserve Intl's existing Kosovo support without treating XK as an ISO subdivision prefix.\n\tkosovo: 'xk',\n\txk: 'xk',\n};\n\n/** All 249 ISO 3166-1 alpha-2 + alpha-3 pairs, packed to keep the browser table small.\n * Source: Unicode CLDR supplementalData.xml, territoryCodes (current ISO countries only).\n * https://raw.githubusercontent.com/unicode-org/cldr/main/common/supplemental/supplementalData.xml */\nconst ISO_COUNTRY_CODES = `adand aeare afafg agatg aiaia alalb amarm aoago aqata ararg asasm ataut auaus awabw axala azaze babih bbbrb bdbgd bebel\nbfbfa bgbgr bhbhr bibdi bjben blblm bmbmu bnbrn bobol bqbes brbra bsbhs btbtn bvbvt bwbwa byblr bzblz cacan cccck cdcod\ncfcaf cgcog chche ciciv ckcok clchl cmcmr cnchn cocol crcri cucub cvcpv cwcuw cxcxr cycyp czcze dedeu djdji dkdnk dmdma\ndodom dzdza ececu eeest egegy ehesh ereri esesp eteth fifin fjfji fkflk fmfsm fofro frfra gagab gbgbr gdgrd gegeo gfguf\nggggy ghgha gigib glgrl gmgmb gngin gpglp gqgnq grgrc gssgs gtgtm gugum gwgnb gyguy hkhkg hmhmd hnhnd hrhrv hthti huhun\nididn ieirl ilisr imimn inind ioiot iqirq irirn isisl itita jejey jmjam jojor jpjpn keken kgkgz khkhm kikir kmcom knkna\nkpprk krkor kwkwt kycym kzkaz lalao lblbn lclca lilie lklka lrlbr lslso ltltu lulux lvlva lylby mamar mcmco mdmda memne\nmfmaf mgmdg mhmhl mkmkd mlmli mmmmr mnmng momac mpmnp mqmtq mrmrt msmsr mtmlt mumus mvmdv mwmwi mxmex mymys mzmoz nanam\nncncl nener nfnfk ngnga ninic nlnld nonor npnpl nrnru nuniu nznzl omomn papan peper pfpyf pgpng phphl pkpak plpol pmspm\npnpcn prpri pspse ptprt pwplw pypry qaqat rereu rorou rssrb rurus rwrwa sasau sbslb scsyc sdsdn seswe sgsgp shshn sisvn\nsjsjm sksvk slsle smsmr snsen sosom srsur ssssd ststp svslv sxsxm sysyr szswz tctca tdtcd tfatf tgtgo ththa tjtjk tktkl\ntltls tmtkm tntun toton trtur tttto tvtuv twtwn tztza uaukr uguga umumi ususa uyury uzuzb vavat vcvct veven vgvgb vivir\nvnvnm vuvut wfwlf wswsm yeyem ytmyt zazaf zmzmb zwzwe`;\n\n/** Each country's lower-case English name, ISO2 and ISO3 code, mapped to its ISO2 code. */\nlet codesByName: Map<string, string> | undefined;\nconst countryCodesByName = () => {\n\tif (codesByName) return codesByName;\n\tcodesByName = new Map();\n\tconst names = new Intl.DisplayNames(['en'], { type: 'region', fallback: 'none' });\n\tfor (const pair of ISO_COUNTRY_CODES.split(/\\s+/)) {\n\t\tconst code = pair.slice(0, 2);\n\t\tconst name = names.of(code.toUpperCase());\n\t\tif (name) codesByName.set(name.toLowerCase(), code);\n\t\tcodesByName.set(code, code);\n\t\tcodesByName.set(pair.slice(2), code);\n\t}\n\treturn codesByName;\n};\n\nconst toCountryCode = (value: string) => {\n\tconst name = value.trim().toLowerCase();\n\tif (Object.prototype.hasOwnProperty.call(ALIASES, name)) return ALIASES[name];\n\tconst country = /^[a-z]{2}-[a-z0-9]{1,3}$/.test(name) ? name.slice(0, 2) : name;\n\treturn countryCodesByName().get(country);\n};\n\n/**\n * The countries a hub's location search covers, as the geocoder's ISO codes, read from the free text its live\n * jobs give as their country (\"United Kingdom\", \"England\", \"GB\", \"GBR\", \"GB-CMA\", \"Republic of Ireland\"). Values\n * that name no country are left out. The caller chooses its own fallback when none is left.\n */\nexport const jobCountryCodes = (jobCountries: string[]): string[] => {\n\tconst codes = new Set(jobCountries.flatMap(value => toCountryCode(value) ?? []));\n\treturn [...codes].sort();\n};\n"],"mappings":"AACA,IAAMA,EAAkC,CACvC,GAAI,KACJ,gBAAiB,KACjB,QAAS,KACT,SAAU,KACV,MAAO,KACP,mBAAoB,KAEpB,aAAc,KACd,OAAQ,KACR,sBAAuB,KACvB,KAAM,KACN,gBAAiB,KACjB,2BAA4B,KAC5B,OAAQ,KACR,iBAAkB,KAClB,MAAO,KAEP,OAAQ,KACR,GAAI,IACL,EAKMC,EAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uDAetBC,EACEC,EAAqB,IAAM,CAChC,GAAID,EAAa,OAAOA,EACxBA,EAAc,IAAI,IAClB,IAAME,EAAQ,IAAI,KAAK,aAAa,CAAC,IAAI,EAAG,CAAE,KAAM,SAAU,SAAU,MAAO,CAAC,EAChF,QAAWC,KAAQJ,EAAkB,MAAM,KAAK,EAAG,CAClD,IAAMK,EAAOD,EAAK,MAAM,EAAG,CAAC,EACtBE,EAAOH,EAAM,GAAGE,EAAK,YAAY,CAAC,EACpCC,GAAML,EAAY,IAAIK,EAAK,YAAY,EAAGD,CAAI,EAClDJ,EAAY,IAAII,EAAMA,CAAI,EAC1BJ,EAAY,IAAIG,EAAK,MAAM,CAAC,EAAGC,CAAI,CACpC,CACA,OAAOJ,CACR,EAEMM,EAAiBC,GAAkB,CACxC,IAAMF,EAAOE,EAAM,KAAK,EAAE,YAAY,EACtC,GAAI,OAAO,UAAU,eAAe,KAAKT,EAASO,CAAI,EAAG,OAAOP,EAAQO,CAAI,EAC5E,IAAMG,EAAU,2BAA2B,KAAKH,CAAI,EAAIA,EAAK,MAAM,EAAG,CAAC,EAAIA,EAC3E,OAAOJ,EAAmB,EAAE,IAAIO,CAAO,CACxC,EAOaC,EAAmBC,GAExB,CAAC,GADM,IAAI,IAAIA,EAAa,QAAQH,GAASD,EAAcC,CAAK,GAAK,CAAC,CAAC,CAAC,CAC/D,EAAE,KAAK","names":["ALIASES","ISO_COUNTRY_CODES","codesByName","countryCodesByName","names","pair","code","name","toCountryCode","value","country","jobCountryCodes","jobCountries"]}
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-KC7FKSIJ.mjs";export{a as jobCountryCodes};
2
- //# sourceMappingURL=sdk.country-codes-W6HRF5SA.mjs.map