Skip to content

Commit

Permalink
[api] Remove ICR artifacts (#2163)
Browse files Browse the repository at this point in the history
* api: remove serialization from Project and Purchase models

* api: increment version to 5.3.2
  • Loading branch information
psparacino authored Jan 24, 2024
1 parent 8bffd40 commit 3aa7de6
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 54 deletions.
2 changes: 1 addition & 1 deletion carbonmark-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@klimadao/carbonmark-api",
"version": "5.3.1",
"version": "5.3.2",
"description": "An API for exploring Carbonmark project data, prices and activity.",
"main": "app.ts",
"scripts": {
Expand Down
30 changes: 0 additions & 30 deletions carbonmark-api/src/.generated/types/icr.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1656,13 +1656,6 @@ export type ExPostAmountsFragmentFragment = { __typename?: 'ExPostHolder', id: a

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'];
}>;
Expand Down Expand Up @@ -1700,26 +1693,6 @@ export const ExPostAmountsFragmentFragmentDoc = gql`
}
}
${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) {
Expand All @@ -1738,9 +1711,6 @@ const defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationTy

export function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) {
return {
getExPostInfoViaSerialization(variables: GetExPostInfoViaSerializationQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<GetExPostInfoViaSerializationQuery> {
return withWrapper((wrappedRequestHeaders) => client.request<GetExPostInfoViaSerializationQuery>(GetExPostInfoViaSerializationDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'getExPostInfoViaSerialization', 'query');
},
getHoldingsByAddress(variables: GetHoldingsByAddressQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<GetHoldingsByAddressQuery> {
return withWrapper((wrappedRequestHeaders) => client.request<GetHoldingsByAddressQuery>(GetHoldingsByAddressDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'getHoldingsByAddress', 'query');
}
Expand Down
19 changes: 0 additions & 19 deletions carbonmark-api/src/graphql/icr.gql
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
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
Expand Down
1 change: 0 additions & 1 deletion carbonmark-api/src/models/Project.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const ProjectModel = Type.Object({
),
hasSupply: Type.Boolean(),
tokenId: Type.Optional(Type.String()),
serialization: Type.Optional(Type.String()),
});

export type Project = Static<typeof ProjectModel>;
3 changes: 0 additions & 3 deletions carbonmark-api/src/models/Purchase.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ 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({
Expand Down

1 comment on commit 3aa7de6

@vercel
Copy link

@vercel vercel bot commented on 3aa7de6 Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

demo-integration – ./examples/nextjs-typescript-integration

demo-integration-klimadao.vercel.app
klimadao-sable.vercel.app
integration-demo.carbonmark.com
demo-integration-git-staging-klimadao.vercel.app

Please sign in to comment.