@picked/delivery-api-client 0.0.1-dev.1789541668638 → 0.0.1-dev.1793753513002

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/cjs/index.js CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`Picked-Client`,t=`Picked-Version`;function n(n,r){return{[e]:n,[t]:r}}function r(){return`0.0.1-dev.1789541668638`}var i=`v1`,a=1e4;function o(e){let t=AbortSignal.timeout(a);return e?AbortSignal.any([e,t]):t}function s(e,t){return new URL(`/api/${i}/${t}`,e).toString()}function c(e,t){return{...n(e,r()),...t}}async function l(e,t,n,r,i){let a=s(e,t);return fetch(a,{headers:c(n,r),signal:o(i)})}function u(e){try{let t=new URL(e).hostname;return t===`localhost`||t===`127.0.0.1`||t===`::1`}catch{return!1}}function d(e){if(typeof e!=`object`||!e||!(`cause`in e))return!1;let{cause:t}=e;return typeof t!=`object`||!t||!(`code`in t)?!1:t.code===`ECONNREFUSED`}function f(e,t,n){e?.onWarn?.(t,n)}async function p(e){try{let t=await e.json();if(typeof t==`object`&&t&&`error`in t){let{error:e}=t;return typeof e==`string`&&e.length>0?e:null}}catch{return null}return null}async function m(e){let{apiUrl:t,path:n,options:r,failureMessage:i,parseFailureMessage:a,invalidShapeMessage:o,isValid:s}=e,c;try{c=await l(t,n,`sdk`,r?.headers,r?.signal)}catch(e){return u(t)&&d(e)||f(r,i,e),null}if(r?.onResponse?.(c.status),!c.ok){let e=await p(c),t=`status ${c.status.toString()}`;return f(r,`${i} (${e===null?t:`${t}: ${e}`})`),null}let m;try{m=await c.json()}catch{return f(r,a),null}return s(m)?m:(f(r,o),null)}function h(e){if(typeof e!=`object`||!e||!(`$defs`in e)||!(`x-picked-step-content-models`in e))return!1;let t=e.$defs;return typeof t!=`object`||!t?!1:`contentModels`in t}function g(e){return typeof e==`object`&&!!e&&`features`in e&&Array.isArray(e.features)}function _(e){return typeof e!=`object`||!e||!(`experienceId`in e)||!(`content`in e)?!1:Array.isArray(e.content)}async function v(e,t,n){return m({apiUrl:e,path:n?.previewToken?`projects/${t}?preview_token=${encodeURIComponent(n.previewToken)}`:`projects/${t}`,options:n,failureMessage:`Failed to fetch project config`,parseFailureMessage:`Failed to parse project config response`,invalidShapeMessage:`Invalid project config response shape`,isValid:g})}async function y(e,t,n,r){return m({apiUrl:e,path:r?.previewToken?`projects/${t}/experiences/${n}/content?preview_token=${encodeURIComponent(r.previewToken)}`:`projects/${t}/experiences/${n}/content`,options:r,failureMessage:`Failed to fetch experience content for ${n}`,parseFailureMessage:`Failed to parse experience content response for ${n}`,invalidShapeMessage:`Invalid experience content response shape for ${n}`,isValid:_})}async function b(e,t,n){return m({apiUrl:e,path:n?.previewToken?`projects/${t}/schema?preview_token=${encodeURIComponent(n.previewToken)}`:`projects/${t}/schema`,options:n,failureMessage:`Failed to fetch workspace schema`,parseFailureMessage:`Failed to parse schema response`,invalidShapeMessage:`Invalid schema response shape`,isValid:h})}exports.createClientHeaders=n,exports.fetchExperienceContent=y,exports.fetchProject=v,exports.fetchSchema=b,exports.getPackageVersion=r,exports.isWorkspaceSchema=h;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`Picked-Client`,t=`Picked-Version`;function n(n,r){return{[e]:n,[t]:r}}function r(){return`0.0.1-dev.1793753513002`}var i=`v1`,a=1e4;function o(e,t){let n=AbortSignal.timeout(t);return e?AbortSignal.any([e,n]):n}function s(e,t){return new URL(`/api/${i}/${t}`,e).toString()}function c(e,t){return{...n(e,r()),...t}}async function l(e,t,n,r,i,l=a){let u=s(e,t);return fetch(u,{headers:c(n,r),signal:o(i,l)})}async function u(e,t,n,r,i,l,u=a){let d=s(e,t);return fetch(d,{method:`POST`,headers:{"Content-Type":`application/json`,...c(r,i)},body:JSON.stringify(n),signal:o(l,u)})}function d(e){try{let t=new URL(e).hostname;return t===`localhost`||t===`127.0.0.1`||t===`::1`}catch{return!1}}function f(e){if(typeof e!=`object`||!e||!(`cause`in e))return!1;let{cause:t}=e;return typeof t!=`object`||!t||!(`code`in t)?!1:t.code===`ECONNREFUSED`}function p(e,t,n){e?.onWarn?.(t,n)}async function m(e){try{let t=await e.json();if(typeof t==`object`&&t&&`error`in t){let{error:e}=t;return typeof e==`string`&&e.length>0?e:null}}catch{return null}return null}async function h(e){let{apiUrl:t,path:n,options:r,failureMessage:i,parseFailureMessage:a,invalidShapeMessage:o,isValid:s}=e,c;try{c=await l(t,n,`sdk`,r?.headers,r?.signal)}catch(e){return d(t)&&f(e)||p(r,i,e),r?.onFailure?.(`network`,e),null}if(r?.onResponse?.(c.status),!c.ok){let e=await m(c),t=`status ${c.status.toString()}`;return p(r,`${i} (${e===null?t:`${t}: ${e}`})`),r?.onFailure?.(`status`),null}let u;try{u=await c.json()}catch(e){return p(r,a),r?.onFailure?.(`parse`,e),null}return s(u)?u:(p(r,o),r?.onFailure?.(`shape`),null)}function g(e){if(typeof e!=`object`||!e||!(`$defs`in e)||!(`x-picked-step-content-models`in e))return!1;let t=e.$defs;return typeof t!=`object`||!t?!1:`contentModels`in t}function _(e){return typeof e==`object`&&!!e&&`features`in e&&Array.isArray(e.features)}function v(e){return typeof e!=`object`||!e||!(`experienceId`in e)||!(`content`in e)?!1:Array.isArray(e.content)}async function y(e,t,n){return h({apiUrl:e,path:n?.previewToken?`projects/${t}?preview_token=${encodeURIComponent(n.previewToken)}`:`projects/${t}`,options:n,failureMessage:`Failed to fetch project config`,parseFailureMessage:`Failed to parse project config response`,invalidShapeMessage:`Invalid project config response shape`,isValid:_})}async function b(e,t,n,r){return h({apiUrl:e,path:r?.previewToken?`projects/${t}/experiences/${n}/content?preview_token=${encodeURIComponent(r.previewToken)}`:`projects/${t}/experiences/${n}/content`,options:r,failureMessage:`Failed to fetch experience content for ${n}`,parseFailureMessage:`Failed to parse experience content response for ${n}`,invalidShapeMessage:`Invalid experience content response shape for ${n}`,isValid:v})}async function x(e,t,n){return h({apiUrl:e,path:n?.previewToken?`projects/${t}/schema?preview_token=${encodeURIComponent(n.previewToken)}`:`projects/${t}/schema`,options:n,failureMessage:`Failed to fetch workspace schema`,parseFailureMessage:`Failed to parse schema response`,invalidShapeMessage:`Invalid schema response shape`,isValid:g})}var S=[`succeeded`,`pending`,`no_response`];async function C(e,t,n){let{key:r,...i}=t,a=`action/${encodeURIComponent(r)}/run`,o=await u(e,n?.previewToken?`${a}?preview_token=${encodeURIComponent(n.previewToken)}`:a,i,`sdk`,n?.headers,n?.signal,n?.timeoutMs);if(!o.ok)throw Error(`Action '${t.key}' failed: ${o.status} ${o.statusText}`);let s=await o.json();if(typeof s!=`object`||!s)return{actionRunId:``,workflowRunId:null,status:`no_response`};let c=`actionRunId`in s?String(s.actionRunId):``,l=`workflowRunId`in s&&typeof s.workflowRunId==`string`?s.workflowRunId:null,d=S.find(e=>`status`in s&&e===s.status)??`no_response`;return d===`succeeded`&&`response`in s?{actionRunId:c,workflowRunId:l,status:d,response:s.response}:{actionRunId:c,workflowRunId:l,status:d}}var w=35e3,T=1e3,E=3e4,D=14,O=36e5,k=class extends Error{workflowRunId;constructor(e){super(`No response from run '${e}' within the time allowed`),this.workflowRunId=e,this.name=`ActionResponseTimeoutError`}},A=class extends Error{workflowRunId;constructor(e){super(`Run '${e}' failed before it responded`),this.workflowRunId=e,this.name=`ActionRunFailedError`}};async function j(e,t,n,r){let i=new URLSearchParams({projectId:t.projectId,session:t.sessionId}),a=`action/run/${encodeURIComponent(t.workflowRunId)}/response?${i.toString()}`,o;try{o=await l(e,a,`sdk`,r?.headers,r?.signal,n)}catch(e){if(r?.signal?.aborted)throw e;return{kind:`retry`,error:e instanceof Error?e:Error(String(e))}}if(!o.ok){let e=Error(`Action response for '${t.workflowRunId}' failed: ${o.status} ${o.statusText}`);if(o.status>=500)return{kind:`retry`,error:e};throw e}let s=await o.json().catch(e=>{if(r?.signal?.aborted)throw e;return null}),c=typeof s==`object`&&!!s;switch(c&&`status`in s?s.status:void 0){case`succeeded`:return{kind:`settled`,result:{status:`succeeded`,response:c&&`response`in s?s.response:null}};case`no_response`:return{kind:`settled`,result:{status:`no_response`}};case`failed`:return{kind:`failed`};case`pending`:return{kind:`pending`};default:return{kind:`retry`,error:Error(`Action response for '${t.workflowRunId}' could not be read`)}}}function M(e,t){return new Promise(n=>{let r=()=>{t?.removeEventListener(`abort`,r),n()};setTimeout(r,e),t?.addEventListener(`abort`,r,{once:!0})})}async function N(e,t,n){let r=n?.signal,i=Date.now()+(n?.timeoutMs??36e5),a=0;for(;Date.now()<i;){r?.throwIfAborted();let o=await j(e,t,Math.max(1,Math.min(w,i-Date.now())),n);if(o.kind===`settled`)return o.result;if(o.kind===`failed`)throw new A(t.workflowRunId);if(o.kind===`pending`){a=0;continue}if(a+=1,a>D)throw o.error;r?.throwIfAborted();let s=Math.min(T*2**(a-1),E);await M(Math.max(0,Math.min(s,i-Date.now())),r),r?.throwIfAborted()}throw new k(t.workflowRunId)}exports.ActionResponseTimeoutError=k,exports.ActionRunFailedError=A,exports.DEFAULT_ACTION_RESPONSE_TIMEOUT_MS=O,exports.createClientHeaders=n,exports.fetchExperienceContent=b,exports.fetchProject=y,exports.fetchSchema=x,exports.getPackageVersion=r,exports.isWorkspaceSchema=g,exports.runAction=C,exports.waitForActionResponse=N;
package/dist/esm/index.js CHANGED
@@ -5,31 +5,46 @@ function e(e, t) {
5
5
  };
