@webiny/webhooks 0.0.0-unstable.7be00a75a9 → 0.0.0-unstable.7c2def32a7

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 (130) hide show
  1. package/admin/WebhookRoutes.js +27 -17
  2. package/admin/WebhookRoutes.js.map +1 -1
  3. package/admin/Webhooks.js +0 -3
  4. package/admin/Webhooks.js.map +1 -1
  5. package/admin/features/ListWebhooks/ListWebhooksGateway.js +8 -2
  6. package/admin/features/ListWebhooks/ListWebhooksGateway.js.map +1 -1
  7. package/admin/features/ListWebhooks/abstractions.d.ts +1 -0
  8. package/admin/features/ListWebhooks/abstractions.js.map +1 -1
  9. package/admin/features/permissions/feature.d.ts +1 -1
  10. package/admin/presentation/{WebhookDeliveries → WebhookDeliveriesPage}/WebhookDeliveriesDataSource.d.ts +2 -3
  11. package/admin/presentation/{WebhookDeliveries → WebhookDeliveriesPage}/WebhookDeliveriesDataSource.js +5 -7
  12. package/admin/presentation/WebhookDeliveriesPage/WebhookDeliveriesDataSource.js.map +1 -0
  13. package/admin/presentation/WebhookDeliveriesPage/WebhookDeliveriesPagePresenter.d.ts +9 -5
  14. package/admin/presentation/WebhookDeliveriesPage/WebhookDeliveriesPagePresenter.js +67 -40
  15. package/admin/presentation/WebhookDeliveriesPage/WebhookDeliveriesPagePresenter.js.map +1 -1
  16. package/admin/presentation/WebhookDeliveriesPage/abstractions.d.ts +6 -3
  17. package/admin/presentation/WebhookDeliveriesPage/abstractions.js.map +1 -1
  18. package/admin/presentation/WebhookDeliveriesPage/components/DeliveryAccordionRow.js.map +1 -0
  19. package/admin/presentation/WebhookDeliveriesPage/components/DeliveryBottomInfoBar.d.ts +2 -2
  20. package/admin/presentation/WebhookDeliveriesPage/components/DeliveryDetailContent.js.map +1 -0
  21. package/admin/presentation/WebhookDeliveriesPage/components/DeliveryFilters.d.ts +2 -2
  22. package/admin/presentation/WebhookDeliveriesPage/components/DeliveryFilters.js +50 -18
  23. package/admin/presentation/WebhookDeliveriesPage/components/DeliveryFilters.js.map +1 -1
  24. package/admin/presentation/WebhookDeliveriesPage/components/DeliveryList.d.ts +2 -2
  25. package/admin/presentation/WebhookDeliveriesPage/components/DeliveryList.js +24 -8
  26. package/admin/presentation/WebhookDeliveriesPage/components/DeliveryList.js.map +1 -1
  27. package/admin/presentation/WebhookDeliveriesPage/components/WebhookDefinitionsButton.d.ts +2 -0
  28. package/admin/presentation/WebhookDeliveriesPage/components/WebhookDefinitionsButton.js +16 -0
  29. package/admin/presentation/WebhookDeliveriesPage/components/WebhookDefinitionsButton.js.map +1 -0
  30. package/admin/presentation/WebhookDeliveriesPage/components/WebhookDeliveriesPage.js +26 -17
  31. package/admin/presentation/WebhookDeliveriesPage/components/WebhookDeliveriesPage.js.map +1 -1
  32. package/admin/presentation/WebhookDeliveriesPage/components/statusVariant.d.ts +1 -0
  33. package/admin/presentation/WebhookDeliveriesPage/components/statusVariant.js.map +1 -0
  34. package/admin/presentation/WebhookForm/WebhookFormPresenter.d.ts +1 -4
  35. package/admin/presentation/WebhookForm/WebhookFormPresenter.js +8 -12
  36. package/admin/presentation/WebhookForm/WebhookFormPresenter.js.map +1 -1
  37. package/admin/presentation/WebhookForm/abstractions.d.ts +1 -4
  38. package/admin/presentation/WebhookForm/abstractions.js.map +1 -1
  39. package/admin/presentation/WebhookForm/components/SigningSecret.d.ts +2 -2
  40. package/admin/presentation/WebhookForm/components/WebhookFormView.js +34 -36
  41. package/admin/presentation/WebhookForm/components/WebhookFormView.js.map +1 -1
  42. package/admin/presentation/WebhookList/WebhookListDataSource.d.ts +7 -8
  43. package/admin/presentation/WebhookList/WebhookListDataSource.js +23 -50
  44. package/admin/presentation/WebhookList/WebhookListDataSource.js.map +1 -1
  45. package/admin/presentation/WebhookList/components/WebhookDeliveriesButton.d.ts +2 -0
  46. package/admin/presentation/WebhookList/components/WebhookDeliveriesButton.js +16 -0
  47. package/admin/presentation/WebhookList/components/WebhookDeliveriesButton.js.map +1 -0
  48. package/admin/presentation/WebhookList/components/WebhookListContent.d.ts +2 -2
  49. package/admin/presentation/WebhookList/components/WebhookListContent.js +20 -8
  50. package/admin/presentation/WebhookList/components/WebhookListContent.js.map +1 -1
  51. package/admin/presentation/WebhookList/components/WebhookListView.js +4 -1
  52. package/admin/presentation/WebhookList/components/WebhookListView.js.map +1 -1
  53. package/admin/presentation/WebhookSettings/WebhookSettingsPresenter.js +3 -1
  54. package/admin/presentation/WebhookSettings/WebhookSettingsPresenter.js.map +1 -1
  55. package/admin/routes.d.ts +3 -1
  56. package/admin/routes.js +4 -1
  57. package/admin/routes.js.map +1 -1
  58. package/api/features/DeleteWebhook/DeleteWebhookRepository.js +2 -1
  59. package/api/features/DeleteWebhook/DeleteWebhookRepository.js.map +1 -1
  60. package/api/features/ListWebhookDeliveries/ListWebhookDeliveriesRepository.js +7 -4
  61. package/api/features/ListWebhookDeliveries/ListWebhookDeliveriesRepository.js.map +1 -1
  62. package/api/features/ListWebhooks/ListWebhooksRepository.js +7 -4
  63. package/api/features/ListWebhooks/ListWebhooksRepository.js.map +1 -1
  64. package/api/features/SendWebhookTask/SendWebhookTask.d.ts +11 -6
  65. package/api/features/SendWebhookTask/SendWebhookTask.js +21 -12
  66. package/api/features/SendWebhookTask/SendWebhookTask.js.map +1 -1
  67. package/api/features/UpdateWebhook/UpdateWebhookRepository.js +3 -1
  68. package/api/features/UpdateWebhook/UpdateWebhookRepository.js.map +1 -1
  69. package/api/features/UpdateWebhookDelivery/UpdateWebhookDeliveryRepository.js +3 -1
  70. package/api/features/UpdateWebhookDelivery/UpdateWebhookDeliveryRepository.js.map +1 -1
  71. package/api/features/UpdateWebhookSettings/UpdateWebhookSettingsRepository.js +3 -1
  72. package/api/features/UpdateWebhookSettings/UpdateWebhookSettingsRepository.js.map +1 -1
  73. package/api/graphql/WebhookCrudSchema.d.ts +3 -2
  74. package/api/graphql/WebhookCrudSchema.js +17 -2
  75. package/api/graphql/WebhookCrudSchema.js.map +1 -1
  76. package/api/graphql/WebhookDeliverySchema.d.ts +3 -2
  77. package/api/graphql/WebhookDeliverySchema.js +6 -2
  78. package/api/graphql/WebhookDeliverySchema.js.map +1 -1
  79. package/api/graphql/WebhookEventSchema.d.ts +3 -2
  80. package/api/graphql/WebhookEventSchema.js +6 -2
  81. package/api/graphql/WebhookEventSchema.js.map +1 -1
  82. package/api/graphql/WebhookSettingsSchema.d.ts +3 -2
  83. package/api/graphql/WebhookSettingsSchema.js +6 -2
  84. package/api/graphql/WebhookSettingsSchema.js.map +1 -1
  85. package/api/graphql/WebhookTriggerSchema.d.ts +3 -2
  86. package/api/graphql/WebhookTriggerSchema.js +6 -2
  87. package/api/graphql/WebhookTriggerSchema.js.map +1 -1
  88. package/api/index.d.ts +3 -0
  89. package/api/index.js +6 -2
  90. package/api/index.js.map +1 -1
  91. package/api/models/WebhookDeliveryModel.d.ts +1 -1
  92. package/api/models/WebhookDeliveryModel.js +3 -3
  93. package/api/models/WebhookDeliveryModel.js.map +1 -1
  94. package/api/models/WebhookModel.d.ts +1 -1
  95. package/api/models/WebhookModel.js +4 -4
  96. package/api/models/WebhookModel.js.map +1 -1
  97. package/api/models/WebhookSettingsModel.d.ts +1 -1
  98. package/api/models/WebhookSettingsModel.js +3 -3
  99. package/api/models/WebhookSettingsModel.js.map +1 -1
  100. package/package.json +24 -23
  101. package/admin/presentation/WebhookDeliveries/WebhookDeliveriesDataSource.js.map +0 -1
  102. package/admin/presentation/WebhookDeliveries/WebhookDeliveriesPresenter.d.ts +0 -21
  103. package/admin/presentation/WebhookDeliveries/WebhookDeliveriesPresenter.js +0 -57
  104. package/admin/presentation/WebhookDeliveries/WebhookDeliveriesPresenter.js.map +0 -1
  105. package/admin/presentation/WebhookDeliveries/abstractions.d.ts +0 -18
  106. package/admin/presentation/WebhookDeliveries/abstractions.js +0 -5
  107. package/admin/presentation/WebhookDeliveries/abstractions.js.map +0 -1
  108. package/admin/presentation/WebhookDeliveries/components/DeliveryAccordionRow.js.map +0 -1
  109. package/admin/presentation/WebhookDeliveries/components/DeliveryDetail.d.ts +0 -11
  110. package/admin/presentation/WebhookDeliveries/components/DeliveryDetail.js +0 -32
  111. package/admin/presentation/WebhookDeliveries/components/DeliveryDetail.js.map +0 -1
  112. package/admin/presentation/WebhookDeliveries/components/DeliveryDetailContent.js.map +0 -1
  113. package/admin/presentation/WebhookDeliveries/components/DeliveryDetailPanel.d.ts +0 -9
  114. package/admin/presentation/WebhookDeliveries/components/DeliveryDetailPanel.js +0 -22
  115. package/admin/presentation/WebhookDeliveries/components/DeliveryDetailPanel.js.map +0 -1
  116. package/admin/presentation/WebhookDeliveries/components/WebhookDeliveriesDrawer.d.ts +0 -8
  117. package/admin/presentation/WebhookDeliveries/components/WebhookDeliveriesDrawer.js +0 -119
  118. package/admin/presentation/WebhookDeliveries/components/WebhookDeliveriesDrawer.js.map +0 -1
  119. package/admin/presentation/WebhookDeliveries/components/statusVariant.d.ts +0 -1
  120. package/admin/presentation/WebhookDeliveries/components/statusVariant.js.map +0 -1
  121. package/admin/presentation/WebhookDeliveries/feature.d.ts +0 -3
  122. package/admin/presentation/WebhookDeliveries/feature.js +0 -17
  123. package/admin/presentation/WebhookDeliveries/feature.js.map +0 -1
  124. package/admin/presentation/WebhookDeliveries/index.d.ts +0 -2
  125. package/admin/presentation/WebhookDeliveries/index.js +0 -2
  126. /package/admin/presentation/{WebhookDeliveries → WebhookDeliveriesPage}/components/DeliveryAccordionRow.d.ts +0 -0
  127. /package/admin/presentation/{WebhookDeliveries → WebhookDeliveriesPage}/components/DeliveryAccordionRow.js +0 -0
  128. /package/admin/presentation/{WebhookDeliveries → WebhookDeliveriesPage}/components/DeliveryDetailContent.d.ts +0 -0
  129. /package/admin/presentation/{WebhookDeliveries → WebhookDeliveriesPage}/components/DeliveryDetailContent.js +0 -0
  130. /package/admin/presentation/{WebhookDeliveries → WebhookDeliveriesPage}/components/statusVariant.js +0 -0
@@ -1,5 +1,6 @@
1
- import { GraphQLSchemaFactory } from "@webiny/handler-graphql/graphql/abstractions.js";
2
- import { ErrorResponse, ListErrorResponse, ListResponse, Response } from "@webiny/handler-graphql";
1
+ import { GraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
+ import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
3
+ import { ErrorResponse, ListErrorResponse, ListResponse, Response } from "@webiny/api-graphql";
3
4
  import { ListWebhooksUseCase } from "../features/ListWebhooks/abstractions.js";
4
5
  import { GetWebhookUseCase } from "../features/GetWebhook/abstractions.js";
5
6
  import { CreateWebhookUseCase } from "../features/CreateWebhook/abstractions.js";
@@ -12,6 +13,7 @@ class WebhookCrudSchema_ {
12
13
  code: String
13
14
  message: String
14
15
  data: JSON
16
+ stack: String
15
17
  }
16
18
 
17
19
  type WebhookListMeta {
@@ -66,9 +68,19 @@ class WebhookCrudSchema_ {
66
68
  enabled: Boolean
67
69
  }
68
70
 
71
+ enum ListWebhooksSort {
72
+ createdOn_ASC
73
+ createdOn_DESC
74
+ modifiedOn_ASC
75
+ modifiedOn_DESC
76
+ name_ASC
77
+ name_DESC
78
+ }
79
+
69
80
  type WebhookQuery {
70
81
  listWebhooks(
71
82
  where: ListWebhooksWhereInput
83
+ sort: [ListWebhooksSort!]
72
84
  limit: Int
73
85
  after: String
74
86
  ): WebhookListResponse!
@@ -156,6 +168,9 @@ class WebhookCrudSchema_ {
156
168
  });
157
169
  return builder;
158
170
  }
171
+ constructor(){
172
+ this.getSchemaKey = staticSchemaKey("webhooks/WebhookCrudSchema_");
173
+ }
159
174
  }
