@epilot/journey-client 0.6.0 → 0.8.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/dist/definition.js +1 -1
- package/dist/openapi.d.ts +1083 -1
- package/package.json +11 -12
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={223(e,r,n){var
|
|
1
|
+
(()=>{"use strict";var e={223(e,r,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var t=o(n(466));r.default=t.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.0","info":{"title":"","version":""},"paths":{"/v1/journey/organization/{id}":{"get":{"operationId":"getJourneysByOrgId","parameters":[{"name":"id","in":"path","required":true},{"name":"hydrate","in":"query","required":false}],"responses":{}}},"/v1/journey/configuration/{id}":{"get":{"operationId":"getJourney","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query","required":false},{"name":"revision_id","in":"query","required":false},{"name":"source","in":"query","required":false},{"name":"orgId","in":"query","required":false}],"responses":{}},"delete":{"operationId":"removeJourney","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/journey/configuration/{id}/revisions":{"post":{"operationId":"createJourneyRevision","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"get":{"operationId":"listJourneyRevisions","parameters":[{"name":"id","in":"path","required":true},{"name":"limit","in":"query","required":false},{"name":"cursor","in":"query","required":false}],"responses":{}}},"/v1/journey/configuration/{id}/revisions/{revision_id}":{"get":{"operationId":"getJourneyRevision","parameters":[{"name":"id","in":"path","required":true},{"name":"revision_id","in":"path","required":true}],"responses":{}}},"/v1/journey/configuration/{id}/publish":{"post":{"operationId":"publishJourneyRevision","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/journey/configuration/{id}/publish-state":{"get":{"operationId":"getJourneyPublishState","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/journey/configuration/{id}/environment":{"get":{"operationId":"getJourneyEnvironment","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/journey/environment-variables":{"get":{"operationId":"getJourneyEnvironmentVariables","responses":{}}},"/v1/journey/products/{id}":{"get":{"operationId":"getJourneyProducts","parameters":[{"name":"id","in":"path","required":true},{"name":"source","in":"query","required":false},{"name":"postal_code","in":"query","required":false},{"name":"city","in":"query","required":false},{"name":"street","in":"query","required":false},{"name":"street_number","in":"query","required":false}],"responses":{}}},"/v1/journey/configuration":{"post":{"operationId":"createJourney","requestBody":{"content":{"application/json":{}}},"parameters":[{"name":"skipAutomation","in":"query","required":false}],"responses":{}},"put":{"operationId":"updateJourney","requestBody":{"content":{"application/json":{}}},"parameters":[],"responses":{}},"patch":{"operationId":"patchUpdateJourney","requestBody":{"content":{"application/json":{}}},"parameters":[],"responses":{}}},"/v1/journey/configuration/search":{"post":{"operationId":"searchJourneys","requestBody":{"content":{"application/json":{}}},"parameters":[],"responses":{}}},"/v1/journey/document:generate":{"post":{"operationId":"generateDocument","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/journey/configuration":{"post":{"operationId":"createJourneyV2","requestBody":{"content":{"application/json":{}}},"parameters":[{"name":"skipAutomation","in":"query","required":false}],"responses":{}},"put":{"operationId":"updateJourneyV2","requestBody":{"content":{"application/json":{}}},"parameters":[],"responses":{}},"patch":{"operationId":"patchUpdateJourneyV2","requestBody":{"content":{"application/json":{}}},"parameters":[],"responses":{}}},"/v2/journey/configuration/{id}":{"get":{"operationId":"getJourneyV2","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"query","required":false}],"responses":{}},"delete":{"operationId":"removeJourneyV2","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/journey/{id}/settings":{"get":{"operationId":"getSettingsForJourney","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/journey/button-options":{"get":{"operationId":"getButtonOptions","parameters":[{"in":"query","name":"fileId","required":true}],"responses":{}}}},"components":{},"servers":[{"url":"https://journey-config.sls.epilot.io"}]}')}},r={},n=function n(o){var t=r[o];if(void 0!==t)return t.exports;var i=r[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}(223),o=exports;for(var t in n)o[t]=n[t];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
package/dist/openapi.d.ts
CHANGED
|
@@ -424,7 +424,15 @@ declare namespace Components {
|
|
|
424
424
|
createdAt: string;
|
|
425
425
|
lastModifiedAt: string;
|
|
426
426
|
deletedAt?: string;
|
|
427
|
+
/**
|
|
428
|
+
* Revision row number of this item. `0` is the journey record, the published version.
|
|
429
|
+
*
|
|
430
|
+
*/
|
|
427
431
|
version: number;
|
|
432
|
+
/**
|
|
433
|
+
* Legacy change counter of the published version, kept for compatibility: bumped whenever the published version changes and used for optimistic concurrency on `PUT`, by submissions (`journey_context.journey_revision`) and by save-and-continue. Saving a revision never changes it. Versioning metadata is only available via `publish-state`.
|
|
434
|
+
*
|
|
435
|
+
*/
|
|
428
436
|
revisions: number;
|
|
429
437
|
featureFlags?: {
|
|
430
438
|
[name: string]: any;
|
|
@@ -446,7 +454,15 @@ declare namespace Components {
|
|
|
446
454
|
createdAt: string;
|
|
447
455
|
lastModifiedAt: string;
|
|
448
456
|
deletedAt?: string;
|
|
457
|
+
/**
|
|
458
|
+
* Revision row number of this item. `0` is the journey record, the published version.
|
|
459
|
+
*
|
|
460
|
+
*/
|
|
449
461
|
version: number;
|
|
462
|
+
/**
|
|
463
|
+
* Legacy change counter of the published version, kept for compatibility: bumped whenever the published version changes and used for optimistic concurrency on `PUT`, by submissions (`journey_context.journey_revision`) and by save-and-continue. Saving a revision never changes it. Versioning metadata is only available via `publish-state`.
|
|
464
|
+
*
|
|
465
|
+
*/
|
|
450
466
|
revisions: number;
|
|
451
467
|
}
|
|
452
468
|
export interface JourneyCreationRequest {
|
|
@@ -1015,9 +1031,716 @@ declare namespace Components {
|
|
|
1015
1031
|
[key: string]: any;
|
|
1016
1032
|
};
|
|
1017
1033
|
}[];
|
|
1034
|
+
export interface JourneyPublishState {
|
|
1035
|
+
journey_id: string; // uuid
|
|
1036
|
+
/**
|
|
1037
|
+
* An explicit `null` means the journey has not adopted versioning yet: it exists, customers receive its journey record, and no revision is the published version.
|
|
1038
|
+
*
|
|
1039
|
+
* example:
|
|
1040
|
+
* 42
|
|
1041
|
+
*/
|
|
1042
|
+
published_revision_id: string | null;
|
|
1043
|
+
published_at?: string; // date-time
|
|
1044
|
+
published_by?: string;
|
|
1045
|
+
}
|
|
1018
1046
|
export interface JourneyResponse {
|
|
1019
1047
|
createdJourney?: Journey;
|
|
1020
1048
|
}
|
|
1049
|
+
export interface JourneyRevision {
|
|
1050
|
+
/**
|
|
1051
|
+
* Opaque identifier of the revision. Moves on every save.
|
|
1052
|
+
* example:
|
|
1053
|
+
* 42
|
|
1054
|
+
*/
|
|
1055
|
+
revision_id: string;
|
|
1056
|
+
created_at: string; // date-time
|
|
1057
|
+
/**
|
|
1058
|
+
* User id of the author. Absent for revisions recorded from writes without a user, e.g. blueprint installs.
|
|
1059
|
+
*
|
|
1060
|
+
*/
|
|
1061
|
+
created_by?: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* Set at publish time only, so present if and only if this revision has been published at least once.
|
|
1064
|
+
*
|
|
1065
|
+
* example:
|
|
1066
|
+
* Summer campaign
|
|
1067
|
+
*/
|
|
1068
|
+
name?: string;
|
|
1069
|
+
description?: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* The last time this revision was published. Not the same question as `is_published`: a revision that was the published version yesterday still carries a `published_at`.
|
|
1072
|
+
*
|
|
1073
|
+
*/
|
|
1074
|
+
published_at?: string; // date-time
|
|
1075
|
+
/**
|
|
1076
|
+
* Whether this revision is the published version right now.
|
|
1077
|
+
*/
|
|
1078
|
+
is_published: boolean;
|
|
1079
|
+
/**
|
|
1080
|
+
* Version of the entity-mapping config stored alongside this revision.
|
|
1081
|
+
* example:
|
|
1082
|
+
* 12
|
|
1083
|
+
*/
|
|
1084
|
+
mapping_config_version?: number;
|
|
1085
|
+
/**
|
|
1086
|
+
* The journey configuration as it was saved in this revision, in the shape the builder holds a journey in.
|
|
1087
|
+
*
|
|
1088
|
+
*/
|
|
1089
|
+
configuration: {
|
|
1090
|
+
[name: string]: any;
|
|
1091
|
+
journeyId?: string;
|
|
1092
|
+
organizationId: string;
|
|
1093
|
+
brandId?: string;
|
|
1094
|
+
name: string;
|
|
1095
|
+
steps: {
|
|
1096
|
+
showStepName?: boolean | null;
|
|
1097
|
+
title?: string | null;
|
|
1098
|
+
subTitle?: string | null;
|
|
1099
|
+
showStepSubtitle?: boolean | null;
|
|
1100
|
+
showStepper?: boolean | null;
|
|
1101
|
+
showStepperLabels?: boolean | null;
|
|
1102
|
+
stepperType?: "numbers" | "progress bar";
|
|
1103
|
+
hideNextButton?: boolean | null;
|
|
1104
|
+
name: string;
|
|
1105
|
+
stepId?: string;
|
|
1106
|
+
schema: any;
|
|
1107
|
+
uischema: any;
|
|
1108
|
+
maxWidth?: "small" | "medium" | "large" | "extra large";
|
|
1109
|
+
}[];
|
|
1110
|
+
design?: {
|
|
1111
|
+
logoUrl?: string | null;
|
|
1112
|
+
theme?: {
|
|
1113
|
+
[name: string]: any;
|
|
1114
|
+
};
|
|
1115
|
+
designTokens?: {
|
|
1116
|
+
[key: string]: any;
|
|
1117
|
+
};
|
|
1118
|
+
};
|
|
1119
|
+
rules?: {
|
|
1120
|
+
type: "inject" | "injectWithKey";
|
|
1121
|
+
sourceType: "journey" | "step" | "block";
|
|
1122
|
+
source: string;
|
|
1123
|
+
target: string;
|
|
1124
|
+
}[];
|
|
1125
|
+
logics?: {
|
|
1126
|
+
autoGeneratedId?: string;
|
|
1127
|
+
conditions: string[];
|
|
1128
|
+
actions: string[];
|
|
1129
|
+
}[];
|
|
1130
|
+
logicsV4?: {
|
|
1131
|
+
[name: string]: {
|
|
1132
|
+
/**
|
|
1133
|
+
* Unique identifier for logic. Use uuidv7
|
|
1134
|
+
*/
|
|
1135
|
+
id?: string; // uuid
|
|
1136
|
+
/**
|
|
1137
|
+
* If true, logic can't be manipulated by the configuring user
|
|
1138
|
+
*/
|
|
1139
|
+
protected?: boolean;
|
|
1140
|
+
/**
|
|
1141
|
+
* Indicates which action to take in case logic evaluates to true
|
|
1142
|
+
*/
|
|
1143
|
+
action?: string;
|
|
1144
|
+
/**
|
|
1145
|
+
* Indicates when the logic should be evaluated
|
|
1146
|
+
*/
|
|
1147
|
+
triggeredOn?: string;
|
|
1148
|
+
conditions?: {
|
|
1149
|
+
/**
|
|
1150
|
+
* Operator to be applied between the fact value and the value
|
|
1151
|
+
*/
|
|
1152
|
+
operator?: string;
|
|
1153
|
+
/**
|
|
1154
|
+
* If operator is a custom function, this needs to be provided
|
|
1155
|
+
*/
|
|
1156
|
+
functionName?: string;
|
|
1157
|
+
fact?: {
|
|
1158
|
+
/**
|
|
1159
|
+
* Unique identifier for a fact
|
|
1160
|
+
*/
|
|
1161
|
+
id?: string; // uuid
|
|
1162
|
+
/**
|
|
1163
|
+
* Indicates reference type (block or context parameter)
|
|
1164
|
+
*/
|
|
1165
|
+
referenceType?: string;
|
|
1166
|
+
/**
|
|
1167
|
+
* Id of the reference
|
|
1168
|
+
*/
|
|
1169
|
+
referenceId?: string;
|
|
1170
|
+
/**
|
|
1171
|
+
* Path to a property. Used if only part of the value is needed
|
|
1172
|
+
*/
|
|
1173
|
+
path?: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* If path is a reference, indicates the intention of it
|
|
1176
|
+
*/
|
|
1177
|
+
meaning?: string;
|
|
1178
|
+
};
|
|
1179
|
+
value?: string | number | boolean | {
|
|
1180
|
+
[key: string]: any;
|
|
1181
|
+
} | any[];
|
|
1182
|
+
args?: {
|
|
1183
|
+
[key: string]: any;
|
|
1184
|
+
};
|
|
1185
|
+
}[][];
|
|
1186
|
+
/**
|
|
1187
|
+
* Logic specific settings. Will vary by type of logic
|
|
1188
|
+
*/
|
|
1189
|
+
settings?: {
|
|
1190
|
+
[key: string]: any;
|
|
1191
|
+
};
|
|
1192
|
+
};
|
|
1193
|
+
};
|
|
1194
|
+
contextSchema?: {
|
|
1195
|
+
/**
|
|
1196
|
+
* Unique identifier for the context schema item
|
|
1197
|
+
*/
|
|
1198
|
+
id?: string; // uuid
|
|
1199
|
+
/**
|
|
1200
|
+
* Type of the parameter. It could be either an entity slug, or a text
|
|
1201
|
+
*/
|
|
1202
|
+
type: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* Expected key to be received in the context
|
|
1205
|
+
*/
|
|
1206
|
+
paramKey: string;
|
|
1207
|
+
/**
|
|
1208
|
+
* Indicates if a value is expected to be provided
|
|
1209
|
+
*/
|
|
1210
|
+
isRequired?: boolean;
|
|
1211
|
+
/**
|
|
1212
|
+
* If type is not text, we can instruct the journey to fetch the entity id we receive as value
|
|
1213
|
+
*/
|
|
1214
|
+
shouldLoadEntity?: boolean;
|
|
1215
|
+
/**
|
|
1216
|
+
* Human-readable note describing the parameter's purpose. Free text; may contain newlines.
|
|
1217
|
+
*/
|
|
1218
|
+
description?: string | null;
|
|
1219
|
+
}[];
|
|
1220
|
+
/**
|
|
1221
|
+
* Journey Template
|
|
1222
|
+
* example:
|
|
1223
|
+
* Sales template (Premium)
|
|
1224
|
+
*/
|
|
1225
|
+
journey_type?: string;
|
|
1226
|
+
/**
|
|
1227
|
+
* If true, journey is displayed in read-only mode
|
|
1228
|
+
*/
|
|
1229
|
+
protected?: boolean;
|
|
1230
|
+
/**
|
|
1231
|
+
* Whitelist of paths that remain editable when the journey is protected. Supports wildcard patterns (e.g. steps/*/blocks/**).
|
|
1232
|
+
*/
|
|
1233
|
+
protectedEditable?: string[];
|
|
1234
|
+
settings?: {
|
|
1235
|
+
embedOptions?: {
|
|
1236
|
+
mode?: "full-screen" | "inline";
|
|
1237
|
+
/**
|
|
1238
|
+
* example:
|
|
1239
|
+
* de
|
|
1240
|
+
*/
|
|
1241
|
+
lang?: string;
|
|
1242
|
+
width?: string;
|
|
1243
|
+
topBar?: boolean;
|
|
1244
|
+
scrollToTop?: boolean;
|
|
1245
|
+
button?: {
|
|
1246
|
+
text?: string | null;
|
|
1247
|
+
align?: "left" | "center" | "right";
|
|
1248
|
+
};
|
|
1249
|
+
};
|
|
1250
|
+
safeModeAutomation?: boolean;
|
|
1251
|
+
/**
|
|
1252
|
+
* DEPRECATED - This API will return hardcoded value of false. Please note that this field is internal to epilot and should not be used by external clients. If you wish to get the canary flag, please use the /v1/journey/{id}/settings API.
|
|
1253
|
+
*/
|
|
1254
|
+
canary?: boolean;
|
|
1255
|
+
designId: string;
|
|
1256
|
+
templateId?: string | null;
|
|
1257
|
+
entityId?: string | null;
|
|
1258
|
+
mappingsAutomationId?: string;
|
|
1259
|
+
/**
|
|
1260
|
+
* When true, the journey is created without a mapping config or automation; mappings are managed as advanced mappings on a lazily created automation.
|
|
1261
|
+
*/
|
|
1262
|
+
newMappings?: boolean;
|
|
1263
|
+
targetedCustomer?: string;
|
|
1264
|
+
description?: string | null;
|
|
1265
|
+
organizationSettings?: {
|
|
1266
|
+
[name: string]: boolean;
|
|
1267
|
+
} | null;
|
|
1268
|
+
publicToken?: string | null;
|
|
1269
|
+
runtimeEntities?: ("ORDER" | "OPPORTUNITY")[];
|
|
1270
|
+
filePurposes?: string[];
|
|
1271
|
+
entityTags?: string[];
|
|
1272
|
+
/**
|
|
1273
|
+
* @deprecated Use addressSuggestionsFileId instead
|
|
1274
|
+
*/
|
|
1275
|
+
addressSuggestionsFileUrl?: string | null;
|
|
1276
|
+
addressSuggestionsFileId?: string | null;
|
|
1277
|
+
/**
|
|
1278
|
+
* Country code for address format (e.g. DE, AT, CH, LU)
|
|
1279
|
+
*/
|
|
1280
|
+
addressSuggestionsCountryCode?: string | null;
|
|
1281
|
+
/**
|
|
1282
|
+
* Whether address auto-complete is enabled
|
|
1283
|
+
*/
|
|
1284
|
+
addressSuggestionsEnableAutoComplete?: boolean;
|
|
1285
|
+
/**
|
|
1286
|
+
* Sources for address auto-complete (e.g. deutschePostService, customAddressesFile)
|
|
1287
|
+
*/
|
|
1288
|
+
addressSuggestionsSource?: string[];
|
|
1289
|
+
/**
|
|
1290
|
+
* Whether free text input is allowed when auto-complete is on
|
|
1291
|
+
*/
|
|
1292
|
+
addressSuggestionsEnableFreeText?: boolean;
|
|
1293
|
+
/**
|
|
1294
|
+
* This property is deprecated and will be removed in a future version
|
|
1295
|
+
*/
|
|
1296
|
+
useNewDesign?: boolean;
|
|
1297
|
+
/**
|
|
1298
|
+
* If true, some journey input labels are in Austrian format
|
|
1299
|
+
*/
|
|
1300
|
+
useAustrianLabels?: boolean;
|
|
1301
|
+
/**
|
|
1302
|
+
* If true, the journey shows an icon to toggle dark mode
|
|
1303
|
+
*/
|
|
1304
|
+
enableDarkMode?: boolean;
|
|
1305
|
+
accessMode?: "PUBLIC" | "PRIVATE";
|
|
1306
|
+
/**
|
|
1307
|
+
* Steps after this step require an authenticated session (auth gate)
|
|
1308
|
+
*/
|
|
1309
|
+
authGate?: {
|
|
1310
|
+
/**
|
|
1311
|
+
* The step containing the Login & Registration block
|
|
1312
|
+
*/
|
|
1313
|
+
stepId: string;
|
|
1314
|
+
};
|
|
1315
|
+
isPublished?: boolean;
|
|
1316
|
+
status?: string;
|
|
1317
|
+
isActive?: boolean;
|
|
1318
|
+
savingProgress?: {
|
|
1319
|
+
mode?: "auto" | "local" | "remote" | "none";
|
|
1320
|
+
supportedRevision?: number;
|
|
1321
|
+
};
|
|
1322
|
+
/**
|
|
1323
|
+
* If false, third-party cookies are disabled to comply with GDPR regulations without asking for consent.
|
|
1324
|
+
*/
|
|
1325
|
+
thirdPartyCookies?: boolean;
|
|
1326
|
+
};
|
|
1327
|
+
validationRules?: /**
|
|
1328
|
+
* References to validation rules organized by blocks and fields.
|
|
1329
|
+
* Maps block IDs to either one or more ordered rule IDs (for block-level rules)
|
|
1330
|
+
* or rule references (for field-level rules).
|
|
1331
|
+
*
|
|
1332
|
+
* example:
|
|
1333
|
+
* {
|
|
1334
|
+
* "block1": "rule123",
|
|
1335
|
+
* "block2": [
|
|
1336
|
+
* "rule456",
|
|
1337
|
+
* "rule789"
|
|
1338
|
+
* ],
|
|
1339
|
+
* "block3": {
|
|
1340
|
+
* "field1": "rule101",
|
|
1341
|
+
* "field2": [
|
|
1342
|
+
* "rule102",
|
|
1343
|
+
* "rule103"
|
|
1344
|
+
* ]
|
|
1345
|
+
* }
|
|
1346
|
+
* }
|
|
1347
|
+
*/
|
|
1348
|
+
ValidationRuleRef;
|
|
1349
|
+
/**
|
|
1350
|
+
* Manifest/Blueprint ID used to create/update the entity
|
|
1351
|
+
*/
|
|
1352
|
+
_manifest?: string /* uuid */[];
|
|
1353
|
+
createdBy?: string;
|
|
1354
|
+
updatedBy?: string | null;
|
|
1355
|
+
/**
|
|
1356
|
+
* If passed with value of null, the API won't modify the lastModifiedAt field on updating the journey
|
|
1357
|
+
*/
|
|
1358
|
+
__lastModifiedAt?: string | null;
|
|
1359
|
+
createdAt: string;
|
|
1360
|
+
lastModifiedAt: string;
|
|
1361
|
+
deletedAt?: string;
|
|
1362
|
+
/**
|
|
1363
|
+
* Revision row number of this item. `0` is the journey record, the published version.
|
|
1364
|
+
*
|
|
1365
|
+
*/
|
|
1366
|
+
version: number;
|
|
1367
|
+
/**
|
|
1368
|
+
* Legacy change counter of the published version, kept for compatibility: bumped whenever the published version changes and used for optimistic concurrency on `PUT`, by submissions (`journey_context.journey_revision`) and by save-and-continue. Saving a revision never changes it. Versioning metadata is only available via `publish-state`.
|
|
1369
|
+
*
|
|
1370
|
+
*/
|
|
1371
|
+
revisions: number;
|
|
1372
|
+
featureFlags?: {
|
|
1373
|
+
[name: string]: any;
|
|
1374
|
+
};
|
|
1375
|
+
};
|
|
1376
|
+
}
|
|
1377
|
+
export interface JourneyRevisionConflict {
|
|
1378
|
+
/**
|
|
1379
|
+
* example:
|
|
1380
|
+
* The journey has been saved since your editor loaded it
|
|
1381
|
+
*/
|
|
1382
|
+
message: string;
|
|
1383
|
+
latest_revision: JourneyRevisionSummary;
|
|
1384
|
+
}
|
|
1385
|
+
export interface JourneyRevisionList {
|
|
1386
|
+
results: JourneyRevisionSummary[];
|
|
1387
|
+
/**
|
|
1388
|
+
* Opaque cursor to pass back as `cursor` to fetch the next page. Absent when the client has reached the end of the history.
|
|
1389
|
+
*
|
|
1390
|
+
*/
|
|
1391
|
+
next_cursor?: string;
|
|
1392
|
+
}
|
|
1393
|
+
/**
|
|
1394
|
+
* The complete journey configuration a revision is created from, same shape as the `PUT` body. Server-managed attributes of the journey record (`revisions`, `version`, publish metadata) are ignored.
|
|
1395
|
+
*
|
|
1396
|
+
*/
|
|
1397
|
+
export interface JourneyRevisionRequest {
|
|
1398
|
+
[name: string]: any;
|
|
1399
|
+
journeyId?: string;
|
|
1400
|
+
organizationId: string;
|
|
1401
|
+
brandId?: string;
|
|
1402
|
+
name: string;
|
|
1403
|
+
steps: {
|
|
1404
|
+
showStepName?: boolean | null;
|
|
1405
|
+
title?: string | null;
|
|
1406
|
+
subTitle?: string | null;
|
|
1407
|
+
showStepSubtitle?: boolean | null;
|
|
1408
|
+
showStepper?: boolean | null;
|
|
1409
|
+
showStepperLabels?: boolean | null;
|
|
1410
|
+
stepperType?: "numbers" | "progress bar";
|
|
1411
|
+
hideNextButton?: boolean | null;
|
|
1412
|
+
name: string;
|
|
1413
|
+
stepId?: string;
|
|
1414
|
+
schema: any;
|
|
1415
|
+
uischema: any;
|
|
1416
|
+
maxWidth?: "small" | "medium" | "large" | "extra large";
|
|
1417
|
+
}[];
|
|
1418
|
+
design?: {
|
|
1419
|
+
logoUrl?: string | null;
|
|
1420
|
+
theme?: {
|
|
1421
|
+
[name: string]: any;
|
|
1422
|
+
};
|
|
1423
|
+
designTokens?: {
|
|
1424
|
+
[key: string]: any;
|
|
1425
|
+
};
|
|
1426
|
+
};
|
|
1427
|
+
rules?: {
|
|
1428
|
+
type: "inject" | "injectWithKey";
|
|
1429
|
+
sourceType: "journey" | "step" | "block";
|
|
1430
|
+
source: string;
|
|
1431
|
+
target: string;
|
|
1432
|
+
}[];
|
|
1433
|
+
logics?: {
|
|
1434
|
+
autoGeneratedId?: string;
|
|
1435
|
+
conditions: string[];
|
|
1436
|
+
actions: string[];
|
|
1437
|
+
}[];
|
|
1438
|
+
logicsV4?: {
|
|
1439
|
+
[name: string]: {
|
|
1440
|
+
/**
|
|
1441
|
+
* Unique identifier for logic. Use uuidv7
|
|
1442
|
+
*/
|
|
1443
|
+
id?: string; // uuid
|
|
1444
|
+
/**
|
|
1445
|
+
* If true, logic can't be manipulated by the configuring user
|
|
1446
|
+
*/
|
|
1447
|
+
protected?: boolean;
|
|
1448
|
+
/**
|
|
1449
|
+
* Indicates which action to take in case logic evaluates to true
|
|
1450
|
+
*/
|
|
1451
|
+
action?: string;
|
|
1452
|
+
/**
|
|
1453
|
+
* Indicates when the logic should be evaluated
|
|
1454
|
+
*/
|
|
1455
|
+
triggeredOn?: string;
|
|
1456
|
+
conditions?: {
|
|
1457
|
+
/**
|
|
1458
|
+
* Operator to be applied between the fact value and the value
|
|
1459
|
+
*/
|
|
1460
|
+
operator?: string;
|
|
1461
|
+
/**
|
|
1462
|
+
* If operator is a custom function, this needs to be provided
|
|
1463
|
+
*/
|
|
1464
|
+
functionName?: string;
|
|
1465
|
+
fact?: {
|
|
1466
|
+
/**
|
|
1467
|
+
* Unique identifier for a fact
|
|
1468
|
+
*/
|
|
1469
|
+
id?: string; // uuid
|
|
1470
|
+
/**
|
|
1471
|
+
* Indicates reference type (block or context parameter)
|
|
1472
|
+
*/
|
|
1473
|
+
referenceType?: string;
|
|
1474
|
+
/**
|
|
1475
|
+
* Id of the reference
|
|
1476
|
+
*/
|
|
1477
|
+
referenceId?: string;
|
|
1478
|
+
/**
|
|
1479
|
+
* Path to a property. Used if only part of the value is needed
|
|
1480
|
+
*/
|
|
1481
|
+
path?: string;
|
|
1482
|
+
/**
|
|
1483
|
+
* If path is a reference, indicates the intention of it
|
|
1484
|
+
*/
|
|
1485
|
+
meaning?: string;
|
|
1486
|
+
};
|
|
1487
|
+
value?: string | number | boolean | {
|
|
1488
|
+
[key: string]: any;
|
|
1489
|
+
} | any[];
|
|
1490
|
+
args?: {
|
|
1491
|
+
[key: string]: any;
|
|
1492
|
+
};
|
|
1493
|
+
}[][];
|
|
1494
|
+
/**
|
|
1495
|
+
* Logic specific settings. Will vary by type of logic
|
|
1496
|
+
*/
|
|
1497
|
+
settings?: {
|
|
1498
|
+
[key: string]: any;
|
|
1499
|
+
};
|
|
1500
|
+
};
|
|
1501
|
+
};
|
|
1502
|
+
contextSchema?: {
|
|
1503
|
+
/**
|
|
1504
|
+
* Unique identifier for the context schema item
|
|
1505
|
+
*/
|
|
1506
|
+
id?: string; // uuid
|
|
1507
|
+
/**
|
|
1508
|
+
* Type of the parameter. It could be either an entity slug, or a text
|
|
1509
|
+
*/
|
|
1510
|
+
type: string;
|
|
1511
|
+
/**
|
|
1512
|
+
* Expected key to be received in the context
|
|
1513
|
+
*/
|
|
1514
|
+
paramKey: string;
|
|
1515
|
+
/**
|
|
1516
|
+
* Indicates if a value is expected to be provided
|
|
1517
|
+
*/
|
|
1518
|
+
isRequired?: boolean;
|
|
1519
|
+
/**
|
|
1520
|
+
* If type is not text, we can instruct the journey to fetch the entity id we receive as value
|
|
1521
|
+
*/
|
|
1522
|
+
shouldLoadEntity?: boolean;
|
|
1523
|
+
/**
|
|
1524
|
+
* Human-readable note describing the parameter's purpose. Free text; may contain newlines.
|
|
1525
|
+
*/
|
|
1526
|
+
description?: string | null;
|
|
1527
|
+
}[];
|
|
1528
|
+
/**
|
|
1529
|
+
* Journey Template
|
|
1530
|
+
* example:
|
|
1531
|
+
* Sales template (Premium)
|
|
1532
|
+
*/
|
|
1533
|
+
journey_type?: string;
|
|
1534
|
+
/**
|
|
1535
|
+
* If true, journey is displayed in read-only mode
|
|
1536
|
+
*/
|
|
1537
|
+
protected?: boolean;
|
|
1538
|
+
/**
|
|
1539
|
+
* Whitelist of paths that remain editable when the journey is protected. Supports wildcard patterns (e.g. steps/*/blocks/**).
|
|
1540
|
+
*/
|
|
1541
|
+
protectedEditable?: string[];
|
|
1542
|
+
settings?: {
|
|
1543
|
+
embedOptions?: {
|
|
1544
|
+
mode?: "full-screen" | "inline";
|
|
1545
|
+
/**
|
|
1546
|
+
* example:
|
|
1547
|
+
* de
|
|
1548
|
+
*/
|
|
1549
|
+
lang?: string;
|
|
1550
|
+
width?: string;
|
|
1551
|
+
topBar?: boolean;
|
|
1552
|
+
scrollToTop?: boolean;
|
|
1553
|
+
button?: {
|
|
1554
|
+
text?: string | null;
|
|
1555
|
+
align?: "left" | "center" | "right";
|
|
1556
|
+
};
|
|
1557
|
+
};
|
|
1558
|
+
safeModeAutomation?: boolean;
|
|
1559
|
+
/**
|
|
1560
|
+
* DEPRECATED - This API will return hardcoded value of false. Please note that this field is internal to epilot and should not be used by external clients. If you wish to get the canary flag, please use the /v1/journey/{id}/settings API.
|
|
1561
|
+
*/
|
|
1562
|
+
canary?: boolean;
|
|
1563
|
+
designId: string;
|
|
1564
|
+
templateId?: string | null;
|
|
1565
|
+
entityId?: string | null;
|
|
1566
|
+
mappingsAutomationId?: string;
|
|
1567
|
+
/**
|
|
1568
|
+
* When true, the journey is created without a mapping config or automation; mappings are managed as advanced mappings on a lazily created automation.
|
|
1569
|
+
*/
|
|
1570
|
+
newMappings?: boolean;
|
|
1571
|
+
targetedCustomer?: string;
|
|
1572
|
+
description?: string | null;
|
|
1573
|
+
organizationSettings?: {
|
|
1574
|
+
[name: string]: boolean;
|
|
1575
|
+
} | null;
|
|
1576
|
+
publicToken?: string | null;
|
|
1577
|
+
runtimeEntities?: ("ORDER" | "OPPORTUNITY")[];
|
|
1578
|
+
filePurposes?: string[];
|
|
1579
|
+
entityTags?: string[];
|
|
1580
|
+
/**
|
|
1581
|
+
* @deprecated Use addressSuggestionsFileId instead
|
|
1582
|
+
*/
|
|
1583
|
+
addressSuggestionsFileUrl?: string | null;
|
|
1584
|
+
addressSuggestionsFileId?: string | null;
|
|
1585
|
+
/**
|
|
1586
|
+
* Country code for address format (e.g. DE, AT, CH, LU)
|
|
1587
|
+
*/
|
|
1588
|
+
addressSuggestionsCountryCode?: string | null;
|
|
1589
|
+
/**
|
|
1590
|
+
* Whether address auto-complete is enabled
|
|
1591
|
+
*/
|
|
1592
|
+
addressSuggestionsEnableAutoComplete?: boolean;
|
|
1593
|
+
/**
|
|
1594
|
+
* Sources for address auto-complete (e.g. deutschePostService, customAddressesFile)
|
|
1595
|
+
*/
|
|
1596
|
+
addressSuggestionsSource?: string[];
|
|
1597
|
+
/**
|
|
1598
|
+
* Whether free text input is allowed when auto-complete is on
|
|
1599
|
+
*/
|
|
1600
|
+
addressSuggestionsEnableFreeText?: boolean;
|
|
1601
|
+
/**
|
|
1602
|
+
* This property is deprecated and will be removed in a future version
|
|
1603
|
+
*/
|
|
1604
|
+
useNewDesign?: boolean;
|
|
1605
|
+
/**
|
|
1606
|
+
* If true, some journey input labels are in Austrian format
|
|
1607
|
+
*/
|
|
1608
|
+
useAustrianLabels?: boolean;
|
|
1609
|
+
/**
|
|
1610
|
+
* If true, the journey shows an icon to toggle dark mode
|
|
1611
|
+
*/
|
|
1612
|
+
enableDarkMode?: boolean;
|
|
1613
|
+
accessMode?: "PUBLIC" | "PRIVATE";
|
|
1614
|
+
/**
|
|
1615
|
+
* Steps after this step require an authenticated session (auth gate)
|
|
1616
|
+
*/
|
|
1617
|
+
authGate?: {
|
|
1618
|
+
/**
|
|
1619
|
+
* The step containing the Login & Registration block
|
|
1620
|
+
*/
|
|
1621
|
+
stepId: string;
|
|
1622
|
+
};
|
|
1623
|
+
isPublished?: boolean;
|
|
1624
|
+
status?: string;
|
|
1625
|
+
isActive?: boolean;
|
|
1626
|
+
savingProgress?: {
|
|
1627
|
+
mode?: "auto" | "local" | "remote" | "none";
|
|
1628
|
+
supportedRevision?: number;
|
|
1629
|
+
};
|
|
1630
|
+
/**
|
|
1631
|
+
* If false, third-party cookies are disabled to comply with GDPR regulations without asking for consent.
|
|
1632
|
+
*/
|
|
1633
|
+
thirdPartyCookies?: boolean;
|
|
1634
|
+
};
|
|
1635
|
+
validationRules?: /**
|
|
1636
|
+
* References to validation rules organized by blocks and fields.
|
|
1637
|
+
* Maps block IDs to either one or more ordered rule IDs (for block-level rules)
|
|
1638
|
+
* or rule references (for field-level rules).
|
|
1639
|
+
*
|
|
1640
|
+
* example:
|
|
1641
|
+
* {
|
|
1642
|
+
* "block1": "rule123",
|
|
1643
|
+
* "block2": [
|
|
1644
|
+
* "rule456",
|
|
1645
|
+
* "rule789"
|
|
1646
|
+
* ],
|
|
1647
|
+
* "block3": {
|
|
1648
|
+
* "field1": "rule101",
|
|
1649
|
+
* "field2": [
|
|
1650
|
+
* "rule102",
|
|
1651
|
+
* "rule103"
|
|
1652
|
+
* ]
|
|
1653
|
+
* }
|
|
1654
|
+
* }
|
|
1655
|
+
*/
|
|
1656
|
+
ValidationRuleRef;
|
|
1657
|
+
/**
|
|
1658
|
+
* Manifest/Blueprint ID used to create/update the entity
|
|
1659
|
+
*/
|
|
1660
|
+
_manifest?: string /* uuid */[];
|
|
1661
|
+
createdBy?: string;
|
|
1662
|
+
updatedBy?: string | null;
|
|
1663
|
+
/**
|
|
1664
|
+
* If passed with value of null, the API won't modify the lastModifiedAt field on updating the journey
|
|
1665
|
+
*/
|
|
1666
|
+
__lastModifiedAt?: string | null;
|
|
1667
|
+
/**
|
|
1668
|
+
* The revision the editor started from. When present and not the latest revision the save is rejected with `409`; absent skips the check.
|
|
1669
|
+
*
|
|
1670
|
+
* example:
|
|
1671
|
+
* 41
|
|
1672
|
+
*/
|
|
1673
|
+
parent_revision_id?: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* Provenance, not configuration: the revision that was loaded into the editor before this save, when it was an older one.
|
|
1676
|
+
*
|
|
1677
|
+
* example:
|
|
1678
|
+
* 37
|
|
1679
|
+
*/
|
|
1680
|
+
based_on_revision_id?: string;
|
|
1681
|
+
/**
|
|
1682
|
+
* Version of the entity-mapping config stored alongside this revision. Publishing the revision points the journey's automation at it.
|
|
1683
|
+
*
|
|
1684
|
+
* example:
|
|
1685
|
+
* 12
|
|
1686
|
+
*/
|
|
1687
|
+
mapping_config_version?: number;
|
|
1688
|
+
/**
|
|
1689
|
+
* What this save changed, for the revision history to list. Distinct from `name`, which is the journey's own name. A publish replaces it with the version name.
|
|
1690
|
+
*
|
|
1691
|
+
* example:
|
|
1692
|
+
* Changes to Steps and Logic
|
|
1693
|
+
*/
|
|
1694
|
+
revision_name?: string;
|
|
1695
|
+
}
|
|
1696
|
+
export interface JourneyRevisionSummary {
|
|
1697
|
+
/**
|
|
1698
|
+
* Opaque identifier of the revision. Moves on every save.
|
|
1699
|
+
* example:
|
|
1700
|
+
* 42
|
|
1701
|
+
*/
|
|
1702
|
+
revision_id: string;
|
|
1703
|
+
created_at: string; // date-time
|
|
1704
|
+
/**
|
|
1705
|
+
* User id of the author. Absent for revisions recorded from writes without a user, e.g. blueprint installs.
|
|
1706
|
+
*
|
|
1707
|
+
*/
|
|
1708
|
+
created_by?: string;
|
|
1709
|
+
/**
|
|
1710
|
+
* Set at publish time only, so present if and only if this revision has been published at least once.
|
|
1711
|
+
*
|
|
1712
|
+
* example:
|
|
1713
|
+
* Summer campaign
|
|
1714
|
+
*/
|
|
1715
|
+
name?: string;
|
|
1716
|
+
description?: string;
|
|
1717
|
+
/**
|
|
1718
|
+
* The last time this revision was published. Not the same question as `is_published`: a revision that was the published version yesterday still carries a `published_at`.
|
|
1719
|
+
*
|
|
1720
|
+
*/
|
|
1721
|
+
published_at?: string; // date-time
|
|
1722
|
+
/**
|
|
1723
|
+
* Whether this revision is the published version right now.
|
|
1724
|
+
*/
|
|
1725
|
+
is_published: boolean;
|
|
1726
|
+
/**
|
|
1727
|
+
* Version of the entity-mapping config stored alongside this revision.
|
|
1728
|
+
* example:
|
|
1729
|
+
* 12
|
|
1730
|
+
*/
|
|
1731
|
+
mapping_config_version?: number;
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* Which revision the runtime read served: the requested one, or the published version when no revision was requested. Absent while the journey has not adopted versioning and on legacy `version` reads.
|
|
1735
|
+
*
|
|
1736
|
+
*/
|
|
1737
|
+
export interface JourneyServedRevision {
|
|
1738
|
+
/**
|
|
1739
|
+
* example:
|
|
1740
|
+
* 42
|
|
1741
|
+
*/
|
|
1742
|
+
revision_id?: string;
|
|
1743
|
+
}
|
|
1021
1744
|
export interface JourneyValidationError {
|
|
1022
1745
|
/**
|
|
1023
1746
|
* Error type identifier
|
|
@@ -1098,6 +1821,45 @@ declare namespace Components {
|
|
|
1098
1821
|
*/
|
|
1099
1822
|
__lastModifiedAt?: string | null;
|
|
1100
1823
|
}
|
|
1824
|
+
export interface PublishResult {
|
|
1825
|
+
/**
|
|
1826
|
+
* example:
|
|
1827
|
+
* 42
|
|
1828
|
+
*/
|
|
1829
|
+
revision_id: string;
|
|
1830
|
+
/**
|
|
1831
|
+
* The name now on the revision: the one sent in the request, the one a previous publish set when this request omitted `name`, or the server-generated default.
|
|
1832
|
+
*
|
|
1833
|
+
* example:
|
|
1834
|
+
* Summer campaign
|
|
1835
|
+
*/
|
|
1836
|
+
name: string;
|
|
1837
|
+
published_at: string; // date-time
|
|
1838
|
+
published_by?: string;
|
|
1839
|
+
/**
|
|
1840
|
+
* Names any best-effort side effect that failed after the publish itself succeeded, e.g. the journey entity sync, so a caller can say "published, but the entity did not update".
|
|
1841
|
+
*
|
|
1842
|
+
*/
|
|
1843
|
+
post_publish_warnings: string[];
|
|
1844
|
+
}
|
|
1845
|
+
export interface PublishRevisionRequest {
|
|
1846
|
+
/**
|
|
1847
|
+
* example:
|
|
1848
|
+
* 42
|
|
1849
|
+
*/
|
|
1850
|
+
revision_id: string;
|
|
1851
|
+
/**
|
|
1852
|
+
* Name stamped onto the revision being published. Optional: when omitted the server generates one, so every revision that has ever been published carries a name. An omitted name never replaces a name a previous publish already set; an explicit one does.
|
|
1853
|
+
*
|
|
1854
|
+
* example:
|
|
1855
|
+
* Summer campaign
|
|
1856
|
+
*/
|
|
1857
|
+
name?: string;
|
|
1858
|
+
/**
|
|
1859
|
+
* Optional description stamped onto the revision at publish time
|
|
1860
|
+
*/
|
|
1861
|
+
description?: string;
|
|
1862
|
+
}
|
|
1101
1863
|
/**
|
|
1102
1864
|
* Field-level rule references within a block.
|
|
1103
1865
|
* Maps field names to one or more ordered rule IDs.
|
|
@@ -1391,6 +2153,37 @@ declare namespace Paths {
|
|
|
1391
2153
|
export type $400 = Components.Schemas.JourneyValidationError;
|
|
1392
2154
|
}
|
|
1393
2155
|
}
|
|
2156
|
+
namespace CreateJourneyRevision {
|
|
2157
|
+
namespace Parameters {
|
|
2158
|
+
/**
|
|
2159
|
+
* example:
|
|
2160
|
+
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
2161
|
+
*/
|
|
2162
|
+
export type Id = string; // uuid
|
|
2163
|
+
}
|
|
2164
|
+
export interface PathParameters {
|
|
2165
|
+
id: /**
|
|
2166
|
+
* example:
|
|
2167
|
+
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
2168
|
+
*/
|
|
2169
|
+
Parameters.Id /* uuid */;
|
|
2170
|
+
}
|
|
2171
|
+
export type RequestBody = /**
|
|
2172
|
+
* The complete journey configuration a revision is created from, same shape as the `PUT` body. Server-managed attributes of the journey record (`revisions`, `version`, publish metadata) are ignored.
|
|
2173
|
+
*
|
|
2174
|
+
*/
|
|
2175
|
+
Components.Schemas.JourneyRevisionRequest;
|
|
2176
|
+
namespace Responses {
|
|
2177
|
+
export type $201 = Components.Schemas.JourneyRevisionSummary;
|
|
2178
|
+
export interface $400 {
|
|
2179
|
+
}
|
|
2180
|
+
export interface $403 {
|
|
2181
|
+
}
|
|
2182
|
+
export interface $404 {
|
|
2183
|
+
}
|
|
2184
|
+
export type $409 = Components.Schemas.JourneyRevisionConflict;
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
1394
2187
|
namespace CreateJourneyV2 {
|
|
1395
2188
|
namespace Parameters {
|
|
1396
2189
|
/**
|
|
@@ -1471,6 +2264,11 @@ declare namespace Paths {
|
|
|
1471
2264
|
*/
|
|
1472
2265
|
export type Id = string; // uuid
|
|
1473
2266
|
export type OrgId = string;
|
|
2267
|
+
/**
|
|
2268
|
+
* example:
|
|
2269
|
+
* 42
|
|
2270
|
+
*/
|
|
2271
|
+
export type RevisionId = string;
|
|
1474
2272
|
export type Source = string;
|
|
1475
2273
|
export type Version = number;
|
|
1476
2274
|
}
|
|
@@ -1483,12 +2281,17 @@ declare namespace Paths {
|
|
|
1483
2281
|
}
|
|
1484
2282
|
export interface QueryParameters {
|
|
1485
2283
|
version?: Parameters.Version;
|
|
2284
|
+
revision_id?: /**
|
|
2285
|
+
* example:
|
|
2286
|
+
* 42
|
|
2287
|
+
*/
|
|
2288
|
+
Parameters.RevisionId;
|
|
1486
2289
|
source?: Parameters.Source;
|
|
1487
2290
|
orgId?: Parameters.OrgId;
|
|
1488
2291
|
}
|
|
1489
2292
|
namespace Responses {
|
|
1490
2293
|
/**
|
|
1491
|
-
*
|
|
2294
|
+
* Which revision the runtime read served: the requested one, or the published version when no revision was requested. Absent while the journey has not adopted versioning and on legacy `version` reads.
|
|
1492
2295
|
*
|
|
1493
2296
|
*/
|
|
1494
2297
|
export interface $200 {
|
|
@@ -1767,11 +2570,24 @@ declare namespace Paths {
|
|
|
1767
2570
|
createdAt: string;
|
|
1768
2571
|
lastModifiedAt: string;
|
|
1769
2572
|
deletedAt?: string;
|
|
2573
|
+
/**
|
|
2574
|
+
* Revision row number of this item. `0` is the journey record, the published version.
|
|
2575
|
+
*
|
|
2576
|
+
*/
|
|
1770
2577
|
version: number;
|
|
2578
|
+
/**
|
|
2579
|
+
* Legacy change counter of the published version, kept for compatibility: bumped whenever the published version changes and used for optimistic concurrency on `PUT`, by submissions (`journey_context.journey_revision`) and by save-and-continue. Saving a revision never changes it. Versioning metadata is only available via `publish-state`.
|
|
2580
|
+
*
|
|
2581
|
+
*/
|
|
1771
2582
|
revisions: number;
|
|
1772
2583
|
featureFlags?: {
|
|
1773
2584
|
[name: string]: any;
|
|
1774
2585
|
};
|
|
2586
|
+
/**
|
|
2587
|
+
* example:
|
|
2588
|
+
* 42
|
|
2589
|
+
*/
|
|
2590
|
+
revision_id?: string;
|
|
1775
2591
|
}
|
|
1776
2592
|
}
|
|
1777
2593
|
}
|
|
@@ -1834,6 +2650,62 @@ declare namespace Paths {
|
|
|
1834
2650
|
export type $200 = Components.Schemas.JourneyProductsResponse;
|
|
1835
2651
|
}
|
|
1836
2652
|
}
|
|
2653
|
+
namespace GetJourneyPublishState {
|
|
2654
|
+
namespace Parameters {
|
|
2655
|
+
/**
|
|
2656
|
+
* example:
|
|
2657
|
+
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
2658
|
+
*/
|
|
2659
|
+
export type Id = string; // uuid
|
|
2660
|
+
}
|
|
2661
|
+
export interface PathParameters {
|
|
2662
|
+
id: /**
|
|
2663
|
+
* example:
|
|
2664
|
+
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
2665
|
+
*/
|
|
2666
|
+
Parameters.Id /* uuid */;
|
|
2667
|
+
}
|
|
2668
|
+
namespace Responses {
|
|
2669
|
+
export type $200 = Components.Schemas.JourneyPublishState;
|
|
2670
|
+
export interface $403 {
|
|
2671
|
+
}
|
|
2672
|
+
export interface $404 {
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2676
|
+
namespace GetJourneyRevision {
|
|
2677
|
+
namespace Parameters {
|
|
2678
|
+
/**
|
|
2679
|
+
* example:
|
|
2680
|
+
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
2681
|
+
*/
|
|
2682
|
+
export type Id = string; // uuid
|
|
2683
|
+
/**
|
|
2684
|
+
* example:
|
|
2685
|
+
* 42
|
|
2686
|
+
*/
|
|
2687
|
+
export type RevisionId = string;
|
|
2688
|
+
}
|
|
2689
|
+
export interface PathParameters {
|
|
2690
|
+
id: /**
|
|
2691
|
+
* example:
|
|
2692
|
+
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
2693
|
+
*/
|
|
2694
|
+
Parameters.Id /* uuid */;
|
|
2695
|
+
revision_id: /**
|
|
2696
|
+
* example:
|
|
2697
|
+
* 42
|
|
2698
|
+
*/
|
|
2699
|
+
Parameters.RevisionId;
|
|
2700
|
+
}
|
|
2701
|
+
namespace Responses {
|
|
2702
|
+
export type $200 = Components.Schemas.JourneyRevision;
|
|
2703
|
+
export interface $403 {
|
|
2704
|
+
}
|
|
2705
|
+
export interface $404 {
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
1837
2709
|
namespace GetJourneyV2 {
|
|
1838
2710
|
namespace Parameters {
|
|
1839
2711
|
/**
|
|
@@ -2181,6 +3053,37 @@ declare namespace Paths {
|
|
|
2181
3053
|
}
|
|
2182
3054
|
}
|
|
2183
3055
|
}
|
|
3056
|
+
namespace ListJourneyRevisions {
|
|
3057
|
+
namespace Parameters {
|
|
3058
|
+
export type Cursor = string;
|
|
3059
|
+
/**
|
|
3060
|
+
* example:
|
|
3061
|
+
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
3062
|
+
*/
|
|
3063
|
+
export type Id = string; // uuid
|
|
3064
|
+
export type Limit = number;
|
|
3065
|
+
}
|
|
3066
|
+
export interface PathParameters {
|
|
3067
|
+
id: /**
|
|
3068
|
+
* example:
|
|
3069
|
+
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
3070
|
+
*/
|
|
3071
|
+
Parameters.Id /* uuid */;
|
|
3072
|
+
}
|
|
3073
|
+
export interface QueryParameters {
|
|
3074
|
+
limit?: Parameters.Limit;
|
|
3075
|
+
cursor?: Parameters.Cursor;
|
|
3076
|
+
}
|
|
3077
|
+
namespace Responses {
|
|
3078
|
+
export type $200 = Components.Schemas.JourneyRevisionList;
|
|
3079
|
+
export interface $400 {
|
|
3080
|
+
}
|
|
3081
|
+
export interface $403 {
|
|
3082
|
+
}
|
|
3083
|
+
export interface $404 {
|
|
3084
|
+
}
|
|
3085
|
+
}
|
|
3086
|
+
}
|
|
2184
3087
|
namespace PatchUpdateJourney {
|
|
2185
3088
|
export type RequestBody = /**
|
|
2186
3089
|
* Patch request to update a journey (journey id is required) Support for nested properties (e.g. steps[0].uischema.elements[0].products) is supported.
|
|
@@ -2217,6 +3120,34 @@ declare namespace Paths {
|
|
|
2217
3120
|
}
|
|
2218
3121
|
}
|
|
2219
3122
|
}
|
|
3123
|
+
namespace PublishJourneyRevision {
|
|
3124
|
+
namespace Parameters {
|
|
3125
|
+
/**
|
|
3126
|
+
* example:
|
|
3127
|
+
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
3128
|
+
*/
|
|
3129
|
+
export type Id = string; // uuid
|
|
3130
|
+
}
|
|
3131
|
+
export interface PathParameters {
|
|
3132
|
+
id: /**
|
|
3133
|
+
* example:
|
|
3134
|
+
* 509cdffe-424f-457a-95c2-9708c304ce77
|
|
3135
|
+
*/
|
|
3136
|
+
Parameters.Id /* uuid */;
|
|
3137
|
+
}
|
|
3138
|
+
export type RequestBody = Components.Schemas.PublishRevisionRequest;
|
|
3139
|
+
namespace Responses {
|
|
3140
|
+
export type $200 = Components.Schemas.PublishResult;
|
|
3141
|
+
export interface $400 {
|
|
3142
|
+
}
|
|
3143
|
+
export interface $403 {
|
|
3144
|
+
}
|
|
3145
|
+
export interface $404 {
|
|
3146
|
+
}
|
|
3147
|
+
export interface $409 {
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
2220
3151
|
namespace RemoveJourney {
|
|
2221
3152
|
namespace Parameters {
|
|
2222
3153
|
/**
|
|
@@ -2322,6 +3253,73 @@ export interface OperationMethods {
|
|
|
2322
3253
|
data?: any,
|
|
2323
3254
|
config?: AxiosRequestConfig
|
|
2324
3255
|
): OperationResponse<any>
|
|
3256
|
+
/**
|
|
3257
|
+
* listJourneyRevisions - listJourneyRevisions
|
|
3258
|
+
*
|
|
3259
|
+
* Lists the journey's revision history, newest first. Metadata only, no configuration payload. `is_published` says whether a revision is the published version right now, which is a different question from `published_at`, which records the last time it was published.
|
|
3260
|
+
*
|
|
3261
|
+
* Only available for organizations with journey versioning enabled; returns `404` otherwise.
|
|
3262
|
+
*
|
|
3263
|
+
*/
|
|
3264
|
+
'listJourneyRevisions'(
|
|
3265
|
+
parameters?: Parameters<Paths.ListJourneyRevisions.QueryParameters & Paths.ListJourneyRevisions.PathParameters> | null,
|
|
3266
|
+
data?: any,
|
|
3267
|
+
config?: AxiosRequestConfig
|
|
3268
|
+
): OperationResponse<Paths.ListJourneyRevisions.Responses.$200>
|
|
3269
|
+
/**
|
|
3270
|
+
* createJourneyRevision - createJourneyRevision
|
|
3271
|
+
*
|
|
3272
|
+
* Creates a revision: an immutable copy of the complete journey configuration, identified by `revision_id`. Nothing customers receive changes; the revision only becomes the published version when it is published. The payload is complete and is not merged against the journey record or the previous revision. The entity datasource set of the revision is stored separately through the datasources API under the same `revision_id`.
|
|
3273
|
+
*
|
|
3274
|
+
* Only available for organizations with journey versioning enabled; returns `404` otherwise.
|
|
3275
|
+
*
|
|
3276
|
+
*/
|
|
3277
|
+
'createJourneyRevision'(
|
|
3278
|
+
parameters?: Parameters<Paths.CreateJourneyRevision.PathParameters> | null,
|
|
3279
|
+
data?: Paths.CreateJourneyRevision.RequestBody,
|
|
3280
|
+
config?: AxiosRequestConfig
|
|
3281
|
+
): OperationResponse<Paths.CreateJourneyRevision.Responses.$201>
|
|
3282
|
+
/**
|
|
3283
|
+
* getJourneyRevision - getJourneyRevision
|
|
3284
|
+
*
|
|
3285
|
+
* Returns one revision with its full configuration, in the shape the builder holds a journey in, so it can be loaded straight into the editor as unsaved changes. Reading a revision changes nothing; a client persists it, if at all, by posting it back to `POST .../revisions`.
|
|
3286
|
+
*
|
|
3287
|
+
* Only available for organizations with journey versioning enabled; returns `404` otherwise.
|
|
3288
|
+
*
|
|
3289
|
+
*/
|
|
3290
|
+
'getJourneyRevision'(
|
|
3291
|
+
parameters?: Parameters<Paths.GetJourneyRevision.PathParameters> | null,
|
|
3292
|
+
data?: any,
|
|
3293
|
+
config?: AxiosRequestConfig
|
|
3294
|
+
): OperationResponse<Paths.GetJourneyRevision.Responses.$200>
|
|
3295
|
+
/**
|
|
3296
|
+
* publishJourneyRevision - publishJourneyRevision
|
|
3297
|
+
*
|
|
3298
|
+
* Makes one revision the published version, the one customers receive, in a single transaction: the revision's configuration is copied onto the journey record, its datasource set onto the published datasources, and `name`, `description`, `published_at` and `published_by` are stamped onto the revision. Any revision can be published, old or new, so publishing an older revision is the rollback.
|
|
3299
|
+
*
|
|
3300
|
+
* `name` is generated server-side when omitted, so every published revision carries one; an omitted name never replaces a name a previous publish already set. `settings.isActive` is never changed by a publish.
|
|
3301
|
+
*
|
|
3302
|
+
* Only available for organizations with journey versioning enabled; returns `404` otherwise.
|
|
3303
|
+
*
|
|
3304
|
+
*/
|
|
3305
|
+
'publishJourneyRevision'(
|
|
3306
|
+
parameters?: Parameters<Paths.PublishJourneyRevision.PathParameters> | null,
|
|
3307
|
+
data?: Paths.PublishJourneyRevision.RequestBody,
|
|
3308
|
+
config?: AxiosRequestConfig
|
|
3309
|
+
): OperationResponse<Paths.PublishJourneyRevision.Responses.$200>
|
|
3310
|
+
/**
|
|
3311
|
+
* getJourneyPublishState - getJourneyPublishState
|
|
3312
|
+
*
|
|
3313
|
+
* Answers which revision is the published version without paging through the history. A journey that has not adopted versioning yet returns `200` with `published_revision_id: null`, not `404`.
|
|
3314
|
+
*
|
|
3315
|
+
* Only available for organizations with journey versioning enabled; returns `404` otherwise.
|
|
3316
|
+
*
|
|
3317
|
+
*/
|
|
3318
|
+
'getJourneyPublishState'(
|
|
3319
|
+
parameters?: Parameters<Paths.GetJourneyPublishState.PathParameters> | null,
|
|
3320
|
+
data?: any,
|
|
3321
|
+
config?: AxiosRequestConfig
|
|
3322
|
+
): OperationResponse<Paths.GetJourneyPublishState.Responses.$200>
|
|
2325
3323
|
/**
|
|
2326
3324
|
* getJourneyEnvironment - getJourneyEnvironment
|
|
2327
3325
|
*
|
|
@@ -2520,6 +3518,81 @@ export interface PathsDictionary {
|
|
|
2520
3518
|
config?: AxiosRequestConfig
|
|
2521
3519
|
): OperationResponse<any>
|
|
2522
3520
|
}
|
|
3521
|
+
['/v1/journey/configuration/{id}/revisions']: {
|
|
3522
|
+
/**
|
|
3523
|
+
* createJourneyRevision - createJourneyRevision
|
|
3524
|
+
*
|
|
3525
|
+
* Creates a revision: an immutable copy of the complete journey configuration, identified by `revision_id`. Nothing customers receive changes; the revision only becomes the published version when it is published. The payload is complete and is not merged against the journey record or the previous revision. The entity datasource set of the revision is stored separately through the datasources API under the same `revision_id`.
|
|
3526
|
+
*
|
|
3527
|
+
* Only available for organizations with journey versioning enabled; returns `404` otherwise.
|
|
3528
|
+
*
|
|
3529
|
+
*/
|
|
3530
|
+
'post'(
|
|
3531
|
+
parameters?: Parameters<Paths.CreateJourneyRevision.PathParameters> | null,
|
|
3532
|
+
data?: Paths.CreateJourneyRevision.RequestBody,
|
|
3533
|
+
config?: AxiosRequestConfig
|
|
3534
|
+
): OperationResponse<Paths.CreateJourneyRevision.Responses.$201>
|
|
3535
|
+
/**
|
|
3536
|
+
* listJourneyRevisions - listJourneyRevisions
|
|
3537
|
+
*
|
|
3538
|
+
* Lists the journey's revision history, newest first. Metadata only, no configuration payload. `is_published` says whether a revision is the published version right now, which is a different question from `published_at`, which records the last time it was published.
|
|
3539
|
+
*
|
|
3540
|
+
* Only available for organizations with journey versioning enabled; returns `404` otherwise.
|
|
3541
|
+
*
|
|
3542
|
+
*/
|
|
3543
|
+
'get'(
|
|
3544
|
+
parameters?: Parameters<Paths.ListJourneyRevisions.QueryParameters & Paths.ListJourneyRevisions.PathParameters> | null,
|
|
3545
|
+
data?: any,
|
|
3546
|
+
config?: AxiosRequestConfig
|
|
3547
|
+
): OperationResponse<Paths.ListJourneyRevisions.Responses.$200>
|
|
3548
|
+
}
|
|
3549
|
+
['/v1/journey/configuration/{id}/revisions/{revision_id}']: {
|
|
3550
|
+
/**
|
|
3551
|
+
* getJourneyRevision - getJourneyRevision
|
|
3552
|
+
*
|
|
3553
|
+
* Returns one revision with its full configuration, in the shape the builder holds a journey in, so it can be loaded straight into the editor as unsaved changes. Reading a revision changes nothing; a client persists it, if at all, by posting it back to `POST .../revisions`.
|
|
3554
|
+
*
|
|
3555
|
+
* Only available for organizations with journey versioning enabled; returns `404` otherwise.
|
|
3556
|
+
*
|
|
3557
|
+
*/
|
|
3558
|
+
'get'(
|
|
3559
|
+
parameters?: Parameters<Paths.GetJourneyRevision.PathParameters> | null,
|
|
3560
|
+
data?: any,
|
|
3561
|
+
config?: AxiosRequestConfig
|
|
3562
|
+
): OperationResponse<Paths.GetJourneyRevision.Responses.$200>
|
|
3563
|
+
}
|
|
3564
|
+
['/v1/journey/configuration/{id}/publish']: {
|
|
3565
|
+
/**
|
|
3566
|
+
* publishJourneyRevision - publishJourneyRevision
|
|
3567
|
+
*
|
|
3568
|
+
* Makes one revision the published version, the one customers receive, in a single transaction: the revision's configuration is copied onto the journey record, its datasource set onto the published datasources, and `name`, `description`, `published_at` and `published_by` are stamped onto the revision. Any revision can be published, old or new, so publishing an older revision is the rollback.
|
|
3569
|
+
*
|
|
3570
|
+
* `name` is generated server-side when omitted, so every published revision carries one; an omitted name never replaces a name a previous publish already set. `settings.isActive` is never changed by a publish.
|
|
3571
|
+
*
|
|
3572
|
+
* Only available for organizations with journey versioning enabled; returns `404` otherwise.
|
|
3573
|
+
*
|
|
3574
|
+
*/
|
|
3575
|
+
'post'(
|
|
3576
|
+
parameters?: Parameters<Paths.PublishJourneyRevision.PathParameters> | null,
|
|
3577
|
+
data?: Paths.PublishJourneyRevision.RequestBody,
|
|
3578
|
+
config?: AxiosRequestConfig
|
|
3579
|
+
): OperationResponse<Paths.PublishJourneyRevision.Responses.$200>
|
|
3580
|
+
}
|
|
3581
|
+
['/v1/journey/configuration/{id}/publish-state']: {
|
|
3582
|
+
/**
|
|
3583
|
+
* getJourneyPublishState - getJourneyPublishState
|
|
3584
|
+
*
|
|
3585
|
+
* Answers which revision is the published version without paging through the history. A journey that has not adopted versioning yet returns `200` with `published_revision_id: null`, not `404`.
|
|
3586
|
+
*
|
|
3587
|
+
* Only available for organizations with journey versioning enabled; returns `404` otherwise.
|
|
3588
|
+
*
|
|
3589
|
+
*/
|
|
3590
|
+
'get'(
|
|
3591
|
+
parameters?: Parameters<Paths.GetJourneyPublishState.PathParameters> | null,
|
|
3592
|
+
data?: any,
|
|
3593
|
+
config?: AxiosRequestConfig
|
|
3594
|
+
): OperationResponse<Paths.GetJourneyPublishState.Responses.$200>
|
|
3595
|
+
}
|
|
2523
3596
|
['/v1/journey/configuration/{id}/environment']: {
|
|
2524
3597
|
/**
|
|
2525
3598
|
* getJourneyEnvironment - getJourneyEnvironment
|
|
@@ -2722,10 +3795,19 @@ export type JourneyEnvironmentResponse = Components.Schemas.JourneyEnvironmentRe
|
|
|
2722
3795
|
export type JourneyEnvironmentVariablesResponse = Components.Schemas.JourneyEnvironmentVariablesResponse;
|
|
2723
3796
|
export type JourneyFeatureFlags = Components.Schemas.JourneyFeatureFlags;
|
|
2724
3797
|
export type JourneyProductsResponse = Components.Schemas.JourneyProductsResponse;
|
|
3798
|
+
export type JourneyPublishState = Components.Schemas.JourneyPublishState;
|
|
2725
3799
|
export type JourneyResponse = Components.Schemas.JourneyResponse;
|
|
3800
|
+
export type JourneyRevision = Components.Schemas.JourneyRevision;
|
|
3801
|
+
export type JourneyRevisionConflict = Components.Schemas.JourneyRevisionConflict;
|
|
3802
|
+
export type JourneyRevisionList = Components.Schemas.JourneyRevisionList;
|
|
3803
|
+
export type JourneyRevisionRequest = Components.Schemas.JourneyRevisionRequest;
|
|
3804
|
+
export type JourneyRevisionSummary = Components.Schemas.JourneyRevisionSummary;
|
|
3805
|
+
export type JourneyServedRevision = Components.Schemas.JourneyServedRevision;
|
|
2726
3806
|
export type JourneyValidationError = Components.Schemas.JourneyValidationError;
|
|
2727
3807
|
export type JourneyValidationResponse = Components.Schemas.JourneyValidationResponse;
|
|
2728
3808
|
export type PatchUpdateJourneyRequest = Components.Schemas.PatchUpdateJourneyRequest;
|
|
3809
|
+
export type PublishResult = Components.Schemas.PublishResult;
|
|
3810
|
+
export type PublishRevisionRequest = Components.Schemas.PublishRevisionRequest;
|
|
2729
3811
|
export type RuleRef = Components.Schemas.RuleRef;
|
|
2730
3812
|
export type S3Reference = Components.Schemas.S3Reference;
|
|
2731
3813
|
export type SearchJourneysQueryRequest = Components.Schemas.SearchJourneysQueryRequest;
|
package/package.json
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/journey-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "API Client for epilot Journey API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "vitest",
|
|
9
|
-
"typescript": "tsc",
|
|
10
|
-
"bundle-definition": "webpack",
|
|
11
|
-
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/journey-config.yaml",
|
|
12
|
-
"typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
|
|
13
|
-
"build": "npm run openapi && npm run typegen && npm run typescript && npm run bundle-definition",
|
|
14
|
-
"eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml",
|
|
15
|
-
"prepublishOnly": "npm run build"
|
|
16
|
-
},
|
|
17
7
|
"files": [
|
|
18
8
|
"*.js",
|
|
19
9
|
"*.d.ts",
|
|
@@ -57,5 +47,14 @@
|
|
|
57
47
|
"vitest": "^1.6.0",
|
|
58
48
|
"webpack": "^5.91.0",
|
|
59
49
|
"webpack-cli": "^5.1.4"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"test": "vitest",
|
|
53
|
+
"typescript": "tsc",
|
|
54
|
+
"bundle-definition": "webpack",
|
|
55
|
+
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/journey-config.yaml",
|
|
56
|
+
"typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
|
|
57
|
+
"build": "npm run openapi && npm run typegen && npm run typescript && npm run bundle-definition",
|
|
58
|
+
"eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml"
|
|
60
59
|
}
|
|
61
|
-
}
|
|
60
|
+
}
|