Skip to content

feat: update to use new product api instead of static build data#491

Draft
mixplore wants to merge 5 commits intodevfrom
feat/update-with-new-product-api
Draft

feat: update to use new product api instead of static build data#491
mixplore wants to merge 5 commits intodevfrom
feat/update-with-new-product-api

Conversation

@mixplore
Copy link
Contributor

@mixplore mixplore commented Feb 18, 2026

Description

  • replace static products data => fetch from products API to get the latest data
  • remove products.json and product-types.json files generation at build time
  • remove ProductTypes enum
  • remove products and productTypes exports

New product and product type schemas:

type Product = {
    id: number;
    name: string;
    minPrice: string;
    coverAssets: {
        assetId: number;
        assetSymbol: string;
    }[];
    initialPriceRatio: string;
    capacityReductionRatio: string;
    isDeprecated: boolean;
    useFixedPrice: boolean;
    metadata:{ [key: 'annex' | 'schedule' | 'exclusions']: string }
    allowedPools: number[];
    productType: number;
    timestamp: number;
    isPrivate: boolean;
};


type ProductType = {
    id: number;
    name: string;
    claimMethod: string;
    gracePeriod: string;
    assessmentCooldownPeriod: string;
    payoutRedemptionPeriod: string;
    metadata: string; // cover wording ipfs hash
    commissionRatio: string;
    commissionDestination: string;
};

Testing

  • check getQuoteAndBuyCoverInputs method works as expected (⚠️ check commission data is correct)

Checklist

  • Performed a self-review of my own code
  • Made corresponding changes to the documentation

@mixplore mixplore self-assigned this Feb 18, 2026
@mixplore mixplore changed the title feat: update to use new product api (wip) feat: update to use new product api Feb 18, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 18, 2026

Deploying sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2c3cfd7
Status: ✅  Deploy successful!
Preview URL: https://526117ff.sdk-9yp.pages.dev
Branch Preview URL: https://feat-update-with-new-product.sdk-9yp.pages.dev

View logs

@mixplore mixplore force-pushed the feat/update-with-new-product-api branch 2 times, most recently from 058e693 to dfbefde Compare February 19, 2026 12:57
@mixplore mixplore changed the title (wip) feat: update to use new product api feat: update to use new product api Feb 19, 2026
@mixplore mixplore force-pushed the feat/update-with-new-product-api branch from 95e057a to bb12c61 Compare February 19, 2026 13:27
@mixplore mixplore changed the title feat: update to use new product api feat: update to use new product api instead of static build for products data Feb 25, 2026
@mixplore mixplore changed the title feat: update to use new product api instead of static build for products data feat: update to use new product api instead of static build data Feb 25, 2026
@mixplore mixplore force-pushed the feat/update-with-new-product-api branch from 9afff5d to 2c3cfd7 Compare February 25, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant