@relyio/sdk 0.17.0 → 0.18.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 (74) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/automations/index.cjs +70 -0
  3. package/dist/automations/index.d.cts +1309 -0
  4. package/dist/automations/index.d.ts +1309 -0
  5. package/dist/automations/index.js +5 -0
  6. package/dist/{chunk-RSHMA4KT.cjs → chunk-2SPPU2WG.cjs} +68 -68
  7. package/dist/chunk-7I3SC7SV.cjs +40 -0
  8. package/dist/chunk-DI6KFDBO.js +43 -0
  9. package/dist/chunk-EDE2H37D.js +686 -0
  10. package/dist/chunk-HDHBYYEY.js +36 -0
  11. package/dist/{chunk-6E22GYPB.cjs → chunk-IFKF72VJ.cjs} +705 -320
  12. package/dist/chunk-L6DXCKVQ.cjs +50 -0
  13. package/dist/chunk-LSI26ZN2.cjs +535 -0
  14. package/dist/{chunk-TZL374LS.cjs → chunk-M7MWNV3Q.cjs} +21 -21
  15. package/dist/{chunk-H6IBQSMM.js → chunk-NJQK5STK.js} +3 -3
  16. package/dist/chunk-R6E4HE7R.js +520 -0
  17. package/dist/chunk-SHSK7UUY.cjs +706 -0
  18. package/dist/{chunk-BBUB7C2Z.js → chunk-W2A4OTCI.js} +3 -3
  19. package/dist/chunk-W7JFHSFM.js +18718 -0
  20. package/dist/{chunk-5UMY6CS4.js → chunk-ZAKEY6DY.js} +3 -3
  21. package/dist/chunk-ZAMAR3X2.cjs +18759 -0
  22. package/dist/{chunk-VS2DEUTN.js → chunk-ZHTJ7GXH.js} +387 -8
  23. package/dist/{chunk-LSRPMNPT.cjs → chunk-ZO6QDYJG.cjs} +7 -7
  24. package/dist/client/index.cjs +8 -7
  25. package/dist/client/index.d.cts +4 -3
  26. package/dist/client/index.d.ts +4 -3
  27. package/dist/client/index.js +6 -5
  28. package/dist/{define-content-type-AuL9-oz6.d.cts → define-content-type-NEQDrvdq.d.cts} +3342 -805
  29. package/dist/{define-content-type-BGoQxqLf.d.ts → define-content-type-fb-WCD5e.d.ts} +3342 -805
  30. package/dist/{define-schema-DgCX9YB7.d.ts → define-schema-DZhtvLiK.d.cts} +157 -10
  31. package/dist/{define-schema-DkXwpp0I.d.cts → define-schema-Dlwh6l_J.d.ts} +157 -10
  32. package/dist/dev-handshake/index.cjs +9 -9
  33. package/dist/dev-handshake/index.js +2 -2
  34. package/dist/extensions/index.cjs +80 -0
  35. package/dist/extensions/index.d.cts +792 -0
  36. package/dist/extensions/index.d.ts +792 -0
  37. package/dist/extensions/index.js +76 -0
  38. package/dist/functions/index.cjs +68 -0
  39. package/dist/functions/index.d.cts +6 -0
  40. package/dist/functions/index.d.ts +6 -0
  41. package/dist/functions/index.js +59 -0
  42. package/dist/{index-DaMZ4FQ_.d.ts → index-C4LqrNd1.d.ts} +1 -1
  43. package/dist/{index-Bp4AiNT3.d.cts → index-Dnmt_UOo.d.cts} +1 -1
  44. package/dist/{index-DxRmKPrR.d.cts → index-DwHcL6x5.d.cts} +83 -428
  45. package/dist/{index-BBp8_tn9.d.ts → index-M3luH06A.d.ts} +83 -428
  46. package/dist/index.cjs +204 -185
  47. package/dist/index.d.cts +93 -13
  48. package/dist/index.d.ts +93 -13
  49. package/dist/index.js +11 -16
  50. package/dist/markdown/index.cjs +382 -382
  51. package/dist/markdown/index.js +1 -1
  52. package/dist/preview/index.cjs +11 -10
  53. package/dist/preview/index.js +3 -2
  54. package/dist/register-B53i97A9.d.ts +677 -0
  55. package/dist/register-BYCs0FpF.d.cts +677 -0
  56. package/dist/rich-text/index.cjs +12 -12
  57. package/dist/rich-text/index.d.cts +2 -2
  58. package/dist/rich-text/index.d.ts +2 -2
  59. package/dist/rich-text/index.js +2 -2
  60. package/dist/schema/index.cjs +62 -34
  61. package/dist/schema/index.d.cts +127 -5
  62. package/dist/schema/index.d.ts +127 -5
  63. package/dist/schema/index.js +2 -2
  64. package/dist/types/index.d.cts +1 -1
  65. package/dist/types/index.d.ts +1 -1
  66. package/dist/utils/index.cjs +20 -20
  67. package/dist/utils/index.js +2 -2
  68. package/package.json +23 -5
  69. package/dist/chunk-6PTRZP5U.cjs +0 -433
  70. package/dist/chunk-DIZY6CKM.js +0 -950
  71. package/dist/chunk-GHYB6IZK.cjs +0 -983
  72. package/dist/chunk-MWMSFIWN.cjs +0 -17
  73. package/dist/chunk-OVMIHAYK.js +0 -411
  74. package/dist/chunk-XQ4QHWZE.js +0 -13
