@friggframework/core 2.0.0--canary.690.08cd07e.0 → 2.0.0--canary.693.d8859c2.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 (261) hide show
  1. package/CLAUDE.md +0 -28
  2. package/README.md +0 -105
  3. package/application/commands/integration-commands.js +10 -20
  4. package/application/commands/scheduler-commands.js +7 -11
  5. package/application/commands/user-commands.js +5 -17
  6. package/application/index.js +2 -6
  7. package/core/Worker.js +7 -31
  8. package/core/create-handler.js +0 -9
  9. package/credential/repositories/credential-repository-documentdb.js +0 -34
  10. package/credential/repositories/credential-repository-interface.js +0 -15
  11. package/credential/repositories/credential-repository-mongo.js +0 -23
  12. package/credential/repositories/credential-repository-postgres.js +0 -28
  13. package/database/config.js +24 -48
  14. package/database/documentdb-utils.js +0 -2
  15. package/database/encryption/encryption-schema-registry.js +12 -93
  16. package/database/prisma.js +2 -4
  17. package/errors/index.js +4 -0
  18. package/errors/mapping-already-exists-error.js +14 -0
  19. package/generated/prisma-mongodb/edge.js +38 -33
  20. package/generated/prisma-mongodb/index-browser.js +35 -30
  21. package/generated/prisma-mongodb/index.d.ts +1880 -3191
  22. package/generated/prisma-mongodb/index.js +38 -33
  23. package/generated/prisma-mongodb/package.json +1 -1
  24. package/generated/prisma-mongodb/schema.prisma +50 -86
  25. package/generated/prisma-mongodb/wasm.js +38 -33
  26. package/generated/prisma-postgresql/edge.js +38 -33
  27. package/generated/prisma-postgresql/index-browser.js +35 -30
  28. package/generated/prisma-postgresql/index.d.ts +2050 -3390
  29. package/generated/prisma-postgresql/index.js +38 -33
  30. package/generated/prisma-postgresql/package.json +1 -1
  31. package/generated/prisma-postgresql/schema.prisma +48 -81
  32. package/generated/prisma-postgresql/wasm.js +38 -33
  33. package/handlers/WEBHOOKS.md +29 -0
  34. package/handlers/app-definition-loader.js +19 -128
  35. package/handlers/app-handler-helpers.js +3 -25
  36. package/handlers/backend-utils.js +25 -31
  37. package/handlers/middleware/admin-auth.js +1 -14
  38. package/handlers/routers/auth.js +10 -46
  39. package/handlers/routers/health.js +4 -13
  40. package/handlers/routers/integration-defined-routers.js +92 -144
  41. package/handlers/routers/integration-webhook-routers.js +64 -102
  42. package/handlers/workers/integration-defined-workers.js +2 -5
  43. package/index.js +3 -65
  44. package/infrastructure/scheduler/index.js +6 -19
  45. package/infrastructure/scheduler/scheduler-service-factory.js +7 -55
  46. package/integrations/data-defined/README.md +169 -0
  47. package/integrations/data-defined/canonical.js +11 -0
  48. package/integrations/data-defined/capabilities/acmeerp.capabilities.json +608 -0
  49. package/integrations/data-defined/capabilities/asana.capabilities.json +265 -0
  50. package/integrations/data-defined/capabilities/calendly.capabilities.json +385 -0
  51. package/integrations/data-defined/capabilities/docusign.capabilities.json +314 -0
  52. package/integrations/data-defined/capabilities/fathom.capabilities.json +228 -0
  53. package/integrations/data-defined/capabilities/github.capabilities.json +563 -0
  54. package/integrations/data-defined/capabilities/hubspot.capabilities.json +715 -0
  55. package/integrations/data-defined/capabilities/jira.capabilities.json +376 -0
  56. package/integrations/data-defined/capabilities/klaviyo.capabilities.json +475 -0
  57. package/integrations/data-defined/capabilities/linear.capabilities.json +324 -0
  58. package/integrations/data-defined/capabilities/netsuite.capabilities.json +491 -0
  59. package/integrations/data-defined/capabilities/notion.capabilities.json +208 -0
  60. package/integrations/data-defined/capabilities/phone.capabilities.json +470 -0
  61. package/integrations/data-defined/capabilities/pipedrive.capabilities.json +388 -0
  62. package/integrations/data-defined/capabilities/quickbooks.capabilities.json +615 -0
  63. package/integrations/data-defined/capabilities/salesforce.capabilities.json +507 -0
  64. package/integrations/data-defined/capabilities/shopify.capabilities.json +1082 -0
  65. package/integrations/data-defined/capabilities/slack.capabilities.json +363 -0
  66. package/integrations/data-defined/capabilities/stripe.capabilities.json +580 -0
  67. package/integrations/data-defined/capabilities/webflow.capabilities.json +196 -0
  68. package/integrations/data-defined/capabilities/zendesk.capabilities.json +409 -0
  69. package/integrations/data-defined/compile.js +77 -0
  70. package/integrations/data-defined/config-form.js +110 -0
  71. package/integrations/data-defined/data-defined-integration.js +366 -0
  72. package/integrations/data-defined/examples/acme-erp-quickbooks.definition.json +467 -0
  73. package/integrations/data-defined/examples/asana-slack.definition.json +220 -0
  74. package/integrations/data-defined/examples/calendly-salesforce.definition.json +459 -0
  75. package/integrations/data-defined/examples/docusign-salesforce.definition.json +305 -0
  76. package/integrations/data-defined/examples/fathom-hubspot-notion.definition.json +575 -0
  77. package/integrations/data-defined/examples/github-linear.definition.json +316 -0
  78. package/integrations/data-defined/examples/hubspot-slack.definition.json +409 -0
  79. package/integrations/data-defined/examples/klaviyo-hubspot.definition.json +339 -0
  80. package/integrations/data-defined/examples/phone-hubspot.definition.json +637 -0
  81. package/integrations/data-defined/examples/pipedrive-hubspot.definition.json +136 -0
  82. package/integrations/data-defined/examples/pipedrive-phone.definition.json +340 -0
  83. package/integrations/data-defined/examples/records/phone-hubspot.definition-version.json +652 -0
  84. package/integrations/data-defined/examples/records/phone-hubspot.integration.json +86 -0
  85. package/integrations/data-defined/examples/records/phone-hubspot.mappings.json +39 -0
  86. package/integrations/data-defined/examples/records/phone-hubspot.workflow-run.json +62 -0
  87. package/integrations/data-defined/examples/shopify-klaviyo.definition.json +488 -0
  88. package/integrations/data-defined/examples/shopify-netsuite.definition.json +622 -0
  89. package/integrations/data-defined/examples/stripe-quickbooks.definition.json +476 -0
  90. package/integrations/data-defined/examples/webflow-hubspot-slack.definition.json +262 -0
  91. package/integrations/data-defined/examples/zendesk-jira.definition.json +604 -0
  92. package/integrations/data-defined/expressions.js +225 -0
  93. package/integrations/data-defined/index.js +39 -0
  94. package/integrations/data-defined/interpreter.js +89 -0
  95. package/integrations/data-defined/manifests.js +125 -0
  96. package/integrations/data-defined/repositories/definition-version-repository.js +67 -0
  97. package/integrations/data-defined/repositories/workflow-run-repository.js +59 -0
  98. package/integrations/data-defined/router.js +97 -0
  99. package/integrations/data-defined/runtime.js +208 -0
  100. package/integrations/data-defined/schema/capability-manifest.v0.1.schema.json +377 -0
  101. package/integrations/data-defined/schema/installation.v0.1.schema.json +83 -0
  102. package/integrations/data-defined/schema/integration-definition.v0.1.schema.json +848 -0
  103. package/integrations/data-defined/schema/records.md +98 -0
  104. package/integrations/data-defined/schema-check.js +58 -0
  105. package/integrations/data-defined/scripts/validate.js +66 -0
  106. package/integrations/data-defined/steps.js +89 -0
  107. package/integrations/data-defined/transforms.js +91 -0
  108. package/integrations/data-defined/use-cases/definition-use-cases.js +187 -0
  109. package/integrations/data-defined/validate.js +370 -0
  110. package/integrations/data-defined/versioning.js +161 -0
  111. package/integrations/data-defined/webhooks.js +119 -0
  112. package/integrations/index.js +0 -1
  113. package/integrations/integration-base.js +29 -0
  114. package/integrations/integration-router.js +101 -131
  115. package/integrations/repositories/integration-mapping-repository-documentdb.js +50 -0
  116. package/integrations/repositories/integration-mapping-repository-interface.js +15 -0
  117. package/integrations/repositories/integration-mapping-repository-mongo.js +29 -0
  118. package/integrations/repositories/integration-mapping-repository-postgres.js +30 -0
  119. package/integrations/repositories/integration-mapping-repository.js +29 -0
  120. package/integrations/repositories/integration-repository-documentdb.js +3 -35
  121. package/integrations/repositories/integration-repository-interface.js +1 -17
  122. package/integrations/repositories/integration-repository-mongo.js +77 -60
  123. package/integrations/repositories/integration-repository-postgres.js +76 -62
  124. package/integrations/repositories/process-repository-mongo.js +1 -1
  125. package/integrations/tests/doubles/test-integration-repository.js +1 -12
  126. package/integrations/use-cases/create-integration.js +20 -55
  127. package/integrations/use-cases/get-integrations-for-user.js +40 -80
  128. package/integrations/use-cases/index.js +1 -7
  129. package/integrations/utils/map-integration-dto.js +14 -43
  130. package/modules/index.js +0 -14
  131. package/modules/module-factory.js +0 -12
  132. package/modules/module.js +2 -53
  133. package/modules/repositories/module-repository-documentdb.js +6 -51
  134. package/modules/repositories/module-repository-interface.js +2 -19
  135. package/modules/repositories/module-repository-mongo.js +74 -67
  136. package/modules/repositories/module-repository-postgres.js +74 -66
  137. package/modules/repositories/module-repository.js +1 -2
  138. package/modules/requester/requester.js +5 -35
  139. package/modules/use-cases/get-entities-for-user.js +13 -26
  140. package/modules/use-cases/get-entity-options-by-id.js +4 -10
  141. package/modules/use-cases/get-entity-options-by-type.js +1 -1
  142. package/modules/use-cases/get-module-instance-from-type.js +1 -1
  143. package/modules/use-cases/get-module.js +4 -10
  144. package/modules/use-cases/process-authorization-callback.js +19 -53
  145. package/modules/use-cases/refresh-entity-options.js +4 -10
  146. package/modules/use-cases/test-module-auth.js +4 -10
  147. package/package.json +6 -6
  148. package/prisma-mongodb/schema.prisma +50 -86
  149. package/prisma-postgresql/migrations/20261018000000_add_data_defined_integrations/migration.sql +66 -0
  150. package/prisma-postgresql/schema.prisma +48 -81
  151. package/queues/index.js +0 -25
  152. package/types/index.d.ts +0 -2
  153. package/user/repositories/user-repository-documentdb.js +2 -27
  154. package/user/repositories/user-repository-interface.js +0 -18
  155. package/user/repositories/user-repository-mongo.js +0 -24
  156. package/user/repositories/user-repository-postgres.js +0 -18
  157. package/user/use-cases/authenticate-user.js +1 -7
  158. package/user/use-cases/get-user-from-adopter-jwt.js +124 -95
  159. package/user/use-cases/get-user-from-x-frigg-headers.js +80 -83
  160. package/user/user.js +1 -64
  161. package/credential/use-cases/credential-operations-for-user.js +0 -202
  162. package/credential/use-cases/reauthorize-credential-for-user.js +0 -73
  163. package/database/organization-where.js +0 -18
  164. package/database/unique-violation.js +0 -25
  165. package/extensions/bootstrap-runner.js +0 -43
  166. package/extensions/extension-loader.js +0 -187
  167. package/extensions/index.js +0 -41
  168. package/extensions/initialize-app.js +0 -123
  169. package/extensions/route-mounter.js +0 -103
  170. package/extensions/schema-composer.js +0 -188
  171. package/infrastructure/scheduler/netlify-scheduler-adapter.js +0 -216
  172. package/infrastructure/scheduler/scheduled-job-repository.js +0 -118
  173. package/integrations/repositories/integration-not-found.js +0 -14
  174. package/integrations/schedule-config.js +0 -80
  175. package/integrations/use-cases/dispatch-ongoing-syncs.js +0 -100
  176. package/integrations/use-cases/integration-operations-for-user.js +0 -256
  177. package/integrations/use-cases/resolve-integration-ownership.js +0 -177
  178. package/management-api/create-management-api-router.js +0 -49
  179. package/management-api/error-response.js +0 -116
  180. package/management-api/management-api-config.js +0 -151
  181. package/management-api/meta-router.js +0 -76
  182. package/management-api/openapi/build-openapi.js +0 -144
  183. package/management-api/openapi/components.js +0 -415
  184. package/management-api/openapi/v1-operations.js +0 -83
  185. package/management-api/openapi/v2-operations.js +0 -264
  186. package/management-api/route-registry.js +0 -411
  187. package/management-api/test-support/http-client.js +0 -39
  188. package/management-api/use-cases/get-management-api-meta.js +0 -57
  189. package/management-api/v1-deprecation.js +0 -120
  190. package/management-api/v2/create-v2-router.js +0 -85
  191. package/management-api/v2/dependencies.js +0 -281
  192. package/management-api/v2/dto.js +0 -143
  193. package/management-api/v2/handlers/authorization.js +0 -94
  194. package/management-api/v2/handlers/credentials.js +0 -33
  195. package/management-api/v2/handlers/entities.js +0 -77
  196. package/management-api/v2/handlers/integrations.js +0 -128
  197. package/management-api/v2/handlers/proxy.js +0 -34
  198. package/management-api/v2/request.js +0 -85
  199. package/management-api/v2/test-support/fake-dependencies.js +0 -103
  200. package/modules/domain/authorization-session.js +0 -144
  201. package/modules/entity-scope.js +0 -15
  202. package/modules/entity-type-registry.js +0 -311
  203. package/modules/proxy/proxy-bases.js +0 -169
  204. package/modules/proxy/proxy-errors.js +0 -31
  205. package/modules/proxy/proxy-path.js +0 -183
  206. package/modules/proxy/proxy-policy.js +0 -277
  207. package/modules/repositories/authorization-session-repository-documentdb.js +0 -112
  208. package/modules/repositories/authorization-session-repository-factory.js +0 -31
  209. package/modules/repositories/authorization-session-repository-interface.js +0 -47
  210. package/modules/repositories/authorization-session-repository-prisma.js +0 -87
  211. package/modules/repositories/entity-not-found.js +0 -18
  212. package/modules/requester/proxy-request.js +0 -245
  213. package/modules/scope-config.js +0 -192
  214. package/modules/scope-policy.js +0 -112
  215. package/modules/scope-resolution.js +0 -288
  216. package/modules/scope-visibility.js +0 -247
  217. package/modules/tests/doubles/in-memory-authorization-session-repository.js +0 -45
  218. package/modules/tests/doubles/ownership-matching.js +0 -18
  219. package/modules/use-cases/authorize-entity-for-user.js +0 -61
  220. package/modules/use-cases/create-entity-from-credential.js +0 -113
  221. package/modules/use-cases/entity-operations-for-user.js +0 -162
  222. package/modules/use-cases/entity-types.js +0 -139
  223. package/modules/use-cases/execute-entity-proxy-request.js +0 -331
  224. package/modules/use-cases/get-authorization-requirements.js +0 -100
  225. package/modules/use-cases/get-entity-module-for-user.js +0 -113
  226. package/modules/use-cases/manage-access.js +0 -21
  227. package/modules/use-cases/multi-step-authorization.js +0 -329
  228. package/prisma-postgresql/migrations/20261003000000_add_authorization_session/migration.sql +0 -28
  229. package/prisma-postgresql/migrations/20261015000000_add_organization_membership/migration.sql +0 -26
  230. package/prisma-postgresql/migrations/20261016000000_add_entity_integration_organization/migration.sql +0 -25
  231. package/prisma-postgresql/migrations/20261017000000_add_scheduled_job/migration.sql +0 -28
  232. package/providers/index.js +0 -23
  233. package/providers/resolve-provider.js +0 -93
  234. package/providers/runtime-detection.js +0 -124
  235. package/queues/providers/index.js +0 -11
  236. package/queues/providers/netlify-background-provider.js +0 -150
  237. package/queues/providers/qstash-queue-provider.js +0 -219
  238. package/queues/providers/sqs-queue-provider.js +0 -70
  239. package/queues/queue-client-interface.js +0 -55
  240. package/queues/queue-message-auth.js +0 -193
  241. package/queues/queue-provider-factory.js +0 -101
  242. package/queues/queue-provider.js +0 -65
  243. package/queues/sqs-queue-client.js +0 -81
  244. package/types/modules/index.d.ts +0 -214
  245. package/types/user/index.d.ts +0 -134
  246. package/user/adopter-jwt-config.js +0 -177
  247. package/user/adopter-jwt-errors.js +0 -59
  248. package/user/adopter-token-verifier.js +0 -122
  249. package/user/app-user-helpers.js +0 -97
  250. package/user/create-user-authentication.js +0 -64
  251. package/user/membership.js +0 -51
  252. package/user/repositories/organization-membership-record.js +0 -19
  253. package/user/repositories/organization-membership-repository-documentdb.js +0 -106
  254. package/user/repositories/organization-membership-repository-factory.js +0 -42
  255. package/user/repositories/organization-membership-repository-interface.js +0 -57
  256. package/user/repositories/organization-membership-repository-mongo.js +0 -13
  257. package/user/repositories/organization-membership-repository-postgres.js +0 -29
  258. package/user/repositories/organization-membership-repository-prisma.js +0 -81
  259. package/user/tests/doubles/adopter-jwt-fixtures.js +0 -220
  260. package/user/use-cases/ensure-organization-membership.js +0 -92
  261. package/user/use-cases/find-individual-users-by-organization.js +0 -54
