Hide accepted invitations
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -4,10 +4,19 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Add invitation filtering by multiple states (PENDING/ACCEPTED/EXPIRED)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Settings page now shows only pending and expired invitations (accepted invitations are hidden)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fix document classification not being passed when creating documents
|
- Fix document classification not being passed when creating documents
|
||||||
- Fix document classification changes not syncing to draft versions
|
- Fix document classification changes not syncing to draft versions
|
||||||
|
- Fix organization invitations filter not being applied at database level
|
||||||
|
|
||||||
## [0.76.0] - 2025-10-22
|
## [0.76.0] - 2025-10-22
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<8c0884f06c22c11239816cecf638ebbd>>
|
* @generated SignedSource<<e08c5c7fa8cd8bec9755ef2afe810797>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -89,50 +89,52 @@ v8 = {
|
|||||||
"name": "updatedAt",
|
"name": "updatedAt",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v9 = [
|
v9 = {
|
||||||
{
|
"kind": "Literal",
|
||||||
"kind": "Literal",
|
"name": "first",
|
||||||
"name": "first",
|
"value": 20
|
||||||
"value": 20
|
},
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "Literal",
|
|
||||||
"name": "orderBy",
|
|
||||||
"value": {
|
|
||||||
"direction": "ASC",
|
|
||||||
"field": "CREATED_AT"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
v10 = {
|
v10 = {
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "orderBy",
|
||||||
|
"value": {
|
||||||
|
"direction": "ASC",
|
||||||
|
"field": "CREATED_AT"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
v11 = [
|
||||||
|
(v9/*: any*/),
|
||||||
|
(v10/*: any*/)
|
||||||
|
],
|
||||||
|
v12 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "totalCount",
|
"name": "totalCount",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v11 = {
|
v13 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "fullName",
|
"name": "fullName",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v12 = {
|
v14 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "role",
|
"name": "role",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v13 = {
|
v15 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "cursor",
|
"name": "cursor",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v14 = {
|
v16 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"concreteType": "PageInfo",
|
"concreteType": "PageInfo",
|
||||||
@@ -171,7 +173,7 @@ v14 = {
|
|||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v15 = {
|
v17 = {
|
||||||
"kind": "ClientExtension",
|
"kind": "ClientExtension",
|
||||||
"selections": [
|
"selections": [
|
||||||
{
|
{
|
||||||
@@ -183,8 +185,19 @@ v15 = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
v16 = [
|
v18 = [
|
||||||
"orderBy"
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "filter",
|
||||||
|
"value": {
|
||||||
|
"statuses": [
|
||||||
|
"PENDING",
|
||||||
|
"EXPIRED"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
(v9/*: any*/),
|
||||||
|
(v10/*: any*/)
|
||||||
];
|
];
|
||||||
return {
|
return {
|
||||||
"fragment": {
|
"fragment": {
|
||||||
@@ -404,13 +417,13 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v9/*: any*/),
|
"args": (v11/*: any*/),
|
||||||
"concreteType": "MembershipConnection",
|
"concreteType": "MembershipConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "memberships",
|
"name": "memberships",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v10/*: any*/),
|
(v12/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -428,7 +441,7 @@ return {
|
|||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v2/*: any*/),
|
(v2/*: any*/),
|
||||||
(v11/*: any*/),
|
(v13/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -436,25 +449,27 @@ return {
|
|||||||
"name": "emailAddress",
|
"name": "emailAddress",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v12/*: any*/),
|
(v14/*: any*/),
|
||||||
(v7/*: any*/),
|
(v7/*: any*/),
|
||||||
(v4/*: any*/)
|
(v4/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v13/*: any*/)
|
(v15/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v14/*: any*/),
|
(v16/*: any*/),
|
||||||
(v15/*: any*/)
|
(v17/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": "memberships(first:20,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
"storageKey": "memberships(first:20,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v9/*: any*/),
|
"args": (v11/*: any*/),
|
||||||
"filters": (v16/*: any*/),
|
"filters": [
|
||||||
|
"orderBy"
|
||||||
|
],
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "SettingsPageMemberships_memberships",
|
"key": "SettingsPageMemberships_memberships",
|
||||||
"kind": "LinkedHandle",
|
"kind": "LinkedHandle",
|
||||||
@@ -462,13 +477,13 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v9/*: any*/),
|
"args": (v18/*: any*/),
|
||||||
"concreteType": "InvitationConnection",
|
"concreteType": "InvitationConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "invitations",
|
"name": "invitations",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v10/*: any*/),
|
(v12/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -487,8 +502,8 @@ return {
|
|||||||
"selections": [
|
"selections": [
|
||||||
(v2/*: any*/),
|
(v2/*: any*/),
|
||||||
(v5/*: any*/),
|
(v5/*: any*/),
|
||||||
(v11/*: any*/),
|
(v13/*: any*/),
|
||||||
(v12/*: any*/),
|
(v14/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -515,19 +530,22 @@ return {
|
|||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v13/*: any*/)
|
(v15/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v14/*: any*/),
|
(v16/*: any*/),
|
||||||
(v15/*: any*/)
|
(v17/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": "invitations(first:20,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
"storageKey": "invitations(filter:{\"statuses\":[\"PENDING\",\"EXPIRED\"]},first:20,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v9/*: any*/),
|
"args": (v18/*: any*/),
|
||||||
"filters": (v16/*: any*/),
|
"filters": [
|
||||||
|
"orderBy",
|
||||||
|
"filter"
|
||||||
|
],
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "SettingsPageInvitations_invitations",
|
"key": "SettingsPageInvitations_invitations",
|
||||||
"kind": "LinkedHandle",
|
"kind": "LinkedHandle",
|
||||||
@@ -543,12 +561,12 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "1f03968306005615bd5d2f70342db661",
|
"cacheID": "daa371367edee014ac05cb9712ce360d",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "OrganizationGraph_ViewQuery",
|
"name": "OrganizationGraph_ViewQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query OrganizationGraph_ViewQuery(\n $organizationId: ID!\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n name\n ...SettingsPageFragment\n ...SettingsPageMembershipsFragment\n ...SettingsPageInvitationsFragment\n }\n id\n }\n}\n\nfragment SettingsPageFragment on Organization {\n id\n name\n logoUrl\n horizontalLogoUrl\n description\n websiteUrl\n email\n headquarterAddress\n customDomain {\n id\n domain\n sslStatus\n dnsRecords {\n type\n name\n value\n ttl\n purpose\n }\n createdAt\n updatedAt\n sslExpiresAt\n }\n createdAt\n updatedAt\n connectors(first: 100) {\n edges {\n node {\n id\n name\n type\n createdAt\n }\n }\n }\n}\n\nfragment SettingsPageInvitationsFragment on Organization {\n invitations(first: 20, orderBy: {direction: ASC, field: CREATED_AT}) {\n totalCount\n edges {\n node {\n id\n email\n fullName\n role\n status\n expiresAt\n acceptedAt\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment SettingsPageMembershipsFragment on Organization {\n memberships(first: 20, orderBy: {direction: ASC, field: CREATED_AT}) {\n totalCount\n edges {\n node {\n id\n fullName\n emailAddress\n role\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
"text": "query OrganizationGraph_ViewQuery(\n $organizationId: ID!\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n name\n ...SettingsPageFragment\n ...SettingsPageMembershipsFragment\n ...SettingsPageInvitationsFragment\n }\n id\n }\n}\n\nfragment SettingsPageFragment on Organization {\n id\n name\n logoUrl\n horizontalLogoUrl\n description\n websiteUrl\n email\n headquarterAddress\n customDomain {\n id\n domain\n sslStatus\n dnsRecords {\n type\n name\n value\n ttl\n purpose\n }\n createdAt\n updatedAt\n sslExpiresAt\n }\n createdAt\n updatedAt\n connectors(first: 100) {\n edges {\n node {\n id\n name\n type\n createdAt\n }\n }\n }\n}\n\nfragment SettingsPageInvitationsFragment on Organization {\n invitations(first: 20, orderBy: {direction: ASC, field: CREATED_AT}, filter: {statuses: [PENDING, EXPIRED]}) {\n totalCount\n edges {\n node {\n id\n email\n fullName\n role\n status\n expiresAt\n acceptedAt\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment SettingsPageMembershipsFragment on Organization {\n memberships(first: 20, orderBy: {direction: ASC, field: CREATED_AT}) {\n totalCount\n edges {\n node {\n id\n fullName\n emailAddress\n role\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ const OrganizationSelectorFragment = graphql`
|
|||||||
endCursor
|
endCursor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
invitations(first: 1, filter: {status: PENDING}) {
|
invitations(first: 1, filter: {statuses: [PENDING]}) {
|
||||||
totalCount
|
totalCount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<dedda437f17ae35a28c1cdc28ed21a62>>
|
* @generated SignedSource<<3a99643b92330af6920aac4c2286376f>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -215,7 +215,9 @@ return {
|
|||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "filter",
|
"name": "filter",
|
||||||
"value": {
|
"value": {
|
||||||
"status": "PENDING"
|
"statuses": [
|
||||||
|
"PENDING"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -237,7 +239,7 @@ return {
|
|||||||
"storageKey": null
|
"storageKey": null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"storageKey": "invitations(filter:{\"status\":\"PENDING\"},first:1)"
|
"storageKey": "invitations(filter:{\"statuses\":[\"PENDING\"]},first:1)"
|
||||||
},
|
},
|
||||||
(v4/*: any*/)
|
(v4/*: any*/)
|
||||||
],
|
],
|
||||||
@@ -246,16 +248,16 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "dbf01211a1e8b22f1d74fa9c2171231d",
|
"cacheID": "d51b49a50afe664ee9903c1bb265ab79",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "MainLayoutOrganizationSelectorPaginationQuery",
|
"name": "MainLayoutOrganizationSelectorPaginationQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query MainLayoutOrganizationSelectorPaginationQuery(\n $after: CursorKey\n $first: Int = 25\n) {\n viewer {\n ...MainLayout_OrganizationSelector_viewer_2HEEH6\n id\n }\n}\n\nfragment MainLayout_OrganizationSelector_viewer_2HEEH6 on Viewer {\n organizations(first: $first, after: $after, orderBy: {field: NAME, direction: ASC}) {\n edges {\n node {\n id\n name\n logoUrl\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n invitations(first: 1, filter: {status: PENDING}) {\n totalCount\n }\n}\n"
|
"text": "query MainLayoutOrganizationSelectorPaginationQuery(\n $after: CursorKey\n $first: Int = 25\n) {\n viewer {\n ...MainLayout_OrganizationSelector_viewer_2HEEH6\n id\n }\n}\n\nfragment MainLayout_OrganizationSelector_viewer_2HEEH6 on Viewer {\n organizations(first: $first, after: $after, orderBy: {field: NAME, direction: ASC}) {\n edges {\n node {\n id\n name\n logoUrl\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n invitations(first: 1, filter: {statuses: [PENDING]}) {\n totalCount\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "d1491a8228d455e2491724c03c7c30c1";
|
(node as any).hash = "3e00f1a6f8089fc59144807a07fd1bdf";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<cb335e1fd93543371a82adf23002f600>>
|
* @generated SignedSource<<1a7aa899a9b6251477122c87ae1c6431>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -283,7 +283,9 @@ return {
|
|||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "filter",
|
"name": "filter",
|
||||||
"value": {
|
"value": {
|
||||||
"status": "PENDING"
|
"statuses": [
|
||||||
|
"PENDING"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -305,7 +307,7 @@ return {
|
|||||||
"storageKey": null
|
"storageKey": null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"storageKey": "invitations(filter:{\"status\":\"PENDING\"},first:1)"
|
"storageKey": "invitations(filter:{\"statuses\":[\"PENDING\"]},first:1)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
@@ -335,12 +337,12 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "117a78fef8e7a8fe200baf1ebf2d2487",
|
"cacheID": "6de25e54419d82cb6465c903a0afdd78",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "MainLayoutQuery",
|
"name": "MainLayoutQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query MainLayoutQuery(\n $organizationId: ID!\n) {\n viewer {\n id\n user {\n fullName\n email\n id\n }\n ...MainLayout_OrganizationSelector_viewer\n }\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n name\n logoUrl\n }\n id\n }\n}\n\nfragment MainLayout_OrganizationSelector_viewer on Viewer {\n organizations(first: 25, orderBy: {field: NAME, direction: ASC}) {\n edges {\n node {\n id\n name\n logoUrl\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n invitations(first: 1, filter: {status: PENDING}) {\n totalCount\n }\n}\n"
|
"text": "query MainLayoutQuery(\n $organizationId: ID!\n) {\n viewer {\n id\n user {\n fullName\n email\n id\n }\n ...MainLayout_OrganizationSelector_viewer\n }\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n name\n logoUrl\n }\n id\n }\n}\n\nfragment MainLayout_OrganizationSelector_viewer on Viewer {\n organizations(first: 25, orderBy: {field: NAME, direction: ASC}) {\n edges {\n node {\n id\n name\n logoUrl\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n invitations(first: 1, filter: {statuses: [PENDING]}) {\n totalCount\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<bd521d62fb0f29ace7af511b527ef750>>
|
* @generated SignedSource<<b0e167541047d61efc6d30382c062d0d>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -189,7 +189,9 @@ return {
|
|||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "filter",
|
"name": "filter",
|
||||||
"value": {
|
"value": {
|
||||||
"status": "PENDING"
|
"statuses": [
|
||||||
|
"PENDING"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -211,7 +213,7 @@ return {
|
|||||||
"storageKey": null
|
"storageKey": null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"storageKey": "invitations(filter:{\"status\":\"PENDING\"},first:1)"
|
"storageKey": "invitations(filter:{\"statuses\":[\"PENDING\"]},first:1)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "Viewer",
|
"type": "Viewer",
|
||||||
@@ -219,6 +221,6 @@ return {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "d1491a8228d455e2491724c03c7c30c1";
|
(node as any).hash = "3e00f1a6f8089fc59144807a07fd1bdf";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const OrganizationsPageQuery = graphql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
invitations(first: 1000, orderBy: {field: CREATED_AT, direction: DESC}, filter: {status: PENDING}) @connection(key: "OrganizationsPage_invitations") {
|
invitations(first: 1000, orderBy: {field: CREATED_AT, direction: DESC}, filter: {statuses: [PENDING]}) @connection(key: "OrganizationsPage_invitations") {
|
||||||
__id
|
__id
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<fd6d397e513dc681f055a502fa93a6b4>>
|
* @generated SignedSource<<580387b50cff64395ba9afd4c7454d20>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -162,7 +162,9 @@ v8 = {
|
|||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "filter",
|
"name": "filter",
|
||||||
"value": {
|
"value": {
|
||||||
"status": "PENDING"
|
"statuses": [
|
||||||
|
"PENDING"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
v9 = {
|
v9 = {
|
||||||
@@ -309,7 +311,7 @@ return {
|
|||||||
"name": "__OrganizationsPage_invitations_connection",
|
"name": "__OrganizationsPage_invitations_connection",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": (v10/*: any*/),
|
"selections": (v10/*: any*/),
|
||||||
"storageKey": "__OrganizationsPage_invitations_connection(filter:{\"status\":\"PENDING\"},orderBy:{\"direction\":\"DESC\",\"field\":\"CREATED_AT\"})"
|
"storageKey": "__OrganizationsPage_invitations_connection(filter:{\"statuses\":[\"PENDING\"]},orderBy:{\"direction\":\"DESC\",\"field\":\"CREATED_AT\"})"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
@@ -361,7 +363,7 @@ return {
|
|||||||
"name": "invitations",
|
"name": "invitations",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": (v10/*: any*/),
|
"selections": (v10/*: any*/),
|
||||||
"storageKey": "invitations(filter:{\"status\":\"PENDING\"},first:1000,orderBy:{\"direction\":\"DESC\",\"field\":\"CREATED_AT\"})"
|
"storageKey": "invitations(filter:{\"statuses\":[\"PENDING\"]},first:1000,orderBy:{\"direction\":\"DESC\",\"field\":\"CREATED_AT\"})"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
@@ -382,7 +384,7 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "f8cd83b9b7ce0e1b43adc7aec05198bb",
|
"cacheID": "1b2e528133e56da643b9f8214a2f7192",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"connection": [
|
"connection": [
|
||||||
@@ -408,11 +410,11 @@ return {
|
|||||||
},
|
},
|
||||||
"name": "OrganizationsPageQuery",
|
"name": "OrganizationsPageQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query OrganizationsPageQuery {\n viewer {\n organizations(first: 1000, orderBy: {field: NAME, direction: ASC}) {\n edges {\n node {\n id\n name\n logoUrl\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n invitations(first: 1000, orderBy: {field: CREATED_AT, direction: DESC}, filter: {status: PENDING}) {\n edges {\n node {\n id\n email\n fullName\n role\n expiresAt\n acceptedAt\n createdAt\n organization {\n id\n name\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n id\n }\n}\n"
|
"text": "query OrganizationsPageQuery {\n viewer {\n organizations(first: 1000, orderBy: {field: NAME, direction: ASC}) {\n edges {\n node {\n id\n name\n logoUrl\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n invitations(first: 1000, orderBy: {field: CREATED_AT, direction: DESC}, filter: {statuses: [PENDING]}) {\n edges {\n node {\n id\n email\n fullName\n role\n expiresAt\n acceptedAt\n createdAt\n organization {\n id\n name\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n id\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "d1957c93062d07020dc978b0f62bdf41";
|
(node as any).hash = "ecd2534f36aa95ff7ff864ff22f09189";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ const paginatedInvitationsFragment = graphql`
|
|||||||
last: $last
|
last: $last
|
||||||
before: $before
|
before: $before
|
||||||
orderBy: $order
|
orderBy: $order
|
||||||
|
filter: {statuses: [PENDING, EXPIRED]}
|
||||||
) @connection(key: "SettingsPageInvitations_invitations") {
|
) @connection(key: "SettingsPageInvitations_invitations") {
|
||||||
__id
|
__id
|
||||||
totalCount
|
totalCount
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<33365519d19ebac5b95ae4c54652d49d>>
|
* @generated SignedSource<<39e11ee9cf99dc541aa5a8df259e8438>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -112,6 +112,16 @@ v12 = {
|
|||||||
v13 = [
|
v13 = [
|
||||||
(v7/*: any*/),
|
(v7/*: any*/),
|
||||||
(v8/*: any*/),
|
(v8/*: any*/),
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "filter",
|
||||||
|
"value": {
|
||||||
|
"statuses": [
|
||||||
|
"PENDING",
|
||||||
|
"EXPIRED"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
(v9/*: any*/),
|
(v9/*: any*/),
|
||||||
(v10/*: any*/),
|
(v10/*: any*/),
|
||||||
{
|
{
|
||||||
@@ -343,7 +353,8 @@ return {
|
|||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v13/*: any*/),
|
"args": (v13/*: any*/),
|
||||||
"filters": [
|
"filters": [
|
||||||
"orderBy"
|
"orderBy",
|
||||||
|
"filter"
|
||||||
],
|
],
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "SettingsPageInvitations_invitations",
|
"key": "SettingsPageInvitations_invitations",
|
||||||
@@ -360,16 +371,16 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "0aa692d4815ddc0a17f76209ea0a5c4f",
|
"cacheID": "24b42a44e783a7f8499a568de2c8f9f4",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "SettingsInvitationsRefetchQuery",
|
"name": "SettingsInvitationsRefetchQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query SettingsInvitationsRefetchQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 20\n $last: Int = null\n $order: InvitationOrder = {direction: ASC, field: CREATED_AT}\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...SettingsPageInvitationsFragment_16fISc\n id\n }\n}\n\nfragment SettingsPageInvitationsFragment_16fISc on Organization {\n invitations(first: $first, after: $after, last: $last, before: $before, orderBy: $order) {\n totalCount\n edges {\n node {\n id\n email\n fullName\n role\n status\n expiresAt\n acceptedAt\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
"text": "query SettingsInvitationsRefetchQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 20\n $last: Int = null\n $order: InvitationOrder = {direction: ASC, field: CREATED_AT}\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...SettingsPageInvitationsFragment_16fISc\n id\n }\n}\n\nfragment SettingsPageInvitationsFragment_16fISc on Organization {\n invitations(first: $first, after: $after, last: $last, before: $before, orderBy: $order, filter: {statuses: [PENDING, EXPIRED]}) {\n totalCount\n edges {\n node {\n id\n email\n fullName\n role\n status\n expiresAt\n acceptedAt\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "f9a1ec38579cea21312ba0a20bb7394a";
|
(node as any).hash = "b56157db731d3968bb825dd36375ddb7";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<09561c2c29459fc840773b414af6083a>>
|
* @generated SignedSource<<7ca4537a89a599fe5d2b7ecad753aa64>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -117,6 +117,16 @@ return {
|
|||||||
{
|
{
|
||||||
"alias": "invitations",
|
"alias": "invitations",
|
||||||
"args": [
|
"args": [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "filter",
|
||||||
|
"value": {
|
||||||
|
"statuses": [
|
||||||
|
"PENDING",
|
||||||
|
"EXPIRED"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"kind": "Variable",
|
"kind": "Variable",
|
||||||
"name": "orderBy",
|
"name": "orderBy",
|
||||||
@@ -282,6 +292,6 @@ return {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "f9a1ec38579cea21312ba0a20bb7394a";
|
(node as any).hash = "b56157db731d3968bb825dd36375ddb7";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -378,13 +378,14 @@ func (s *TenantAuthzService) GetInvitationsByOrganizationID(
|
|||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
orgID gid.GID,
|
orgID gid.GID,
|
||||||
cursor *page.Cursor[coredata.InvitationOrderField],
|
cursor *page.Cursor[coredata.InvitationOrderField],
|
||||||
|
filter *coredata.InvitationFilter,
|
||||||
) (*page.Page[*coredata.Invitation, coredata.InvitationOrderField], error) {
|
) (*page.Page[*coredata.Invitation, coredata.InvitationOrderField], error) {
|
||||||
var invitations coredata.Invitations
|
var invitations coredata.Invitations
|
||||||
|
|
||||||
err := s.pg.WithConn(
|
err := s.pg.WithConn(
|
||||||
ctx,
|
ctx,
|
||||||
func(conn pg.Conn) error {
|
func(conn pg.Conn) error {
|
||||||
if err := invitations.LoadByOrganizationID(ctx, conn, s.scope, orgID, cursor); err != nil {
|
if err := invitations.LoadByOrganizationID(ctx, conn, s.scope, orgID, cursor, filter); err != nil {
|
||||||
return fmt.Errorf("failed to load organization invitations: %w", err)
|
return fmt.Errorf("failed to load organization invitations: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,6 +402,7 @@ func (s *TenantAuthzService) GetInvitationsByOrganizationID(
|
|||||||
func (s *TenantAuthzService) CountOrganizationInvitations(
|
func (s *TenantAuthzService) CountOrganizationInvitations(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
orgID gid.GID,
|
orgID gid.GID,
|
||||||
|
filter *coredata.InvitationFilter,
|
||||||
) (int, error) {
|
) (int, error) {
|
||||||
var count int
|
var count int
|
||||||
err := s.pg.WithConn(
|
err := s.pg.WithConn(
|
||||||
@@ -408,7 +410,7 @@ func (s *TenantAuthzService) CountOrganizationInvitations(
|
|||||||
func(conn pg.Conn) error {
|
func(conn pg.Conn) error {
|
||||||
var invitations coredata.Invitations
|
var invitations coredata.Invitations
|
||||||
var err error
|
var err error
|
||||||
count, err = invitations.CountByOrganizationID(ctx, conn, s.scope, orgID)
|
count, err = invitations.CountByOrganizationID(ctx, conn, s.scope, orgID, filter)
|
||||||
return err
|
return err
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -297,6 +297,7 @@ func (i *Invitations) LoadByOrganizationID(
|
|||||||
scope Scoper,
|
scope Scoper,
|
||||||
orgID gid.GID,
|
orgID gid.GID,
|
||||||
cursor *page.Cursor[InvitationOrderField],
|
cursor *page.Cursor[InvitationOrderField],
|
||||||
|
filter *InvitationFilter,
|
||||||
) error {
|
) error {
|
||||||
query := `
|
query := `
|
||||||
SELECT
|
SELECT
|
||||||
@@ -319,14 +320,16 @@ WHERE
|
|||||||
organization_id = @organization_id
|
organization_id = @organization_id
|
||||||
AND %s
|
AND %s
|
||||||
AND %s
|
AND %s
|
||||||
|
AND %s
|
||||||
`
|
`
|
||||||
|
|
||||||
query = fmt.Sprintf(query, scope.SQLFragment(), cursor.SQLFragment())
|
query = fmt.Sprintf(query, scope.SQLFragment(), filter.SQLFragment(), cursor.SQLFragment())
|
||||||
|
|
||||||
args := pgx.StrictNamedArgs{
|
args := pgx.StrictNamedArgs{
|
||||||
"organization_id": orgID,
|
"organization_id": orgID,
|
||||||
}
|
}
|
||||||
maps.Copy(args, scope.SQLArguments())
|
maps.Copy(args, scope.SQLArguments())
|
||||||
|
maps.Copy(args, filter.SQLArguments())
|
||||||
maps.Copy(args, cursor.SQLArguments())
|
maps.Copy(args, cursor.SQLArguments())
|
||||||
|
|
||||||
rows, err := conn.Query(ctx, query, args)
|
rows, err := conn.Query(ctx, query, args)
|
||||||
@@ -348,6 +351,7 @@ func (i *Invitations) CountByOrganizationID(
|
|||||||
conn pg.Conn,
|
conn pg.Conn,
|
||||||
scope Scoper,
|
scope Scoper,
|
||||||
orgID gid.GID,
|
orgID gid.GID,
|
||||||
|
filter *InvitationFilter,
|
||||||
) (int, error) {
|
) (int, error) {
|
||||||
q := `
|
q := `
|
||||||
SELECT
|
SELECT
|
||||||
@@ -355,15 +359,16 @@ SELECT
|
|||||||
FROM
|
FROM
|
||||||
authz_invitations
|
authz_invitations
|
||||||
WHERE
|
WHERE
|
||||||
organization_id = @organization_id AND %s
|
organization_id = @organization_id AND %s AND %s
|
||||||
`
|
`
|
||||||
|
|
||||||
q = fmt.Sprintf(q, scope.SQLFragment())
|
q = fmt.Sprintf(q, scope.SQLFragment(), filter.SQLFragment())
|
||||||
|
|
||||||
args := pgx.StrictNamedArgs{
|
args := pgx.StrictNamedArgs{
|
||||||
"organization_id": orgID,
|
"organization_id": orgID,
|
||||||
}
|
}
|
||||||
maps.Copy(args, scope.SQLArguments())
|
maps.Copy(args, scope.SQLArguments())
|
||||||
|
maps.Copy(args, filter.SQLArguments())
|
||||||
|
|
||||||
row := conn.QueryRow(ctx, q, args)
|
row := conn.QueryRow(ctx, q, args)
|
||||||
|
|
||||||
|
|||||||
@@ -20,19 +20,19 @@ import (
|
|||||||
|
|
||||||
type (
|
type (
|
||||||
InvitationFilter struct {
|
InvitationFilter struct {
|
||||||
status *InvitationStatus
|
statuses InvitationStatuses
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewInvitationFilter(status *InvitationStatus) *InvitationFilter {
|
func NewInvitationFilter(statuses []InvitationStatus) *InvitationFilter {
|
||||||
return &InvitationFilter{
|
return &InvitationFilter{
|
||||||
status: status,
|
statuses: InvitationStatuses(statuses),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *InvitationFilter) SQLArguments() pgx.NamedArgs {
|
func (f *InvitationFilter) SQLArguments() pgx.NamedArgs {
|
||||||
return pgx.NamedArgs{
|
return pgx.NamedArgs{
|
||||||
"status": f.status,
|
"statuses": f.statuses,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,12 +40,12 @@ func (f *InvitationFilter) SQLFragment() string {
|
|||||||
return `
|
return `
|
||||||
(
|
(
|
||||||
CASE
|
CASE
|
||||||
WHEN @status::text IS NOT NULL THEN
|
WHEN @statuses::text[] IS NOT NULL THEN
|
||||||
(CASE
|
(CASE
|
||||||
WHEN accepted_at IS NOT NULL THEN 'ACCEPTED'
|
WHEN accepted_at IS NOT NULL THEN 'ACCEPTED'
|
||||||
WHEN expires_at < NOW() THEN 'EXPIRED'
|
WHEN expires_at < NOW() THEN 'EXPIRED'
|
||||||
ELSE 'PENDING'
|
ELSE 'PENDING'
|
||||||
END) = @status::text
|
END) = ANY(@statuses::text[])
|
||||||
ELSE TRUE
|
ELSE TRUE
|
||||||
END
|
END
|
||||||
)`
|
)`
|
||||||
|
|||||||
@@ -17,9 +17,13 @@ package coredata
|
|||||||
import (
|
import (
|
||||||
"database/sql/driver"
|
"database/sql/driver"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type InvitationStatus string
|
type (
|
||||||
|
InvitationStatus string
|
||||||
|
InvitationStatuses []InvitationStatus
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
InvitationStatusPending InvitationStatus = "PENDING"
|
InvitationStatusPending InvitationStatus = "PENDING"
|
||||||
@@ -58,3 +62,20 @@ func (tcv *InvitationStatus) Scan(value any) error {
|
|||||||
func (tcv InvitationStatus) Value() (driver.Value, error) {
|
func (tcv InvitationStatus) Value() (driver.Value, error) {
|
||||||
return tcv.String(), nil
|
return tcv.String(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (statuses InvitationStatuses) Value() (driver.Value, error) {
|
||||||
|
if len(statuses) == 0 {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var result strings.Builder
|
||||||
|
result.WriteString("{")
|
||||||
|
for i, status := range statuses {
|
||||||
|
if i > 0 {
|
||||||
|
result.WriteString(",")
|
||||||
|
}
|
||||||
|
result.WriteString(fmt.Sprintf("%q", status.String()))
|
||||||
|
}
|
||||||
|
result.WriteString("}")
|
||||||
|
return result.String(), nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -1508,7 +1508,7 @@ input InvitationOrder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
input InvitationFilter {
|
input InvitationFilter {
|
||||||
status: InvitationStatus
|
statuses: [InvitationStatus!]
|
||||||
}
|
}
|
||||||
|
|
||||||
input DocumentVersionFilter {
|
input DocumentVersionFilter {
|
||||||
@@ -3797,7 +3797,8 @@ input UpdateProcessingActivityInput {
|
|||||||
recipients: String @goField(omittable: true)
|
recipients: String @goField(omittable: true)
|
||||||
location: String @goField(omittable: true)
|
location: String @goField(omittable: true)
|
||||||
internationalTransfers: Boolean
|
internationalTransfers: Boolean
|
||||||
transferSafeguards: ProcessingActivityTransferSafeguards @goField(omittable: true)
|
transferSafeguards: ProcessingActivityTransferSafeguards
|
||||||
|
@goField(omittable: true)
|
||||||
retentionPeriod: String @goField(omittable: true)
|
retentionPeriod: String @goField(omittable: true)
|
||||||
securityMeasures: String @goField(omittable: true)
|
securityMeasures: String @goField(omittable: true)
|
||||||
dataProtectionImpactAssessment: ProcessingActivityDataProtectionImpactAssessment
|
dataProtectionImpactAssessment: ProcessingActivityDataProtectionImpactAssessment
|
||||||
|
|||||||
@@ -10575,7 +10575,7 @@ input InvitationOrder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
input InvitationFilter {
|
input InvitationFilter {
|
||||||
status: InvitationStatus
|
statuses: [InvitationStatus!]
|
||||||
}
|
}
|
||||||
|
|
||||||
input DocumentVersionFilter {
|
input DocumentVersionFilter {
|
||||||
@@ -12864,7 +12864,8 @@ input UpdateProcessingActivityInput {
|
|||||||
recipients: String @goField(omittable: true)
|
recipients: String @goField(omittable: true)
|
||||||
location: String @goField(omittable: true)
|
location: String @goField(omittable: true)
|
||||||
internationalTransfers: Boolean
|
internationalTransfers: Boolean
|
||||||
transferSafeguards: ProcessingActivityTransferSafeguards @goField(omittable: true)
|
transferSafeguards: ProcessingActivityTransferSafeguards
|
||||||
|
@goField(omittable: true)
|
||||||
retentionPeriod: String @goField(omittable: true)
|
retentionPeriod: String @goField(omittable: true)
|
||||||
securityMeasures: String @goField(omittable: true)
|
securityMeasures: String @goField(omittable: true)
|
||||||
dataProtectionImpactAssessment: ProcessingActivityDataProtectionImpactAssessment
|
dataProtectionImpactAssessment: ProcessingActivityDataProtectionImpactAssessment
|
||||||
@@ -72331,20 +72332,20 @@ func (ec *executionContext) unmarshalInputInvitationFilter(ctx context.Context,
|
|||||||
asMap[k] = v
|
asMap[k] = v
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldsInOrder := [...]string{"status"}
|
fieldsInOrder := [...]string{"statuses"}
|
||||||
for _, k := range fieldsInOrder {
|
for _, k := range fieldsInOrder {
|
||||||
v, ok := asMap[k]
|
v, ok := asMap[k]
|
||||||
if !ok {
|
if !ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
switch k {
|
switch k {
|
||||||
case "status":
|
case "statuses":
|
||||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status"))
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("statuses"))
|
||||||
data, err := ec.unmarshalOInvitationStatus2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatus(ctx, v)
|
data, err := ec.unmarshalOInvitationStatus2ᚕgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatusᚄ(ctx, v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return it, err
|
return it, err
|
||||||
}
|
}
|
||||||
it.Status = data
|
it.Statuses = data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101735,32 +101736,78 @@ func (ec *executionContext) unmarshalOInvitationOrder2ᚖgithubᚗcomᚋgetprobo
|
|||||||
return &res, graphql.ErrorOnPath(ctx, err)
|
return &res, graphql.ErrorOnPath(ctx, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) unmarshalOInvitationStatus2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatus(ctx context.Context, v any) (*coredata.InvitationStatus, error) {
|
func (ec *executionContext) unmarshalOInvitationStatus2ᚕgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatusᚄ(ctx context.Context, v any) ([]coredata.InvitationStatus, error) {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
tmp, err := graphql.UnmarshalString(v)
|
var vSlice []any
|
||||||
res := unmarshalOInvitationStatus2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatus[tmp]
|
vSlice = graphql.CoerceList(v)
|
||||||
return &res, graphql.ErrorOnPath(ctx, err)
|
var err error
|
||||||
|
res := make([]coredata.InvitationStatus, len(vSlice))
|
||||||
|
for i := range vSlice {
|
||||||
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
||||||
|
res[i], err = ec.unmarshalNInvitationStatus2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatus(ctx, vSlice[i])
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ec *executionContext) marshalOInvitationStatus2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatus(ctx context.Context, sel ast.SelectionSet, v *coredata.InvitationStatus) graphql.Marshaler {
|
func (ec *executionContext) marshalOInvitationStatus2ᚕgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatusᚄ(ctx context.Context, sel ast.SelectionSet, v []coredata.InvitationStatus) graphql.Marshaler {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
}
|
}
|
||||||
_ = sel
|
ret := make(graphql.Array, len(v))
|
||||||
_ = ctx
|
var wg sync.WaitGroup
|
||||||
res := graphql.MarshalString(marshalOInvitationStatus2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatus[*v])
|
isLen1 := len(v) == 1
|
||||||
return res
|
if !isLen1 {
|
||||||
|
wg.Add(len(v))
|
||||||
|
}
|
||||||
|
for i := range v {
|
||||||
|
i := i
|
||||||
|
fc := &graphql.FieldContext{
|
||||||
|
Index: &i,
|
||||||
|
Result: &v[i],
|
||||||
|
}
|
||||||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||||||
|
f := func(i int) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = nil
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
if !isLen1 {
|
||||||
|
defer wg.Done()
|
||||||
|
}
|
||||||
|
ret[i] = ec.marshalNInvitationStatus2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatus(ctx, sel, v[i])
|
||||||
|
}
|
||||||
|
if isLen1 {
|
||||||
|
f(i)
|
||||||
|
} else {
|
||||||
|
go f(i)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
wg.Wait()
|
||||||
|
|
||||||
|
for _, e := range ret {
|
||||||
|
if e == graphql.Null {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
unmarshalOInvitationStatus2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatus = map[string]coredata.InvitationStatus{
|
unmarshalOInvitationStatus2ᚕgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatusᚄ = map[string]coredata.InvitationStatus{
|
||||||
"PENDING": coredata.InvitationStatusPending,
|
"PENDING": coredata.InvitationStatusPending,
|
||||||
"ACCEPTED": coredata.InvitationStatusAccepted,
|
"ACCEPTED": coredata.InvitationStatusAccepted,
|
||||||
"EXPIRED": coredata.InvitationStatusExpired,
|
"EXPIRED": coredata.InvitationStatusExpired,
|
||||||
}
|
}
|
||||||
marshalOInvitationStatus2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatus = map[coredata.InvitationStatus]string{
|
marshalOInvitationStatus2ᚕgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐInvitationStatusᚄ = map[coredata.InvitationStatus]string{
|
||||||
coredata.InvitationStatusPending: "PENDING",
|
coredata.InvitationStatusPending: "PENDING",
|
||||||
coredata.InvitationStatusAccepted: "ACCEPTED",
|
coredata.InvitationStatusAccepted: "ACCEPTED",
|
||||||
coredata.InvitationStatusExpired: "EXPIRED",
|
coredata.InvitationStatusExpired: "EXPIRED",
|
||||||
|
|||||||
@@ -1235,7 +1235,7 @@ type InvitationEdge struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type InvitationFilter struct {
|
type InvitationFilter struct {
|
||||||
Status *coredata.InvitationStatus `json:"status,omitempty"`
|
Statuses []coredata.InvitationStatus `json:"statuses,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type InvitationOrder struct {
|
type InvitationOrder struct {
|
||||||
|
|||||||
@@ -911,8 +911,13 @@ func (r *invitationResolver) Organization(ctx context.Context, obj *types.Invita
|
|||||||
func (r *invitationConnectionResolver) TotalCount(ctx context.Context, obj *types.InvitationConnection) (int, error) {
|
func (r *invitationConnectionResolver) TotalCount(ctx context.Context, obj *types.InvitationConnection) (int, error) {
|
||||||
switch obj.Resolver.(type) {
|
switch obj.Resolver.(type) {
|
||||||
case *organizationResolver:
|
case *organizationResolver:
|
||||||
|
invitationFilter := coredata.NewInvitationFilter(nil)
|
||||||
|
if obj.Filter != nil {
|
||||||
|
invitationFilter = coredata.NewInvitationFilter(obj.Filter.Statuses)
|
||||||
|
}
|
||||||
|
|
||||||
authzSvc := r.AuthzService(ctx, obj.ParentID.TenantID())
|
authzSvc := r.AuthzService(ctx, obj.ParentID.TenantID())
|
||||||
count, err := authzSvc.CountOrganizationInvitations(ctx, obj.ParentID)
|
count, err := authzSvc.CountOrganizationInvitations(ctx, obj.ParentID, invitationFilter)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Errorf("failed to count organization invitations: %w", err))
|
panic(fmt.Errorf("failed to count organization invitations: %w", err))
|
||||||
}
|
}
|
||||||
@@ -925,7 +930,7 @@ func (r *invitationConnectionResolver) TotalCount(ctx context.Context, obj *type
|
|||||||
|
|
||||||
invitationFilter := coredata.NewInvitationFilter(nil)
|
invitationFilter := coredata.NewInvitationFilter(nil)
|
||||||
if obj.Filter != nil {
|
if obj.Filter != nil {
|
||||||
invitationFilter = coredata.NewInvitationFilter(obj.Filter.Status)
|
invitationFilter = coredata.NewInvitationFilter(obj.Filter.Statuses)
|
||||||
}
|
}
|
||||||
|
|
||||||
count, err := r.authzSvc.CountUserInvitations(ctx, user.EmailAddress, invitationFilter)
|
count, err := r.authzSvc.CountUserInvitations(ctx, user.EmailAddress, invitationFilter)
|
||||||
@@ -3647,8 +3652,13 @@ func (r *organizationResolver) Invitations(ctx context.Context, obj *types.Organ
|
|||||||
|
|
||||||
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
cursor := types.NewCursor(first, after, last, before, pageOrderBy)
|
||||||
|
|
||||||
|
invitationFilter := coredata.NewInvitationFilter(nil)
|
||||||
|
if filter != nil {
|
||||||
|
invitationFilter = coredata.NewInvitationFilter(filter.Statuses)
|
||||||
|
}
|
||||||
|
|
||||||
authzSvc := r.AuthzService(ctx, obj.ID.TenantID())
|
authzSvc := r.AuthzService(ctx, obj.ID.TenantID())
|
||||||
page, err := authzSvc.GetInvitationsByOrganizationID(ctx, obj.ID, cursor)
|
page, err := authzSvc.GetInvitationsByOrganizationID(ctx, obj.ID, cursor, invitationFilter)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Errorf("cannot list invitations: %w", err))
|
panic(fmt.Errorf("cannot list invitations: %w", err))
|
||||||
}
|
}
|
||||||
@@ -5363,7 +5373,7 @@ func (r *viewerResolver) Invitations(ctx context.Context, obj *types.Viewer, fir
|
|||||||
|
|
||||||
invitationFilter := coredata.NewInvitationFilter(nil)
|
invitationFilter := coredata.NewInvitationFilter(nil)
|
||||||
if filter != nil {
|
if filter != nil {
|
||||||
invitationFilter = coredata.NewInvitationFilter(filter.Status)
|
invitationFilter = coredata.NewInvitationFilter(filter.Statuses)
|
||||||
}
|
}
|
||||||
|
|
||||||
invitations, err := r.authzSvc.GetUserInvitations(ctx, user.EmailAddress, cursor, invitationFilter)
|
invitations, err := r.authzSvc.GetUserInvitations(ctx, user.EmailAddress, cursor, invitationFilter)
|
||||||
|
|||||||
Reference in New Issue
Block a user