@fayz-ai/core 0.9.0 → 0.11.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.
Files changed (218) hide show
  1. package/README.md +2 -2
  2. package/dist/access/index.js.map +1 -1
  3. package/dist/chunk-BEGXYHS4.js +566 -0
  4. package/dist/chunk-BEGXYHS4.js.map +1 -0
  5. package/dist/chunk-ED6NBH6U.js +348 -0
  6. package/dist/chunk-ED6NBH6U.js.map +1 -0
  7. package/dist/chunk-EWKX4VUM.js +429 -0
  8. package/dist/chunk-EWKX4VUM.js.map +1 -0
  9. package/dist/chunk-LARZWDHA.js +319 -0
  10. package/dist/chunk-LARZWDHA.js.map +1 -0
  11. package/dist/chunk-OXQGRJZT.js +125 -0
  12. package/dist/chunk-OXQGRJZT.js.map +1 -0
  13. package/dist/chunk-RRYFXUQX.js +1247 -0
  14. package/dist/chunk-RRYFXUQX.js.map +1 -0
  15. package/dist/{chunk-5RJVUC6J.js → chunk-TDI6F6PT.js} +373 -25
  16. package/dist/chunk-TDI6F6PT.js.map +1 -0
  17. package/dist/{chunk-V2MSAUHO.js → chunk-UVKH6RDX.js} +211 -335
  18. package/dist/chunk-UVKH6RDX.js.map +1 -0
  19. package/dist/chunk-V53GR4UT.js +289 -0
  20. package/dist/chunk-V53GR4UT.js.map +1 -0
  21. package/dist/connector-runtime/index.d.ts +15 -0
  22. package/dist/connector-runtime/index.d.ts.map +1 -0
  23. package/dist/connector-runtime/index.js +3 -0
  24. package/dist/connector-runtime/index.js.map +1 -0
  25. package/dist/data/archetype.d.ts.map +1 -1
  26. package/dist/data/backend-env.d.ts +38 -0
  27. package/dist/data/backend-env.d.ts.map +1 -0
  28. package/dist/data/bulk.d.ts +24 -0
  29. package/dist/data/bulk.d.ts.map +1 -1
  30. package/dist/data/cached.d.ts.map +1 -1
  31. package/dist/data/custom-fields.d.ts +5 -0
  32. package/dist/data/custom-fields.d.ts.map +1 -0
  33. package/dist/data/index.d.ts +2 -1
  34. package/dist/data/index.d.ts.map +1 -1
  35. package/dist/data/index.js +3 -1
  36. package/dist/data/mock.d.ts.map +1 -1
  37. package/dist/data/platform-api.d.ts.map +1 -1
  38. package/dist/data/resolve.d.ts.map +1 -1
  39. package/dist/data/supabase.d.ts.map +1 -1
  40. package/dist/data/types.d.ts +8 -0
  41. package/dist/data/types.d.ts.map +1 -1
  42. package/dist/entity/events.d.ts +14 -0
  43. package/dist/entity/events.d.ts.map +1 -0
  44. package/dist/events/envelope.d.ts +31 -0
  45. package/dist/events/envelope.d.ts.map +1 -0
  46. package/dist/events/index.d.ts +4 -0
  47. package/dist/events/index.d.ts.map +1 -1
  48. package/dist/events/log.d.ts +44 -0
  49. package/dist/events/log.d.ts.map +1 -0
  50. package/dist/events/types.d.ts +40 -0
  51. package/dist/events/types.d.ts.map +1 -0
  52. package/dist/fields/store.d.ts +45 -0
  53. package/dist/fields/store.d.ts.map +1 -0
  54. package/dist/i18n/index.d.ts +10 -0
  55. package/dist/i18n/index.d.ts.map +1 -1
  56. package/dist/i18n/index.js +1 -1
  57. package/dist/i18n/shell-translations.en.d.ts.map +1 -1
  58. package/dist/i18n/shell-translations.pt-br.d.ts.map +1 -1
  59. package/dist/index.d.ts +45 -21
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +543 -56
  62. package/dist/index.js.map +1 -1
  63. package/dist/integrations/events.d.ts +7 -0
  64. package/dist/integrations/events.d.ts.map +1 -0
  65. package/dist/integrations/index.d.ts +533 -29
  66. package/dist/integrations/index.d.ts.map +1 -1
  67. package/dist/integrations/index.js +3 -1
  68. package/dist/integrations/permissions.d.ts +132 -0
  69. package/dist/integrations/permissions.d.ts.map +1 -0
  70. package/dist/integrations/request.d.ts +170 -0
  71. package/dist/integrations/request.d.ts.map +1 -0
  72. package/dist/integrations/runtime-token.d.ts +33 -0
  73. package/dist/integrations/runtime-token.d.ts.map +1 -0
  74. package/dist/integrations/runtime.d.ts +398 -0
  75. package/dist/integrations/runtime.d.ts.map +1 -0
  76. package/dist/integrations/settings.d.ts +102 -0
  77. package/dist/integrations/settings.d.ts.map +1 -0
  78. package/dist/integrations/store.d.ts +145 -0
  79. package/dist/integrations/store.d.ts.map +1 -0
  80. package/dist/{address/index.d.ts → lib/address.d.ts} +1 -1
  81. package/dist/{address/index.d.ts.map → lib/address.d.ts.map} +1 -1
  82. package/dist/{phone/index.d.ts → lib/phone.d.ts} +1 -1
  83. package/dist/lib/phone.d.ts.map +1 -0
  84. package/dist/{seo/index.d.ts → lib/seo.d.ts} +18 -1
  85. package/dist/lib/seo.d.ts.map +1 -0
  86. package/dist/{tenant/index.d.ts → lib/tenant.d.ts} +1 -1
  87. package/dist/lib/tenant.d.ts.map +1 -0
  88. package/dist/manifest/index.d.ts +1 -1
  89. package/dist/manifest/index.d.ts.map +1 -1
  90. package/dist/messaging/index.d.ts +3 -0
  91. package/dist/messaging/index.d.ts.map +1 -0
  92. package/dist/messaging/registry.d.ts +35 -0
  93. package/dist/messaging/registry.d.ts.map +1 -0
  94. package/dist/messaging/types.d.ts +67 -0
  95. package/dist/messaging/types.d.ts.map +1 -0
  96. package/dist/plugin/index.js +3 -1
  97. package/dist/plugin/runtime.d.ts +17 -0
  98. package/dist/plugin/runtime.d.ts.map +1 -1
  99. package/dist/registry/block-catalog.d.ts +78 -0
  100. package/dist/registry/block-catalog.d.ts.map +1 -0
  101. package/dist/registry/block-constraints.d.ts +64 -0
  102. package/dist/registry/block-constraints.d.ts.map +1 -0
  103. package/dist/registry/block-schema.d.ts +69 -0
  104. package/dist/registry/block-schema.d.ts.map +1 -0
  105. package/dist/registry/blocks.d.ts +84 -0
  106. package/dist/registry/blocks.d.ts.map +1 -0
  107. package/dist/registry/entities.d.ts +179 -0
  108. package/dist/registry/entities.d.ts.map +1 -0
  109. package/dist/registry/extension-points.d.ts +117 -0
  110. package/dist/registry/extension-points.d.ts.map +1 -0
  111. package/dist/registry/handles.d.ts +41 -0
  112. package/dist/registry/handles.d.ts.map +1 -0
  113. package/dist/registry/index.d.ts +41 -41
  114. package/dist/registry/index.d.ts.map +1 -1
  115. package/dist/registry/loaders.d.ts +55 -0
  116. package/dist/registry/loaders.d.ts.map +1 -0
  117. package/dist/registry/registry-class.d.ts +157 -0
  118. package/dist/registry/registry-class.d.ts.map +1 -0
  119. package/dist/registry/schema-check.d.ts +14 -0
  120. package/dist/registry/schema-check.d.ts.map +1 -0
  121. package/dist/router/index.d.ts +78 -1
  122. package/dist/router/index.d.ts.map +1 -1
  123. package/dist/router/index.js +1 -1
  124. package/dist/{shell-translations.pt-br-2GWRQRRP.js → shell-translations.pt-br-BM5ZFSKJ.js} +72 -3
  125. package/dist/shell-translations.pt-br-BM5ZFSKJ.js.map +1 -0
  126. package/dist/telemetry/errors.d.ts +87 -0
  127. package/dist/telemetry/errors.d.ts.map +1 -0
  128. package/dist/testing/index.js +4 -1
  129. package/dist/{testing/index.d.ts → testing.d.ts} +5 -3
  130. package/dist/testing.d.ts.map +1 -0
  131. package/dist/types/analytics.d.ts +213 -0
  132. package/dist/types/analytics.d.ts.map +1 -0
  133. package/dist/types/crud.d.ts +37 -3
  134. package/dist/types/crud.d.ts.map +1 -1
  135. package/dist/types/plugins.d.ts +138 -1
  136. package/dist/types/plugins.d.ts.map +1 -1
  137. package/package.json +9 -17
  138. package/dist/blocks/index.d.ts +0 -25
  139. package/dist/blocks/index.d.ts.map +0 -1
  140. package/dist/chunk-5RJVUC6J.js.map +0 -1
  141. package/dist/chunk-L4TLMYGC.js +0 -42
  142. package/dist/chunk-L4TLMYGC.js.map +0 -1
  143. package/dist/chunk-V2MSAUHO.js.map +0 -1
  144. package/dist/chunk-X5THHG6T.js +0 -77
  145. package/dist/chunk-X5THHG6T.js.map +0 -1
  146. package/dist/chunk-Y2C2FBQP.js +0 -35
  147. package/dist/chunk-Y2C2FBQP.js.map +0 -1
  148. package/dist/chunk-YH25Y4FW.js +0 -311
  149. package/dist/chunk-YH25Y4FW.js.map +0 -1
  150. package/dist/phone/index.d.ts.map +0 -1
  151. package/dist/seo/index.d.ts.map +0 -1
  152. package/dist/shell-translations.pt-br-2GWRQRRP.js.map +0 -1
  153. package/dist/tenant/index.d.ts.map +0 -1
  154. package/dist/testing/index.d.ts.map +0 -1
  155. package/src/access/denial.ts +0 -33
  156. package/src/access/engine.test.ts +0 -48
  157. package/src/access/engine.ts +0 -136
  158. package/src/access/index.ts +0 -14
  159. package/src/access/limits.ts +0 -18
  160. package/src/address/index.ts +0 -188
  161. package/src/app/render.tsx +0 -69
  162. package/src/blocks/index.tsx +0 -68
  163. package/src/data/archetype.ts +0 -255
  164. package/src/data/bulk.ts +0 -35
  165. package/src/data/cached.ts +0 -55
  166. package/src/data/count.test.ts +0 -152
  167. package/src/data/count.ts +0 -131
  168. package/src/data/filters.test.ts +0 -70
  169. package/src/data/filters.ts +0 -90
  170. package/src/data/index.ts +0 -11
  171. package/src/data/mock.ts +0 -90
  172. package/src/data/platform-api.ts +0 -209
  173. package/src/data/refresh.ts +0 -115
  174. package/src/data/resolve.ts +0 -126
  175. package/src/data/supabase.ts +0 -230
  176. package/src/data/types.ts +0 -50
  177. package/src/entity/index.ts +0 -2
  178. package/src/entity/registry.ts +0 -49
  179. package/src/events/index.tsx +0 -82
  180. package/src/i18n/index.ts +0 -476
  181. package/src/i18n/shell-translations.en.ts +0 -875
  182. package/src/i18n/shell-translations.pt-br.ts +0 -873
  183. package/src/index.ts +0 -217
  184. package/src/integrations/index.ts +0 -237
  185. package/src/lib/cache.ts +0 -118
  186. package/src/lib/csv.ts +0 -54
  187. package/src/lib/format.ts +0 -58
  188. package/src/manifest/app-manifest.schema.json +0 -676
  189. package/src/manifest/index.ts +0 -518
  190. package/src/manifest/serialize.ts +0 -52
  191. package/src/phone/index.ts +0 -85
  192. package/src/plugin/createSafeDataProvider.ts +0 -30
  193. package/src/plugin/index.ts +0 -1
  194. package/src/plugin/runtime.ts +0 -331
  195. package/src/registry/index.ts +0 -163
  196. package/src/router/history.ts +0 -86
  197. package/src/router/index.ts +0 -29
  198. package/src/runtime/index.ts +0 -15
  199. package/src/runtime/oauth.ts +0 -219
  200. package/src/search/engine.ts +0 -559
  201. package/src/search/index.ts +0 -25
  202. package/src/search/text.ts +0 -206
  203. package/src/search/types.ts +0 -75
  204. package/src/seo/index.ts +0 -128
  205. package/src/tenant/index.ts +0 -38
  206. package/src/testing/index.ts +0 -116
  207. package/src/types/auth.ts +0 -41
  208. package/src/types/billing.ts +0 -39
  209. package/src/types/crud.ts +0 -184
  210. package/src/types/entities.ts +0 -142
  211. package/src/types/entitlements.ts +0 -45
  212. package/src/types/i18n.ts +0 -7
  213. package/src/types/index.ts +0 -11
  214. package/src/types/org.ts +0 -137
  215. package/src/types/payment.ts +0 -44
  216. package/src/types/permissions.ts +0 -32
  217. package/src/types/plugins.ts +0 -480
  218. package/src/types/theme.ts +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,qDAAqD;AACrD,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAiB9D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,MAAM,CAAA;AAE/C,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,CAAA;AAEvD,oFAAoF;AACpF,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,mDAAmD;AACnD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,eAAe,CAAA;AAEpE,iCAAiC;AACjC,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEzE,6EAA6E;AAC7E,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,MAAM,EAAE,MAAM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AAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAC5F,CAAC,CAmBH"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AACnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAIzE,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,MAAM,EACN,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,eAAe,CAAA;AACtB,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAI1C,OAAO,EACL,8BAA8B,EAC9B,qCAAqC,EACrC,qBAAqB,EACrB,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAA;AAEhG,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAA;AAChB,YAAY,EACV,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB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AM,EAAE,CAAC,EACT,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAC5F,CAAC,CAmBH"}
