- $t(`domain.project.status.${status.replaceAll(".", "_")}`);
+ const statusLabel = (status: string) => $t(projectStatusLabelKey(status));
/**
* Statuses a project can move to for the kind of review it is going through.
diff --git a/src/components/library/dropdown/DropdownMenu.svelte b/src/components/library/dropdown/DropdownMenu.svelte
index 5e2ec5cf..ad4a4273 100644
--- a/src/components/library/dropdown/DropdownMenu.svelte
+++ b/src/components/library/dropdown/DropdownMenu.svelte
@@ -185,7 +185,7 @@
{#each renderedItems as item}
= {
type: "string",
compatibleOperators: ["equals", "is_any_of"],
resources: ["projects"],
- options: projectStatuses,
+ options: PROJECT_STATUSES.map((value) => ({ value, label: projectStatusLabelKey(value) })),
allowsMultipleEquals: true,
},
chargeStatus: {
diff --git a/src/utils/projectStatus.ts b/src/utils/projectStatus.ts
index 0d24c203..b5c1d2e7 100644
--- a/src/utils/projectStatus.ts
+++ b/src/utils/projectStatus.ts
@@ -131,6 +131,31 @@ export const REVIEW_STATUSES_BY_TYPE: Record<
financial: FUNDING_REVIEW_STATUSES,
};
+/** Every status the API knows a project by, in lifecycle order. */
+export const PROJECT_STATUSES: NonNullable[] = [
+ "in_draft",
+ "to_campaign_review",
+ "in_campaign_review",
+ "in_campaign_review.to_change",
+ "in_campaign_review.to_review",
+ "campaign_review.rejected",
+ "to_campaign",
+ "in_campaign",
+ "campaign.failed",
+ "campaign.cancelled",
+ "to_funding_review",
+ "in_funding_review",
+ "in_funding_review.to_change",
+ "in_funding_review.to_review",
+ "funding_review.rejected",
+ "to_funding",
+ "in_funding",
+ "funding.paid",
+];
+
+/** Translation key of a status: the API separates with dots, the translations with underscores. */
+export const projectStatusLabelKey = (status: string): string =>
+ `domain.project.status.${status.replaceAll(".", "_")}`;
/**
* Status the project editor's publish button moves a project to, by its current status.
* `confirm` names the irreversible transitions that ask for confirmation first.
From 4dd55cfa4547b894a5bc5e337c83c1f55eeff554 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Subiabre=20Garc=C3=ADa?=
Date: Tue, 3 Nov 2026 15:51:16 +0100
Subject: [PATCH 09/24] fix: project bad cover, project.video before
project.cover (#576)
* fix: use project true type on transformProjectToCampaign
* fix: matching of projectSupports by IRI in FeedbackForm
* fix: bad references to project.video imgs before project.cover
* fix: code style issues by prettier
---
src/components/admin/users/UsersDetailsRow.svelte | 2 +-
src/components/checkout/CommentCard.svelte | 2 +-
src/components/checkout/FeedbackForm.svelte | 2 +-
src/components/home/CampaignsTabs.astro | 6 +++---
src/components/player/Player.svelte | 10 +++++-----
src/components/profile/DonatedProjectsSection.svelte | 2 +-
src/components/profile/OwnedProjectsSection.svelte | 4 ++--
.../profile/manage/ManagePersonalProfile.svelte | 2 +-
src/components/project/SingleProject.svelte | 2 +-
src/pages/[...locale]/checkout/post-payment.astro | 4 ++--
src/utils/projectTransform.ts | 2 +-
11 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/components/admin/users/UsersDetailsRow.svelte b/src/components/admin/users/UsersDetailsRow.svelte
index c7903f9c..064acb20 100644
--- a/src/components/admin/users/UsersDetailsRow.svelte
+++ b/src/components/admin/users/UsersDetailsRow.svelte
@@ -15,9 +15,9 @@
import Button from "../../library/buttons/Button.svelte";
import DropdownSearch from "../../library/dropdown/DropdownSearch.svelte";
import Toast from "../../library/feedback/Toast.svelte";
+ import PasswordInput from "../../library/inputs/PasswordInput.svelte";
import { chargeStatusStyles } from "../charges/ChargesTable.svelte";
import DetailsRow, { type DetailsField } from "../DetailsRow.svelte";
- import PasswordInput from "../../library/inputs/PasswordInput.svelte";
import type { UserRow } from "./UsersTable.svelte";
import type { DropdownOption } from "../../library/dropdown/dropdown.types";
diff --git a/src/components/checkout/CommentCard.svelte b/src/components/checkout/CommentCard.svelte
index d88adfcd..99574df8 100644
--- a/src/components/checkout/CommentCard.svelte
+++ b/src/components/checkout/CommentCard.svelte
@@ -40,7 +40,7 @@
{$t("pages.project.view.tabs.community.contribution")}
From d9fa809a9ad3f91c9555cc3c63152561babc0c5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pep=20Villalonga=20Amor=C3=B3s?=
Date: Thu, 5 Nov 2026 15:43:21 +0100
Subject: [PATCH 13/24] feat: add new profile fields to /me/manage and send
only edited fields (#534)
* chore: regenerate SDK with new profile fields
* feat: add disabled state to Checkbox and TerritoryInput
* feat: add new API profile fields to /me/manage personal form
* feat: send only edited fields in profile forms with observable-slim
* fix: address profile review comments and regenerate SDK
---
package.json | 2 +
pnpm-lock.yaml | 12 +
src/actions/personalProfile.ts | 149 +-
src/actions/publicProfile.ts | 38 +-
src/components/library/inputs/Checkbox.svelte | 8 +-
.../library/inputs/ResourceSearch.svelte | 5 +-
.../library/inputs/TerritoryInput.svelte | 3 +
.../profile/ManagePreferencesSection.svelte | 43 +-
.../profile/manage/ManageAddresses.svelte | 4 +-
.../manage/ManagePersonalProfile.svelte | 165 +-
.../profile/manage/ManagePublicProfile.svelte | 20 +-
.../project/edit/ProjectEditor.svelte | 4 +-
src/i18n/locales/es.json | 53 +-
src/openapi/client/index.ts | 2 +-
src/openapi/client/types.gen.ts | 2701 +++++++++++++----
src/openapi/client/zod.gen.ts | 1968 ++++++++----
src/pages/[...locale]/me/manage/index.astro | 19 +-
.../[...locale]/me/manage/preferences.astro | 10 +-
src/utils/projectPublisher.ts | 4 +-
src/utils/projectSubmissionApi.ts | 4 +-
src/utils/trackChanges.svelte.ts | 35 +
src/validation/personalProfileValidation.ts | 23 +-
22 files changed, 3904 insertions(+), 1368 deletions(-)
create mode 100644 src/utils/trackChanges.svelte.ts
diff --git a/package.json b/package.json
index cb8e29db..eeb77fcf 100644
--- a/package.json
+++ b/package.json
@@ -44,6 +44,7 @@
"bits-ui": "^2.18.1",
"chart.js": "^4.5.1",
"csrf": "^3.1.0",
+ "dequal": "^2.0.3",
"dexie": "^4.4.2",
"dinero.js": "^2.0.2",
"dotenv": "^17.4.2",
@@ -53,6 +54,7 @@
"marked": "^18.0.6",
"media-icons": "^1.1.5",
"murmurhash-js": "^1.0.0",
+ "observable-slim": "^0.2.2",
"stdnum": "^1.12.6",
"svelte": "^5.56.6",
"tailwind-merge": "^3.6.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ce682de0..5baf482a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -74,6 +74,9 @@ importers:
csrf:
specifier: ^3.1.0
version: 3.1.0
+ dequal:
+ specifier: ^2.0.3
+ version: 2.0.3
dexie:
specifier: ^4.4.2
version: 4.4.6
@@ -101,6 +104,9 @@ importers:
murmurhash-js:
specifier: ^1.0.0
version: 1.0.0
+ observable-slim:
+ specifier: ^0.2.2
+ version: 0.2.2
stdnum:
specifier: ^1.12.6
version: 1.12.6
@@ -3858,6 +3864,10 @@ packages:
resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==}
engines: {node: '>= 0.4'}
+ observable-slim@0.2.2:
+ resolution: {integrity: sha512-YY8fgqgx31w2oAyk2PKLvwbnqoRxKpPiFrLWKq8caC4vQ+XSaZV9mueJCkhnqJkz+eT9vi8b5segk+Qd0A8JrQ==}
+ engines: {node: '>=18'}
+
obug@2.2.1:
resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==}
engines: {node: '>=12.20.0'}
@@ -8982,6 +8992,8 @@ snapshots:
define-properties: 1.2.1
es-object-atoms: 1.1.2
+ observable-slim@0.2.2: {}
+
obug@2.2.1: {}
obug@3.0.0: {}
diff --git a/src/actions/personalProfile.ts b/src/actions/personalProfile.ts
index 3134da59..052b0abb 100644
--- a/src/actions/personalProfile.ts
+++ b/src/actions/personalProfile.ts
@@ -1,25 +1,35 @@
import { ActionError, defineAction } from "astro:actions";
+import { z } from "zod";
import { setSession } from "../auth/session.ts";
import {
apiUsersIdOrHandleGet,
+ apiUsersIdorganizationPatch,
apiUsersIdPatch,
apiUsersIdpersonGet,
apiUsersIdpersonPatch,
- type UserUserUpdationDto,
+ type OrganizationJsonMergePatch,
+ type PersonJsonMergePatch,
+ type UserUserUpdationDtoJsonMergePatch,
} from "../openapi/client/index.ts";
import { zPersonalProfileForm } from "../validation/personalProfileValidation.ts";
+const TERRITORY_FIELDS = ["country", "subLvl1", "subLvl2"];
+
/**
- * Saves the private part of the profile: the `Person` record, the `Territory` on the `User` and
- * the identity row (avatar, bio, social networks) that this section shares with the public one.
+ * Saves the private part of the profile: the `Person` and `Organization` records, the `Territory`
+ * and the private flags on the `User`, and the identity row (avatar, bio, social networks) that this section shares with the public one.
* The email is deliberately left out: changing it needs a confirmation flow the API does not
* expose here.
*/
export const updatePersonalProfile = defineAction({
accept: "json",
- input: zPersonalProfileForm,
- handler: async (input, context) => {
+ input: z.object({
+ form: zPersonalProfileForm,
+ // Fields the user edited since the last save, tracked by the form
+ changed: z.array(zPersonalProfileForm.keyof()),
+ }),
+ handler: async ({ form: input, changed: changedFields }, context) => {
const { t, session } = context.locals;
if (!session) {
@@ -33,77 +43,96 @@ export const updatePersonalProfile = defineAction({
const headers = session.token.asHttpHeaders;
const isOrganization = input.type === "organization";
- try {
- const userPatch: Partial = input;
+ // Only send what the user edited: the API re-validates every field it gets, and rejects
+ // an unchanged handle as already in use
+ const changed = new Set(changedFields);
+ // Switching type moves the tax id to the other record, send all of its fields
+ const typeChanged = changed.has("type");
+ const pick = (values: T, all = false) =>
+ Object.fromEntries(
+ Object.entries(values).filter(([key]) => all || changed.has(key)),
+ ) as Partial;
+ const hasFields = (values: object) => Object.keys(values).length > 0;
- if (input.country) {
- const currentTerritory = session.user.territory;
- const newTerritory = {
+ try {
+ const userPatch: UserUserUpdationDtoJsonMergePatch = pick({
+ handle: input.handle,
+ type: input.type,
+ shareLocation: input.shareLocation,
+ referralSource: input.referralSource || null,
+ });
+
+ if (input.country && TERRITORY_FIELDS.some((field) => changed.has(field))) {
+ userPatch.territory = {
country: input.country,
subLvl1: input.subLvl1 || null,
subLvl2: input.subLvl2 || null,
- address: input.address.trim() || null,
+ // The API replaces the whole Territory, keep the address this form does not edit
+ address: session.user.territory?.address ?? null,
};
- if (
- !currentTerritory ||
- currentTerritory.country !== newTerritory.country ||
- (currentTerritory.subLvl1 ?? null) !== newTerritory.subLvl1 ||
- (currentTerritory.subLvl2 ?? null) !== newTerritory.subLvl2 ||
- (currentTerritory.address ?? null) !== newTerritory.address
- ) {
- userPatch.territory = newTerritory;
- }
- } else if (session.user.territory?.country) {
- // Country cleared in the form: do not send territory at all
- userPatch.territory = undefined;
}
- let userError: unknown;
- if (Object.keys(userPatch).length > 0) {
+ if (hasFields(userPatch)) {
const { error } = await apiUsersIdPatch({
path: { id },
headers,
- body: userPatch as UserUserUpdationDto,
+ body: userPatch,
});
- userError = error;
+
+ if (error) {
+ throw error;
+ }
}
- if (userError) {
- throw userError;
+ const organizationPatch: OrganizationJsonMergePatch = pick(
+ {
+ legalName: input.legalName.trim(),
+ businessName: input.businessName.trim(),
+ taxId: input.taxId.trim(),
+ taxIdType: input.taxIdType || null,
+ legalForm: input.legalForm || null,
+ publicEntity: input.publicEntity,
+ },
+ typeChanged,
+ );
+
+ if (isOrganization && hasFields(organizationPatch)) {
+ const { error } = await apiUsersIdorganizationPatch({
+ path: { id },
+ headers,
+ body: organizationPatch,
+ });
+
+ if (error) {
+ throw error;
+ }
}
- let personError: unknown;
- if (!isOrganization) {
- const currentPerson = await apiUsersIdpersonGet({ path: { id }, headers }).then(
- (r) => r.data,
- );
- const personPatch: Record = {};
- const firstNameTrim = input.firstName.trim();
- if ((currentPerson?.firstName ?? "") !== firstNameTrim) {
- personPatch.firstName = firstNameTrim;
- }
- const lastNameTrim = input.lastName.trim();
- if ((currentPerson?.lastName ?? "") !== lastNameTrim) {
- personPatch.lastName = lastNameTrim;
- }
- const taxIdTrim = input.taxId.trim();
- if ((currentPerson?.taxId ?? "") !== taxIdTrim) {
- personPatch.taxId = taxIdTrim;
- }
- if (Object.keys(personPatch).length > 0) {
- const { error } = await apiUsersIdpersonPatch({
- path: { id },
- headers,
- body: personPatch as any,
- });
- personError = error;
- }
- } else {
- personError = null;
- }
+ const personPatch: PersonJsonMergePatch = {
+ ...pick({ firstName: input.firstName.trim(), lastName: input.lastName.trim() }),
+ // On organizations the tax id belongs to the Organization record
+ ...(!isOrganization &&
+ pick(
+ {
+ taxId: input.taxId.trim(),
+ taxIdType: input.taxIdType || null,
+ birthYear: input.birthYear ? Number(input.birthYear) : null,
+ gender: input.gender || null,
+ },
+ typeChanged,
+ )),
+ };
- if (personError) {
- throw personError;
+ if (hasFields(personPatch)) {
+ const { error } = await apiUsersIdpersonPatch({
+ path: { id },
+ headers,
+ body: personPatch,
+ });
+
+ if (error) {
+ throw error;
+ }
}
// The names feed the display name, refresh the cookie so the header stays in sync
diff --git a/src/actions/publicProfile.ts b/src/actions/publicProfile.ts
index d371442b..fe77f03e 100644
--- a/src/actions/publicProfile.ts
+++ b/src/actions/publicProfile.ts
@@ -1,4 +1,5 @@
import { ActionError, defineAction } from "astro:actions";
+import { z } from "zod";
import { setSession } from "../auth/session.ts";
import { apiUsersIdOrHandleGet, apiUsersIdPatch } from "../openapi/client/index.ts";
@@ -7,8 +8,12 @@ import { zProfileForm } from "../validation/publicProfileValidation.ts";
export const updatePublicProfile = defineAction({
accept: "json",
- input: zProfileForm,
- handler: async (input, context) => {
+ input: z.object({
+ form: zProfileForm,
+ // Fields the user edited since the last save, tracked by the form
+ changed: z.array(zProfileForm.keyof()),
+ }),
+ handler: async ({ form: input, changed: changedFields }, context) => {
const { t, session } = context.locals;
if (!session) {
@@ -32,20 +37,23 @@ export const updatePublicProfile = defineAction({
}),
];
- try {
- // User first: switching to `organization` makes the API create the Organization record
- const { error: userError } = await apiUsersIdPatch({
- path: { id },
- headers,
- body: {
- avatar: input.avatar,
- description: input.description.trim(),
- links,
- },
- });
+ // Only send what the user edited: the API re-validates every field it gets
+ const changed = new Set(changedFields);
+ const userPatch = Object.fromEntries(
+ Object.entries({
+ avatar: input.avatar,
+ description: input.description.trim(),
+ links,
+ }).filter(([key]) => changed.has(key)),
+ );
- if (userError) {
- throw userError;
+ try {
+ if (Object.keys(userPatch).length > 0) {
+ const { error } = await apiUsersIdPatch({ path: { id }, headers, body: userPatch });
+
+ if (error) {
+ throw error;
+ }
}
// Keep the session cookie in sync so header and profile pages show fresh data
diff --git a/src/components/library/inputs/Checkbox.svelte b/src/components/library/inputs/Checkbox.svelte
index c45e7932..fedf9974 100644
--- a/src/components/library/inputs/Checkbox.svelte
+++ b/src/components/library/inputs/Checkbox.svelte
@@ -22,7 +22,13 @@
}: Props = $props();
-
+
+
+ {$t("pages.me.manage.preferences.privacy.title")}
+
+
+
+
{$t("pages.me.manage.preferences.toast.saved")}
+
+ {$t("pages.me.manage.preferences.toast.error")}
+
diff --git a/src/components/profile/manage/ManageAddresses.svelte b/src/components/profile/manage/ManageAddresses.svelte
index c2e599b4..68ff73db 100644
--- a/src/components/profile/manage/ManageAddresses.svelte
+++ b/src/components/profile/manage/ManageAddresses.svelte
@@ -17,7 +17,7 @@
import Tag from "../../library/tags/Tag.svelte";
import Title from "../../library/typography/Title.svelte";
- import type { AddressAddressUpdationDto } from "../../../openapi/client";
+ import type { AddressAddressUpdationDtoJsonMergePatch } from "../../../openapi/client";
import type { DefaultableAddress } from "../../../utils/defaultAddress";
let {
@@ -70,7 +70,7 @@
baseUrl: "/api/relay",
path: { id: String(address.id) },
// Pending in the API, see `DefaultableAddress`
- body: { isDefault: true } as AddressAddressUpdationDto,
+ body: { isDefault: true } as AddressAddressUpdationDtoJsonMergePatch,
});
if (error) {
diff --git a/src/components/profile/manage/ManagePersonalProfile.svelte b/src/components/profile/manage/ManagePersonalProfile.svelte
index 61f5a865..d605f133 100644
--- a/src/components/profile/manage/ManagePersonalProfile.svelte
+++ b/src/components/profile/manage/ManagePersonalProfile.svelte
@@ -23,11 +23,16 @@
import { getCountries } from "../../../utils/countries";
import { type SocialNetwork } from "../../../utils/socialLinks";
import { getTerritoryDisplayName, UNKNOWN_COUNTRY_CODE } from "../../../utils/territory";
+ import { trackChanges } from "../../../utils/trackChanges.svelte";
import {
+ GENDERS,
+ LEGAL_FORMS,
+ REFERRAL_SOURCES,
+ TAX_ID_TYPES,
zPersonalProfileForm,
type PersonalProfileForm,
} from "../../../validation/personalProfileValidation";
- import Spinner from "../../icons/status/Spinner.svelte";
+ import ActionableButton from "../../library/buttons/ActionableButton.svelte";
import Button from "../../library/buttons/Button.svelte";
import Card from "../../library/cards/Card.svelte";
import Toast from "../../library/feedback/Toast.svelte";
@@ -56,22 +61,29 @@
// Changing the profile kind belongs to the public section, here it only routes the tax id
const isOrganization = user.type === "organization";
- let form: PersonalProfileForm = $state({
+ // Only the fields edited since the last save travel in the payload
+ const { form, changed, commit } = trackChanges({
handle: user.handle,
firstName: person?.firstName ?? "",
lastName: person?.lastName ?? "",
- taxId: isOrganization ? "" : (person?.taxId ?? ""),
+ taxId: (isOrganization ? organization?.taxId : person?.taxId) ?? "",
type: isOrganization ? "organization" : "individual",
legalName: organization?.legalName ?? "",
businessName: organization?.businessName ?? "",
country,
subLvl1: user.territory?.subLvl1 ?? "",
subLvl2: user.territory?.subLvl2 ?? "",
- address: user.territory?.address ?? "",
+ shareLocation: user.shareLocation ?? false,
+ referralSource: user.referralSource ?? "",
+ taxIdType: (isOrganization ? organization?.taxIdType : person?.taxIdType) ?? "",
+ birthYear: person?.birthYear ? String(person.birthYear) : "",
+ gender: person?.gender ?? "",
+ legalForm: organization?.legalForm ?? "",
+ publicEntity: organization?.publicEntity ?? false,
});
- // Not persisted: the API has no visibility or anonymity flag
- let shareLocation = $state(false);
+ const currentYear = new Date().getFullYear();
+ const birthYears = Array.from({ length: currentYear - 1899 }, (_, i) => currentYear - i);
// Subdivisions are ISO codes, show them as "Subdivision, Country" in the search box
let locality = $state(country ? getTerritoryDisplayName(user.territory!, $locale) : "");
@@ -81,6 +93,7 @@
let isSubmitting = $state(false);
let showSuccess = $state(false);
let showError = $state(false);
+ let showNoChanges = $state(false);
let formError = $state("");
let newPassword = $state("");
@@ -147,12 +160,16 @@
passwordSuccess = true;
}
- async function handleSubmit(event: SubmitEvent) {
- event.preventDefault();
-
+ async function handleSubmit() {
validation = {};
showSuccess = false;
showError = false;
+ showNoChanges = false;
+
+ if (changed.size === 0) {
+ showNoChanges = true;
+ return;
+ }
const result = zPersonalProfileForm.safeParse(form);
@@ -167,7 +184,10 @@
isSubmitting = true;
- const { data, error } = await actions.updatePersonalProfile(result.data);
+ const { data, error } = await actions.updatePersonalProfile({
+ form: result.data,
+ changed: [...changed],
+ });
isSubmitting = false;
@@ -190,7 +210,9 @@
if (data.person) {
form.firstName = data.person.firstName ?? "";
form.lastName = data.person.lastName ?? "";
- form.taxId = data.person.taxId ?? "";
+ if (form.type === "individual") {
+ form.taxId = data.person.taxId ?? "";
+ }
}
user = await apiUsersIdOrHandleGet({
@@ -198,6 +220,7 @@
path: { idOrHandle: String(user.id) },
}).then(({ data }) => data!);
+ commit();
showSuccess = true;
}
@@ -215,7 +238,7 @@
handle={user.handle}
/>
-
diff --git a/src/components/profile/manage/ManagePublicProfile.svelte b/src/components/profile/manage/ManagePublicProfile.svelte
index d620720c..32087605 100644
--- a/src/components/profile/manage/ManagePublicProfile.svelte
+++ b/src/components/profile/manage/ManagePublicProfile.svelte
@@ -16,6 +16,7 @@
import ProfileSocialsCard from "./ProfileSocialsCard.svelte";
import { t } from "../../../i18n/store";
import { toSocialLinks, type SocialNetwork } from "../../../utils/socialLinks";
+ import { trackChanges } from "../../../utils/trackChanges.svelte";
import { zProfileForm, type ProfileForm } from "../../../validation/publicProfileValidation";
import Spinner from "../../icons/status/Spinner.svelte";
import Button from "../../library/buttons/Button.svelte";
@@ -33,7 +34,8 @@
let { user }: Props = $props();
- let form: ProfileForm = $state({
+ // Only the fields edited since the last save travel in the payload
+ const { form, changed, commit } = trackChanges({
avatar: user.avatar || undefined,
description: user.description ?? "",
links: toSocialLinks((user.links ?? []).flatMap((link) => link.url ?? [])),
@@ -45,6 +47,7 @@
let isSubmitting = $state(false);
let showSuccess = $state(false);
let showError = $state(false);
+ let showNoChanges = $state(false);
let formError = $state("");
function validate(field: FieldName) {
@@ -70,6 +73,12 @@
validation = {};
showSuccess = false;
showError = false;
+ showNoChanges = false;
+
+ if (changed.size === 0) {
+ showNoChanges = true;
+ return;
+ }
const result = zProfileForm.safeParse(form);
@@ -84,7 +93,10 @@
isSubmitting = true;
- const { data, error } = await actions.updatePublicProfile(result.data);
+ const { data, error } = await actions.updatePublicProfile({
+ form: result.data,
+ changed: [...changed],
+ });
isSubmitting = false;
@@ -106,6 +118,7 @@
displayName = data.user.displayName ?? data.user.handle;
// The API resolves each link (scheme, redirects), show what was stored
form.links = toSocialLinks((data.user.links ?? []).flatMap((link) => link.url ?? []));
+ commit();
showSuccess = true;
}
@@ -146,6 +159,9 @@
{$t("pages.me.manage.success")}
+
+ {$t("pages.me.manage.noChanges")}
+
{formError}
diff --git a/src/components/project/edit/ProjectEditor.svelte b/src/components/project/edit/ProjectEditor.svelte
index 412bdeaa..e8b0deac 100644
--- a/src/components/project/edit/ProjectEditor.svelte
+++ b/src/components/project/edit/ProjectEditor.svelte
@@ -17,7 +17,7 @@
import ProjectPreviewModal from "./ProjectPreviewModal.svelte";
import { t } from "../../../i18n/store";
import { apiProjectsIdPatch } from "../../../openapi/client";
- import { zProjectProjectUpdationDto } from "../../../openapi/client/zod.gen";
+ import { zProjectProjectUpdationDtoJsonMergePatch } from "../../../openapi/client/zod.gen";
import { PUBLISH_TRANSITIONS } from "../../../utils/projectStatus";
import { validate } from "../../../utils/validation";
import LanguagesDropdown from "../../header/LanguagesDropdown.svelte";
@@ -65,7 +65,7 @@
let publishTransition = $derived(PUBLISH_TRANSITIONS[$draft.actual.status!]);
function handleTitleChange(title: string) {
- const [error] = validate(title, zProjectProjectUpdationDto.shape.title);
+ const [error] = validate(title, zProjectProjectUpdationDtoJsonMergePatch.shape.title);
if (!error) {
draft.patch({ title });
diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json
index 5beb8f75..5e1ecf6e 100644
--- a/src/i18n/locales/es.json
+++ b/src/i18n/locales/es.json
@@ -2453,15 +2453,52 @@
"country": "País",
"locality": "Localidad",
"localityPlaceholder": "Busca tu localidad",
- "address": "Dirección (indicar si es calle, plaza, avenida, etc)",
- "type": "Forma jurídica",
"taxId": "Número de documento",
- "representative": "Datos del representante"
+ "representative": "Datos del representante",
+ "userType": "Tipo de perfil",
+ "taxIdType": "Tipo de documento",
+ "birthYear": "Año de nacimiento",
+ "gender": "Sexo",
+ "legalForm": "Forma jurídica",
+ "publicEntity": "Entidad pública",
+ "taxIdTypeOptions": {
+ "national_id": "NIF / NIE",
+ "passport": "Pasaporte",
+ "other": "Otro"
+ },
+ "genderOptions": {
+ "female": "Mujer",
+ "male": "Hombre",
+ "non_binary": "No binario",
+ "other": "Otro / Prefiero no decirlo"
+ },
+ "legalFormOptions": {
+ "association": "Asociación",
+ "foundation": "Fundación",
+ "cooperative": "Cooperativa",
+ "company": "Empresa",
+ "self_employed": "Autónomo",
+ "public_administration": "Administración pública",
+ "other": "Otra"
+ }
},
"location": {
"share": "*Compartir mi ubicación",
"disclaimer": "*Compartir tu ubicación con nuestro equipo servirá para generar información (anónima, sin revelar nunca a terceros tus datos personales) así como indicadores de impacto que hagan más eficaz nuestro trabajo y el apoyo a proyectos."
},
+ "referral": {
+ "title": "¿Cómo nos conociste?",
+ "subtitle": "Nos ayuda a entender cómo llega la gente a la plataforma",
+ "label": "Selecciona una opción",
+ "options": {
+ "search_engine": "Buscador",
+ "social_media": "Redes sociales",
+ "friend": "Amigos o conocidos",
+ "press": "Prensa o medios",
+ "event": "Evento, charla o taller",
+ "other": "Otro"
+ }
+ },
"social": {
"title": "Redes sociales",
"subtitle": "Añade tus redes para mostrárselas al mundo",
@@ -2516,11 +2553,17 @@
"label": "Selecciona un idioma",
"helper": "La aplicación usará este idioma para la interfaz e intentará servirte contenido primero en este idioma"
},
+ "privacy": {
+ "title": "Privacidad",
+ "anonymous": "Al realizar una donación mantener perfil anónimo"
+ },
"save": "Guardar preferencias",
"toast": {
- "saved": "Preferencias guardadas correctamente"
+ "saved": "Preferencias guardadas correctamente",
+ "error": "No se han podido guardar las preferencias"
}
- }
+ },
+ "noChanges": "No has realizado ningún cambio"
},
"period": {
"label": "Periodo",
diff --git a/src/openapi/client/index.ts b/src/openapi/client/index.ts
index 9e9fad5e..38ea3da5 100644
--- a/src/openapi/client/index.ts
+++ b/src/openapi/client/index.ts
@@ -2,4 +2,4 @@
export { apiAccountingBalancePointsGetCollectionUrl, apiAccountingsGetCollectionUrl, apiAccountingsIdGetUrl, apiAccountingTransactionsGetCollectionUrl, apiAccountingTransactionsIdGetUrl, apiAddressesGetCollectionUrl, apiAddressesIdDeleteUrl, apiAddressesIdGetUrl, apiAddressesIdPatchUrl, apiAddressesPostUrl, apiCategoriesGetCollectionUrl, apiCategoriesIdDeleteUrl, apiCategoriesIdOrSlugGetUrl, apiCategoriesIdPatchUrl, apiCategoriesPostUrl, apiGatewayChargesGetCollectionUrl, apiGatewayChargesIdGetUrl, apiGatewayChargesIdPatchUrl, apiGatewayChargestotalsGetCollectionUrl, apiGatewayCheckoutsGetCollectionUrl, apiGatewayCheckoutsIdGetUrl, apiGatewayCheckoutsIdPatchUrl, apiGatewayCheckoutsPostUrl, apiGatewaysGetCollectionUrl, apiGatewaysIdGetUrl, apiMatchCallsGetCollectionUrl, apiMatchCallsIdDeleteUrl, apiMatchCallsIdGetUrl, apiMatchCallsIdPatchUrl, apiMatchCallsPostUrl, apiMatchCallSubmissionsGetCollectionUrl, apiMatchCallSubmissionsIdGetUrl, apiMatchCallSubmissionsIdPatchUrl, apiMatchCallSubmissionsPostUrl, apiMatchFormulasGetCollectionUrl, apiMatchFormulasNameGetUrl, apiMatchRulesGetCollectionUrl, apiMatchRulesNameGetUrl, apiMatchStrategiesGetCollectionUrl, apiMatchStrategiesIdDeleteUrl, apiMatchStrategiesIdGetUrl, apiMatchStrategiesIdPatchUrl, apiMatchStrategiesPostUrl, apiPingGetUrl, apiProjectBudgetItemsGetCollectionUrl, apiProjectBudgetItemsIdDeleteUrl, apiProjectBudgetItemsIdGetUrl, apiProjectBudgetItemsIdPatchUrl, apiProjectBudgetItemsPostUrl, apiProjectCollaborationCandidaciesGetCollectionUrl, apiProjectCollaborationCandidaciesIdDeleteUrl, apiProjectCollaborationCandidaciesIdGetUrl, apiProjectCollaborationCandidaciesIdPatchUrl, apiProjectCollaborationCandidaciesPostUrl, apiProjectCollaborationsGetCollectionUrl, apiProjectCollaborationsIdDeleteUrl, apiProjectCollaborationsIdGetUrl, apiProjectCollaborationsIdPatchUrl, apiProjectCollaborationsPostUrl, apiProjectReviewAreasGetCollectionUrl, apiProjectReviewAreasIdDeleteUrl, apiProjectReviewAreasIdGetUrl, apiProjectReviewAreasIdPatchUrl, apiProjectReviewAreasPostUrl, apiProjectReviewCommentsGetCollectionUrl, apiProjectReviewCommentsIdDeleteUrl, apiProjectReviewCommentsIdGetUrl, apiProjectReviewCommentsPostUrl, apiProjectReviewsGetCollectionUrl, apiProjectReviewsIdDeleteUrl, apiProjectReviewsIdGetUrl, apiProjectReviewsIdPatchUrl, apiProjectRewardClaimsGetCollectionUrl, apiProjectRewardClaimsIdDeleteUrl, apiProjectRewardClaimsIdGetUrl, apiProjectRewardClaimsIdPatchUrl, apiProjectRewardClaimsPostUrl, apiProjectRewardsGetCollectionUrl, apiProjectRewardsIdDeleteUrl, apiProjectRewardsIdGetUrl, apiProjectRewardsIdPatchUrl, apiProjectRewardsPostUrl, apiProjectsGetCollectionUrl, apiProjectsIdDeleteUrl, apiProjectsIdOrSlugGetUrl, apiProjectsIdPatchUrl, apiProjectsmoneyTotalGetCollectionUrl, apiProjectsPostUrl, apiProjectSupportsGetCollectionUrl, apiProjectSupportsIdGetUrl, apiProjectSupportsIdPatchUrl, apiProjectSupportsmoneyTotalGetCollectionUrl, apiProjectUpdatesGetCollectionUrl, apiProjectUpdatesIdDeleteUrl, apiProjectUpdatesIdGetUrl, apiProjectUpdatesIdPatchUrl, apiProjectUpdatesPostUrl, apiThemesGetCollectionUrl, apiThemesIdDeleteUrl, apiThemesIdOrSlugGetUrl, apiThemesIdPatchUrl, apiThemesPostUrl, apiTipjarsGetCollectionUrl, apiTipjarsIdDeleteUrl, apiTipjarsIdGetUrl, apiTipjarsIdPatchUrl, apiTipjarsPostUrl, apiUsersGetCollectionUrl, apiUsersIdDeleteUrl, apiUsersIdorganizationGetUrl, apiUsersIdorganizationPatchUrl, apiUsersIdOrHandleGetUrl, apiUsersIdPatchUrl, apiUsersIdpersonGetUrl, apiUsersIdpersonPatchUrl, apiUsersPostUrl, apiVersionsGetCollectionUrl, apiVersionsIdGetUrl } from './operation-paths.gen';
export { apiAccountingBalancePointsGetCollection, apiAccountingsGetCollection, apiAccountingsIdGet, apiAccountingTransactionsGetCollection, apiAccountingTransactionsIdGet, apiAddressesGetCollection, apiAddressesIdDelete, apiAddressesIdGet, apiAddressesIdPatch, apiAddressesPost, apiCategoriesGetCollection, apiCategoriesIdDelete, apiCategoriesIdOrSlugGet, apiCategoriesIdPatch, apiCategoriesPost, apiGatewayChargesGetCollection, apiGatewayChargesIdGet, apiGatewayChargesIdPatch, apiGatewayChargestotalsGetCollection, apiGatewayCheckoutsGetCollection, apiGatewayCheckoutsIdGet, apiGatewayCheckoutsIdPatch, apiGatewayCheckoutsPost, apiGatewaysGetCollection, apiGatewaysIdGet, apiMatchCallsGetCollection, apiMatchCallsIdDelete, apiMatchCallsIdGet, apiMatchCallsIdPatch, apiMatchCallsPost, apiMatchCallSubmissionsGetCollection, apiMatchCallSubmissionsIdGet, apiMatchCallSubmissionsIdPatch, apiMatchCallSubmissionsPost, apiMatchFormulasGetCollection, apiMatchFormulasNameGet, apiMatchRulesGetCollection, apiMatchRulesNameGet, apiMatchStrategiesGetCollection, apiMatchStrategiesIdDelete, apiMatchStrategiesIdGet, apiMatchStrategiesIdPatch, apiMatchStrategiesPost, apiPingGet, apiProjectBudgetItemsGetCollection, apiProjectBudgetItemsIdDelete, apiProjectBudgetItemsIdGet, apiProjectBudgetItemsIdPatch, apiProjectBudgetItemsPost, apiProjectCollaborationCandidaciesGetCollection, apiProjectCollaborationCandidaciesIdDelete, apiProjectCollaborationCandidaciesIdGet, apiProjectCollaborationCandidaciesIdPatch, apiProjectCollaborationCandidaciesPost, apiProjectCollaborationsGetCollection, apiProjectCollaborationsIdDelete, apiProjectCollaborationsIdGet, apiProjectCollaborationsIdPatch, apiProjectCollaborationsPost, apiProjectReviewAreasGetCollection, apiProjectReviewAreasIdDelete, apiProjectReviewAreasIdGet, apiProjectReviewAreasIdPatch, apiProjectReviewAreasPost, apiProjectReviewCommentsGetCollection, apiProjectReviewCommentsIdDelete, apiProjectReviewCommentsIdGet, apiProjectReviewCommentsPost, apiProjectReviewsGetCollection, apiProjectReviewsIdDelete, apiProjectReviewsIdGet, apiProjectReviewsIdPatch, apiProjectRewardClaimsGetCollection, apiProjectRewardClaimsIdDelete, apiProjectRewardClaimsIdGet, apiProjectRewardClaimsIdPatch, apiProjectRewardClaimsPost, apiProjectRewardsGetCollection, apiProjectRewardsIdDelete, apiProjectRewardsIdGet, apiProjectRewardsIdPatch, apiProjectRewardsPost, apiProjectsGetCollection, apiProjectsIdDelete, apiProjectsIdOrSlugGet, apiProjectsIdPatch, apiProjectsmoneyTotalGetCollection, apiProjectsPost, apiProjectSupportsGetCollection, apiProjectSupportsIdGet, apiProjectSupportsIdPatch, apiProjectSupportsmoneyTotalGetCollection, apiProjectUpdatesGetCollection, apiProjectUpdatesIdDelete, apiProjectUpdatesIdGet, apiProjectUpdatesIdPatch, apiProjectUpdatesPost, apiThemesGetCollection, apiThemesIdDelete, apiThemesIdOrSlugGet, apiThemesIdPatch, apiThemesPost, apiTipjarsGetCollection, apiTipjarsIdDelete, apiTipjarsIdGet, apiTipjarsIdPatch, apiTipjarsPost, apiUsersGetCollection, apiUsersIdDelete, apiUsersIdorganizationGet, apiUsersIdorganizationPatch, apiUsersIdOrHandleGet, apiUsersIdPatch, apiUsersIdpersonGet, apiUsersIdpersonPatch, apiUsersPost, apiVersionsGetCollection, apiVersionsIdGet, type Options } from './sdk.gen';
-export type { Accounting, AccountingBalancePoint, AccountingBalancePointJsonld, AccountingJsonld, AccountingTransaction, AccountingTransactionJsonld, Address, AddressAddressCreationDto, AddressAddressCreationDtoJsonld, AddressAddressUpdationDto, AddressJsonld, ApiAccountingBalancePointsGetCollectionData, ApiAccountingBalancePointsGetCollectionResponse, ApiAccountingBalancePointsGetCollectionResponses, ApiAccountingsGetCollectionData, ApiAccountingsGetCollectionResponse, ApiAccountingsGetCollectionResponses, ApiAccountingsIdGetData, ApiAccountingsIdGetError, ApiAccountingsIdGetErrors, ApiAccountingsIdGetResponse, ApiAccountingsIdGetResponses, ApiAccountingTransactionsGetCollectionData, ApiAccountingTransactionsGetCollectionResponse, ApiAccountingTransactionsGetCollectionResponses, ApiAccountingTransactionsIdGetData, ApiAccountingTransactionsIdGetError, ApiAccountingTransactionsIdGetErrors, ApiAccountingTransactionsIdGetResponse, ApiAccountingTransactionsIdGetResponses, ApiAddressesGetCollectionData, ApiAddressesGetCollectionError, ApiAddressesGetCollectionErrors, ApiAddressesGetCollectionResponse, ApiAddressesGetCollectionResponses, ApiAddressesIdDeleteData, ApiAddressesIdDeleteError, ApiAddressesIdDeleteErrors, ApiAddressesIdDeleteResponse, ApiAddressesIdDeleteResponses, ApiAddressesIdGetData, ApiAddressesIdGetError, ApiAddressesIdGetErrors, ApiAddressesIdGetResponse, ApiAddressesIdGetResponses, ApiAddressesIdPatchData, ApiAddressesIdPatchError, ApiAddressesIdPatchErrors, ApiAddressesIdPatchResponse, ApiAddressesIdPatchResponses, ApiAddressesPostData, ApiAddressesPostError, ApiAddressesPostErrors, ApiAddressesPostResponse, ApiAddressesPostResponses, ApiCategoriesGetCollectionData, ApiCategoriesGetCollectionResponse, ApiCategoriesGetCollectionResponses, ApiCategoriesIdDeleteData, ApiCategoriesIdDeleteError, ApiCategoriesIdDeleteErrors, ApiCategoriesIdDeleteResponse, ApiCategoriesIdDeleteResponses, ApiCategoriesIdOrSlugGetData, ApiCategoriesIdOrSlugGetError, ApiCategoriesIdOrSlugGetErrors, ApiCategoriesIdOrSlugGetResponse, ApiCategoriesIdOrSlugGetResponses, ApiCategoriesIdPatchData, ApiCategoriesIdPatchError, ApiCategoriesIdPatchErrors, ApiCategoriesIdPatchResponse, ApiCategoriesIdPatchResponses, ApiCategoriesPostData, ApiCategoriesPostError, ApiCategoriesPostErrors, ApiCategoriesPostResponse, ApiCategoriesPostResponses, ApiGatewayChargesGetCollectionData, ApiGatewayChargesGetCollectionResponse, ApiGatewayChargesGetCollectionResponses, ApiGatewayChargesIdGetData, ApiGatewayChargesIdGetError, ApiGatewayChargesIdGetErrors, ApiGatewayChargesIdGetResponse, ApiGatewayChargesIdGetResponses, ApiGatewayChargesIdPatchData, ApiGatewayChargesIdPatchError, ApiGatewayChargesIdPatchErrors, ApiGatewayChargesIdPatchResponse, ApiGatewayChargesIdPatchResponses, ApiGatewayChargestotalsGetCollectionData, ApiGatewayChargestotalsGetCollectionResponse, ApiGatewayChargestotalsGetCollectionResponses, ApiGatewayCheckoutsGetCollectionData, ApiGatewayCheckoutsGetCollectionResponse, ApiGatewayCheckoutsGetCollectionResponses, ApiGatewayCheckoutsIdGetData, ApiGatewayCheckoutsIdGetError, ApiGatewayCheckoutsIdGetErrors, ApiGatewayCheckoutsIdGetResponse, ApiGatewayCheckoutsIdGetResponses, ApiGatewayCheckoutsIdPatchData, ApiGatewayCheckoutsIdPatchError, ApiGatewayCheckoutsIdPatchErrors, ApiGatewayCheckoutsIdPatchResponse, ApiGatewayCheckoutsIdPatchResponses, ApiGatewayCheckoutsPostData, ApiGatewayCheckoutsPostError, ApiGatewayCheckoutsPostErrors, ApiGatewayCheckoutsPostResponse, ApiGatewayCheckoutsPostResponses, ApiGatewaysGetCollectionData, ApiGatewaysGetCollectionResponse, ApiGatewaysGetCollectionResponses, ApiGatewaysIdGetData, ApiGatewaysIdGetError, ApiGatewaysIdGetErrors, ApiGatewaysIdGetResponse, ApiGatewaysIdGetResponses, ApiMatchCallsGetCollectionData, ApiMatchCallsGetCollectionResponse, ApiMatchCallsGetCollectionResponses, ApiMatchCallsIdDeleteData, ApiMatchCallsIdDeleteError, ApiMatchCallsIdDeleteErrors, ApiMatchCallsIdDeleteResponse, ApiMatchCallsIdDeleteResponses, ApiMatchCallsIdGetData, ApiMatchCallsIdGetError, ApiMatchCallsIdGetErrors, ApiMatchCallsIdGetResponse, ApiMatchCallsIdGetResponses, ApiMatchCallsIdPatchData, ApiMatchCallsIdPatchError, ApiMatchCallsIdPatchErrors, ApiMatchCallsIdPatchResponse, ApiMatchCallsIdPatchResponses, ApiMatchCallsPostData, ApiMatchCallsPostError, ApiMatchCallsPostErrors, ApiMatchCallsPostResponse, ApiMatchCallsPostResponses, ApiMatchCallSubmissionsGetCollectionData, ApiMatchCallSubmissionsGetCollectionResponse, ApiMatchCallSubmissionsGetCollectionResponses, ApiMatchCallSubmissionsIdGetData, ApiMatchCallSubmissionsIdGetError, ApiMatchCallSubmissionsIdGetErrors, ApiMatchCallSubmissionsIdGetResponse, ApiMatchCallSubmissionsIdGetResponses, ApiMatchCallSubmissionsIdPatchData, ApiMatchCallSubmissionsIdPatchError, ApiMatchCallSubmissionsIdPatchErrors, ApiMatchCallSubmissionsIdPatchResponse, ApiMatchCallSubmissionsIdPatchResponses, ApiMatchCallSubmissionsPostData, ApiMatchCallSubmissionsPostError, ApiMatchCallSubmissionsPostErrors, ApiMatchCallSubmissionsPostResponse, ApiMatchCallSubmissionsPostResponses, ApiMatchFormulasGetCollectionData, ApiMatchFormulasGetCollectionResponse, ApiMatchFormulasGetCollectionResponses, ApiMatchFormulasNameGetData, ApiMatchFormulasNameGetError, ApiMatchFormulasNameGetErrors, ApiMatchFormulasNameGetResponse, ApiMatchFormulasNameGetResponses, ApiMatchRulesGetCollectionData, ApiMatchRulesGetCollectionResponse, ApiMatchRulesGetCollectionResponses, ApiMatchRulesNameGetData, ApiMatchRulesNameGetError, ApiMatchRulesNameGetErrors, ApiMatchRulesNameGetResponse, ApiMatchRulesNameGetResponses, ApiMatchStrategiesGetCollectionData, ApiMatchStrategiesGetCollectionResponse, ApiMatchStrategiesGetCollectionResponses, ApiMatchStrategiesIdDeleteData, ApiMatchStrategiesIdDeleteError, ApiMatchStrategiesIdDeleteErrors, ApiMatchStrategiesIdDeleteResponse, ApiMatchStrategiesIdDeleteResponses, ApiMatchStrategiesIdGetData, ApiMatchStrategiesIdGetError, ApiMatchStrategiesIdGetErrors, ApiMatchStrategiesIdGetResponse, ApiMatchStrategiesIdGetResponses, ApiMatchStrategiesIdPatchData, ApiMatchStrategiesIdPatchError, ApiMatchStrategiesIdPatchErrors, ApiMatchStrategiesIdPatchResponse, ApiMatchStrategiesIdPatchResponses, ApiMatchStrategiesPostData, ApiMatchStrategiesPostError, ApiMatchStrategiesPostErrors, ApiMatchStrategiesPostResponse, ApiMatchStrategiesPostResponses, ApiPingGetData, ApiPingGetError, ApiPingGetErrors, ApiPingGetResponse, ApiPingGetResponses, ApiProjectBudgetItemsGetCollectionData, ApiProjectBudgetItemsGetCollectionResponse, ApiProjectBudgetItemsGetCollectionResponses, ApiProjectBudgetItemsIdDeleteData, ApiProjectBudgetItemsIdDeleteError, ApiProjectBudgetItemsIdDeleteErrors, ApiProjectBudgetItemsIdDeleteResponse, ApiProjectBudgetItemsIdDeleteResponses, ApiProjectBudgetItemsIdGetData, ApiProjectBudgetItemsIdGetError, ApiProjectBudgetItemsIdGetErrors, ApiProjectBudgetItemsIdGetResponse, ApiProjectBudgetItemsIdGetResponses, ApiProjectBudgetItemsIdPatchData, ApiProjectBudgetItemsIdPatchError, ApiProjectBudgetItemsIdPatchErrors, ApiProjectBudgetItemsIdPatchResponse, ApiProjectBudgetItemsIdPatchResponses, ApiProjectBudgetItemsPostData, ApiProjectBudgetItemsPostError, ApiProjectBudgetItemsPostErrors, ApiProjectBudgetItemsPostResponse, ApiProjectBudgetItemsPostResponses, ApiProjectCollaborationCandidaciesGetCollectionData, ApiProjectCollaborationCandidaciesGetCollectionResponse, ApiProjectCollaborationCandidaciesGetCollectionResponses, ApiProjectCollaborationCandidaciesIdDeleteData, ApiProjectCollaborationCandidaciesIdDeleteError, ApiProjectCollaborationCandidaciesIdDeleteErrors, ApiProjectCollaborationCandidaciesIdDeleteResponse, ApiProjectCollaborationCandidaciesIdDeleteResponses, ApiProjectCollaborationCandidaciesIdGetData, ApiProjectCollaborationCandidaciesIdGetError, ApiProjectCollaborationCandidaciesIdGetErrors, ApiProjectCollaborationCandidaciesIdGetResponse, ApiProjectCollaborationCandidaciesIdGetResponses, ApiProjectCollaborationCandidaciesIdPatchData, ApiProjectCollaborationCandidaciesIdPatchError, ApiProjectCollaborationCandidaciesIdPatchErrors, ApiProjectCollaborationCandidaciesIdPatchResponse, ApiProjectCollaborationCandidaciesIdPatchResponses, ApiProjectCollaborationCandidaciesPostData, ApiProjectCollaborationCandidaciesPostError, ApiProjectCollaborationCandidaciesPostErrors, ApiProjectCollaborationCandidaciesPostResponse, ApiProjectCollaborationCandidaciesPostResponses, ApiProjectCollaborationsGetCollectionData, ApiProjectCollaborationsGetCollectionResponse, ApiProjectCollaborationsGetCollectionResponses, ApiProjectCollaborationsIdDeleteData, ApiProjectCollaborationsIdDeleteError, ApiProjectCollaborationsIdDeleteErrors, ApiProjectCollaborationsIdDeleteResponse, ApiProjectCollaborationsIdDeleteResponses, ApiProjectCollaborationsIdGetData, ApiProjectCollaborationsIdGetError, ApiProjectCollaborationsIdGetErrors, ApiProjectCollaborationsIdGetResponse, ApiProjectCollaborationsIdGetResponses, ApiProjectCollaborationsIdPatchData, ApiProjectCollaborationsIdPatchError, ApiProjectCollaborationsIdPatchErrors, ApiProjectCollaborationsIdPatchResponse, ApiProjectCollaborationsIdPatchResponses, ApiProjectCollaborationsPostData, ApiProjectCollaborationsPostError, ApiProjectCollaborationsPostErrors, ApiProjectCollaborationsPostResponse, ApiProjectCollaborationsPostResponses, ApiProjectReviewAreasGetCollectionData, ApiProjectReviewAreasGetCollectionResponse, ApiProjectReviewAreasGetCollectionResponses, ApiProjectReviewAreasIdDeleteData, ApiProjectReviewAreasIdDeleteError, ApiProjectReviewAreasIdDeleteErrors, ApiProjectReviewAreasIdDeleteResponse, ApiProjectReviewAreasIdDeleteResponses, ApiProjectReviewAreasIdGetData, ApiProjectReviewAreasIdGetError, ApiProjectReviewAreasIdGetErrors, ApiProjectReviewAreasIdGetResponse, ApiProjectReviewAreasIdGetResponses, ApiProjectReviewAreasIdPatchData, ApiProjectReviewAreasIdPatchError, ApiProjectReviewAreasIdPatchErrors, ApiProjectReviewAreasIdPatchResponse, ApiProjectReviewAreasIdPatchResponses, ApiProjectReviewAreasPostData, ApiProjectReviewAreasPostError, ApiProjectReviewAreasPostErrors, ApiProjectReviewAreasPostResponse, ApiProjectReviewAreasPostResponses, ApiProjectReviewCommentsGetCollectionData, ApiProjectReviewCommentsGetCollectionResponse, ApiProjectReviewCommentsGetCollectionResponses, ApiProjectReviewCommentsIdDeleteData, ApiProjectReviewCommentsIdDeleteError, ApiProjectReviewCommentsIdDeleteErrors, ApiProjectReviewCommentsIdDeleteResponse, ApiProjectReviewCommentsIdDeleteResponses, ApiProjectReviewCommentsIdGetData, ApiProjectReviewCommentsIdGetError, ApiProjectReviewCommentsIdGetErrors, ApiProjectReviewCommentsIdGetResponse, ApiProjectReviewCommentsIdGetResponses, ApiProjectReviewCommentsPostData, ApiProjectReviewCommentsPostError, ApiProjectReviewCommentsPostErrors, ApiProjectReviewCommentsPostResponse, ApiProjectReviewCommentsPostResponses, ApiProjectReviewsGetCollectionData, ApiProjectReviewsGetCollectionResponse, ApiProjectReviewsGetCollectionResponses, ApiProjectReviewsIdDeleteData, ApiProjectReviewsIdDeleteError, ApiProjectReviewsIdDeleteErrors, ApiProjectReviewsIdDeleteResponse, ApiProjectReviewsIdDeleteResponses, ApiProjectReviewsIdGetData, ApiProjectReviewsIdGetError, ApiProjectReviewsIdGetErrors, ApiProjectReviewsIdGetResponse, ApiProjectReviewsIdGetResponses, ApiProjectReviewsIdPatchData, ApiProjectReviewsIdPatchError, ApiProjectReviewsIdPatchErrors, ApiProjectReviewsIdPatchResponse, ApiProjectReviewsIdPatchResponses, ApiProjectRewardClaimsGetCollectionData, ApiProjectRewardClaimsGetCollectionResponse, ApiProjectRewardClaimsGetCollectionResponses, ApiProjectRewardClaimsIdDeleteData, ApiProjectRewardClaimsIdDeleteError, ApiProjectRewardClaimsIdDeleteErrors, ApiProjectRewardClaimsIdDeleteResponse, ApiProjectRewardClaimsIdDeleteResponses, ApiProjectRewardClaimsIdGetData, ApiProjectRewardClaimsIdGetError, ApiProjectRewardClaimsIdGetErrors, ApiProjectRewardClaimsIdGetResponse, ApiProjectRewardClaimsIdGetResponses, ApiProjectRewardClaimsIdPatchData, ApiProjectRewardClaimsIdPatchError, ApiProjectRewardClaimsIdPatchErrors, ApiProjectRewardClaimsIdPatchResponse, ApiProjectRewardClaimsIdPatchResponses, ApiProjectRewardClaimsPostData, ApiProjectRewardClaimsPostError, ApiProjectRewardClaimsPostErrors, ApiProjectRewardClaimsPostResponse, ApiProjectRewardClaimsPostResponses, ApiProjectRewardsGetCollectionData, ApiProjectRewardsGetCollectionResponse, ApiProjectRewardsGetCollectionResponses, ApiProjectRewardsIdDeleteData, ApiProjectRewardsIdDeleteError, ApiProjectRewardsIdDeleteErrors, ApiProjectRewardsIdDeleteResponse, ApiProjectRewardsIdDeleteResponses, ApiProjectRewardsIdGetData, ApiProjectRewardsIdGetError, ApiProjectRewardsIdGetErrors, ApiProjectRewardsIdGetResponse, ApiProjectRewardsIdGetResponses, ApiProjectRewardsIdPatchData, ApiProjectRewardsIdPatchError, ApiProjectRewardsIdPatchErrors, ApiProjectRewardsIdPatchResponse, ApiProjectRewardsIdPatchResponses, ApiProjectRewardsPostData, ApiProjectRewardsPostError, ApiProjectRewardsPostErrors, ApiProjectRewardsPostResponse, ApiProjectRewardsPostResponses, ApiProjectsGetCollectionData, ApiProjectsGetCollectionResponse, ApiProjectsGetCollectionResponses, ApiProjectsIdDeleteData, ApiProjectsIdDeleteError, ApiProjectsIdDeleteErrors, ApiProjectsIdDeleteResponse, ApiProjectsIdDeleteResponses, ApiProjectsIdOrSlugGetData, ApiProjectsIdOrSlugGetError, ApiProjectsIdOrSlugGetErrors, ApiProjectsIdOrSlugGetResponse, ApiProjectsIdOrSlugGetResponses, ApiProjectsIdPatchData, ApiProjectsIdPatchError, ApiProjectsIdPatchErrors, ApiProjectsIdPatchResponse, ApiProjectsIdPatchResponses, ApiProjectsmoneyTotalGetCollectionData, ApiProjectsmoneyTotalGetCollectionResponse, ApiProjectsmoneyTotalGetCollectionResponses, ApiProjectsPostData, ApiProjectsPostError, ApiProjectsPostErrors, ApiProjectsPostResponse, ApiProjectsPostResponses, ApiProjectSupportsGetCollectionData, ApiProjectSupportsGetCollectionResponse, ApiProjectSupportsGetCollectionResponses, ApiProjectSupportsIdGetData, ApiProjectSupportsIdGetError, ApiProjectSupportsIdGetErrors, ApiProjectSupportsIdGetResponse, ApiProjectSupportsIdGetResponses, ApiProjectSupportsIdPatchData, ApiProjectSupportsIdPatchError, ApiProjectSupportsIdPatchErrors, ApiProjectSupportsIdPatchResponse, ApiProjectSupportsIdPatchResponses, ApiProjectSupportsmoneyTotalGetCollectionData, ApiProjectSupportsmoneyTotalGetCollectionResponse, ApiProjectSupportsmoneyTotalGetCollectionResponses, ApiProjectUpdatesGetCollectionData, ApiProjectUpdatesGetCollectionResponse, ApiProjectUpdatesGetCollectionResponses, ApiProjectUpdatesIdDeleteData, ApiProjectUpdatesIdDeleteError, ApiProjectUpdatesIdDeleteErrors, ApiProjectUpdatesIdDeleteResponse, ApiProjectUpdatesIdDeleteResponses, ApiProjectUpdatesIdGetData, ApiProjectUpdatesIdGetError, ApiProjectUpdatesIdGetErrors, ApiProjectUpdatesIdGetResponse, ApiProjectUpdatesIdGetResponses, ApiProjectUpdatesIdPatchData, ApiProjectUpdatesIdPatchError, ApiProjectUpdatesIdPatchErrors, ApiProjectUpdatesIdPatchResponse, ApiProjectUpdatesIdPatchResponses, ApiProjectUpdatesPostData, ApiProjectUpdatesPostError, ApiProjectUpdatesPostErrors, ApiProjectUpdatesPostResponse, ApiProjectUpdatesPostResponses, ApiThemesGetCollectionData, ApiThemesGetCollectionResponse, ApiThemesGetCollectionResponses, ApiThemesIdDeleteData, ApiThemesIdDeleteError, ApiThemesIdDeleteErrors, ApiThemesIdDeleteResponse, ApiThemesIdDeleteResponses, ApiThemesIdOrSlugGetData, ApiThemesIdOrSlugGetError, ApiThemesIdOrSlugGetErrors, ApiThemesIdOrSlugGetResponse, ApiThemesIdOrSlugGetResponses, ApiThemesIdPatchData, ApiThemesIdPatchError, ApiThemesIdPatchErrors, ApiThemesIdPatchResponse, ApiThemesIdPatchResponses, ApiThemesPostData, ApiThemesPostError, ApiThemesPostErrors, ApiThemesPostResponse, ApiThemesPostResponses, ApiTipjarsGetCollectionData, ApiTipjarsGetCollectionResponse, ApiTipjarsGetCollectionResponses, ApiTipjarsIdDeleteData, ApiTipjarsIdDeleteError, ApiTipjarsIdDeleteErrors, ApiTipjarsIdDeleteResponse, ApiTipjarsIdDeleteResponses, ApiTipjarsIdGetData, ApiTipjarsIdGetError, ApiTipjarsIdGetErrors, ApiTipjarsIdGetResponse, ApiTipjarsIdGetResponses, ApiTipjarsIdPatchData, ApiTipjarsIdPatchError, ApiTipjarsIdPatchErrors, ApiTipjarsIdPatchResponse, ApiTipjarsIdPatchResponses, ApiTipjarsPostData, ApiTipjarsPostError, ApiTipjarsPostErrors, ApiTipjarsPostResponse, ApiTipjarsPostResponses, ApiUsersGetCollectionData, ApiUsersGetCollectionResponse, ApiUsersGetCollectionResponses, ApiUsersIdDeleteData, ApiUsersIdDeleteError, ApiUsersIdDeleteErrors, ApiUsersIdDeleteResponse, ApiUsersIdDeleteResponses, ApiUsersIdorganizationGetData, ApiUsersIdorganizationGetError, ApiUsersIdorganizationGetErrors, ApiUsersIdorganizationGetResponse, ApiUsersIdorganizationGetResponses, ApiUsersIdorganizationPatchData, ApiUsersIdorganizationPatchError, ApiUsersIdorganizationPatchErrors, ApiUsersIdorganizationPatchResponse, ApiUsersIdorganizationPatchResponses, ApiUsersIdOrHandleGetData, ApiUsersIdOrHandleGetError, ApiUsersIdOrHandleGetErrors, ApiUsersIdOrHandleGetResponse, ApiUsersIdOrHandleGetResponses, ApiUsersIdPatchData, ApiUsersIdPatchError, ApiUsersIdPatchErrors, ApiUsersIdPatchResponse, ApiUsersIdPatchResponses, ApiUsersIdpersonGetData, ApiUsersIdpersonGetError, ApiUsersIdpersonGetErrors, ApiUsersIdpersonGetResponse, ApiUsersIdpersonGetResponses, ApiUsersIdpersonPatchData, ApiUsersIdpersonPatchError, ApiUsersIdpersonPatchErrors, ApiUsersIdpersonPatchResponse, ApiUsersIdpersonPatchResponses, ApiUsersPostData, ApiUsersPostError, ApiUsersPostErrors, ApiUsersPostResponse, ApiUsersPostResponses, ApiVersionsGetCollectionData, ApiVersionsGetCollectionResponse, ApiVersionsGetCollectionResponses, ApiVersionsIdGetData, ApiVersionsIdGetError, ApiVersionsIdGetErrors, ApiVersionsIdGetResponse, ApiVersionsIdGetResponses, Budget, BudgetJsonld, BudgetSummary, BudgetSummaryJsonld, Category, CategoryJsonld, ChargeCreationDto, ChargeCreationDtoJsonld, ClientOptions, ConstraintViolationJson, ConstraintViolationJsonldJsonld, Conversion, ConversionJsonld, Error, ErrorJsonld, Gateway, GatewayCharge, GatewayChargeChargesTotalsDto, GatewayChargeChargesTotalsDtoJsonld, GatewayChargeChargeUpdationDto, GatewayChargeJsonld, GatewayCheckout, GatewayCheckoutCheckoutCreationDto, GatewayCheckoutCheckoutCreationDtoJsonld, GatewayCheckoutCheckoutUpdationDto, GatewayCheckoutJsonld, GatewayJsonld, GatewayLink, GatewayLinkJsonld, Link, LinkJsonld, MatchCall, MatchCallJsonld, MatchCallSubmission, MatchCallSubmissionJsonld, MatchCallSubmissionMatchCallSubmissionCreationDto, MatchCallSubmissionMatchCallSubmissionCreationDtoJsonld, MatchFormula, MatchFormulaJsonld, MatchRule, MatchRuleJsonld, MatchStrategy, MatchStrategyJsonld, Money, MoneyInput, MoneyInputJsonld, MoneyJsonld, MoneyOutput, MoneyOutputJsonld, Organization, OrganizationJsonld, Person, PersonJsonld, Ping, PingJsonld, Project, ProjectBudgetItem, ProjectBudgetItemJsonld, ProjectCalendar, ProjectCalendarJsonld, ProjectCollaboration, ProjectCollaborationCandidacy, ProjectCollaborationCandidacyJsonld, ProjectCollaborationJsonld, ProjectJsonld, ProjectProjectCreationDto, ProjectProjectCreationDtoJsonld, ProjectProjectUpdationDto, ProjectReview, ProjectReviewArea, ProjectReviewAreaJsonld, ProjectReviewComment, ProjectReviewCommentJsonld, ProjectReviewJsonld, ProjectReward, ProjectRewardClaim, ProjectRewardClaimJsonld, ProjectRewardClaimRewardClaimCreationDto, ProjectRewardClaimRewardClaimCreationDtoJsonld, ProjectRewardClaimRewardClaimUpdationDto, ProjectRewardJsonld, ProjectSupport, ProjectSupportJsonld, ProjectSupportTotalizedMoney, ProjectSupportTotalizedMoneyJsonld, ProjectTotalizedMoney, ProjectUpdate, ProjectUpdateJsonld, ProjectVideo, ProjectVideoJsonld, Territory, TerritoryJsonld, Theme, ThemeJsonld, Tipjar, TipjarJsonld, TotalizedMoney, TotalizedMoneyJsonld, Tracking, TrackingJsonld, User, UserJsonld, UserUserSignupDto, UserUserSignupDtoJsonld, UserUserUpdationDto, Version, VersionJsonld } from './types.gen';
+export type { Accounting, AccountingBalancePoint, AccountingBalancePointCsv, AccountingBalancePointJsonld, AccountingCsv, AccountingJsonld, AccountingTransaction, AccountingTransactionCsv, AccountingTransactionJsonld, Address, AddressAddressCreationDto, AddressAddressUpdationDtoJsonMergePatch, AddressCsv, AddressJsonld, ApiAccountingBalancePointsGetCollectionData, ApiAccountingBalancePointsGetCollectionResponse, ApiAccountingBalancePointsGetCollectionResponses, ApiAccountingsGetCollectionData, ApiAccountingsGetCollectionResponse, ApiAccountingsGetCollectionResponses, ApiAccountingsIdGetData, ApiAccountingsIdGetError, ApiAccountingsIdGetErrors, ApiAccountingsIdGetResponse, ApiAccountingsIdGetResponses, ApiAccountingTransactionsGetCollectionData, ApiAccountingTransactionsGetCollectionResponse, ApiAccountingTransactionsGetCollectionResponses, ApiAccountingTransactionsIdGetData, ApiAccountingTransactionsIdGetError, ApiAccountingTransactionsIdGetErrors, ApiAccountingTransactionsIdGetResponse, ApiAccountingTransactionsIdGetResponses, ApiAddressesGetCollectionData, ApiAddressesGetCollectionError, ApiAddressesGetCollectionErrors, ApiAddressesGetCollectionResponse, ApiAddressesGetCollectionResponses, ApiAddressesIdDeleteData, ApiAddressesIdDeleteError, ApiAddressesIdDeleteErrors, ApiAddressesIdDeleteResponse, ApiAddressesIdDeleteResponses, ApiAddressesIdGetData, ApiAddressesIdGetError, ApiAddressesIdGetErrors, ApiAddressesIdGetResponse, ApiAddressesIdGetResponses, ApiAddressesIdPatchData, ApiAddressesIdPatchError, ApiAddressesIdPatchErrors, ApiAddressesIdPatchResponse, ApiAddressesIdPatchResponses, ApiAddressesPostData, ApiAddressesPostError, ApiAddressesPostErrors, ApiAddressesPostResponse, ApiAddressesPostResponses, ApiCategoriesGetCollectionData, ApiCategoriesGetCollectionResponse, ApiCategoriesGetCollectionResponses, ApiCategoriesIdDeleteData, ApiCategoriesIdDeleteError, ApiCategoriesIdDeleteErrors, ApiCategoriesIdDeleteResponse, ApiCategoriesIdDeleteResponses, ApiCategoriesIdOrSlugGetData, ApiCategoriesIdOrSlugGetError, ApiCategoriesIdOrSlugGetErrors, ApiCategoriesIdOrSlugGetResponse, ApiCategoriesIdOrSlugGetResponses, ApiCategoriesIdPatchData, ApiCategoriesIdPatchError, ApiCategoriesIdPatchErrors, ApiCategoriesIdPatchResponse, ApiCategoriesIdPatchResponses, ApiCategoriesPostData, ApiCategoriesPostError, ApiCategoriesPostErrors, ApiCategoriesPostResponse, ApiCategoriesPostResponses, ApiGatewayChargesGetCollectionData, ApiGatewayChargesGetCollectionResponse, ApiGatewayChargesGetCollectionResponses, ApiGatewayChargesIdGetData, ApiGatewayChargesIdGetError, ApiGatewayChargesIdGetErrors, ApiGatewayChargesIdGetResponse, ApiGatewayChargesIdGetResponses, ApiGatewayChargesIdPatchData, ApiGatewayChargesIdPatchError, ApiGatewayChargesIdPatchErrors, ApiGatewayChargesIdPatchResponse, ApiGatewayChargesIdPatchResponses, ApiGatewayChargestotalsGetCollectionData, ApiGatewayChargestotalsGetCollectionResponse, ApiGatewayChargestotalsGetCollectionResponses, ApiGatewayCheckoutsGetCollectionData, ApiGatewayCheckoutsGetCollectionResponse, ApiGatewayCheckoutsGetCollectionResponses, ApiGatewayCheckoutsIdGetData, ApiGatewayCheckoutsIdGetError, ApiGatewayCheckoutsIdGetErrors, ApiGatewayCheckoutsIdGetResponse, ApiGatewayCheckoutsIdGetResponses, ApiGatewayCheckoutsIdPatchData, ApiGatewayCheckoutsIdPatchError, ApiGatewayCheckoutsIdPatchErrors, ApiGatewayCheckoutsIdPatchResponse, ApiGatewayCheckoutsIdPatchResponses, ApiGatewayCheckoutsPostData, ApiGatewayCheckoutsPostError, ApiGatewayCheckoutsPostErrors, ApiGatewayCheckoutsPostResponse, ApiGatewayCheckoutsPostResponses, ApiGatewaysGetCollectionData, ApiGatewaysGetCollectionResponse, ApiGatewaysGetCollectionResponses, ApiGatewaysIdGetData, ApiGatewaysIdGetError, ApiGatewaysIdGetErrors, ApiGatewaysIdGetResponse, ApiGatewaysIdGetResponses, ApiMatchCallsGetCollectionData, ApiMatchCallsGetCollectionResponse, ApiMatchCallsGetCollectionResponses, ApiMatchCallsIdDeleteData, ApiMatchCallsIdDeleteError, ApiMatchCallsIdDeleteErrors, ApiMatchCallsIdDeleteResponse, ApiMatchCallsIdDeleteResponses, ApiMatchCallsIdGetData, ApiMatchCallsIdGetError, ApiMatchCallsIdGetErrors, ApiMatchCallsIdGetResponse, ApiMatchCallsIdGetResponses, ApiMatchCallsIdPatchData, ApiMatchCallsIdPatchError, ApiMatchCallsIdPatchErrors, ApiMatchCallsIdPatchResponse, ApiMatchCallsIdPatchResponses, ApiMatchCallsPostData, ApiMatchCallsPostError, ApiMatchCallsPostErrors, ApiMatchCallsPostResponse, ApiMatchCallsPostResponses, ApiMatchCallSubmissionsGetCollectionData, ApiMatchCallSubmissionsGetCollectionResponse, ApiMatchCallSubmissionsGetCollectionResponses, ApiMatchCallSubmissionsIdGetData, ApiMatchCallSubmissionsIdGetError, ApiMatchCallSubmissionsIdGetErrors, ApiMatchCallSubmissionsIdGetResponse, ApiMatchCallSubmissionsIdGetResponses, ApiMatchCallSubmissionsIdPatchData, ApiMatchCallSubmissionsIdPatchError, ApiMatchCallSubmissionsIdPatchErrors, ApiMatchCallSubmissionsIdPatchResponse, ApiMatchCallSubmissionsIdPatchResponses, ApiMatchCallSubmissionsPostData, ApiMatchCallSubmissionsPostError, ApiMatchCallSubmissionsPostErrors, ApiMatchCallSubmissionsPostResponse, ApiMatchCallSubmissionsPostResponses, ApiMatchFormulasGetCollectionData, ApiMatchFormulasGetCollectionResponse, ApiMatchFormulasGetCollectionResponses, ApiMatchFormulasNameGetData, ApiMatchFormulasNameGetError, ApiMatchFormulasNameGetErrors, ApiMatchFormulasNameGetResponse, ApiMatchFormulasNameGetResponses, ApiMatchRulesGetCollectionData, ApiMatchRulesGetCollectionResponse, ApiMatchRulesGetCollectionResponses, ApiMatchRulesNameGetData, ApiMatchRulesNameGetError, ApiMatchRulesNameGetErrors, ApiMatchRulesNameGetResponse, ApiMatchRulesNameGetResponses, ApiMatchStrategiesGetCollectionData, ApiMatchStrategiesGetCollectionResponse, ApiMatchStrategiesGetCollectionResponses, ApiMatchStrategiesIdDeleteData, ApiMatchStrategiesIdDeleteError, ApiMatchStrategiesIdDeleteErrors, ApiMatchStrategiesIdDeleteResponse, ApiMatchStrategiesIdDeleteResponses, ApiMatchStrategiesIdGetData, ApiMatchStrategiesIdGetError, ApiMatchStrategiesIdGetErrors, ApiMatchStrategiesIdGetResponse, ApiMatchStrategiesIdGetResponses, ApiMatchStrategiesIdPatchData, ApiMatchStrategiesIdPatchError, ApiMatchStrategiesIdPatchErrors, ApiMatchStrategiesIdPatchResponse, ApiMatchStrategiesIdPatchResponses, ApiMatchStrategiesPostData, ApiMatchStrategiesPostError, ApiMatchStrategiesPostErrors, ApiMatchStrategiesPostResponse, ApiMatchStrategiesPostResponses, ApiPingGetData, ApiPingGetError, ApiPingGetErrors, ApiPingGetResponse, ApiPingGetResponses, ApiProjectBudgetItemsGetCollectionData, ApiProjectBudgetItemsGetCollectionResponse, ApiProjectBudgetItemsGetCollectionResponses, ApiProjectBudgetItemsIdDeleteData, ApiProjectBudgetItemsIdDeleteError, ApiProjectBudgetItemsIdDeleteErrors, ApiProjectBudgetItemsIdDeleteResponse, ApiProjectBudgetItemsIdDeleteResponses, ApiProjectBudgetItemsIdGetData, ApiProjectBudgetItemsIdGetError, ApiProjectBudgetItemsIdGetErrors, ApiProjectBudgetItemsIdGetResponse, ApiProjectBudgetItemsIdGetResponses, ApiProjectBudgetItemsIdPatchData, ApiProjectBudgetItemsIdPatchError, ApiProjectBudgetItemsIdPatchErrors, ApiProjectBudgetItemsIdPatchResponse, ApiProjectBudgetItemsIdPatchResponses, ApiProjectBudgetItemsPostData, ApiProjectBudgetItemsPostError, ApiProjectBudgetItemsPostErrors, ApiProjectBudgetItemsPostResponse, ApiProjectBudgetItemsPostResponses, ApiProjectCollaborationCandidaciesGetCollectionData, ApiProjectCollaborationCandidaciesGetCollectionResponse, ApiProjectCollaborationCandidaciesGetCollectionResponses, ApiProjectCollaborationCandidaciesIdDeleteData, ApiProjectCollaborationCandidaciesIdDeleteError, ApiProjectCollaborationCandidaciesIdDeleteErrors, ApiProjectCollaborationCandidaciesIdDeleteResponse, ApiProjectCollaborationCandidaciesIdDeleteResponses, ApiProjectCollaborationCandidaciesIdGetData, ApiProjectCollaborationCandidaciesIdGetError, ApiProjectCollaborationCandidaciesIdGetErrors, ApiProjectCollaborationCandidaciesIdGetResponse, ApiProjectCollaborationCandidaciesIdGetResponses, ApiProjectCollaborationCandidaciesIdPatchData, ApiProjectCollaborationCandidaciesIdPatchError, ApiProjectCollaborationCandidaciesIdPatchErrors, ApiProjectCollaborationCandidaciesIdPatchResponse, ApiProjectCollaborationCandidaciesIdPatchResponses, ApiProjectCollaborationCandidaciesPostData, ApiProjectCollaborationCandidaciesPostError, ApiProjectCollaborationCandidaciesPostErrors, ApiProjectCollaborationCandidaciesPostResponse, ApiProjectCollaborationCandidaciesPostResponses, ApiProjectCollaborationsGetCollectionData, ApiProjectCollaborationsGetCollectionResponse, ApiProjectCollaborationsGetCollectionResponses, ApiProjectCollaborationsIdDeleteData, ApiProjectCollaborationsIdDeleteError, ApiProjectCollaborationsIdDeleteErrors, ApiProjectCollaborationsIdDeleteResponse, ApiProjectCollaborationsIdDeleteResponses, ApiProjectCollaborationsIdGetData, ApiProjectCollaborationsIdGetError, ApiProjectCollaborationsIdGetErrors, ApiProjectCollaborationsIdGetResponse, ApiProjectCollaborationsIdGetResponses, ApiProjectCollaborationsIdPatchData, ApiProjectCollaborationsIdPatchError, ApiProjectCollaborationsIdPatchErrors, ApiProjectCollaborationsIdPatchResponse, ApiProjectCollaborationsIdPatchResponses, ApiProjectCollaborationsPostData, ApiProjectCollaborationsPostError, ApiProjectCollaborationsPostErrors, ApiProjectCollaborationsPostResponse, ApiProjectCollaborationsPostResponses, ApiProjectReviewAreasGetCollectionData, ApiProjectReviewAreasGetCollectionResponse, ApiProjectReviewAreasGetCollectionResponses, ApiProjectReviewAreasIdDeleteData, ApiProjectReviewAreasIdDeleteError, ApiProjectReviewAreasIdDeleteErrors, ApiProjectReviewAreasIdDeleteResponse, ApiProjectReviewAreasIdDeleteResponses, ApiProjectReviewAreasIdGetData, ApiProjectReviewAreasIdGetError, ApiProjectReviewAreasIdGetErrors, ApiProjectReviewAreasIdGetResponse, ApiProjectReviewAreasIdGetResponses, ApiProjectReviewAreasIdPatchData, ApiProjectReviewAreasIdPatchError, ApiProjectReviewAreasIdPatchErrors, ApiProjectReviewAreasIdPatchResponse, ApiProjectReviewAreasIdPatchResponses, ApiProjectReviewAreasPostData, ApiProjectReviewAreasPostError, ApiProjectReviewAreasPostErrors, ApiProjectReviewAreasPostResponse, ApiProjectReviewAreasPostResponses, ApiProjectReviewCommentsGetCollectionData, ApiProjectReviewCommentsGetCollectionResponse, ApiProjectReviewCommentsGetCollectionResponses, ApiProjectReviewCommentsIdDeleteData, ApiProjectReviewCommentsIdDeleteError, ApiProjectReviewCommentsIdDeleteErrors, ApiProjectReviewCommentsIdDeleteResponse, ApiProjectReviewCommentsIdDeleteResponses, ApiProjectReviewCommentsIdGetData, ApiProjectReviewCommentsIdGetError, ApiProjectReviewCommentsIdGetErrors, ApiProjectReviewCommentsIdGetResponse, ApiProjectReviewCommentsIdGetResponses, ApiProjectReviewCommentsPostData, ApiProjectReviewCommentsPostError, ApiProjectReviewCommentsPostErrors, ApiProjectReviewCommentsPostResponse, ApiProjectReviewCommentsPostResponses, ApiProjectReviewsGetCollectionData, ApiProjectReviewsGetCollectionResponse, ApiProjectReviewsGetCollectionResponses, ApiProjectReviewsIdDeleteData, ApiProjectReviewsIdDeleteError, ApiProjectReviewsIdDeleteErrors, ApiProjectReviewsIdDeleteResponse, ApiProjectReviewsIdDeleteResponses, ApiProjectReviewsIdGetData, ApiProjectReviewsIdGetError, ApiProjectReviewsIdGetErrors, ApiProjectReviewsIdGetResponse, ApiProjectReviewsIdGetResponses, ApiProjectReviewsIdPatchData, ApiProjectReviewsIdPatchError, ApiProjectReviewsIdPatchErrors, ApiProjectReviewsIdPatchResponse, ApiProjectReviewsIdPatchResponses, ApiProjectRewardClaimsGetCollectionData, ApiProjectRewardClaimsGetCollectionResponse, ApiProjectRewardClaimsGetCollectionResponses, ApiProjectRewardClaimsIdDeleteData, ApiProjectRewardClaimsIdDeleteError, ApiProjectRewardClaimsIdDeleteErrors, ApiProjectRewardClaimsIdDeleteResponse, ApiProjectRewardClaimsIdDeleteResponses, ApiProjectRewardClaimsIdGetData, ApiProjectRewardClaimsIdGetError, ApiProjectRewardClaimsIdGetErrors, ApiProjectRewardClaimsIdGetResponse, ApiProjectRewardClaimsIdGetResponses, ApiProjectRewardClaimsIdPatchData, ApiProjectRewardClaimsIdPatchError, ApiProjectRewardClaimsIdPatchErrors, ApiProjectRewardClaimsIdPatchResponse, ApiProjectRewardClaimsIdPatchResponses, ApiProjectRewardClaimsPostData, ApiProjectRewardClaimsPostError, ApiProjectRewardClaimsPostErrors, ApiProjectRewardClaimsPostResponse, ApiProjectRewardClaimsPostResponses, ApiProjectRewardsGetCollectionData, ApiProjectRewardsGetCollectionResponse, ApiProjectRewardsGetCollectionResponses, ApiProjectRewardsIdDeleteData, ApiProjectRewardsIdDeleteError, ApiProjectRewardsIdDeleteErrors, ApiProjectRewardsIdDeleteResponse, ApiProjectRewardsIdDeleteResponses, ApiProjectRewardsIdGetData, ApiProjectRewardsIdGetError, ApiProjectRewardsIdGetErrors, ApiProjectRewardsIdGetResponse, ApiProjectRewardsIdGetResponses, ApiProjectRewardsIdPatchData, ApiProjectRewardsIdPatchError, ApiProjectRewardsIdPatchErrors, ApiProjectRewardsIdPatchResponse, ApiProjectRewardsIdPatchResponses, ApiProjectRewardsPostData, ApiProjectRewardsPostError, ApiProjectRewardsPostErrors, ApiProjectRewardsPostResponse, ApiProjectRewardsPostResponses, ApiProjectsGetCollectionData, ApiProjectsGetCollectionResponse, ApiProjectsGetCollectionResponses, ApiProjectsIdDeleteData, ApiProjectsIdDeleteError, ApiProjectsIdDeleteErrors, ApiProjectsIdDeleteResponse, ApiProjectsIdDeleteResponses, ApiProjectsIdOrSlugGetData, ApiProjectsIdOrSlugGetError, ApiProjectsIdOrSlugGetErrors, ApiProjectsIdOrSlugGetResponse, ApiProjectsIdOrSlugGetResponses, ApiProjectsIdPatchData, ApiProjectsIdPatchError, ApiProjectsIdPatchErrors, ApiProjectsIdPatchResponse, ApiProjectsIdPatchResponses, ApiProjectsmoneyTotalGetCollectionData, ApiProjectsmoneyTotalGetCollectionResponse, ApiProjectsmoneyTotalGetCollectionResponses, ApiProjectsPostData, ApiProjectsPostError, ApiProjectsPostErrors, ApiProjectsPostResponse, ApiProjectsPostResponses, ApiProjectSupportsGetCollectionData, ApiProjectSupportsGetCollectionResponse, ApiProjectSupportsGetCollectionResponses, ApiProjectSupportsIdGetData, ApiProjectSupportsIdGetError, ApiProjectSupportsIdGetErrors, ApiProjectSupportsIdGetResponse, ApiProjectSupportsIdGetResponses, ApiProjectSupportsIdPatchData, ApiProjectSupportsIdPatchError, ApiProjectSupportsIdPatchErrors, ApiProjectSupportsIdPatchResponse, ApiProjectSupportsIdPatchResponses, ApiProjectSupportsmoneyTotalGetCollectionData, ApiProjectSupportsmoneyTotalGetCollectionResponse, ApiProjectSupportsmoneyTotalGetCollectionResponses, ApiProjectUpdatesGetCollectionData, ApiProjectUpdatesGetCollectionResponse, ApiProjectUpdatesGetCollectionResponses, ApiProjectUpdatesIdDeleteData, ApiProjectUpdatesIdDeleteError, ApiProjectUpdatesIdDeleteErrors, ApiProjectUpdatesIdDeleteResponse, ApiProjectUpdatesIdDeleteResponses, ApiProjectUpdatesIdGetData, ApiProjectUpdatesIdGetError, ApiProjectUpdatesIdGetErrors, ApiProjectUpdatesIdGetResponse, ApiProjectUpdatesIdGetResponses, ApiProjectUpdatesIdPatchData, ApiProjectUpdatesIdPatchError, ApiProjectUpdatesIdPatchErrors, ApiProjectUpdatesIdPatchResponse, ApiProjectUpdatesIdPatchResponses, ApiProjectUpdatesPostData, ApiProjectUpdatesPostError, ApiProjectUpdatesPostErrors, ApiProjectUpdatesPostResponse, ApiProjectUpdatesPostResponses, ApiThemesGetCollectionData, ApiThemesGetCollectionResponse, ApiThemesGetCollectionResponses, ApiThemesIdDeleteData, ApiThemesIdDeleteError, ApiThemesIdDeleteErrors, ApiThemesIdDeleteResponse, ApiThemesIdDeleteResponses, ApiThemesIdOrSlugGetData, ApiThemesIdOrSlugGetError, ApiThemesIdOrSlugGetErrors, ApiThemesIdOrSlugGetResponse, ApiThemesIdOrSlugGetResponses, ApiThemesIdPatchData, ApiThemesIdPatchError, ApiThemesIdPatchErrors, ApiThemesIdPatchResponse, ApiThemesIdPatchResponses, ApiThemesPostData, ApiThemesPostError, ApiThemesPostErrors, ApiThemesPostResponse, ApiThemesPostResponses, ApiTipjarsGetCollectionData, ApiTipjarsGetCollectionResponse, ApiTipjarsGetCollectionResponses, ApiTipjarsIdDeleteData, ApiTipjarsIdDeleteError, ApiTipjarsIdDeleteErrors, ApiTipjarsIdDeleteResponse, ApiTipjarsIdDeleteResponses, ApiTipjarsIdGetData, ApiTipjarsIdGetError, ApiTipjarsIdGetErrors, ApiTipjarsIdGetResponse, ApiTipjarsIdGetResponses, ApiTipjarsIdPatchData, ApiTipjarsIdPatchError, ApiTipjarsIdPatchErrors, ApiTipjarsIdPatchResponse, ApiTipjarsIdPatchResponses, ApiTipjarsPostData, ApiTipjarsPostError, ApiTipjarsPostErrors, ApiTipjarsPostResponse, ApiTipjarsPostResponses, ApiUsersGetCollectionData, ApiUsersGetCollectionResponse, ApiUsersGetCollectionResponses, ApiUsersIdDeleteData, ApiUsersIdDeleteError, ApiUsersIdDeleteErrors, ApiUsersIdDeleteResponse, ApiUsersIdDeleteResponses, ApiUsersIdorganizationGetData, ApiUsersIdorganizationGetError, ApiUsersIdorganizationGetErrors, ApiUsersIdorganizationGetResponse, ApiUsersIdorganizationGetResponses, ApiUsersIdorganizationPatchData, ApiUsersIdorganizationPatchError, ApiUsersIdorganizationPatchErrors, ApiUsersIdorganizationPatchResponse, ApiUsersIdorganizationPatchResponses, ApiUsersIdOrHandleGetData, ApiUsersIdOrHandleGetError, ApiUsersIdOrHandleGetErrors, ApiUsersIdOrHandleGetResponse, ApiUsersIdOrHandleGetResponses, ApiUsersIdPatchData, ApiUsersIdPatchError, ApiUsersIdPatchErrors, ApiUsersIdPatchResponse, ApiUsersIdPatchResponses, ApiUsersIdpersonGetData, ApiUsersIdpersonGetError, ApiUsersIdpersonGetErrors, ApiUsersIdpersonGetResponse, ApiUsersIdpersonGetResponses, ApiUsersIdpersonPatchData, ApiUsersIdpersonPatchError, ApiUsersIdpersonPatchErrors, ApiUsersIdpersonPatchResponse, ApiUsersIdpersonPatchResponses, ApiUsersPostData, ApiUsersPostError, ApiUsersPostErrors, ApiUsersPostResponse, ApiUsersPostResponses, ApiVersionsGetCollectionData, ApiVersionsGetCollectionResponse, ApiVersionsGetCollectionResponses, ApiVersionsIdGetData, ApiVersionsIdGetError, ApiVersionsIdGetErrors, ApiVersionsIdGetResponse, ApiVersionsIdGetResponses, Budget, BudgetCsv, BudgetJsonld, BudgetSummary, BudgetSummaryCsv, BudgetSummaryJsonld, Category, CategoryCsv, CategoryJsonld, CategoryJsonMergePatch, ChargeCreationDto, ClientOptions, ConstraintViolation, ConstraintViolationJsonld, Conversion, ConversionCsv, ConversionJsonld, Error, ErrorJsonld, Gateway, GatewayCharge, GatewayChargeChargesTotalsDto, GatewayChargeChargesTotalsDtoCsv, GatewayChargeChargesTotalsDtoJsonld, GatewayChargeChargeUpdationDtoJsonMergePatch, GatewayChargeCsv, GatewayChargeJsonld, GatewayCheckout, GatewayCheckoutCheckoutCreationDto, GatewayCheckoutCheckoutUpdationDtoJsonMergePatch, GatewayCheckoutCsv, GatewayCheckoutJsonld, GatewayCsv, GatewayJsonld, GatewayLink, GatewayLinkCsv, GatewayLinkJsonld, HydraCollectionBaseSchema, HydraCollectionBaseSchemaNoPagination, HydraItemBaseSchema, Link, LinkCsv, LinkJsonld, MatchCall, MatchCallCsv, MatchCallJsonld, MatchCallJsonMergePatch, MatchCallSubmission, MatchCallSubmissionCsv, MatchCallSubmissionJsonld, MatchCallSubmissionJsonMergePatch, MatchCallSubmissionMatchCallSubmissionCreationDto, MatchFormula, MatchFormulaCsv, MatchFormulaJsonld, MatchRule, MatchRuleCsv, MatchRuleJsonld, MatchStrategy, MatchStrategyCsv, MatchStrategyJsonld, MatchStrategyJsonMergePatch, Money, MoneyCsv, MoneyInput, MoneyInputCsv, MoneyInputJsonld, MoneyJsonld, MoneyOutput, MoneyOutputCsv, MoneyOutputJsonld, Organization, OrganizationCsv, OrganizationJsonld, OrganizationJsonMergePatch, Person, PersonCsv, PersonJsonld, PersonJsonMergePatch, Ping, PingCsv, PingJsonld, Project, ProjectBudgetItem, ProjectBudgetItemCsv, ProjectBudgetItemJsonld, ProjectBudgetItemJsonMergePatch, ProjectCalendar, ProjectCalendarCsv, ProjectCalendarJsonld, ProjectCollaboration, ProjectCollaborationCandidacy, ProjectCollaborationCandidacyCsv, ProjectCollaborationCandidacyJsonld, ProjectCollaborationCandidacyJsonMergePatch, ProjectCollaborationCsv, ProjectCollaborationJsonld, ProjectCollaborationJsonMergePatch, ProjectCsv, ProjectJsonld, ProjectProjectCreationDto, ProjectProjectUpdationDtoJsonMergePatch, ProjectReview, ProjectReviewArea, ProjectReviewAreaCsv, ProjectReviewAreaJsonld, ProjectReviewAreaJsonMergePatch, ProjectReviewComment, ProjectReviewCommentCsv, ProjectReviewCommentJsonld, ProjectReviewCsv, ProjectReviewJsonld, ProjectReviewJsonMergePatch, ProjectReward, ProjectRewardClaim, ProjectRewardClaimCsv, ProjectRewardClaimJsonld, ProjectRewardClaimRewardClaimCreationDto, ProjectRewardClaimRewardClaimUpdationDtoJsonMergePatch, ProjectRewardCsv, ProjectRewardJsonld, ProjectRewardJsonMergePatch, ProjectSupport, ProjectSupportCsv, ProjectSupportJsonld, ProjectSupportJsonMergePatch, ProjectSupportTotalizedMoney, ProjectSupportTotalizedMoneyCsv, ProjectSupportTotalizedMoneyJsonld, ProjectTotalizedMoney, ProjectTotalizedMoneyCsv, ProjectTotalizedMoneyJsonld, ProjectUpdate, ProjectUpdateCsv, ProjectUpdateJsonld, ProjectUpdateJsonMergePatch, ProjectVideo, ProjectVideoCsv, ProjectVideoJsonld, Territory, TerritoryCsv, TerritoryJsonld, Theme, ThemeCsv, ThemeJsonld, ThemeJsonMergePatch, Tipjar, TipjarCsv, TipjarJsonld, TipjarJsonMergePatch, TotalizedMoney, TotalizedMoneyCsv, TotalizedMoneyJsonld, Tracking, TrackingCsv, TrackingJsonld, User, UserCsv, UserJsonld, UserUserSignupDto, UserUserUpdationDtoJsonMergePatch, Version, VersionCsv, VersionJsonld } from './types.gen';
diff --git a/src/openapi/client/types.gen.ts b/src/openapi/client/types.gen.ts
index 902e332a..89ec554c 100644
--- a/src/openapi/client/types.gen.ts
+++ b/src/openapi/client/types.gen.ts
@@ -13,6 +13,9 @@ export type ClientOptions = {
* Many different actions can trigger changes in Accountings, such as GatewayCheckouts being successfully charged.
*/
export type Accounting = {
+ /**
+ * Collections can be filtered by one or many known IDs, e.g: `?id[]=1&id[]=2`.
+ */
id?: number;
/**
* IRI of the resource owning this Accounting.
@@ -35,14 +38,36 @@ export type Accounting = {
* \
* Many different actions can trigger changes in Accountings, such as GatewayCheckouts being successfully charged.
*/
-export type AccountingJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type AccountingCsv = {
+ /**
+ * Collections can be filtered by one or many known IDs, e.g: `?id[]=1&id[]=2`.
+ */
+ id?: number;
+ /**
+ * IRI of the resource owning this Accounting.
+ */
+ owner?: string;
+ ownerObject?: string;
+ /**
+ * The preferred currency for monetary operations.\
+ * 3-letter ISO 4217 currency code.
+ */
+ currency?: string;
+ balance?: MoneyOutputCsv;
+};
+
+/**
+ * v4 features an advanced economy model under the hood.
+ * Accountings are implemented as a common interface for issuing and receiving Transactions,
+ * which allows different resources to have money-capabalities.
+ * \
+ * \
+ * Many different actions can trigger changes in Accountings, such as GatewayCheckouts being successfully charged.
+ */
+export type AccountingJsonld = HydraItemBaseSchema & {
+ /**
+ * Collections can be filtered by one or many known IDs, e.g: `?id[]=1&id[]=2`.
+ */
id?: number;
/**
* IRI of the resource owning this Accounting.
@@ -88,9 +113,32 @@ export type AccountingBalancePoint = {
* Each point is the sum of money at incoming and outgoing transactions in an Accounting for a period of time,
* you can query multiple balance points to obtain the evolution of the Accounting's balance over time.
*/
-export type AccountingBalancePointJsonld = {
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type AccountingBalancePointCsv = {
+ /**
+ * The start date for items aggregated in this point.
+ */
+ start?: string;
+ /**
+ * The end date for items aggregated in this point. Not inclusive.
+ */
+ end?: string;
+ /**
+ * Resulting balance for items in this point.
+ */
+ balance?: MoneyOutputCsv;
+ /**
+ * The number of items aggregated in this point.
+ */
+ length?: number;
+};
+
+/**
+ * AccountingBalancePoints represent a dated aggregate Accounting balance.\
+ * \
+ * Each point is the sum of money at incoming and outgoing transactions in an Accounting for a period of time,
+ * you can query multiple balance points to obtain the evolution of the Accounting's balance over time.
+ */
+export type AccountingBalancePointJsonld = HydraItemBaseSchema & {
/**
* The start date for items aggregated in this point.
*/
@@ -143,14 +191,32 @@ export type AccountingTransaction = {
* \
* AccountingTransactions are generated for each GatewayCharge in a GatewayCheckout once it becomes successful.
*/
-export type AccountingTransactionJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type AccountingTransactionCsv = {
+ readonly id?: number;
+ /**
+ * The monetary value received at target and issued at origin.
+ */
+ money?: MoneyOutputCsv;
+ /**
+ * The Accounting from which the Transaction comes from.
+ */
+ origin?: string;
+ /**
+ * The Accounting where the Transaction goes to.
+ */
+ target?: string;
+};
+
+/**
+ * AccountingTransactions represent a movement of money from one Accounting (origin) into another (target).\
+ * \
+ * When a transaction targets an Accounting it means that the Accounting receives it, this will add to that Accounting.
+ * When a transaction originates from an Accounting the Accounting issues the transaction and it will deduct from it if,
+ * specially when the transaction comes from a GatewayCharge processed by the `wallet` Gateway.\
+ * \
+ * AccountingTransactions are generated for each GatewayCharge in a GatewayCheckout once it becomes successful.
+ */
+export type AccountingTransactionJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The monetary value received at target and issued at origin.
@@ -201,6 +267,11 @@ export type Address = {
* e.g: ES (Spain).
*/
country?: string;
+ /**
+ * Whether this is the User's default Address. Each User has at most one default Address,
+ * setting it to `true` on one Address unsets it on the rest of the User's Addresses.
+ */
+ isDefault?: boolean;
};
/**
@@ -237,48 +308,16 @@ export type AddressAddressCreationDto = {
* e.g: ES (Spain).
*/
country: string;
+ /**
+ * Whether this is the User's default Address.
+ */
+ isDefault?: boolean | null;
};
/**
* Addresses represent named locations that postal services can reach.
*/
-export type AddressAddressCreationDtoJsonld = {
- user: string;
- /**
- * First name(s) of the person receiving the shipment.
- */
- firstName: string;
- /**
- * Last name(s) of the person receiving the shipment.
- */
- lastName: string;
- /**
- * Line 1: usually street name and number.
- */
- line1: string;
- /**
- * Line 2: additional data like apartment number, door, etc.
- */
- line2?: string | null;
- /**
- * Name of the city, or the lowest-available type of settlement to which the address lines belong.
- */
- city: string;
- /**
- * Postal/PIN/ZIP code to which the address lines belong.
- */
- postCode: string;
- /**
- * ISO 3166-1 alpha-2 two-letter country code.\
- * e.g: ES (Spain).
- */
- country: string;
-};
-
-/**
- * Addresses represent named locations that postal services can reach.
- */
-export type AddressAddressUpdationDto = {
+export type AddressAddressUpdationDtoJsonMergePatch = {
/**
* First name(s) of the person receiving the shipment.
*/
@@ -308,19 +347,16 @@ export type AddressAddressUpdationDto = {
* e.g: ES (Spain).
*/
country?: string | null;
+ /**
+ * Whether this is the User's default Address.
+ */
+ isDefault?: boolean | null;
};
/**
* Addresses represent named locations that postal services can reach.
*/
-export type AddressJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type AddressCsv = {
readonly id?: number;
user?: string;
/**
@@ -352,6 +388,53 @@ export type AddressJsonld = {
* e.g: ES (Spain).
*/
country?: string;
+ /**
+ * Whether this is the User's default Address. Each User has at most one default Address,
+ * setting it to `true` on one Address unsets it on the rest of the User's Addresses.
+ */
+ isDefault?: boolean;
+};
+
+/**
+ * Addresses represent named locations that postal services can reach.
+ */
+export type AddressJsonld = HydraItemBaseSchema & {
+ readonly id?: number;
+ user?: string;
+ /**
+ * First name(s) of the person receiving the shipment.
+ */
+ firstName?: string;
+ /**
+ * Last name(s) of the person receiving the shipment.
+ */
+ lastName?: string;
+ /**
+ * Line 1: usually street name and number.
+ */
+ line1?: string;
+ /**
+ * Line 2: additional data like apartment number, door, etc.
+ */
+ line2?: string | null;
+ /**
+ * Name of the city, or the lowest-available type of settlement to which the address lines belong.
+ */
+ city?: string;
+ /**
+ * Postal/PIN/ZIP code to which the address lines belong.
+ */
+ postCode?: string;
+ /**
+ * ISO 3166-1 alpha-2 two-letter country code.\
+ * e.g: ES (Spain).
+ */
+ country?: string;
+ /**
+ * Whether this is the User's default Address. Each User has at most one default Address,
+ * setting it to `true` on one Address unsets it on the rest of the User's Addresses.
+ */
+ isDefault?: boolean;
};
export type Budget = {
@@ -365,14 +448,18 @@ export type Budget = {
readonly optimum?: BudgetSummary;
};
+export type BudgetCsv = {
+ /**
+ * A summary of the minimum budget. As described by items with specified minimum money.
+ */
+ readonly minimum?: BudgetSummaryCsv;
+ /**
+ * A summary of the optimum, minimum included, budget. As described by items with specified optimum money plus minimum money.
+ */
+ readonly optimum?: BudgetSummaryCsv;
+};
+
export type BudgetJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
/**
* A summary of the minimum budget. As described by items with specified minimum money.
*/
@@ -402,14 +489,26 @@ export type BudgetSummary = {
infra?: MoneyOutput;
};
+export type BudgetSummaryCsv = {
+ /**
+ * The total money by the included items.
+ */
+ money?: MoneyOutputCsv;
+ /**
+ * The total money of type 'task'.
+ */
+ task?: MoneyOutputCsv;
+ /**
+ * The total money of type 'material'.
+ */
+ material?: MoneyOutputCsv;
+ /**
+ * The total money of type 'infrastructure'.
+ */
+ infra?: MoneyOutputCsv;
+};
+
export type BudgetSummaryJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
/**
* The total money by the included items.
*/
@@ -461,14 +560,59 @@ export type Category = {
* Categories can only be modified by users with the role "ROLE_ADMIN", but can usually
* be referenced by non-admin users in their own resources, such as Project owners.
*/
-export type CategoryJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type CategoryCsv = {
+ /**
+ * This value will identify this Category in relationships with other resources.
+ */
+ id?: string;
+ /**
+ * A unique, non white space, string identifier for this Category.
+ */
+ readonly slug?: string;
+ /**
+ * A human-readable self-descriptive string of what this Category is about.
+ */
+ name: string;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+};
+
+/**
+ * A Category, like in books, is a way of grouping resources by type, genre, audience, or subject, for example:
+ * science-fiction, biography, fantasy, etc.\
+ * \
+ * Categories can only be modified by users with the role "ROLE_ADMIN", but can usually
+ * be referenced by non-admin users in their own resources, such as Project owners.
+ */
+export type CategoryJsonMergePatch = {
+ /**
+ * This value will identify this Category in relationships with other resources.
+ */
+ id?: string;
+ /**
+ * A unique, non white space, string identifier for this Category.
+ */
+ readonly slug?: string;
+ /**
+ * A human-readable self-descriptive string of what this Category is about.
+ */
+ name?: string;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+};
+
+/**
+ * A Category, like in books, is a way of grouping resources by type, genre, audience, or subject, for example:
+ * science-fiction, biography, fantasy, etc.\
+ * \
+ * Categories can only be modified by users with the role "ROLE_ADMIN", but can usually
+ * be referenced by non-admin users in their own resources, such as Project owners.
+ */
+export type CategoryJsonld = HydraItemBaseSchema & {
/**
* This value will identify this Category in relationships with other resources.
*/
@@ -515,48 +659,34 @@ export type ChargeCreationDto = {
money: MoneyInput;
};
-export type ChargeCreationDtoJsonld = {
- /**
- * How this item should be processed by the Gateway.\
- * \
- * `single` is for one time payments.\
- * `recurring` is for payments repeated over time.
- */
- type: 'single' | 'recurring';
- /**
- * A short, descriptive string for this charge item.\
- * May be displayed to the payer.
- */
- title: string;
- /**
- * Detailed information about the charge item.\
- * May be displayed to the payer.
- */
- description?: string | null;
- /**
- * The Accounting receiving the money after a successful payment.
- */
- target: string;
- /**
- * The money to-be-paid for this item at the Gateway.
- */
- money: MoneyInputJsonld;
-};
-
/**
* Unprocessable entity
*/
-export type ConstraintViolationJson = {
+export type ConstraintViolation = {
status?: number;
violations?: Array<{
/**
* The property path of the violation
*/
- propertyPath?: string;
+ propertyPath: string;
/**
* The message associated with the violation
*/
- message?: string;
+ message: string;
+ /**
+ * The code of the violation
+ */
+ code?: string;
+ /**
+ * An extra hint to understand the violation
+ */
+ hint?: string;
+ /**
+ * The serialized payload of the violation
+ */
+ payload?: {
+ [key: string]: unknown;
+ };
}>;
readonly detail?: string;
readonly type?: string;
@@ -567,24 +697,31 @@ export type ConstraintViolationJson = {
/**
* Unprocessable entity
*/
-export type ConstraintViolationJsonldJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ConstraintViolationJsonld = HydraItemBaseSchema & {
status?: number;
violations?: Array<{
/**
* The property path of the violation
*/
- propertyPath?: string;
+ propertyPath: string;
/**
* The message associated with the violation
*/
- message?: string;
+ message: string;
+ /**
+ * The code of the violation
+ */
+ code?: string;
+ /**
+ * An extra hint to understand the violation
+ */
+ hint?: string;
+ /**
+ * The serialized payload of the violation
+ */
+ payload?: {
+ [key: string]: unknown;
+ };
}>;
readonly detail?: string;
readonly description?: string;
@@ -602,14 +739,16 @@ export type Conversion = {
provider?: string;
};
+export type ConversionCsv = {
+ rounding?: string;
+ from?: MoneyCsv;
+ to?: MoneyCsv;
+ rate?: number;
+ date?: string;
+ provider?: string;
+};
+
export type ConversionJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
rounding?: string;
from?: MoneyJsonld;
to?: MoneyJsonld;
@@ -630,7 +769,7 @@ export type Error = {
* A human-readable explanation specific to this occurrence of the problem.
*/
readonly detail?: string | null;
- status?: number;
+ status?: number | null;
/**
* A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
*/
@@ -644,14 +783,7 @@ export type Error = {
/**
* A representation of common errors.
*/
-export type ErrorJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ErrorJsonld = HydraItemBaseSchema & {
/**
* A short, human-readable summary of the problem.
*/
@@ -660,7 +792,7 @@ export type ErrorJsonld = {
* A human-readable explanation specific to this occurrence of the problem.
*/
readonly detail?: string | null;
- status?: number;
+ status?: number | null;
/**
* A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
*/
@@ -698,14 +830,26 @@ export type Gateway = {
* These implementations make use of external or internal services to gather the funds that are inside a Transaction,
* perform corroboration of funds and store the Transactions into the system.
*/
-export type GatewayJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type GatewayCsv = {
+ id?: string;
+ /**
+ * The publicly known name of this payment method.
+ */
+ name?: string;
+ /**
+ * The types of GatewayCheckout this Gateway can process.
+ */
+ supports?: Array<'single' | 'recurring'>;
+};
+
+/**
+ * Gateways represent payment services used to perform the necessary payments for Transactions between Accounts.\
+ * \
+ * For each Gateway there is an internal implementation that handles the creation and validation of Transactions between Accounts.
+ * These implementations make use of external or internal services to gather the funds that are inside a Transaction,
+ * perform corroboration of funds and store the Transactions into the system.
+ */
+export type GatewayJsonld = HydraItemBaseSchema & {
id?: string;
/**
* The publicly known name of this payment method.
@@ -762,7 +906,7 @@ export type GatewayCharge = {
/**
* A Charge represents a payment item to be included in a Checkout for payment at a Gateway.
*/
-export type GatewayChargeChargeUpdationDto = {
+export type GatewayChargeChargeUpdationDtoJsonMergePatch = {
/**
* The unique identifier for the GatewayCharge.
*/
@@ -790,9 +934,21 @@ export type GatewayChargeChargesTotalsDto = {
/**
* A Charge represents a payment item to be included in a Checkout for payment at a Gateway.
*/
-export type GatewayChargeChargesTotalsDtoJsonld = {
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type GatewayChargeChargesTotalsDtoCsv = {
+ /**
+ * The number of distinct Projects targeted by the charges matching the filter set.
+ */
+ projects?: number;
+ /**
+ * The aggregated monetary value in the charges.
+ */
+ money?: TotalizedMoneyCsv;
+};
+
+/**
+ * A Charge represents a payment item to be included in a Checkout for payment at a Gateway.
+ */
+export type GatewayChargeChargesTotalsDtoJsonld = HydraItemBaseSchema & {
/**
* The number of distinct Projects targeted by the charges matching the filter set.
*/
@@ -806,14 +962,49 @@ export type GatewayChargeChargesTotalsDtoJsonld = {
/**
* A Charge represents a payment item to be included in a Checkout for payment at a Gateway.
*/
-export type GatewayChargeJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type GatewayChargeCsv = {
+ readonly id?: number | null;
+ /**
+ * The Checkout to which this Charge item belongs to.
+ */
+ checkout?: string;
+ /**
+ * How this item should be processed by the Gateway.\
+ * \
+ * `single` is for one time payments.\
+ * `recurring` is for payments repeated over time.
+ */
+ type: 'single' | 'recurring';
+ /**
+ * A short, descriptive string for this charge item.\
+ * May be displayed to the payer.
+ */
+ title: string;
+ /**
+ * Detailed information about the charge item.\
+ * May be displayed to the payer.
+ */
+ description?: string | null;
+ /**
+ * The Accounting receiving the money after a successful payment.
+ */
+ target: string;
+ /**
+ * The money to-be-paid for this item at the Gateway.
+ */
+ money: MoneyOutputCsv;
+ /**
+ * The status of the charge item with the Gateway.
+ */
+ readonly status?: 'to_charge' | 'in_charge' | 'to_refund' | 'refunded' | 'to_wallet' | 'walleted';
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * A Charge represents a payment item to be included in a Checkout for payment at a Gateway.
+ */
+export type GatewayChargeJsonld = HydraItemBaseSchema & {
readonly id?: number | null;
/**
* The Checkout to which this Charge item belongs to.
@@ -932,7 +1123,20 @@ export type GatewayCheckoutCheckoutCreationDto = {
/**
* A GatewayCheckout represents a payment session with a Gateway.
*/
-export type GatewayCheckoutCheckoutCreationDtoJsonld = {
+export type GatewayCheckoutCheckoutUpdationDtoJsonMergePatch = {
+ readonly id?: number;
+ /**
+ * The strategy chosen by the User to decide where the money will go to
+ * in the event that one Charge needs to be returned.
+ */
+ refund?: 'to_wallet' | 'to_gateway';
+};
+
+/**
+ * A GatewayCheckout represents a payment session with a Gateway.
+ */
+export type GatewayCheckoutCsv = {
+ readonly id?: number;
/**
* The desired Gateway to checkout with.
*/
@@ -944,7 +1148,7 @@ export type GatewayCheckoutCheckoutCreationDtoJsonld = {
/**
* A list of the payment items to be charged to the origin.
*/
- charges: Array;
+ charges: Array;
/**
* Gateways will redirect the user back to the v4 API,
* which will then redirect the user to this address.\
@@ -958,31 +1162,26 @@ export type GatewayCheckoutCheckoutCreationDtoJsonld = {
* in the event that one Charge needs to be returned.
*/
refund?: 'to_wallet' | 'to_gateway';
-};
-
-/**
- * A GatewayCheckout represents a payment session with a Gateway.
- */
-export type GatewayCheckoutCheckoutUpdationDto = {
- readonly id?: number;
/**
- * The strategy chosen by the User to decide where the money will go to
- * in the event that one Charge needs to be returned.
+ * The status of this Checkout, as confirmed by the Gateway.
*/
- refund?: 'to_wallet' | 'to_gateway';
+ readonly status?: 'to_charge' | 'charged';
+ /**
+ * A list of related hyperlinks, as provided by the Gateway.
+ */
+ readonly links?: Array;
+ /**
+ * A list of related tracking codes and numbers, as provided by the Gateway.
+ */
+ readonly trackings?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
};
/**
* A GatewayCheckout represents a payment session with a Gateway.
*/
-export type GatewayCheckoutJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type GatewayCheckoutJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The desired Gateway to checkout with.
@@ -1050,14 +1249,7 @@ export type GatewayLink = {
readonly org?: 'instagram' | 'facebook' | 'github' | 'linkedin' | 'identica' | 'unknown';
};
-export type GatewayLinkJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type GatewayLinkCsv = {
/**
* The HTTP method required to make the related call.
*/
@@ -1082,6 +1274,67 @@ export type GatewayLinkJsonld = {
readonly org?: 'instagram' | 'facebook' | 'github' | 'linkedin' | 'identica' | 'unknown';
};
+export type GatewayLinkJsonld = {
+ /**
+ * The HTTP method required to make the related call.
+ */
+ method?: string;
+ /**
+ * The type of the link indicates who is the intended user of a link.\
+ * `debug` links are for developers and platform maintainers to get useful information about the checkout.\
+ * `payment` links are for end-users who must visit this link to complete the checkout.
+ */
+ type?: 'debug' | 'payment';
+ /**
+ * The complete target URL.
+ */
+ url?: string;
+ /**
+ * The link relation type, which serves as an ID for a link that unambiguously describes the semantics of the link.
+ */
+ rel?: string | null;
+ /**
+ * The known organization behind this link.
+ */
+ readonly org?: 'instagram' | 'facebook' | 'github' | 'linkedin' | 'identica' | 'unknown';
+};
+
+export type HydraCollectionBaseSchema = HydraCollectionBaseSchemaNoPagination & {
+ view?: {
+ '@id'?: string;
+ '@type'?: string;
+ first?: string | null;
+ last?: string | null;
+ previous?: string | null;
+ next?: string | null;
+ };
+};
+
+export type HydraCollectionBaseSchemaNoPagination = {
+ totalItems?: number;
+ search?: {
+ '@type'?: string;
+ template?: string;
+ variableRepresentation?: string;
+ mapping?: Array<{
+ '@type'?: string;
+ variable?: string;
+ property?: string | null;
+ required?: boolean;
+ }>;
+ };
+};
+
+export type HydraItemBaseSchema = {
+ '@context'?: string | {
+ '@vocab': string;
+ hydra: 'http://www.w3.org/ns/hydra/core#';
+ [key: string]: unknown;
+ };
+ '@id': string;
+ '@type': string;
+};
+
export type Link = {
/**
* The complete target URL.
@@ -1097,14 +1350,22 @@ export type Link = {
readonly org?: 'instagram' | 'facebook' | 'github' | 'linkedin' | 'identica' | 'unknown';
};
+export type LinkCsv = {
+ /**
+ * The complete target URL.
+ */
+ url?: string;
+ /**
+ * The link relation type, which serves as an ID for a link that unambiguously describes the semantics of the link.
+ */
+ rel?: string | null;
+ /**
+ * The known organization behind this link.
+ */
+ readonly org?: 'instagram' | 'facebook' | 'github' | 'linkedin' | 'identica' | 'unknown';
+};
+
export type LinkJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
/**
* The complete target URL.
*/
@@ -1185,14 +1446,109 @@ export type MatchCall = {
* which is a predefined implementation for common mathematical operations used to match money.
* The formula is fine-tuned in the strategy by defining the variables in the formula.
*/
-export type MatchCallJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type MatchCallCsv = {
+ readonly id?: number;
+ /**
+ * The Accounting which holds and spends the funds for this MatchCall.
+ */
+ readonly accounting?: string;
+ /**
+ * The MatchStrategies define the matching behaviour for this MatchCall.
+ */
+ readonly strategies?: Array;
+ /**
+ * A list of the MatchCallSubmissions received by this MatchCall.
+ */
+ readonly submissions?: Array;
+ /**
+ * A list of Users who can modify this MatchCall.
+ */
+ managers?: Array;
+ /**
+ * Main display title.
+ */
+ title: string;
+ /**
+ * Long-form secondary display text.
+ */
+ description?: string;
+ /**
+ * Codes for the territory of interest in this MatchCall.
+ */
+ territory: TerritoryCsv;
+ /**
+ * The current status of the MatchCall.
+ */
+ status?: 'in_editing' | 'in_calling' | 'in_matchmaking' | 'to_closed' | 'closed';
+};
+
+/**
+ * A MatchCall is a managed event which accepts MatchCallSubmissions from Projects to receive *matchfunding* financement.
+ * This means money going to a Project in a MatchCall can be matched with funds from the MatchCall accounting.
+ * \
+ * \
+ * MatchCallSubmissions from Projects can be accepted or rejected by the managers.
+ * \
+ * \
+ * How and when does a MatchCall match funds is determined by the MatchStrategy.
+ * Everytime there is a Charge item going to a Project accepted in a MatchCall the strategy is evaluated for matching.
+ * The strategy defines a series of rules that determine if the Charge is eligible for triggering the matching of funds.
+ * When a Charge is to be matched the strategy uses a MatchFormula,
+ * which is a predefined implementation for common mathematical operations used to match money.
+ * The formula is fine-tuned in the strategy by defining the variables in the formula.
+ */
+export type MatchCallJsonMergePatch = {
+ readonly id?: number;
+ /**
+ * The Accounting which holds and spends the funds for this MatchCall.
+ */
+ readonly accounting?: string;
+ /**
+ * The MatchStrategies define the matching behaviour for this MatchCall.
+ */
+ readonly strategies?: Array;
+ /**
+ * A list of the MatchCallSubmissions received by this MatchCall.
+ */
+ readonly submissions?: Array;
+ /**
+ * A list of Users who can modify this MatchCall.
+ */
+ managers?: Array;
+ /**
+ * Main display title.
+ */
+ title?: string;
+ /**
+ * Long-form secondary display text.
+ */
+ description?: string;
+ /**
+ * Codes for the territory of interest in this MatchCall.
+ */
+ territory?: Territory;
+ /**
+ * The current status of the MatchCall.
+ */
+ status?: 'in_editing' | 'in_calling' | 'in_matchmaking' | 'to_closed' | 'closed';
+};
+
+/**
+ * A MatchCall is a managed event which accepts MatchCallSubmissions from Projects to receive *matchfunding* financement.
+ * This means money going to a Project in a MatchCall can be matched with funds from the MatchCall accounting.
+ * \
+ * \
+ * MatchCallSubmissions from Projects can be accepted or rejected by the managers.
+ * \
+ * \
+ * How and when does a MatchCall match funds is determined by the MatchStrategy.
+ * Everytime there is a Charge item going to a Project accepted in a MatchCall the strategy is evaluated for matching.
+ * The strategy defines a series of rules that determine if the Charge is eligible for triggering the matching of funds.
+ * When a Charge is to be matched the strategy uses a MatchFormula,
+ * which is a predefined implementation for common mathematical operations used to match money.
+ * The formula is fine-tuned in the strategy by defining the variables in the formula.
+ */
+export type MatchCallJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The Accounting which holds and spends the funds for this MatchCall.
@@ -1265,28 +1621,47 @@ export type MatchCallSubmissionMatchCallSubmissionCreationDto = {
/**
* MatchCallSubmissions represent the will of a Project to be held under a MatchCall and receive matchfunding financement.
*/
-export type MatchCallSubmissionMatchCallSubmissionCreationDtoJsonld = {
+export type MatchCallSubmissionCsv = {
+ readonly id?: number;
/**
* The MatchCall to which this MatchCallSubmission belongs to.
*/
- call: string;
+ readonly call?: string;
/**
* The Project that applied for the MatchCall.
*/
- project: string;
+ readonly project?: string;
+ /**
+ * The status of the Project's application for the MatchCall.\
+ * Only MatchCallSubmissions with an status `accepted` will receive matchfunding.
+ */
+ status?: 'to_review' | 'in_review' | 'accepted' | 'rejected';
};
/**
* MatchCallSubmissions represent the will of a Project to be held under a MatchCall and receive matchfunding financement.
*/
-export type MatchCallSubmissionJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type MatchCallSubmissionJsonMergePatch = {
+ readonly id?: number;
+ /**
+ * The MatchCall to which this MatchCallSubmission belongs to.
+ */
+ readonly call?: string;
+ /**
+ * The Project that applied for the MatchCall.
+ */
+ readonly project?: string;
+ /**
+ * The status of the Project's application for the MatchCall.\
+ * Only MatchCallSubmissions with an status `accepted` will receive matchfunding.
+ */
+ status?: 'to_review' | 'in_review' | 'accepted' | 'rejected';
+};
+
+/**
+ * MatchCallSubmissions represent the will of a Project to be held under a MatchCall and receive matchfunding financement.
+ */
+export type MatchCallSubmissionJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The MatchCall to which this MatchCallSubmission belongs to.
@@ -1319,14 +1694,19 @@ export type MatchFormula = {
* A MatchFormula is a predefined code implementation for matching funds in Transactions under a MatchCall.
* MatchFormulas can be chosen by the managers in a MatchCall and their behaviour fine-tuned.
*/
-export type MatchFormulaJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type MatchFormulaCsv = {
+ readonly name?: string;
+ /**
+ * The underlying math expressed as a common-notation formula.
+ */
+ readonly expression?: string;
+};
+
+/**
+ * A MatchFormula is a predefined code implementation for matching funds in Transactions under a MatchCall.
+ * MatchFormulas can be chosen by the managers in a MatchCall and their behaviour fine-tuned.
+ */
+export type MatchFormulaJsonld = HydraItemBaseSchema & {
readonly name?: string;
/**
* The underlying math expressed as a common-notation formula.
@@ -1350,14 +1730,19 @@ export type MatchRule = {
* A MatchRule is a predefined code implementation for validating
* that a match making condition is met when there is a Charge to be matched.
*/
-export type MatchRuleJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type MatchRuleCsv = {
+ readonly name?: string;
+ /**
+ * A plain-text description about what the rules validates for.
+ */
+ readonly description?: string;
+};
+
+/**
+ * A MatchRule is a predefined code implementation for validating
+ * that a match making condition is met when there is a Charge to be matched.
+ */
+export type MatchRuleJsonld = HydraItemBaseSchema & {
readonly name?: string;
/**
* A plain-text description about what the rules validates for.
@@ -1422,14 +1807,101 @@ export type MatchStrategy = {
* 3. The first valid MatchStrategy's formula function is passed the respective limit, factor and money of the MatchAgainst.
* 4. The result of the MatchStrategy formula function execution is put in a Transaction from the MatchCall to the Project.
*/
-export type MatchStrategyJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type MatchStrategyCsv = {
+ readonly id?: number;
+ /**
+ * The MatchCall to which this strategy belongs to.
+ */
+ call: string;
+ /**
+ * The ranking is the index order of this strategy among the others of the MatchCall
+ * when this is up for match making. The ranking value of items will be sorted
+ * after each change in the number of strategies or the ranking values.
+ */
+ ranking?: number;
+ /**
+ * The MatchRules used to decide if the match making strategy should be executed or not.
+ */
+ rules?: Array;
+ /**
+ * The MatchFormula used to calculate matched funds.
+ */
+ formula: string;
+ /**
+ * The assigned maximum amount of funding that will be given by the MatchFormula per operation.
+ */
+ limit: MoneyInputCsv;
+ /**
+ * The `x` factor used to calculate the resulting match of funds with the MatchFormula.
+ */
+ factor: number;
+ /**
+ * The money to be matched by the formula is
+ * - `charge` the money in the Charge item
+ * - `budget_min` the minimum in the Project's budget
+ * - `budget_opt` the optimum in the Project's budget.
+ */
+ against?: 'charge' | 'budget_min' | 'budget_opt';
+};
+
+/**
+ * A MatchStrategy defines how will a MatchCall perform the match-making process.
+ * \
+ * The match-making flow is:
+ * 1. A Project accepted in a MatchCall receives a successful Charge.
+ * 2. The match-making loads the MatchCall's MatchStrategies.
+ * 3. For each MatchStrategy the rules are executed, if one rule fails the match-making is cancelled for the strategy.
+ * 3. The first valid MatchStrategy's formula function is passed the respective limit, factor and money of the MatchAgainst.
+ * 4. The result of the MatchStrategy formula function execution is put in a Transaction from the MatchCall to the Project.
+ */
+export type MatchStrategyJsonMergePatch = {
+ readonly id?: number;
+ /**
+ * The MatchCall to which this strategy belongs to.
+ */
+ call?: string;
+ /**
+ * The ranking is the index order of this strategy among the others of the MatchCall
+ * when this is up for match making. The ranking value of items will be sorted
+ * after each change in the number of strategies or the ranking values.
+ */
+ ranking?: number;
+ /**
+ * The MatchRules used to decide if the match making strategy should be executed or not.
+ */
+ rules?: Array;
+ /**
+ * The MatchFormula used to calculate matched funds.
+ */
+ formula?: string;
+ /**
+ * The assigned maximum amount of funding that will be given by the MatchFormula per operation.
+ */
+ limit?: MoneyInput;
+ /**
+ * The `x` factor used to calculate the resulting match of funds with the MatchFormula.
+ */
+ factor?: number;
+ /**
+ * The money to be matched by the formula is
+ * - `charge` the money in the Charge item
+ * - `budget_min` the minimum in the Project's budget
+ * - `budget_opt` the optimum in the Project's budget.
+ */
+ against?: 'charge' | 'budget_min' | 'budget_opt';
+};
+
+/**
+ * A MatchStrategy defines how will a MatchCall perform the match-making process.
+ * \
+ * The match-making flow is:
+ * 1. A Project accepted in a MatchCall receives a successful Charge.
+ * 2. The match-making loads the MatchCall's MatchStrategies.
+ * 3. For each MatchStrategy the rules are executed, if one rule fails the match-making is cancelled for the strategy.
+ * 3. The first valid MatchStrategy's formula function is passed the respective limit, factor and money of the MatchAgainst.
+ * 4. The result of the MatchStrategy formula function execution is put in a Transaction from the MatchCall to the Project.
+ */
+export type MatchStrategyJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The MatchCall to which this strategy belongs to.
@@ -1472,14 +1944,13 @@ export type Money = {
conversion?: Conversion | null;
};
+export type MoneyCsv = {
+ amount?: number;
+ currency?: string;
+ conversion?: ConversionCsv | null;
+};
+
export type MoneyJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
amount?: number;
currency?: string;
conversion?: ConversionJsonld | null;
@@ -1497,14 +1968,19 @@ export type MoneyInput = {
currency: string;
};
+export type MoneyInputCsv = {
+ /**
+ * An amount of currency.\
+ * Expressed as the minor unit, e.g: cents, pennies, etc.
+ */
+ amount: number;
+ /**
+ * 3-letter ISO 4217 currency code.
+ */
+ currency: string;
+};
+
export type MoneyInputJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
/**
* An amount of currency.\
* Expressed as the minor unit, e.g: cents, pennies, etc.
@@ -1532,14 +2008,23 @@ export type MoneyOutput = {
conversion?: Conversion | null;
};
+export type MoneyOutputCsv = {
+ /**
+ * An amount of currency.\
+ * Expressed as the minor unit, e.g: cents, pennies, etc.
+ */
+ amount: number;
+ /**
+ * 3-letter ISO 4217 currency code.
+ */
+ currency: string;
+ /**
+ * Conversion metadata.
+ */
+ conversion?: ConversionCsv | null;
+};
+
export type MoneyOutputJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
/**
* An amount of currency.\
* Expressed as the minor unit, e.g: cents, pennies, etc.
@@ -1581,6 +2066,18 @@ export type Organization = {
* Will be used as display name for the User when present.
*/
businessName?: string;
+ /**
+ * The kind of document the tax ID belongs to.
+ */
+ taxIdType?: 'national_id' | 'passport' | 'other' | null;
+ /**
+ * Legal form under which the organization is constituted.
+ */
+ legalForm?: 'association' | 'foundation' | 'cooperative' | 'company' | 'self_employed' | 'public_administration' | 'other' | null;
+ /**
+ * Is the organization a public entity? e.g: city councils, public universities, etc.
+ */
+ publicEntity?: boolean;
};
/**
@@ -1591,14 +2088,7 @@ export type Organization = {
* All Organization records are only visible to their respective owners and platform admins.
* Sensitive data is encrypted before being stored in the database.
*/
-export type OrganizationJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type OrganizationCsv = {
readonly user?: string;
/**
* Organization ID for tax purposes. e.g: NIF (formerly CIF), Umsatzsteuer-Id, EID, etc.
@@ -1616,6 +2106,98 @@ export type OrganizationJsonld = {
* Will be used as display name for the User when present.
*/
businessName?: string;
+ /**
+ * The kind of document the tax ID belongs to.
+ */
+ taxIdType?: 'national_id' | 'passport' | 'other' | null;
+ /**
+ * Legal form under which the organization is constituted.
+ */
+ legalForm?: 'association' | 'foundation' | 'cooperative' | 'company' | 'self_employed' | 'public_administration' | 'other' | null;
+ /**
+ * Is the organization a public entity? e.g: city councils, public universities, etc.
+ */
+ publicEntity?: boolean;
+};
+
+/**
+ * Sometimes an Organization is behind a User account,
+ * we keep their data separated from the User record to allow for other User types,
+ * like the ones owned by an individual, to exist all at the same level.\
+ * \
+ * All Organization records are only visible to their respective owners and platform admins.
+ * Sensitive data is encrypted before being stored in the database.
+ */
+export type OrganizationJsonMergePatch = {
+ readonly user?: string;
+ /**
+ * Organization ID for tax purposes. e.g: NIF (formerly CIF), Umsatzsteuer-Id, EID, etc.
+ */
+ taxId?: string;
+ /**
+ * Organization legal name before government,
+ * as it appears on legal documents issued by or for this organization.\
+ * Will be used as last option for the display name of the User.
+ */
+ legalName?: string;
+ /**
+ * The name under which the organization presents itself.\
+ * Might be similar to the legal name or completely different.\
+ * Will be used as display name for the User when present.
+ */
+ businessName?: string;
+ /**
+ * The kind of document the tax ID belongs to.
+ */
+ taxIdType?: 'national_id' | 'passport' | 'other' | null;
+ /**
+ * Legal form under which the organization is constituted.
+ */
+ legalForm?: 'association' | 'foundation' | 'cooperative' | 'company' | 'self_employed' | 'public_administration' | 'other' | null;
+ /**
+ * Is the organization a public entity? e.g: city councils, public universities, etc.
+ */
+ publicEntity?: boolean;
+};
+
+/**
+ * Sometimes an Organization is behind a User account,
+ * we keep their data separated from the User record to allow for other User types,
+ * like the ones owned by an individual, to exist all at the same level.\
+ * \
+ * All Organization records are only visible to their respective owners and platform admins.
+ * Sensitive data is encrypted before being stored in the database.
+ */
+export type OrganizationJsonld = HydraItemBaseSchema & {
+ readonly user?: string;
+ /**
+ * Organization ID for tax purposes. e.g: NIF (formerly CIF), Umsatzsteuer-Id, EID, etc.
+ */
+ taxId: string;
+ /**
+ * Organization legal name before government,
+ * as it appears on legal documents issued by or for this organization.\
+ * Will be used as last option for the display name of the User.
+ */
+ legalName: string;
+ /**
+ * The name under which the organization presents itself.\
+ * Might be similar to the legal name or completely different.\
+ * Will be used as display name for the User when present.
+ */
+ businessName?: string;
+ /**
+ * The kind of document the tax ID belongs to.
+ */
+ taxIdType?: 'national_id' | 'passport' | 'other' | null;
+ /**
+ * Legal form under which the organization is constituted.
+ */
+ legalForm?: 'association' | 'foundation' | 'cooperative' | 'company' | 'self_employed' | 'public_administration' | 'other' | null;
+ /**
+ * Is the organization a public entity? e.g: city councils, public universities, etc.
+ */
+ publicEntity?: boolean;
};
/**
@@ -1642,6 +2224,18 @@ export type Person = {
* in most western conventions this is the family name(s). e.g: Smith, Herrera, etc.
*/
lastName?: string;
+ /**
+ * The kind of document the tax ID belongs to.
+ */
+ taxIdType?: 'national_id' | 'passport' | 'other' | null;
+ /**
+ * Year of birth of the person. e.g: 1990.
+ */
+ birthYear?: number | null;
+ /**
+ * Gender of the person.
+ */
+ gender?: 'female' | 'male' | 'non_binary' | 'other' | null;
};
/**
@@ -1652,14 +2246,7 @@ export type Person = {
* All Person records are only visible to their respective owners and platform admins.
* Sensitive personal data is encrypted before being stored in the database.
*/
-export type PersonJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type PersonCsv = {
readonly user?: string;
/**
* Personal ID for tax purposes. e.g: NIF, Steuer-ID, SSN, ITIN, etc.
@@ -1675,6 +2262,94 @@ export type PersonJsonld = {
* in most western conventions this is the family name(s). e.g: Smith, Herrera, etc.
*/
lastName?: string;
+ /**
+ * The kind of document the tax ID belongs to.
+ */
+ taxIdType?: 'national_id' | 'passport' | 'other' | null;
+ /**
+ * Year of birth of the person. e.g: 1990.
+ */
+ birthYear?: number | null;
+ /**
+ * Gender of the person.
+ */
+ gender?: 'female' | 'male' | 'non_binary' | 'other' | null;
+};
+
+/**
+ * Most times a real person is behind a User account,
+ * we keep their data separated from the User record to allow for other User types,
+ * like the ones owned by an organization, to exist all at the same level.\
+ * \
+ * All Person records are only visible to their respective owners and platform admins.
+ * Sensitive personal data is encrypted before being stored in the database.
+ */
+export type PersonJsonMergePatch = {
+ readonly user?: string;
+ /**
+ * Personal ID for tax purposes. e.g: NIF, Steuer-ID, SSN, ITIN, etc.
+ */
+ taxId?: string;
+ /**
+ * First-part of the name of the person,
+ * in most western conventions this is the given name(s). e.g: John, Juan, etc.
+ */
+ firstName?: string;
+ /**
+ * Last-part of the name of the person,
+ * in most western conventions this is the family name(s). e.g: Smith, Herrera, etc.
+ */
+ lastName?: string;
+ /**
+ * The kind of document the tax ID belongs to.
+ */
+ taxIdType?: 'national_id' | 'passport' | 'other' | null;
+ /**
+ * Year of birth of the person. e.g: 1990.
+ */
+ birthYear?: number | null;
+ /**
+ * Gender of the person.
+ */
+ gender?: 'female' | 'male' | 'non_binary' | 'other' | null;
+};
+
+/**
+ * Most times a real person is behind a User account,
+ * we keep their data separated from the User record to allow for other User types,
+ * like the ones owned by an organization, to exist all at the same level.\
+ * \
+ * All Person records are only visible to their respective owners and platform admins.
+ * Sensitive personal data is encrypted before being stored in the database.
+ */
+export type PersonJsonld = HydraItemBaseSchema & {
+ readonly user?: string;
+ /**
+ * Personal ID for tax purposes. e.g: NIF, Steuer-ID, SSN, ITIN, etc.
+ */
+ taxId?: string;
+ /**
+ * First-part of the name of the person,
+ * in most western conventions this is the given name(s). e.g: John, Juan, etc.
+ */
+ firstName?: string;
+ /**
+ * Last-part of the name of the person,
+ * in most western conventions this is the family name(s). e.g: Smith, Herrera, etc.
+ */
+ lastName?: string;
+ /**
+ * The kind of document the tax ID belongs to.
+ */
+ taxIdType?: 'national_id' | 'passport' | 'other' | null;
+ /**
+ * Year of birth of the person. e.g: 1990.
+ */
+ birthYear?: number | null;
+ /**
+ * Gender of the person.
+ */
+ gender?: 'female' | 'male' | 'non_binary' | 'other' | null;
};
export type Ping = {
@@ -1685,14 +2360,15 @@ export type Ping = {
message?: string;
};
-export type PingJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type PingCsv = {
+ /**
+ * The req-res time difference in milliseconds.
+ */
+ time?: number;
+ message?: string;
+};
+
+export type PingJsonld = HydraItemBaseSchema & {
/**
* The req-res time difference in milliseconds.
*/
@@ -1843,38 +2519,7 @@ export type ProjectProjectCreationDto = {
/**
* Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
*/
-export type ProjectProjectCreationDtoJsonld = {
- /**
- * Main headline for the Project. Must include at least one character between a-Z.
- */
- title: string;
- /**
- * Secondary headline for the Project.
- */
- subtitle: string;
- /**
- * List of Categories.
- */
- categories: Array;
- /**
- * List of Themes.
- */
- themes?: Array;
- /**
- * ISO 3166 data about the Project's territory of interest.
- */
- territory: TerritoryJsonld;
- /**
- * Deadlines and important Project dates.
- */
- calendar: ProjectCalendarJsonld;
- readonly status?: 'in_draft' | 'to_campaign_review' | 'in_campaign_review' | 'in_campaign_review.to_change' | 'in_campaign_review.to_review' | 'campaign_review.rejected' | 'to_campaign' | 'in_campaign' | 'campaign.failed' | 'campaign.cancelled' | 'to_funding_review' | 'in_funding_review' | 'in_funding_review.to_change' | 'in_funding_review.to_review' | 'funding_review.rejected' | 'to_funding' | 'in_funding' | 'funding.paid';
-};
-
-/**
- * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
- */
-export type ProjectProjectUpdationDto = {
+export type ProjectProjectUpdationDtoJsonMergePatch = {
readonly id?: number;
/**
* Main headline for the Project.
@@ -1939,14 +2584,143 @@ export type ProjectProjectUpdationDto = {
/**
* Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
*/
-export type ProjectJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectTotalizedMoney = {
+ amount?: number;
+ currency?: string;
+ length?: number;
+};
+
+/**
+ * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
+ */
+export type ProjectTotalizedMoneyCsv = {
+ amount?: number;
+ currency?: string;
+ length?: number;
+};
+
+/**
+ * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
+ */
+export type ProjectTotalizedMoneyJsonld = HydraItemBaseSchema & {
+ amount?: number;
+ currency?: string;
+ length?: number;
+};
+
+/**
+ * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
+ */
+export type ProjectCsv = {
+ readonly id?: number;
+ /**
+ * A unique, non white space, string identifier for this Project.
+ */
+ readonly slug?: string;
+ /**
+ * The Accounting holding the funds raised by this Project.
+ */
+ readonly accounting?: string;
+ /**
+ * The User who owns this Project.
+ */
+ readonly owner?: string;
+ /**
+ * Main headline for the Project.
+ */
+ title: string;
+ /**
+ * Secondary headline for the Project.
+ */
+ subtitle: string;
+ /**
+ * URL to an image resource to be displayed as header.
+ */
+ cover?: string;
+ /**
+ * On `minimum`, Project will campaign until the minimum deadline.\
+ * On `optimum`, Project will campaing until the minimum deadline,
+ * and then until the optimum deadline if it did raise the minimum.
+ */
+ readonly deadline?: 'minimum' | 'optimum';
+ /**
+ * Deadlines and important Project dates.
+ */
+ readonly calendar?: ProjectCalendarCsv;
+ /**
+ * A list of the available Categories of this Project.
+ */
+ categories: Array;
+ /**
+ * A list of the available Themes of this Project.
+ */
+ themes: Array;
+ /**
+ * ISO 3166 data about the Project's territory of interest.
+ */
+ territory: TerritoryCsv;
+ /**
+ * Rich-text (markdown) introduction to the project.
+ */
+ descBrief?: string;
+ /**
+ * Rich-text (markdown) description on the main features of the project.
+ */
+ descAbout?: string;
+ /**
+ * Rich-text (markdown) about why this project is important.
+ */
+ descGoal?: string;
+ /**
+ * Rich-text (markdown) about team and previous experience.
+ */
+ descTeam?: string;
+ /**
+ * Extracted embedding data from the Project's video.
+ */
+ readonly video?: ProjectVideoCsv;
+ /**
+ * The status of a Project represents how far it is in it's life-cycle.
+ */
+ status?: 'in_draft' | 'to_campaign_review' | 'in_campaign_review' | 'in_campaign_review.to_change' | 'in_campaign_review.to_review' | 'campaign_review.rejected' | 'to_campaign' | 'in_campaign' | 'campaign.failed' | 'campaign.cancelled' | 'to_funding_review' | 'in_funding_review' | 'in_funding_review.to_change' | 'in_funding_review.to_review' | 'funding_review.rejected' | 'to_funding' | 'in_funding' | 'funding.paid';
+ /**
+ * List of the ProjectRewards this Project offers.
+ */
+ readonly rewards?: Array;
+ /**
+ * A detailed breakdown of the budget for this Project, as described by the associated BudgetItems.
+ */
+ readonly budget?: BudgetCsv;
+ /**
+ * A list of the BudgetItems composing the budget of this Project.
+ */
+ readonly budgetItems?: Array;
+ /**
+ * A list of the ProjectCollaborations this Project has.
+ */
+ readonly collaborations?: Array;
+ /**
+ * A list of the ProjectUpdates this Project has.
+ */
+ readonly updates?: Array;
+ readonly matchCallSubmissions?: Array;
+ /**
+ * A list of URLs related to the Project.\
+ * e.g: social profiles, project website.
+ */
+ readonly links?: Array;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
+ */
+export type ProjectJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* A unique, non white space, string identifier for this Project.
@@ -2091,14 +2865,75 @@ export type ProjectBudgetItem = {
* \
* Each BudgetItem describes one specific monetary necessity. The total budget of a Project is then calculated from the related BudgetItems.
*/
-export type ProjectBudgetItemJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectBudgetItemCsv = {
+ readonly id?: number;
+ project: string;
+ /**
+ * The type of need this item solves.
+ */
+ type: 'infrastructure' | 'material' | 'task';
+ /**
+ * A short, descriptive string for the item.
+ */
+ title: string;
+ /**
+ * Detailed information about the item.
+ */
+ description: string;
+ /**
+ * The amount of money required for this item.
+ */
+ money: MoneyInputCsv;
+ /**
+ * Defines the budget category for this item within the project.
+ */
+ deadline: 'minimum' | 'optimum';
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+};
+
+/**
+ * A Project's budget is composed via BudgetItem records.\
+ * \
+ * Each BudgetItem describes one specific monetary necessity. The total budget of a Project is then calculated from the related BudgetItems.
+ */
+export type ProjectBudgetItemJsonMergePatch = {
+ readonly id?: number;
+ project?: string;
+ /**
+ * The type of need this item solves.
+ */
+ type?: 'infrastructure' | 'material' | 'task';
+ /**
+ * A short, descriptive string for the item.
+ */
+ title?: string;
+ /**
+ * Detailed information about the item.
+ */
+ description?: string;
+ /**
+ * The amount of money required for this item.
+ */
+ money?: MoneyInput;
+ /**
+ * Defines the budget category for this item within the project.
+ */
+ deadline?: 'minimum' | 'optimum';
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+};
+
+/**
+ * A Project's budget is composed via BudgetItem records.\
+ * \
+ * Each BudgetItem describes one specific monetary necessity. The total budget of a Project is then calculated from the related BudgetItems.
+ */
+export type ProjectBudgetItemJsonld = HydraItemBaseSchema & {
readonly id?: number;
project: string;
/**
@@ -2144,14 +2979,24 @@ export type ProjectCalendar = {
optimum?: string | null;
};
+export type ProjectCalendarCsv = {
+ /**
+ * Public campaign start date.
+ */
+ release: string | null;
+ /**
+ * The minimum budget must be raised by the end of this date,
+ * failure to do so will move the Project out of status `in_campaign` into status `unfunded`.
+ */
+ minimum?: string | null;
+ /**
+ * If the Project achieved their minimum budget by the minimum deadline,
+ * and this deadline is defined, it may still remain `in_campaign` to raise the optimum.
+ */
+ optimum?: string | null;
+};
+
export type ProjectCalendarJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
/**
* Public campaign start date.
*/
@@ -2200,14 +3045,65 @@ export type ProjectCollaboration = {
/**
* ProjectCollaborations are used as requests for help on specific problems that the Project might face and cannot be budgeted-in.
*/
-export type ProjectCollaborationJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectCollaborationCsv = {
+ readonly id?: number;
+ /**
+ * The Project which requests this collaboration.
+ */
+ project: string;
+ /**
+ * A short, descriptive title for this collaboration.
+ */
+ title: string;
+ /**
+ * Information about this collaboration. More detailed than the title.
+ */
+ description: string;
+ /**
+ * Wether or not the collaboration's problem has been solved.
+ */
+ isFulfilled: boolean;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * ProjectCollaborations are used as requests for help on specific problems that the Project might face and cannot be budgeted-in.
+ */
+export type ProjectCollaborationJsonMergePatch = {
+ readonly id?: number;
+ /**
+ * The Project which requests this collaboration.
+ */
+ project?: string;
+ /**
+ * A short, descriptive title for this collaboration.
+ */
+ title?: string;
+ /**
+ * Information about this collaboration. More detailed than the title.
+ */
+ description?: string;
+ /**
+ * Wether or not the collaboration's problem has been solved.
+ */
+ isFulfilled?: boolean;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * ProjectCollaborations are used as requests for help on specific problems that the Project might face and cannot be budgeted-in.
+ */
+export type ProjectCollaborationJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The Project which requests this collaboration.
@@ -2261,14 +3157,57 @@ export type ProjectCollaborationCandidacy = {
/**
* ProjectCollaborationsCandidacies represent one User's willingness to fill in for a ProjectCollaboration.
*/
-export type ProjectCollaborationCandidacyJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectCollaborationCandidacyCsv = {
+ readonly id?: number;
+ /**
+ * The ProjectCollaboration to which this candidacy is applying to.
+ */
+ collaboration: string;
+ /**
+ * The User applying to fill for the ProjectCollaboration.
+ */
+ user: string;
+ /**
+ * Information about this candidacy.
+ */
+ description: string;
+ /**
+ * Life-cycle status of the candidacy.
+ */
+ status: 'to_review' | 'in_review' | 'rejected' | 'approved';
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * ProjectCollaborationsCandidacies represent one User's willingness to fill in for a ProjectCollaboration.
+ */
+export type ProjectCollaborationCandidacyJsonMergePatch = {
+ readonly id?: number;
+ /**
+ * The ProjectCollaboration to which this candidacy is applying to.
+ */
+ collaboration?: string;
+ /**
+ * The User applying to fill for the ProjectCollaboration.
+ */
+ user?: string;
+ /**
+ * Information about this candidacy.
+ */
+ description?: string;
+ /**
+ * Life-cycle status of the candidacy.
+ */
+ status?: 'to_review' | 'in_review' | 'rejected' | 'approved';
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * ProjectCollaborationsCandidacies represent one User's willingness to fill in for a ProjectCollaboration.
+ */
+export type ProjectCollaborationCandidacyJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The ProjectCollaboration to which this candidacy is applying to.
@@ -2320,14 +3259,47 @@ export type ProjectReview = {
* - `to_campaign_review`: will launch a related ProjectReview of `campaign` type
* - `to_financial_review`: will launch a related ProjectReview of `financial` type.
*/
-export type ProjectReviewJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectReviewCsv = {
+ readonly id?: number;
+ project?: string;
+ reviewer?: string;
+ type?: 'campaign' | 'financial';
+ areas?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * ProjectReviews are launched as health-checks for Projects.\
+ * \
+ * The reviews are focused on certain aspects of a Project's lifecycle. The types `campaign` and `financial` reviews
+ * are to evaluate the fitness of a Project before being greenlit for campaigning or the legitimacy of their raised funds, respectively.\
+ * \
+ * ProjectReview resources cannot be manually created, they are created automatically when a Project moves into a "to review" status:
+ * - `to_campaign_review`: will launch a related ProjectReview of `campaign` type
+ * - `to_financial_review`: will launch a related ProjectReview of `financial` type.
+ */
+export type ProjectReviewJsonMergePatch = {
+ readonly id?: number;
+ project?: string;
+ reviewer?: string;
+ type?: 'campaign' | 'financial';
+ areas?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * ProjectReviews are launched as health-checks for Projects.\
+ * \
+ * The reviews are focused on certain aspects of a Project's lifecycle. The types `campaign` and `financial` reviews
+ * are to evaluate the fitness of a Project before being greenlit for campaigning or the legitimacy of their raised funds, respectively.\
+ * \
+ * ProjectReview resources cannot be manually created, they are created automatically when a Project moves into a "to review" status:
+ * - `to_campaign_review`: will launch a related ProjectReview of `campaign` type
+ * - `to_financial_review`: will launch a related ProjectReview of `financial` type.
+ */
+export type ProjectReviewJsonld = HydraItemBaseSchema & {
readonly id?: number;
project?: string;
reviewer?: string;
@@ -2362,14 +3334,43 @@ export type ProjectReviewArea = {
* Each area holds an associated risk, which represents the trust the reviewer has for the reviewed Project's health in that area,
* areas can only be updated by the assigned reviewer or an user with `ROLE_ADMIN`.
*/
-export type ProjectReviewAreaJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectReviewAreaCsv = {
+ readonly id?: number;
+ review?: string;
+ title?: string;
+ summary?: string;
+ risk?: 'low' | 'mid' | 'high';
+ comments?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * A ProjectReviewArea represents one specific topic of evaluation for ProjectReviews.\
+ * \
+ * Conversations, feedback and evolution of the ProjectReview must happen around specific areas of review.\
+ * Each area holds an associated risk, which represents the trust the reviewer has for the reviewed Project's health in that area,
+ * areas can only be updated by the assigned reviewer or an user with `ROLE_ADMIN`.
+ */
+export type ProjectReviewAreaJsonMergePatch = {
+ readonly id?: number;
+ review?: string;
+ title?: string;
+ summary?: string;
+ risk?: 'low' | 'mid' | 'high';
+ comments?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * A ProjectReviewArea represents one specific topic of evaluation for ProjectReviews.\
+ * \
+ * Conversations, feedback and evolution of the ProjectReview must happen around specific areas of review.\
+ * Each area holds an associated risk, which represents the trust the reviewer has for the reviewed Project's health in that area,
+ * areas can only be updated by the assigned reviewer or an user with `ROLE_ADMIN`.
+ */
+export type ProjectReviewAreaJsonld = HydraItemBaseSchema & {
readonly id?: number;
review?: string;
title?: string;
@@ -2395,14 +3396,19 @@ export type ProjectReviewComment = {
/**
* ProjectReviewComments hold the conversation between the reviewer and the reviewed Project owner.
*/
-export type ProjectReviewCommentJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectReviewCommentCsv = {
+ readonly id?: number;
+ area: string;
+ author: string;
+ body: string;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * ProjectReviewComments hold the conversation between the reviewer and the reviewed Project owner.
+ */
+export type ProjectReviewCommentJsonld = HydraItemBaseSchema & {
readonly id?: number;
area: string;
author: string;
@@ -2468,14 +3474,115 @@ export type ProjectReward = {
/**
* A ProjectReward is something the Project owner wishes to give in exchange for contributions to their Project.
*/
-export type ProjectRewardJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectRewardCsv = {
+ readonly id?: number;
+ /**
+ * The project which gives this reward.
+ */
+ project: string;
+ /**
+ * A short, descriptive title for this reward.
+ */
+ title: string;
+ /**
+ * Information about this reward. More detailed than the title.
+ */
+ description: string | null;
+ /**
+ * URL to an image resource to be displayed as header.
+ */
+ cover?: string;
+ /**
+ * The minimal monetary sum to be able to claim this reward.
+ */
+ money: MoneyInputCsv;
+ /**
+ * Rewards might include something that needs to be delivered to the User claiming the Reward.
+ */
+ hasShipping: boolean;
+ /**
+ * Rewards might be finite, i.e: has a limited amount of existing `unitsTotal`.
+ */
+ isFinite: boolean;
+ /**
+ * For finite rewards, the total amount of existing units.\
+ * Required if `isFinite`.
+ */
+ unitsTotal?: number | null;
+ /**
+ * The total amount of claims on this Reward.
+ */
+ readonly unitsClaimed?: number;
+ /**
+ * For finite rewards, the currently available amount of units that can be claimed.
+ */
+ readonly unitsAvailable?: number;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * A ProjectReward is something the Project owner wishes to give in exchange for contributions to their Project.
+ */
+export type ProjectRewardJsonMergePatch = {
+ readonly id?: number;
+ /**
+ * The project which gives this reward.
+ */
+ project?: string;
+ /**
+ * A short, descriptive title for this reward.
+ */
+ title?: string;
+ /**
+ * Information about this reward. More detailed than the title.
+ */
+ description?: string | null;
+ /**
+ * URL to an image resource to be displayed as header.
+ */
+ cover?: string;
+ /**
+ * The minimal monetary sum to be able to claim this reward.
+ */
+ money?: MoneyInput;
+ /**
+ * Rewards might include something that needs to be delivered to the User claiming the Reward.
+ */
+ hasShipping?: boolean;
+ /**
+ * Rewards might be finite, i.e: has a limited amount of existing `unitsTotal`.
+ */
+ isFinite?: boolean;
+ /**
+ * For finite rewards, the total amount of existing units.\
+ * Required if `isFinite`.
+ */
+ unitsTotal?: number | null;
+ /**
+ * The total amount of claims on this Reward.
+ */
+ readonly unitsClaimed?: number;
+ /**
+ * For finite rewards, the currently available amount of units that can be claimed.
+ */
+ readonly unitsAvailable?: number;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * A ProjectReward is something the Project owner wishes to give in exchange for contributions to their Project.
+ */
+export type ProjectRewardJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The project which gives this reward.
@@ -2583,28 +3690,7 @@ export type ProjectRewardClaimRewardClaimCreationDto = {
* Once created ProjectRewardClaims can only be deleted by the User who owns it,
* while their status can only be updated by the User who owns the Project of the claimed ProjectReward.
*/
-export type ProjectRewardClaimRewardClaimCreationDtoJsonld = {
- /**
- * The GatewayCharge granting access to the ProjectReward.
- */
- charge: string;
- /**
- * The ProjectReward being claimed.
- */
- reward: string;
- /**
- * If the reward is a physical object that needs to be delivered to an specific place.
- */
- address?: string | null;
-};
-
-/**
- * A ProjectRewardClaim represents the will of an User who wishes to obtain one ProjectReward.\
- * \
- * Once created ProjectRewardClaims can only be deleted by the User who owns it,
- * while their status can only be updated by the User who owns the Project of the claimed ProjectReward.
- */
-export type ProjectRewardClaimRewardClaimUpdationDto = {
+export type ProjectRewardClaimRewardClaimUpdationDtoJsonMergePatch = {
/**
* The point at which the claim over the reward is.\
* May only be updated by admins or the User who owns the Project of the ProjectReward.
@@ -2622,14 +3708,37 @@ export type ProjectRewardClaimRewardClaimUpdationDto = {
* Once created ProjectRewardClaims can only be deleted by the User who owns it,
* while their status can only be updated by the User who owns the Project of the claimed ProjectReward.
*/
-export type ProjectRewardClaimJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectRewardClaimCsv = {
+ readonly id?: number;
+ /**
+ * The User claiming the ProjectReward. Derived from the GatewayCharge.
+ */
+ owner?: string;
+ /**
+ * The GatewayCharge granting access to the ProjectReward.
+ */
+ charge?: string;
+ /**
+ * The ProjectReward being claimed.
+ */
+ reward?: string;
+ /**
+ * The point at which the claim is in its life-cylce.
+ */
+ status?: 'in_pending' | 'fulfilled';
+ /**
+ * Only used when the reward is a physical object that needs to be shipped.
+ */
+ address?: AddressCsv | null;
+};
+
+/**
+ * A ProjectRewardClaim represents the will of an User who wishes to obtain one ProjectReward.\
+ * \
+ * Once created ProjectRewardClaims can only be deleted by the User who owns it,
+ * while their status can only be updated by the User who owns the Project of the claimed ProjectReward.
+ */
+export type ProjectRewardClaimJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The User claiming the ProjectReward. Derived from the GatewayCharge.
@@ -2713,9 +3822,7 @@ export type ProjectSupportTotalizedMoney = {
* MatchCalls specially might make several different Transactions to the same Project,
* but their ProjectSupport remains the same just with updated money.
*/
-export type ProjectSupportTotalizedMoneyJsonld = {
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectSupportTotalizedMoneyCsv = {
amount?: number;
currency?: string;
length?: number;
@@ -2727,14 +3834,103 @@ export type ProjectSupportTotalizedMoneyJsonld = {
* MatchCalls specially might make several different Transactions to the same Project,
* but their ProjectSupport remains the same just with updated money.
*/
-export type ProjectSupportJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectSupportTotalizedMoneyJsonld = HydraItemBaseSchema & {
+ amount?: number;
+ currency?: string;
+ length?: number;
+};
+
+/**
+ * ProjectSupports gather Transactions going from one same origin to one same Project.\
+ * \
+ * MatchCalls specially might make several different Transactions to the same Project,
+ * but their ProjectSupport remains the same just with updated money.
+ */
+export type ProjectSupportCsv = {
+ readonly id?: number;
+ /**
+ * The Project being supported.
+ */
+ readonly project?: string;
+ /**
+ * The Accounting of origin for the Transactions under this ProjectSupport record.\
+ * \
+ * When `anonymous` is *true* the origin will only be public to admins and the User.
+ */
+ readonly origin?: string | null;
+ readonly displayName?: string | null;
+ readonly displayImage?: string | null;
+ /**
+ * The Transactions that were issued to the Project by the origin.
+ */
+ readonly transactions?: Array;
+ /**
+ * The total monetary value of the Transactions going to the Project.
+ */
+ readonly money?: MoneyOutputCsv;
+ /**
+ * If the origin wishes to remain anonymous behind this ProjectSupport.
+ */
+ anonymous: boolean;
+ /**
+ * If this ProjectSupport comes from a MatchCall this flag will be true.
+ */
+ readonly matchfunding?: boolean;
+ /**
+ * A message of support from the User to the Project.
+ */
+ message?: string | null;
+};
+
+/**
+ * ProjectSupports gather Transactions going from one same origin to one same Project.\
+ * \
+ * MatchCalls specially might make several different Transactions to the same Project,
+ * but their ProjectSupport remains the same just with updated money.
+ */
+export type ProjectSupportJsonMergePatch = {
+ readonly id?: number;
+ /**
+ * The Project being supported.
+ */
+ readonly project?: string;
+ /**
+ * The Accounting of origin for the Transactions under this ProjectSupport record.\
+ * \
+ * When `anonymous` is *true* the origin will only be public to admins and the User.
+ */
+ readonly origin?: string | null;
+ readonly displayName?: string | null;
+ readonly displayImage?: string | null;
+ /**
+ * The Transactions that were issued to the Project by the origin.
+ */
+ readonly transactions?: Array;
+ /**
+ * The total monetary value of the Transactions going to the Project.
+ */
+ readonly money?: MoneyOutput;
+ /**
+ * If the origin wishes to remain anonymous behind this ProjectSupport.
+ */
+ anonymous?: boolean;
+ /**
+ * If this ProjectSupport comes from a MatchCall this flag will be true.
+ */
+ readonly matchfunding?: boolean;
+ /**
+ * A message of support from the User to the Project.
+ */
+ message?: string | null;
+};
+
+/**
+ * ProjectSupports gather Transactions going from one same origin to one same Project.\
+ * \
+ * MatchCalls specially might make several different Transactions to the same Project,
+ * but their ProjectSupport remains the same just with updated money.
+ */
+export type ProjectSupportJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The Project being supported.
@@ -2822,14 +4018,99 @@ export type ProjectUpdate = {
* Updates can be for outstanding donation amounts, achievement of goals or thresholds,
* or any other body of information that the Project owner(s) may wish to make public to the Project's audience.
*/
-export type ProjectUpdateJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ProjectUpdateCsv = {
+ readonly id?: number;
+ /**
+ * The Project to which this update belongs to.
+ */
+ project: string;
+ /**
+ * Main headline for this update.
+ */
+ title: string;
+ /**
+ * Secondary headline for this update.
+ */
+ subtitle: string;
+ /**
+ * Main text body of the Project's update.
+ */
+ body: string;
+ /**
+ * Public display date for this update,
+ * not necessarily related to the actual dates of resource creation or update.
+ */
+ date?: string;
+ /**
+ * URL to an image resource to be displayed as header.
+ */
+ cover?: string;
+ /**
+ * Author is automatically detected from the request's User.\
+ * Non-authored updates are system-generated.
+ */
+ readonly author?: string | null;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * A ProjectUpdate offers records of significant news during a Project's life.\
+ * \
+ * Updates can be for outstanding donation amounts, achievement of goals or thresholds,
+ * or any other body of information that the Project owner(s) may wish to make public to the Project's audience.
+ */
+export type ProjectUpdateJsonMergePatch = {
+ readonly id?: number;
+ /**
+ * The Project to which this update belongs to.
+ */
+ project?: string;
+ /**
+ * Main headline for this update.
+ */
+ title?: string;
+ /**
+ * Secondary headline for this update.
+ */
+ subtitle?: string;
+ /**
+ * Main text body of the Project's update.
+ */
+ body?: string;
+ /**
+ * Public display date for this update,
+ * not necessarily related to the actual dates of resource creation or update.
+ */
+ date?: string;
+ /**
+ * URL to an image resource to be displayed as header.
+ */
+ cover?: string;
+ /**
+ * Author is automatically detected from the request's User.\
+ * Non-authored updates are system-generated.
+ */
+ readonly author?: string | null;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * A ProjectUpdate offers records of significant news during a Project's life.\
+ * \
+ * Updates can be for outstanding donation amounts, achievement of goals or thresholds,
+ * or any other body of information that the Project owner(s) may wish to make public to the Project's audience.
+ */
+export type ProjectUpdateJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* The Project to which this update belongs to.
@@ -2875,14 +4156,13 @@ export type ProjectVideo = {
thumbnail?: string | null;
};
+export type ProjectVideoCsv = {
+ src?: string | null;
+ cover?: string | null;
+ thumbnail?: string | null;
+};
+
export type ProjectVideoJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
src?: string | null;
cover?: string | null;
thumbnail?: string | null;
@@ -2911,14 +4191,30 @@ export type Territory = {
address?: string | null;
};
+export type TerritoryCsv = {
+ /**
+ * ISO 3166-1 alpha-2 two-letter country code.\
+ * e.g: ES (Spain).
+ */
+ country: string | null;
+ /**
+ * ISO 3166-2 first level subdivision code.\
+ * e.g: ES-AN (Andalucía, Spain).
+ */
+ subLvl1?: string | null;
+ /**
+ * ISO 3166-2 second level subdivision code.\
+ * e.g: ES-GR (Granada, Andalucía, Spain).
+ */
+ subLvl2?: string | null;
+ /**
+ * Plain-text address.\
+ * e.g: Forn de l’Olivera 22B, 07012 Palma, Illes Balears.
+ */
+ address?: string | null;
+};
+
export type TerritoryJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
/**
* ISO 3166-1 alpha-2 two-letter country code.\
* e.g: ES (Spain).
@@ -2974,14 +4270,59 @@ export type Theme = {
* Themes can only be modified by users with the role "ROLE_ADMIN", but can usually
* be referenced by non-admin users in their own resources, such as Project owners.
*/
-export type ThemeJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type ThemeCsv = {
+ /**
+ * This value will identify this Theme in relationships with other resources.
+ */
+ id?: string;
+ /**
+ * A unique, non white space, string identifier for this Theme.
+ */
+ readonly slug?: string;
+ /**
+ * A human-readable self-descriptive string of what this Theme is about.
+ */
+ name: string;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+};
+
+/**
+ * A Theme, like in books, works as a "topic intent" grouping, for example:
+ * friendship, good vs. evil, power and corruption, etc.\
+ * \
+ * Themes can only be modified by users with the role "ROLE_ADMIN", but can usually
+ * be referenced by non-admin users in their own resources, such as Project owners.
+ */
+export type ThemeJsonMergePatch = {
+ /**
+ * This value will identify this Theme in relationships with other resources.
+ */
+ id?: string;
+ /**
+ * A unique, non white space, string identifier for this Theme.
+ */
+ readonly slug?: string;
+ /**
+ * A human-readable self-descriptive string of what this Theme is about.
+ */
+ name?: string;
+ /**
+ * List of the available content locales.
+ */
+ readonly locales?: Array;
+};
+
+/**
+ * A Theme, like in books, works as a "topic intent" grouping, for example:
+ * friendship, good vs. evil, power and corruption, etc.\
+ * \
+ * Themes can only be modified by users with the role "ROLE_ADMIN", but can usually
+ * be referenced by non-admin users in their own resources, such as Project owners.
+ */
+export type ThemeJsonld = HydraItemBaseSchema & {
/**
* This value will identify this Theme in relationships with other resources.
*/
@@ -3019,14 +4360,35 @@ export type Tipjar = {
* \
* Tips to the platform owners and other no-purpose money can target a Tipjar.
*/
-export type TipjarJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type TipjarCsv = {
+ readonly id?: number;
+ readonly accounting?: string;
+ /**
+ * Human readable, non white space, unique string.
+ */
+ name: string;
+};
+
+/**
+ * Unlike other Money recipients a Tipjar receives money with no further goal.\
+ * \
+ * Tips to the platform owners and other no-purpose money can target a Tipjar.
+ */
+export type TipjarJsonMergePatch = {
+ readonly id?: number;
+ readonly accounting?: string;
+ /**
+ * Human readable, non white space, unique string.
+ */
+ name?: string;
+};
+
+/**
+ * Unlike other Money recipients a Tipjar receives money with no further goal.\
+ * \
+ * Tips to the platform owners and other no-purpose money can target a Tipjar.
+ */
+export type TipjarJsonld = HydraItemBaseSchema & {
readonly id?: number;
readonly accounting?: string;
/**
@@ -3041,14 +4403,13 @@ export type TotalizedMoney = {
length?: number;
};
+export type TotalizedMoneyCsv = {
+ amount?: number;
+ currency?: string;
+ length?: number;
+};
+
export type TotalizedMoneyJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
amount?: number;
currency?: string;
length?: number;
@@ -3065,14 +4426,18 @@ export type Tracking = {
value?: string;
};
+export type TrackingCsv = {
+ /**
+ * A descriptive title for the tracking number.
+ */
+ title?: string;
+ /**
+ * The tracking number given by the Gateway.
+ */
+ value?: string;
+};
+
export type TrackingJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
/**
* A descriptive title for the tracking number.
*/
@@ -3148,6 +4513,30 @@ export type User = {
* Free-form rich text description for the User.
*/
description?: string;
+ /**
+ * Has the User agreed to share their location with the platform?
+ * Used to generate anonymous statistics and impact indicators, never disclosed to third parties.\
+ * Only available to themselves and platform administrators.
+ */
+ shareLocation?: boolean;
+ /**
+ * Does this User wish to have their personal data to remain undisclosed to 3rd parties?\
+ * Only available to themselves and platform administrators.
+ */
+ isAnonymous?: boolean;
+ /**
+ * How the User got to know about the platform.\
+ * Only available to themselves and platform administrators.
+ */
+ referralSource?: 'search_engine' | 'social_media' | 'friend' | 'press' | 'event' | 'other' | null;
+ /**
+ * The Categories the User is interested in.
+ */
+ preferredCategories?: Array;
+ /**
+ * The Themes the User is interested in.
+ */
+ preferredThemes?: Array;
readonly dateCreated?: string;
readonly dateUpdated?: string;
};
@@ -3174,26 +4563,7 @@ export type UserUserSignupDto = {
/**
* Users represent people who interact with the platform.
*/
-export type UserUserSignupDtoJsonld = {
- /**
- * A valid e-mail address for the new User.
- */
- email: string;
- /**
- * The authentication password for the new User. Plaintext string,
- * will be hashed by the API.
- */
- password: string;
- /**
- * Is this User for an individual acting on their own or a group of individuals?
- */
- type: 'individual' | 'organization';
-};
-
-/**
- * Users represent people who interact with the platform.
- */
-export type UserUserUpdationDto = {
+export type UserUserUpdationDtoJsonMergePatch = {
/**
* A unique, non white space, byte-safe string identifier for this User.
*/
@@ -3232,19 +4602,126 @@ export type UserUserUpdationDto = {
* Free-form rich text description for the User.
*/
description?: string;
+ /**
+ * Has the User agreed to share their location with the platform?
+ * Used to generate anonymous statistics and impact indicators, never disclosed to third parties.
+ */
+ shareLocation?: boolean;
+ /**
+ * Does this User wish to have their personal data to remain undisclosed to 3rd parties?
+ */
+ isAnonymous?: boolean;
+ /**
+ * How the User got to know about the platform.
+ */
+ referralSource?: 'search_engine' | 'social_media' | 'friend' | 'press' | 'event' | 'other' | null;
+ /**
+ * The Categories the User is interested in.
+ */
+ preferredCategories?: Array;
+ /**
+ * The Themes the User is interested in.
+ */
+ preferredThemes?: Array;
};
/**
* Users represent people who interact with the platform.
*/
-export type UserJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type UserCsv = {
+ readonly id?: number;
+ /**
+ * A unique, non white space, byte-safe string identifier for this User.
+ */
+ handle: string;
+ /**
+ * The User's given email address. Only available to themselves and platform administrators.
+ */
+ email: string;
+ /**
+ * Has this User confirmed their email address?
+ */
+ readonly emailConfirmed?: boolean;
+ /**
+ * URL to the avatar image of this User.
+ */
+ avatar?: string;
+ /**
+ * Is this User for an individual acting on their own or a group of individuals?
+ */
+ type?: 'individual' | 'organization';
+ /**
+ * A list of the roles assigned to this User. Admin scoped property.
+ */
+ roles?: Array;
+ readonly displayName?: string;
+ /**
+ * For `individual` User types: personal data about the User themselves.\
+ * For `organization` User types: data for the organization representative or person managing the User.\
+ * Only available to themselves and platform administrators.
+ */
+ readonly person?: string;
+ /**
+ * For `organization` User types only. Legal entity data.
+ */
+ readonly organization?: string | null;
+ /**
+ * The Accounting for this User monetary movements.
+ */
+ readonly accounting?: string;
+ /**
+ * The Projects that are owned by this User.
+ */
+ readonly projects?: Array;
+ /**
+ * A flag determined by the platform for Users who are known to be active.
+ */
+ readonly active?: boolean;
+ /**
+ * A list of URLs provided by the User.\
+ * e.g: social profiles, personal website.
+ */
+ readonly links?: Array;
+ /**
+ * ISO 3166 data about the Users's location territory.
+ */
+ territory?: TerritoryCsv;
+ /**
+ * Free-form rich text description for the User.
+ */
+ description?: string;
+ /**
+ * Has the User agreed to share their location with the platform?
+ * Used to generate anonymous statistics and impact indicators, never disclosed to third parties.\
+ * Only available to themselves and platform administrators.
+ */
+ shareLocation?: boolean;
+ /**
+ * Does this User wish to have their personal data to remain undisclosed to 3rd parties?\
+ * Only available to themselves and platform administrators.
+ */
+ isAnonymous?: boolean;
+ /**
+ * How the User got to know about the platform.\
+ * Only available to themselves and platform administrators.
+ */
+ referralSource?: 'search_engine' | 'social_media' | 'friend' | 'press' | 'event' | 'other' | null;
+ /**
+ * The Categories the User is interested in.
+ */
+ preferredCategories?: Array;
+ /**
+ * The Themes the User is interested in.
+ */
+ preferredThemes?: Array;
+ readonly dateCreated?: string;
+ readonly dateUpdated?: string;
+};
+
+/**
+ * Users represent people who interact with the platform.
+ */
+export type UserJsonld = HydraItemBaseSchema & {
readonly id?: number;
/**
* A unique, non white space, byte-safe string identifier for this User.
@@ -3306,6 +4783,30 @@ export type UserJsonld = {
* Free-form rich text description for the User.
*/
description?: string;
+ /**
+ * Has the User agreed to share their location with the platform?
+ * Used to generate anonymous statistics and impact indicators, never disclosed to third parties.\
+ * Only available to themselves and platform administrators.
+ */
+ shareLocation?: boolean;
+ /**
+ * Does this User wish to have their personal data to remain undisclosed to 3rd parties?\
+ * Only available to themselves and platform administrators.
+ */
+ isAnonymous?: boolean;
+ /**
+ * How the User got to know about the platform.\
+ * Only available to themselves and platform administrators.
+ */
+ referralSource?: 'search_engine' | 'social_media' | 'friend' | 'press' | 'event' | 'other' | null;
+ /**
+ * The Categories the User is interested in.
+ */
+ preferredCategories?: Array;
+ /**
+ * The Themes the User is interested in.
+ */
+ preferredThemes?: Array;
readonly dateCreated?: string;
readonly dateUpdated?: string;
};
@@ -3353,14 +4854,7 @@ export type Version = {
* This allows us to keep track of the flow and the evolution of records in the platform.
* Looking at the changes done between one version and the next one we can reconstruct how a resource was at a certain point in time.
*/
-export type VersionJsonld = {
- readonly '@context'?: string | {
- '@vocab': string;
- hydra: 'http://www.w3.org/ns/hydra/core#';
- [key: string]: unknown;
- };
- readonly '@id'?: string;
- readonly '@type'?: string;
+export type VersionCsv = {
/**
* The ID of the version record.
*/
@@ -3392,12 +4886,40 @@ export type VersionJsonld = {
};
/**
- * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
+ * Some resources are versioned. This means v4 keeps track of the changes performed in subsets of specific properties within these resources.\
+ * \
+ * This allows us to keep track of the flow and the evolution of records in the platform.
+ * Looking at the changes done between one version and the next one we can reconstruct how a resource was at a certain point in time.
*/
-export type ProjectTotalizedMoney = {
- amount?: number;
- currency?: string;
- length?: number;
+export type VersionJsonld = HydraItemBaseSchema & {
+ /**
+ * The ID of the version record.
+ */
+ readonly id?: number | null;
+ /**
+ * The type of action that performed the recorded changes.
+ */
+ readonly action?: string | null;
+ /**
+ * The type of the recorded resource.
+ */
+ readonly resource?: string;
+ /**
+ * The ID of the recorded resource.
+ */
+ readonly resourceId?: number;
+ /**
+ * The version number for this specific resource.
+ */
+ readonly resourceVersion?: number | null;
+ /**
+ * The changed resource data, i.e the new values of the changed properties.
+ */
+ readonly resourceChanges?: unknown;
+ /**
+ * The date at which this version was created.
+ */
+ readonly dateCreated?: string | null;
};
export type ApiAccountingsGetCollectionData = {
@@ -3412,6 +4934,8 @@ export type ApiAccountingsGetCollectionData = {
* The number of items per page
*/
itemsPerPage?: number;
+ id?: number;
+ 'id[]'?: Array;
};
url: '/v4/accountings';
};
@@ -3621,7 +5145,7 @@ export type ApiAddressesPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiAddressesPostError = ApiAddressesPostErrors[keyof ApiAddressesPostErrors];
@@ -3707,7 +5231,7 @@ export type ApiAddressesIdPatchData = {
/**
* The updated Address resource
*/
- body: AddressAddressUpdationDto;
+ body: AddressAddressUpdationDtoJsonMergePatch;
path: {
/**
* Address identifier
@@ -3734,7 +5258,7 @@ export type ApiAddressesIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiAddressesIdPatchError = ApiAddressesIdPatchErrors[keyof ApiAddressesIdPatchErrors];
@@ -3798,7 +5322,7 @@ export type ApiCategoriesPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiCategoriesPostError = ApiCategoriesPostErrors[keyof ApiCategoriesPostErrors];
@@ -3880,7 +5404,7 @@ export type ApiCategoriesIdPatchData = {
/**
* The updated Category resource
*/
- body: Category;
+ body: CategoryJsonMergePatch;
path: {
/**
* Category identifier
@@ -3907,7 +5431,7 @@ export type ApiCategoriesIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiCategoriesIdPatchError = ApiCategoriesIdPatchErrors[keyof ApiCategoriesIdPatchErrors];
@@ -4118,7 +5642,7 @@ export type ApiGatewayChargesIdPatchData = {
/**
* The updated GatewayCharge resource
*/
- body: GatewayChargeChargeUpdationDto;
+ body: GatewayChargeChargeUpdationDtoJsonMergePatch;
path: {
/**
* GatewayCharge identifier
@@ -4141,7 +5665,7 @@ export type ApiGatewayChargesIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiGatewayChargesIdPatchError = ApiGatewayChargesIdPatchErrors[keyof ApiGatewayChargesIdPatchErrors];
@@ -4210,7 +5734,7 @@ export type ApiGatewayCheckoutsPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiGatewayCheckoutsPostError = ApiGatewayCheckoutsPostErrors[keyof ApiGatewayCheckoutsPostErrors];
@@ -4258,7 +5782,7 @@ export type ApiGatewayCheckoutsIdPatchData = {
/**
* The updated GatewayCheckout resource
*/
- body: GatewayCheckoutCheckoutUpdationDto;
+ body: GatewayCheckoutCheckoutUpdationDtoJsonMergePatch;
path: {
/**
* GatewayCheckout identifier
@@ -4285,7 +5809,7 @@ export type ApiGatewayCheckoutsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiGatewayCheckoutsIdPatchError = ApiGatewayCheckoutsIdPatchErrors[keyof ApiGatewayCheckoutsIdPatchErrors];
@@ -4354,7 +5878,7 @@ export type ApiMatchCallsPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiMatchCallsPostError = ApiMatchCallsPostErrors[keyof ApiMatchCallsPostErrors];
@@ -4432,7 +5956,7 @@ export type ApiMatchCallsIdPatchData = {
/**
* The updated MatchCall resource
*/
- body: MatchCall;
+ body: MatchCallJsonMergePatch;
path: {
/**
* MatchCall identifier
@@ -4455,7 +5979,7 @@ export type ApiMatchCallsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiMatchCallsIdPatchError = ApiMatchCallsIdPatchErrors[keyof ApiMatchCallsIdPatchErrors];
@@ -4518,7 +6042,7 @@ export type ApiMatchCallSubmissionsPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiMatchCallSubmissionsPostError = ApiMatchCallSubmissionsPostErrors[keyof ApiMatchCallSubmissionsPostErrors];
@@ -4566,7 +6090,7 @@ export type ApiMatchCallSubmissionsIdPatchData = {
/**
* The updated MatchCallSubmission resource
*/
- body: MatchCallSubmission;
+ body: MatchCallSubmissionJsonMergePatch;
path: {
/**
* MatchCallSubmission identifier
@@ -4593,7 +6117,7 @@ export type ApiMatchCallSubmissionsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiMatchCallSubmissionsIdPatchError = ApiMatchCallSubmissionsIdPatchErrors[keyof ApiMatchCallSubmissionsIdPatchErrors];
@@ -4763,7 +6287,7 @@ export type ApiMatchStrategiesPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiMatchStrategiesPostError = ApiMatchStrategiesPostErrors[keyof ApiMatchStrategiesPostErrors];
@@ -4845,7 +6369,7 @@ export type ApiMatchStrategiesIdPatchData = {
/**
* The updated MatchStrategy resource
*/
- body: MatchStrategy;
+ body: MatchStrategyJsonMergePatch;
path: {
/**
* MatchStrategy identifier
@@ -4872,7 +6396,7 @@ export type ApiMatchStrategiesIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiMatchStrategiesIdPatchError = ApiMatchStrategiesIdPatchErrors[keyof ApiMatchStrategiesIdPatchErrors];
@@ -4924,7 +6448,7 @@ export type ApiUsersIdorganizationPatchData = {
/**
* The updated Organization resource
*/
- body: Organization;
+ body: OrganizationJsonMergePatch;
path: {
/**
* User identifier
@@ -4951,7 +6475,7 @@ export type ApiUsersIdorganizationPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiUsersIdorganizationPatchError = ApiUsersIdorganizationPatchErrors[keyof ApiUsersIdorganizationPatchErrors];
@@ -5003,7 +6527,7 @@ export type ApiUsersIdpersonPatchData = {
/**
* The updated Person resource
*/
- body: Person;
+ body: PersonJsonMergePatch;
path: {
/**
* User identifier
@@ -5030,7 +6554,7 @@ export type ApiUsersIdpersonPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiUsersIdpersonPatchError = ApiUsersIdpersonPatchErrors[keyof ApiUsersIdpersonPatchErrors];
@@ -5159,7 +6683,7 @@ export type ApiProjectsPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectsPostError = ApiProjectsPostErrors[keyof ApiProjectsPostErrors];
@@ -5301,7 +6825,7 @@ export type ApiProjectsIdPatchData = {
/**
* The updated Project resource
*/
- body: ProjectProjectUpdationDto;
+ body: ProjectProjectUpdationDtoJsonMergePatch;
path: {
/**
* Project identifier
@@ -5328,7 +6852,7 @@ export type ApiProjectsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectsIdPatchError = ApiProjectsIdPatchErrors[keyof ApiProjectsIdPatchErrors];
@@ -5391,7 +6915,7 @@ export type ApiProjectBudgetItemsPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectBudgetItemsPostError = ApiProjectBudgetItemsPostErrors[keyof ApiProjectBudgetItemsPostErrors];
@@ -5469,7 +6993,7 @@ export type ApiProjectBudgetItemsIdPatchData = {
/**
* The updated ProjectBudgetItem resource
*/
- body: ProjectBudgetItem;
+ body: ProjectBudgetItemJsonMergePatch;
path: {
/**
* ProjectBudgetItem identifier
@@ -5492,7 +7016,7 @@ export type ApiProjectBudgetItemsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectBudgetItemsIdPatchError = ApiProjectBudgetItemsIdPatchErrors[keyof ApiProjectBudgetItemsIdPatchErrors];
@@ -5562,7 +7086,7 @@ export type ApiProjectCollaborationsPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectCollaborationsPostError = ApiProjectCollaborationsPostErrors[keyof ApiProjectCollaborationsPostErrors];
@@ -5640,7 +7164,7 @@ export type ApiProjectCollaborationsIdPatchData = {
/**
* The updated ProjectCollaboration resource
*/
- body: ProjectCollaboration;
+ body: ProjectCollaborationJsonMergePatch;
path: {
/**
* ProjectCollaboration identifier
@@ -5663,7 +7187,7 @@ export type ApiProjectCollaborationsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectCollaborationsIdPatchError = ApiProjectCollaborationsIdPatchErrors[keyof ApiProjectCollaborationsIdPatchErrors];
@@ -5737,7 +7261,7 @@ export type ApiProjectCollaborationCandidaciesPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectCollaborationCandidaciesPostError = ApiProjectCollaborationCandidaciesPostErrors[keyof ApiProjectCollaborationCandidaciesPostErrors];
@@ -5815,7 +7339,7 @@ export type ApiProjectCollaborationCandidaciesIdPatchData = {
/**
* The updated ProjectCollaborationCandidacy resource
*/
- body: ProjectCollaborationCandidacy;
+ body: ProjectCollaborationCandidacyJsonMergePatch;
path: {
/**
* ProjectCollaborationCandidacy identifier
@@ -5838,7 +7362,7 @@ export type ApiProjectCollaborationCandidaciesIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectCollaborationCandidaciesIdPatchError = ApiProjectCollaborationCandidaciesIdPatchErrors[keyof ApiProjectCollaborationCandidaciesIdPatchErrors];
@@ -5957,7 +7481,7 @@ export type ApiProjectReviewsIdPatchData = {
/**
* The updated ProjectReview resource
*/
- body: ProjectReview;
+ body: ProjectReviewJsonMergePatch;
path: {
/**
* ProjectReview identifier
@@ -5980,7 +7504,7 @@ export type ApiProjectReviewsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectReviewsIdPatchError = ApiProjectReviewsIdPatchErrors[keyof ApiProjectReviewsIdPatchErrors];
@@ -6053,7 +7577,7 @@ export type ApiProjectReviewAreasPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectReviewAreasPostError = ApiProjectReviewAreasPostErrors[keyof ApiProjectReviewAreasPostErrors];
@@ -6139,7 +7663,7 @@ export type ApiProjectReviewAreasIdPatchData = {
/**
* The updated ProjectReviewArea resource
*/
- body: ProjectReviewArea;
+ body: ProjectReviewAreaJsonMergePatch;
path: {
/**
* ProjectReviewArea identifier
@@ -6166,7 +7690,7 @@ export type ApiProjectReviewAreasIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectReviewAreasIdPatchError = ApiProjectReviewAreasIdPatchErrors[keyof ApiProjectReviewAreasIdPatchErrors];
@@ -6237,7 +7761,7 @@ export type ApiProjectReviewCommentsPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectReviewCommentsPostError = ApiProjectReviewCommentsPostErrors[keyof ApiProjectReviewCommentsPostErrors];
@@ -6379,7 +7903,7 @@ export type ApiProjectRewardsPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectRewardsPostError = ApiProjectRewardsPostErrors[keyof ApiProjectRewardsPostErrors];
@@ -6457,7 +7981,7 @@ export type ApiProjectRewardsIdPatchData = {
/**
* The updated ProjectReward resource
*/
- body: ProjectReward;
+ body: ProjectRewardJsonMergePatch;
path: {
/**
* ProjectReward identifier
@@ -6480,7 +8004,7 @@ export type ApiProjectRewardsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectRewardsIdPatchError = ApiProjectRewardsIdPatchErrors[keyof ApiProjectRewardsIdPatchErrors];
@@ -6548,7 +8072,7 @@ export type ApiProjectRewardClaimsPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectRewardClaimsPostError = ApiProjectRewardClaimsPostErrors[keyof ApiProjectRewardClaimsPostErrors];
@@ -6630,7 +8154,7 @@ export type ApiProjectRewardClaimsIdPatchData = {
/**
* The updated ProjectRewardClaim resource
*/
- body: ProjectRewardClaimRewardClaimUpdationDto;
+ body: ProjectRewardClaimRewardClaimUpdationDtoJsonMergePatch;
path: {
/**
* ProjectRewardClaim identifier
@@ -6653,7 +8177,7 @@ export type ApiProjectRewardClaimsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectRewardClaimsIdPatchError = ApiProjectRewardClaimsIdPatchErrors[keyof ApiProjectRewardClaimsIdPatchErrors];
@@ -6755,7 +8279,7 @@ export type ApiProjectSupportsIdPatchData = {
/**
* The updated ProjectSupport resource
*/
- body: ProjectSupport;
+ body: ProjectSupportJsonMergePatch;
path: {
/**
* ProjectSupport identifier
@@ -6782,7 +8306,7 @@ export type ApiProjectSupportsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectSupportsIdPatchError = ApiProjectSupportsIdPatchErrors[keyof ApiProjectSupportsIdPatchErrors];
@@ -6854,7 +8378,7 @@ export type ApiProjectUpdatesPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectUpdatesPostError = ApiProjectUpdatesPostErrors[keyof ApiProjectUpdatesPostErrors];
@@ -6932,7 +8456,7 @@ export type ApiProjectUpdatesIdPatchData = {
/**
* The updated ProjectUpdate resource
*/
- body: ProjectUpdate;
+ body: ProjectUpdateJsonMergePatch;
path: {
/**
* ProjectUpdate identifier
@@ -6955,7 +8479,7 @@ export type ApiProjectUpdatesIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiProjectUpdatesIdPatchError = ApiProjectUpdatesIdPatchErrors[keyof ApiProjectUpdatesIdPatchErrors];
@@ -7019,7 +8543,7 @@ export type ApiThemesPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiThemesPostError = ApiThemesPostErrors[keyof ApiThemesPostErrors];
@@ -7101,7 +8625,7 @@ export type ApiThemesIdPatchData = {
/**
* The updated Theme resource
*/
- body: Theme;
+ body: ThemeJsonMergePatch;
path: {
/**
* Theme identifier
@@ -7128,7 +8652,7 @@ export type ApiThemesIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiThemesIdPatchError = ApiThemesIdPatchErrors[keyof ApiThemesIdPatchErrors];
@@ -7188,7 +8712,7 @@ export type ApiTipjarsPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiTipjarsPostError = ApiTipjarsPostErrors[keyof ApiTipjarsPostErrors];
@@ -7266,7 +8790,7 @@ export type ApiTipjarsIdPatchData = {
/**
* The updated Tipjar resource
*/
- body: Tipjar;
+ body: TipjarJsonMergePatch;
path: {
/**
* Tipjar identifier
@@ -7289,7 +8813,7 @@ export type ApiTipjarsIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiTipjarsIdPatchError = ApiTipjarsIdPatchErrors[keyof ApiTipjarsIdPatchErrors];
@@ -7316,13 +8840,16 @@ export type ApiUsersGetCollectionData = {
*/
itemsPerPage?: number;
/**
- * Searches on `email`, `person.firstName`, `person.lastName`, `organization.legalName`, `organization.businessName`
+ * Searches on `email` (secured by `is_granted("ROLE_ADMIN")`), `person.firstName`, `person.lastName`, `organization.legalName`, `organization.businessName`
*/
q?: string;
handle?: string;
'order[handle]'?: 'asc' | 'desc';
'order[dateCreated]'?: 'asc' | 'desc';
'order[dateUpdated]'?: 'asc' | 'desc';
+ /**
+ * User email
+ */
email?: string;
type?: string;
'type[]'?: Array;
@@ -7392,7 +8919,7 @@ export type ApiUsersPostErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiUsersPostError = ApiUsersPostErrors[keyof ApiUsersPostErrors];
@@ -7470,7 +8997,7 @@ export type ApiUsersIdPatchData = {
/**
* The updated User resource
*/
- body: UserUserUpdationDto;
+ body: UserUserUpdationDtoJsonMergePatch;
path: {
/**
* User identifier
@@ -7493,7 +9020,7 @@ export type ApiUsersIdPatchErrors = {
/**
* An error occurred
*/
- 422: ConstraintViolationJsonldJsonld;
+ 422: ConstraintViolationJsonld;
};
export type ApiUsersIdPatchError = ApiUsersIdPatchErrors[keyof ApiUsersIdPatchErrors];
diff --git a/src/openapi/client/zod.gen.ts b/src/openapi/client/zod.gen.ts
index 6e263ac3..0b069eb2 100644
--- a/src/openapi/client/zod.gen.ts
+++ b/src/openapi/client/zod.gen.ts
@@ -14,7 +14,8 @@ export const zAddress = z.object({
line2: z.string().nullish(),
city: z.string().optional(),
postCode: z.string().optional(),
- country: z.string().optional()
+ country: z.string().optional(),
+ isDefault: z.boolean().optional()
});
/**
@@ -28,49 +29,28 @@ export const zAddressAddressCreationDto = z.object({
line2: z.string().min(1).nullish(),
city: z.string().min(1),
postCode: z.string().min(3),
- country: z.string()
+ country: z.string(),
+ isDefault: z.boolean().nullish()
});
/**
* Addresses represent named locations that postal services can reach.
*/
-export const zAddressAddressCreationDtoJsonld = z.object({
- user: z.string(),
- firstName: z.string().min(1),
- lastName: z.string().min(1),
- line1: z.string().min(1),
- line2: z.string().min(1).nullish(),
- city: z.string().min(1),
- postCode: z.string().min(3),
- country: z.string()
-});
-
-/**
- * Addresses represent named locations that postal services can reach.
- */
-export const zAddressAddressUpdationDto = z.object({
+export const zAddressAddressUpdationDtoJsonMergePatch = z.object({
firstName: z.string().min(1).nullish(),
lastName: z.string().min(1).nullish(),
line1: z.string().min(1).nullish(),
line2: z.string().min(1).nullish(),
city: z.string().min(1).nullish(),
postCode: z.string().min(3).nullish(),
- country: z.string().nullish()
+ country: z.string().nullish(),
+ isDefault: z.boolean().nullish()
});
/**
* Addresses represent named locations that postal services can reach.
*/
-export const zAddressJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zAddressCsv = z.object({
id: z.int().readonly().optional(),
user: z.string().optional(),
firstName: z.string().optional(),
@@ -79,7 +59,8 @@ export const zAddressJsonld = z.object({
line2: z.string().nullish(),
city: z.string().optional(),
postCode: z.string().optional(),
- country: z.string().optional()
+ country: z.string().optional(),
+ isDefault: z.boolean().optional()
});
/**
@@ -103,16 +84,7 @@ export const zCategory = z.object({
* Categories can only be modified by users with the role "ROLE_ADMIN", but can usually
* be referenced by non-admin users in their own resources, such as Project owners.
*/
-export const zCategoryJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zCategoryCsv = z.object({
id: z.string().optional(),
slug: z.string().readonly().optional(),
name: z.string(),
@@ -120,40 +92,32 @@ export const zCategoryJsonld = z.object({
});
/**
- * Unprocessable entity
+ * A Category, like in books, is a way of grouping resources by type, genre, audience, or subject, for example:
+ * science-fiction, biography, fantasy, etc.\
+ * \
+ * Categories can only be modified by users with the role "ROLE_ADMIN", but can usually
+ * be referenced by non-admin users in their own resources, such as Project owners.
*/
-export const zConstraintViolationJson = z.object({
- status: z.int().optional().default(422),
- violations: z.array(z.object({
- propertyPath: z.string().optional(),
- message: z.string().optional()
- })).optional(),
- detail: z.string().readonly().optional(),
- type: z.string().readonly().optional(),
- title: z.string().readonly().nullish(),
- instance: z.string().readonly().nullish()
+export const zCategoryJsonMergePatch = z.object({
+ id: z.string().optional(),
+ slug: z.string().readonly().optional(),
+ name: z.string().optional(),
+ locales: z.array(z.string()).readonly().optional()
});
/**
* Unprocessable entity
*/
-export const zConstraintViolationJsonldJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zConstraintViolation = z.object({
status: z.int().optional().default(422),
violations: z.array(z.object({
- propertyPath: z.string().optional(),
- message: z.string().optional()
+ propertyPath: z.string(),
+ message: z.string(),
+ code: z.string().optional(),
+ hint: z.string().optional(),
+ payload: z.record(z.string(), z.unknown()).optional()
})).optional(),
detail: z.string().readonly().optional(),
- description: z.string().readonly().optional(),
type: z.string().readonly().optional(),
title: z.string().readonly().nullish(),
instance: z.string().readonly().nullish()
@@ -165,32 +129,11 @@ export const zConstraintViolationJsonldJsonld = z.object({
export const zError = z.object({
title: z.string().readonly().nullish(),
detail: z.string().readonly().nullish(),
- status: z.number().optional().default(400),
+ status: z.int().nullish().default(400),
instance: z.string().readonly().nullish(),
type: z.string().readonly().optional()
});
-/**
- * A representation of common errors.
- */
-export const zErrorJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
- title: z.string().readonly().nullish(),
- detail: z.string().readonly().nullish(),
- status: z.number().optional().default(400),
- instance: z.string().readonly().nullish(),
- type: z.string().readonly().optional(),
- description: z.string().readonly().nullish()
-});
-
/**
* Gateways represent payment services used to perform the necessary payments for Transactions between Accounts.\
* \
@@ -211,16 +154,7 @@ export const zGateway = z.object({
* These implementations make use of external or internal services to gather the funds that are inside a Transaction,
* perform corroboration of funds and store the Transactions into the system.
*/
-export const zGatewayJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zGatewayCsv = z.object({
id: z.string().optional(),
name: z.string().optional(),
supports: z.array(z.enum(['single', 'recurring'])).optional()
@@ -229,7 +163,7 @@ export const zGatewayJsonld = z.object({
/**
* A Charge represents a payment item to be included in a Checkout for payment at a Gateway.
*/
-export const zGatewayChargeChargeUpdationDto = z.object({
+export const zGatewayChargeChargeUpdationDtoJsonMergePatch = z.object({
id: z.int().readonly().optional(),
status: z.enum([
'to_charge',
@@ -244,7 +178,7 @@ export const zGatewayChargeChargeUpdationDto = z.object({
/**
* A GatewayCheckout represents a payment session with a Gateway.
*/
-export const zGatewayCheckoutCheckoutUpdationDto = z.object({
+export const zGatewayCheckoutCheckoutUpdationDtoJsonMergePatch = z.object({
id: z.int().readonly().optional(),
refund: z.enum(['to_wallet', 'to_gateway']).optional()
});
@@ -264,16 +198,7 @@ export const zGatewayLink = z.object({
]).readonly().optional()
});
-export const zGatewayLinkJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zGatewayLinkCsv = z.object({
method: z.string().optional(),
type: z.enum(['debug', 'payment']).optional(),
url: z.string().optional(),
@@ -288,6 +213,133 @@ export const zGatewayLinkJsonld = z.object({
]).readonly().optional()
});
+export const zGatewayLinkJsonld = z.object({
+ method: z.string().optional(),
+ type: z.enum(['debug', 'payment']).optional(),
+ url: z.string().optional(),
+ rel: z.string().nullish(),
+ org: z.enum([
+ 'instagram',
+ 'facebook',
+ 'github',
+ 'linkedin',
+ 'identica',
+ 'unknown'
+ ]).readonly().optional()
+});
+
+export const zHydraCollectionBaseSchemaNoPagination = z.object({
+ totalItems: z.int().gte(0).optional(),
+ search: z.object({
+ '@type': z.string().optional(),
+ template: z.string().optional(),
+ variableRepresentation: z.string().optional(),
+ mapping: z.array(z.object({
+ '@type': z.string().optional(),
+ variable: z.string().optional(),
+ property: z.string().nullish(),
+ required: z.boolean().optional()
+ })).optional()
+ }).optional()
+});
+
+export const zHydraCollectionBaseSchema = zHydraCollectionBaseSchemaNoPagination.and(z.object({
+ view: z.object({
+ '@id': z.string().optional(),
+ '@type': z.string().optional(),
+ first: z.string().nullish(),
+ last: z.string().nullish(),
+ previous: z.string().nullish(),
+ next: z.string().nullish()
+ }).optional()
+}));
+
+export const zHydraItemBaseSchema = z.object({
+ '@context': z.union([
+ z.string(),
+ z.object({
+ '@vocab': z.string(),
+ hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
+ })
+ ]).optional(),
+ '@id': z.string(),
+ '@type': z.string()
+});
+
+/**
+ * Addresses represent named locations that postal services can reach.
+ */
+export const zAddressJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().optional(),
+ user: z.string().optional(),
+ firstName: z.string().optional(),
+ lastName: z.string().optional(),
+ line1: z.string().optional(),
+ line2: z.string().nullish(),
+ city: z.string().optional(),
+ postCode: z.string().optional(),
+ country: z.string().optional(),
+ isDefault: z.boolean().optional()
+}));
+
+/**
+ * A Category, like in books, is a way of grouping resources by type, genre, audience, or subject, for example:
+ * science-fiction, biography, fantasy, etc.\
+ * \
+ * Categories can only be modified by users with the role "ROLE_ADMIN", but can usually
+ * be referenced by non-admin users in their own resources, such as Project owners.
+ */
+export const zCategoryJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.string().optional(),
+ slug: z.string().readonly().optional(),
+ name: z.string(),
+ locales: z.array(z.string()).readonly().optional()
+}));
+
+/**
+ * Unprocessable entity
+ */
+export const zConstraintViolationJsonld = zHydraItemBaseSchema.and(z.object({
+ status: z.int().optional().default(422),
+ violations: z.array(z.object({
+ propertyPath: z.string(),
+ message: z.string(),
+ code: z.string().optional(),
+ hint: z.string().optional(),
+ payload: z.record(z.string(), z.unknown()).optional()
+ })).optional(),
+ detail: z.string().readonly().optional(),
+ description: z.string().readonly().optional(),
+ type: z.string().readonly().optional(),
+ title: z.string().readonly().nullish(),
+ instance: z.string().readonly().nullish()
+}));
+
+/**
+ * A representation of common errors.
+ */
+export const zErrorJsonld = zHydraItemBaseSchema.and(z.object({
+ title: z.string().readonly().nullish(),
+ detail: z.string().readonly().nullish(),
+ status: z.int().nullish().default(400),
+ instance: z.string().readonly().nullish(),
+ type: z.string().readonly().optional(),
+ description: z.string().readonly().nullish()
+}));
+
+/**
+ * Gateways represent payment services used to perform the necessary payments for Transactions between Accounts.\
+ * \
+ * For each Gateway there is an internal implementation that handles the creation and validation of Transactions between Accounts.
+ * These implementations make use of external or internal services to gather the funds that are inside a Transaction,
+ * perform corroboration of funds and store the Transactions into the system.
+ */
+export const zGatewayJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+ supports: z.array(z.enum(['single', 'recurring'])).optional()
+}));
+
export const zLink = z.object({
url: z.string().optional(),
rel: z.string().nullish(),
@@ -301,16 +353,20 @@ export const zLink = z.object({
]).readonly().optional()
});
+export const zLinkCsv = z.object({
+ url: z.string().optional(),
+ rel: z.string().nullish(),
+ org: z.enum([
+ 'instagram',
+ 'facebook',
+ 'github',
+ 'linkedin',
+ 'identica',
+ 'unknown'
+ ]).readonly().optional()
+});
+
export const zLinkJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
url: z.string().optional(),
rel: z.string().nullish(),
org: z.enum([
@@ -349,24 +405,7 @@ export const zMatchCallSubmissionMatchCallSubmissionCreationDto = z.object({
/**
* MatchCallSubmissions represent the will of a Project to be held under a MatchCall and receive matchfunding financement.
*/
-export const zMatchCallSubmissionMatchCallSubmissionCreationDtoJsonld = z.object({
- call: z.string(),
- project: z.string()
-});
-
-/**
- * MatchCallSubmissions represent the will of a Project to be held under a MatchCall and receive matchfunding financement.
- */
-export const zMatchCallSubmissionJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zMatchCallSubmissionCsv = z.object({
id: z.int().readonly().optional(),
call: z.string().readonly().optional(),
project: z.string().readonly().optional(),
@@ -378,6 +417,36 @@ export const zMatchCallSubmissionJsonld = z.object({
]).optional().default('to_review')
});
+/**
+ * MatchCallSubmissions represent the will of a Project to be held under a MatchCall and receive matchfunding financement.
+ */
+export const zMatchCallSubmissionJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ call: z.string().readonly().optional(),
+ project: z.string().readonly().optional(),
+ status: z.enum([
+ 'to_review',
+ 'in_review',
+ 'accepted',
+ 'rejected'
+ ]).optional().default('to_review')
+});
+
+/**
+ * MatchCallSubmissions represent the will of a Project to be held under a MatchCall and receive matchfunding financement.
+ */
+export const zMatchCallSubmissionJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().optional(),
+ call: z.string().readonly().optional(),
+ project: z.string().readonly().optional(),
+ status: z.enum([
+ 'to_review',
+ 'in_review',
+ 'accepted',
+ 'rejected'
+ ]).optional().default('to_review')
+}));
+
/**
* A MatchFormula is a predefined code implementation for matching funds in Transactions under a MatchCall.
* MatchFormulas can be chosen by the managers in a MatchCall and their behaviour fine-tuned.
@@ -391,20 +460,20 @@ export const zMatchFormula = z.object({
* A MatchFormula is a predefined code implementation for matching funds in Transactions under a MatchCall.
* MatchFormulas can be chosen by the managers in a MatchCall and their behaviour fine-tuned.
*/
-export const zMatchFormulaJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zMatchFormulaCsv = z.object({
name: z.string().readonly().optional(),
expression: z.string().readonly().optional()
});
+/**
+ * A MatchFormula is a predefined code implementation for matching funds in Transactions under a MatchCall.
+ * MatchFormulas can be chosen by the managers in a MatchCall and their behaviour fine-tuned.
+ */
+export const zMatchFormulaJsonld = zHydraItemBaseSchema.and(z.object({
+ name: z.string().readonly().optional(),
+ expression: z.string().readonly().optional()
+}));
+
/**
* A MatchRule is a predefined code implementation for validating
* that a match making condition is met when there is a Charge to be matched.
@@ -418,20 +487,20 @@ export const zMatchRule = z.object({
* A MatchRule is a predefined code implementation for validating
* that a match making condition is met when there is a Charge to be matched.
*/
-export const zMatchRuleJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zMatchRuleCsv = z.object({
name: z.string().readonly().optional(),
description: z.string().readonly().optional()
});
+/**
+ * A MatchRule is a predefined code implementation for validating
+ * that a match making condition is met when there is a Charge to be matched.
+ */
+export const zMatchRuleJsonld = zHydraItemBaseSchema.and(z.object({
+ name: z.string().readonly().optional(),
+ description: z.string().readonly().optional()
+}));
+
export const zMoneyInput = z.object({
amount: z.int().gt(0),
currency: z.string()
@@ -469,7 +538,7 @@ export const zGatewayCheckoutCheckoutCreationDto = z.object({
export const zMatchStrategy = z.object({
id: z.int().readonly().optional(),
call: z.string(),
- ranking: z.int().gte(0).optional().default(0),
+ ranking: z.int().gte(0).optional(),
rules: z.array(z.string()).optional(),
formula: z.string(),
limit: zMoneyInput,
@@ -481,39 +550,6 @@ export const zMatchStrategy = z.object({
]).optional().default('charge')
});
-export const zMoneyInputJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
- amount: z.int().gt(0),
- currency: z.string()
-});
-
-export const zChargeCreationDtoJsonld = z.object({
- type: z.enum(['single', 'recurring']).default('single'),
- title: z.string(),
- description: z.string().nullish(),
- target: z.string(),
- money: zMoneyInputJsonld
-});
-
-/**
- * A GatewayCheckout represents a payment session with a Gateway.
- */
-export const zGatewayCheckoutCheckoutCreationDtoJsonld = z.object({
- gateway: z.string(),
- origin: z.string(),
- charges: z.array(zChargeCreationDtoJsonld).min(1),
- returnUrl: z.url(),
- refund: z.enum(['to_wallet', 'to_gateway']).optional().default('to_wallet')
-});
-
/**
* A MatchStrategy defines how will a MatchCall perform the match-making process.
* \
@@ -524,19 +560,70 @@ export const zGatewayCheckoutCheckoutCreationDtoJsonld = z.object({
* 3. The first valid MatchStrategy's formula function is passed the respective limit, factor and money of the MatchAgainst.
* 4. The result of the MatchStrategy formula function execution is put in a Transaction from the MatchCall to the Project.
*/
-export const zMatchStrategyJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zMatchStrategyJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ call: z.string().optional(),
+ ranking: z.int().gte(0).optional(),
+ rules: z.array(z.string()).optional(),
+ formula: z.string().optional(),
+ limit: zMoneyInput.optional(),
+ factor: z.number().gt(0).optional(),
+ against: z.enum([
+ 'charge',
+ 'budget_min',
+ 'budget_opt'
+ ]).optional().default('charge')
+});
+
+export const zMoneyInputCsv = z.object({
+ amount: z.int().gt(0),
+ currency: z.string()
+});
+
+/**
+ * A MatchStrategy defines how will a MatchCall perform the match-making process.
+ * \
+ * The match-making flow is:
+ * 1. A Project accepted in a MatchCall receives a successful Charge.
+ * 2. The match-making loads the MatchCall's MatchStrategies.
+ * 3. For each MatchStrategy the rules are executed, if one rule fails the match-making is cancelled for the strategy.
+ * 3. The first valid MatchStrategy's formula function is passed the respective limit, factor and money of the MatchAgainst.
+ * 4. The result of the MatchStrategy formula function execution is put in a Transaction from the MatchCall to the Project.
+ */
+export const zMatchStrategyCsv = z.object({
id: z.int().readonly().optional(),
call: z.string(),
- ranking: z.int().gte(0).optional().default(0),
+ ranking: z.int().gte(0).optional(),
+ rules: z.array(z.string()).optional(),
+ formula: z.string(),
+ limit: zMoneyInputCsv,
+ factor: z.number().gt(0),
+ against: z.enum([
+ 'charge',
+ 'budget_min',
+ 'budget_opt'
+ ]).optional().default('charge')
+});
+
+export const zMoneyInputJsonld = z.object({
+ amount: z.int().gt(0),
+ currency: z.string()
+});
+
+/**
+ * A MatchStrategy defines how will a MatchCall perform the match-making process.
+ * \
+ * The match-making flow is:
+ * 1. A Project accepted in a MatchCall receives a successful Charge.
+ * 2. The match-making loads the MatchCall's MatchStrategies.
+ * 3. For each MatchStrategy the rules are executed, if one rule fails the match-making is cancelled for the strategy.
+ * 3. The first valid MatchStrategy's formula function is passed the respective limit, factor and money of the MatchAgainst.
+ * 4. The result of the MatchStrategy formula function execution is put in a Transaction from the MatchCall to the Project.
+ */
+export const zMatchStrategyJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().optional(),
+ call: z.string(),
+ ranking: z.int().gte(0).optional(),
rules: z.array(z.string()).optional(),
formula: z.string(),
limit: zMoneyInputJsonld,
@@ -546,7 +633,7 @@ export const zMatchStrategyJsonld = z.object({
'budget_min',
'budget_opt'
]).optional().default('charge')
-});
+}));
/**
* Sometimes an Organization is behind a User account,
@@ -560,7 +647,22 @@ export const zOrganization = z.object({
user: z.string().readonly().optional(),
taxId: z.string().min(2),
legalName: z.string().min(1),
- businessName: z.string().min(1).optional()
+ businessName: z.string().min(1).optional(),
+ taxIdType: z.enum([
+ 'national_id',
+ 'passport',
+ 'other'
+ ]).nullish(),
+ legalForm: z.enum([
+ 'association',
+ 'foundation',
+ 'cooperative',
+ 'company',
+ 'self_employed',
+ 'public_administration',
+ 'other'
+ ]).nullish(),
+ publicEntity: z.boolean().optional()
});
/**
@@ -571,22 +673,88 @@ export const zOrganization = z.object({
* All Organization records are only visible to their respective owners and platform admins.
* Sensitive data is encrypted before being stored in the database.
*/
-export const zOrganizationJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zOrganizationCsv = z.object({
user: z.string().readonly().optional(),
taxId: z.string().min(2),
legalName: z.string().min(1),
- businessName: z.string().min(1).optional()
+ businessName: z.string().min(1).optional(),
+ taxIdType: z.enum([
+ 'national_id',
+ 'passport',
+ 'other'
+ ]).nullish(),
+ legalForm: z.enum([
+ 'association',
+ 'foundation',
+ 'cooperative',
+ 'company',
+ 'self_employed',
+ 'public_administration',
+ 'other'
+ ]).nullish(),
+ publicEntity: z.boolean().optional()
});
+/**
+ * Sometimes an Organization is behind a User account,
+ * we keep their data separated from the User record to allow for other User types,
+ * like the ones owned by an individual, to exist all at the same level.\
+ * \
+ * All Organization records are only visible to their respective owners and platform admins.
+ * Sensitive data is encrypted before being stored in the database.
+ */
+export const zOrganizationJsonMergePatch = z.object({
+ user: z.string().readonly().optional(),
+ taxId: z.string().min(2).optional(),
+ legalName: z.string().min(1).optional(),
+ businessName: z.string().min(1).optional(),
+ taxIdType: z.enum([
+ 'national_id',
+ 'passport',
+ 'other'
+ ]).nullish(),
+ legalForm: z.enum([
+ 'association',
+ 'foundation',
+ 'cooperative',
+ 'company',
+ 'self_employed',
+ 'public_administration',
+ 'other'
+ ]).nullish(),
+ publicEntity: z.boolean().optional()
+});
+
+/**
+ * Sometimes an Organization is behind a User account,
+ * we keep their data separated from the User record to allow for other User types,
+ * like the ones owned by an individual, to exist all at the same level.\
+ * \
+ * All Organization records are only visible to their respective owners and platform admins.
+ * Sensitive data is encrypted before being stored in the database.
+ */
+export const zOrganizationJsonld = zHydraItemBaseSchema.and(z.object({
+ user: z.string().readonly().optional(),
+ taxId: z.string().min(2),
+ legalName: z.string().min(1),
+ businessName: z.string().min(1).optional(),
+ taxIdType: z.enum([
+ 'national_id',
+ 'passport',
+ 'other'
+ ]).nullish(),
+ legalForm: z.enum([
+ 'association',
+ 'foundation',
+ 'cooperative',
+ 'company',
+ 'self_employed',
+ 'public_administration',
+ 'other'
+ ]).nullish(),
+ publicEntity: z.boolean().optional()
+}));
+
/**
* Most times a real person is behind a User account,
* we keep their data separated from the User record to allow for other User types,
@@ -599,7 +767,19 @@ export const zPerson = z.object({
user: z.string().readonly().optional(),
taxId: z.string().min(2).optional(),
firstName: z.string().min(1).optional(),
- lastName: z.string().min(1).optional()
+ lastName: z.string().min(1).optional(),
+ taxIdType: z.enum([
+ 'national_id',
+ 'passport',
+ 'other'
+ ]).nullish(),
+ birthYear: z.int().gte(1900).nullish(),
+ gender: z.enum([
+ 'female',
+ 'male',
+ 'non_binary',
+ 'other'
+ ]).nullish()
});
/**
@@ -610,41 +790,121 @@ export const zPerson = z.object({
* All Person records are only visible to their respective owners and platform admins.
* Sensitive personal data is encrypted before being stored in the database.
*/
-export const zPersonJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zPersonCsv = z.object({
user: z.string().readonly().optional(),
taxId: z.string().min(2).optional(),
firstName: z.string().min(1).optional(),
- lastName: z.string().min(1).optional()
+ lastName: z.string().min(1).optional(),
+ taxIdType: z.enum([
+ 'national_id',
+ 'passport',
+ 'other'
+ ]).nullish(),
+ birthYear: z.int().gte(1900).nullish(),
+ gender: z.enum([
+ 'female',
+ 'male',
+ 'non_binary',
+ 'other'
+ ]).nullish()
});
+/**
+ * Most times a real person is behind a User account,
+ * we keep their data separated from the User record to allow for other User types,
+ * like the ones owned by an organization, to exist all at the same level.\
+ * \
+ * All Person records are only visible to their respective owners and platform admins.
+ * Sensitive personal data is encrypted before being stored in the database.
+ */
+export const zPersonJsonMergePatch = z.object({
+ user: z.string().readonly().optional(),
+ taxId: z.string().min(2).optional(),
+ firstName: z.string().min(1).optional(),
+ lastName: z.string().min(1).optional(),
+ taxIdType: z.enum([
+ 'national_id',
+ 'passport',
+ 'other'
+ ]).nullish(),
+ birthYear: z.int().gte(1900).nullish(),
+ gender: z.enum([
+ 'female',
+ 'male',
+ 'non_binary',
+ 'other'
+ ]).nullish()
+});
+
+/**
+ * Most times a real person is behind a User account,
+ * we keep their data separated from the User record to allow for other User types,
+ * like the ones owned by an organization, to exist all at the same level.\
+ * \
+ * All Person records are only visible to their respective owners and platform admins.
+ * Sensitive personal data is encrypted before being stored in the database.
+ */
+export const zPersonJsonld = zHydraItemBaseSchema.and(z.object({
+ user: z.string().readonly().optional(),
+ taxId: z.string().min(2).optional(),
+ firstName: z.string().min(1).optional(),
+ lastName: z.string().min(1).optional(),
+ taxIdType: z.enum([
+ 'national_id',
+ 'passport',
+ 'other'
+ ]).nullish(),
+ birthYear: z.int().gte(1900).nullish(),
+ gender: z.enum([
+ 'female',
+ 'male',
+ 'non_binary',
+ 'other'
+ ]).nullish()
+}));
+
export const zPing = z.object({
time: z.int().optional(),
message: z.string().optional()
});
-export const zPingJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zPingCsv = z.object({
time: z.int().optional(),
message: z.string().optional()
});
+export const zPingJsonld = zHydraItemBaseSchema.and(z.object({
+ time: z.int().optional(),
+ message: z.string().optional()
+}));
+
+/**
+ * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
+ */
+export const zProjectTotalizedMoney = z.object({
+ amount: z.int().optional(),
+ currency: z.string().optional(),
+ length: z.int().optional()
+});
+
+/**
+ * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
+ */
+export const zProjectTotalizedMoneyCsv = z.object({
+ amount: z.int().optional(),
+ currency: z.string().optional(),
+ length: z.int().optional()
+});
+
+/**
+ * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
+ */
+export const zProjectTotalizedMoneyJsonld = zHydraItemBaseSchema.and(z.object({
+ amount: z.int().optional(),
+ currency: z.string().optional(),
+ length: z.int().optional()
+}));
+
/**
* A Project's budget is composed via BudgetItem records.\
* \
@@ -670,16 +930,47 @@ export const zProjectBudgetItem = z.object({
* \
* Each BudgetItem describes one specific monetary necessity. The total budget of a Project is then calculated from the related BudgetItems.
*/
-export const zProjectBudgetItemJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
+export const zProjectBudgetItemCsv = z.object({
+ id: z.int().readonly().optional(),
+ project: z.string(),
+ type: z.enum([
+ 'infrastructure',
+ 'material',
+ 'task'
+ ]),
+ title: z.string(),
+ description: z.string(),
+ money: zMoneyInputCsv,
+ deadline: z.enum(['minimum', 'optimum']),
+ locales: z.array(z.string()).readonly().optional()
+});
+
+/**
+ * A Project's budget is composed via BudgetItem records.\
+ * \
+ * Each BudgetItem describes one specific monetary necessity. The total budget of a Project is then calculated from the related BudgetItems.
+ */
+export const zProjectBudgetItemJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ project: z.string().optional(),
+ type: z.enum([
+ 'infrastructure',
+ 'material',
+ 'task'
]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+ title: z.string().optional(),
+ description: z.string().optional(),
+ money: zMoneyInput.optional(),
+ deadline: z.enum(['minimum', 'optimum']).optional(),
+ locales: z.array(z.string()).readonly().optional()
+});
+
+/**
+ * A Project's budget is composed via BudgetItem records.\
+ * \
+ * Each BudgetItem describes one specific monetary necessity. The total budget of a Project is then calculated from the related BudgetItems.
+ */
+export const zProjectBudgetItemJsonld = zHydraItemBaseSchema.and(z.object({
id: z.int().readonly().optional(),
project: z.string(),
type: z.enum([
@@ -692,7 +983,7 @@ export const zProjectBudgetItemJsonld = z.object({
money: zMoneyInputJsonld,
deadline: z.enum(['minimum', 'optimum']),
locales: z.array(z.string()).readonly().optional()
-});
+}));
export const zProjectCalendar = z.object({
release: z.iso.datetime().nullable(),
@@ -700,16 +991,13 @@ export const zProjectCalendar = z.object({
optimum: z.iso.datetime().nullish()
});
+export const zProjectCalendarCsv = z.object({
+ release: z.iso.datetime().nullable(),
+ minimum: z.iso.datetime().nullish(),
+ optimum: z.iso.datetime().nullish()
+});
+
export const zProjectCalendarJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
release: z.iso.datetime().nullable(),
minimum: z.iso.datetime().nullish(),
optimum: z.iso.datetime().nullish()
@@ -723,7 +1011,7 @@ export const zProjectCollaboration = z.object({
project: z.string(),
title: z.string(),
description: z.string(),
- isFulfilled: z.boolean().default(false),
+ isFulfilled: z.boolean(),
locales: z.array(z.string()).readonly().optional(),
dateCreated: z.iso.datetime().readonly().optional(),
dateUpdated: z.iso.datetime().readonly().optional()
@@ -732,26 +1020,45 @@ export const zProjectCollaboration = z.object({
/**
* ProjectCollaborations are used as requests for help on specific problems that the Project might face and cannot be budgeted-in.
*/
-export const zProjectCollaborationJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectCollaborationCsv = z.object({
id: z.int().readonly().optional(),
project: z.string(),
title: z.string(),
description: z.string(),
- isFulfilled: z.boolean().default(false),
+ isFulfilled: z.boolean(),
locales: z.array(z.string()).readonly().optional(),
dateCreated: z.iso.datetime().readonly().optional(),
dateUpdated: z.iso.datetime().readonly().optional()
});
+/**
+ * ProjectCollaborations are used as requests for help on specific problems that the Project might face and cannot be budgeted-in.
+ */
+export const zProjectCollaborationJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ project: z.string().optional(),
+ title: z.string().optional(),
+ description: z.string().optional(),
+ isFulfilled: z.boolean().optional(),
+ locales: z.array(z.string()).readonly().optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * ProjectCollaborations are used as requests for help on specific problems that the Project might face and cannot be budgeted-in.
+ */
+export const zProjectCollaborationJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().optional(),
+ project: z.string(),
+ title: z.string(),
+ description: z.string(),
+ isFulfilled: z.boolean(),
+ locales: z.array(z.string()).readonly().optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+}));
+
/**
* ProjectCollaborationsCandidacies represent one User's willingness to fill in for a ProjectCollaboration.
*/
@@ -773,16 +1080,7 @@ export const zProjectCollaborationCandidacy = z.object({
/**
* ProjectCollaborationsCandidacies represent one User's willingness to fill in for a ProjectCollaboration.
*/
-export const zProjectCollaborationCandidacyJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectCollaborationCandidacyCsv = z.object({
id: z.int().readonly().optional(),
collaboration: z.string(),
user: z.string(),
@@ -797,6 +1095,42 @@ export const zProjectCollaborationCandidacyJsonld = z.object({
dateUpdated: z.iso.datetime().readonly().optional()
});
+/**
+ * ProjectCollaborationsCandidacies represent one User's willingness to fill in for a ProjectCollaboration.
+ */
+export const zProjectCollaborationCandidacyJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ collaboration: z.string().optional(),
+ user: z.string().optional(),
+ description: z.string().optional(),
+ status: z.enum([
+ 'to_review',
+ 'in_review',
+ 'rejected',
+ 'approved'
+ ]).optional().default('to_review'),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * ProjectCollaborationsCandidacies represent one User's willingness to fill in for a ProjectCollaboration.
+ */
+export const zProjectCollaborationCandidacyJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().optional(),
+ collaboration: z.string(),
+ user: z.string(),
+ description: z.string(),
+ status: z.enum([
+ 'to_review',
+ 'in_review',
+ 'rejected',
+ 'approved'
+ ]).default('to_review'),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+}));
+
/**
* ProjectReviews are launched as health-checks for Projects.\
* \
@@ -827,16 +1161,7 @@ export const zProjectReview = z.object({
* - `to_campaign_review`: will launch a related ProjectReview of `campaign` type
* - `to_financial_review`: will launch a related ProjectReview of `financial` type.
*/
-export const zProjectReviewJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectReviewCsv = z.object({
id: z.int().readonly().optional(),
project: z.string().optional(),
reviewer: z.string().optional(),
@@ -846,6 +1171,46 @@ export const zProjectReviewJsonld = z.object({
dateUpdated: z.iso.datetime().readonly().optional()
});
+/**
+ * ProjectReviews are launched as health-checks for Projects.\
+ * \
+ * The reviews are focused on certain aspects of a Project's lifecycle. The types `campaign` and `financial` reviews
+ * are to evaluate the fitness of a Project before being greenlit for campaigning or the legitimacy of their raised funds, respectively.\
+ * \
+ * ProjectReview resources cannot be manually created, they are created automatically when a Project moves into a "to review" status:
+ * - `to_campaign_review`: will launch a related ProjectReview of `campaign` type
+ * - `to_financial_review`: will launch a related ProjectReview of `financial` type.
+ */
+export const zProjectReviewJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ project: z.string().optional(),
+ reviewer: z.string().optional(),
+ type: z.enum(['campaign', 'financial']).optional(),
+ areas: z.array(z.string()).optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * ProjectReviews are launched as health-checks for Projects.\
+ * \
+ * The reviews are focused on certain aspects of a Project's lifecycle. The types `campaign` and `financial` reviews
+ * are to evaluate the fitness of a Project before being greenlit for campaigning or the legitimacy of their raised funds, respectively.\
+ * \
+ * ProjectReview resources cannot be manually created, they are created automatically when a Project moves into a "to review" status:
+ * - `to_campaign_review`: will launch a related ProjectReview of `campaign` type
+ * - `to_financial_review`: will launch a related ProjectReview of `financial` type.
+ */
+export const zProjectReviewJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().optional(),
+ project: z.string().optional(),
+ reviewer: z.string().optional(),
+ type: z.enum(['campaign', 'financial']).optional(),
+ areas: z.array(z.string()).optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+}));
+
/**
* A ProjectReviewArea represents one specific topic of evaluation for ProjectReviews.\
* \
@@ -875,16 +1240,7 @@ export const zProjectReviewArea = z.object({
* Each area holds an associated risk, which represents the trust the reviewer has for the reviewed Project's health in that area,
* areas can only be updated by the assigned reviewer or an user with `ROLE_ADMIN`.
*/
-export const zProjectReviewAreaJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectReviewAreaCsv = z.object({
id: z.int().readonly().optional(),
review: z.string().optional(),
title: z.string().optional(),
@@ -899,6 +1255,50 @@ export const zProjectReviewAreaJsonld = z.object({
dateUpdated: z.iso.datetime().readonly().optional()
});
+/**
+ * A ProjectReviewArea represents one specific topic of evaluation for ProjectReviews.\
+ * \
+ * Conversations, feedback and evolution of the ProjectReview must happen around specific areas of review.\
+ * Each area holds an associated risk, which represents the trust the reviewer has for the reviewed Project's health in that area,
+ * areas can only be updated by the assigned reviewer or an user with `ROLE_ADMIN`.
+ */
+export const zProjectReviewAreaJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ review: z.string().optional(),
+ title: z.string().optional(),
+ summary: z.string().optional(),
+ risk: z.enum([
+ 'low',
+ 'mid',
+ 'high'
+ ]).optional(),
+ comments: z.array(z.string()).optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * A ProjectReviewArea represents one specific topic of evaluation for ProjectReviews.\
+ * \
+ * Conversations, feedback and evolution of the ProjectReview must happen around specific areas of review.\
+ * Each area holds an associated risk, which represents the trust the reviewer has for the reviewed Project's health in that area,
+ * areas can only be updated by the assigned reviewer or an user with `ROLE_ADMIN`.
+ */
+export const zProjectReviewAreaJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().optional(),
+ review: z.string().optional(),
+ title: z.string().optional(),
+ summary: z.string().optional(),
+ risk: z.enum([
+ 'low',
+ 'mid',
+ 'high'
+ ]).optional(),
+ comments: z.array(z.string()).optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+}));
+
/**
* ProjectReviewComments hold the conversation between the reviewer and the reviewed Project owner.
*/
@@ -914,16 +1314,7 @@ export const zProjectReviewComment = z.object({
/**
* ProjectReviewComments hold the conversation between the reviewer and the reviewed Project owner.
*/
-export const zProjectReviewCommentJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectReviewCommentCsv = z.object({
id: z.int().readonly().optional(),
area: z.string(),
author: z.string(),
@@ -932,6 +1323,18 @@ export const zProjectReviewCommentJsonld = z.object({
dateUpdated: z.iso.datetime().readonly().optional()
});
+/**
+ * ProjectReviewComments hold the conversation between the reviewer and the reviewed Project owner.
+ */
+export const zProjectReviewCommentJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().optional(),
+ area: z.string(),
+ author: z.string(),
+ body: z.string().min(15),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+}));
+
/**
* A ProjectReward is something the Project owner wishes to give in exchange for contributions to their Project.
*/
@@ -942,11 +1345,11 @@ export const zProjectReward = z.object({
description: z.string().nullable(),
cover: z.url().optional(),
money: zMoneyInput,
- hasShipping: z.boolean().default(false),
- isFinite: z.boolean().default(false),
+ hasShipping: z.boolean(),
+ isFinite: z.boolean(),
unitsTotal: z.int().nullish(),
- unitsClaimed: z.int().readonly().optional().default(0),
- unitsAvailable: z.int().readonly().optional().default(0),
+ unitsClaimed: z.int().readonly().optional(),
+ unitsAvailable: z.int().readonly().optional(),
locales: z.array(z.string()).readonly().optional(),
dateCreated: z.iso.datetime().readonly().optional(),
dateUpdated: z.iso.datetime().readonly().optional()
@@ -955,31 +1358,62 @@ export const zProjectReward = z.object({
/**
* A ProjectReward is something the Project owner wishes to give in exchange for contributions to their Project.
*/
-export const zProjectRewardJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectRewardCsv = z.object({
+ id: z.int().readonly().optional(),
+ project: z.string(),
+ title: z.string(),
+ description: z.string().nullable(),
+ cover: z.url().optional(),
+ money: zMoneyInputCsv,
+ hasShipping: z.boolean(),
+ isFinite: z.boolean(),
+ unitsTotal: z.int().nullish(),
+ unitsClaimed: z.int().readonly().optional(),
+ unitsAvailable: z.int().readonly().optional(),
+ locales: z.array(z.string()).readonly().optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * A ProjectReward is something the Project owner wishes to give in exchange for contributions to their Project.
+ */
+export const zProjectRewardJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ project: z.string().optional(),
+ title: z.string().optional(),
+ description: z.string().nullish(),
+ cover: z.url().optional(),
+ money: zMoneyInput.optional(),
+ hasShipping: z.boolean().optional(),
+ isFinite: z.boolean().optional(),
+ unitsTotal: z.int().nullish(),
+ unitsClaimed: z.int().readonly().optional(),
+ unitsAvailable: z.int().readonly().optional(),
+ locales: z.array(z.string()).readonly().optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * A ProjectReward is something the Project owner wishes to give in exchange for contributions to their Project.
+ */
+export const zProjectRewardJsonld = zHydraItemBaseSchema.and(z.object({
id: z.int().readonly().optional(),
project: z.string(),
title: z.string(),
description: z.string().nullable(),
cover: z.url().optional(),
money: zMoneyInputJsonld,
- hasShipping: z.boolean().default(false),
- isFinite: z.boolean().default(false),
+ hasShipping: z.boolean(),
+ isFinite: z.boolean(),
unitsTotal: z.int().nullish(),
- unitsClaimed: z.int().readonly().optional().default(0),
- unitsAvailable: z.int().readonly().optional().default(0),
+ unitsClaimed: z.int().readonly().optional(),
+ unitsAvailable: z.int().readonly().optional(),
locales: z.array(z.string()).readonly().optional(),
dateCreated: z.iso.datetime().readonly().optional(),
dateUpdated: z.iso.datetime().readonly().optional()
-});
+}));
/**
* A ProjectRewardClaim represents the will of an User who wishes to obtain one ProjectReward.\
@@ -1014,19 +1448,7 @@ export const zProjectRewardClaimRewardClaimCreationDto = z.object({
* Once created ProjectRewardClaims can only be deleted by the User who owns it,
* while their status can only be updated by the User who owns the Project of the claimed ProjectReward.
*/
-export const zProjectRewardClaimRewardClaimCreationDtoJsonld = z.object({
- charge: z.string(),
- reward: z.string(),
- address: z.string().nullish()
-});
-
-/**
- * A ProjectRewardClaim represents the will of an User who wishes to obtain one ProjectReward.\
- * \
- * Once created ProjectRewardClaims can only be deleted by the User who owns it,
- * while their status can only be updated by the User who owns the Project of the claimed ProjectReward.
- */
-export const zProjectRewardClaimRewardClaimUpdationDto = z.object({
+export const zProjectRewardClaimRewardClaimUpdationDtoJsonMergePatch = z.object({
status: z.enum(['in_pending', 'fulfilled']).optional(),
address: z.string().nullish()
});
@@ -1037,23 +1459,29 @@ export const zProjectRewardClaimRewardClaimUpdationDto = z.object({
* Once created ProjectRewardClaims can only be deleted by the User who owns it,
* while their status can only be updated by the User who owns the Project of the claimed ProjectReward.
*/
-export const zProjectRewardClaimJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectRewardClaimCsv = z.object({
+ id: z.int().readonly().optional(),
+ owner: z.string().optional(),
+ charge: z.string().optional(),
+ reward: z.string().optional(),
+ status: z.enum(['in_pending', 'fulfilled']).optional(),
+ address: zAddressCsv.nullish()
+});
+
+/**
+ * A ProjectRewardClaim represents the will of an User who wishes to obtain one ProjectReward.\
+ * \
+ * Once created ProjectRewardClaims can only be deleted by the User who owns it,
+ * while their status can only be updated by the User who owns the Project of the claimed ProjectReward.
+ */
+export const zProjectRewardClaimJsonld = zHydraItemBaseSchema.and(z.object({
id: z.int().readonly().optional(),
owner: z.string().optional(),
charge: z.string().optional(),
reward: z.string().optional(),
status: z.enum(['in_pending', 'fulfilled']).optional(),
address: zAddressJsonld.nullish()
-});
+}));
/**
* ProjectSupports gather Transactions going from one same origin to one same Project.\
@@ -1073,14 +1501,24 @@ export const zProjectSupportTotalizedMoney = z.object({
* MatchCalls specially might make several different Transactions to the same Project,
* but their ProjectSupport remains the same just with updated money.
*/
-export const zProjectSupportTotalizedMoneyJsonld = z.object({
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectSupportTotalizedMoneyCsv = z.object({
amount: z.int().optional(),
currency: z.string().optional(),
length: z.int().optional()
});
+/**
+ * ProjectSupports gather Transactions going from one same origin to one same Project.\
+ * \
+ * MatchCalls specially might make several different Transactions to the same Project,
+ * but their ProjectSupport remains the same just with updated money.
+ */
+export const zProjectSupportTotalizedMoneyJsonld = zHydraItemBaseSchema.and(z.object({
+ amount: z.int().optional(),
+ currency: z.string().optional(),
+ length: z.int().optional()
+}));
+
/**
* A ProjectUpdate offers records of significant news during a Project's life.\
* \
@@ -1107,16 +1545,7 @@ export const zProjectUpdate = z.object({
* Updates can be for outstanding donation amounts, achievement of goals or thresholds,
* or any other body of information that the Project owner(s) may wish to make public to the Project's audience.
*/
-export const zProjectUpdateJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectUpdateCsv = z.object({
id: z.int().readonly().optional(),
project: z.string(),
title: z.string(),
@@ -1130,22 +1559,59 @@ export const zProjectUpdateJsonld = z.object({
dateUpdated: z.iso.datetime().readonly().optional()
});
+/**
+ * A ProjectUpdate offers records of significant news during a Project's life.\
+ * \
+ * Updates can be for outstanding donation amounts, achievement of goals or thresholds,
+ * or any other body of information that the Project owner(s) may wish to make public to the Project's audience.
+ */
+export const zProjectUpdateJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ project: z.string().optional(),
+ title: z.string().optional(),
+ subtitle: z.string().optional(),
+ body: z.string().optional(),
+ date: z.iso.datetime().optional().default('now'),
+ cover: z.url().optional(),
+ author: z.string().readonly().nullish(),
+ locales: z.array(z.string()).readonly().optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * A ProjectUpdate offers records of significant news during a Project's life.\
+ * \
+ * Updates can be for outstanding donation amounts, achievement of goals or thresholds,
+ * or any other body of information that the Project owner(s) may wish to make public to the Project's audience.
+ */
+export const zProjectUpdateJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().optional(),
+ project: z.string(),
+ title: z.string(),
+ subtitle: z.string(),
+ body: z.string(),
+ date: z.iso.datetime().optional().default('now'),
+ cover: z.url().optional(),
+ author: z.string().readonly().nullish(),
+ locales: z.array(z.string()).readonly().optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+}));
+
export const zProjectVideo = z.object({
src: z.string().nullish(),
cover: z.string().nullish(),
thumbnail: z.string().nullish()
});
+export const zProjectVideoCsv = z.object({
+ src: z.string().nullish(),
+ cover: z.string().nullish(),
+ thumbnail: z.string().nullish()
+});
+
export const zProjectVideoJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
src: z.string().nullish(),
cover: z.string().nullish(),
thumbnail: z.string().nullish()
@@ -1191,6 +1657,39 @@ export const zMatchCall = z.object({
]).optional().default('in_editing')
});
+/**
+ * A MatchCall is a managed event which accepts MatchCallSubmissions from Projects to receive *matchfunding* financement.
+ * This means money going to a Project in a MatchCall can be matched with funds from the MatchCall accounting.
+ * \
+ * \
+ * MatchCallSubmissions from Projects can be accepted or rejected by the managers.
+ * \
+ * \
+ * How and when does a MatchCall match funds is determined by the MatchStrategy.
+ * Everytime there is a Charge item going to a Project accepted in a MatchCall the strategy is evaluated for matching.
+ * The strategy defines a series of rules that determine if the Charge is eligible for triggering the matching of funds.
+ * When a Charge is to be matched the strategy uses a MatchFormula,
+ * which is a predefined implementation for common mathematical operations used to match money.
+ * The formula is fine-tuned in the strategy by defining the variables in the formula.
+ */
+export const zMatchCallJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ accounting: z.string().readonly().optional(),
+ strategies: z.array(z.string()).readonly().optional(),
+ submissions: z.array(z.string()).readonly().optional(),
+ managers: z.array(z.string()).optional(),
+ title: z.string().optional(),
+ description: z.string().optional(),
+ territory: zTerritory.optional(),
+ status: z.enum([
+ 'in_editing',
+ 'in_calling',
+ 'in_matchmaking',
+ 'to_closed',
+ 'closed'
+ ]).optional().default('in_editing')
+});
+
/**
* Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
*/
@@ -1226,7 +1725,7 @@ export const zProjectProjectCreationDto = z.object({
/**
* Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
*/
-export const zProjectProjectUpdationDto = z.object({
+export const zProjectProjectUpdationDtoJsonMergePatch = z.object({
id: z.int().readonly().optional(),
title: z.string().min(3).regex(/^(.*[a-zA-Z]{1,}.*)$/).optional(),
subtitle: z.string().optional(),
@@ -1263,16 +1762,7 @@ export const zProjectProjectUpdationDto = z.object({
]).optional()
});
-export const zTerritoryJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zTerritoryCsv = z.object({
country: z.string().nullable(),
subLvl1: z.string().nullish(),
subLvl2: z.string().nullish(),
@@ -1294,16 +1784,47 @@ export const zTerritoryJsonld = z.object({
* which is a predefined implementation for common mathematical operations used to match money.
* The formula is fine-tuned in the strategy by defining the variables in the formula.
*/
-export const zMatchCallJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zMatchCallCsv = z.object({
+ id: z.int().readonly().optional(),
+ accounting: z.string().readonly().optional(),
+ strategies: z.array(z.string()).readonly().optional(),
+ submissions: z.array(z.string()).readonly().optional(),
+ managers: z.array(z.string()).optional(),
+ title: z.string(),
+ description: z.string().optional(),
+ territory: zTerritoryCsv,
+ status: z.enum([
+ 'in_editing',
+ 'in_calling',
+ 'in_matchmaking',
+ 'to_closed',
+ 'closed'
+ ]).optional().default('in_editing')
+});
+
+export const zTerritoryJsonld = z.object({
+ country: z.string().nullable(),
+ subLvl1: z.string().nullish(),
+ subLvl2: z.string().nullish(),
+ address: z.string().nullish()
+});
+
+/**
+ * A MatchCall is a managed event which accepts MatchCallSubmissions from Projects to receive *matchfunding* financement.
+ * This means money going to a Project in a MatchCall can be matched with funds from the MatchCall accounting.
+ * \
+ * \
+ * MatchCallSubmissions from Projects can be accepted or rejected by the managers.
+ * \
+ * \
+ * How and when does a MatchCall match funds is determined by the MatchStrategy.
+ * Everytime there is a Charge item going to a Project accepted in a MatchCall the strategy is evaluated for matching.
+ * The strategy defines a series of rules that determine if the Charge is eligible for triggering the matching of funds.
+ * When a Charge is to be matched the strategy uses a MatchFormula,
+ * which is a predefined implementation for common mathematical operations used to match money.
+ * The formula is fine-tuned in the strategy by defining the variables in the formula.
+ */
+export const zMatchCallJsonld = zHydraItemBaseSchema.and(z.object({
id: z.int().readonly().optional(),
accounting: z.string().readonly().optional(),
strategies: z.array(z.string()).readonly().optional(),
@@ -1319,39 +1840,7 @@ export const zMatchCallJsonld = z.object({
'to_closed',
'closed'
]).optional().default('in_editing')
-});
-
-/**
- * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
- */
-export const zProjectProjectCreationDtoJsonld = z.object({
- title: z.string().min(3).regex(/^(.*[a-zA-Z]{1,}.*)$/),
- subtitle: z.string(),
- categories: z.array(z.string()).min(1).max(2),
- themes: z.array(z.string()).max(1).optional(),
- territory: zTerritoryJsonld,
- calendar: zProjectCalendarJsonld,
- status: z.enum([
- 'in_draft',
- 'to_campaign_review',
- 'in_campaign_review',
- 'in_campaign_review.to_change',
- 'in_campaign_review.to_review',
- 'campaign_review.rejected',
- 'to_campaign',
- 'in_campaign',
- 'campaign.failed',
- 'campaign.cancelled',
- 'to_funding_review',
- 'in_funding_review',
- 'in_funding_review.to_change',
- 'in_funding_review.to_review',
- 'funding_review.rejected',
- 'to_funding',
- 'in_funding',
- 'funding.paid'
- ]).readonly().optional().default('in_draft')
-});
+}));
/**
* A Theme, like in books, works as a "topic intent" grouping, for example:
@@ -1374,22 +1863,41 @@ export const zTheme = z.object({
* Themes can only be modified by users with the role "ROLE_ADMIN", but can usually
* be referenced by non-admin users in their own resources, such as Project owners.
*/
-export const zThemeJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zThemeCsv = z.object({
id: z.string().optional(),
slug: z.string().readonly().optional(),
name: z.string(),
locales: z.array(z.string()).readonly().optional()
});
+/**
+ * A Theme, like in books, works as a "topic intent" grouping, for example:
+ * friendship, good vs. evil, power and corruption, etc.\
+ * \
+ * Themes can only be modified by users with the role "ROLE_ADMIN", but can usually
+ * be referenced by non-admin users in their own resources, such as Project owners.
+ */
+export const zThemeJsonMergePatch = z.object({
+ id: z.string().optional(),
+ slug: z.string().readonly().optional(),
+ name: z.string().optional(),
+ locales: z.array(z.string()).readonly().optional()
+});
+
+/**
+ * A Theme, like in books, works as a "topic intent" grouping, for example:
+ * friendship, good vs. evil, power and corruption, etc.\
+ * \
+ * Themes can only be modified by users with the role "ROLE_ADMIN", but can usually
+ * be referenced by non-admin users in their own resources, such as Project owners.
+ */
+export const zThemeJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.string().optional(),
+ slug: z.string().readonly().optional(),
+ name: z.string(),
+ locales: z.array(z.string()).readonly().optional()
+}));
+
/**
* Unlike other Money recipients a Tipjar receives money with no further goal.\
* \
@@ -1406,21 +1914,34 @@ export const zTipjar = z.object({
* \
* Tips to the platform owners and other no-purpose money can target a Tipjar.
*/
-export const zTipjarJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zTipjarCsv = z.object({
id: z.int().readonly().optional(),
accounting: z.string().readonly().optional(),
name: z.string()
});
+/**
+ * Unlike other Money recipients a Tipjar receives money with no further goal.\
+ * \
+ * Tips to the platform owners and other no-purpose money can target a Tipjar.
+ */
+export const zTipjarJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ accounting: z.string().readonly().optional(),
+ name: z.string().optional()
+});
+
+/**
+ * Unlike other Money recipients a Tipjar receives money with no further goal.\
+ * \
+ * Tips to the platform owners and other no-purpose money can target a Tipjar.
+ */
+export const zTipjarJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().optional(),
+ accounting: z.string().readonly().optional(),
+ name: z.string()
+}));
+
export const zTotalizedMoney = z.object({
amount: z.int().optional(),
currency: z.string().optional(),
@@ -1435,16 +1956,7 @@ export const zGatewayChargeChargesTotalsDto = z.object({
money: zTotalizedMoney.optional()
});
-export const zTotalizedMoneyJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zTotalizedMoneyCsv = z.object({
amount: z.int().optional(),
currency: z.string().optional(),
length: z.int().optional()
@@ -1453,28 +1965,36 @@ export const zTotalizedMoneyJsonld = z.object({
/**
* A Charge represents a payment item to be included in a Checkout for payment at a Gateway.
*/
-export const zGatewayChargeChargesTotalsDtoJsonld = z.object({
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zGatewayChargeChargesTotalsDtoCsv = z.object({
+ projects: z.int().optional(),
+ money: zTotalizedMoneyCsv.optional()
+});
+
+export const zTotalizedMoneyJsonld = z.object({
+ amount: z.int().optional(),
+ currency: z.string().optional(),
+ length: z.int().optional()
+});
+
+/**
+ * A Charge represents a payment item to be included in a Checkout for payment at a Gateway.
+ */
+export const zGatewayChargeChargesTotalsDtoJsonld = zHydraItemBaseSchema.and(z.object({
projects: z.int().optional(),
money: zTotalizedMoneyJsonld.optional()
-});
+}));
export const zTracking = z.object({
title: z.string().optional(),
value: z.string().optional()
});
+export const zTrackingCsv = z.object({
+ title: z.string().optional(),
+ value: z.string().optional()
+});
+
export const zTrackingJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
title: z.string().optional(),
value: z.string().optional()
});
@@ -1499,6 +2019,18 @@ export const zUser = z.object({
links: z.array(zLink).readonly().optional(),
territory: zTerritory.optional(),
description: z.string().optional(),
+ shareLocation: z.boolean().optional(),
+ isAnonymous: z.boolean().optional(),
+ referralSource: z.enum([
+ 'search_engine',
+ 'social_media',
+ 'friend',
+ 'press',
+ 'event',
+ 'other'
+ ]).nullish(),
+ preferredCategories: z.array(z.string()).optional(),
+ preferredThemes: z.array(z.string()).optional(),
dateCreated: z.iso.datetime().readonly().optional(),
dateUpdated: z.iso.datetime().readonly().optional()
});
@@ -1515,16 +2047,7 @@ export const zUserUserSignupDto = z.object({
/**
* Users represent people who interact with the platform.
*/
-export const zUserUserSignupDtoJsonld = z.object({
- email: z.email(),
- password: z.string().min(8),
- type: z.enum(['individual', 'organization']).default('individual')
-});
-
-/**
- * Users represent people who interact with the platform.
- */
-export const zUserUserUpdationDto = z.object({
+export const zUserUserUpdationDtoJsonMergePatch = z.object({
handle: z.string().min(4).max(30).regex(/^([a-z0-9_]+)$/).optional(),
email: z.email().optional(),
password: z.string().min(8).optional(),
@@ -1533,22 +2056,61 @@ export const zUserUserUpdationDto = z.object({
roles: z.array(z.string()).optional(),
links: z.array(z.string()).optional(),
territory: zTerritory.optional(),
- description: z.string().optional()
+ description: z.string().optional(),
+ shareLocation: z.boolean().optional(),
+ isAnonymous: z.boolean().optional(),
+ referralSource: z.enum([
+ 'search_engine',
+ 'social_media',
+ 'friend',
+ 'press',
+ 'event',
+ 'other'
+ ]).nullish(),
+ preferredCategories: z.array(z.string()).optional(),
+ preferredThemes: z.array(z.string()).optional()
});
/**
* Users represent people who interact with the platform.
*/
-export const zUserJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zUserCsv = z.object({
+ id: z.int().readonly().optional(),
+ handle: z.string().min(4).max(30).regex(/^([a-z0-9_]+)$/),
+ email: z.email(),
+ emailConfirmed: z.boolean().readonly().optional(),
+ avatar: z.url().optional(),
+ type: z.enum(['individual', 'organization']).optional(),
+ roles: z.array(z.string()).optional(),
+ displayName: z.string().readonly().optional(),
+ person: z.string().readonly().optional(),
+ organization: z.string().readonly().nullish(),
+ accounting: z.string().readonly().optional(),
+ projects: z.array(z.string()).readonly().optional(),
+ active: z.boolean().readonly().optional(),
+ links: z.array(zLinkCsv).readonly().optional(),
+ territory: zTerritoryCsv.optional(),
+ description: z.string().optional(),
+ shareLocation: z.boolean().optional(),
+ isAnonymous: z.boolean().optional(),
+ referralSource: z.enum([
+ 'search_engine',
+ 'social_media',
+ 'friend',
+ 'press',
+ 'event',
+ 'other'
+ ]).nullish(),
+ preferredCategories: z.array(z.string()).optional(),
+ preferredThemes: z.array(z.string()).optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * Users represent people who interact with the platform.
+ */
+export const zUserJsonld = zHydraItemBaseSchema.and(z.object({
id: z.int().readonly().optional(),
handle: z.string().min(4).max(30).regex(/^([a-z0-9_]+)$/),
email: z.email(),
@@ -1565,9 +2127,21 @@ export const zUserJsonld = z.object({
links: z.array(zLinkJsonld).readonly().optional(),
territory: zTerritoryJsonld.optional(),
description: z.string().optional(),
+ shareLocation: z.boolean().optional(),
+ isAnonymous: z.boolean().optional(),
+ referralSource: z.enum([
+ 'search_engine',
+ 'social_media',
+ 'friend',
+ 'press',
+ 'event',
+ 'other'
+ ]).nullish(),
+ preferredCategories: z.array(z.string()).optional(),
+ preferredThemes: z.array(z.string()).optional(),
dateCreated: z.iso.datetime().readonly().optional(),
dateUpdated: z.iso.datetime().readonly().optional()
-});
+}));
/**
* Some resources are versioned. This means v4 keeps track of the changes performed in subsets of specific properties within these resources.\
@@ -1591,16 +2165,7 @@ export const zVersion = z.object({
* This allows us to keep track of the flow and the evolution of records in the platform.
* Looking at the changes done between one version and the next one we can reconstruct how a resource was at a certain point in time.
*/
-export const zVersionJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zVersionCsv = z.object({
id: z.int().readonly().nullish(),
action: z.string().readonly().nullish(),
resource: z.string().readonly().optional(),
@@ -1611,13 +2176,20 @@ export const zVersionJsonld = z.object({
});
/**
- * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
+ * Some resources are versioned. This means v4 keeps track of the changes performed in subsets of specific properties within these resources.\
+ * \
+ * This allows us to keep track of the flow and the evolution of records in the platform.
+ * Looking at the changes done between one version and the next one we can reconstruct how a resource was at a certain point in time.
*/
-export const zProjectTotalizedMoney = z.object({
- amount: z.int().optional(),
- currency: z.string().optional(),
- length: z.int().optional()
-});
+export const zVersionJsonld = zHydraItemBaseSchema.and(z.object({
+ id: z.int().readonly().nullish(),
+ action: z.string().readonly().nullish(),
+ resource: z.string().readonly().optional(),
+ resourceId: z.int().readonly().optional(),
+ resourceVersion: z.int().readonly().nullish(),
+ resourceChanges: z.unknown().optional(),
+ dateCreated: z.iso.datetime().readonly().nullish()
+}));
/**
* v4 features an advanced economy model under the hood.
@@ -1643,22 +2215,29 @@ export const zAccounting = z.object({
* \
* Many different actions can trigger changes in Accountings, such as GatewayCheckouts being successfully charged.
*/
-export const zAccountingJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zAccountingCsv = z.object({
+ id: z.int().optional(),
+ owner: z.string().optional(),
+ ownerObject: z.string().optional(),
+ currency: z.string().optional(),
+ balance: z.lazy((): any => zMoneyOutputCsv).optional()
+});
+
+/**
+ * v4 features an advanced economy model under the hood.
+ * Accountings are implemented as a common interface for issuing and receiving Transactions,
+ * which allows different resources to have money-capabalities.
+ * \
+ * \
+ * Many different actions can trigger changes in Accountings, such as GatewayCheckouts being successfully charged.
+ */
+export const zAccountingJsonld = zHydraItemBaseSchema.and(z.lazy(() => z.object({
id: z.int().optional(),
owner: z.string().optional(),
ownerObject: z.string().optional(),
currency: z.string().optional(),
balance: z.lazy((): any => zMoneyOutputJsonld).optional()
-});
+})));
/**
* AccountingBalancePoints represent a dated aggregate Accounting balance.\
@@ -1679,14 +2258,25 @@ export const zAccountingBalancePoint = z.object({
* Each point is the sum of money at incoming and outgoing transactions in an Accounting for a period of time,
* you can query multiple balance points to obtain the evolution of the Accounting's balance over time.
*/
-export const zAccountingBalancePointJsonld = z.object({
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zAccountingBalancePointCsv = z.object({
+ start: z.iso.datetime().optional(),
+ end: z.iso.datetime().optional(),
+ balance: z.lazy((): any => zMoneyOutputCsv).optional(),
+ length: z.int().optional()
+});
+
+/**
+ * AccountingBalancePoints represent a dated aggregate Accounting balance.\
+ * \
+ * Each point is the sum of money at incoming and outgoing transactions in an Accounting for a period of time,
+ * you can query multiple balance points to obtain the evolution of the Accounting's balance over time.
+ */
+export const zAccountingBalancePointJsonld = zHydraItemBaseSchema.and(z.lazy(() => z.object({
start: z.iso.datetime().optional(),
end: z.iso.datetime().optional(),
balance: z.lazy((): any => zMoneyOutputJsonld).optional(),
length: z.int().optional()
-});
+})));
/**
* AccountingTransactions represent a movement of money from one Accounting (origin) into another (target).\
@@ -1713,37 +2303,40 @@ export const zAccountingTransaction = z.object({
* \
* AccountingTransactions are generated for each GatewayCharge in a GatewayCheckout once it becomes successful.
*/
-export const zAccountingTransactionJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zAccountingTransactionCsv = z.object({
+ id: z.int().readonly().optional(),
+ money: z.lazy((): any => zMoneyOutputCsv).optional(),
+ origin: z.string().optional(),
+ target: z.string().optional()
+});
+
+/**
+ * AccountingTransactions represent a movement of money from one Accounting (origin) into another (target).\
+ * \
+ * When a transaction targets an Accounting it means that the Accounting receives it, this will add to that Accounting.
+ * When a transaction originates from an Accounting the Accounting issues the transaction and it will deduct from it if,
+ * specially when the transaction comes from a GatewayCharge processed by the `wallet` Gateway.\
+ * \
+ * AccountingTransactions are generated for each GatewayCharge in a GatewayCheckout once it becomes successful.
+ */
+export const zAccountingTransactionJsonld = zHydraItemBaseSchema.and(z.lazy(() => z.object({
id: z.int().readonly().optional(),
money: z.lazy((): any => zMoneyOutputJsonld).optional(),
origin: z.string().optional(),
target: z.string().optional()
-});
+})));
export const zBudget = z.object({
minimum: z.lazy((): any => zBudgetSummary).readonly().optional(),
optimum: z.lazy((): any => zBudgetSummary).readonly().optional()
});
+export const zBudgetCsv = z.object({
+ minimum: z.lazy((): any => zBudgetSummaryCsv).readonly().optional(),
+ optimum: z.lazy((): any => zBudgetSummaryCsv).readonly().optional()
+});
+
export const zBudgetJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
minimum: z.lazy((): any => zBudgetSummaryJsonld).readonly().optional(),
optimum: z.lazy((): any => zBudgetSummaryJsonld).readonly().optional()
});
@@ -1755,16 +2348,14 @@ export const zBudgetSummary = z.object({
infra: z.lazy((): any => zMoneyOutput).optional()
});
+export const zBudgetSummaryCsv = z.object({
+ money: z.lazy((): any => zMoneyOutputCsv).optional(),
+ task: z.lazy((): any => zMoneyOutputCsv).optional(),
+ material: z.lazy((): any => zMoneyOutputCsv).optional(),
+ infra: z.lazy((): any => zMoneyOutputCsv).optional()
+});
+
export const zBudgetSummaryJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
money: z.lazy((): any => zMoneyOutputJsonld).optional(),
task: z.lazy((): any => zMoneyOutputJsonld).optional(),
material: z.lazy((): any => zMoneyOutputJsonld).optional(),
@@ -1780,16 +2371,16 @@ export const zConversion = z.object({
provider: z.string().optional()
});
+export const zConversionCsv = z.object({
+ rounding: z.string().optional(),
+ from: z.lazy((): any => zMoneyCsv).optional(),
+ to: z.lazy((): any => zMoneyCsv).optional(),
+ rate: z.number().optional(),
+ date: z.string().optional(),
+ provider: z.string().optional()
+});
+
export const zConversionJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
rounding: z.string().optional(),
from: z.lazy((): any => zMoneyJsonld).optional(),
to: z.lazy((): any => zMoneyJsonld).optional(),
@@ -1824,16 +2415,30 @@ export const zGatewayCharge = z.object({
/**
* A Charge represents a payment item to be included in a Checkout for payment at a Gateway.
*/
-export const zGatewayChargeJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zGatewayChargeCsv = z.object({
+ id: z.int().readonly().nullish(),
+ checkout: z.string().optional(),
+ type: z.enum(['single', 'recurring']).default('single'),
+ title: z.string(),
+ description: z.string().nullish(),
+ target: z.string(),
+ money: z.lazy((): any => zMoneyOutputCsv),
+ status: z.enum([
+ 'to_charge',
+ 'in_charge',
+ 'to_refund',
+ 'refunded',
+ 'to_wallet',
+ 'walleted'
+ ]).readonly().optional().default('to_charge'),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * A Charge represents a payment item to be included in a Checkout for payment at a Gateway.
+ */
+export const zGatewayChargeJsonld = zHydraItemBaseSchema.and(z.lazy(() => z.object({
id: z.int().readonly().nullish(),
checkout: z.string().optional(),
type: z.enum(['single', 'recurring']).default('single'),
@@ -1851,7 +2456,7 @@ export const zGatewayChargeJsonld = z.object({
]).readonly().optional().default('to_charge'),
dateCreated: z.iso.datetime().readonly().optional(),
dateUpdated: z.iso.datetime().readonly().optional()
-});
+})));
/**
* A GatewayCheckout represents a payment session with a Gateway.
@@ -1873,16 +2478,24 @@ export const zGatewayCheckout = z.object({
/**
* A GatewayCheckout represents a payment session with a Gateway.
*/
-export const zGatewayCheckoutJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zGatewayCheckoutCsv = z.object({
+ id: z.int().readonly().optional(),
+ gateway: z.string(),
+ origin: z.string(),
+ charges: z.array(zGatewayChargeCsv).min(1),
+ returnUrl: z.url(),
+ refund: z.enum(['to_wallet', 'to_gateway']).optional().default('to_wallet'),
+ status: z.enum(['to_charge', 'charged']).readonly().optional().default('to_charge'),
+ links: z.array(zGatewayLinkCsv).readonly().optional(),
+ trackings: z.array(zTrackingCsv).readonly().optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * A GatewayCheckout represents a payment session with a Gateway.
+ */
+export const zGatewayCheckoutJsonld = zHydraItemBaseSchema.and(z.object({
id: z.int().readonly().optional(),
gateway: z.string(),
origin: z.string(),
@@ -1894,7 +2507,7 @@ export const zGatewayCheckoutJsonld = z.object({
trackings: z.array(zTrackingJsonld).readonly().optional(),
dateCreated: z.iso.datetime().readonly().optional(),
dateUpdated: z.iso.datetime().readonly().optional()
-});
+}));
export const zMoney = z.object({
amount: z.int().optional(),
@@ -1902,16 +2515,13 @@ export const zMoney = z.object({
conversion: zConversion.nullish()
});
+export const zMoneyCsv = z.object({
+ amount: z.int().optional(),
+ currency: z.string().optional(),
+ conversion: zConversionCsv.nullish()
+});
+
export const zMoneyJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
amount: z.int().optional(),
currency: z.string().optional(),
conversion: zConversionJsonld.nullish()
@@ -1923,16 +2533,13 @@ export const zMoneyOutput = z.object({
conversion: zConversion.nullish()
});
+export const zMoneyOutputCsv = z.object({
+ amount: z.int().gt(0),
+ currency: z.string(),
+ conversion: zConversionCsv.nullish()
+});
+
export const zMoneyOutputJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
amount: z.int().gt(0),
currency: z.string(),
conversion: zConversionJsonld.nullish()
@@ -1994,16 +2601,60 @@ export const zProject = z.object({
/**
* Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
*/
-export const zProjectJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectCsv = z.object({
+ id: z.int().readonly().optional(),
+ slug: z.string().readonly().optional(),
+ accounting: z.string().readonly().optional(),
+ owner: z.string().readonly().optional(),
+ title: z.string(),
+ subtitle: z.string(),
+ cover: z.url().optional(),
+ deadline: z.enum(['minimum', 'optimum']).readonly().optional(),
+ calendar: zProjectCalendarCsv.readonly().optional(),
+ categories: z.array(z.string()),
+ themes: z.array(z.string()),
+ territory: zTerritoryCsv,
+ descBrief: z.string().optional(),
+ descAbout: z.string().optional(),
+ descGoal: z.string().optional(),
+ descTeam: z.string().optional(),
+ video: zProjectVideoCsv.readonly().optional(),
+ status: z.enum([
+ 'in_draft',
+ 'to_campaign_review',
+ 'in_campaign_review',
+ 'in_campaign_review.to_change',
+ 'in_campaign_review.to_review',
+ 'campaign_review.rejected',
+ 'to_campaign',
+ 'in_campaign',
+ 'campaign.failed',
+ 'campaign.cancelled',
+ 'to_funding_review',
+ 'in_funding_review',
+ 'in_funding_review.to_change',
+ 'in_funding_review.to_review',
+ 'funding_review.rejected',
+ 'to_funding',
+ 'in_funding',
+ 'funding.paid'
+ ]).optional().default('in_draft'),
+ rewards: z.array(z.string()).readonly().optional(),
+ budget: zBudgetCsv.readonly().optional(),
+ budgetItems: z.array(z.string()).readonly().optional(),
+ collaborations: z.array(z.string()).readonly().optional(),
+ updates: z.array(z.string()).readonly().optional(),
+ matchCallSubmissions: z.array(z.string()).readonly().optional(),
+ links: z.array(zLinkCsv).readonly().optional(),
+ locales: z.array(z.string()).readonly().optional(),
+ dateCreated: z.iso.datetime().readonly().optional(),
+ dateUpdated: z.iso.datetime().readonly().optional()
+});
+
+/**
+ * Projects describe a User-owned, community-led event that is to be discovered, developed and funded by the community.
+ */
+export const zProjectJsonld = zHydraItemBaseSchema.and(z.object({
id: z.int().readonly().optional(),
slug: z.string().readonly().optional(),
accounting: z.string().readonly().optional(),
@@ -2051,7 +2702,7 @@ export const zProjectJsonld = z.object({
locales: z.array(z.string()).readonly().optional(),
dateCreated: z.iso.datetime().readonly().optional(),
dateUpdated: z.iso.datetime().readonly().optional()
-});
+}));
/**
* ProjectSupports gather Transactions going from one same origin to one same Project.\
@@ -2078,16 +2729,45 @@ export const zProjectSupport = z.object({
* MatchCalls specially might make several different Transactions to the same Project,
* but their ProjectSupport remains the same just with updated money.
*/
-export const zProjectSupportJsonld = z.object({
- '@context': z.union([
- z.string(),
- z.object({
- '@vocab': z.string(),
- hydra: z.enum(['http://www.w3.org/ns/hydra/core#'])
- })
- ]).optional(),
- '@id': z.string().readonly().optional(),
- '@type': z.string().readonly().optional(),
+export const zProjectSupportCsv = z.object({
+ id: z.int().readonly().optional(),
+ project: z.string().readonly().optional(),
+ origin: z.string().readonly().nullish(),
+ displayName: z.string().readonly().nullish(),
+ displayImage: z.string().readonly().nullish(),
+ transactions: z.array(z.string()).readonly().optional(),
+ money: zMoneyOutputCsv.readonly().optional(),
+ anonymous: z.boolean().default(true),
+ matchfunding: z.boolean().readonly().optional(),
+ message: z.string().nullish()
+});
+
+/**
+ * ProjectSupports gather Transactions going from one same origin to one same Project.\
+ * \
+ * MatchCalls specially might make several different Transactions to the same Project,
+ * but their ProjectSupport remains the same just with updated money.
+ */
+export const zProjectSupportJsonMergePatch = z.object({
+ id: z.int().readonly().optional(),
+ project: z.string().readonly().optional(),
+ origin: z.string().readonly().nullish(),
+ displayName: z.string().readonly().nullish(),
+ displayImage: z.string().readonly().nullish(),
+ transactions: z.array(z.string()).readonly().optional(),
+ money: zMoneyOutput.readonly().optional(),
+ anonymous: z.boolean().optional().default(true),
+ matchfunding: z.boolean().readonly().optional(),
+ message: z.string().nullish()
+});
+
+/**
+ * ProjectSupports gather Transactions going from one same origin to one same Project.\
+ * \
+ * MatchCalls specially might make several different Transactions to the same Project,
+ * but their ProjectSupport remains the same just with updated money.
+ */
+export const zProjectSupportJsonld = zHydraItemBaseSchema.and(z.object({
id: z.int().readonly().optional(),
project: z.string().readonly().optional(),
origin: z.string().readonly().nullish(),
@@ -2098,7 +2778,7 @@ export const zProjectSupportJsonld = z.object({
anonymous: z.boolean().default(true),
matchfunding: z.boolean().readonly().optional(),
message: z.string().nullish()
-});
+}));
export const zApiAddressesGetCollectionQuery = z.object({
page: z.int().optional().default(1),
@@ -2147,7 +2827,7 @@ export const zApiAddressesIdGetResponse = zAddress;
/**
* The updated Address resource
*/
-export const zApiAddressesIdPatchBody = zAddressAddressUpdationDto;
+export const zApiAddressesIdPatchBody = zAddressAddressUpdationDtoJsonMergePatch;
export const zApiAddressesIdPatchPath = z.object({
id: z.string()
@@ -2202,7 +2882,7 @@ export const zApiCategoriesIdDeleteResponse = z.void();
/**
* The updated Category resource
*/
-export const zApiCategoriesIdPatchBody = zCategory;
+export const zApiCategoriesIdPatchBody = zCategoryJsonMergePatch;
export const zApiCategoriesIdPatchPath = z.object({
id: z.string()
@@ -2326,7 +3006,7 @@ export const zApiMatchCallsIdGetResponse = zMatchCall;
/**
* The updated MatchCall resource
*/
-export const zApiMatchCallsIdPatchBody = zMatchCall;
+export const zApiMatchCallsIdPatchBody = zMatchCallJsonMergePatch;
export const zApiMatchCallsIdPatchPath = z.object({
id: z.string()
@@ -2375,7 +3055,7 @@ export const zApiMatchCallSubmissionsIdGetResponse = zMatchCallSubmission;
/**
* The updated MatchCallSubmission resource
*/
-export const zApiMatchCallSubmissionsIdPatchBody = zMatchCallSubmission;
+export const zApiMatchCallSubmissionsIdPatchBody = zMatchCallSubmissionJsonMergePatch;
export const zApiMatchCallSubmissionsIdPatchPath = z.object({
id: z.string()
@@ -2468,7 +3148,7 @@ export const zApiMatchStrategiesIdGetResponse = zMatchStrategy;
/**
* The updated MatchStrategy resource
*/
-export const zApiMatchStrategiesIdPatchBody = zMatchStrategy;
+export const zApiMatchStrategiesIdPatchBody = zMatchStrategyJsonMergePatch;
export const zApiMatchStrategiesIdPatchPath = z.object({
id: z.string()
@@ -2491,7 +3171,7 @@ export const zApiUsersIdorganizationGetResponse = zOrganization;
/**
* The updated Organization resource
*/
-export const zApiUsersIdorganizationPatchBody = zOrganization;
+export const zApiUsersIdorganizationPatchBody = zOrganizationJsonMergePatch;
export const zApiUsersIdorganizationPatchPath = z.object({
id: z.string()
@@ -2514,7 +3194,7 @@ export const zApiUsersIdpersonGetResponse = zPerson;
/**
* The updated Person resource
*/
-export const zApiUsersIdpersonPatchBody = zPerson;
+export const zApiUsersIdpersonPatchBody = zPersonJsonMergePatch;
export const zApiUsersIdpersonPatchPath = z.object({
id: z.string()
@@ -2637,7 +3317,7 @@ export const zApiProjectBudgetItemsIdGetResponse = zProjectBudgetItem;
/**
* The updated ProjectBudgetItem resource
*/
-export const zApiProjectBudgetItemsIdPatchBody = zProjectBudgetItem;
+export const zApiProjectBudgetItemsIdPatchBody = zProjectBudgetItemJsonMergePatch;
export const zApiProjectBudgetItemsIdPatchPath = z.object({
id: z.string()
@@ -2702,7 +3382,7 @@ export const zApiProjectCollaborationsIdGetResponse = zProjectCollaboration;
/**
* The updated ProjectCollaboration resource
*/
-export const zApiProjectCollaborationsIdPatchBody = zProjectCollaboration;
+export const zApiProjectCollaborationsIdPatchBody = zProjectCollaborationJsonMergePatch;
export const zApiProjectCollaborationsIdPatchPath = z.object({
id: z.string()
@@ -2771,7 +3451,7 @@ export const zApiProjectCollaborationCandidaciesIdGetResponse = zProjectCollabor
/**
* The updated ProjectCollaborationCandidacy resource
*/
-export const zApiProjectCollaborationCandidaciesIdPatchBody = zProjectCollaborationCandidacy;
+export const zApiProjectCollaborationCandidaciesIdPatchBody = zProjectCollaborationCandidacyJsonMergePatch;
export const zApiProjectCollaborationCandidaciesIdPatchPath = z.object({
id: z.string()
@@ -2829,7 +3509,7 @@ export const zApiProjectReviewsIdGetResponse = zProjectReview;
/**
* The updated ProjectReview resource
*/
-export const zApiProjectReviewsIdPatchBody = zProjectReview;
+export const zApiProjectReviewsIdPatchBody = zProjectReviewJsonMergePatch;
export const zApiProjectReviewsIdPatchPath = z.object({
id: z.string()
@@ -2893,7 +3573,7 @@ export const zApiProjectReviewAreasIdGetResponse = zProjectReviewArea;
/**
* The updated ProjectReviewArea resource
*/
-export const zApiProjectReviewAreasIdPatchBody = zProjectReviewArea;
+export const zApiProjectReviewAreasIdPatchBody = zProjectReviewAreaJsonMergePatch;
export const zApiProjectReviewAreasIdPatchPath = z.object({
id: z.string()
@@ -3014,7 +3694,7 @@ export const zApiProjectRewardsIdGetResponse = zProjectReward;
/**
* The updated ProjectReward resource
*/
-export const zApiProjectRewardsIdPatchBody = zProjectReward;
+export const zApiProjectRewardsIdPatchBody = zProjectRewardJsonMergePatch;
export const zApiProjectRewardsIdPatchPath = z.object({
id: z.string()
@@ -3077,7 +3757,7 @@ export const zApiProjectRewardClaimsIdGetResponse = zProjectRewardClaim;
/**
* The updated ProjectRewardClaim resource
*/
-export const zApiProjectRewardClaimsIdPatchBody = zProjectRewardClaimRewardClaimUpdationDto;
+export const zApiProjectRewardClaimsIdPatchBody = zProjectRewardClaimRewardClaimUpdationDtoJsonMergePatch;
export const zApiProjectRewardClaimsIdPatchPath = z.object({
id: z.string()
@@ -3158,7 +3838,7 @@ export const zApiProjectUpdatesIdGetResponse = zProjectUpdate;
/**
* The updated ProjectUpdate resource
*/
-export const zApiProjectUpdatesIdPatchBody = zProjectUpdate;
+export const zApiProjectUpdatesIdPatchBody = zProjectUpdateJsonMergePatch;
export const zApiProjectUpdatesIdPatchPath = z.object({
id: z.string()
@@ -3213,7 +3893,7 @@ export const zApiThemesIdDeleteResponse = z.void();
/**
* The updated Theme resource
*/
-export const zApiThemesIdPatchBody = zTheme;
+export const zApiThemesIdPatchBody = zThemeJsonMergePatch;
export const zApiThemesIdPatchPath = z.object({
id: z.string()
@@ -3268,7 +3948,7 @@ export const zApiTipjarsIdGetResponse = zTipjar;
/**
* The updated Tipjar resource
*/
-export const zApiTipjarsIdPatchBody = zTipjar;
+export const zApiTipjarsIdPatchBody = zTipjarJsonMergePatch;
export const zApiTipjarsIdPatchPath = z.object({
id: z.string()
@@ -3351,7 +4031,7 @@ export const zApiUsersIdDeleteResponse = z.void();
/**
* The updated User resource
*/
-export const zApiUsersIdPatchBody = zUserUserUpdationDto;
+export const zApiUsersIdPatchBody = zUserUserUpdationDtoJsonMergePatch;
export const zApiUsersIdPatchPath = z.object({
id: z.string()
@@ -3389,7 +4069,9 @@ export const zApiVersionsIdGetResponse = zVersion;
export const zApiAccountingsGetCollectionQuery = z.object({
page: z.int().optional().default(1),
- itemsPerPage: z.int().gte(0).lte(100).optional().default(30)
+ itemsPerPage: z.int().gte(0).lte(100).optional().default(30),
+ id: z.int().optional(),
+ 'id[]': z.array(z.int()).optional()
});
/**
@@ -3499,7 +4181,7 @@ export const zApiGatewayChargesIdGetResponse = zGatewayCharge;
/**
* The updated GatewayCharge resource
*/
-export const zApiGatewayChargesIdPatchBody = zGatewayChargeChargeUpdationDto;
+export const zApiGatewayChargesIdPatchBody = zGatewayChargeChargeUpdationDtoJsonMergePatch;
export const zApiGatewayChargesIdPatchPath = z.object({
id: z.string()
@@ -3550,7 +4232,7 @@ export const zApiGatewayCheckoutsIdGetResponse = zGatewayCheckout;
/**
* The updated GatewayCheckout resource
*/
-export const zApiGatewayCheckoutsIdPatchBody = zGatewayCheckoutCheckoutUpdationDto;
+export const zApiGatewayCheckoutsIdPatchBody = zGatewayCheckoutCheckoutUpdationDtoJsonMergePatch;
export const zApiGatewayCheckoutsIdPatchPath = z.object({
id: z.string()
@@ -3636,7 +4318,7 @@ export const zApiProjectsIdOrSlugGetResponse = zProject;
/**
* The updated Project resource
*/
-export const zApiProjectsIdPatchBody = zProjectProjectUpdationDto;
+export const zApiProjectsIdPatchBody = zProjectProjectUpdationDtoJsonMergePatch;
export const zApiProjectsIdPatchPath = z.object({
id: z.string()
@@ -3675,7 +4357,7 @@ export const zApiProjectSupportsIdGetResponse = zProjectSupport;
/**
* The updated ProjectSupport resource
*/
-export const zApiProjectSupportsIdPatchBody = zProjectSupport;
+export const zApiProjectSupportsIdPatchBody = zProjectSupportJsonMergePatch;
export const zApiProjectSupportsIdPatchPath = z.object({
id: z.string()
diff --git a/src/pages/[...locale]/me/manage/index.astro b/src/pages/[...locale]/me/manage/index.astro
index 3cad5261..c0a854eb 100644
--- a/src/pages/[...locale]/me/manage/index.astro
+++ b/src/pages/[...locale]/me/manage/index.astro
@@ -5,7 +5,11 @@ import WithSidebar from "../../../../layouts/WithSidebar.svelte";
import ManagePersonalProfile from "../../../../components/profile/manage/ManagePersonalProfile.svelte";
import { PROFILE_NAV_ITEMS, PROFILE_PATHS } from "../../../../components/profile/meSections";
import { setSession } from "../../../../auth/session";
-import { apiUsersIdOrHandleGet, apiUsersIdpersonGet } from "../../../../openapi/client";
+import {
+ apiUsersIdOrHandleGet,
+ apiUsersIdorganizationGet,
+ apiUsersIdpersonGet,
+} from "../../../../openapi/client";
import { goto } from "../../../../utils/navigation";
const { lang, t, session } = Astro.locals;
@@ -21,9 +25,13 @@ const path = { id: String(session.user.id) };
const headers = session.token.asHttpHeaders;
// The session cookie holds a snapshot of the User taken at login, read the current one
-const [{ data: user }, { data: person }] = await Promise.all([
+const [{ data: user }, { data: person }, { data: organization }] = await Promise.all([
apiUsersIdOrHandleGet({ path: { idOrHandle: path.id }, headers }),
apiUsersIdpersonGet({ path, headers }),
+ // 404 for individual users, resolved as `undefined`
+ session.user.type === "organization"
+ ? apiUsersIdorganizationGet({ path, headers })
+ : Promise.resolve({ data: undefined }),
]);
// Refresh the cookie too: the names feed the display name shown in the header
@@ -35,7 +43,12 @@ if (user) {
-
+
diff --git a/src/pages/[...locale]/me/manage/preferences.astro b/src/pages/[...locale]/me/manage/preferences.astro
index 8061763f..3e64a992 100644
--- a/src/pages/[...locale]/me/manage/preferences.astro
+++ b/src/pages/[...locale]/me/manage/preferences.astro
@@ -4,7 +4,7 @@ import App from "../../../../layouts/App.svelte";
import WithSidebar from "../../../../layouts/WithSidebar.svelte";
import ManagePreferencesSection from "../../../../components/profile/ManagePreferencesSection.svelte";
import { PROFILE_NAV_ITEMS, PROFILE_PATHS } from "../../../../components/profile/meSections";
-import { apiCategoriesGetCollection } from "../../../../openapi/client";
+import { apiCategoriesGetCollection, apiUsersIdOrHandleGet } from "../../../../openapi/client";
import { withoutCache } from "../../../../openapi/cacheInterceptor";
import { toCollectionItems } from "../../../../utils/hydra";
import { goto } from "../../../../utils/navigation";
@@ -27,12 +27,18 @@ const { data: categoriesRaw } = await withoutCache(() =>
}),
);
const categories = toCollectionItems(categoriesRaw);
+
+// The session cookie holds a snapshot of the User taken at login, read the current one
+const { data: user } = await apiUsersIdOrHandleGet({
+ path: { idOrHandle: String(session.user.id) },
+ headers: session.token.asHttpHeaders,
+});
---
-
+
diff --git a/src/utils/projectPublisher.ts b/src/utils/projectPublisher.ts
index 389562e5..12a836f1 100644
--- a/src/utils/projectPublisher.ts
+++ b/src/utils/projectPublisher.ts
@@ -17,7 +17,7 @@ import type { Session } from "../auth/types";
import type {
ProjectBudgetItem,
ProjectCollaboration,
- ProjectProjectUpdationDto,
+ ProjectProjectUpdationDtoJsonMergePatch,
ProjectReward,
} from "../openapi/client";
import type { Draft, ProjectDraftResources } from "../stores/drafts/projectDraft";
@@ -161,7 +161,7 @@ export async function publishDraft(draft: Draft, session: Session, projectId: st
deadline: wizard.configuration.deadline,
territory: draft.createProject.territory,
cover: firstImage?.url ?? "",
- } as ProjectProjectUpdationDto & { cover?: string },
+ } as ProjectProjectUpdationDtoJsonMergePatch & { cover?: string },
session,
);
diff --git a/src/utils/projectSubmissionApi.ts b/src/utils/projectSubmissionApi.ts
index 57efeb88..1602f115 100644
--- a/src/utils/projectSubmissionApi.ts
+++ b/src/utils/projectSubmissionApi.ts
@@ -19,13 +19,13 @@ import type {
ProjectReward,
ProjectCollaboration,
ProjectBudgetItem,
- ProjectProjectUpdationDto,
+ ProjectProjectUpdationDtoJsonMergePatch,
} from "../openapi/client";
import type { ProjectDraftResources } from "../stores/drafts/projectDraft";
export async function patchProject(
projectId: string,
- body: ProjectProjectUpdationDto,
+ body: ProjectProjectUpdationDtoJsonMergePatch,
session: Session,
) {
return apiProjectsIdPatch({
diff --git a/src/utils/trackChanges.svelte.ts b/src/utils/trackChanges.svelte.ts
new file mode 100644
index 00000000..47f178c2
--- /dev/null
+++ b/src/utils/trackChanges.svelte.ts
@@ -0,0 +1,35 @@
+import { dequal } from "dequal";
+import ObservableSlim from "observable-slim";
+import { SvelteSet } from "svelte/reactivity";
+
+/**
+ * Reactive form state that records which top-level fields differ from the last saved values,
+ * so a payload can carry only what the user edited. Nested writes (`links.x`) count towards
+ * their top-level field, and a field set back to its saved value stops counting.
+ *
+ * Call `commit()` after a successful save to make the current values the saved ones.
+ */
+export function trackChanges(initial: T) {
+ const values = $state(initial);
+ const changed = new SvelteSet();
+ let saved = $state.snapshot(values) as T;
+
+ const form = ObservableSlim.create(values, false, (changes) => {
+ for (const { currentPath } of changes) {
+ const field = currentPath.split(".")[0] as keyof T;
+
+ if (dequal($state.snapshot(values[field]), saved[field])) {
+ changed.delete(field);
+ } else {
+ changed.add(field);
+ }
+ }
+ });
+
+ function commit() {
+ saved = $state.snapshot(values) as T;
+ changed.clear();
+ }
+
+ return { form, changed, commit };
+}
diff --git a/src/validation/personalProfileValidation.ts b/src/validation/personalProfileValidation.ts
index 7bb067a9..21b3e92c 100644
--- a/src/validation/personalProfileValidation.ts
+++ b/src/validation/personalProfileValidation.ts
@@ -1,7 +1,19 @@
import { z } from "zod";
+import { zOrganization, zPerson, zUser } from "../openapi/client/zod.gen";
import { isValidTaxId } from "../utils/taxId";
+// The API enums, from the generated SDK. "" stands for an unanswered select, sent as `null`
+const zTaxIdType = zPerson.shape.taxIdType.unwrap().unwrap();
+const zGender = zPerson.shape.gender.unwrap().unwrap();
+const zReferralSource = zUser.shape.referralSource.unwrap().unwrap();
+const zLegalForm = zOrganization.shape.legalForm.unwrap().unwrap();
+
+export const TAX_ID_TYPES = zTaxIdType.options;
+export const GENDERS = zGender.options;
+export const REFERRAL_SOURCES = zReferralSource.options;
+export const LEGAL_FORMS = zLegalForm.options;
+
const zRequiredField = () =>
z.string().refine((value) => value.trim().length > 0, {
error: "pages.me.manage.validation.required",
@@ -33,7 +45,16 @@ export const zPersonalProfileForm = z
country: z.string().length(2).or(z.literal("")),
subLvl1: z.string(),
subLvl2: z.string(),
- address: z.string(),
+ shareLocation: z.boolean(),
+ referralSource: zReferralSource.or(z.literal("")),
+ taxIdType: zTaxIdType.or(z.literal("")),
+ birthYear: z
+ .string()
+ .regex(/^(19|20)\d{2}$/)
+ .or(z.literal("")),
+ gender: zGender.or(z.literal("")),
+ legalForm: zLegalForm.or(z.literal("")),
+ publicEntity: z.boolean(),
})
.superRefine((data, ctx) => {
const taxId = data.taxId.trim();
From 0c7df92d26685fce13b772e994cb460092699a6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Moreno=20C=C3=A1mara?=
<139916751+Dayv1dDev@users.noreply.github.com>
Date: Fri, 6 Nov 2026 15:57:09 +0100
Subject: [PATCH 14/24] [fix] Vimeo videos display (#578)
* fix: build the player URL of campaign videos instead of using the page URL
* fix: reject campaign video links of unsupported providers
* refactor: reorder conditionals in youtubeId function
* chore: format code with prettier
---
src/components/player/PeerTube.svelte | 4 +-
src/components/player/Player.svelte | 162 +++++---------
.../project/edit/VideoUrlInput.svelte | 10 +
src/i18n/locales/es.json | 3 +-
src/utils/blog.ts | 38 +---
src/utils/video.ts | 202 ++++++++++++++++++
6 files changed, 269 insertions(+), 150 deletions(-)
create mode 100644 src/utils/video.ts
diff --git a/src/components/player/PeerTube.svelte b/src/components/player/PeerTube.svelte
index 79d2103b..f50cc512 100644
--- a/src/components/player/PeerTube.svelte
+++ b/src/components/player/PeerTube.svelte
@@ -17,8 +17,10 @@
let player: any = $state(null);
let isReady = $state(false);
+ // The link arrives already pointing at the instance's embed URL; only the
+ // parameters of the player are missing.
function makeEmbedSrc(url: string): string {
- const base = url.replace("/videos/watch/", "/videos/embed/").split("?")[0];
+ const base = url.split("?")[0];
const params = new URLSearchParams({
api: "1",
autoplay: "1",
diff --git a/src/components/player/Player.svelte b/src/components/player/Player.svelte
index ac61c39b..c0d0849a 100644
--- a/src/components/player/Player.svelte
+++ b/src/components/player/Player.svelte
@@ -1,8 +1,8 @@
-{#if isCheckingProvider}
-
-
-
-{:else if isPeerTube}
+{#snippet posterButton()}
+
+
+
-{:else if isYouTube || isVimeo}
+{:else if source?.provider === "youtube" || source?.provider === "vimeo"}
{#if !showIframe}
-
-
-
-
-
-
+ {@render posterButton()}
{:else}
{#if isLoading}
-
+
{/if}
-{:else if noVideoSrc && previewImage}
+{:else if source?.provider === "file"}
+
+
+{:else if !src && previewImage}
-{:else if noVideoSrc}
+{:else if !src}
diff --git a/src/components/project/edit/VideoUrlInput.svelte b/src/components/project/edit/VideoUrlInput.svelte
index a862f294..b783d9b1 100644
--- a/src/components/project/edit/VideoUrlInput.svelte
+++ b/src/components/project/edit/VideoUrlInput.svelte
@@ -4,6 +4,7 @@
import CloseIcon from "../../../components/icons/navigation/Close.svelte";
import { t } from "../../../i18n/store";
+ import { detectVideo } from "../../../utils/video";
import VideoIcon from "../../icons/media/VideoIcon.svelte";
import Button from "../../library/buttons/Button.svelte";
import TextInput from "../../library/inputs/TextInput.svelte";
@@ -44,6 +45,15 @@
return;
}
+ // The player is built from the link, so a link we cannot read would
+ // leave the campaign without a video at all.
+ if (!detectVideo(url)) {
+ validationError = $t(
+ "pages.project.edit.campaignInfo.video.validation.unsupported_provider",
+ );
+ return;
+ }
+
validationError = "";
onChange?.(url);
}
diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json
index 5e1ecf6e..3e039cb8 100644
--- a/src/i18n/locales/es.json
+++ b/src/i18n/locales/es.json
@@ -937,7 +937,8 @@
"continue": "Continuar con recompensas",
"video": {
"validation": {
- "invalid_url": "La URL del vídeo no es válida"
+ "invalid_url": "La URL del vídeo no es válida",
+ "unsupported_provider": "El enlace debe ser un vídeo de YouTube, Vimeo o PeerTube"
}
}
},
diff --git a/src/utils/blog.ts b/src/utils/blog.ts
index 23f1b0a5..7ff4e09c 100644
--- a/src/utils/blog.ts
+++ b/src/utils/blog.ts
@@ -3,6 +3,8 @@ import type { BlogPost, BlogPostTexts } from "../repositories/blogPosts";
// Kept out of repositories/blogPosts.ts: that module imports cloudflare:workers,
// which breaks hydration for any client component that imports a value from it.
+export { videoEmbedUrl } from "./video";
+
export const BLOG_SECTIONS = ["news", "stories", "resources", "newsletter"] as const;
export type BlogSection = (typeof BLOG_SECTIONS)[number];
@@ -17,39 +19,3 @@ export function textsIn(post: BlogPost, locale: string): BlogPostTexts {
return { title, subtitle, content, ...post.translations[locale] };
}
-
-/**
- * The embeddable player URL of a YouTube or Vimeo link; the admin form accepts no other.
- * @param link A watch, short or embed link
- * @returns The player URL, or null when the link is not a recognisable video
- */
-export function videoEmbedUrl(link: string): string | null {
- try {
- const url = new URL(link);
- const host = url.hostname.replace(/^www\./, "");
- const [first, second] = url.pathname.split("/").filter(Boolean);
-
- if (host === "youtu.be" && first) {
- return `https://www.youtube.com/embed/${first}`;
- }
-
- if (host === "youtube.com") {
- const id =
- url.searchParams.get("v") ??
- (["embed", "shorts", "live"].includes(first) ? second : null);
-
- return id ? `https://www.youtube.com/embed/${id}` : null;
- }
-
- // vimeo.com/123, vimeo.com/channels/x/123 or player.vimeo.com/video/123
- const vimeoId = url.pathname.match(/\/(\d+)(?:\/|$)/)?.[1];
-
- if ((host === "vimeo.com" || host === "player.vimeo.com") && vimeoId) {
- return `https://player.vimeo.com/video/${vimeoId}`;
- }
-
- return null;
- } catch {
- return null;
- }
-}
diff --git a/src/utils/video.ts b/src/utils/video.ts
new file mode 100644
index 00000000..a4cf442d
--- /dev/null
+++ b/src/utils/video.ts
@@ -0,0 +1,202 @@
+/**
+ * Campaign videos come from wherever the author hosts them: a YouTube, Vimeo or
+ * PeerTube link, or a file of their own. The API stores the link as it was
+ * given, so the embeddable player URL has to be worked out here — the page URL
+ * of most providers refuses to be framed (`X-Frame-Options`).
+ */
+
+export type VideoProvider = "youtube" | "vimeo" | "peertube" | "file";
+
+export interface VideoSource {
+ /** Where the video is hosted. */
+ provider: VideoProvider;
+ /** The URL to put in the iframe (or the file URL for the `file` provider). */
+ embedUrl: string;
+ /** The same URL, ready to play on its own. */
+ autoplayUrl: string;
+}
+
+const YOUTUBE_HOSTS = ["youtube.com", "youtu.be"];
+const VIMEO_HOSTS = ["vimeo.com", "player.vimeo.com"];
+const VIDEO_FILE_EXTENSIONS = ["mp4", "webm", "ogv", "ogg", "mov", "m4v"];
+
+/**
+ * The host of a URL, without the `www.`, `m.` and `music.` prefixes the
+ * providers use for their mobile and music domains.
+ * @param url A parsed URL
+ * @returns The bare host name
+ */
+function bareHost(url: URL): string {
+ return url.hostname.replace(/^(www|m|music)\./, "");
+}
+
+/**
+ * The identifier of a YouTube video, whatever shape the link has.
+ * @param url A parsed YouTube URL
+ * @returns The video id, or null when the link carries none
+ */
+function youtubeId(url: URL): string | null {
+ const host = bareHost(url);
+
+ if (!YOUTUBE_HOSTS.includes(host)) {
+ return null;
+ }
+
+ const segments = url.pathname.split("/").filter(Boolean);
+
+ if (host === "youtu.be") {
+ return segments[0] ?? null;
+ }
+
+ if (segments[0] === "watch") {
+ return url.searchParams.get("v");
+ }
+
+ if (["embed", "shorts", "live", "v"].includes(segments[0])) {
+ return segments[1] ?? null;
+ }
+
+ return null;
+}
+
+/**
+ * The identifier of a Vimeo video and the hash that hides it, when it has one.
+ * @param url A parsed Vimeo URL
+ * @returns The video id and its optional privacy hash
+ */
+function vimeoId(url: URL): { id: string; hash: string | null } | null {
+ if (!VIMEO_HOSTS.includes(bareHost(url))) {
+ return null;
+ }
+
+ const segments = url.pathname.split("/").filter(Boolean);
+
+ // vimeo.com/album/1/video/2, vimeo.com/groups/1/videos/2, player.vimeo.com/video/2
+ const videoAt = segments.findIndex((segment) => segment === "video" || segment === "videos");
+
+ if (videoAt >= 0) {
+ const id = segments[videoAt + 1];
+
+ if (id && /^\d+$/.test(id)) {
+ return { id, hash: null };
+ }
+ }
+
+ // vimeo.com/123/abcdef — the last segment is the privacy hash.
+ const last = segments[segments.length - 1];
+ const previous = segments[segments.length - 2];
+
+ if (last && previous && !/^\d+$/.test(last) && /^\d+$/.test(previous)) {
+ return { id: previous, hash: last };
+ }
+
+ // vimeo.com/123, vimeo.com/channels/staffpicks/123
+ const id = segments.find((segment) => /^\d+$/.test(segment));
+
+ return id ? { id, hash: null } : null;
+}
+
+/**
+ * The identifier of a PeerTube video, in whatever shape the instance links it.
+ * @param url A parsed URL
+ * @returns The video id, or null when the link is not a PeerTube one
+ */
+function peerTubeId(url: URL): string | null {
+ const segments = url.pathname.split("/").filter(Boolean);
+
+ if (segments[0] === "w" && segments[1]) {
+ return segments[1];
+ }
+
+ if (segments[0] === "videos" && ["watch", "embed"].includes(segments[1]) && segments[2]) {
+ return segments[2];
+ }
+
+ return null;
+}
+
+/**
+ * Whether a URL points to a video file of its own rather than to a provider.
+ * @param url A parsed URL
+ * @returns Whether the file is a playable video
+ */
+function isVideoFile(url: URL): boolean {
+ const extension = url.pathname.split(".").pop()?.toLowerCase() ?? "";
+
+ return VIDEO_FILE_EXTENSIONS.includes(extension);
+}
+
+/**
+ * The playable version of a video link: the provider's player URL, or the file
+ * itself when the video is hosted on its own.
+ * @param src The link the author pasted
+ * @returns The video source, or null when the link is not a video we can play
+ */
+export function detectVideo(src: string): VideoSource | null {
+ let url: URL;
+
+ try {
+ url = new URL(src);
+ } catch {
+ return null;
+ }
+
+ if (url.protocol !== "http:" && url.protocol !== "https:") {
+ return null;
+ }
+
+ const youtube = youtubeId(url);
+
+ if (youtube) {
+ const embedUrl = `https://www.youtube.com/embed/${youtube}`;
+
+ return {
+ provider: "youtube",
+ embedUrl,
+ autoplayUrl: `${embedUrl}?autoplay=1&rel=0&modestbranding=1`,
+ };
+ }
+
+ const vimeo = vimeoId(url);
+
+ if (vimeo) {
+ const embedUrl = `https://player.vimeo.com/video/${vimeo.id}`;
+
+ return {
+ provider: "vimeo",
+ embedUrl,
+ autoplayUrl: `${embedUrl}?${vimeo.hash ? `h=${vimeo.hash}&` : ""}autoplay=1`,
+ };
+ }
+
+ const peerTube = peerTubeId(url);
+
+ if (peerTube) {
+ return {
+ provider: "peertube",
+ embedUrl: `${url.origin}/videos/embed/${peerTube}`,
+ autoplayUrl: `${url.origin}/videos/embed/${peerTube}`,
+ };
+ }
+
+ if (isVideoFile(url)) {
+ return { provider: "file", embedUrl: url.href, autoplayUrl: url.href };
+ }
+
+ return null;
+}
+
+/**
+ * The embeddable player URL of a YouTube or Vimeo link; the admin form accepts no other.
+ * @param link A watch, short or embed link
+ * @returns The player URL, or null when the link is not a recognisable video
+ */
+export function videoEmbedUrl(link: string): string | null {
+ const source = detectVideo(link);
+
+ if (!source || source.provider === "file" || source.provider === "peertube") {
+ return null;
+ }
+
+ return source.embedUrl;
+}
From 2709d17d0be004520e5dfd0c3c05174e7c09ea59 Mon Sep 17 00:00:00 2001
From: angeldipinto <72363089+angeldipinto@users.noreply.github.com>
Date: Mon, 9 Nov 2026 13:15:16 +0100
Subject: [PATCH 15/24] Fix/project edit preview error (#579)
* fix: validate the draft before saving and keep it on failure
* fix: render empty budgets without crashing
* fix: keep the close button inside the modal
* fix: keep the modal close buttons inside their cards
* fix: refresh the session when the preview gets a 401
* refactor: reuse the shared sumMoney for budget totals
---------
Co-authored-by: Angel Di Pinto
---
src/auth/store.ts | 42 ++++++++++++-
.../library/inputs/ImageUploadModal.svelte | 2 +-
.../project/edit/BudgetModal.svelte | 2 +-
src/components/project/edit/BudgetStep.svelte | 37 +++++------
.../project/edit/CollabsModal.svelte | 2 +-
.../project/edit/ProjectEditor.svelte | 61 ++++++++++++++++++-
.../project/edit/ProjectPreviewModal.svelte | 35 ++++++++---
.../project/edit/RewardsModal.svelte | 2 +-
8 files changed, 145 insertions(+), 38 deletions(-)
diff --git a/src/auth/store.ts b/src/auth/store.ts
index 9c9ed489..ab2b0a0a 100644
--- a/src/auth/store.ts
+++ b/src/auth/store.ts
@@ -1,5 +1,45 @@
-import { writable, type Writable } from "svelte/store";
+import { get, writable, type Writable } from "svelte/store";
import type { Session } from "./types";
export const session: Writable = writable();
+
+let pendingRefresh: Promise | undefined;
+
+/**
+ * Re-reads the session from the server. `/api/session` refreshes an expired access
+ * token before returning it, which keeps long-lived tabs signed in instead of
+ * sending a token the API will reject.
+ *
+ * Concurrent callers share the same request: several API calls can notice the stale
+ * token at once (the project preview fetches the owner and the accounting in parallel).
+ */
+export function refreshSession(): Promise {
+ pendingRefresh ??= (async () => {
+ try {
+ const response = await fetch("/api/session", {
+ headers: { Accept: "application/json" },
+ cache: "no-store",
+ });
+
+ if (!response.ok) {
+ return get(session);
+ }
+
+ const data = (await response.json()) as Session | null;
+ const current = data ? { ...data, expires_at: new Date(data.expires_at) } : undefined;
+
+ session.set(current);
+
+ return current;
+ } catch (error) {
+ console.error("Session refresh failed:", error);
+
+ return get(session);
+ }
+ })().finally(() => {
+ pendingRefresh = undefined;
+ });
+
+ return pendingRefresh;
+}
diff --git a/src/components/library/inputs/ImageUploadModal.svelte b/src/components/library/inputs/ImageUploadModal.svelte
index 645f31d4..8f1599b0 100644
--- a/src/components/library/inputs/ImageUploadModal.svelte
+++ b/src/components/library/inputs/ImageUploadModal.svelte
@@ -48,7 +48,7 @@
>