@@ -0,0 +1,80 @@
1
+ 'use strict';
2
+
3
+ var chunkLSI26ZN2_cjs = require('../chunk-LSI26ZN2.cjs');
4
+ require('../chunk-ZAMAR3X2.cjs');
5
+ var chunkSHSK7UUY_cjs = require('../chunk-SHSK7UUY.cjs');
6
+ var chunkL6DXCKVQ_cjs = require('../chunk-L6DXCKVQ.cjs');
7
+
8
+ /* RelyIO SDK - Built with ❤️ by the RelyIO Team */
9
+
10
+ // src/extensions/index.ts
11
+ var DECLARED = "declared";
12
+ var SURFACES = chunkSHSK7UUY_cjs.EXTENSION_SURFACES;
13
+ function handleOf(slug) {
14
+ const surface = SURFACES[slug];
15
+ if (surface === void 0) {
16
+ throw new TypeError(
17
+ `"${slug}" is no Extension relyio/extensions.ts can declare: ${Object.keys(SURFACES).join(", ")}`
18
+ );
19
+ }
20
+ return {
21
+ ...Object.fromEntries(
22
+ Object.entries(surface.actions).map(([name, { action }]) => [
23
+ name,
24
+ { _tag: "action", extension: slug, action }
25
+ ])
26
+ ),
27
+ ...Object.fromEntries(
28
+ Object.entries(surface.triggers).map(([name, { trigger }]) => [
29
+ name,
30
+ (options) => chunkLSI26ZN2_cjs.extensionTrigger(slug, trigger, options)
31
+ ])
32
+ )
33
+ };
34
+ }
35
+ chunkL6DXCKVQ_cjs.__name(handleOf, "handleOf");
36
+ function settingsOf(slug, settings) {
37
+ if (typeof settings !== "object" || settings === null || Array.isArray(settings)) {
38
+ throw new TypeError(`${slug}'s settings are an object: ${slug}: { \u2026 }`);
39
+ }
40
+ return Object.fromEntries(
41
+ Object.entries(settings).filter(([, value]) => value !== void 0).map(([key, value]) => {
42
+ if (typeof value !== "string") {
43
+ throw new TypeError(`${slug}.${key} is text: a setting is never anything else`);
44
+ }
45
+ return [key, value];
46
+ })
47
+ );
48
+ }
49
+ chunkL6DXCKVQ_cjs.__name(settingsOf, "settingsOf");
50
+ function defineExtensions(config) {
51
+ const slugs = Object.keys(config).filter(
52
+ (slug) => config[slug] !== void 0
53
+ );
54
+ const declared = Object.fromEntries(
55
+ slugs.map((slug) => [
56
+ slug,
57
+ { settings: settingsOf(slug, config[slug]) }
58
+ ])
59
+ );
60
+ return {
61
+ _tag: "extensions",
62
+ [DECLARED]: declared,
63
+ ...Object.fromEntries(slugs.map((slug) => [slug, handleOf(slug)]))
64
+ };
65
+ }
66
+ chunkL6DXCKVQ_cjs.__name(defineExtensions, "defineExtensions");
67
+ function isExtensionsFile(value) {
68
+ return typeof value === "object" && value !== null && value._tag === "extensions" && typeof value[DECLARED] === "object";
69
+ }
70
+ chunkL6DXCKVQ_cjs.__name(isExtensionsFile, "isExtensionsFile");
71
+ function extensionsDeclarationOf(file) {
72
+ return file[DECLARED];
73
+ }
74
+ chunkL6DXCKVQ_cjs.__name(extensionsDeclarationOf, "extensionsDeclarationOf");
75
+
76
+ exports.defineExtensions = defineExtensions;
77
+ exports.extensionsDeclarationOf = extensionsDeclarationOf;
78
+ exports.isExtensionsFile = isExtensionsFile;
79
+ //# sourceMappingURL=index.cjs.map
80
+ //# sourceMappingURL=index.cjs.map