hikoutei 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.ja.md +135 -0
- package/README.ko.md +138 -0
- package/README.md +143 -0
- package/apps-script/gateway/Code.gs +412 -0
- package/dist/adapter/persistence/contracts/index.d.ts +3 -0
- package/dist/adapter/persistence/contracts/index.d.ts.map +1 -0
- package/dist/adapter/persistence/contracts/index.js +3 -0
- package/dist/adapter/persistence/contracts/index.js.map +1 -0
- package/dist/adapter/persistence/contracts/sql.d.ts +50 -0
- package/dist/adapter/persistence/contracts/sql.d.ts.map +1 -0
- package/dist/adapter/persistence/contracts/sql.js +9 -0
- package/dist/adapter/persistence/contracts/sql.js.map +1 -0
- package/dist/adapter/persistence/index.d.ts +2 -0
- package/dist/adapter/persistence/index.d.ts.map +1 -0
- package/dist/adapter/persistence/index.js +2 -0
- package/dist/adapter/persistence/index.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmTypedSheetsEntityManager.d.ts +53 -0
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmTypedSheetsEntityManager.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmTypedSheetsEntityManager.js +105 -0
- package/dist/adapter/persistence/providers/mikro-orm/api/MikroOrmTypedSheetsEntityManager.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.d.ts +39 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.js +54 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmMappedTypedSheets.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmTypedSheetsEngine.d.ts +38 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmTypedSheetsEngine.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmTypedSheetsEngine.js +55 -0
- package/dist/adapter/persistence/providers/mikro-orm/engine/MikroOrmTypedSheetsEngine.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/index.d.ts +16 -0
- package/dist/adapter/persistence/providers/mikro-orm/index.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/index.js +9 -0
- package/dist/adapter/persistence/providers/mikro-orm/index.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmMappedObservation.d.ts +27 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmMappedObservation.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmMappedObservation.js +67 -0
- package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmMappedObservation.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmFlushChanges.d.ts +19 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmFlushChanges.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmFlushChanges.js +67 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmFlushChanges.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteAdapter.d.ts +78 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteAdapter.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteAdapter.js +121 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteAdapter.js.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteSchema.d.ts +20 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteSchema.d.ts.map +1 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteSchema.js +125 -0
- package/dist/adapter/persistence/providers/mikro-orm/storage/MikroOrmSqliteSchema.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/errors.d.ts +42 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/errors.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/errors.js +51 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/errors.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/index.d.ts +22 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/index.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/index.js +12 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/index.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.d.ts +42 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.js +161 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperation.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.d.ts +3 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.js +692 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.d.ts +29 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.js +538 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.d.ts +12 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.js +190 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/read/tableReadOperation.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.d.ts +23 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.js +166 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/fastAppendOperation.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.d.ts +50 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.js +60 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/codeGsProtocol.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/constants.d.ts +44 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/constants.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/constants.js +40 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/constants.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.d.ts +7 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.js +47 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/timing.d.ts +5 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/timing.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/timing.js +54 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/timing.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/types.d.ts +5 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/types.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/types.js +2 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/types.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.d.ts +10 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.js +35 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/protocol/validation.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.d.ts +67 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.js +204 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationClient.js.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.d.ts +78 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.d.ts.map +1 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.js +343 -0
- package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.js.map +1 -0
- package/dist/application/index.d.ts +4 -0
- package/dist/application/index.d.ts.map +1 -0
- package/dist/application/index.js +4 -0
- package/dist/application/index.js.map +1 -0
- package/dist/application/orm/api/TypedSheetsOrm.d.ts +71 -0
- package/dist/application/orm/api/TypedSheetsOrm.d.ts.map +1 -0
- package/dist/application/orm/api/TypedSheetsOrm.js +116 -0
- package/dist/application/orm/api/TypedSheetsOrm.js.map +1 -0
- package/dist/application/orm/api/contracts.d.ts +118 -0
- package/dist/application/orm/api/contracts.d.ts.map +1 -0
- package/dist/application/orm/api/contracts.js +21 -0
- package/dist/application/orm/api/contracts.js.map +1 -0
- package/dist/application/orm/errors.d.ts +35 -0
- package/dist/application/orm/errors.d.ts.map +1 -0
- package/dist/application/orm/errors.js +35 -0
- package/dist/application/orm/errors.js.map +1 -0
- package/dist/application/orm/index.d.ts +13 -0
- package/dist/application/orm/index.d.ts.map +1 -0
- package/dist/application/orm/index.js +7 -0
- package/dist/application/orm/index.js.map +1 -0
- package/dist/application/orm/mapping/contracts.d.ts +113 -0
- package/dist/application/orm/mapping/contracts.d.ts.map +1 -0
- package/dist/application/orm/mapping/contracts.js +8 -0
- package/dist/application/orm/mapping/contracts.js.map +1 -0
- package/dist/application/orm/mapping/definition.d.ts +16 -0
- package/dist/application/orm/mapping/definition.d.ts.map +1 -0
- package/dist/application/orm/mapping/definition.js +145 -0
- package/dist/application/orm/mapping/definition.js.map +1 -0
- package/dist/application/orm/mapping/entityMapping.d.ts +13 -0
- package/dist/application/orm/mapping/entityMapping.d.ts.map +1 -0
- package/dist/application/orm/mapping/entityMapping.js +13 -0
- package/dist/application/orm/mapping/entityMapping.js.map +1 -0
- package/dist/application/orm/mapping/identity.d.ts +14 -0
- package/dist/application/orm/mapping/identity.d.ts.map +1 -0
- package/dist/application/orm/mapping/identity.js +37 -0
- package/dist/application/orm/mapping/identity.js.map +1 -0
- package/dist/application/orm/mapping/observationMapping.d.ts +42 -0
- package/dist/application/orm/mapping/observationMapping.d.ts.map +1 -0
- package/dist/application/orm/mapping/observationMapping.js +65 -0
- package/dist/application/orm/mapping/observationMapping.js.map +1 -0
- package/dist/application/orm/mapping/projection.d.ts +22 -0
- package/dist/application/orm/mapping/projection.d.ts.map +1 -0
- package/dist/application/orm/mapping/projection.js +74 -0
- package/dist/application/orm/mapping/projection.js.map +1 -0
- package/dist/application/orm/mapping/registry.d.ts +15 -0
- package/dist/application/orm/mapping/registry.d.ts.map +1 -0
- package/dist/application/orm/mapping/registry.js +38 -0
- package/dist/application/orm/mapping/registry.js.map +1 -0
- package/dist/application/orm/mapping/values.d.ts +17 -0
- package/dist/application/orm/mapping/values.d.ts.map +1 -0
- package/dist/application/orm/mapping/values.js +141 -0
- package/dist/application/orm/mapping/values.js.map +1 -0
- package/dist/application/orm/persistence/flush/flushCoordinator.d.ts +28 -0
- package/dist/application/orm/persistence/flush/flushCoordinator.d.ts.map +1 -0
- package/dist/application/orm/persistence/flush/flushCoordinator.js +170 -0
- package/dist/application/orm/persistence/flush/flushCoordinator.js.map +1 -0
- package/dist/application/orm/persistence/flush/mappedFlushCoordinator.d.ts +9 -0
- package/dist/application/orm/persistence/flush/mappedFlushCoordinator.d.ts.map +1 -0
- package/dist/application/orm/persistence/flush/mappedFlushCoordinator.js +8 -0
- package/dist/application/orm/persistence/flush/mappedFlushCoordinator.js.map +1 -0
- package/dist/application/orm/persistence/lifecycle/entityLifecycle.d.ts +12 -0
- package/dist/application/orm/persistence/lifecycle/entityLifecycle.d.ts.map +1 -0
- package/dist/application/orm/persistence/lifecycle/entityLifecycle.js +134 -0
- package/dist/application/orm/persistence/lifecycle/entityLifecycle.js.map +1 -0
- package/dist/application/orm/persistence/projection/projectionEffects.d.ts +21 -0
- package/dist/application/orm/persistence/projection/projectionEffects.d.ts.map +1 -0
- package/dist/application/orm/persistence/projection/projectionEffects.js +203 -0
- package/dist/application/orm/persistence/projection/projectionEffects.js.map +1 -0
- package/dist/application/orm/persistence/support/businessKeys.d.ts +17 -0
- package/dist/application/orm/persistence/support/businessKeys.d.ts.map +1 -0
- package/dist/application/orm/persistence/support/businessKeys.js +72 -0
- package/dist/application/orm/persistence/support/businessKeys.js.map +1 -0
- package/dist/application/orm/persistence/support/canonicalState.d.ts +22 -0
- package/dist/application/orm/persistence/support/canonicalState.d.ts.map +1 -0
- package/dist/application/orm/persistence/support/canonicalState.js +88 -0
- package/dist/application/orm/persistence/support/canonicalState.js.map +1 -0
- package/dist/application/orm/persistence/support/contracts.d.ts +139 -0
- package/dist/application/orm/persistence/support/contracts.d.ts.map +1 -0
- package/dist/application/orm/persistence/support/contracts.js +93 -0
- package/dist/application/orm/persistence/support/contracts.js.map +1 -0
- package/dist/application/orm/persistence/support/helpers.d.ts +32 -0
- package/dist/application/orm/persistence/support/helpers.d.ts.map +1 -0
- package/dist/application/orm/persistence/support/helpers.js +66 -0
- package/dist/application/orm/persistence/support/helpers.js.map +1 -0
- package/dist/application/orm/persistence/support/timing.d.ts +20 -0
- package/dist/application/orm/persistence/support/timing.d.ts.map +1 -0
- package/dist/application/orm/persistence/support/timing.js +55 -0
- package/dist/application/orm/persistence/support/timing.js.map +1 -0
- package/dist/application/sync/gateway/SyncGatewayBootstrap.d.ts +46 -0
- package/dist/application/sync/gateway/SyncGatewayBootstrap.d.ts.map +1 -0
- package/dist/application/sync/gateway/SyncGatewayBootstrap.js +93 -0
- package/dist/application/sync/gateway/SyncGatewayBootstrap.js.map +1 -0
- package/dist/application/sync/gateway/constants.d.ts +65 -0
- package/dist/application/sync/gateway/constants.d.ts.map +1 -0
- package/dist/application/sync/gateway/constants.js +57 -0
- package/dist/application/sync/gateway/constants.js.map +1 -0
- package/dist/application/sync/gateway/errors.d.ts +15 -0
- package/dist/application/sync/gateway/errors.d.ts.map +1 -0
- package/dist/application/sync/gateway/errors.js +16 -0
- package/dist/application/sync/gateway/errors.js.map +1 -0
- package/dist/application/sync/gateway/syncGateway.d.ts +313 -0
- package/dist/application/sync/gateway/syncGateway.d.ts.map +1 -0
- package/dist/application/sync/gateway/syncGateway.js +202 -0
- package/dist/application/sync/gateway/syncGateway.js.map +1 -0
- package/dist/application/sync/gateway/validation.d.ts +17 -0
- package/dist/application/sync/gateway/validation.d.ts.map +1 -0
- package/dist/application/sync/gateway/validation.js +60 -0
- package/dist/application/sync/gateway/validation.js.map +1 -0
- package/dist/application/sync/inbound/polling/SimpleSheetPolling.d.ts +72 -0
- package/dist/application/sync/inbound/polling/SimpleSheetPolling.d.ts.map +1 -0
- package/dist/application/sync/inbound/polling/SimpleSheetPolling.js +272 -0
- package/dist/application/sync/inbound/polling/SimpleSheetPolling.js.map +1 -0
- package/dist/application/sync/index.d.ts +16 -0
- package/dist/application/sync/index.d.ts.map +1 -0
- package/dist/application/sync/index.js +9 -0
- package/dist/application/sync/index.js.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectSupervisor.d.ts +106 -0
- package/dist/application/sync/outbound/effects/SyncEffectSupervisor.d.ts.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectSupervisor.js +297 -0
- package/dist/application/sync/outbound/effects/SyncEffectSupervisor.js.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorker.d.ts +100 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorker.d.ts.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorker.js +345 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorker.js.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.d.ts +46 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.d.ts.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.js +63 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.js.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.d.ts +20 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.d.ts.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.js +102 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.js.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.d.ts +19 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.d.ts.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.js +32 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.js.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.d.ts +30 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.d.ts.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.js +202 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.js.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.d.ts +17 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.d.ts.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.js +80 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.js.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.d.ts +13 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.d.ts.map +1 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.js +205 -0
- package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.js.map +1 -0
- package/dist/application/sync/outbound/projection/ProjectionEffectFactory.d.ts +81 -0
- package/dist/application/sync/outbound/projection/ProjectionEffectFactory.d.ts.map +1 -0
- package/dist/application/sync/outbound/projection/ProjectionEffectFactory.js +245 -0
- package/dist/application/sync/outbound/projection/ProjectionEffectFactory.js.map +1 -0
- package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.d.ts +77 -0
- package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.d.ts.map +1 -0
- package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.js +518 -0
- package/dist/application/sync/outbound/reconciliation/ReconciliationScanner.js.map +1 -0
- package/dist/application/sync/telemetry/syncTiming.d.ts +50 -0
- package/dist/application/sync/telemetry/syncTiming.d.ts.map +1 -0
- package/dist/application/sync/telemetry/syncTiming.js +22 -0
- package/dist/application/sync/telemetry/syncTiming.js.map +1 -0
- package/dist/domain/conflict/errors.d.ts +42 -0
- package/dist/domain/conflict/errors.d.ts.map +1 -0
- package/dist/domain/conflict/errors.js +36 -0
- package/dist/domain/conflict/errors.js.map +1 -0
- package/dist/domain/conflict/index.d.ts +5 -0
- package/dist/domain/conflict/index.d.ts.map +1 -0
- package/dist/domain/conflict/index.js +3 -0
- package/dist/domain/conflict/index.js.map +1 -0
- package/dist/domain/conflict/transitions.d.ts +52 -0
- package/dist/domain/conflict/transitions.d.ts.map +1 -0
- package/dist/domain/conflict/transitions.js +115 -0
- package/dist/domain/conflict/transitions.js.map +1 -0
- package/dist/domain/errors/evaluation.d.ts +13 -0
- package/dist/domain/errors/evaluation.d.ts.map +1 -0
- package/dist/domain/errors/evaluation.js +14 -0
- package/dist/domain/errors/evaluation.js.map +1 -0
- package/dist/domain/errors/identity.d.ts +12 -0
- package/dist/domain/errors/identity.d.ts.map +1 -0
- package/dist/domain/errors/identity.js +15 -0
- package/dist/domain/errors/identity.js.map +1 -0
- package/dist/domain/errors/index.d.ts +7 -0
- package/dist/domain/errors/index.d.ts.map +1 -0
- package/dist/domain/errors/index.js +5 -0
- package/dist/domain/errors/index.js.map +1 -0
- package/dist/domain/errors/stableEncoding.d.ts +7 -0
- package/dist/domain/errors/stableEncoding.d.ts.map +1 -0
- package/dist/domain/errors/stableEncoding.js +8 -0
- package/dist/domain/errors/stableEncoding.js.map +1 -0
- package/dist/domain/errors/types.d.ts +20 -0
- package/dist/domain/errors/types.d.ts.map +1 -0
- package/dist/domain/errors/types.js +18 -0
- package/dist/domain/errors/types.js.map +1 -0
- package/dist/domain/evaluate/constants.d.ts +55 -0
- package/dist/domain/evaluate/constants.d.ts.map +1 -0
- package/dist/domain/evaluate/constants.js +41 -0
- package/dist/domain/evaluate/constants.js.map +1 -0
- package/dist/domain/evaluate/contracts.d.ts +125 -0
- package/dist/domain/evaluate/contracts.d.ts.map +1 -0
- package/dist/domain/evaluate/contracts.js +8 -0
- package/dist/domain/evaluate/contracts.js.map +1 -0
- package/dist/domain/evaluate/evaluateBatch.d.ts +11 -0
- package/dist/domain/evaluate/evaluateBatch.d.ts.map +1 -0
- package/dist/domain/evaluate/evaluateBatch.js +91 -0
- package/dist/domain/evaluate/evaluateBatch.js.map +1 -0
- package/dist/domain/evaluate/fieldEvaluation.d.ts +14 -0
- package/dist/domain/evaluate/fieldEvaluation.d.ts.map +1 -0
- package/dist/domain/evaluate/fieldEvaluation.js +133 -0
- package/dist/domain/evaluate/fieldEvaluation.js.map +1 -0
- package/dist/domain/evaluate/identity.d.ts +21 -0
- package/dist/domain/evaluate/identity.d.ts.map +1 -0
- package/dist/domain/evaluate/identity.js +72 -0
- package/dist/domain/evaluate/identity.js.map +1 -0
- package/dist/domain/evaluate/index.d.ts +4 -0
- package/dist/domain/evaluate/index.d.ts.map +1 -0
- package/dist/domain/evaluate/index.js +3 -0
- package/dist/domain/evaluate/index.js.map +1 -0
- package/dist/domain/evaluate/preconditions.d.ts +30 -0
- package/dist/domain/evaluate/preconditions.d.ts.map +1 -0
- package/dist/domain/evaluate/preconditions.js +389 -0
- package/dist/domain/evaluate/preconditions.js.map +1 -0
- package/dist/domain/evaluate/quarantine.d.ts +15 -0
- package/dist/domain/evaluate/quarantine.d.ts.map +1 -0
- package/dist/domain/evaluate/quarantine.js +185 -0
- package/dist/domain/evaluate/quarantine.js.map +1 -0
- package/dist/domain/index.d.ts +7 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +7 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/model/constants.d.ts +73 -0
- package/dist/domain/model/constants.d.ts.map +1 -0
- package/dist/domain/model/constants.js +59 -0
- package/dist/domain/model/constants.js.map +1 -0
- package/dist/domain/model/index.d.ts +3 -0
- package/dist/domain/model/index.d.ts.map +1 -0
- package/dist/domain/model/index.js +2 -0
- package/dist/domain/model/index.js.map +1 -0
- package/dist/domain/model/types.d.ts +330 -0
- package/dist/domain/model/types.d.ts.map +1 -0
- package/dist/domain/model/types.js +8 -0
- package/dist/domain/model/types.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/index.d.ts +3 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +3 -0
- package/dist/infrastructure/index.js.map +1 -0
- package/dist/infrastructure/storage/constants.d.ts +4 -0
- package/dist/infrastructure/storage/constants.d.ts.map +1 -0
- package/dist/infrastructure/storage/constants.js +4 -0
- package/dist/infrastructure/storage/constants.js.map +1 -0
- package/dist/infrastructure/storage/errors.d.ts +55 -0
- package/dist/infrastructure/storage/errors.d.ts.map +1 -0
- package/dist/infrastructure/storage/errors.js +58 -0
- package/dist/infrastructure/storage/errors.js.map +1 -0
- package/dist/infrastructure/storage/index.d.ts +23 -0
- package/dist/infrastructure/storage/index.d.ts.map +1 -0
- package/dist/infrastructure/storage/index.js +13 -0
- package/dist/infrastructure/storage/index.js.map +1 -0
- package/dist/infrastructure/storage/recovery/restoreRecovery.d.ts +64 -0
- package/dist/infrastructure/storage/recovery/restoreRecovery.d.ts.map +1 -0
- package/dist/infrastructure/storage/recovery/restoreRecovery.js +148 -0
- package/dist/infrastructure/storage/recovery/restoreRecovery.js.map +1 -0
- package/dist/infrastructure/storage/sqlite/schema.d.ts +49 -0
- package/dist/infrastructure/storage/sqlite/schema.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite/schema.js +529 -0
- package/dist/infrastructure/storage/sqlite/schema.js.map +1 -0
- package/dist/infrastructure/storage/sqlite/schemaTypes.d.ts +5 -0
- package/dist/infrastructure/storage/sqlite/schemaTypes.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite/schemaTypes.js +2 -0
- package/dist/infrastructure/storage/sqlite/schemaTypes.js.map +1 -0
- package/dist/infrastructure/storage/sqlite/sqlScript.d.ts +9 -0
- package/dist/infrastructure/storage/sqlite/sqlScript.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite/sqlScript.js +122 -0
- package/dist/infrastructure/storage/sqlite/sqlScript.js.map +1 -0
- package/dist/infrastructure/storage/sqlite/sqlState.d.ts +6 -0
- package/dist/infrastructure/storage/sqlite/sqlState.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite/sqlState.js +14 -0
- package/dist/infrastructure/storage/sqlite/sqlState.js.map +1 -0
- package/dist/infrastructure/storage/sqlite/sqlTransaction.d.ts +6 -0
- package/dist/infrastructure/storage/sqlite/sqlTransaction.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite/sqlTransaction.js +24 -0
- package/dist/infrastructure/storage/sqlite/sqlTransaction.js.map +1 -0
- package/dist/infrastructure/storage/sqlite/sqliteBridge.d.ts +44 -0
- package/dist/infrastructure/storage/sqlite/sqliteBridge.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite/sqliteBridge.js +66 -0
- package/dist/infrastructure/storage/sqlite/sqliteBridge.js.map +1 -0
- package/dist/infrastructure/storage/state/canonical/canonicalCommit.d.ts +101 -0
- package/dist/infrastructure/storage/state/canonical/canonicalCommit.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/canonical/canonicalCommit.js +417 -0
- package/dist/infrastructure/storage/state/canonical/canonicalCommit.js.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationAudit.d.ts +16 -0
- package/dist/infrastructure/storage/state/observation/observationAudit.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationAudit.js +85 -0
- package/dist/infrastructure/storage/state/observation/observationAudit.js.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationCanonical.d.ts +31 -0
- package/dist/infrastructure/storage/state/observation/observationCanonical.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationCanonical.js +439 -0
- package/dist/infrastructure/storage/state/observation/observationCanonical.js.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationConstants.d.ts +53 -0
- package/dist/infrastructure/storage/state/observation/observationConstants.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationConstants.js +41 -0
- package/dist/infrastructure/storage/state/observation/observationConstants.js.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationLedger.d.ts +49 -0
- package/dist/infrastructure/storage/state/observation/observationLedger.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationLedger.js +537 -0
- package/dist/infrastructure/storage/state/observation/observationLedger.js.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationQuarantine.d.ts +15 -0
- package/dist/infrastructure/storage/state/observation/observationQuarantine.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationQuarantine.js +100 -0
- package/dist/infrastructure/storage/state/observation/observationQuarantine.js.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationTypes.d.ts +124 -0
- package/dist/infrastructure/storage/state/observation/observationTypes.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationTypes.js +13 -0
- package/dist/infrastructure/storage/state/observation/observationTypes.js.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationValidation.d.ts +28 -0
- package/dist/infrastructure/storage/state/observation/observationValidation.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationValidation.js +223 -0
- package/dist/infrastructure/storage/state/observation/observationValidation.js.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationWriter.d.ts +28 -0
- package/dist/infrastructure/storage/state/observation/observationWriter.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/observation/observationWriter.js +293 -0
- package/dist/infrastructure/storage/state/observation/observationWriter.js.map +1 -0
- package/dist/infrastructure/storage/state/readonly/readOnlyObservation.d.ts +58 -0
- package/dist/infrastructure/storage/state/readonly/readOnlyObservation.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/readonly/readOnlyObservation.js +195 -0
- package/dist/infrastructure/storage/state/readonly/readOnlyObservation.js.map +1 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriter.d.ts +31 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriter.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriter.js +563 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriter.js.map +1 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterContracts.d.ts +118 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterContracts.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterContracts.js +18 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterContracts.js.map +1 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.d.ts +23 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.js +84 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.js.map +1 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.d.ts +16 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.d.ts.map +1 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.js +97 -0
- package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.js.map +1 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutbox.d.ts +137 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutbox.d.ts.map +1 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutbox.js +396 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutbox.js.map +1 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.d.ts +101 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.d.ts.map +1 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.js +9 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.js.map +1 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.d.ts +21 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.d.ts.map +1 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.js +184 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.js.map +1 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.d.ts +25 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.d.ts.map +1 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.js +158 -0
- package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.js.map +1 -0
- package/dist/infrastructure/storage/sync/shared/syncRegistry.d.ts +69 -0
- package/dist/infrastructure/storage/sync/shared/syncRegistry.d.ts.map +1 -0
- package/dist/infrastructure/storage/sync/shared/syncRegistry.js +272 -0
- package/dist/infrastructure/storage/sync/shared/syncRegistry.js.map +1 -0
- package/dist/infrastructure/storage/sync/shared/writerLease.d.ts +90 -0
- package/dist/infrastructure/storage/sync/shared/writerLease.d.ts.map +1 -0
- package/dist/infrastructure/storage/sync/shared/writerLease.js +282 -0
- package/dist/infrastructure/storage/sync/shared/writerLease.js.map +1 -0
- package/dist/shared/constants.d.ts +8 -0
- package/dist/shared/constants.d.ts.map +1 -0
- package/dist/shared/constants.js +8 -0
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/encoding/constants.d.ts +45 -0
- package/dist/shared/encoding/constants.d.ts.map +1 -0
- package/dist/shared/encoding/constants.js +37 -0
- package/dist/shared/encoding/constants.js.map +1 -0
- package/dist/shared/encoding/index.d.ts +6 -0
- package/dist/shared/encoding/index.d.ts.map +1 -0
- package/dist/shared/encoding/index.js +4 -0
- package/dist/shared/encoding/index.js.map +1 -0
- package/dist/shared/encoding/stableEncode.d.ts +34 -0
- package/dist/shared/encoding/stableEncode.d.ts.map +1 -0
- package/dist/shared/encoding/stableEncode.js +210 -0
- package/dist/shared/encoding/stableEncode.js.map +1 -0
- package/dist/shared/encoding/typeGuards.d.ts +15 -0
- package/dist/shared/encoding/typeGuards.d.ts.map +1 -0
- package/dist/shared/encoding/typeGuards.js +11 -0
- package/dist/shared/encoding/typeGuards.js.map +1 -0
- package/dist/shared/encoding/types.d.ts +52 -0
- package/dist/shared/encoding/types.d.ts.map +1 -0
- package/dist/shared/encoding/types.js +8 -0
- package/dist/shared/encoding/types.js.map +1 -0
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +6 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/state/constants.d.ts +16 -0
- package/dist/shared/state/constants.d.ts.map +1 -0
- package/dist/shared/state/constants.js +16 -0
- package/dist/shared/state/constants.js.map +1 -0
- package/dist/shared/state/index.d.ts +3 -0
- package/dist/shared/state/index.d.ts.map +1 -0
- package/dist/shared/state/index.js +2 -0
- package/dist/shared/state/index.js.map +1 -0
- package/dist/shared/state/types.d.ts +23 -0
- package/dist/shared/state/types.d.ts.map +1 -0
- package/dist/shared/state/types.js +2 -0
- package/dist/shared/state/types.js.map +1 -0
- package/dist/shared/validation.d.ts +9 -0
- package/dist/shared/validation.d.ts.map +1 -0
- package/dist/shared/validation.js +25 -0
- package/dist/shared/validation.js.map +1 -0
- package/docs/architecture.md +72 -0
- package/docs/code-guidelines.md +256 -0
- package/docs/development.md +48 -0
- package/docs/git-workflow.md +224 -0
- package/docs/mikro-orm-adapter-spike.md +248 -0
- package/docs/quick-start.md +102 -0
- package/docs/sql-layer-plan.md +59 -0
- package/docs/sync-bulk-write-benchmark.md +1036 -0
- package/docs/sync-observability.md +71 -0
- package/docs/task-queue-write-model.md +640 -0
- package/docs/typed-sheets-mvp-scope-2026-06-29.md +490 -0
- package/docs/typed-sheets-plan.md +417 -0
- package/docs/write-and-synchronization-flow.md +71 -0
- package/package.json +68 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** Canonical JSON and hashing helpers shared by the thin operation protocol. */
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { JAVASCRIPT_TYPE_NAMES } from "../../../../../shared/encoding/constants.js";
|
|
4
|
+
import { isJavaScriptType } from "../../../../../shared/encoding/typeGuards.js";
|
|
5
|
+
import { SYNC_GATEWAY_ENCODINGS, SYNC_GATEWAY_HASH_ALGORITHMS, SYNC_JSON_LITERAL_TOKENS, } from "./constants.js";
|
|
6
|
+
import { SYNC_GATEWAY_PROTOCOL_ERROR_CODES, SyncGatewayProtocolError, } from "../errors.js";
|
|
7
|
+
/** Canonical JSON used for payload hashes and cross-runtime HMAC inputs. */
|
|
8
|
+
export function canonicalSyncJson(value) {
|
|
9
|
+
if (value === null)
|
|
10
|
+
return SYNC_JSON_LITERAL_TOKENS.NULL;
|
|
11
|
+
if (value === true)
|
|
12
|
+
return SYNC_JSON_LITERAL_TOKENS.TRUE;
|
|
13
|
+
if (value === false)
|
|
14
|
+
return SYNC_JSON_LITERAL_TOKENS.FALSE;
|
|
15
|
+
if (isJavaScriptType(value, JAVASCRIPT_TYPE_NAMES.STRING))
|
|
16
|
+
return JSON.stringify(value);
|
|
17
|
+
if (isJavaScriptType(value, JAVASCRIPT_TYPE_NAMES.NUMBER))
|
|
18
|
+
return canonicalNumber(value);
|
|
19
|
+
if (Array.isArray(value))
|
|
20
|
+
return `[${value.map((item) => canonicalSyncJson(item)).join(",")}]`;
|
|
21
|
+
if (isJavaScriptType(value, JAVASCRIPT_TYPE_NAMES.OBJECT) &&
|
|
22
|
+
value !== null &&
|
|
23
|
+
isPlainObject(value)) {
|
|
24
|
+
const entries = Object.keys(value)
|
|
25
|
+
.sort()
|
|
26
|
+
.map((key) => `${JSON.stringify(key)}:${canonicalSyncJson(value[key])}`);
|
|
27
|
+
return `{${entries.join(",")}}`;
|
|
28
|
+
}
|
|
29
|
+
throw new SyncGatewayProtocolError(SYNC_GATEWAY_PROTOCOL_ERROR_CODES.INVALID_JSON_VALUE, "sync gateway payload must contain JSON values only");
|
|
30
|
+
}
|
|
31
|
+
/** SHA-256 helper shared by envelope and effect payload verification. */
|
|
32
|
+
export function syncSha256Hex(value) {
|
|
33
|
+
return createHash(SYNC_GATEWAY_HASH_ALGORITHMS.SHA256)
|
|
34
|
+
.update(value, SYNC_GATEWAY_ENCODINGS.UTF8)
|
|
35
|
+
.digest("hex");
|
|
36
|
+
}
|
|
37
|
+
function canonicalNumber(value) {
|
|
38
|
+
if (!Number.isFinite(value)) {
|
|
39
|
+
throw new SyncGatewayProtocolError(SYNC_GATEWAY_PROTOCOL_ERROR_CODES.NON_FINITE_NUMBER, "sync gateway payload numbers must be finite");
|
|
40
|
+
}
|
|
41
|
+
return (value === 0 ? "0" : value.toString()).replace(/e\+/, "e").replace(/e(-?)0+(\d+)/, "e$1$2");
|
|
42
|
+
}
|
|
43
|
+
function isPlainObject(value) {
|
|
44
|
+
const prototype = Object.getPrototypeOf(value);
|
|
45
|
+
return prototype === Object.prototype || prototype === null;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=syncProtocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syncProtocol.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/apps-script-gateway/protocol/syncProtocol.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,iCAAiC,EACjC,wBAAwB,GACzB,MAAM,cAAc,CAAC;AAGtB,4EAA4E;AAC5E,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,wBAAwB,CAAC,IAAI,CAAC;IACzD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,wBAAwB,CAAC,IAAI,CAAC;IACzD,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,wBAAwB,CAAC,KAAK,CAAC;IAC3D,IAAI,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACxF,IAAI,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,CAAC,MAAM,CAAC;QAAE,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;IACzF,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,E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;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/C,OAAO,SAAS,KAAK,MAAM,CAAC,SAAS,IAAI,SAAS,KAAK,IAAI,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Runtime decoder for optional phase timing returned by Code.gs. */
|
|
2
|
+
import { type SyncGatewayTiming } from "../../../../../application/sync/telemetry/syncTiming.js";
|
|
3
|
+
/** Promotes an untrusted gateway timing object into the typed diagnostics contract. */
|
|
4
|
+
export declare function decodeOptionalSyncGatewayTiming(value: unknown, label: string): SyncGatewayTiming | undefined;
|
|
5
|
+
//# sourceMappingURL=timing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/apps-script-gateway/protocol/timing.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,yDAAyD,CAAC;AASjE,uFAAuF;AACvF,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,GACZ,iBAAiB,GAAG,SAAS,CAiD/B"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Runtime decoder for optional phase timing returned by Code.gs. */
|
|
2
|
+
import { SYNC_TIMING_OPERATION_KINDS, } from "../../../../../application/sync/telemetry/syncTiming.js";
|
|
3
|
+
import { SYNC_GATEWAY_ERROR_CODES } from "../../../../../application/sync/gateway/errors.js";
|
|
4
|
+
import { requireSyncGatewayNonNegativeSafeInteger, requireSyncGatewayText, } from "../../../../../application/sync/gateway/validation.js";
|
|
5
|
+
import { isRecord } from "../../../../../shared/encoding/typeGuards.js";
|
|
6
|
+
import { invalidOperationResponse } from "../errors.js";
|
|
7
|
+
/** Promotes an untrusted gateway timing object into the typed diagnostics contract. */
|
|
8
|
+
export function decodeOptionalSyncGatewayTiming(value, label) {
|
|
9
|
+
if (value === undefined)
|
|
10
|
+
return undefined;
|
|
11
|
+
const record = requireRecord(value, label);
|
|
12
|
+
if (!Array.isArray(record.operationKinds) || !Array.isArray(record.phases)) {
|
|
13
|
+
return invalidOperationResponse("Apps Script timing", label + " must contain operationKinds and phases");
|
|
14
|
+
}
|
|
15
|
+
const operationKinds = record.operationKinds.map((kind, index) => {
|
|
16
|
+
const text = requireSyncGatewayText(kind, label + ".operationKinds[" + index + "]", SYNC_GATEWAY_ERROR_CODES.INVALID_GATEWAY_RESPONSE);
|
|
17
|
+
if (!isTimingOperationKind(text)) {
|
|
18
|
+
return invalidOperationResponse("Apps Script timing", label + " contains an unsupported operation kind");
|
|
19
|
+
}
|
|
20
|
+
return text;
|
|
21
|
+
});
|
|
22
|
+
const counts = requireRecord(record.operationCounts, label + ".operationCounts");
|
|
23
|
+
const operationCounts = {
|
|
24
|
+
append: requireCount(counts.append, label + ".operationCounts.append"),
|
|
25
|
+
update: requireCount(counts.update, label + ".operationCounts.update"),
|
|
26
|
+
delete: requireCount(counts.delete, label + ".operationCounts.delete"),
|
|
27
|
+
};
|
|
28
|
+
const phases = record.phases.map((phase, index) => {
|
|
29
|
+
const phaseRecord = requireRecord(phase, label + ".phases[" + index + "]");
|
|
30
|
+
return {
|
|
31
|
+
phase: requireSyncGatewayText(phaseRecord.phase, label + ".phases[" + index + "].phase", SYNC_GATEWAY_ERROR_CODES.INVALID_GATEWAY_RESPONSE),
|
|
32
|
+
durationMs: requireCount(phaseRecord.durationMs, label + ".phases[" + index + "].durationMs"),
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
return {
|
|
36
|
+
operationKinds,
|
|
37
|
+
operationCounts,
|
|
38
|
+
durationMs: requireCount(record.durationMs, label + ".durationMs"),
|
|
39
|
+
phases,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function requireCount(value, label) {
|
|
43
|
+
return requireSyncGatewayNonNegativeSafeInteger(value, label, SYNC_GATEWAY_ERROR_CODES.INVALID_GATEWAY_RESPONSE);
|
|
44
|
+
}
|
|
45
|
+
function isTimingOperationKind(value) {
|
|
46
|
+
return Object.values(SYNC_TIMING_OPERATION_KINDS).includes(value);
|
|
47
|
+
}
|
|
48
|
+
function requireRecord(value, label) {
|
|
49
|
+
if (!isRecord(value)) {
|
|
50
|
+
return invalidOperationResponse("Apps Script timing", label + " must be an object");
|
|
51
|
+
}
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=timing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/apps-script-gateway/protocol/timing.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EACL,2BAA2B,GAG5B,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,EACL,wCAAwC,EACxC,sBAAsB,GACvB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAExD,uFAAuF;AACvF,MAAM,UAAU,+BAA+B,CAC7C,KAAc,EACd,KAAa;IAEb,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3E,OAAO,wBAAwB,CAC7B,oBAAoB,EACpB,KAAK,GAAG,yCAAyC,CAClD,CAAC;IACJ,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,CAAC,cA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C;IACH,OAAO;QACL,cAAc;QACd,eAAe;QACf,UAAU,EAAE,YAAY,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,GAAG,aAAa,CAAC;QAClE,MAAM;KACP,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,KAAc,EAAE,KAAa;IACjD,OAAO,wCAAwC,CAC7C,KAAK,EACL,KAAK,EACL,wBAAwB,CAAC,wBAAwB,CAClD,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,KAAa;IAC1C,OAAO,MAAM,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC,QAAQ,CACxD,KAAgC,CACjC,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,KAAc,EAAE,KAAa;IAClD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,wBAAwB,CAAC,oBAAoB,EAAE,KAAK,GAAG,oBAAoB,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,KAAgC,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/apps-script-gateway/protocol/types.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,MAAM,MAAM,aAAa,GACrB,IAAI,GACJ,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,aAAa,EAAE,GACxB;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/apps-script-gateway/protocol/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SyncGatewayProtocolErrorCode } from "../errors.js";
|
|
2
|
+
/** Requires a non-empty text value for a protocol field. */
|
|
3
|
+
export declare function requireSyncGatewayText(value: unknown, label: string, errorCode: SyncGatewayProtocolErrorCode): string;
|
|
4
|
+
/** Requires a positive safe integer for a protocol timestamp. */
|
|
5
|
+
export declare function requireSyncGatewayIssuedAt(value: unknown): number;
|
|
6
|
+
/** Requires an expiry duration within the protocol's bounded window. */
|
|
7
|
+
export declare function requireSyncGatewayExpiry(value: unknown): number;
|
|
8
|
+
/** Requires a request ID accepted by both gateway implementations. */
|
|
9
|
+
export declare function requireSyncGatewayRequestId(value: unknown): string;
|
|
10
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/apps-script-gateway/protocol/validation.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,cAAc,CAAC;AAEtB,4DAA4D;AAC5D,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,4BAA4B,GACtC,MAAM,CAKR;AAED,iEAAiE;AACjE,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQjE;AAED,wEAAwE;AACxE,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAY/D;AAED,sEAAsE;AACtE,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAalE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { isNonEmptyString, isPositiveSafeInteger, } from "../../../../../shared/validation.js";
|
|
2
|
+
import { SYNC_GATEWAY_DEFAULTS, SYNC_GATEWAY_REQUEST_ID_PATTERN, } from "./constants.js";
|
|
3
|
+
import { SYNC_GATEWAY_PROTOCOL_ERROR_CODES, SyncGatewayProtocolError, } from "../errors.js";
|
|
4
|
+
/** Requires a non-empty text value for a protocol field. */
|
|
5
|
+
export function requireSyncGatewayText(value, label, errorCode) {
|
|
6
|
+
if (!isNonEmptyString(value)) {
|
|
7
|
+
throw new SyncGatewayProtocolError(errorCode, `${label} is required`);
|
|
8
|
+
}
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
/** Requires a positive safe integer for a protocol timestamp. */
|
|
12
|
+
export function requireSyncGatewayIssuedAt(value) {
|
|
13
|
+
if (!isPositiveSafeInteger(value)) {
|
|
14
|
+
throw new SyncGatewayProtocolError(SYNC_GATEWAY_PROTOCOL_ERROR_CODES.INVALID_ISSUED_AT, "sync gateway issuedAt must be a positive safe integer");
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
/** Requires an expiry duration within the protocol's bounded window. */
|
|
19
|
+
export function requireSyncGatewayExpiry(value) {
|
|
20
|
+
if (!isPositiveSafeInteger(value) ||
|
|
21
|
+
value < SYNC_GATEWAY_DEFAULTS.MIN_EXPIRY_MS ||
|
|
22
|
+
value > SYNC_GATEWAY_DEFAULTS.MAX_EXPIRY_MS) {
|
|
23
|
+
throw new SyncGatewayProtocolError(SYNC_GATEWAY_PROTOCOL_ERROR_CODES.INVALID_EXPIRY, "sync gateway expiry must be between 1 second and 10 minutes");
|
|
24
|
+
}
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
/** Requires a request ID accepted by both gateway implementations. */
|
|
28
|
+
export function requireSyncGatewayRequestId(value) {
|
|
29
|
+
const requestId = requireSyncGatewayText(value, "sync gateway requestId", SYNC_GATEWAY_PROTOCOL_ERROR_CODES.INVALID_REQUEST_ID);
|
|
30
|
+
if (!SYNC_GATEWAY_REQUEST_ID_PATTERN.test(requestId)) {
|
|
31
|
+
throw new SyncGatewayProtocolError(SYNC_GATEWAY_PROTOCOL_ERROR_CODES.INVALID_REQUEST_ID, "sync gateway requestId must be 8-128 URL-safe characters");
|
|
32
|
+
}
|
|
33
|
+
return requestId;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/apps-script-gateway/protocol/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,iCAAiC,EACjC,wBAAwB,GAEzB,MAAM,cAAc,CAAC;AAEtB,4DAA4D;AAC5D,MAAM,UAAU,sBAAsB,CACpC,KAAc,EACd,KAAa,EACb,SAAuC;IAEvC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,wBAAwB,CAAC,SAAS,EAAE,GAAG,KAAK,cAAc,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,0BAA0B,CAAC,KAAc;IACvD,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,wBAAwB,CAChC,iCAAiC,CAAC,iBAAiB,EACnD,uDAAuD,CACxD,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,wBAAwB,CAAC,KAAc;IACrD,IACE,CAAC,qBAAqB,CAAC,KAAK,CAAC;QAC7B,KAAK,GAAG,qBAAqB,CAAC,aAAa;QAC3C,KAAK,GAAG,qBAAqB,CAAC,aAAa,EAC3C,CAAC;QACD,MAAM,IAAI,wBAAwB,CAChC,iCAAiC,CAAC,cAAc,EAChD,6DAA6D,CAC9D,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,2BAA2B,CAAC,KAAc;IACxD,MAAM,SAAS,GAAG,sBAAsB,CACtC,KAAK,EACL,wBAAwB,EACxB,iCAAiC,CAAC,kBAAkB,CACrD,CAAC;IACF,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,wBAAwB,CAChC,iCAAiC,CAAC,kBAAkB,EACpD,0DAA0D,CAC3D,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** Client boundary for invoking the current thin Apps Script `Code.gs`. */
|
|
2
|
+
import { type AppsScriptOperationName } from "../protocol/constants.js";
|
|
3
|
+
import type { SyncJsonValue } from "../protocol/types.js";
|
|
4
|
+
/** One self-contained function call serialized for `Code.gs`. */
|
|
5
|
+
export interface AppsScriptOperationDefinition<Args = SyncJsonValue, Result = unknown> {
|
|
6
|
+
/** Function source with `(spreadsheet, args)` parameters and no external closure. */
|
|
7
|
+
readonly fn: string;
|
|
8
|
+
readonly args: Args;
|
|
9
|
+
/** Promotes the untrusted JSON result into a checked application value. */
|
|
10
|
+
readonly decode?: (value: unknown) => Result;
|
|
11
|
+
}
|
|
12
|
+
/** Erased operation shape used only to accept heterogeneous typed operations. */
|
|
13
|
+
export type AnyAppsScriptOperationDefinition = AppsScriptOperationDefinition<unknown, unknown>;
|
|
14
|
+
/** Result type selected by one operation's optional decoder. */
|
|
15
|
+
export type AppsScriptOperationResult<Operation> = Operation extends {
|
|
16
|
+
readonly decode?: (value: unknown) => infer Result;
|
|
17
|
+
} ? Result : unknown;
|
|
18
|
+
/** Tuple of decoded results that preserves the input operation order. */
|
|
19
|
+
export type AppsScriptOperationResults<Operations extends readonly AnyAppsScriptOperationDefinition[]> = {
|
|
20
|
+
readonly [Index in keyof Operations]: AppsScriptOperationResult<Operations[Index]>;
|
|
21
|
+
};
|
|
22
|
+
/** Adapter-neutral boundary for a batch of thin Apps Script operations. */
|
|
23
|
+
export interface AppsScriptOperationGateway {
|
|
24
|
+
applyOperations<Operations extends readonly AnyAppsScriptOperationDefinition[]>(operations: Operations): Promise<AppsScriptOperationResults<Operations>>;
|
|
25
|
+
}
|
|
26
|
+
/** Settings for the signed client that calls the deployed `Code.gs` web app. */
|
|
27
|
+
export interface AppsScriptOperationClientOptions {
|
|
28
|
+
readonly url: string;
|
|
29
|
+
readonly secret: string;
|
|
30
|
+
readonly sheetId: string;
|
|
31
|
+
readonly keyId?: string;
|
|
32
|
+
readonly actorId?: string;
|
|
33
|
+
readonly requestTimeoutMs?: number;
|
|
34
|
+
/** Receives request timing without operation arguments or returned values. */
|
|
35
|
+
readonly onRequest?: (event: AppsScriptOperationRequestEvent) => void;
|
|
36
|
+
}
|
|
37
|
+
/** Redacted transport event for diagnosing a Code.gs invocation. */
|
|
38
|
+
export interface AppsScriptOperationRequestEvent {
|
|
39
|
+
readonly requestId: string;
|
|
40
|
+
readonly operation: AppsScriptOperationName;
|
|
41
|
+
readonly operationCount: number;
|
|
42
|
+
readonly startedAt: number;
|
|
43
|
+
readonly durationMs: number;
|
|
44
|
+
readonly ok: boolean;
|
|
45
|
+
readonly httpStatus: number | null;
|
|
46
|
+
readonly requestBytes: number;
|
|
47
|
+
readonly responseBytes: number;
|
|
48
|
+
readonly clientErrorCode: string | null;
|
|
49
|
+
readonly remoteErrorCode: string | null;
|
|
50
|
+
}
|
|
51
|
+
/** Calls `Code.gs` without exposing its dynamic function executor to the rest of the runtime. */
|
|
52
|
+
export declare class AppsScriptOperationClient implements AppsScriptOperationGateway {
|
|
53
|
+
private readonly url;
|
|
54
|
+
private readonly secret;
|
|
55
|
+
private readonly sheetId;
|
|
56
|
+
private readonly keyId;
|
|
57
|
+
private readonly actorId;
|
|
58
|
+
private readonly requestTimeoutMs;
|
|
59
|
+
private readonly onRequest;
|
|
60
|
+
constructor(options: AppsScriptOperationClientOptions);
|
|
61
|
+
/** Sends one signed batch and decodes each result at the caller's boundary. */
|
|
62
|
+
applyOperations<Operations extends readonly AnyAppsScriptOperationDefinition[]>(operations: Operations): Promise<AppsScriptOperationResults<Operations>>;
|
|
63
|
+
private post;
|
|
64
|
+
/** Keeps optional request telemetry from changing the operation result. */
|
|
65
|
+
private notifyRequest;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=operationClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationClient.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/apps-script-gateway/transport/operationClient.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAE3E,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,0BAA0B,CAAC;AAclC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAM1D,iEAAiE;AACjE,MAAM,WAAW,6BAA6B,CAC5C,IAAI,GAAG,aAAa,EACpB,MAAM,GAAG,OAAO;IAEhB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC;CAC9C;AAED,iFAAiF;AACjF,MAAM,MAAM,gCAAgC,GAAG,6BAA6B,CAC1E,OAAO,EACP,OAAO,CACR,CAAC;AAEF,gEAAgE;AAChE,MAAM,MAAM,yBAAyB,CAAC,SAAS,IAC7C,SAAS,SAAS;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,MAAM,CAAA;CAAE,GACpE,MAAM,GACN,OAAO,CAAC;AAEd,yEAAyE;AACzE,MAAM,MAAM,0BAA0B,CACpC,UAAU,SAAS,SAAS,gCAAgC,EAAE,IAC5D;IACF,QAAQ,EAAE,KAAK,IAAI,MAAM,UAAU,GAAG,yBAAyB,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;CACnF,CAAC;AAEF,2EAA2E;AAC3E,MAAM,WAAW,0BAA0B;IACzC,eAAe,CAAC,UAAU,SAAS,SAAS,gCAA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AChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiE;gBAExE,OAAO,EAAE,gCAAgC;IAkC5D,+EAA+E;IAClE,eAAe,CAC1B,UAAU,SAAS,SAAS,gCAAgC,EAAE,EAE9D,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC;YAmBpC,IAAI;IAkFlB,2EAA2E;IAC3E,OAAO,CAAC,aAAa;CAOtB"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/** Client boundary for invoking the current thin Apps Script `Code.gs`. */
|
|
2
|
+
import { APPS_SCRIPT_OPERATION_NAMES, SYNC_GATEWAY_CLIENT_DEFAULTS, } from "../protocol/constants.js";
|
|
3
|
+
import { createAppsScriptOperationEnvelope, } from "../protocol/codeGsProtocol.js";
|
|
4
|
+
import { SYNC_GATEWAY_PROTOCOL_ERROR_CODES, SyncGatewayProtocolError, AppsScriptSyncGatewayError, SYNC_GATEWAY_CLIENT_ERROR_CODES, } from "../errors.js";
|
|
5
|
+
import { canonicalSyncJson } from "../protocol/syncProtocol.js";
|
|
6
|
+
import { JAVASCRIPT_TYPE_NAMES } from "../../../../../shared/encoding/constants.js";
|
|
7
|
+
import { isJavaScriptType, isRecord } from "../../../../../shared/encoding/typeGuards.js";
|
|
8
|
+
import { PRESENCE_KINDS } from "../../../../../shared/state/constants.js";
|
|
9
|
+
/** Calls `Code.gs` without exposing its dynamic function executor to the rest of the runtime. */
|
|
10
|
+
export class AppsScriptOperationClient {
|
|
11
|
+
url;
|
|
12
|
+
secret;
|
|
13
|
+
sheetId;
|
|
14
|
+
keyId;
|
|
15
|
+
actorId;
|
|
16
|
+
requestTimeoutMs;
|
|
17
|
+
onRequest;
|
|
18
|
+
constructor(options) {
|
|
19
|
+
let url;
|
|
20
|
+
try {
|
|
21
|
+
url = new URL(options.url);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
throw new SyncGatewayProtocolError(SYNC_GATEWAY_PROTOCOL_ERROR_CODES.INVALID_CLIENT_OPTIONS, "Apps Script operation URL must be valid");
|
|
25
|
+
}
|
|
26
|
+
if (url.protocol !== "https:") {
|
|
27
|
+
throw new SyncGatewayProtocolError(SYNC_GATEWAY_PROTOCOL_ERROR_CODES.INVALID_CLIENT_OPTIONS, "Apps Script operation URL must use HTTPS");
|
|
28
|
+
}
|
|
29
|
+
this.url = url.toString();
|
|
30
|
+
this.secret = requireTextOption(options.secret, "Apps Script operation secret");
|
|
31
|
+
this.sheetId = requireTextOption(options.sheetId, "Apps Script operation sheet ID");
|
|
32
|
+
this.keyId = requireTextOption(options.keyId ?? "typed-sheets-shared-secret-v1", "Apps Script operation key ID");
|
|
33
|
+
this.actorId = requireTextOption(options.actorId ?? "typed-sheets-sync-worker", "Apps Script operation actor ID");
|
|
34
|
+
this.requestTimeoutMs = requireRequestTimeout(options.requestTimeoutMs ?? SYNC_GATEWAY_CLIENT_DEFAULTS.REQUEST_TIMEOUT_MS);
|
|
35
|
+
this.onRequest = options.onRequest;
|
|
36
|
+
}
|
|
37
|
+
/** Sends one signed batch and decodes each result at the caller's boundary. */
|
|
38
|
+
async applyOperations(operations) {
|
|
39
|
+
const payload = {
|
|
40
|
+
operations: operations.map(toWireOperation),
|
|
41
|
+
};
|
|
42
|
+
const envelope = createAppsScriptOperationEnvelope({
|
|
43
|
+
operation: APPS_SCRIPT_OPERATION_NAMES.APPLY_OPERATIONS,
|
|
44
|
+
payload,
|
|
45
|
+
sheetId: this.sheetId,
|
|
46
|
+
secret: this.secret,
|
|
47
|
+
keyId: this.keyId,
|
|
48
|
+
actorId: this.actorId,
|
|
49
|
+
});
|
|
50
|
+
const result = requireOperationBatchResult(await this.post(envelope), operations.length);
|
|
51
|
+
return operations.map((operation, index) => {
|
|
52
|
+
const value = result[index];
|
|
53
|
+
return operation.decode === undefined ? value : operation.decode(value);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
async post(envelope) {
|
|
57
|
+
const startedAt = Date.now();
|
|
58
|
+
const requestBody = JSON.stringify(envelope);
|
|
59
|
+
const controller = new AbortController();
|
|
60
|
+
const timer = setTimeout(() => controller.abort(), this.requestTimeoutMs);
|
|
61
|
+
let httpStatus = null;
|
|
62
|
+
let responseBytes = 0;
|
|
63
|
+
try {
|
|
64
|
+
const response = await fetch(this.url, {
|
|
65
|
+
method: "POST",
|
|
66
|
+
headers: { "content-type": "application/json" },
|
|
67
|
+
body: requestBody,
|
|
68
|
+
signal: controller.signal,
|
|
69
|
+
redirect: "follow",
|
|
70
|
+
});
|
|
71
|
+
httpStatus = response.status;
|
|
72
|
+
const responseText = await response.text();
|
|
73
|
+
responseBytes = Buffer.byteLength(responseText, "utf8");
|
|
74
|
+
const decoded = parseCodeGsResponse(responseText, present(httpStatus));
|
|
75
|
+
if (!response.ok) {
|
|
76
|
+
if (decoded.ok) {
|
|
77
|
+
throw new AppsScriptSyncGatewayError(SYNC_GATEWAY_CLIENT_ERROR_CODES.HTTP_ERROR, `Code.gs returned HTTP ${response.status}`, present(httpStatus));
|
|
78
|
+
}
|
|
79
|
+
throw remoteError(decoded.error, present(httpStatus));
|
|
80
|
+
}
|
|
81
|
+
if (!decoded.ok)
|
|
82
|
+
throw remoteError(decoded.error, present(httpStatus));
|
|
83
|
+
this.notifyRequest({
|
|
84
|
+
requestId: envelope.requestId,
|
|
85
|
+
operation: envelope.operation,
|
|
86
|
+
operationCount: envelope.payload.operations.length,
|
|
87
|
+
startedAt,
|
|
88
|
+
durationMs: Date.now() - startedAt,
|
|
89
|
+
ok: true,
|
|
90
|
+
httpStatus,
|
|
91
|
+
requestBytes: Buffer.byteLength(requestBody, "utf8"),
|
|
92
|
+
responseBytes,
|
|
93
|
+
clientErrorCode: null,
|
|
94
|
+
remoteErrorCode: null,
|
|
95
|
+
});
|
|
96
|
+
return decoded.result;
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
const normalizedError = error instanceof AppsScriptSyncGatewayError
|
|
100
|
+
? error
|
|
101
|
+
: error instanceof Error && error.name === "AbortError"
|
|
102
|
+
? new AppsScriptSyncGatewayError(SYNC_GATEWAY_CLIENT_ERROR_CODES.TIMEOUT, "Code.gs operation request timed out", presentOrAbsent(httpStatus))
|
|
103
|
+
: new AppsScriptSyncGatewayError(SYNC_GATEWAY_CLIENT_ERROR_CODES.NETWORK_ERROR, `Code.gs operation request failed: ${safeMessage(error)}`, presentOrAbsent(httpStatus));
|
|
104
|
+
this.notifyRequest({
|
|
105
|
+
requestId: envelope.requestId,
|
|
106
|
+
operation: envelope.operation,
|
|
107
|
+
operationCount: envelope.payload.operations.length,
|
|
108
|
+
startedAt,
|
|
109
|
+
durationMs: Date.now() - startedAt,
|
|
110
|
+
ok: false,
|
|
111
|
+
httpStatus,
|
|
112
|
+
requestBytes: Buffer.byteLength(requestBody, "utf8"),
|
|
113
|
+
responseBytes,
|
|
114
|
+
clientErrorCode: normalizedError.code,
|
|
115
|
+
remoteErrorCode: normalizedError.remoteCode.kind === PRESENCE_KINDS.PRESENT
|
|
116
|
+
? normalizedError.remoteCode.value
|
|
117
|
+
: null,
|
|
118
|
+
});
|
|
119
|
+
throw normalizedError;
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
122
|
+
clearTimeout(timer);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** Keeps optional request telemetry from changing the operation result. */
|
|
126
|
+
notifyRequest(event) {
|
|
127
|
+
try {
|
|
128
|
+
this.onRequest?.(event);
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
// Diagnostics must never make a successful remote operation fail.
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function toWireOperation(operation) {
|
|
136
|
+
if (typeof operation.fn !== "string" || operation.fn.trim().length === 0) {
|
|
137
|
+
throw new SyncGatewayProtocolError(SYNC_GATEWAY_PROTOCOL_ERROR_CODES.INVALID_OPERATION_SOURCE, "Apps Script operation fn must be a non-empty function source");
|
|
138
|
+
}
|
|
139
|
+
// The canonical encoder performs the runtime JSON-value check for args.
|
|
140
|
+
canonicalSyncJson(operation.args);
|
|
141
|
+
// canonicalSyncJson has already promoted the value through the runtime
|
|
142
|
+
// JSON boundary; the cast keeps typed operation argument shapes ergonomic.
|
|
143
|
+
return { fn: operation.fn, args: operation.args };
|
|
144
|
+
}
|
|
145
|
+
function requireOperationBatchResult(value, expectedCount) {
|
|
146
|
+
if (!isRecord(value) || !Array.isArray(value.results) || value.results.length !== expectedCount) {
|
|
147
|
+
throw new AppsScriptSyncGatewayError(SYNC_GATEWAY_CLIENT_ERROR_CODES.INVALID_RESPONSE, "Code.gs result must contain one result for every submitted operation", { kind: PRESENCE_KINDS.ABSENT });
|
|
148
|
+
}
|
|
149
|
+
return value.results;
|
|
150
|
+
}
|
|
151
|
+
function parseCodeGsResponse(responseText, status) {
|
|
152
|
+
let parsed;
|
|
153
|
+
try {
|
|
154
|
+
parsed = JSON.parse(responseText);
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
throw new AppsScriptSyncGatewayError(SYNC_GATEWAY_CLIENT_ERROR_CODES.INVALID_RESPONSE, "Code.gs response was not valid JSON", status);
|
|
158
|
+
}
|
|
159
|
+
if (!isRecord(parsed) || !isJavaScriptType(parsed.ok, JAVASCRIPT_TYPE_NAMES.BOOLEAN)) {
|
|
160
|
+
throw new AppsScriptSyncGatewayError(SYNC_GATEWAY_CLIENT_ERROR_CODES.INVALID_RESPONSE, "Code.gs response must contain a boolean ok field", status);
|
|
161
|
+
}
|
|
162
|
+
if (parsed.ok)
|
|
163
|
+
return { ok: true, result: parsed.result };
|
|
164
|
+
if (!isRecord(parsed.error) ||
|
|
165
|
+
!isJavaScriptType(parsed.error.code, JAVASCRIPT_TYPE_NAMES.STRING) ||
|
|
166
|
+
!isJavaScriptType(parsed.error.message, JAVASCRIPT_TYPE_NAMES.STRING)) {
|
|
167
|
+
throw new AppsScriptSyncGatewayError(SYNC_GATEWAY_CLIENT_ERROR_CODES.INVALID_RESPONSE, "Code.gs error response is malformed", status);
|
|
168
|
+
}
|
|
169
|
+
return {
|
|
170
|
+
ok: false,
|
|
171
|
+
error: { code: parsed.error.code, message: parsed.error.message },
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function remoteError(error, status) {
|
|
175
|
+
return new AppsScriptSyncGatewayError(SYNC_GATEWAY_CLIENT_ERROR_CODES.REMOTE_ERROR, error.message, status, present(error.code));
|
|
176
|
+
}
|
|
177
|
+
function requireTextOption(value, label) {
|
|
178
|
+
if (!isJavaScriptType(value, JAVASCRIPT_TYPE_NAMES.STRING) ||
|
|
179
|
+
value.trim().length === 0) {
|
|
180
|
+
throw new SyncGatewayProtocolError(SYNC_GATEWAY_PROTOCOL_ERROR_CODES.INVALID_CLIENT_OPTIONS, `${label} is required`);
|
|
181
|
+
}
|
|
182
|
+
return value;
|
|
183
|
+
}
|
|
184
|
+
function requireRequestTimeout(value) {
|
|
185
|
+
if (!isJavaScriptType(value, JAVASCRIPT_TYPE_NAMES.NUMBER) ||
|
|
186
|
+
!Number.isSafeInteger(value) ||
|
|
187
|
+
value < SYNC_GATEWAY_CLIENT_DEFAULTS.MIN_REQUEST_TIMEOUT_MS ||
|
|
188
|
+
value > SYNC_GATEWAY_CLIENT_DEFAULTS.MAX_REQUEST_TIMEOUT_MS) {
|
|
189
|
+
throw new SyncGatewayProtocolError(SYNC_GATEWAY_PROTOCOL_ERROR_CODES.INVALID_CLIENT_OPTIONS, "Apps Script operation timeout must be between 1 second and 120 seconds");
|
|
190
|
+
}
|
|
191
|
+
return value;
|
|
192
|
+
}
|
|
193
|
+
function present(value) {
|
|
194
|
+
return { kind: PRESENCE_KINDS.PRESENT, value };
|
|
195
|
+
}
|
|
196
|
+
function presentOrAbsent(value) {
|
|
197
|
+
return value === null
|
|
198
|
+
? { kind: PRESENCE_KINDS.ABSENT }
|
|
199
|
+
: present(value);
|
|
200
|
+
}
|
|
201
|
+
function safeMessage(error) {
|
|
202
|
+
return error instanceof Error ? error.message : "Unexpected transport failure";
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=operationClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationClient.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/apps-script-gateway/transport/operationClient.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAE3E,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAE7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iCAAiC,GAIlC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iCAAiC,EACjC,wBAAwB,EACxB,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAoE1E,iGAAiG;AACjG,MAAM,OAAO,yBAAyB;IACnB,GAAG,CAAS;IACZ,MAAM,CAAS;IACf,OAAO,CAAS;IAChB,KAAK,CAAS;IACd,OAAO,CAAS;IAChB,gBAAgB,CAAS;IACzB,SAAS,CAAiE;IAE3F,YAAmB,OAAyC;QAC1D,IAAI,GAAQ,CAAC;QACb,IAAI,CAAC;YACH,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,wBAAwB,CAChC,iCAAiC,CAAC,sBAAsB,EACxD,yCAAyC,CAC1C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,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;QAC5B,KAAK,GAAG,4BAA4B,CAAC,sBAAsB;QAC3D,KAAK,GAAG,4BAA4B,CAAC,sBAAsB,EAC3D,CAAC;QACD,MAAM,IAAI,wBAAwB,CAChC,iCAAiC,CAAC,sBAAsB,EACxD,wEAAwE,CACzE,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,OAAO,CAAI,KAAQ;IAC1B,OAAO,EAAE,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;AACjD,CAAC;AAED,SAAS,eAAe,CAAC,KAAoB;IAC3C,OAAO,KAAK,KAAK,IAAI;QACnB,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,MAAM,EAAE;QACjC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC;AACjF,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime adapter for the thin, generic Apps Script operation gateway.
|
|
3
|
+
*
|
|
4
|
+
* The current Code.gs exposes a generic signed operation dispatcher. Fast
|
|
5
|
+
* append stays on its low-cost operation, while regular effects and recovery
|
|
6
|
+
* reads use separate operations with their own typed decoders.
|
|
7
|
+
*/
|
|
8
|
+
import type { RegisteredSyncProjectionDefinition, SyncGatewayProvisionRoute, SyncGatewayProvisioner } from "../../../../../application/sync/gateway/SyncGatewayBootstrap.js";
|
|
9
|
+
import type { ApplySyncEffectsRequest, ApplySyncEffectsResult, EnsureSyncRowAnchorsRequest, EnsureSyncRowAnchorsResult, FastAppendRowsRequest, FastAppendRowsResult, ReadSyncEffectPostconditionsRequest, ReadSyncTableRowsRequest, ReadSyncSnapshotRequest, SyncEffectPostcondition, SyncGatewayEffect, SyncGatewayEffectPostconditionResult, SyncGatewaySnapshot, SyncObservedSnapshot, SyncSheetGateway, SyncSheetTableReaderGateway, SyncSheetObservationBatchGateway, SyncEffectWorkerFullGateway, SyncTableRowsResult } from "../../../../../application/sync/gateway/syncGateway.js";
|
|
10
|
+
import type { AppsScriptOperationGateway } from "./operationClient.js";
|
|
11
|
+
/** Configuration required to bind the operation client to SQLite projections. */
|
|
12
|
+
export interface AppsScriptOperationSyncGatewayOptions {
|
|
13
|
+
readonly operationGateway: AppsScriptOperationGateway;
|
|
14
|
+
readonly definitions: readonly RegisteredSyncProjectionDefinition[];
|
|
15
|
+
}
|
|
16
|
+
/** Read-only status returned by the operational projection inspection helper. */
|
|
17
|
+
export interface AppsScriptOperationProjectionStatus {
|
|
18
|
+
readonly sheetName: string;
|
|
19
|
+
readonly headers: readonly string[];
|
|
20
|
+
readonly rowCount: number;
|
|
21
|
+
readonly ids: readonly string[];
|
|
22
|
+
}
|
|
23
|
+
type ProvisionedRoute = Omit<SyncGatewayProvisionRoute, "headers">;
|
|
24
|
+
/**
|
|
25
|
+
* Adapts the generic Apps Script operation transport to the sync worker's
|
|
26
|
+
* fast and regular effect gateway boundaries.
|
|
27
|
+
*/
|
|
28
|
+
export declare class AppsScriptOperationSyncGateway implements SyncSheetGateway, SyncSheetTableReaderGateway, SyncSheetObservationBatchGateway, SyncEffectWorkerFullGateway, SyncGatewayProvisioner {
|
|
29
|
+
private readonly operationGateway;
|
|
30
|
+
private readonly definitions;
|
|
31
|
+
constructor(options: AppsScriptOperationSyncGatewayOptions);
|
|
32
|
+
/**
|
|
33
|
+
* Creates or verifies the registered tabs and their header rows remotely.
|
|
34
|
+
*
|
|
35
|
+
* The operation is idempotent: the remote source only creates missing tabs
|
|
36
|
+
* and rejects a nonblank header row that differs from SQLite's schema.
|
|
37
|
+
*/
|
|
38
|
+
provisionRegistry(registrations: readonly SyncGatewayProvisionRoute[]): Promise<{
|
|
39
|
+
readonly registrations: readonly ProvisionedRoute[];
|
|
40
|
+
readonly createdSheets: readonly string[];
|
|
41
|
+
readonly initializedHeaders: readonly string[];
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Appends new System_State rows with one remote setValues operation.
|
|
45
|
+
*
|
|
46
|
+
* No row metadata, receipt, snapshot, CAS, or postcondition work is
|
|
47
|
+
* performed here. Reconciliation owns drift detection after this write.
|
|
48
|
+
*/
|
|
49
|
+
fastAppendRows(request: FastAppendRowsRequest): Promise<FastAppendRowsResult>;
|
|
50
|
+
/** Reads one registered table with values only; no metadata, lock, or CAS work is performed. */
|
|
51
|
+
readRows(request: ReadSyncTableRowsRequest): Promise<SyncTableRowsResult>;
|
|
52
|
+
/** Reads several registered tables through one signed Apps Script request. */
|
|
53
|
+
readRowsBatch(requests: readonly ReadSyncTableRowsRequest[]): Promise<readonly SyncTableRowsResult[]>;
|
|
54
|
+
/** Applies regular update/delete effects through the full operation path. */
|
|
55
|
+
applyEffects(request: ApplySyncEffectsRequest): Promise<ApplySyncEffectsResult>;
|
|
56
|
+
/** Reads one regular-effect postcondition after an uncertain response. */
|
|
57
|
+
readEffectPostcondition(effect: SyncGatewayEffect): Promise<SyncEffectPostcondition>;
|
|
58
|
+
/** Reads several regular-effect postconditions with one Sheet scan. */
|
|
59
|
+
readEffectPostconditions(request: ReadSyncEffectPostconditionsRequest): Promise<readonly SyncGatewayEffectPostconditionResult[]>;
|
|
60
|
+
/** Assigns missing row anchors through the observation operation. */
|
|
61
|
+
ensureRowAnchors(request: EnsureSyncRowAnchorsRequest): Promise<EnsureSyncRowAnchorsResult>;
|
|
62
|
+
/** Reads a normalized, anchor-aware snapshot for polling and reconciliation. */
|
|
63
|
+
readSnapshot(request: ReadSyncSnapshotRequest): Promise<SyncGatewaySnapshot>;
|
|
64
|
+
/** Assigns anchors and reads one snapshot under one remote lock/request. */
|
|
65
|
+
observeSnapshot(request: ReadSyncSnapshotRequest): Promise<SyncObservedSnapshot>;
|
|
66
|
+
/** Reads several projections through one signed Apps Script request. */
|
|
67
|
+
observeSnapshots(requests: readonly ReadSyncSnapshotRequest[]): Promise<readonly SyncObservedSnapshot[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Reads a projection for setup checks and operational verification.
|
|
70
|
+
*
|
|
71
|
+
* This is intentionally not part of the old SyncSheetGateway contract; it
|
|
72
|
+
* is a small read operation for callers that need to verify row counts.
|
|
73
|
+
*/
|
|
74
|
+
readProjection(sheetName: string): Promise<AppsScriptOperationProjectionStatus>;
|
|
75
|
+
private definitionForPhysicalSheet;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=operationSyncGateway.d.ts.map
|
package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationSyncGateway.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,kCAAkC,EAClC,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,iEAAiE,CAAC;AAYzE,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,mCAAmC,EACnC,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,oCAAoC,EACpC,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,2BAA2B,EAC3B,gCAAgC,EAChC,2BAA2B,EAC3B,mBAAmB,EACpB,MAAM,wDAAwD,CAAC;AAEhE,OAAO,KAAK,EAEV,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAe9B,iFAAiF;AACjF,MAAM,WAAW,qCAAqC;IACpD,QAAQ,CAAC,gBAAgB,EAAE,0BAA0B,CAAC;IACtD,QAAQ,CAAC,WAAW,EAA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