@productcraft/rally 0.0.4 → 0.0.5
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 +27 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,12 +44,12 @@ const rally = new Rally({
|
|
|
44
44
|
auth: { type: "apiKey", key: process.env.PCFT_KEY! },
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
// Create a waitlist
|
|
47
|
+
// Create a waitlist — body uses `display_name`, not `name`.
|
|
48
48
|
const { data } = await rally.client.POST(
|
|
49
49
|
"/v1/workspaces/{workspace_id}/waitlists",
|
|
50
50
|
{
|
|
51
|
-
params: { path: { workspace_id: "
|
|
52
|
-
body: {
|
|
51
|
+
params: { path: { workspace_id: "<workspace-uuid>" } },
|
|
52
|
+
body: { display_name: "Early Access", slug: "early-access" },
|
|
53
53
|
},
|
|
54
54
|
);
|
|
55
55
|
```
|
|
@@ -123,11 +123,25 @@ await rally.client.GET(
|
|
|
123
123
|
|
|
124
124
|
### Variants (A/B/n landing pages)
|
|
125
125
|
|
|
126
|
+
Variants split two ways: `kind: "ab"` for split-traffic A/B/n tests, or `kind: "locale"` for per-locale copy switching. Pick one; the body shape is `{ kind, slug, locale? }`.
|
|
127
|
+
|
|
126
128
|
```ts
|
|
127
|
-
//
|
|
129
|
+
// A/B variant
|
|
130
|
+
await rally.client.POST(
|
|
131
|
+
"/v1/workspaces/{workspace_id}/waitlists/{waitlist_id}/variants",
|
|
132
|
+
{
|
|
133
|
+
params: { ... },
|
|
134
|
+
body: { kind: "ab", slug: "headline-b" },
|
|
135
|
+
},
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
// Locale variant
|
|
128
139
|
await rally.client.POST(
|
|
129
140
|
"/v1/workspaces/{workspace_id}/waitlists/{waitlist_id}/variants",
|
|
130
|
-
{
|
|
141
|
+
{
|
|
142
|
+
params: { ... },
|
|
143
|
+
body: { kind: "locale", slug: "pt-br", locale: "pt-BR" },
|
|
144
|
+
},
|
|
131
145
|
);
|
|
132
146
|
```
|
|
133
147
|
|
|
@@ -142,10 +156,16 @@ await rally.client.GET(
|
|
|
142
156
|
{ ... },
|
|
143
157
|
);
|
|
144
158
|
|
|
145
|
-
// Timeseries
|
|
159
|
+
// Timeseries — `since` is an ISO-8601 timestamp. There are no
|
|
160
|
+
// `bucket` / `lookback` query params.
|
|
146
161
|
await rally.client.GET(
|
|
147
162
|
"/v1/workspaces/{workspace_id}/waitlists/{waitlist_id}/analytics/timeline",
|
|
148
|
-
{
|
|
163
|
+
{
|
|
164
|
+
params: {
|
|
165
|
+
path: { ... },
|
|
166
|
+
query: { since: "2026-05-01T00:00:00Z" },
|
|
167
|
+
},
|
|
168
|
+
},
|
|
149
169
|
);
|
|
150
170
|
```
|
|
151
171
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@productcraft/rally",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Waitlist management — public-form signups, variants for A/B/n landing pages, referrals, position + leaderboard, approval workflow with invite-to-app, signed outbound webhooks, CSV export. Generated from the production OpenAPI spec.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|