deno.land / x / postal_code@v0.1.0 / types.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
export interface ThaiPostalOption { en: string; th: string;}
export interface PostalAddress { code: number; province: ThaiPostalOption; district: ThaiPostalOption; subDistrict: ThaiPostalOption; region?: string;}
export interface AddressAnwser { code: number; province: string; district: string; subDistrict: string; region?: string;}
/** * PostalCodeOptions * * An object to describe which addresses data should be used. * The default configuration is: * * ```ts * { * country: "th", * resourceUrl: "https://raw.githubusercontent.com/santa-soft/postal-code/main/.local/th/postal_codes.json", * cachePath: "./.local/th/postal_codes.json", * lang: "en" * } * ``` */export interface PostalCodeOptions { /** * Configure address of which country * * ### *** Only support Thailand for now. */ country?: string; /** * Configure url of json data file which contains addresses and zip code. */ resourceUrl?: string; /** * Configure local path when load json data of addresses from `resourceUrl`. */ cachePath?: string; /** * Configure of output data when you query with `.addressOf()` function. */ lang?: string;}
postal_code

Version Info

Tagged at
a year ago