mirror of
https://github.com/we-promise/sure.git
synced 2026-05-12 23:25:00 +00:00
feat(api): accept Sure NDJSON imports (#1601)
* feat(api): accept Sure NDJSON imports * fix(api): preserve uploaded Sure imports on publish errors * fix(api): reset preserved Sure imports after enqueue failure * fix(api): tighten Sure import upload handling * test(api): align import API key fixtures * docs(api): document import publish failure IDs
This commit is contained in:
@@ -64,6 +64,19 @@ RSpec.configure do |config|
|
||||
}
|
||||
}
|
||||
},
|
||||
ErrorResponseWithImportId: {
|
||||
type: :object,
|
||||
required: %w[error import_id],
|
||||
properties: {
|
||||
error: { type: :string },
|
||||
message: { type: :string, nullable: true },
|
||||
import_id: {
|
||||
type: :string,
|
||||
format: :uuid,
|
||||
description: 'Import ID preserved for retry or inspection after upload succeeds but publish fails'
|
||||
}
|
||||
}
|
||||
},
|
||||
MfaRequiredResponse: {
|
||||
type: :object,
|
||||
required: %w[error mfa_required],
|
||||
@@ -524,7 +537,7 @@ RSpec.configure do |config|
|
||||
required: %w[id type status created_at updated_at],
|
||||
properties: {
|
||||
id: { type: :string, format: :uuid },
|
||||
type: { type: :string, enum: %w[TransactionImport TradeImport AccountImport MintImport CategoryImport RuleImport] },
|
||||
type: { type: :string, enum: %w[TransactionImport TradeImport AccountImport MintImport CategoryImport RuleImport SureImport] },
|
||||
status: { type: :string, enum: %w[pending complete importing reverting revert_failed failed] },
|
||||
created_at: { type: :string, format: :'date-time' },
|
||||
updated_at: { type: :string, format: :'date-time' },
|
||||
@@ -538,7 +551,7 @@ RSpec.configure do |config|
|
||||
required: %w[id type status created_at updated_at],
|
||||
properties: {
|
||||
id: { type: :string, format: :uuid },
|
||||
type: { type: :string, enum: %w[TransactionImport TradeImport AccountImport MintImport CategoryImport RuleImport] },
|
||||
type: { type: :string, enum: %w[TransactionImport TradeImport AccountImport MintImport CategoryImport RuleImport SureImport] },
|
||||
status: { type: :string, enum: %w[pending complete importing reverting revert_failed failed] },
|
||||
created_at: { type: :string, format: :'date-time' },
|
||||
updated_at: { type: :string, format: :'date-time' },
|
||||
|
||||
Reference in New Issue
Block a user