ConfigConstants.swift 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright 2024 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. enum ConfigConstants {
  15. static let _SEC_PER_MIN = 60
  16. static let _MSEC_PER_SEC = 1000
  17. static let internalMetadataAllPackagesPrefix = "all_packages"
  18. static let httpDefaultConnectionTimeout: TimeInterval = 60
  19. static let defaultMinimumFetchInterval: TimeInterval = 43200
  20. static let remoteConfigQueueLabel = "com.google.GoogleConfigService.FIRRemoteConfig"
  21. /// Remote Config Error Domain.
  22. static let remoteConfigErrorDomain = "com.google.remoteconfig.ErrorDomain"
  23. /// Remote Config Realtime Error Domain
  24. static let remoteConfigUpdateErrorDomain = "com.google.remoteconfig.update.ErrorDomain"
  25. /// Error domain for custom signals errors.
  26. static let remoteConfigCustomSignalsErrorDomain =
  27. "com.google.remoteconfig.customsignals.ErrorDomain"
  28. // MARK: - Fetch Response Keys
  29. static let fetchResponseKeyEntries = "entries"
  30. static let fetchResponseKeyExperimentDescriptions = "experimentDescriptions"
  31. static let fetchResponseKeyPersonalizationMetadata = "personalizationMetadata"
  32. static let fetchResponseKeyRolloutMetadata = "rolloutMetadata"
  33. static let fetchResponseKeyRolloutID = "rolloutId"
  34. static let fetchResponseKeyVariantID = "variantId"
  35. static let fetchResponseKeyAffectedParameterKeys = "affectedParameterKeys"
  36. static let fetchResponseKeyError = "error"
  37. static let fetchResponseKeyErrorCode = "code"
  38. static let fetchResponseKeyErrorStatus = "status"
  39. static let fetchResponseKeyErrorMessage = "message"
  40. static let fetchResponseKeyState = "state"
  41. static let fetchResponseKeyStateUnspecified = "INSTANCE_STATE_UNSPECIFIED"
  42. static let fetchResponseKeyStateUpdate = "UPDATE"
  43. static let fetchResponseKeyStateNoTemplate = "NO_TEMPLATE"
  44. static let fetchResponseKeyStateNoChange = "NO_CHANGE"
  45. static let fetchResponseKeyStateEmptyConfig = "EMPTY_CONFIG"
  46. static let fetchResponseKeyTemplateVersion = "templateVersion"
  47. static let activeKeyTemplateVersion = "activeTemplateVersion"
  48. // MARK: Formerly RCNConfigDefines.h
  49. static let experimentTableKeyPayload = "experiment_payload"
  50. static let experimentTableKeyMetadata = "experiment_metadata"
  51. static let experimentTableKeyActivePayload = "experiment_active_payload"
  52. static let rolloutTableKeyActiveMetadata = "active_rollout_metadata"
  53. static let rolloutTableKeyFetchedMetadata = "fetched_rollout_metadata"
  54. }