@ankhorage/deploy 0.6.0 → 0.7.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.
Files changed (233) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/domain/storeListing/StoreListingAsset.d.ts +9 -0
  4. package/dist/domain/storeListing/StoreListingAsset.d.ts.map +1 -0
  5. package/dist/domain/storeListing/StoreListingAsset.js +2 -0
  6. package/dist/domain/storeListing/StoreListingAsset.js.map +1 -0
  7. package/dist/domain/storeListing/StoreListingAssetSet.d.ts +9 -0
  8. package/dist/domain/storeListing/StoreListingAssetSet.d.ts.map +1 -0
  9. package/dist/domain/storeListing/StoreListingAssetSet.js +2 -0
  10. package/dist/domain/storeListing/StoreListingAssetSet.js.map +1 -0
  11. package/dist/domain/storeListing/StoreListingDesiredState.d.ts +8 -0
  12. package/dist/domain/storeListing/StoreListingDesiredState.d.ts.map +1 -0
  13. package/dist/domain/storeListing/StoreListingDesiredState.js +2 -0
  14. package/dist/domain/storeListing/StoreListingDesiredState.js.map +1 -0
  15. package/dist/domain/storeListing/StoreListingDiagnostic.d.ts +12 -0
  16. package/dist/domain/storeListing/StoreListingDiagnostic.d.ts.map +1 -0
  17. package/dist/domain/storeListing/StoreListingDiagnostic.js +2 -0
  18. package/dist/domain/storeListing/StoreListingDiagnostic.js.map +1 -0
  19. package/dist/domain/storeListing/StoreListingField.d.ts +2 -0
  20. package/dist/domain/storeListing/StoreListingField.d.ts.map +1 -0
  21. package/dist/domain/storeListing/StoreListingField.js +2 -0
  22. package/dist/domain/storeListing/StoreListingField.js.map +1 -0
  23. package/dist/domain/storeListing/StoreListingLocale.d.ts +13 -0
  24. package/dist/domain/storeListing/StoreListingLocale.d.ts.map +1 -0
  25. package/dist/domain/storeListing/StoreListingLocale.js +2 -0
  26. package/dist/domain/storeListing/StoreListingLocale.js.map +1 -0
  27. package/dist/domain/storeListing/StoreListingPlan.d.ts +10 -0
  28. package/dist/domain/storeListing/StoreListingPlan.d.ts.map +1 -0
  29. package/dist/domain/storeListing/StoreListingPlan.js +2 -0
  30. package/dist/domain/storeListing/StoreListingPlan.js.map +1 -0
  31. package/dist/domain/storeListing/StoreListingPlanStep.d.ts +10 -0
  32. package/dist/domain/storeListing/StoreListingPlanStep.d.ts.map +1 -0
  33. package/dist/domain/storeListing/StoreListingPlanStep.js +2 -0
  34. package/dist/domain/storeListing/StoreListingPlanStep.js.map +1 -0
  35. package/dist/domain/storeListing/StoreListingRemoteAssetSet.d.ts +9 -0
  36. package/dist/domain/storeListing/StoreListingRemoteAssetSet.d.ts.map +1 -0
  37. package/dist/domain/storeListing/StoreListingRemoteAssetSet.js +2 -0
  38. package/dist/domain/storeListing/StoreListingRemoteAssetSet.js.map +1 -0
  39. package/dist/domain/storeListing/StoreListingTarget.d.ts +2 -0
  40. package/dist/domain/storeListing/StoreListingTarget.d.ts.map +1 -0
  41. package/dist/domain/storeListing/StoreListingTarget.js +2 -0
  42. package/dist/domain/storeListing/StoreListingTarget.js.map +1 -0
  43. package/dist/domain/storeListing/StoreListingTargetState.d.ts +13 -0
  44. package/dist/domain/storeListing/StoreListingTargetState.d.ts.map +1 -0
  45. package/dist/domain/storeListing/StoreListingTargetState.js +2 -0
  46. package/dist/domain/storeListing/StoreListingTargetState.js.map +1 -0
  47. package/dist/domain/storeListing/createStoreListingCurrentRevision.d.ts +3 -0
  48. package/dist/domain/storeListing/createStoreListingCurrentRevision.d.ts.map +1 -0
  49. package/dist/domain/storeListing/createStoreListingCurrentRevision.js +16 -0
  50. package/dist/domain/storeListing/createStoreListingCurrentRevision.js.map +1 -0
  51. package/dist/domain/storeListing/createStoreListingPlan.d.ts +9 -0
  52. package/dist/domain/storeListing/createStoreListingPlan.d.ts.map +1 -0
  53. package/dist/domain/storeListing/createStoreListingPlan.js +85 -0
  54. package/dist/domain/storeListing/createStoreListingPlan.js.map +1 -0
  55. package/dist/domain/storeListing/normalizeStoreListingLocale.d.ts +2 -0
  56. package/dist/domain/storeListing/normalizeStoreListingLocale.d.ts.map +1 -0
  57. package/dist/domain/storeListing/normalizeStoreListingLocale.js +18 -0
  58. package/dist/domain/storeListing/normalizeStoreListingLocale.js.map +1 -0
  59. package/dist/domain/storeListing/storeListingLocaleFieldValue.d.ts +4 -0
  60. package/dist/domain/storeListing/storeListingLocaleFieldValue.d.ts.map +1 -0
  61. package/dist/domain/storeListing/storeListingLocaleFieldValue.js +23 -0
  62. package/dist/domain/storeListing/storeListingLocaleFieldValue.js.map +1 -0
  63. package/dist/project/storeListing/ProjectStoreListing.d.ts +8 -0
  64. package/dist/project/storeListing/ProjectStoreListing.d.ts.map +1 -0
  65. package/dist/project/storeListing/ProjectStoreListing.js +2 -0
  66. package/dist/project/storeListing/ProjectStoreListing.js.map +1 -0
  67. package/dist/project/storeListing/ProjectStoreListingAccess.d.ts +7 -0
  68. package/dist/project/storeListing/ProjectStoreListingAccess.d.ts.map +1 -0
  69. package/dist/project/storeListing/ProjectStoreListingAccess.js +2 -0
  70. package/dist/project/storeListing/ProjectStoreListingAccess.js.map +1 -0
  71. package/dist/project/storeListing/ProjectStoreListingAsset.d.ts +5 -0
  72. package/dist/project/storeListing/ProjectStoreListingAsset.d.ts.map +1 -0
  73. package/dist/project/storeListing/ProjectStoreListingAsset.js +2 -0
  74. package/dist/project/storeListing/ProjectStoreListingAsset.js.map +1 -0
  75. package/dist/project/storeListing/ProjectStoreListingAssetSet.d.ts +9 -0
  76. package/dist/project/storeListing/ProjectStoreListingAssetSet.d.ts.map +1 -0
  77. package/dist/project/storeListing/ProjectStoreListingAssetSet.js +2 -0
  78. package/dist/project/storeListing/ProjectStoreListingAssetSet.js.map +1 -0
  79. package/dist/project/storeListing/ProjectStoreListingRuntime.d.ts +17 -0
  80. package/dist/project/storeListing/ProjectStoreListingRuntime.d.ts.map +1 -0
  81. package/dist/project/storeListing/ProjectStoreListingRuntime.js +19 -0
  82. package/dist/project/storeListing/ProjectStoreListingRuntime.js.map +1 -0
  83. package/dist/project/storeListing/ProjectStoreListingTargetIdentity.d.ts +5 -0
  84. package/dist/project/storeListing/ProjectStoreListingTargetIdentity.d.ts.map +1 -0
  85. package/dist/project/storeListing/ProjectStoreListingTargetIdentity.js +2 -0
  86. package/dist/project/storeListing/ProjectStoreListingTargetIdentity.js.map +1 -0
  87. package/dist/project/storeListing/createProjectStoreListingRevision.d.ts +4 -0
  88. package/dist/project/storeListing/createProjectStoreListingRevision.d.ts.map +1 -0
  89. package/dist/project/storeListing/createProjectStoreListingRevision.js +24 -0
  90. package/dist/project/storeListing/createProjectStoreListingRevision.js.map +1 -0
  91. package/dist/project/storeListing/parseStoreListingLocale.d.ts +3 -0
  92. package/dist/project/storeListing/parseStoreListingLocale.d.ts.map +1 -0
  93. package/dist/project/storeListing/parseStoreListingLocale.js +76 -0
  94. package/dist/project/storeListing/parseStoreListingLocale.js.map +1 -0
  95. package/dist/project/storeListing/readProjectStoreListing.d.ts +5 -0
  96. package/dist/project/storeListing/readProjectStoreListing.d.ts.map +1 -0
  97. package/dist/project/storeListing/readProjectStoreListing.js +24 -0
  98. package/dist/project/storeListing/readProjectStoreListing.js.map +1 -0
  99. package/dist/project/storeListing/readStoreListingAssets.d.ts +8 -0
  100. package/dist/project/storeListing/readStoreListingAssets.d.ts.map +1 -0
  101. package/dist/project/storeListing/readStoreListingAssets.js +110 -0
  102. package/dist/project/storeListing/readStoreListingAssets.js.map +1 -0
  103. package/dist/project/storeListing/readStoreListingLocales.d.ts +3 -0
  104. package/dist/project/storeListing/readStoreListingLocales.d.ts.map +1 -0
  105. package/dist/project/storeListing/readStoreListingLocales.js +43 -0
  106. package/dist/project/storeListing/readStoreListingLocales.js.map +1 -0
  107. package/dist/project/storeListing/resolveProjectStoreListingAccess.d.ts +9 -0
  108. package/dist/project/storeListing/resolveProjectStoreListingAccess.d.ts.map +1 -0
  109. package/dist/project/storeListing/resolveProjectStoreListingAccess.js +7 -0
  110. package/dist/project/storeListing/resolveProjectStoreListingAccess.js.map +1 -0
  111. package/dist/project/storeListing/resolveProjectStoreListingTargets.d.ts +20 -0
  112. package/dist/project/storeListing/resolveProjectStoreListingTargets.d.ts.map +1 -0
  113. package/dist/project/storeListing/resolveProjectStoreListingTargets.js +16 -0
  114. package/dist/project/storeListing/resolveProjectStoreListingTargets.js.map +1 -0
  115. package/dist/project/storeListing/toStoreListingDesiredState.d.ts +4 -0
  116. package/dist/project/storeListing/toStoreListingDesiredState.d.ts.map +1 -0
  117. package/dist/project/storeListing/toStoreListingDesiredState.js +15 -0
  118. package/dist/project/storeListing/toStoreListingDesiredState.js.map +1 -0
  119. package/dist/providers/appStoreConnect/AppStoreConnectTransport.d.ts +1 -1
  120. package/dist/providers/appStoreConnect/AppStoreConnectTransport.d.ts.map +1 -1
  121. package/dist/providers/appStoreConnect/AppStoreConnectTransport.js.map +1 -1
  122. package/dist/providers/appStoreConnect/AppStoreListingContext.d.ts +21 -0
  123. package/dist/providers/appStoreConnect/AppStoreListingContext.d.ts.map +1 -0
  124. package/dist/providers/appStoreConnect/AppStoreListingContext.js +2 -0
  125. package/dist/providers/appStoreConnect/AppStoreListingContext.js.map +1 -0
  126. package/dist/providers/appStoreConnect/AppStoreListingContextResult.d.ts +14 -0
  127. package/dist/providers/appStoreConnect/AppStoreListingContextResult.d.ts.map +1 -0
  128. package/dist/providers/appStoreConnect/AppStoreListingContextResult.js +2 -0
  129. package/dist/providers/appStoreConnect/AppStoreListingContextResult.js.map +1 -0
  130. package/dist/providers/appStoreConnect/appStoreListingFields.d.ts +2 -0
  131. package/dist/providers/appStoreConnect/appStoreListingFields.d.ts.map +1 -0
  132. package/dist/providers/appStoreConnect/appStoreListingFields.js +11 -0
  133. package/dist/providers/appStoreConnect/appStoreListingFields.js.map +1 -0
  134. package/dist/providers/appStoreConnect/appStoreListingUrls.d.ts +5 -0
  135. package/dist/providers/appStoreConnect/appStoreListingUrls.d.ts.map +1 -0
  136. package/dist/providers/appStoreConnect/appStoreListingUrls.js +22 -0
  137. package/dist/providers/appStoreConnect/appStoreListingUrls.js.map +1 -0
  138. package/dist/providers/appStoreConnect/createAppStoreListingDiagnostics.d.ts +4 -0
  139. package/dist/providers/appStoreConnect/createAppStoreListingDiagnostics.d.ts.map +1 -0
  140. package/dist/providers/appStoreConnect/createAppStoreListingDiagnostics.js +85 -0
  141. package/dist/providers/appStoreConnect/createAppStoreListingDiagnostics.js.map +1 -0
  142. package/dist/providers/appStoreConnect/isAppStoreScreenshotVariant.d.ts +2 -0
  143. package/dist/providers/appStoreConnect/isAppStoreScreenshotVariant.d.ts.map +1 -0
  144. package/dist/providers/appStoreConnect/isAppStoreScreenshotVariant.js +39 -0
  145. package/dist/providers/appStoreConnect/isAppStoreScreenshotVariant.js.map +1 -0
  146. package/dist/providers/appStoreConnect/isEditableAppStoreListingState.d.ts +2 -0
  147. package/dist/providers/appStoreConnect/isEditableAppStoreListingState.d.ts.map +1 -0
  148. package/dist/providers/appStoreConnect/isEditableAppStoreListingState.js +12 -0
  149. package/dist/providers/appStoreConnect/isEditableAppStoreListingState.js.map +1 -0
  150. package/dist/providers/appStoreConnect/mapAppStoreLocale.d.ts +2 -0
  151. package/dist/providers/appStoreConnect/mapAppStoreLocale.d.ts.map +1 -0
  152. package/dist/providers/appStoreConnect/mapAppStoreLocale.js +112 -0
  153. package/dist/providers/appStoreConnect/mapAppStoreLocale.js.map +1 -0
  154. package/dist/providers/appStoreConnect/parseAppStoreAppId.d.ts +2 -0
  155. package/dist/providers/appStoreConnect/parseAppStoreAppId.d.ts.map +1 -0
  156. package/dist/providers/appStoreConnect/parseAppStoreAppId.js +22 -0
  157. package/dist/providers/appStoreConnect/parseAppStoreAppId.js.map +1 -0
  158. package/dist/providers/appStoreConnect/parseAppStoreListingLocalizations.d.ts +8 -0
  159. package/dist/providers/appStoreConnect/parseAppStoreListingLocalizations.d.ts.map +1 -0
  160. package/dist/providers/appStoreConnect/parseAppStoreListingLocalizations.js +68 -0
  161. package/dist/providers/appStoreConnect/parseAppStoreListingLocalizations.js.map +1 -0
  162. package/dist/providers/appStoreConnect/parseEditableAppStoreResourceId.d.ts +2 -0
  163. package/dist/providers/appStoreConnect/parseEditableAppStoreResourceId.d.ts.map +1 -0
  164. package/dist/providers/appStoreConnect/parseEditableAppStoreResourceId.js +28 -0
  165. package/dist/providers/appStoreConnect/parseEditableAppStoreResourceId.js.map +1 -0
  166. package/dist/providers/appStoreConnect/readAppStoreJson.d.ts +7 -0
  167. package/dist/providers/appStoreConnect/readAppStoreJson.d.ts.map +1 -0
  168. package/dist/providers/appStoreConnect/readAppStoreJson.js +12 -0
  169. package/dist/providers/appStoreConnect/readAppStoreJson.js.map +1 -0
  170. package/dist/providers/appStoreConnect/resolveAppStoreListingContext.d.ts +10 -0
  171. package/dist/providers/appStoreConnect/resolveAppStoreListingContext.d.ts.map +1 -0
  172. package/dist/providers/appStoreConnect/resolveAppStoreListingContext.js +103 -0
  173. package/dist/providers/appStoreConnect/resolveAppStoreListingContext.js.map +1 -0
  174. package/dist/providers/appStoreConnect/toAppStoreCurrentLocales.d.ts +4 -0
  175. package/dist/providers/appStoreConnect/toAppStoreCurrentLocales.d.ts.map +1 -0
  176. package/dist/providers/appStoreConnect/toAppStoreCurrentLocales.js +27 -0
  177. package/dist/providers/appStoreConnect/toAppStoreCurrentLocales.js.map +1 -0
  178. package/dist/providers/googlePlay/GooglePlayRequestTracker.d.ts +9 -0
  179. package/dist/providers/googlePlay/GooglePlayRequestTracker.d.ts.map +1 -0
  180. package/dist/providers/googlePlay/GooglePlayRequestTracker.js +13 -0
  181. package/dist/providers/googlePlay/GooglePlayRequestTracker.js.map +1 -0
  182. package/dist/providers/googlePlay/GooglePlayStoreListingResult.d.ts +14 -0
  183. package/dist/providers/googlePlay/GooglePlayStoreListingResult.d.ts.map +1 -0
  184. package/dist/providers/googlePlay/GooglePlayStoreListingResult.js +2 -0
  185. package/dist/providers/googlePlay/GooglePlayStoreListingResult.js.map +1 -0
  186. package/dist/providers/googlePlay/GooglePlayTransport.d.ts +1 -1
  187. package/dist/providers/googlePlay/GooglePlayTransport.d.ts.map +1 -1
  188. package/dist/providers/googlePlay/GooglePlayTransport.js.map +1 -1
  189. package/dist/providers/googlePlay/createGooglePlayListingDiagnostics.d.ts +4 -0
  190. package/dist/providers/googlePlay/createGooglePlayListingDiagnostics.d.ts.map +1 -0
  191. package/dist/providers/googlePlay/createGooglePlayListingDiagnostics.js +52 -0
  192. package/dist/providers/googlePlay/createGooglePlayListingDiagnostics.js.map +1 -0
  193. package/dist/providers/googlePlay/googlePlayListingUrls.d.ts +5 -0
  194. package/dist/providers/googlePlay/googlePlayListingUrls.d.ts.map +1 -0
  195. package/dist/providers/googlePlay/googlePlayListingUrls.js +21 -0
  196. package/dist/providers/googlePlay/googlePlayListingUrls.js.map +1 -0
  197. package/dist/providers/googlePlay/googlePlayStoreListingFields.d.ts +2 -0
  198. package/dist/providers/googlePlay/googlePlayStoreListingFields.d.ts.map +1 -0
  199. package/dist/providers/googlePlay/googlePlayStoreListingFields.js +7 -0
  200. package/dist/providers/googlePlay/googlePlayStoreListingFields.js.map +1 -0
  201. package/dist/providers/googlePlay/inspectGooglePlayStoreListing.d.ts +15 -0
  202. package/dist/providers/googlePlay/inspectGooglePlayStoreListing.d.ts.map +1 -0
  203. package/dist/providers/googlePlay/inspectGooglePlayStoreListing.js +105 -0
  204. package/dist/providers/googlePlay/inspectGooglePlayStoreListing.js.map +1 -0
  205. package/dist/providers/googlePlay/listGooglePlayImageHashes.d.ts +2 -0
  206. package/dist/providers/googlePlay/listGooglePlayImageHashes.d.ts.map +1 -0
  207. package/dist/providers/googlePlay/listGooglePlayImageHashes.js +2 -0
  208. package/dist/providers/googlePlay/listGooglePlayImageHashes.js.map +1 -0
  209. package/dist/providers/googlePlay/mapGooglePlayImageType.d.ts +2 -0
  210. package/dist/providers/googlePlay/mapGooglePlayImageType.d.ts.map +1 -0
  211. package/dist/providers/googlePlay/mapGooglePlayImageType.js +21 -0
  212. package/dist/providers/googlePlay/mapGooglePlayImageType.js.map +1 -0
  213. package/dist/providers/googlePlay/parseGooglePlayListings.d.ts +3 -0
  214. package/dist/providers/googlePlay/parseGooglePlayListings.d.ts.map +1 -0
  215. package/dist/providers/googlePlay/parseGooglePlayListings.js +47 -0
  216. package/dist/providers/googlePlay/parseGooglePlayListings.js.map +1 -0
  217. package/dist/providers/googlePlay/readGooglePlayAssetSets.d.ts +11 -0
  218. package/dist/providers/googlePlay/readGooglePlayAssetSets.d.ts.map +1 -0
  219. package/dist/providers/googlePlay/readGooglePlayAssetSets.js +32 -0
  220. package/dist/providers/googlePlay/readGooglePlayAssetSets.js.map +1 -0
  221. package/dist/providers/googlePlay/readGooglePlayImages.d.ts +10 -0
  222. package/dist/providers/googlePlay/readGooglePlayImages.d.ts.map +1 -0
  223. package/dist/providers/googlePlay/readGooglePlayImages.js +31 -0
  224. package/dist/providers/googlePlay/readGooglePlayImages.js.map +1 -0
  225. package/dist/providers/googlePlay/replaceGooglePlayImages.d.ts +12 -0
  226. package/dist/providers/googlePlay/replaceGooglePlayImages.d.ts.map +1 -0
  227. package/dist/providers/googlePlay/replaceGooglePlayImages.js +35 -0
  228. package/dist/providers/googlePlay/replaceGooglePlayImages.js.map +1 -0
  229. package/dist/providers/googlePlay/writeGooglePlayListing.d.ts +12 -0
  230. package/dist/providers/googlePlay/writeGooglePlayListing.d.ts.map +1 -0
  231. package/dist/providers/googlePlay/writeGooglePlayListing.js +21 -0
  232. package/dist/providers/googlePlay/writeGooglePlayListing.js.map +1 -0
  233. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AppStoreConnectTransport.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/AppStoreConnectTransport.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,oBAAoB,GAA6B,KAAK,EAAE,OAAO,EAAE,EAAE;IAC9E,MAAM,OAAO,GAA2B;QACtC,aAAa,EAAE,UAAU,OAAO,CAAC,KAAK,EAAE;QACxC,MAAM,EAAE,kBAAkB;KAC3B,CAAC;IACF,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;IAC7E,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO;QACP,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;KAC9D,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;AAClE,CAAC,CAAC","sourcesContent":["export interface AppStoreConnectRequest {\n readonly method: 'GET' | 'POST' | 'PATCH';\n readonly url: string;\n readonly token: string;\n readonly body?: string;\n}\n\nexport interface AppStoreConnectResponse {\n readonly status: number;\n readonly body: string;\n}\n\nexport type AppStoreConnectTransport = (\n request: AppStoreConnectRequest,\n) => Promise<AppStoreConnectResponse>;\n\nexport const fetchAppStoreConnect: AppStoreConnectTransport = async (request) => {\n const headers: Record<string, string> = {\n Authorization: `Bearer ${request.token}`,\n Accept: 'application/json',\n };\n if (request.body !== undefined) headers['Content-Type'] = 'application/json';\n const response = await fetch(request.url, {\n method: request.method,\n headers,\n ...(request.body === undefined ? {} : { body: request.body }),\n });\n return { status: response.status, body: await response.text() };\n};\n"]}
