From 33ec057a84ce5c970f8183f8dc437a596653003b Mon Sep 17 00:00:00 2001 From: Michael Law <1365977+lawmicha@users.noreply.github.com> Date: Tue, 14 Nov 2023 06:40:30 -0500 Subject: [PATCH] apply int64 patch --- .../AWSPluginsCore/Sync/MutationSync/MutationSync.swift | 2 +- .../Sync/MutationSync/MutationSyncMetadata.swift | 6 +++--- .../Sync/Events/OutboxMutationEvent.swift | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Sync/MutationSync/MutationSync.swift b/AmplifyPlugins/Core/AWSPluginsCore/Sync/MutationSync/MutationSync.swift index 65ec677e29..8348ac5132 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Sync/MutationSync/MutationSync.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Sync/MutationSync/MutationSync.swift @@ -87,7 +87,7 @@ public struct MutationSync: Decodable { self.syncMetadata = MutationSyncMetadata(modelId: modelIdentifier, modelName: resolvedModelName, deleted: deleted, - lastChangedAt: Int(lastChangedAt), + lastChangedAt: Int64(lastChangedAt), version: Int(version)) } } diff --git a/AmplifyPlugins/Core/AWSPluginsCore/Sync/MutationSync/MutationSyncMetadata.swift b/AmplifyPlugins/Core/AWSPluginsCore/Sync/MutationSync/MutationSyncMetadata.swift index 8b4290e59f..1e905b5439 100644 --- a/AmplifyPlugins/Core/AWSPluginsCore/Sync/MutationSync/MutationSyncMetadata.swift +++ b/AmplifyPlugins/Core/AWSPluginsCore/Sync/MutationSync/MutationSyncMetadata.swift @@ -14,7 +14,7 @@ public struct MutationSyncMetadata: Model { public let id: MutationSyncIdentifier public var deleted: Bool - public var lastChangedAt: Int + public var lastChangedAt: Int64 public var version: Int static let deliminator = "|" @@ -30,14 +30,14 @@ public struct MutationSyncMetadata: Model { The format of the `id` has changed to support unique ids across mutiple model types. Use init(modelId:modelName:deleted:lastChangedAt) to pass in the `modelName`. """) - public init(id: MutationSyncIdentifier, deleted: Bool, lastChangedAt: Int, version: Int) { + public init(id: MutationSyncIdentifier, deleted: Bool, lastChangedAt: Int64, version: Int) { self.id = id self.deleted = deleted self.lastChangedAt = lastChangedAt self.version = version } - public init(modelId: ModelId, modelName: String, deleted: Bool, lastChangedAt: Int, version: Int) { + public init(modelId: ModelId, modelName: String, deleted: Bool, lastChangedAt: Int64, version: Int) { self.id = Self.identifier(modelName: modelName, modelId: modelId) self.deleted = deleted self.lastChangedAt = lastChangedAt diff --git a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/Events/OutboxMutationEvent.swift b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/Events/OutboxMutationEvent.swift index 0401663f6f..3fdf36b4d7 100644 --- a/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/Events/OutboxMutationEvent.swift +++ b/AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/Events/OutboxMutationEvent.swift @@ -36,7 +36,7 @@ public struct OutboxMutationEvent { public struct OutboxMutationEventElement { public let model: Model public var version: Int? - public var lastChangedAt: Int? + public var lastChangedAt: Int64? public var deleted: Bool? } }