# API Support List
API support varies between the Atomic Interface environment and the Atomic Component environment. The following lists the supported APIs from two dimensions: newly added APIs and existing APIs.
# Newly Added APIs
The APIs newly added in this mode are all under the ft.modelContext namespace.
Supported by Atomic Interface:
- Create Skill:
ft.modelContext.createSkill(skillPath: string) - Register Atomic Interface:
skill.registerAPI('name', handler) - Register Middleware:
skill.use(Middleware) - Get Session ID:
ft.modelContext.getSessionId() - Expire All Components:
ft.modelContext.expireAllCards({ componentPaths, match })
Supported by Atomic Component:
- Associate Mini-Program Page:
ft.modelContext.getViewContext(this).setRelatedPage({ path, query }) - Upstream Message:
ft.modelContext.getContext().sendFollowUpMessage() - Update Card Status and Sync to Model:
ft.modelContext.getViewContext(this).updateModelContext({ content: [{ type: 'text', text: 'User selected xxx' }] })
Half-Screen Page:
- Open Half-Screen Page:
ft.modelContext.getViewContext(this).openDetailPage({ url }) - Preload Half-Screen Page:
ft.modelContext.getViewContext(this).preloadDetailPage({ url }) - Update Card on Half-Screen Page:
ft.modelContext.getContext().reapplyApiCall({ arguments })
Atomic Component Expired State:
- Expire All Components:
ft.modelContext.expireAllCards({ componentPaths, match }) - Expire Previous Components:
ft.modelContext.getViewContext(this).expirePreviousCards({ componentPaths, match })
Atomic Component Receiving Events:
- Atomic Component Receiving Events:
ft.modelContext.getViewContext(this).on(NotificationType, callback) - Atomic Interface Input Parameters:
ft.modelContext.NotificationType.Input - Atomic Interface Output Parameters:
ft.modelContext.NotificationType.Result - Content Overflow Event:
ft.modelContext.NotificationType.Overflow - Expire Event:
ft.modelContext.NotificationType.Expire
# Existing APIs
Some of the Mini-Program's existing APIs support being called in this mode, but the APIs callable by Atomic Interface and Atomic Component differ. The actual calling situation shall prevail.