@turbofy-ai/app-runtime 0.0.13 → 0.0.15

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/src/dsl.d.ts CHANGED
@@ -1643,6 +1643,36 @@ declare enum StepType {
1643
1643
  cloudFunction = "cloudFunction",
1644
1644
  genericAI = "genericAI"
1645
1645
  }
1646
+ declare const webhookConfigSchema: z.ZodObject<{
1647
+ verification: z.ZodDiscriminatedUnion<[
1648
+ z.ZodObject<{
1649
+ type: z.ZodLiteral<"bearer">;
1650
+ secretId: z.ZodString;
1651
+ }, z.core.$strict>,
1652
+ z.ZodObject<{
1653
+ type: z.ZodLiteral<"hmac-sha256">;
1654
+ secretId: z.ZodString;
1655
+ header: z.ZodString;
1656
+ prefix: z.ZodOptional<z.ZodString>;
1657
+ }, z.core.$strict>,
1658
+ z.ZodObject<{
1659
+ type: z.ZodLiteral<"stripe">;
1660
+ secretId: z.ZodString;
1661
+ }, z.core.$strict>
1662
+ ], "type">;
1663
+ bodyFormat: z.ZodOptional<z.ZodEnum<{
1664
+ text: "text";
1665
+ json: "json";
1666
+ }>>;
1667
+ forwardHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
1668
+ }, z.core.$strict>;
1669
+ export type IWebhookConfig = z.infer<typeof webhookConfigSchema>;
1670
+ export interface IWebhookTriggerData {
1671
+ deliveryId: string;
1672
+ receivedAt: string;
1673
+ body: unknown;
1674
+ headers: Record<string, string>;
1675
+ }
1646
1676
  export type IStepLike = {
1647
1677
  _tsStepResult: unknown;
1648
1678
  };
@@ -1652,7 +1682,8 @@ export type IJSONSerializable = string | number | boolean | undefined | null | I
1652
1682
  declare enum TriggerVariantEnum {
1653
1683
  TABLE_DATA_CHANGE = "TABLE_DATA_CHANGE",
1654
1684
  SCHEDULE = "SCHEDULE",
1655
- MANUAL = "MANUAL"
1685
+ MANUAL = "MANUAL",
1686
+ WEBHOOK = "WEBHOOK"
1656
1687
  }
1657
1688
  export interface ISharedTriggerDeclaration<TName extends string> {
1658
1689
  name: TName;
@@ -1700,7 +1731,12 @@ export interface IManualTrigger<TName extends string> extends ISharedTriggerDecl
1700
1731
  variant: TriggerVariantEnum.MANUAL;
1701
1732
  _tsTriggerData: unknown;
1702
1733
  }