@@ -1,3 +1,5 @@
1
- export { connectorDirection, connectorPlanes, preferredPlane, withAfterHooks } from '../chunk-L4TLMYGC.js';
1
+ export { CONNECTIONS_TABLE, CONNECTOR_CATEGORIES, ConnectionSettingsError, ConnectorRuntimeTokenUnavailableError, RequestBlockedError, RequestPlaneError, SYNC_RUNS_TABLE, assertSettingsAllowed, buyerIdempotencyKey, connectionKey, connectionRuns, connectionSettings, connectionStatus, connectorDirection, connectorEntities, connectorGrantScopes, connectorPermissions, connectorPlanes, connectorRuntimeToken, connectorSettings, connectorSubscribes, connectorSubscribesTo, createConnectionStore, createRpcEffectLedger, eventKeyMatches, getConnectorRuntimeTokenSource, grants, groupedPermissions, hasRequestPlane, hasSensitivePermission, invocationPlane, isConnectorCategory, isDataPermission, isEventPermission, isSettingSet, listConnections, missingRequiredSettings, permissionActions, permissionsWrite, preferredPlane, requestPlaneSpec, runEffect, runRequest, setConnectorRuntimeTokenSource, settingsStatus, setupStatusDetail, sortedPermissions, withAfterHooks } from '../chunk-BEGXYHS4.js';
2
+ export { CONNECTOR_RUNTIME_TOKEN_HEADER, ConnectorHttpError, RateLimitExceededError, advanceWindow, backoffDelay, classify, createRateLimiter, cursorCompleteness, fetchWithRetry, isExpiring, paginate, parseRetryAfter, reconcileMirror, serializeCursor, sliceWindow, statusNeedsBody } from '../chunk-ED6NBH6U.js';
3
+ import '../chunk-LARZWDHA.js';
2
4
  //# sourceMappingURL=index.js.map
