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
|
|
@ -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