1703
- export type ITriggerDeclaration<TName extends string, TOperation extends ITableDataChangeTriggerOperation, TTriggerData> = ITableDataChangeTrigger<TName, TOperation, TTriggerData> | IScheduledTrigger<TName> | IManualTrigger<TName>;
1734
+ export type ITriggerDeclaration<TName extends string, TOperation extends ITableDataChangeTriggerOperation, TTriggerData> = ITableDataChangeTrigger<TName, TOperation, TTriggerData> | IScheduledTrigger<TName> | IWebhookTrigger<TName> | IManualTrigger<TName>;
1735
+ export interface IWebhookTrigger<TName extends string> extends ISharedTriggerDeclaration<TName> {
1736
+ variant: TriggerVariantEnum.WEBHOOK;
1737
+ webhook: IWebhookConfig;
1738
+ _tsTriggerData: IWebhookTriggerData;
1739
+ }
1704
1740
  export type IParamConfig = {
1705
1741
  type: "object";
1706
1742
  subParams: Record<string, IParamConfig>;
@@ -1753,6 +1789,7 @@ export type IAppSlugConfig = {
1753
1789
  };
1754
1790
  export declare const PAGE_VISIBILITY: readonly [
1755
1791
  "public",
1792
+ "guest",
1756
1793
  "authenticated",
1757
1794
  "group",
1758
1795
  "user"
@@ -1901,8 +1938,8 @@ export interface IPageOptions {
1901
1938
  localizedConfig?: string;
1902
1939
  /**
1903
1940
  * Access level for the published page. Absent ⇒ "public".
1904
- * Anything other than "public" requires a valid end-user session; the
1905
- * user/group distinction is enforced at the data layer via PBAC.
1941
+ * "guest" redirects signed-in visitors away. Private modes require a valid
1942
+ * end-user session; user/group permissions are enforced by the data layer.
1906
1943
  */
1907
1944
  visibility?: PageVisibility;
1908
1945
  /** Building block instances on this page. */
@@ -2036,6 +2073,10 @@ export type IScheduleTriggerOptions = ISharedTriggerOptions & {
2036
2073
  timezone?: never;
2037
2074
  });
2038
2075
  export type IFlowTriggerDefinition = {
2076
+ variant: TriggerVariantEnum.WEBHOOK;
2077
+ webhook: IWebhookConfig;
2078
+ condition?: string;
2079
+ } | {
2039
2080
  variant: TriggerVariantEnum.TABLE_DATA_CHANGE;
2040
2081
  tableId: string;
2041
2082
  operation: ITableDataChangeTriggerOperation;
@@ -2053,6 +2094,7 @@ export type IFlowTriggerDefinition = {
2053
2094
  condition?: string;
2054
2095
  };
2055
2096
  declare const trigger: {
2097
+ webhook(opts: IWebhookConfig & ISharedTriggerOptions): IFlowTriggerDefinition;
2056
2098
  tableDataChange(opts: ITableDataChangeTriggerOptions): IFlowTriggerDefinition;
2057
2099
  schedule(opts?: IScheduleTriggerOptions): IFlowTriggerDefinition;
2058
2100
  manual(opts?: ISharedTriggerOptions): IFlowTriggerDefinition;
package/dist/src/dsl.js CHANGED
@@ -28,9 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  mod
29
29
  ));
30
30
 
31
- // ../../node_modules/short-unique-id/dist/short-unique-id.js
31
+ // ../../../my.graphapi.io/node_modules/short-unique-id/dist/short-unique-id.js
32
32
  var require_short_unique_id = __commonJS({
33
- "../../node_modules/short-unique-id/dist/short-unique-id.js"(exports, module) {
33
+ "../../../my.graphapi.io/node_modules/short-unique-id/dist/short-unique-id.js"(exports, module) {
34
34
  "use strict";
35
35
  var ShortUniqueId2 = (() => {
36
36
  var __defProp2 = Object.defineProperty;
@@ -637,7 +637,7 @@ function blockDynamicDataCode(blockTypeTableId) {
637
637
  ].join("\n");
638
638
  }
639
639
 
640
- // ../../node_modules/zod/v4/classic/external.js
640
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/external.js
641
641
  var external_exports = {};
642
642
  __export(external_exports, {
643
643
  $brand: () => $brand,
@@ -878,7 +878,7 @@ __export(external_exports, {
878
878
  xor: () => xor
879
879
  });
880
880
 
881
- // ../../node_modules/zod/v4/core/index.js
881
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/index.js
882
882
  var core_exports2 = {};
883
883
  __export(core_exports2, {
884
884
  $ZodAny: () => $ZodAny,
@@ -1156,7 +1156,7 @@ __export(core_exports2, {
1156
1156
  version: () => version
1157
1157
  });
1158
1158
 
1159
- // ../../node_modules/zod/v4/core/core.js
1159
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/core.js
1160
1160
  var NEVER = Object.freeze({
1161
1161
  status: "aborted"
1162
1162
  });
@@ -1231,7 +1231,7 @@ function config(newConfig) {
1231
1231
  return globalConfig;
1232
1232
  }
1233
1233
 
1234
- // ../../node_modules/zod/v4/core/util.js
1234
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/util.js
1235
1235
  var util_exports = {};
1236
1236
  __export(util_exports, {
1237
1237
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -1910,7 +1910,7 @@ var Class = class {
1910
1910
  }
1911
1911
  };
1912
1912
 
1913
- // ../../node_modules/zod/v4/core/errors.js
1913
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/errors.js
1914
1914
  var initializer = (inst, def) => {
1915
1915
  inst.name = "$ZodError";
1916
1916
  Object.defineProperty(inst, "_zod", {
@@ -2046,7 +2046,7 @@ function prettifyError(error48) {
2046
2046
  return lines.join("\n");
2047
2047
  }
2048
2048
 
2049
- // ../../node_modules/zod/v4/core/parse.js
2049
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/parse.js
2050
2050
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
2051
2051
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
2052
2052
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -2134,7 +2134,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
2134
2134
  };
2135
2135
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
2136
2136
 
2137
- // ../../node_modules/zod/v4/core/regexes.js
2137
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/regexes.js
2138
2138
  var regexes_exports = {};
2139
2139
  __export(regexes_exports, {
2140
2140
  base64: () => base64,
@@ -2291,7 +2291,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
2291
2291
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
2292
2292
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
2293
2293
 
2294
- // ../../node_modules/zod/v4/core/checks.js
2294
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/checks.js
2295
2295
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
2296
2296
  var _a2;
2297
2297
  inst._zod ?? (inst._zod = {});
@@ -2839,7 +2839,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
2839
2839
  };
2840
2840
  });
2841
2841
 
2842
- // ../../node_modules/zod/v4/core/doc.js
2842
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/doc.js
2843
2843
  var Doc = class {
2844
2844
  constructor(args = []) {
2845
2845
  this.content = [];
@@ -2875,14 +2875,14 @@ var Doc = class {
2875
2875
  }
2876
2876
  };
2877
2877
 
2878
- // ../../node_modules/zod/v4/core/versions.js
2878
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/versions.js
2879
2879
  var version = {
2880
2880
  major: 4,
2881
2881
  minor: 3,
2882
2882
  patch: 6
2883
2883
  };
2884
2884
 
2885
- // ../../node_modules/zod/v4/core/schemas.js
2885
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/schemas.js
2886
2886
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2887
2887
  var _a2;
2888
2888
  inst ?? (inst = {});
@@ -4853,7 +4853,7 @@ function handleRefineResult(result, payload, input, inst) {
4853
4853
  }
4854
4854
  }
4855
4855
 
4856
- // ../../node_modules/zod/v4/locales/index.js
4856
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/index.js
4857
4857
  var locales_exports = {};
4858
4858
  __export(locales_exports, {
4859
4859
  ar: () => ar_default,
@@ -4907,7 +4907,7 @@ __export(locales_exports, {
4907
4907
  zhTW: () => zh_TW_default
4908
4908
  });
4909
4909
 
4910
- // ../../node_modules/zod/v4/locales/ar.js
4910
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ar.js
4911
4911
  var error = () => {
4912
4912
  const Sizable = {
4913
4913
  string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
@@ -5014,7 +5014,7 @@ function ar_default() {
5014
5014
  };
5015
5015
  }
5016
5016
 
5017
- // ../../node_modules/zod/v4/locales/az.js
5017
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/az.js
5018
5018
  var error2 = () => {
5019
5019
  const Sizable = {
5020
5020
  string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
@@ -5120,7 +5120,7 @@ function az_default() {
5120
5120
  };
5121
5121
  }
5122
5122
 
5123
- // ../../node_modules/zod/v4/locales/be.js
5123
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/be.js
5124
5124
  function getBelarusianPlural(count, one, few, many) {
5125
5125
  const absCount = Math.abs(count);
5126
5126
  const lastDigit = absCount % 10;
@@ -5277,7 +5277,7 @@ function be_default() {
5277
5277
  };
5278
5278
  }
5279
5279
 
5280
- // ../../node_modules/zod/v4/locales/bg.js
5280
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/bg.js
5281
5281
  var error4 = () => {
5282
5282
  const Sizable = {
5283
5283
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
@@ -5398,7 +5398,7 @@ function bg_default() {
5398
5398
  };
5399
5399
  }
5400
5400
 
5401
- // ../../node_modules/zod/v4/locales/ca.js
5401
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ca.js
5402
5402
  var error5 = () => {
5403
5403
  const Sizable = {
5404
5404
  string: { unit: "car\xE0cters", verb: "contenir" },
@@ -5507,7 +5507,7 @@ function ca_default() {
5507
5507
  };
5508
5508
  }
5509
5509
 
5510
- // ../../node_modules/zod/v4/locales/cs.js
5510
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/cs.js
5511
5511
  var error6 = () => {
5512
5512
  const Sizable = {
5513
5513
  string: { unit: "znak\u016F", verb: "m\xEDt" },
@@ -5619,7 +5619,7 @@ function cs_default() {
5619
5619
  };
5620
5620
  }
5621
5621
 
5622
- // ../../node_modules/zod/v4/locales/da.js
5622
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/da.js
5623
5623
  var error7 = () => {
5624
5624
  const Sizable = {
5625
5625
  string: { unit: "tegn", verb: "havde" },
@@ -5735,7 +5735,7 @@ function da_default() {
5735
5735
  };
5736
5736
  }
5737
5737
 
5738
- // ../../node_modules/zod/v4/locales/de.js
5738
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/de.js
5739
5739
  var error8 = () => {
5740
5740
  const Sizable = {
5741
5741
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -5844,7 +5844,7 @@ function de_default() {
5844
5844
  };
5845
5845
  }
5846
5846
 
5847
- // ../../node_modules/zod/v4/locales/en.js
5847
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/en.js
5848
5848
  var error9 = () => {
5849
5849
  const Sizable = {
5850
5850
  string: { unit: "characters", verb: "to have" },
@@ -5953,7 +5953,7 @@ function en_default() {
5953
5953
  };
5954
5954
  }
5955
5955
 
5956
- // ../../node_modules/zod/v4/locales/eo.js
5956
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/eo.js
5957
5957
  var error10 = () => {
5958
5958
  const Sizable = {
5959
5959
  string: { unit: "karaktrojn", verb: "havi" },
@@ -6063,7 +6063,7 @@ function eo_default() {
6063
6063
  };
6064
6064
  }
6065
6065
 
6066
- // ../../node_modules/zod/v4/locales/es.js
6066
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/es.js
6067
6067
  var error11 = () => {
6068
6068
  const Sizable = {
6069
6069
  string: { unit: "caracteres", verb: "tener" },
@@ -6196,7 +6196,7 @@ function es_default() {
6196
6196
  };
6197
6197
  }
6198
6198
 
6199
- // ../../node_modules/zod/v4/locales/fa.js
6199
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/fa.js
6200
6200
  var error12 = () => {
6201
6201
  const Sizable = {
6202
6202
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -6311,7 +6311,7 @@ function fa_default() {
6311
6311
  };
6312
6312
  }
6313
6313
 
6314
- // ../../node_modules/zod/v4/locales/fi.js
6314
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/fi.js
6315
6315
  var error13 = () => {
6316
6316
  const Sizable = {
6317
6317
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
@@ -6424,7 +6424,7 @@ function fi_default() {
6424
6424
  };
6425
6425
  }
6426
6426
 
6427
- // ../../node_modules/zod/v4/locales/fr.js
6427
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/fr.js
6428
6428
  var error14 = () => {
6429
6429
  const Sizable = {
6430
6430
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -6533,7 +6533,7 @@ function fr_default() {
6533
6533
  };
6534
6534
  }
6535
6535
 
6536
- // ../../node_modules/zod/v4/locales/fr-CA.js
6536
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/fr-CA.js
6537
6537
  var error15 = () => {
6538
6538
  const Sizable = {
6539
6539
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -6641,7 +6641,7 @@ function fr_CA_default() {
6641
6641
  };
6642
6642
  }
6643
6643
 
6644
- // ../../node_modules/zod/v4/locales/he.js
6644
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/he.js
6645
6645
  var error16 = () => {
6646
6646
  const TypeNames = {
6647
6647
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
@@ -6836,7 +6836,7 @@ function he_default() {
6836
6836
  };
6837
6837
  }
6838
6838
 
6839
- // ../../node_modules/zod/v4/locales/hu.js
6839
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/hu.js
6840
6840
  var error17 = () => {
6841
6841
  const Sizable = {
6842
6842
  string: { unit: "karakter", verb: "legyen" },
@@ -6945,7 +6945,7 @@ function hu_default() {
6945
6945
  };
6946
6946
  }
6947
6947
 
6948
- // ../../node_modules/zod/v4/locales/hy.js
6948
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/hy.js
6949
6949
  function getArmenianPlural(count, one, many) {
6950
6950
  return Math.abs(count) === 1 ? one : many;
6951
6951
  }
@@ -7093,7 +7093,7 @@ function hy_default() {
7093
7093
  };
7094
7094
  }
7095
7095
 
7096
- // ../../node_modules/zod/v4/locales/id.js
7096
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/id.js
7097
7097
  var error19 = () => {
7098
7098
  const Sizable = {
7099
7099
  string: { unit: "karakter", verb: "memiliki" },
@@ -7200,7 +7200,7 @@ function id_default() {
7200
7200
  };
7201
7201
  }
7202
7202
 
7203
- // ../../node_modules/zod/v4/locales/is.js
7203
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/is.js
7204
7204
  var error20 = () => {
7205
7205
  const Sizable = {
7206
7206
  string: { unit: "stafi", verb: "a\xF0 hafa" },
@@ -7310,7 +7310,7 @@ function is_default() {
7310
7310
  };
7311
7311
  }
7312
7312
 
7313
- // ../../node_modules/zod/v4/locales/it.js
7313
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/it.js
7314
7314
  var error21 = () => {
7315
7315
  const Sizable = {
7316
7316
  string: { unit: "caratteri", verb: "avere" },
@@ -7419,7 +7419,7 @@ function it_default() {
7419
7419
  };
7420
7420
  }
7421
7421
 
7422
- // ../../node_modules/zod/v4/locales/ja.js
7422
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ja.js
7423
7423
  var error22 = () => {
7424
7424
  const Sizable = {
7425
7425
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
@@ -7527,7 +7527,7 @@ function ja_default() {
7527
7527
  };
7528
7528
  }
7529
7529
 
7530
- // ../../node_modules/zod/v4/locales/ka.js
7530
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ka.js
7531
7531
  var error23 = () => {
7532
7532
  const Sizable = {
7533
7533
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -7640,7 +7640,7 @@ function ka_default() {
7640
7640
  };
7641
7641
  }
7642
7642
 
7643
- // ../../node_modules/zod/v4/locales/km.js
7643
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/km.js
7644
7644
  var error24 = () => {
7645
7645
  const Sizable = {
7646
7646
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -7751,12 +7751,12 @@ function km_default() {
7751
7751
  };
7752
7752
  }
7753
7753
 
7754
- // ../../node_modules/zod/v4/locales/kh.js
7754
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/kh.js
7755
7755
  function kh_default() {
7756
7756
  return km_default();
7757
7757
  }
7758
7758
 
7759
- // ../../node_modules/zod/v4/locales/ko.js
7759
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ko.js
7760
7760
  var error25 = () => {
7761
7761
  const Sizable = {
7762
7762
  string: { unit: "\uBB38\uC790", verb: "to have" },
@@ -7868,7 +7868,7 @@ function ko_default() {
7868
7868
  };
7869
7869
  }
7870
7870
 
7871
- // ../../node_modules/zod/v4/locales/lt.js
7871
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/lt.js
7872
7872
  var capitalizeFirstCharacter = (text) => {
7873
7873
  return text.charAt(0).toUpperCase() + text.slice(1);
7874
7874
  };
@@ -8072,7 +8072,7 @@ function lt_default() {
8072
8072
  };
8073
8073
  }
8074
8074
 
8075
- // ../../node_modules/zod/v4/locales/mk.js
8075
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/mk.js
8076
8076
  var error27 = () => {
8077
8077
  const Sizable = {
8078
8078
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -8182,7 +8182,7 @@ function mk_default() {
8182
8182
  };
8183
8183
  }
8184
8184
 
8185
- // ../../node_modules/zod/v4/locales/ms.js
8185
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ms.js
8186
8186
  var error28 = () => {
8187
8187
  const Sizable = {
8188
8188
  string: { unit: "aksara", verb: "mempunyai" },
@@ -8290,7 +8290,7 @@ function ms_default() {
8290
8290
  };
8291
8291
  }
8292
8292
 
8293
- // ../../node_modules/zod/v4/locales/nl.js
8293
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/nl.js
8294
8294
  var error29 = () => {
8295
8295
  const Sizable = {
8296
8296
  string: { unit: "tekens", verb: "heeft" },
@@ -8401,7 +8401,7 @@ function nl_default() {
8401
8401
  };
8402
8402
  }
8403
8403
 
8404
- // ../../node_modules/zod/v4/locales/no.js
8404
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/no.js
8405
8405
  var error30 = () => {
8406
8406
  const Sizable = {
8407
8407
  string: { unit: "tegn", verb: "\xE5 ha" },
@@ -8510,7 +8510,7 @@ function no_default() {
8510
8510
  };
8511
8511
  }
8512
8512
 
8513
- // ../../node_modules/zod/v4/locales/ota.js
8513
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ota.js
8514
8514
  var error31 = () => {
8515
8515
  const Sizable = {
8516
8516
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
@@ -8620,7 +8620,7 @@ function ota_default() {
8620
8620
  };
8621
8621
  }
8622
8622
 
8623
- // ../../node_modules/zod/v4/locales/ps.js
8623
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ps.js
8624
8624
  var error32 = () => {
8625
8625
  const Sizable = {
8626
8626
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
@@ -8735,7 +8735,7 @@ function ps_default() {
8735
8735
  };
8736
8736
  }
8737
8737
 
8738
- // ../../node_modules/zod/v4/locales/pl.js
8738
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/pl.js
8739
8739
  var error33 = () => {
8740
8740
  const Sizable = {
8741
8741
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
@@ -8845,7 +8845,7 @@ function pl_default() {
8845
8845
  };
8846
8846
  }
8847
8847
 
8848
- // ../../node_modules/zod/v4/locales/pt.js
8848
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/pt.js
8849
8849
  var error34 = () => {
8850
8850
  const Sizable = {
8851
8851
  string: { unit: "caracteres", verb: "ter" },
@@ -8954,7 +8954,7 @@ function pt_default() {
8954
8954
  };
8955
8955
  }
8956
8956
 
8957
- // ../../node_modules/zod/v4/locales/ru.js
8957
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ru.js
8958
8958
  function getRussianPlural(count, one, few, many) {
8959
8959
  const absCount = Math.abs(count);
8960
8960
  const lastDigit = absCount % 10;
@@ -9111,7 +9111,7 @@ function ru_default() {
9111
9111
  };
9112
9112
  }
9113
9113
 
9114
- // ../../node_modules/zod/v4/locales/sl.js
9114
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/sl.js
9115
9115
  var error36 = () => {
9116
9116
  const Sizable = {
9117
9117
  string: { unit: "znakov", verb: "imeti" },
@@ -9221,7 +9221,7 @@ function sl_default() {
9221
9221
  };
9222
9222
  }
9223
9223
 
9224
- // ../../node_modules/zod/v4/locales/sv.js
9224
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/sv.js
9225
9225
  var error37 = () => {
9226
9226
  const Sizable = {
9227
9227
  string: { unit: "tecken", verb: "att ha" },
@@ -9332,7 +9332,7 @@ function sv_default() {
9332
9332
  };
9333
9333
  }
9334
9334
 
9335
- // ../../node_modules/zod/v4/locales/ta.js
9335
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ta.js
9336
9336
  var error38 = () => {
9337
9337
  const Sizable = {
9338
9338
  string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
@@ -9443,7 +9443,7 @@ function ta_default() {
9443
9443
  };
9444
9444
  }
9445
9445
 
9446
- // ../../node_modules/zod/v4/locales/th.js
9446
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/th.js
9447
9447
  var error39 = () => {
9448
9448
  const Sizable = {
9449
9449
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -9554,7 +9554,7 @@ function th_default() {
9554
9554
  };
9555
9555
  }
9556
9556
 
9557
- // ../../node_modules/zod/v4/locales/tr.js
9557
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/tr.js
9558
9558
  var error40 = () => {
9559
9559
  const Sizable = {
9560
9560
  string: { unit: "karakter", verb: "olmal\u0131" },
@@ -9660,7 +9660,7 @@ function tr_default() {
9660
9660
  };
9661
9661
  }
9662
9662
 
9663
- // ../../node_modules/zod/v4/locales/uk.js
9663
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/uk.js
9664
9664
  var error41 = () => {
9665
9665
  const Sizable = {
9666
9666
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -9769,12 +9769,12 @@ function uk_default() {
9769
9769
  };
9770
9770
  }
9771
9771
 
9772
- // ../../node_modules/zod/v4/locales/ua.js
9772
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ua.js
9773
9773
  function ua_default() {
9774
9774
  return uk_default();
9775
9775
  }
9776
9776
 
9777
- // ../../node_modules/zod/v4/locales/ur.js
9777
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/ur.js
9778
9778
  var error42 = () => {
9779
9779
  const Sizable = {
9780
9780
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
@@ -9885,7 +9885,7 @@ function ur_default() {
9885
9885
  };
9886
9886
  }
9887
9887
 
9888
- // ../../node_modules/zod/v4/locales/uz.js
9888
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/uz.js
9889
9889
  var error43 = () => {
9890
9890
  const Sizable = {
9891
9891
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
@@ -9995,7 +9995,7 @@ function uz_default() {
9995
9995
  };
9996
9996
  }
9997
9997
 
9998
- // ../../node_modules/zod/v4/locales/vi.js
9998
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/vi.js
9999
9999
  var error44 = () => {
10000
10000
  const Sizable = {
10001
10001
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
@@ -10104,7 +10104,7 @@ function vi_default() {
10104
10104
  };
10105
10105
  }
10106
10106
 
10107
- // ../../node_modules/zod/v4/locales/zh-CN.js
10107
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/zh-CN.js
10108
10108
  var error45 = () => {
10109
10109
  const Sizable = {
10110
10110
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
@@ -10214,7 +10214,7 @@ function zh_CN_default() {
10214
10214
  };
10215
10215
  }
10216
10216
 
10217
- // ../../node_modules/zod/v4/locales/zh-TW.js
10217
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/zh-TW.js
10218
10218
  var error46 = () => {
10219
10219
  const Sizable = {
10220
10220
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
@@ -10322,7 +10322,7 @@ function zh_TW_default() {
10322
10322
  };
10323
10323
  }
10324
10324
 
10325
- // ../../node_modules/zod/v4/locales/yo.js
10325
+ // ../../../my.graphapi.io/node_modules/zod/v4/locales/yo.js
10326
10326
  var error47 = () => {
10327
10327
  const Sizable = {
10328
10328
  string: { unit: "\xE0mi", verb: "n\xED" },
@@ -10430,7 +10430,7 @@ function yo_default() {
10430
10430
  };
10431
10431
  }
10432
10432
 
10433
- // ../../node_modules/zod/v4/core/registries.js
10433
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/registries.js
10434
10434
  var _a;
10435
10435
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
10436
10436
  var $input = /* @__PURE__ */ Symbol("ZodInput");
@@ -10480,7 +10480,7 @@ function registry() {
10480
10480
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
10481
10481
  var globalRegistry = globalThis.__zod_globalRegistry;
10482
10482
 
10483
- // ../../node_modules/zod/v4/core/api.js
10483
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/api.js
10484
10484
  // @__NO_SIDE_EFFECTS__
10485
10485
  function _string(Class2, params) {
10486
10486
  return new Class2({
@@ -11519,7 +11519,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
11519
11519
  return inst;
11520
11520
  }
11521
11521
 
11522
- // ../../node_modules/zod/v4/core/to-json-schema.js
11522
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/to-json-schema.js
11523
11523
  function initializeContext(params) {
11524
11524
  let target = params?.target ?? "draft-2020-12";
11525
11525
  if (target === "draft-4")
@@ -11871,7 +11871,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
11871
11871
  return finalize(ctx, schema);
11872
11872
  };
11873
11873
 
11874
- // ../../node_modules/zod/v4/core/json-schema-processors.js
11874
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/json-schema-processors.js
11875
11875
  var formatMap = {
11876
11876
  guid: "uuid",
11877
11877
  url: "uri",
@@ -12422,7 +12422,7 @@ function toJSONSchema(input, params) {
12422
12422
  return finalize(ctx, input);
12423
12423
  }
12424
12424
 
12425
- // ../../node_modules/zod/v4/core/json-schema-generator.js
12425
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/json-schema-generator.js
12426
12426
  var JSONSchemaGenerator = class {
12427
12427
  /** @deprecated Access via ctx instead */
12428
12428
  get metadataRegistry() {
@@ -12497,10 +12497,10 @@ var JSONSchemaGenerator = class {
12497
12497
  }
12498
12498
  };
12499
12499
 
12500
- // ../../node_modules/zod/v4/core/json-schema.js
12500
+ // ../../../my.graphapi.io/node_modules/zod/v4/core/json-schema.js
12501
12501
  var json_schema_exports = {};
12502
12502
 
12503
- // ../../node_modules/zod/v4/classic/schemas.js
12503
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/schemas.js
12504
12504
  var schemas_exports2 = {};
12505
12505
  __export(schemas_exports2, {
12506
12506
  ZodAny: () => ZodAny,
@@ -12669,7 +12669,7 @@ __export(schemas_exports2, {
12669
12669
  xor: () => xor
12670
12670
  });
12671
12671
 
12672
- // ../../node_modules/zod/v4/classic/checks.js
12672
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/checks.js
12673
12673
  var checks_exports2 = {};
12674
12674
  __export(checks_exports2, {
12675
12675
  endsWith: () => _endsWith,
@@ -12703,7 +12703,7 @@ __export(checks_exports2, {
12703
12703
  uppercase: () => _uppercase
12704
12704
  });
12705
12705
 
12706
- // ../../node_modules/zod/v4/classic/iso.js
12706
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/iso.js
12707
12707
  var iso_exports = {};
12708
12708
  __export(iso_exports, {
12709
12709
  ZodISODate: () => ZodISODate,
@@ -12744,7 +12744,7 @@ function duration2(params) {
12744
12744
  return _isoDuration(ZodISODuration, params);
12745
12745
  }
12746
12746
 
12747
- // ../../node_modules/zod/v4/classic/errors.js
12747
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/errors.js
12748
12748
  var initializer2 = (inst, issues) => {
12749
12749
  $ZodError.init(inst, issues);
12750
12750
  inst.name = "ZodError";
@@ -12784,7 +12784,7 @@ var ZodRealError = $constructor("ZodError", initializer2, {
12784
12784
  Parent: Error
12785
12785
  });
12786
12786
 
12787
- // ../../node_modules/zod/v4/classic/parse.js
12787
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/parse.js
12788
12788
  var parse2 = /* @__PURE__ */ _parse(ZodRealError);
12789
12789
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
12790
12790
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -12798,7 +12798,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
12798
12798
  var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
12799
12799
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
12800
12800
 
12801
- // ../../node_modules/zod/v4/classic/schemas.js
12801
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/schemas.js
12802
12802
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12803
12803
  $ZodType.init(inst, def);
12804
12804
  Object.assign(inst["~standard"], {
@@ -13877,7 +13877,7 @@ function preprocess(fn, schema) {
13877
13877
  return pipe(transform(fn), schema);
13878
13878
  }
13879
13879
 
13880
- // ../../node_modules/zod/v4/classic/compat.js
13880
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/compat.js
13881
13881
  var ZodIssueCode = {
13882
13882
  invalid_type: "invalid_type",
13883
13883
  too_big: "too_big",
@@ -13903,7 +13903,7 @@ var ZodFirstPartyTypeKind;
13903
13903
  /* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
13904
13904
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
13905
13905
 
13906
- // ../../node_modules/zod/v4/classic/from-json-schema.js
13906
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/from-json-schema.js
13907
13907
  var z = {
13908
13908
  ...schemas_exports2,
13909
13909
  ...checks_exports2,
@@ -14377,7 +14377,7 @@ function fromJSONSchema(schema, params) {
14377
14377
  return convertSchema(schema, ctx);
14378
14378
  }
14379
14379
 
14380
- // ../../node_modules/zod/v4/classic/coerce.js
14380
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/coerce.js
14381
14381
  var coerce_exports = {};
14382
14382
  __export(coerce_exports, {
14383
14383
  bigint: () => bigint3,
@@ -14402,10 +14402,10 @@ function date4(params) {
14402
14402
  return _coercedDate(ZodDate, params);
14403
14403
  }
14404
14404
 
14405
- // ../../node_modules/zod/v4/classic/external.js
14405
+ // ../../../my.graphapi.io/node_modules/zod/v4/classic/external.js
14406
14406
  config(en_default());
14407
14407
 
14408
- // ../../node_modules/zod/index.js
14408
+ // ../../../my.graphapi.io/node_modules/zod/index.js
14409
14409
  var zod_default = external_exports;
14410
14410
 
14411
14411
  // ../declarations/src/api/field-type.schema.ts
@@ -16013,6 +16013,49 @@ function hasScheduleExpression(config2) {
16013
16013
  return config2.cron !== void 0 || config2.rate !== void 0;
16014
16014
  }
16015
16015
 
16016
+ // ../declarations/src/flows/webhook.ts
16017
+ var secretId = external_exports.string().regex(/^[A-Za-z0-9_-]{1,128}$/);
16018
+ var headerName = external_exports.string().regex(/^[a-z0-9-]{1,64}$/);
16019
+ var webhookConfigSchema = external_exports.object({
16020
+ verification: external_exports.discriminatedUnion("type", [
16021
+ external_exports.object({ type: external_exports.literal("bearer"), secretId }).strict(),
16022
+ external_exports.object({
16023
+ type: external_exports.literal("hmac-sha256"),
16024
+ secretId,
16025
+ header: headerName,
16026
+ prefix: external_exports.string().max(32).optional()
16027
+ }).strict(),
16028
+ external_exports.object({ type: external_exports.literal("stripe"), secretId }).strict()
16029
+ ]),
16030
+ bodyFormat: external_exports.enum(["json", "text"]).optional(),
16031
+ forwardHeaders: external_exports.array(headerName).max(20).optional()
16032
+ }).strict().superRefine((config2, ctx) => {
16033
+ const excluded = /* @__PURE__ */ new Set([
16034
+ "authorization",
16035
+ "cookie",
16036
+ "set-cookie",
16037
+ "stripe-signature",
16038
+ "x-api-key"
16039
+ ]);
16040
+ if (config2.verification.type === "hmac-sha256")
16041
+ excluded.add(config2.verification.header);
16042
+ if (config2.forwardHeaders?.some((header) => excluded.has(header))) {
16043
+ ctx.addIssue({
16044
+ code: "custom",
16045
+ message: "Authentication headers cannot be forwarded"
16046
+ });
16047
+ }
16048
+ if (config2.verification.type === "stripe" && config2.bodyFormat === "text") {
16049
+ ctx.addIssue({
16050
+ code: "custom",
16051
+ message: "Stripe requires JSON"
16052
+ });
16053
+ }
16054
+ });
16055
+
16056
+ // .tmp/declarations.ts
16057
+ var PAGE_VISIBILITY = ["public", "guest", "authenticated", "group", "user"];
16058
+
16016
16059
  // ../dsl-builders/src/apps/app-builder.ts
16017
16060
  var app_builder_exports = {};
16018
16061
  __export(app_builder_exports, {
@@ -16025,7 +16068,7 @@ __export(app_builder_exports, {
16025
16068
  page: () => page
16026
16069
  });
16027
16070
 
16028
- // ../../node_modules/acorn/dist/acorn.mjs
16071
+ // ../../../my.graphapi.io/node_modules/acorn/dist/acorn.mjs
16029
16072
  var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
16030
16073
  var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
16031
16074
  var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
@@ -22243,15 +22286,15 @@ function js(code) {
22243
22286
  }
22244
22287
  return { __flowParam: "js", code };
22245
22288
  }
22246
- function secret(secretId) {
22247
- if (typeof secretId !== "string" || !SECRET_ID_PATTERN.test(secretId)) {
22289
+ function secret(secretId2) {
22290
+ if (typeof secretId2 !== "string" || !SECRET_ID_PATTERN.test(secretId2)) {
22248
22291
  throw new Error(
22249
22292
  `secret() expects a secret record ID (a UUID \u2014 discover secrets via data_list with ofType "secret"), got ${JSON.stringify(
22250
- secretId
22293
+ secretId2
22251
22294
  )}. Never pass secret values directly.`
22252
22295
  );
22253
22296
  }
22254
- return { __flowParam: "secret", secretId };
22297
+ return { __flowParam: "secret", secretId: secretId2 };
22255
22298
  }
22256
22299
  function isJsParam(value) {
22257
22300
  return typeof value === "object" && value !== null && value.__flowParam === "js";
@@ -22416,6 +22459,11 @@ function walkSecretLeaves(params, paramsConfig, visit, prefix = "") {
22416
22459
  }
22417
22460
  function collectSecretIds(declaration) {
22418
22461
  const ids = /* @__PURE__ */ new Set();
22462
+ for (const trigger2 of Object.values(declaration.triggers ?? {})) {
22463
+ if (trigger2.variant === "WEBHOOK" /* WEBHOOK */ && typeof trigger2.webhook?.verification?.secretId === "string") {
22464
+ ids.add(trigger2.webhook.verification.secretId);
22465
+ }
22466
+ }
22419
22467
  for (const step2 of Object.values(declaration.steps ?? {})) {
22420
22468
  walkSecretLeaves(
22421
22469
  step2.params,
@@ -22558,6 +22606,22 @@ function validateFlow(declaration, ctx) {
22558
22606
  for (const [triggerName, trigger2] of Object.entries(
22559
22607
  declaration.triggers ?? {}
22560
22608
  )) {
22609
+ if (trigger2.variant === "WEBHOOK" /* WEBHOOK */) {
22610
+ if (!/^[A-Za-z0-9_-]{1,128}$/.test(triggerName)) {
22611
+ errors.push(
22612
+ issue2(
22613
+ `triggers.${triggerName}`,
22614
+ "Webhook trigger keys must contain 1\u2013128 letters, digits, underscores or hyphens"
22615
+ )
22616
+ );
22617
+ }
22618
+ const parsed = webhookConfigSchema.safeParse(trigger2.webhook);
22619
+ if (!parsed.success) {
22620
+ for (const error48 of parsed.error.issues) {
22621
+ errors.push(issue2(`triggers.${triggerName}.webhook`, error48.message));
22622
+ }
22623
+ }
22624
+ }
22561
22625
  if (trigger2.variant !== "SCHEDULE" /* SCHEDULE */) continue;
22562
22626
  const scheduleErrors = validateScheduleConfig(trigger2);
22563
22627
  for (const message of scheduleErrors) {
@@ -22717,6 +22781,14 @@ function validateFlows(flows, opts) {
22717
22781
 
22718
22782
  // ../dsl-builders/src/flows/flow-builder.ts
22719
22783
  var trigger = {
22784
+ webhook(opts) {
22785
+ const { condition, ...webhook } = opts;
22786
+ return {
22787
+ variant: "WEBHOOK" /* WEBHOOK */,
22788
+ webhook,
22789
+ ...condition !== void 0 ? { condition } : {}
22790
+ };
22791
+ },
22720
22792
  tableDataChange(opts) {
22721
22793
  return {
22722
22794
  variant: "TABLE_DATA_CHANGE" /* TABLE_DATA_CHANGE */,
@@ -22882,6 +22954,7 @@ ${errors.map((message) => `- ${message}`).join("\n")}`
22882
22954
  };
22883
22955
  }
22884
22956
  export {
22957
+ PAGE_VISIBILITY,
22885
22958
  PublishingTypeEnum,
22886
22959
  app_builder_exports as appBuilder,
22887
22960
  collectSecretIds,
@@ -1,3 +1,4 @@
1
+ import type { ISocialSignInOptions, ISocialSignInResult } from "@/lib/social-popup";
1
2
  export interface IAuthResult {
2
3
  ok: boolean;
3
4
  error?: string;
@@ -47,6 +48,9 @@ export declare const socialSignIn: (params: {
47
48
  state: string;
48
49
  codeVerifier: string;
49
50
  }) => Promise<IAuthResult>;
51
+ export type { ISocialSignInOptions, ISocialSignInResult, } from "@/lib/social-popup";
52
+ /** Preview uses the console callback; published apps supply their own callback. */
53
+ export declare const signInWithSocialProvider: (provider: string, options?: ISocialSignInOptions) => Promise<ISocialSignInResult>;
50
54
  export declare const logout: () => Promise<IAuthResult>;
51
55
  /** The signed-in end user, or null without a valid session. */
52
56
  export declare const currentUser: () => Promise<ICurrentUserResult>;
@@ -0,0 +1,8 @@
1
+ export declare const pageRoutePattern: (locale: string, slug: string) => string;
2
+ export declare const resolveGuestRedirect: ({ next, defaultPath, homePath, currentPath, guestPatterns, }: {
3
+ next?: string;
4
+ defaultPath?: string;
5
+ homePath: string;
6
+ currentPath: string;
7
+ guestPatterns: string[];
8
+ }) => string | undefined;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,6 @@
1
1
  export interface IPreviewAuthContext {
2
2
  locale: string;
3
+ socialCallbackUrl?: string;
3
4
  defaultRedirectPath?: string;
4
5
  }
5
6
  export declare const setPreviewAuthContext: (context: IPreviewAuthContext | null) => void;
@@ -0,0 +1,19 @@
1
+ export interface IRouteParamsState {
2
+ params: Record<string, string> | undefined;
3
+ isLoading: boolean;
4
+ notFound: boolean;
5
+ error: Error | null;
6
+ }
7
+ export declare const PENDING_ROUTE_PARAMS: IRouteParamsState;
8
+ export declare const EMPTY_ROUTE_PARAMS: IRouteParamsState;
9
+ export declare const resolvedRouteParams: (config: {
10
+ params?: unknown;
11
+ notFound?: unknown;
12
+ }) => IRouteParamsState;
13
+ export declare const createRouteParamsStore: (resolve: (slug: string[]) => Promise<IRouteParamsState>) => {
14
+ getSnapshot: () => IRouteParamsState;
15
+ getSnapshotForPath: (pathname: string) => IRouteParamsState;
16
+ subscribe: (listener: () => void) => () => void;
17
+ setRoute: (key: string, slug: string[]) => void;
18
+ reset: () => void;
19
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ export declare const APP_AUTH_CALLBACK_PATH = "/auth/app-callback";
2
+ export declare const APP_AUTH_CALLBACK_MESSAGE = "turbofy:app-auth-callback";
3
+ export interface ISocialCallback {
4
+ state: string;
5
+ code?: string;
6
+ error?: string;
7
+ }
8
+ export declare const parseSocialCallback: (search: string) => ISocialCallback | null;
9
+ export declare const readSocialCallbackMessage: (event: MessageEvent, popup: Window, callbackUrl: URL, state: string) => ISocialCallback | null;
10
+ export type ISocialCallbackStatus = "returning" | "returned" | "invalid" | "missingOpener" | "timedOut";
11
+ export declare const relaySocialCallback: (callback: ISocialCallback | null, onStatus: (status: ISocialCallbackStatus) => void) => (() => void);
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ import type { IAuthResult, ISocialAuthorizeResult } from "@/lib/auth";
2
+ export type ISocialSignInErrorCode = "NOT_CONFIGURED" | "POPUP_BLOCKED" | "CANCELLED" | "TIMED_OUT" | "IN_PROGRESS" | "SIGN_IN_FAILED";
3
+ export type ISocialSignInResult = IAuthResult & {
4
+ errorCode?: ISocialSignInErrorCode;
5
+ };
6
+ export interface ISocialSignInOptions {
7
+ redirectUri?: string;
8
+ signal?: AbortSignal;
9
+ }
10
+ interface IPopupActions {
11
+ authorize: (params: {
12
+ provider: string;
13
+ redirectUri: string;
14
+ codeChallenge: string;
15
+ }) => Promise<ISocialAuthorizeResult>;
16
+ exchange: (params: {
17
+ code: string;
18
+ state: string;
19
+ codeVerifier: string;
20
+ }) => Promise<IAuthResult>;
21
+ }
22
+ export declare const runSocialSignInPopup: (provider: string, options: ISocialSignInOptions, actions: IPopupActions) => Promise<ISocialSignInResult>;
23
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,5 @@
1
1
  export { Link } from "./link";
2
2
  export { type INavigateOptions, navigate } from "./navigate";
3
+ export { type IRouteParamsState, useParams } from "./params";
3
4
  export { prefetch } from "./prefetch";
4
5
  export { useSearchParams } from "./search-params";
@@ -0,0 +1,3 @@
1
+ import { type IRouteParamsState } from "@/lib/route-params";
2
+ export declare const useParams: () => IRouteParamsState;
3
+ export type { IRouteParamsState } from "@/lib/route-params";
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turbofy-ai/app-runtime",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,33 +0,0 @@
1
- export interface IAuthUser {
2
- sub: string;
3
- email?: string;
4
- groups?: string[];
5
- }
6
- export interface IAuthActionResult {
7
- ok: boolean;
8
- error?: string;
9
- code?: string;
10
- needsConfirmation?: boolean;
11
- signedIn?: boolean;
12
- signInError?: string;
13
- user?: IAuthUser | null;
14
- }
15
- export type IInvokeAuthAction = (actionId: string, body: Record<string, unknown>) => Promise<Record<string, unknown>>;
16
- /** Each client belongs to one app and one session transport. */
17
- export declare const createAuthActions: (invoke: IInvokeAuthAction) => {
18
- login: (email: string, password: string) => Promise<IAuthActionResult>;
19
- logout: () => Promise<IAuthActionResult>;
20
- currentUser: () => Promise<IAuthActionResult>;
21
- refreshAccessToken: () => Promise<IAuthActionResult>;
22
- forgotPassword: (email: string) => Promise<IAuthActionResult>;
23
- resetPassword: (email: string, code: string, newPassword: string) => Promise<IAuthActionResult>;
24
- changePassword: (currentPassword: string, newPassword: string) => Promise<IAuthActionResult>;
25
- signup: (params: {
26
- email: string;
27
- password: string;
28
- name?: string;
29
- }) => Promise<IAuthActionResult>;
30
- confirmSignup: (email: string, code: string, password?: string) => Promise<IAuthActionResult>;
31
- getSocialAuthorizeUrl: (provider: string, redirectUri: string) => Promise<string>;
32
- socialSignIn: (callbackUrl: string) => Promise<IAuthActionResult>;
33
- };