Skip to content

Commit

Permalink
Update graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
hdiniz committed Nov 27, 2024
1 parent cf93b81 commit 1a7d7b7
Show file tree
Hide file tree
Showing 4 changed files with 305 additions and 177 deletions.
7 changes: 7 additions & 0 deletions lib/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,7 @@ type PlanType {

type Policies {
id: String
EXPENSE_POLICIES: EXPENSE_POLICIES
EXPENSE_AUTHOR_CANNOT_APPROVE: EXPENSE_AUTHOR_CANNOT_APPROVE
REQUIRE_2FA_FOR_ADMINS: Boolean
COLLECTIVE_ADMINS_CAN_REFUND: Boolean
Expand All @@ -1146,6 +1147,12 @@ type Policies {
COLLECTIVE_ADMINS_CAN_SEE_PAYOUT_METHODS: Boolean
}

type EXPENSE_POLICIES {
invoicePolicy: String
receiptPolicy: String
titlePolicy: String
}

type EXPENSE_AUTHOR_CANNOT_APPROVE {
amountInCents: Int
enabled: Boolean
Expand Down
135 changes: 117 additions & 18 deletions lib/graphql/schemaV2.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ interface Account {
The currency of the account
"""
currency: Currency!
expensePolicy: String
expensePolicy: String @deprecated(reason: "2024-11-04: Please use policies.EXPENSE_POLICIES")

"""
Defines if the contributors wants to be incognito (name not displayed)
Expand Down Expand Up @@ -2533,6 +2533,11 @@ type Expense {
"""
securityChecks: [SecurityCheck]

"""
[Host Admin only] Key to access the draft of this expense
"""
draftKey: String

"""
Custom data for this expense
"""
Expand Down Expand Up @@ -2661,7 +2666,7 @@ type Host implements Account & AccountWithContributions {
The currency of the account
"""
currency: Currency!
expensePolicy: String
expensePolicy: String @deprecated(reason: "2024-11-04: Please use policies.EXPENSE_POLICIES")

"""
Defines if the contributors wants to be incognito (name not displayed)
Expand Down Expand Up @@ -4148,7 +4153,7 @@ type Contributor {
If the contributor has a page on Open Collective, this is the slug to link to it. Always null for incognito contributors
"""
collectiveSlug: String @deprecated(reason: "2024-08-26: Use account.slug instead")
account: String
account: Account

"""
Contributor avatar or logo
Expand Down Expand Up @@ -5838,6 +5843,7 @@ enum VirtualCardStatus {

type Policies {
id: String
EXPENSE_POLICIES: EXPENSE_POLICIES
EXPENSE_AUTHOR_CANNOT_APPROVE: EXPENSE_AUTHOR_CANNOT_APPROVE
REQUIRE_2FA_FOR_ADMINS: Boolean
COLLECTIVE_ADMINS_CAN_REFUND: Boolean
Expand All @@ -5848,6 +5854,12 @@ type Policies {
COLLECTIVE_ADMINS_CAN_SEE_PAYOUT_METHODS: Boolean
}

type EXPENSE_POLICIES {
invoicePolicy: String
receiptPolicy: String
titlePolicy: String
}

type EXPENSE_AUTHOR_CANNOT_APPROVE {
amountInCents: Int
enabled: Boolean
Expand Down Expand Up @@ -7723,7 +7735,7 @@ type Bot implements Account {
The currency of the account
"""
currency: Currency!
expensePolicy: String
expensePolicy: String @deprecated(reason: "2024-11-04: Please use policies.EXPENSE_POLICIES")

"""
Defines if the contributors wants to be incognito (name not displayed)
Expand Down Expand Up @@ -8580,7 +8592,7 @@ type Collective implements Account & AccountWithHost & AccountWithContributions
The currency of the account
"""
currency: Currency!
expensePolicy: String
expensePolicy: String @deprecated(reason: "2024-11-04: Please use policies.EXPENSE_POLICIES")

"""
Defines if the contributors wants to be incognito (name not displayed)
Expand Down Expand Up @@ -9968,7 +9980,7 @@ type Event implements Account & AccountWithHost & AccountWithContributions & Acc
The currency of the account
"""
currency: Currency!
expensePolicy: String
expensePolicy: String @deprecated(reason: "2024-11-04: Please use policies.EXPENSE_POLICIES")

"""
Defines if the contributors wants to be incognito (name not displayed)
Expand Down Expand Up @@ -11076,7 +11088,7 @@ type Individual implements Account {
The currency of the account
"""
currency: Currency!
expensePolicy: String
expensePolicy: String @deprecated(reason: "2024-11-04: Please use policies.EXPENSE_POLICIES")

"""
Defines if the contributors wants to be incognito (name not displayed)
Expand Down Expand Up @@ -12139,7 +12151,7 @@ type Organization implements Account & AccountWithContributions {
The currency of the account
"""
currency: Currency!
expensePolicy: String
expensePolicy: String @deprecated(reason: "2024-11-04: Please use policies.EXPENSE_POLICIES")

"""
Defines if the contributors wants to be incognito (name not displayed)
Expand Down Expand Up @@ -13091,7 +13103,7 @@ type Vendor implements Account & AccountWithContributions {
The currency of the account
"""
currency: Currency!
expensePolicy: String
expensePolicy: String @deprecated(reason: "2024-11-04: Please use policies.EXPENSE_POLICIES")

"""
Defines if the contributors wants to be incognito (name not displayed)
Expand Down Expand Up @@ -16677,7 +16689,7 @@ type Fund implements Account & AccountWithHost & AccountWithContributions {
The currency of the account
"""
currency: Currency!
expensePolicy: String
expensePolicy: String @deprecated(reason: "2024-11-04: Please use policies.EXPENSE_POLICIES")

"""
Defines if the contributors wants to be incognito (name not displayed)
Expand Down Expand Up @@ -17663,7 +17675,7 @@ type Project implements Account & AccountWithHost & AccountWithContributions & A
The currency of the account
"""
currency: Currency!
expensePolicy: String
expensePolicy: String @deprecated(reason: "2024-11-04: Please use policies.EXPENSE_POLICIES")

"""
Defines if the contributors wants to be incognito (name not displayed)
Expand Down Expand Up @@ -19417,6 +19429,11 @@ type Mutation {
If the expense was imported, this is the reference to the row
"""
transactionsImportRow: TransactionsImportRowReferenceInput

"""
A optional private comment to add to the created expense
"""
privateComment: String
): Expense!

"""
Expand Down Expand Up @@ -19487,6 +19504,11 @@ type Mutation {
Account where the expense will be created
"""
account: AccountReferenceInput!

"""
Skip sending the invite email
"""
skipInvite: Boolean! = false
): Expense!

"""
Expand Down Expand Up @@ -20772,6 +20794,16 @@ input CollectiveCreateInput {
githubHandle: String @deprecated(reason: "2022-06-03: Please use repositoryUrl")
repositoryUrl: String @deprecated(reason: "2023-01-16: Please use socialLinks")
settings: JSON

"""
The profile avatar image
"""
image: Upload

"""
The profile background image, for the banner and social media sharing
"""
backgroundImage: Upload
}

"""
Expand Down Expand Up @@ -20809,6 +20841,11 @@ input LocationInput {
structured: JSON
}

"""
The `Upload` scalar type represents a file upload.
"""
scalar Upload

input IndividualCreateInput {
name: String!
email: String!
Expand Down Expand Up @@ -20854,6 +20891,16 @@ input EventCreateInput {
Timezone of the Event (TZ database format, e.g. UTC or Europe/Berlin)
"""
timezone: String!

"""
The profile avatar image
"""
image: Upload

"""
The profile background image, for the banner and social media sharing
"""
backgroundImage: Upload
}

input FundCreateInput {
Expand All @@ -20862,6 +20909,16 @@ input FundCreateInput {
description: String!
tags: [String]
settings: JSON

"""
The profile avatar image
"""
image: Upload

"""
The profile background image, for the banner and social media sharing
"""
backgroundImage: Upload
}

input OrganizationCreateInput {
Expand All @@ -20871,6 +20928,16 @@ input OrganizationCreateInput {
description: String!
website: String @deprecated(reason: "2024-11-12: Please use socialLinks")
settings: JSON

"""
The profile avatar image
"""
image: Upload

"""
The profile background image, for the banner and social media sharing
"""
backgroundImage: Upload
}

input ProjectCreateInput {
Expand All @@ -20884,6 +20951,16 @@ input ProjectCreateInput {
The social links in order of preference
"""
socialLinks: [SocialLinkInput!]

"""
The profile avatar image
"""
image: Upload

"""
The profile background image, for the banner and social media sharing
"""
backgroundImage: Upload
}

input SocialLinkInput {
Expand Down Expand Up @@ -20940,6 +21017,7 @@ input AccountUpdateInput {
}

input PoliciesInput {
EXPENSE_POLICIES: PoliciesExpensePolicies
EXPENSE_AUTHOR_CANNOT_APPROVE: PoliciesCollectiveExpenseAuthorCannotApprove
REQUIRE_2FA_FOR_ADMINS: Boolean
COLLECTIVE_ADMINS_CAN_REFUND: Boolean
Expand All @@ -20949,6 +21027,12 @@ input PoliciesInput {
COLLECTIVE_ADMINS_CAN_SEE_PAYOUT_METHODS: Boolean
}

input PoliciesExpensePolicies {
invoicePolicy: String
receiptPolicy: String
titlePolicy: String
}

input PoliciesCollectiveExpenseAuthorCannotApprove {
amountInCents: Int
enabled: Boolean
Expand Down Expand Up @@ -21883,11 +21967,6 @@ type IndividualConfirmEmailResponse {
sessionToken: String
}

"""
The `Upload` scalar type represents a file upload.
"""
scalar Upload

input MemberInvitationReferenceInput {
"""
The public id identifying the member invitation (ie: dgm9bnk8-0437xqry-ejpvzeol-jdayw5re)
Expand Down Expand Up @@ -22888,9 +22967,19 @@ input VendorCreateInput {
legalName: String
tags: [NonEmptyString]
location: LocationInput
imageUrl: String
imageUrl: String @deprecated(reason: "2024-11-26: Please use image + backgroundImage fields")
vendorInfo: VendorInfoInput
payoutMethod: PayoutMethodInput

"""
The profile avatar image
"""
image: Upload

"""
The profile background image, for the banner and social media sharing
"""
backgroundImage: Upload
}

"""
Expand Down Expand Up @@ -22932,7 +23021,17 @@ input VendorEditInput {
legalName: String
tags: [NonEmptyString]
location: LocationInput
imageUrl: String
imageUrl: String @deprecated(reason: "2024-11-26: Please use image + backgroundImage fields")
vendorInfo: VendorInfoInput
payoutMethod: PayoutMethodInput

"""
The profile avatar image
"""
image: Upload

"""
The profile background image, for the banner and social media sharing
"""
backgroundImage: Upload
}
Loading

0 comments on commit 1a7d7b7

Please sign in to comment.