@expo/apple-utils 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ declare module "utils/json-file-cache" {
|
|
|
14
14
|
import { JSONObject } from '@expo/json-file';
|
|
15
15
|
export function cacheUserDirectory(): string;
|
|
16
16
|
export function usernameCachePath(): string;
|
|
17
|
+
export function latestWorkingDeveloperApplePortalDomainCachePath(): string;
|
|
17
18
|
export function cacheAsync(cacheFilePath: string, contents: JSONObject): Promise<void>;
|
|
18
19
|
export function getCacheAsync(filePath: string): Promise<JSONObject | null>;
|
|
19
20
|
}
|
|
@@ -157,6 +158,15 @@ declare module "utils/array" {
|
|
|
157
158
|
export function flat(array: any[], depth?: number): any[];
|
|
158
159
|
export function groupBy<T>(arr: T[], block: (v: T) => any): Record<string, T[]>;
|
|
159
160
|
}
|
|
161
|
+
declare module "utils/developerPortal" {
|
|
162
|
+
export enum DeveloperPortalDomain {
|
|
163
|
+
DEVELOPER_APPLE_COM = "https://developer.apple.com",
|
|
164
|
+
DEVELOPER_MDN_APPLE_COM = "https://developer-mdn.apple.com"
|
|
165
|
+
}
|
|
166
|
+
export function getLatestWorkingDeveloperApplePortalDomainAsync(): Promise<DeveloperPortalDomain>;
|
|
167
|
+
export function setLatestWorkingDeveloperApplePortalDomainAsync(domain: DeveloperPortalDomain): Promise<void>;
|
|
168
|
+
export function getFallbackDeveloperApplePortalDomain(domain: string): DeveloperPortalDomain;
|
|
169
|
+
}
|
|
160
170
|
declare module "portal/Teams" {
|
|
161
171
|
type AppStoreTeamStatus = string | 'active';
|
|
162
172
|
interface AppStoreTeamAgent {
|
|
@@ -193,9 +203,10 @@ declare module "portal/Teams" {
|
|
|
193
203
|
currentTeamMember: AppStoreTeamCurrentTeamMember;
|
|
194
204
|
name: string;
|
|
195
205
|
}
|
|
196
|
-
export function getTeamsAsync(): Promise<AppStoreTeam[]>;
|
|
197
|
-
export function selectTeamAsync({ teamId }?: {
|
|
206
|
+
export function getTeamsAsync(restoringSession?: boolean): Promise<AppStoreTeam[]>;
|
|
207
|
+
export function selectTeamAsync({ teamId, restoringSession, }?: {
|
|
198
208
|
teamId?: string;
|
|
209
|
+
restoringSession?: boolean;
|
|
199
210
|
}): Promise<AppStoreTeam>;
|
|
200
211
|
}
|
|
201
212
|
declare module "auth/utils/validate-session" {
|
|
@@ -209,7 +220,9 @@ declare module "auth/utils/validate-session" {
|
|
|
209
220
|
* Check if the global cookies are valid, if so, cache the cookies and return the auth state.
|
|
210
221
|
* Will throw if the cookies are expired.
|
|
211
222
|
*/
|
|
212
|
-
export function validateSessionAsync({ providerId, teamId
|
|
223
|
+
export function validateSessionAsync({ providerId, teamId, restoringSession, }: {
|
|
224
|
+
restoringSession?: boolean;
|
|
225
|
+
} & Pick<UserCredentials, 'providerId' | 'teamId'>, { autoResolveProvider }: LoginOptions): Promise<AuthState | null>;
|
|
213
226
|
}
|
|
214
227
|
declare module "utils/fastlane-session" {
|
|
215
228
|
import { CookieJar } from 'tough-cookie';
|
|
@@ -411,11 +424,11 @@ declare module "portal/PortalAPI" {
|
|
|
411
424
|
import { ParsingOptions, RequestContext, RequestProps } from "network/Request";
|
|
412
425
|
export type DevPortalAppIDType = 'ios' | 'mac';
|
|
413
426
|
type ParsedResponseResults = string | Record<string, any>;
|
|
414
|
-
export function
|
|
415
|
-
export function
|
|
427
|
+
export function getPortalUrlAsync(urlComponent?: string): Promise<string>;
|
|
428
|
+
export function getAccountPlatformPortalUrlAsync({ url, type, }: {
|
|
416
429
|
url: string;
|
|
417
430
|
type?: DevPortalAppIDType;
|
|
418
|
-
}): string
|
|
431
|
+
}): Promise<string>;
|
|
419
432
|
export function getValidName(name: string): string;
|
|
420
433
|
export function portalRequestAsync<T = any, R extends AxiosResponse<T> = AxiosResponse<T>>(context: RequestContext, { data, ...rest }: RequestProps, options?: Omit<ParsingOptions, 'supportedAuthType'>): Promise<R>;
|
|
421
434
|
export function parseValidationMessages(data: any): string[];
|
|
@@ -1010,7 +1023,7 @@ declare module "connect/ClientAPI" {
|
|
|
1010
1023
|
import { AxiosResponse } from 'axios';
|
|
1011
1024
|
import { ParsingOptions, RequestContext, RequestProps } from "network/Request";
|
|
1012
1025
|
export interface ClientAPI<Response, Props extends RequestProps = RequestProps> {
|
|
1013
|
-
|
|
1026
|
+
getHostnameAsync(context: RequestContext): Promise<string>;
|
|
1014
1027
|
requestAsync: <T = any, R extends AxiosResponse<T> = AxiosResponse<T>>(context: RequestContext, request: Props, options?: ParsingOptions) => Promise<R>;
|
|
1015
1028
|
requestAndParseAsync: <T = any, R extends AxiosResponse<T> = AxiosResponse<T>>(context: RequestContext, request: Props, options?: ParsingOptions) => Promise<Response | null>;
|
|
1016
1029
|
parseResponse: <T>(context: RequestContext, response: AxiosResponse<T>) => Response | null;
|
|
@@ -1077,7 +1090,7 @@ declare module "connect/ConnectAPI" {
|
|
|
1077
1090
|
cursor?: string;
|
|
1078
1091
|
}
|
|
1079
1092
|
export class ConnectClientAPI implements ClientAPI<ConnectResponse> {
|
|
1080
|
-
|
|
1093
|
+
getHostnameAsync(context: RequestContext): Promise<string>;
|
|
1081
1094
|
requestFromAPIAsync<T = any, R extends AxiosResponse<T> = AxiosResponse<T>>(context: RequestContext, request: RequestProps, options?: ParsingOptions): Promise<R>;
|
|
1082
1095
|
getSupportedContext(context: RequestContext, request: RequestProps, options: ParsingOptions): RequestContext;
|
|
1083
1096
|
requestAsync<T = any, R extends AxiosResponse<T> = AxiosResponse<T>>(context: RequestContext, request: RequestProps, options?: ParsingOptions): Promise<R>;
|
|
@@ -1123,7 +1136,7 @@ declare module "connect/IrisAPI" {
|
|
|
1123
1136
|
import { ParsingOptions, RequestContext, RequestProps } from "network/Request";
|
|
1124
1137
|
import { ConnectClientAPI } from "connect/ConnectAPI";
|
|
1125
1138
|
class IrisClientAPI extends ConnectClientAPI {
|
|
1126
|
-
|
|
1139
|
+
getHostnameAsync(context: RequestContext): Promise<string>;
|
|
1127
1140
|
requestFromAPIAsync<T = any, R extends AxiosResponse<T> = AxiosResponse<T>>(context: RequestContext, request: RequestProps, options?: ParsingOptions): Promise<R>;
|
|
1128
1141
|
}
|
|
1129
1142
|
export const irisClient: IrisClientAPI;
|
|
@@ -1518,7 +1531,7 @@ declare module "connect/ProvisioningAPI" {
|
|
|
1518
1531
|
import { ParsingOptions, RequestContext, RequestProps } from "network/Request";
|
|
1519
1532
|
import { ConnectClientAPI } from "connect/ConnectAPI";
|
|
1520
1533
|
class ProvisioningClientAPI extends ConnectClientAPI {
|
|
1521
|
-
|
|
1534
|
+
getHostnameAsync(context: RequestContext): Promise<string>;
|
|
1522
1535
|
requestAsync<T = any, R extends AxiosResponse<T> = AxiosResponse<T>>(context: RequestContext, request: RequestProps, options?: ParsingOptions): Promise<R>;
|
|
1523
1536
|
/**
|
|
1524
1537
|
* Used for web session requests (username/password auth).
|