6
6
  }
7
7
  function t() {
8
- return "0.0.1-dev.1789541668638";
9
- }
10
- function n(e) {
11
- let t = AbortSignal.timeout(1e4);
12
- return e ? AbortSignal.any([e, t]) : t;
8
+ return "0.0.1-dev.1793753513002";
13
9
  }
10
+ //#endregion
11
+ //#region src/http.ts
12
+ var n = 1e4;
14
13
  function r(e, t) {
14
+ let n = AbortSignal.timeout(t);
15
+ return e ? AbortSignal.any([e, n]) : n;
16
+ }
17
+ function i(e, t) {
15
18
  return new URL(`/api/v1/${t}`, e).toString();
16
19
  }
17
- function i(n, r) {
20
+ function a(n, r) {
18
21
  return {
19
22
  ...e(n, t()),
20
23
  ...r
21
24
  };
22
25
  }
23
- async function a(e, t, a, o, s) {
24
- let c = r(e, t);
25
- return fetch(c, {
26
- headers: i(a, o),
27
- signal: n(s)
26
+ async function o(e, t, o, s, c, l = n) {
27
+ let u = i(e, t);
28
+ return fetch(u, {
29
+ headers: a(o, s),
30
+ signal: r(c, l)
31
+ });
32
+ }
33
+ async function s(e, t, o, s, c, l, u = n) {
34
+ let d = i(e, t);
35
+ return fetch(d, {
36
+ method: "POST",
37
+ headers: {
38
+ "Content-Type": "application/json",
39
+ ...a(s, c)
40
+ },
41
+ body: JSON.stringify(o),
42
+ signal: r(l, u)
28
43
  });
29
44
  }
30
45
  //#endregion
31
46
  //#region src/fetch-utils-internal.ts
32
- function o(e) {
47
+ function c(e) {
33
48
  try {
34
49
  let t = new URL(e).hostname;
35
50
  return t === "localhost" || t === "127.0.0.1" || t === "::1";
@@ -37,15 +52,15 @@ function o(e) {
37
52
  return !1;
38
53
  }
39
54
  }
40
- function s(e) {
55
+ function l(e) {
41
56
  if (typeof e != "object" || !e || !("cause" in e)) return !1;
42
57
  let { cause: t } = e;
43
58
  return typeof t != "object" || !t || !("code" in t) ? !1 : t.code === "ECONNREFUSED";
44
59
  }
45
- function c(e, t, n) {
60
+ function u(e, t, n) {
46
61
  e?.onWarn?.(t, n);
47
62
  }
48
- async function l(e) {
63
+ async function d(e) {
49
64
  try {
50
65
  let t = await e.json();
51
66
  if (typeof t == "object" && t && "error" in t) {
@@ -57,72 +72,185 @@ async function l(e) {
57
72
  }
58
73
  return null;
59
74
  }
60
- async function u(e) {
61
- let { apiUrl: t, path: n, options: r, failureMessage: i, parseFailureMessage: u, invalidShapeMessage: d, isValid: f } = e, p;
75
+ async function f(e) {
76
+ let { apiUrl: t, path: n, options: r, failureMessage: i, parseFailureMessage: a, invalidShapeMessage: s, isValid: f } = e, p;
62
77
  try {
63
- p = await a(t, n, "sdk", r?.headers, r?.signal);
78
+ p = await o(t, n, "sdk", r?.headers, r?.signal);
64
79
  } catch (e) {
65
- return o(t) && s(e) || c(r, i, e), null;
80
+ return c(t) && l(e) || u(r, i, e), r?.onFailure?.("network", e), null;
66
81
  }
67
82
  if (r?.onResponse?.(p.status), !p.ok) {
68
- let e = await l(p), t = `status ${p.status.toString()}`;
69
- return c(r, `${i} (${e === null ? t : `${t}: ${e}`})`), null;
83
+ let e = await d(p), t = `status ${p.status.toString()}`;
84
+ return u(r, `${i} (${e === null ? t : `${t}: ${e}`})`), r?.onFailure?.("status"), null;
70
85
  }
71
86
  let m;
72
87
  try {
73
88
  m = await p.json();
74
- } catch {
75
- return c(r, u), null;
89
+ } catch (e) {
90
+ return u(r, a), r?.onFailure?.("parse", e), null;
76
91
  }
77
- return f(m) ? m : (c(r, d), null);
92
+ return f(m) ? m : (u(r, s), r?.onFailure?.("shape"), null);
78
93
  }
79
94
  //#endregion
80
95
  //#region src/types.ts
81
- function d(e) {
96
+ function p(e) {
82
97
  if (typeof e != "object" || !e || !("$defs" in e) || !("x-picked-step-content-models" in e)) return !1;
83
98
  let t = e.$defs;
84
99
  return typeof t != "object" || !t ? !1 : "contentModels" in t;
85
100
  }
86
101
  //#endregion
87
102
  //#region src/fetch.ts
88
- function f(e) {
103
+ function m(e) {
89
104
  return typeof e == "object" && !!e && "features" in e && Array.isArray(e.features);
90
105
  }
91
- function p(e) {
106
+ function h(e) {
92
107
  return typeof e != "object" || !e || !("experienceId" in e) || !("content" in e) ? !1 : Array.isArray(e.content);
93
108
  }
94
- async function m(e, t, n) {
95
- return u({
109
+ async function g(e, t, n) {
110
+ return f({
96
111
  apiUrl: e,
97
112
  path: n?.previewToken ? `projects/${t}?preview_token=${encodeURIComponent(n.previewToken)}` : `projects/${t}`,
98
113
  options: n,
99
114
  failureMessage: "Failed to fetch project config",
100
115
  parseFailureMessage: "Failed to parse project config response",
101
116
  invalidShapeMessage: "Invalid project config response shape",
102
- isValid: f
117
+ isValid: m
103
118
  });
104
119
  }
105
- async function h(e, t, n, r) {
106
- return u({
120
+ async function _(e, t, n, r) {
121
+ return f({
107
122
  apiUrl: e,
108
123
  path: r?.previewToken ? `projects/${t}/experiences/${n}/content?preview_token=${encodeURIComponent(r.previewToken)}` : `projects/${t}/experiences/${n}/content`,
109
124
  options: r,
110
125
  failureMessage: `Failed to fetch experience content for ${n}`,
111
126
  parseFailureMessage: `Failed to parse experience content response for ${n}`,
112
127
  invalidShapeMessage: `Invalid experience content response shape for ${n}`,
113
- isValid: p
128
+ isValid: h
114
129
  });
115
130
  }
116
- async function g(e, t, n) {
117
- return u({
131
+ async function v(e, t, n) {
132
+ return f({
118
133
  apiUrl: e,
119
134
  path: n?.previewToken ? `projects/${t}/schema?preview_token=${encodeURIComponent(n.previewToken)}` : `projects/${t}/schema`,
120
135
  options: n,
121
136
  failureMessage: "Failed to fetch workspace schema",
122
137
  parseFailureMessage: "Failed to parse schema response",
123
138
  invalidShapeMessage: "Invalid schema response shape",
124
- isValid: d
139
+ isValid: p
140
+ });
141
+ }
142
+ //#endregion
143
+ //#region src/actions.ts
144
+ var y = [
145
+ "succeeded",
146
+ "pending",
147
+ "no_response"
148
+ ];
149
+ async function b(e, t, n) {
150
+ let { key: r, ...i } = t, a = `action/${encodeURIComponent(r)}/run`, o = await s(e, n?.previewToken ? `${a}?preview_token=${encodeURIComponent(n.previewToken)}` : a, i, "sdk", n?.headers, n?.signal, n?.timeoutMs);
151
+ if (!o.ok) throw Error(`Action '${t.key}' failed: ${o.status} ${o.statusText}`);
152
+ let c = await o.json();
153
+ if (typeof c != "object" || !c) return {
154
+ actionRunId: "",
155
+ workflowRunId: null,
156
+ status: "no_response"
157
+ };
158
+ let l = "actionRunId" in c ? String(c.actionRunId) : "", u = "workflowRunId" in c && typeof c.workflowRunId == "string" ? c.workflowRunId : null, d = y.find((e) => "status" in c && e === c.status) ?? "no_response";
159
+ return d === "succeeded" && "response" in c ? {
160
+ actionRunId: l,
161
+ workflowRunId: u,
162
+ status: d,
163
+ response: c.response
164
+ } : {
165
+ actionRunId: l,
166
+ workflowRunId: u,
167
+ status: d
168
+ };
169
+ }
170
+ //#endregion
171
+ //#region src/action-response.ts
172
+ var x = 35e3, S = 1e3, C = 3e4, w = 14, T = 36e5, E = class extends Error {
173
+ workflowRunId;
174
+ constructor(e) {
175
+ super(`No response from run '${e}' within the time allowed`), this.workflowRunId = e, this.name = "ActionResponseTimeoutError";
176
+ }
177
+ }, D = class extends Error {
178
+ workflowRunId;
179
+ constructor(e) {
180
+ super(`Run '${e}' failed before it responded`), this.workflowRunId = e, this.name = "ActionRunFailedError";
181
+ }
182
+ };
183
+ async function O(e, t, n, r) {
184
+ let i = new URLSearchParams({
185
+ projectId: t.projectId,
186
+ session: t.sessionId
187
+ }), a = `action/run/${encodeURIComponent(t.workflowRunId)}/response?${i.toString()}`, s;
188
+ try {
189
+ s = await o(e, a, "sdk", r?.headers, r?.signal, n);
190
+ } catch (e) {
191
+ if (r?.signal?.aborted) throw e;
192
+ return {
193
+ kind: "retry",
194
+ error: e instanceof Error ? e : Error(String(e))
195
+ };
196
+ }
197
+ if (!s.ok) {
198
+ let e = /* @__PURE__ */ Error(`Action response for '${t.workflowRunId}' failed: ${s.status} ${s.statusText}`);
199
+ if (s.status >= 500) return {
200
+ kind: "retry",
201
+ error: e
202
+ };
203
+ throw e;
204
+ }
205
+ let c = await s.json().catch((e) => {
206
+ if (r?.signal?.aborted) throw e;
207
+ return null;
208
+ }), l = typeof c == "object" && !!c;
209
+ switch (l && "status" in c ? c.status : void 0) {
210
+ case "succeeded": return {
211
+ kind: "settled",
212
+ result: {
213
+ status: "succeeded",
214
+ response: l && "response" in c ? c.response : null
215
+ }
216
+ };
217
+ case "no_response": return {
218
+ kind: "settled",
219
+ result: { status: "no_response" }
220
+ };
221
+ case "failed": return { kind: "failed" };
222
+ case "pending": return { kind: "pending" };
223
+ default: return {
224
+ kind: "retry",
225
+ error: /* @__PURE__ */ Error(`Action response for '${t.workflowRunId}' could not be read`)
226
+ };
227
+ }
228
+ }
229
+ function k(e, t) {
230
+ return new Promise((n) => {
231
+ let r = () => {
232
+ t?.removeEventListener("abort", r), n();
233
+ };
234
+ setTimeout(r, e), t?.addEventListener("abort", r, { once: !0 });
125
235
  });
126
236
  }
237
+ async function A(e, t, n) {
238
+ let r = n?.signal, i = Date.now() + (n?.timeoutMs ?? 36e5), a = 0;
239
+ for (; Date.now() < i;) {
240
+ r?.throwIfAborted();
241
+ let o = await O(e, t, Math.max(1, Math.min(x, i - Date.now())), n);
242
+ if (o.kind === "settled") return o.result;
243
+ if (o.kind === "failed") throw new D(t.workflowRunId);
244
+ if (o.kind === "pending") {
245
+ a = 0;
246
+ continue;
247
+ }
248
+ if (a += 1, a > w) throw o.error;
249
+ r?.throwIfAborted();
250
+ let s = Math.min(S * 2 ** (a - 1), C);
251
+ await k(Math.max(0, Math.min(s, i - Date.now())), r), r?.throwIfAborted();
252
+ }
253
+ throw new E(t.workflowRunId);
254
+ }
127
255
  //#endregion
128
- export { e as createClientHeaders, h as fetchExperienceContent, m as fetchProject, g as fetchSchema, t as getPackageVersion, d as isWorkspaceSchema };
256
+ export { E as ActionResponseTimeoutError, D as ActionRunFailedError, T as DEFAULT_ACTION_RESPONSE_TIMEOUT_MS, e as createClientHeaders, _ as fetchExperienceContent, g as fetchProject, v as fetchSchema, t as getPackageVersion, p as isWorkspaceSchema, b as runAction, A as waitForActionResponse };
@@ -0,0 +1,71 @@
1
+ /** The longest the SDK looks for one run's action response unless told otherwise: an hour. */
2
+ export declare const DEFAULT_ACTION_RESPONSE_TIMEOUT_MS = 3600000;
3
+ /** The run whose response to wait for. */
4
+ export interface WaitForActionResponseParams {
5
+ /** The run `runAction` returned with `status: 'pending'`. */
6
+ workflowRunId: string;
7
+ /** The project the action belongs to. */
8
+ projectId: string;
9
+ /** The visitor's SDK session, which started the action. */
10
+ sessionId: string;
11
+ }
12
+ /** Options for `waitForActionResponse`. */
13
+ export interface WaitForActionResponseOptions {
14
+ /** The longest to wait for the response; an hour unless set. */
15
+ timeoutMs?: number;
16
+ /** Stops the wait. */
17
+ signal?: AbortSignal;
18
+ /** Extra request headers. */
19
+ headers?: Record<string, string>;
20
+ }
21
+ /** How the wait ended: with the response, or with none coming. */
22
+ export type ActionResponse = {
23
+ status: 'succeeded';
24
+ response: unknown;
25
+ } | {
26
+ status: 'no_response';
27
+ };
28
+ /** Raised when the response has not arrived within the time allowed. */
29
+ export declare class ActionResponseTimeoutError extends Error {
30
+ readonly workflowRunId: string;
31
+ /**
32
+ * Builds the error for one run.
33
+ *
34
+ * @param {string} workflowRunId - The run waited on.
35
+ * @example throw new ActionResponseTimeoutError('wkrun_1')
36
+ */
37
+ constructor(workflowRunId: string);
38
+ }
39
+ /** Raised when the run failed before it responded. */
40
+ export declare class ActionRunFailedError extends Error {
41
+ readonly workflowRunId: string;
42
+ /**
43
+ * Builds the error for one run.
44
+ *
45
+ * @param {string} workflowRunId - The run that failed.
46
+ * @example throw new ActionRunFailedError('wkrun_1')
47
+ */
48
+ constructor(workflowRunId: string);
49
+ }
50
+ /**
51
+ * Waits for the response of an action run whose workflow carries on after the request.
52
+ *
53
+ * A pending poll is followed at once by the next. A poll that errors — a network failure, a
54
+ * timeout, a 5xx or an unreadable body — is retried after a wait that doubles from one
55
+ * second to thirty, up to 14 times in a row.
56
+ *
57
+ * @param {string} apiUrl - Base URL for the Picked API.
58
+ * @param {WaitForActionResponseParams} params - The run, its project, and the visitor's session.
59
+ * @param {WaitForActionResponseOptions} [options] - Ceiling, signal and headers.
60
+ * @returns {Promise<ActionResponse>} The response, or that none is coming.
61
+ * @throws {ActionRunFailedError} When the run failed before it responded.
62
+ * @throws {ActionResponseTimeoutError} When the ceiling passes first.
63
+ * @throws {Error} When the API refuses a poll (4xx), a poll errors more than 14 times in a row, or the signal aborts.
64
+ * @example
65
+ * const result = await runAction(apiUrl, payload)
66
+ * if (result.status === 'pending' && result.workflowRunId) {
67
+ * await waitForActionResponse(apiUrl, { workflowRunId: result.workflowRunId, projectId, sessionId })
68
+ * }
69
+ */
70
+ export declare function waitForActionResponse(apiUrl: string, params: WaitForActionResponseParams, options?: WaitForActionResponseOptions): Promise<ActionResponse>;
71
+ //# sourceMappingURL=action-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-response.d.ts","sourceRoot":"","sources":["../../src/action-response.ts"],"names":[],"mappings":"AAeA,8FAA8F;AAC9F,eAAO,MAAM,kCAAkC,UAAY,CAAA;AAE3D,0CAA0C;AAC1C,MAAM,WAAW,2BAA2B;IAC1C,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAA;IACrB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAA;IACjB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,2CAA2C;AAC3C,MAAM,WAAW,4BAA4B;IAC3C,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sBAAsB;IACtB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC;AAED,kEAAkE;AAClE,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,CAAA;AAEnG,wEAAwE;AACxE,qBAAa,0BAA2B,SAAQ,KAAK;IAOvC,QAAQ,CAAC,aAAa,EAAE,MAAM;IAN1C;;;;;OAKG;IACH,YAAqB,aAAa,EAAE,MAAM,EAGzC;CACF;AAED,sDAAsD;AACtD,qBAAa,oBAAqB,SAAQ,KAAK;IAOjC,QAAQ,CAAC,aAAa,EAAE,MAAM;IAN1C;;;;;OAKG;IACH,YAAqB,aAAa,EAAE,MAAM,EAGzC;CACF;AA0GD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,cAAc,CAAC,CA6BzB"}
@@ -0,0 +1,67 @@
1
+ /** Payload for the action run endpoint. The action's key goes in the path. */
2
+ export interface RunActionPayload {
3
+ /** The action's workspace-scoped key. */
4
+ key: string;
5
+ /** The project the caller belongs to. */
6
+ projectId: string;
7
+ /** The visitor's SDK session. */
8
+ session: {
9
+ id: string;
10
+ };
11
+ /**
12
+ * Responses for the fields the action requests, keyed by field key. The API
13
+ * discards any key the action does not request, so sending more than the
14
+ * contract names widens nothing.
15
+ */
16
+ responses: Record<string, unknown>;
17
+ /**
18
+ * The published version the caller read the action's contract from. Advisory:
19
+ * the API resolves the contract itself and reports a mismatch rather than
20
+ * refusing the call.
21
+ */
22
+ versionId?: string | null;
23
+ }
24
+ /** Options for {@link runAction}. */
25
+ export interface RunActionOptions {
26
+ headers?: Record<string, string>;
27
+ /** Preview token, which names the workspace to act on and forces the preview surface. */
28
+ previewToken?: string;
29
+ signal?: AbortSignal;
30
+ /** The longest the post may take; 10 seconds unless set. */
31
+ timeoutMs?: number;
32
+ }
33
+ /** Whether the API has the action's response: in hand, still to come, or not coming. */
34
+ export type ActionRunStatus = 'succeeded' | 'pending' | 'no_response';
35
+ /** What the API returns when it accepts a run. */
36
+ export interface RunActionResult {
37
+ actionRunId: string;
38
+ /** The run to give `waitForActionResponse`; set when `status` is `pending`. */
39
+ workflowRunId: string | null;
40
+ /** Whether the API has the action's response. */
41
+ status: ActionRunStatus;
42
+ /** The action's response, present when `status` is `succeeded`. */
43
+ response?: unknown;
44
+ }
45
+ /**
46
+ * Starts a server-side action run.
47
+ *
48
+ * Rejects when the API refuses the call, so a caller inside an experience flow
49
+ * routes to its failure edge on a refusal and its success edge otherwise.
50
+ * A `202` means the run was recorded. Its `status` says whether the response is in
51
+ * `response`, still to come from `waitForActionResponse`, or not coming.
52
+ *
53
+ * @param {string} apiUrl - Base URL for the Picked API.
54
+ * @param {RunActionPayload} payload - The run to start.
55
+ * @param {RunActionOptions} [options] - Optional headers, preview token, abort signal and timeout.
56
+ * @returns {Promise<RunActionResult>} The recorded run's id, whether the API has its response, and the response or the run to poll.
57
+ * @throws {Error} When the API responds with a non-2xx status, or a `TimeoutError` when the post outlasts its timeout.
58
+ * @example
59
+ * await runAction('https://api.picked.app', {
60
+ * key: 'submit-lead',
61
+ * projectId: 'proj_1',
62
+ * session: { id: 'sess_1' },
63
+ * responses: { email: 'a@b.c' },
64
+ * })
65
+ */
66
+ export declare function runAction(apiUrl: string, payload: RunActionPayload, options?: RunActionOptions): Promise<RunActionResult>;
67
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/actions.ts"],"names":[],"mappings":"AAGA,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAA;IACX,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAA;IACjB,iCAAiC;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IACvB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,yFAAyF;IACzF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wFAAwF;AACxF,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAAA;AAKrE,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,+EAA+E;IAC/E,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,iDAAiD;IACjD,MAAM,EAAE,eAAe,CAAA;IACvB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,eAAe,CAAC,CAmC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-utils-internal.d.ts","sourceRoot":"","sources":["../../src/fetch-utils-internal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAgFlD,UAAU,eAAe,CAAC,CAAC;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,mBAAmB,CAAA;IAC7B,cAAc,EAAE,MAAM,CAAA;IACtB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,mBAAmB,EAAE,MAAM,CAAA;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,IAAI,CAAC,CAAA;CACtC;AAED;;;;;;;;GAQG;AACH,iBAAe,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CA8CzE;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
1
+ {"version":3,"file":"fetch-utils-internal.d.ts","sourceRoot":"","sources":["../../src/fetch-utils-internal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAgFlD,UAAU,eAAe,CAAC,CAAC;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,mBAAmB,CAAA;IAC7B,cAAc,EAAE,MAAM,CAAA;IACtB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,mBAAmB,EAAE,MAAM,CAAA;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,IAAI,CAAC,CAAA;CACtC;AAED;;;;;;;;GAQG;AACH,iBAAe,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAkDzE;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -6,9 +6,25 @@
6
6
  * @param {string} clientName - Value for the `Picked-Client` header.
7
7
  * @param {Record<string, string>} [headers] - Optional header overrides.
8
8
  * @param {AbortSignal} [signal] - Optional abort signal.
9
+ * @param {number} [timeoutMs] - The longest the request may take; 10 seconds unless set.
9
10
  * @returns {Promise<Response>} The fetch response.
10
11
  * @example
11
12
  * const response = await apiGet('https://api.picked.app', 'projects/p1', 'sdk')
12
13
  */
13
- export declare function apiGet(baseUrl: string, path: string, clientName: string, headers?: Record<string, string>, signal?: AbortSignal): Promise<Response>;
14
+ export declare function apiGet(baseUrl: string, path: string, clientName: string, headers?: Record<string, string>, signal?: AbortSignal, timeoutMs?: number): Promise<Response>;
15
+ /**
16
+ * Performs a POST request against the Picked API.
17
+ *
18
+ * @param {string} baseUrl - The API origin.
19
+ * @param {string} path - The path relative to `/api/v1/`.
20
+ * @param {unknown} body - JSON-serialisable request body.
21
+ * @param {string} clientName - Value for the `Picked-Client` header.
22
+ * @param {Record<string, string>} [headers] - Optional header overrides.
23
+ * @param {AbortSignal} [signal] - Optional abort signal, combined with the timeout.
24
+ * @param {number} [timeoutMs] - The longest the request may take; 10 seconds unless set.
25
+ * @returns {Promise<Response>} The fetch response.
26
+ * @example
27
+ * const response = await apiPost('https://api.picked.app', 'action/welcome/run', body, 'sdk')
28
+ */
29
+ export declare function apiPost(baseUrl: string, path: string, body: unknown, clientName: string, headers?: Record<string, string>, signal?: AbortSignal, timeoutMs?: number): Promise<Response>;
14
30
  //# sourceMappingURL=http.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/http.ts"],"names":[],"mappings":"AAkDA;;;;;;;;;;;GAWG;AACH,wBAAsB,MAAM,CAC1B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,QAAQ,CAAC,CAInB"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/http.ts"],"names":[],"mappings":"AAiDA;;;;;;;;;;;;GAYG;AACH,wBAAsB,MAAM,CAC1B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,MAAM,CAAC,EAAE,WAAW,EACpB,SAAS,SAA6B,GACrC,OAAO,CAAC,QAAQ,CAAC,CAOnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,OAAO,CAC3B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,MAAM,CAAC,EAAE,WAAW,EACpB,SAAS,SAA6B,GACrC,OAAO,CAAC,QAAQ,CAAC,CAYnB"}
@@ -1,6 +1,10 @@
1
1
  /** @file Public exports for `\@picked/delivery-api-client`. */
2
2
  export { createClientHeaders, getPackageVersion } from './client-headers';
3
3
  export { fetchExperienceContent, fetchProject, fetchSchema } from './fetch';
4
+ export { runAction } from './actions';
5
+ export type { ActionRunStatus, RunActionPayload, RunActionOptions, RunActionResult, } from './actions';
6
+ export { ActionResponseTimeoutError, ActionRunFailedError, DEFAULT_ACTION_RESPONSE_TIMEOUT_MS, waitForActionResponse, } from './action-response';
7
+ export type { ActionResponse, WaitForActionResponseOptions, WaitForActionResponseParams, } from './action-response';
4
8
  export { isWorkspaceSchema } from './types';
5
9
  export type * from './types';
6
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,mBAAmB,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,kCAAkC,EAClC,qBAAqB,GACtB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,cAAc,EACd,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,mBAAmB,SAAS,CAAA"}
@@ -163,6 +163,25 @@ export interface ProjectConfigExperience {
163
163
  initializeOpen: LogicRule | JsonLogicValue;
164
164
  targets: ExperienceTargetWire[];
165
165
  }
166
+ /**
167
+ * Action payload as returned by the Delivery API.
168
+ *
169
+ * `fieldIds` names the fields whose responses the SDK sends when the action
170
+ * runs, the same way a step names its fields. The SDK resolves them to keys on
171
+ * registration, because a response is recorded under its field's key.
172
+ *
173
+ * It is also the grant the API filters against, so a field absent here is a
174
+ * value the action never receives, whatever a client sends.
175
+ *
176
+ * Optional: a config published before it existed carries none, and such an
177
+ * action posts no responses.
178
+ */
179
+ export interface ProjectConfigAction {
180
+ id: string;
181
+ name: string;
182
+ key: string;
183
+ fieldIds?: string[];
184
+ }
166
185
  /** Project configuration returned by the Delivery API. */
167
186
  export interface ProjectConfig {
168
187
  id: string;
@@ -175,11 +194,7 @@ export interface ProjectConfig {
175
194
  steps: ApiExperienceStep[];
176
195
  fields: FieldWire[];
177
196
  conditions: ConditionWire[];
178
- actions: Array<{
179
- id: string;
180
- name: string;
181
- key: string;
182
- }>;
197
+ actions: ProjectConfigAction[];
183
198
  /**
184
199
  * Origins permitted to push live-preview content patches into this page, issued by the API on the
185
200
  * preview surface only. The preview receiver validates every inbound message against this list;
@@ -224,6 +239,13 @@ export interface FetchProjectOptions {
224
239
  onWarn?: (message: string, error?: unknown) => void;
225
240
  /** Receives the HTTP status once the server answers, whatever the status is. */
226
241
  onResponse?: (status: number) => void;
242
+ /** Receives the stage a request failed at, with the error when the stage threw one. */
243
+ onFailure?: (stage: FetchFailureStage, error?: unknown) => void;
227
244
  }
245
+ /**
246
+ * Where a delivery API fetch failed: the request itself (`network`), a non-OK status
247
+ * (`status`), reading the body as JSON (`parse`), or the body's shape (`shape`).
248
+ */
249
+ export type FetchFailureStage = 'network' | 'status' | 'parse' | 'shape';
228
250
  export {};
229
251
  //# sourceMappingURL=project-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project-config.d.ts","sourceRoot":"","sources":["../../src/project-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;A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MAAM,EAAE,OAAO,CAAC,CAAA;CAC9B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,oGAAoG;IACpG,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,WAAW,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IACnD,gFAAgF;IAChF,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,uFAAuF;IACvF,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CAChE;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAA"}
@@ -13,6 +13,7 @@ export interface JsonSchemaObject {
13
13
  additionalProperties?: boolean;
14
14
  items?: JsonSchemaObject;
15
15
  enum?: string[];
16
+ const?: string;
16
17
  $ref?: string;
17
18
  oneOf?: JsonSchemaObject[];
18
19
  }
@@ -37,6 +38,11 @@ export interface WorkspaceSchema {
37
38
  * to `boolean | string`.
38
39
  */
39
40
  'x-picked-feature-values'?: Record<string, (boolean | string)[]>;
41
+ /**
42
+ * Keys of the actions a workflow is triggered by. Absent when there are none, and in a
43
+ * schema frozen before the field existed.
44
+ */
45
+ 'x-picked-workflow-action-keys'?: string[];
40
46
  '$defs': {
41
47
  contentModels: Record<string, JsonSchemaObject>;
42
48
  contentBlocks: Record<string, JsonSchemaObject>;
@@ -71,5 +77,5 @@ export interface FetchSchemaOptions {
71
77
  signal?: AbortSignal;
72
78
  onWarn?: (message: string, error?: unknown) => void;
73
79
  }
74
- export type { ApiExperienceStep, ContentBlob, ExperienceContentResponse, FetchProjectOptions, ProjectConfig, ProjectConfigExperience, ProjectConfigFeature, ProjectConfigFeatureVariant, ProjectConfigNode, } from './project-config';
80
+ export type { ApiExperienceStep, ContentBlob, ExperienceContentResponse, FetchFailureStage, FetchProjectOptions, ProjectConfig, ProjectConfigExperience, ProjectConfigFeature, ProjectConfigFeatureVariant, ProjectConfigNode, } from './project-config';
75
81
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IAC7C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAC3B;AAED,wEAAwE;AACxE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB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