feat(11-01): extend PAX8 types with cost fields and sync-result shapes
- Pax8Subscription: price, partnerCost, currencyCode, productName, endDate, updatedDate - Pax8Product: vendorName, shortDescription - New Pax8EntitySyncResult / Pax8SyncResult mirroring AppgateSyncResult shape - Note pre-existing unrelated tsc errors in sync-scheduler.ts (missing untracked appgate-factory/appgate-sync-service files in this worktree) in deferred-items.md
This commit is contained in:
parent
b0f6de0e8b
commit
0d819badc2
2 changed files with 48 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
# Deferred Items — Phase 11
|
||||
|
||||
Items discovered during execution that are out of scope for the current
|
||||
plan/task and are not auto-fixed per the executor's scope boundary rule.
|
||||
|
||||
## Plan 01
|
||||
|
||||
- **Pre-existing `tsc` errors unrelated to this plan**: `lib/services/sync-scheduler.ts:446,450`
|
||||
reference `@/lib/services/appgate-factory` and `@/lib/services/appgate-sync-service`,
|
||||
which are untracked files present in the main repo checkout (`git status` shows them
|
||||
as `??`) but were never committed — so they do not exist in this git worktree's
|
||||
history. This is a worktree/commit-state artifact, not something introduced by
|
||||
Plan 01's changes (migration 092, `lib/types/pax8.ts` extensions). Confirmed via
|
||||
`npx tsc --noEmit --pretty` before and after this plan's edits — same 2 errors,
|
||||
same file, unrelated to `lib/types/pax8.ts`. No action taken; will resolve itself
|
||||
once the AppGate work is committed to the main branch/worktree base.
|
||||
|
|
@ -41,6 +41,12 @@ export interface Pax8Subscription {
|
|||
billingTerm: string | null;
|
||||
status: string | null;
|
||||
startDate: string | null;
|
||||
price: number | null; // customer/list price (D-03)
|
||||
partnerCost: number | null; // partner/reseller cost (D-03)
|
||||
currencyCode: string | null;
|
||||
productName: string | null;
|
||||
endDate: string | null;
|
||||
updatedDate: string | null;
|
||||
[key: string]: unknown; // escape hatch for fields not yet modeled
|
||||
}
|
||||
|
||||
|
|
@ -50,6 +56,8 @@ export interface Pax8Product {
|
|||
vendorSku: string | null;
|
||||
name: string;
|
||||
category: string | null;
|
||||
vendorName: string | null;
|
||||
shortDescription: string | null;
|
||||
[key: string]: unknown; // escape hatch for fields not yet modeled
|
||||
// NOTE: the deprecated alternate-vendor-SKU field per PAX8's own schema is intentionally omitted.
|
||||
}
|
||||
|
|
@ -78,3 +86,27 @@ export interface Pax8OrderItem {
|
|||
currencyCode: string | null;
|
||||
[key: string]: unknown; // escape hatch for fields not yet modeled
|
||||
}
|
||||
|
||||
// ─── Sync result shapes ───────────────────────────────────────────────────
|
||||
// Mirrors lib/types/appgate.ts's AppgateSyncResult/AppgateEntity shape —
|
||||
// the sync service (Plan 02) reports one Pax8EntitySyncResult per entity
|
||||
// type (companies/products/subscriptions), rolled up into a Pax8SyncResult.
|
||||
|
||||
export interface Pax8EntitySyncResult {
|
||||
entity: string;
|
||||
success: boolean;
|
||||
upserted: number;
|
||||
tombstoned: number;
|
||||
durationMs: number;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface Pax8SyncResult {
|
||||
syncId: string;
|
||||
status: 'completed' | 'failed';
|
||||
startedAt: Date;
|
||||
completedAt: Date | null;
|
||||
durationMs: number;
|
||||
entities: Pax8EntitySyncResult[];
|
||||
errors: string[];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue