@epilot/journey-client 0.7.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 +35 -1
- package/package.json +11 -12
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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":"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})})();
|
|
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
|
@@ -1685,6 +1685,13 @@ declare namespace Components {
|
|
|
1685
1685
|
* 12
|
|
1686
1686
|
*/
|
|
1687
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;
|
|
1688
1695
|
}
|
|
1689
1696
|
export interface JourneyRevisionSummary {
|
|
1690
1697
|
/**
|
|
@@ -1723,6 +1730,17 @@ declare namespace Components {
|
|
|
1723
1730
|
*/
|
|
1724
1731
|
mapping_config_version?: number;
|
|
1725
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
|
+
}
|
|
1726
1744
|
export interface JourneyValidationError {
|
|
1727
1745
|
/**
|
|
1728
1746
|
* Error type identifier
|
|
@@ -2246,6 +2264,11 @@ declare namespace Paths {
|
|
|
2246
2264
|
*/
|
|
2247
2265
|
export type Id = string; // uuid
|
|
2248
2266
|
export type OrgId = string;
|
|
2267
|
+
/**
|
|
2268
|
+
* example:
|
|
2269
|
+
* 42
|
|
2270
|
+
*/
|
|
2271
|
+
export type RevisionId = string;
|
|
2249
2272
|
export type Source = string;
|
|
2250
2273
|
export type Version = number;
|
|
2251
2274
|
}
|
|
@@ -2258,12 +2281,17 @@ declare namespace Paths {
|
|
|
2258
2281
|
}
|
|
2259
2282
|
export interface QueryParameters {
|
|
2260
2283
|
version?: Parameters.Version;
|
|
2284
|
+
revision_id?: /**
|
|
2285
|
+
* example:
|
|
2286
|
+
* 42
|
|
2287
|
+
*/
|
|
2288
|
+
Parameters.RevisionId;
|
|
2261
2289
|
source?: Parameters.Source;
|
|
2262
2290
|
orgId?: Parameters.OrgId;
|
|
2263
2291
|
}
|
|
2264
2292
|
namespace Responses {
|
|
2265
2293
|
/**
|
|
2266
|
-
*
|
|
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.
|
|
2267
2295
|
*
|
|
2268
2296
|
*/
|
|
2269
2297
|
export interface $200 {
|
|
@@ -2555,6 +2583,11 @@ declare namespace Paths {
|
|
|
2555
2583
|
featureFlags?: {
|
|
2556
2584
|
[name: string]: any;
|
|
2557
2585
|
};
|
|
2586
|
+
/**
|
|
2587
|
+
* example:
|
|
2588
|
+
* 42
|
|
2589
|
+
*/
|
|
2590
|
+
revision_id?: string;
|
|
2558
2591
|
}
|
|
2559
2592
|
}
|
|
2560
2593
|
}
|
|
@@ -3769,6 +3802,7 @@ export type JourneyRevisionConflict = Components.Schemas.JourneyRevisionConflict
|
|
|
3769
3802
|
export type JourneyRevisionList = Components.Schemas.JourneyRevisionList;
|
|
3770
3803
|
export type JourneyRevisionRequest = Components.Schemas.JourneyRevisionRequest;
|
|
3771
3804
|
export type JourneyRevisionSummary = Components.Schemas.JourneyRevisionSummary;
|
|
3805
|
+
export type JourneyServedRevision = Components.Schemas.JourneyServedRevision;
|
|
3772
3806
|
export type JourneyValidationError = Components.Schemas.JourneyValidationError;
|
|
3773
3807
|
export type JourneyValidationResponse = Components.Schemas.JourneyValidationResponse;
|
|
3774
3808
|
export type PatchUpdateJourneyRequest = Components.Schemas.PatchUpdateJourneyRequest;
|
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
|
+
}
|