Skip to content

Commit 2d7ae5e

Browse files
committed
feat: bump to add new fields
1 parent 2318012 commit 2d7ae5e

File tree

7 files changed

+253
-43
lines changed

7 files changed

+253
-43
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codex-data/sdk",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"engines": {
55
"node": ">=17.5.0"
66
},
@@ -65,4 +65,4 @@
6565
"prettier": "^3.0.3",
6666
"ts-jest": "^29.1.1"
6767
}
68-
}
68+
}

src/resources/graphql.schema.json

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,50 @@
518518
"enumValues": null,
519519
"possibleTypes": null
520520
},
521+
{
522+
"kind": "INPUT_OBJECT",
523+
"name": "AddUserAchievementInput",
524+
"description": null,
525+
"isOneOf": false,
526+
"fields": null,
527+
"inputFields": [
528+
{
529+
"name": "quantity",
530+
"description": null,
531+
"type": {
532+
"kind": "NON_NULL",
533+
"name": null,
534+
"ofType": {
535+
"kind": "SCALAR",
536+
"name": "Int",
537+
"ofType": null
538+
}
539+
},
540+
"defaultValue": null,
541+
"isDeprecated": false,
542+
"deprecationReason": null
543+
},
544+
{
545+
"name": "userId",
546+
"description": null,
547+
"type": {
548+
"kind": "NON_NULL",
549+
"name": null,
550+
"ofType": {
551+
"kind": "SCALAR",
552+
"name": "String",
553+
"ofType": null
554+
}
555+
},
556+
"defaultValue": null,
557+
"isDeprecated": false,
558+
"deprecationReason": null
559+
}
560+
],
561+
"interfaces": null,
562+
"enumValues": null,
563+
"possibleTypes": null
564+
},
521565
{
522566
"kind": "ENUM",
523567
"name": "AlertRecurrence",
@@ -749,6 +793,18 @@
749793
"isDeprecated": false,
750794
"deprecationReason": null
751795
},
796+
{
797+
"name": "includeNative",
798+
"description": "If set to true, native tokens in the response, they will have the id: native:<networkId>",
799+
"type": {
800+
"kind": "SCALAR",
801+
"name": "Boolean",
802+
"ofType": null
803+
},
804+
"defaultValue": null,
805+
"isDeprecated": false,
806+
"deprecationReason": null
807+
},
752808
{
753809
"name": "walletId",
754810
"description": "The ID of the wallet (`walletAddress:networkId`).",
@@ -4881,6 +4937,18 @@
48814937
"isDeprecated": true,
48824938
"deprecationReason": "Use the TokenInfo type"
48834939
},
4940+
{
4941+
"name": "freezable",
4942+
"description": "Whether or not the token is freezable",
4943+
"args": [],
4944+
"type": {
4945+
"kind": "SCALAR",
4946+
"name": "String",
4947+
"ofType": null
4948+
},
4949+
"isDeprecated": false,
4950+
"deprecationReason": null
4951+
},
48844952
{
48854953
"name": "id",
48864954
"description": "The ID of the token (`address:networkId`).",
@@ -4957,6 +5025,18 @@
49575025
"isDeprecated": false,
49585026
"deprecationReason": null
49595027
},
5028+
{
5029+
"name": "mintable",
5030+
"description": "Whether or not the token is mintable",
5031+
"args": [],
5032+
"type": {
5033+
"kind": "SCALAR",
5034+
"name": "String",
5035+
"ofType": null
5036+
},
5037+
"isDeprecated": false,
5038+
"deprecationReason": null
5039+
},
49605040
{
49615041
"name": "name",
49625042
"description": "The token name. For example, `ApeCoin`.",
@@ -26423,6 +26503,18 @@
2642326503
"defaultValue": null,
2642426504
"isDeprecated": false,
2642526505
"deprecationReason": null
26506+
},
26507+
{
26508+
"name": "sourcePairAddress",
26509+
"description": null,
26510+
"type": {
26511+
"kind": "SCALAR",
26512+
"name": "String",
26513+
"ofType": null
26514+
},
26515+
"defaultValue": null,
26516+
"isDeprecated": false,
26517+
"deprecationReason": null
2642626518
}
2642726519
],
2642826520
"interfaces": null,
@@ -40110,6 +40202,34 @@
4011040202
"enumValues": null,
4011140203
"possibleTypes": null
4011240204
},
40205+
{
40206+
"kind": "INPUT_OBJECT",
40207+
"name": "RemoveUserAchievementInput",
40208+
"description": null,
40209+
"isOneOf": false,
40210+
"fields": null,
40211+
"inputFields": [
40212+
{
40213+
"name": "userId",
40214+
"description": null,
40215+
"type": {
40216+
"kind": "NON_NULL",
40217+
"name": null,
40218+
"ofType": {
40219+
"kind": "SCALAR",
40220+
"name": "String",
40221+
"ofType": null
40222+
}
40223+
},
40224+
"defaultValue": null,
40225+
"isDeprecated": false,
40226+
"deprecationReason": null
40227+
}
40228+
],
40229+
"interfaces": null,
40230+
"enumValues": null,
40231+
"possibleTypes": null
40232+
},
4011340233
{
4011440234
"kind": "OBJECT",
4011540235
"name": "ResolutionBarData",
@@ -43438,6 +43558,18 @@
4343843558
"defaultValue": null,
4343943559
"isDeprecated": false,
4344043560
"deprecationReason": null
43561+
},
43562+
{
43563+
"name": "sourcePairAddress",
43564+
"description": "The pair contract address from which to get pricing",
43565+
"type": {
43566+
"kind": "SCALAR",
43567+
"name": "String",
43568+
"ofType": null
43569+
},
43570+
"defaultValue": null,
43571+
"isDeprecated": false,
43572+
"deprecationReason": null
4344143573
}
4344243574
],
4344343575
"type": {
@@ -45928,6 +46060,18 @@
4592846060
"isDeprecated": false,
4592946061
"deprecationReason": null
4593046062
},
46063+
{
46064+
"name": "creatorAddress",
46065+
"description": "The address of the creator of the token",
46066+
"type": {
46067+
"kind": "SCALAR",
46068+
"name": "String",
46069+
"ofType": null
46070+
},
46071+
"defaultValue": null,
46072+
"isDeprecated": false,
46073+
"deprecationReason": null
46074+
},
4593146075
{
4593246076
"name": "exchangeAddress",
4593346077
"description": "The list of exchange contract addresses to filter by.",

src/resources/graphql.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ export type AddUnconfirmedEventsOutput = {
8888
quoteToken?: Maybe<QuoteToken>;
8989
};
9090

91+
export type AddUserAchievementInput = {
92+
quantity: Scalars['Int']['input'];
93+
userId: Scalars['String']['input'];
94+
};
95+
9196
export enum AlertRecurrence {
9297
Indefinite = 'INDEFINITE',
9398
Once = 'ONCE'
@@ -127,6 +132,8 @@ export type BalancesInput = {
127132
cursor?: InputMaybe<Scalars['String']['input']>;
128133
/** Optional token specifically request the balance for */
129134
filterToken?: InputMaybe<Scalars['String']['input']>;
135+
/** If set to true, native tokens in the response, they will have the id: native:<networkId> */
136+
includeNative?: InputMaybe<Scalars['Boolean']['input']>;
130137
/** The ID of the wallet (`walletAddress:networkId`). */
131138
walletId: Scalars['String']['input'];
132139
};
@@ -765,6 +772,8 @@ export type EnhancedToken = {
765772
* @deprecated Use the TokenInfo type
766773
*/
767774
explorerData?: Maybe<ExplorerTokenData>;
775+
/** Whether or not the token is freezable */
776+
freezable?: Maybe<Scalars['String']['output']>;
768777
/** The ID of the token (`address:networkId`). */
769778
id: Scalars['String']['output'];
770779
/**
@@ -786,6 +795,8 @@ export type EnhancedToken = {
786795
info?: Maybe<TokenInfo>;
787796
/** Whether the token has been flagged as a scam. */
788797
isScam?: Maybe<Scalars['Boolean']['output']>;
798+
/** Whether or not the token is mintable */
799+
mintable?: Maybe<Scalars['String']['output']>;
789800
/** The token name. For example, `ApeCoin`. */
790801
name?: Maybe<Scalars['String']['output']>;
791802
/** The network ID the token is deployed on. */
@@ -4368,6 +4379,7 @@ export type OnBarsUpdatedResponse = {
43684379
export type OnPricesUpdatedInput = {
43694380
address: Scalars['String']['input'];
43704381
networkId: Scalars['Int']['input'];
4382+
sourcePairAddress?: InputMaybe<Scalars['String']['input']>;
43714383
};
43724384

43734385
/** Response returned by `onBarsUpdated`. */
@@ -6503,6 +6515,10 @@ export type ReferralsPayoutData = {
65036515
tokenAmountPaid: Scalars['String']['output'];
65046516
};
65056517

6518+
export type RemoveUserAchievementInput = {
6519+
userId: Scalars['String']['input'];
6520+
};
6521+
65066522
/** Price data for each supported resolution. */
65076523
export type ResolutionBarData = {
65086524
__typename?: 'ResolutionBarData';
@@ -6991,6 +7007,7 @@ export type SubscriptionOnPairMetadataUpdatedArgs = {
69917007
export type SubscriptionOnPriceUpdatedArgs = {
69927008
address?: InputMaybe<Scalars['String']['input']>;
69937009
networkId?: InputMaybe<Scalars['Int']['input']>;
7010+
sourcePairAddress?: InputMaybe<Scalars['String']['input']>;
69947011
};
69957012

69967013

@@ -7380,6 +7397,8 @@ export type TokenFilters = {
73807397
change24?: InputMaybe<NumberFilter>;
73817398
/** The unix timestamp for the creation of the token's first pair. */
73827399
createdAt?: InputMaybe<NumberFilter>;
7400+
/** The address of the creator of the token */
7401+
creatorAddress?: InputMaybe<Scalars['String']['input']>;
73837402
/** The list of exchange contract addresses to filter by. */
73847403
exchangeAddress?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
73857404
/** The list of exchange contract IDs to filter by. Applied in conjunction with `network` filter using an OR condition. When used together, the query returns results that match either the specified exchanges or the specified network. */

src/resources/schema.graphql

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ type AddUnconfirmedEventsOutput {
9292
events: [UnconfirmedEvent]!
9393
}
9494

95+
input AddUserAchievementInput {
96+
userId: String!
97+
quantity: Int!
98+
}
99+
95100
enum AlertRecurrence {
96101
INDEFINITE
97102
ONCE
@@ -147,6 +152,11 @@ input BalancesInput {
147152

148153
"""Optional token specifically request the balance for"""
149154
filterToken: String
155+
156+
"""
157+
If set to true, native tokens in the response, they will have the id: native:<networkId>
158+
"""
159+
includeNative: Boolean
150160
}
151161

152162
type BalancesResponse {
@@ -937,6 +947,12 @@ type EnhancedToken {
937947

938948
"""The unix timestamp for the creation of the token."""
939949
createdAt: Int
950+
951+
"""Whether or not the token is mintable"""
952+
mintable: String
953+
954+
"""Whether or not the token is freezable"""
955+
freezable: String
940956
}
941957

942958
"""A token transaction."""
@@ -5690,6 +5706,7 @@ input OneOfNumberConditionInput {
56905706
input OnPricesUpdatedInput {
56915707
address: String!
56925708
networkId: Int!
5709+
sourcePairAddress: String
56935710
}
56945711

56955712
"""Response returned by `onBarsUpdated`."""
@@ -8573,6 +8590,10 @@ type ReferralsPayoutData {
85738590
tokenAddressNetworkIdPaid: String!
85748591
}
85758592

8593+
input RemoveUserAchievementInput {
8594+
userId: String!
8595+
}
8596+
85768597
"""Price data for each supported resolution."""
85778598
type ResolutionBarData {
85788599
"""1 second resolution."""
@@ -9108,6 +9129,9 @@ type Subscription {
91089129

91099130
"""The network ID the token is deployed on."""
91109131
networkId: Int
9132+
9133+
"""The pair contract address from which to get pricing"""
9134+
sourcePairAddress: String
91119135
): Price
91129136

91139137
"""Live-streamed price updates for multiple tokens."""
@@ -9864,6 +9888,9 @@ input TokenFilters {
98649888

98659889
"""Whether to ignore pairs/tokens not relevant to trending"""
98669890
trendingIgnored: Boolean
9891+
9892+
"""The address of the creator of the token"""
9893+
creatorAddress: String
98679894
}
98689895

98699896
"""Metadata for a token."""

src/sdk/Subscribe.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ export class Subscribe {
209209
sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
210210
) =>
211211
this.sdk.subscribe(
212-
`subscription OnPriceUpdated($address: String, $networkId: Int) {
213-
onPriceUpdated (address: $address, networkId: $networkId) {
212+
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
213+
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
214214
address, confidence, networkId, poolAddress, priceUsd, timestamp
215215
}
216216
}`,

0 commit comments

Comments
 (0)