1
+ {"version":3,"file":"AppStoreConnectTransport.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/AppStoreConnectTransport.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,oBAAoB,GAA6B,KAAK,EAAE,OAAO,EAAE,EAAE;IAC9E,MAAM,OAAO,GAA2B;QACtC,aAAa,EAAE,UAAU,OAAO,CAAC,KAAK,EAAE;QACxC,MAAM,EAAE,kBAAkB;KAC3B,CAAC;IACF,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;IAC7E,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO;QACP,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;KAC9D,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;AAClE,CAAC,CAAC","sourcesContent":["export interface AppStoreConnectRequest {\n readonly method: 'DELETE' | 'GET' | 'POST' | 'PATCH';\n readonly url: string;\n readonly token: string;\n readonly body?: string;\n}\n\nexport interface AppStoreConnectResponse {\n readonly status: number;\n readonly body: string;\n}\n\nexport type AppStoreConnectTransport = (\n request: AppStoreConnectRequest,\n) => Promise<AppStoreConnectResponse>;\n\nexport const fetchAppStoreConnect: AppStoreConnectTransport = async (request) => {\n const headers: Record<string, string> = {\n Authorization: `Bearer ${request.token}`,\n Accept: 'application/json',\n };\n if (request.body !== undefined) headers['Content-Type'] = 'application/json';\n const response = await fetch(request.url, {\n method: request.method,\n headers,\n ...(request.body === undefined ? {} : { body: request.body }),\n });\n return { status: response.status, body: await response.text() };\n};\n"]}
@@ -0,0 +1,21 @@
1
+ export interface AppStoreListingLocaleResource {
2
+ readonly canonicalLocale: string;
3
+ readonly providerLocale: string;
4
+ readonly appInfoLocalizationId?: string;
5
+ readonly versionLocalizationId?: string;
6
+ readonly name?: string;
7
+ readonly summary?: string;
8
+ readonly description?: string;
9
+ readonly keywords?: string;
10
+ readonly promotionalText?: string;
11
+ readonly supportUrl?: string;
12
+ readonly marketingUrl?: string;
13
+ readonly privacyPolicyUrl?: string;
14
+ }
15
+ export interface AppStoreListingContext {
16
+ readonly appId: string;
17
+ readonly appInfoId: string;
18
+ readonly versionId: string;
19
+ readonly locales: readonly AppStoreListingLocaleResource[];
20
+ }
21
+ //# sourceMappingURL=AppStoreListingContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppStoreListingContext.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/AppStoreListingContext.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAC5D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AppStoreListingContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppStoreListingContext.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/AppStoreListingContext.ts"],"names":[],"mappings":"","sourcesContent":["export interface AppStoreListingLocaleResource {\n readonly canonicalLocale: string;\n readonly providerLocale: string;\n readonly appInfoLocalizationId?: string;\n readonly versionLocalizationId?: string;\n readonly name?: string;\n readonly summary?: string;\n readonly description?: string;\n readonly keywords?: string;\n readonly promotionalText?: string;\n readonly supportUrl?: string;\n readonly marketingUrl?: string;\n readonly privacyPolicyUrl?: string;\n}\n\nexport interface AppStoreListingContext {\n readonly appId: string;\n readonly appInfoId: string;\n readonly versionId: string;\n readonly locales: readonly AppStoreListingLocaleResource[];\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { DeploymentFailure } from '../../domain/DeploymentFailure';
2
+ import type { DeploymentRequiredAction } from '../../domain/DeploymentRequiredAction';
3
+ import type { AppStoreListingContext } from './AppStoreListingContext';
4
+ export type AppStoreListingContextResult = {
5
+ readonly status: 'completed';
6
+ readonly context: AppStoreListingContext;
7
+ } | {
8
+ readonly status: 'action-required';
9
+ readonly action: DeploymentRequiredAction;
10
+ } | {
11
+ readonly status: 'failed';
12
+ readonly failure: DeploymentFailure;
13
+ };
14
+ //# sourceMappingURL=AppStoreListingContextResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppStoreListingContextResult.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/AppStoreListingContextResult.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,MAAM,MAAM,4BAA4B,GACpC;IAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAA;CAAE,GAC1E;IAAE,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AppStoreListingContextResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppStoreListingContextResult.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/AppStoreListingContextResult.ts"],"names":[],"mappings":"","sourcesContent":["import type { DeploymentFailure } from '../../domain/DeploymentFailure';\nimport type { DeploymentRequiredAction } from '../../domain/DeploymentRequiredAction';\nimport type { AppStoreListingContext } from './AppStoreListingContext';\n\nexport type AppStoreListingContextResult =\n | { readonly status: 'completed'; readonly context: AppStoreListingContext }\n | { readonly status: 'action-required'; readonly action: DeploymentRequiredAction }\n | { readonly status: 'failed'; readonly failure: DeploymentFailure };\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const APP_STORE_LISTING_FIELDS: readonly ["name", "summary", "description", "keywords", "promotionalText", "supportUrl", "marketingUrl", "privacyPolicyUrl"];
2
+ //# sourceMappingURL=appStoreListingFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appStoreListingFields.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/appStoreListingFields.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,8HASY,CAAC"}
@@ -0,0 +1,11 @@
1
+ export const APP_STORE_LISTING_FIELDS = [
2
+ 'name',
3
+ 'summary',
4
+ 'description',
5
+ 'keywords',
6
+ 'promotionalText',
7
+ 'supportUrl',
8
+ 'marketingUrl',
9
+ 'privacyPolicyUrl',
10
+ ];
11
+ //# sourceMappingURL=appStoreListingFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appStoreListingFields.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/appStoreListingFields.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM;IACN,SAAS;IACT,aAAa;IACb,UAAU;IACV,iBAAiB;IACjB,YAAY;IACZ,cAAc;IACd,kBAAkB;CAC6B,CAAC","sourcesContent":["import type { StoreListingField } from '../../domain/storeListing/StoreListingField';\n\nexport const APP_STORE_LISTING_FIELDS = [\n 'name',\n 'summary',\n 'description',\n 'keywords',\n 'promotionalText',\n 'supportUrl',\n 'marketingUrl',\n 'privacyPolicyUrl',\n] as const satisfies readonly StoreListingField[];\n"]}
@@ -0,0 +1,5 @@
1
+ export declare function appStoreAppInfosUrl(appId: string): string;
2
+ export declare function appStoreVersionsForListingUrl(appId: string): string;
3
+ export declare function appInfoLocalizationsUrl(appInfoId: string): string;
4
+ export declare function versionLocalizationsUrl(versionId: string): string;
5
+ //# sourceMappingURL=appStoreListingUrls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appStoreListingUrls.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/appStoreListingUrls.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOnE;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"}
@@ -0,0 +1,22 @@
1
+ const BASE = 'https://api.appstoreconnect.apple.com/v1';
2
+ export function appStoreAppInfosUrl(appId) {
3
+ return `${BASE}/apps/${segment(appId)}/appInfos?fields[appInfos]=state,appStoreState&limit=200`;
4
+ }
5
+ export function appStoreVersionsForListingUrl(appId) {
6
+ const query = new URLSearchParams({
7
+ 'filter[platform]': 'IOS',
8
+ 'fields[appStoreVersions]': 'platform,versionString,appVersionState,appStoreState',
9
+ limit: '200',
10
+ });
11
+ return `${BASE}/apps/${segment(appId)}/appStoreVersions?${query.toString()}`;
12
+ }
13
+ export function appInfoLocalizationsUrl(appInfoId) {
14
+ return `${BASE}/appInfos/${segment(appInfoId)}/appInfoLocalizations?limit=200`;
15
+ }
16
+ export function versionLocalizationsUrl(versionId) {
17
+ return `${BASE}/appStoreVersions/${segment(versionId)}/appStoreVersionLocalizations?limit=200`;
18
+ }
19
+ function segment(value) {
20
+ return encodeURIComponent(value);
21
+ }
22
+ //# sourceMappingURL=appStoreListingUrls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appStoreListingUrls.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/appStoreListingUrls.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,0CAA0C,CAAC;AAExD,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,OAAO,GAAG,IAAI,SAAS,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC;AAClG,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,KAAa;IACzD,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC;QAChC,kBAAkB,EAAE,KAAK;QACzB,0BAA0B,EAAE,sDAAsD;QAClF,KAAK,EAAE,KAAK;KACb,CAAC,CAAC;IACH,OAAO,GAAG,IAAI,SAAS,OAAO,CAAC,KAAK,CAAC,qBAAqB,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,SAAiB;IACvD,OAAO,GAAG,IAAI,aAAa,OAAO,CAAC,SAAS,CAAC,iCAAiC,CAAC;AACjF,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,SAAiB;IACvD,OAAO,GAAG,IAAI,qBAAqB,OAAO,CAAC,SAAS,CAAC,yCAAyC,CAAC;AACjG,CAAC;AAED,SAAS,OAAO,CAAC,KAAa;IAC5B,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC","sourcesContent":["const BASE = 'https://api.appstoreconnect.apple.com/v1';\n\nexport function appStoreAppInfosUrl(appId: string): string {\n return `${BASE}/apps/${segment(appId)}/appInfos?fields[appInfos]=state,appStoreState&limit=200`;\n}\n\nexport function appStoreVersionsForListingUrl(appId: string): string {\n const query = new URLSearchParams({\n 'filter[platform]': 'IOS',\n 'fields[appStoreVersions]': 'platform,versionString,appVersionState,appStoreState',\n limit: '200',\n });\n return `${BASE}/apps/${segment(appId)}/appStoreVersions?${query.toString()}`;\n}\n\nexport function appInfoLocalizationsUrl(appInfoId: string): string {\n return `${BASE}/appInfos/${segment(appInfoId)}/appInfoLocalizations?limit=200`;\n}\n\nexport function versionLocalizationsUrl(versionId: string): string {\n return `${BASE}/appStoreVersions/${segment(versionId)}/appStoreVersionLocalizations?limit=200`;\n}\n\nfunction segment(value: string): string {\n return encodeURIComponent(value);\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { StoreListingDesiredState } from '../../domain/storeListing/StoreListingDesiredState';
2
+ import type { StoreListingDiagnostic } from '../../domain/storeListing/StoreListingDiagnostic';
3
+ export declare function createAppStoreListingDiagnostics(desired: StoreListingDesiredState): readonly StoreListingDiagnostic[];
4
+ //# sourceMappingURL=createAppStoreListingDiagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAppStoreListingDiagnostics.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/createAppStoreListingDiagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAmB/F,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,wBAAwB,GAChC,SAAS,sBAAsB,EAAE,CAEnC"}
@@ -0,0 +1,85 @@
1
+ import { storeListingLocaleFieldValue } from '../../domain/storeListing/storeListingLocaleFieldValue';
2
+ import { APP_STORE_LISTING_FIELDS } from './appStoreListingFields';
3
+ import { isAppStoreScreenshotVariant } from './isAppStoreScreenshotVariant';
4
+ import { mapAppStoreLocale } from './mapAppStoreLocale';
5
+ const ALL_FIELDS = [
6
+ 'name',
7
+ 'summary',
8
+ 'description',
9
+ 'keywords',
10
+ 'promotionalText',
11
+ 'supportUrl',
12
+ 'marketingUrl',
13
+ 'privacyPolicyUrl',
14
+ 'promoVideoUrl',
15
+ ];
16
+ export function createAppStoreListingDiagnostics(desired) {
17
+ return [...localeDiagnostics(desired), ...desired.assetSets.flatMap(assetSetDiagnostics)];
18
+ }
19
+ function localeDiagnostics(desired) {
20
+ const diagnostics = desired.locales.flatMap(fieldAndLocaleDiagnostics);
21
+ const seen = new Map();
22
+ for (const locale of desired.locales) {
23
+ const mapped = mapAppStoreLocale(locale.locale);
24
+ if (mapped === null)
25
+ continue;
26
+ const previous = seen.get(mapped);
27
+ if (previous !== undefined && previous !== locale.locale) {
28
+ diagnostics.push(duplicateLocaleDiagnostic(locale.locale, mapped));
29
+ }
30
+ seen.set(mapped, locale.locale);
31
+ }
32
+ return diagnostics;
33
+ }
34
+ function fieldAndLocaleDiagnostics(locale) {
35
+ if (mapAppStoreLocale(locale.locale) === null) {
36
+ return [
37
+ {
38
+ severity: 'error',
39
+ code: 'APP_STORE_LOCALE_UNSUPPORTED',
40
+ message: `App Store Connect does not support locale ${locale.locale}.`,
41
+ target: 'ios',
42
+ locale: locale.locale,
43
+ },
44
+ ];
45
+ }
46
+ const supported = new Set(APP_STORE_LISTING_FIELDS);
47
+ return ALL_FIELDS.flatMap((field) => {
48
+ if (supported.has(field) || storeListingLocaleFieldValue(locale, field) === undefined)
49
+ return [];
50
+ return [
51
+ {
52
+ severity: 'warning',
53
+ code: 'APP_STORE_LISTING_FIELD_UNSUPPORTED',
54
+ message: `App Store Connect does not synchronize ${field}.`,
55
+ target: 'ios',
56
+ locale: locale.locale,
57
+ field,
58
+ },
59
+ ];
60
+ });
61
+ }
62
+ function duplicateLocaleDiagnostic(locale, mapped) {
63
+ return {
64
+ severity: 'error',
65
+ code: 'APP_STORE_LOCALE_COLLISION',
66
+ message: `Locale ${locale} maps to duplicate App Store locale ${mapped}.`,
67
+ target: 'ios',
68
+ locale,
69
+ };
70
+ }
71
+ function assetSetDiagnostics(set) {
72
+ if (set.target !== 'ios' || isAppStoreScreenshotVariant(set.variant))
73
+ return [];
74
+ return [
75
+ {
76
+ severity: 'error',
77
+ code: 'APP_STORE_SCREENSHOT_VARIANT_UNSUPPORTED',
78
+ message: `App Store screenshot variant ${set.variant} is unsupported.`,
79
+ target: 'ios',
80
+ locale: set.locale,
81
+ variant: set.variant,
82
+ },
83
+ ];
84
+ }
85
+ //# sourceMappingURL=createAppStoreListingDiagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAppStoreListingDiagnostics.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/createAppStoreListingDiagnostics.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,wDAAwD,CAAC;AACtG,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,UAAU,GAAiC;IAC/C,MAAM;IACN,SAAS;IACT,aAAa;IACb,UAAU;IACV,iBAAiB;IACjB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,eAAe;CAChB,CAAC;AAEF,MAAM,UAAU,gCAAgC,CAC9C,OAAiC;IAEjC,OAAO,CAAC,GAAG,iBAAiB,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC;AAC5F,CAAC;AAED,SAAS,iBAAiB,CAAC,OAAiC;IAC1D,MAAM,WAAW,GAAG,OAAO,CAAC,OAA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Q,EAAE,SAAS;gBACnB,IAAI,EAAE,qCAAqC;gBAC3C,OAAO,EAAE,0CAA0C,KAAK,GAAG;gBAC3D,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,KAAK;aACN;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,yBAAyB,CAAC,MAAc,EAAE,MAAc;IAC/D,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,UAAU,MAAM,uCAAuC,MAAM,GAAG;QACzE,MAAM,EAAE,KAAK;QACb,MAAM;KACP,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAC1B,GAAkD;IAElD,IAAI,GAAG,CAAC,MAAM,KAAK,KAAK,IAAI,2BAA2B,CAAC,GAAG,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC;IAChF,OAAO;QACL;YACE,QAAQ,EAAE,OAAO;YACjB,IAAI,EAAE,0CAA0C;YAChD,OAAO,EAAE,gCAAgC,GAAG,CAAC,OAAO,kBAAkB;YACtE,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,OAAO,EAAE,GAAG,CAAC,OAAO;SACrB;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type { StoreListingDesiredState } from '../../domain/storeListing/StoreListingDesiredState';\nimport type { StoreListingDiagnostic } from '../../domain/storeListing/StoreListingDiagnostic';\nimport type { StoreListingField } from '../../domain/storeListing/StoreListingField';\nimport { storeListingLocaleFieldValue } from '../../domain/storeListing/storeListingLocaleFieldValue';\nimport { APP_STORE_LISTING_FIELDS } from './appStoreListingFields';\nimport { isAppStoreScreenshotVariant } from './isAppStoreScreenshotVariant';\nimport { mapAppStoreLocale } from './mapAppStoreLocale';\n\nconst ALL_FIELDS: readonly StoreListingField[] = [\n 'name',\n 'summary',\n 'description',\n 'keywords',\n 'promotionalText',\n 'supportUrl',\n 'marketingUrl',\n 'privacyPolicyUrl',\n 'promoVideoUrl',\n];\n\nexport function createAppStoreListingDiagnostics(\n desired: StoreListingDesiredState,\n): readonly StoreListingDiagnostic[] {\n return [...localeDiagnostics(desired), ...desired.assetSets.flatMap(assetSetDiagnostics)];\n}\n\nfunction localeDiagnostics(desired: StoreListingDesiredState): StoreListingDiagnostic[] {\n const diagnostics = desired.locales.flatMap(fieldAndLocaleDiagnostics);\n const seen = new Map<string, string>();\n for (const locale of desired.locales) {\n const mapped = mapAppStoreLocale(locale.locale);\n if (mapped === null) continue;\n const previous = seen.get(mapped);\n if (previous !== undefined && previous !== locale.locale) {\n diagnostics.push(duplicateLocaleDiagnostic(locale.locale, mapped));\n }\n seen.set(mapped, locale.locale);\n }\n return diagnostics;\n}\n\nfunction fieldAndLocaleDiagnostics(\n locale: StoreListingDesiredState['locales'][number],\n): StoreListingDiagnostic[] {\n if (mapAppStoreLocale(locale.locale) === null) {\n return [\n {\n severity: 'error',\n code: 'APP_STORE_LOCALE_UNSUPPORTED',\n message: `App Store Connect does not support locale ${locale.locale}.`,\n target: 'ios',\n locale: locale.locale,\n },\n ];\n }\n const supported = new Set<StoreListingField>(APP_STORE_LISTING_FIELDS);\n return ALL_FIELDS.flatMap((field) => {\n if (supported.has(field) || storeListingLocaleFieldValue(locale, field) === undefined)\n return [];\n return [\n {\n severity: 'warning',\n code: 'APP_STORE_LISTING_FIELD_UNSUPPORTED',\n message: `App Store Connect does not synchronize ${field}.`,\n target: 'ios',\n locale: locale.locale,\n field,\n },\n ];\n });\n}\n\nfunction duplicateLocaleDiagnostic(locale: string, mapped: string): StoreListingDiagnostic {\n return {\n severity: 'error',\n code: 'APP_STORE_LOCALE_COLLISION',\n message: `Locale ${locale} maps to duplicate App Store locale ${mapped}.`,\n target: 'ios',\n locale,\n };\n}\n\nfunction assetSetDiagnostics(\n set: StoreListingDesiredState['assetSets'][number],\n): StoreListingDiagnostic[] {\n if (set.target !== 'ios' || isAppStoreScreenshotVariant(set.variant)) return [];\n return [\n {\n severity: 'error',\n code: 'APP_STORE_SCREENSHOT_VARIANT_UNSUPPORTED',\n message: `App Store screenshot variant ${set.variant} is unsupported.`,\n target: 'ios',\n locale: set.locale,\n variant: set.variant,\n },\n ];\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function isAppStoreScreenshotVariant(value: string): boolean;
2
+ //# sourceMappingURL=isAppStoreScreenshotVariant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isAppStoreScreenshotVariant.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/isAppStoreScreenshotVariant.ts"],"names":[],"mappings":"AAoCA,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAElE"}
@@ -0,0 +1,39 @@
1
+ const DISPLAY_TYPES = new Set([
2
+ 'APP_IPHONE_67',
3
+ 'APP_IPHONE_61',
4
+ 'APP_IPHONE_65',
5
+ 'APP_IPHONE_58',
6
+ 'APP_IPHONE_55',
7
+ 'APP_IPHONE_47',
8
+ 'APP_IPHONE_40',
9
+ 'APP_IPHONE_35',
10
+ 'APP_IPAD_PRO_3GEN_129',
11
+ 'APP_IPAD_PRO_3GEN_11',
12
+ 'APP_IPAD_PRO_129',
13
+ 'APP_IPAD_105',
14
+ 'APP_IPAD_97',
15
+ 'APP_DESKTOP',
16
+ 'APP_WATCH_ULTRA',
17
+ 'APP_WATCH_SERIES_10',
18
+ 'APP_WATCH_SERIES_7',
19
+ 'APP_WATCH_SERIES_4',
20
+ 'APP_WATCH_SERIES_3',
21
+ 'APP_APPLE_TV',
22
+ 'APP_APPLE_VISION_PRO',
23
+ 'IMESSAGE_APP_IPHONE_67',
24
+ 'IMESSAGE_APP_IPHONE_61',
25
+ 'IMESSAGE_APP_IPHONE_65',
26
+ 'IMESSAGE_APP_IPHONE_58',
27
+ 'IMESSAGE_APP_IPHONE_55',
28
+ 'IMESSAGE_APP_IPHONE_47',
29
+ 'IMESSAGE_APP_IPHONE_40',
30
+ 'IMESSAGE_APP_IPAD_PRO_3GEN_129',
31
+ 'IMESSAGE_APP_IPAD_PRO_3GEN_11',
32
+ 'IMESSAGE_APP_IPAD_PRO_129',
33
+ 'IMESSAGE_APP_IPAD_105',
34
+ 'IMESSAGE_APP_IPAD_97',
35
+ ]);
36
+ export function isAppStoreScreenshotVariant(value) {
37
+ return DISPLAY_TYPES.has(value);
38
+ }
39
+ //# sourceMappingURL=isAppStoreScreenshotVariant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isAppStoreScreenshotVariant.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/isAppStoreScreenshotVariant.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,uBAAuB;IACvB,sBAAsB;IACtB,kBAAkB;IAClB,cAAc;IACd,aAAa;IACb,aAAa;IACb,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,cAAc;IACd,sBAAsB;IACtB,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IACxB,gCAAgC;IAChC,+BAA+B;IAC/B,2BAA2B;IAC3B,uBAAuB;IACvB,sBAAsB;CACvB,CAAC,CAAC;AAEH,MAAM,UAAU,2BAA2B,CAAC,KAAa;IACvD,OAAO,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC","sourcesContent":["const DISPLAY_TYPES = new Set([\n 'APP_IPHONE_67',\n 'APP_IPHONE_61',\n 'APP_IPHONE_65',\n 'APP_IPHONE_58',\n 'APP_IPHONE_55',\n 'APP_IPHONE_47',\n 'APP_IPHONE_40',\n 'APP_IPHONE_35',\n 'APP_IPAD_PRO_3GEN_129',\n 'APP_IPAD_PRO_3GEN_11',\n 'APP_IPAD_PRO_129',\n 'APP_IPAD_105',\n 'APP_IPAD_97',\n 'APP_DESKTOP',\n 'APP_WATCH_ULTRA',\n 'APP_WATCH_SERIES_10',\n 'APP_WATCH_SERIES_7',\n 'APP_WATCH_SERIES_4',\n 'APP_WATCH_SERIES_3',\n 'APP_APPLE_TV',\n 'APP_APPLE_VISION_PRO',\n 'IMESSAGE_APP_IPHONE_67',\n 'IMESSAGE_APP_IPHONE_61',\n 'IMESSAGE_APP_IPHONE_65',\n 'IMESSAGE_APP_IPHONE_58',\n 'IMESSAGE_APP_IPHONE_55',\n 'IMESSAGE_APP_IPHONE_47',\n 'IMESSAGE_APP_IPHONE_40',\n 'IMESSAGE_APP_IPAD_PRO_3GEN_129',\n 'IMESSAGE_APP_IPAD_PRO_3GEN_11',\n 'IMESSAGE_APP_IPAD_PRO_129',\n 'IMESSAGE_APP_IPAD_105',\n 'IMESSAGE_APP_IPAD_97',\n]);\n\nexport function isAppStoreScreenshotVariant(value: string): boolean {\n return DISPLAY_TYPES.has(value);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function isEditableAppStoreListingState(value: unknown): boolean;
2
+ //# sourceMappingURL=isEditableAppStoreListingState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isEditableAppStoreListingState.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/isEditableAppStoreListingState.ts"],"names":[],"mappings":"AASA,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEtE"}
@@ -0,0 +1,12 @@
1
+ const EDITABLE_STATES = new Set([
2
+ 'PREPARE_FOR_SUBMISSION',
3
+ 'READY_FOR_REVIEW',
4
+ 'INVALID_BINARY',
5
+ 'REJECTED',
6
+ 'METADATA_REJECTED',
7
+ 'DEVELOPER_REJECTED',
8
+ ]);
9
+ export function isEditableAppStoreListingState(value) {
10
+ return typeof value === 'string' && EDITABLE_STATES.has(value);
11
+ }
12
+ //# sourceMappingURL=isEditableAppStoreListingState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isEditableAppStoreListingState.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/isEditableAppStoreListingState.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC9B,wBAAwB;IACxB,kBAAkB;IAClB,gBAAgB;IAChB,UAAU;IACV,mBAAmB;IACnB,oBAAoB;CACrB,CAAC,CAAC;AAEH,MAAM,UAAU,8BAA8B,CAAC,KAAc;IAC3D,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC","sourcesContent":["const EDITABLE_STATES = new Set([\n 'PREPARE_FOR_SUBMISSION',\n 'READY_FOR_REVIEW',\n 'INVALID_BINARY',\n 'REJECTED',\n 'METADATA_REJECTED',\n 'DEVELOPER_REJECTED',\n]);\n\nexport function isEditableAppStoreListingState(value: unknown): boolean {\n return typeof value === 'string' && EDITABLE_STATES.has(value);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function mapAppStoreLocale(locale: string): string | null;
2
+ //# sourceMappingURL=mapAppStoreLocale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapAppStoreLocale.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/mapAppStoreLocale.ts"],"names":[],"mappings":"AA8FA,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM/D"}
@@ -0,0 +1,112 @@
1
+ const SUPPORTED = new Set([
2
+ 'ar-SA',
3
+ 'bn',
4
+ 'ca',
5
+ 'zh-Hans',
6
+ 'zh-Hant',
7
+ 'hr',
8
+ 'cs',
9
+ 'da',
10
+ 'nl-NL',
11
+ 'en-AU',
12
+ 'en-CA',
13
+ 'en-GB',
14
+ 'en-US',
15
+ 'fi',
16
+ 'fr-FR',
17
+ 'fr-CA',
18
+ 'de-DE',
19
+ 'el',
20
+ 'gu',
21
+ 'he',
22
+ 'hi',
23
+ 'hu',
24
+ 'id',
25
+ 'it',
26
+ 'ja',
27
+ 'kn',
28
+ 'ko',
29
+ 'ms',
30
+ 'ml',
31
+ 'mr',
32
+ 'no',
33
+ 'or',
34
+ 'pl',
35
+ 'pt-BR',
36
+ 'pt-PT',
37
+ 'pa',
38
+ 'ro',
39
+ 'ru',
40
+ 'sk',
41
+ 'sl',
42
+ 'es-MX',
43
+ 'es-ES',
44
+ 'sv',
45
+ 'ta',
46
+ 'te',
47
+ 'th',
48
+ 'tr',
49
+ 'uk',
50
+ 'ur',
51
+ 'vi',
52
+ ]);
53
+ const LANGUAGE_DEFAULT_LOCALES = {
54
+ ar: 'ar-SA',
55
+ bn: 'bn',
56
+ ca: 'ca',
57
+ hr: 'hr',
58
+ cs: 'cs',
59
+ da: 'da',
60
+ nl: 'nl-NL',
61
+ fi: 'fi',
62
+ de: 'de-DE',
63
+ el: 'el',
64
+ gu: 'gu',
65
+ he: 'he',
66
+ hi: 'hi',
67
+ hu: 'hu',
68
+ id: 'id',
69
+ it: 'it',
70
+ ja: 'ja',
71
+ kn: 'kn',
72
+ ko: 'ko',
73
+ ms: 'ms',
74
+ ml: 'ml',
75
+ mr: 'mr',
76
+ no: 'no',
77
+ or: 'or',
78
+ pl: 'pl',
79
+ pa: 'pa',
80
+ ro: 'ro',
81
+ ru: 'ru',
82
+ sk: 'sk',
83
+ sl: 'sl',
84
+ sv: 'sv',
85
+ ta: 'ta',
86
+ te: 'te',
87
+ th: 'th',
88
+ tr: 'tr',
89
+ uk: 'uk',
90
+ ur: 'ur',
91
+ vi: 'vi',
92
+ };
93
+ export function mapAppStoreLocale(locale) {
94
+ if (SUPPORTED.has(locale))
95
+ return locale;
96
+ const parsed = new Intl.Locale(locale);
97
+ if (parsed.language === 'zh')
98
+ return mapChinese(parsed);
99
+ if (parsed.language === 'fr')
100
+ return parsed.region === 'CA' ? 'fr-CA' : 'fr-FR';
101
+ return LANGUAGE_DEFAULT_LOCALES[parsed.language] ?? null;
102
+ }
103
+ function mapChinese(locale) {
104
+ if (locale.script === 'Hans' || locale.region === 'CN' || locale.region === 'SG') {
105
+ return 'zh-Hans';
106
+ }
107
+ if (locale.script === 'Hant' || ['TW', 'HK', 'MO'].includes(locale.region ?? '')) {
108
+ return 'zh-Hant';
109
+ }
110
+ return null;
111
+ }
112
+ //# sourceMappingURL=mapAppStoreLocale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapAppStoreLocale.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/mapAppStoreLocale.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACxB,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,SAAS;IACT,SAAS;IACT,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,OAAO;IACP,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC,CAAC;AAEH,MAAM,wBAAwB,GAAqC;IACjE,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,OAAO;IACX,EAAE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IACrC,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QACjF,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;QACjF,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["const SUPPORTED = new Set([\n 'ar-SA',\n 'bn',\n 'ca',\n 'zh-Hans',\n 'zh-Hant',\n 'hr',\n 'cs',\n 'da',\n 'nl-NL',\n 'en-AU',\n 'en-CA',\n 'en-GB',\n 'en-US',\n 'fi',\n 'fr-FR',\n 'fr-CA',\n 'de-DE',\n 'el',\n 'gu',\n 'he',\n 'hi',\n 'hu',\n 'id',\n 'it',\n 'ja',\n 'kn',\n 'ko',\n 'ms',\n 'ml',\n 'mr',\n 'no',\n 'or',\n 'pl',\n 'pt-BR',\n 'pt-PT',\n 'pa',\n 'ro',\n 'ru',\n 'sk',\n 'sl',\n 'es-MX',\n 'es-ES',\n 'sv',\n 'ta',\n 'te',\n 'th',\n 'tr',\n 'uk',\n 'ur',\n 'vi',\n]);\n\nconst LANGUAGE_DEFAULT_LOCALES: Readonly<Record<string, string>> = {\n ar: 'ar-SA',\n bn: 'bn',\n ca: 'ca',\n hr: 'hr',\n cs: 'cs',\n da: 'da',\n nl: 'nl-NL',\n fi: 'fi',\n de: 'de-DE',\n el: 'el',\n gu: 'gu',\n he: 'he',\n hi: 'hi',\n hu: 'hu',\n id: 'id',\n it: 'it',\n ja: 'ja',\n kn: 'kn',\n ko: 'ko',\n ms: 'ms',\n ml: 'ml',\n mr: 'mr',\n no: 'no',\n or: 'or',\n pl: 'pl',\n pa: 'pa',\n ro: 'ro',\n ru: 'ru',\n sk: 'sk',\n sl: 'sl',\n sv: 'sv',\n ta: 'ta',\n te: 'te',\n th: 'th',\n tr: 'tr',\n uk: 'uk',\n ur: 'ur',\n vi: 'vi',\n};\n\nexport function mapAppStoreLocale(locale: string): string | null {\n if (SUPPORTED.has(locale)) return locale;\n const parsed = new Intl.Locale(locale);\n if (parsed.language === 'zh') return mapChinese(parsed);\n if (parsed.language === 'fr') return parsed.region === 'CA' ? 'fr-CA' : 'fr-FR';\n return LANGUAGE_DEFAULT_LOCALES[parsed.language] ?? null;\n}\n\nfunction mapChinese(locale: Intl.Locale): string | null {\n if (locale.script === 'Hans' || locale.region === 'CN' || locale.region === 'SG') {\n return 'zh-Hans';\n }\n if (locale.script === 'Hant' || ['TW', 'HK', 'MO'].includes(locale.region ?? '')) {\n return 'zh-Hant';\n }\n return null;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function parseAppStoreAppId(value: unknown, bundleIdentifier: string): string | null;
2
+ //# sourceMappingURL=parseAppStoreAppId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseAppStoreAppId.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/parseAppStoreAppId.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAU1F"}
@@ -0,0 +1,22 @@
1
+ export function parseAppStoreAppId(value, bundleIdentifier) {
2
+ if (!isRecord(value) || !Array.isArray(value.data))
3
+ return null;
4
+ let match = null;
5
+ for (const item of value.data) {
6
+ if (!isRecord(item) || item.type !== 'apps' || !isNonEmptyString(item.id))
7
+ continue;
8
+ if (!isRecord(item.attributes) || item.attributes.bundleId !== bundleIdentifier)
9
+ continue;
10
+ if (match !== null)
11
+ return null;
12
+ match = item.id;
13
+ }
14
+ return match;
15
+ }
16
+ function isRecord(value) {
17
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
18
+ }
19
+ function isNonEmptyString(value) {
20
+ return typeof value === 'string' && value.trim().length > 0;
21
+ }
22
+ //# sourceMappingURL=parseAppStoreAppId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseAppStoreAppId.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/parseAppStoreAppId.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,kBAAkB,CAAC,KAAc,EAAE,gBAAwB;IACzE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAChE,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAiB,EAAE,CAAC;QAC3C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;YAAE,SAAS;QACpF,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,KAAK,gBAAgB;YAAE,SAAS;QAC1F,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAChC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC;IAClB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["export function parseAppStoreAppId(value: unknown, bundleIdentifier: string): string | null {\n if (!isRecord(value) || !Array.isArray(value.data)) return null;\n let match: string | null = null;\n for (const item of value.data as unknown[]) {\n if (!isRecord(item) || item.type !== 'apps' || !isNonEmptyString(item.id)) continue;\n if (!isRecord(item.attributes) || item.attributes.bundleId !== bundleIdentifier) continue;\n if (match !== null) return null;\n match = item.id;\n }\n return match;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isNonEmptyString(value: unknown): value is string {\n return typeof value === 'string' && value.trim().length > 0;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import type { StoreListingDesiredState } from '../../domain/storeListing/StoreListingDesiredState';
2
+ import type { AppStoreListingLocaleResource } from './AppStoreListingContext';
3
+ export declare function parseAppStoreListingLocalizations(options: {
4
+ readonly appInfo: unknown;
5
+ readonly version: unknown;
6
+ readonly desired: StoreListingDesiredState;
7
+ }): readonly AppStoreListingLocaleResource[] | null;
8
+ //# sourceMappingURL=parseAppStoreListingLocalizations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseAppStoreListingLocalizations.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/parseAppStoreListingLocalizations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAS9E,wBAAgB,iCAAiC,CAAC,OAAO,EAAE;IACzD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;CAC5C,GAAG,SAAS,6BAA6B,EAAE,GAAG,IAAI,CAKlD"}
@@ -0,0 +1,68 @@
1
+ import { mapAppStoreLocale } from './mapAppStoreLocale';
2
+ export function parseAppStoreListingLocalizations(options) {
3
+ const appInfo = parseLayer(options.appInfo, 'appInfoLocalizations');
4
+ const version = parseLayer(options.version, 'appStoreVersionLocalizations');
5
+ if (appInfo === null || version === null)
6
+ return null;
7
+ return options.desired.locales.map((locale) => mergeLocale(locale.locale, appInfo, version));
8
+ }
9
+ function mergeLocale(canonicalLocale, appInfo, version) {
10
+ const providerLocale = mapAppStoreLocale(canonicalLocale) ?? canonicalLocale;
11
+ const info = appInfo.find((item) => item.locale === providerLocale);
12
+ const ver = version.find((item) => item.locale === providerLocale);
13
+ return {
14
+ canonicalLocale,
15
+ providerLocale,
16
+ ...(info === undefined ? {} : appInfoProperties(info)),
17
+ ...(ver === undefined ? {} : versionProperties(ver)),
18
+ };
19
+ }
20
+ function parseLayer(value, type) {
21
+ if (!isRecord(value) || !Array.isArray(value.data))
22
+ return null;
23
+ const result = [];
24
+ for (const item of value.data) {
25
+ if (!isRecord(item) || item.type !== type || !isNonEmptyString(item.id))
26
+ return null;
27
+ if (!isRecord(item.attributes) || !isNonEmptyString(item.attributes.locale))
28
+ return null;
29
+ result.push({ id: item.id, locale: item.attributes.locale, attributes: item.attributes });
30
+ }
31
+ return result;
32
+ }
33
+ function appInfoProperties(item) {
34
+ const name = readString(item.attributes.name);
35
+ const summary = readString(item.attributes.subtitle);
36
+ const privacyPolicyUrl = readString(item.attributes.privacyPolicyUrl);
37
+ return {
38
+ appInfoLocalizationId: item.id,
39
+ ...(name === undefined ? {} : { name }),
40
+ ...(summary === undefined ? {} : { summary }),
41
+ ...(privacyPolicyUrl === undefined ? {} : { privacyPolicyUrl }),
42
+ };
43
+ }
44
+ function versionProperties(item) {
45
+ const description = readString(item.attributes.description);
46
+ const keywords = readString(item.attributes.keywords);
47
+ const promotionalText = readString(item.attributes.promotionalText);
48
+ const supportUrl = readString(item.attributes.supportUrl);
49
+ const marketingUrl = readString(item.attributes.marketingUrl);
50
+ return {
51
+ versionLocalizationId: item.id,
52
+ ...(description === undefined ? {} : { description }),
53
+ ...(keywords === undefined ? {} : { keywords }),
54
+ ...(promotionalText === undefined ? {} : { promotionalText }),
55
+ ...(supportUrl === undefined ? {} : { supportUrl }),
56
+ ...(marketingUrl === undefined ? {} : { marketingUrl }),
57
+ };
58
+ }
59
+ function readString(value) {
60
+ return typeof value === 'string' ? value : undefined;
61
+ }
62
+ function isRecord(value) {
63
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
64
+ }
65
+ function isNonEmptyString(value) {
66
+ return typeof value === 'string' && value.trim().length > 0;
67
+ }
68
+ //# sourceMappingURL=parseAppStoreListingLocalizations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseAppStoreListingLocalizations.js","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/parseAppStoreListingLocalizations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAQxD,MAAM,UAAU,iCAAiC,CAAC,OAIjD;IACC,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC;IACpE,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,8BAA8B,CAAC,CAAC;IAC5E,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACtD,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC/F,CAAC;AAED,SAAS,WAAW,CAClB,eAAuB,EACvB,OAAqC,EACrC,OAAqC;IAErC,MAAM,cAAc,GAAG,iBAAiB,CAAC,eAAe,CAAC,IAAI,eAAe,CAAC;IAC7E,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC;IACpE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AAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC;QAC/C,GAAG,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC;QAC7D,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC;QACnD,GAAG,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC;KACxD,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["import type { StoreListingDesiredState } from '../../domain/storeListing/StoreListingDesiredState';\nimport type { AppStoreListingLocaleResource } from './AppStoreListingContext';\nimport { mapAppStoreLocale } from './mapAppStoreLocale';\n\ninterface LayerLocalization {\n readonly id: string;\n readonly locale: string;\n readonly attributes: Record<string, unknown>;\n}\n\nexport function parseAppStoreListingLocalizations(options: {\n readonly appInfo: unknown;\n readonly version: unknown;\n readonly desired: StoreListingDesiredState;\n}): readonly AppStoreListingLocaleResource[] | null {\n const appInfo = parseLayer(options.appInfo, 'appInfoLocalizations');\n const version = parseLayer(options.version, 'appStoreVersionLocalizations');\n if (appInfo === null || version === null) return null;\n return options.desired.locales.map((locale) => mergeLocale(locale.locale, appInfo, version));\n}\n\nfunction mergeLocale(\n canonicalLocale: string,\n appInfo: readonly LayerLocalization[],\n version: readonly LayerLocalization[],\n): AppStoreListingLocaleResource {\n const providerLocale = mapAppStoreLocale(canonicalLocale) ?? canonicalLocale;\n const info = appInfo.find((item) => item.locale === providerLocale);\n const ver = version.find((item) => item.locale === providerLocale);\n return {\n canonicalLocale,\n providerLocale,\n ...(info === undefined ? {} : appInfoProperties(info)),\n ...(ver === undefined ? {} : versionProperties(ver)),\n };\n}\n\nfunction parseLayer(value: unknown, type: string): readonly LayerLocalization[] | null {\n if (!isRecord(value) || !Array.isArray(value.data)) return null;\n const result: LayerLocalization[] = [];\n for (const item of value.data as unknown[]) {\n if (!isRecord(item) || item.type !== type || !isNonEmptyString(item.id)) return null;\n if (!isRecord(item.attributes) || !isNonEmptyString(item.attributes.locale)) return null;\n result.push({ id: item.id, locale: item.attributes.locale, attributes: item.attributes });\n }\n return result;\n}\n\nfunction appInfoProperties(item: LayerLocalization): Partial<AppStoreListingLocaleResource> {\n const name = readString(item.attributes.name);\n const summary = readString(item.attributes.subtitle);\n const privacyPolicyUrl = readString(item.attributes.privacyPolicyUrl);\n return {\n appInfoLocalizationId: item.id,\n ...(name === undefined ? {} : { name }),\n ...(summary === undefined ? {} : { summary }),\n ...(privacyPolicyUrl === undefined ? {} : { privacyPolicyUrl }),\n };\n}\n\nfunction versionProperties(item: LayerLocalization): Partial<AppStoreListingLocaleResource> {\n const description = readString(item.attributes.description);\n const keywords = readString(item.attributes.keywords);\n const promotionalText = readString(item.attributes.promotionalText);\n const supportUrl = readString(item.attributes.supportUrl);\n const marketingUrl = readString(item.attributes.marketingUrl);\n return {\n versionLocalizationId: item.id,\n ...(description === undefined ? {} : { description }),\n ...(keywords === undefined ? {} : { keywords }),\n ...(promotionalText === undefined ? {} : { promotionalText }),\n ...(supportUrl === undefined ? {} : { supportUrl }),\n ...(marketingUrl === undefined ? {} : { marketingUrl }),\n };\n}\n\nfunction readString(value: unknown): string | undefined {\n return typeof value === 'string' ? value : undefined;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isNonEmptyString(value: unknown): value is string {\n return typeof value === 'string' && value.trim().length > 0;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function parseEditableAppStoreResourceId(value: unknown, type: 'appInfos' | 'appStoreVersions'): string | null | undefined;
2
+ //# sourceMappingURL=parseEditableAppStoreResourceId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseEditableAppStoreResourceId.d.ts","sourceRoot":"","sources":["../../../src/providers/appStoreConnect/parseEditableAppStoreResourceId.ts"],"names":[],"mappings":"AAEA,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,UAAU,GAAG,kBAAkB,GACpC,MAAM,GAAG,IAAI,GAAG,SAAS,CAe3B"}