rampkit-mcp-server 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +160 -0
- package/dist/api/rampkit.d.ts +96 -0
- package/dist/api/rampkit.d.ts.map +1 -0
- package/dist/api/rampkit.js +391 -0
- package/dist/api/rampkit.js.map +1 -0
- package/dist/detection/platform.d.ts +11 -0
- package/dist/detection/platform.d.ts.map +1 -0
- package/dist/detection/platform.js +420 -0
- package/dist/detection/platform.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +24 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +183 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/authoring-guide.d.ts +9 -0
- package/dist/resources/authoring-guide.d.ts.map +1 -0
- package/dist/resources/authoring-guide.js +487 -0
- package/dist/resources/authoring-guide.js.map +1 -0
- package/dist/resources/best-practices.d.ts +8 -0
- package/dist/resources/best-practices.d.ts.map +1 -0
- package/dist/resources/best-practices.js +92 -0
- package/dist/resources/best-practices.js.map +1 -0
- package/dist/resources/index.d.ts +19 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +236 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/schema.d.ts +42 -0
- package/dist/resources/schema.d.ts.map +1 -0
- package/dist/resources/schema.js +239 -0
- package/dist/resources/schema.js.map +1 -0
- package/dist/resources/sdk-guide.d.ts +7 -0
- package/dist/resources/sdk-guide.d.ts.map +1 -0
- package/dist/resources/sdk-guide.js +368 -0
- package/dist/resources/sdk-guide.js.map +1 -0
- package/dist/resources/templates.d.ts +9 -0
- package/dist/resources/templates.d.ts.map +1 -0
- package/dist/resources/templates.js +874 -0
- package/dist/resources/templates.js.map +1 -0
- package/dist/server.d.ts +10 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +109 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/instructions.d.ts +23 -0
- package/dist/tools/instructions.d.ts.map +1 -0
- package/dist/tools/instructions.js +74 -0
- package/dist/tools/instructions.js.map +1 -0
- package/dist/tools/onboarding.d.ts +211 -0
- package/dist/tools/onboarding.d.ts.map +1 -0
- package/dist/tools/onboarding.js +452 -0
- package/dist/tools/onboarding.js.map +1 -0
- package/dist/tools/setup.d.ts +61 -0
- package/dist/tools/setup.d.ts.map +1 -0
- package/dist/tools/setup.js +543 -0
- package/dist/tools/setup.js.map +1 -0
- package/dist/types.d.ts +280 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDK Installation and Usage Guides
|
|
3
|
+
*/
|
|
4
|
+
export const EXPO_SDK_GUIDE = `# RampKit Expo SDK Guide
|
|
5
|
+
|
|
6
|
+
## Minimum Requirements
|
|
7
|
+
|
|
8
|
+
- **iOS 14.0+** (StoreKit 2 transactions automatically tracked on iOS 15+)
|
|
9
|
+
- **Expo SDK 51+**
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
\`\`\`bash
|
|
14
|
+
npm install rampkit-expo-dev
|
|
15
|
+
\`\`\`
|
|
16
|
+
|
|
17
|
+
## Required Peer Dependencies
|
|
18
|
+
|
|
19
|
+
Install these in your app:
|
|
20
|
+
|
|
21
|
+
\`\`\`bash
|
|
22
|
+
npx expo install react-native-webview react-native-pager-view react-native-root-siblings
|
|
23
|
+
\`\`\`
|
|
24
|
+
|
|
25
|
+
## Setup
|
|
26
|
+
|
|
27
|
+
Wrap your app with RootSiblingParent (required for the overlay):
|
|
28
|
+
|
|
29
|
+
\`\`\`tsx
|
|
30
|
+
// App.tsx
|
|
31
|
+
import { RootSiblingParent } from 'react-native-root-siblings';
|
|
32
|
+
|
|
33
|
+
export default function App() {
|
|
34
|
+
return (
|
|
35
|
+
<RootSiblingParent>
|
|
36
|
+
{/* Your app content */}
|
|
37
|
+
</RootSiblingParent>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
\`\`\`
|
|
41
|
+
|
|
42
|
+
## Initialize the SDK
|
|
43
|
+
|
|
44
|
+
\`\`\`typescript
|
|
45
|
+
import { RampKit } from 'rampkit-expo-dev';
|
|
46
|
+
|
|
47
|
+
// Call once at app startup (e.g., in useEffect or before rendering)
|
|
48
|
+
await RampKit.configure({
|
|
49
|
+
appId: 'YOUR_APP_ID',
|
|
50
|
+
environment: 'production', // or 'development'
|
|
51
|
+
autoShowOnboarding: false, // true = show immediately after configure
|
|
52
|
+
appUserID: 'your-user-123', // optional: link to your user system
|
|
53
|
+
verboseLogging: false, // true for debug logs
|
|
54
|
+
onOnboardingFinished: (payload) => {
|
|
55
|
+
console.log('Onboarding finished', payload);
|
|
56
|
+
},
|
|
57
|
+
onShowPaywall: (payload) => {
|
|
58
|
+
// Called when onboarding triggers paywall
|
|
59
|
+
// Present your paywall here
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
\`\`\`
|
|
63
|
+
|
|
64
|
+
## Show Onboarding Manually
|
|
65
|
+
|
|
66
|
+
\`\`\`typescript
|
|
67
|
+
RampKit.showOnboarding();
|
|
68
|
+
|
|
69
|
+
// Or with custom paywall handler:
|
|
70
|
+
RampKit.showOnboarding({
|
|
71
|
+
onShowPaywall: (payload) => { /* show paywall */ }
|
|
72
|
+
});
|
|
73
|
+
\`\`\`
|
|
74
|
+
|
|
75
|
+
## Close Onboarding
|
|
76
|
+
|
|
77
|
+
\`\`\`typescript
|
|
78
|
+
RampKit.closeOnboarding();
|
|
79
|
+
\`\`\`
|
|
80
|
+
|
|
81
|
+
## Get User ID
|
|
82
|
+
|
|
83
|
+
\`\`\`typescript
|
|
84
|
+
const userId = RampKit.getUserId();
|
|
85
|
+
\`\`\`
|
|
86
|
+
|
|
87
|
+
## Get User Answers (from onboarding questions)
|
|
88
|
+
|
|
89
|
+
\`\`\`typescript
|
|
90
|
+
// All answers
|
|
91
|
+
const answers = await RampKit.getAnswers();
|
|
92
|
+
|
|
93
|
+
// Single answer
|
|
94
|
+
const name = await RampKit.getAnswer('userName');
|
|
95
|
+
\`\`\`
|
|
96
|
+
|
|
97
|
+
## Set Custom User ID (after configure)
|
|
98
|
+
|
|
99
|
+
\`\`\`typescript
|
|
100
|
+
await RampKit.setAppUserID('user-abc-123');
|
|
101
|
+
\`\`\`
|
|
102
|
+
|
|
103
|
+
## Track Custom Events
|
|
104
|
+
|
|
105
|
+
\`\`\`typescript
|
|
106
|
+
RampKit.trackEvent('button_tapped', { buttonId: 'cta-1' });
|
|
107
|
+
\`\`\`
|
|
108
|
+
|
|
109
|
+
## Check Initialization
|
|
110
|
+
|
|
111
|
+
\`\`\`typescript
|
|
112
|
+
if (RampKit.isInitialized()) {
|
|
113
|
+
RampKit.showOnboarding();
|
|
114
|
+
}
|
|
115
|
+
\`\`\`
|
|
116
|
+
|
|
117
|
+
## Reset SDK (logout/clear state)
|
|
118
|
+
|
|
119
|
+
\`\`\`typescript
|
|
120
|
+
await RampKit.reset();
|
|
121
|
+
\`\`\`
|
|
122
|
+
|
|
123
|
+
## Complete Example
|
|
124
|
+
|
|
125
|
+
\`\`\`tsx
|
|
126
|
+
// App.tsx
|
|
127
|
+
import { useEffect, useState } from 'react';
|
|
128
|
+
import { RootSiblingParent } from 'react-native-root-siblings';
|
|
129
|
+
import { RampKit } from 'rampkit-expo-dev';
|
|
130
|
+
|
|
131
|
+
export default function App() {
|
|
132
|
+
const [isReady, setIsReady] = useState(false);
|
|
133
|
+
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
async function init() {
|
|
136
|
+
await RampKit.configure({
|
|
137
|
+
appId: 'YOUR_APP_ID',
|
|
138
|
+
environment: 'production',
|
|
139
|
+
autoShowOnboarding: true, // Show onboarding automatically
|
|
140
|
+
onOnboardingFinished: (payload) => {
|
|
141
|
+
console.log('User completed onboarding', payload);
|
|
142
|
+
},
|
|
143
|
+
onShowPaywall: (payload) => {
|
|
144
|
+
// Handle paywall presentation
|
|
145
|
+
console.log('Show paywall', payload);
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
setIsReady(true);
|
|
149
|
+
}
|
|
150
|
+
init();
|
|
151
|
+
}, []);
|
|
152
|
+
|
|
153
|
+
if (!isReady) return null;
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<RootSiblingParent>
|
|
157
|
+
{/* Your app content */}
|
|
158
|
+
</RootSiblingParent>
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
\`\`\`
|
|
162
|
+
`;
|
|
163
|
+
export const IOS_SDK_GUIDE = `# RampKit iOS SDK Guide
|
|
164
|
+
|
|
165
|
+
## Requirements
|
|
166
|
+
|
|
167
|
+
- **iOS 14.0+**
|
|
168
|
+
- StoreKit 2 transactions are automatically tracked on iOS 15+
|
|
169
|
+
|
|
170
|
+
## Installation (Swift Package Manager)
|
|
171
|
+
|
|
172
|
+
In Xcode:
|
|
173
|
+
1. File → Add Package Dependencies
|
|
174
|
+
2. Enter: \`https://github.com/getrampkit/rampkit-ios.git\`
|
|
175
|
+
3. Select version 1.0.0 or "Up to Next Major"
|
|
176
|
+
4. Add to your target
|
|
177
|
+
|
|
178
|
+
Or in Package.swift:
|
|
179
|
+
|
|
180
|
+
\`\`\`swift
|
|
181
|
+
dependencies: [
|
|
182
|
+
.package(url: "https://github.com/getrampkit/rampkit-ios.git", from: "1.0.0")
|
|
183
|
+
]
|
|
184
|
+
\`\`\`
|
|
185
|
+
|
|
186
|
+
## Initialize the SDK
|
|
187
|
+
|
|
188
|
+
\`\`\`swift
|
|
189
|
+
import RampKit
|
|
190
|
+
|
|
191
|
+
// Call once at app launch (e.g., in AppDelegate or @main App init)
|
|
192
|
+
Task {
|
|
193
|
+
await RampKit.configure(config: RampKitConfig(
|
|
194
|
+
appId: "YOUR_APP_ID",
|
|
195
|
+
environment: "production",
|
|
196
|
+
autoShowOnboarding: false,
|
|
197
|
+
appUserID: "your-user-123", // optional
|
|
198
|
+
verboseLogging: false,
|
|
199
|
+
onOnboardingFinished: { payload in
|
|
200
|
+
print("Onboarding finished", payload ?? "")
|
|
201
|
+
},
|
|
202
|
+
onShowPaywall: { payload in
|
|
203
|
+
// Present your paywall here
|
|
204
|
+
}
|
|
205
|
+
))
|
|
206
|
+
}
|
|
207
|
+
\`\`\`
|
|
208
|
+
|
|
209
|
+
## Show Onboarding
|
|
210
|
+
|
|
211
|
+
\`\`\`swift
|
|
212
|
+
RampKit.showOnboarding()
|
|
213
|
+
|
|
214
|
+
// Or with custom paywall handler:
|
|
215
|
+
RampKit.showOnboarding(options: ShowOnboardingOptions(
|
|
216
|
+
onShowPaywall: { payload in /* show paywall */ }
|
|
217
|
+
))
|
|
218
|
+
\`\`\`
|
|
219
|
+
|
|
220
|
+
## Close Onboarding
|
|
221
|
+
|
|
222
|
+
\`\`\`swift
|
|
223
|
+
RampKit.closeOnboarding()
|
|
224
|
+
\`\`\`
|
|
225
|
+
|
|
226
|
+
## Get User ID
|
|
227
|
+
|
|
228
|
+
\`\`\`swift
|
|
229
|
+
let userId = RampKit.getUserId()
|
|
230
|
+
\`\`\`
|
|
231
|
+
|
|
232
|
+
## Get User Answers (from onboarding questions)
|
|
233
|
+
|
|
234
|
+
\`\`\`swift
|
|
235
|
+
// All answers
|
|
236
|
+
let answers = RampKit.getAnswers()
|
|
237
|
+
|
|
238
|
+
// Single answer
|
|
239
|
+
let name = RampKit.getAnswer("userName")
|
|
240
|
+
\`\`\`
|
|
241
|
+
|
|
242
|
+
## Set Custom User ID (after configure)
|
|
243
|
+
|
|
244
|
+
\`\`\`swift
|
|
245
|
+
Task {
|
|
246
|
+
await RampKit.setAppUserID("user-abc-123")
|
|
247
|
+
}
|
|
248
|
+
\`\`\`
|
|
249
|
+
|
|
250
|
+
## Reset SDK (logout/clear state)
|
|
251
|
+
|
|
252
|
+
\`\`\`swift
|
|
253
|
+
Task {
|
|
254
|
+
await RampKit.reset()
|
|
255
|
+
}
|
|
256
|
+
\`\`\`
|
|
257
|
+
|
|
258
|
+
## Complete SwiftUI Example
|
|
259
|
+
|
|
260
|
+
\`\`\`swift
|
|
261
|
+
import SwiftUI
|
|
262
|
+
import RampKit
|
|
263
|
+
|
|
264
|
+
@main
|
|
265
|
+
struct MyApp: App {
|
|
266
|
+
init() {
|
|
267
|
+
Task {
|
|
268
|
+
await RampKit.configure(config: RampKitConfig(
|
|
269
|
+
appId: "YOUR_APP_ID",
|
|
270
|
+
environment: "production",
|
|
271
|
+
autoShowOnboarding: true,
|
|
272
|
+
onOnboardingFinished: { payload in
|
|
273
|
+
print("Onboarding finished", payload ?? "")
|
|
274
|
+
},
|
|
275
|
+
onShowPaywall: { payload in
|
|
276
|
+
// Present your paywall
|
|
277
|
+
}
|
|
278
|
+
))
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
var body: some Scene {
|
|
283
|
+
WindowGroup {
|
|
284
|
+
ContentView()
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
\`\`\`
|
|
289
|
+
|
|
290
|
+
## Complete UIKit Example
|
|
291
|
+
|
|
292
|
+
\`\`\`swift
|
|
293
|
+
import UIKit
|
|
294
|
+
import RampKit
|
|
295
|
+
|
|
296
|
+
@main
|
|
297
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
298
|
+
func application(
|
|
299
|
+
_ application: UIApplication,
|
|
300
|
+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
301
|
+
) -> Bool {
|
|
302
|
+
Task {
|
|
303
|
+
await RampKit.configure(config: RampKitConfig(
|
|
304
|
+
appId: "YOUR_APP_ID",
|
|
305
|
+
environment: "production",
|
|
306
|
+
autoShowOnboarding: false,
|
|
307
|
+
onOnboardingFinished: { payload in
|
|
308
|
+
print("Onboarding finished", payload ?? "")
|
|
309
|
+
},
|
|
310
|
+
onShowPaywall: { payload in
|
|
311
|
+
// Present your paywall
|
|
312
|
+
}
|
|
313
|
+
))
|
|
314
|
+
}
|
|
315
|
+
return true
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
\`\`\`
|
|
319
|
+
`;
|
|
320
|
+
export const ANDROID_SDK_GUIDE = `# RampKit Android SDK Guide
|
|
321
|
+
|
|
322
|
+
## Installation via Gradle
|
|
323
|
+
|
|
324
|
+
Add to your app's build.gradle:
|
|
325
|
+
|
|
326
|
+
\`\`\`gradle
|
|
327
|
+
implementation "com.rampkit:sdk:1.0.0"
|
|
328
|
+
\`\`\`
|
|
329
|
+
|
|
330
|
+
## Initialize the SDK
|
|
331
|
+
|
|
332
|
+
\`\`\`kotlin
|
|
333
|
+
import com.rampkit.RampKit
|
|
334
|
+
|
|
335
|
+
// In your Application class or MainActivity
|
|
336
|
+
RampKit.configure(
|
|
337
|
+
context = this,
|
|
338
|
+
appId = "YOUR_APP_ID"
|
|
339
|
+
)
|
|
340
|
+
\`\`\`
|
|
341
|
+
|
|
342
|
+
## Show Onboarding
|
|
343
|
+
|
|
344
|
+
\`\`\`kotlin
|
|
345
|
+
RampKit.showOnboarding(activity)
|
|
346
|
+
\`\`\`
|
|
347
|
+
|
|
348
|
+
## Configuration Options
|
|
349
|
+
|
|
350
|
+
\`\`\`kotlin
|
|
351
|
+
RampKit.configure(
|
|
352
|
+
context = this,
|
|
353
|
+
appId = "YOUR_APP_ID",
|
|
354
|
+
environment = RampKit.Environment.PRODUCTION,
|
|
355
|
+
autoShowOnboarding = false,
|
|
356
|
+
listener = object : RampKitListener {
|
|
357
|
+
override fun onOnboardingFinished(payload: Map<String, Any>) {
|
|
358
|
+
// Handle completion
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
override fun onPaywallRequested(payload: Map<String, Any>) {
|
|
362
|
+
// Present your paywall
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
)
|
|
366
|
+
\`\`\`
|
|
367
|
+
`;
|
|
368
|
+
//# sourceMappingURL=sdk-guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk-guide.js","sourceRoot":"","sources":["../../src/resources/sdk-guide.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8J7B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4J5B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+ChC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTML Templates for Onboarding Screens
|
|
3
|
+
*
|
|
4
|
+
* Ready-to-use templates for common onboarding screen types.
|
|
5
|
+
* All elements have both data-ramp-id (unique identifier) and data-ramp-type (element type).
|
|
6
|
+
* Valid types: text, image, button, video, lottie, input
|
|
7
|
+
*/
|
|
8
|
+
export declare const HTML_TEMPLATES: Record<string, string>;
|
|
9
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/resources/templates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAs2BjD,CAAC"}
|