customer.graphql 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668
  1. directive @goTag(
  2. key: String!
  3. value: String
  4. ) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
  5. scalar DateTime
  6. scalar UnsignedInt64
  7. scalar URL
  8. scalar HTML
  9. union MetafieldParentResource = Customer
  10. union MetafieldReference = Page
  11. type Query {
  12. # Find a customer by its access token.
  13. customer(customerAccessToken: String!): Customer
  14. }
  15. type Mutation {
  16. # Creates a customer access token.
  17. # The customer access token is required to modify the customer object in any way.
  18. customerAccessTokenCreate(input: CustomerAccessTokenCreateInput!): CustomerAccessTokenCreatePayload
  19. # Renews a customer access token.
  20. #
  21. # Access token renewal must happen before a token expires.
  22. # If a token has already expired, a new one should be created instead via `customerAccessTokenCreate`.
  23. customerAccessTokenRenew(customerAccessToken: String!): CustomerAccessTokenRenewPayload
  24. # Permanently destroys a customer access token.
  25. customerAccessTokenDelete(customerAccessToken: String!): CustomerAccessTokenDeletePayload
  26. # Creates a new customer.
  27. customerCreate(input: CustomerCreateInput!): CustomerCreatePayload
  28. # Updates an existing customer.
  29. customerUpdate(customerAccessToken: String! customer: CustomerUpdateInput!): CustomerUpdatePayload
  30. }
  31. type Page implements Node&HasMetafields&OnlineStorePublishable{
  32. # The description of the page, complete with HTML formatting.
  33. body: HTML!
  34. # Summary of the page body.
  35. bodySummary: String!
  36. # The timestamp of the page creation.
  37. createdAt: DateTime!
  38. # A human-friendly unique string for the page automatically generated from its title.
  39. handle: String!
  40. # A globally-unique identifier.
  41. id: ID!
  42. # Returns a metafield found by namespace and key.
  43. metafield(namespace: String!key: String!): Metafield
  44. # The metafields associated with the resource matching the supplied list of namespaces and keys.
  45. metafields(identifiers: [HasMetafieldsIdentifier!]!): [Metafield]!
  46. # The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel.
  47. onlineStoreUrl: URL
  48. # The page's SEO information.
  49. seo: SEO
  50. # The title of the page.
  51. title: String!
  52. # The timestamp of the latest page update.
  53. updatedAt: DateTime!
  54. }
  55. # SEO information.
  56. type SEO {
  57. # The meta description.
  58. description: String
  59. # The SEO title.
  60. title: String
  61. }
  62. # Represents a resource that can be published to the Online Store sales channel.
  63. interface OnlineStorePublishable {
  64. # The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel.
  65. onlineStoreUrl: URL
  66. }
  67. # Represents information about the metafields associated to the specified resource.
  68. interface HasMetafields {
  69. # Returns a metafield found by namespace and key.
  70. metafield(namespace: String!key: String!): Metafield
  71. # The metafields associated with the resource matching the supplied list of namespaces and keys.
  72. metafields(identifiers: [HasMetafieldsIdentifier!]!): [Metafield]!
  73. }
  74. type MetafieldReferenceEdge {
  75. # A cursor for use in pagination.
  76. cursor: String!
  77. # The item at the end of MetafieldReferenceEdge.
  78. node: MetafieldReference!
  79. }
  80. # An object with an ID field to support global identification, in accordance with the
  81. # Relay specification.
  82. # This interface is used by the node
  83. # and nodes queries.
  84. interface Node {
  85. # A globally-unique identifier.
  86. id: ID!
  87. }
  88. # Metafields represent custom metadata attached to a resource.
  89. # Metafields can be sorted into namespaces and are comprised of keys, values, and value types.
  90. type Metafield implements Node {
  91. # The date and time when the storefront metafield was created.
  92. createdAt: DateTime!
  93. # The description of a metafield.
  94. description: String
  95. # A globally-unique identifier.
  96. id: ID!
  97. # The key name for a metafield.
  98. key: String!
  99. # The namespace for a metafield.
  100. namespace: String!
  101. # The parent object that the metafield belongs to.
  102. parentResource: MetafieldParentResource!
  103. # Returns a reference object if the metafield definition's type is a resource reference.
  104. reference: MetafieldReference
  105. # A list of reference objects if the metafield's type is a resource reference list.
  106. references(
  107. first: Int
  108. after: String
  109. last: Int
  110. before: String
  111. ): MetafieldReferenceConnection
  112. # The type name of the metafield. See the list of supported types.
  113. type: String!
  114. # The date and time when the storefront metafield was updated.
  115. updatedAt: DateTime!
  116. # The value of a metafield.
  117. value: String!
  118. }
  119. # An auto-generated type for paginating through multiple MetafieldReferences.
  120. type MetafieldReferenceConnection {
  121. # A list of edges.
  122. edges: [MetafieldReferenceEdge!]!
  123. # A list of the nodes contained in MetafieldReferenceEdge.
  124. nodes: [MetafieldReference!]!
  125. # Information to aid in pagination.
  126. pageInfo: PageInfo!
  127. }
  128. # Identifies a metafield on an owner resource by namespace and key.
  129. input HasMetafieldsIdentifier {
  130. # A container for a set of metafields.
  131. namespace: String!
  132. # The identifier for the metafield.
  133. key: String!
  134. }
  135. # Returns information about pagination in a connection, in accordance with the Relay specification.
  136. type PageInfo {
  137. # The cursor corresponding to the last node in edges.
  138. endCursor: String
  139. # Whether there are more pages to fetch following the current page.
  140. hasNextPage: Boolean!
  141. # Whether there are any pages prior to the current page.
  142. hasPreviousPage: Boolean!
  143. # The cursor corresponding to the first node in edges.
  144. startCursor: String
  145. }
  146. # A customer represents a customer account with the shop.
  147. # Customer accounts store contact information for the customer,
  148. # saving logged-in customers the trouble of having to provide it at every checkout.
  149. type Customer implements HasMetafields {
  150. # Indicates whether the customer has consented to be sent marketing material via email.
  151. acceptsMarketing: Boolean! @goTag(key: "mapstructure" value: "accepts_marketing")
  152. # A list of addresses for the customer.
  153. addresses(
  154. after: String
  155. before: String
  156. first: Int
  157. last: Int
  158. reverse: Boolean = false
  159. ): MailingAddressConnection! @goTag(key: "mapstructure" value: "addresses")
  160. # The date and time when the customer was created.
  161. createdAt: DateTime! @goTag(key: "mapstructure" value: "created_at")
  162. # The customer’s default address.
  163. defaultAddress: MailingAddress @goTag(key: "mapstructure" value: "default_address")
  164. # The customer’s name, email or phone number.
  165. displayName: String! @goTag(key: "mapstructure" value: "name")
  166. # The customer’s email address.
  167. email: String @goTag(key: "mapstructure" value: "email")
  168. # The customer’s first name.
  169. firstName: String @goTag(key: "mapstructure" value: "given_name")
  170. # A unique identifier for the customer.
  171. id: ID! @goTag(key: "mapstructure" value: "sub")
  172. # The customer's most recently updated, incomplete checkout.
  173. # lastIncompleteCheckout: Checkout
  174. # The customer’s last name.
  175. lastName: String @goTag(key: "mapstructure" value: "family_name")
  176. # Returns a metafield found by namespace and key.
  177. metafield(key: String!namespace: String!): Metafield @goTag(key: "mapstructure" value: "metafield")
  178. # The metafields associated with the resource matching the supplied list of namespaces and keys.
  179. metafields(identifiers: [HasMetafieldsIdentifier!]!): [Metafield]! @goTag(key: "mapstructure" value: "metafields")
  180. # The number of orders that the customer has made at the store in their lifetime.
  181. numberOfOrders: UnsignedInt64! @goTag(key: "mapstructure" value: "number_of_orders")
  182. # The orders associated with the customer.
  183. # orders(
  184. # after: String
  185. # before: String
  186. # first: Int
  187. # last: Int
  188. # query: String
  189. # reverse: Boolean = false
  190. # sortKey: OrderSortKeys = ID
  191. # ): OrderConnection! @goTag(key: "mapstructure" value: "orders")
  192. # The customer’s phone number.
  193. phone: String @goTag(key: "mapstructure" value: "phone_number")
  194. # A comma separated list of tags that have been added to the customer.
  195. # Additional access scope required: unauthenticated_read_customer_tags.
  196. tags: [String!]! @goTag(key: "mapstructure" value: "tags")
  197. # The date and time when the customer information was updated.
  198. updatedAt: DateTime! @goTag(key: "mapstructure" value: "updated_at")
  199. }
  200. # An auto-generated type for paginating through multiple MailingAddresses.
  201. type MailingAddressConnection {
  202. # A list of edges.
  203. edges: [MailingAddressEdge!]!
  204. # A list of the nodes contained in MailingAddressEdge.
  205. nodes: [MailingAddress!]!
  206. # Information to aid in pagination.
  207. pageInfo: PageInfo!
  208. }
  209. # An auto-generated type which holds one MailingAddress and a cursor during pagination.
  210. type MailingAddressEdge {
  211. # A cursor for use in pagination.
  212. cursor: String!
  213. # The item at the end of MailingAddressEdge.
  214. node: MailingAddress!
  215. }
  216. # Represents a mailing address for customers and shipping.
  217. type MailingAddress implements Node {
  218. # The first line of the address. Typically the street address or PO Box number.
  219. address1: String
  220. # The second line of the address. Typically the number of the apartment, suite, or unit.
  221. address2: String
  222. # The name of the city, district, village, or town.
  223. city: String
  224. # The name of the customer's company or organization.
  225. company: String
  226. # The name of the country.
  227. country: String
  228. # The two-letter code for the country of the address.
  229. #
  230. # For example, US.
  231. countryCodeV2: CountryCode
  232. # The first name of the customer.
  233. firstName: String
  234. # A formatted version of the address, customized by the provided arguments.
  235. formatted(withName: Boolean = false, withCompany: Boolean = true): [String!]!
  236. # A comma-separated list of the values for city, province, and country.
  237. formattedArea: String
  238. # A globally-unique identifier.
  239. id: ID!
  240. # The last name of the customer.
  241. lastName: String
  242. # The latitude coordinate of the customer address.
  243. latitude: Float
  244. # The longitude coordinate of the customer address.
  245. longitude: Float
  246. # The full name of the customer, based on firstName and lastName.
  247. name: String
  248. # A unique phone number for the customer.
  249. #
  250. # Formatted using E.164 standard. For example, +16135551111.
  251. phone: String
  252. # The region of the address, such as the province, state, or district.
  253. province: String
  254. # The two-letter code for the region.
  255. #
  256. # For example, ON.
  257. provinceCode: String
  258. # The zip or postal code of the address.
  259. zip: String
  260. # The two-letter code for the country of the address.
  261. countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.")
  262. }
  263. type CustomerAccessTokenCreatePayload {
  264. customerAccessToken: CustomerAccessToken
  265. customerUserErrors: [CustomerUserError!]!
  266. }
  267. type CustomerAccessTokenRenewPayload {
  268. customerAccessToken: CustomerAccessToken
  269. userErrors: [UserError!]!
  270. }
  271. input CustomerAccessTokenCreateInput {
  272. email: String!
  273. password: String!
  274. }
  275. type CustomerAccessToken {
  276. accessToken: String!
  277. expiresAt: DateTime!
  278. }
  279. interface DisplayableError {
  280. field: [String!]
  281. message: String!
  282. }
  283. type UserError implements DisplayableError {
  284. field: [String!]
  285. message: String!
  286. }
  287. type CustomerUserError implements DisplayableError {
  288. code: CustomerErrorCode
  289. field: [String!]
  290. message: String!
  291. }
  292. enum CustomerErrorCode {
  293. # The input value is blank.
  294. BLANK
  295. # The input value is invalid.
  296. INVALID
  297. # The input value is already taken.
  298. TAKEN
  299. # The input value is too long.
  300. TOO_LONG
  301. # The input value is too short.
  302. TOO_SHORT
  303. # Unidentified customer.
  304. UNIDENTIFIED_CUSTOMER
  305. # Customer is disabled.
  306. CUSTOMER_DISABLED
  307. # Input password starts or ends with whitespace.
  308. PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE
  309. # Input contains HTML tags.
  310. CONTAINS_HTML_TAGS
  311. # Input contains URL.
  312. CONTAINS_URL
  313. # Invalid activation token.
  314. TOKEN_INVALID
  315. # Customer already enabled.
  316. ALREADY_ENABLED
  317. # Address does not exist.
  318. NOT_FOUND
  319. # Input email contains an invalid domain name.
  320. BAD_DOMAIN
  321. # Multipass token is not valid.
  322. INVALID_MULTIPASS_REQUEST
  323. }
  324. # Return type for `customerAccessTokenDelete` mutation.
  325. type CustomerAccessTokenDeletePayload {
  326. # The destroyed access token.
  327. deletedAccessToken: String
  328. # ID of the destroyed customer access token.
  329. deletedCustomerAccessTokenId: String
  330. # The list of errors that occurred from executing the mutation.
  331. userErrors: [UserError!]!
  332. }
  333. # Specifies the fields required to update the Customer information.
  334. input CustomerUpdateInput {
  335. # The customer’s first name.
  336. firstName: String
  337. # The customer’s last name.
  338. lastName: String
  339. # The customer’s email.
  340. email: String
  341. # A unique phone number for the customer.
  342. #
  343. # Formatted using E.164 standard. For example, +16135551111. To remove the phone number, specify null.
  344. phone: String
  345. # The login password used by the customer.
  346. password: String
  347. # Indicates whether the customer has consented to be sent marketing material via email.
  348. acceptsMarketing: Boolean
  349. }
  350. # The fields required to create a new customer.
  351. input CustomerCreateInput {
  352. # The customer’s first name.
  353. firstName: String
  354. # The customer’s last name.
  355. lastName: String
  356. # The customer’s email.
  357. email: String!
  358. # A unique phone number for the customer.
  359. #
  360. # Formatted using E.164 standard. For example, +16135551111.
  361. phone: String
  362. # The login password used by the customer.
  363. password: String!
  364. # Indicates whether the customer has consented to be sent marketing material via email.
  365. acceptsMarketing: Boolean
  366. }
  367. # Return type for `customerCreate` mutation.
  368. type CustomerCreatePayload {
  369. # The created customer object.
  370. customer: Customer
  371. # The list of errors that occurred from executing the mutation.
  372. customerUserErrors: [CustomerUserError!]!
  373. }
  374. # Return type for `customerUpdate` mutation.
  375. type CustomerUpdatePayload {
  376. # The updated customer object.
  377. customer: Customer
  378. # The newly created customer access token. If the customer's password is updated, all previous access tokens
  379. # (including the one used to perform this mutation) become invalid, and a new token is generated.
  380. customerAccessToken: CustomerAccessToken
  381. # The list of errors that occurred from executing the mutation.
  382. customerUserErrors: [CustomerUserError!]!
  383. }
  384. # ISO 639-1 language codes supported by Shopify.
  385. enum LanguageCode {
  386. # Afrikaans
  387. AF
  388. # Akan
  389. AK
  390. # Amharic
  391. AM
  392. # Arabic
  393. AR
  394. # Assamese
  395. AS
  396. # Azerbaijani
  397. AZ
  398. # Belarusian
  399. BE
  400. # Bulgarian
  401. BG
  402. # Bambara
  403. BM
  404. # Bangla
  405. BN
  406. # Tibetan
  407. BO
  408. # Breton
  409. BR
  410. # Bosnian
  411. BS
  412. # Catalan
  413. CA
  414. # Chechen
  415. CE
  416. # Czech
  417. CS
  418. # Church Slavic
  419. CU
  420. # Welsh
  421. CY
  422. # Danish
  423. DA
  424. # German
  425. DE
  426. # Dzongkha
  427. DZ
  428. # Ewe
  429. EE
  430. # Greek
  431. EL
  432. # English
  433. EN
  434. # Esperanto
  435. EO
  436. # Spanish
  437. ES
  438. # Estonian
  439. ET
  440. # Basque
  441. EU
  442. # Persian
  443. FA
  444. # Fulah
  445. FF
  446. # Finnish
  447. FI
  448. # Faroese
  449. FO
  450. # French
  451. FR
  452. # Western Frisian
  453. FY
  454. # Irish
  455. GA
  456. # Scottish Gaelic
  457. GD
  458. # Galician
  459. GL
  460. # Gujarati
  461. GU
  462. # Manx
  463. GV
  464. # Hausa
  465. HA
  466. # Hebrew
  467. HE
  468. # Hindi
  469. HI
  470. # Croatian
  471. HR
  472. # Hungarian
  473. HU
  474. # Armenian
  475. HY
  476. # Interlingua
  477. IA
  478. # Indonesian
  479. ID
  480. # Igbo
  481. IG
  482. # Sichuan Yi
  483. II
  484. # Icelandic
  485. IS
  486. # Italian
  487. IT
  488. # Japanese
  489. JA
  490. # Javanese
  491. JV
  492. # Georgian.
  493. KA
  494. # Kikuyu.
  495. KI
  496. # Kazakh.
  497. KK
  498. # Kalaallisut.
  499. KL
  500. # Khmer.
  501. KM
  502. # Kannada.
  503. KN
  504. # Korean.
  505. KO
  506. # Kashmiri.
  507. KS
  508. # Kurdish.
  509. KU
  510. # Cornish.
  511. KW
  512. # Kyrgyz.
  513. KY
  514. # Luxembourgish.
  515. LB
  516. # Ganda.
  517. LG
  518. # Lingala.
  519. LN
  520. # Lao.
  521. LO
  522. # Lithuanian.
  523. LT
  524. # Luba-Katanga.
  525. LU
  526. # Latvian.
  527. LV
  528. # Malagasy.
  529. MG
  530. # Māori.
  531. MI
  532. # Macedonian.
  533. MK
  534. # Malayalam.
  535. ML
  536. # Mongolian.
  537. MN
  538. # Marathi.
  539. MR
  540. # Malay.
  541. MS
  542. # Maltese.
  543. MT
  544. # Burmese.
  545. MY
  546. # Norwegian (Bokmål).
  547. NB
  548. # North Ndebele.
  549. ND
  550. # Nepali.
  551. NE
  552. # Dutch.
  553. NL
  554. # Norwegian Nynorsk.
  555. NN
  556. # Norwegian.
  557. NO
  558. # Oromo.
  559. OM
  560. # Odia.
  561. OR
  562. # Ossetic.
  563. OS
  564. # Punjabi.
  565. PA
  566. # Polish.
  567. PL
  568. # Pashto.
  569. PS
  570. # Portuguese (Brazil).
  571. PT_BR
  572. # Portuguese (Portugal).
  573. PT_PT
  574. QU
  575. # Quechua.
  576. # Romansh.
  577. RM
  578. # Rundi.
  579. RN
  580. # Romanian.
  581. RO
  582. # Russian.
  583. RU
  584. # Kinyarwanda.
  585. RW
  586. # Sindhi.
  587. SD
  588. # Northern Sami.
  589. SE
  590. # Sango.
  591. SG
  592. # Sinhala.
  593. SI
  594. # Slovak.
  595. SK
  596. # Slovenian.
  597. SL
  598. # Shona.
  599. SN
  600. # Somali.
  601. SO
  602. # Albanian.
  603. SQ
  604. # Serbian.
  605. SR
  606. # Sundanese.
  607. SU
  608. # Swedish.
  609. SV
  610. # Swahili.
  611. SW
  612. # Tamil.
  613. TA
  614. # Telugu.
  615. TE
  616. # Tajik.
  617. TG
  618. # Thai.
  619. TH
  620. # Tigrinya.
  621. TI
  622. # Turkmen.
  623. TK
  624. # Tongan.
  625. TO
  626. # Turkish.
  627. TR
  628. # Tatar.
  629. TT
  630. # Uyghur.
  631. UG
  632. # Ukrainian.
  633. UK
  634. # Urdu.
  635. UR
  636. # Uzbek.
  637. UZ
  638. # Vietnamese.
  639. VI
  640. # Wolof.
  641. WO
  642. # Xhosa.
  643. XH
  644. # Yiddish.
  645. YI
  646. # Yoruba.
  647. YO
  648. # Chinese (Simplified).
  649. ZH_CN
  650. # Chinese (Traditional).
  651. ZH_TW
  652. # Zulu.
  653. ZU
  654. # Chinese.
  655. ZH
  656. # Portuguese.
  657. PT
  658. # Volapük.
  659. VO
  660. }
  661. # The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines.
  662. # If a territory doesn't have a country code value in the CountryCode enum, then it might be considered a subdivision
  663. # of another country. For example, the territories associated with Spain are represented by the country code ES,
  664. # and the territories associated with the United States of America are represented by the country code US.
  665. enum CountryCode {
  666. # Afghanistan.
  667. AF
  668. # Åland Islands.
  669. AX
  670. # Albania.
  671. AL
  672. # Algeria.
  673. DZ
  674. # Andorra.
  675. AD
  676. # Angola.
  677. AO
  678. # Anguilla.
  679. AI
  680. # Antigua & Barbuda.
  681. AG
  682. # Argentina.
  683. AR
  684. # Armenia.
  685. AM
  686. # Aruba.
  687. AW
  688. # Ascension Island.
  689. AC
  690. # Australia.
  691. AU
  692. # Austria.
  693. AT
  694. # Azerbaijan.
  695. AZ
  696. # Bahamas.
  697. BS
  698. # Bahrain.
  699. BH
  700. # Bangladesh.
  701. BD
  702. # Barbados.
  703. BB
  704. # Belarus.
  705. BY
  706. # Belgium.
  707. BE
  708. # Belize.
  709. BZ
  710. # Benin.
  711. BJ
  712. # Bermuda.
  713. BM
  714. # Bhutan.
  715. BT
  716. # Bolivia.
  717. BO
  718. # Bosnia & Herzegovina.
  719. BA
  720. # Botswana.
  721. BW
  722. # Bouvet Island.
  723. BV
  724. # Brazil.
  725. BR
  726. # British Indian Ocean Territory.
  727. IO
  728. # Brunei.
  729. BN
  730. # Bulgaria.
  731. BG
  732. # Burkina Faso.
  733. BF
  734. # Burundi.
  735. BI
  736. # Cambodia.
  737. KH
  738. # Canada.
  739. CA
  740. # Cape Verde.
  741. CV
  742. # Caribbean Netherlands.
  743. BQ
  744. # Cayman Islands.
  745. KY
  746. # Central African Republic.
  747. CF
  748. # Chad.
  749. TD
  750. # Chile.
  751. CL
  752. # China.
  753. CN
  754. # Christmas Island.
  755. CX
  756. # Cocos (Keeling) Islands.
  757. CC
  758. # Colombia.
  759. CO
  760. # Comoros.
  761. KM
  762. # Congo - Brazzaville.
  763. CG
  764. # Congo - Kinshasa.
  765. CD
  766. # Cook Islands.
  767. CK
  768. # Costa Rica.
  769. CR
  770. # Croatia.
  771. HR
  772. # Cuba.
  773. CU
  774. # Curaçao.
  775. CW
  776. # Cyprus.
  777. CY
  778. # Czechia.
  779. CZ
  780. # Côte d’Ivoire.
  781. CI
  782. # Denmark.
  783. DK
  784. # Djibouti.
  785. DJ
  786. # Dominica.
  787. DM
  788. # Dominican Republic.
  789. DO
  790. # Ecuador.
  791. EC
  792. # Egypt.
  793. EG
  794. # El Salvador.
  795. SV
  796. # Equatorial Guinea.
  797. GQ
  798. # Eritrea.
  799. ER
  800. # Estonia.
  801. EE
  802. # Eswatini.
  803. SZ
  804. # Ethiopia.
  805. ET
  806. # Falkland Islands.
  807. FK
  808. # Faroe Islands.
  809. FO
  810. # Fiji.
  811. FJ
  812. # Finland.
  813. FI
  814. # France.
  815. FR
  816. # French Guiana.
  817. GF
  818. # French Polynesia.
  819. PF
  820. # French Southern Territories.
  821. TF
  822. # Gabon.
  823. GA
  824. # Gambia.
  825. GM
  826. # Georgia.
  827. GE
  828. # Germany.
  829. DE
  830. # Ghana.
  831. GH
  832. # Gibraltar.
  833. GI
  834. # Greece.
  835. GR
  836. # Greenland.
  837. GL
  838. # Grenada.
  839. GD
  840. # Guadeloupe.
  841. GP
  842. # Guatemala.
  843. GT
  844. # Guernsey.
  845. GG
  846. # Guinea.
  847. GN
  848. # Guinea-Bissau.
  849. GW
  850. # Guyana.
  851. GY
  852. # Haiti.
  853. HT
  854. # Heard & McDonald Islands.
  855. HM
  856. # Vatican City.
  857. VA
  858. # Honduras.
  859. HN
  860. # Hong Kong SAR.
  861. HK
  862. # Hungary.
  863. HU
  864. # Iceland.
  865. IS
  866. # India.
  867. IN
  868. # Indonesia.
  869. ID
  870. # Iran.
  871. IR
  872. # Iraq.
  873. IQ
  874. # Ireland.
  875. IE
  876. # Isle of Man.
  877. IM
  878. # Israel.
  879. IL
  880. # Italy.
  881. IT
  882. # Jamaica.
  883. JM
  884. # Japan.
  885. JP
  886. # Jersey.
  887. JE
  888. # Jordan.
  889. JO
  890. # Kazakhstan.
  891. KZ
  892. # Kenya.
  893. KE
  894. # Kiribati.
  895. KI
  896. # North Korea.
  897. KP
  898. # Kosovo.
  899. XK
  900. # Kuwait.
  901. KW
  902. # Kyrgyzstan.
  903. KG
  904. # Laos.
  905. LA
  906. # Latvia.
  907. LV
  908. # Lebanon.
  909. LB
  910. # Lesotho.
  911. LS
  912. # Liberia.
  913. LR
  914. # Libya.
  915. LY
  916. # Liechtenstein.
  917. LI
  918. # Lithuania.
  919. LT
  920. # Luxembourg.
  921. LU
  922. # Macao SAR.
  923. MO
  924. # Madagascar.
  925. MG
  926. # Malawi.
  927. MW
  928. # Malaysia.
  929. MY
  930. # Maldives.
  931. MV
  932. # Mali.
  933. ML
  934. # Malta.
  935. MT
  936. # Martinique.
  937. MQ
  938. # Mauritania.
  939. MR
  940. # Mauritius.
  941. MU
  942. # Mayotte.
  943. YT
  944. # Mexico.
  945. MX
  946. # Moldova.
  947. MD
  948. # Monaco.
  949. MC
  950. # Mongolia.
  951. MN
  952. # Montenegro.
  953. ME
  954. # Montserrat.
  955. MS
  956. # Morocco.
  957. MA
  958. # Mozambique.
  959. MZ
  960. # Myanmar (Burma).
  961. MM
  962. # Namibia.
  963. NA
  964. # Nauru.
  965. NR
  966. # Nepal.
  967. NP
  968. # Netherlands.
  969. NL
  970. # Netherlands Antilles.
  971. AN
  972. # New Caledonia.
  973. NC
  974. # New Zealand.
  975. NZ
  976. # Nicaragua.
  977. NI
  978. # Niger.
  979. NE
  980. # Nigeria.
  981. NG
  982. # Niue.
  983. NU
  984. # Norfolk Island.
  985. NF
  986. # North Macedonia.
  987. MK
  988. # Norway.
  989. NO
  990. # Oman.
  991. OM
  992. # Pakistan.
  993. PK
  994. # Palestinian Territories.
  995. PS
  996. # Panama.
  997. PA
  998. # Papua New Guinea.
  999. PG
  1000. # Paraguay.
  1001. PY
  1002. # Peru.
  1003. PE
  1004. # Philippines.
  1005. PH
  1006. # Pitcairn Islands.
  1007. PN
  1008. # Poland.
  1009. PL
  1010. # Portugal.
  1011. PT
  1012. # Qatar.
  1013. QA
  1014. # Cameroon.
  1015. CM
  1016. # Réunion.
  1017. RE
  1018. # Romania.
  1019. RO
  1020. # Russia.
  1021. RU
  1022. # Rwanda.
  1023. RW
  1024. # St. Barthélemy.
  1025. BL
  1026. # St. Helena.
  1027. SH
  1028. # St. Kitts & Nevis.
  1029. KN
  1030. # St. Lucia.
  1031. LC
  1032. # St. Martin.
  1033. MF
  1034. # St. Pierre & Miquelon.
  1035. PM
  1036. # Samoa.
  1037. WS
  1038. # San Marino.
  1039. SM
  1040. # São Tomé & Príncipe.
  1041. ST
  1042. # Saudi Arabia.
  1043. SA
  1044. # Senegal.
  1045. SN
  1046. # Serbia.
  1047. RS
  1048. # Seychelles.
  1049. SC
  1050. # Sierra Leone.
  1051. SL
  1052. # Singapore.
  1053. SG
  1054. # Sint Maarten.
  1055. SX
  1056. # Slovakia.
  1057. SK
  1058. # Slovenia.
  1059. SI
  1060. # Solomon Islands.
  1061. SB
  1062. # Somalia.
  1063. SO
  1064. # South Africa.
  1065. ZA
  1066. # South Georgia & South Sandwich Islands.
  1067. GS
  1068. # South Korea.
  1069. KR
  1070. # South Sudan.
  1071. SS
  1072. # Spain.
  1073. ES
  1074. # Sri Lanka.
  1075. LK
  1076. # St. Vincent & Grenadines.
  1077. VC
  1078. # Sudan.
  1079. SD
  1080. # Suriname.
  1081. SR
  1082. # Svalbard & Jan Mayen.
  1083. SJ
  1084. # Sweden.
  1085. SE
  1086. # Switzerland.
  1087. CH
  1088. # Syria.
  1089. SY
  1090. # Taiwan.
  1091. TW
  1092. # Tajikistan.
  1093. TJ
  1094. # Tanzania.
  1095. TZ
  1096. # Thailand.
  1097. TH
  1098. # Timor-Leste.
  1099. TL
  1100. # Togo.
  1101. TG
  1102. # Tokelau.
  1103. TK
  1104. # Tonga.
  1105. TO
  1106. # Trinidad & Tobago.
  1107. TT
  1108. # Tristan da Cunha.
  1109. TA
  1110. # Tunisia.
  1111. TN
  1112. # Turkey.
  1113. TR
  1114. # Turkmenistan.
  1115. TM
  1116. # Turks & Caicos Islands.
  1117. TC
  1118. # Tuvalu.
  1119. TV
  1120. # Uganda.
  1121. UG
  1122. # Ukraine.
  1123. UA
  1124. # United Arab Emirates.
  1125. AE
  1126. # United Kingdom.
  1127. GB
  1128. # United States.
  1129. US
  1130. # U.S. Outlying Islands.
  1131. UM
  1132. # Uruguay.
  1133. UY
  1134. # Uzbekistan.
  1135. UZ
  1136. # Vanuatu.
  1137. VU
  1138. # Venezuela.
  1139. VE
  1140. # Vietnam.
  1141. VN
  1142. # British Virgin Islands.
  1143. VG
  1144. # Wallis & Futuna.
  1145. WF
  1146. # Western Sahara.
  1147. EH
  1148. # Yemen.
  1149. YE
  1150. # Zambia.
  1151. ZM
  1152. # Zimbabwe.
  1153. ZW
  1154. # Unknown Region.
  1155. ZZ
  1156. }