mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-26 17:12:00 +00:00
Complete implementation planning for CLI app with MFA
- Created implementation plan with technical context - Developed data models for User Session, Sync Job, and Authentication Token - Defined API contracts for authentication, sync triggering, and status checking - Created quickstart guide for CLI usage - Updated agent context with new technology stack - Verified constitution compliance for all design decisions
This commit is contained in:
185
specs/006-cli-auth-sync-mfa/contracts/sync_cli_status.yaml
Normal file
185
specs/006-cli-auth-sync-mfa/contracts/sync_cli_status.yaml
Normal file
@@ -0,0 +1,185 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: GarminSync CLI Sync Status API
|
||||
version: 1.0.0
|
||||
description: API for checking sync job status via CLI
|
||||
paths:
|
||||
/api/sync/cli/status:
|
||||
get:
|
||||
summary: Check status of sync operations
|
||||
description: Retrieves the status of current and recent sync jobs
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- name: job_id
|
||||
in: query
|
||||
required: false
|
||||
description: Specific job ID to check (returns all recent if not provided)
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Sync status information retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
jobs:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
job_id:
|
||||
type: string
|
||||
description: Unique identifier for the sync job
|
||||
status:
|
||||
type: string
|
||||
description: Current status of the sync job
|
||||
enum: [pending, running, completed, failed, cancelled]
|
||||
progress:
|
||||
type: number
|
||||
format: float
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
description: Percentage of completion (0-100)
|
||||
sync_type:
|
||||
type: string
|
||||
enum: [activities, health, workouts]
|
||||
description: Type of data being synced
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: When the job was created
|
||||
started_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: When the job started executing
|
||||
completed_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: When the job completed (if completed)
|
||||
total_items:
|
||||
type: integer
|
||||
description: Total number of items to sync
|
||||
processed_items:
|
||||
type: integer
|
||||
description: Number of items processed so far
|
||||
error_message:
|
||||
type: string
|
||||
description: Error details if job failed
|
||||
'401':
|
||||
description: Authentication required or invalid token
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
/api/sync/cli/status/{job_id}:
|
||||
get:
|
||||
summary: Check status of a specific sync job
|
||||
description: Retrieves the status of a specific sync job by ID
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- name: job_id
|
||||
in: path
|
||||
required: true
|
||||
description: Unique identifier of the sync job
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Specific sync job status retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
job:
|
||||
type: object
|
||||
properties:
|
||||
job_id:
|
||||
type: string
|
||||
description: Unique identifier for the sync job
|
||||
status:
|
||||
type: string
|
||||
description: Current status of the sync job
|
||||
enum: [pending, running, completed, failed, cancelled]
|
||||
progress:
|
||||
type: number
|
||||
format: float
|
||||
minimum: 0
|
||||
maximum: 100
|
||||
description: Percentage of completion (0-100)
|
||||
sync_type:
|
||||
type: string
|
||||
enum: [activities, health, workouts]
|
||||
description: Type of data being synced
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: When the job was created
|
||||
started_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: When the job started executing
|
||||
completed_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: When the job completed (if completed)
|
||||
total_items:
|
||||
type: integer
|
||||
description: Total number of items to sync
|
||||
processed_items:
|
||||
type: integer
|
||||
description: Number of items processed so far
|
||||
error_message:
|
||||
type: string
|
||||
description: Error details if job failed
|
||||
'401':
|
||||
description: Authentication required or invalid token
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
'404':
|
||||
description: Sync job not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
Reference in New Issue
Block a user