Change webhook configuration to subscription

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-02-13 16:54:46 +01:00
parent 6de906d0a9
commit 60538ef2bb
24 changed files with 915 additions and 885 deletions

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<18c0948adc229a75b1d980e64730b423>>
* @generated SignedSource<<164efe490915ac140a48e42cbd17e915>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -17,7 +17,7 @@ export type WebhooksSettingsPageQuery$data = {
readonly organization: {
readonly __typename: "Organization";
readonly id: string;
readonly webhookConfigurations: {
readonly webhookSubscriptions: {
readonly edges: ReadonlyArray<{
readonly node: {
readonly endpointUrl: string;
@@ -73,7 +73,7 @@ v4 = [
{
"alias": null,
"args": null,
"concreteType": "WebhookConfigurationEdge",
"concreteType": "WebhookSubscriptionEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
@@ -81,7 +81,7 @@ v4 = [
{
"alias": null,
"args": null,
"concreteType": "WebhookConfiguration",
"concreteType": "WebhookSubscription",
"kind": "LinkedField",
"name": "node",
"plural": false,
@@ -195,11 +195,11 @@ return {
"selections": [
(v3/*: any*/),
{
"alias": "webhookConfigurations",
"alias": "webhookSubscriptions",
"args": null,
"concreteType": "WebhookConfigurationConnection",
"concreteType": "WebhookSubscriptionConnection",
"kind": "LinkedField",
"name": "__WebhooksSettingsPage_webhookConfigurations_connection",
"name": "__WebhooksSettingsPage_webhookSubscriptions_connection",
"plural": false,
"selections": (v4/*: any*/),
"storageKey": null
@@ -239,21 +239,21 @@ return {
{
"alias": null,
"args": (v5/*: any*/),
"concreteType": "WebhookConfigurationConnection",
"concreteType": "WebhookSubscriptionConnection",
"kind": "LinkedField",
"name": "webhookConfigurations",
"name": "webhookSubscriptions",
"plural": false,
"selections": (v4/*: any*/),
"storageKey": "webhookConfigurations(first:50)"
"storageKey": "webhookSubscriptions(first:50)"
},
{
"alias": null,
"args": (v5/*: any*/),
"filters": null,
"handle": "connection",
"key": "WebhooksSettingsPage_webhookConfigurations",
"key": "WebhooksSettingsPage_webhookSubscriptions",
"kind": "LinkedHandle",
"name": "webhookConfigurations"
"name": "webhookSubscriptions"
}
],
"type": "Organization",
@@ -265,7 +265,7 @@ return {
]
},
"params": {
"cacheID": "b5ca3cf4d05d2cb81c744e760433cb94",
"cacheID": "eeb9eda2a1b1d205fadba357fc20077c",
"id": null,
"metadata": {
"connection": [
@@ -275,18 +275,18 @@ return {
"direction": "forward",
"path": [
"organization",
"webhookConfigurations"
"webhookSubscriptions"
]
}
]
},
"name": "WebhooksSettingsPageQuery",
"operationKind": "query",
"text": "query WebhooksSettingsPageQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n webhookConfigurations(first: 50) {\n edges {\n node {\n id\n endpointUrl\n selectedEvents\n events(first: 0) {\n totalCount\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n id\n }\n}\n"
"text": "query WebhooksSettingsPageQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n webhookSubscriptions(first: 50) {\n edges {\n node {\n id\n endpointUrl\n selectedEvents\n events(first: 0) {\n totalCount\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n id\n }\n}\n"
}
};
})();
(node as any).hash = "bac1812903d6f495d15bb0e70ce5ed48";
(node as any).hash = "2d08ddd621d3e5880367b83a70d2f168";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<56bfc2d1746edae72b0da44526fab12f>>
* @generated SignedSource<<d3e3309eefb502b19d48c61f9f162d18>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,20 +10,23 @@
import { ConcreteRequest } from 'relay-runtime';
export type WebhookEventType = "MEETING_CREATED" | "MEETING_DELETED" | "MEETING_UPDATED" | "VENDOR_CREATED" | "VENDOR_DELETED" | "VENDOR_UPDATED";
export type CreateWebhookConfigurationInput = {
export type CreateWebhookSubscriptionInput = {
endpointUrl: string;
organizationId: string;
selectedEvents: ReadonlyArray<WebhookEventType>;
};
export type WebhooksSettingsPage_createMutation$variables = {
connections: ReadonlyArray<string>;
input: CreateWebhookConfigurationInput;
input: CreateWebhookSubscriptionInput;
};
export type WebhooksSettingsPage_createMutation$data = {
readonly createWebhookConfiguration: {
readonly webhookConfigurationEdge: {
readonly createWebhookSubscription: {
readonly webhookSubscriptionEdge: {
readonly node: {
readonly endpointUrl: string;
readonly events: {
readonly totalCount: number;
};
readonly id: string;
readonly selectedEvents: ReadonlyArray<WebhookEventType>;
};
@@ -56,15 +59,15 @@ v2 = [
v3 = {
"alias": null,
"args": null,
"concreteType": "WebhookConfigurationEdge",
"concreteType": "WebhookSubscriptionEdge",
"kind": "LinkedField",
"name": "webhookConfigurationEdge",
"name": "webhookSubscriptionEdge",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "WebhookConfiguration",
"concreteType": "WebhookSubscription",
"kind": "LinkedField",
"name": "node",
"plural": false,
@@ -89,6 +92,30 @@ v3 = {
"kind": "ScalarField",
"name": "selectedEvents",
"storageKey": null
},
{
"alias": null,
"args": [
{
"kind": "Literal",
"name": "first",
"value": 0
}
],
"concreteType": "WebhookEventConnection",
"kind": "LinkedField",
"name": "events",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "totalCount",
"storageKey": null
}
],
"storageKey": "events(first:0)"
}
],
"storageKey": null
@@ -109,9 +136,9 @@ return {
{
"alias": null,
"args": (v2/*: any*/),
"concreteType": "CreateWebhookConfigurationPayload",
"concreteType": "CreateWebhookSubscriptionPayload",
"kind": "LinkedField",
"name": "createWebhookConfiguration",
"name": "createWebhookSubscription",
"plural": false,
"selections": [
(v3/*: any*/)
@@ -134,9 +161,9 @@ return {
{
"alias": null,
"args": (v2/*: any*/),
"concreteType": "CreateWebhookConfigurationPayload",
"concreteType": "CreateWebhookSubscriptionPayload",
"kind": "LinkedField",
"name": "createWebhookConfiguration",
"name": "createWebhookSubscription",
"plural": false,
"selections": [
(v3/*: any*/),
@@ -147,7 +174,7 @@ return {
"handle": "prependEdge",
"key": "",
"kind": "LinkedHandle",
"name": "webhookConfigurationEdge",
"name": "webhookSubscriptionEdge",
"handleArgs": [
{
"kind": "Variable",
@@ -162,16 +189,16 @@ return {
]
},
"params": {
"cacheID": "0e88932f635b8f16e41f730abf9e05ff",
"cacheID": "478c002a1f98dd87f23c6af0269ea2c6",
"id": null,
"metadata": {},
"name": "WebhooksSettingsPage_createMutation",
"operationKind": "mutation",
"text": "mutation WebhooksSettingsPage_createMutation(\n $input: CreateWebhookConfigurationInput!\n) {\n createWebhookConfiguration(input: $input) {\n webhookConfigurationEdge {\n node {\n id\n endpointUrl\n selectedEvents\n }\n }\n }\n}\n"
"text": "mutation WebhooksSettingsPage_createMutation(\n $input: CreateWebhookSubscriptionInput!\n) {\n createWebhookSubscription(input: $input) {\n webhookSubscriptionEdge {\n node {\n id\n endpointUrl\n selectedEvents\n events(first: 0) {\n totalCount\n }\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "4e1a7692c83c4dda0c2fc557f15d669d";
(node as any).hash = "f47b849f8cad710922bf62eb6aebdd93";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<86d94ecf595a0048971276541e185905>>
* @generated SignedSource<<bbbb8700958f1bee82226fdbf53189b3>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,16 +9,16 @@
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type DeleteWebhookConfigurationInput = {
webhookConfigurationId: string;
export type DeleteWebhookSubscriptionInput = {
webhookSubscriptionId: string;
};
export type WebhooksSettingsPage_deleteMutation$variables = {
connections: ReadonlyArray<string>;
input: DeleteWebhookConfigurationInput;
input: DeleteWebhookSubscriptionInput;
};
export type WebhooksSettingsPage_deleteMutation$data = {
readonly deleteWebhookConfiguration: {
readonly deletedWebhookConfigurationId: string;
readonly deleteWebhookSubscription: {
readonly deletedWebhookSubscriptionId: string;
};
};
export type WebhooksSettingsPage_deleteMutation = {
@@ -48,7 +48,7 @@ v3 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "deletedWebhookConfigurationId",
"name": "deletedWebhookSubscriptionId",
"storageKey": null
};
return {
@@ -64,9 +64,9 @@ return {
{
"alias": null,
"args": (v2/*: any*/),
"concreteType": "DeleteWebhookConfigurationPayload",
"concreteType": "DeleteWebhookSubscriptionPayload",
"kind": "LinkedField",
"name": "deleteWebhookConfiguration",
"name": "deleteWebhookSubscription",
"plural": false,
"selections": [
(v3/*: any*/)
@@ -89,9 +89,9 @@ return {
{
"alias": null,
"args": (v2/*: any*/),
"concreteType": "DeleteWebhookConfigurationPayload",
"concreteType": "DeleteWebhookSubscriptionPayload",
"kind": "LinkedField",
"name": "deleteWebhookConfiguration",
"name": "deleteWebhookSubscription",
"plural": false,
"selections": [
(v3/*: any*/),
@@ -102,7 +102,7 @@ return {
"handle": "deleteEdge",
"key": "",
"kind": "ScalarHandle",
"name": "deletedWebhookConfigurationId",
"name": "deletedWebhookSubscriptionId",
"handleArgs": [
{
"kind": "Variable",
@@ -117,16 +117,16 @@ return {
]
},
"params": {
"cacheID": "ae53fa4e16e4491720c1fdfc52301c09",
"cacheID": "c1bab418b14488e982f2c444b8693919",
"id": null,
"metadata": {},
"name": "WebhooksSettingsPage_deleteMutation",
"operationKind": "mutation",
"text": "mutation WebhooksSettingsPage_deleteMutation(\n $input: DeleteWebhookConfigurationInput!\n) {\n deleteWebhookConfiguration(input: $input) {\n deletedWebhookConfigurationId\n }\n}\n"
"text": "mutation WebhooksSettingsPage_deleteMutation(\n $input: DeleteWebhookSubscriptionInput!\n) {\n deleteWebhookSubscription(input: $input) {\n deletedWebhookSubscriptionId\n }\n}\n"
}
};
})();
(node as any).hash = "632fce2d89360bed2d857dd3feb90b9d";
(node as any).hash = "794d73fc91d4332f5e65a070ea11d27d";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<7427d67b4f9b27376c782cbe0601a5ec>>
* @generated SignedSource<<6973a312c85bf6bed33ceda2600b989d>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -13,7 +13,7 @@ export type WebhookEventStatus = "FAILED" | "PENDING" | "SUCCEEDED";
export type WebhooksSettingsPage_eventsQuery$variables = {
after?: string | null | undefined;
first?: number | null | undefined;
webhookConfigurationId: string;
webhookSubscriptionId: string;
};
export type WebhooksSettingsPage_eventsQuery$data = {
readonly node: {
@@ -53,13 +53,13 @@ v1 = {
v2 = {
"defaultValue": null,
"kind": "LocalArgument",
"name": "webhookConfigurationId"
"name": "webhookSubscriptionId"
},
v3 = [
{
"kind": "Variable",
"name": "id",
"variableName": "webhookConfigurationId"
"variableName": "webhookSubscriptionId"
}
],
v4 = {
@@ -171,7 +171,7 @@ v5 = {
"storageKey": null
}
],
"type": "WebhookConfiguration",
"type": "WebhookSubscription",
"abstractKey": null
};
return {
@@ -234,16 +234,16 @@ return {
]
},
"params": {
"cacheID": "4593e2ef5dabf3cef70959eb8d2e4b01",
"cacheID": "e74fa0d64dfc6bb54856386970bf4b68",
"id": null,
"metadata": {},
"name": "WebhooksSettingsPage_eventsQuery",
"operationKind": "query",
"text": "query WebhooksSettingsPage_eventsQuery(\n $webhookConfigurationId: ID!\n $first: Int\n $after: CursorKey\n) {\n node(id: $webhookConfigurationId) {\n __typename\n ... on WebhookConfiguration {\n events(first: $first, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n node {\n id\n status\n createdAt\n response\n }\n }\n }\n }\n id\n }\n}\n"
"text": "query WebhooksSettingsPage_eventsQuery(\n $webhookSubscriptionId: ID!\n $first: Int\n $after: CursorKey\n) {\n node(id: $webhookSubscriptionId) {\n __typename\n ... on WebhookSubscription {\n events(first: $first, after: $after) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n node {\n id\n status\n createdAt\n response\n }\n }\n }\n }\n id\n }\n}\n"
}
};
})();
(node as any).hash = "16da5d0681f767c57e3f352d4956eefe";
(node as any).hash = "75d3f1df0526526656b065b6d9be8b65";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<af555c91779a2fbceaae3666d5bae667>>
* @generated SignedSource<<d341340b571530212b3cdc8722d694f1>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,7 +10,7 @@
import { ConcreteRequest } from 'relay-runtime';
export type WebhooksSettingsPage_signingSecretQuery$variables = {
webhookConfigurationId: string;
webhookSubscriptionId: string;
};
export type WebhooksSettingsPage_signingSecretQuery$data = {
readonly node: {
@@ -27,14 +27,14 @@ var v0 = [
{
"defaultValue": null,
"kind": "LocalArgument",
"name": "webhookConfigurationId"
"name": "webhookSubscriptionId"
}
],
v1 = [
{
"kind": "Variable",
"name": "id",
"variableName": "webhookConfigurationId"
"variableName": "webhookSubscriptionId"
}
],
v2 = {
@@ -48,7 +48,7 @@ v2 = {
"storageKey": null
}
],
"type": "WebhookConfiguration",
"type": "WebhookSubscription",
"abstractKey": null
};
return {
@@ -109,16 +109,16 @@ return {
]
},
"params": {
"cacheID": "266c1519da14eb09ed28e26cc6394f23",
"cacheID": "df35742c680c055e5b820401cfb05271",
"id": null,
"metadata": {},
"name": "WebhooksSettingsPage_signingSecretQuery",
"operationKind": "query",
"text": "query WebhooksSettingsPage_signingSecretQuery(\n $webhookConfigurationId: ID!\n) {\n node(id: $webhookConfigurationId) {\n __typename\n ... on WebhookConfiguration {\n signingSecret\n }\n id\n }\n}\n"
"text": "query WebhooksSettingsPage_signingSecretQuery(\n $webhookSubscriptionId: ID!\n) {\n node(id: $webhookSubscriptionId) {\n __typename\n ... on WebhookSubscription {\n signingSecret\n }\n id\n }\n}\n"
}
};
})();
(node as any).hash = "9d981d1a353a82f234e7ce79edb6d5d9";
(node as any).hash = "2d895bf4be96e0ef2c767af8149c8533";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<3331839e2cc81d14ac1b2fcfe3fd84f1>>
* @generated SignedSource<<864603efd6135475b827a1234b128b7c>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,17 +10,17 @@
import { ConcreteRequest } from 'relay-runtime';
export type WebhookEventType = "MEETING_CREATED" | "MEETING_DELETED" | "MEETING_UPDATED" | "VENDOR_CREATED" | "VENDOR_DELETED" | "VENDOR_UPDATED";
export type UpdateWebhookConfigurationInput = {
export type UpdateWebhookSubscriptionInput = {
endpointUrl?: string | null | undefined;
id: string;
selectedEvents?: ReadonlyArray<WebhookEventType> | null | undefined;
};
export type WebhooksSettingsPage_updateMutation$variables = {
input: UpdateWebhookConfigurationInput;
input: UpdateWebhookSubscriptionInput;
};
export type WebhooksSettingsPage_updateMutation$data = {
readonly updateWebhookConfiguration: {
readonly webhookConfiguration: {
readonly updateWebhookSubscription: {
readonly webhookSubscription: {
readonly endpointUrl: string;
readonly id: string;
readonly selectedEvents: ReadonlyArray<WebhookEventType>;
@@ -51,17 +51,17 @@ v1 = [
"variableName": "input"
}
],
"concreteType": "UpdateWebhookConfigurationPayload",
"concreteType": "UpdateWebhookSubscriptionPayload",
"kind": "LinkedField",
"name": "updateWebhookConfiguration",
"name": "updateWebhookSubscription",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "WebhookConfiguration",
"concreteType": "WebhookSubscription",
"kind": "LinkedField",
"name": "webhookConfiguration",
"name": "webhookSubscription",
"plural": false,
"selections": [
{
@@ -117,16 +117,16 @@ return {
"selections": (v1/*: any*/)
},
"params": {
"cacheID": "399a35c005f10dd321784a7533fb4f80",
"cacheID": "e12790e2de3f89c6606b50a597acb244",
"id": null,
"metadata": {},
"name": "WebhooksSettingsPage_updateMutation",
"operationKind": "mutation",
"text": "mutation WebhooksSettingsPage_updateMutation(\n $input: UpdateWebhookConfigurationInput!\n) {\n updateWebhookConfiguration(input: $input) {\n webhookConfiguration {\n id\n endpointUrl\n selectedEvents\n updatedAt\n }\n }\n}\n"
"text": "mutation WebhooksSettingsPage_updateMutation(\n $input: UpdateWebhookSubscriptionInput!\n) {\n updateWebhookSubscription(input: $input) {\n webhookSubscription {\n id\n endpointUrl\n selectedEvents\n updatedAt\n }\n }\n}\n"
}
};
})();
(node as any).hash = "f974aae43d0ad8b5fe3cab60bd07a3ff";
(node as any).hash = "f4c0f7667d77b64c41e436a7b5df6df5";
export default node;