@0xobelisk/graphql-client 1.2.0-pre.99 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +92 -0
- package/dist/client.d.ts +121 -1
- package/dist/decoders.d.ts +24 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +660 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +647 -15
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +113 -0
- package/package.json +21 -21
- package/src/client.ts +688 -18
- package/src/decoders.ts +100 -0
- package/src/index.ts +1 -0
- package/src/types.ts +120 -0
package/dist/types.d.ts
CHANGED
|
@@ -83,6 +83,98 @@ export interface StoreTableRow {
|
|
|
83
83
|
lastUpdateDigest: string;
|
|
84
84
|
[key: string]: any;
|
|
85
85
|
}
|
|
86
|
+
export interface MarketplaceListingRow {
|
|
87
|
+
listingId: string;
|
|
88
|
+
dappKey: string;
|
|
89
|
+
seller: string;
|
|
90
|
+
recordType: string;
|
|
91
|
+
recordDataRaw: string;
|
|
92
|
+
price: string;
|
|
93
|
+
coinType: string;
|
|
94
|
+
isFungible: boolean;
|
|
95
|
+
status: 'listed' | 'sold' | 'cancelled' | 'expired';
|
|
96
|
+
buyer?: string | null;
|
|
97
|
+
listedUntil?: string | null;
|
|
98
|
+
createdAtCheckpoint: string;
|
|
99
|
+
updatedAtCheckpoint: string;
|
|
100
|
+
lastUpdateDigest: string;
|
|
101
|
+
}
|
|
102
|
+
export interface DubheSessionRow {
|
|
103
|
+
dappKey: string;
|
|
104
|
+
canonical: string;
|
|
105
|
+
sessionWallet: string;
|
|
106
|
+
expiresAt?: string | null;
|
|
107
|
+
active: boolean;
|
|
108
|
+
updatedAtCheckpoint: string;
|
|
109
|
+
lastUpdateDigest: string;
|
|
110
|
+
lastEventSeq: string;
|
|
111
|
+
}
|
|
112
|
+
export interface DubheUserStorageRow {
|
|
113
|
+
dappKey: string;
|
|
114
|
+
canonicalOwner: string;
|
|
115
|
+
userStorageId: string;
|
|
116
|
+
createdAtCheckpoint: string;
|
|
117
|
+
updatedAtCheckpoint: string;
|
|
118
|
+
lastUpdateDigest: string;
|
|
119
|
+
lastEventSeq: string;
|
|
120
|
+
}
|
|
121
|
+
export interface SceneStorageRow {
|
|
122
|
+
sceneId: string;
|
|
123
|
+
dappKey: string;
|
|
124
|
+
sceneType: string;
|
|
125
|
+
sceneTypeRaw: string;
|
|
126
|
+
authorizationKind?: string | null;
|
|
127
|
+
authorizationKindRaw?: string | null;
|
|
128
|
+
authorizedPermitId?: string | null;
|
|
129
|
+
isDestroyed: boolean;
|
|
130
|
+
createdAtCheckpoint: string;
|
|
131
|
+
destroyedAtCheckpoint?: string | null;
|
|
132
|
+
updatedAtCheckpoint: string;
|
|
133
|
+
lastUpdateDigest: string;
|
|
134
|
+
lastEventSeq: string;
|
|
135
|
+
}
|
|
136
|
+
export interface SceneStorageFieldRow {
|
|
137
|
+
sceneId: string;
|
|
138
|
+
fieldNameRaw: string;
|
|
139
|
+
dappKey: string;
|
|
140
|
+
sceneType: string;
|
|
141
|
+
sceneTypeRaw: string;
|
|
142
|
+
fieldName: string;
|
|
143
|
+
fieldValueRaw?: string | null;
|
|
144
|
+
isDeleted: boolean;
|
|
145
|
+
deletedAtCheckpoint?: string | null;
|
|
146
|
+
updatedAtCheckpoint: string;
|
|
147
|
+
lastUpdateDigest: string;
|
|
148
|
+
lastEventSeq: string;
|
|
149
|
+
}
|
|
150
|
+
export interface ObjectStorageRow {
|
|
151
|
+
objectId: string;
|
|
152
|
+
dappKey: string;
|
|
153
|
+
objectType: string;
|
|
154
|
+
objectTypeRaw: string;
|
|
155
|
+
entityIdRaw: string;
|
|
156
|
+
isDestroyed: boolean;
|
|
157
|
+
createdAtCheckpoint: string;
|
|
158
|
+
destroyedAtCheckpoint?: string | null;
|
|
159
|
+
updatedAtCheckpoint: string;
|
|
160
|
+
lastUpdateDigest: string;
|
|
161
|
+
lastEventSeq: string;
|
|
162
|
+
}
|
|
163
|
+
export interface DubheDappRuntimeStateRow {
|
|
164
|
+
dappKey: string;
|
|
165
|
+
admin?: string | null;
|
|
166
|
+
dappStorageId?: string | null;
|
|
167
|
+
packageId?: string | null;
|
|
168
|
+
version?: string | null;
|
|
169
|
+
creditPool?: string | null;
|
|
170
|
+
paused?: boolean | null;
|
|
171
|
+
settlementMode?: string | null;
|
|
172
|
+
createdAt?: string | null;
|
|
173
|
+
createdAtCheckpoint: string;
|
|
174
|
+
updatedAtCheckpoint: string;
|
|
175
|
+
lastUpdateDigest: string;
|
|
176
|
+
lastEventSeq: string;
|
|
177
|
+
}
|
|
86
178
|
export interface QueryBuilder<_T> {
|
|
87
179
|
where?: Record<string, any>;
|
|
88
180
|
orderBy?: OrderBy[];
|
|
@@ -204,6 +296,27 @@ export interface DubheClientConfig {
|
|
|
204
296
|
fetchOptions?: RequestInit;
|
|
205
297
|
retryOptions?: RetryOptions;
|
|
206
298
|
dubheMetadata?: any;
|
|
299
|
+
/**
|
|
300
|
+
* When true, outgoing HTTP queries are collected within `batchInterval` ms
|
|
301
|
+
* and sent as a single batched POST request. The server must have
|
|
302
|
+
* `enableQueryBatching` / `allowBatchedHttpRequests` enabled (PostGraphile
|
|
303
|
+
* already sets this by default).
|
|
304
|
+
*
|
|
305
|
+
* Default: false
|
|
306
|
+
*/
|
|
307
|
+
batchRequests?: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Time window (ms) to collect queries before flushing a batch.
|
|
310
|
+
* Only used when `batchRequests` is true.
|
|
311
|
+
* Default: 10
|
|
312
|
+
*/
|
|
313
|
+
batchInterval?: number;
|
|
314
|
+
/**
|
|
315
|
+
* Maximum number of operations per batch.
|
|
316
|
+
* Only used when `batchRequests` is true.
|
|
317
|
+
* Default: 20
|
|
318
|
+
*/
|
|
319
|
+
batchMax?: number;
|
|
207
320
|
cacheConfig?: {
|
|
208
321
|
paginatedTables?: string[];
|
|
209
322
|
strategy?: PaginationCacheStrategy;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xobelisk/graphql-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Tookit for interacting with dubhe graphql client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sui",
|
|
@@ -31,25 +31,6 @@
|
|
|
31
31
|
"dist",
|
|
32
32
|
"src"
|
|
33
33
|
],
|
|
34
|
-
"scripts": {
|
|
35
|
-
"build": "pnpm run build:types && pnpm run build:tsup",
|
|
36
|
-
"build:tsup": "tsup ./src/index.ts --format esm,cjs --sourcemap",
|
|
37
|
-
"build:types": "tsc --build",
|
|
38
|
-
"clean": "rm -rf tsconfig.tsbuildinfo ./dist",
|
|
39
|
-
"commit": "commit",
|
|
40
|
-
"doc": "typedoc --out docs src/index.ts",
|
|
41
|
-
"format": "prettier --write .",
|
|
42
|
-
"format:check": "prettier --check .",
|
|
43
|
-
"format:fix": "prettier --write '**/*.{ts,json,md}'",
|
|
44
|
-
"lint": "eslint . --ext .ts",
|
|
45
|
-
"test": "pnpm test:typecheck && pnpm test:unit",
|
|
46
|
-
"test:typecheck": "tsc -p ./test",
|
|
47
|
-
"type-check": "tsc --noEmit",
|
|
48
|
-
"validate": "pnpm format:check && pnpm type-check",
|
|
49
|
-
"watch": "pnpm run clean & pnpm run watch:types & pnpm run watch:tsup",
|
|
50
|
-
"watch:tsup": "tsup ./src/index.ts --format esm,cjs --clean --splitting --watch",
|
|
51
|
-
"watch:types": "tsc --watch"
|
|
52
|
-
},
|
|
53
34
|
"dependencies": {
|
|
54
35
|
"@apollo/client": "^3.13.8",
|
|
55
36
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
@@ -94,5 +75,24 @@
|
|
|
94
75
|
},
|
|
95
76
|
"publishConfig": {
|
|
96
77
|
"access": "public"
|
|
78
|
+
},
|
|
79
|
+
"scripts": {
|
|
80
|
+
"build": "pnpm run build:types && pnpm run build:tsup",
|
|
81
|
+
"build:tsup": "tsup ./src/index.ts --format esm,cjs --sourcemap",
|
|
82
|
+
"build:types": "tsc --build",
|
|
83
|
+
"clean": "rm -rf tsconfig.tsbuildinfo ./dist",
|
|
84
|
+
"commit": "commit",
|
|
85
|
+
"doc": "typedoc --out docs src/index.ts",
|
|
86
|
+
"format": "prettier --write .",
|
|
87
|
+
"format:check": "prettier --check .",
|
|
88
|
+
"format:fix": "prettier --write '**/*.{ts,json,md}'",
|
|
89
|
+
"lint": "eslint . --ext .ts",
|
|
90
|
+
"test": "pnpm test:typecheck && pnpm test:unit",
|
|
91
|
+
"test:typecheck": "tsc -p ./test",
|
|
92
|
+
"type-check": "tsc --noEmit",
|
|
93
|
+
"validate": "pnpm format:check && pnpm type-check",
|
|
94
|
+
"watch": "pnpm run clean & pnpm run watch:types & pnpm run watch:tsup",
|
|
95
|
+
"watch:tsup": "tsup ./src/index.ts --format esm,cjs --clean --splitting --watch",
|
|
96
|
+
"watch:types": "tsc --watch"
|
|
97
97
|
}
|
|
98
|
-
}
|
|
98
|
+
}
|