3
5
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,132 @@
1
+ /**
2
+ * What a permission is about.
3
+ *
4
+ * Two kinds and not one, because the actions differ and conflating them is how a
5
+ * declaration stops being checkable: you cannot `listen` to a record type, and
6
+ * "write" to an event means emitting a new fact, which is a different act from
7
+ * updating a row.
8
+ */
9
+ export type ConnectorResourceKind =
10
+ /** A canonical record type in this app — `booking`, `movement`, `product`. */
11
+ 'data'
12
+ /** A domain fact — an exact event key or a `*`-suffixed prefix. */
13
+ | 'event';
14
+ /**
15
+ * Everything a connector can ask for. Which of these are legal depends on the
16
+ * resource kind — see {@link permissionActions}.
17
+ *
18
+ * The three event actions are the founder's own words, and they are three
19
+ * genuinely different exposures: `read` is the history that already exists,
20
+ * `listen` is every fact from now on, `emit` is the connector putting facts into
21
+ * the app that the app's own automations will then act on.
22
+ */
23
+ export type ConnectorPermissionAction =
24
+ /** Data: reads rows. Event: reads facts already recorded. */
25
+ 'read'
26
+ /** Data only: creates, updates or deletes rows. */
27
+ | 'write'
28
+ /** Event only: receives matching facts as they happen. */
29
+ | 'listen'
30
+ /** Event only: publishes facts into this app. */
31
+ | 'emit';
32
+ /** The actions a resource kind admits. Closed, and the contract check reads it. */
33
+ export declare function permissionActions(kind: ConnectorResourceKind): readonly ConnectorPermissionAction[];
34
+ /**
35
+ * One thing a connector needs access to, and why.
36
+ *
37
+ * `reason` is required and it is the field that makes the rest worth showing. A
38
+ * list of `booking: read, write` is a schema dump; *"para criar o evento no
39
+ * Google quando um horário é marcado"* is something a salon owner can agree or
40
+ * disagree with. Everything else on this screen is checkable by a machine; this
41
+ * is the part only the tenant can judge, so it cannot be optional.
42
+ */
43
+ export interface ConnectorPermission {
44
+ kind: ConnectorResourceKind;
45
+ /** Entity name (`'booking'`) or event key/prefix (`'agenda.booking_created'`, `'blog.post.*'`). */
46
+ resource: string;
47
+ /** What it needs to do. Non-empty, and legal for `kind`. */
48
+ actions: ConnectorPermissionAction[];
49
+ /** One sentence, in the tenant's language, that a tenant can judge. */
50
+ reason: string;
51
+ /**
52
+ * Money, identity, health, or anything a leak of which is a reportable event.
53
+ * Marked because the reader scans this list rather than reading it, and a bank
54
+ * statement should not look like a product name on the way past.
55
+ */
56
+ sensitive?: boolean;
57
+ }
58
+ /** Whether a permission names a record type. */
59
+ export declare function isDataPermission(permission: ConnectorPermission): boolean;
60
+ /** Whether a permission names a domain fact. */
61
+ export declare function isEventPermission(permission: ConnectorPermission): boolean;
62
+ /** Whether a permission asks for an action. */
63
+ export declare function grants(permission: ConnectorPermission, action: ConnectorPermissionAction): boolean;
64
+ /** Anything that carries a permission list — a definition, or a plain object in a test. */
65
+ export interface PermissionBearing {
66
+ permissions?: ConnectorPermission[];
67
+ /** Legacy mirror of the `data` resources. See {@link connectorEntities}. */
68
+ entities?: string[];
69
+ /** Legacy mirror of the `listen` resources. See {@link connectorSubscribesTo}. */
70
+ subscribesTo?: string[];
71
+ }
72
+ /** The permission list, or an empty one. Undeclared means the connector says nothing. */
73
+ export declare function connectorPermissions(def: PermissionBearing | undefined): ConnectorPermission[];
74
+ /**
75
+ * The record types a connector touches — derived from `permissions`, falling
76
+ * back to the legacy `entities` field.
77
+ *
78
+ * Derived and not duplicated: a connector that declares permissions must not
79
+ * also maintain a parallel list of names, because the two would drift and the
80
+ * screen would show one of them. A connector that declares BOTH is not merged —
81
+ * the contract check refuses it unless they agree exactly, which is the whole
82
+ * point of keeping the old field readable at all.
83
+ */
84
+ export declare function connectorEntities(def: PermissionBearing | undefined): string[];
85
+ /**
86
+ * The event patterns a connector wants delivered — derived from the `listen`
87
+ * permissions, falling back to the legacy `subscribesTo` field.
88
+ *
89
+ * This is the ingress's filter, and it reads through here rather than off the
90
+ * field so a connector that declares only `permissions` is still heard. Same
91
+ * agreement rule as {@link connectorEntities}.
92
+ */
93
+ export declare function connectorSubscribesTo(def: PermissionBearing | undefined): string[];
94
+ /** Whether a connector asked to hear about this event. Undeclared = hears nothing. */
95
+ export declare function connectorSubscribes(def: PermissionBearing | undefined, key: string): boolean;
96
+ /** Whether the connector asks to change anything at all — data or events. */
97
+ export declare function permissionsWrite(def: PermissionBearing | undefined): boolean;
98
+ /** Whether anything in the list was marked sensitive. */
99
+ export declare function hasSensitivePermission(def: PermissionBearing | undefined): boolean;
100
+ /**
101
+ * The list a consent view renders: data first, then events; within each,
102
+ * sensitive first, then read-only, then alphabetical.
103
+ *
104
+ * Read-only last within a kind is deliberate. What a reader must not miss is
105
+ * what changes their records, so the ordering puts the consequential rows where
106
+ * the eye lands and leaves the harmless ones to be skimmed. Sorting is here and
107
+ * not in the component so the order is assertable without rendering.
108
+ */
109
+ export declare function sortedPermissions(def: PermissionBearing | undefined): ConnectorPermission[];
110
+ /**
111
+ * The permissions grouped as the consent view shows them.
112
+ *
113
+ * One entry per resource, because a resource is what a person reasons about — a
114
+ * screen that lists `booking · leitura` and `booking · escrita` as two rows asks
115
+ * the reader to do the grouping themselves.
116
+ */
117
+ export declare function groupedPermissions(def: PermissionBearing | undefined): {
118
+ data: ConnectorPermission[];
119
+ events: ConnectorPermission[];
120
+ };
121
+ /**
122
+ * The declaration as scope strings — `data:booking:write`, `event:blog.post.*:listen`.
123
+ *
124
+ * **Nothing enforces these today.** This is the third consumer from the header,
125
+ * and it is written now for one reason: FAY-1348 §D7 says the minted credential
126
+ * authorizes exactly the connector's declared list, and a list that has to be
127
+ * reshaped when that lands is a list that will be reshaped wrongly. One resource
128
+ * yields one scope per action, sorted, so the string set is stable enough to be
129
+ * compared across a mint and a renewal.
130
+ */
131
+ export declare function connectorGrantScopes(def: PermissionBearing | undefined): string[];
132
+ //# sourceMappingURL=permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/integrations/permissions.ts"],"names":[],"mappings":"AAmCA;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB;AAC/B,8EAA8E;AAC5E,MAAM;AACR,mEAAmE;GACjE,OAAO,CAAA;AAEX;;;;;;;;GAQG;AACH,MAAM,MAAM,yBAAyB;AACnC,6DAA6D;AAC3D,MAAM;AACR,mDAAmD;GACjD,OAAO;AACT,0DAA0D;GACxD,QAAQ;AACV,iDAAiD;GAC/C,MAAM,CAAA;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AAS,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE5F;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,iBAAiB,GAAG,SAAS,GAAG,OAAO,CAE5E;AAED,yDAAyD;AACzD,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,iBAAiB,GAAG,SAAS,GAAG,OAAO,CAElF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,iBAAiB,GAAG,SAAS,GAAG,mBAAmB,EAAE,CAS3F;AAMD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,iBAAiB,GAAG,SAAS,GAAG;IACtE,IAAI,EAAE,mBAAmB,EAAE,CAAA;IAC3B,MAAM,EAAE,mBAAmB,EAAE,CAAA;CAC9B,CAMA;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,iBAAiB,GAAG,SAAS,GAAG,MAAM,EAAE,CAMjF"}
@@ -0,0 +1,170 @@
1
+ import type { ConnectorDefinition, ConnectorDirection, SyncTrigger } from './index';
2
+ /**
3
+ * What the connector does when the provider does not answer in time.
4
+ *
5
+ * `degrade` — serve a worse answer and let the buyer continue (shipping falls
6
+ * back to the configured zone; the sale is never blocked by a carrier's API).
7
+ * `block` — refuse the step and tell the buyer why (a payment that did not
8
+ * confirm must not read as a confirmed order).
9
+ */
10
+ export type RequestFailureMode = 'degrade' | 'block';
11
+ /** Why the provider's answer was not used. Codes, not copy — the UI writes the pt-BR. */
12
+ export type DegradeReason =
13
+ /** The latency budget was spent before the provider answered. */
14
+ 'timeout'
15
+ /** The provider answered with an error, or the call threw. */
16
+ | 'provider-error'
17
+ /** There is no live connection for this connector — nothing was called. */
18
+ | 'not-connected';
19
+ /** The answer, plus where it came from. Provenance is not optional: a fallback price shown as a provider price is how a store quotes one number and charges another. */
20
+ export interface RequestOutcome<T> {
21
+ value: T;
22
+ source: 'provider' | 'fallback';
23
+ /** Wall time spent on the provider attempt. Reported even when it timed out. */
24
+ elapsedMs: number;
25
+ /** Present exactly when `source` is 'fallback'. */
26
+ degraded?: {
27
+ reason: DegradeReason;
28
+ detail?: string;
29
+ };
30
+ }
31
+ /**
32
+ * A `block` connector refused the step. Carries a reason code the checkout maps
33
+ * to copy — it is thrown AT the buyer's request, so it must say something.
34
+ */
35
+ export declare class RequestBlockedError extends Error {
36
+ readonly connectorId: string;
37
+ readonly reason: DegradeReason;
38
+ readonly elapsedMs: number;
39
+ constructor(connectorId: string, reason: DegradeReason, elapsedMs: number, detail?: string);
40
+ }
41
+ /**
42
+ * The connector's declaration is wrong. Never reaches a buyer: it fires the
43
+ * first time the connector is exercised, which is a test or a dev boot.
44
+ */
45
+ export declare class RequestPlaneError extends Error {
46
+ constructor(message: string);
47
+ }
48
+ /** A connector's request-plane declaration, after validation. */
49
+ export interface ResolvedRequestPlane {
50
+ latencyBudgetMs: number;
51
+ onFailure: RequestFailureMode;
52
+ }
53
+ type RequestPlaneDecl = Pick<ConnectorDefinition, 'id' | 'planes' | 'latencyBudgetMs' | 'onFailure'>;
54
+ /**
55
+ * Read a connector's request-plane declaration, or say why it has none.
56
+ *
57
+ * There is no default budget on purpose. A default is a number nobody chose,
58
+ * and this one decides how long a stranger stares at a spinner; "3000 because
59
+ * that is what the helper does" is exactly the decision the contract exists to
60
+ * force someone to make.
61
+ */
62
+ export declare function requestPlaneSpec(def: RequestPlaneDecl): ResolvedRequestPlane;
63
+ /** True when the connector declares a usable request plane. Never throws — for a UI badge. */
64
+ export declare function hasRequestPlane(def: RequestPlaneDecl): boolean;
65
+ export interface RequestAttempt<T> {
66
+ /**
67
+ * The provider call. The signal aborts when the budget is spent — honour it
68
+ * so the socket closes, but the budget is enforced regardless of whether you do.
69
+ */
70
+ call(signal: AbortSignal): Promise<T>;
71
+ /**
72
+ * The worse answer, for `degrade` connectors. Must be LOCAL (a database row, a
73
+ * configured zone) — a fallback that itself calls a network is a second budget
74
+ * nobody declared. Required when `onFailure` is 'degrade'.
75
+ */
76
+ fallback?(reason: DegradeReason, detail?: string): T | Promise<T>;
77
+ /** Skip the provider entirely — no live connection, connector switched off. */
78
+ skip?: boolean;
79
+ /** Injectable clock, for tests that assert elapsed time without sleeping. */
80
+ now?(): number;
81
+ }
82
+ /**
83
+ * Run one request-plane invocation under the connector's declared budget and
84
+ * failure semantics.
85
+ *
86
+ * Writes nothing. A quote is not a run: it has no fetched, no written and no
87
+ * cursor, it is issued for an `anon` shopper with no tenant-scoped write path,
88
+ * and one row per quote would make plg_sync_runs the largest table in the pool
89
+ * within weeks. Effects go through {@link runEffect}, which does file a row.
90
+ */
91
+ export declare function runRequest<T>(def: RequestPlaneDecl, attempt: RequestAttempt<T>): Promise<RequestOutcome<T>>;
92
+ export type EffectStatus = 'success' | 'partial' | 'error';
93
+ export interface EffectClaimInput {
94
+ /** Which connection is acting. The tenant is resolved FROM it, never passed in. */
95
+ connectionId: string;
96
+ /** Buyer-derived. See {@link buyerIdempotencyKey}. */
97
+ idempotencyKey: string;
98
+ direction: ConnectorDirection;
99
+ triggerKind: SyncTrigger;
100
+ stream?: string;
101
+ }
102
+ export interface EffectClaim {
103
+ /** The plg_sync_runs row this effect owns — the same id on every retry of the key. */
104
+ runId: string;
105
+ /** `false` = the key already ran. Do not call the provider. */
106
+ claimed: boolean;
107
+ }
108
+ /**
109
+ * The durable claim. The one implementation that matters is
110
+ * `plg_claim_effect` / `plg_settle_effect` (packages/db 030): the run row IS the
111
+ * claim, so "file the run" and "win the race" are one statement and cannot
112
+ * disagree. Both are service_role only — the shopper never reaches them.
113
+ */
114
+ export interface EffectLedger {
115
+ claim(input: EffectClaimInput): Promise<EffectClaim>;
116
+ settle(input: {
117
+ runId: string;
118
+ status: EffectStatus;
119
+ stats?: Record<string, unknown>;
120
+ error?: string;
121
+ }): Promise<void>;
122
+ }
123
+ export interface EffectOutcome<T> {
124
+ runId: string;
125
+ /** `true` when THIS call reached the provider. `false` = the key had already run. */
126
+ performed: boolean;
127
+ value?: T;
128
+ }
129
+ /**
130
+ * Perform an effect at most once per idempotency key.
131
+ *
132
+ * The claim comes first and the provider call second, in that order and never
133
+ * the reverse: a claim written after a successful capture leaves a window in
134
+ * which the retry captures again. A claim that then fails is settled as an
135
+ * error and stays claimed — the retry does not re-charge, an operator decides.
136
+ */
137
+ export declare function runEffect<T>(ledger: EffectLedger, input: EffectClaimInput, perform: (runId: string) => Promise<T>): Promise<EffectOutcome<T>>;
138
+ /** The slice of supabase-js the ledger calls. Two RPCs, no table access. */
139
+ interface RpcClient {
140
+ rpc(fn: string, args: Record<string, unknown>): PromiseLike<{
141
+ data: unknown;
142
+ error: {
143
+ message: string;
144
+ } | null;
145
+ }>;
146
+ }
147
+ /**
148
+ * The shipped {@link EffectLedger}: `plg_claim_effect` / `plg_settle_effect`
149
+ * (packages/db 030). Both are service_role only, so this is constructed inside
150
+ * the data plane — an edge function — and never in a page the shopper loads.
151
+ */
152
+ export declare function createRpcEffectLedger(client: RpcClient): EffectLedger;
153
+ /**
154
+ * The key the buyer's intent produces — never the provider's id.
155
+ *
156
+ * The provider's id only exists AFTER the call that must not happen twice, so a
157
+ * key derived from it cannot prevent the second one. `pagar` clicked twice is the
158
+ * same order for the same amount, and that is what has to hash to one key.
159
+ *
160
+ * The amount is part of it deliberately: a re-tried capture for a DIFFERENT
161
+ * amount is a different intent and must be allowed through, not silently
162
+ * swallowed as a duplicate.
163
+ */
164
+ export declare function buyerIdempotencyKey(parts: {
165
+ effect: string;
166
+ subject: string;
167
+ amountCents?: number;
168
+ }): string;
169
+ export {};
170
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/integrations/request.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEnF;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,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GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACvH;AAED,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,CAAC,CAAA;CACV;AAED;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GACrC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAmB3B;AAED,4EAA4E;AAC5E,UAAU,SAAS;IACjB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW,CAAC;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAA;KAAE,CAAC,CAAA;CAClH;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,YAAY,CA8BrE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAQ5G"}
@@ -0,0 +1,33 @@
1
+ /** What the hub knows about who is asking — a SELECTOR, never an assertion. */
2
+ export interface ConnectorRuntimeTokenRequest {
3
+ /**
4
+ * Which of the caller's own organizations this call is for.
5
+ *
6
+ * The platform proves membership from the session behind the token and
7
+ * refuses anything outside it, so naming one narrows and can never widen.
8
+ * Without it, an operator who belongs to two schools cannot be told apart
9
+ * from one who belongs to neither.
10
+ */
11
+ tenantId?: string;
12
+ }
13
+ /** A token, or something that produces one. Same shape the SDK's source has. */
14
+ export type ConnectorRuntimeTokenSource = string | ((request?: ConnectorRuntimeTokenRequest) => string | undefined | null | Promise<string | undefined | null>);
15
+ /** No token, so the call was not made. Distinct from a call that was refused. */
16
+ export declare class ConnectorRuntimeTokenUnavailableError extends Error {
17
+ constructor(message: string);
18
+ }
19
+ export declare function setConnectorRuntimeTokenSource(source: ConnectorRuntimeTokenSource | null): void;
20
+ /** Null when the app configured none — callers must refuse, never fall back. */
21
+ export declare function getConnectorRuntimeTokenSource(): ConnectorRuntimeTokenSource | null;
22
+ /**
23
+ * The token to forward to a data plane, or a refusal.
24
+ *
25
+ * Throws rather than returning empty on both failure modes, and they are told
26
+ * apart in the message: no source configured is a deployment that was never
27
+ * wired, an empty answer is a session that cannot mint one right now. A caller
28
+ * that treated either as "carry on" would send an unauthenticated request to a
29
+ * function that must not answer it.
30
+ */
31
+ export declare function connectorRuntimeToken(request?: ConnectorRuntimeTokenRequest): Promise<string>;
32
+ export { CONNECTOR_RUNTIME_TOKEN_HEADER } from './runtime';
33
+ //# sourceMappingURL=runtime-token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-token.d.ts","sourceRoot":"","sources":["../../src/integrations/runtime-token.ts"],"names":[],"mappings":"AAoCA,+EAA+E;AAC/E,MAAM,WAAW,4BAA4B;IAC3C;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,gFAAgF;AAChF,MAAM,MAAM,2BAA2B,GACnC,MAAM,GACN,CAAC,CACC,OAAO,CAAC,EAAE,4BAA4B,KACnC,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC,CAAA;AAExE,iFAAiF;AACjF,qBAAa,qCAAsC,SAAQ,KAAK;gBAClD,OAAO,EAAE,MAAM;CAI5B;AAID,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,2BAA2B,GAAG,IAAI,GAAG,IAAI,CAE/F;AAED,gFAAgF;AAChF,wBAAgB,8BAA8B,IAAI,2BAA2B,GAAG,IAAI,CAEnF;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,CAAC,EAAE,4BAA4B,GAAG,OAAO,CAAC,MAAM,CAAC,CAenG;AAMD,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAA"}