@epilot/cli 0.1.35 → 0.1.36
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 +1 -1
- package/definitions/targeting.json +201 -7
- package/dist/bin/epilot.js +6 -6
- package/dist/{chunk-QLCWBIOE.js → chunk-FCNMTLSD.js} +2 -1
- package/dist/{completion-TYZKK37U.js → completion-DH4MHYOC.js} +1 -1
- package/dist/{upgrade-6AP6VOA6.js → upgrade-QDOA6XO4.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,13 +31,6 @@
|
|
|
31
31
|
"servers": [
|
|
32
32
|
{
|
|
33
33
|
"url": "https://targeting.sls.epilot.io"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"url": "https://targeting.sls.epilot.io"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"url": "https://targeting.sls.epilot.io",
|
|
40
|
-
"description": "Production Server"
|
|
41
34
|
}
|
|
42
35
|
],
|
|
43
36
|
"paths": {
|
|
@@ -178,6 +171,42 @@
|
|
|
178
171
|
}
|
|
179
172
|
}
|
|
180
173
|
},
|
|
174
|
+
"/v1/campaign:setup": {
|
|
175
|
+
"post": {
|
|
176
|
+
"operationId": "setupCampaign",
|
|
177
|
+
"summary": "Set up a campaign with related entities and configurations",
|
|
178
|
+
"description": "Creates a `campaign` entity together with its related entities and configurations in a single call.\nUsed by the campaign wizard UI, but not restricted to it.\n",
|
|
179
|
+
"tags": [
|
|
180
|
+
"Campaign"
|
|
181
|
+
],
|
|
182
|
+
"security": [
|
|
183
|
+
{
|
|
184
|
+
"EpilotAuth": []
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"requestBody": {
|
|
188
|
+
"required": true,
|
|
189
|
+
"content": {
|
|
190
|
+
"application/json": {
|
|
191
|
+
"schema": {
|
|
192
|
+
"$ref": "#/components/schemas/SetupCampaignRequest"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"responses": {
|
|
198
|
+
"201": {
|
|
199
|
+
"$ref": "#/components/responses/SetupCampaignResponse"
|
|
200
|
+
},
|
|
201
|
+
"400": {
|
|
202
|
+
"$ref": "#/components/responses/ClientErrorResponse"
|
|
203
|
+
},
|
|
204
|
+
"500": {
|
|
205
|
+
"$ref": "#/components/responses/ServerErrorResponse"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
181
210
|
"/v1/campaign:match": {
|
|
182
211
|
"post": {
|
|
183
212
|
"operationId": "matchCampaigns",
|
|
@@ -1181,6 +1210,151 @@
|
|
|
1181
1210
|
"required": [
|
|
1182
1211
|
"status"
|
|
1183
1212
|
]
|
|
1213
|
+
},
|
|
1214
|
+
"SetupCampaignRequest": {
|
|
1215
|
+
"description": "Discriminated by `type`. Each campaign variant has its own request shape;\nnew variants are added by introducing a new schema and extending the `oneOf` list.\n",
|
|
1216
|
+
"oneOf": [
|
|
1217
|
+
{
|
|
1218
|
+
"$ref": "#/components/schemas/SetupTariffChangeCampaignRequest"
|
|
1219
|
+
}
|
|
1220
|
+
],
|
|
1221
|
+
"discriminator": {
|
|
1222
|
+
"propertyName": "type",
|
|
1223
|
+
"mapping": {
|
|
1224
|
+
"tariff_change": "#/components/schemas/SetupTariffChangeCampaignRequest"
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
"SetupTariffChangeCampaignRequest": {
|
|
1229
|
+
"type": "object",
|
|
1230
|
+
"properties": {
|
|
1231
|
+
"type": {
|
|
1232
|
+
"type": "string",
|
|
1233
|
+
"enum": [
|
|
1234
|
+
"tariff_change"
|
|
1235
|
+
]
|
|
1236
|
+
},
|
|
1237
|
+
"product_recommendation": {
|
|
1238
|
+
"type": "object",
|
|
1239
|
+
"properties": {
|
|
1240
|
+
"name": {
|
|
1241
|
+
"type": "string",
|
|
1242
|
+
"description": "Optional name of the product recommendation. Defaults to the campaign name."
|
|
1243
|
+
},
|
|
1244
|
+
"source_product_id": {
|
|
1245
|
+
"allOf": [
|
|
1246
|
+
{
|
|
1247
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1248
|
+
}
|
|
1249
|
+
],
|
|
1250
|
+
"description": "Optional source product entity ID for the recommendation."
|
|
1251
|
+
},
|
|
1252
|
+
"source_price_id": {
|
|
1253
|
+
"allOf": [
|
|
1254
|
+
{
|
|
1255
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1256
|
+
}
|
|
1257
|
+
],
|
|
1258
|
+
"description": "Optional source price entity ID for the recommendation."
|
|
1259
|
+
},
|
|
1260
|
+
"offers": {
|
|
1261
|
+
"type": "array",
|
|
1262
|
+
"description": "Offer blocks for the product_recommendation entity.",
|
|
1263
|
+
"items": {
|
|
1264
|
+
"type": "object",
|
|
1265
|
+
"properties": {
|
|
1266
|
+
"target_id": {
|
|
1267
|
+
"$ref": "#/components/schemas/BaseUUID",
|
|
1268
|
+
"description": "Optional per-offer target entity ID."
|
|
1269
|
+
},
|
|
1270
|
+
"items": {
|
|
1271
|
+
"type": "array",
|
|
1272
|
+
"description": "Product/price pairs within this offer.",
|
|
1273
|
+
"items": {
|
|
1274
|
+
"type": "object",
|
|
1275
|
+
"properties": {
|
|
1276
|
+
"product_id": {
|
|
1277
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1278
|
+
},
|
|
1279
|
+
"price_id": {
|
|
1280
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1281
|
+
},
|
|
1282
|
+
"highlight_config": {
|
|
1283
|
+
"type": "object",
|
|
1284
|
+
"description": "Opaque per-item highlight/comparison config persisted as-is on the entity.",
|
|
1285
|
+
"additionalProperties": true
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
"required": [
|
|
1289
|
+
"product_id",
|
|
1290
|
+
"price_id"
|
|
1291
|
+
],
|
|
1292
|
+
"additionalProperties": false
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
"required": [
|
|
1297
|
+
"items"
|
|
1298
|
+
],
|
|
1299
|
+
"additionalProperties": false
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
},
|
|
1303
|
+
"additionalProperties": false
|
|
1304
|
+
},
|
|
1305
|
+
"campaign": {
|
|
1306
|
+
"type": "object",
|
|
1307
|
+
"properties": {
|
|
1308
|
+
"name": {
|
|
1309
|
+
"type": "string"
|
|
1310
|
+
},
|
|
1311
|
+
"goal": {
|
|
1312
|
+
"type": "string"
|
|
1313
|
+
},
|
|
1314
|
+
"target_ids": {
|
|
1315
|
+
"type": "array",
|
|
1316
|
+
"description": "List of target entity IDs to attach to the campaign. Today only a single\nentry is supported (campaign.target is has_one) but the array shape is kept\nfor forward-compatibility — only `target_ids[0]` is used.\n",
|
|
1317
|
+
"items": {
|
|
1318
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
},
|
|
1322
|
+
"required": [
|
|
1323
|
+
"name",
|
|
1324
|
+
"target_ids"
|
|
1325
|
+
],
|
|
1326
|
+
"additionalProperties": false
|
|
1327
|
+
}
|
|
1328
|
+
},
|
|
1329
|
+
"required": [
|
|
1330
|
+
"type",
|
|
1331
|
+
"product_recommendation",
|
|
1332
|
+
"campaign"
|
|
1333
|
+
],
|
|
1334
|
+
"additionalProperties": false
|
|
1335
|
+
},
|
|
1336
|
+
"SetupTariffChangeCampaignResponse": {
|
|
1337
|
+
"type": "object",
|
|
1338
|
+
"properties": {
|
|
1339
|
+
"type": {
|
|
1340
|
+
"type": "string",
|
|
1341
|
+
"enum": [
|
|
1342
|
+
"tariff_change"
|
|
1343
|
+
]
|
|
1344
|
+
},
|
|
1345
|
+
"product_recommendation_id": {
|
|
1346
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1347
|
+
},
|
|
1348
|
+
"campaign_id": {
|
|
1349
|
+
"$ref": "#/components/schemas/BaseUUID"
|
|
1350
|
+
}
|
|
1351
|
+
},
|
|
1352
|
+
"required": [
|
|
1353
|
+
"type",
|
|
1354
|
+
"product_recommendation_id",
|
|
1355
|
+
"campaign_id"
|
|
1356
|
+
],
|
|
1357
|
+
"additionalProperties": false
|
|
1184
1358
|
}
|
|
1185
1359
|
},
|
|
1186
1360
|
"securitySchemes": {
|
|
@@ -1442,6 +1616,26 @@
|
|
|
1442
1616
|
}
|
|
1443
1617
|
}
|
|
1444
1618
|
},
|
|
1619
|
+
"SetupCampaignResponse": {
|
|
1620
|
+
"description": "Discriminated by `type`, mirroring the request. Each campaign variant has its\nown response shape; new variants extend the `oneOf` list alongside the request.\n",
|
|
1621
|
+
"content": {
|
|
1622
|
+
"application/json": {
|
|
1623
|
+
"schema": {
|
|
1624
|
+
"oneOf": [
|
|
1625
|
+
{
|
|
1626
|
+
"$ref": "#/components/schemas/SetupTariffChangeCampaignResponse"
|
|
1627
|
+
}
|
|
1628
|
+
],
|
|
1629
|
+
"discriminator": {
|
|
1630
|
+
"propertyName": "type",
|
|
1631
|
+
"mapping": {
|
|
1632
|
+
"tariff_change": "#/components/schemas/SetupTariffChangeCampaignResponse"
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1445
1639
|
"RetriggerAutomationsResponse": {
|
|
1446
1640
|
"description": "Response to a request to retrigger automations for campaign recipients",
|
|
1447
1641
|
"content": {
|
package/dist/bin/epilot.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
API_LIST
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-FCNMTLSD.js";
|
|
5
5
|
|
|
6
6
|
// bin/epilot.ts
|
|
7
7
|
import { runMain } from "citty";
|
|
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
|
|
|
11
11
|
var main = defineCommand({
|
|
12
12
|
meta: {
|
|
13
13
|
name: "epilot",
|
|
14
|
-
version: "0.1.
|
|
14
|
+
version: "0.1.36",
|
|
15
15
|
description: "CLI for epilot APIs"
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
@@ -30,8 +30,8 @@ var main = defineCommand({
|
|
|
30
30
|
auth: () => import("../auth-CN5EFFDE.js").then((m) => m.default),
|
|
31
31
|
profile: () => import("../profile-OZJL5ZPT.js").then((m) => m.default),
|
|
32
32
|
config: () => import("../config-DGZIMLZK.js").then((m) => m.default),
|
|
33
|
-
completion: () => import("../completion-
|
|
34
|
-
upgrade: () => import("../upgrade-
|
|
33
|
+
completion: () => import("../completion-DH4MHYOC.js").then((m) => m.default),
|
|
34
|
+
upgrade: () => import("../upgrade-QDOA6XO4.js").then((m) => m.default),
|
|
35
35
|
"access-token": () => import("../access-token-WWE6BDJH.js").then((m) => m.default),
|
|
36
36
|
address: () => import("../address-EH3C4CVB.js").then((m) => m.default),
|
|
37
37
|
"address-suggestions": () => import("../address-suggestions-RRSLOBFW.js").then((m) => m.default),
|
|
@@ -133,13 +133,13 @@ process.stderr.on("error", (err) => {
|
|
|
133
133
|
if (err.code === "EPIPE") process.exit(0);
|
|
134
134
|
throw err;
|
|
135
135
|
});
|
|
136
|
-
var VERSION = true ? "0.1.
|
|
136
|
+
var VERSION = true ? "0.1.36" : (await null).default.version;
|
|
137
137
|
var reorderedArgv = hoistFlagsAfterSubcommand(process.argv.slice(2));
|
|
138
138
|
process.argv = [process.argv[0], process.argv[1], ...reorderedArgv];
|
|
139
139
|
var args = process.argv.slice(2);
|
|
140
140
|
var completionsIdx = args.indexOf("--_completions");
|
|
141
141
|
if (completionsIdx >= 0) {
|
|
142
|
-
const { handleCompletions } = await import("../completion-
|
|
142
|
+
const { handleCompletions } = await import("../completion-DH4MHYOC.js");
|
|
143
143
|
handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
|
|
144
144
|
process.exit(0);
|
|
145
145
|
}
|
|
@@ -1166,12 +1166,13 @@ var API_LIST = [
|
|
|
1166
1166
|
kebabName: "targeting",
|
|
1167
1167
|
title: "Targeting API",
|
|
1168
1168
|
serverUrl: "https://targeting.sls.epilot.io",
|
|
1169
|
-
operationCount:
|
|
1169
|
+
operationCount: 12,
|
|
1170
1170
|
operationIds: [
|
|
1171
1171
|
"changeCampaignStatus",
|
|
1172
1172
|
"getCampaignJobStatus",
|
|
1173
1173
|
"getCampaignPortals",
|
|
1174
1174
|
"retriggerCampaignAutomations",
|
|
1175
|
+
"setupCampaign",
|
|
1175
1176
|
"matchCampaigns",
|
|
1176
1177
|
"matchTargets",
|
|
1177
1178
|
"getTargetQueries",
|
|
@@ -72,7 +72,7 @@ ${GREEN}${BOLD}Upgraded to @epilot/cli@${latest}${RESET}
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
var getCurrentVersion = () => {
|
|
75
|
-
if (true) return "0.1.
|
|
75
|
+
if (true) return "0.1.36";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|