diff --git a/docs/server-core/node/migration-guide/_api_changes.mdx b/docs/server-core/node/migration-guide/_api_changes.mdx deleted file mode 100644 index d6aac135f..000000000 --- a/docs/server-core/node/migration-guide/_api_changes.mdx +++ /dev/null @@ -1,20 +0,0 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -### Key Package and Class Changes - -| Feature | Node Core SDK | Legacy Node SDK | Status | -|---------|---------------|----------------|--------| -| Package | `statsig-node-core` | `statsig-node` | ⚠️ Renamed | -| Import | `import {Statsig} '@statsig/statsig-node-core'` |`const Statsig = require("statsig-node");` | ⚠️ Change | -| Options | `StatsigOptions` | `StatsigOptions` | ✓ Same | -| User | `StatsigUser` | `StatsigUser` | ⚠️ Changed from type to class | -| Initialize | `await statsig.initialize()` | `await statsig.initialize()` | Same | -| Check Gate | `statsig.check_gate()` | `statsig.check_gate()` | ✓ Same | -| Get Config | `statsig.get_dynamic_config()` | `statsig.get_config()` | ⚠️ Renamed | -| Get Experiment | `statsig.get_experiment()` | `statsig.get_experiment()` | ✓ Same | -| Get Layer | `statsig.get_layer()` | `statsig.get_layer()` | ✓ Same | -| Log Event | `statsig.log_event()` | `statsig.log_event()` | ✓ Same | -| Shutdown | `await statsig.shutdown()` | `await statsig.shutdown()` | Same | - -For more details on the new API, see [Python Core SDK documentation](/server-core/python-core). \ No newline at end of file diff --git a/docs/server-core/node/migration-guide/_statsig_options.mdx b/docs/server-core/node/migration-guide/_statsig_options.mdx deleted file mode 100644 index eb3459125..000000000 --- a/docs/server-core/node/migration-guide/_statsig_options.mdx +++ /dev/null @@ -1,18 +0,0 @@ -| Old Option | New / Notes | -| ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- | -| `api` | Deprecated | -| `idlists_thread_limit`, `logging_interval`, `enable_debug_logs`, `events_flushed_callback` | Deprecated | -| `timeout` | Deprecated (was only for network) | -| `apiForDownloadConfigSpecs` | `specsUrl` – must complete with endpoint | -| `apiForIdLists` | `idListsUrl` – must complete with endpoint | -| `apiForLogEvent` | `logEventUrl` – must complete with endpoint | -| `initTimeoutMs` | `initTimeoutMs` – applies to overall initialization (suggest adding +1000 ms if enabling UA) | -| `rulesetsSyncIntervalMs` | `specsSyncIntervalMs` (unit: milliseconds) | -| `idListsSyncIntervalMs` | `idListsSyncIntervalMs` (unit: milliseconds) | -| `loggingIntervalMs` | `eventLoggingFlushIntervalMs` | -| `loggingMaxBufferSize` | `eventLoggingMaxQueuesize` | -| `dataAdapter` | Still supported but interface changed | -| `initTimeoutMs` | Apply to overall initialize timeout | -| `observability_client`, `sdk_error_callback` | Now within `observability_client` interface | -| `logger` | Now `OutputLoggerProvider` interface | -| `bootstrap_values`, `evaluation_callback`, `rules_updated_callback` | Not yet supported | diff --git a/docs/server-core/node/migration-guide/_user_creation.mdx b/docs/server-core/node/migration-guide/_user_creation.mdx deleted file mode 100644 index 5c70c5c30..000000000 --- a/docs/server-core/node/migration-guide/_user_creation.mdx +++ /dev/null @@ -1,39 +0,0 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -User creation is still the same in the new python core SDK. - - - - ```python - from statsig_python_core import * - - user = StatsigUser( - user_id="user_123", - email="user@example.com", - ip="192.168.0.1", - user_agent="Mozilla/5.0", - country="US", - custom={ - "subscription_level": "premium" - } - ) - ``` - - - ```python - from statsig import StatsigUser - - user = StatsigUser( - user_id="user_123", - email="user@example.com", - ip="192.168.0.1", - user_agent="Mozilla/5.0", - country="US", - custom={ - "subscription_level": "premium" - } - ) - ``` - - diff --git a/docs/server-core/node/migration-guide/index.mdx b/docs/server-core/node/migration-guide/index.mdx deleted file mode 100644 index b750370f1..000000000 --- a/docs/server-core/node/migration-guide/index.mdx +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Node Core SDK Migration Guide -displayed_sidebar: api ---- - -import CodeBlock from '@theme/CodeBlock'; -import { - SDKDocsBuilder, -} from "../../../sdks/_SDKDocsBuilder.mdx"; - -import { - APIChanges, - GlobalChanges, - Installation, - MigrationHelp, - StatsigOptions, - UserCreation, - NeedHelp, - Troubleshooting, - Intro, -} from "../../MigrationGuideTemplates/index.mdx"; -import NodeAPIChanges from "./_api_changes.mdx"; -import NodeUserCreation from "./_user_creation.mdx"; -import NodeStatsigOptions from "./_statsig_options.mdx"; - -export const Builder = SDKDocsBuilder({ - sections: [ - [ - Intro, - { - sdkType: "Node JS", - }, - ], - - [ - Installation, - { - legacyInstall: npm install statsig-node, - install: npm install @statsig/statsig-node-core, - }, - ], - [ - UserCreation, - { - newUserCreation: -{`import {StatsigUser} from "@statsig/statsig-node-core" -const user = new StatsigUser({ - userID: "user_123", - email: "user@example.com", - ip: "192.168.0.1", - userAgent: "Mozilla/5.0", - country: "US", - custom={ - "subscription_level": "premium" - } -}) -`}, - legacyUserCreation: -{`import type {StatsigUser} from "statsig-node" -user = { - userID: "user_123", - email: "user@example.com", - ip: "192.168.0.1", - userAgent: "Mozilla/5.0", - country: "US", - custom={ - "subscription_level": "premium" - } -} -`}, -} -], -[ -APIChanges, -{ -apiChanges: -} -], -[ -GlobalChanges, -{ -waitForUserAgentInit: "wait_for_user_agent_init", -waitForCountryLookupInit: "wait_for_country_lookup_init", -disableUserAgentParsing: "disable_user_agent_parsing", -disableCountryLookup: "disable_country_lookup", -enableIdLists: "enable_id_lists" -}, -], -[ -StatsigOptions, -{ -optionsMapping: -} -], -[ -NeedHelp, -{} -], -] -}) - -export const toc = Builder.toc; - -<>{Builder.result}