160
175
  const WebhookCrudSchema = GraphQLSchemaFactory.createImplementation({
161
176
  implementation: WebhookCrudSchema_,
@@ -1 +1 @@
1
- {"version":3,"file":"api/graphql/WebhookCrudSchema.js","sources":["../../../src/api/graphql/WebhookCrudSchema.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/handler-graphql/graphql/abstractions.js\";\nimport { Response } from \"@webiny/handler-graphql\";\nimport { ErrorResponse } from \"@webiny/handler-graphql\";\nimport { ListResponse } from \"@webiny/handler-graphql\";\nimport { ListErrorResponse } from \"@webiny/handler-graphql\";\nimport { ListWebhooksUseCase } from \"~/api/features/ListWebhooks/abstractions.js\";\nimport type { IListWebhooksInput } from \"~/api/features/ListWebhooks/abstractions.js\";\nimport { GetWebhookUseCase } from \"~/api/features/GetWebhook/abstractions.js\";\nimport { CreateWebhookUseCase } from \"~/api/features/CreateWebhook/abstractions.js\";\nimport { UpdateWebhookUseCase } from \"~/api/features/UpdateWebhook/abstractions.js\";\nimport { DeleteWebhookUseCase } from \"~/api/features/DeleteWebhook/abstractions.js\";\n\ninterface IIdArgs {\n id: string;\n}\n\ninterface ICreateWebhookArgs {\n input: CreateWebhookUseCase.Input;\n}\n\ninterface IUpdateWebhookArgs {\n id: string;\n input: UpdateWebhookUseCase.Input;\n}\n\nclass WebhookCrudSchema_ implements GraphQLSchemaFactory.Interface {\n async execute(\n builder: GraphQLSchemaFactory.SchemaBuilder\n ): Promise<GraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type WebhookError {\n code: String\n message: String\n data: JSON\n }\n\n type WebhookListMeta {\n cursor: String\n hasMoreItems: Boolean!\n totalCount: Int!\n }\n\n type Webhook {\n id: ID!\n name: String!\n slug: String!\n endpointUrl: String!\n description: String\n enabled: Boolean!\n events: [String!]!\n signingSecret: String\n createdOn: DateTime\n modifiedOn: DateTime\n }\n\n type WebhookResponse {\n data: Webhook\n error: WebhookError\n }\n\n type WebhookListResponse {\n data: [Webhook!]\n meta: WebhookListMeta\n error: WebhookError\n }\n\n input CreateWebhookInput {\n name: String!\n slug: String\n endpointUrl: String!\n description: String\n enabled: Boolean\n events: [String!]!\n signingSecret: String\n }\n\n input UpdateWebhookInput {\n name: String\n endpointUrl: String\n description: String\n enabled: Boolean\n events: [String!]\n }\n\n input ListWebhooksWhereInput {\n enabled: Boolean\n }\n\n type WebhookQuery {\n listWebhooks(\n where: ListWebhooksWhereInput\n limit: Int\n after: String\n ): WebhookListResponse!\n getWebhook(id: ID!): WebhookResponse!\n }\n\n type WebhookMutation {\n createWebhook(input: CreateWebhookInput!): WebhookResponse!\n updateWebhook(id: ID!, input: UpdateWebhookInput!): WebhookResponse!\n deleteWebhook(id: ID!): BooleanResponse!\n }\n\n extend type Query {\n webhooks: WebhookQuery!\n }\n\n extend type Mutation {\n webhooks: WebhookMutation!\n }\n `);\n\n builder.addResolver({\n path: \"Query.webhooks\",\n dependencies: [],\n resolver: () => () => ({})\n });\n\n builder.addResolver({\n path: \"Mutation.webhooks\",\n dependencies: [],\n resolver: () => () => ({})\n });\n\n builder.addResolver<IListWebhooksInput>({\n path: \"WebhookQuery.listWebhooks\",\n dependencies: [ListWebhooksUseCase],\n resolver: (listWebhooks: ListWebhooksUseCase.Interface) => {\n return async ({ args }) => {\n const result = await listWebhooks.execute(args);\n if (result.isFail()) {\n return new ListErrorResponse(result.error);\n }\n return new ListResponse(result.value.items, result.value.meta);\n };\n }\n });\n\n builder.addResolver<IIdArgs>({\n path: \"WebhookQuery.getWebhook\",\n dependencies: [GetWebhookUseCase],\n resolver: (getWebhook: GetWebhookUseCase.Interface) => {\n return async ({ args }) => {\n const result = await getWebhook.execute(args.id);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n builder.addResolver<ICreateWebhookArgs>({\n path: \"WebhookMutation.createWebhook\",\n dependencies: [CreateWebhookUseCase],\n resolver: (createWebhook: CreateWebhookUseCase.Interface) => {\n return async ({ args }) => {\n const result = await createWebhook.execute(args.input);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n builder.addResolver<IUpdateWebhookArgs>({\n path: \"WebhookMutation.updateWebhook\",\n dependencies: [UpdateWebhookUseCase],\n resolver: (updateWebhook: UpdateWebhookUseCase.Interface) => {\n return async ({ args }) => {\n const result = await updateWebhook.execute(args.id, args.input);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n builder.addResolver<IIdArgs>({\n path: \"WebhookMutation.deleteWebhook\",\n dependencies: [DeleteWebhookUseCase],\n resolver: (deleteWebhook: DeleteWebhookUseCase.Interface) => {\n return async ({ args }) => {\n const result = await deleteWebhook.execute(args.id);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(true);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const WebhookCrudSchema = GraphQLSchemaFactory.createImplementation({\n implementation: WebhookCrudSchema_,\n dependencies: []\n});\n"],"names":["WebhookCrudSchema_","builder","ListWebhooksUseCase","listWebhooks","args","result","ListErrorResponse","ListResponse","GetWebhookUseCase","getWebhook","ErrorResponse","Response","CreateWebhookUseCase","createWebhook","UpdateWebhookUseCase","updateWebhook","DeleteWebhookUseCase","deleteWebhook","WebhookCrudSchema","GraphQLSchemaFactory"],"mappings":";;;;;;;AAyBA,MAAMA;IACF,MAAM,QACFC,OAA2C,EACA;QAC3CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiFnC,CAAC;QAEDA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,cAAc,EAAE;YAChB,UAAU,IAAM,IAAO,EAAC;QAC5B;QAEAA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,cAAc,EAAE;YAChB,UAAU,IAAM,IAAO,EAAC;QAC5B;QAEAA,QAAQ,WAAW,CAAqB;YACpC,MAAM;YACN,cAAc;gBAACC;aAAoB;YACnC,UAAU,CAACC,eACA,OAAO,EAAEC,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMF,aAAa,OAAO,CAACC;oBAC1C,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,kBAAkBD,OAAO,KAAK;oBAE7C,OAAO,IAAIE,aAAaF,OAAO,KAAK,CAAC,KAAK,EAAEA,OAAO,KAAK,CAAC,IAAI;gBACjE;QAER;QAEAJ,QAAQ,WAAW,CAAU;YACzB,MAAM;YACN,cAAc;gBAACO;aAAkB;YACjC,UAAU,CAACC,aACA,OAAO,EAAEL,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMI,WAAW,OAAO,CAACL,KAAK,EAAE;oBAC/C,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAASN,OAAO,KAAK;gBACpC;QAER;QAEAJ,QAAQ,WAAW,CAAqB;YACpC,MAAM;YACN,cAAc;gBAACW;aAAqB;YACpC,UAAU,CAACC,gBACA,OAAO,EAAET,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMQ,cAAc,OAAO,CAACT,KAAK,KAAK;oBACrD,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAASN,OAAO,KAAK;gBACpC;QAER;QAEAJ,QAAQ,WAAW,CAAqB;YACpC,MAAM;YACN,cAAc;gBAACa;aAAqB;YACpC,UAAU,CAACC,gBACA,OAAO,EAAEX,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMU,cAAc,OAAO,CAACX,KAAK,EAAE,EAAEA,KAAK,KAAK;oBAC9D,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAASN,OAAO,KAAK;gBACpC;QAER;QAEAJ,QAAQ,WAAW,CAAU;YACzB,MAAM;YACN,cAAc;gBAACe;aAAqB;YACpC,UAAU,CAACC,gBACA,OAAO,EAAEb,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMY,cAAc,OAAO,CAACb,KAAK,EAAE;oBAClD,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAAS;gBACxB;QAER;QAEA,OAAOV;IACX;AACJ;AAEO,MAAMiB,oBAAoBC,qBAAqB,oBAAoB,CAAC;IACvE,gBAAgBnB;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/graphql/WebhookCrudSchema.js","sources":["../../../src/api/graphql/WebhookCrudSchema.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { Response } from \"@webiny/api-graphql\";\nimport { ErrorResponse } from \"@webiny/api-graphql\";\nimport { ListResponse } from \"@webiny/api-graphql\";\nimport { ListErrorResponse } from \"@webiny/api-graphql\";\nimport { ListWebhooksUseCase } from \"~/api/features/ListWebhooks/abstractions.js\";\nimport type { IListWebhooksInput } from \"~/api/features/ListWebhooks/abstractions.js\";\nimport { GetWebhookUseCase } from \"~/api/features/GetWebhook/abstractions.js\";\nimport { CreateWebhookUseCase } from \"~/api/features/CreateWebhook/abstractions.js\";\nimport { UpdateWebhookUseCase } from \"~/api/features/UpdateWebhook/abstractions.js\";\nimport { DeleteWebhookUseCase } from \"~/api/features/DeleteWebhook/abstractions.js\";\n\ninterface IIdArgs {\n id: string;\n}\n\ninterface ICreateWebhookArgs {\n input: CreateWebhookUseCase.Input;\n}\n\ninterface IUpdateWebhookArgs {\n id: string;\n input: UpdateWebhookUseCase.Input;\n}\n\nclass WebhookCrudSchema_ implements GraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"webhooks/WebhookCrudSchema_\");\n\n async execute(\n builder: GraphQLSchemaFactory.SchemaBuilder\n ): Promise<GraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type WebhookError {\n code: String\n message: String\n data: JSON\n stack: String\n }\n\n type WebhookListMeta {\n cursor: String\n hasMoreItems: Boolean!\n totalCount: Int!\n }\n\n type Webhook {\n id: ID!\n name: String!\n slug: String!\n endpointUrl: String!\n description: String\n enabled: Boolean!\n events: [String!]!\n signingSecret: String\n createdOn: DateTime\n modifiedOn: DateTime\n }\n\n type WebhookResponse {\n data: Webhook\n error: WebhookError\n }\n\n type WebhookListResponse {\n data: [Webhook!]\n meta: WebhookListMeta\n error: WebhookError\n }\n\n input CreateWebhookInput {\n name: String!\n slug: String\n endpointUrl: String!\n description: String\n enabled: Boolean\n events: [String!]!\n signingSecret: String\n }\n\n input UpdateWebhookInput {\n name: String\n endpointUrl: String\n description: String\n enabled: Boolean\n events: [String!]\n }\n\n input ListWebhooksWhereInput {\n enabled: Boolean\n }\n\n enum ListWebhooksSort {\n createdOn_ASC\n createdOn_DESC\n modifiedOn_ASC\n modifiedOn_DESC\n name_ASC\n name_DESC\n }\n\n type WebhookQuery {\n listWebhooks(\n where: ListWebhooksWhereInput\n sort: [ListWebhooksSort!]\n limit: Int\n after: String\n ): WebhookListResponse!\n getWebhook(id: ID!): WebhookResponse!\n }\n\n type WebhookMutation {\n createWebhook(input: CreateWebhookInput!): WebhookResponse!\n updateWebhook(id: ID!, input: UpdateWebhookInput!): WebhookResponse!\n deleteWebhook(id: ID!): BooleanResponse!\n }\n\n extend type Query {\n webhooks: WebhookQuery!\n }\n\n extend type Mutation {\n webhooks: WebhookMutation!\n }\n `);\n\n builder.addResolver({\n path: \"Query.webhooks\",\n dependencies: [],\n resolver: () => () => ({})\n });\n\n builder.addResolver({\n path: \"Mutation.webhooks\",\n dependencies: [],\n resolver: () => () => ({})\n });\n\n builder.addResolver<IListWebhooksInput>({\n path: \"WebhookQuery.listWebhooks\",\n dependencies: [ListWebhooksUseCase],\n resolver: (listWebhooks: ListWebhooksUseCase.Interface) => {\n return async ({ args }) => {\n const result = await listWebhooks.execute(args);\n if (result.isFail()) {\n return new ListErrorResponse(result.error);\n }\n return new ListResponse(result.value.items, result.value.meta);\n };\n }\n });\n\n builder.addResolver<IIdArgs>({\n path: \"WebhookQuery.getWebhook\",\n dependencies: [GetWebhookUseCase],\n resolver: (getWebhook: GetWebhookUseCase.Interface) => {\n return async ({ args }) => {\n const result = await getWebhook.execute(args.id);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n builder.addResolver<ICreateWebhookArgs>({\n path: \"WebhookMutation.createWebhook\",\n dependencies: [CreateWebhookUseCase],\n resolver: (createWebhook: CreateWebhookUseCase.Interface) => {\n return async ({ args }) => {\n const result = await createWebhook.execute(args.input);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n builder.addResolver<IUpdateWebhookArgs>({\n path: \"WebhookMutation.updateWebhook\",\n dependencies: [UpdateWebhookUseCase],\n resolver: (updateWebhook: UpdateWebhookUseCase.Interface) => {\n return async ({ args }) => {\n const result = await updateWebhook.execute(args.id, args.input);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n builder.addResolver<IIdArgs>({\n path: \"WebhookMutation.deleteWebhook\",\n dependencies: [DeleteWebhookUseCase],\n resolver: (deleteWebhook: DeleteWebhookUseCase.Interface) => {\n return async ({ args }) => {\n const result = await deleteWebhook.execute(args.id);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(true);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const WebhookCrudSchema = GraphQLSchemaFactory.createImplementation({\n implementation: WebhookCrudSchema_,\n dependencies: []\n});\n"],"names":["WebhookCrudSchema_","builder","ListWebhooksUseCase","listWebhooks","args","result","ListErrorResponse","ListResponse","GetWebhookUseCase","getWebhook","ErrorResponse","Response","CreateWebhookUseCase","createWebhook","UpdateWebhookUseCase","updateWebhook","DeleteWebhookUseCase","deleteWebhook","staticSchemaKey","WebhookCrudSchema","GraphQLSchemaFactory"],"mappings":";;;;;;;;AA0BA,MAAMA;IAGF,MAAM,QACFC,OAA2C,EACA;QAC3CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4FnC,CAAC;QAEDA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,cAAc,EAAE;YAChB,UAAU,IAAM,IAAO,EAAC;QAC5B;QAEAA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,cAAc,EAAE;YAChB,UAAU,IAAM,IAAO,EAAC;QAC5B;QAEAA,QAAQ,WAAW,CAAqB;YACpC,MAAM;YACN,cAAc;gBAACC;aAAoB;YACnC,UAAU,CAACC,eACA,OAAO,EAAEC,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMF,aAAa,OAAO,CAACC;oBAC1C,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,kBAAkBD,OAAO,KAAK;oBAE7C,OAAO,IAAIE,aAAaF,OAAO,KAAK,CAAC,KAAK,EAAEA,OAAO,KAAK,CAAC,IAAI;gBACjE;QAER;QAEAJ,QAAQ,WAAW,CAAU;YACzB,MAAM;YACN,cAAc;gBAACO;aAAkB;YACjC,UAAU,CAACC,aACA,OAAO,EAAEL,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMI,WAAW,OAAO,CAACL,KAAK,EAAE;oBAC/C,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAASN,OAAO,KAAK;gBACpC;QAER;QAEAJ,QAAQ,WAAW,CAAqB;YACpC,MAAM;YACN,cAAc;gBAACW;aAAqB;YACpC,UAAU,CAACC,gBACA,OAAO,EAAET,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMQ,cAAc,OAAO,CAACT,KAAK,KAAK;oBACrD,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAASN,OAAO,KAAK;gBACpC;QAER;QAEAJ,QAAQ,WAAW,CAAqB;YACpC,MAAM;YACN,cAAc;gBAACa;aAAqB;YACpC,UAAU,CAACC,gBACA,OAAO,EAAEX,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMU,cAAc,OAAO,CAACX,KAAK,EAAE,EAAEA,KAAK,KAAK;oBAC9D,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAASN,OAAO,KAAK;gBACpC;QAER;QAEAJ,QAAQ,WAAW,CAAU;YACzB,MAAM;YACN,cAAc;gBAACe;aAAqB;YACpC,UAAU,CAACC,gBACA,OAAO,EAAEb,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMY,cAAc,OAAO,CAACb,KAAK,EAAE;oBAClD,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAAS;gBACxB;QAER;QAEA,OAAOV;IACX;;aAtLO,YAAY,GAAGiB,gBAAgB;;AAuL1C;AAEO,MAAMC,oBAAoBC,qBAAqB,oBAAoB,CAAC;IACvE,gBAAgBpB;IAChB,cAAc,EAAE;AACpB"}
@@ -1,8 +1,9 @@
1
- import { GraphQLSchemaFactory } from "@webiny/handler-graphql/graphql/abstractions.js";
1
+ import { GraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
2
  declare class WebhookDeliverySchema_ implements GraphQLSchemaFactory.Interface {
3
+ getSchemaKey: () => string;
3
4
  execute(builder: GraphQLSchemaFactory.SchemaBuilder): Promise<GraphQLSchemaFactory.SchemaBuilder>;
4
5
  }
5
6
  export declare const WebhookDeliverySchema: typeof WebhookDeliverySchema_ & {
6
- __abstraction: import("@webiny/di").Abstraction<import("@webiny/handler-graphql/graphql/abstractions.public").IGraphQLSchemaFactory>;
7
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/api-graphql/graphql/abstractions.public").IGraphQLSchemaFactory>;
7
8
  };
8
9
  export {};
@@ -1,5 +1,6 @@
1
- import { GraphQLSchemaFactory } from "@webiny/handler-graphql/graphql/abstractions.js";
2
- import { ErrorResponse, ListErrorResponse, ListResponse, Response } from "@webiny/handler-graphql";
1
+ import { GraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
+ import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
3
+ import { ErrorResponse, ListErrorResponse, ListResponse, Response } from "@webiny/api-graphql";
3
4
  import { ListWebhookDeliveriesUseCase } from "../features/ListWebhookDeliveries/abstractions.js";
4
5
  import { GetWebhookDeliveryUseCase } from "../features/GetWebhookDelivery/abstractions.js";
5
6
  import { ResendWebhookDeliveryUseCase } from "../features/ResendWebhookDelivery/abstractions.js";
@@ -90,6 +91,9 @@ class WebhookDeliverySchema_ {
90
91
  });
91
92
  return builder;
92
93
  }
94
+ constructor(){
95
+ this.getSchemaKey = staticSchemaKey("webhooks/WebhookDeliverySchema_");
96
+ }
93
97
  }
94
98
  const WebhookDeliverySchema = GraphQLSchemaFactory.createImplementation({
95
99
  implementation: WebhookDeliverySchema_,
@@ -1 +1 @@
1
- {"version":3,"file":"api/graphql/WebhookDeliverySchema.js","sources":["../../../src/api/graphql/WebhookDeliverySchema.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/handler-graphql/graphql/abstractions.js\";\nimport { Response } from \"@webiny/handler-graphql\";\nimport { ErrorResponse } from \"@webiny/handler-graphql\";\nimport { ListResponse } from \"@webiny/handler-graphql\";\nimport { ListErrorResponse } from \"@webiny/handler-graphql\";\nimport { ListWebhookDeliveriesUseCase } from \"~/api/features/ListWebhookDeliveries/abstractions.js\";\nimport { GetWebhookDeliveryUseCase } from \"~/api/features/GetWebhookDelivery/abstractions.js\";\nimport { ResendWebhookDeliveryUseCase } from \"~/api/features/ResendWebhookDelivery/abstractions.js\";\n\ninterface IListDeliveriesArgs {\n where?: {\n webhookId_eq?: string;\n eventType_in?: string[];\n status_in?: string[];\n };\n limit?: number;\n after?: string;\n}\n\ninterface IIdArgs {\n id: string;\n}\n\nclass WebhookDeliverySchema_ implements GraphQLSchemaFactory.Interface {\n async execute(\n builder: GraphQLSchemaFactory.SchemaBuilder\n ): Promise<GraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type WebhookDelivery {\n id: ID!\n webhookId: ID!\n backgroundTaskId: String\n eventType: String!\n status: String!\n payload: JSON\n requestHeaders: JSON\n responseHeaders: JSON\n responseTime: Int\n responseStatus: Int\n responseBody: String\n createdOn: DateTime!\n }\n\n input WebhookDeliveryListWhereInput {\n webhookId_eq: ID\n eventType_in: [String!]\n status_in: [String!]\n }\n\n type WebhookDeliveryResponse {\n data: WebhookDelivery\n error: WebhookError\n }\n\n type WebhookDeliveryListResponse {\n data: [WebhookDelivery!]\n meta: WebhookListMeta\n error: WebhookError\n }\n\n extend type WebhookQuery {\n listWebhookDeliveries(\n where: WebhookDeliveryListWhereInput\n limit: Int\n after: String\n ): WebhookDeliveryListResponse!\n getWebhookDelivery(id: ID!): WebhookDeliveryResponse!\n }\n\n extend type WebhookMutation {\n resendWebhookDelivery(id: ID!): BooleanResponse!\n }\n `);\n\n builder.addResolver<IListDeliveriesArgs>({\n path: \"WebhookQuery.listWebhookDeliveries\",\n dependencies: [ListWebhookDeliveriesUseCase],\n resolver: (listDeliveries: ListWebhookDeliveriesUseCase.Interface) => {\n return async ({ args }) => {\n const result = await listDeliveries.execute({\n where: args.where,\n limit: args.limit,\n after: args.after\n });\n if (result.isFail()) {\n return new ListErrorResponse(result.error);\n }\n return new ListResponse(result.value.items, result.value.meta);\n };\n }\n });\n\n builder.addResolver<IIdArgs>({\n path: \"WebhookQuery.getWebhookDelivery\",\n dependencies: [GetWebhookDeliveryUseCase],\n resolver: (getDelivery: GetWebhookDeliveryUseCase.Interface) => {\n return async ({ args }) => {\n const result = await getDelivery.execute(args.id);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n builder.addResolver<IIdArgs>({\n path: \"WebhookMutation.resendWebhookDelivery\",\n dependencies: [ResendWebhookDeliveryUseCase],\n resolver: (resend: ResendWebhookDeliveryUseCase.Interface) => {\n return async ({ args }) => {\n const result = await resend.execute(args.id);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(true);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const WebhookDeliverySchema = GraphQLSchemaFactory.createImplementation({\n implementation: WebhookDeliverySchema_,\n dependencies: []\n});\n"],"names":["WebhookDeliverySchema_","builder","ListWebhookDeliveriesUseCase","listDeliveries","args","result","ListErrorResponse","ListResponse","GetWebhookDeliveryUseCase","getDelivery","ErrorResponse","Response","ResendWebhookDeliveryUseCase","resend","WebhookDeliverySchema","GraphQLSchemaFactory"],"mappings":";;;;;AAuBA,MAAMA;IACF,MAAM,QACFC,OAA2C,EACA;QAC3CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA6CnC,CAAC;QAEDA,QAAQ,WAAW,CAAsB;YACrC,MAAM;YACN,cAAc;gBAACC;aAA6B;YAC5C,UAAU,CAACC,iBACA,OAAO,EAAEC,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMF,eAAe,OAAO,CAAC;wBACxC,OAAOC,KAAK,KAAK;wBACjB,OAAOA,KAAK,KAAK;wBACjB,OAAOA,KAAK,KAAK;oBACrB;oBACA,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,kBAAkBD,OAAO,KAAK;oBAE7C,OAAO,IAAIE,aAAaF,OAAO,KAAK,CAAC,KAAK,EAAEA,OAAO,KAAK,CAAC,IAAI;gBACjE;QAER;QAEAJ,QAAQ,WAAW,CAAU;YACzB,MAAM;YACN,cAAc;gBAACO;aAA0B;YACzC,UAAU,CAACC,cACA,OAAO,EAAEL,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMI,YAAY,OAAO,CAACL,KAAK,EAAE;oBAChD,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAASN,OAAO,KAAK;gBACpC;QAER;QAEAJ,QAAQ,WAAW,CAAU;YACzB,MAAM;YACN,cAAc;gBAACW;aAA6B;YAC5C,UAAU,CAACC,SACA,OAAO,EAAET,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMQ,OAAO,OAAO,CAACT,KAAK,EAAE;oBAC3C,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAAS;gBACxB;QAER;QAEA,OAAOV;IACX;AACJ;AAEO,MAAMa,wBAAwBC,qBAAqB,oBAAoB,CAAC;IAC3E,gBAAgBf;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/graphql/WebhookDeliverySchema.js","sources":["../../../src/api/graphql/WebhookDeliverySchema.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { Response } from \"@webiny/api-graphql\";\nimport { ErrorResponse } from \"@webiny/api-graphql\";\nimport { ListResponse } from \"@webiny/api-graphql\";\nimport { ListErrorResponse } from \"@webiny/api-graphql\";\nimport { ListWebhookDeliveriesUseCase } from \"~/api/features/ListWebhookDeliveries/abstractions.js\";\nimport { GetWebhookDeliveryUseCase } from \"~/api/features/GetWebhookDelivery/abstractions.js\";\nimport { ResendWebhookDeliveryUseCase } from \"~/api/features/ResendWebhookDelivery/abstractions.js\";\n\ninterface IListDeliveriesArgs {\n where?: {\n webhookId_eq?: string;\n eventType_in?: string[];\n status_in?: string[];\n };\n limit?: number;\n after?: string;\n}\n\ninterface IIdArgs {\n id: string;\n}\n\nclass WebhookDeliverySchema_ implements GraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"webhooks/WebhookDeliverySchema_\");\n\n async execute(\n builder: GraphQLSchemaFactory.SchemaBuilder\n ): Promise<GraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type WebhookDelivery {\n id: ID!\n webhookId: ID!\n backgroundTaskId: String\n eventType: String!\n status: String!\n payload: JSON\n requestHeaders: JSON\n responseHeaders: JSON\n responseTime: Int\n responseStatus: Int\n responseBody: String\n createdOn: DateTime!\n }\n\n input WebhookDeliveryListWhereInput {\n webhookId_eq: ID\n eventType_in: [String!]\n status_in: [String!]\n }\n\n type WebhookDeliveryResponse {\n data: WebhookDelivery\n error: WebhookError\n }\n\n type WebhookDeliveryListResponse {\n data: [WebhookDelivery!]\n meta: WebhookListMeta\n error: WebhookError\n }\n\n extend type WebhookQuery {\n listWebhookDeliveries(\n where: WebhookDeliveryListWhereInput\n limit: Int\n after: String\n ): WebhookDeliveryListResponse!\n getWebhookDelivery(id: ID!): WebhookDeliveryResponse!\n }\n\n extend type WebhookMutation {\n resendWebhookDelivery(id: ID!): BooleanResponse!\n }\n `);\n\n builder.addResolver<IListDeliveriesArgs>({\n path: \"WebhookQuery.listWebhookDeliveries\",\n dependencies: [ListWebhookDeliveriesUseCase],\n resolver: (listDeliveries: ListWebhookDeliveriesUseCase.Interface) => {\n return async ({ args }) => {\n const result = await listDeliveries.execute({\n where: args.where,\n limit: args.limit,\n after: args.after\n });\n if (result.isFail()) {\n return new ListErrorResponse(result.error);\n }\n return new ListResponse(result.value.items, result.value.meta);\n };\n }\n });\n\n builder.addResolver<IIdArgs>({\n path: \"WebhookQuery.getWebhookDelivery\",\n dependencies: [GetWebhookDeliveryUseCase],\n resolver: (getDelivery: GetWebhookDeliveryUseCase.Interface) => {\n return async ({ args }) => {\n const result = await getDelivery.execute(args.id);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n builder.addResolver<IIdArgs>({\n path: \"WebhookMutation.resendWebhookDelivery\",\n dependencies: [ResendWebhookDeliveryUseCase],\n resolver: (resend: ResendWebhookDeliveryUseCase.Interface) => {\n return async ({ args }) => {\n const result = await resend.execute(args.id);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(true);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const WebhookDeliverySchema = GraphQLSchemaFactory.createImplementation({\n implementation: WebhookDeliverySchema_,\n dependencies: []\n});\n"],"names":["WebhookDeliverySchema_","builder","ListWebhookDeliveriesUseCase","listDeliveries","args","result","ListErrorResponse","ListResponse","GetWebhookDeliveryUseCase","getDelivery","ErrorResponse","Response","ResendWebhookDeliveryUseCase","resend","staticSchemaKey","WebhookDeliverySchema","GraphQLSchemaFactory"],"mappings":";;;;;;AAwBA,MAAMA;IAGF,MAAM,QACFC,OAA2C,EACA;QAC3CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA6CnC,CAAC;QAEDA,QAAQ,WAAW,CAAsB;YACrC,MAAM;YACN,cAAc;gBAACC;aAA6B;YAC5C,UAAU,CAACC,iBACA,OAAO,EAAEC,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMF,eAAe,OAAO,CAAC;wBACxC,OAAOC,KAAK,KAAK;wBACjB,OAAOA,KAAK,KAAK;wBACjB,OAAOA,KAAK,KAAK;oBACrB;oBACA,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,kBAAkBD,OAAO,KAAK;oBAE7C,OAAO,IAAIE,aAAaF,OAAO,KAAK,CAAC,KAAK,EAAEA,OAAO,KAAK,CAAC,IAAI;gBACjE;QAER;QAEAJ,QAAQ,WAAW,CAAU;YACzB,MAAM;YACN,cAAc;gBAACO;aAA0B;YACzC,UAAU,CAACC,cACA,OAAO,EAAEL,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMI,YAAY,OAAO,CAACL,KAAK,EAAE;oBAChD,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAASN,OAAO,KAAK;gBACpC;QAER;QAEAJ,QAAQ,WAAW,CAAU;YACzB,MAAM;YACN,cAAc;gBAACW;aAA6B;YAC5C,UAAU,CAACC,SACA,OAAO,EAAET,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMQ,OAAO,OAAO,CAACT,KAAK,EAAE;oBAC3C,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIK,cAAcL,OAAO,KAAK;oBAEzC,OAAO,IAAIM,SAAS;gBACxB;QAER;QAEA,OAAOV;IACX;;aAnGO,YAAY,GAAGa,gBAAgB;;AAoG1C;AAEO,MAAMC,wBAAwBC,qBAAqB,oBAAoB,CAAC;IAC3E,gBAAgBhB;IAChB,cAAc,EAAE;AACpB"}
@@ -1,8 +1,9 @@
1
- import { GraphQLSchemaFactory } from "@webiny/handler-graphql/graphql/abstractions.js";
1
+ import { GraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
2
  declare class WebhookEventSchema_ implements GraphQLSchemaFactory.Interface {
3
+ getSchemaKey: () => string;
3
4
  execute(builder: GraphQLSchemaFactory.SchemaBuilder): Promise<GraphQLSchemaFactory.SchemaBuilder>;
4
5
  }
5
6
  export declare const WebhookEventSchema: typeof WebhookEventSchema_ & {
6
- __abstraction: import("@webiny/di").Abstraction<import("@webiny/handler-graphql/graphql/abstractions.public").IGraphQLSchemaFactory>;
7
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/api-graphql/graphql/abstractions.public").IGraphQLSchemaFactory>;
7
8
  };
8
9
  export {};
@@ -1,5 +1,6 @@
1
- import { GraphQLSchemaFactory } from "@webiny/handler-graphql/graphql/abstractions.js";
2
- import { ErrorResponse, Response } from "@webiny/handler-graphql";
1
+ import { GraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
+ import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
3
+ import { ErrorResponse, Response } from "@webiny/api-graphql";
3
4
  import { ListAvailableWebhookEventsUseCase } from "../features/ListAvailableWebhookEvents/abstractions.js";
4
5
  class WebhookEventSchema_ {
5
6
  async execute(builder) {
@@ -35,6 +36,9 @@ class WebhookEventSchema_ {
35
36
  });
36
37
  return builder;
37
38
  }
39
+ constructor(){
40
+ this.getSchemaKey = staticSchemaKey("webhooks/WebhookEventSchema_");
41
+ }
38
42
  }
39
43
  const WebhookEventSchema = GraphQLSchemaFactory.createImplementation({
40
44
  implementation: WebhookEventSchema_,
@@ -1 +1 @@
1
- {"version":3,"file":"api/graphql/WebhookEventSchema.js","sources":["../../../src/api/graphql/WebhookEventSchema.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/handler-graphql/graphql/abstractions.js\";\nimport { Response } from \"@webiny/handler-graphql\";\nimport { ErrorResponse } from \"@webiny/handler-graphql\";\nimport { ListAvailableWebhookEventsUseCase } from \"~/api/features/ListAvailableWebhookEvents/abstractions.js\";\n\nclass WebhookEventSchema_ implements GraphQLSchemaFactory.Interface {\n async execute(\n builder: GraphQLSchemaFactory.SchemaBuilder\n ): Promise<GraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type WebhookEvent {\n app: String!\n appLabel: String!\n entity: String!\n entityLabel: String!\n eventName: String!\n label: String!\n }\n\n type WebhookEventListResponse {\n data: [WebhookEvent!]\n error: WebhookError\n }\n\n extend type WebhookQuery {\n listAvailableWebhookEvents: WebhookEventListResponse!\n }\n `);\n\n builder.addResolver({\n path: \"WebhookQuery.listAvailableWebhookEvents\",\n dependencies: [ListAvailableWebhookEventsUseCase],\n resolver: (listEvents: ListAvailableWebhookEventsUseCase.Interface) => {\n return async () => {\n const result = await listEvents.execute();\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const WebhookEventSchema = GraphQLSchemaFactory.createImplementation({\n implementation: WebhookEventSchema_,\n dependencies: []\n});\n"],"names":["WebhookEventSchema_","builder","ListAvailableWebhookEventsUseCase","listEvents","result","ErrorResponse","Response","WebhookEventSchema","GraphQLSchemaFactory"],"mappings":";;;AAKA,MAAMA;IACF,MAAM,QACFC,OAA2C,EACA;QAC3CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;;;;;;;;;;QAkBnC,CAAC;QAEDA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,cAAc;gBAACC;aAAkC;YACjD,UAAU,CAACC,aACA;oBACH,MAAMC,SAAS,MAAMD,WAAW,OAAO;oBACvC,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,cAAcD,OAAO,KAAK;oBAEzC,OAAO,IAAIE,SAASF,OAAO,KAAK;gBACpC;QAER;QAEA,OAAOH;IACX;AACJ;AAEO,MAAMM,qBAAqBC,qBAAqB,oBAAoB,CAAC;IACxE,gBAAgBR;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/graphql/WebhookEventSchema.js","sources":["../../../src/api/graphql/WebhookEventSchema.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { Response } from \"@webiny/api-graphql\";\nimport { ErrorResponse } from \"@webiny/api-graphql\";\nimport { ListAvailableWebhookEventsUseCase } from \"~/api/features/ListAvailableWebhookEvents/abstractions.js\";\n\nclass WebhookEventSchema_ implements GraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"webhooks/WebhookEventSchema_\");\n\n async execute(\n builder: GraphQLSchemaFactory.SchemaBuilder\n ): Promise<GraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type WebhookEvent {\n app: String!\n appLabel: String!\n entity: String!\n entityLabel: String!\n eventName: String!\n label: String!\n }\n\n type WebhookEventListResponse {\n data: [WebhookEvent!]\n error: WebhookError\n }\n\n extend type WebhookQuery {\n listAvailableWebhookEvents: WebhookEventListResponse!\n }\n `);\n\n builder.addResolver({\n path: \"WebhookQuery.listAvailableWebhookEvents\",\n dependencies: [ListAvailableWebhookEventsUseCase],\n resolver: (listEvents: ListAvailableWebhookEventsUseCase.Interface) => {\n return async () => {\n const result = await listEvents.execute();\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const WebhookEventSchema = GraphQLSchemaFactory.createImplementation({\n implementation: WebhookEventSchema_,\n dependencies: []\n});\n"],"names":["WebhookEventSchema_","builder","ListAvailableWebhookEventsUseCase","listEvents","result","ErrorResponse","Response","staticSchemaKey","WebhookEventSchema","GraphQLSchemaFactory"],"mappings":";;;;AAMA,MAAMA;IAGF,MAAM,QACFC,OAA2C,EACA;QAC3CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;;;;;;;;;;QAkBnC,CAAC;QAEDA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,cAAc;gBAACC;aAAkC;YACjD,UAAU,CAACC,aACA;oBACH,MAAMC,SAAS,MAAMD,WAAW,OAAO;oBACvC,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,cAAcD,OAAO,KAAK;oBAEzC,OAAO,IAAIE,SAASF,OAAO,KAAK;gBACpC;QAER;QAEA,OAAOH;IACX;;aAxCO,YAAY,GAAGM,gBAAgB;;AAyC1C;AAEO,MAAMC,qBAAqBC,qBAAqB,oBAAoB,CAAC;IACxE,gBAAgBT;IAChB,cAAc,EAAE;AACpB"}
@@ -1,8 +1,9 @@
1
- import { GraphQLSchemaFactory } from "@webiny/handler-graphql/graphql/abstractions.js";
1
+ import { GraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
2
  declare class WebhookSettingsSchema_ implements GraphQLSchemaFactory.Interface {
3
+ getSchemaKey: () => string;
3
4
  execute(builder: GraphQLSchemaFactory.SchemaBuilder): Promise<GraphQLSchemaFactory.SchemaBuilder>;
4
5
  }
5
6
  export declare const WebhookSettingsSchema: typeof WebhookSettingsSchema_ & {
6
- __abstraction: import("@webiny/di").Abstraction<import("@webiny/handler-graphql/graphql/abstractions.public").IGraphQLSchemaFactory>;
7
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/api-graphql/graphql/abstractions.public").IGraphQLSchemaFactory>;
7
8
  };
8
9
  export {};
@@ -1,5 +1,6 @@
1
- import { GraphQLSchemaFactory } from "@webiny/handler-graphql/graphql/abstractions.js";
2
- import { ErrorResponse, Response } from "@webiny/handler-graphql";
1
+ import { GraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
+ import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
3
+ import { ErrorResponse, Response } from "@webiny/api-graphql";
3
4
  import { GetWebhookSettingsRepository } from "../features/GetWebhookSettings/abstractions.js";
4
5
  import { UpdateWebhookSettingsUseCase } from "../features/UpdateWebhookSettings/abstractions.js";
5
6
  class WebhookSettingsSchema_ {
@@ -52,6 +53,9 @@ class WebhookSettingsSchema_ {
52
53
  });
53
54
  return builder;
54
55
  }
56
+ constructor(){
57
+ this.getSchemaKey = staticSchemaKey("webhooks/WebhookSettingsSchema_");
58
+ }
55
59
  }
56
60
  const WebhookSettingsSchema = GraphQLSchemaFactory.createImplementation({
57
61
  implementation: WebhookSettingsSchema_,
@@ -1 +1 @@
1
- {"version":3,"file":"api/graphql/WebhookSettingsSchema.js","sources":["../../../src/api/graphql/WebhookSettingsSchema.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/handler-graphql/graphql/abstractions.js\";\nimport { Response } from \"@webiny/handler-graphql\";\nimport { ErrorResponse } from \"@webiny/handler-graphql\";\nimport { GetWebhookSettingsRepository } from \"~/api/features/GetWebhookSettings/abstractions.js\";\nimport { UpdateWebhookSettingsUseCase } from \"~/api/features/UpdateWebhookSettings/abstractions.js\";\nimport type { IUpdateWebhookSettingsInput } from \"~/api/features/UpdateWebhookSettings/abstractions.js\";\n\ninterface IUpdateWebhookSettingsArgs {\n input: IUpdateWebhookSettingsInput;\n}\n\nclass WebhookSettingsSchema_ implements GraphQLSchemaFactory.Interface {\n async execute(\n builder: GraphQLSchemaFactory.SchemaBuilder\n ): Promise<GraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type WebhookSettings {\n signingSecret: String\n deliveryRetentionDays: Int\n }\n\n type WebhookSettingsResponse {\n data: WebhookSettings\n error: WebhookError\n }\n\n input UpdateWebhookSettingsInput {\n signingSecret: String\n deliveryRetentionDays: Int\n }\n\n extend type WebhookQuery {\n getSettings: WebhookSettingsResponse\n }\n\n extend type WebhookMutation {\n updateSettings(input: UpdateWebhookSettingsInput!): WebhookSettingsResponse\n }\n `);\n\n builder.addResolver({\n path: \"WebhookQuery.getSettings\",\n dependencies: [GetWebhookSettingsRepository],\n resolver: (getSettings: GetWebhookSettingsRepository.Interface) => {\n return async () => {\n const result = await getSettings.execute();\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n builder.addResolver<IUpdateWebhookSettingsArgs>({\n path: \"WebhookMutation.updateSettings\",\n dependencies: [UpdateWebhookSettingsUseCase],\n resolver: (updateSettings: UpdateWebhookSettingsUseCase.Interface) => {\n return async ({ args }) => {\n const result = await updateSettings.execute(args.input);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const WebhookSettingsSchema = GraphQLSchemaFactory.createImplementation({\n implementation: WebhookSettingsSchema_,\n dependencies: []\n});\n"],"names":["WebhookSettingsSchema_","builder","GetWebhookSettingsRepository","getSettings","result","ErrorResponse","Response","UpdateWebhookSettingsUseCase","updateSettings","args","WebhookSettingsSchema","GraphQLSchemaFactory"],"mappings":";;;;AAWA,MAAMA;IACF,MAAM,QACFC,OAA2C,EACA;QAC3CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;QAuBnC,CAAC;QAEDA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,cAAc;gBAACC;aAA6B;YAC5C,UAAU,CAACC,cACA;oBACH,MAAMC,SAAS,MAAMD,YAAY,OAAO;oBACxC,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,cAAcD,OAAO,KAAK;oBAEzC,OAAO,IAAIE,SAASF,OAAO,KAAK;gBACpC;QAER;QAEAH,QAAQ,WAAW,CAA6B;YAC5C,MAAM;YACN,cAAc;gBAACM;aAA6B;YAC5C,UAAU,CAACC,iBACA,OAAO,EAAEC,IAAI,EAAE;oBAClB,MAAML,SAAS,MAAMI,eAAe,OAAO,CAACC,KAAK,KAAK;oBACtD,IAAIL,OAAO,MAAM,IACb,OAAO,IAAIC,cAAcD,OAAO,KAAK;oBAEzC,OAAO,IAAIE,SAASF,OAAO,KAAK;gBACpC;QAER;QAEA,OAAOH;IACX;AACJ;AAEO,MAAMS,wBAAwBC,qBAAqB,oBAAoB,CAAC;IAC3E,gBAAgBX;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/graphql/WebhookSettingsSchema.js","sources":["../../../src/api/graphql/WebhookSettingsSchema.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { Response } from \"@webiny/api-graphql\";\nimport { ErrorResponse } from \"@webiny/api-graphql\";\nimport { GetWebhookSettingsRepository } from \"~/api/features/GetWebhookSettings/abstractions.js\";\nimport { UpdateWebhookSettingsUseCase } from \"~/api/features/UpdateWebhookSettings/abstractions.js\";\nimport type { IUpdateWebhookSettingsInput } from \"~/api/features/UpdateWebhookSettings/abstractions.js\";\n\ninterface IUpdateWebhookSettingsArgs {\n input: IUpdateWebhookSettingsInput;\n}\n\nclass WebhookSettingsSchema_ implements GraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"webhooks/WebhookSettingsSchema_\");\n\n async execute(\n builder: GraphQLSchemaFactory.SchemaBuilder\n ): Promise<GraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type WebhookSettings {\n signingSecret: String\n deliveryRetentionDays: Int\n }\n\n type WebhookSettingsResponse {\n data: WebhookSettings\n error: WebhookError\n }\n\n input UpdateWebhookSettingsInput {\n signingSecret: String\n deliveryRetentionDays: Int\n }\n\n extend type WebhookQuery {\n getSettings: WebhookSettingsResponse\n }\n\n extend type WebhookMutation {\n updateSettings(input: UpdateWebhookSettingsInput!): WebhookSettingsResponse\n }\n `);\n\n builder.addResolver({\n path: \"WebhookQuery.getSettings\",\n dependencies: [GetWebhookSettingsRepository],\n resolver: (getSettings: GetWebhookSettingsRepository.Interface) => {\n return async () => {\n const result = await getSettings.execute();\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n builder.addResolver<IUpdateWebhookSettingsArgs>({\n path: \"WebhookMutation.updateSettings\",\n dependencies: [UpdateWebhookSettingsUseCase],\n resolver: (updateSettings: UpdateWebhookSettingsUseCase.Interface) => {\n return async ({ args }) => {\n const result = await updateSettings.execute(args.input);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const WebhookSettingsSchema = GraphQLSchemaFactory.createImplementation({\n implementation: WebhookSettingsSchema_,\n dependencies: []\n});\n"],"names":["WebhookSettingsSchema_","builder","GetWebhookSettingsRepository","getSettings","result","ErrorResponse","Response","UpdateWebhookSettingsUseCase","updateSettings","args","staticSchemaKey","WebhookSettingsSchema","GraphQLSchemaFactory"],"mappings":";;;;;AAYA,MAAMA;IAGF,MAAM,QACFC,OAA2C,EACA;QAC3CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;QAuBnC,CAAC;QAEDA,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,cAAc;gBAACC;aAA6B;YAC5C,UAAU,CAACC,cACA;oBACH,MAAMC,SAAS,MAAMD,YAAY,OAAO;oBACxC,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,cAAcD,OAAO,KAAK;oBAEzC,OAAO,IAAIE,SAASF,OAAO,KAAK;gBACpC;QAER;QAEAH,QAAQ,WAAW,CAA6B;YAC5C,MAAM;YACN,cAAc;gBAACM;aAA6B;YAC5C,UAAU,CAACC,iBACA,OAAO,EAAEC,IAAI,EAAE;oBAClB,MAAML,SAAS,MAAMI,eAAe,OAAO,CAACC,KAAK,KAAK;oBACtD,IAAIL,OAAO,MAAM,IACb,OAAO,IAAIC,cAAcD,OAAO,KAAK;oBAEzC,OAAO,IAAIE,SAASF,OAAO,KAAK;gBACpC;QAER;QAEA,OAAOH;IACX;;aA3DO,YAAY,GAAGS,gBAAgB;;AA4D1C;AAEO,MAAMC,wBAAwBC,qBAAqB,oBAAoB,CAAC;IAC3E,gBAAgBZ;IAChB,cAAc,EAAE;AACpB"}
@@ -1,8 +1,9 @@
1
- import { GraphQLSchemaFactory } from "@webiny/handler-graphql/graphql/abstractions.js";
1
+ import { GraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
2
  declare class WebhookTriggerSchema_ implements GraphQLSchemaFactory.Interface {
3
+ getSchemaKey: () => string;
3
4
  execute(builder: GraphQLSchemaFactory.SchemaBuilder): Promise<GraphQLSchemaFactory.SchemaBuilder>;
4
5
  }
5
6
  export declare const WebhookTriggerSchema: typeof WebhookTriggerSchema_ & {
6
- __abstraction: import("@webiny/di").Abstraction<import("@webiny/handler-graphql/graphql/abstractions.public").IGraphQLSchemaFactory>;
7
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/api-graphql/graphql/abstractions.public").IGraphQLSchemaFactory>;
7
8
  };
8
9
  export {};
@@ -1,5 +1,6 @@
1
- import { GraphQLSchemaFactory } from "@webiny/handler-graphql/graphql/abstractions.js";
2
- import { ErrorResponse, Response } from "@webiny/handler-graphql";
1
+ import { GraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
2
+ import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
3
+ import { ErrorResponse, Response } from "@webiny/api-graphql";
3
4
  import { TriggerWebhookUseCase } from "../features/TriggerWebhook/abstractions.js";
4
5
  class WebhookTriggerSchema_ {
5
6
  async execute(builder) {
@@ -26,6 +27,9 @@ class WebhookTriggerSchema_ {
26
27
  });
27
28
  return builder;
28
29
  }
30
+ constructor(){
31
+ this.getSchemaKey = staticSchemaKey("webhooks/WebhookTriggerSchema_");
32
+ }
29
33
  }
30
34
  const WebhookTriggerSchema = GraphQLSchemaFactory.createImplementation({
31
35
  implementation: WebhookTriggerSchema_,
@@ -1 +1 @@
1
- {"version":3,"file":"api/graphql/WebhookTriggerSchema.js","sources":["../../../src/api/graphql/WebhookTriggerSchema.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/handler-graphql/graphql/abstractions.js\";\nimport { Response } from \"@webiny/handler-graphql\";\nimport { ErrorResponse } from \"@webiny/handler-graphql\";\nimport { TriggerWebhookUseCase } from \"~/api/features/TriggerWebhook/abstractions.js\";\n\ninterface ITriggerWebhookArgs {\n id: string;\n payload: Record<string, unknown>;\n}\n\nclass WebhookTriggerSchema_ implements GraphQLSchemaFactory.Interface {\n async execute(\n builder: GraphQLSchemaFactory.SchemaBuilder\n ): Promise<GraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type WebhookTriggerResponse {\n data: WebhookDelivery\n error: WebhookError\n }\n\n extend type WebhookMutation {\n triggerWebhook(id: ID!, payload: JSON!): WebhookTriggerResponse!\n }\n `);\n\n builder.addResolver<ITriggerWebhookArgs>({\n path: \"WebhookMutation.triggerWebhook\",\n dependencies: [TriggerWebhookUseCase],\n resolver: (triggerWebhook: TriggerWebhookUseCase.Interface) => {\n return async ({ args }) => {\n const result = await triggerWebhook.execute(args.id, args.payload);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const WebhookTriggerSchema = GraphQLSchemaFactory.createImplementation({\n implementation: WebhookTriggerSchema_,\n dependencies: []\n});\n"],"names":["WebhookTriggerSchema_","builder","TriggerWebhookUseCase","triggerWebhook","args","result","ErrorResponse","Response","WebhookTriggerSchema","GraphQLSchemaFactory"],"mappings":";;;AAUA,MAAMA;IACF,MAAM,QACFC,OAA2C,EACA;QAC3CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;QASnC,CAAC;QAEDA,QAAQ,WAAW,CAAsB;YACrC,MAAM;YACN,cAAc;gBAACC;aAAsB;YACrC,UAAU,CAACC,iBACA,OAAO,EAAEC,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMF,eAAe,OAAO,CAACC,KAAK,EAAE,EAAEA,KAAK,OAAO;oBACjE,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,cAAcD,OAAO,KAAK;oBAEzC,OAAO,IAAIE,SAASF,OAAO,KAAK;gBACpC;QAER;QAEA,OAAOJ;IACX;AACJ;AAEO,MAAMO,uBAAuBC,qBAAqB,oBAAoB,CAAC;IAC1E,gBAAgBT;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/graphql/WebhookTriggerSchema.js","sources":["../../../src/api/graphql/WebhookTriggerSchema.ts"],"sourcesContent":["import { GraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.js\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { Response } from \"@webiny/api-graphql\";\nimport { ErrorResponse } from \"@webiny/api-graphql\";\nimport { TriggerWebhookUseCase } from \"~/api/features/TriggerWebhook/abstractions.js\";\n\ninterface ITriggerWebhookArgs {\n id: string;\n payload: Record<string, unknown>;\n}\n\nclass WebhookTriggerSchema_ implements GraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"webhooks/WebhookTriggerSchema_\");\n\n async execute(\n builder: GraphQLSchemaFactory.SchemaBuilder\n ): Promise<GraphQLSchemaFactory.SchemaBuilder> {\n builder.addTypeDefs(/* GraphQL */ `\n type WebhookTriggerResponse {\n data: WebhookDelivery\n error: WebhookError\n }\n\n extend type WebhookMutation {\n triggerWebhook(id: ID!, payload: JSON!): WebhookTriggerResponse!\n }\n `);\n\n builder.addResolver<ITriggerWebhookArgs>({\n path: \"WebhookMutation.triggerWebhook\",\n dependencies: [TriggerWebhookUseCase],\n resolver: (triggerWebhook: TriggerWebhookUseCase.Interface) => {\n return async ({ args }) => {\n const result = await triggerWebhook.execute(args.id, args.payload);\n if (result.isFail()) {\n return new ErrorResponse(result.error);\n }\n return new Response(result.value);\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const WebhookTriggerSchema = GraphQLSchemaFactory.createImplementation({\n implementation: WebhookTriggerSchema_,\n dependencies: []\n});\n"],"names":["WebhookTriggerSchema_","builder","TriggerWebhookUseCase","triggerWebhook","args","result","ErrorResponse","Response","staticSchemaKey","WebhookTriggerSchema","GraphQLSchemaFactory"],"mappings":";;;;AAWA,MAAMA;IAGF,MAAM,QACFC,OAA2C,EACA;QAC3CA,QAAQ,WAAW,CAAe,CAAC;;;;;;;;;QASnC,CAAC;QAEDA,QAAQ,WAAW,CAAsB;YACrC,MAAM;YACN,cAAc;gBAACC;aAAsB;YACrC,UAAU,CAACC,iBACA,OAAO,EAAEC,IAAI,EAAE;oBAClB,MAAMC,SAAS,MAAMF,eAAe,OAAO,CAACC,KAAK,EAAE,EAAEA,KAAK,OAAO;oBACjE,IAAIC,OAAO,MAAM,IACb,OAAO,IAAIC,cAAcD,OAAO,KAAK;oBAEzC,OAAO,IAAIE,SAASF,OAAO,KAAK;gBACpC;QAER;QAEA,OAAOJ;IACX;;aA/BO,YAAY,GAAGO,gBAAgB;;AAgC1C;AAEO,MAAMC,uBAAuBC,qBAAqB,oBAAoB,CAAC;IAC1E,gBAAgBV;IAChB,cAAc,EAAE;AACpB"}
package/api/index.d.ts CHANGED
@@ -1 +1,4 @@
1
+ import { WebhooksFeature } from "./WebhooksFeature.js";
2
+ export { WebhooksFeature };
3
+ /** @deprecated use WebhooksFeature instead */
1
4
  export declare const createWebhooks: () => import("@webiny/handler").RegisterExtensionPlugin<import("@webiny/handler/types.js").Context>;
package/api/index.js CHANGED
@@ -1,8 +1,12 @@
1
1
  import { WebhooksFeature } from "./WebhooksFeature.js";
2
2
  import { createRegisterExtensionPlugin } from "@webiny/handler";
3
- const createWebhooks = ()=>createRegisterExtensionPlugin(async (context)=>{
3
+ const createWebhooks = ()=>{
4
+ const plugin = createRegisterExtensionPlugin(async (context)=>{
4
5
  WebhooksFeature.register(context.container);
5
6
  });
6
- export { createWebhooks };
7
+ plugin.name = "webhooks.extension";
8
+ return plugin;
9
+ };
10
+ export { WebhooksFeature, createWebhooks };
7
11
 
8
12
  //# sourceMappingURL=index.js.map
package/api/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api/index.js","sources":["../../src/api/index.ts"],"sourcesContent":["import { WebhooksFeature } from \"./WebhooksFeature.js\";\nimport { createRegisterExtensionPlugin } from \"@webiny/handler\";\n\nexport const createWebhooks = () => {\n return createRegisterExtensionPlugin(async context => {\n WebhooksFeature.register(context.container);\n });\n};\n"],"names":["createWebhooks","createRegisterExtensionPlugin","context","WebhooksFeature"],"mappings":";;AAGO,MAAMA,iBAAiB,IACnBC,8BAA8B,OAAMC;QACvCC,gBAAgB,QAAQ,CAACD,QAAQ,SAAS;IAC9C"}
1
+ {"version":3,"file":"api/index.js","sources":["../../src/api/index.ts"],"sourcesContent":["import { WebhooksFeature } from \"./WebhooksFeature.js\";\nimport { createRegisterExtensionPlugin } from \"@webiny/handler\";\n\nexport { WebhooksFeature };\n\n/** @deprecated use WebhooksFeature instead */\nexport const createWebhooks = () => {\n const plugin = createRegisterExtensionPlugin(async context => {\n WebhooksFeature.register(context.container);\n });\n\n plugin.name = \"webhooks.extension\";\n\n return plugin;\n};\n"],"names":["createWebhooks","plugin","createRegisterExtensionPlugin","context","WebhooksFeature"],"mappings":";;AAMO,MAAMA,iBAAiB;IAC1B,MAAMC,SAASC,8BAA8B,OAAMC;QAC/CC,gBAAgB,QAAQ,CAACD,QAAQ,SAAS;IAC9C;IAEAF,OAAO,IAAI,GAAG;IAEd,OAAOA;AACX"}
@@ -1,6 +1,6 @@
1
1
  import { ModelFactory } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
2
2
  declare class WebhookDeliveryModelFactory implements ModelFactory.Interface {
3
- execute(builder: ModelFactory.Builder): Promise<import("@webiny/api-headless-cms/features/modelBuilder/index.js").PublicModelBuilder[]>;
3
+ execute(builder: ModelFactory.Builder): Promise<import("@webiny/api-headless-cms/features/modelBuilder/index.js").PrivateModelBuilder[]>;
4
4
  }
5
5
  export declare const WebhookDeliveryModel: typeof WebhookDeliveryModelFactory & {
6
6
  __abstraction: import("@webiny/di").Abstraction<import("@webiny/api-headless-cms/features/modelBuilder/abstractions").IModelFactory>;
@@ -2,11 +2,11 @@ import { ModelFactory } from "@webiny/api-headless-cms/features/modelBuilder/ind
2
2
  import { WEBHOOK_DELIVERY_MODEL_ID } from "../domain/constants.js";
3
3
  class WebhookDeliveryModelFactory {
4
4
  async execute(builder) {
5
- const model = builder.public({
5
+ const model = builder.private({
6
6
  modelId: WEBHOOK_DELIVERY_MODEL_ID,
7
7
  name: "Webhook Delivery",
8
- group: "hidden"
9
- }).description("Stores webhook delivery logs.").singularApiName("WebhookDelivery").pluralApiName("WebhookDeliveries").tags([
8
+ lifecycleEvents: false
9
+ }).tags([
10
10
  "$publishing:false",
11
11
  "$hidden:true"
12
12
  ]);
@@ -1 +1 @@
1
- {"version":3,"file":"api/models/WebhookDeliveryModel.js","sources":["../../../src/api/models/WebhookDeliveryModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport { WEBHOOK_DELIVERY_MODEL_ID } from \"~/api/domain/constants.js\";\n\nclass WebhookDeliveryModelFactory implements ModelFactory.Interface {\n async execute(builder: ModelFactory.Builder) {\n const model = builder\n .public({\n modelId: WEBHOOK_DELIVERY_MODEL_ID,\n name: \"Webhook Delivery\",\n group: \"hidden\"\n })\n .description(\"Stores webhook delivery logs.\")\n .singularApiName(\"WebhookDelivery\")\n .pluralApiName(\"WebhookDeliveries\")\n .tags([\"$publishing:false\", \"$hidden:true\"]);\n\n model.fields(fields => ({\n webhookId: fields.text().label(\"Webhook ID\").required(),\n backgroundTaskId: fields.text().label(\"Background Task ID\"),\n eventType: fields.text().label(\"Event Type\").required(),\n status: fields.text().label(\"Status\").required(),\n payload: fields.text().compress().label(\"Payload\"),\n requestHeaders: fields.text().compress().label(\"Request Headers\"),\n responseTime: fields.number().label(\"Response Time (ms)\"),\n responseStatus: fields.number().label(\"Response Status\"),\n responseHeaders: fields.text().compress().label(\"Response Headers\"),\n responseBody: fields.text().compress().label(\"Response Body\")\n }));\n\n return [model];\n }\n}\n\nexport const WebhookDeliveryModel = ModelFactory.createImplementation({\n implementation: WebhookDeliveryModelFactory,\n dependencies: []\n});\n"],"names":["WebhookDeliveryModelFactory","builder","model","WEBHOOK_DELIVERY_MODEL_ID","fields","WebhookDeliveryModel","ModelFactory"],"mappings":";;AAGA,MAAMA;IACF,MAAM,QAAQC,OAA6B,EAAE;QACzC,MAAMC,QAAQD,QACT,MAAM,CAAC;YACJ,SAASE;YACT,MAAM;YACN,OAAO;QACX,GACC,WAAW,CAAC,iCACZ,eAAe,CAAC,mBAChB,aAAa,CAAC,qBACd,IAAI,CAAC;YAAC;YAAqB;SAAe;QAE/CD,MAAM,MAAM,CAACE,CAAAA,SAAW;gBACpB,WAAWA,OAAO,IAAI,GAAG,KAAK,CAAC,cAAc,QAAQ;gBACrD,kBAAkBA,OAAO,IAAI,GAAG,KAAK,CAAC;gBACtC,WAAWA,OAAO,IAAI,GAAG,KAAK,CAAC,cAAc,QAAQ;gBACrD,QAAQA,OAAO,IAAI,GAAG,KAAK,CAAC,UAAU,QAAQ;gBAC9C,SAASA,OAAO,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;gBACxC,gBAAgBA,OAAO,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;gBAC/C,cAAcA,OAAO,MAAM,GAAG,KAAK,CAAC;gBACpC,gBAAgBA,OAAO,MAAM,GAAG,KAAK,CAAC;gBACtC,iBAAiBA,OAAO,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;gBAChD,cAAcA,OAAO,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;YACjD;QAEA,OAAO;YAACF;SAAM;IAClB;AACJ;AAEO,MAAMG,uBAAuBC,aAAa,oBAAoB,CAAC;IAClE,gBAAgBN;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/models/WebhookDeliveryModel.js","sources":["../../../src/api/models/WebhookDeliveryModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport { WEBHOOK_DELIVERY_MODEL_ID } from \"~/api/domain/constants.js\";\n\nclass WebhookDeliveryModelFactory implements ModelFactory.Interface {\n async execute(builder: ModelFactory.Builder) {\n const model = builder\n .private({\n modelId: WEBHOOK_DELIVERY_MODEL_ID,\n name: \"Webhook Delivery\",\n lifecycleEvents: false\n })\n .tags([\"$publishing:false\", \"$hidden:true\"]);\n\n model.fields(fields => ({\n webhookId: fields.text().label(\"Webhook ID\").required(),\n backgroundTaskId: fields.text().label(\"Background Task ID\"),\n eventType: fields.text().label(\"Event Type\").required(),\n status: fields.text().label(\"Status\").required(),\n payload: fields.text().compress().label(\"Payload\"),\n requestHeaders: fields.text().compress().label(\"Request Headers\"),\n responseTime: fields.number().label(\"Response Time (ms)\"),\n responseStatus: fields.number().label(\"Response Status\"),\n responseHeaders: fields.text().compress().label(\"Response Headers\"),\n responseBody: fields.text().compress().label(\"Response Body\")\n }));\n\n return [model];\n }\n}\n\nexport const WebhookDeliveryModel = ModelFactory.createImplementation({\n implementation: WebhookDeliveryModelFactory,\n dependencies: []\n});\n"],"names":["WebhookDeliveryModelFactory","builder","model","WEBHOOK_DELIVERY_MODEL_ID","fields","WebhookDeliveryModel","ModelFactory"],"mappings":";;AAGA,MAAMA;IACF,MAAM,QAAQC,OAA6B,EAAE;QACzC,MAAMC,QAAQD,QACT,OAAO,CAAC;YACL,SAASE;YACT,MAAM;YACN,iBAAiB;QACrB,GACC,IAAI,CAAC;YAAC;YAAqB;SAAe;QAE/CD,MAAM,MAAM,CAACE,CAAAA,SAAW;gBACpB,WAAWA,OAAO,IAAI,GAAG,KAAK,CAAC,cAAc,QAAQ;gBACrD,kBAAkBA,OAAO,IAAI,GAAG,KAAK,CAAC;gBACtC,WAAWA,OAAO,IAAI,GAAG,KAAK,CAAC,cAAc,QAAQ;gBACrD,QAAQA,OAAO,IAAI,GAAG,KAAK,CAAC,UAAU,QAAQ;gBAC9C,SAASA,OAAO,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;gBACxC,gBAAgBA,OAAO,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;gBAC/C,cAAcA,OAAO,MAAM,GAAG,KAAK,CAAC;gBACpC,gBAAgBA,OAAO,MAAM,GAAG,KAAK,CAAC;gBACtC,iBAAiBA,OAAO,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;gBAChD,cAAcA,OAAO,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;YACjD;QAEA,OAAO;YAACF;SAAM;IAClB;AACJ;AAEO,MAAMG,uBAAuBC,aAAa,oBAAoB,CAAC;IAClE,gBAAgBN;IAChB,cAAc,EAAE;AACpB"}
@@ -1,6 +1,6 @@
1
1
  import { ModelFactory } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
2
2
  declare class WebhookModelFactory implements ModelFactory.Interface {
3
- execute(builder: ModelFactory.Builder): Promise<import("@webiny/api-headless-cms/features/modelBuilder/index.js").PublicModelBuilder[]>;
3
+ execute(builder: ModelFactory.Builder): Promise<import("@webiny/api-headless-cms/features/modelBuilder/index.js").PrivateModelBuilder[]>;
4
4
  }
5
5
  export declare const WebhookModel: typeof WebhookModelFactory & {
6
6
  __abstraction: import("@webiny/di").Abstraction<import("@webiny/api-headless-cms/features/modelBuilder/abstractions").IModelFactory>;
@@ -2,16 +2,16 @@ import { ModelFactory } from "@webiny/api-headless-cms/features/modelBuilder/ind
2
2
  import { WEBHOOK_MODEL_ID } from "../domain/constants.js";
3
3
  class WebhookModelFactory {
4
4
  async execute(builder) {
5
- const model = builder.public({
5
+ const model = builder.private({
6
6
  modelId: WEBHOOK_MODEL_ID,
7
7
  name: "Webhook",
8
- group: "hidden"
9
- }).description("Stores webhook configurations.").titleFieldId("name").singularApiName("Webhook").pluralApiName("Webhooks").tags([
8
+ lifecycleEvents: false
9
+ }).tags([
10
10
  "$publishing:false",
11
11
  "$hidden:true"
12
12
  ]);
13
13
  model.fields((fields)=>({
14
- name: fields.text().label("Name").required().minLength(8, "Name must be at least 8 characters long."),
14
+ name: fields.text().label("Name").required(),
15
15
  slug: fields.text().label("Slug").required().description("URL-safe identifier, unique per tenant.").minLength(3, "Slug must be at least 3 characters long.").pattern("^[a-z0-9]+(?:-[a-z0-9]+)*$", "", "Slug can only contain lowercase letters, numbers, and hyphens, and must start and end with a letter or number."),
16
16
  endpointUrl: fields.text().label("Endpoint URL").required().description("HTTPS destination for POST requests.").url("Must be a valid URL starting with https://").minLength(8, "Endpoint URL must be at least 8 characters long.").pattern("^(https:\\/\\/.+|http:\\/\\/localhost.*)", "", "Endpoint URL must start with https://"),
17
17
  description: fields.longText().label("Description"),
@@ -1 +1 @@
1
- {"version":3,"file":"api/models/WebhookModel.js","sources":["../../../src/api/models/WebhookModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport { WEBHOOK_MODEL_ID } from \"~/api/domain/constants.js\";\n\nclass WebhookModelFactory implements ModelFactory.Interface {\n async execute(builder: ModelFactory.Builder) {\n const model = builder\n .public({ modelId: WEBHOOK_MODEL_ID, name: \"Webhook\", group: \"hidden\" })\n .description(\"Stores webhook configurations.\")\n .titleFieldId(\"name\")\n .singularApiName(\"Webhook\")\n .pluralApiName(\"Webhooks\")\n .tags([\"$publishing:false\", \"$hidden:true\"]);\n\n model.fields(fields => ({\n name: fields\n .text()\n .label(\"Name\")\n .required()\n .minLength(8, \"Name must be at least 8 characters long.\"),\n slug: fields\n .text()\n .label(\"Slug\")\n .required()\n .description(\"URL-safe identifier, unique per tenant.\")\n .minLength(3, \"Slug must be at least 3 characters long.\")\n .pattern(\n \"^[a-z0-9]+(?:-[a-z0-9]+)*$\",\n \"\",\n \"Slug can only contain lowercase letters, numbers, and hyphens, and must start and end with a letter or number.\"\n ),\n endpointUrl: fields\n .text()\n .label(\"Endpoint URL\")\n .required()\n .description(\"HTTPS destination for POST requests.\")\n .url(\"Must be a valid URL starting with https://\")\n .minLength(8, \"Endpoint URL must be at least 8 characters long.\")\n .pattern(\n \"^(https:\\\\/\\\\/.+|http:\\\\/\\\\/localhost.*)\",\n \"\",\n \"Endpoint URL must start with https://\"\n ),\n description: fields.longText().label(\"Description\"),\n enabled: fields.boolean().label(\"Enabled\").defaultValue(false),\n events: fields\n .text()\n .list()\n .label(\"Events\")\n .defaultValue([])\n .listMinLength(1, \"At least one event must be selected.\"),\n signingSecret: fields\n .text()\n .encrypt()\n .label(\"Signing Secret\")\n .description(\"Signing secret - will be encrypted in the database.\")\n }));\n\n return [model];\n }\n}\n\nexport const WebhookModel = ModelFactory.createImplementation({\n implementation: WebhookModelFactory,\n dependencies: []\n});\n"],"names":["WebhookModelFactory","builder","model","WEBHOOK_MODEL_ID","fields","WebhookModel","ModelFactory"],"mappings":";;AAGA,MAAMA;IACF,MAAM,QAAQC,OAA6B,EAAE;QACzC,MAAMC,QAAQD,QACT,MAAM,CAAC;YAAE,SAASE;YAAkB,MAAM;YAAW,OAAO;QAAS,GACrE,WAAW,CAAC,kCACZ,YAAY,CAAC,QACb,eAAe,CAAC,WAChB,aAAa,CAAC,YACd,IAAI,CAAC;YAAC;YAAqB;SAAe;QAE/CD,MAAM,MAAM,CAACE,CAAAA,SAAW;gBACpB,MAAMA,OACD,IAAI,GACJ,KAAK,CAAC,QACN,QAAQ,GACR,SAAS,CAAC,GAAG;gBAClB,MAAMA,OACD,IAAI,GACJ,KAAK,CAAC,QACN,QAAQ,GACR,WAAW,CAAC,2CACZ,SAAS,CAAC,GAAG,4CACb,OAAO,CACJ,8BACA,IACA;gBAER,aAAaA,OACR,IAAI,GACJ,KAAK,CAAC,gBACN,QAAQ,GACR,WAAW,CAAC,wCACZ,GAAG,CAAC,8CACJ,SAAS,CAAC,GAAG,oDACb,OAAO,CACJ,4CACA,IACA;gBAER,aAAaA,OAAO,QAAQ,GAAG,KAAK,CAAC;gBACrC,SAASA,OAAO,OAAO,GAAG,KAAK,CAAC,WAAW,YAAY,CAAC;gBACxD,QAAQA,OACH,IAAI,GACJ,IAAI,GACJ,KAAK,CAAC,UACN,YAAY,CAAC,EAAE,EACf,aAAa,CAAC,GAAG;gBACtB,eAAeA,OACV,IAAI,GACJ,OAAO,GACP,KAAK,CAAC,kBACN,WAAW,CAAC;YACrB;QAEA,OAAO;YAACF;SAAM;IAClB;AACJ;AAEO,MAAMG,eAAeC,aAAa,oBAAoB,CAAC;IAC1D,gBAAgBN;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/models/WebhookModel.js","sources":["../../../src/api/models/WebhookModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport { WEBHOOK_MODEL_ID } from \"~/api/domain/constants.js\";\n\nclass WebhookModelFactory implements ModelFactory.Interface {\n async execute(builder: ModelFactory.Builder) {\n const model = builder\n .private({ modelId: WEBHOOK_MODEL_ID, name: \"Webhook\", lifecycleEvents: false })\n .tags([\"$publishing:false\", \"$hidden:true\"]);\n\n model.fields(fields => ({\n name: fields.text().label(\"Name\").required(),\n slug: fields\n .text()\n .label(\"Slug\")\n .required()\n .description(\"URL-safe identifier, unique per tenant.\")\n .minLength(3, \"Slug must be at least 3 characters long.\")\n .pattern(\n \"^[a-z0-9]+(?:-[a-z0-9]+)*$\",\n \"\",\n \"Slug can only contain lowercase letters, numbers, and hyphens, and must start and end with a letter or number.\"\n ),\n endpointUrl: fields\n .text()\n .label(\"Endpoint URL\")\n .required()\n .description(\"HTTPS destination for POST requests.\")\n .url(\"Must be a valid URL starting with https://\")\n .minLength(8, \"Endpoint URL must be at least 8 characters long.\")\n .pattern(\n \"^(https:\\\\/\\\\/.+|http:\\\\/\\\\/localhost.*)\",\n \"\",\n \"Endpoint URL must start with https://\"\n ),\n description: fields.longText().label(\"Description\"),\n enabled: fields.boolean().label(\"Enabled\").defaultValue(false),\n events: fields\n .text()\n .list()\n .label(\"Events\")\n .defaultValue([])\n .listMinLength(1, \"At least one event must be selected.\"),\n signingSecret: fields\n .text()\n .encrypt()\n .label(\"Signing Secret\")\n .description(\"Signing secret - will be encrypted in the database.\")\n }));\n\n return [model];\n }\n}\n\nexport const WebhookModel = ModelFactory.createImplementation({\n implementation: WebhookModelFactory,\n dependencies: []\n});\n"],"names":["WebhookModelFactory","builder","model","WEBHOOK_MODEL_ID","fields","WebhookModel","ModelFactory"],"mappings":";;AAGA,MAAMA;IACF,MAAM,QAAQC,OAA6B,EAAE;QACzC,MAAMC,QAAQD,QACT,OAAO,CAAC;YAAE,SAASE;YAAkB,MAAM;YAAW,iBAAiB;QAAM,GAC7E,IAAI,CAAC;YAAC;YAAqB;SAAe;QAE/CD,MAAM,MAAM,CAACE,CAAAA,SAAW;gBACpB,MAAMA,OAAO,IAAI,GAAG,KAAK,CAAC,QAAQ,QAAQ;gBAC1C,MAAMA,OACD,IAAI,GACJ,KAAK,CAAC,QACN,QAAQ,GACR,WAAW,CAAC,2CACZ,SAAS,CAAC,GAAG,4CACb,OAAO,CACJ,8BACA,IACA;gBAER,aAAaA,OACR,IAAI,GACJ,KAAK,CAAC,gBACN,QAAQ,GACR,WAAW,CAAC,wCACZ,GAAG,CAAC,8CACJ,SAAS,CAAC,GAAG,oDACb,OAAO,CACJ,4CACA,IACA;gBAER,aAAaA,OAAO,QAAQ,GAAG,KAAK,CAAC;gBACrC,SAASA,OAAO,OAAO,GAAG,KAAK,CAAC,WAAW,YAAY,CAAC;gBACxD,QAAQA,OACH,IAAI,GACJ,IAAI,GACJ,KAAK,CAAC,UACN,YAAY,CAAC,EAAE,EACf,aAAa,CAAC,GAAG;gBACtB,eAAeA,OACV,IAAI,GACJ,OAAO,GACP,KAAK,CAAC,kBACN,WAAW,CAAC;YACrB;QAEA,OAAO;YAACF;SAAM;IAClB;AACJ;AAEO,MAAMG,eAAeC,aAAa,oBAAoB,CAAC;IAC1D,gBAAgBN;IAChB,cAAc,EAAE;AACpB"}
@@ -1,6 +1,6 @@
1
1
  import { ModelFactory } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
2
2
  declare class WebhookSettingsModelFactory implements ModelFactory.Interface {
3
- execute(builder: ModelFactory.Builder): Promise<import("@webiny/api-headless-cms/features/modelBuilder/index.js").PublicModelBuilder[]>;
3
+ execute(builder: ModelFactory.Builder): Promise<import("@webiny/api-headless-cms/features/modelBuilder/index.js").PrivateModelBuilder[]>;
4
4
  }
5
5
  export declare const WebhookSettingsModel: typeof WebhookSettingsModelFactory & {
6
6
  __abstraction: import("@webiny/di").Abstraction<import("@webiny/api-headless-cms/features/modelBuilder/abstractions").IModelFactory>;
@@ -2,11 +2,11 @@ import { ModelFactory } from "@webiny/api-headless-cms/features/modelBuilder/ind
2
2
  import { WEBHOOK_DELIVERY_MAX_RETENTION_DAYS, WEBHOOK_SETTINGS_MODEL_ID } from "../domain/constants.js";
3
3
  class WebhookSettingsModelFactory {
4
4
  async execute(builder) {
5
- const model = builder.public({
5
+ const model = builder.private({
6
6
  modelId: WEBHOOK_SETTINGS_MODEL_ID,
7
7
  name: "Webhook Settings",
8
- group: "hidden"
9
- }).description("Global settings for the webhooks system.").titleFieldId("signingSecret").singularApiName("WebhookSettings").pluralApiName("WebhookSettings").tags([
8
+ lifecycleEvents: false
9
+ }).tags([
10
10
  "$publishing:false",
11
11
  "$hidden:true"
12
12
  ]).singleEntry();
@@ -1 +1 @@
1
- {"version":3,"file":"api/models/WebhookSettingsModel.js","sources":["../../../src/api/models/WebhookSettingsModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport {\n WEBHOOK_SETTINGS_MODEL_ID,\n WEBHOOK_DELIVERY_MAX_RETENTION_DAYS\n} from \"~/api/domain/constants.js\";\n\nclass WebhookSettingsModelFactory implements ModelFactory.Interface {\n async execute(builder: ModelFactory.Builder) {\n const model = builder\n .public({\n modelId: WEBHOOK_SETTINGS_MODEL_ID,\n name: \"Webhook Settings\",\n group: \"hidden\"\n })\n .description(\"Global settings for the webhooks system.\")\n .titleFieldId(\"signingSecret\")\n .singularApiName(\"WebhookSettings\")\n .pluralApiName(\"WebhookSettings\")\n .tags([\"$publishing:false\", \"$hidden:true\"])\n .singleEntry();\n\n model.fields(fields => ({\n signingSecret: fields\n .text()\n .label(\"Signing Secret\")\n .encrypt()\n .description(\"Global signing secret used for all webhook deliveries.\"),\n deliveryRetentionDays: fields\n .number()\n .label(\"Delivery Retention (days)\")\n .gte(0, \"Must be 0 or greater.\")\n .lte(\n WEBHOOK_DELIVERY_MAX_RETENTION_DAYS,\n `Must be at most ${WEBHOOK_DELIVERY_MAX_RETENTION_DAYS}.`\n )\n .description(\n `How long to keep delivery logs. 0 = delete immediately. Max ${WEBHOOK_DELIVERY_MAX_RETENTION_DAYS} days.`\n )\n }));\n\n return [model];\n }\n}\n\nexport const WebhookSettingsModel = ModelFactory.createImplementation({\n implementation: WebhookSettingsModelFactory,\n dependencies: []\n});\n"],"names":["WebhookSettingsModelFactory","builder","model","WEBHOOK_SETTINGS_MODEL_ID","fields","WEBHOOK_DELIVERY_MAX_RETENTION_DAYS","WebhookSettingsModel","ModelFactory"],"mappings":";;AAMA,MAAMA;IACF,MAAM,QAAQC,OAA6B,EAAE;QACzC,MAAMC,QAAQD,QACT,MAAM,CAAC;YACJ,SAASE;YACT,MAAM;YACN,OAAO;QACX,GACC,WAAW,CAAC,4CACZ,YAAY,CAAC,iBACb,eAAe,CAAC,mBAChB,aAAa,CAAC,mBACd,IAAI,CAAC;YAAC;YAAqB;SAAe,EAC1C,WAAW;QAEhBD,MAAM,MAAM,CAACE,CAAAA,SAAW;gBACpB,eAAeA,OACV,IAAI,GACJ,KAAK,CAAC,kBACN,OAAO,GACP,WAAW,CAAC;gBACjB,uBAAuBA,OAClB,MAAM,GACN,KAAK,CAAC,6BACN,GAAG,CAAC,GAAG,yBACP,GAAG,CACAC,qCACA,CAAC,gBAAgB,EAAEA,oCAAoC,CAAC,CAAC,EAE5D,WAAW,CACR,CAAC,4DAA4D,EAAEA,oCAAoC,MAAM,CAAC;YAEtH;QAEA,OAAO;YAACH;SAAM;IAClB;AACJ;AAEO,MAAMI,uBAAuBC,aAAa,oBAAoB,CAAC;IAClE,gBAAgBP;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/models/WebhookSettingsModel.js","sources":["../../../src/api/models/WebhookSettingsModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport {\n WEBHOOK_SETTINGS_MODEL_ID,\n WEBHOOK_DELIVERY_MAX_RETENTION_DAYS\n} from \"~/api/domain/constants.js\";\n\nclass WebhookSettingsModelFactory implements ModelFactory.Interface {\n async execute(builder: ModelFactory.Builder) {\n const model = builder\n .private({\n modelId: WEBHOOK_SETTINGS_MODEL_ID,\n name: \"Webhook Settings\",\n lifecycleEvents: false\n })\n .tags([\"$publishing:false\", \"$hidden:true\"])\n .singleEntry();\n\n model.fields(fields => ({\n signingSecret: fields\n .text()\n .label(\"Signing Secret\")\n .encrypt()\n .description(\"Global signing secret used for all webhook deliveries.\"),\n deliveryRetentionDays: fields\n .number()\n .label(\"Delivery Retention (days)\")\n .gte(0, \"Must be 0 or greater.\")\n .lte(\n WEBHOOK_DELIVERY_MAX_RETENTION_DAYS,\n `Must be at most ${WEBHOOK_DELIVERY_MAX_RETENTION_DAYS}.`\n )\n .description(\n `How long to keep delivery logs. 0 = delete immediately. Max ${WEBHOOK_DELIVERY_MAX_RETENTION_DAYS} days.`\n )\n }));\n\n return [model];\n }\n}\n\nexport const WebhookSettingsModel = ModelFactory.createImplementation({\n implementation: WebhookSettingsModelFactory,\n dependencies: []\n});\n"],"names":["WebhookSettingsModelFactory","builder","model","WEBHOOK_SETTINGS_MODEL_ID","fields","WEBHOOK_DELIVERY_MAX_RETENTION_DAYS","WebhookSettingsModel","ModelFactory"],"mappings":";;AAMA,MAAMA;IACF,MAAM,QAAQC,OAA6B,EAAE;QACzC,MAAMC,QAAQD,QACT,OAAO,CAAC;YACL,SAASE;YACT,MAAM;YACN,iBAAiB;QACrB,GACC,IAAI,CAAC;YAAC;YAAqB;SAAe,EAC1C,WAAW;QAEhBD,MAAM,MAAM,CAACE,CAAAA,SAAW;gBACpB,eAAeA,OACV,IAAI,GACJ,KAAK,CAAC,kBACN,OAAO,GACP,WAAW,CAAC;gBACjB,uBAAuBA,OAClB,MAAM,GACN,KAAK,CAAC,6BACN,GAAG,CAAC,GAAG,yBACP,GAAG,CACAC,qCACA,CAAC,gBAAgB,EAAEA,oCAAoC,CAAC,CAAC,EAE5D,WAAW,CACR,CAAC,4DAA4D,EAAEA,oCAAoC,MAAM,CAAC;YAEtH;QAEA,OAAO;YAACH;SAAM;IAClB;AACJ;AAEO,MAAMI,uBAAuBC,aAAa,oBAAoB,CAAC;IAClE,gBAAgBP;IAChB,cAAc,EAAE;AACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/webhooks",
3
- "version": "0.0.0-unstable.7be00a75a9",
3
+ "version": "0.0.0-unstable.7c2def32a7",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -19,35 +19,36 @@
19
19
  },
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "@webiny/admin-ui": "0.0.0-unstable.7be00a75a9",
23
- "@webiny/api-core": "0.0.0-unstable.7be00a75a9",
24
- "@webiny/api-headless-cms": "0.0.0-unstable.7be00a75a9",
25
- "@webiny/app": "0.0.0-unstable.7be00a75a9",
26
- "@webiny/app-admin": "0.0.0-unstable.7be00a75a9",
27
- "@webiny/feature": "0.0.0-unstable.7be00a75a9",
28
- "@webiny/handler-graphql": "0.0.0-unstable.7be00a75a9",
29
- "@webiny/icons": "0.0.0-unstable.7be00a75a9",
30
- "@webiny/sdk": "0.0.0-unstable.7be00a75a9",
31
- "@webiny/tasks": "0.0.0-unstable.7be00a75a9",
32
- "@webiny/utils": "0.0.0-unstable.7be00a75a9",
22
+ "@webiny/admin-ui": "0.0.0-unstable.7c2def32a7",
23
+ "@webiny/api-core": "0.0.0-unstable.7c2def32a7",
24
+ "@webiny/api-graphql": "0.0.0-unstable.7c2def32a7",
25
+ "@webiny/api-headless-cms": "0.0.0-unstable.7c2def32a7",
26
+ "@webiny/app": "0.0.0-unstable.7c2def32a7",
27
+ "@webiny/app-admin": "0.0.0-unstable.7c2def32a7",
28
+ "@webiny/background-tasks": "0.0.0-unstable.7c2def32a7",
29
+ "@webiny/feature": "0.0.0-unstable.7c2def32a7",
30
+ "@webiny/icons": "0.0.0-unstable.7c2def32a7",
31
+ "@webiny/sdk": "0.0.0-unstable.7c2def32a7",
32
+ "@webiny/utils": "0.0.0-unstable.7c2def32a7",
33
+ "graphql": "16.14.2",
33
34
  "lodash": "4.18.1",
34
- "mobx": "6.15.3",
35
- "mobx-react-lite": "4.1.1",
35
+ "mobx": "7.0.3",
36
+ "mobx-react-lite": "5.0.3",
36
37
  "react": "18.3.1",
37
38
  "react-dom": "18.3.1",
38
39
  "standardwebhooks": "1.0.0",
39
40
  "zod": "4.4.3"
40
41
  },
41
42
  "devDependencies": {
42
- "@webiny/api": "0.0.0-unstable.7be00a75a9",
43
- "@webiny/build-tools": "0.0.0-unstable.7be00a75a9",
44
- "@webiny/di": "0.0.0-unstable.7be00a75a9",
45
- "@webiny/handler": "0.0.0-unstable.7be00a75a9",
46
- "@webiny/handler-aws": "0.0.0-unstable.7be00a75a9",
47
- "@webiny/plugins": "0.0.0-unstable.7be00a75a9",
48
- "@webiny/project-utils": "0.0.0-unstable.7be00a75a9",
49
- "typescript": "6.0.3",
50
- "vitest": "4.1.7"
43
+ "@webiny/api": "0.0.0-unstable.7c2def32a7",
44
+ "@webiny/api-core-testing": "0.0.0-unstable.7c2def32a7",
45
+ "@webiny/build-tools": "0.0.0-unstable.7c2def32a7",
46
+ "@webiny/di": "2.0.0",
47
+ "@webiny/event-handler-core": "0.0.0-unstable.7c2def32a7",
48
+ "@webiny/handler": "0.0.0-unstable.7c2def32a7",
49
+ "@webiny/wcp": "0.0.0-unstable.7c2def32a7",
50
+ "typescript": "7.0.2",
51
+ "vitest": "4.1.11"
51
52
  },
52
53
  "publishConfig": {
53
54
  "access": "public"
@@ -1 +0,0 @@
1
- {"version":3,"file":"admin/presentation/WebhookDeliveries/WebhookDeliveriesDataSource.js","sources":["../../../../src/admin/presentation/WebhookDeliveries/WebhookDeliveriesDataSource.ts"],"sourcesContent":["import { makeAutoObservable, runInAction, computed } from \"mobx\";\nimport type {\n IDataSource,\n IDataSourceQuery,\n IDataSourceMeta\n} from \"@webiny/app-admin/presentation/listPresenter/abstractions.js\";\nimport type { WebhookDelivery } from \"~/admin/shared/types.js\";\nimport type {\n IListWebhookDeliveriesUseCase,\n ListWebhookDeliveriesWhere\n} from \"~/admin/features/listWebhookDeliveries/abstractions.js\";\n\nexport class WebhookDeliveriesDataSource implements IDataSource<WebhookDelivery> {\n private _rows: WebhookDelivery[] = [];\n private _meta: IDataSourceMeta = { cursor: null, hasMoreItems: false, totalCount: 0 };\n private _loading = false;\n\n constructor(\n private readonly listDeliveriesUseCase: IListWebhookDeliveriesUseCase,\n private readonly where: ListWebhookDeliveriesWhere\n ) {\n makeAutoObservable<WebhookDeliveriesDataSource, \"listDeliveriesUseCase\">(this, {\n listDeliveriesUseCase: false,\n rows: computed\n });\n }\n\n get rows(): WebhookDelivery[] {\n return this._rows;\n }\n\n get meta(): IDataSourceMeta {\n return this._meta;\n }\n\n get loading(): boolean {\n return this._loading;\n }\n\n async query(params: IDataSourceQuery): Promise<void> {\n this._loading = true;\n const result = await this.listDeliveriesUseCase.execute({\n where: this.where,\n limit: params.limit,\n after: params.cursor\n });\n runInAction(() => {\n this._rows = result.data;\n this._meta = {\n cursor: result.meta.cursor,\n hasMoreItems: result.meta.hasMoreItems,\n totalCount: result.meta.totalCount\n };\n this._loading = false;\n });\n }\n\n async loadMore(params: IDataSourceQuery): Promise<void> {\n if (!this._meta.hasMoreItems || this._loading) {\n return;\n }\n this._loading = true;\n const result = await this.listDeliveriesUseCase.execute({\n where: this.where,\n limit: params.limit,\n after: this._meta.cursor ?? undefined\n });\n runInAction(() => {\n this._rows = [...this._rows, ...result.data];\n this._meta = {\n cursor: result.meta.cursor,\n hasMoreItems: result.meta.hasMoreItems,\n totalCount: result.meta.totalCount\n };\n this._loading = false;\n });\n }\n}\n"],"names":["WebhookDeliveriesDataSource","listDeliveriesUseCase","where","makeAutoObservable","computed","params","result","runInAction","undefined"],"mappings":";AAYO,MAAMA;IAKT,YACqBC,qBAAoD,EACpDC,KAAiC,CACpD;aAFmBD,qBAAqB,GAArBA;aACAC,KAAK,GAALA;aANb,KAAK,GAAsB,EAAE;aAC7B,KAAK,GAAoB;YAAE,QAAQ;YAAM,cAAc;YAAO,YAAY;QAAE;aAC5E,QAAQ,GAAG;QAMfC,mBAAyE,IAAI,EAAE;YAC3E,uBAAuB;YACvB,MAAMC;QACV;IACJ;IAEA,IAAI,OAA0B;QAC1B,OAAO,IAAI,CAAC,KAAK;IACrB;IAEA,IAAI,OAAwB;QACxB,OAAO,IAAI,CAAC,KAAK;IACrB;IAEA,IAAI,UAAmB;QACnB,OAAO,IAAI,CAAC,QAAQ;IACxB;IAEA,MAAM,MAAMC,MAAwB,EAAiB;QACjD,IAAI,CAAC,QAAQ,GAAG;QAChB,MAAMC,SAAS,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;YACpD,OAAO,IAAI,CAAC,KAAK;YACjB,OAAOD,OAAO,KAAK;YACnB,OAAOA,OAAO,MAAM;QACxB;QACAE,YAAY;YACR,IAAI,CAAC,KAAK,GAAGD,OAAO,IAAI;YACxB,IAAI,CAAC,KAAK,GAAG;gBACT,QAAQA,OAAO,IAAI,CAAC,MAAM;gBAC1B,cAAcA,OAAO,IAAI,CAAC,YAAY;gBACtC,YAAYA,OAAO,IAAI,CAAC,UAAU;YACtC;YACA,IAAI,CAAC,QAAQ,GAAG;QACpB;IACJ;IAEA,MAAM,SAASD,MAAwB,EAAiB;QACpD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,EACzC;QAEJ,IAAI,CAAC,QAAQ,GAAG;QAChB,MAAMC,SAAS,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;YACpD,OAAO,IAAI,CAAC,KAAK;YACjB,OAAOD,OAAO,KAAK;YACnB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,IAAIG;QAChC;QACAD,YAAY;YACR,IAAI,CAAC,KAAK,GAAG;mBAAI,IAAI,CAAC,KAAK;mBAAKD,OAAO,IAAI;aAAC;YAC5C,IAAI,CAAC,KAAK,GAAG;gBACT,QAAQA,OAAO,IAAI,CAAC,MAAM;gBAC1B,cAAcA,OAAO,IAAI,CAAC,YAAY;gBACtC,YAAYA,OAAO,IAAI,CAAC,UAAU;YACtC;YACA,IAAI,CAAC,QAAQ,GAAG;QACpB;IACJ;AACJ"}
@@ -1,21 +0,0 @@
1
- import { ListPresenter } from "@webiny/app-admin/presentation/listPresenter/abstractions.js";
2
- import type { WebhookDelivery } from "../../../admin/shared/types.js";
3
- import { type IWebhookDeliveriesPresenter, type IWebhookDeliveriesViewModel } from "./abstractions.js";
4
- import { ListWebhookDeliveriesUseCase } from "../../../admin/features/listWebhookDeliveries/abstractions.js";
5
- import { ResendWebhookDeliveryUseCase } from "../../../admin/features/resendWebhookDelivery/abstractions.js";
6
- declare class WebhookDeliveriesPresenterImpl implements IWebhookDeliveriesPresenter {
7
- private readonly listPresenter;
8
- private readonly listDeliveriesUseCase;
9
- private readonly resendDeliveryUseCase;
10
- private _selectedDelivery;
11
- constructor(listPresenter: ListPresenter.Interface<WebhookDelivery>, listDeliveriesUseCase: ListWebhookDeliveriesUseCase.Interface, resendDeliveryUseCase: ResendWebhookDeliveryUseCase.Interface);
12
- get vm(): IWebhookDeliveriesViewModel;
13
- loadMore(): Promise<void>;
14
- resend(id: string): Promise<void>;
15
- selectDelivery(delivery: WebhookDelivery | null): void;
16
- init(webhookId: string): void;
17
- }
18
- export declare const WebhookDeliveriesPresenter: typeof WebhookDeliveriesPresenterImpl & {
19
- __abstraction: import("@webiny/di").Abstraction<IWebhookDeliveriesPresenter>;
20
- };
21
- export {};