diff --git a/Scripts/generate-config-types/openapi.yaml b/Scripts/generate-config-types/openapi.yaml index 0e3e345..29ece5d 100644 --- a/Scripts/generate-config-types/openapi.yaml +++ b/Scripts/generate-config-types/openapi.yaml @@ -414,6 +414,7 @@ components: key: description: Audience unique key type: string + nullable: true name: type: string description: Audience Name @@ -873,6 +874,10 @@ components: type: string enum: - bucketed_into_segment + ExperienceKeyBucketedMatchRulesTypes: + type: string + enum: + - bucketed_into_experience_key DayOfWeekMatchRulesTypes: type: string enum: @@ -913,6 +918,7 @@ components: - $ref: '#/components/schemas/LanguageMatchRulesTypes' - $ref: '#/components/schemas/GoalTriggeredMatchRulesTypes' - $ref: '#/components/schemas/SegmentBucketedMatchRulesTypes' + - $ref: '#/components/schemas/ExperienceKeyBucketedMatchRulesTypes' - $ref: '#/components/schemas/DayOfWeekMatchRulesTypes' - $ref: '#/components/schemas/HourOfDayMatchRulesTypes' - $ref: '#/components/schemas/MinuteOfHourMatchRulesTypes' @@ -1175,6 +1181,22 @@ components: properties: match_type: $ref: '#/components/schemas/ChoiceMatchingOptions' + ExperienceKeyBucketedMatchRule: + allOf: + - $ref: '#/components/schemas/BaseRuleWithStringValue' + - type: object + required: + - rule_type + properties: + rule_type: + $ref: '#/components/schemas/ExperienceKeyBucketedMatchRulesTypes' + matching: + allOf: + - $ref: '#/components/schemas/BaseMatch' + - type: object + properties: + match_type: + $ref: '#/components/schemas/ChoiceMatchingOptions' ExperienceBucketedMatchRule: allOf: - $ref: '#/components/schemas/BaseRuleWithExperienceBucketedValue' @@ -1300,6 +1322,7 @@ components: - $ref: '#/components/schemas/LanguageMatchRule' - $ref: '#/components/schemas/GoalTriggeredMatchRule' - $ref: '#/components/schemas/SegmentBucketedMatchRule' + - $ref: '#/components/schemas/ExperienceKeyBucketedMatchRule' - $ref: '#/components/schemas/DayOfWeekMatchRule' - $ref: '#/components/schemas/HourOfDayMatchRule' - $ref: '#/components/schemas/MinuteOfHourMatchRule' @@ -1330,6 +1353,7 @@ components: visits_count: '#/components/schemas/GenericNumericMatchRule' bucketed_into_experience: '#/components/schemas/GenericBoolMatchRule' bucketed_into_segment: '#/components/schemas/SegmentBucketedMatchRule' + bucketed_into_experience_key: '#/components/schemas/ExperienceKeyBucketedMatchRule' local_time_day_of_week: '#/components/schemas/DayOfWeekMatchRule' local_time_hour_of_day: '#/components/schemas/HourOfDayMatchRule' local_time_minute_of_hour: '#/components/schemas/MinuteOfHourMatchRule' @@ -1374,6 +1398,7 @@ components: - $ref: '#/components/schemas/LanguageMatchRule' - $ref: '#/components/schemas/GoalTriggeredMatchRule' - $ref: '#/components/schemas/SegmentBucketedMatchRule' + - $ref: '#/components/schemas/ExperienceKeyBucketedMatchRule' - $ref: '#/components/schemas/DayOfWeekMatchRule' - $ref: '#/components/schemas/HourOfDayMatchRule' - $ref: '#/components/schemas/MinuteOfHourMatchRule' @@ -1406,6 +1431,7 @@ components: visits_count: '#/components/schemas/GenericNumericMatchRule' bucketed_into_experience: '#/components/schemas/GenericBoolMatchRule' bucketed_into_segment: '#/components/schemas/SegmentBucketedMatchRule' + bucketed_into_experience_key: '#/components/schemas/ExperienceKeyBucketedMatchRule' local_time_day_of_week: '#/components/schemas/DayOfWeekMatchRule' local_time_hour_of_day: '#/components/schemas/HourOfDayMatchRule' local_time_minute_of_hour: '#/components/schemas/MinuteOfHourMatchRule' @@ -1448,6 +1474,7 @@ components: - $ref: '#/components/schemas/LanguageMatchRule' - $ref: '#/components/schemas/GoalTriggeredMatchRule' - $ref: '#/components/schemas/SegmentBucketedMatchRule' + - $ref: '#/components/schemas/ExperienceKeyBucketedMatchRule' - $ref: '#/components/schemas/DayOfWeekMatchRule' - $ref: '#/components/schemas/HourOfDayMatchRule' - $ref: '#/components/schemas/MinuteOfHourMatchRule' @@ -1481,6 +1508,7 @@ components: visits_count: '#/components/schemas/GenericNumericMatchRule' bucketed_into_experience: '#/components/schemas/GenericBoolMatchRule' bucketed_into_segment: '#/components/schemas/SegmentBucketedMatchRule' + bucketed_into_experience_key: '#/components/schemas/ExperienceKeyBucketedMatchRule' local_time_day_of_week: '#/components/schemas/DayOfWeekMatchRule' local_time_hour_of_day: '#/components/schemas/HourOfDayMatchRule' local_time_minute_of_hour: '#/components/schemas/MinuteOfHourMatchRule' @@ -3021,6 +3049,7 @@ components: key: description: Experience readable key that uniquely identifies this experience type: string + nullable: true locations: description: >- List of locations IDs on which this experience is presented. Either @@ -3206,6 +3235,7 @@ components: key: description: Variation Key type: string + nullable: true traffic_allocation: description: > Percentage of traffic allocation for this variation, as a number @@ -3270,6 +3300,7 @@ components: key: description: A unique per project level identifier type: string + nullable: true variables: type: array description: An array of user-defined variables of a feature. @@ -3308,6 +3339,7 @@ components: key: description: Goal Key type: string + nullable: true type: type: array description: List of goal types to be returned @@ -3696,6 +3728,7 @@ components: key: description: Location unique key type: string + nullable: true name: type: string description: Location Name @@ -4015,6 +4048,7 @@ components: key: description: Segment unique key type: string + nullable: true name: type: string description: Segment Name @@ -4218,6 +4252,9 @@ components: campaign: description: Campaign string type: string + content: + description: Content string (ad-creative identifier from utm_content) + type: string visitorType: description: Type of the visitor type: string diff --git a/Sources/ConvertSwiftSDKCore/Generated/ConfigSchemas.swift b/Sources/ConvertSwiftSDKCore/Generated/ConfigSchemas.swift index 8390e46..d89749f 100644 --- a/Sources/ConvertSwiftSDKCore/Generated/ConfigSchemas.swift +++ b/Sources/ConvertSwiftSDKCore/Generated/ConfigSchemas.swift @@ -938,6 +938,10 @@ public enum Components { @frozen public enum SegmentBucketedMatchRulesTypes: String, Codable, Hashable, Sendable, CaseIterable { case bucketed_into_segment = "bucketed_into_segment" } + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRulesTypes`. + @frozen public enum ExperienceKeyBucketedMatchRulesTypes: String, Codable, Hashable, Sendable, CaseIterable { + case bucketed_into_experience_key = "bucketed_into_experience_key" + } /// - Remark: Generated from `#/components/schemas/DayOfWeekMatchRulesTypes`. @frozen public enum DayOfWeekMatchRulesTypes: String, Codable, Hashable, Sendable, CaseIterable { case local_time_day_of_week = "local_time_day_of_week" @@ -2299,6 +2303,98 @@ public enum Components { try self.value2.encode(to: encoder) } } + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule`. + public struct ExperienceKeyBucketedMatchRule: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule/value1`. + public var value1: Components.Schemas.BaseRuleWithStringValue + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule/value2`. + public struct Value2Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule/value2/rule_type`. + public var rule_type: Components.Schemas.ExperienceKeyBucketedMatchRulesTypes + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule/value2/matching`. + public struct matchingPayload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule/value2/matching/value1`. + public var value1: Components.Schemas.BaseMatch + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule/value2/matching/value2`. + public struct Value2Payload: Codable, Hashable, Sendable { + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule/value2/matching/value2/match_type`. + public var match_type: Components.Schemas.ChoiceMatchingOptions? + /// Creates a new `Value2Payload`. + /// + /// - Parameters: + /// - match_type: + public init(match_type: Components.Schemas.ChoiceMatchingOptions? = nil) { + self.match_type = match_type + } + public enum CodingKeys: String, CodingKey { + case match_type + } + } + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule/value2/matching/value2`. + public var value2: Components.Schemas.ExperienceKeyBucketedMatchRule.Value2Payload.matchingPayload.Value2Payload + /// Creates a new `matchingPayload`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.BaseMatch, + value2: Components.Schemas.ExperienceKeyBucketedMatchRule.Value2Payload.matchingPayload.Value2Payload + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Swift.Decoder) throws { + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) + } + public func encode(to encoder: any Swift.Encoder) throws { + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) + } + } + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule/value2/matching`. + public var matching: Components.Schemas.ExperienceKeyBucketedMatchRule.Value2Payload.matchingPayload? + /// Creates a new `Value2Payload`. + /// + /// - Parameters: + /// - rule_type: + /// - matching: + public init( + rule_type: Components.Schemas.ExperienceKeyBucketedMatchRulesTypes, + matching: Components.Schemas.ExperienceKeyBucketedMatchRule.Value2Payload.matchingPayload? = nil + ) { + self.rule_type = rule_type + self.matching = matching + } + public enum CodingKeys: String, CodingKey { + case rule_type + case matching + } + } + /// - Remark: Generated from `#/components/schemas/ExperienceKeyBucketedMatchRule/value2`. + public var value2: Components.Schemas.ExperienceKeyBucketedMatchRule.Value2Payload + /// Creates a new `ExperienceKeyBucketedMatchRule`. + /// + /// - Parameters: + /// - value1: + /// - value2: + public init( + value1: Components.Schemas.BaseRuleWithStringValue, + value2: Components.Schemas.ExperienceKeyBucketedMatchRule.Value2Payload + ) { + self.value1 = value1 + self.value2 = value2 + } + public init(from decoder: any Swift.Decoder) throws { + self.value1 = try .init(from: decoder) + self.value2 = try .init(from: decoder) + } + public func encode(to encoder: any Swift.Encoder) throws { + try self.value1.encode(to: encoder) + try self.value2.encode(to: encoder) + } + } /// - Remark: Generated from `#/components/schemas/DayOfWeekMatchRule`. public struct DayOfWeekMatchRule: Codable, Hashable, Sendable { /// - Remark: Generated from `#/components/schemas/DayOfWeekMatchRule/value1`. @@ -2861,6 +2957,8 @@ public enum Components { case browser_version(Components.Schemas.GenericTextMatchRule) /// - Remark: Generated from `#/components/schemas/RuleElement/GenericBoolMatchRule`. case bucketed_into_experience(Components.Schemas.GenericBoolMatchRule) + /// - Remark: Generated from `#/components/schemas/RuleElement/ExperienceKeyBucketedMatchRule`. + case bucketed_into_experience_key(Components.Schemas.ExperienceKeyBucketedMatchRule) /// - Remark: Generated from `#/components/schemas/RuleElement/SegmentBucketedMatchRule`. case bucketed_into_segment(Components.Schemas.SegmentBucketedMatchRule) /// - Remark: Generated from `#/components/schemas/RuleElement/GenericTextMatchRule`. @@ -2971,6 +3069,8 @@ public enum Components { self = .browser_version(try .init(from: decoder)) case "bucketed_into_experience": self = .bucketed_into_experience(try .init(from: decoder)) + case "bucketed_into_experience_key": + self = .bucketed_into_experience_key(try .init(from: decoder)) case "bucketed_into_segment": self = .bucketed_into_segment(try .init(from: decoder)) case "campaign": @@ -3081,6 +3181,8 @@ public enum Components { try value.encode(to: encoder) case let .bucketed_into_experience(value): try value.encode(to: encoder) + case let .bucketed_into_experience_key(value): + try value.encode(to: encoder) case let .bucketed_into_segment(value): try value.encode(to: encoder) case let .campaign(value): @@ -3186,6 +3288,8 @@ public enum Components { case browser_version(Components.Schemas.GenericTextMatchRule) /// - Remark: Generated from `#/components/schemas/RuleElementAudience/GenericBoolMatchRule`. case bucketed_into_experience(Components.Schemas.GenericBoolMatchRule) + /// - Remark: Generated from `#/components/schemas/RuleElementAudience/ExperienceKeyBucketedMatchRule`. + case bucketed_into_experience_key(Components.Schemas.ExperienceKeyBucketedMatchRule) /// - Remark: Generated from `#/components/schemas/RuleElementAudience/SegmentBucketedMatchRule`. case bucketed_into_segment(Components.Schemas.SegmentBucketedMatchRule) /// - Remark: Generated from `#/components/schemas/RuleElementAudience/GenericTextMatchRule`. @@ -3300,6 +3404,8 @@ public enum Components { self = .browser_version(try .init(from: decoder)) case "bucketed_into_experience": self = .bucketed_into_experience(try .init(from: decoder)) + case "bucketed_into_experience_key": + self = .bucketed_into_experience_key(try .init(from: decoder)) case "bucketed_into_segment": self = .bucketed_into_segment(try .init(from: decoder)) case "campaign": @@ -3414,6 +3520,8 @@ public enum Components { try value.encode(to: encoder) case let .bucketed_into_experience(value): try value.encode(to: encoder) + case let .bucketed_into_experience_key(value): + try value.encode(to: encoder) case let .bucketed_into_segment(value): try value.encode(to: encoder) case let .campaign(value): diff --git a/Sources/ConvertSwiftSDKCore/Generated/discriminator-manifest.json b/Sources/ConvertSwiftSDKCore/Generated/discriminator-manifest.json index 79bd04d..99c38c5 100644 --- a/Sources/ConvertSwiftSDKCore/Generated/discriminator-manifest.json +++ b/Sources/ConvertSwiftSDKCore/Generated/discriminator-manifest.json @@ -91,6 +91,7 @@ "browser_name", "browser_version", "bucketed_into_experience", + "bucketed_into_experience_key", "bucketed_into_segment", "campaign", "city", @@ -148,6 +149,7 @@ "browser_name", "browser_version", "bucketed_into_experience", + "bucketed_into_experience_key", "bucketed_into_segment", "campaign", "city",