Files
purchases-ios/Sources/Checkpoints/ResolvedCheckpointWorkflow.swift
Facundo MenzellaandClaude Opus 5.5 06cd8c171c other: Add trace_id to the checkpoint hit event (#7811)
* Add trace_id to the checkpoint hit event

The id is created when the checkpoint is evaluated and handed to the workflow it
starts, so the hit, the workflow's step and paywall events and the receipt's
paywall trace_id all share it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Drop Android references from trace id comments

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Remove remaining Android references in workflow event comments

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 10:43:35 +02:00

44 lines
1.3 KiB
Swift

//
// Copyright RevenueCat Inc. All Rights Reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// ResolvedCheckpointWorkflow.swift
//
import Foundation
/// A workflow resolved from RevenueCat configuration and ready for RevenueCatUI to present.
@_spi(Internal) public final class ResolvedCheckpointWorkflow: @unchecked Sendable {
/// The workflow to render.
public let workflow: PublishedWorkflow
/// UI configuration used to render the workflow.
public let uiConfig: UIConfig
/// All offerings available while executing the workflow.
public let offerings: Offerings
/// The `blob_ref` of the config item the workflow came from.
public let workflowBlobRef: String?
/// Shared by the checkpoint hit and every event of the workflow run it starts.
public let traceId: String
init(
workflow: PublishedWorkflow,
uiConfig: UIConfig,
offerings: Offerings,
workflowBlobRef: String? = nil,
traceId: String = UUID().uuidString
) {
self.workflow = workflow
self.uiConfig = uiConfig
self.offerings = offerings
self.workflowBlobRef = workflowBlobRef
self.traceId = traceId
}
}