diff --git a/carbonmark-api/package.json b/carbonmark-api/package.json index 8839b6a907..dbeeda7e4c 100644 --- a/carbonmark-api/package.json +++ b/carbonmark-api/package.json @@ -1,6 +1,6 @@ { "name": "@klimadao/carbonmark-api", - "version": "5.2.1", + "version": "5.3.0", "description": "An API for exploring Carbonmark project data, prices and activity.", "main": "app.ts", "scripts": { diff --git a/carbonmark-api/src/.generated/mocks/icr.mocks.ts b/carbonmark-api/src/.generated/mocks/icr.mocks.ts new file mode 100644 index 0000000000..0317d8f3f2 --- /dev/null +++ b/carbonmark-api/src/.generated/mocks/icr.mocks.ts @@ -0,0 +1,1070 @@ +//@ts-nocheck +import { BlockChangedFilter, Block_Height, Cancellation, Cancellation_Filter, ExAnte, ExAnteHolder, ExAnteHolder_Filter, ExAnte_Filter, ExPost, ExPostHolder, ExPostHolder_Filter, ExPost_Filter, Holder, Holder_Filter, Project, Project_Filter, Query, RetirementCertificate, RetirementCertificate_Filter, Subscription, _Block_, _Meta_, Cancellation_OrderBy, ExAnteHolder_OrderBy, ExAnte_OrderBy, ExPostHolder_OrderBy, ExPost_OrderBy, Holder_OrderBy, OrderDirection, Project_OrderBy, RetirementCertificate_OrderBy, _SubgraphErrorPolicy_ } from '../types/icr.types'; + +export const aBlockChangedFilter = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): BlockChangedFilter => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('BlockChangedFilter'); + return { + number_gte: overrides && overrides.hasOwnProperty('number_gte') ? overrides.number_gte! : 4175, + }; +}; + +export const aBlock_Height = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): Block_Height => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('Block_Height'); + return { + hash: overrides && overrides.hasOwnProperty('hash') ? overrides.hash! : 'ut', + number: overrides && overrides.hasOwnProperty('number') ? overrides.number! : 6885, + number_gte: overrides && overrides.hasOwnProperty('number_gte') ? overrides.number_gte! : 5347, + }; +}; + +export const aCancellation = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): Cancellation => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('Cancellation'); + return { + amount: overrides && overrides.hasOwnProperty('amount') ? overrides.amount! : '100000000000000000000', + cancelledBy: overrides && overrides.hasOwnProperty('cancelledBy') ? overrides.cancelledBy! : relationshipsToOmit.has('Holder') ? {} as Holder : aHolder({}, relationshipsToOmit), + createdAt: overrides && overrides.hasOwnProperty('createdAt') ? overrides.createdAt! : '100000000000000000000', + exPost: overrides && overrides.hasOwnProperty('exPost') ? overrides.exPost! : relationshipsToOmit.has('ExPost') ? {} as ExPost : anExPost({}, relationshipsToOmit), + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'cumque', + project: overrides && overrides.hasOwnProperty('project') ? overrides.project! : relationshipsToOmit.has('Project') ? {} as Project : aProject({}, relationshipsToOmit), + serialization: overrides && overrides.hasOwnProperty('serialization') ? overrides.serialization! : 'blanditiis', + transactionHash: overrides && overrides.hasOwnProperty('transactionHash') ? overrides.transactionHash! : 'magni', + }; +}; + +export const aCancellation_Filter = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): Cancellation_Filter => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('Cancellation_Filter'); + return { + _change_block: overrides && overrides.hasOwnProperty('_change_block') ? overrides._change_block! : relationshipsToOmit.has('BlockChangedFilter') ? {} as BlockChangedFilter : aBlockChangedFilter({}, relationshipsToOmit), + amount: overrides && overrides.hasOwnProperty('amount') ? overrides.amount! : '100000000000000000000', + amount_gt: overrides && overrides.hasOwnProperty('amount_gt') ? overrides.amount_gt! : '100000000000000000000', + amount_gte: overrides && overrides.hasOwnProperty('amount_gte') ? overrides.amount_gte! : '100000000000000000000', + amount_in: overrides && overrides.hasOwnProperty('amount_in') ? overrides.amount_in! : ['100000000000000000000'], + amount_lt: overrides && overrides.hasOwnProperty('amount_lt') ? overrides.amount_lt! : '100000000000000000000', + amount_lte: overrides && overrides.hasOwnProperty('amount_lte') ? overrides.amount_lte! : '100000000000000000000', + amount_not: overrides && overrides.hasOwnProperty('amount_not') ? overrides.amount_not! : '100000000000000000000', + amount_not_in: overrides && overrides.hasOwnProperty('amount_not_in') ? overrides.amount_not_in! : ['100000000000000000000'], + and: overrides && overrides.hasOwnProperty('and') ? overrides.and! : [relationshipsToOmit.has('Cancellation_Filter') ? {} as Cancellation_Filter : aCancellation_Filter({}, relationshipsToOmit)], + cancelledBy: overrides && overrides.hasOwnProperty('cancelledBy') ? overrides.cancelledBy! : 'aut', + cancelledBy_: overrides && overrides.hasOwnProperty('cancelledBy_') ? overrides.cancelledBy_! : relationshipsToOmit.has('Holder_Filter') ? {} as Holder_Filter : aHolder_Filter({}, relationshipsToOmit), + cancelledBy_contains: overrides && overrides.hasOwnProperty('cancelledBy_contains') ? overrides.cancelledBy_contains! : 'qui', + cancelledBy_contains_nocase: overrides && overrides.hasOwnProperty('cancelledBy_contains_nocase') ? overrides.cancelledBy_contains_nocase! : 'dolore', + cancelledBy_ends_with: overrides && overrides.hasOwnProperty('cancelledBy_ends_with') ? overrides.cancelledBy_ends_with! : 'qui', + cancelledBy_ends_with_nocase: overrides && overrides.hasOwnProperty('cancelledBy_ends_with_nocase') ? overrides.cancelledBy_ends_with_nocase! : 'autem', + cancelledBy_gt: overrides && overrides.hasOwnProperty('cancelledBy_gt') ? overrides.cancelledBy_gt! : 'repudiandae', + cancelledBy_gte: overrides && overrides.hasOwnProperty('cancelledBy_gte') ? overrides.cancelledBy_gte! : 'eligendi', + cancelledBy_in: overrides && overrides.hasOwnProperty('cancelledBy_in') ? overrides.cancelledBy_in! : ['nulla'], + cancelledBy_lt: overrides && overrides.hasOwnProperty('cancelledBy_lt') ? overrides.cancelledBy_lt! : 'necessitatibus', + cancelledBy_lte: overrides && overrides.hasOwnProperty('cancelledBy_lte') ? overrides.cancelledBy_lte! : 'ullam', + cancelledBy_not: overrides && overrides.hasOwnProperty('cancelledBy_not') ? overrides.cancelledBy_not! : 'laudantium', + cancelledBy_not_contains: overrides && overrides.hasOwnProperty('cancelledBy_not_contains') ? overrides.cancelledBy_not_contains! : 'laudantium', + cancelledBy_not_contains_nocase: overrides && overrides.hasOwnProperty('cancelledBy_not_contains_nocase') ? overrides.cancelledBy_not_contains_nocase! : 'minus', + cancelledBy_not_ends_with: overrides && overrides.hasOwnProperty('cancelledBy_not_ends_with') ? overrides.cancelledBy_not_ends_with! : 'ducimus', + cancelledBy_not_ends_with_nocase: overrides && overrides.hasOwnProperty('cancelledBy_not_ends_with_nocase') ? overrides.cancelledBy_not_ends_with_nocase! : 'ut', + cancelledBy_not_in: overrides && overrides.hasOwnProperty('cancelledBy_not_in') ? overrides.cancelledBy_not_in! : ['et'], + cancelledBy_not_starts_with: overrides && overrides.hasOwnProperty('cancelledBy_not_starts_with') ? overrides.cancelledBy_not_starts_with! : 'in', + cancelledBy_not_starts_with_nocase: overrides && overrides.hasOwnProperty('cancelledBy_not_starts_with_nocase') ? overrides.cancelledBy_not_starts_with_nocase! : 'quidem', + cancelledBy_starts_with: overrides && overrides.hasOwnProperty('cancelledBy_starts_with') ? overrides.cancelledBy_starts_with! : 'consequatur', + cancelledBy_starts_with_nocase: overrides && overrides.hasOwnProperty('cancelledBy_starts_with_nocase') ? overrides.cancelledBy_starts_with_nocase! : 'sint', + createdAt: overrides && overrides.hasOwnProperty('createdAt') ? overrides.createdAt! : '100000000000000000000', + createdAt_gt: overrides && overrides.hasOwnProperty('createdAt_gt') ? overrides.createdAt_gt! : '100000000000000000000', + createdAt_gte: overrides && overrides.hasOwnProperty('createdAt_gte') ? overrides.createdAt_gte! : '100000000000000000000', + createdAt_in: overrides && overrides.hasOwnProperty('createdAt_in') ? overrides.createdAt_in! : ['100000000000000000000'], + createdAt_lt: overrides && overrides.hasOwnProperty('createdAt_lt') ? overrides.createdAt_lt! : '100000000000000000000', + createdAt_lte: overrides && overrides.hasOwnProperty('createdAt_lte') ? overrides.createdAt_lte! : '100000000000000000000', + createdAt_not: overrides && overrides.hasOwnProperty('createdAt_not') ? overrides.createdAt_not! : '100000000000000000000', + createdAt_not_in: overrides && overrides.hasOwnProperty('createdAt_not_in') ? overrides.createdAt_not_in! : ['100000000000000000000'], + exPost: overrides && overrides.hasOwnProperty('exPost') ? overrides.exPost! : 'ut', + exPost_: overrides && overrides.hasOwnProperty('exPost_') ? overrides.exPost_! : relationshipsToOmit.has('ExPost_Filter') ? {} as ExPost_Filter : anExPost_Filter({}, relationshipsToOmit), + exPost_contains: overrides && overrides.hasOwnProperty('exPost_contains') ? overrides.exPost_contains! : 'omnis', + exPost_contains_nocase: overrides && overrides.hasOwnProperty('exPost_contains_nocase') ? overrides.exPost_contains_nocase! : 'qui', + exPost_ends_with: overrides && overrides.hasOwnProperty('exPost_ends_with') ? overrides.exPost_ends_with! : 'dolores', + exPost_ends_with_nocase: overrides && overrides.hasOwnProperty('exPost_ends_with_nocase') ? overrides.exPost_ends_with_nocase! : 'magnam', + exPost_gt: overrides && overrides.hasOwnProperty('exPost_gt') ? overrides.exPost_gt! : 'cupiditate', + exPost_gte: overrides && overrides.hasOwnProperty('exPost_gte') ? overrides.exPost_gte! : 'mollitia', + exPost_in: overrides && overrides.hasOwnProperty('exPost_in') ? overrides.exPost_in! : ['nesciunt'], + exPost_lt: overrides && overrides.hasOwnProperty('exPost_lt') ? overrides.exPost_lt! : 'consectetur', + exPost_lte: overrides && overrides.hasOwnProperty('exPost_lte') ? overrides.exPost_lte! : 'sunt', + exPost_not: overrides && overrides.hasOwnProperty('exPost_not') ? overrides.exPost_not! : 'dolor', + exPost_not_contains: overrides && overrides.hasOwnProperty('exPost_not_contains') ? overrides.exPost_not_contains! : 'facilis', + exPost_not_contains_nocase: overrides && overrides.hasOwnProperty('exPost_not_contains_nocase') ? overrides.exPost_not_contains_nocase! : 'quaerat', + exPost_not_ends_with: overrides && overrides.hasOwnProperty('exPost_not_ends_with') ? overrides.exPost_not_ends_with! : 'eveniet', + exPost_not_ends_with_nocase: overrides && overrides.hasOwnProperty('exPost_not_ends_with_nocase') ? overrides.exPost_not_ends_with_nocase! : 'quisquam', + exPost_not_in: overrides && overrides.hasOwnProperty('exPost_not_in') ? overrides.exPost_not_in! : ['nisi'], + exPost_not_starts_with: overrides && overrides.hasOwnProperty('exPost_not_starts_with') ? overrides.exPost_not_starts_with! : 'nam', + exPost_not_starts_with_nocase: overrides && overrides.hasOwnProperty('exPost_not_starts_with_nocase') ? overrides.exPost_not_starts_with_nocase! : 'quis', + exPost_starts_with: overrides && overrides.hasOwnProperty('exPost_starts_with') ? overrides.exPost_starts_with! : 'accusamus', + exPost_starts_with_nocase: overrides && overrides.hasOwnProperty('exPost_starts_with_nocase') ? overrides.exPost_starts_with_nocase! : 'doloribus', + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'exercitationem', + id_contains: overrides && overrides.hasOwnProperty('id_contains') ? overrides.id_contains! : 'necessitatibus', + id_gt: overrides && overrides.hasOwnProperty('id_gt') ? overrides.id_gt! : 'autem', + id_gte: overrides && overrides.hasOwnProperty('id_gte') ? overrides.id_gte! : 'enim', + id_in: overrides && overrides.hasOwnProperty('id_in') ? overrides.id_in! : ['possimus'], + id_lt: overrides && overrides.hasOwnProperty('id_lt') ? overrides.id_lt! : 'fugit', + id_lte: overrides && overrides.hasOwnProperty('id_lte') ? overrides.id_lte! : 'quia', + id_not: overrides && overrides.hasOwnProperty('id_not') ? overrides.id_not! : 'repellendus', + id_not_contains: overrides && overrides.hasOwnProperty('id_not_contains') ? overrides.id_not_contains! : 'itaque', + id_not_in: overrides && overrides.hasOwnProperty('id_not_in') ? overrides.id_not_in! : ['in'], + or: overrides && overrides.hasOwnProperty('or') ? overrides.or! : [relationshipsToOmit.has('Cancellation_Filter') ? {} as Cancellation_Filter : aCancellation_Filter({}, relationshipsToOmit)], + project: overrides && overrides.hasOwnProperty('project') ? overrides.project! : 'quis', + project_: overrides && overrides.hasOwnProperty('project_') ? overrides.project_! : relationshipsToOmit.has('Project_Filter') ? {} as Project_Filter : aProject_Filter({}, relationshipsToOmit), + project_contains: overrides && overrides.hasOwnProperty('project_contains') ? overrides.project_contains! : 'dolorem', + project_contains_nocase: overrides && overrides.hasOwnProperty('project_contains_nocase') ? overrides.project_contains_nocase! : 'excepturi', + project_ends_with: overrides && overrides.hasOwnProperty('project_ends_with') ? overrides.project_ends_with! : 'aliquid', + project_ends_with_nocase: overrides && overrides.hasOwnProperty('project_ends_with_nocase') ? overrides.project_ends_with_nocase! : 'maxime', + project_gt: overrides && overrides.hasOwnProperty('project_gt') ? overrides.project_gt! : 'blanditiis', + project_gte: overrides && overrides.hasOwnProperty('project_gte') ? overrides.project_gte! : 'minima', + project_in: overrides && overrides.hasOwnProperty('project_in') ? overrides.project_in! : ['quisquam'], + project_lt: overrides && overrides.hasOwnProperty('project_lt') ? overrides.project_lt! : 'dolorum', + project_lte: overrides && overrides.hasOwnProperty('project_lte') ? overrides.project_lte! : 'tenetur', + project_not: overrides && overrides.hasOwnProperty('project_not') ? overrides.project_not! : 'consequatur', + project_not_contains: overrides && overrides.hasOwnProperty('project_not_contains') ? overrides.project_not_contains! : 'harum', + project_not_contains_nocase: overrides && overrides.hasOwnProperty('project_not_contains_nocase') ? overrides.project_not_contains_nocase! : 'voluptatem', + project_not_ends_with: overrides && overrides.hasOwnProperty('project_not_ends_with') ? overrides.project_not_ends_with! : 'ipsum', + project_not_ends_with_nocase: overrides && overrides.hasOwnProperty('project_not_ends_with_nocase') ? overrides.project_not_ends_with_nocase! : 'amet', + project_not_in: overrides && overrides.hasOwnProperty('project_not_in') ? overrides.project_not_in! : ['voluptates'], + project_not_starts_with: overrides && overrides.hasOwnProperty('project_not_starts_with') ? overrides.project_not_starts_with! : 'numquam', + project_not_starts_with_nocase: overrides && overrides.hasOwnProperty('project_not_starts_with_nocase') ? overrides.project_not_starts_with_nocase! : 'aut', + project_starts_with: overrides && overrides.hasOwnProperty('project_starts_with') ? overrides.project_starts_with! : 'velit', + project_starts_with_nocase: overrides && overrides.hasOwnProperty('project_starts_with_nocase') ? overrides.project_starts_with_nocase! : 'in', + serialization: overrides && overrides.hasOwnProperty('serialization') ? overrides.serialization! : 'est', + serialization_contains: overrides && overrides.hasOwnProperty('serialization_contains') ? overrides.serialization_contains! : 'ut', + serialization_contains_nocase: overrides && overrides.hasOwnProperty('serialization_contains_nocase') ? overrides.serialization_contains_nocase! : 'non', + serialization_ends_with: overrides && overrides.hasOwnProperty('serialization_ends_with') ? overrides.serialization_ends_with! : 'nemo', + serialization_ends_with_nocase: overrides && overrides.hasOwnProperty('serialization_ends_with_nocase') ? overrides.serialization_ends_with_nocase! : 'ea', + serialization_gt: overrides && overrides.hasOwnProperty('serialization_gt') ? overrides.serialization_gt! : 'corrupti', + serialization_gte: overrides && overrides.hasOwnProperty('serialization_gte') ? overrides.serialization_gte! : 'fugiat', + serialization_in: overrides && overrides.hasOwnProperty('serialization_in') ? overrides.serialization_in! : ['atque'], + serialization_lt: overrides && overrides.hasOwnProperty('serialization_lt') ? overrides.serialization_lt! : 'neque', + serialization_lte: overrides && overrides.hasOwnProperty('serialization_lte') ? overrides.serialization_lte! : 'voluptas', + serialization_not: overrides && overrides.hasOwnProperty('serialization_not') ? overrides.serialization_not! : 'officia', + serialization_not_contains: overrides && overrides.hasOwnProperty('serialization_not_contains') ? overrides.serialization_not_contains! : 'eligendi', + serialization_not_contains_nocase: overrides && overrides.hasOwnProperty('serialization_not_contains_nocase') ? overrides.serialization_not_contains_nocase! : 'unde', + serialization_not_ends_with: overrides && overrides.hasOwnProperty('serialization_not_ends_with') ? overrides.serialization_not_ends_with! : 'ut', + serialization_not_ends_with_nocase: overrides && overrides.hasOwnProperty('serialization_not_ends_with_nocase') ? overrides.serialization_not_ends_with_nocase! : 'qui', + serialization_not_in: overrides && overrides.hasOwnProperty('serialization_not_in') ? overrides.serialization_not_in! : ['quia'], + serialization_not_starts_with: overrides && overrides.hasOwnProperty('serialization_not_starts_with') ? overrides.serialization_not_starts_with! : 'harum', + serialization_not_starts_with_nocase: overrides && overrides.hasOwnProperty('serialization_not_starts_with_nocase') ? overrides.serialization_not_starts_with_nocase! : 'et', + serialization_starts_with: overrides && overrides.hasOwnProperty('serialization_starts_with') ? overrides.serialization_starts_with! : 'similique', + serialization_starts_with_nocase: overrides && overrides.hasOwnProperty('serialization_starts_with_nocase') ? overrides.serialization_starts_with_nocase! : 'voluptatem', + transactionHash: overrides && overrides.hasOwnProperty('transactionHash') ? overrides.transactionHash! : 'maiores', + transactionHash_contains: overrides && overrides.hasOwnProperty('transactionHash_contains') ? overrides.transactionHash_contains! : 'quasi', + transactionHash_gt: overrides && overrides.hasOwnProperty('transactionHash_gt') ? overrides.transactionHash_gt! : 'ad', + transactionHash_gte: overrides && overrides.hasOwnProperty('transactionHash_gte') ? overrides.transactionHash_gte! : 'dolorem', + transactionHash_in: overrides && overrides.hasOwnProperty('transactionHash_in') ? overrides.transactionHash_in! : ['facilis'], + transactionHash_lt: overrides && overrides.hasOwnProperty('transactionHash_lt') ? overrides.transactionHash_lt! : 'autem', + transactionHash_lte: overrides && overrides.hasOwnProperty('transactionHash_lte') ? overrides.transactionHash_lte! : 'quae', + transactionHash_not: overrides && overrides.hasOwnProperty('transactionHash_not') ? overrides.transactionHash_not! : 'sit', + transactionHash_not_contains: overrides && overrides.hasOwnProperty('transactionHash_not_contains') ? overrides.transactionHash_not_contains! : 'eum', + transactionHash_not_in: overrides && overrides.hasOwnProperty('transactionHash_not_in') ? overrides.transactionHash_not_in! : ['similique'], + }; +}; + +export const anExAnte = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): ExAnte => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('ExAnte'); + return { + exPost: overrides && overrides.hasOwnProperty('exPost') ? overrides.exPost! : relationshipsToOmit.has('ExPost') ? {} as ExPost : anExPost({}, relationshipsToOmit), + holders: overrides && overrides.hasOwnProperty('holders') ? overrides.holders! : [relationshipsToOmit.has('ExAnteHolder') ? {} as ExAnteHolder : anExAnteHolder({}, relationshipsToOmit)], + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'et', + project: overrides && overrides.hasOwnProperty('project') ? overrides.project! : relationshipsToOmit.has('Project') ? {} as Project : aProject({}, relationshipsToOmit), + serialization: overrides && overrides.hasOwnProperty('serialization') ? overrides.serialization! : 'laudantium', + supply: overrides && overrides.hasOwnProperty('supply') ? overrides.supply! : '100000000000000000000', + tokenId: overrides && overrides.hasOwnProperty('tokenId') ? overrides.tokenId! : '100000000000000000000', + }; +}; + +export const anExAnteHolder = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): ExAnteHolder => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('ExAnteHolder'); + return { + amount: overrides && overrides.hasOwnProperty('amount') ? overrides.amount! : '100000000000000000000', + createdAt: overrides && overrides.hasOwnProperty('createdAt') ? overrides.createdAt! : '100000000000000000000', + exAnte: overrides && overrides.hasOwnProperty('exAnte') ? overrides.exAnte! : relationshipsToOmit.has('ExAnte') ? {} as ExAnte : anExAnte({}, relationshipsToOmit), + holder: overrides && overrides.hasOwnProperty('holder') ? overrides.holder! : relationshipsToOmit.has('Holder') ? {} as Holder : aHolder({}, relationshipsToOmit), + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'id', + updatedAt: overrides && overrides.hasOwnProperty('updatedAt') ? overrides.updatedAt! : '100000000000000000000', + }; +}; + +export const anExAnteHolder_Filter = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): ExAnteHolder_Filter => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('ExAnteHolder_Filter'); + return { + _change_block: overrides && overrides.hasOwnProperty('_change_block') ? overrides._change_block! : relationshipsToOmit.has('BlockChangedFilter') ? {} as BlockChangedFilter : aBlockChangedFilter({}, relationshipsToOmit), + amount: overrides && overrides.hasOwnProperty('amount') ? overrides.amount! : '100000000000000000000', + amount_gt: overrides && overrides.hasOwnProperty('amount_gt') ? overrides.amount_gt! : '100000000000000000000', + amount_gte: overrides && overrides.hasOwnProperty('amount_gte') ? overrides.amount_gte! : '100000000000000000000', + amount_in: overrides && overrides.hasOwnProperty('amount_in') ? overrides.amount_in! : ['100000000000000000000'], + amount_lt: overrides && overrides.hasOwnProperty('amount_lt') ? overrides.amount_lt! : '100000000000000000000', + amount_lte: overrides && overrides.hasOwnProperty('amount_lte') ? overrides.amount_lte! : '100000000000000000000', + amount_not: overrides && overrides.hasOwnProperty('amount_not') ? overrides.amount_not! : '100000000000000000000', + amount_not_in: overrides && overrides.hasOwnProperty('amount_not_in') ? overrides.amount_not_in! : ['100000000000000000000'], + and: overrides && overrides.hasOwnProperty('and') ? overrides.and! : [relationshipsToOmit.has('ExAnteHolder_Filter') ? {} as ExAnteHolder_Filter : anExAnteHolder_Filter({}, relationshipsToOmit)], + createdAt: overrides && overrides.hasOwnProperty('createdAt') ? overrides.createdAt! : '100000000000000000000', + createdAt_gt: overrides && overrides.hasOwnProperty('createdAt_gt') ? overrides.createdAt_gt! : '100000000000000000000', + createdAt_gte: overrides && overrides.hasOwnProperty('createdAt_gte') ? overrides.createdAt_gte! : '100000000000000000000', + createdAt_in: overrides && overrides.hasOwnProperty('createdAt_in') ? overrides.createdAt_in! : ['100000000000000000000'], + createdAt_lt: overrides && overrides.hasOwnProperty('createdAt_lt') ? overrides.createdAt_lt! : '100000000000000000000', + createdAt_lte: overrides && overrides.hasOwnProperty('createdAt_lte') ? overrides.createdAt_lte! : '100000000000000000000', + createdAt_not: overrides && overrides.hasOwnProperty('createdAt_not') ? overrides.createdAt_not! : '100000000000000000000', + createdAt_not_in: overrides && overrides.hasOwnProperty('createdAt_not_in') ? overrides.createdAt_not_in! : ['100000000000000000000'], + exAnte: overrides && overrides.hasOwnProperty('exAnte') ? overrides.exAnte! : 'similique', + exAnte_: overrides && overrides.hasOwnProperty('exAnte_') ? overrides.exAnte_! : relationshipsToOmit.has('ExAnte_Filter') ? {} as ExAnte_Filter : anExAnte_Filter({}, relationshipsToOmit), + exAnte_contains: overrides && overrides.hasOwnProperty('exAnte_contains') ? overrides.exAnte_contains! : 'id', + exAnte_contains_nocase: overrides && overrides.hasOwnProperty('exAnte_contains_nocase') ? overrides.exAnte_contains_nocase! : 'dicta', + exAnte_ends_with: overrides && overrides.hasOwnProperty('exAnte_ends_with') ? overrides.exAnte_ends_with! : 'deserunt', + exAnte_ends_with_nocase: overrides && overrides.hasOwnProperty('exAnte_ends_with_nocase') ? overrides.exAnte_ends_with_nocase! : 'aut', + exAnte_gt: overrides && overrides.hasOwnProperty('exAnte_gt') ? overrides.exAnte_gt! : 'quo', + exAnte_gte: overrides && overrides.hasOwnProperty('exAnte_gte') ? overrides.exAnte_gte! : 'sit', + exAnte_in: overrides && overrides.hasOwnProperty('exAnte_in') ? overrides.exAnte_in! : ['facilis'], + exAnte_lt: overrides && overrides.hasOwnProperty('exAnte_lt') ? overrides.exAnte_lt! : 'ipsam', + exAnte_lte: overrides && overrides.hasOwnProperty('exAnte_lte') ? overrides.exAnte_lte! : 'consectetur', + exAnte_not: overrides && overrides.hasOwnProperty('exAnte_not') ? overrides.exAnte_not! : 'est', + exAnte_not_contains: overrides && overrides.hasOwnProperty('exAnte_not_contains') ? overrides.exAnte_not_contains! : 'iste', + exAnte_not_contains_nocase: overrides && overrides.hasOwnProperty('exAnte_not_contains_nocase') ? overrides.exAnte_not_contains_nocase! : 'quam', + exAnte_not_ends_with: overrides && overrides.hasOwnProperty('exAnte_not_ends_with') ? overrides.exAnte_not_ends_with! : 'nulla', + exAnte_not_ends_with_nocase: overrides && overrides.hasOwnProperty('exAnte_not_ends_with_nocase') ? overrides.exAnte_not_ends_with_nocase! : 'quos', + exAnte_not_in: overrides && overrides.hasOwnProperty('exAnte_not_in') ? overrides.exAnte_not_in! : ['reprehenderit'], + exAnte_not_starts_with: overrides && overrides.hasOwnProperty('exAnte_not_starts_with') ? overrides.exAnte_not_starts_with! : 'maiores', + exAnte_not_starts_with_nocase: overrides && overrides.hasOwnProperty('exAnte_not_starts_with_nocase') ? overrides.exAnte_not_starts_with_nocase! : 'eum', + exAnte_starts_with: overrides && overrides.hasOwnProperty('exAnte_starts_with') ? overrides.exAnte_starts_with! : 'non', + exAnte_starts_with_nocase: overrides && overrides.hasOwnProperty('exAnte_starts_with_nocase') ? overrides.exAnte_starts_with_nocase! : 'dicta', + holder: overrides && overrides.hasOwnProperty('holder') ? overrides.holder! : 'qui', + holder_: overrides && overrides.hasOwnProperty('holder_') ? overrides.holder_! : relationshipsToOmit.has('Holder_Filter') ? {} as Holder_Filter : aHolder_Filter({}, relationshipsToOmit), + holder_contains: overrides && overrides.hasOwnProperty('holder_contains') ? overrides.holder_contains! : 'aut', + holder_contains_nocase: overrides && overrides.hasOwnProperty('holder_contains_nocase') ? overrides.holder_contains_nocase! : 'molestiae', + holder_ends_with: overrides && overrides.hasOwnProperty('holder_ends_with') ? overrides.holder_ends_with! : 'est', + holder_ends_with_nocase: overrides && overrides.hasOwnProperty('holder_ends_with_nocase') ? overrides.holder_ends_with_nocase! : 'consequatur', + holder_gt: overrides && overrides.hasOwnProperty('holder_gt') ? overrides.holder_gt! : 'similique', + holder_gte: overrides && overrides.hasOwnProperty('holder_gte') ? overrides.holder_gte! : 'nemo', + holder_in: overrides && overrides.hasOwnProperty('holder_in') ? overrides.holder_in! : ['repellat'], + holder_lt: overrides && overrides.hasOwnProperty('holder_lt') ? overrides.holder_lt! : 'reiciendis', + holder_lte: overrides && overrides.hasOwnProperty('holder_lte') ? overrides.holder_lte! : 'vel', + holder_not: overrides && overrides.hasOwnProperty('holder_not') ? overrides.holder_not! : 'explicabo', + holder_not_contains: overrides && overrides.hasOwnProperty('holder_not_contains') ? overrides.holder_not_contains! : 'eaque', + holder_not_contains_nocase: overrides && overrides.hasOwnProperty('holder_not_contains_nocase') ? overrides.holder_not_contains_nocase! : 'quisquam', + holder_not_ends_with: overrides && overrides.hasOwnProperty('holder_not_ends_with') ? overrides.holder_not_ends_with! : 'omnis', + holder_not_ends_with_nocase: overrides && overrides.hasOwnProperty('holder_not_ends_with_nocase') ? overrides.holder_not_ends_with_nocase! : 'soluta', + holder_not_in: overrides && overrides.hasOwnProperty('holder_not_in') ? overrides.holder_not_in! : ['eius'], + holder_not_starts_with: overrides && overrides.hasOwnProperty('holder_not_starts_with') ? overrides.holder_not_starts_with! : 'sunt', + holder_not_starts_with_nocase: overrides && overrides.hasOwnProperty('holder_not_starts_with_nocase') ? overrides.holder_not_starts_with_nocase! : 'provident', + holder_starts_with: overrides && overrides.hasOwnProperty('holder_starts_with') ? overrides.holder_starts_with! : 'impedit', + holder_starts_with_nocase: overrides && overrides.hasOwnProperty('holder_starts_with_nocase') ? overrides.holder_starts_with_nocase! : 'quo', + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'recusandae', + id_contains: overrides && overrides.hasOwnProperty('id_contains') ? overrides.id_contains! : 'recusandae', + id_gt: overrides && overrides.hasOwnProperty('id_gt') ? overrides.id_gt! : 'ea', + id_gte: overrides && overrides.hasOwnProperty('id_gte') ? overrides.id_gte! : 'et', + id_in: overrides && overrides.hasOwnProperty('id_in') ? overrides.id_in! : ['optio'], + id_lt: overrides && overrides.hasOwnProperty('id_lt') ? overrides.id_lt! : 'et', + id_lte: overrides && overrides.hasOwnProperty('id_lte') ? overrides.id_lte! : 'laborum', + id_not: overrides && overrides.hasOwnProperty('id_not') ? overrides.id_not! : 'optio', + id_not_contains: overrides && overrides.hasOwnProperty('id_not_contains') ? overrides.id_not_contains! : 'eius', + id_not_in: overrides && overrides.hasOwnProperty('id_not_in') ? overrides.id_not_in! : ['totam'], + or: overrides && overrides.hasOwnProperty('or') ? overrides.or! : [relationshipsToOmit.has('ExAnteHolder_Filter') ? {} as ExAnteHolder_Filter : anExAnteHolder_Filter({}, relationshipsToOmit)], + updatedAt: overrides && overrides.hasOwnProperty('updatedAt') ? overrides.updatedAt! : '100000000000000000000', + updatedAt_gt: overrides && overrides.hasOwnProperty('updatedAt_gt') ? overrides.updatedAt_gt! : '100000000000000000000', + updatedAt_gte: overrides && overrides.hasOwnProperty('updatedAt_gte') ? overrides.updatedAt_gte! : '100000000000000000000', + updatedAt_in: overrides && overrides.hasOwnProperty('updatedAt_in') ? overrides.updatedAt_in! : ['100000000000000000000'], + updatedAt_lt: overrides && overrides.hasOwnProperty('updatedAt_lt') ? overrides.updatedAt_lt! : '100000000000000000000', + updatedAt_lte: overrides && overrides.hasOwnProperty('updatedAt_lte') ? overrides.updatedAt_lte! : '100000000000000000000', + updatedAt_not: overrides && overrides.hasOwnProperty('updatedAt_not') ? overrides.updatedAt_not! : '100000000000000000000', + updatedAt_not_in: overrides && overrides.hasOwnProperty('updatedAt_not_in') ? overrides.updatedAt_not_in! : ['100000000000000000000'], + }; +}; + +export const anExAnte_Filter = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): ExAnte_Filter => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('ExAnte_Filter'); + return { + _change_block: overrides && overrides.hasOwnProperty('_change_block') ? overrides._change_block! : relationshipsToOmit.has('BlockChangedFilter') ? {} as BlockChangedFilter : aBlockChangedFilter({}, relationshipsToOmit), + and: overrides && overrides.hasOwnProperty('and') ? overrides.and! : [relationshipsToOmit.has('ExAnte_Filter') ? {} as ExAnte_Filter : anExAnte_Filter({}, relationshipsToOmit)], + exPost: overrides && overrides.hasOwnProperty('exPost') ? overrides.exPost! : 'omnis', + exPost_: overrides && overrides.hasOwnProperty('exPost_') ? overrides.exPost_! : relationshipsToOmit.has('ExPost_Filter') ? {} as ExPost_Filter : anExPost_Filter({}, relationshipsToOmit), + exPost_contains: overrides && overrides.hasOwnProperty('exPost_contains') ? overrides.exPost_contains! : 'sunt', + exPost_contains_nocase: overrides && overrides.hasOwnProperty('exPost_contains_nocase') ? overrides.exPost_contains_nocase! : 'commodi', + exPost_ends_with: overrides && overrides.hasOwnProperty('exPost_ends_with') ? overrides.exPost_ends_with! : 'modi', + exPost_ends_with_nocase: overrides && overrides.hasOwnProperty('exPost_ends_with_nocase') ? overrides.exPost_ends_with_nocase! : 'aut', + exPost_gt: overrides && overrides.hasOwnProperty('exPost_gt') ? overrides.exPost_gt! : 'unde', + exPost_gte: overrides && overrides.hasOwnProperty('exPost_gte') ? overrides.exPost_gte! : 'omnis', + exPost_in: overrides && overrides.hasOwnProperty('exPost_in') ? overrides.exPost_in! : ['aut'], + exPost_lt: overrides && overrides.hasOwnProperty('exPost_lt') ? overrides.exPost_lt! : 'quisquam', + exPost_lte: overrides && overrides.hasOwnProperty('exPost_lte') ? overrides.exPost_lte! : 'vel', + exPost_not: overrides && overrides.hasOwnProperty('exPost_not') ? overrides.exPost_not! : 'porro', + exPost_not_contains: overrides && overrides.hasOwnProperty('exPost_not_contains') ? overrides.exPost_not_contains! : 'reiciendis', + exPost_not_contains_nocase: overrides && overrides.hasOwnProperty('exPost_not_contains_nocase') ? overrides.exPost_not_contains_nocase! : 'ratione', + exPost_not_ends_with: overrides && overrides.hasOwnProperty('exPost_not_ends_with') ? overrides.exPost_not_ends_with! : 'odio', + exPost_not_ends_with_nocase: overrides && overrides.hasOwnProperty('exPost_not_ends_with_nocase') ? overrides.exPost_not_ends_with_nocase! : 'enim', + exPost_not_in: overrides && overrides.hasOwnProperty('exPost_not_in') ? overrides.exPost_not_in! : ['cum'], + exPost_not_starts_with: overrides && overrides.hasOwnProperty('exPost_not_starts_with') ? overrides.exPost_not_starts_with! : 'ea', + exPost_not_starts_with_nocase: overrides && overrides.hasOwnProperty('exPost_not_starts_with_nocase') ? overrides.exPost_not_starts_with_nocase! : 'hic', + exPost_starts_with: overrides && overrides.hasOwnProperty('exPost_starts_with') ? overrides.exPost_starts_with! : 'corrupti', + exPost_starts_with_nocase: overrides && overrides.hasOwnProperty('exPost_starts_with_nocase') ? overrides.exPost_starts_with_nocase! : 'aut', + holders_: overrides && overrides.hasOwnProperty('holders_') ? overrides.holders_! : relationshipsToOmit.has('ExAnteHolder_Filter') ? {} as ExAnteHolder_Filter : anExAnteHolder_Filter({}, relationshipsToOmit), + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'molestiae', + id_contains: overrides && overrides.hasOwnProperty('id_contains') ? overrides.id_contains! : 'maiores', + id_gt: overrides && overrides.hasOwnProperty('id_gt') ? overrides.id_gt! : 'provident', + id_gte: overrides && overrides.hasOwnProperty('id_gte') ? overrides.id_gte! : 'voluptas', + id_in: overrides && overrides.hasOwnProperty('id_in') ? overrides.id_in! : ['ut'], + id_lt: overrides && overrides.hasOwnProperty('id_lt') ? overrides.id_lt! : 'voluptas', + id_lte: overrides && overrides.hasOwnProperty('id_lte') ? overrides.id_lte! : 'dolore', + id_not: overrides && overrides.hasOwnProperty('id_not') ? overrides.id_not! : 'dolores', + id_not_contains: overrides && overrides.hasOwnProperty('id_not_contains') ? overrides.id_not_contains! : 'molestiae', + id_not_in: overrides && overrides.hasOwnProperty('id_not_in') ? overrides.id_not_in! : ['molestiae'], + or: overrides && overrides.hasOwnProperty('or') ? overrides.or! : [relationshipsToOmit.has('ExAnte_Filter') ? {} as ExAnte_Filter : anExAnte_Filter({}, relationshipsToOmit)], + project: overrides && overrides.hasOwnProperty('project') ? overrides.project! : 'id', + project_: overrides && overrides.hasOwnProperty('project_') ? overrides.project_! : relationshipsToOmit.has('Project_Filter') ? {} as Project_Filter : aProject_Filter({}, relationshipsToOmit), + project_contains: overrides && overrides.hasOwnProperty('project_contains') ? overrides.project_contains! : 'nihil', + project_contains_nocase: overrides && overrides.hasOwnProperty('project_contains_nocase') ? overrides.project_contains_nocase! : 'dolores', + project_ends_with: overrides && overrides.hasOwnProperty('project_ends_with') ? overrides.project_ends_with! : 'tenetur', + project_ends_with_nocase: overrides && overrides.hasOwnProperty('project_ends_with_nocase') ? overrides.project_ends_with_nocase! : 'commodi', + project_gt: overrides && overrides.hasOwnProperty('project_gt') ? overrides.project_gt! : 'qui', + project_gte: overrides && overrides.hasOwnProperty('project_gte') ? overrides.project_gte! : 'distinctio', + project_in: overrides && overrides.hasOwnProperty('project_in') ? overrides.project_in! : ['omnis'], + project_lt: overrides && overrides.hasOwnProperty('project_lt') ? overrides.project_lt! : 'distinctio', + project_lte: overrides && overrides.hasOwnProperty('project_lte') ? overrides.project_lte! : 'voluptatem', + project_not: overrides && overrides.hasOwnProperty('project_not') ? overrides.project_not! : 'sed', + project_not_contains: overrides && overrides.hasOwnProperty('project_not_contains') ? overrides.project_not_contains! : 'esse', + project_not_contains_nocase: overrides && overrides.hasOwnProperty('project_not_contains_nocase') ? overrides.project_not_contains_nocase! : 'quos', + project_not_ends_with: overrides && overrides.hasOwnProperty('project_not_ends_with') ? overrides.project_not_ends_with! : 'maxime', + project_not_ends_with_nocase: overrides && overrides.hasOwnProperty('project_not_ends_with_nocase') ? overrides.project_not_ends_with_nocase! : 'corrupti', + project_not_in: overrides && overrides.hasOwnProperty('project_not_in') ? overrides.project_not_in! : ['minus'], + project_not_starts_with: overrides && overrides.hasOwnProperty('project_not_starts_with') ? overrides.project_not_starts_with! : 'consequatur', + project_not_starts_with_nocase: overrides && overrides.hasOwnProperty('project_not_starts_with_nocase') ? overrides.project_not_starts_with_nocase! : 'ut', + project_starts_with: overrides && overrides.hasOwnProperty('project_starts_with') ? overrides.project_starts_with! : 'exercitationem', + project_starts_with_nocase: overrides && overrides.hasOwnProperty('project_starts_with_nocase') ? overrides.project_starts_with_nocase! : 'corrupti', + serialization: overrides && overrides.hasOwnProperty('serialization') ? overrides.serialization! : 'temporibus', + serialization_contains: overrides && overrides.hasOwnProperty('serialization_contains') ? overrides.serialization_contains! : 'quos', + serialization_contains_nocase: overrides && overrides.hasOwnProperty('serialization_contains_nocase') ? overrides.serialization_contains_nocase! : 'dicta', + serialization_ends_with: overrides && overrides.hasOwnProperty('serialization_ends_with') ? overrides.serialization_ends_with! : 'sint', + serialization_ends_with_nocase: overrides && overrides.hasOwnProperty('serialization_ends_with_nocase') ? overrides.serialization_ends_with_nocase! : 'est', + serialization_gt: overrides && overrides.hasOwnProperty('serialization_gt') ? overrides.serialization_gt! : 'eos', + serialization_gte: overrides && overrides.hasOwnProperty('serialization_gte') ? overrides.serialization_gte! : 'qui', + serialization_in: overrides && overrides.hasOwnProperty('serialization_in') ? overrides.serialization_in! : ['illum'], + serialization_lt: overrides && overrides.hasOwnProperty('serialization_lt') ? overrides.serialization_lt! : 'commodi', + serialization_lte: overrides && overrides.hasOwnProperty('serialization_lte') ? overrides.serialization_lte! : 'et', + serialization_not: overrides && overrides.hasOwnProperty('serialization_not') ? overrides.serialization_not! : 'velit', + serialization_not_contains: overrides && overrides.hasOwnProperty('serialization_not_contains') ? overrides.serialization_not_contains! : 'tempore', + serialization_not_contains_nocase: overrides && overrides.hasOwnProperty('serialization_not_contains_nocase') ? overrides.serialization_not_contains_nocase! : 'voluptatum', + serialization_not_ends_with: overrides && overrides.hasOwnProperty('serialization_not_ends_with') ? overrides.serialization_not_ends_with! : 'aliquam', + serialization_not_ends_with_nocase: overrides && overrides.hasOwnProperty('serialization_not_ends_with_nocase') ? overrides.serialization_not_ends_with_nocase! : 'fuga', + serialization_not_in: overrides && overrides.hasOwnProperty('serialization_not_in') ? overrides.serialization_not_in! : ['tenetur'], + serialization_not_starts_with: overrides && overrides.hasOwnProperty('serialization_not_starts_with') ? overrides.serialization_not_starts_with! : 'dolores', + serialization_not_starts_with_nocase: overrides && overrides.hasOwnProperty('serialization_not_starts_with_nocase') ? overrides.serialization_not_starts_with_nocase! : 'blanditiis', + serialization_starts_with: overrides && overrides.hasOwnProperty('serialization_starts_with') ? overrides.serialization_starts_with! : 'quibusdam', + serialization_starts_with_nocase: overrides && overrides.hasOwnProperty('serialization_starts_with_nocase') ? overrides.serialization_starts_with_nocase! : 'dolor', + supply: overrides && overrides.hasOwnProperty('supply') ? overrides.supply! : '100000000000000000000', + supply_gt: overrides && overrides.hasOwnProperty('supply_gt') ? overrides.supply_gt! : '100000000000000000000', + supply_gte: overrides && overrides.hasOwnProperty('supply_gte') ? overrides.supply_gte! : '100000000000000000000', + supply_in: overrides && overrides.hasOwnProperty('supply_in') ? overrides.supply_in! : ['100000000000000000000'], + supply_lt: overrides && overrides.hasOwnProperty('supply_lt') ? overrides.supply_lt! : '100000000000000000000', + supply_lte: overrides && overrides.hasOwnProperty('supply_lte') ? overrides.supply_lte! : '100000000000000000000', + supply_not: overrides && overrides.hasOwnProperty('supply_not') ? overrides.supply_not! : '100000000000000000000', + supply_not_in: overrides && overrides.hasOwnProperty('supply_not_in') ? overrides.supply_not_in! : ['100000000000000000000'], + tokenId: overrides && overrides.hasOwnProperty('tokenId') ? overrides.tokenId! : '100000000000000000000', + tokenId_gt: overrides && overrides.hasOwnProperty('tokenId_gt') ? overrides.tokenId_gt! : '100000000000000000000', + tokenId_gte: overrides && overrides.hasOwnProperty('tokenId_gte') ? overrides.tokenId_gte! : '100000000000000000000', + tokenId_in: overrides && overrides.hasOwnProperty('tokenId_in') ? overrides.tokenId_in! : ['100000000000000000000'], + tokenId_lt: overrides && overrides.hasOwnProperty('tokenId_lt') ? overrides.tokenId_lt! : '100000000000000000000', + tokenId_lte: overrides && overrides.hasOwnProperty('tokenId_lte') ? overrides.tokenId_lte! : '100000000000000000000', + tokenId_not: overrides && overrides.hasOwnProperty('tokenId_not') ? overrides.tokenId_not! : '100000000000000000000', + tokenId_not_in: overrides && overrides.hasOwnProperty('tokenId_not_in') ? overrides.tokenId_not_in! : ['100000000000000000000'], + }; +}; + +export const anExPost = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): ExPost => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('ExPost'); + return { + cancellations: overrides && overrides.hasOwnProperty('cancellations') ? overrides.cancellations! : [relationshipsToOmit.has('Cancellation') ? {} as Cancellation : aCancellation({}, relationshipsToOmit)], + cancelledAmount: overrides && overrides.hasOwnProperty('cancelledAmount') ? overrides.cancelledAmount! : '100000000000000000000', + estimatedAmount: overrides && overrides.hasOwnProperty('estimatedAmount') ? overrides.estimatedAmount! : '100000000000000000000', + exAnte: overrides && overrides.hasOwnProperty('exAnte') ? overrides.exAnte! : relationshipsToOmit.has('ExAnte') ? {} as ExAnte : anExAnte({}, relationshipsToOmit), + holders: overrides && overrides.hasOwnProperty('holders') ? overrides.holders! : [relationshipsToOmit.has('ExPostHolder') ? {} as ExPostHolder : anExPostHolder({}, relationshipsToOmit)], + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'ab', + lastVerificationTimestamp: overrides && overrides.hasOwnProperty('lastVerificationTimestamp') ? overrides.lastVerificationTimestamp! : '100000000000000000000', + project: overrides && overrides.hasOwnProperty('project') ? overrides.project! : relationshipsToOmit.has('Project') ? {} as Project : aProject({}, relationshipsToOmit), + retiredAmount: overrides && overrides.hasOwnProperty('retiredAmount') ? overrides.retiredAmount! : '100000000000000000000', + retirementCertificates: overrides && overrides.hasOwnProperty('retirementCertificates') ? overrides.retirementCertificates! : [relationshipsToOmit.has('RetirementCertificate') ? {} as RetirementCertificate : aRetirementCertificate({}, relationshipsToOmit)], + serialization: overrides && overrides.hasOwnProperty('serialization') ? overrides.serialization! : 'in', + supply: overrides && overrides.hasOwnProperty('supply') ? overrides.supply! : '100000000000000000000', + tokenId: overrides && overrides.hasOwnProperty('tokenId') ? overrides.tokenId! : '100000000000000000000', + verificationPeriodEnd: overrides && overrides.hasOwnProperty('verificationPeriodEnd') ? overrides.verificationPeriodEnd! : '100000000000000000000', + verificationPeriodStart: overrides && overrides.hasOwnProperty('verificationPeriodStart') ? overrides.verificationPeriodStart! : '100000000000000000000', + vintage: overrides && overrides.hasOwnProperty('vintage') ? overrides.vintage! : 'at', + }; +}; + +export const anExPostHolder = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): ExPostHolder => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('ExPostHolder'); + return { + amount: overrides && overrides.hasOwnProperty('amount') ? overrides.amount! : '100000000000000000000', + createdAt: overrides && overrides.hasOwnProperty('createdAt') ? overrides.createdAt! : '100000000000000000000', + exPost: overrides && overrides.hasOwnProperty('exPost') ? overrides.exPost! : relationshipsToOmit.has('ExPost') ? {} as ExPost : anExPost({}, relationshipsToOmit), + holder: overrides && overrides.hasOwnProperty('holder') ? overrides.holder! : relationshipsToOmit.has('Holder') ? {} as Holder : aHolder({}, relationshipsToOmit), + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'doloribus', + retiredAmount: overrides && overrides.hasOwnProperty('retiredAmount') ? overrides.retiredAmount! : '100000000000000000000', + updatedAt: overrides && overrides.hasOwnProperty('updatedAt') ? overrides.updatedAt! : '100000000000000000000', + }; +}; + +export const anExPostHolder_Filter = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): ExPostHolder_Filter => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('ExPostHolder_Filter'); + return { + _change_block: overrides && overrides.hasOwnProperty('_change_block') ? overrides._change_block! : relationshipsToOmit.has('BlockChangedFilter') ? {} as BlockChangedFilter : aBlockChangedFilter({}, relationshipsToOmit), + amount: overrides && overrides.hasOwnProperty('amount') ? overrides.amount! : '100000000000000000000', + amount_gt: overrides && overrides.hasOwnProperty('amount_gt') ? overrides.amount_gt! : '100000000000000000000', + amount_gte: overrides && overrides.hasOwnProperty('amount_gte') ? overrides.amount_gte! : '100000000000000000000', + amount_in: overrides && overrides.hasOwnProperty('amount_in') ? overrides.amount_in! : ['100000000000000000000'], + amount_lt: overrides && overrides.hasOwnProperty('amount_lt') ? overrides.amount_lt! : '100000000000000000000', + amount_lte: overrides && overrides.hasOwnProperty('amount_lte') ? overrides.amount_lte! : '100000000000000000000', + amount_not: overrides && overrides.hasOwnProperty('amount_not') ? overrides.amount_not! : '100000000000000000000', + amount_not_in: overrides && overrides.hasOwnProperty('amount_not_in') ? overrides.amount_not_in! : ['100000000000000000000'], + and: overrides && overrides.hasOwnProperty('and') ? overrides.and! : [relationshipsToOmit.has('ExPostHolder_Filter') ? {} as ExPostHolder_Filter : anExPostHolder_Filter({}, relationshipsToOmit)], + createdAt: overrides && overrides.hasOwnProperty('createdAt') ? overrides.createdAt! : '100000000000000000000', + createdAt_gt: overrides && overrides.hasOwnProperty('createdAt_gt') ? overrides.createdAt_gt! : '100000000000000000000', + createdAt_gte: overrides && overrides.hasOwnProperty('createdAt_gte') ? overrides.createdAt_gte! : '100000000000000000000', + createdAt_in: overrides && overrides.hasOwnProperty('createdAt_in') ? overrides.createdAt_in! : ['100000000000000000000'], + createdAt_lt: overrides && overrides.hasOwnProperty('createdAt_lt') ? overrides.createdAt_lt! : '100000000000000000000', + createdAt_lte: overrides && overrides.hasOwnProperty('createdAt_lte') ? overrides.createdAt_lte! : '100000000000000000000', + createdAt_not: overrides && overrides.hasOwnProperty('createdAt_not') ? overrides.createdAt_not! : '100000000000000000000', + createdAt_not_in: overrides && overrides.hasOwnProperty('createdAt_not_in') ? overrides.createdAt_not_in! : ['100000000000000000000'], + exPost: overrides && overrides.hasOwnProperty('exPost') ? overrides.exPost! : 'dolor', + exPost_: overrides && overrides.hasOwnProperty('exPost_') ? overrides.exPost_! : relationshipsToOmit.has('ExPost_Filter') ? {} as ExPost_Filter : anExPost_Filter({}, relationshipsToOmit), + exPost_contains: overrides && overrides.hasOwnProperty('exPost_contains') ? overrides.exPost_contains! : 'expedita', + exPost_contains_nocase: overrides && overrides.hasOwnProperty('exPost_contains_nocase') ? overrides.exPost_contains_nocase! : 'ut', + exPost_ends_with: overrides && overrides.hasOwnProperty('exPost_ends_with') ? overrides.exPost_ends_with! : 'voluptate', + exPost_ends_with_nocase: overrides && overrides.hasOwnProperty('exPost_ends_with_nocase') ? overrides.exPost_ends_with_nocase! : 'fugit', + exPost_gt: overrides && overrides.hasOwnProperty('exPost_gt') ? overrides.exPost_gt! : 'occaecati', + exPost_gte: overrides && overrides.hasOwnProperty('exPost_gte') ? overrides.exPost_gte! : 'quas', + exPost_in: overrides && overrides.hasOwnProperty('exPost_in') ? overrides.exPost_in! : ['eaque'], + exPost_lt: overrides && overrides.hasOwnProperty('exPost_lt') ? overrides.exPost_lt! : 'incidunt', + exPost_lte: overrides && overrides.hasOwnProperty('exPost_lte') ? overrides.exPost_lte! : 'dolorem', + exPost_not: overrides && overrides.hasOwnProperty('exPost_not') ? overrides.exPost_not! : 'velit', + exPost_not_contains: overrides && overrides.hasOwnProperty('exPost_not_contains') ? overrides.exPost_not_contains! : 'numquam', + exPost_not_contains_nocase: overrides && overrides.hasOwnProperty('exPost_not_contains_nocase') ? overrides.exPost_not_contains_nocase! : 'eius', + exPost_not_ends_with: overrides && overrides.hasOwnProperty('exPost_not_ends_with') ? overrides.exPost_not_ends_with! : 'ut', + exPost_not_ends_with_nocase: overrides && overrides.hasOwnProperty('exPost_not_ends_with_nocase') ? overrides.exPost_not_ends_with_nocase! : 'mollitia', + exPost_not_in: overrides && overrides.hasOwnProperty('exPost_not_in') ? overrides.exPost_not_in! : ['voluptatibus'], + exPost_not_starts_with: overrides && overrides.hasOwnProperty('exPost_not_starts_with') ? overrides.exPost_not_starts_with! : 'qui', + exPost_not_starts_with_nocase: overrides && overrides.hasOwnProperty('exPost_not_starts_with_nocase') ? overrides.exPost_not_starts_with_nocase! : 'fugit', + exPost_starts_with: overrides && overrides.hasOwnProperty('exPost_starts_with') ? overrides.exPost_starts_with! : 'necessitatibus', + exPost_starts_with_nocase: overrides && overrides.hasOwnProperty('exPost_starts_with_nocase') ? overrides.exPost_starts_with_nocase! : 'possimus', + holder: overrides && overrides.hasOwnProperty('holder') ? overrides.holder! : 'sequi', + holder_: overrides && overrides.hasOwnProperty('holder_') ? overrides.holder_! : relationshipsToOmit.has('Holder_Filter') ? {} as Holder_Filter : aHolder_Filter({}, relationshipsToOmit), + holder_contains: overrides && overrides.hasOwnProperty('holder_contains') ? overrides.holder_contains! : 'in', + holder_contains_nocase: overrides && overrides.hasOwnProperty('holder_contains_nocase') ? overrides.holder_contains_nocase! : 'sit', + holder_ends_with: overrides && overrides.hasOwnProperty('holder_ends_with') ? overrides.holder_ends_with! : 'dolor', + holder_ends_with_nocase: overrides && overrides.hasOwnProperty('holder_ends_with_nocase') ? overrides.holder_ends_with_nocase! : 'architecto', + holder_gt: overrides && overrides.hasOwnProperty('holder_gt') ? overrides.holder_gt! : 'unde', + holder_gte: overrides && overrides.hasOwnProperty('holder_gte') ? overrides.holder_gte! : 'ipsa', + holder_in: overrides && overrides.hasOwnProperty('holder_in') ? overrides.holder_in! : ['iure'], + holder_lt: overrides && overrides.hasOwnProperty('holder_lt') ? overrides.holder_lt! : 'nisi', + holder_lte: overrides && overrides.hasOwnProperty('holder_lte') ? overrides.holder_lte! : 'necessitatibus', + holder_not: overrides && overrides.hasOwnProperty('holder_not') ? overrides.holder_not! : 'explicabo', + holder_not_contains: overrides && overrides.hasOwnProperty('holder_not_contains') ? overrides.holder_not_contains! : 'ab', + holder_not_contains_nocase: overrides && overrides.hasOwnProperty('holder_not_contains_nocase') ? overrides.holder_not_contains_nocase! : 'voluptatum', + holder_not_ends_with: overrides && overrides.hasOwnProperty('holder_not_ends_with') ? overrides.holder_not_ends_with! : 'et', + holder_not_ends_with_nocase: overrides && overrides.hasOwnProperty('holder_not_ends_with_nocase') ? overrides.holder_not_ends_with_nocase! : 'et', + holder_not_in: overrides && overrides.hasOwnProperty('holder_not_in') ? overrides.holder_not_in! : ['vitae'], + holder_not_starts_with: overrides && overrides.hasOwnProperty('holder_not_starts_with') ? overrides.holder_not_starts_with! : 'optio', + holder_not_starts_with_nocase: overrides && overrides.hasOwnProperty('holder_not_starts_with_nocase') ? overrides.holder_not_starts_with_nocase! : 'quaerat', + holder_starts_with: overrides && overrides.hasOwnProperty('holder_starts_with') ? overrides.holder_starts_with! : 'aut', + holder_starts_with_nocase: overrides && overrides.hasOwnProperty('holder_starts_with_nocase') ? overrides.holder_starts_with_nocase! : 'facilis', + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'rerum', + id_contains: overrides && overrides.hasOwnProperty('id_contains') ? overrides.id_contains! : 'quam', + id_gt: overrides && overrides.hasOwnProperty('id_gt') ? overrides.id_gt! : 'ipsa', + id_gte: overrides && overrides.hasOwnProperty('id_gte') ? overrides.id_gte! : 'ut', + id_in: overrides && overrides.hasOwnProperty('id_in') ? overrides.id_in! : ['aut'], + id_lt: overrides && overrides.hasOwnProperty('id_lt') ? overrides.id_lt! : 'et', + id_lte: overrides && overrides.hasOwnProperty('id_lte') ? overrides.id_lte! : 'qui', + id_not: overrides && overrides.hasOwnProperty('id_not') ? overrides.id_not! : 'similique', + id_not_contains: overrides && overrides.hasOwnProperty('id_not_contains') ? overrides.id_not_contains! : 'ut', + id_not_in: overrides && overrides.hasOwnProperty('id_not_in') ? overrides.id_not_in! : ['illum'], + or: overrides && overrides.hasOwnProperty('or') ? overrides.or! : [relationshipsToOmit.has('ExPostHolder_Filter') ? {} as ExPostHolder_Filter : anExPostHolder_Filter({}, relationshipsToOmit)], + retiredAmount: overrides && overrides.hasOwnProperty('retiredAmount') ? overrides.retiredAmount! : '100000000000000000000', + retiredAmount_gt: overrides && overrides.hasOwnProperty('retiredAmount_gt') ? overrides.retiredAmount_gt! : '100000000000000000000', + retiredAmount_gte: overrides && overrides.hasOwnProperty('retiredAmount_gte') ? overrides.retiredAmount_gte! : '100000000000000000000', + retiredAmount_in: overrides && overrides.hasOwnProperty('retiredAmount_in') ? overrides.retiredAmount_in! : ['100000000000000000000'], + retiredAmount_lt: overrides && overrides.hasOwnProperty('retiredAmount_lt') ? overrides.retiredAmount_lt! : '100000000000000000000', + retiredAmount_lte: overrides && overrides.hasOwnProperty('retiredAmount_lte') ? overrides.retiredAmount_lte! : '100000000000000000000', + retiredAmount_not: overrides && overrides.hasOwnProperty('retiredAmount_not') ? overrides.retiredAmount_not! : '100000000000000000000', + retiredAmount_not_in: overrides && overrides.hasOwnProperty('retiredAmount_not_in') ? overrides.retiredAmount_not_in! : ['100000000000000000000'], + updatedAt: overrides && overrides.hasOwnProperty('updatedAt') ? overrides.updatedAt! : '100000000000000000000', + updatedAt_gt: overrides && overrides.hasOwnProperty('updatedAt_gt') ? overrides.updatedAt_gt! : '100000000000000000000', + updatedAt_gte: overrides && overrides.hasOwnProperty('updatedAt_gte') ? overrides.updatedAt_gte! : '100000000000000000000', + updatedAt_in: overrides && overrides.hasOwnProperty('updatedAt_in') ? overrides.updatedAt_in! : ['100000000000000000000'], + updatedAt_lt: overrides && overrides.hasOwnProperty('updatedAt_lt') ? overrides.updatedAt_lt! : '100000000000000000000', + updatedAt_lte: overrides && overrides.hasOwnProperty('updatedAt_lte') ? overrides.updatedAt_lte! : '100000000000000000000', + updatedAt_not: overrides && overrides.hasOwnProperty('updatedAt_not') ? overrides.updatedAt_not! : '100000000000000000000', + updatedAt_not_in: overrides && overrides.hasOwnProperty('updatedAt_not_in') ? overrides.updatedAt_not_in! : ['100000000000000000000'], + }; +}; + +export const anExPost_Filter = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): ExPost_Filter => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('ExPost_Filter'); + return { + _change_block: overrides && overrides.hasOwnProperty('_change_block') ? overrides._change_block! : relationshipsToOmit.has('BlockChangedFilter') ? {} as BlockChangedFilter : aBlockChangedFilter({}, relationshipsToOmit), + and: overrides && overrides.hasOwnProperty('and') ? overrides.and! : [relationshipsToOmit.has('ExPost_Filter') ? {} as ExPost_Filter : anExPost_Filter({}, relationshipsToOmit)], + cancellations_: overrides && overrides.hasOwnProperty('cancellations_') ? overrides.cancellations_! : relationshipsToOmit.has('Cancellation_Filter') ? {} as Cancellation_Filter : aCancellation_Filter({}, relationshipsToOmit), + cancelledAmount: overrides && overrides.hasOwnProperty('cancelledAmount') ? overrides.cancelledAmount! : '100000000000000000000', + cancelledAmount_gt: overrides && overrides.hasOwnProperty('cancelledAmount_gt') ? overrides.cancelledAmount_gt! : '100000000000000000000', + cancelledAmount_gte: overrides && overrides.hasOwnProperty('cancelledAmount_gte') ? overrides.cancelledAmount_gte! : '100000000000000000000', + cancelledAmount_in: overrides && overrides.hasOwnProperty('cancelledAmount_in') ? overrides.cancelledAmount_in! : ['100000000000000000000'], + cancelledAmount_lt: overrides && overrides.hasOwnProperty('cancelledAmount_lt') ? overrides.cancelledAmount_lt! : '100000000000000000000', + cancelledAmount_lte: overrides && overrides.hasOwnProperty('cancelledAmount_lte') ? overrides.cancelledAmount_lte! : '100000000000000000000', + cancelledAmount_not: overrides && overrides.hasOwnProperty('cancelledAmount_not') ? overrides.cancelledAmount_not! : '100000000000000000000', + cancelledAmount_not_in: overrides && overrides.hasOwnProperty('cancelledAmount_not_in') ? overrides.cancelledAmount_not_in! : ['100000000000000000000'], + estimatedAmount: overrides && overrides.hasOwnProperty('estimatedAmount') ? overrides.estimatedAmount! : '100000000000000000000', + estimatedAmount_gt: overrides && overrides.hasOwnProperty('estimatedAmount_gt') ? overrides.estimatedAmount_gt! : '100000000000000000000', + estimatedAmount_gte: overrides && overrides.hasOwnProperty('estimatedAmount_gte') ? overrides.estimatedAmount_gte! : '100000000000000000000', + estimatedAmount_in: overrides && overrides.hasOwnProperty('estimatedAmount_in') ? overrides.estimatedAmount_in! : ['100000000000000000000'], + estimatedAmount_lt: overrides && overrides.hasOwnProperty('estimatedAmount_lt') ? overrides.estimatedAmount_lt! : '100000000000000000000', + estimatedAmount_lte: overrides && overrides.hasOwnProperty('estimatedAmount_lte') ? overrides.estimatedAmount_lte! : '100000000000000000000', + estimatedAmount_not: overrides && overrides.hasOwnProperty('estimatedAmount_not') ? overrides.estimatedAmount_not! : '100000000000000000000', + estimatedAmount_not_in: overrides && overrides.hasOwnProperty('estimatedAmount_not_in') ? overrides.estimatedAmount_not_in! : ['100000000000000000000'], + exAnte_: overrides && overrides.hasOwnProperty('exAnte_') ? overrides.exAnte_! : relationshipsToOmit.has('ExAnte_Filter') ? {} as ExAnte_Filter : anExAnte_Filter({}, relationshipsToOmit), + holders_: overrides && overrides.hasOwnProperty('holders_') ? overrides.holders_! : relationshipsToOmit.has('ExPostHolder_Filter') ? {} as ExPostHolder_Filter : anExPostHolder_Filter({}, relationshipsToOmit), + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'ab', + id_contains: overrides && overrides.hasOwnProperty('id_contains') ? overrides.id_contains! : 'repellat', + id_gt: overrides && overrides.hasOwnProperty('id_gt') ? overrides.id_gt! : 'commodi', + id_gte: overrides && overrides.hasOwnProperty('id_gte') ? overrides.id_gte! : 'natus', + id_in: overrides && overrides.hasOwnProperty('id_in') ? overrides.id_in! : ['occaecati'], + id_lt: overrides && overrides.hasOwnProperty('id_lt') ? overrides.id_lt! : 'iure', + id_lte: overrides && overrides.hasOwnProperty('id_lte') ? overrides.id_lte! : 'velit', + id_not: overrides && overrides.hasOwnProperty('id_not') ? overrides.id_not! : 'beatae', + id_not_contains: overrides && overrides.hasOwnProperty('id_not_contains') ? overrides.id_not_contains! : 'cum', + id_not_in: overrides && overrides.hasOwnProperty('id_not_in') ? overrides.id_not_in! : ['sint'], + lastVerificationTimestamp: overrides && overrides.hasOwnProperty('lastVerificationTimestamp') ? overrides.lastVerificationTimestamp! : '100000000000000000000', + lastVerificationTimestamp_gt: overrides && overrides.hasOwnProperty('lastVerificationTimestamp_gt') ? overrides.lastVerificationTimestamp_gt! : '100000000000000000000', + lastVerificationTimestamp_gte: overrides && overrides.hasOwnProperty('lastVerificationTimestamp_gte') ? overrides.lastVerificationTimestamp_gte! : '100000000000000000000', + lastVerificationTimestamp_in: overrides && overrides.hasOwnProperty('lastVerificationTimestamp_in') ? overrides.lastVerificationTimestamp_in! : ['100000000000000000000'], + lastVerificationTimestamp_lt: overrides && overrides.hasOwnProperty('lastVerificationTimestamp_lt') ? overrides.lastVerificationTimestamp_lt! : '100000000000000000000', + lastVerificationTimestamp_lte: overrides && overrides.hasOwnProperty('lastVerificationTimestamp_lte') ? overrides.lastVerificationTimestamp_lte! : '100000000000000000000', + lastVerificationTimestamp_not: overrides && overrides.hasOwnProperty('lastVerificationTimestamp_not') ? overrides.lastVerificationTimestamp_not! : '100000000000000000000', + lastVerificationTimestamp_not_in: overrides && overrides.hasOwnProperty('lastVerificationTimestamp_not_in') ? overrides.lastVerificationTimestamp_not_in! : ['100000000000000000000'], + or: overrides && overrides.hasOwnProperty('or') ? overrides.or! : [relationshipsToOmit.has('ExPost_Filter') ? {} as ExPost_Filter : anExPost_Filter({}, relationshipsToOmit)], + project: overrides && overrides.hasOwnProperty('project') ? overrides.project! : 'minus', + project_: overrides && overrides.hasOwnProperty('project_') ? overrides.project_! : relationshipsToOmit.has('Project_Filter') ? {} as Project_Filter : aProject_Filter({}, relationshipsToOmit), + project_contains: overrides && overrides.hasOwnProperty('project_contains') ? overrides.project_contains! : 'temporibus', + project_contains_nocase: overrides && overrides.hasOwnProperty('project_contains_nocase') ? overrides.project_contains_nocase! : 'illum', + project_ends_with: overrides && overrides.hasOwnProperty('project_ends_with') ? overrides.project_ends_with! : 'tempora', + project_ends_with_nocase: overrides && overrides.hasOwnProperty('project_ends_with_nocase') ? overrides.project_ends_with_nocase! : 'enim', + project_gt: overrides && overrides.hasOwnProperty('project_gt') ? overrides.project_gt! : 'et', + project_gte: overrides && overrides.hasOwnProperty('project_gte') ? overrides.project_gte! : 'suscipit', + project_in: overrides && overrides.hasOwnProperty('project_in') ? overrides.project_in! : ['unde'], + project_lt: overrides && overrides.hasOwnProperty('project_lt') ? overrides.project_lt! : 'sunt', + project_lte: overrides && overrides.hasOwnProperty('project_lte') ? overrides.project_lte! : 'quae', + project_not: overrides && overrides.hasOwnProperty('project_not') ? overrides.project_not! : 'molestiae', + project_not_contains: overrides && overrides.hasOwnProperty('project_not_contains') ? overrides.project_not_contains! : 'et', + project_not_contains_nocase: overrides && overrides.hasOwnProperty('project_not_contains_nocase') ? overrides.project_not_contains_nocase! : 'quidem', + project_not_ends_with: overrides && overrides.hasOwnProperty('project_not_ends_with') ? overrides.project_not_ends_with! : 'consequatur', + project_not_ends_with_nocase: overrides && overrides.hasOwnProperty('project_not_ends_with_nocase') ? overrides.project_not_ends_with_nocase! : 'eius', + project_not_in: overrides && overrides.hasOwnProperty('project_not_in') ? overrides.project_not_in! : ['quis'], + project_not_starts_with: overrides && overrides.hasOwnProperty('project_not_starts_with') ? overrides.project_not_starts_with! : 'velit', + project_not_starts_with_nocase: overrides && overrides.hasOwnProperty('project_not_starts_with_nocase') ? overrides.project_not_starts_with_nocase! : 'qui', + project_starts_with: overrides && overrides.hasOwnProperty('project_starts_with') ? overrides.project_starts_with! : 'iure', + project_starts_with_nocase: overrides && overrides.hasOwnProperty('project_starts_with_nocase') ? overrides.project_starts_with_nocase! : 'reprehenderit', + retiredAmount: overrides && overrides.hasOwnProperty('retiredAmount') ? overrides.retiredAmount! : '100000000000000000000', + retiredAmount_gt: overrides && overrides.hasOwnProperty('retiredAmount_gt') ? overrides.retiredAmount_gt! : '100000000000000000000', + retiredAmount_gte: overrides && overrides.hasOwnProperty('retiredAmount_gte') ? overrides.retiredAmount_gte! : '100000000000000000000', + retiredAmount_in: overrides && overrides.hasOwnProperty('retiredAmount_in') ? overrides.retiredAmount_in! : ['100000000000000000000'], + retiredAmount_lt: overrides && overrides.hasOwnProperty('retiredAmount_lt') ? overrides.retiredAmount_lt! : '100000000000000000000', + retiredAmount_lte: overrides && overrides.hasOwnProperty('retiredAmount_lte') ? overrides.retiredAmount_lte! : '100000000000000000000', + retiredAmount_not: overrides && overrides.hasOwnProperty('retiredAmount_not') ? overrides.retiredAmount_not! : '100000000000000000000', + retiredAmount_not_in: overrides && overrides.hasOwnProperty('retiredAmount_not_in') ? overrides.retiredAmount_not_in! : ['100000000000000000000'], + retirementCertificates_: overrides && overrides.hasOwnProperty('retirementCertificates_') ? overrides.retirementCertificates_! : relationshipsToOmit.has('RetirementCertificate_Filter') ? {} as RetirementCertificate_Filter : aRetirementCertificate_Filter({}, relationshipsToOmit), + serialization: overrides && overrides.hasOwnProperty('serialization') ? overrides.serialization! : 'optio', + serialization_contains: overrides && overrides.hasOwnProperty('serialization_contains') ? overrides.serialization_contains! : 'et', + serialization_contains_nocase: overrides && overrides.hasOwnProperty('serialization_contains_nocase') ? overrides.serialization_contains_nocase! : 'suscipit', + serialization_ends_with: overrides && overrides.hasOwnProperty('serialization_ends_with') ? overrides.serialization_ends_with! : 'autem', + serialization_ends_with_nocase: overrides && overrides.hasOwnProperty('serialization_ends_with_nocase') ? overrides.serialization_ends_with_nocase! : 'iste', + serialization_gt: overrides && overrides.hasOwnProperty('serialization_gt') ? overrides.serialization_gt! : 'soluta', + serialization_gte: overrides && overrides.hasOwnProperty('serialization_gte') ? overrides.serialization_gte! : 'quisquam', + serialization_in: overrides && overrides.hasOwnProperty('serialization_in') ? overrides.serialization_in! : ['deserunt'], + serialization_lt: overrides && overrides.hasOwnProperty('serialization_lt') ? overrides.serialization_lt! : 'vero', + serialization_lte: overrides && overrides.hasOwnProperty('serialization_lte') ? overrides.serialization_lte! : 'fuga', + serialization_not: overrides && overrides.hasOwnProperty('serialization_not') ? overrides.serialization_not! : 'voluptas', + serialization_not_contains: overrides && overrides.hasOwnProperty('serialization_not_contains') ? overrides.serialization_not_contains! : 'ipsa', + serialization_not_contains_nocase: overrides && overrides.hasOwnProperty('serialization_not_contains_nocase') ? overrides.serialization_not_contains_nocase! : 'tempore', + serialization_not_ends_with: overrides && overrides.hasOwnProperty('serialization_not_ends_with') ? overrides.serialization_not_ends_with! : 'et', + serialization_not_ends_with_nocase: overrides && overrides.hasOwnProperty('serialization_not_ends_with_nocase') ? overrides.serialization_not_ends_with_nocase! : 'aut', + serialization_not_in: overrides && overrides.hasOwnProperty('serialization_not_in') ? overrides.serialization_not_in! : ['eveniet'], + serialization_not_starts_with: overrides && overrides.hasOwnProperty('serialization_not_starts_with') ? overrides.serialization_not_starts_with! : 'perspiciatis', + serialization_not_starts_with_nocase: overrides && overrides.hasOwnProperty('serialization_not_starts_with_nocase') ? overrides.serialization_not_starts_with_nocase! : 'voluptatum', + serialization_starts_with: overrides && overrides.hasOwnProperty('serialization_starts_with') ? overrides.serialization_starts_with! : 'quia', + serialization_starts_with_nocase: overrides && overrides.hasOwnProperty('serialization_starts_with_nocase') ? overrides.serialization_starts_with_nocase! : 'repudiandae', + supply: overrides && overrides.hasOwnProperty('supply') ? overrides.supply! : '100000000000000000000', + supply_gt: overrides && overrides.hasOwnProperty('supply_gt') ? overrides.supply_gt! : '100000000000000000000', + supply_gte: overrides && overrides.hasOwnProperty('supply_gte') ? overrides.supply_gte! : '100000000000000000000', + supply_in: overrides && overrides.hasOwnProperty('supply_in') ? overrides.supply_in! : ['100000000000000000000'], + supply_lt: overrides && overrides.hasOwnProperty('supply_lt') ? overrides.supply_lt! : '100000000000000000000', + supply_lte: overrides && overrides.hasOwnProperty('supply_lte') ? overrides.supply_lte! : '100000000000000000000', + supply_not: overrides && overrides.hasOwnProperty('supply_not') ? overrides.supply_not! : '100000000000000000000', + supply_not_in: overrides && overrides.hasOwnProperty('supply_not_in') ? overrides.supply_not_in! : ['100000000000000000000'], + tokenId: overrides && overrides.hasOwnProperty('tokenId') ? overrides.tokenId! : '100000000000000000000', + tokenId_gt: overrides && overrides.hasOwnProperty('tokenId_gt') ? overrides.tokenId_gt! : '100000000000000000000', + tokenId_gte: overrides && overrides.hasOwnProperty('tokenId_gte') ? overrides.tokenId_gte! : '100000000000000000000', + tokenId_in: overrides && overrides.hasOwnProperty('tokenId_in') ? overrides.tokenId_in! : ['100000000000000000000'], + tokenId_lt: overrides && overrides.hasOwnProperty('tokenId_lt') ? overrides.tokenId_lt! : '100000000000000000000', + tokenId_lte: overrides && overrides.hasOwnProperty('tokenId_lte') ? overrides.tokenId_lte! : '100000000000000000000', + tokenId_not: overrides && overrides.hasOwnProperty('tokenId_not') ? overrides.tokenId_not! : '100000000000000000000', + tokenId_not_in: overrides && overrides.hasOwnProperty('tokenId_not_in') ? overrides.tokenId_not_in! : ['100000000000000000000'], + verificationPeriodEnd: overrides && overrides.hasOwnProperty('verificationPeriodEnd') ? overrides.verificationPeriodEnd! : '100000000000000000000', + verificationPeriodEnd_gt: overrides && overrides.hasOwnProperty('verificationPeriodEnd_gt') ? overrides.verificationPeriodEnd_gt! : '100000000000000000000', + verificationPeriodEnd_gte: overrides && overrides.hasOwnProperty('verificationPeriodEnd_gte') ? overrides.verificationPeriodEnd_gte! : '100000000000000000000', + verificationPeriodEnd_in: overrides && overrides.hasOwnProperty('verificationPeriodEnd_in') ? overrides.verificationPeriodEnd_in! : ['100000000000000000000'], + verificationPeriodEnd_lt: overrides && overrides.hasOwnProperty('verificationPeriodEnd_lt') ? overrides.verificationPeriodEnd_lt! : '100000000000000000000', + verificationPeriodEnd_lte: overrides && overrides.hasOwnProperty('verificationPeriodEnd_lte') ? overrides.verificationPeriodEnd_lte! : '100000000000000000000', + verificationPeriodEnd_not: overrides && overrides.hasOwnProperty('verificationPeriodEnd_not') ? overrides.verificationPeriodEnd_not! : '100000000000000000000', + verificationPeriodEnd_not_in: overrides && overrides.hasOwnProperty('verificationPeriodEnd_not_in') ? overrides.verificationPeriodEnd_not_in! : ['100000000000000000000'], + verificationPeriodStart: overrides && overrides.hasOwnProperty('verificationPeriodStart') ? overrides.verificationPeriodStart! : '100000000000000000000', + verificationPeriodStart_gt: overrides && overrides.hasOwnProperty('verificationPeriodStart_gt') ? overrides.verificationPeriodStart_gt! : '100000000000000000000', + verificationPeriodStart_gte: overrides && overrides.hasOwnProperty('verificationPeriodStart_gte') ? overrides.verificationPeriodStart_gte! : '100000000000000000000', + verificationPeriodStart_in: overrides && overrides.hasOwnProperty('verificationPeriodStart_in') ? overrides.verificationPeriodStart_in! : ['100000000000000000000'], + verificationPeriodStart_lt: overrides && overrides.hasOwnProperty('verificationPeriodStart_lt') ? overrides.verificationPeriodStart_lt! : '100000000000000000000', + verificationPeriodStart_lte: overrides && overrides.hasOwnProperty('verificationPeriodStart_lte') ? overrides.verificationPeriodStart_lte! : '100000000000000000000', + verificationPeriodStart_not: overrides && overrides.hasOwnProperty('verificationPeriodStart_not') ? overrides.verificationPeriodStart_not! : '100000000000000000000', + verificationPeriodStart_not_in: overrides && overrides.hasOwnProperty('verificationPeriodStart_not_in') ? overrides.verificationPeriodStart_not_in! : ['100000000000000000000'], + vintage: overrides && overrides.hasOwnProperty('vintage') ? overrides.vintage! : 'debitis', + vintage_contains: overrides && overrides.hasOwnProperty('vintage_contains') ? overrides.vintage_contains! : 'ut', + vintage_contains_nocase: overrides && overrides.hasOwnProperty('vintage_contains_nocase') ? overrides.vintage_contains_nocase! : 'dignissimos', + vintage_ends_with: overrides && overrides.hasOwnProperty('vintage_ends_with') ? overrides.vintage_ends_with! : 'et', + vintage_ends_with_nocase: overrides && overrides.hasOwnProperty('vintage_ends_with_nocase') ? overrides.vintage_ends_with_nocase! : 'voluptatem', + vintage_gt: overrides && overrides.hasOwnProperty('vintage_gt') ? overrides.vintage_gt! : 'quod', + vintage_gte: overrides && overrides.hasOwnProperty('vintage_gte') ? overrides.vintage_gte! : 'est', + vintage_in: overrides && overrides.hasOwnProperty('vintage_in') ? overrides.vintage_in! : ['dolorem'], + vintage_lt: overrides && overrides.hasOwnProperty('vintage_lt') ? overrides.vintage_lt! : 'reprehenderit', + vintage_lte: overrides && overrides.hasOwnProperty('vintage_lte') ? overrides.vintage_lte! : 'occaecati', + vintage_not: overrides && overrides.hasOwnProperty('vintage_not') ? overrides.vintage_not! : 'quos', + vintage_not_contains: overrides && overrides.hasOwnProperty('vintage_not_contains') ? overrides.vintage_not_contains! : 'voluptatibus', + vintage_not_contains_nocase: overrides && overrides.hasOwnProperty('vintage_not_contains_nocase') ? overrides.vintage_not_contains_nocase! : 'animi', + vintage_not_ends_with: overrides && overrides.hasOwnProperty('vintage_not_ends_with') ? overrides.vintage_not_ends_with! : 'porro', + vintage_not_ends_with_nocase: overrides && overrides.hasOwnProperty('vintage_not_ends_with_nocase') ? overrides.vintage_not_ends_with_nocase! : 'error', + vintage_not_in: overrides && overrides.hasOwnProperty('vintage_not_in') ? overrides.vintage_not_in! : ['nisi'], + vintage_not_starts_with: overrides && overrides.hasOwnProperty('vintage_not_starts_with') ? overrides.vintage_not_starts_with! : 'sapiente', + vintage_not_starts_with_nocase: overrides && overrides.hasOwnProperty('vintage_not_starts_with_nocase') ? overrides.vintage_not_starts_with_nocase! : 'reprehenderit', + vintage_starts_with: overrides && overrides.hasOwnProperty('vintage_starts_with') ? overrides.vintage_starts_with! : 'eaque', + vintage_starts_with_nocase: overrides && overrides.hasOwnProperty('vintage_starts_with_nocase') ? overrides.vintage_starts_with_nocase! : 'perferendis', + }; +}; + +export const aHolder = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): Holder => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('Holder'); + return { + address: overrides && overrides.hasOwnProperty('address') ? overrides.address! : 'provident', + cancellations: overrides && overrides.hasOwnProperty('cancellations') ? overrides.cancellations! : [relationshipsToOmit.has('Cancellation') ? {} as Cancellation : aCancellation({}, relationshipsToOmit)], + cancelledAmount: overrides && overrides.hasOwnProperty('cancelledAmount') ? overrides.cancelledAmount! : '100000000000000000000', + exAnteAmounts: overrides && overrides.hasOwnProperty('exAnteAmounts') ? overrides.exAnteAmounts! : [relationshipsToOmit.has('ExAnteHolder') ? {} as ExAnteHolder : anExAnteHolder({}, relationshipsToOmit)], + exPostAmounts: overrides && overrides.hasOwnProperty('exPostAmounts') ? overrides.exPostAmounts! : [relationshipsToOmit.has('ExPostHolder') ? {} as ExPostHolder : anExPostHolder({}, relationshipsToOmit)], + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'natus', + retiredAmount: overrides && overrides.hasOwnProperty('retiredAmount') ? overrides.retiredAmount! : '100000000000000000000', + retirementCertificates: overrides && overrides.hasOwnProperty('retirementCertificates') ? overrides.retirementCertificates! : [relationshipsToOmit.has('RetirementCertificate') ? {} as RetirementCertificate : aRetirementCertificate({}, relationshipsToOmit)], + }; +}; + +export const aHolder_Filter = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): Holder_Filter => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('Holder_Filter'); + return { + _change_block: overrides && overrides.hasOwnProperty('_change_block') ? overrides._change_block! : relationshipsToOmit.has('BlockChangedFilter') ? {} as BlockChangedFilter : aBlockChangedFilter({}, relationshipsToOmit), + address: overrides && overrides.hasOwnProperty('address') ? overrides.address! : 'qui', + address_contains: overrides && overrides.hasOwnProperty('address_contains') ? overrides.address_contains! : 'ea', + address_gt: overrides && overrides.hasOwnProperty('address_gt') ? overrides.address_gt! : 'labore', + address_gte: overrides && overrides.hasOwnProperty('address_gte') ? overrides.address_gte! : 'voluptatem', + address_in: overrides && overrides.hasOwnProperty('address_in') ? overrides.address_in! : ['dolores'], + address_lt: overrides && overrides.hasOwnProperty('address_lt') ? overrides.address_lt! : 'facere', + address_lte: overrides && overrides.hasOwnProperty('address_lte') ? overrides.address_lte! : 'quo', + address_not: overrides && overrides.hasOwnProperty('address_not') ? overrides.address_not! : 'et', + address_not_contains: overrides && overrides.hasOwnProperty('address_not_contains') ? overrides.address_not_contains! : 'voluptates', + address_not_in: overrides && overrides.hasOwnProperty('address_not_in') ? overrides.address_not_in! : ['voluptatum'], + and: overrides && overrides.hasOwnProperty('and') ? overrides.and! : [relationshipsToOmit.has('Holder_Filter') ? {} as Holder_Filter : aHolder_Filter({}, relationshipsToOmit)], + cancellations_: overrides && overrides.hasOwnProperty('cancellations_') ? overrides.cancellations_! : relationshipsToOmit.has('Cancellation_Filter') ? {} as Cancellation_Filter : aCancellation_Filter({}, relationshipsToOmit), + cancelledAmount: overrides && overrides.hasOwnProperty('cancelledAmount') ? overrides.cancelledAmount! : '100000000000000000000', + cancelledAmount_gt: overrides && overrides.hasOwnProperty('cancelledAmount_gt') ? overrides.cancelledAmount_gt! : '100000000000000000000', + cancelledAmount_gte: overrides && overrides.hasOwnProperty('cancelledAmount_gte') ? overrides.cancelledAmount_gte! : '100000000000000000000', + cancelledAmount_in: overrides && overrides.hasOwnProperty('cancelledAmount_in') ? overrides.cancelledAmount_in! : ['100000000000000000000'], + cancelledAmount_lt: overrides && overrides.hasOwnProperty('cancelledAmount_lt') ? overrides.cancelledAmount_lt! : '100000000000000000000', + cancelledAmount_lte: overrides && overrides.hasOwnProperty('cancelledAmount_lte') ? overrides.cancelledAmount_lte! : '100000000000000000000', + cancelledAmount_not: overrides && overrides.hasOwnProperty('cancelledAmount_not') ? overrides.cancelledAmount_not! : '100000000000000000000', + cancelledAmount_not_in: overrides && overrides.hasOwnProperty('cancelledAmount_not_in') ? overrides.cancelledAmount_not_in! : ['100000000000000000000'], + exAnteAmounts_: overrides && overrides.hasOwnProperty('exAnteAmounts_') ? overrides.exAnteAmounts_! : relationshipsToOmit.has('ExAnteHolder_Filter') ? {} as ExAnteHolder_Filter : anExAnteHolder_Filter({}, relationshipsToOmit), + exPostAmounts_: overrides && overrides.hasOwnProperty('exPostAmounts_') ? overrides.exPostAmounts_! : relationshipsToOmit.has('ExPostHolder_Filter') ? {} as ExPostHolder_Filter : anExPostHolder_Filter({}, relationshipsToOmit), + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'sapiente', + id_contains: overrides && overrides.hasOwnProperty('id_contains') ? overrides.id_contains! : 'atque', + id_gt: overrides && overrides.hasOwnProperty('id_gt') ? overrides.id_gt! : 'excepturi', + id_gte: overrides && overrides.hasOwnProperty('id_gte') ? overrides.id_gte! : 'reiciendis', + id_in: overrides && overrides.hasOwnProperty('id_in') ? overrides.id_in! : ['tempora'], + id_lt: overrides && overrides.hasOwnProperty('id_lt') ? overrides.id_lt! : 'aut', + id_lte: overrides && overrides.hasOwnProperty('id_lte') ? overrides.id_lte! : 'minus', + id_not: overrides && overrides.hasOwnProperty('id_not') ? overrides.id_not! : 'dolor', + id_not_contains: overrides && overrides.hasOwnProperty('id_not_contains') ? overrides.id_not_contains! : 'doloribus', + id_not_in: overrides && overrides.hasOwnProperty('id_not_in') ? overrides.id_not_in! : ['veritatis'], + or: overrides && overrides.hasOwnProperty('or') ? overrides.or! : [relationshipsToOmit.has('Holder_Filter') ? {} as Holder_Filter : aHolder_Filter({}, relationshipsToOmit)], + retiredAmount: overrides && overrides.hasOwnProperty('retiredAmount') ? overrides.retiredAmount! : '100000000000000000000', + retiredAmount_gt: overrides && overrides.hasOwnProperty('retiredAmount_gt') ? overrides.retiredAmount_gt! : '100000000000000000000', + retiredAmount_gte: overrides && overrides.hasOwnProperty('retiredAmount_gte') ? overrides.retiredAmount_gte! : '100000000000000000000', + retiredAmount_in: overrides && overrides.hasOwnProperty('retiredAmount_in') ? overrides.retiredAmount_in! : ['100000000000000000000'], + retiredAmount_lt: overrides && overrides.hasOwnProperty('retiredAmount_lt') ? overrides.retiredAmount_lt! : '100000000000000000000', + retiredAmount_lte: overrides && overrides.hasOwnProperty('retiredAmount_lte') ? overrides.retiredAmount_lte! : '100000000000000000000', + retiredAmount_not: overrides && overrides.hasOwnProperty('retiredAmount_not') ? overrides.retiredAmount_not! : '100000000000000000000', + retiredAmount_not_in: overrides && overrides.hasOwnProperty('retiredAmount_not_in') ? overrides.retiredAmount_not_in! : ['100000000000000000000'], + retirementCertificates_: overrides && overrides.hasOwnProperty('retirementCertificates_') ? overrides.retirementCertificates_! : relationshipsToOmit.has('RetirementCertificate_Filter') ? {} as RetirementCertificate_Filter : aRetirementCertificate_Filter({}, relationshipsToOmit), + }; +}; + +export const aProject = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): Project => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('Project'); + return { + blockNumber: overrides && overrides.hasOwnProperty('blockNumber') ? overrides.blockNumber! : '100000000000000000000', + blockTimestamp: overrides && overrides.hasOwnProperty('blockTimestamp') ? overrides.blockTimestamp! : '100000000000000000000', + cancellations: overrides && overrides.hasOwnProperty('cancellations') ? overrides.cancellations! : [relationshipsToOmit.has('Cancellation') ? {} as Cancellation : aCancellation({}, relationshipsToOmit)], + exAntes: overrides && overrides.hasOwnProperty('exAntes') ? overrides.exAntes! : [relationshipsToOmit.has('ExAnte') ? {} as ExAnte : anExAnte({}, relationshipsToOmit)], + exPosts: overrides && overrides.hasOwnProperty('exPosts') ? overrides.exPosts! : [relationshipsToOmit.has('ExPost') ? {} as ExPost : anExPost({}, relationshipsToOmit)], + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'dolor', + projectAddress: overrides && overrides.hasOwnProperty('projectAddress') ? overrides.projectAddress! : 'consequatur', + projectId: overrides && overrides.hasOwnProperty('projectId') ? overrides.projectId! : '100000000000000000000', + projectName: overrides && overrides.hasOwnProperty('projectName') ? overrides.projectName! : 'tenetur', + retirementCertificates: overrides && overrides.hasOwnProperty('retirementCertificates') ? overrides.retirementCertificates! : [relationshipsToOmit.has('RetirementCertificate') ? {} as RetirementCertificate : aRetirementCertificate({}, relationshipsToOmit)], + transactionHash: overrides && overrides.hasOwnProperty('transactionHash') ? overrides.transactionHash! : 'illo', + }; +}; + +export const aProject_Filter = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): Project_Filter => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('Project_Filter'); + return { + _change_block: overrides && overrides.hasOwnProperty('_change_block') ? overrides._change_block! : relationshipsToOmit.has('BlockChangedFilter') ? {} as BlockChangedFilter : aBlockChangedFilter({}, relationshipsToOmit), + and: overrides && overrides.hasOwnProperty('and') ? overrides.and! : [relationshipsToOmit.has('Project_Filter') ? {} as Project_Filter : aProject_Filter({}, relationshipsToOmit)], + blockNumber: overrides && overrides.hasOwnProperty('blockNumber') ? overrides.blockNumber! : '100000000000000000000', + blockNumber_gt: overrides && overrides.hasOwnProperty('blockNumber_gt') ? overrides.blockNumber_gt! : '100000000000000000000', + blockNumber_gte: overrides && overrides.hasOwnProperty('blockNumber_gte') ? overrides.blockNumber_gte! : '100000000000000000000', + blockNumber_in: overrides && overrides.hasOwnProperty('blockNumber_in') ? overrides.blockNumber_in! : ['100000000000000000000'], + blockNumber_lt: overrides && overrides.hasOwnProperty('blockNumber_lt') ? overrides.blockNumber_lt! : '100000000000000000000', + blockNumber_lte: overrides && overrides.hasOwnProperty('blockNumber_lte') ? overrides.blockNumber_lte! : '100000000000000000000', + blockNumber_not: overrides && overrides.hasOwnProperty('blockNumber_not') ? overrides.blockNumber_not! : '100000000000000000000', + blockNumber_not_in: overrides && overrides.hasOwnProperty('blockNumber_not_in') ? overrides.blockNumber_not_in! : ['100000000000000000000'], + blockTimestamp: overrides && overrides.hasOwnProperty('blockTimestamp') ? overrides.blockTimestamp! : '100000000000000000000', + blockTimestamp_gt: overrides && overrides.hasOwnProperty('blockTimestamp_gt') ? overrides.blockTimestamp_gt! : '100000000000000000000', + blockTimestamp_gte: overrides && overrides.hasOwnProperty('blockTimestamp_gte') ? overrides.blockTimestamp_gte! : '100000000000000000000', + blockTimestamp_in: overrides && overrides.hasOwnProperty('blockTimestamp_in') ? overrides.blockTimestamp_in! : ['100000000000000000000'], + blockTimestamp_lt: overrides && overrides.hasOwnProperty('blockTimestamp_lt') ? overrides.blockTimestamp_lt! : '100000000000000000000', + blockTimestamp_lte: overrides && overrides.hasOwnProperty('blockTimestamp_lte') ? overrides.blockTimestamp_lte! : '100000000000000000000', + blockTimestamp_not: overrides && overrides.hasOwnProperty('blockTimestamp_not') ? overrides.blockTimestamp_not! : '100000000000000000000', + blockTimestamp_not_in: overrides && overrides.hasOwnProperty('blockTimestamp_not_in') ? overrides.blockTimestamp_not_in! : ['100000000000000000000'], + cancellations_: overrides && overrides.hasOwnProperty('cancellations_') ? overrides.cancellations_! : relationshipsToOmit.has('Cancellation_Filter') ? {} as Cancellation_Filter : aCancellation_Filter({}, relationshipsToOmit), + exAntes_: overrides && overrides.hasOwnProperty('exAntes_') ? overrides.exAntes_! : relationshipsToOmit.has('ExAnte_Filter') ? {} as ExAnte_Filter : anExAnte_Filter({}, relationshipsToOmit), + exPosts_: overrides && overrides.hasOwnProperty('exPosts_') ? overrides.exPosts_! : relationshipsToOmit.has('ExPost_Filter') ? {} as ExPost_Filter : anExPost_Filter({}, relationshipsToOmit), + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'molestiae', + id_contains: overrides && overrides.hasOwnProperty('id_contains') ? overrides.id_contains! : 'accusamus', + id_gt: overrides && overrides.hasOwnProperty('id_gt') ? overrides.id_gt! : 'id', + id_gte: overrides && overrides.hasOwnProperty('id_gte') ? overrides.id_gte! : 'perspiciatis', + id_in: overrides && overrides.hasOwnProperty('id_in') ? overrides.id_in! : ['qui'], + id_lt: overrides && overrides.hasOwnProperty('id_lt') ? overrides.id_lt! : 'sapiente', + id_lte: overrides && overrides.hasOwnProperty('id_lte') ? overrides.id_lte! : 'soluta', + id_not: overrides && overrides.hasOwnProperty('id_not') ? overrides.id_not! : 'occaecati', + id_not_contains: overrides && overrides.hasOwnProperty('id_not_contains') ? overrides.id_not_contains! : 'et', + id_not_in: overrides && overrides.hasOwnProperty('id_not_in') ? overrides.id_not_in! : ['ab'], + or: overrides && overrides.hasOwnProperty('or') ? overrides.or! : [relationshipsToOmit.has('Project_Filter') ? {} as Project_Filter : aProject_Filter({}, relationshipsToOmit)], + projectAddress: overrides && overrides.hasOwnProperty('projectAddress') ? overrides.projectAddress! : 'nam', + projectAddress_contains: overrides && overrides.hasOwnProperty('projectAddress_contains') ? overrides.projectAddress_contains! : 'a', + projectAddress_gt: overrides && overrides.hasOwnProperty('projectAddress_gt') ? overrides.projectAddress_gt! : 'nam', + projectAddress_gte: overrides && overrides.hasOwnProperty('projectAddress_gte') ? overrides.projectAddress_gte! : 'ut', + projectAddress_in: overrides && overrides.hasOwnProperty('projectAddress_in') ? overrides.projectAddress_in! : ['at'], + projectAddress_lt: overrides && overrides.hasOwnProperty('projectAddress_lt') ? overrides.projectAddress_lt! : 'ut', + projectAddress_lte: overrides && overrides.hasOwnProperty('projectAddress_lte') ? overrides.projectAddress_lte! : 'aut', + projectAddress_not: overrides && overrides.hasOwnProperty('projectAddress_not') ? overrides.projectAddress_not! : 'perspiciatis', + projectAddress_not_contains: overrides && overrides.hasOwnProperty('projectAddress_not_contains') ? overrides.projectAddress_not_contains! : 'autem', + projectAddress_not_in: overrides && overrides.hasOwnProperty('projectAddress_not_in') ? overrides.projectAddress_not_in! : ['sed'], + projectId: overrides && overrides.hasOwnProperty('projectId') ? overrides.projectId! : '100000000000000000000', + projectId_gt: overrides && overrides.hasOwnProperty('projectId_gt') ? overrides.projectId_gt! : '100000000000000000000', + projectId_gte: overrides && overrides.hasOwnProperty('projectId_gte') ? overrides.projectId_gte! : '100000000000000000000', + projectId_in: overrides && overrides.hasOwnProperty('projectId_in') ? overrides.projectId_in! : ['100000000000000000000'], + projectId_lt: overrides && overrides.hasOwnProperty('projectId_lt') ? overrides.projectId_lt! : '100000000000000000000', + projectId_lte: overrides && overrides.hasOwnProperty('projectId_lte') ? overrides.projectId_lte! : '100000000000000000000', + projectId_not: overrides && overrides.hasOwnProperty('projectId_not') ? overrides.projectId_not! : '100000000000000000000', + projectId_not_in: overrides && overrides.hasOwnProperty('projectId_not_in') ? overrides.projectId_not_in! : ['100000000000000000000'], + projectName: overrides && overrides.hasOwnProperty('projectName') ? overrides.projectName! : 'natus', + projectName_contains: overrides && overrides.hasOwnProperty('projectName_contains') ? overrides.projectName_contains! : 'dolores', + projectName_contains_nocase: overrides && overrides.hasOwnProperty('projectName_contains_nocase') ? overrides.projectName_contains_nocase! : 'tempore', + projectName_ends_with: overrides && overrides.hasOwnProperty('projectName_ends_with') ? overrides.projectName_ends_with! : 'atque', + projectName_ends_with_nocase: overrides && overrides.hasOwnProperty('projectName_ends_with_nocase') ? overrides.projectName_ends_with_nocase! : 'recusandae', + projectName_gt: overrides && overrides.hasOwnProperty('projectName_gt') ? overrides.projectName_gt! : 'nam', + projectName_gte: overrides && overrides.hasOwnProperty('projectName_gte') ? overrides.projectName_gte! : 'rerum', + projectName_in: overrides && overrides.hasOwnProperty('projectName_in') ? overrides.projectName_in! : ['qui'], + projectName_lt: overrides && overrides.hasOwnProperty('projectName_lt') ? overrides.projectName_lt! : 'id', + projectName_lte: overrides && overrides.hasOwnProperty('projectName_lte') ? overrides.projectName_lte! : 'quia', + projectName_not: overrides && overrides.hasOwnProperty('projectName_not') ? overrides.projectName_not! : 'et', + projectName_not_contains: overrides && overrides.hasOwnProperty('projectName_not_contains') ? overrides.projectName_not_contains! : 'vero', + projectName_not_contains_nocase: overrides && overrides.hasOwnProperty('projectName_not_contains_nocase') ? overrides.projectName_not_contains_nocase! : 'tenetur', + projectName_not_ends_with: overrides && overrides.hasOwnProperty('projectName_not_ends_with') ? overrides.projectName_not_ends_with! : 'laboriosam', + projectName_not_ends_with_nocase: overrides && overrides.hasOwnProperty('projectName_not_ends_with_nocase') ? overrides.projectName_not_ends_with_nocase! : 'pariatur', + projectName_not_in: overrides && overrides.hasOwnProperty('projectName_not_in') ? overrides.projectName_not_in! : ['quis'], + projectName_not_starts_with: overrides && overrides.hasOwnProperty('projectName_not_starts_with') ? overrides.projectName_not_starts_with! : 'ut', + projectName_not_starts_with_nocase: overrides && overrides.hasOwnProperty('projectName_not_starts_with_nocase') ? overrides.projectName_not_starts_with_nocase! : 'est', + projectName_starts_with: overrides && overrides.hasOwnProperty('projectName_starts_with') ? overrides.projectName_starts_with! : 'incidunt', + projectName_starts_with_nocase: overrides && overrides.hasOwnProperty('projectName_starts_with_nocase') ? overrides.projectName_starts_with_nocase! : 'impedit', + retirementCertificates_: overrides && overrides.hasOwnProperty('retirementCertificates_') ? overrides.retirementCertificates_! : relationshipsToOmit.has('RetirementCertificate_Filter') ? {} as RetirementCertificate_Filter : aRetirementCertificate_Filter({}, relationshipsToOmit), + transactionHash: overrides && overrides.hasOwnProperty('transactionHash') ? overrides.transactionHash! : 'et', + transactionHash_contains: overrides && overrides.hasOwnProperty('transactionHash_contains') ? overrides.transactionHash_contains! : 'velit', + transactionHash_gt: overrides && overrides.hasOwnProperty('transactionHash_gt') ? overrides.transactionHash_gt! : 'ipsa', + transactionHash_gte: overrides && overrides.hasOwnProperty('transactionHash_gte') ? overrides.transactionHash_gte! : 'sed', + transactionHash_in: overrides && overrides.hasOwnProperty('transactionHash_in') ? overrides.transactionHash_in! : ['qui'], + transactionHash_lt: overrides && overrides.hasOwnProperty('transactionHash_lt') ? overrides.transactionHash_lt! : 'porro', + transactionHash_lte: overrides && overrides.hasOwnProperty('transactionHash_lte') ? overrides.transactionHash_lte! : 'eveniet', + transactionHash_not: overrides && overrides.hasOwnProperty('transactionHash_not') ? overrides.transactionHash_not! : 'consequatur', + transactionHash_not_contains: overrides && overrides.hasOwnProperty('transactionHash_not_contains') ? overrides.transactionHash_not_contains! : 'quo', + transactionHash_not_in: overrides && overrides.hasOwnProperty('transactionHash_not_in') ? overrides.transactionHash_not_in! : ['autem'], + }; +}; + +export const aQuery = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): Query => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('Query'); + return { + _meta: overrides && overrides.hasOwnProperty('_meta') ? overrides._meta! : relationshipsToOmit.has('_Meta_') ? {} as _Meta_ : a_Meta_({}, relationshipsToOmit), + cancellation: overrides && overrides.hasOwnProperty('cancellation') ? overrides.cancellation! : relationshipsToOmit.has('Cancellation') ? {} as Cancellation : aCancellation({}, relationshipsToOmit), + cancellations: overrides && overrides.hasOwnProperty('cancellations') ? overrides.cancellations! : [relationshipsToOmit.has('Cancellation') ? {} as Cancellation : aCancellation({}, relationshipsToOmit)], + exAnte: overrides && overrides.hasOwnProperty('exAnte') ? overrides.exAnte! : relationshipsToOmit.has('ExAnte') ? {} as ExAnte : anExAnte({}, relationshipsToOmit), + exAnteHolder: overrides && overrides.hasOwnProperty('exAnteHolder') ? overrides.exAnteHolder! : relationshipsToOmit.has('ExAnteHolder') ? {} as ExAnteHolder : anExAnteHolder({}, relationshipsToOmit), + exAnteHolders: overrides && overrides.hasOwnProperty('exAnteHolders') ? overrides.exAnteHolders! : [relationshipsToOmit.has('ExAnteHolder') ? {} as ExAnteHolder : anExAnteHolder({}, relationshipsToOmit)], + exAntes: overrides && overrides.hasOwnProperty('exAntes') ? overrides.exAntes! : [relationshipsToOmit.has('ExAnte') ? {} as ExAnte : anExAnte({}, relationshipsToOmit)], + exPost: overrides && overrides.hasOwnProperty('exPost') ? overrides.exPost! : relationshipsToOmit.has('ExPost') ? {} as ExPost : anExPost({}, relationshipsToOmit), + exPostHolder: overrides && overrides.hasOwnProperty('exPostHolder') ? overrides.exPostHolder! : relationshipsToOmit.has('ExPostHolder') ? {} as ExPostHolder : anExPostHolder({}, relationshipsToOmit), + exPostHolders: overrides && overrides.hasOwnProperty('exPostHolders') ? overrides.exPostHolders! : [relationshipsToOmit.has('ExPostHolder') ? {} as ExPostHolder : anExPostHolder({}, relationshipsToOmit)], + exPosts: overrides && overrides.hasOwnProperty('exPosts') ? overrides.exPosts! : [relationshipsToOmit.has('ExPost') ? {} as ExPost : anExPost({}, relationshipsToOmit)], + holder: overrides && overrides.hasOwnProperty('holder') ? overrides.holder! : relationshipsToOmit.has('Holder') ? {} as Holder : aHolder({}, relationshipsToOmit), + holders: overrides && overrides.hasOwnProperty('holders') ? overrides.holders! : [relationshipsToOmit.has('Holder') ? {} as Holder : aHolder({}, relationshipsToOmit)], + project: overrides && overrides.hasOwnProperty('project') ? overrides.project! : relationshipsToOmit.has('Project') ? {} as Project : aProject({}, relationshipsToOmit), + projects: overrides && overrides.hasOwnProperty('projects') ? overrides.projects! : [relationshipsToOmit.has('Project') ? {} as Project : aProject({}, relationshipsToOmit)], + retirementCertificate: overrides && overrides.hasOwnProperty('retirementCertificate') ? overrides.retirementCertificate! : relationshipsToOmit.has('RetirementCertificate') ? {} as RetirementCertificate : aRetirementCertificate({}, relationshipsToOmit), + retirementCertificates: overrides && overrides.hasOwnProperty('retirementCertificates') ? overrides.retirementCertificates! : [relationshipsToOmit.has('RetirementCertificate') ? {} as RetirementCertificate : aRetirementCertificate({}, relationshipsToOmit)], + }; +}; + +export const aRetirementCertificate = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): RetirementCertificate => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('RetirementCertificate'); + return { + amount: overrides && overrides.hasOwnProperty('amount') ? overrides.amount! : '100000000000000000000', + createdAt: overrides && overrides.hasOwnProperty('createdAt') ? overrides.createdAt! : '100000000000000000000', + exPost: overrides && overrides.hasOwnProperty('exPost') ? overrides.exPost! : relationshipsToOmit.has('ExPost') ? {} as ExPost : anExPost({}, relationshipsToOmit), + holder: overrides && overrides.hasOwnProperty('holder') ? overrides.holder! : relationshipsToOmit.has('Holder') ? {} as Holder : aHolder({}, relationshipsToOmit), + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'ipsam', + project: overrides && overrides.hasOwnProperty('project') ? overrides.project! : relationshipsToOmit.has('Project') ? {} as Project : aProject({}, relationshipsToOmit), + retiree: overrides && overrides.hasOwnProperty('retiree') ? overrides.retiree! : relationshipsToOmit.has('Holder') ? {} as Holder : aHolder({}, relationshipsToOmit), + serialization: overrides && overrides.hasOwnProperty('serialization') ? overrides.serialization! : 'voluptates', + tokenId: overrides && overrides.hasOwnProperty('tokenId') ? overrides.tokenId! : '100000000000000000000', + transactionHash: overrides && overrides.hasOwnProperty('transactionHash') ? overrides.transactionHash! : 'quia', + }; +}; + +export const aRetirementCertificate_Filter = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): RetirementCertificate_Filter => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('RetirementCertificate_Filter'); + return { + _change_block: overrides && overrides.hasOwnProperty('_change_block') ? overrides._change_block! : relationshipsToOmit.has('BlockChangedFilter') ? {} as BlockChangedFilter : aBlockChangedFilter({}, relationshipsToOmit), + amount: overrides && overrides.hasOwnProperty('amount') ? overrides.amount! : '100000000000000000000', + amount_gt: overrides && overrides.hasOwnProperty('amount_gt') ? overrides.amount_gt! : '100000000000000000000', + amount_gte: overrides && overrides.hasOwnProperty('amount_gte') ? overrides.amount_gte! : '100000000000000000000', + amount_in: overrides && overrides.hasOwnProperty('amount_in') ? overrides.amount_in! : ['100000000000000000000'], + amount_lt: overrides && overrides.hasOwnProperty('amount_lt') ? overrides.amount_lt! : '100000000000000000000', + amount_lte: overrides && overrides.hasOwnProperty('amount_lte') ? overrides.amount_lte! : '100000000000000000000', + amount_not: overrides && overrides.hasOwnProperty('amount_not') ? overrides.amount_not! : '100000000000000000000', + amount_not_in: overrides && overrides.hasOwnProperty('amount_not_in') ? overrides.amount_not_in! : ['100000000000000000000'], + and: overrides && overrides.hasOwnProperty('and') ? overrides.and! : [relationshipsToOmit.has('RetirementCertificate_Filter') ? {} as RetirementCertificate_Filter : aRetirementCertificate_Filter({}, relationshipsToOmit)], + createdAt: overrides && overrides.hasOwnProperty('createdAt') ? overrides.createdAt! : '100000000000000000000', + createdAt_gt: overrides && overrides.hasOwnProperty('createdAt_gt') ? overrides.createdAt_gt! : '100000000000000000000', + createdAt_gte: overrides && overrides.hasOwnProperty('createdAt_gte') ? overrides.createdAt_gte! : '100000000000000000000', + createdAt_in: overrides && overrides.hasOwnProperty('createdAt_in') ? overrides.createdAt_in! : ['100000000000000000000'], + createdAt_lt: overrides && overrides.hasOwnProperty('createdAt_lt') ? overrides.createdAt_lt! : '100000000000000000000', + createdAt_lte: overrides && overrides.hasOwnProperty('createdAt_lte') ? overrides.createdAt_lte! : '100000000000000000000', + createdAt_not: overrides && overrides.hasOwnProperty('createdAt_not') ? overrides.createdAt_not! : '100000000000000000000', + createdAt_not_in: overrides && overrides.hasOwnProperty('createdAt_not_in') ? overrides.createdAt_not_in! : ['100000000000000000000'], + exPost: overrides && overrides.hasOwnProperty('exPost') ? overrides.exPost! : 'id', + exPost_: overrides && overrides.hasOwnProperty('exPost_') ? overrides.exPost_! : relationshipsToOmit.has('ExPost_Filter') ? {} as ExPost_Filter : anExPost_Filter({}, relationshipsToOmit), + exPost_contains: overrides && overrides.hasOwnProperty('exPost_contains') ? overrides.exPost_contains! : 'impedit', + exPost_contains_nocase: overrides && overrides.hasOwnProperty('exPost_contains_nocase') ? overrides.exPost_contains_nocase! : 'nulla', + exPost_ends_with: overrides && overrides.hasOwnProperty('exPost_ends_with') ? overrides.exPost_ends_with! : 'hic', + exPost_ends_with_nocase: overrides && overrides.hasOwnProperty('exPost_ends_with_nocase') ? overrides.exPost_ends_with_nocase! : 'quia', + exPost_gt: overrides && overrides.hasOwnProperty('exPost_gt') ? overrides.exPost_gt! : 'dolores', + exPost_gte: overrides && overrides.hasOwnProperty('exPost_gte') ? overrides.exPost_gte! : 'praesentium', + exPost_in: overrides && overrides.hasOwnProperty('exPost_in') ? overrides.exPost_in! : ['officia'], + exPost_lt: overrides && overrides.hasOwnProperty('exPost_lt') ? overrides.exPost_lt! : 'exercitationem', + exPost_lte: overrides && overrides.hasOwnProperty('exPost_lte') ? overrides.exPost_lte! : 'autem', + exPost_not: overrides && overrides.hasOwnProperty('exPost_not') ? overrides.exPost_not! : 'mollitia', + exPost_not_contains: overrides && overrides.hasOwnProperty('exPost_not_contains') ? overrides.exPost_not_contains! : 'voluptatem', + exPost_not_contains_nocase: overrides && overrides.hasOwnProperty('exPost_not_contains_nocase') ? overrides.exPost_not_contains_nocase! : 'facilis', + exPost_not_ends_with: overrides && overrides.hasOwnProperty('exPost_not_ends_with') ? overrides.exPost_not_ends_with! : 'iste', + exPost_not_ends_with_nocase: overrides && overrides.hasOwnProperty('exPost_not_ends_with_nocase') ? overrides.exPost_not_ends_with_nocase! : 'ut', + exPost_not_in: overrides && overrides.hasOwnProperty('exPost_not_in') ? overrides.exPost_not_in! : ['qui'], + exPost_not_starts_with: overrides && overrides.hasOwnProperty('exPost_not_starts_with') ? overrides.exPost_not_starts_with! : 'aut', + exPost_not_starts_with_nocase: overrides && overrides.hasOwnProperty('exPost_not_starts_with_nocase') ? overrides.exPost_not_starts_with_nocase! : 'debitis', + exPost_starts_with: overrides && overrides.hasOwnProperty('exPost_starts_with') ? overrides.exPost_starts_with! : 'cupiditate', + exPost_starts_with_nocase: overrides && overrides.hasOwnProperty('exPost_starts_with_nocase') ? overrides.exPost_starts_with_nocase! : 'voluptatem', + holder: overrides && overrides.hasOwnProperty('holder') ? overrides.holder! : 'consequuntur', + holder_: overrides && overrides.hasOwnProperty('holder_') ? overrides.holder_! : relationshipsToOmit.has('Holder_Filter') ? {} as Holder_Filter : aHolder_Filter({}, relationshipsToOmit), + holder_contains: overrides && overrides.hasOwnProperty('holder_contains') ? overrides.holder_contains! : 'commodi', + holder_contains_nocase: overrides && overrides.hasOwnProperty('holder_contains_nocase') ? overrides.holder_contains_nocase! : 'laborum', + holder_ends_with: overrides && overrides.hasOwnProperty('holder_ends_with') ? overrides.holder_ends_with! : 'quasi', + holder_ends_with_nocase: overrides && overrides.hasOwnProperty('holder_ends_with_nocase') ? overrides.holder_ends_with_nocase! : 'hic', + holder_gt: overrides && overrides.hasOwnProperty('holder_gt') ? overrides.holder_gt! : 'similique', + holder_gte: overrides && overrides.hasOwnProperty('holder_gte') ? overrides.holder_gte! : 'architecto', + holder_in: overrides && overrides.hasOwnProperty('holder_in') ? overrides.holder_in! : ['aut'], + holder_lt: overrides && overrides.hasOwnProperty('holder_lt') ? overrides.holder_lt! : 'voluptas', + holder_lte: overrides && overrides.hasOwnProperty('holder_lte') ? overrides.holder_lte! : 'unde', + holder_not: overrides && overrides.hasOwnProperty('holder_not') ? overrides.holder_not! : 'laudantium', + holder_not_contains: overrides && overrides.hasOwnProperty('holder_not_contains') ? overrides.holder_not_contains! : 'impedit', + holder_not_contains_nocase: overrides && overrides.hasOwnProperty('holder_not_contains_nocase') ? overrides.holder_not_contains_nocase! : 'praesentium', + holder_not_ends_with: overrides && overrides.hasOwnProperty('holder_not_ends_with') ? overrides.holder_not_ends_with! : 'non', + holder_not_ends_with_nocase: overrides && overrides.hasOwnProperty('holder_not_ends_with_nocase') ? overrides.holder_not_ends_with_nocase! : 'ut', + holder_not_in: overrides && overrides.hasOwnProperty('holder_not_in') ? overrides.holder_not_in! : ['eum'], + holder_not_starts_with: overrides && overrides.hasOwnProperty('holder_not_starts_with') ? overrides.holder_not_starts_with! : 'ut', + holder_not_starts_with_nocase: overrides && overrides.hasOwnProperty('holder_not_starts_with_nocase') ? overrides.holder_not_starts_with_nocase! : 'iste', + holder_starts_with: overrides && overrides.hasOwnProperty('holder_starts_with') ? overrides.holder_starts_with! : 'consequatur', + holder_starts_with_nocase: overrides && overrides.hasOwnProperty('holder_starts_with_nocase') ? overrides.holder_starts_with_nocase! : 'dicta', + id: overrides && overrides.hasOwnProperty('id') ? overrides.id! : 'omnis', + id_contains: overrides && overrides.hasOwnProperty('id_contains') ? overrides.id_contains! : 'perferendis', + id_gt: overrides && overrides.hasOwnProperty('id_gt') ? overrides.id_gt! : 'iure', + id_gte: overrides && overrides.hasOwnProperty('id_gte') ? overrides.id_gte! : 'quas', + id_in: overrides && overrides.hasOwnProperty('id_in') ? overrides.id_in! : ['nostrum'], + id_lt: overrides && overrides.hasOwnProperty('id_lt') ? overrides.id_lt! : 'hic', + id_lte: overrides && overrides.hasOwnProperty('id_lte') ? overrides.id_lte! : 'vitae', + id_not: overrides && overrides.hasOwnProperty('id_not') ? overrides.id_not! : 'quis', + id_not_contains: overrides && overrides.hasOwnProperty('id_not_contains') ? overrides.id_not_contains! : 'veritatis', + id_not_in: overrides && overrides.hasOwnProperty('id_not_in') ? overrides.id_not_in! : ['eveniet'], + or: overrides && overrides.hasOwnProperty('or') ? overrides.or! : [relationshipsToOmit.has('RetirementCertificate_Filter') ? {} as RetirementCertificate_Filter : aRetirementCertificate_Filter({}, relationshipsToOmit)], + project: overrides && overrides.hasOwnProperty('project') ? overrides.project! : 'praesentium', + project_: overrides && overrides.hasOwnProperty('project_') ? overrides.project_! : relationshipsToOmit.has('Project_Filter') ? {} as Project_Filter : aProject_Filter({}, relationshipsToOmit), + project_contains: overrides && overrides.hasOwnProperty('project_contains') ? overrides.project_contains! : 'dolores', + project_contains_nocase: overrides && overrides.hasOwnProperty('project_contains_nocase') ? overrides.project_contains_nocase! : 'est', + project_ends_with: overrides && overrides.hasOwnProperty('project_ends_with') ? overrides.project_ends_with! : 'qui', + project_ends_with_nocase: overrides && overrides.hasOwnProperty('project_ends_with_nocase') ? overrides.project_ends_with_nocase! : 'commodi', + project_gt: overrides && overrides.hasOwnProperty('project_gt') ? overrides.project_gt! : 'quo', + project_gte: overrides && overrides.hasOwnProperty('project_gte') ? overrides.project_gte! : 'est', + project_in: overrides && overrides.hasOwnProperty('project_in') ? overrides.project_in! : ['est'], + project_lt: overrides && overrides.hasOwnProperty('project_lt') ? overrides.project_lt! : 'eligendi', + project_lte: overrides && overrides.hasOwnProperty('project_lte') ? overrides.project_lte! : 'itaque', + project_not: overrides && overrides.hasOwnProperty('project_not') ? overrides.project_not! : 'consequatur', + project_not_contains: overrides && overrides.hasOwnProperty('project_not_contains') ? overrides.project_not_contains! : 'asperiores', + project_not_contains_nocase: overrides && overrides.hasOwnProperty('project_not_contains_nocase') ? overrides.project_not_contains_nocase! : 'reprehenderit', + project_not_ends_with: overrides && overrides.hasOwnProperty('project_not_ends_with') ? overrides.project_not_ends_with! : 'ut', + project_not_ends_with_nocase: overrides && overrides.hasOwnProperty('project_not_ends_with_nocase') ? overrides.project_not_ends_with_nocase! : 'occaecati', + project_not_in: overrides && overrides.hasOwnProperty('project_not_in') ? overrides.project_not_in! : ['quidem'], + project_not_starts_with: overrides && overrides.hasOwnProperty('project_not_starts_with') ? overrides.project_not_starts_with! : 'pariatur', + project_not_starts_with_nocase: overrides && overrides.hasOwnProperty('project_not_starts_with_nocase') ? overrides.project_not_starts_with_nocase! : 'qui', + project_starts_with: overrides && overrides.hasOwnProperty('project_starts_with') ? overrides.project_starts_with! : 'sapiente', + project_starts_with_nocase: overrides && overrides.hasOwnProperty('project_starts_with_nocase') ? overrides.project_starts_with_nocase! : 'rerum', + retiree: overrides && overrides.hasOwnProperty('retiree') ? overrides.retiree! : 'nisi', + retiree_: overrides && overrides.hasOwnProperty('retiree_') ? overrides.retiree_! : relationshipsToOmit.has('Holder_Filter') ? {} as Holder_Filter : aHolder_Filter({}, relationshipsToOmit), + retiree_contains: overrides && overrides.hasOwnProperty('retiree_contains') ? overrides.retiree_contains! : 'nisi', + retiree_contains_nocase: overrides && overrides.hasOwnProperty('retiree_contains_nocase') ? overrides.retiree_contains_nocase! : 'ratione', + retiree_ends_with: overrides && overrides.hasOwnProperty('retiree_ends_with') ? overrides.retiree_ends_with! : 'commodi', + retiree_ends_with_nocase: overrides && overrides.hasOwnProperty('retiree_ends_with_nocase') ? overrides.retiree_ends_with_nocase! : 'nesciunt', + retiree_gt: overrides && overrides.hasOwnProperty('retiree_gt') ? overrides.retiree_gt! : 'qui', + retiree_gte: overrides && overrides.hasOwnProperty('retiree_gte') ? overrides.retiree_gte! : 'aut', + retiree_in: overrides && overrides.hasOwnProperty('retiree_in') ? overrides.retiree_in! : ['sapiente'], + retiree_lt: overrides && overrides.hasOwnProperty('retiree_lt') ? overrides.retiree_lt! : 'quia', + retiree_lte: overrides && overrides.hasOwnProperty('retiree_lte') ? overrides.retiree_lte! : 'laborum', + retiree_not: overrides && overrides.hasOwnProperty('retiree_not') ? overrides.retiree_not! : 'odio', + retiree_not_contains: overrides && overrides.hasOwnProperty('retiree_not_contains') ? overrides.retiree_not_contains! : 'quo', + retiree_not_contains_nocase: overrides && overrides.hasOwnProperty('retiree_not_contains_nocase') ? overrides.retiree_not_contains_nocase! : 'explicabo', + retiree_not_ends_with: overrides && overrides.hasOwnProperty('retiree_not_ends_with') ? overrides.retiree_not_ends_with! : 'velit', + retiree_not_ends_with_nocase: overrides && overrides.hasOwnProperty('retiree_not_ends_with_nocase') ? overrides.retiree_not_ends_with_nocase! : 'nesciunt', + retiree_not_in: overrides && overrides.hasOwnProperty('retiree_not_in') ? overrides.retiree_not_in! : ['commodi'], + retiree_not_starts_with: overrides && overrides.hasOwnProperty('retiree_not_starts_with') ? overrides.retiree_not_starts_with! : 'aperiam', + retiree_not_starts_with_nocase: overrides && overrides.hasOwnProperty('retiree_not_starts_with_nocase') ? overrides.retiree_not_starts_with_nocase! : 'nobis', + retiree_starts_with: overrides && overrides.hasOwnProperty('retiree_starts_with') ? overrides.retiree_starts_with! : 'qui', + retiree_starts_with_nocase: overrides && overrides.hasOwnProperty('retiree_starts_with_nocase') ? overrides.retiree_starts_with_nocase! : 'accusantium', + serialization: overrides && overrides.hasOwnProperty('serialization') ? overrides.serialization! : 'voluptatibus', + serialization_contains: overrides && overrides.hasOwnProperty('serialization_contains') ? overrides.serialization_contains! : 'commodi', + serialization_contains_nocase: overrides && overrides.hasOwnProperty('serialization_contains_nocase') ? overrides.serialization_contains_nocase! : 'quod', + serialization_ends_with: overrides && overrides.hasOwnProperty('serialization_ends_with') ? overrides.serialization_ends_with! : 'labore', + serialization_ends_with_nocase: overrides && overrides.hasOwnProperty('serialization_ends_with_nocase') ? overrides.serialization_ends_with_nocase! : 'consequuntur', + serialization_gt: overrides && overrides.hasOwnProperty('serialization_gt') ? overrides.serialization_gt! : 'ea', + serialization_gte: overrides && overrides.hasOwnProperty('serialization_gte') ? overrides.serialization_gte! : 'neque', + serialization_in: overrides && overrides.hasOwnProperty('serialization_in') ? overrides.serialization_in! : ['quibusdam'], + serialization_lt: overrides && overrides.hasOwnProperty('serialization_lt') ? overrides.serialization_lt! : 'vel', + serialization_lte: overrides && overrides.hasOwnProperty('serialization_lte') ? overrides.serialization_lte! : 'non', + serialization_not: overrides && overrides.hasOwnProperty('serialization_not') ? overrides.serialization_not! : 'odio', + serialization_not_contains: overrides && overrides.hasOwnProperty('serialization_not_contains') ? overrides.serialization_not_contains! : 'nesciunt', + serialization_not_contains_nocase: overrides && overrides.hasOwnProperty('serialization_not_contains_nocase') ? overrides.serialization_not_contains_nocase! : 'fugiat', + serialization_not_ends_with: overrides && overrides.hasOwnProperty('serialization_not_ends_with') ? overrides.serialization_not_ends_with! : 'et', + serialization_not_ends_with_nocase: overrides && overrides.hasOwnProperty('serialization_not_ends_with_nocase') ? overrides.serialization_not_ends_with_nocase! : 'nesciunt', + serialization_not_in: overrides && overrides.hasOwnProperty('serialization_not_in') ? overrides.serialization_not_in! : ['voluptas'], + serialization_not_starts_with: overrides && overrides.hasOwnProperty('serialization_not_starts_with') ? overrides.serialization_not_starts_with! : 'soluta', + serialization_not_starts_with_nocase: overrides && overrides.hasOwnProperty('serialization_not_starts_with_nocase') ? overrides.serialization_not_starts_with_nocase! : 'tempora', + serialization_starts_with: overrides && overrides.hasOwnProperty('serialization_starts_with') ? overrides.serialization_starts_with! : 'minus', + serialization_starts_with_nocase: overrides && overrides.hasOwnProperty('serialization_starts_with_nocase') ? overrides.serialization_starts_with_nocase! : 'corporis', + tokenId: overrides && overrides.hasOwnProperty('tokenId') ? overrides.tokenId! : '100000000000000000000', + tokenId_gt: overrides && overrides.hasOwnProperty('tokenId_gt') ? overrides.tokenId_gt! : '100000000000000000000', + tokenId_gte: overrides && overrides.hasOwnProperty('tokenId_gte') ? overrides.tokenId_gte! : '100000000000000000000', + tokenId_in: overrides && overrides.hasOwnProperty('tokenId_in') ? overrides.tokenId_in! : ['100000000000000000000'], + tokenId_lt: overrides && overrides.hasOwnProperty('tokenId_lt') ? overrides.tokenId_lt! : '100000000000000000000', + tokenId_lte: overrides && overrides.hasOwnProperty('tokenId_lte') ? overrides.tokenId_lte! : '100000000000000000000', + tokenId_not: overrides && overrides.hasOwnProperty('tokenId_not') ? overrides.tokenId_not! : '100000000000000000000', + tokenId_not_in: overrides && overrides.hasOwnProperty('tokenId_not_in') ? overrides.tokenId_not_in! : ['100000000000000000000'], + transactionHash: overrides && overrides.hasOwnProperty('transactionHash') ? overrides.transactionHash! : 'porro', + transactionHash_contains: overrides && overrides.hasOwnProperty('transactionHash_contains') ? overrides.transactionHash_contains! : 'ducimus', + transactionHash_gt: overrides && overrides.hasOwnProperty('transactionHash_gt') ? overrides.transactionHash_gt! : 'voluptas', + transactionHash_gte: overrides && overrides.hasOwnProperty('transactionHash_gte') ? overrides.transactionHash_gte! : 'culpa', + transactionHash_in: overrides && overrides.hasOwnProperty('transactionHash_in') ? overrides.transactionHash_in! : ['id'], + transactionHash_lt: overrides && overrides.hasOwnProperty('transactionHash_lt') ? overrides.transactionHash_lt! : 'autem', + transactionHash_lte: overrides && overrides.hasOwnProperty('transactionHash_lte') ? overrides.transactionHash_lte! : 'veritatis', + transactionHash_not: overrides && overrides.hasOwnProperty('transactionHash_not') ? overrides.transactionHash_not! : 'omnis', + transactionHash_not_contains: overrides && overrides.hasOwnProperty('transactionHash_not_contains') ? overrides.transactionHash_not_contains! : 'sit', + transactionHash_not_in: overrides && overrides.hasOwnProperty('transactionHash_not_in') ? overrides.transactionHash_not_in! : ['reiciendis'], + }; +}; + +export const aSubscription = (overrides?: Partial, _relationshipsToOmit: Set = new Set()): Subscription => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('Subscription'); + return { + _meta: overrides && overrides.hasOwnProperty('_meta') ? overrides._meta! : relationshipsToOmit.has('_Meta_') ? {} as _Meta_ : a_Meta_({}, relationshipsToOmit), + cancellation: overrides && overrides.hasOwnProperty('cancellation') ? overrides.cancellation! : relationshipsToOmit.has('Cancellation') ? {} as Cancellation : aCancellation({}, relationshipsToOmit), + cancellations: overrides && overrides.hasOwnProperty('cancellations') ? overrides.cancellations! : [relationshipsToOmit.has('Cancellation') ? {} as Cancellation : aCancellation({}, relationshipsToOmit)], + exAnte: overrides && overrides.hasOwnProperty('exAnte') ? overrides.exAnte! : relationshipsToOmit.has('ExAnte') ? {} as ExAnte : anExAnte({}, relationshipsToOmit), + exAnteHolder: overrides && overrides.hasOwnProperty('exAnteHolder') ? overrides.exAnteHolder! : relationshipsToOmit.has('ExAnteHolder') ? {} as ExAnteHolder : anExAnteHolder({}, relationshipsToOmit), + exAnteHolders: overrides && overrides.hasOwnProperty('exAnteHolders') ? overrides.exAnteHolders! : [relationshipsToOmit.has('ExAnteHolder') ? {} as ExAnteHolder : anExAnteHolder({}, relationshipsToOmit)], + exAntes: overrides && overrides.hasOwnProperty('exAntes') ? overrides.exAntes! : [relationshipsToOmit.has('ExAnte') ? {} as ExAnte : anExAnte({}, relationshipsToOmit)], + exPost: overrides && overrides.hasOwnProperty('exPost') ? overrides.exPost! : relationshipsToOmit.has('ExPost') ? {} as ExPost : anExPost({}, relationshipsToOmit), + exPostHolder: overrides && overrides.hasOwnProperty('exPostHolder') ? overrides.exPostHolder! : relationshipsToOmit.has('ExPostHolder') ? {} as ExPostHolder : anExPostHolder({}, relationshipsToOmit), + exPostHolders: overrides && overrides.hasOwnProperty('exPostHolders') ? overrides.exPostHolders! : [relationshipsToOmit.has('ExPostHolder') ? {} as ExPostHolder : anExPostHolder({}, relationshipsToOmit)], + exPosts: overrides && overrides.hasOwnProperty('exPosts') ? overrides.exPosts! : [relationshipsToOmit.has('ExPost') ? {} as ExPost : anExPost({}, relationshipsToOmit)], + holder: overrides && overrides.hasOwnProperty('holder') ? overrides.holder! : relationshipsToOmit.has('Holder') ? {} as Holder : aHolder({}, relationshipsToOmit), + holders: overrides && overrides.hasOwnProperty('holders') ? overrides.holders! : [relationshipsToOmit.has('Holder') ? {} as Holder : aHolder({}, relationshipsToOmit)], + project: overrides && overrides.hasOwnProperty('project') ? overrides.project! : relationshipsToOmit.has('Project') ? {} as Project : aProject({}, relationshipsToOmit), + projects: overrides && overrides.hasOwnProperty('projects') ? overrides.projects! : [relationshipsToOmit.has('Project') ? {} as Project : aProject({}, relationshipsToOmit)], + retirementCertificate: overrides && overrides.hasOwnProperty('retirementCertificate') ? overrides.retirementCertificate! : relationshipsToOmit.has('RetirementCertificate') ? {} as RetirementCertificate : aRetirementCertificate({}, relationshipsToOmit), + retirementCertificates: overrides && overrides.hasOwnProperty('retirementCertificates') ? overrides.retirementCertificates! : [relationshipsToOmit.has('RetirementCertificate') ? {} as RetirementCertificate : aRetirementCertificate({}, relationshipsToOmit)], + }; +}; + +export const a_Block_ = (overrides?: Partial<_Block_>, _relationshipsToOmit: Set = new Set()): _Block_ => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('_Block_'); + return { + hash: overrides && overrides.hasOwnProperty('hash') ? overrides.hash! : 'ex', + number: overrides && overrides.hasOwnProperty('number') ? overrides.number! : 1599, + timestamp: overrides && overrides.hasOwnProperty('timestamp') ? overrides.timestamp! : 1310, + }; +}; + +export const a_Meta_ = (overrides?: Partial<_Meta_>, _relationshipsToOmit: Set = new Set()): _Meta_ => { + const relationshipsToOmit: Set = new Set(_relationshipsToOmit); + relationshipsToOmit.add('_Meta_'); + return { + block: overrides && overrides.hasOwnProperty('block') ? overrides.block! : relationshipsToOmit.has('_Block_') ? {} as _Block_ : a_Block_({}, relationshipsToOmit), + deployment: overrides && overrides.hasOwnProperty('deployment') ? overrides.deployment! : 'ut', + hasIndexingErrors: overrides && overrides.hasOwnProperty('hasIndexingErrors') ? overrides.hasIndexingErrors! : false, + }; +}; diff --git a/carbonmark-api/src/.generated/types/icr.types.ts b/carbonmark-api/src/.generated/types/icr.types.ts new file mode 100644 index 0000000000..e190d984a8 --- /dev/null +++ b/carbonmark-api/src/.generated/types/icr.types.ts @@ -0,0 +1,1749 @@ +import { GraphQLClient } from 'graphql-request'; +import { GraphQLClientRequestHeaders } from 'graphql-request/build/cjs/types'; +import gql from 'graphql-tag'; +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + BigDecimal: any; + BigInt: string; + Bytes: any; + Int8: any; +}; + +export type BlockChangedFilter = { + number_gte: Scalars['Int']; +}; + +export type Block_Height = { + hash: InputMaybe; + number: InputMaybe; + number_gte: InputMaybe; +}; + +export type Cancellation = { + __typename?: 'Cancellation'; + amount: Scalars['BigInt']; + cancelledBy: Holder; + createdAt: Scalars['BigInt']; + exPost: ExPost; + id: Scalars['Bytes']; + project: Project; + serialization: Scalars['String']; + transactionHash: Scalars['Bytes']; +}; + +export type Cancellation_Filter = { + /** Filter for the block changed event. */ + _change_block: InputMaybe; + amount: InputMaybe; + amount_gt: InputMaybe; + amount_gte: InputMaybe; + amount_in: InputMaybe>; + amount_lt: InputMaybe; + amount_lte: InputMaybe; + amount_not: InputMaybe; + amount_not_in: InputMaybe>; + and: InputMaybe>>; + cancelledBy: InputMaybe; + cancelledBy_: InputMaybe; + cancelledBy_contains: InputMaybe; + cancelledBy_contains_nocase: InputMaybe; + cancelledBy_ends_with: InputMaybe; + cancelledBy_ends_with_nocase: InputMaybe; + cancelledBy_gt: InputMaybe; + cancelledBy_gte: InputMaybe; + cancelledBy_in: InputMaybe>; + cancelledBy_lt: InputMaybe; + cancelledBy_lte: InputMaybe; + cancelledBy_not: InputMaybe; + cancelledBy_not_contains: InputMaybe; + cancelledBy_not_contains_nocase: InputMaybe; + cancelledBy_not_ends_with: InputMaybe; + cancelledBy_not_ends_with_nocase: InputMaybe; + cancelledBy_not_in: InputMaybe>; + cancelledBy_not_starts_with: InputMaybe; + cancelledBy_not_starts_with_nocase: InputMaybe; + cancelledBy_starts_with: InputMaybe; + cancelledBy_starts_with_nocase: InputMaybe; + createdAt: InputMaybe; + createdAt_gt: InputMaybe; + createdAt_gte: InputMaybe; + createdAt_in: InputMaybe>; + createdAt_lt: InputMaybe; + createdAt_lte: InputMaybe; + createdAt_not: InputMaybe; + createdAt_not_in: InputMaybe>; + exPost: InputMaybe; + exPost_: InputMaybe; + exPost_contains: InputMaybe; + exPost_contains_nocase: InputMaybe; + exPost_ends_with: InputMaybe; + exPost_ends_with_nocase: InputMaybe; + exPost_gt: InputMaybe; + exPost_gte: InputMaybe; + exPost_in: InputMaybe>; + exPost_lt: InputMaybe; + exPost_lte: InputMaybe; + exPost_not: InputMaybe; + exPost_not_contains: InputMaybe; + exPost_not_contains_nocase: InputMaybe; + exPost_not_ends_with: InputMaybe; + exPost_not_ends_with_nocase: InputMaybe; + exPost_not_in: InputMaybe>; + exPost_not_starts_with: InputMaybe; + exPost_not_starts_with_nocase: InputMaybe; + exPost_starts_with: InputMaybe; + exPost_starts_with_nocase: InputMaybe; + id: InputMaybe; + id_contains: InputMaybe; + id_gt: InputMaybe; + id_gte: InputMaybe; + id_in: InputMaybe>; + id_lt: InputMaybe; + id_lte: InputMaybe; + id_not: InputMaybe; + id_not_contains: InputMaybe; + id_not_in: InputMaybe>; + or: InputMaybe>>; + project: InputMaybe; + project_: InputMaybe; + project_contains: InputMaybe; + project_contains_nocase: InputMaybe; + project_ends_with: InputMaybe; + project_ends_with_nocase: InputMaybe; + project_gt: InputMaybe; + project_gte: InputMaybe; + project_in: InputMaybe>; + project_lt: InputMaybe; + project_lte: InputMaybe; + project_not: InputMaybe; + project_not_contains: InputMaybe; + project_not_contains_nocase: InputMaybe; + project_not_ends_with: InputMaybe; + project_not_ends_with_nocase: InputMaybe; + project_not_in: InputMaybe>; + project_not_starts_with: InputMaybe; + project_not_starts_with_nocase: InputMaybe; + project_starts_with: InputMaybe; + project_starts_with_nocase: InputMaybe; + serialization: InputMaybe; + serialization_contains: InputMaybe; + serialization_contains_nocase: InputMaybe; + serialization_ends_with: InputMaybe; + serialization_ends_with_nocase: InputMaybe; + serialization_gt: InputMaybe; + serialization_gte: InputMaybe; + serialization_in: InputMaybe>; + serialization_lt: InputMaybe; + serialization_lte: InputMaybe; + serialization_not: InputMaybe; + serialization_not_contains: InputMaybe; + serialization_not_contains_nocase: InputMaybe; + serialization_not_ends_with: InputMaybe; + serialization_not_ends_with_nocase: InputMaybe; + serialization_not_in: InputMaybe>; + serialization_not_starts_with: InputMaybe; + serialization_not_starts_with_nocase: InputMaybe; + serialization_starts_with: InputMaybe; + serialization_starts_with_nocase: InputMaybe; + transactionHash: InputMaybe; + transactionHash_contains: InputMaybe; + transactionHash_gt: InputMaybe; + transactionHash_gte: InputMaybe; + transactionHash_in: InputMaybe>; + transactionHash_lt: InputMaybe; + transactionHash_lte: InputMaybe; + transactionHash_not: InputMaybe; + transactionHash_not_contains: InputMaybe; + transactionHash_not_in: InputMaybe>; +}; + +export enum Cancellation_OrderBy { + amount = 'amount', + cancelledBy = 'cancelledBy', + cancelledBy__address = 'cancelledBy__address', + cancelledBy__cancelledAmount = 'cancelledBy__cancelledAmount', + cancelledBy__id = 'cancelledBy__id', + cancelledBy__retiredAmount = 'cancelledBy__retiredAmount', + createdAt = 'createdAt', + exPost = 'exPost', + exPost__cancelledAmount = 'exPost__cancelledAmount', + exPost__estimatedAmount = 'exPost__estimatedAmount', + exPost__id = 'exPost__id', + exPost__lastVerificationTimestamp = 'exPost__lastVerificationTimestamp', + exPost__retiredAmount = 'exPost__retiredAmount', + exPost__serialization = 'exPost__serialization', + exPost__supply = 'exPost__supply', + exPost__tokenId = 'exPost__tokenId', + exPost__verificationPeriodEnd = 'exPost__verificationPeriodEnd', + exPost__verificationPeriodStart = 'exPost__verificationPeriodStart', + exPost__vintage = 'exPost__vintage', + id = 'id', + project = 'project', + project__blockNumber = 'project__blockNumber', + project__blockTimestamp = 'project__blockTimestamp', + project__id = 'project__id', + project__projectAddress = 'project__projectAddress', + project__projectId = 'project__projectId', + project__projectName = 'project__projectName', + project__transactionHash = 'project__transactionHash', + serialization = 'serialization', + transactionHash = 'transactionHash' +} + +export type ExAnte = { + __typename?: 'ExAnte'; + exPost: ExPost; + holders: Array; + id: Scalars['Bytes']; + project: Project; + serialization: Scalars['String']; + supply: Scalars['BigInt']; + tokenId: Scalars['BigInt']; +}; + + +export type ExAnteHoldersArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + +export type ExAnteHolder = { + __typename?: 'ExAnteHolder'; + amount: Scalars['BigInt']; + createdAt: Scalars['BigInt']; + exAnte: ExAnte; + holder: Holder; + id: Scalars['Bytes']; + updatedAt: Scalars['BigInt']; +}; + +export type ExAnteHolder_Filter = { + /** Filter for the block changed event. */ + _change_block: InputMaybe; + amount: InputMaybe; + amount_gt: InputMaybe; + amount_gte: InputMaybe; + amount_in: InputMaybe>; + amount_lt: InputMaybe; + amount_lte: InputMaybe; + amount_not: InputMaybe; + amount_not_in: InputMaybe>; + and: InputMaybe>>; + createdAt: InputMaybe; + createdAt_gt: InputMaybe; + createdAt_gte: InputMaybe; + createdAt_in: InputMaybe>; + createdAt_lt: InputMaybe; + createdAt_lte: InputMaybe; + createdAt_not: InputMaybe; + createdAt_not_in: InputMaybe>; + exAnte: InputMaybe; + exAnte_: InputMaybe; + exAnte_contains: InputMaybe; + exAnte_contains_nocase: InputMaybe; + exAnte_ends_with: InputMaybe; + exAnte_ends_with_nocase: InputMaybe; + exAnte_gt: InputMaybe; + exAnte_gte: InputMaybe; + exAnte_in: InputMaybe>; + exAnte_lt: InputMaybe; + exAnte_lte: InputMaybe; + exAnte_not: InputMaybe; + exAnte_not_contains: InputMaybe; + exAnte_not_contains_nocase: InputMaybe; + exAnte_not_ends_with: InputMaybe; + exAnte_not_ends_with_nocase: InputMaybe; + exAnte_not_in: InputMaybe>; + exAnte_not_starts_with: InputMaybe; + exAnte_not_starts_with_nocase: InputMaybe; + exAnte_starts_with: InputMaybe; + exAnte_starts_with_nocase: InputMaybe; + holder: InputMaybe; + holder_: InputMaybe; + holder_contains: InputMaybe; + holder_contains_nocase: InputMaybe; + holder_ends_with: InputMaybe; + holder_ends_with_nocase: InputMaybe; + holder_gt: InputMaybe; + holder_gte: InputMaybe; + holder_in: InputMaybe>; + holder_lt: InputMaybe; + holder_lte: InputMaybe; + holder_not: InputMaybe; + holder_not_contains: InputMaybe; + holder_not_contains_nocase: InputMaybe; + holder_not_ends_with: InputMaybe; + holder_not_ends_with_nocase: InputMaybe; + holder_not_in: InputMaybe>; + holder_not_starts_with: InputMaybe; + holder_not_starts_with_nocase: InputMaybe; + holder_starts_with: InputMaybe; + holder_starts_with_nocase: InputMaybe; + id: InputMaybe; + id_contains: InputMaybe; + id_gt: InputMaybe; + id_gte: InputMaybe; + id_in: InputMaybe>; + id_lt: InputMaybe; + id_lte: InputMaybe; + id_not: InputMaybe; + id_not_contains: InputMaybe; + id_not_in: InputMaybe>; + or: InputMaybe>>; + updatedAt: InputMaybe; + updatedAt_gt: InputMaybe; + updatedAt_gte: InputMaybe; + updatedAt_in: InputMaybe>; + updatedAt_lt: InputMaybe; + updatedAt_lte: InputMaybe; + updatedAt_not: InputMaybe; + updatedAt_not_in: InputMaybe>; +}; + +export enum ExAnteHolder_OrderBy { + amount = 'amount', + createdAt = 'createdAt', + exAnte = 'exAnte', + exAnte__id = 'exAnte__id', + exAnte__serialization = 'exAnte__serialization', + exAnte__supply = 'exAnte__supply', + exAnte__tokenId = 'exAnte__tokenId', + holder = 'holder', + holder__address = 'holder__address', + holder__cancelledAmount = 'holder__cancelledAmount', + holder__id = 'holder__id', + holder__retiredAmount = 'holder__retiredAmount', + id = 'id', + updatedAt = 'updatedAt' +} + +export type ExAnte_Filter = { + /** Filter for the block changed event. */ + _change_block: InputMaybe; + and: InputMaybe>>; + exPost: InputMaybe; + exPost_: InputMaybe; + exPost_contains: InputMaybe; + exPost_contains_nocase: InputMaybe; + exPost_ends_with: InputMaybe; + exPost_ends_with_nocase: InputMaybe; + exPost_gt: InputMaybe; + exPost_gte: InputMaybe; + exPost_in: InputMaybe>; + exPost_lt: InputMaybe; + exPost_lte: InputMaybe; + exPost_not: InputMaybe; + exPost_not_contains: InputMaybe; + exPost_not_contains_nocase: InputMaybe; + exPost_not_ends_with: InputMaybe; + exPost_not_ends_with_nocase: InputMaybe; + exPost_not_in: InputMaybe>; + exPost_not_starts_with: InputMaybe; + exPost_not_starts_with_nocase: InputMaybe; + exPost_starts_with: InputMaybe; + exPost_starts_with_nocase: InputMaybe; + holders_: InputMaybe; + id: InputMaybe; + id_contains: InputMaybe; + id_gt: InputMaybe; + id_gte: InputMaybe; + id_in: InputMaybe>; + id_lt: InputMaybe; + id_lte: InputMaybe; + id_not: InputMaybe; + id_not_contains: InputMaybe; + id_not_in: InputMaybe>; + or: InputMaybe>>; + project: InputMaybe; + project_: InputMaybe; + project_contains: InputMaybe; + project_contains_nocase: InputMaybe; + project_ends_with: InputMaybe; + project_ends_with_nocase: InputMaybe; + project_gt: InputMaybe; + project_gte: InputMaybe; + project_in: InputMaybe>; + project_lt: InputMaybe; + project_lte: InputMaybe; + project_not: InputMaybe; + project_not_contains: InputMaybe; + project_not_contains_nocase: InputMaybe; + project_not_ends_with: InputMaybe; + project_not_ends_with_nocase: InputMaybe; + project_not_in: InputMaybe>; + project_not_starts_with: InputMaybe; + project_not_starts_with_nocase: InputMaybe; + project_starts_with: InputMaybe; + project_starts_with_nocase: InputMaybe; + serialization: InputMaybe; + serialization_contains: InputMaybe; + serialization_contains_nocase: InputMaybe; + serialization_ends_with: InputMaybe; + serialization_ends_with_nocase: InputMaybe; + serialization_gt: InputMaybe; + serialization_gte: InputMaybe; + serialization_in: InputMaybe>; + serialization_lt: InputMaybe; + serialization_lte: InputMaybe; + serialization_not: InputMaybe; + serialization_not_contains: InputMaybe; + serialization_not_contains_nocase: InputMaybe; + serialization_not_ends_with: InputMaybe; + serialization_not_ends_with_nocase: InputMaybe; + serialization_not_in: InputMaybe>; + serialization_not_starts_with: InputMaybe; + serialization_not_starts_with_nocase: InputMaybe; + serialization_starts_with: InputMaybe; + serialization_starts_with_nocase: InputMaybe; + supply: InputMaybe; + supply_gt: InputMaybe; + supply_gte: InputMaybe; + supply_in: InputMaybe>; + supply_lt: InputMaybe; + supply_lte: InputMaybe; + supply_not: InputMaybe; + supply_not_in: InputMaybe>; + tokenId: InputMaybe; + tokenId_gt: InputMaybe; + tokenId_gte: InputMaybe; + tokenId_in: InputMaybe>; + tokenId_lt: InputMaybe; + tokenId_lte: InputMaybe; + tokenId_not: InputMaybe; + tokenId_not_in: InputMaybe>; +}; + +export enum ExAnte_OrderBy { + exPost = 'exPost', + exPost__cancelledAmount = 'exPost__cancelledAmount', + exPost__estimatedAmount = 'exPost__estimatedAmount', + exPost__id = 'exPost__id', + exPost__lastVerificationTimestamp = 'exPost__lastVerificationTimestamp', + exPost__retiredAmount = 'exPost__retiredAmount', + exPost__serialization = 'exPost__serialization', + exPost__supply = 'exPost__supply', + exPost__tokenId = 'exPost__tokenId', + exPost__verificationPeriodEnd = 'exPost__verificationPeriodEnd', + exPost__verificationPeriodStart = 'exPost__verificationPeriodStart', + exPost__vintage = 'exPost__vintage', + holders = 'holders', + id = 'id', + project = 'project', + project__blockNumber = 'project__blockNumber', + project__blockTimestamp = 'project__blockTimestamp', + project__id = 'project__id', + project__projectAddress = 'project__projectAddress', + project__projectId = 'project__projectId', + project__projectName = 'project__projectName', + project__transactionHash = 'project__transactionHash', + serialization = 'serialization', + supply = 'supply', + tokenId = 'tokenId' +} + +export type ExPost = { + __typename?: 'ExPost'; + cancellations: Array; + cancelledAmount: Scalars['BigInt']; + estimatedAmount: Scalars['BigInt']; + exAnte: Maybe; + holders: Array; + id: Scalars['Bytes']; + lastVerificationTimestamp: Scalars['BigInt']; + project: Project; + retiredAmount: Scalars['BigInt']; + retirementCertificates: Array; + serialization: Scalars['String']; + supply: Scalars['BigInt']; + tokenId: Scalars['BigInt']; + verificationPeriodEnd: Scalars['BigInt']; + verificationPeriodStart: Scalars['BigInt']; + vintage: Scalars['String']; +}; + + +export type ExPostCancellationsArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + + +export type ExPostHoldersArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + + +export type ExPostRetirementCertificatesArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + +export type ExPostHolder = { + __typename?: 'ExPostHolder'; + amount: Scalars['BigInt']; + createdAt: Scalars['BigInt']; + exPost: ExPost; + holder: Holder; + id: Scalars['Bytes']; + retiredAmount: Scalars['BigInt']; + updatedAt: Scalars['BigInt']; +}; + +export type ExPostHolder_Filter = { + /** Filter for the block changed event. */ + _change_block: InputMaybe; + amount: InputMaybe; + amount_gt: InputMaybe; + amount_gte: InputMaybe; + amount_in: InputMaybe>; + amount_lt: InputMaybe; + amount_lte: InputMaybe; + amount_not: InputMaybe; + amount_not_in: InputMaybe>; + and: InputMaybe>>; + createdAt: InputMaybe; + createdAt_gt: InputMaybe; + createdAt_gte: InputMaybe; + createdAt_in: InputMaybe>; + createdAt_lt: InputMaybe; + createdAt_lte: InputMaybe; + createdAt_not: InputMaybe; + createdAt_not_in: InputMaybe>; + exPost: InputMaybe; + exPost_: InputMaybe; + exPost_contains: InputMaybe; + exPost_contains_nocase: InputMaybe; + exPost_ends_with: InputMaybe; + exPost_ends_with_nocase: InputMaybe; + exPost_gt: InputMaybe; + exPost_gte: InputMaybe; + exPost_in: InputMaybe>; + exPost_lt: InputMaybe; + exPost_lte: InputMaybe; + exPost_not: InputMaybe; + exPost_not_contains: InputMaybe; + exPost_not_contains_nocase: InputMaybe; + exPost_not_ends_with: InputMaybe; + exPost_not_ends_with_nocase: InputMaybe; + exPost_not_in: InputMaybe>; + exPost_not_starts_with: InputMaybe; + exPost_not_starts_with_nocase: InputMaybe; + exPost_starts_with: InputMaybe; + exPost_starts_with_nocase: InputMaybe; + holder: InputMaybe; + holder_: InputMaybe; + holder_contains: InputMaybe; + holder_contains_nocase: InputMaybe; + holder_ends_with: InputMaybe; + holder_ends_with_nocase: InputMaybe; + holder_gt: InputMaybe; + holder_gte: InputMaybe; + holder_in: InputMaybe>; + holder_lt: InputMaybe; + holder_lte: InputMaybe; + holder_not: InputMaybe; + holder_not_contains: InputMaybe; + holder_not_contains_nocase: InputMaybe; + holder_not_ends_with: InputMaybe; + holder_not_ends_with_nocase: InputMaybe; + holder_not_in: InputMaybe>; + holder_not_starts_with: InputMaybe; + holder_not_starts_with_nocase: InputMaybe; + holder_starts_with: InputMaybe; + holder_starts_with_nocase: InputMaybe; + id: InputMaybe; + id_contains: InputMaybe; + id_gt: InputMaybe; + id_gte: InputMaybe; + id_in: InputMaybe>; + id_lt: InputMaybe; + id_lte: InputMaybe; + id_not: InputMaybe; + id_not_contains: InputMaybe; + id_not_in: InputMaybe>; + or: InputMaybe>>; + retiredAmount: InputMaybe; + retiredAmount_gt: InputMaybe; + retiredAmount_gte: InputMaybe; + retiredAmount_in: InputMaybe>; + retiredAmount_lt: InputMaybe; + retiredAmount_lte: InputMaybe; + retiredAmount_not: InputMaybe; + retiredAmount_not_in: InputMaybe>; + updatedAt: InputMaybe; + updatedAt_gt: InputMaybe; + updatedAt_gte: InputMaybe; + updatedAt_in: InputMaybe>; + updatedAt_lt: InputMaybe; + updatedAt_lte: InputMaybe; + updatedAt_not: InputMaybe; + updatedAt_not_in: InputMaybe>; +}; + +export enum ExPostHolder_OrderBy { + amount = 'amount', + createdAt = 'createdAt', + exPost = 'exPost', + exPost__cancelledAmount = 'exPost__cancelledAmount', + exPost__estimatedAmount = 'exPost__estimatedAmount', + exPost__id = 'exPost__id', + exPost__lastVerificationTimestamp = 'exPost__lastVerificationTimestamp', + exPost__retiredAmount = 'exPost__retiredAmount', + exPost__serialization = 'exPost__serialization', + exPost__supply = 'exPost__supply', + exPost__tokenId = 'exPost__tokenId', + exPost__verificationPeriodEnd = 'exPost__verificationPeriodEnd', + exPost__verificationPeriodStart = 'exPost__verificationPeriodStart', + exPost__vintage = 'exPost__vintage', + holder = 'holder', + holder__address = 'holder__address', + holder__cancelledAmount = 'holder__cancelledAmount', + holder__id = 'holder__id', + holder__retiredAmount = 'holder__retiredAmount', + id = 'id', + retiredAmount = 'retiredAmount', + updatedAt = 'updatedAt' +} + +export type ExPost_Filter = { + /** Filter for the block changed event. */ + _change_block: InputMaybe; + and: InputMaybe>>; + cancellations_: InputMaybe; + cancelledAmount: InputMaybe; + cancelledAmount_gt: InputMaybe; + cancelledAmount_gte: InputMaybe; + cancelledAmount_in: InputMaybe>; + cancelledAmount_lt: InputMaybe; + cancelledAmount_lte: InputMaybe; + cancelledAmount_not: InputMaybe; + cancelledAmount_not_in: InputMaybe>; + estimatedAmount: InputMaybe; + estimatedAmount_gt: InputMaybe; + estimatedAmount_gte: InputMaybe; + estimatedAmount_in: InputMaybe>; + estimatedAmount_lt: InputMaybe; + estimatedAmount_lte: InputMaybe; + estimatedAmount_not: InputMaybe; + estimatedAmount_not_in: InputMaybe>; + exAnte_: InputMaybe; + holders_: InputMaybe; + id: InputMaybe; + id_contains: InputMaybe; + id_gt: InputMaybe; + id_gte: InputMaybe; + id_in: InputMaybe>; + id_lt: InputMaybe; + id_lte: InputMaybe; + id_not: InputMaybe; + id_not_contains: InputMaybe; + id_not_in: InputMaybe>; + lastVerificationTimestamp: InputMaybe; + lastVerificationTimestamp_gt: InputMaybe; + lastVerificationTimestamp_gte: InputMaybe; + lastVerificationTimestamp_in: InputMaybe>; + lastVerificationTimestamp_lt: InputMaybe; + lastVerificationTimestamp_lte: InputMaybe; + lastVerificationTimestamp_not: InputMaybe; + lastVerificationTimestamp_not_in: InputMaybe>; + or: InputMaybe>>; + project: InputMaybe; + project_: InputMaybe; + project_contains: InputMaybe; + project_contains_nocase: InputMaybe; + project_ends_with: InputMaybe; + project_ends_with_nocase: InputMaybe; + project_gt: InputMaybe; + project_gte: InputMaybe; + project_in: InputMaybe>; + project_lt: InputMaybe; + project_lte: InputMaybe; + project_not: InputMaybe; + project_not_contains: InputMaybe; + project_not_contains_nocase: InputMaybe; + project_not_ends_with: InputMaybe; + project_not_ends_with_nocase: InputMaybe; + project_not_in: InputMaybe>; + project_not_starts_with: InputMaybe; + project_not_starts_with_nocase: InputMaybe; + project_starts_with: InputMaybe; + project_starts_with_nocase: InputMaybe; + retiredAmount: InputMaybe; + retiredAmount_gt: InputMaybe; + retiredAmount_gte: InputMaybe; + retiredAmount_in: InputMaybe>; + retiredAmount_lt: InputMaybe; + retiredAmount_lte: InputMaybe; + retiredAmount_not: InputMaybe; + retiredAmount_not_in: InputMaybe>; + retirementCertificates_: InputMaybe; + serialization: InputMaybe; + serialization_contains: InputMaybe; + serialization_contains_nocase: InputMaybe; + serialization_ends_with: InputMaybe; + serialization_ends_with_nocase: InputMaybe; + serialization_gt: InputMaybe; + serialization_gte: InputMaybe; + serialization_in: InputMaybe>; + serialization_lt: InputMaybe; + serialization_lte: InputMaybe; + serialization_not: InputMaybe; + serialization_not_contains: InputMaybe; + serialization_not_contains_nocase: InputMaybe; + serialization_not_ends_with: InputMaybe; + serialization_not_ends_with_nocase: InputMaybe; + serialization_not_in: InputMaybe>; + serialization_not_starts_with: InputMaybe; + serialization_not_starts_with_nocase: InputMaybe; + serialization_starts_with: InputMaybe; + serialization_starts_with_nocase: InputMaybe; + supply: InputMaybe; + supply_gt: InputMaybe; + supply_gte: InputMaybe; + supply_in: InputMaybe>; + supply_lt: InputMaybe; + supply_lte: InputMaybe; + supply_not: InputMaybe; + supply_not_in: InputMaybe>; + tokenId: InputMaybe; + tokenId_gt: InputMaybe; + tokenId_gte: InputMaybe; + tokenId_in: InputMaybe>; + tokenId_lt: InputMaybe; + tokenId_lte: InputMaybe; + tokenId_not: InputMaybe; + tokenId_not_in: InputMaybe>; + verificationPeriodEnd: InputMaybe; + verificationPeriodEnd_gt: InputMaybe; + verificationPeriodEnd_gte: InputMaybe; + verificationPeriodEnd_in: InputMaybe>; + verificationPeriodEnd_lt: InputMaybe; + verificationPeriodEnd_lte: InputMaybe; + verificationPeriodEnd_not: InputMaybe; + verificationPeriodEnd_not_in: InputMaybe>; + verificationPeriodStart: InputMaybe; + verificationPeriodStart_gt: InputMaybe; + verificationPeriodStart_gte: InputMaybe; + verificationPeriodStart_in: InputMaybe>; + verificationPeriodStart_lt: InputMaybe; + verificationPeriodStart_lte: InputMaybe; + verificationPeriodStart_not: InputMaybe; + verificationPeriodStart_not_in: InputMaybe>; + vintage: InputMaybe; + vintage_contains: InputMaybe; + vintage_contains_nocase: InputMaybe; + vintage_ends_with: InputMaybe; + vintage_ends_with_nocase: InputMaybe; + vintage_gt: InputMaybe; + vintage_gte: InputMaybe; + vintage_in: InputMaybe>; + vintage_lt: InputMaybe; + vintage_lte: InputMaybe; + vintage_not: InputMaybe; + vintage_not_contains: InputMaybe; + vintage_not_contains_nocase: InputMaybe; + vintage_not_ends_with: InputMaybe; + vintage_not_ends_with_nocase: InputMaybe; + vintage_not_in: InputMaybe>; + vintage_not_starts_with: InputMaybe; + vintage_not_starts_with_nocase: InputMaybe; + vintage_starts_with: InputMaybe; + vintage_starts_with_nocase: InputMaybe; +}; + +export enum ExPost_OrderBy { + cancellations = 'cancellations', + cancelledAmount = 'cancelledAmount', + estimatedAmount = 'estimatedAmount', + exAnte = 'exAnte', + exAnte__id = 'exAnte__id', + exAnte__serialization = 'exAnte__serialization', + exAnte__supply = 'exAnte__supply', + exAnte__tokenId = 'exAnte__tokenId', + holders = 'holders', + id = 'id', + lastVerificationTimestamp = 'lastVerificationTimestamp', + project = 'project', + project__blockNumber = 'project__blockNumber', + project__blockTimestamp = 'project__blockTimestamp', + project__id = 'project__id', + project__projectAddress = 'project__projectAddress', + project__projectId = 'project__projectId', + project__projectName = 'project__projectName', + project__transactionHash = 'project__transactionHash', + retiredAmount = 'retiredAmount', + retirementCertificates = 'retirementCertificates', + serialization = 'serialization', + supply = 'supply', + tokenId = 'tokenId', + verificationPeriodEnd = 'verificationPeriodEnd', + verificationPeriodStart = 'verificationPeriodStart', + vintage = 'vintage' +} + +export type Holder = { + __typename?: 'Holder'; + address: Scalars['Bytes']; + cancellations: Array; + cancelledAmount: Scalars['BigInt']; + exAnteAmounts: Array; + exPostAmounts: Array; + id: Scalars['Bytes']; + retiredAmount: Scalars['BigInt']; + retirementCertificates: Array; +}; + + +export type HolderCancellationsArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + + +export type HolderExAnteAmountsArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + + +export type HolderExPostAmountsArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + + +export type HolderRetirementCertificatesArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + +export type Holder_Filter = { + /** Filter for the block changed event. */ + _change_block: InputMaybe; + address: InputMaybe; + address_contains: InputMaybe; + address_gt: InputMaybe; + address_gte: InputMaybe; + address_in: InputMaybe>; + address_lt: InputMaybe; + address_lte: InputMaybe; + address_not: InputMaybe; + address_not_contains: InputMaybe; + address_not_in: InputMaybe>; + and: InputMaybe>>; + cancellations_: InputMaybe; + cancelledAmount: InputMaybe; + cancelledAmount_gt: InputMaybe; + cancelledAmount_gte: InputMaybe; + cancelledAmount_in: InputMaybe>; + cancelledAmount_lt: InputMaybe; + cancelledAmount_lte: InputMaybe; + cancelledAmount_not: InputMaybe; + cancelledAmount_not_in: InputMaybe>; + exAnteAmounts_: InputMaybe; + exPostAmounts_: InputMaybe; + id: InputMaybe; + id_contains: InputMaybe; + id_gt: InputMaybe; + id_gte: InputMaybe; + id_in: InputMaybe>; + id_lt: InputMaybe; + id_lte: InputMaybe; + id_not: InputMaybe; + id_not_contains: InputMaybe; + id_not_in: InputMaybe>; + or: InputMaybe>>; + retiredAmount: InputMaybe; + retiredAmount_gt: InputMaybe; + retiredAmount_gte: InputMaybe; + retiredAmount_in: InputMaybe>; + retiredAmount_lt: InputMaybe; + retiredAmount_lte: InputMaybe; + retiredAmount_not: InputMaybe; + retiredAmount_not_in: InputMaybe>; + retirementCertificates_: InputMaybe; +}; + +export enum Holder_OrderBy { + address = 'address', + cancellations = 'cancellations', + cancelledAmount = 'cancelledAmount', + exAnteAmounts = 'exAnteAmounts', + exPostAmounts = 'exPostAmounts', + id = 'id', + retiredAmount = 'retiredAmount', + retirementCertificates = 'retirementCertificates' +} + +/** Defines the order direction, either ascending or descending */ +export enum OrderDirection { + asc = 'asc', + desc = 'desc' +} + +export type Project = { + __typename?: 'Project'; + blockNumber: Scalars['BigInt']; + blockTimestamp: Scalars['BigInt']; + cancellations: Array; + exAntes: Array; + exPosts: Array; + id: Scalars['Bytes']; + projectAddress: Scalars['Bytes']; + projectId: Scalars['BigInt']; + projectName: Scalars['String']; + retirementCertificates: Array; + transactionHash: Scalars['Bytes']; +}; + + +export type ProjectCancellationsArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + + +export type ProjectExAntesArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + + +export type ProjectExPostsArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + + +export type ProjectRetirementCertificatesArgs = { + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + where: InputMaybe; +}; + +export type Project_Filter = { + /** Filter for the block changed event. */ + _change_block: InputMaybe; + and: InputMaybe>>; + blockNumber: InputMaybe; + blockNumber_gt: InputMaybe; + blockNumber_gte: InputMaybe; + blockNumber_in: InputMaybe>; + blockNumber_lt: InputMaybe; + blockNumber_lte: InputMaybe; + blockNumber_not: InputMaybe; + blockNumber_not_in: InputMaybe>; + blockTimestamp: InputMaybe; + blockTimestamp_gt: InputMaybe; + blockTimestamp_gte: InputMaybe; + blockTimestamp_in: InputMaybe>; + blockTimestamp_lt: InputMaybe; + blockTimestamp_lte: InputMaybe; + blockTimestamp_not: InputMaybe; + blockTimestamp_not_in: InputMaybe>; + cancellations_: InputMaybe; + exAntes_: InputMaybe; + exPosts_: InputMaybe; + id: InputMaybe; + id_contains: InputMaybe; + id_gt: InputMaybe; + id_gte: InputMaybe; + id_in: InputMaybe>; + id_lt: InputMaybe; + id_lte: InputMaybe; + id_not: InputMaybe; + id_not_contains: InputMaybe; + id_not_in: InputMaybe>; + or: InputMaybe>>; + projectAddress: InputMaybe; + projectAddress_contains: InputMaybe; + projectAddress_gt: InputMaybe; + projectAddress_gte: InputMaybe; + projectAddress_in: InputMaybe>; + projectAddress_lt: InputMaybe; + projectAddress_lte: InputMaybe; + projectAddress_not: InputMaybe; + projectAddress_not_contains: InputMaybe; + projectAddress_not_in: InputMaybe>; + projectId: InputMaybe; + projectId_gt: InputMaybe; + projectId_gte: InputMaybe; + projectId_in: InputMaybe>; + projectId_lt: InputMaybe; + projectId_lte: InputMaybe; + projectId_not: InputMaybe; + projectId_not_in: InputMaybe>; + projectName: InputMaybe; + projectName_contains: InputMaybe; + projectName_contains_nocase: InputMaybe; + projectName_ends_with: InputMaybe; + projectName_ends_with_nocase: InputMaybe; + projectName_gt: InputMaybe; + projectName_gte: InputMaybe; + projectName_in: InputMaybe>; + projectName_lt: InputMaybe; + projectName_lte: InputMaybe; + projectName_not: InputMaybe; + projectName_not_contains: InputMaybe; + projectName_not_contains_nocase: InputMaybe; + projectName_not_ends_with: InputMaybe; + projectName_not_ends_with_nocase: InputMaybe; + projectName_not_in: InputMaybe>; + projectName_not_starts_with: InputMaybe; + projectName_not_starts_with_nocase: InputMaybe; + projectName_starts_with: InputMaybe; + projectName_starts_with_nocase: InputMaybe; + retirementCertificates_: InputMaybe; + transactionHash: InputMaybe; + transactionHash_contains: InputMaybe; + transactionHash_gt: InputMaybe; + transactionHash_gte: InputMaybe; + transactionHash_in: InputMaybe>; + transactionHash_lt: InputMaybe; + transactionHash_lte: InputMaybe; + transactionHash_not: InputMaybe; + transactionHash_not_contains: InputMaybe; + transactionHash_not_in: InputMaybe>; +}; + +export enum Project_OrderBy { + blockNumber = 'blockNumber', + blockTimestamp = 'blockTimestamp', + cancellations = 'cancellations', + exAntes = 'exAntes', + exPosts = 'exPosts', + id = 'id', + projectAddress = 'projectAddress', + projectId = 'projectId', + projectName = 'projectName', + retirementCertificates = 'retirementCertificates', + transactionHash = 'transactionHash' +} + +export type Query = { + __typename?: 'Query'; + /** Access to subgraph metadata */ + _meta: Maybe<_Meta_>; + cancellation: Maybe; + cancellations: Array; + exAnte: Maybe; + exAnteHolder: Maybe; + exAnteHolders: Array; + exAntes: Array; + exPost: Maybe; + exPostHolder: Maybe; + exPostHolders: Array; + exPosts: Array; + holder: Maybe; + holders: Array; + project: Maybe; + projects: Array; + retirementCertificate: Maybe; + retirementCertificates: Array; +}; + + +export type Query_MetaArgs = { + block: InputMaybe; +}; + + +export type QueryCancellationArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryCancellationsArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type QueryExAnteArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryExAnteHolderArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryExAnteHoldersArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type QueryExAntesArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type QueryExPostArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryExPostHolderArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryExPostHoldersArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type QueryExPostsArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type QueryHolderArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryHoldersArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type QueryProjectArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryProjectsArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type QueryRetirementCertificateArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryRetirementCertificatesArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + +export type RetirementCertificate = { + __typename?: 'RetirementCertificate'; + amount: Scalars['BigInt']; + createdAt: Scalars['BigInt']; + exPost: ExPost; + holder: Holder; + id: Scalars['Bytes']; + project: Project; + retiree: Holder; + serialization: Scalars['String']; + tokenId: Scalars['BigInt']; + transactionHash: Scalars['Bytes']; +}; + +export type RetirementCertificate_Filter = { + /** Filter for the block changed event. */ + _change_block: InputMaybe; + amount: InputMaybe; + amount_gt: InputMaybe; + amount_gte: InputMaybe; + amount_in: InputMaybe>; + amount_lt: InputMaybe; + amount_lte: InputMaybe; + amount_not: InputMaybe; + amount_not_in: InputMaybe>; + and: InputMaybe>>; + createdAt: InputMaybe; + createdAt_gt: InputMaybe; + createdAt_gte: InputMaybe; + createdAt_in: InputMaybe>; + createdAt_lt: InputMaybe; + createdAt_lte: InputMaybe; + createdAt_not: InputMaybe; + createdAt_not_in: InputMaybe>; + exPost: InputMaybe; + exPost_: InputMaybe; + exPost_contains: InputMaybe; + exPost_contains_nocase: InputMaybe; + exPost_ends_with: InputMaybe; + exPost_ends_with_nocase: InputMaybe; + exPost_gt: InputMaybe; + exPost_gte: InputMaybe; + exPost_in: InputMaybe>; + exPost_lt: InputMaybe; + exPost_lte: InputMaybe; + exPost_not: InputMaybe; + exPost_not_contains: InputMaybe; + exPost_not_contains_nocase: InputMaybe; + exPost_not_ends_with: InputMaybe; + exPost_not_ends_with_nocase: InputMaybe; + exPost_not_in: InputMaybe>; + exPost_not_starts_with: InputMaybe; + exPost_not_starts_with_nocase: InputMaybe; + exPost_starts_with: InputMaybe; + exPost_starts_with_nocase: InputMaybe; + holder: InputMaybe; + holder_: InputMaybe; + holder_contains: InputMaybe; + holder_contains_nocase: InputMaybe; + holder_ends_with: InputMaybe; + holder_ends_with_nocase: InputMaybe; + holder_gt: InputMaybe; + holder_gte: InputMaybe; + holder_in: InputMaybe>; + holder_lt: InputMaybe; + holder_lte: InputMaybe; + holder_not: InputMaybe; + holder_not_contains: InputMaybe; + holder_not_contains_nocase: InputMaybe; + holder_not_ends_with: InputMaybe; + holder_not_ends_with_nocase: InputMaybe; + holder_not_in: InputMaybe>; + holder_not_starts_with: InputMaybe; + holder_not_starts_with_nocase: InputMaybe; + holder_starts_with: InputMaybe; + holder_starts_with_nocase: InputMaybe; + id: InputMaybe; + id_contains: InputMaybe; + id_gt: InputMaybe; + id_gte: InputMaybe; + id_in: InputMaybe>; + id_lt: InputMaybe; + id_lte: InputMaybe; + id_not: InputMaybe; + id_not_contains: InputMaybe; + id_not_in: InputMaybe>; + or: InputMaybe>>; + project: InputMaybe; + project_: InputMaybe; + project_contains: InputMaybe; + project_contains_nocase: InputMaybe; + project_ends_with: InputMaybe; + project_ends_with_nocase: InputMaybe; + project_gt: InputMaybe; + project_gte: InputMaybe; + project_in: InputMaybe>; + project_lt: InputMaybe; + project_lte: InputMaybe; + project_not: InputMaybe; + project_not_contains: InputMaybe; + project_not_contains_nocase: InputMaybe; + project_not_ends_with: InputMaybe; + project_not_ends_with_nocase: InputMaybe; + project_not_in: InputMaybe>; + project_not_starts_with: InputMaybe; + project_not_starts_with_nocase: InputMaybe; + project_starts_with: InputMaybe; + project_starts_with_nocase: InputMaybe; + retiree: InputMaybe; + retiree_: InputMaybe; + retiree_contains: InputMaybe; + retiree_contains_nocase: InputMaybe; + retiree_ends_with: InputMaybe; + retiree_ends_with_nocase: InputMaybe; + retiree_gt: InputMaybe; + retiree_gte: InputMaybe; + retiree_in: InputMaybe>; + retiree_lt: InputMaybe; + retiree_lte: InputMaybe; + retiree_not: InputMaybe; + retiree_not_contains: InputMaybe; + retiree_not_contains_nocase: InputMaybe; + retiree_not_ends_with: InputMaybe; + retiree_not_ends_with_nocase: InputMaybe; + retiree_not_in: InputMaybe>; + retiree_not_starts_with: InputMaybe; + retiree_not_starts_with_nocase: InputMaybe; + retiree_starts_with: InputMaybe; + retiree_starts_with_nocase: InputMaybe; + serialization: InputMaybe; + serialization_contains: InputMaybe; + serialization_contains_nocase: InputMaybe; + serialization_ends_with: InputMaybe; + serialization_ends_with_nocase: InputMaybe; + serialization_gt: InputMaybe; + serialization_gte: InputMaybe; + serialization_in: InputMaybe>; + serialization_lt: InputMaybe; + serialization_lte: InputMaybe; + serialization_not: InputMaybe; + serialization_not_contains: InputMaybe; + serialization_not_contains_nocase: InputMaybe; + serialization_not_ends_with: InputMaybe; + serialization_not_ends_with_nocase: InputMaybe; + serialization_not_in: InputMaybe>; + serialization_not_starts_with: InputMaybe; + serialization_not_starts_with_nocase: InputMaybe; + serialization_starts_with: InputMaybe; + serialization_starts_with_nocase: InputMaybe; + tokenId: InputMaybe; + tokenId_gt: InputMaybe; + tokenId_gte: InputMaybe; + tokenId_in: InputMaybe>; + tokenId_lt: InputMaybe; + tokenId_lte: InputMaybe; + tokenId_not: InputMaybe; + tokenId_not_in: InputMaybe>; + transactionHash: InputMaybe; + transactionHash_contains: InputMaybe; + transactionHash_gt: InputMaybe; + transactionHash_gte: InputMaybe; + transactionHash_in: InputMaybe>; + transactionHash_lt: InputMaybe; + transactionHash_lte: InputMaybe; + transactionHash_not: InputMaybe; + transactionHash_not_contains: InputMaybe; + transactionHash_not_in: InputMaybe>; +}; + +export enum RetirementCertificate_OrderBy { + amount = 'amount', + createdAt = 'createdAt', + exPost = 'exPost', + exPost__cancelledAmount = 'exPost__cancelledAmount', + exPost__estimatedAmount = 'exPost__estimatedAmount', + exPost__id = 'exPost__id', + exPost__lastVerificationTimestamp = 'exPost__lastVerificationTimestamp', + exPost__retiredAmount = 'exPost__retiredAmount', + exPost__serialization = 'exPost__serialization', + exPost__supply = 'exPost__supply', + exPost__tokenId = 'exPost__tokenId', + exPost__verificationPeriodEnd = 'exPost__verificationPeriodEnd', + exPost__verificationPeriodStart = 'exPost__verificationPeriodStart', + exPost__vintage = 'exPost__vintage', + holder = 'holder', + holder__address = 'holder__address', + holder__cancelledAmount = 'holder__cancelledAmount', + holder__id = 'holder__id', + holder__retiredAmount = 'holder__retiredAmount', + id = 'id', + project = 'project', + project__blockNumber = 'project__blockNumber', + project__blockTimestamp = 'project__blockTimestamp', + project__id = 'project__id', + project__projectAddress = 'project__projectAddress', + project__projectId = 'project__projectId', + project__projectName = 'project__projectName', + project__transactionHash = 'project__transactionHash', + retiree = 'retiree', + retiree__address = 'retiree__address', + retiree__cancelledAmount = 'retiree__cancelledAmount', + retiree__id = 'retiree__id', + retiree__retiredAmount = 'retiree__retiredAmount', + serialization = 'serialization', + tokenId = 'tokenId', + transactionHash = 'transactionHash' +} + +export type Subscription = { + __typename?: 'Subscription'; + /** Access to subgraph metadata */ + _meta: Maybe<_Meta_>; + cancellation: Maybe; + cancellations: Array; + exAnte: Maybe; + exAnteHolder: Maybe; + exAnteHolders: Array; + exAntes: Array; + exPost: Maybe; + exPostHolder: Maybe; + exPostHolders: Array; + exPosts: Array; + holder: Maybe; + holders: Array; + project: Maybe; + projects: Array; + retirementCertificate: Maybe; + retirementCertificates: Array; +}; + + +export type Subscription_MetaArgs = { + block: InputMaybe; +}; + + +export type SubscriptionCancellationArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionCancellationsArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type SubscriptionExAnteArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionExAnteHolderArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionExAnteHoldersArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type SubscriptionExAntesArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type SubscriptionExPostArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionExPostHolderArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionExPostHoldersArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type SubscriptionExPostsArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type SubscriptionHolderArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionHoldersArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type SubscriptionProjectArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionProjectsArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + + +export type SubscriptionRetirementCertificateArgs = { + block: InputMaybe; + id: Scalars['ID']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionRetirementCertificatesArgs = { + block: InputMaybe; + first?: InputMaybe; + orderBy: InputMaybe; + orderDirection: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where: InputMaybe; +}; + +export type _Block_ = { + __typename?: '_Block_'; + /** The hash of the block */ + hash: Maybe; + /** The block number */ + number: Scalars['Int']; + /** Integer representation of the timestamp stored in blocks for the chain */ + timestamp: Maybe; +}; + +/** The type for the top-level _meta field */ +export type _Meta_ = { + __typename?: '_Meta_'; + /** + * Information about a specific subgraph block. The hash of the block + * will be null if the _meta field has a block constraint that asks for + * a block number. It will be filled if the _meta field has no block constraint + * and therefore asks for the latest block + * + */ + block: _Block_; + /** The deployment ID */ + deployment: Scalars['String']; + /** If `true`, the subgraph encountered indexing errors at some past block */ + hasIndexingErrors: Scalars['Boolean']; +}; + +export enum _SubgraphErrorPolicy_ { + /** Data will be returned even if the subgraph has indexing errors */ + allow = 'allow', + /** If the subgraph has indexing errors, data will be omitted. The default. */ + deny = 'deny' +} + +export type IcrProjectFragmentFragment = { __typename?: 'Project', id: any, projectAddress: any, projectName: string, transactionHash: any }; + +export type ExPostAmountsFragmentFragment = { __typename?: 'ExPostHolder', id: any, amount: string, updatedAt: string, retiredAmount: string, exPost: { __typename?: 'ExPost', tokenId: string, vintage: string, serialization: string, project: { __typename?: 'Project', id: any, projectName: string } } }; + +export type ExPostFragmentFragment = { __typename?: 'ExPost', tokenId: string, vintage: string, serialization: string, project: { __typename?: 'Project', id: any, projectName: string } }; + +export type GetExPostInfoViaSerializationQueryVariables = Exact<{ + serialization: Scalars['String']; +}>; + + +export type GetExPostInfoViaSerializationQuery = { __typename?: 'Query', exPosts: Array<{ __typename?: 'ExPost', serialization: string, supply: string, retiredAmount: string, estimatedAmount: string, cancelledAmount: string, id: any, lastVerificationTimestamp: string, tokenId: string, verificationPeriodEnd: string, verificationPeriodStart: string, vintage: string, project: { __typename?: 'Project', id: any, projectAddress: any, projectName: string, transactionHash: any } }> }; + +export type GetHoldingsByAddressQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type GetHoldingsByAddressQuery = { __typename?: 'Query', holder: { __typename?: 'Holder', id: any, exPostAmounts: Array<{ __typename?: 'ExPostHolder', id: any, amount: string, updatedAt: string, retiredAmount: string, exPost: { __typename?: 'ExPost', tokenId: string, vintage: string, serialization: string, project: { __typename?: 'Project', id: any, projectName: string } } }> } | null }; + +export const IcrProjectFragmentFragmentDoc = gql` + fragment ICRProjectFragment on Project { + id + projectAddress + projectName + transactionHash +} + `; +export const ExPostFragmentFragmentDoc = gql` + fragment exPostFragment on ExPost { + tokenId + vintage + serialization + project { + id + projectName + } +} + `; +export const ExPostAmountsFragmentFragmentDoc = gql` + fragment exPostAmountsFragment on ExPostHolder { + id + amount + updatedAt + retiredAmount + exPost { + ...exPostFragment + } +} + ${ExPostFragmentFragmentDoc}`; +export const GetExPostInfoViaSerializationDocument = gql` + query getExPostInfoViaSerialization($serialization: String!) { + exPosts(where: {serialization: $serialization}) { + serialization + supply + retiredAmount + estimatedAmount + cancelledAmount + id + lastVerificationTimestamp + project { + ...ICRProjectFragment + } + tokenId + verificationPeriodEnd + verificationPeriodStart + vintage + } +} + ${IcrProjectFragmentFragmentDoc}`; +export const GetHoldingsByAddressDocument = gql` + query getHoldingsByAddress($id: ID!) { + holder(id: $id) { + id + exPostAmounts { + ...exPostAmountsFragment + } + } +} + ${ExPostAmountsFragmentFragmentDoc}`; + +export type SdkFunctionWrapper = (action: (requestHeaders?:Record) => Promise, operationName: string, operationType?: string) => Promise; + + +const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action(); + +export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) { + return { + getExPostInfoViaSerialization(variables: GetExPostInfoViaSerializationQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise { + return withWrapper((wrappedRequestHeaders) => client.request(GetExPostInfoViaSerializationDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'getExPostInfoViaSerialization', 'query'); + }, + getHoldingsByAddress(variables: GetHoldingsByAddressQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise { + return withWrapper((wrappedRequestHeaders) => client.request(GetHoldingsByAddressDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'getHoldingsByAddress', 'query'); + } + }; +} +export type Sdk = ReturnType; \ No newline at end of file diff --git a/carbonmark-api/src/app.constants.ts b/carbonmark-api/src/app.constants.ts index 1da6e2d804..d4126e7666 100644 --- a/carbonmark-api/src/app.constants.ts +++ b/carbonmark-api/src/app.constants.ts @@ -1,3 +1,5 @@ +import { NetworkParam } from "./models/NetworkParam.model"; + /** Adhere to JSONSchema spec by using a URI */ export const COMMON_SCHEMA_URI = "http://api.carbonmark.com/schemas"; @@ -14,11 +16,14 @@ const POLYGON_URLS = { assets: `${GRAPH_API_ROOT}/cujowolf/klima-refi-current-holdings`, tokens: `${GRAPH_API_ROOT}/klimadao/klimadao-pairs`, digitalCarbon: `${GRAPH_API_ROOT}/klimadao/polygon-digital-carbon`, + icr: `${GRAPH_API_ROOT}/skjaldbaka17/carbon-registry-polygon`, }; const MUMBAI_URLS = { ...POLYGON_URLS, + digitalCarbon: `${GRAPH_API_ROOT}/psparacino/digital-carbon`, marketplace: `${GRAPH_API_ROOT_ID}/QmUUnZTeRnfsJsQaTwLeiHmAQ5xvtk2jBW7VeP3AEW5bnv`, + icr: `${GRAPH_API_ROOT}/skjaldbaka17/carbon-registry-test`, }; /** Sanity URLS */ @@ -59,3 +64,51 @@ export const TOKEN_ADDRESSES = { export const RPC_URLS = { polygonTestnetRpc: "https://rpc-mumbai.maticvigil.com", }; + +/** Definitions of available registries */ +export const REGISTRIES = { + Verra: { + id: "VCS", + title: "Verra", + url: "https://registry.verra.org", + api: "https://registry.verra.org/uiapi", + }, + GoldStandard: { + id: "GS", + title: "Gold Standard", + url: "https://registry.goldstandard.org", + }, + ICR: { + id: "ICR", + title: "International Carbon Registry", + url: "https://www.carbonregistry.com", + }, +}; + +export const ICR_API = ( + network?: NetworkParam +): { ICR_API_URL: string; ICR_API_KEY: string } => { + const ICR_CONFIG = { + polygon: { + url: "https://api.carbonregistry.com/v0", + apiKey: process.env.ICR_MAINNET_API_KEY, + }, + mumbai: { + url: "https://gaia-api-dev.mojoflower.io/v0", + apiKey: process.env.ICR_MUMBAI_API_KEY, + }, + }; + + const VALIDATED_NETWORK: NetworkParam = + network === "polygon" || network === "mumbai" ? network : "polygon"; + + const API_CONFIG = ICR_CONFIG["polygon"]; + + if (!API_CONFIG.apiKey) { + throw new Error( + `ICR api key is undefined for network: ${VALIDATED_NETWORK}` + ); + } + + return { ICR_API_URL: API_CONFIG.url, ICR_API_KEY: API_CONFIG.apiKey }; +}; diff --git a/carbonmark-api/src/graphql/icr.fragments.gql b/carbonmark-api/src/graphql/icr.fragments.gql new file mode 100644 index 0000000000..bc308bc3ff --- /dev/null +++ b/carbonmark-api/src/graphql/icr.fragments.gql @@ -0,0 +1,26 @@ +fragment ICRProjectFragment on Project { + id + projectAddress + projectName + transactionHash +} + +fragment exPostAmountsFragment on ExPostHolder { + id + amount + updatedAt + retiredAmount + exPost { + ...exPostFragment + } +} + +fragment exPostFragment on ExPost { + tokenId + vintage + serialization + project { + id + projectName + } +} diff --git a/carbonmark-api/src/graphql/icr.gql b/carbonmark-api/src/graphql/icr.gql new file mode 100644 index 0000000000..ed82dd7bdb --- /dev/null +++ b/carbonmark-api/src/graphql/icr.gql @@ -0,0 +1,27 @@ +query getExPostInfoViaSerialization($serialization: String!) { + exPosts(where: { serialization: $serialization }) { + serialization + supply + retiredAmount + estimatedAmount + cancelledAmount + id + lastVerificationTimestamp + project { + ...ICRProjectFragment + } + tokenId + verificationPeriodEnd + verificationPeriodStart + vintage + } +} + +query getHoldingsByAddress($id: ID!) { + holder(id: $id) { + id + exPostAmounts { + ...exPostAmountsFragment + } + } +} diff --git a/carbonmark-api/src/models/Asset.model.ts b/carbonmark-api/src/models/Asset.model.ts index 46739b78ec..637a44d764 100644 --- a/carbonmark-api/src/models/Asset.model.ts +++ b/carbonmark-api/src/models/Asset.model.ts @@ -7,6 +7,7 @@ export const AssetModel = Type.Object({ name: Type.String(), symbol: Type.String(), decimals: Type.Number(), + tokenId: Type.Optional(Type.String()), }), amount: Type.String(), }); diff --git a/carbonmark-api/src/models/Project.model.ts b/carbonmark-api/src/models/Project.model.ts index da1011cf2a..0817ea56b8 100644 --- a/carbonmark-api/src/models/Project.model.ts +++ b/carbonmark-api/src/models/Project.model.ts @@ -41,6 +41,8 @@ export const ProjectModel = Type.Object({ ) ), hasSupply: Type.Boolean(), + tokenId: Type.Optional(Type.String()), + serialization: Type.Optional(Type.String()), }); export type Project = Static; diff --git a/carbonmark-api/src/models/Purchase.model.ts b/carbonmark-api/src/models/Purchase.model.ts index ca8ad50a45..afe73319e7 100644 --- a/carbonmark-api/src/models/Purchase.model.ts +++ b/carbonmark-api/src/models/Purchase.model.ts @@ -43,6 +43,9 @@ export const PurchaseModel = Type.Object({ vintage: Type.String({ examples: ["2008"], }), + serialization: Type.Optional( + Type.String({ examples: ["ICR-ISL-354-78040-14-R-0-2021"] }) + ), }), }), price: Type.String({ diff --git a/carbonmark-api/src/routes/activities/get.ts b/carbonmark-api/src/routes/activities/get.ts index 81299e2239..8549f07a70 100644 --- a/carbonmark-api/src/routes/activities/get.ts +++ b/carbonmark-api/src/routes/activities/get.ts @@ -17,9 +17,10 @@ const handler = (fastify: FastifyInstance) => }>, reply: FastifyReply ): Promise { + const network = request.query.network ?? "polygon"; return asResponse( reply, - await getActivities(fastify, request.query, request.query.network) + await getActivities(fastify, request.query, network) ); }; diff --git a/carbonmark-api/src/routes/countries/get.ts b/carbonmark-api/src/routes/countries/get.ts index 84429afa8b..728db3e4a8 100644 --- a/carbonmark-api/src/routes/countries/get.ts +++ b/carbonmark-api/src/routes/countries/get.ts @@ -9,9 +9,10 @@ const handler = ( ): RouteHandler<{ Querystring: Static }> => async function (request, reply) { let response; - const sdk = gql_sdk(request.query.network); + const network = request.query.network ?? "polygon"; + const sdk = gql_sdk(network); try { - response = await getAllCountries(sdk, fastify); + response = await getAllCountries(sdk, fastify, network); } catch (error) { //Return bad gateway and pass the error console.error(error); diff --git a/carbonmark-api/src/routes/projects/[id]/activity/get.ts b/carbonmark-api/src/routes/projects/[id]/activity/get.ts index 3f86d26872..5749121b56 100644 --- a/carbonmark-api/src/routes/projects/[id]/activity/get.ts +++ b/carbonmark-api/src/routes/projects/[id]/activity/get.ts @@ -19,9 +19,11 @@ const handler = (fastify: FastifyInstance) => reply: FastifyReply ): Promise { request.query.projectId = [request.params.id]; + + const network = request.query.network ?? "polygon"; return asResponse( reply, - await getActivities(fastify, request.query, request.query.network) + await getActivities(fastify, request.query, network) ); }; diff --git a/carbonmark-api/src/routes/projects/get.ts b/carbonmark-api/src/routes/projects/get.ts index 77eb7e405a..c0efb74601 100644 --- a/carbonmark-api/src/routes/projects/get.ts +++ b/carbonmark-api/src/routes/projects/get.ts @@ -42,7 +42,7 @@ const handler = (fastify: FastifyInstance) => ); //Get the default args to return all results unless specified - const allOptions = await getDefaultQueryArgs(sdk, fastify); + const allOptions = await getDefaultQueryArgs(sdk, fastify, network); const [ marketplaceProjectsData, diff --git a/carbonmark-api/src/routes/projects/get.utils.ts b/carbonmark-api/src/routes/projects/get.utils.ts index 5168164750..fb027f1f0b 100644 --- a/carbonmark-api/src/routes/projects/get.utils.ts +++ b/carbonmark-api/src/routes/projects/get.utils.ts @@ -1,6 +1,7 @@ import { FastifyInstance } from "fastify"; import { compact, isNil, max, maxBy } from "lodash"; import { concat, map, mapValues, min, pipe, trim, uniq } from "lodash/fp"; +import { NetworkParam } from "src/models/NetworkParam.model"; import { TokenPriceT } from "src/models/TokenPrice.model"; import { Geopoint } from "../../.generated/types/cms.types"; import { @@ -41,15 +42,16 @@ import { formatListings } from "../../utils/marketplace.utils"; * # this will cause a silent error. GQL Resolver needs to be updated to allow null search params * # to return all possible values */ + export const getDefaultQueryArgs = async ( sdk: GQL_SDK, - fastify: FastifyInstance + fastify: FastifyInstance, + network: NetworkParam ) => { - //Fetch all possible parameter values const [category, country, vintage] = await Promise.all([ getAllCategories(sdk, fastify).then(map(extract("id"))), - getAllCountries(sdk, fastify).then(map(extract("id"))), - getAllVintages(sdk, fastify), + getAllCountries(sdk, fastify, network).then(map(extract("id"))), + getAllVintages(sdk, fastify, network), ]); return { @@ -113,7 +115,7 @@ export const buildProjectEntry = (props: { poolProject?: GetProjectCreditsQuery["carbonProjects"][0]; cmsProject?: CarbonProject; allPoolPrices: Record; - network: "polygon" | "mumbai" | undefined; + network: NetworkParam | undefined; minSupply: number; }): Project => { const credits = props.poolProject?.carbonCredits; @@ -219,7 +221,7 @@ export const composeProjectEntries = ( projectDataMap: ProjectDataMap, cmsDataMap: CMSDataMap, allPoolPrices: Record, - network: "polygon" | "mumbai" | undefined, + network: NetworkParam | undefined, minSupply: number ): Project[] => { const entries: Project[] = []; @@ -243,5 +245,6 @@ export const composeProjectEntries = ( // TODO: Maybe this should be controlled via a query parameter if (project.hasSupply) entries.push(project); }); + return entries; }; diff --git a/carbonmark-api/src/routes/purchases/[id]/get.ts b/carbonmark-api/src/routes/purchases/[id]/get.ts index 33736b1b4b..9d7054d8d6 100644 --- a/carbonmark-api/src/routes/purchases/[id]/get.ts +++ b/carbonmark-api/src/routes/purchases/[id]/get.ts @@ -15,9 +15,11 @@ const handler = async ( if (!isValidPurchaseId(request.params.id)) { return reply.badRequest("Invalid purchase id: " + request.params.id); } - const sdk = gql_sdk(request.query.network); - const { purchase } = await sdk.marketplace.getPurchaseById(request.params); + const network = request.query.network ?? "polygon"; + + const sdk = gql_sdk(network); + const { purchase } = await sdk.marketplace.getPurchaseById(request.params); /** Handle the not found case */ if (isNil(purchase)) { return reply.status(404).send({ error: "Purchase not found" }); diff --git a/carbonmark-api/src/routes/purchases/get.utils.ts b/carbonmark-api/src/routes/purchases/get.utils.ts index 297892091e..1751759817 100644 --- a/carbonmark-api/src/routes/purchases/get.utils.ts +++ b/carbonmark-api/src/routes/purchases/get.utils.ts @@ -17,7 +17,9 @@ export const composePurchaseModel = ( const [, registryProjectId] = CreditId.splitProjectId(project.key); return { id: purchase.id, - amount: utils.formatUnits(purchase.amount, 18), + amount: purchase.listing.project.key.startsWith("ICR") + ? purchase.amount + : utils.formatUnits(purchase.amount, 18), price: utils.formatUnits(purchase.price, 6), listing: { id: purchase.listing.id, diff --git a/carbonmark-api/src/routes/users/[walletOrHandle]/get.ts b/carbonmark-api/src/routes/users/[walletOrHandle]/get.ts index 141d742ab9..ba36f03897 100644 --- a/carbonmark-api/src/routes/users/[walletOrHandle]/get.ts +++ b/carbonmark-api/src/routes/users/[walletOrHandle]/get.ts @@ -30,6 +30,7 @@ const handler = (fastify: FastifyInstance) => try { const { query, params } = request; + const network = query.network ?? "polygon"; const walletOrHandle = params.walletOrHandle.toLowerCase(); // Fetch the firebase UserProfile first @@ -53,12 +54,12 @@ const handler = (fastify: FastifyInstance) => const [user, assets] = await Promise.all([ getUserByWallet({ address: profile.address, - network: query.network, + network: network, expiresAfter: query.expiresAfter, }), getHoldingsByWallet({ address: profile.address, - network: query.network, + network: network, }), ]); @@ -83,9 +84,13 @@ const handler = (fastify: FastifyInstance) => }; return { ...a, - amount: utils.formatUnits(a.amount || "0", 18), + amount: a.project.key.startsWith("ICR") + ? a.amount + : utils.formatUnits(a.amount || "0", 18), price: utils.formatUnits(a.price || "0", 6), - previousAmount: utils.formatUnits(a.previousAmount || "0", 18), + previousAmount: a.project.key.startsWith("ICR") + ? a.previousAmount + : utils.formatUnits(a.previousAmount || "0", 18), previousPrice: utils.formatUnits(a.previousPrice || "0", 6), buyer: buyer || null, seller: seller || null, diff --git a/carbonmark-api/src/routes/users/[walletOrHandle]/get.utils.ts b/carbonmark-api/src/routes/users/[walletOrHandle]/get.utils.ts index 1e76f7cfc3..859646b209 100644 --- a/carbonmark-api/src/routes/users/[walletOrHandle]/get.utils.ts +++ b/carbonmark-api/src/routes/users/[walletOrHandle]/get.utils.ts @@ -1,12 +1,15 @@ import { Contract, providers, utils } from "ethers"; import { compact, sortBy, sortedUniq } from "lodash"; import { pipe } from "lodash/fp"; +import { createICRProjectID } from "../../../../src/utils/ICR/icr.utils"; import ERC20 from "../../../abis/ERC20.json"; import { RPC_URLS } from "../../../app.constants"; import { NetworkParam } from "../../../models/NetworkParam.model"; import { Holding } from "../../../types/assets.types"; import { gql_sdk } from "../../../utils/gqlSdk"; +type MultipleTokenStandardType = Holding & { token: { tokenId?: string } }; + const formatHolding = (h: Holding): Holding => { return { ...h, @@ -14,17 +17,34 @@ const formatHolding = (h: Holding): Holding => { }; }; +const mapICRInfo = (item: Record) => { + return { + id: item.exPost.serialization, + amount: item.amount, + token: { + decimals: 0, + id: item.exPost.project.id, + name: item.exPost.project.projectName, + symbol: `${createICRProjectID(item.exPost.serialization)}-${ + item.exPost.vintage + }`, + tokenId: item.exPost.tokenId, + }, + }; +}; + /** Hacky Mumbai simulation for known testnet assets * until we get a testnet version of polygon-digital-carbon */ const fetchTestnetHoldings = async (params: { address: string; }): Promise => { const provider = new providers.JsonRpcProvider(RPC_URLS.polygonTestnetRpc); + const sdk = gql_sdk("mumbai"); // we hardcode known testnet tokens here const TOKEN_INFO = [ { symbol: "TCO2-VCS-981-2017", - address: "0xeCF4A1B92a463C843CDcB7cb7A2F2DdFe07651BB", + address: "0xecf4a1b92a463c843cdcb7cb7a2f2ddfe07651bb", decimals: 18, }, { @@ -43,23 +63,47 @@ const fetchTestnetHoldings = async (params: { decimals: 18, }, ]; + const balancePromises = TOKEN_INFO.map((tco2) => new Contract(tco2.address, ERC20, provider).balanceOf(params.address) ); - const tco2Balances: bigint[] = await Promise.all(balancePromises); - const holdings: Holding[] = tco2Balances.map((balance, i) => { - return { - amount: balance.toString(), - id: `0x_mock_holding_id_${i}`, - token: { - decimals: 18, - id: TOKEN_INFO.at(i)?.address ?? "", - name: TOKEN_INFO.at(i)?.symbol ?? "", - symbol: TOKEN_INFO.at(i)?.symbol ?? "", - }, - }; + + const fetchTco2Balances = Promise.all(balancePromises); + const fetchIcrHoldings = sdk.icr.getHoldingsByAddress({ + id: params.address, }); - return holdings.map(formatHolding).filter((h) => Number(h.amount) > 0); + + const [tco2Balances, IcrBalances] = await Promise.all([ + fetchTco2Balances, + fetchIcrHoldings, + ]); + + const tco2Holdings: MultipleTokenStandardType[] = tco2Balances.map( + (balance, i) => { + return { + amount: balance.toString(), + id: `0x_mock_holding_id_${i}`, + token: { + decimals: 18, + id: TOKEN_INFO.at(i)?.address ?? "", + name: TOKEN_INFO.at(i)?.symbol ?? "", + symbol: TOKEN_INFO.at(i)?.symbol ?? "", + }, + }; + } + ); + + let icrHoldings: MultipleTokenStandardType[] = []; + if (IcrBalances.holder?.exPostAmounts) { + icrHoldings = IcrBalances.holder.exPostAmounts + .filter((item) => Number(item.amount) > 0) + .map(mapICRInfo); + } + + const combinedHoldings = [...tco2Holdings, ...icrHoldings]; + return combinedHoldings + .map(formatHolding) + .filter((h) => Number(h.amount) > 0); }; /** Network-aware fetcher for marketplace user data (listings and activities) */ @@ -89,12 +133,40 @@ export const getHoldingsByWallet = async (params: { address: params.address, }); } + const sdk = gql_sdk(params.network); - // TODO: should be `polygon-digital-carbon` instead of `assets` subgraph - const { accounts } = await sdk.assets.getHoldingsByWallet({ - wallet: params.address, - }); - return accounts.at(0)?.holdings.map(formatHolding) ?? []; + // @todo : should be `polygon-digital-carbon` instead of `assets` subgraph + try { + const holdingsPromise = sdk.assets.getHoldingsByWallet({ + wallet: params.address, + }); + // @todo need to have ICR fetch for mainnet + const icrHoldingsPromise = sdk.icr.getHoldingsByAddress({ + id: params.address, + }); + + const [holdingsResponse, IcrHoldingsResponse] = await Promise.all([ + holdingsPromise, + icrHoldingsPromise, + ]); + + let icrHoldings: MultipleTokenStandardType[] = []; + + if (IcrHoldingsResponse.holder?.exPostAmounts) { + icrHoldings = IcrHoldingsResponse.holder.exPostAmounts + .filter((item) => Number(item.amount) > 0) + .map(mapICRInfo); + } + + const assetsHoldings = holdingsResponse.accounts.at(0)?.holdings ?? []; + + const allHoldings = [...assetsHoldings, ...icrHoldings]; + + return allHoldings.map(formatHolding) ?? []; + } catch (error) { + console.error("Error fetching holdings:", error); + return []; + } }; /** Reduce an array of activities into a deduplicated sorted array of buyer and seller address strings. */ diff --git a/carbonmark-api/src/routes/vintages/get.ts b/carbonmark-api/src/routes/vintages/get.ts index 6d9de816c2..d7363397f6 100644 --- a/carbonmark-api/src/routes/vintages/get.ts +++ b/carbonmark-api/src/routes/vintages/get.ts @@ -10,9 +10,10 @@ const handler = (fastify: FastifyInstance) => reply: FastifyReply ) { let response: Vintage[]; - const sdk = gql_sdk(request.query.network); + const network = request.query.network ?? "polygon"; + const sdk = gql_sdk(network); try { - response = await getAllVintages(sdk, fastify); + response = await getAllVintages(sdk, fastify, network); } catch (error) { //Return bad gateway and pass the error console.error(error); diff --git a/carbonmark-api/src/utils/CreditId.ts b/carbonmark-api/src/utils/CreditId.ts index 6e80fd8e3d..ae1de37a3e 100644 --- a/carbonmark-api/src/utils/CreditId.ts +++ b/carbonmark-api/src/utils/CreditId.ts @@ -1,7 +1,7 @@ import { includes } from "lodash"; import { notNil } from "./functional.utils"; -const standards = ["VCS", "PURO", "ICR"] as const; +const standards = ["VCS", "PURO", "ICR", "GS"] as const; /** Known supported standards on-chain */ export type Standard = (typeof standards)[number]; diff --git a/carbonmark-api/src/utils/ICR/icr.utils.ts b/carbonmark-api/src/utils/ICR/icr.utils.ts new file mode 100644 index 0000000000..6aba1c49b6 --- /dev/null +++ b/carbonmark-api/src/utils/ICR/icr.utils.ts @@ -0,0 +1,46 @@ +import { isArray } from "lodash"; +import fetch from "node-fetch"; +import { NetworkParam } from "src/models/NetworkParam.model"; +import { ICR_API } from "../../../src/app.constants"; + +export const convertIcrCountryCodeToName = (code: string) => { + if (!code) return; + const regionNames = new Intl.DisplayNames(["en"], { type: "region" }); + const country = regionNames.of(code); + return country; +}; + +export const createICRProjectID = (serialization: string) => { + const elements = serialization.split("-"); + const registry = elements[0]; + const num = elements[3]; + return `${registry}-${num}`; +}; + +export const fetchIcrFilters = async (network: NetworkParam) => { + const { ICR_API_URL, ICR_API_KEY } = ICR_API(network); + + const url = `${ICR_API_URL}/public/projects/filters`; + const IcrResponse = await fetch(url, { + method: "GET", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${ICR_API_KEY}`, + }, + }); + + const { vintages: IcrVintages, countryCodes: IcrCountryCodes } = + await IcrResponse.json(); + + if (!isArray(IcrCountryCodes) || !isArray(IcrVintages)) { + throw new Error("Response from server did not match schema definition"); + } + + const countryNames = await Promise.all( + IcrCountryCodes.map((countryCode: string) => + convertIcrCountryCodeToName(countryCode) + ) + ); + + return { IcrVintages, countryNames }; +}; diff --git a/carbonmark-api/src/utils/gqlSdk.ts b/carbonmark-api/src/utils/gqlSdk.ts index a1c562edbd..89b33f4c3a 100644 --- a/carbonmark-api/src/utils/gqlSdk.ts +++ b/carbonmark-api/src/utils/gqlSdk.ts @@ -8,6 +8,7 @@ import { getSdk as digitalCarbonSdk, Sdk as DigitalCarbonSdk, } from "../.generated/types/digitalCarbon.types"; +import { getSdk as icrSdk, Sdk as IcrSdk } from "../.generated/types/icr.types"; import { getSdk as marketplaceSdk, Sdk as MarketplaceSdk, @@ -25,6 +26,7 @@ export type GQL_SDK = { tokens: TokensSdk; cms: CMSSdk; digital_carbon: DigitalCarbonSdk; + icr: IcrSdk; }; const sdks = { @@ -33,6 +35,7 @@ const sdks = { tokens: tokensSdk, cms: cmsSdk, digital_carbon: digitalCarbonSdk, + icr: icrSdk, }; export const gql_sdk = ( @@ -47,5 +50,6 @@ export const gql_sdk = ( new GraphQLClient(graph_urls.digitalCarbon) ), cms: sdks.cms(new GraphQLClient(SANITY_URLS.cms)), + icr: sdks.icr(new GraphQLClient(graph_urls.icr)), }; }; diff --git a/carbonmark-api/src/utils/helpers/activities.utils.ts b/carbonmark-api/src/utils/helpers/activities.utils.ts index b3b76c06f4..f3bfaaae6a 100644 --- a/carbonmark-api/src/utils/helpers/activities.utils.ts +++ b/carbonmark-api/src/utils/helpers/activities.utils.ts @@ -23,11 +23,18 @@ const mapUserToActivities = async ( previousPrice: activity.previousPrice ? utils.formatUnits(activity.previousPrice, 6) : null, - amount: activity.amount ? utils.formatUnits(activity.amount, 18) : null, + amount: activity.amount + ? activity.project.key.startsWith("ICR") + ? activity.amount + : utils.formatUnits(activity.amount, 18) + : null, previousAmount: activity.previousAmount - ? utils.formatUnits(activity.previousAmount, 18) + ? activity.project.key.startsWith("ICR") + ? activity.amount + : utils.formatUnits(activity.previousAmount, 18) : null, })); + const userIds = new Set(); formattedActivities.forEach((activity) => { if (activity.seller) { diff --git a/carbonmark-api/src/utils/helpers/getProjectPoolInfo.ts b/carbonmark-api/src/utils/helpers/getProjectPoolInfo.ts index f1508aa0c0..38f9e06497 100644 --- a/carbonmark-api/src/utils/helpers/getProjectPoolInfo.ts +++ b/carbonmark-api/src/utils/helpers/getProjectPoolInfo.ts @@ -93,7 +93,6 @@ export const getProjectPoolInfo = ( }), initialStats ); - // project bigNumber stats const stats: Stats = { totalBridged: parseFloat( @@ -106,6 +105,7 @@ export const getProjectPoolInfo = ( ethers.utils.formatUnits(bigNumberStats.totalSupply, 18) ), }; + const poolInfoMap = Object.keys(POOL_INFO).reduce>( (prevMap, poolName) => { const poolAddress = POOL_INFO[poolName].poolAddress; diff --git a/carbonmark-api/src/utils/helpers/utils.ts b/carbonmark-api/src/utils/helpers/utils.ts index 003ea25e9d..77fc697096 100644 --- a/carbonmark-api/src/utils/helpers/utils.ts +++ b/carbonmark-api/src/utils/helpers/utils.ts @@ -9,10 +9,13 @@ import { } from "../../.generated/types/marketplace.types"; import { CarbonOffset } from "../../.generated/types/offsets.types"; +import type { NetworkParam } from "../../../src/models/NetworkParam.model"; import { TOKEN_ADDRESSES } from "../../app.constants"; +import { fetchIcrFilters } from "../ICR/icr.utils"; import { extract, notEmptyOrNil } from "../functional.utils"; import { GQL_SDK } from "../gqlSdk"; import { CarbonProject } from "./cms.utils"; + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- unable to type environment variables const ENV = (process.env.VERCEL_ENV ?? "development") as | "development" @@ -22,7 +25,8 @@ const ENV = (process.env.VERCEL_ENV ?? "development") as // combines them, removes duplicates, and returns the result as a sorted array of strings. export async function getAllVintages( sdk: GQL_SDK, - fastify: FastifyInstance + fastify: FastifyInstance, + network: NetworkParam ): Promise { const uniqueValues = new Set(); const cacheKey = `vintages`; @@ -32,14 +36,22 @@ export async function getAllVintages( return cachedResult; } - const [{ projects }, { carbonProjects: digitalCarbonProjects }] = - await Promise.all([ - sdk.marketplace.getVintages(), - sdk.digital_carbon.getDigitalCarbonProjectsVintages(), - ]); + const [ + { projects }, + { carbonProjects: digitalCarbonProjects }, + { IcrVintages }, + ] = await Promise.all([ + sdk.marketplace.getVintages(), + sdk.digital_carbon.getDigitalCarbonProjectsVintages(), + fetchIcrFilters(network), + ]); /** Handle invalid responses */ - if (!isArray(projects) || !isArray(digitalCarbonProjects)) { + if ( + !isArray(projects) || + !isArray(digitalCarbonProjects) || + !isArray(IcrVintages) + ) { throw new Error("Response from server did not match schema definition"); } @@ -50,6 +62,7 @@ export async function getAllVintages( uniqueValues.add(credit.vintage.toString()); } }); + IcrVintages.forEach((item: string) => uniqueValues.add(item)); }); const result = Array.from(uniqueValues).sort().filter(notEmptyOrNil); @@ -116,7 +129,11 @@ export async function getAllCategories(sdk: GQL_SDK, fastify: FastifyInstance) { return result; } -export async function getAllCountries(sdk: GQL_SDK, fastify: FastifyInstance) { +export async function getAllCountries( + sdk: GQL_SDK, + fastify: FastifyInstance, + network: NetworkParam +) { const cacheKey = `countries`; const cachedResult = await fastify.lcache?.get(cacheKey)?.payload; @@ -125,14 +142,22 @@ export async function getAllCountries(sdk: GQL_SDK, fastify: FastifyInstance) { return cachedResult; } - const [{ countries }, { carbonProjects: digitalCarbonProjects }] = - await Promise.all([ - sdk.marketplace.getCountries(), - sdk.digital_carbon.getDigitalCarbonProjectsCountries(), - ]); + const [ + { countries: marketplaceCountries }, + { carbonProjects: digitalCarbonProjects }, + { countryNames: icrCountries }, + ] = await Promise.all([ + sdk.marketplace.getCountries(), + sdk.digital_carbon.getDigitalCarbonProjectsCountries(), + fetchIcrFilters(network), + ]); /** Handle invalid responses */ - if (!isArray(countries) || !isArray(digitalCarbonProjects)) { + if ( + !isArray(marketplaceCountries) || + !isArray(digitalCarbonProjects) || + !isArray(icrCountries) + ) { throw new Error("Response from server did not match schema definition"); } @@ -145,8 +170,9 @@ export async function getAllCountries(sdk: GQL_SDK, fastify: FastifyInstance) { ); const result: Country[] = fn([ - countries?.map(extract("id")), + marketplaceCountries?.map(extract("id")), digitalCarbonProjects.map(extract("country")), + icrCountries, ]); await fastify.lcache?.set(cacheKey, { payload: result }); diff --git a/carbonmark-api/src/utils/marketplace.utils.ts b/carbonmark-api/src/utils/marketplace.utils.ts index b73b691621..bfb08914a5 100644 --- a/carbonmark-api/src/utils/marketplace.utils.ts +++ b/carbonmark-api/src/utils/marketplace.utils.ts @@ -33,13 +33,26 @@ export type GetProjectListing = NonNullable< >[number]; /** Formats a gql.marketplace listing to match Listing.model, and formats integers */ + export const formatListing = (listing: GetProjectListing): ListingModel => { + const registry = listing.project.key.split("-")[0]; + return { ...formatGraphTimestamps(listing), - leftToSell: utils.formatUnits(listing.leftToSell, 18), + + leftToSell: + registry === "ICR" + ? listing.leftToSell + : utils.formatUnits(listing.leftToSell, 18), singleUnitPrice: utils.formatUnits(listing.singleUnitPrice, 6), - minFillAmount: utils.formatUnits(listing.minFillAmount, 18), - totalAmountToSell: utils.formatUnits(listing.totalAmountToSell, 18), + minFillAmount: + registry === "ICR" + ? listing.minFillAmount + : utils.formatUnits(listing.minFillAmount, 18), + totalAmountToSell: + registry === "ICR" + ? listing.totalAmountToSell + : utils.formatUnits(listing.totalAmountToSell, 18), expiration: Number(listing.expiration), project: { ...listing.project, diff --git a/carbonmark-api/test/fixtures/icr.ts b/carbonmark-api/test/fixtures/icr.ts new file mode 100644 index 0000000000..1b1966fdea --- /dev/null +++ b/carbonmark-api/test/fixtures/icr.ts @@ -0,0 +1,42 @@ +import { ExPostHolder } from "src/.generated/types/icr.types"; + +type DeepPartial = { + [P in keyof T]?: T[P] extends Array + ? Array> + : T[P] extends object + ? DeepPartial + : T[P]; +}; + +type PartialExPostHolder = DeepPartial; + +export const mockICRHolderResponse: PartialExPostHolder = { + holder: { + id: "0x1234abcd5678ef9012345678abcd9012ef345678", + exPostAmounts: [ + { + id: "0x1234abcd5678ef9012345678abcd9012ef3456789abcdef1234567890abcdef1234abcd5678ef90", + amount: "100", + updatedAt: "1702675170", + retiredAmount: "60", + exPost: { + tokenId: "10", + vintage: "2020", + serialization: "ICR-XYZ-123-45678-90-Q-0-2020", + project: { + id: "0x9abcdef1234567890abcdef1234567890abcdef12", + projectName: "Green Energy Initiative", + blockNumber: "52604627", + blockTimestamp: "1629820800", + }, + }, + }, + ], + }, +}; + +// ICR REST API result + +export const COUNTRY_CODES = ["CN", "ES", "GB", "IS", "UA", "VN"]; + +export const VINTAGES = ["2020", "2021", "2022", "2023"]; diff --git a/carbonmark-api/test/plugins/rate-limit.test.ts b/carbonmark-api/test/plugins/rate-limit.test.ts index d43048cab0..91639ffaba 100644 --- a/carbonmark-api/test/plugins/rate-limit.test.ts +++ b/carbonmark-api/test/plugins/rate-limit.test.ts @@ -3,7 +3,10 @@ import nock from "nock"; import { GRAPH_URLS } from "../../src/app.constants"; import { LIMIT } from "../../src/plugins/rate-limit"; import { build } from "../helper"; -import { mockMarketplaceArgs } from "../routes/projects/get.test.mocks"; +import { + mockICRFilters, + mockMarketplaceArgs, +} from "../routes/projects/get.test.mocks"; import { mock_fetch } from "../test.utils"; describe("Rate Limiter", () => { @@ -23,6 +26,7 @@ describe("Rate Limiter", () => { .persist(true); mockMarketplaceArgs(); + mockICRFilters(); //Because we are throwing errors in mock fetch we need to catch try { diff --git a/carbonmark-api/test/routes/countries/get.test.ts b/carbonmark-api/test/routes/countries/get.test.ts index 6a96eec632..72eb2a3d5d 100644 --- a/carbonmark-api/test/routes/countries/get.test.ts +++ b/carbonmark-api/test/routes/countries/get.test.ts @@ -1,14 +1,19 @@ import { FastifyInstance } from "fastify"; import nock from "nock"; -import { GRAPH_URLS } from "../../../src/app.constants"; +import { GRAPH_URLS, ICR_API } from "../../../src/app.constants"; +import { COUNTRY_CODES, VINTAGES } from "../../../test/fixtures/icr"; import { build } from "../../helper"; import { COUNTRIES, DEV_URL, ERROR } from "../../test.constants"; describe("GET /countries", () => { let fastify: FastifyInstance; + let ICR_API_URL: string; // Setup the server beforeEach(async () => { + const icrApiValues = ICR_API("polygon"); + ICR_API_URL = icrApiValues.ICR_API_URL; + fastify = await build(); nock.cleanAll(); }); @@ -30,18 +35,22 @@ describe("GET /countries", () => { .post("") .reply(200, { data: { carbonProjects: COUNTRIES } }); + nock(ICR_API_URL).persist().get("/public/projects/filters").reply(200, { + vintages: VINTAGES, + countryCodes: COUNTRY_CODES, + }); + const response = await fastify.inject({ method: "GET", url: `${DEV_URL}/countries`, }); const data = await response.json(); - expect(response.statusCode).toEqual(200); expect(data).toEqual(COUNTRIES); }); - /** An issue with one of the graph APIs */ + // /** An issue with one of the graph APIs */ test("Graph Error", async () => { nock(GRAPH_URLS["polygon"].marketplace) .post("") @@ -51,6 +60,11 @@ describe("GET /countries", () => { nock(GRAPH_URLS["polygon"].digitalCarbon).post("").reply(200, []); + nock(ICR_API_URL).persist().get("/public/projects/filters").reply(200, { + vintages: VINTAGES, + countryCodes: COUNTRY_CODES, + }); + const response = await fastify.inject({ method: "GET", url: `${DEV_URL}/countries`, @@ -69,6 +83,11 @@ describe("GET /countries", () => { .post("") .reply(200, { data: { carbonProjects: [] } }); + nock(ICR_API_URL).persist().get("/public/projects/filters").reply(200, { + vintages: [], + countryCodes: [], + }); + const response = await fastify.inject({ method: "GET", url: `${DEV_URL}/countries`, @@ -76,6 +95,7 @@ describe("GET /countries", () => { expect(response.statusCode).toBe(200); const data = await response.json(); + expect(data).toEqual([]); }); @@ -88,6 +108,11 @@ describe("GET /countries", () => { .post("") .reply(200, { data: { carbonProjects: "invalid data" } }); + nock(ICR_API_URL).persist().get("/public/projects/filters").reply(200, { + vintages: "invalid data", + countryCodes: "invalid data", + }); + const response = await fastify.inject({ method: "GET", url: `${DEV_URL}/countries`, diff --git a/carbonmark-api/test/routes/projects/[id]/get.test.ts b/carbonmark-api/test/routes/projects/[id]/get.test.ts index f3c439d852..fb0c16408e 100644 --- a/carbonmark-api/test/routes/projects/[id]/get.test.ts +++ b/carbonmark-api/test/routes/projects/[id]/get.test.ts @@ -22,6 +22,11 @@ describe("GET /projects/:id", () => { console.error("/projects/:id get.test.ts setup failed", e); } }); + + afterEach(async () => { + nock.cleanAll(); + }); + test("Returns project from CMS without prices or listings", async () => { nock(SANITY_URLS.cms) .post("") @@ -50,6 +55,7 @@ describe("GET /projects/:id", () => { activities: mockActivities, }, }); + const response = await fastify.inject({ method: "GET", url: `${DEV_URL}/projects/VCS-191-2008`, @@ -92,11 +98,17 @@ describe("GET /projects/:id", () => { activities: fixtures.marketplace.activities, }, }); + + nock(GRAPH_URLS["mumbai"].marketplace).post("").reply(200, { + data: {}, + }); + const response = await fastify.inject({ method: "GET", url: `${DEV_URL}/projects/VCS-191-2008?network=polygon`, }); const project = await response.json(); + expect(response.statusCode).toEqual(200); expect(project.prices).toHaveLength(1); expect(project.prices[0].singleUnitBuyPrice).toBe("0.358940"); @@ -133,6 +145,10 @@ describe("GET /projects/:id", () => { activities: fixtures.marketplace.activities, }, }); + + nock(GRAPH_URLS["mumbai"].marketplace).post("").reply(200, { + data: {}, + }); const response = await fastify.inject({ method: "GET", url: `${DEV_URL}/projects/VCS-981-2017`, diff --git a/carbonmark-api/test/routes/projects/get.test.mocks.ts b/carbonmark-api/test/routes/projects/get.test.mocks.ts index fb0d97f214..2338e7f6fb 100644 --- a/carbonmark-api/test/routes/projects/get.test.mocks.ts +++ b/carbonmark-api/test/routes/projects/get.test.mocks.ts @@ -5,7 +5,8 @@ import { } from "src/.generated/types/cms.types"; import { CarbonProject } from "src/.generated/types/digitalCarbon.types"; import { Project } from "src/.generated/types/marketplace.types"; -import { GRAPH_URLS, SANITY_URLS } from "../../../src/app.constants"; +import { GRAPH_URLS, ICR_API, SANITY_URLS } from "../../../src/app.constants"; +import { COUNTRY_CODES, VINTAGES } from "../../../test/fixtures/icr"; import { fixtures } from "../../fixtures"; /** @@ -14,6 +15,8 @@ import { fixtures } from "../../fixtures"; */ let cmsInterceptor: Interceptor; +const ICR_API_URL = ICR_API("polygon").ICR_API_URL; + export const mockCms = (overrides?: { projects?: CMSProject[]; content?: CMSProjectContent[]; @@ -38,6 +41,12 @@ export const mockCms = (overrides?: { }); }; +export const mockICRFilters = () => + nock(ICR_API_URL).persist().get("/public/projects/filters").reply(200, { + vintages: VINTAGES, + countryCodes: COUNTRY_CODES, + }); + export const mockTokens = () => nock(GRAPH_URLS["polygon"].tokens) .post("", (body) => body.query.includes("getPoolPrices")) @@ -45,7 +54,7 @@ export const mockTokens = () => data: { prices: fixtures.tokens.prices }, }); -export const mockDigitalCarbonProjects = (override?: CarbonProject[]) => +export const mockDigitalCarbonProjects = (override?: CarbonProject[]) => { nock(GRAPH_URLS["polygon"].digitalCarbon) .post("", (body) => body.query.includes("findDigitalCarbonProjects")) .reply(200, { @@ -55,6 +64,7 @@ export const mockDigitalCarbonProjects = (override?: CarbonProject[]) => ], }, }); +}; export const mockDigitalCarbonArgs = () => nock(GRAPH_URLS["polygon"].digitalCarbon) @@ -136,15 +146,21 @@ export const mockDigitalCarbonArgs = () => }, }); -export const mockMarketplaceProjects = (override?: Project[]) => +export const mockMarketplaceProjects = (override?: Project[]) => { nock(GRAPH_URLS["polygon"].marketplace) .post("", (body) => body.query.includes("getProjects")) .reply(200, { data: { projects: override ?? [fixtures.marketplace.projectWithListing] }, }); + nock(GRAPH_URLS["mumbai"].marketplace) + .post("") + .reply(200, { + data: { projects: [fixtures.marketplace.projectWithListing] }, + }); +}; //Mocks all categories, countries and vintages -export const mockMarketplaceArgs = () => +export const mockMarketplaceArgs = () => { nock(GRAPH_URLS["polygon"].marketplace) .post("", (body) => body.query.includes("getCategories")) .reply(200, { @@ -245,3 +261,4 @@ export const mockMarketplaceArgs = () => ], }, }); +}; diff --git a/carbonmark-api/test/routes/projects/get.test.ts b/carbonmark-api/test/routes/projects/get.test.ts index 62b6572df6..968ee05d89 100644 --- a/carbonmark-api/test/routes/projects/get.test.ts +++ b/carbonmark-api/test/routes/projects/get.test.ts @@ -24,6 +24,7 @@ import { mockCms, mockDigitalCarbonArgs, mockDigitalCarbonProjects, + mockICRFilters, mockMarketplaceArgs, mockMarketplaceProjects, mockTokens, @@ -78,7 +79,9 @@ const expectedImages = mockCmsProjectContent.images?.map((img) => ({ describe("GET /projects", () => { let fastify: FastifyInstance; - afterEach(async () => await fastify.close()); + afterEach(async () => { + await fastify.close(); + }); // Setup the server beforeEach(async () => { @@ -88,6 +91,7 @@ describe("GET /projects", () => { // Setup default mocks beforeEach(async () => { mockMarketplaceArgs(); + mockICRFilters(); mockDigitalCarbonArgs(); mockTokens(); mockCms({ @@ -105,6 +109,7 @@ describe("GET /projects", () => { method: "GET", url: `${DEV_URL}/projects`, }); + expect(response.statusCode).toEqual(200); }); @@ -177,7 +182,7 @@ describe("GET /projects", () => { test("Composes a marketplace project", async () => { mockMarketplaceProjects(); - //No digital carbon projects + // //No digital carbon projects nock(GRAPH_URLS["polygon"].digitalCarbon) .post("") .reply(200, { data: { carbonProjects: [] } }); @@ -293,6 +298,10 @@ describe("GET /projects", () => { describe("Supply filtering", () => { let projects: Project[]; + beforeEach(() => { + mockICRFilters(); + }); + test("No filtering when supply greater than 0 (DigitalCarbon)", async () => { mockMarketplaceProjects([]); //Return two projects with supply @@ -365,6 +374,11 @@ describe("GET /projects", () => { describe("Duplicate filtering", () => { const duplicateMarketplaceProject = cloneDeep(mockMarketplaceProject); const duplicateDigitalCarbonProject = cloneDeep(mockDigitalCarbonProject); + + beforeEach(() => { + mockICRFilters(); + }); + test("Marketplace projects", async () => { mockMarketplaceProjects([ mockMarketplaceProject, diff --git a/carbonmark-api/test/routes/users/get.test.ts b/carbonmark-api/test/routes/users/get.test.ts index bd9745e43d..39c328e398 100644 --- a/carbonmark-api/test/routes/users/get.test.ts +++ b/carbonmark-api/test/routes/users/get.test.ts @@ -5,6 +5,7 @@ import { aUser, } from "../../../src/.generated/mocks/marketplace.mocks"; import { GRAPH_URLS } from "../../../src/app.constants"; +import { mockICRHolderResponse } from "../../../test/fixtures/icr"; import { build } from "../../helper"; import { DEV_URL, @@ -45,6 +46,12 @@ describe("GET /users/[walletOrHandle]", () => { ], }, }); + + nock(GRAPH_URLS["polygon"].icr) + .post("", (body) => body.query?.includes("getHoldingsByAddress")) + .reply(200, { + mockICRHolderResponse, + }); }); test("by wallet", async () => { diff --git a/carbonmark-api/test/routes/vintages/get.test.ts b/carbonmark-api/test/routes/vintages/get.test.ts index 0482ff738a..9f51e268e0 100644 --- a/carbonmark-api/test/routes/vintages/get.test.ts +++ b/carbonmark-api/test/routes/vintages/get.test.ts @@ -1,15 +1,20 @@ import { FastifyInstance } from "fastify"; import nock from "nock"; import { aProject } from "../../../src/.generated/mocks/marketplace.mocks"; -import { GRAPH_URLS } from "../../../src/app.constants"; +import { GRAPH_URLS, ICR_API } from "../../../src/app.constants"; +import { COUNTRY_CODES, VINTAGES } from "../../../test/fixtures/icr"; import { build } from "../../helper"; import { DEV_URL, ERROR } from "../../test.constants"; describe("GET /vintages", () => { let fastify: FastifyInstance; + let ICR_API_URL: string; // Setup the server beforeEach(async () => { + const icrApiValues = ICR_API("polygon"); + ICR_API_URL = icrApiValues.ICR_API_URL; + fastify = await build(); }); @@ -26,6 +31,10 @@ describe("GET /vintages", () => { nock(GRAPH_URLS["polygon"].marketplace) .post("") .reply(200, { data: { projects: [mock] } }); + nock(ICR_API_URL).get("/public/projects/filters").reply(200, { + vintages: VINTAGES, + countryCodes: COUNTRY_CODES, + }); const response = await fastify.inject({ method: "GET", @@ -46,6 +55,11 @@ describe("GET /vintages", () => { errors: [ERROR], }); + nock(ICR_API_URL).get("/public/projects/filters").reply(200, { + vintages: VINTAGES, + countryCodes: COUNTRY_CODES, + }); + const response = await fastify.inject({ method: "GET", url: `${DEV_URL}/vintages`, @@ -60,6 +74,11 @@ describe("GET /vintages", () => { .post("") .reply(200, { data: { projects: [] } }); + nock(ICR_API_URL).get("/public/projects/filters").reply(200, { + vintages: [], + countryCodes: [], + }); + const response = await fastify.inject({ method: "GET", url: `${DEV_URL}/vintages`, @@ -75,6 +94,10 @@ describe("GET /vintages", () => { .post("") .reply(200, { data: { projects: "invalid data" } }); + nock(ICR_API_URL).get("/public/projects/filters").reply(200, { + vintages: "invalid data", + countryCodes: "invalid data", + }); const response = await fastify.inject({ method: "GET", url: `${DEV_URL}/vintages`, diff --git a/carbonmark-api/test/test.constants.ts b/carbonmark-api/test/test.constants.ts index 667742e0cf..d6e5c5f031 100644 --- a/carbonmark-api/test/test.constants.ts +++ b/carbonmark-api/test/test.constants.ts @@ -32,6 +32,24 @@ export const COUNTRIES = [ { id: "A Random Country", }, + { + id: "China", + }, + { + id: "Spain", + }, + { + id: "United Kingdom", + }, + { + id: "Iceland", + }, + { + id: "Ukraine", + }, + { + id: "Vietnam", + }, ]; export const MOCK_USER_PROFILE: UserProfile = {