@@ -0,0 +1,491 @@
1
+ {
2
+ "$schema": "https://friggframework.org/schemas/capability-manifest/v0.1.json",
3
+ "module": "netsuite",
4
+ "label": "NetSuite",
5
+ "package": "@friggframework/api-module-netsuite",
6
+ "version": "1.2.0",
7
+ "auth": "oauth2",
8
+ "objects": {
9
+ "customer": {
10
+ "label": "Customer",
11
+ "fields": [
12
+ {
13
+ "name": "id",
14
+ "type": "id",
15
+ "readOnly": true
16
+ },
17
+ {
18
+ "name": "entityId",
19
+ "type": "string",
20
+ "tag": "record.displayId",
21
+ "readOnly": true
22
+ },
23
+ {
24
+ "name": "externalId",
25
+ "type": "string",
26
+ "tag": "record.externalId"
27
+ },
28
+ {
29
+ "name": "isPerson",
30
+ "type": "boolean"
31
+ },
32
+ {
33
+ "name": "firstName",
34
+ "type": "string",
35
+ "tag": "person.givenName"
36
+ },
37
+ {
38
+ "name": "lastName",
39
+ "type": "string",
40
+ "tag": "person.familyName"
41
+ },
42
+ {
43
+ "name": "companyName",
44
+ "type": "string",
45
+ "tag": "organization.name"
46
+ },
47
+ {
48
+ "name": "email",
49
+ "type": "email",
50
+ "tag": "contact.email"
51
+ },
52
+ {
53
+ "name": "phone",
54
+ "type": "phone",
55
+ "tag": "contact.phone"
56
+ },
57
+ {
58
+ "name": "subsidiary.id",
59
+ "type": "string"
60
+ },
61
+ {
62
+ "name": "dateCreated",
63
+ "type": "datetime",
64
+ "tag": "record.createdAt",
65
+ "readOnly": true
66
+ },
67
+ {
68
+ "name": "lastModifiedDate",
69
+ "type": "datetime",
70
+ "tag": "record.updatedAt",
71
+ "readOnly": true
72
+ }
73
+ ]
74
+ },
75
+ "salesOrder": {
76
+ "label": "Sales order",
77
+ "fields": [
78
+ {
79
+ "name": "id",
80
+ "type": "id",
81
+ "readOnly": true
82
+ },
83
+ {
84
+ "name": "tranId",
85
+ "type": "string",
86
+ "tag": "record.displayId",
87
+ "readOnly": true
88
+ },
89
+ {
90
+ "name": "externalId",
91
+ "type": "string",
92
+ "tag": "record.externalId"
93
+ },
94
+ {
95
+ "name": "otherRefNum",
96
+ "type": "string",
97
+ "tag": "order.number"
98
+ },
99
+ {
100
+ "name": "entity.id",
101
+ "type": "string"
102
+ },
103
+ {
104
+ "name": "subsidiary.id",
105
+ "type": "string"
106
+ },
107
+ {
108
+ "name": "location.id",
109
+ "type": "string"
110
+ },
111
+ {
112
+ "name": "tranDate",
113
+ "type": "date",
114
+ "tag": "order.createdAt"
115
+ },
116
+ {
117
+ "name": "memo",
118
+ "type": "text"
119
+ },
120
+ {
121
+ "name": "email",
122
+ "type": "email",
123
+ "tag": "contact.email"
124
+ },
125
+ {
126
+ "name": "currency.refName",
127
+ "type": "string",
128
+ "tag": "order.currency"
129
+ },
130
+ {
131
+ "name": "subtotal",
132
+ "type": "number",
133
+ "tag": "order.subtotal",
134
+ "readOnly": true
135
+ },
136
+ {
137
+ "name": "taxTotal",
138
+ "type": "number",
139
+ "tag": "order.tax",
140
+ "readOnly": true
141
+ },
142
+ {
143
+ "name": "total",
144
+ "type": "number",
145
+ "tag": "order.total",
146
+ "readOnly": true
147
+ },
148
+ {
149
+ "name": "orderStatus",
150
+ "type": "enum",
151
+ "tag": "order.status",
152
+ "values": [
153
+ "A",
154
+ "B",
155
+ "C",
156
+ "D",
157
+ "E",
158
+ "F",
159
+ "G",
160
+ "H"
161
+ ]
162
+ },
163
+ {
164
+ "name": "item.items",
165
+ "type": "lineItem[]",
166
+ "tag": "order.lineItems"
167
+ }
168
+ ]
169
+ },
170
+ "itemFulfillment": {
171
+ "label": "Item fulfillment",
172
+ "fields": [
173
+ {
174
+ "name": "id",
175
+ "type": "id",
176
+ "readOnly": true
177
+ },
178
+ {
179
+ "name": "tranId",
180
+ "type": "string",
181
+ "tag": "record.displayId",
182
+ "readOnly": true
183
+ },
184
+ {
185
+ "name": "createdFrom.id",
186
+ "type": "string"
187
+ },
188
+ {
189
+ "name": "tranDate",
190
+ "type": "date"
191
+ },
192
+ {
193
+ "name": "shipStatus",
194
+ "type": "enum",
195
+ "values": [
196
+ "_picked",
197
+ "_packed",
198
+ "_shipped"
199
+ ]
200
+ },
201
+ {
202
+ "name": "package.packages",
203
+ "type": "json",
204
+ "tag": "shipment.packages"
205
+ },
206
+ {
207
+ "name": "memo",
208
+ "type": "text"
209
+ }
210
+ ]
211
+ },
212
+ "creditMemo": {
213
+ "label": "Credit memo",
214
+ "fields": [
215
+ {
216
+ "name": "id",
217
+ "type": "id",
218
+ "readOnly": true
219
+ },
220
+ {
221
+ "name": "tranId",
222
+ "type": "string",
223
+ "tag": "record.displayId",
224
+ "readOnly": true
225
+ },
226
+ {
227
+ "name": "externalId",
228
+ "type": "string",
229
+ "tag": "record.externalId"
230
+ },
231
+ {
232
+ "name": "entity.id",
233
+ "type": "string"
234
+ },
235
+ {
236
+ "name": "createdFrom.id",
237
+ "type": "string"
238
+ },
239
+ {
240
+ "name": "tranDate",
241
+ "type": "date"
242
+ },
243
+ {
244
+ "name": "memo",
245
+ "type": "text"
246
+ },
247
+ {
248
+ "name": "total",
249
+ "type": "number",
250
+ "readOnly": true
251
+ },
252
+ {
253
+ "name": "item.items",
254
+ "type": "lineItem[]"
255
+ }
256
+ ]
257
+ }
258
+ },
259
+ "events": {
260
+ "itemFulfillment.created": {
261
+ "delivery": "poll",
262
+ "object": "itemFulfillment",
263
+ "description": "Polled with SuiteQL on transaction.lastModifiedDate. NetSuite has no outbound webhooks without a deployed SuiteScript.",
264
+ "payload": {
265
+ "id": "88120",
266
+ "tranId": "IF-10391",
267
+ "createdFrom": {
268
+ "id": "87904",
269
+ "refName": "Sales Order #SO-20455"
270
+ },
271
+ "tranDate": "2026-10-19",
272
+ "shipStatus": "_shipped",
273
+ "package": {
274
+ "packages": [
275
+ {
276
+ "packageTrackingNumber": "1Z999AA10123456784",
277
+ "packageWeight": 2.1,
278
+ "packageDescr": "Box 1 of 1"
279
+ }
280
+ ]
281
+ },
282
+ "lastModifiedDate": "2026-10-19T19:02:11Z"
283
+ }
284
+ },
285
+ "customer.updated": {
286
+ "delivery": "poll",
287
+ "object": "customer",
288
+ "description": "Polled with SuiteQL on customer.lastModifiedDate.",
289
+ "payload": {
290
+ "id": "40211",
291
+ "entityId": "CUST-40211",
292
+ "email": "dana.reyes@example.com",
293
+ "firstName": "Dana",
294
+ "lastName": "Reyes",
295
+ "companyName": "Reyes Coffee Co",
296
+ "lastModifiedDate": "2026-10-18T15:00:00Z"
297
+ }
298
+ }
299
+ },
300
+ "capabilities": {
301
+ "customer.get": {
302
+ "kind": "read",
303
+ "method": "getCustomer",
304
+ "input": {
305
+ "id": {
306
+ "type": "string",
307
+ "required": true
308
+ }
309
+ },
310
+ "output": "customer"
311
+ },
312
+ "customer.search": {
313
+ "kind": "search",
314
+ "method": "searchCustomers",
315
+ "input": {
316
+ "email": {
317
+ "type": "string"
318
+ },
319
+ "externalId": {
320
+ "type": "string"
321
+ }
322
+ },
323
+ "output": "customer[]"
324
+ },
325
+ "customer.list": {
326
+ "kind": "read",
327
+ "method": "listCustomers",
328
+ "input": {
329
+ "lastModifiedAfter": {
330
+ "type": "string"
331
+ },
332
+ "limit": {
333
+ "type": "number"
334
+ },
335
+ "offset": {
336
+ "type": "number"
337
+ }
338
+ },
339
+ "output": "page<customer>"
340
+ },
341
+ "customer.create": {
342
+ "kind": "write",
343
+ "method": "createCustomer",
344
+ "input": {
345
+ "record": {
346
+ "type": "object",
347
+ "required": true
348
+ }
349
+ },
350
+ "output": "customer"
351
+ },
352
+ "customer.update": {
353
+ "kind": "write",
354
+ "method": "updateCustomer",
355
+ "input": {
356
+ "id": {
357
+ "type": "string",
358
+ "required": true
359
+ },
360
+ "record": {
361
+ "type": "object",
362
+ "required": true
363
+ }
364
+ },
365
+ "output": "customer"
366
+ },
367
+ "salesOrder.create": {
368
+ "kind": "write",
369
+ "method": "createSalesOrder",
370
+ "input": {
371
+ "record": {
372
+ "type": "object",
373
+ "required": true
374
+ }
375
+ },
376
+ "output": "salesOrder"
377
+ },
378
+ "salesOrder.get": {
379
+ "kind": "read",
380
+ "method": "getSalesOrder",
381
+ "input": {
382
+ "id": {
383
+ "type": "string",
384
+ "required": true
385
+ },
386
+ "expandSubResources": {
387
+ "type": "boolean"
388
+ }
389
+ },
390
+ "output": "salesOrder"
391
+ },
392
+ "salesOrder.update": {
393
+ "kind": "write",
394
+ "method": "updateSalesOrder",
395
+ "input": {
396
+ "id": {
397
+ "type": "string",
398
+ "required": true
399
+ },
400
+ "record": {
401
+ "type": "object",
402
+ "required": true
403
+ }
404
+ },
405
+ "output": "salesOrder"
406
+ },
407
+ "salesOrder.search": {
408
+ "kind": "search",
409
+ "method": "searchSalesOrders",
410
+ "input": {
411
+ "otherRefNum": {
412
+ "type": "string"
413
+ },
414
+ "externalId": {
415
+ "type": "string"
416
+ }
417
+ },
418
+ "output": "salesOrder[]"
419
+ },
420
+ "creditMemo.create": {
421
+ "kind": "write",
422
+ "method": "createCreditMemo",
423
+ "input": {
424
+ "record": {
425
+ "type": "object",
426
+ "required": true
427
+ }
428
+ },
429
+ "output": "creditMemo"
430
+ },
431
+ "itemFulfillment.get": {
432
+ "kind": "read",
433
+ "method": "getItemFulfillment",
434
+ "input": {
435
+ "id": {
436
+ "type": "string",
437
+ "required": true
438
+ }
439
+ },
440
+ "output": "itemFulfillment"
441
+ },
442
+ "itemFulfillment.list": {
443
+ "kind": "read",
444
+ "method": "listItemFulfillments",
445
+ "input": {
446
+ "modifiedAfter": {
447
+ "type": "string"
448
+ },
449
+ "limit": {
450
+ "type": "number"
451
+ }
452
+ },
453
+ "output": "itemFulfillment[]"
454
+ },
455
+ "item.search": {
456
+ "kind": "search",
457
+ "method": "searchItems",
458
+ "input": {
459
+ "sku": {
460
+ "type": "string",
461
+ "required": true
462
+ }
463
+ },
464
+ "output": "item[]"
465
+ },
466
+ "subsidiary.list": {
467
+ "kind": "read",
468
+ "method": "listSubsidiaries",
469
+ "input": {},
470
+ "output": "subsidiary[]"
471
+ },
472
+ "location.list": {
473
+ "kind": "read",
474
+ "method": "listLocations",
475
+ "input": {},
476
+ "output": "location[]"
477
+ }
478
+ },
479
+ "options": {
480
+ "subsidiary": {
481
+ "capability": "subsidiary.list",
482
+ "label": "{{item.name}}",
483
+ "value": "$.item.id"
484
+ },
485
+ "location": {
486
+ "capability": "location.list",
487
+ "label": "{{item.name}}",
488
+ "value": "$.item.id"
489
+ }
490
+ }
491
+ }
@@ -0,0 +1,208 @@
1
+ {
2
+ "$schema": "https://friggframework.org/schemas/capability-manifest/v0.1.json",
3
+ "module": "notion",
4
+ "label": "Notion",
5
+ "package": "@friggframework/api-module-notion",
6
+ "version": "1.3.0",
7
+ "auth": "oauth2",
8
+ "objects": {
9
+ "page": {
10
+ "label": "Page",
11
+ "fields": [
12
+ {
13
+ "name": "id",
14
+ "type": "id",
15
+ "readOnly": true
16
+ },
17
+ {
18
+ "name": "parent.database_id",
19
+ "type": "string"
20
+ },
21
+ {
22
+ "name": "properties",
23
+ "type": "json"
24
+ },
25
+ {
26
+ "name": "url",
27
+ "type": "string",
28
+ "tag": "record.url",
29
+ "readOnly": true
30
+ },
31
+ {
32
+ "name": "created_time",
33
+ "type": "datetime",
34
+ "tag": "record.createdAt",
35
+ "readOnly": true
36
+ },
37
+ {
38
+ "name": "last_edited_time",
39
+ "type": "datetime",
40
+ "tag": "record.updatedAt",
41
+ "readOnly": true
42
+ },
43
+ {
44
+ "name": "archived",
45
+ "type": "boolean"
46
+ }
47
+ ]
48
+ },
49
+ "database": {
50
+ "label": "Database",
51
+ "fields": [
52
+ {
53
+ "name": "id",
54
+ "type": "id",
55
+ "readOnly": true
56
+ },
57
+ {
58
+ "name": "title",
59
+ "type": "richText"
60
+ },
61
+ {
62
+ "name": "properties",
63
+ "type": "json",
64
+ "readOnly": true
65
+ },
66
+ {
67
+ "name": "url",
68
+ "type": "string",
69
+ "readOnly": true
70
+ }
71
+ ]
72
+ }
73
+ },
74
+ "events": {
75
+ "page.created": {
76
+ "delivery": "webhook",
77
+ "object": "page",
78
+ "description": "Integration webhook (configured once on the public integration); routed by workspace_id.",
79
+ "payload": {
80
+ "id": "7f2c3b8a-91c5-4b1d-8e0f-2a6f1d3c9e41",
81
+ "timestamp": "2026-10-20T15:50:02.000Z",
82
+ "workspace_id": "13950b26-c203-4f3b-b97d-93ec06319565",
83
+ "subscription_id": "29d75c0d-5546-4414-8459-7b7a92f1fc4b",
84
+ "integration_id": "0ef104cd-477e-4c15-a1e4-5c1bd3dbd0a0",
85
+ "type": "page.created",
86
+ "entity": {
87
+ "id": "153104cd-477e-809d-8dc4-ff2d96ae3090",
88
+ "type": "page"
89
+ },
90
+ "data": {
91
+ "parent": {
92
+ "id": "13950b26-c203-4f3b-b97d-93ec06319565",
93
+ "type": "database"
94
+ }
95
+ }
96
+ },
97
+ "record": "entity"
98
+ }
99
+ },
100
+ "webhook": {
101
+ "scope": "app",
102
+ "topic": "{{body.type}}",
103
+ "eventId": "{{body.id}}",
104
+ "account": "{{body.workspace_id}}",
105
+ "verify": "verifyWebhookSignature"
106
+ },
107
+ "capabilities": {
108
+ "page.create": {
109
+ "kind": "write",
110
+ "method": "createPage",
111
+ "input": {
112
+ "parent": {
113
+ "type": "object",
114
+ "required": true
115
+ },
116
+ "properties": {
117
+ "type": "object",
118
+ "required": true
119
+ },
120
+ "children": {
121
+ "type": "array"
122
+ },
123
+ "icon": {
124
+ "type": "object"
125
+ }
126
+ },
127
+ "output": "page"
128
+ },
129
+ "page.get": {
130
+ "kind": "read",
131
+ "method": "retrievePage",
132
+ "input": {
133
+ "pageId": {
134
+ "type": "string",
135
+ "required": true
136
+ }
137
+ },
138
+ "output": "page"
139
+ },
140
+ "page.update": {
141
+ "kind": "write",
142
+ "method": "updatePage",
143
+ "input": {
144
+ "pageId": {
145
+ "type": "string",
146
+ "required": true
147
+ },
148
+ "properties": {
149
+ "type": "object",
150
+ "required": true
151
+ }
152
+ },
153
+ "output": "page"
154
+ },
155
+ "block.append": {
156
+ "kind": "write",
157
+ "method": "appendBlockChildren",
158
+ "input": {
159
+ "blockId": {
160
+ "type": "string",
161
+ "required": true
162
+ },
163
+ "children": {
164
+ "type": "array",
165
+ "required": true
166
+ }
167
+ },
168
+ "output": "block[]"
169
+ },
170
+ "database.query": {
171
+ "kind": "search",
172
+ "method": "queryDatabase",
173
+ "input": {
174
+ "databaseId": {
175
+ "type": "string",
176
+ "required": true
177
+ },
178
+ "filter": {
179
+ "type": "object"
180
+ },
181
+ "sorts": {
182
+ "type": "array"
183
+ },
184
+ "pageSize": {
185
+ "type": "number"
186
+ }
187
+ },
188
+ "output": "page[]"
189
+ },
190
+ "database.list": {
191
+ "kind": "read",
192
+ "method": "searchDatabases",
193
+ "input": {
194
+ "query": {
195
+ "type": "string"
196
+ }
197
+ },
198
+ "output": "database[]"
199
+ }
200
+ },
201
+ "options": {
202
+ "database": {
203
+ "capability": "database.list",
204
+ "label": "{{item.title[0].plain_text}}",
205
+ "value": "$.item.id"
206
+ }
207
+ }
208
+ }