25 public const GOOGLE_SERVER_PATH_V3 = self::HTTP_SCHEME_DEFAULT . self::HTTP_SCHEME_SEPARATOR . self::GOOGLE_API_URL . self::GOOGLE_API_V3_URI;
26 public const GOOGLE_SERVER_PATH_V2 = self::HTTP_SCHEME_DEFAULT . self::HTTP_SCHEME_SEPARATOR . self::GOOGLE_CALDAV_URL . self::GOOGLE_API_V2_URI;
38 'https://www.googleapis.com/auth/calendar',
39 'https://www.googleapis.com/auth/calendar.readonly',
48 return in_array($accountType, [self::GOOGLE_ACCOUNT_TYPE_CALDAV, self::GOOGLE_ACCOUNT_TYPE_API],
true);
53 return !empty($errorText) && preg_match(
"/^(\[410\] Resource has been deleted)/i", $errorText);
58 return !empty($errorText) && preg_match(
"/^\[(404)\][a-z0-9 _]*/i", $errorText);
63 return !empty($errorText)
64 && (preg_match(
"/^(\[410\] The requested minimum modification time lies too far in the past.)/i", $errorText)
65 || preg_match(
"/^(\[410\] Sync token is no longer valid, a full sync is required.)/i", $errorText))
71 return !empty($errorText)
72 && (preg_match(
"/^\[401\] Request is missing required authentication credential.[a-z0-9 _]*/i", $errorText)
73 || preg_match(
"/^\[401\] Request had invalid authentication credentials.[a-z0-9 _]*/i", $errorText))
87 Loader::includeModule(
'socialservices')
88 && ($apiKey = Option::get(
'socialservices',
'google_api_key',
null))
94 if (Loader::includeModule(
'fileman'))
96 $apiKey = AddressType::getApiKey();
103 return Option::get(
'fileman',
'google_map_api_key',
null)
104 ?? Option::get(
'bitrix24',
'google_map_api_key',
null)
isMissingRequiredAuthCredential(string $errorText=null)
isNotValidSyncTokenError(string $errorText=null)
const GOOGLE_SERVER_PATH_V2
const GOOGLE_ACCOUNT_TYPE_API
const GOOGLE_ACCOUNT_TYPE_CALDAV
const EXCLUDED_DATE_FORMAT
const GOOGLE_SERVER_PATH_V3
const DATE_TIME_FORMAT_WITH_UTC_TIMEZONE
isNotFoundError(string $errorText=null)
const EXCLUDED_DATE_TIME_FORMAT
const DATE_TIME_FORMAT_WITH_MICROSECONDS
isGoogleConnection($accountType)
isDeletedResource($errorText)
const DATE_TIME_FORMAT_RFC_3339
const HTTP_SCHEME_DEFAULT
const HTTP_SCHEME_SEPARATOR